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 python | |
# https://github.com/will62794/tlaplus_repl | |
import cmd | |
import os | |
import subprocess | |
import tempfile | |
TEMPLATE = """ |
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 python | |
import distutils.spawn | |
import os, os.path | |
import subprocess | |
class Formatter(object): | |
def __init__(self, suffixes, exes, args): | |
self.suffixes = suffixes | |
self.name = exes[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
#check true | |
constant m : nat | |
#check m | |
#check nat | |
#check Type 0 | |
#check Type 100 |
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 python | |
# encoding: utf-8 | |
import urllib2, re, json, random | |
url = 'http://www.tripmondo.com/magazine/facts-and-statistics/list-of-capitals-and-countries/' | |
html = urllib2.urlopen(url, timeout=5).read() | |
reg = re.compile('<td><a href=.*?>(.*?)</a></td>\s+<td><a href=.*?>(.*?)</a></td>\s+<td class="right">(.*?)</td>\s+<td class="right">(.*?)</td>') | |
with open('city.json', 'w') as 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import ConfigParser | |
import sys | |
import StringIO | |
data = StringIO.StringIO('\n'.join(line.strip() for line in open(".gitmodules", "r"))) | |
config = ConfigParser.SafeConfigParser() | |
config.readfp(data) |
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
% https://github.com/tzengyuxio/pages/blob/gh-pages/pandoc/pm-template.latex | |
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{$documentclass$} | |
\usepackage{geometry} % 設定邊界 | |
\geometry{ | |
top=1in, | |
inner=1in, | |
outer=1in, | |
bottom=1in, | |
headheight=3ex, |
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
#include <Windows.h> | |
#include <Winuser.h> | |
int APIENTRY wWinMain(_In_ HINSTANCE hInstance, | |
_In_opt_ HINSTANCE hPrevInstance, | |
_In_ LPTSTR lpCmdLine, | |
_In_ int nCmdShow) { | |
RegisterHotKey(NULL, 1, MOD_CONTROL, VK_SPACE); |