diff options
| author | Emil | 2023-08-04 09:13:47 -0600 |
|---|---|---|
| committer | Emil | 2023-08-04 09:13:47 -0600 |
| commit | 935243d8b4ea992c50315f0c8fcb300365a5762d (patch) | |
| tree | c22d800773997b7b267d5d6cba5931f22ee2be64 /bootstrap | |
| download | emil-probotic-935243d8b4ea992c50315f0c8fcb300365a5762d.tar.xz emil-probotic-935243d8b4ea992c50315f0c8fcb300365a5762d.tar.zst | |
Diffstat (limited to 'bootstrap')
| -rwxr-xr-x | bootstrap/bootstrap.sh | 5 | ||||
| -rw-r--r-- | bootstrap/bootstrap.sql | 3 | ||||
| -rw-r--r-- | bootstrap/defaults.sql | 28 | ||||
| -rw-r--r-- | bootstrap/init.sql | 32 | ||||
| -rw-r--r-- | bootstrap/project_list.sql | 68 |
5 files changed, 136 insertions, 0 deletions
diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh new file mode 100755 index 0000000..27205c2 --- /dev/null +++ b/bootstrap/bootstrap.sh @@ -0,0 +1,5 @@ +#!/bin/sh +DBFILE=probotic_data.sqlite + +rm -f "$DBFILE" +sqlite3 "$DBFILE" -init bootstrap.sql -line '.quit' diff --git a/bootstrap/bootstrap.sql b/bootstrap/bootstrap.sql new file mode 100644 index 0000000..9c4c7cb --- /dev/null +++ b/bootstrap/bootstrap.sql @@ -0,0 +1,3 @@ +.read init.sql +.read defaults.sql +.read project_list.sql diff --git a/bootstrap/defaults.sql b/bootstrap/defaults.sql new file mode 100644 index 0000000..61541a9 --- /dev/null +++ b/bootstrap/defaults.sql @@ -0,0 +1,28 @@ +INSERT INTO difficulty VALUES('Easy'); +INSERT INTO difficulty VALUES('Medium'); +INSERT INTO difficulty VALUES('Hard'); +INSERT INTO difficulty VALUES('Fuck You'); + +INSERT INTO tag VALUES('AI'); +INSERT INTO tag VALUES('Algorithms'); +INSERT INTO tag VALUES('Games'); +INSERT INTO tag VALUES('Math'); +INSERT INTO tag VALUES('Networking'); +INSERT INTO tag VALUES('Rendering'); +INSERT INTO tag VALUES('Simulation'); +INSERT INTO tag VALUES('Tools'); + +-- I believe the list of links might be better suited as a detacted part of this +-- I also have no idea how this would format this internally +-- Does SQL would support 'a' 'b' concat syntax? as in C's puts("abc" "def")? + +INSERT INTO project (title, body) VALUES ( + 'IRC Bot', + 'Build an IRC Bot using SQLite3 and libircclient\nhttps://www.sqlite.org/index.html\n + http://www.ulduzsoft.com/libircclient/' +); + +INSERT INTO assignment (who, project) VALUES ( + '#/g/chad', + 1 +); diff --git a/bootstrap/init.sql b/bootstrap/init.sql new file mode 100644 index 0000000..c3ae440 --- /dev/null +++ b/bootstrap/init.sql @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS project; +CREATE TABLE project ( + title VARCHAR(64) NOT NULL, + body TEXT DEFAULT NULL, + difficulty INT NOT NULL DEFAULT 1 REFERENCES difficulty(diff), + trigger_date DATE DEFAULT NULL, + started DATE NOT NULL DEFAULT CURRENT_DATE, + span INT NOT NULL DEFAULT 7 -- time to last for in days +); + +DROP TABLE IF EXISTS difficulty; +CREATE TABLE difficulty ( + diff VARCHAR(16) +); + +DROP TABLE IF EXISTS tag; +CREATE TABLE tag ( + t VARCHAR(16) +); + +DROP TABLE IF EXISTS project_tag; +CREATE TABLE project_tag ( + project INT REFERENCES project(rowid), + tag INT REFERENCES tag(rowid) +); + +DROP TABLE IF EXISTS assignment; +CREATE TABLE assignment ( + who VARCHAR(32) NOT NULL, + repo_link VARCHAR(128) DEFAULT NULL, + project INT NOT NULL REFERENCES project(rowid) +); diff --git a/bootstrap/project_list.sql b/bootstrap/project_list.sql new file mode 100644 index 0000000..ddb3412 --- /dev/null +++ b/bootstrap/project_list.sql @@ -0,0 +1,68 @@ +-- Starting off: +INSERT INTO project (title, difficulty, span) VALUES ('Hello world', 1, 1); +INSERT INTO project (title, difficulty, span) VALUES ('Fizz Buzz', 1, 1); +INSERT INTO project (title, difficulty, span) VALUES ('Data Structures (Stacks, Heaps, Binary Trees, etc)', 2, 7); + +-- AI: +INSERT INTO project (title, difficulty, span) VALUES ('Neural Network', 2, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Tensorflow Clone', 3, 30); + +-- Algorithms: +INSERT INTO project (title, difficulty, span) VALUES ('Custom Allocator', 2, 1); +INSERT INTO project (title, difficulty, span) VALUES ('Custom Compression Library', 2, 1); +INSERT INTO project (title, difficulty, span) VALUES ('ROT 13, ROT 47, ROT with any series', 1, 1); +INSERT INTO project (title, difficulty, span) VALUES ('Vectorized SIMD Matrix Multiplier', 3, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Printf Suite Implementation', 2, 7); +INSERT INTO project (title, difficulty, span) VALUES ('String Manipulation Library', 1, 1); +INSERT INTO project (title, difficulty, span) VALUES ('Pathfinding: Dijkstra''s Algorithm', 2, 1); +INSERT INTO project (title, difficulty, span) VALUES ('Pathfinding: A* Search Algorithm', 2, 1); + +-- Applied Math and Problems: +INSERT INTO project (title, difficulty, span) VALUES ('General Lambert''s-Problem Solver', 0, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Solution to the 8 Queens Problem', 3, 7); + +-- Calculators: +INSERT INTO project (title, difficulty, span) VALUES ('Graphing Calculator', 3, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Normal Calculator', 1, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Reverse Polish Notation Calculator (Look into dc(1))', 1, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Spreadsheet (CSV Read/write) (With Excel features)', 2, 7); + +-- Compiler (Or Interpreter) Theory: +INSERT INTO project (title, difficulty, span) VALUES ('C Compiler', 3, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Holy C Compiler', 3, 21); +INSERT INTO project (title, difficulty, span) VALUES ('Scheme/Lisp Compiler', 3, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Language Virtual Machine', 4, 365); +INSERT INTO project (title, difficulty, span) VALUES ('Custom LLVM Language', 1, 7); +INSERT INTO project (title, difficulty, span) VALUES ('YACC Implementation', 2, 30); + +-- Networking: +INSERT INTO project (title, difficulty, span, body) VALUES ('E2EE PSK Messenger (either GUI or CLI, preferably detached from servers)', 5, 7, 'E2EE PSK Messenger (either GUI or CLI, preferably detached from servers)'); +INSERT INTO project (title, difficulty, span) VALUES ('HTTP Web Server', 5, 7); +INSERT INTO project (title, difficulty, span) VALUES ('IRC Client', 2, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Matrix Client', 2, 30); +INSERT INTO project (title, difficulty, span) VALUES ('BitTorrent Client', 2, 30); + +-- OS: +INSERT INTO project (title, difficulty, span, body) VALUES ('Your own Operating system', 4, 30, 'wiki.osdev.org'); + +-- Rendering: +INSERT INTO project (title, difficulty, span) VALUES ('3D CAD Software', 4, 7); +INSERT INTO project (title, difficulty, span) VALUES ('3D Vertex Editor', 3, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Bitmap Raytracer', 3, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Media Player (Think MPV & VLC)', 3, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Music Player Daemon Implementation', 2, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Image to ASCII (BONUS: Use Unicode or Color)', 2, 7); + +-- Simulation: +INSERT INTO project (title, difficulty, span) VALUES ('Hydrodynamics', 2, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Aerodynamics', 2, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Rigid Body Physics', 2, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Voronoi Diagram (HARDMODE: hardware rendering)', 1, 7); + +-- Tools (Usable and Applied Algorithms): +INSERT INTO project (title, difficulty, span) VALUES ('Terminal Emulator', 3, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Text Editor', 3, 7); +INSERT INTO project (title, difficulty, span) VALUES ('Syntax Highlighter (preferably for your own editor)', 2, 30); +INSERT INTO project (title, difficulty, span) VALUES ('General Compression Library (Think zlib)', 2, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Multi-Threaded GREP Implementation (BONUS: Highlighting and line numbers)(Hint: use pThread and AIO)', 2, 30); +INSERT INTO project (title, difficulty, span) VALUES ('Vector/Bitmap Image Manipulation Program', 2, 30); |
