Skip to content

Instantly share code, notes, and snippets.

View hortinstein's full-sized avatar

Alex Hortin hortinstein

View GitHub Profile
import time
def how_long(func, *args):
t0 = time()
result = func(*args)
t1 = time()
return result, t1 - t0
@hortinstein
hortinstein / gist:4a2d130fb29849a3f4af
Created July 2, 2014 00:18
minepeon bfgminer config
#!/bin/bash
sleep 10
/usr/bin/screen -dmS miner bfgminer -S rockminer:all --set rockminer:clock=290 -c /opt/minepeon/etc/miner.conf --stratum-port 8335 --http-port 8332
/*
Notes:
Possible Questions:
1) Is there default behavior needed
2) Persistant data a required feature...IE retain past scans for comparison
3) Identify any of the largest sentances or just show length?
Testing/Erros to be handled
-input files doesnt not exist
@hortinstein
hortinstein / asd
Created September 10, 2014 02:10
sd
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
@hortinstein
hortinstein / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
# ----------
# User Instructions:
#
# Define a function, search() that returns a list
# in the form of [optimal path length, x, y]. For
# the grid shown below, your function should output
# [11, 4, 5].
#
# If there is no valid path from the start point
# to the goal, your function should return the string
@hortinstein
hortinstein / gw2example
Last active August 29, 2015 14:26
example for project
{
"name": "gw2 example",
"version": "0.1",
"description": "this is an example of how people could publish configurations",
"author": "hortinstein",
"repository": {
"type": "gist",
"url": "https://gist.github.com/hortinstein/b85e4705bd432359bed5"
},
"commands: {
a0:02:dc:52:80:ce
import urllib
opener = urllib.FancyURLopener({})
SHITASSTITS = "46059"
f = opener.open("http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=" + SHITASSTITS)
s = f.read()
while s[0:3] == "and":
f = opener.open("http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=" + SHITASSTITS)
s = f.read()
SHITASSTITS = s[24:]
print SHITASSTITS
import re
f = open('equality.html','r')
char = f.read() # read by character
asd = re.findall('[^A-Z][A-Z][A-Z][A-Z][a-z][A-Z][A-Z][A-Z][^A-Z]', char)
print asd