Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import time
from xml.etree import ElementTree
import os
import json
if not os.path.exists('./eki'):
os.mkdir('./eki')
@tacoo
tacoo / houmu.py
Created January 13, 2016 14:00
Get regular-use Kanji list from http://kosekimoji.moj.go.jp/
import urllib
import urllib2
import cookielib
import re
import time
import json
import os
from lxml import etree
def getCodes(opener, url, data):
@tacoo
tacoo / gist:7303499
Last active December 27, 2015 09:19
small dsl sample written in antlr

Parse a file like this text. This file that I created indicates simple mvc model.

label user = table("User") {
	col("id") {
		type:"integer"
		constraint:{"pk", "notnull","autoincrement"}
	}
	col("name") {
		type:"varchar(30)"
		constraint:{"notnull","uniq"}