Skip to content

Instantly share code, notes, and snippets.

View cocuh's full-sized avatar
🛌
Comfy bed sleeping

cocuh cocuh

🛌
Comfy bed sleeping
View GitHub Profile
@cocuh
cocuh / bb.py
Created May 9, 2016 04:51
branch and bound algorithm python
import threading as th
from copy import deepcopy
class Node:
def __init__(self, parent=None, state=[]):
self.parent = parent
self.generator_lock = th.Lock()
self.generator = self._child_gen()
self.state = state
@cocuh
cocuh / main.py
Last active April 30, 2016 15:17
import os
import sys
if sys.version_info.major == 2:
import Tkinter as tk
else:
import tkinter as tk
abstractmethod = lambda f: f
#!/bin/python -c "print('youjo')"
#!/bin/zsh
gifview --animate --geometry 1920x1200 +e -bg white --min-dalay 5 --window $XSCREENSAVER_WINDOW $MASHIRO_PATH
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cocuh
cocuh / 1st_memo.md
Last active October 11, 2015 07:12
pycon jp 2015 memo

over fitting(1st day, 1st session)

CSCV

type hint

gradual typing

@cocuh
cocuh / glusters.md
Last active September 23, 2015 14:10
[WIP]coins-projectのblogに載せるよう

glusterfsで始める分散ファイルシステム

こんにちは、こくです。 今回は glusterfsという分散ファイルシステムでcoins-projectの余っているサーバーをストレージ化してみたので、紹介と構築方法を書こうと思います。

間違っている箇所などありましたら、@cocuh_まで連絡してくださると本人は非常に喜びます。

対象読者

@cocuh
cocuh / youjo.py
Last active September 21, 2015 09:10
PREFECTURE_LIST = [
u"幼女県",
]
def compute_all(i, data):
""":type data:dict"""
return [
data[i][pref]
for pref in PREFECTURE_LIST
]
@cocuh
cocuh / index.svg
Last active September 11, 2015 10:09
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cocuh
cocuh / spam.py
Last active September 7, 2015 09:26
override = lambda f:f
class BaseData(object):
pass
class BaseApp(object):
def __init__(self):
self.data = self.build_data()
""":type: BaseData"""