Skip to content

Instantly share code, notes, and snippets.

View dannydenenberg's full-sized avatar
💃
Probably in a musical

Danny Denenberg dannydenenberg

💃
Probably in a musical
View GitHub Profile
@dannydenenberg
dannydenenberg / math22project.py
Last active December 12, 2022 05:31
Our math 22 project--a search engine for the math 22 notes using vectors and vector similarity.
import PyPDF2
import re
from sklearn.feature_extraction.text import CountVectorizer
import os
from numpy import dot
from numpy.linalg import norm
# from sklearn.neural_network import MLPClassifier
from random import randint
from tensorflow.keras.models import Sequential
@dannydenenberg
dannydenenberg / Docker-Tutorial.md
Created February 14, 2022 10:54
Notes from TechWorld with Nana's 3-hour Docker tutorial.

Docker

A CONTAINER is a running environment for an IMAGE. CONTAINER has a port which makes it possible to talk to it. A CONTAINER has a virtual file system.

Everything in Docker Hub are IMAGES.

Containers have names (easy to remember) and ID’s. Both can be used to reference it.

When you don’t specify a version of an image, you get the latest one.

@dannydenenberg
dannydenenberg / function-approximation-methods.html
Last active April 30, 2021 00:52
Euler's Method and Error calculator
<!--
The way this works:
- user types in inputs
- the page reloads with URL params of input
- function fires and completes
-->
<!DOCTYPE html>
<html lang="en">
<head>
@dannydenenberg
dannydenenberg / graphql-client.js
Created August 21, 2020 02:09
A super simple, easy as pie GraphQL client.
import fetch from "node-fetch";
/** EXAMPLE USAGE **/
const client = new GraphqlClient('http://localhost:3000');
client.query(HELLO).then(data => console.log(data));
const HELLO = `
{
hello
@dannydenenberg
dannydenenberg / wifi.c
Created August 20, 2020 02:31
Testing wifi password.
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
int counter = 0;
int lines_allocated = 128;
int max_line_len = 100;
import React, { Component } from 'react'
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
const TestDND = () => {
const [colorMap, setColors] = React.useState({
a: ["blue", "red", "yellow"],
b: ["pink"],
c: ["green", "tan"]
});
const neatCsv = require('neat-csv');
const fs = require('fs')
const fileName = "./contacts.csv";
// NOTE: Remember to clean the data.
// 1. The FIRST line should be headers
fs.readFile(fileName, async (err, data) => {
if (err) {
console.error(err)

Keybase proof

I hereby claim:

  • I am dannydenenberg on github.
  • I am dannydenenberg (https://keybase.io/dannydenenberg) on keybase.
  • I have a public key ASDdg1BJQRkDfp-3QDgrjzv8IZPAx7y_lgc92nhKbxGJ5wo

To claim this, I am signing this object:

@dannydenenberg
dannydenenberg / cloudSettings
Last active February 9, 2020 06:30
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-09T06:30:10.453Z","extensionVersion":"v3.4.3"}
function doIt() {
// gather variable data
const nth = parseInt(document.getElementById("nth").value);
const expr = document.getElementById("expr").value;
const respectTo = document.getElementById("respectTo").value;
const answer = `${math.format(
nthDerivative(expr, nth, respectTo),
14
)}`;