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
class LegacyRouter: | |
route_app_labels = {'legacy',} | |
legacy_database = 'legacy' | |
def db_for_read(self, model, **hints): | |
if model._meta.app_label in self.route_app_labels: | |
return self.legacy_database | |
return None | |
def db_for_write(self, model, **hints): |
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
clear lock | |
clear control | |
keycode 66 = Control_L | |
add control = Control_L Control_R |
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
#!/usr/bin/env python3 | |
import sys | |
from paudirac.markdown import to_html | |
to_html(sys.stdin.read(), writer=sys.stdout) |
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
#!/bin/bash | |
list_objects () { | |
find .git/objects/ -type f | sed s:.git/objects/:: | sed s:/:: | |
} | |
list_types () { | |
list_objects | xargs -n1 git cat-file -t | |
} |
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
位f.位x.f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f( |
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
#!/bin/bash | |
function show_options { | |
readlink $(find $HOME -maxdepth 1 -type l -iname '.*emacs.d') \ | |
| awk 'sub(/\.d\//,"",$0) { print "Current emacs is \t\t" substr($0,2) }' | |
echo | |
echo "Call with following options to change:" | |
find $HOME/emacs -maxdepth 1 -mindepth 1 -type d -printf "\t%f\n" | |
} |
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
print "right\n" if chr ord 'a' eq 'a'; | |
print "wrong\n" if not chr ord '路' eq '路'; | |
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
(defn accumulate [op initial sequence] | |
(if (empty? sequence) | |
initial | |
(op (first sequence) | |
(accumulate op initial (rest sequence))))) | |
(defn eval-poly [x coefs] | |
(accumulate (fn [c0 cs] | |
(+ c0 (* x cs))) | |
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
-[--->+<]>----.---[-->+++<]>.++[->+++<]>.+++++++++++++.---------.-----.+++++++++++.[--->+<]>-----.[-->+++++++<]>.++.-------------.[--->+<]>----.----------.-----.+.+++++++++.++++++.+++[->+++<]>.-[->+++<]>.------------.----[->++++<]>+.++++.++[->+++<]>.+++++++++++++.---------.-----.+++++++++++.[--->+<]>-----.++++++[->++<]>+.-[------>+<]>-.--[--->+<]>---.---------.--------.+++++++++++++.+.>++++++++++..>-[--->+<]>----.---[-->+++<]>.------------.----.+++++++++++++.---.[--->+<]>-----.+[->+++<]>.++++++++++++.--.++++++++.-------.-----.------.--.--[--->+<]>---.++.+++[->+++<]>.-[->+++<]>.------------.[-->+++++++<]>.-.+++.[-->+++++<]>+++.+[----->+<]>.--------.-.+++++.++++++.[--->+<]>-----.+[->+++<]>+.+.--[--->+<]>-.+[->+++<]>++.[--->+<]>----.+.+[->+++<]>++.--[--->+<]>--.+[---->+<]>+++.++[--->++<]>.-[->+++++++<]>.>+[------->++<]>.---------.----.--[--->+<]>--.-[++>---<]>+.------------.+[----->+<]>.----.[--->+<]>---.+[->+++<]>+.+.--.++++++.++++++++++.----------.++[--->++<]>+.+[-->+++<]>.-[->+++++<]>-.+[->+++<]>+.+.--[--->+< |
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 | |
def read(): return raw_input() | |
def selected_employees(): | |
return (read(), read()) | |
def read_relation(): | |
manager, managed = read().split() | |
return managed, manager |
NewerOlder