How to build your own blockchain for a financial product


Technologies are changing fast; people are not. – Jakob Nielsen

Blockchain is a relatively new technology that many deem is used only for buying Bitcoins. They try to implement it in whatever sphere comes to mind, whether it is fashion, education or healthcare. I would say it is okay — too little time has passed to determine which area of human activity can benefit the most from applying this technology. To understand the practical application of blockchain, we must first define why it appeared, and then study cases when blockchain can make a significant difference.

Note: This article does not explain the blockchain concepts; instead, it focuses on developing a fintech application using this technology. I will explain why fintech can already adopt the blockchain, and most importantly, focus on developing a decentralized application using this technology.

read full ⇝

    2018-09-04 10:00:18      python blockchain fintech

Debugging Python Applications with pdb


Debugging isn’t a new trick – most developers actively use it in their work. Of course, everyone has their own approach to debugging, but I’ve seen too many specialists try to spot bugs using basic things like print instead of actual debugging tools. Or even if they did use a debugging tool, they only used a small set of features and didn’t dig deeper into the wide range of opportunities good debuggers offer. And which could have saved those specialists a lot of time.

read full ⇝

    2018-01-05 10:00:03      django python debug debugger

How to Improve Django Performance. Optimization Tips


I frequently face a recurring situation when developers receive a task to make a performance optimization on Django. Pretty often they are trying to make it in a wrong way. In this short article I want to shed some light on the common mistakes, and show you the way I’m searching for bottlenecks.

read full ⇝

    2017-04-11 10:00:44      django python performance

Django-Classifier or What Have I Done?


From time to time you have to build some properties for an object and usually those are just a bunch of fields for a model. With django-classifier you may do that in another way. It allows you to create models at start, and set the properties needed from the admin panel at any time.

Let me show you two demo projects. First one is the “user profile” I’ve built for our internal website. The second one shows the way to build online store products with dynamic properties and the option to apply filters for those.

read full ⇝

    2017-03-09 10:00:37      django python data structure

How to speak from Arduino to Python and back


While I have work on my pet project( a network of sensors) I have faced with the task to send data from Arduino to python backend and back.

At first, I want to say that I didn't use HTTP requests because my Arduino nodes don't have the internet connections just radio network to "Hub". And Hub retranslates what he receive by the radio channel to MQTT broker via the internet.

read full ⇝

    2016-12-19 16:00:00      python arduino microcontroller protobuf

Office information gadget mounted on toy


I did small funny toy for office. Gadget mounted on motorcycle toy. Now I always know temperature, humidity and build status of some projects. Also it post temperature and humidity values to ThinkSpeak every hour and we have statistics :).

Office Status mounted on motorcycle toy

Parts that I have used:

  • Maisto BMW R1200GS
  • ESP8266-12e - brain of all, manage screen, sensors and fetch data from jenkins/codecov
  • DHT11 - temperature & humidity sensor(will be replaced with DHT2x)
  • OLED screen
  • Tic-Tac - cases made from this boxes

How report from ThingSpeak looks:

if you are interested in source code, feel free to contact me.

Gadget assembling

    2016-10-03 10:00:54      microcontroller esp8266 gadget

Django package: django-classifier


Just want to introduce my package for Django.

With help of this package you can create dynamically configurable sets of properties. Checkout tutorial for more information.

doc: http://django-classifier.readthedocs.io/

repo: https://github.com/django-stars/django-classifier

    2016-09-01 12:00:28      django package

How to change choices for field in Django-Rest-Framework


As usual for django forms common way to change choices for some field it’s overwrite __init__ method of form and replace self.fields['<field name>'].choices. But it doesn’t work for django-rest-framework serializers.ChoiceField.

For serializers.ChoiceField you can again overwrite __init__ method and replace data in self.fields['<field name>'].choice_strings_to_values where have to be dict where key is string representation of choices "key" and value is choices "key".


self.fields['fieldname'].choice_strings_to_values = {
    str(key): key
    for key, value in self.get_fieldname_choices()
    2016-08-26 19:00:26      django rest-framework

Upload files with Selenium (Windows version)


In case when you have basic HTML input for file it’s very easy, just run .find_element_by_id('id_photo').send_keys(<full path to file>). But very often we don’t have such inputs or they are hidden and we cann’t send keys to them. For such cases with using Windows we can do it with help of pywinauto or other automation GUI utilities.

So, if you have open file dialog and run test on windows, I have solution. With help of pywinauto we can put path to file into dialog and click "Open". To connect pywinauto to browser we should have process id, for Firefox we already have right id in driver instance but if you use Chrome, driver has only pid of browser but you need pid of tab, in my example I have only one tab and in code I just get first child of browser. Also we should do few tries to fill out dialog or run some sleep to wait for dialog will be opened.

Next you can found simple example how to upload file.

read full ⇝

    2016-08-08 10:00:20      test selenium

How I take photos of water crown


We can see water crown right after a water drop hits the water. So we have to take picture right after a water drop hits the water. It takes me about 20 milliseconds.

To do it in auto mode I use my camera with flash and Arduino. I use LDR and laser pointer to capture a water drop and IR led to trigger camera. The main thing is you have to capture a water drop while fooling down.

read full ⇝

    2015-07-30 10:00:00      photo arduino macro microcontroller