Skip to content

Instantly share code, notes, and snippets.

View Lextal's full-sized avatar

Roman Trusov Lextal

  • Russian Federation
View GitHub Profile
@Lextal
Lextal / test.prototxt
Created June 2, 2017 15:19
./giexec --deploy=test.prototxt --output=prob
input: "data"
input_dim: 1
input_dim: 3
input_dim: 256
input_dim: 512
layer {
name: "pool"
type: "Pooling"
bottom: "data"
top: "pool"
@Lextal
Lextal / skimage_segment.py
Created May 16, 2017 21:42
compute superpixels and draw boundaries
from skimage.segmentation import slic
from skimage.segmentation import mark_boundaries
import matplotlib.pyplot as plt
segments = slic(img, n_segments = 500, sigma = 5)
plt.imshow(mark_boundaries(imgs, segments))
if step_to_the_left or step_to_the_right:
rasstrel()
@Lextal
Lextal / gist:f9857e12beafecf361e9
Created January 23, 2016 16:24
RandomForestRegression with splitting
from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets import *
from sklearn.metrics import mean_absolute_error
from sklearn.cross_validation import train_test_split
data = load_boston()
X = data['data']
y = data['target']
train_x, test_x, train_y, test_y = train_test_split(X, y, test_size=0.2)
@Lextal
Lextal / gist:c5ce4fcf7e6199c1c4cd
Created November 22, 2015 01:55
disable touchpad in ubuntu
synclient TouchpadOff=1