Skip to content

Instantly share code, notes, and snippets.

View sksullivan's full-sized avatar

Sloane Sullivan sksullivan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sksullivan on github.
  • I am sksullivan (https://keybase.io/sksullivan) on keybase.
  • I have a public key whose fingerprint is 7692 56DD 1004 07F4 EFA8 A484 6BF8 30F1 16EC E8BC

To claim this, I am signing this object:

1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1
import math
import random
import json
import pandas as pd
class NN:
def __init__(self,numNeurons):
self.knowledgeTable = [{} for i in range(numNeurons)]
import requests
import time
import urllib
RUN_URL = u'http://api.hackerearth.com/v3/code/run/'
CLIENT_SECRET = 'huehuehuehuehuehuehuehuehuehueheu'
class RequestMaker():
def __init__(self, lastUpdateID):
@sksullivan
sksullivan / ImageSearchBot.py
Created June 30, 2015 03:55
Quick, sub 30 line image search bot for Telegram Messenger
import requests
import time
import urllib
if __name__ == '__main__':
print("Starting ImageSearchBot... Search for images using /<search query> in a chat with ImageSearchBot.")
lastID = 0
while (1):
# Ask telegram.org for updates sent to our bot. We use our bot credentials and the number for the last update ID we've seen.
reply = requests.get("https://api.telegram.org/bot00000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/getUpdates?offset={}".format(lastID))
-------------------------MonteCarloThread.java-------------------------
public class MonteCarloThread implements Runnable {
private Connection connection;
private static int count = 0;
private final int STEPS_IN_BLOCK;
private long totalHits;
private long totalRuns;
public MonteCarloThread(int steps, Connection connection) {