Skip to content

Instantly share code, notes, and snippets.

View keizie's full-sized avatar

Jeong-Hee Kang keizie

  • Asia/Seoul
  • 15:12 (UTC +09:00)
View GitHub Profile
@keizie
keizie / vfio-bind.sh
Created July 6, 2015 22:06
vfio-bind that does not hang on trying to bind again
#!/bin/bash
modprobe vfio-pci
for dev in "$@"; do
if [ -e /sys/bus/pci/drivers/vfio-pci/$dev ]; then
continue
fi
vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
#!/usr/bin/python3
import os, re, logging
from glob import glob
from pipes import quote
from shutil import rmtree
SOURCES = ('/mnt/1.5T/,movie/','/mnt/1.5T/,tv/',)
LOGFILE = '/home/keizie/.brag/autounrar.log'
EXECUTE_RAR = 'unrar'
@keizie
keizie / tease.py
Last active December 20, 2015 14:19
http://zariski.wordpress.com/2013/08/02/%EC%98%A4%EB%8A%98%EC%9D%98-%EB%B8%8C%EB%A0%88%EC%9D%B8%ED%8B%B0%EC%A0%80/ 문제를 확인하기 위한 코드. 결과적으로 35개의 3으로 이루어진 목록은 나오지만 최종적으로 1만으로 이루어진 데까지는 가지 않는다.
# -*- coding:utf-8 -*-
from itertools import combinations
from pprint import pprint
bundle = [51,49,5]
candidates = [bundle]
loop = True
loop_count = 0
largest_member = []