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
#!/usr/bin/env python | |
import re, sys | |
def seperate(e): | |
"""seperate the equalization: | |
eg. 2x^2+3x-2 -> ["2x^2", "3x", "-2"]""" | |
s = re.split(r"([+-])", e) | |
opt = [] | |
nextMinus=False | |
if s[0] == "": |
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
<?php | |
$allowed = array("Solve", "Simplify", "Factor", "Think"); | |
if(!in_array($_REQUEST['method'], $allowed)) die("Bad method!"); | |
if(strstr(";", $_REQUEST['input'])) die("Hack?"); | |
$input = $_REQUEST['input']; | |
$input = str_replace("=", "==", $input); | |
$path = "C:\\Program Files\\Wolfram Research\\Mathematica\\7.0\\math.exe"; | |
$cmd = $_REQUEST['method'] . "[".$input."]"; | |
if($_REQUEST['method'] == "Think"){ | |
$cmd = $_REQUEST['input']; |
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
/** | |
* @license The Twitter library is licensed under the GNU Lesser General Public License version 3 | |
* Portions from the Prototype JavaScript library | |
*/ | |
/* prototypejs/src/lang/function.js */ | |
function prototype_update(array, args) { | |
var arrayLength = array.length, length = args.length; | |
while (length--) array[arrayLength + length] = args[length]; | |
return array; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Barcampbangkok 4 -Twitter client</title> | |
<script src="jquery.js"></script> | |
<script src="sha1.js"></script> | |
<script src="oauth.js"></script> | |
<script src="twitter.js"></script> | |
<script src="render.js"></script> | |
<link rel="stylesheet" href="render.css"> |
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
/** | |
* @license The imageloader.js library is licensed under GNU Lesser General Public License v3 or later | |
*/ | |
(function(){ | |
/** | |
* TwitPic Image Loader | |
* Example: ldr = new TwitPicLoader("http://twitpic.com/asdf123"); | |
* @param {string} URL of the TwitPic page. Eg. http://twitpic.com/asdf123 | |
* @constructor | |
*/ |
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
TWEND | |
Kit | |
AAAAA | |
RUSH | |
C | |
TTori | |
BEAT | |
TB | |
AS | |
Amnesia |
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
#!/usr/bin/python | |
# READ FIRST | |
# This software poll HP2LY every 5 minutes and will play | |
# any ffmpeg supported file 20 times after 95%. | |
# To quit press Ctrl+C in Terminal. | |
# Closing ffplay would just respawn it. | |
# | |
# Dependency: | |
# Ubuntu: sudo apt-get install ffmpeg | |
# Fedora: su -c 'yum install ffmpeg' |
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 re, sys, os, codecs | |
from polib import * | |
try: | |
from collections import OrderedDict | |
except ImportError: | |
## {{{ http://code.activestate.com/recipes/576693/ (r9) | |
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. | |
# Passes Python2.7's test suite and incorporates all the latest updates. | |
try: |
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 threading, time, sys, re | |
inData = open('a-small.in').read().strip() | |
#inData = """3 | |
#4 O 2 B 1 B 2 O 4 | |
#3 O 5 O 8 B 100 | |
#2 B 2 B 1""" | |
class Awesome(threading.Thread): | |
def __init__(self, i): | |
threading.Thread.__init__(self) | |
self.i = i |
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
// (C) 2011 Manatsawin Hanmongkolchai | |
// GNU GPL v3 | |
var twitter = require('twitter'); | |
var growl = require('growl'); | |
var twit = new twitter({ | |
consumer_key: '', | |
consumer_secret: '', | |
access_token_key: '', | |
access_token_secret: '', | |
}); |
OlderNewer