This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import scipy.io | |
import scipy.misc | |
train_data = scipy.io.loadmat("train_32x32.mat") | |
train_x = train_data['X'] | |
train_y = [flatten for inner in train_data['y'] for flatten in inner] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <opencv2/opencv.hpp> | |
using namespace std; | |
using namespace cv; | |
int main(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import leveldb | |
db = leveldb.LevelDB('./db') | |
db.Put('hello', 'value') | |
db.Put('world', 'value') | |
for k in db.RangeIter(include_value = False): | |
print 'K', k |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from sklearn import linear_model | |
from sklearn import svm | |
sigma = 0.1 | |
x = np.arange(0,np.pi * 2,0.1) |