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 | |
import os | |
import struct | |
ts = struct.unpack("L", os.urandom(8)) | |
print(ts[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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define HSIZE 3 | |
#define VSIZE 3 | |
#define SIZE 9 | |
#define FACT9 362880 |
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
mc: | |
gcc -I/usr/local/include/python3.3m -shared -fPIC -std=c99 -Wall -o mc.so mc.c |
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 | |
# | |
import sys | |
class Alchemey(object): | |
def __init__(self): | |
self.prices = {} | |
self.recipes = {} |
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
(?:(?P<_hashtodo>#todo)(?:(?:(?: ))+(?:(?:(?P<_notimplemented>notimplemented(?:(?:(?: ))+(?:.*))?)|(?P<_about>about(?:(?:(?: ))+(?:.*))?)|(?P<_add>add(?:(?:(?: ))+(?:(?P<_add_description>.+))?)?)|(?P<_addto>addto(?:(?:(?: ))+(?:(?:(?P<_addto_nicknames140216808838224>[a-zA-Z@][a-zA-Z0-9_]*)(?:,))?(?:(?P<_addto_nicknames140216808838480>[a-zA-Z@][a-zA-Z0-9_]*)(?:,))?(?:(?P<_addto_nicknames140216808838672>[a-zA-Z@][a-zA-Z0-9_]*)(?:,))?(?:(?P<_addto_nicknames140216808838864>[a-zA-Z@][a-zA-Z0-9_]*)(?:,))?(?:(?P<_addto_too_many>(?P<_addto_too_many_nickname>[a-zA-Z@][a-zA-Z0-9_]*)(?:,)))*(?:(?P<_addto_nickname>[a-zA-Z@][a-zA-Z0-9_]*)(?:(?!,)))?)?)?(?:(?:(?: ))+(?:(?P<_addto_description>.+))?)?)|(?P<_help>help(?:(?:(?: ))+(?:(?P<_help_command>[a-z]+))?)?(?:(?:(?: ))+(?:.*))?)|(?P<_edit>edit(?:(?:(?: ))+(?:(?P<_edit_task_id>\d+))?)?(?:(?:(?: ))+(?:(?P<_edit_description>.+))?)?)|(?P<_debug>debug(?:(?:(?: ))+(?:(?P<_debug_task_id>\d+))?)?(?:(?:(?: ))+(?:.*))?)|(?P<_del>del(?:(?:(?: ))+(?:(?P<_del_task_ids140216808797072> |
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 | |
def ujmcount(x, *xs): | |
if xs: | |
return ujmcount(*xs) + 1 | |
else: | |
return 1 | |
print ujmcount(*[1, 2, 3, 4, 5]) |
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 f(n): | |
x = 1 | |
for i in range(1, n+1): | |
x = x*i | |
while x % 10 == 0: | |
x = x / 10 | |
x = (x % 100000) |
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 json | |
MONOOPS = '-' | |
LEFTOPS = "+-*/%" | |
QUOTE = 'quote' | |
IF = 'if' | |
LAMBDA = 'lambda' |
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 | |
from selenium import webdriver | |
PAGE = "file:///home/nori/Desktop/study/yamljs/hoge.html" | |
class Executor: | |
def __init__(self): | |
self.driver = driver = webdriver.PhantomJS('phantomjs') | |
self.driver.get(PAGE) |
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
PyYAML==3.10 | |
selenium==2.33.0 |