I hereby claim:
- I am ad2476 on github.
- I am quallius (https://keybase.io/quallius) on keybase.
- I have a public key ASALc0tSwiZvPMQaUVraNHXvIhwVXxgkzA9SXserJ_AFjgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
.PHONY: all clean print friend | |
HW = $(shell basename $(CURDIR)) | |
PRINTER = c4 | |
USER = username | |
FRIEND = yourfriend | |
DEPS = cover.pdf writeup.pdf hw2.pdf | |
TARGET = $(HW).pdf |
import tensorflow as tf | |
import sys | |
import argparse | |
import pickle | |
batch_size = 20 | |
embed_size = 30 | |
hidden_size = 100 | |
# text is a list of sentences |
import tensorflow as tf | |
import sys | |
from tensorflow.examples.tutorials.mnist import input_data | |
# Initialize weights with a small amount of noise for symmetry breaking, and to prevent 0 gradients. | |
# For ReLU neurons, good practice to initialize with a slightly positive initial bias to avoid "dead neurons" | |
def weight_variable(shape): | |
initial = tf.truncated_normal(shape, stddev=0.1) | |
return tf.Variable(initial) |
{ | |
"Working Directory" : "HOME_CHANGE_THIS", | |
"Prompt Before Closing 2" : 0, | |
"Selected Text Color" : { | |
"Green Component" : 0.5648583769798279, | |
"Red Component" : 0.5059919357299805, | |
"Blue Component" : 0.5636365413665771 | |
}, | |
"Rows" : 37, | |
"Ansi 11 Color" : { |
# Redistribute the PolyHack winnings: | |
# Returns list of all the people who need money, and all who have too much | |
# in the form of (receivers, givers) | |
def findCreditorsDebtors(allocs, desiredAllocs): | |
receivers, givers = [], [] | |
for person,amt in allocs.iteritems(): | |
desired = desiredAllocs[person] | |
if amt < desired: |
abstract class Structure { | |
public final int ASCENDING=1; | |
public final int DESCENDING=-1; | |
public final int NONE=0; | |
protected int[] storage; | |
protected boolean sorted; | |
protected int order; | |
/* Determine the ordering state of storage */ |
/* Returns the nth prime number - uses the Sieve of Eratosthenes */ | |
public int calculatePrime(int limit, int n) { | |
List<Integer> working_set = new ArrayList<Integer>(); | |
int p=2; | |
// Fill our working set with consecutive integers (longs) from 2 through n | |
System.out.println("Populating working set..."); | |
for(int i=2; i<=limit; i++) | |
working_set.add(i); | |
// Largest prime factor of number | |
public long primeFactor(long number) { | |
long largestFactor=0; | |
for (long n=2; n<=(int)Math.sqrt(number); n++) { | |
// n is a factor of number | |
if(number%n == 0) { | |
// Is n prime? | |
boolean isPrime=true; | |
for (long i=2; i<=(int)Math.sqrt(n); i++) { | |
if(n%i == 0) { // i is a factor of n |