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
Initializing cgroup subsys cpuset | |
Linux version 2.6.27.10-grsec-xxxx-grs-ipv4-64 (root@kernel-64.ovh.net) (gcc version 4.3.2 (Debian 4.3.2-1) ) #7 SMP Wed Sep 9 22:07:04 UTC 2009 | |
Command line: auto BOOT_IMAGE=Linux ro root=801 | |
KERNEL supported cpus: | |
Intel GenuineIntel | |
AMD AuthenticAMD | |
Centaur CentaurHauls | |
BIOS-provided physical RAM map: | |
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) | |
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) |
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
class Lion(object): | |
def run(): | |
print "THIS LION IS RUNNING" | |
class Panthere(object): | |
def run(): | |
print "THIS PANTHERE IS RUNNING" | |
animals = [Panthere(), Lion()] |
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
from functools import partial | |
INF = float('Inf') | |
# Utility functions | |
def change_state(graph, node, state=''): | |
graph.node[node]['state'] = state | |
def is_state_equal_to(graph, node, state=''): | |
return graph.node[node]['state'] == state |
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
from os import walk | |
from os.path import basename, abspath, join | |
from time import time | |
class Node(object): | |
DIR = 1 | |
FILE = 2 | |
def __init__(self,type, value): | |
self.children = {} |
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
func = (a=15, b=16) -> a + b | |
func(a=12) |
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
def func(a=15, b=20): | |
return a + b | |
func(a=12) |
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
def func(**kwargs): | |
for key, arg in kwargs: | |
print "key: ", key, "arg: ", arg | |
func(a=15, b= 12) |
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
func = (mmap) -> | |
for key, val of mmap | |
print "key: #{key}, val: #{val}" | |
func {a:15, b:12} |
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
def func1(c=30, d=50, **kwargs): | |
return c + d + func2(**kwargs) | |
def func2(a=15, b=10): | |
return a + b | |
func1(c=3, d=5) | |
func1(3, d=5, a = 40) |
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
func1 = (args={c:30, d:50}) -> | |
args.c + args.d + func2(args) | |
func2 = ({a, b}) -> | |
a = 15 if not a? | |
b = 10 if not b? | |
a + b | |
func1 {c:3, d:5} |
OlderNewer