Skip to content

Instantly share code, notes, and snippets.

@tbielawa
tbielawa / do_tags
Created March 1, 2011 01:20
a way to generate etags of all installed python libraries!!!
#!/bin/bash
# Originally written at: http://code.google.com/p/python-etags/
# You may need to augment your PYTHONPATH before this works.
#
# For example, for my locally checked out libraries:
# $ PYTHONPATH=/home/tbielawa/rhat/nushus/src/nushus_client
# $ PYTHONPATH=$PYTHONPATH:/home/tbielawa/rhat/nushus/src/nushus
# $ export PYTHONPATH
# $ do_tags
#
@Kuniwak
Kuniwak / 2013_11_15_githubjp_note.markdown
Last active October 30, 2018 07:06
「GitHub トレーニングチームから学ぶ Git の内部構造」のノートです。 曖昧なところもあるので、間違いがあったら教えてください! http://connpass.com/event/3808/

GitHub トレーニングチームから学ぶ Git の内部構造

Graphs, Hashes, and Compression, Oh My!

Hash について

従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。

@karino2
karino2 / BeamSearch.ipynb
Created March 21, 2017 23:16
Beam Searchについての簡単な説明
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@odebeir
odebeir / gist:3918044
Created October 19, 2012 12:38
Example of Gabor filter usage
#opencv
import cv2.cv as cv
import cv2
import numpy as np
def build_filters():
filters = []
ksize = 31
for theta in np.arange(0, np.pi, np.pi / 32):
@splhack
splhack / python2+3.md
Created May 18, 2016 06:01
MacVim with Python 2.x and Python 3.x
  • Install python 2.7.11

command line

$ PYTHON_CONFIGURE_OPTS="--enable-shared" \
    LDSHARED="clang -bundle" \
    LDCXXSHARED="clang++ -bundle" \
    BLDSHARED="clang -bundle -lpython2.7" \
    pyenv install 2.7.11
@alesolano
alesolano / algorithms_openpose.md
Last active August 26, 2021 19:47
OpenPose TensorFlow Alogrithms
@grantslatton
grantslatton / hngen.py
Last active September 27, 2021 11:07
A program that uses Markov chains to generate probabilistic Hacker News titles.
import urllib2
import re
import sys
from collections import defaultdict
from random import random
"""
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt"
@laiso
laiso / hatenaoauth_example.py
Last active August 10, 2022 13:29
Pythonではてなの OAuth 対応 API を利用する
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
フレームワークとして Flask(http://flask.pocoo.org/) を、OAuth ライブラリとして oauth2(http://pypi.python.org/pypi/oauth2/) を利用したサンプルプログラムです。
下のコードを保存して (oauth_consumer.py とします)、YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET となっている部分を自分の consumer_key, consumer_secret で置き換えます。
$ python oauth_consumer.py
... で起動してから http://localhost:5000 に Web ブラウザでアクセスして下さい。
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
@tetsuok
tetsuok / fibonacci_closure.go
Created April 2, 2012 08:48
An answer of the exercise: Fibonacci closure on a tour of Go
package main
import "fmt"
// Very naive answer.
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
n := 0
a := 0