Skip to content

Instantly share code, notes, and snippets.

View bsdelf's full-sized avatar

bsdelf bsdelf

  • Shanghai
View GitHub Profile
@bsdelf
bsdelf / eigenface.py
Created March 25, 2014 05:59
eigenface
import argparse
import numpy as np
from scipy import linalg
def ReadTillWhite(fd):
data = b''
while True:
ch = fd.read(1)
if ch in b"\r\t\n ":
break
@bsdelf
bsdelf / gist:9581226
Created March 16, 2014 10:23
parse & statistical
import argparse
import re
import copy
from collections import defaultdict
"""
format:
*********************** PAPER 1 ***********************
+++++++++++++++++ REVIEW 1 ++++++++++++++++
@bsdelf
bsdelf / main.cc
Created March 13, 2014 12:32
critical vertices
#include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
using namespace std;
template <typename T, typename V>
T& operator<<(T& t, V v)
{
t.push_back(v);
#include <iostream>
#include <string>
#include <deque>
#include <array>
using namespace std;
struct Frame
{
int p;
int id;