Skip to content

Instantly share code, notes, and snippets.

View Bandd-k's full-sized avatar

Denis Karpenko Bandd-k

  • HSE Student
  • Moscow
View GitHub Profile
UITextField нажатие:
2017-03-20 11:32:00.058365 TinkoffChat[15436:6179738] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/deniskarpenko/Library/Developer/CoreSimulator/Devices/7CBEB4F9-2B3E-4242-9D8F-1EAA6A0E7D1D/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-03-20 11:32:00.058924 TinkoffChat[15436:6179738] [MC] Reading from private effective user settings.
2017-03-20 11:32:04.703807 TinkoffChat[15436:6179782] 0x608000351a90 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x608000351a90> { count = 1, transaction: 0, voucher = 0x0, contents =
"Result" => <int64: 0x6080002372a0>: 29
}
UITextView нажатие:
2017-03-20 11:32:04.705394 TinkoffChat[15436:6179782] 0x600000145330 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x600000145330> { count = 2, transaction: 0, voucher = 0x0, contents =
from nolearn.lasagne import NeuralNet
from lasagne.layers import DenseLayer
from lasagne.layers import InputLayer
from lasagne.layers import DropoutLayer
from lasagne.layers import Conv1DLayer
from lasagne.layers import MaxPool1DLayer
from lasagne.layers import Conv2DLayer
from lasagne.layers import MaxPool2DLayer
from lasagne.nonlinearities import softmax
from lasagne.updates import adam
def old(self, x_rob, y_rob, BEACONS):
"""Calculate particle weight based on its pose and lidar data"""
# TODO check ICP implementation
print self.particles.shape
temp_beac = [(beacon[0] - self.particles[0][0], beacon[1] - self.particles[0][1]) for beacon in BEACONS]
beacons = [(math.cos(self.particles[0][2]) * beac[0] + math.sin(self.particles[0][2]) * beac[1],
-math.sin(self.particles[0][2]) * beac[0] + math.cos(self.particles[0][2]) * beac[1])
for beac in temp_beac]
print beacons
def get_landmarks(scan):
"""Returns filtrated lidar data"""
angles = []
distances = []
max_intens = 2600 # 2800
for i in range(len(scan)):
if scan[i][1] > max_intens and scan[i][0] < 3700:
angles.append(i * math.pi / 180 / 4)
distances.append(scan[i][0])
@Bandd-k
Bandd-k / PFdoc.md
Created February 14, 2017 15:17
Localisation algorithm Eurobot Reset Team

Eurobot Localisation

We use simple particle filter. To understand how it works look at Udacity course by Sebastian Thrun.
We combine data from odometry and lidar (HokuyoLX).
The trickest thing is the weight function of our particle filter. It is based on https://github.com/simama realization. How it works?

  • We filter all data according to intensity rate from Lidar
  • For each particle we calculate theoretical data
  • We fit theoretical data to real and get error
  • We calculate Gaussian function from error (It is our weight, then we normalize it)
  • That's all
@Bandd-k
Bandd-k / My portfolio.md
Last active January 16, 2017 11:49
Denis Karpenko, Design Portfolio for Sberbank.
@Bandd-k
Bandd-k / Sevos.c
Last active November 8, 2016 07:42
#include <Servo.h>
#include <math.h>
const int servo1 = 3; // first servo
const int servo2 = 10; // second servo
const int joyH = 5; // L/R Parallax Thumbstick
const int joyV = 4; // U/D Parallax Thumbstick
int l1 = 5;
int a= 0;
int b =0;
int servoVal; // variable to read the value from the analog pin
# RandomForestClassifier
# increase n_estimatore more than 1000 does not significally improve algorithm score while dramatically increase time
rf = RandomForestClassifier(n_estimators=1000,random_state=42)
# visualize 10 the most important features
# I also was trying to remove 10 least important features, but it decreses accuracy
start_time = time.time()
rf.fit(X, y)
print("---fit requires %s seconds ---" % (time.time() - start_time))
importances = rf.feature_importances_
std = np.std([tree.feature_importances_ for tree in rf.estimators_],
@Bandd-k
Bandd-k / XGBoost MAC OS installation
Last active October 12, 2016 21:10
You need pre-install GCC using brew
git clone https://github.com/dmlc/xgboost.git
cd xgboost
git submodule init
git submodule update
cp make/minimum.mk ./config.mk
make -j4
cd python-package
pip install -e .
from sklearn.ensemble import RandomForestClassifier
rf = RandomForestClassifier()
rf.fit(X_train, y_train)
# visualize 10 the most important features
importances = rf.feature_importances_
std = np.std([tree.feature_importances_ for tree in rf.estimators_],
axis=0)
indices = np.argsort(importances)[::-1]