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
set x,0 | |
set y,0 | |
:row | |
jsr getVal | |
set c,32 | |
shl z,4 | |
add c,z | |
bor c,0xf000 | |
set a,y |
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
set x,0 ;x = fib[n-1] | |
set y,1 ;y = fib[n] | |
set j,24;number of loops | |
:loop | |
set z,x; z = fib[n]+fib[n-1] | |
add z,y | |
set x,y;Set X to the new fib[n-1] (the old fib[n]) | |
set y,z;set Y to the new fib[n] (calculated.) |
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
it |
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 gevent | |
from gevent import socket, queue | |
from gevent.ssl import wrap_socket | |
import logging | |
logger = logging.getLogger('irc') | |
logger.setLevel(logging.DEBUG) | |
ch = logging.StreamHandler() |
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 | |
br = mechanize.Browser() | |
br.set_handle_equiv(True) | |
br.set_handle_redirect(True) | |
br.set_handle_referer(True) | |
br.set_handle_robots(False) | |
br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] | |
def doSearch(term): | |
global br |
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 socket,threading | |
from time import sleep | |
port = 1235 | |
class DMX(threading.Thread): | |
running = True | |
life = [0,0,0,0,0,0] | |
def activate(self,num): | |
if num < 0 or num > 5: | |
return | |
self.life[num]=10 |
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 socket | |
server = '' | |
port = 1235 | |
def run(): | |
while True: | |
i = raw_input("Enter a number!") | |
s = socket.socket() | |
s.connect((server,port)) | |
s.send("activate %s"%i) | |
s.close() |
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
class Bar: | |
def __init__(self,inst,func,*args): | |
self.inst = inst | |
self.func = func | |
self.args = args | |
def __iadd__(self,*args,**kwargs): | |
return self.__call__(*args,**kwargs) | |
def __call__(self,*args,**kwargs): | |
self.func(self.inst,*(self.args+args),**kwargs) |
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
USER = "your_twitter_user" | |
PASS = "your_twitter_pass" | |
if "your_twitter" in USER+PASS: | |
print "You didn't set your twitter username and password in the script!" | |
USER = raw_input("Username>") | |
PASS = raw_input("Password>") | |
import urllib2, json, base64, sys, os |
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 BaseHTTPServer | |
from subprocess import Popen, PIPE | |
# What interface to listen on | |
# Don't change this unless you want to leak your passwords. | |
HOST = '127.0.0.1' | |
# What port to listen on. Change this if you'd like, | |
# you'll need to update the chrome extension's port too. | |
PORT = 9573 |