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
# -*- coding: utf-8 -*- | |
def product(v, coins=[500, 100, 50, 10, 5, 1], used=[]): | |
if len(coins) == 1: | |
yield 1 | |
else: | |
for i, coin in enumerate(coins): | |
diff = v - coin | |
if diff == 0: | |
yield 1 |
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
# .conkyrc | |
alignment bottom_left | |
gap_x 0 | |
gap_y 0 | |
background no | |
use_xft yes | |
xftfont Bitstream Vera Sans Mono:size=10:Bold |
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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import gtk | |
def save_clipimg(filename): | |
clipboard = gtk.clipboard_get() | |
image = clipboard.wait_for_image() |
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
package main | |
import ( | |
"C" | |
"log" | |
) | |
//export fib | |
func fib(n int) int { | |
if (n < 2) { return n } |
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
WheelUp:: | |
Send {WheelDown} | |
Return | |
WheelDown:: | |
Send {WheelUp} | |
Return |
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
package main | |
import ( | |
"fmt" | |
"net" | |
) | |
func main() { | |
ifaces, err := net.Interfaces() | |
if err != nil { |
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
# -*- coding: utf-8 -*- | |
__doc__ = """ | |
usage: | |
python lineon.py somefile.py | |
or | |
# write your top of source. | |
lineon.apply(sys) |
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
--- html_fibo.orig 2011-08-01 12:51:29.063696436 +0900 | |
+++ html_fibo.py 2011-08-01 12:50:58.703267469 +0900 | |
@@ -2,6 +2,8 @@ | |
The most complicate ever way to produce an HTML list of fibonacci numbers | |
""" | |
+import gc | |
+ | |
def fibo(): | |
a, b = 1, 1 |
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
# -*- coding: utf-8 -*- | |
from timeit import Timer | |
import random | |
import string | |
import sys | |
def redef_builtin_filter(pred, iterable): | |
"""redefined builtin filter function""" | |
ret = [x for x in iterable if pred(x)] |
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
#!/bin/bash | |
hg clone https://bitbucket.org/wkornewald/django-nonrel | |
hg clone https://bitbucket.org/wkornewald/djangoappengine | |
hg clone https://bitbucket.org/wkornewald/djangotoolbox | |
hg clone https://bitbucket.org/twanschik/django-autoload | |
hg clone https://bitbucket.org/wkornewald/django-dbindexer | |
hg clone https://bitbucket.org/wkornewald/django-testapp | |
mkdir $1 |
OlderNewer