Skip to content

Instantly share code, notes, and snippets.

@righ
righ / only.py
Last active August 29, 2015 14:16
#!/usr/bin/env python
# coding: utf-8
import socket
import functools
def nop():
"""no operation"""
@righ
righ / dircmp.py
Last active August 29, 2015 14:14
dircmp.py
# coding: utf-8
import os
import filecmp
class Break(Exception):
"""for break recursive function
"""
@righ
righ / s3.py
Last active April 6, 2016 08:15
# coding: utf-8
import os
from boto.s3 import (
connection as s3conn,
key as s3key,
)
from boto.exception import (
S3ResponseError,
# coding: utf-8
import re
regnum = re.compile(r'([0-9]+)')
def factory(units):
def flat(string):
"""minimize unit"""
string = string.replace(',', '')