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 / raspberrypi-server.md
Last active June 26, 2018 16:37
Creating and using a server on your raspberry pi.
@dannydenenberg
dannydenenberg / create-title-links.py
Created June 26, 2018 16:39
This will create the links for a contents part of a markdown file.
@dannydenenberg
dannydenenberg / Timer.java
Created November 11, 2018 15:02
A timer class to use with Java programs. Easy timing of any interval within a program.
import java.util.ArrayList;
import java.util.List;
/**
* Times anything
*/
public class Timer {
private double miliseconds;
private Thread thread;
private boolean timing;
val a: String = "hello" // constant (value)
var b: String = "goodbye" // variable
fun main(args: Array<String>) {
b = "oops"
// kotlin handles null
var myVar: String? = null // you can only asign null to optionals like this
@dannydenenberg
dannydenenberg / nn.py
Last active April 20, 2019 15:29
A neural network in python 3.
import numpy as np
learn_rate = 0.01
# set inputs
X = np.array([[1,1,1],
[1,1,0],
[1,0,1],
[0,1,1],
[0,1,0],
## NOTE: When sending from gmail. The first time, it will tell you that there is suspicious acitivity going on. Just
# click on 'review activity' and say that it was you and then it will work.
# Python code to illustrate Sending mail from
# your Gmail account
import smtplib
def send_email(sender_email, sender_pass, recipient_email, subject, mes):
# creates SMTP session
@dannydenenberg
dannydenenberg / gist-reveal.it-slides.html
Last active March 13, 2019 01:42 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<!--<section data-background-transition='zoom' data-transition='concave' data-state='blackout'>-->
<section data-background-transition='zoom' data-state='blackout'>
<h2>My Gist! Cool. Daniel Denenberg</h2>
<h1>Made usingReveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
import java.util.Scanner;
/**
* This class will contain an array of integer values and methods to update, search, sort and print the data.
*/
public class ArraySearchAndSort {
/**
* This array keeps track of all of the scores and can hold UP TO 100 elements
*/
static int[] scores = new int[100];
@dannydenenberg
dannydenenberg / IslandsOnIslands.js
Created July 2, 2019 15:56
The Solution to the infamous `Islands on Islands` problem made by Mr. Thyden of Omaha Central High School
var COUNTER = 0;
// first test case
// should return 3
var nums =
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~********~~~~~~~********~~~~
~~~~****~~~~~~~~~~**~~*~**~~~~
~~~~*~~~*~~~~~~~~~**~~~~**~~~~
~~~~*~~~*~~~~~~~~~********~~~~
// init project
const express = require('express'); // the library we will use to handle requests. import it here
const app = express(); // instantiate express
app.use(require("cors")()) // allow Cross-domain requests
app.use(require('body-parser').json()) // When someone sends something to the server, we can recieve it in JSON format
// base route. Responds to GET requests to the root route ('/')
app.get("/", (req, res) => {
res.send("Home sweet home 🏚") // always responds with the string "TODO"
});