Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanwahab committed Oct 15, 2024
1 parent b401343 commit 6e7ade1
Show file tree
Hide file tree
Showing 21 changed files with 3,594 additions and 145 deletions.
2 changes: 0 additions & 2 deletions .cursorignore

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
data/db/code_annotation.db
data/alan_kay/images
notebooks/robot_remote_control
notebooks/deno-webgpu
Expand Down
File renamed without changes.
64 changes: 64 additions & 0 deletions course_gen_step_4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
pathname = "/Users/shelbernstein/Documents/driving/";

const fs = require("fs");
const path = require("path");

const filleNames = {};

function traverseDirectory(dirPath) {
const items = fs.readdirSync(dirPath);

items.forEach((item) => {
const itemPath = path.join(dirPath, item);
const stats = fs.statSync(itemPath);

if (stats.isDirectory()) {
traverseDirectory(itemPath);
} else {
filleNames[itemPath] = {
contents: fs.readFileSync(itemPath).toString(),
};
}
});
}

traverseDirectory(pathname);
const sqlite3 = require("sqlite3").verbose();
let db = new sqlite3.Database("./data/db/code_annotation.db", (err) => {
if (err) {
console.error(err.message);
}
console.log("Connected to the code_annotation database.");
});

db.serialize(() => {
db.run(`CREATE TABLE IF NOT EXISTS code_files (
id INTEGER PRIMARY KEY AUTOINCREMENT,
file_path TEXT UNIQUE NOT NULL,
file_contents TEXT NOT NULL
)`);

Object.entries(filleNames).forEach(([filePath, fileData]) => {
db.run(
`INSERT INTO code_files(file_path, file_contents)
VALUES (?, ?)`,
[filePath, fileData.contents],
function (err) {
if (err) {
// Handle insert error, e.g., print error message
console.error(err.message);
} else {
// Get the id of the last inserted row
console.log(`A row has been inserted with rowid ${this.lastID}`);
}
},
);
});
});

db.close((err) => {
if (err) {
console.error(err.message);
}
console.log("Close the database connection.");
});
1 change: 0 additions & 1 deletion data/odyssey/1-simulation0.md

This file was deleted.

3 changes: 3 additions & 0 deletions data/odyssey/code_annotation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"driving/": {}
}
28 changes: 5 additions & 23 deletions infra/scripts/course_gen.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@



# read modules - chapter - list of topics
# makes a data app for each one - in the

# Check if the JSON path is correct and the file is not empty

#rm data/odyssey/*.md

#file_names=$(jq -r '.modules[].title | gsub(" "; "-") | ascii_downcase | gsub("[^a-z0-9-]"; "") + ".md"' data/robotics-odyssey/modules.json)


#file_names=$(jq -r '.modules[].title | gsub(" "; "-") | ascii_downcase | gsub("[^a-z0-9-]"; "") + ".md"' data/robotics-odyssey/modules.json)
submodule_file_names=$(jq -r '.modules[].sub_modules[] | gsub(" "; "-") | ascii_downcase | gsub("[^a-z0-9-]"; "")' data/odyssey/modules.json)
# echo $submodule_file_names

# #echo $file_names

# read modules - chapter - list of topics makes a data app for each one - in the
#submodule_file_names=$(jq -r '.modules[].sub_modules[] | gsub(" "; "-") | ascii_downcase | gsub("[^a-z0-9-]"; "")' data/odyssey/modules.json)
for filename in $submodule_file_names; do # Indentation fixed here
#echo "Processing $filename" # Add a command inside the loop
# Add your desired command here, for example:
mkdir -p "data/odyssey/$filename"
# mkdir -p "data/odyssey/$filename"
done
#python3 infra/scripts/course_gen_step_2.py --query "gen a markdown of example markdown about the robotics topic " --input_dir data/odyssey/ --output_dir=data/odyssey/

bun infra/scripts/course_gen_step_2.js
#bun infra/scripts/course_gen_step_2.js

#bun infra/scripts/course_gen_step_4.js
# Find all 'examples' folders in 'course_content' and move their 'data' and 'components' folders
# find course_content -type d -name "examples" | while read -r example_dir; do
# # Move 'data' and 'components' folders to 'course_content/src'
Expand Down
15 changes: 7 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ TLDR: To support this project - please follow[https://worrydream.com - ](https:/

## observablehq = the magic papyrus for bret's magic ink

## 1. Hardware Design + Repair
## 1. Perception

## 2. Perception + a little cgi
## 2. Planing + Predciton

## 3. Planing + Predciton
## 3. Simulation + UI + Real World Applications

## 4. Simulation + UI + Real World Applications (4 feeding stray cats -> clean your room + art like crucible)
## 4. Hardware Design + Repair
[![Watch the video](https://img.youtube.com/vi/NNzMjrJQKsc/maxresdefault.jpg)](https://youtu.be/NNzMjrJQKsc)
[![Watch the video](https://img.youtube.com/vi/_gXiVOmaVSo/maxresdefault.jpg)](https://youtu.be/_gXiVOmaVSo)
[![Watch the video](https://img.youtube.com/vi/mwMUJg2mfII/maxresdefault.jpg)](https://youtu.be/mwMUJg2mfII)
Expand All @@ -37,18 +37,17 @@ TLDR: To support this project - please follow[https://worrydream.com - ](https:/
![https://worrydream.com/SeeingSpaces/SeeingSpaces.jpg](https://worrydream.com/SeeingSpaces/SeeingSpaces.jpg)

> Our pioneers are those who transcend interaction—designers whose creations anticipate, not obey. The hero of tomorrow is not the next Steve Wozniak, but the next William Playfair. An artist who redefines how people learn. An artist who paints with magic ink.
> ___Bret Victor__
> __Bret Victor__
Now... thats you(everyone in the world)
# Bibliopgrahy
1. https://www.youtube.com/watch?v=yJDv-zdhzMY&ab_channel=Marcel
2. thanks to ~100 billion people for figuring things out.
3. thanks to BotParty, norvig, karpathy, pg, sicp, ruskin, <a href="yt/breakingbadco">Jesse et al</a> - https://worrydream.com/MagicInk/ - (artist who paints with magic ink = you -- the reader)
[![alt text](https://dynamicland.org/2024/Front_shelf/2dc5b9c5984d24df5d2aeaedf06442f8.jpg)](https://dynamicland.org/2024/Front_shelf/2dc5b9c5984d24df5d2aeaedf06442f8.jpg)
https://github.com/uber-go/guide/blob/master/style.md
favorite 3 interactive video-dioramas
1. mario et all 4 <a href="https://davidcole.com">mechanics design</a>
2. dwarf fortress 4 multi-view (fp-role-playing + isometric strategy)
3. dota + best mod + wow 4 multiplayer story-design + deus ex: invisible war 4 best prediction

> "we understand our mental procceses as much as fish understand water"
> _John Mccarthy_ - Mathematics of Common Sense
<!-- http://cm.bell-labs.com/cm/ms/what/shannonday/shannon1948.pdf -->
<!-- https://worrydream.com/MagicInk/predictor.lua -->
12 changes: 12 additions & 0 deletions red-king-6e80/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
172 changes: 172 additions & 0 deletions red-king-6e80/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*

# wrangler project

.dev.vars
.wrangler/
6 changes: 6 additions & 0 deletions red-king-6e80/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true
}
Loading

0 comments on commit 6e7ade1

Please sign in to comment.