diff --git a/web/.editorconfig b/.editorconfig
similarity index 100%
rename from web/.editorconfig
rename to .editorconfig
diff --git a/web/.eslintrc.cjs b/.eslintrc.cjs
similarity index 100%
rename from web/.eslintrc.cjs
rename to .eslintrc.cjs
diff --git a/.gitignore b/.gitignore
index c4a847d..dad6f80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,5 @@
-/result
+.DS_Store
+node_modules
+/build
+/.svelte-kit
+/package
diff --git a/web/.prettierrc b/.prettierrc
similarity index 100%
rename from web/.prettierrc
rename to .prettierrc
diff --git a/README.md b/README.md
index d1bdf4c..82510ca 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,38 @@
-eduproj
+# create-svelte
+
+Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
+
+## Creating a project
+
+If you're seeing this, you've probably already done this step. Congrats!
+
+```bash
+# create a new project in the current directory
+npm init svelte@next
+
+# create a new project in my-app
+npm init svelte@next my-app
+```
+
+> Note: the `@next` is temporary
+
+## Developing
+
+Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
+
+```bash
+npm run dev
+
+# or start the server and open the app in a new browser tab
+npm run dev -- --open
+```
+
+## Building
+
+Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
+
+```bash
+npm run build
+```
+
+> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
diff --git a/flake.lock b/flake.lock
deleted file mode 100644
index 444495a..0000000
--- a/flake.lock
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "nodes": {
- "flake-utils": {
- "locked": {
- "lastModified": 1629481132,
- "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "997f7efcb746a9c140ce1f13c72263189225f482",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
- "nixpkgs": {
- "locked": {
- "lastModified": 1630125726,
- "narHash": "sha256-STeKWv2RQCTwA9FEAiGCcO9l+CiXhVuaTl1bz3mJRxw=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "45131df1671d5886821908b5294f5fba5fb23fc7",
- "type": "github"
- },
- "original": {
- "id": "nixpkgs",
- "type": "indirect"
- }
- },
- "root": {
- "inputs": {
- "flake-utils": "flake-utils",
- "nixpkgs": "nixpkgs"
- }
- }
- },
- "root": "root",
- "version": 7
-}
diff --git a/flake.nix b/flake.nix
deleted file mode 100644
index 812e89b..0000000
--- a/flake.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- inputs.flake-utils.url = "github:numtide/flake-utils";
- outputs = { self, flake-utils, nixpkgs }:
- flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
- let
- pkgs = nixpkgs.legacyPackages.${system};
- pythonPkgs = pkgs.python39Packages;
- flakePkgs = rec {
- material = pkgs.callPackage ./material {};
- sm2 = pythonPkgs.callPackage ./sm2 {};
- };
- in rec {
- defaultPackage = packages.sm2;
- devShell = pkgs.mkShell {
- packages = with pkgs; [
- (python39.withPackages (p: with p; [
- flask
- ]))
- ];
- };
- packages = flake-utils.lib.flattenTree flakePkgs;
- });
-}
diff --git a/web/package-lock.json b/package-lock.json
similarity index 100%
rename from web/package-lock.json
rename to package-lock.json
diff --git a/web/package.json b/package.json
similarity index 100%
rename from web/package.json
rename to package.json
diff --git a/result b/result
new file mode 120000
index 0000000..1a1575c
--- /dev/null
+++ b/result
@@ -0,0 +1 @@
+/nix/store/6z8hvajcipvnzqc64hk9qln9svly2idk-python3.9-sm2
\ No newline at end of file
diff --git a/sm2/default.nix b/sm2/default.nix
deleted file mode 100644
index ba380aa..0000000
--- a/sm2/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ buildPythonPackage, nix-gitignore, python, mypy }:
-
-let
- pythonBuildInputs = [ ];
- pythonWithBuildInputs = python.withPackages (_: pythonBuildInputs);
-in
-buildPythonPackage {
- name = "sm2";
- src = nix-gitignore.gitignoreSourcePure [ ../.gitignore ] ./.;
-
- doCheck = true;
- checkInputs = [ mypy ];
- checkPhase = ''
- ${mypy}/bin/mypy --no-color-output \
- --package sm2 \
- --python-executable ${pythonWithBuildInputs}/bin/python \
- --strict
- '';
-}
diff --git a/sm2/setup.py b/sm2/setup.py
deleted file mode 100644
index 0240fde..0000000
--- a/sm2/setup.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from setuptools import setup
-
-setup(
- name = "sm2",
- packages = ["sm2"],
-)
diff --git a/sm2/sm2/__init__.py b/sm2/sm2/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/sm2/sm2/sm2.py b/sm2/sm2/sm2.py
deleted file mode 100644
index f68e9ab..0000000
--- a/sm2/sm2/sm2.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from typing import Tuple
-
-def sm2_algo(
- user_grade: int,
- n: int,
- ef: float,
- i: int,
-) -> Tuple[int, float, int]:
- """
- From https://en.wikipedia.org/wiki/SuperMemo#Description_of_SM-2_algorithm
-
- n: repetition number, how many times a number was repeated
- ef: easiness-factor, how quickly the interval grows
- i: interval (in days)
-
- returns the updated version of these values
- """
-
- # grade >= 3 means the response was correct
- if user_grade >= 3:
- # update the number of days until the next review
- # increases exponentially starting with 1 day and 6 days
- if n == 0:
- i = 1
- elif n == 1:
- i = 6
- else:
- i = round(i * ef)
-
- # increment the number of days
- n += 1
-
- # incorrect
- else:
- n = 0
- i = 1
-
- inv_grade = 5 - user_grade
- ef = ef + (0.1 - inv_grade * (0.08 + inv_grade * 0.02))
- if ef < 1.3:
- ef = 1.3
-
- return (n, ef, i)
diff --git a/web/src/app.html b/src/app.html
similarity index 100%
rename from web/src/app.html
rename to src/app.html
diff --git a/web/src/global.d.ts b/src/global.d.ts
similarity index 100%
rename from web/src/global.d.ts
rename to src/global.d.ts
diff --git a/src/lib/MasteryDemo.svelte b/src/lib/MasteryDemo.svelte
new file mode 100644
index 0000000..ac46da4
--- /dev/null
+++ b/src/lib/MasteryDemo.svelte
@@ -0,0 +1,5 @@
+
+
+
{ question.description }
-yadda yadda yadda what's unique about this mastery based learning appraoch diff --git a/web/static/favicon.png b/static/favicon.png similarity index 100% rename from web/static/favicon.png rename to static/favicon.png diff --git a/web/svelte.config.js b/svelte.config.js similarity index 100% rename from web/svelte.config.js rename to svelte.config.js diff --git a/web/tsconfig.json b/tsconfig.json similarity index 100% rename from web/tsconfig.json rename to tsconfig.json diff --git a/web/.gitignore b/web/.gitignore deleted file mode 100644 index dad6f80..0000000 --- a/web/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package diff --git a/web/README.md b/web/README.md deleted file mode 100644 index 82510ca..0000000 --- a/web/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte); - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm init svelte@next - -# create a new project in my-app -npm init svelte@next my-app -``` - -> Note: the `@next` is temporary - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then: - -```bash -npm run build -``` - -> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.