This file contains hidden or 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
var buttons = require('sdk/ui/button/action'); | |
var tabs = require("sdk/tabs"); | |
var prefs = require('sdk/simple-prefs'); | |
var Request = require("sdk/request").Request; | |
var button = buttons.ActionButton({ | |
id: "delicious-check", | |
label: "delicious-check", | |
icon: "./tagOff.png", | |
onClick: check |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 pyautogui | |
# constants | |
O, R, B = -1, 1, 0 | |
width = 50 | |
# global variables | |
topy, topx = None, None | |
mat = [] |
This file contains hidden or 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
# coding: utf8 | |
from Foundation import * | |
from AppKit import * | |
from PyObjCTools import AppHelper | |
import os | |
import re | |
start_time = NSDate.date() | |
This file contains hidden or 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
calling tramp_fac(n=5, k=1) | |
bouncer: ('bounce', 'tramp_fac', (4, 5)) | |
calling tramp_fac(n=4, k=5) | |
bouncer: ('bounce', 'tramp_fac', (3, 20)) | |
calling tramp_fac(n=3, k=20) | |
bouncer: ('bounce', 'tramp_fac', (2, 60)) | |
calling tramp_fac(n=2, k=60) | |
bouncer: ('bounce', 'tramp_fac', (1, 120)) | |
calling tramp_fac(n=1, k=120) | |
bouncer: ('bounce', 'tramp_fac', (0, 120)) |
This file contains hidden or 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 bounce(func, *args): | |
return ('bounce', func, args) | |
def land(value): | |
return ('land', value) | |
def pogo(bouncer): | |
''' Keep bouncing until landing. ''' |
This file contains hidden or 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 Text.Parsec | |
-- import Text.Parsec.String (Parser) | |
import Data.List (findIndex) | |
import Prelude hiding (exp) | |
import Data.IORef | |
import System.IO.Unsafe | |
{-# NOINLINE varCnt #-} | |
varCnt :: IORef Int | |
varCnt = unsafePerformIO (newIORef 0) |
This file contains hidden or 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
{-# LANGUAGE OverloadedStrings #-} | |
import qualified Data.Map as M (findWithDefault, fromList) | |
import qualified Data.ByteString as BS | |
horspool :: BS.ByteString -> BS.ByteString -> Maybe Int | |
horspool s p = f (lenp - 1) (lenp - 1) (lenp - 1) | |
where lenp = BS.length p | |
lens = BS.length s | |
jmptbl = M.fromList $ zip (BS.unpack p) [lenp - 1, lenp - 2 .. 1] | |
jmp c = M.findWithDefault lenp c jmptbl |
This file contains hidden or 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 os | |
from PIL import Image | |
import glob | |
# icons downloaded from http://bindingofisaacrebirth.gamepedia.com/ | |
IMGS_PATH = "./img/*" | |
# clipboard to image file | |
if os.system('pngpaste isaac_clip.png'): | |
exit() |
This file contains hidden or 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 | |
import requests | |
from pprint import pprint | |
from base64 import encodestring | |
from rauth import OAuth1Session | |
assert len(sys.argv) == 3, "Useage: python twlogin.py USERNAME PASSWORD" | |
headers = { 'authorization': 'x-td-basic ' + encodestring(sys.argv[1] + ':' + sys.argv[2]), | |
'X-TD-Authtype': 'twitter' } |