This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = function(){ | |
this.v1 = "Hello"; | |
this.v2 = "World"; | |
} | |
a.prototype.print=function(){ | |
alert(this.v1.concat(this.v2)) | |
} | |
b = function(){ | |
a.call(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# . .____ | |
# -:/ .\ | |
# :/ ..\ | |
# ( ## ##.) | |
# :\ | ./ kpie314@gmail.com | |
# -:\ __./ Kevin Nelson | |
# --:\ ./ (c)2016 | |
# .:. ++ | |
# Doodle Utilities. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
_____ ____ ____ __ ______ ____ ___ ____ _____ ____ __ __ | |
| || \ / T / ] Tl j/ \ | \ / ___/ | \| T T | |
| __j| D )Y o | / /| | | TY Y| _ Y( \_ | o ) | | | |
| l_ | / | |/ / l_j l_j | || O || | | \__ T | _/| ~ | | |
| _] | \ | _ / \_ | | | || || | | / \ | __ | | l___, | | |
| T | . Y| | \ | | | j ll !| | | \ || T| | | ! | |
l__j l__j\_jl__j__j\____j l__j |____j\___/ l__j__j \___jl__jl__j l____/ | |
Kevin Nelson -- kpie314@gmail.com -- (c) 2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mechanize | |
import BeautifulSoup | |
def chill(): | |
return | |
def googleSpellCheck(word , supervised = False): | |
ret = word | |
chrome = mechanize.Browser() | |
chrome.set_handle_robots(False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Image, ImageDraw | |
#Characters are fixed font drawn on a 2x4 grid where y = 3 is the text line bottm. | |
characters = {'1':[[(0,1),(1,0),(1,3)],[(0,3),(2,3)]],'2':[[(0,1),(1,0),(2,1),(0,3),(2,3)]],'3':[[(0,1),(1,0),(2,1),(1,1.5),(2,2),(1,3),(0,2)]],'4':[[(0,0),(0,1.5),(2,1.5)],[(2,0),(2,3)]],'5':[[(2,0),(0,0),(0,1,),(1,1),(2,1.75),(2,2.25),(1,3),(0,3)]],'6':[[(1,0),(0,1),(0,3),(2,3),(2,2),(0,2)]],'7':[[(0,0),(2,0),(1,3)]],'8':[[(0,0),(2,0),(2,1),(1.5,1.5),(2,2.5),(2,3),(0,3),(0,2),(0.5,1.5),(0,0.5),(0,0)],[(0.5,1.5),(1.5,1.5)]],'9':[[(0,3),(2,2),(2,0),(0,0),(0,1),(2,1)]],'0':[[(0,0),(0,3),(2,3),(2,0),(0,0),(2,3)]],'a':[[(1.5,3),(1.5,1),(0,1),(0,3),(1.5,3),(2,3)]],'b':[[(0,0),(0,3),(2,3),(2,2),(0,2)]],'c':[[(2,1),(1,1),(0,1.5),(0,2.5),(1,3),(2,3)]],'d':[[(2,0),(2,3),(0,3),(0,2),(2,2)]],'e':[[(2,3),(0,3),(0,1),(2,1),(2,2),(0,2)]],'f':[[(1,3),(1,0),(2,0)],[(0,1.5),(2,1.5)]],'g':[[(2,3),(0,3),(0,1),(2,1),(2,4),(1,4)]],'h':[[(0,3),(0,0)],[(0,2),(2,2),(2,3)]],'i':[[(1,3),(1,1.5)],[(0.75,1.25),(1.25,0.75)]],'j':[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# given n Points in spherical cords where m is constant find a new point p | |
# the best meeting place. | |
# The Ovbious aproach :: Take the mean of the longitudes and the mean of the laditudes. | |
# This means that if you have 3 people in new york and 2 in sanfransisco you end up meeting | |
# in the middle of the country. | |
# The less ovbious aproach: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING RUNNING THIS FILE WILL OVERIDE EXISTING index.html FILE IN CWD | |
import os | |
class indexer: | |
path = "~" | |
username = "" # !!! Enter your github username in the provided quotes. | |
site = "http://"+username+".github.io" | |
proj = "" # !!! Enter your repository name in provided quotes. | |
prod = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def syllables(s):# int(string) | |
v = ["a","e","i","o","u","y"] | |
c = 0 | |
for k in s.lower(): | |
if(k in v and not b): | |
c+=1 | |
b = True | |
else: | |
b = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
name = sys.argv[1] | |
link = sys.argv[2] | |
op='' | |
op+='<!DOCTYPE html>\n' | |
op+='<html>\n' | |
op+='<head>\n' | |
op+='<meta http-equiv="Refresh" content="0;'+link+'">\n' | |
op+='</head>\n' |