aboutsummaryrefslogtreecommitdiff
path: root/entries/braxtonh
diff options
context:
space:
mode:
Diffstat (limited to 'entries/braxtonh')
-rw-r--r--entries/braxtonh/adam/main.py16
-rw-r--r--entries/braxtonh/express/index.js22
-rw-r--r--entries/braxtonh/homework/fib.cpp32
-rw-r--r--entries/braxtonh/homework/fib.hpp4
-rw-r--r--entries/braxtonh/types/index.ts18
-rw-r--r--entries/braxtonh/types/test.ts19
6 files changed, 0 insertions, 111 deletions
diff --git a/entries/braxtonh/adam/main.py b/entries/braxtonh/adam/main.py
deleted file mode 100644
index 71cb8da..0000000
--- a/entries/braxtonh/adam/main.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# from tensorflow.keras.optimizers import Adam
-# from tensorflow.keras.models import Sequential
-# from tensorflow.keras.layers import Dense
-
-def main():
- # model = Sequential()
- # model.add(Dense(12, input_shape=(8,), activation='relu'))
- # model.add(Dense(8, activation='relu'))
- # model.add(Dense(1, activation='sigmoid'))
-
- # model.fit(X, y, epochs=4000)
- pass # TODO fill out the rest of this stupid idea
-
-
-if __name__ == '__main__':
- main()
diff --git a/entries/braxtonh/express/index.js b/entries/braxtonh/express/index.js
deleted file mode 100644
index 2da6092..0000000
--- a/entries/braxtonh/express/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import { get } from "axios";
-import express from "express";
-
-const app = express();
-
-const getURL = (n) => `/fib?${new URLSearchParams({n})}`;
-
-app.get("/fib", async (res, req, next) => {
- const {n} = req.params;
- if (n <= 0) {
- res.send(n).status(200);
- } else {
- const futures = [get(getURL(n - 1)), get(getURL(n - 2))];
- const [nSub1, nSub2] = await Promise.all(futures);
- res.send(nSub1 + nSub2).status(200);
- }
- return next();
-});
-
-app.start();
-
-// TODO... is this syntax correct???
diff --git a/entries/braxtonh/homework/fib.cpp b/entries/braxtonh/homework/fib.cpp
deleted file mode 100644
index 900c9d0..0000000
--- a/entries/braxtonh/homework/fib.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "fib.hpp"
-
-#include <string>
-#include <iostream>
-#include <stdexcept>
-
-using namespace std;
-
-int Fibonacci::fib(const int n) const
-{
- // cout << "start" << endl;
- if (n < 0) {
- // HOW??
- cout << "wtfff got ( " << n << " )" << endl;
- // https://stackoverflow.com/questions/8480640/how-to-throw-a-c-exception
- throw invalid_argument("received negative value");
- } else if (n == 0) {
- // cout << "********************* LINE 12" << endl;
- // https://stackoverflow.com/questions/1451170/in-the-fibonacci-sequence-is-fib0-0-or-1
- return 0; //1; ??????
- } else if (n == 1) {
- // cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LINE 15" << endl;
- return 1;
- } else {
- // cout << "GOT TO LINE 19" << endl;
- // cout << "got here" << endl;
- // int retVal = fib(n - 1) + fib(n - 2);
- return fib(n - 1) + fib(n - 2);
- // // cout << "here" << endl;
- // cout << "returning: (" << retVal << " )" << endl;
- }
-}
diff --git a/entries/braxtonh/homework/fib.hpp b/entries/braxtonh/homework/fib.hpp
deleted file mode 100644
index a7bbd30..0000000
--- a/entries/braxtonh/homework/fib.hpp
+++ /dev/null
@@ -1,4 +0,0 @@
-class Fibonacci
-{
- int fib(const int n) const;
-};
diff --git a/entries/braxtonh/types/index.ts b/entries/braxtonh/types/index.ts
deleted file mode 100644
index 11f4086..0000000
--- a/entries/braxtonh/types/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-type Zero = "😰";
-
-type Succ<N> = {prev: N};
-
-type Prev<N> = N extends Succ<infer P> ? P : never;
-
-type Add<A, B> = B extends Zero ? A : Succ<Add<A, Prev<B>>>;
-
-type _Fib<N, AccumulatorA, AccumulatorB> =
- N extends Zero
- ? AccumulatorA
- : N extends Succ<Zero>
- ? AccumulatorB
- : _Fib<Prev<N>, AccumulatorB, Add<AccumulatorA, AccumulatorB>>;
-
-type Fib<N> = _Fib<N, Zero, Succ<Zero>>;
-
-export type {Zero, Succ, Fib};
diff --git a/entries/braxtonh/types/test.ts b/entries/braxtonh/types/test.ts
deleted file mode 100644
index 2ce83e7..0000000
--- a/entries/braxtonh/types/test.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import {Zero, Succ, Fib} from "./index";
-
-const zero: Zero = "😰";
-const one: Succ<typeof zero> = {prev: zero};
-const two: Succ<typeof one> = {prev: one};
-const three: Succ<typeof two> = {prev: two};
-const four: Succ<typeof three> = {prev: three};
-const five: Succ<typeof four> = {prev: four};
-const six: Succ<typeof five> = {prev: five};
-const seven: Succ<typeof six> = {prev: six};
-const eight: Succ<typeof seven> = {prev: seven};
-
-const fibZero: Fib<typeof zero> = zero;
-const fibOne: Fib<typeof one> = one;
-const fibTwo: Fib<typeof two> = one;
-const fibThree: Fib<typeof three> = two;
-const fibFour: Fib<typeof four> = three;
-const fibFive: Fib<typeof five> = five;
-const fibSix: Fib<typeof six> = eight;