C++ and CMake

CMake in VSCode =============================== VSCode is a free open source IDE with a lot of nice features. In addition one can chose from a variety of extensions. Looks like Cmake-tools kind of works, but the hotkeys and some settings are far from intuitive. In my previous attempt I ended up removing ``cmake tools`` plugin and moving forward with custom task.json and launch.json scripts. Here is a template I made back then....

March 26, 2020 · SergeM

System monitoring

I was looking for a system monitoring solution that can notify my in case of abnormal CPU/netowrk/disk usage via email or telegram. It seems there are several popular solutions: * `Nagios `_ * `Munin `_ * `Icinga `_ * `Spiceworks `_ * `Monit `_ * `Cacti `_ * `Zabbix `_ * `Glances `_ * `Monitorix `_ See also: * ``_

March 22, 2020 · SergeM

Multistage NN training experiment

Ideas for multistage NN training. There is some research on continuous learning without catastrophic forgetting . For example ANML: Learning to Continually Learn (ECAI 2020) arxiv code video The code for the paper is based on another one: OML (Online-aware Meta-learning) ~ NeurIPS19 code video OML paper derives some code from MAML: Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks pdf official tf code, also includes some links to other implementations....

January 1, 2020 · SergeM

Image segmentation with unlabeled areas with fast.ai

fast.ai library has a pretty easy to use yet powerful capabilities for semantic image segmentation. By default all the classes are treated the same. The network is trained to predict all the labels. Sometimes it’s important to provide non-complete labeling. That means for some areas the label is undefined. The performance of the network should exclude that areas in the loss and accuracy computation. That allows the network predict any other class in those areas....

November 14, 2019 · SergeM

Robocar project

For the robocar contest in Berlin I started a project of building an autonomous toy car (scale 1:10). The goal of the contest was to show the fastest lap driving autonomously. The track had 8-shape with lane boundaries marked with white tape. Unfortunately the competition got cancelled. But that gave me an opportunity to switch from my 1st gen car to 2nd gen version. Here is my first version: The second version is built upon a stock RC car Absima Abs1...

August 24, 2019 · SergeM

ROS experience

ROS on raspberry pi There is a compiled image for RPi by ubiquity that has ROS kinetic: https://downloads.ubiquityrobotics.com/pi.html. It seems for me too old. It’s 2020, there are ubuntu 18, ros melodic and ros2, next year the support of python2.7 will be discontinued. Meh… It is possible to have ROS melodic on Raspberry Pi 3 B+. See in the next sections. Installing tensorflow for ROS on raspberry pi Alternatively one can try to install it from wheels: https://www....

August 24, 2019 · SergeM

Lenovo E490 memory upgrade

Lenovo e490 is a cheaper and less performant alternative to the famous T series. The laptop came to me with a deformed box but I decided to give it a try and so far so good. I have bought a basic version and upgraded RAM for it. Here are some photos about disassembly process. To open the case one hast to unscrew several screws and accurately open the flexible cover using some non-sharp tool (like guitar pick)....

July 16, 2019 · SergeM

Arduino Experiments

Arduino board Arduino Nano v2.3 manual (pdf) Arduino and shift register 74HC595 74HC595 Datasheet (pdf) 74HC595 Explanation Youtube tutorial with buttons: Tutorial with arduino - I was using that. My version on a breadboard: Code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 //the pins we are using int latchPin = 2; int clockPin = 3; int dataPin = 4; void setup() { //set all the pins used to talk to the chip //as output pins so we can write to them pinMode(latchPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, OUTPUT); } void loop() { for (int i = 0; i < 16; i++) { //take the latchPin low so the LEDs don't change while we are writing data digitalWrite(latchPin, LOW); //shift out the bits shiftOut(dataPin, clockPin, MSBFIRST, i); //take the latch pin high so the pins reflect //the data we have sent digitalWrite(latchPin, HIGH); // pause before next value: delay(50); } } Alternatives More powerful shift register: TPIC6B595 PWM: TLC5940, TLC5947 PWM with i2c: PCA9685, PCA9635 PWM via shift register PWM Through a 74HC595 Shift Register at forum....

July 14, 2019 · SergeM

Computer vision libraries

So, what else is there except for opencv… CCV CCV website, github CCV 0.7 comes with a sub-10% image classifier, a decent face detector. It runs on Mac OSX, Linux, FreeBSD, Windows*, iPhone, iPad, Android, Raspberry Pi. In fact, anything that has a proper C compiler probably can run ccv. The majority (with notable exception of convolutional networks, which requires a BLAS library) of ccv will just work with no compilation flags or dependencies....

April 26, 2019 · SergeM

Postgres cheatsheet

Basics Connect as user postgres: 1 psql -U postgres Connect to a specific database: \c database_name; Quit the psql: \q List all databases: \l Lists all tables in the current database: \dt List all users: \du Create a new role username with a password: 1 CREATE ROLE username NOINHERIT LOGIN PASSWORD password; Managing tables Create a new table or a temporary table 1 2 3 4 5 6 7 CREATE [TEMP] TABLE [IF NOT EXISTS] table_name( pk SERIAL PRIMARY KEY, c1 type(size) NOT NULL, c2 type(size) NULL, ....

April 24, 2019 · SergeM