- 🎨 when improving the format/structure of the code
- 🚀 when improving performance
- ✏️ when writing docs
- 💡 new idea
- 🚧 work in progress
- ➕ when adding feature
- ➖ when removing feature
- 🔈 when adding logging
- 🔇 when reducing logging
- 🐛 when fixing a bug
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
module Filter where | |
import Text.Pandoc.JSON | |
import Text.Pandoc.Definition | |
main :: IO () | |
main = toJSONFilter scrub | |
scrub :: Block -> Block | |
scrub h@(Header level (uid, cs, kvs) title) |
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
# -*- coding:utf-8 -*- | |
import pkg_resources | |
from collections import defaultdict | |
def add_rdependencies(d, result): | |
for r in d.requires(): | |
result[r.project_name.lower()].add(d) | |
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
# -*- coding:utf-8 -*- | |
import io | |
import argparse | |
import asyncio | |
import aiopg | |
import sqlalchemy as sa | |
import webob | |
from aiopg.sa import create_engine | |
from aiohttp.wsgi import WSGIServerHttpProtocol | |
from webdispatch import URLDispatcher, MethodDispatcher |
更新: | 2014-05-14 |
---|---|
バージョン: | 0.0.12 |
作者: | @voluntas |
URL: | http://voluntas.github.io/ |
とても詳しいまとめがありますので、ますはそちらを見ることをオススメします。
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
# In mymodule.py | |
from zope.proxy import ProxyBase, setProxiedObject | |
hoge = ProxyBase(None) | |
def setup_hoge(): | |
setProxiedObject(hoge, 'hoge') |
Some investigation and tests on how to upgrade Mint machine.
Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.
As usual you could break your machine, so please do backups before and cross fingers.
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
# -*- coding:utf-8 -*- | |
from __future__ import print_function | |
(lambda zero, one, succ, is_zero, pred, AND, IF, Y, undefined: | |
(lambda add, mul, sub: | |
(lambda GT, EQ: | |
(lambda rem, REP: | |
(lambda three, five,num_from_church: | |
(lambda fifteen, one_hundred: | |
(lambda fizzbuzz: |
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 _chunker(it): | |
while True: | |
yield (it.next(), it.next()) | |
def chunker(seq): | |
return map(list, _chunker(iter(seq))) | |
import unittest |
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 | |
# -*- coding: utf-8 -*- | |
import socket | |
from time import sleep | |
commands = {} | |
def command(registry): | |
def wrapper(func): |