Spark in me - Internet, data science, math, deep learning, philo

snakers4 @ telegram, 1252 members, 1404 posts since 2016

All this - lost like tears in rain.

Internet, data science, math, deep learning, philosophy. No bs.

Our website
Our chat
DS courses review

snakers4 (Alexander), April 19, 15:36

Given the current situation ... which post / guide would you like next?

DS / ML related (back log of hobby projects)! – 32

👍👍👍👍👍👍👍 65%

OpenVPN + Docker – 9

👍👍 18%

Dante proxy + Arubacloud + DigitalOcean + Vultr + Docker – 8

👍👍 16%

👥 49 people voted so far.

snakers4 (Alexander), April 18, 13:37

Nice ideas about unit testing ML code


How to unit test machine learning code.

Note: The popularity of this post has inspired me to write a machine learning test library. Go check it out!

snakers4 (Alexander), April 17, 19:14

Andrew NG released first 4 chapters of his new book

So far looks not really technical



Download Ng_MLY01.pdf 1.52 MB

snakers4 (Alexander), April 17, 08:50

DS Bowl 2018 top solution


This is really interesting...their approach to separation is cool

snakers4 (Alexander), April 17, 07:39

Nice realistic article about bias in embeddings by Google



Text Embedding Models Contain Bias. Here's Why That Matters.

Human data encodes human biases by default. Being aware of this is a good start, and the conversation around how to handle it is ongoing. At Google, we are actively researching unintended bias analysis and mitigation strategies because we are committed to making products that work well for everyone. In this post, we'll examine a few text embedding models, suggest some tools for evaluating certain forms of bias, and discuss how these issues matter when building applications.

snakers4 (Alexander), April 17, 06:30

Also what is interesting, despite the fact that geektimes blocked my SOCKS proxy post and the fact that marketing based web-sites stole it (in Russian), I received the following feedback:

- 3 people thanked me in the ODS channel

- 3 people thanked me via email

- 2 people thanked me in geektimes PM

Also this is also interesting - my referral link was hit 165 times and ~50 people registered =)


So if you missed the fun

- Post

- Referral link

- Note that the final config is in the comments and here (thanks to and its admin)

sudo apt update && apt upgrade


dpkg -i dante-server_1.4.2+dfsg-2build1_amd64.deb

echo '

logoutput: syslog /var/log/danted.log

internal: eth0 port = 1080

external: eth0

socksmethod: username

user.privileged: root

user.unprivileged: nobody

client pass {

from: to:

log: error


socks pass {

from: to:

command: connect

log: error

socksmethod: username

}' > /etc/danted.conf

# basic ufw installation

sudo apt-get install ufw

sudo ufw status


sudo ufw allow ssh

sudo ufw allow proto tcp from any to any port 1080

sudo ufw status numbered

sudo ufw enable

sudo systemctl enable danted

sudo useradd --shell /usr/sbin/nologin av_socks && sudo passwd av_socks

So, thanks to bykvaadm for his feedback and support and to everybody else.



Captured with Lightshot

Also someone just bought us a coffee


Please consider supporting us for more quality content

Usually it takes several hours (to a month if it is about a competition) to write and does not pay well

And when people steal your content to put their refcodes in it, it's painful (

Buy Alexander Veysov a Coffee -

A practitioner in the field of Data Science / Deep Learning

snakers4 (Alexander), April 16, 10:17

A draft of the article about DS Bowl 2018 on Kaggle.

This time this was a lottery.

Good that I did not really spend much time, but this time I learned a lot about watershed and some other instance segmentation methods!

An article is accompanied by a dockerized PyTorch code release on GitHub:



This is a beta, you are welcome to comment and respond.





Applying Deep Watershed Transform to Kaggle Data Science Bowl 2018 (dockerized solution)

In this article I will describe my solution to the DS Bowl 2018 and why it was a lottery and post a link to my dockerized solution Статьи автора - Блог -

snakers4 (Alexander), April 15, 09:49


(0), Leslie N. Smith US Naval Research Laboratory

(1) Will serve as a good intuition starter if you have little experience (!)

(2) Some nice ideas:

- The test/validation loss is a good indicator of the network’s convergence - especially in early epochs

- The amount of regularization must be balanced for each dataset and architecture

- The practitioner’s goal is obtaining the highest performance while minimizing the needed computational time

(smaller batch - less stability and faster convergence)

- Optimal momentum value(s) will improve network training

(3) The author does not study the difference between SGD and Adam in depth =( Adam kind of solves much of his pains

(4) In my practice the following approach works best:

- Aggressive training with Adam to find the optimal LR

- Apply various LR decay regimes to determine the optimal

- Use low LR or CLR in the end to converge to a lower value (possible overfitting)

- Test on test / delayed test end-to-end

- In my experience - a strong model with good params will start with test/val set loss much lower / target metric much higher than on the train set

- In some applications if your CNN is memory intesive - you just opt for the largest batch possible (usually >6-8 works)

- Also there is no mention of augmentations - they usually help reduce overfitting much better than hyper parameters


Nice read about systemctl


How To Use Systemctl to Manage Systemd Services and Units | DigitalOcean

Systemd is an init system and system manager that is widely becoming the new standard for Linux machines. While there is considerable controversy as to whether systemd is an improvement over the init systems it is replacing, the majority of distributi

snakers4 (Alexander), April 15, 08:06

2018 DS/ML digest 8

As usual my short bi-weekly (or less) digest of everything that passed my BS detector

Market / blog posts

(0) about the importance of accessibility in ML -

(1) Some interesting news about market, mostly self-driving cars (the rest is crap) -

(2) US$600m investment into Chinese face recognition -

Libraries / frameworks / tools

(0) New 5 point face detector in Dlib for face alignment task -

(1) Finally a more proper comparsion of XGB / LightGBM / CatBoost - (also see my thoughts here

(3) CNNs on FPGAs by ZFTurbo



(4) Data version control - looks cool



-- but I will not use it - becasuse proper logging and treating data as immutable solves the issue

-- looks like over-engineering for the sake of overengineering (unless you create 100500 datasets per day)


(0) TF Playground to seed how simplest CNNs work -


(0) Looks like GAN + ResNet + Unet + content loss - can easily solve simpler tasks like deblurring

(1) You can apply dilated convolutions to NLP tasks -

(2) High level overview of face detection in -

(3) Alternatives to DWT and Mask-RCNN / RetinaNet?

- Has anybody tried anything here?


(0) A more disciplined approach to training CNNs - (LR regime, hyper param fitting etc)

(1) GANS for iamge compression -

(2) Paper reviews from ODS - mostly moonshots, but some are interesting



(3) SqueezeNext - the new SqueezeNet -




snakers4 (Alexander), April 15, 07:36

So, I used to use Chromium based Opera.

Now I switched to the new Firefox, which is fast, boasts a lot of security extensions and looks also clean and nice. Their mobile apps are a bit unpolished, but also good.

Looks like the rewrote rendering from scratch - because a year ago it was slow.

snakers4 (Alexander), April 14, 12:25

Found an applied channel (RU) about security and admin stuff

Looks professional


- also the channel's admin posted some useful remarks here



Админим с Буквой

Канал о системном администрировании, DevOps и немного Инфобеза. По всем вопросам обращаться к @bykva флуд и обсуждение. обсуждение и флуд.

snakers4 (Alexander), April 14, 09:05

Out post is live on Russian reddit - geektimes


Please support if you have a valid account!


Простая пошаговая настройка SOCKS5 прокси сервера под Ubuntu 16 за 10-15 минут

Простая пошаговая настройка SOCKS5 прокси сервера под Ubuntu 16 Данная статья является переводом статьи отсюда. Стиль и особенности речи автора сглажены, но в...

snakers4 (Alexander), April 13, 23:08

So, I just found out that Firefox rendering engine was rewritten, now it boasts the fastest speeds and support for ... socks5 proxies, both on mobile and desktop.



Also projects like orbot+orfox help in more extreme cases.



SwitchyOmega - Manage and switch between multiple proxies quickly & easily.

snakers4 (Alexander), April 13, 15:44

What proxy will you use?

Other VPN-like solutions – 17

👍👍👍👍👍👍👍 27%

Luckily, it does not apply to me – 15

👍👍👍👍👍👍 23%

A free / public / provided by special channels – 15

👍👍👍👍👍👍 23%

I will try your guide – 14

👍👍👍👍👍👍 22%

I will stop using Telegram – 2

👍 3%

Let's wait, maybe they will reconsider – 1

▫️ 2%

👥 64 people voted so far.

snakers4 (Alexander), April 13, 15:30

So, usually I try to stay away from such controversial topics, but I have to address and elephant in the room. You all know, that originally I am from Russia and I have quite liberal world views.

Seeing that many people start to ride the hype and advertising some expensive "solutions", this is why today I decided to do a post about creating your own SOCK5 proxy server via a droplet on Digital Ocean:

- Post - - note that unlike my other posts - this one is a step-by-step explanation;

- It explains how to create your own SOCK5 proxy-server using Ubuntu and Digital Ocean with dante;

- The cheapest digital ocean droplet is US$5 per month (you can find such droplets for as low as US$2-3 with inferior service);

- If you use my referral link - you will get US$10 for free -

- Also you can create credentials for your friends and family;

Also note, that foreseeing this s**t - I created aliases for our telegram channel

- In twitter

- In the web


UX is not so great, but it works more or less. Please tell me what you think. I know that the majority of readers are Russians and we have quite a negative mentality, but this is one of the cases when you have to share this message and my post as much as possible. We will be doing an adapted post on as well.

And I know that there are free proxy lists. But if you create a simple service today - tomorrow you can add layers to it (see some hints in the article) and not rely on other people.

If you like what I shared - please support our channel (see a pinned message)




Playing with a simple SOCKS5 proxy server on Digital Ocean and Ubuntu 16

This article tells you how to start your SOCKS5 proxy with zero to little experience Статьи автора - Блог -

snakers4 (Alexander), April 13, 07:21

So I briefly dug into running a containerized GPU accelerated GUI app (I want to be able to run some apps I do not really want on my host).

Docker kind of works for this purpose, but I found working guides for nvidia-docker, not nvidia-docker2.

Looks like if you want to run a Linux host with a Linux container - then LXD is a good option. It is high level and seems to have an easy API to use. I will report if that will work for me.

- Guide

- LXD vs Docker

- Extensive LXD tutorial


How to run graphics-accelerated GUI apps in LXD containers on your Ubuntu desktop

In How to run Wine (graphics-accelerated) in an LXD container on Ubuntu we had a quick look into how to run GUI programs in an LXD (Lex-Dee) container, and have the output appear on the local X11 s…

Soviet arcade video games museum (pics)


Ещё один занятный музей

Продолжая музейную тему, на этот раз заглянем в Москву. Только двинем мы не в Кремль, а в место более для меня интересное.…

snakers4 (Alexander), April 12, 15:32

Evolving Generative Adversarial Networks | Two Minute Papers #242
The paper "Evolutionary Generative Adversarial Networks" is available here: Our Patreon page:

snakers4 (Alexander), April 12, 08:08

DS Bowl 2018 stage 2 data was released.

It has completely different distribution from stage 1 data.

How do you like them, apples?

Looks like Kaggle admins really have no idea about dataset curation, or all of this is mean to misguide manual annotators.

Anyway - looks like random bs.



snakers4 (Alexander), April 10, 09:42

Yolov3 - best paper.

But not in terms of scientific contribution, but rebuttal of DS community BS.

Very funny read.


If you want a proper comparison of object detection algorithms - use this paper

Looks like SSD and YOLO are reasonably good and fast, and RCNN can be properly tuned to be 3-5x slower (not 100x) and more accurate.



Download YOLOv3.pdf 2.29 MB

snakers4 (Alexander), April 10, 09:01

A bit more on semantic segmentation, now 3D

{V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation


--> Link / authors, Fausto Milletari / Nassir Navab / Seyed-Ahmad Ahmadi

--> Essence:

(0) Essentially applies UNet to 3D with a custom DICE based loss

(1) Architecture - - basically UNet with 3D convolutions. Upsampling / downsampling -

(2) PReLu (no ablation test)

(3) Receptive fields of layers -

(4) 3D DICE loss - (wo BCE?)

--> The paper does not use all the juice possible - hacky transfer learning (obvious idea - just stacking Imagenet filters), CLR, LinkNet architectures, etc

--> Looks like a good baseline / reference

{An application of cascaded 3D fully convolutional networks for medical image segmentation


-->, a group of Japanese researchers

--> Essence:

(0) 2 stage 3D UNet, ablation test against 2D FCNs

(1) Loss - 3D cross-entropy

(2) Transfer learning - it works for other datasets, give a mild boost (1-3 %)

(3) 80-90% DICE, varies by organ

(4) weights downloadable (Caffe...)

--> Essentially a 2 stage process is dictated by memory considerations:

(0) Pipeline

In the long run transfer learning may rule, but here legal limitations may slow down this process.



snakers4 (Alexander), April 09, 09:57

Forwarded from Petr Ivanov:

Python Developers Survey 2017 - Results

At the very end of 2017, the Python Software Foundation together with JetBrains conducted an official Python Developers Survey. We set out to identify the latest trends and gather insight into how the Python development world looks today. Over 9,500 developers from almost 150 different countries participated to help us map out an accurate landscape of the Python community.

snakers4 (Alexander), April 08, 13:53

For new (!) people on the channel:

- This channel is a practicioner's channel on the following topics: internet, data science, math, deep learning, philosophy

- Focus is on data science

- Don't get your opinion in a twist if your opinion differs. You are welcome to contact me via telegram @snakers41 and email - [email protected]

- No bs and ads

- Once a week or once several weeks we publish some ML related digests

Give us a rating:



- Buy me a coffee

- Direct donations - - 5011673505 (paste this agreement number)

- Yandex -

Other channel aliases (in case you are afraid Telegram gets blocked in Russia)

- Twitter feed -

- Web feed

Our website


Our chat


DS courses review



Our best article so far:


Telegram Channels Bot

Discover the best channels 📢 available on Telegram. Explore charts, rate ⭐️ and enjoy updates!

snakers4 (Alexander), April 08, 13:48

As you may know (for newer people on the channel), sometimes we publish small articles on the website.

This time it covers a recent Power Laws challenge on DrivenData, which at first seemed legit and cool, but in the end turned back into a pumpkin.

Here is an article:





Playing with electricity - forecasting 5000 time series

In this article I share our experience participating in a recent time series challenge on Drivendata and my personal ideas about ML competitions Статьи автора - Блог -

snakers4 (Alexander), April 07, 11:52

Internet digest

- Ben Evans -

- About autonomous cars - - autonomy will vary based on the route / conditions / situation / use case

- FB delays its speaker -

- Foxconn buys Belking

- Amazon music > 10m subs -

- The Economist about ML in business -

- Apple to make its own chips -



snakers4 (Alexander), April 07, 11:14

The trend for smaller / inadequate prizes and weird datasets continues:

- This years' DS Bowl on Kaggle features a small public train dataset (650 images) vs. much larger delayed validation dataset (3000 images). Cheap annotation, anyone? =) Also remarkably, for a somewhat difficult task (instance segmentation) - the prize is much lower than the last year;

- New autonomous driving contest on Kaggle, as well as other CVPR competitions - features extremely large datasets, extremely low prizes (US$1-2k), and no travel costs to CVPR covered. Ofc you can win and fly there, but this will not even cover your GPU costs;

- The recent xnView challenge I really wanted to participate - requires a US Tax number to be eligible for prizes. Of course they do not know about double taxation treaties and WEP-8 tax exemptions;

Alas =(


snakers4 (Alexander), April 05, 20:04

This Fools Your Vision | Two Minute Papers #241
The paper "Adversarial Examples that Fool both Human and Computer Vision" is available here: Our Patreon page with the detai...

snakers4 (Alexander), April 05, 06:19

For some reason when you use PyTorch multi-thread data loaders, it stalls if you use OpenCV and not set


Nice to know this.


snakers4 (Alexander), April 03, 07:53

Handy opencv snippet to transform grayscale mask with labels (i.e. 0 for background, 1,2,3 etc) into a colourful map

y_pred_coloured = cv2.applyColorMap((y_pred / y_pred.max() * 255).astype('uint8'), cv2.COLORMAP_JET)


snakers4 (Alexander), April 03, 05:27

snakers4 (Alexander), April 01, 07:57

Novel topic modelling techniques



Looks interesting.

If anyone knows about this - please ping in PM.