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 random | |
import copy | |
import curses | |
table = [[0 for j in range(4)] for i in range(4)] | |
def init(table): | |
table[0][0] = random.randint(1,2)*2 | |
table[0][2] = random.randint(1,2)*2 | |
return table |
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 parse3(l): | |
stack = [] | |
for i in range(len(l)): | |
if l[i]=='(': | |
stack.insert(0, i) | |
elif l[i]==')': | |
print l[stack.pop(0):i+1] | |
def calc(l): | |
ll = len(l) |
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
autoload -U compinit | |
compinit | |
autoload predict-on | |
predict-on | |
bindkey -v | |
setopt auto_pushd | |
setopt correct |
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
syntax on | |
filetype indent plugin on | |
set tabstop=8 expandtab shiftwidth=4 softtabstop=4 | |
set number | |
set mouse= | |
set nocompatible | |
set incsearch | |
set clipboard=unnamed,autoselect | |
"foo bar |
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/sh | |
cd ~/src/83a7d8f5fd6401bd6515 | |
echo "Updating vimrc and zshrc: \c" | |
git pull | |
cp .vimrc ~/.vimrc | |
cp .zshrc ~/.zshrc | |
# cp updaterc.sh ~/updaterc-next.sh | |
# chmod 764 ~/updaterc.sh |
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 | |
from __future__ import print_function | |
import sys | |
if len(sys.argv) > 1: | |
with open(sys.argv[1]) as src: | |
program = src.read() | |
else: | |
print("No input file.") |
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 re | |
import sys | |
def parseCSV(text,delim=','): | |
tokenizer = re.compile(delim+r'|\r?\n|[^'+delim+r'"\r\n][^'+delim+ \ | |
r'\r\n]*|"(?:[^"]|"")*"') | |
tmp = tokenizer.findall(text) | |
data = [] |
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 | |
from __future__ import print_function | |
import sys | |
if len(sys.argv[1]) > 1: | |
with open(sys.argv[1]) as src: | |
program = src.read() | |
else: | |
print("No input file.") |
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
/** | |
* @(#) fusecpp.h - allow access to fuse from C++ | |
* | |
* Gerard J. Cerchio www.circlesoft.com | |
* | |
* modified for fuse3 | |
* by retrage01@gmail.com | |
* | |
*/ |
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 | |
alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" | |
base = len(alphabet) | |
def encode_base58(input_bin): | |
if input_bin == 0x00: | |
return alphabet[0] |
OlderNewer