Skip to content

Instantly share code, notes, and snippets.

View theideasmith's full-sized avatar

Akiva Lipshitz theideasmith

View GitHub Profile
var notifier = require('node-notifier')
var ProgressBar = require('progress')
var Monitor = require('monitor-twitter')
// Your Twitter credentials
var config = {
consumer_key:'' ,
consumer_secret: '',
access_token: '',
access_token_secret: ''
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theideasmith
theideasmith / ebolavirus.txt
Last active April 5, 2016 13:34
This is it, from NCBI.
cggacacaca aaaagaaaaa aggtttttta agactttttg tgtgcgagta actatgagga
agattaacag ttttcctcag tttaagatat acactgaaat tgagattgag attctcctct
ttgctattct gtaactttcc ctggttgtga caattgaatc agttttatct attaccaatt
accatcaaca tggtatgtct agtgatcttg ggactcttct tcatctggtt tttcctagag
ctctgaatcc attttgcgag aagttcatcc aaacgaccca gtgtctgaaa atacaaaagg
ttcccctttc cgtcaagttt aaggggttgt tttgattgtg tgtagatttt ataatcctag
agtgccaagg agttgcgtgt catcattgat tgggaagatc aaggaaacaa tttgttccaa
taatatcgta catcttgact aagtcgaaca aggggaagtc gatatggatc gtgggaccag
aagaatctgg gtgtcgcaaa atcaaggtga tactgattta gattatcata aaattttgac
agctggcctt actgttcaac agggaattgt caggcagaaa ataatttctg tatatcttgt
"""
For the derivation of the beautiful quadratic formula see
http://www.purplemath.com/modules/sqrquad2.htm
"""
from math import *
def quadratic(a, b,c):
pos = (-b+sqrt(b**2-4.0*a*c))/(2*a)
neg = (-b-sqrt(b**2-4.0*a*c))/(2*a)
return (pos, neg)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
This is a small toolkit for mapping
one dimensional positive integers over a
closed interval onto a two dimensional
space.
So you can run a loop in one dimensions
and plot sequential points in two dimensions.
The universal solution for determining dimensionality
import matplotlib.pyplot as plt
from matplotlib import gridspec
import scipy.io as scio
import os
import sklearn.decomposition as deco
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
import numpy as np
@theideasmith
theideasmith / checker.py
Created February 29, 2016 15:30
RC Application Status Checker
#This will notify me of changes
import Foundation
import objc
import AppKit
import sys
# We'll be using this to make our requests
import pyquery as pq
# We'll be using this to run a "cron" job every 20 minutes
@theideasmith
theideasmith / cracklepop.hs
Last active February 23, 2016 13:01
Recurse Center CracklePop Solution
{-|
Below are my three Haskell CracklePop solutions,
in todo representing my iterative approach to creating solutions;
(A) Is my initial attempt
(B) Represents my pursuit of parsimony.
(C) Seeking an even more elegant solution,
I was inspired by the blog: http://bit.ly/1TsOn0H,
where I learned to employ monoids.
"""
Automata language spec:
Automata is a reactive programming language designed to change how software is produced and consumed. More reactivity. There is no temporal logic in the program. Instead, everything is expressed as dynamic relationships that are automatically updated. Now imagine interacting with the computer with a history of what you've done. Any time a change is made, you don't need to redo all you work. Instead, all your work is automatically recomputed for you.
Automata is not pure, there is state.
I'll go into detail about the underlying concepts another time. Here I'm just fleshing out some ideas for how the platform/language will work.