Skip to content

Instantly share code, notes, and snippets.

@daeken
daeken / stater.py
Created August 28, 2012 06:13
state decorator
import inspect
def stater(func):
def sub(*args, **kwargs):
frame = inspect.stack()[1][0]
return func(frame.f_locals, frame.f_globals, *args, **kwargs)
return sub
@stater
def explode(_locals, _globals, hash):
import requests, re, time
from twitter import *
from pprint import pprint
tldrs = [x.strip() for x in file('tldrs.txt', 'r').readlines()]
fp = file('tldrs.txt', 'a')
# secret shit here.
t = Twitter(auth=OAuth(oauth_token, oauth_token_secret, consumer_key, consumer_secret))
http://demoseen.com/langton/#e+P+g$
http://demoseen.com/langton/#e+P+g?
http://demoseen.com/langton/#e+P+l?
http://demoseen.com/langton/#e+P+e?
http://demoseen.com/langton/#o+~
http://demoseen.com/langton/#o+g~
http://demoseen.com/langton/#1oPrd-
http://demoseen.com/langton/#1FPrd-
http://demoseen.com/langton/#.g1FPrd-
http://demoseen.com/langton/#.g1Fr$Prd-
import math
pd = 0
nd = 1
def layer(n):
global pd, nd
n += 1
side = n * 2 - 1
count = side * 2 + (side - 2) * 2
import usb.core
from usb.core import *
from usb.util import *
from thread import start_new_thread
import atexit
import time
class Launchpad(object):
def __init__(self):
self.dev = find(idVendor=0x1235)
from time import *
from pyaudio import *
from launchpad import Launchpad
class Sequencer(object):
def __init__(self):
self.audio = PyAudio()
self.page = 0
self.samples = [None] * 8
from kivy.app import App
from kivy.clock import Clock
from kivy.event import EventDispatcher
from kivy.properties import *
from kivy.uix.button import Button
def In(type):
return None
def Out(type, *args):
@daeken
daeken / gist:4535560
Last active December 11, 2015 03:08
#pragma once
class IDirect3D9;
typedef struct {
void **vtable;
IDirect3D9 *object;
} COMIDirect3D9;
class IDirect3D9 : public IUnknown {
We need to give activists an effective mouthpiece, PR support, and a way to mobilize and organize volunteers. So far we have millions of people signing petitions -- which is all well and good -- but why can't we have millions of people spending a few minutes a day/week/month directly working on these efforts? Even if it's just categorizing documents, writing about the issues, and reaching out to pull more people into the fray.
The biggest issue I can't figure out is how to keep the press from writing about things prematurely. When you're doing everything in public, it's going to be hard to get the right message across; we need to be able to show the press the 3 core things they should care about, to keep speculation down and keep the message on track.

We need to give activists an effective mouthpiece, PR support, and a way to mobilize and organize volunteers. So far we have millions of people signing petitions -- which is all well and good -- but why can't we have millions of people spending a few minutes a day/week/month directly working on these efforts? Even if it's just categorizing documents, writing about the issues, and reaching out to pull more people into the fray.

The biggest issue I can't figure out is how to keep the press from writing about things prematurely. When you're doing everything in public, it's going to be hard to get the right message across; we need to be able to show the press the 3 core things they should care about, to keep speculation down and keep the message on track.