Apache MXNet 1.1 on Windows 10 64 bit

Attempted to run MXNet 1.1 GPU version on Windows 10. It works well, but the process of installation has a few details that is helpful to know. 1. You can create Anaconda environment based on Python 3.6 and use environment’s pip to install GPU version of Apache MXNet on Windows – `pip install mxnet-cu90` at […]

Python, MXNet and pix2pix image translation.

I’ve been doing some self-study around machine learning and deep learning, and once upon a time stumbled on a unsupervised image to image translation network called pix2pix . Very interesting network architecture. I’ve looked at it from the perspective of image colorization. It seems like a great option and it trains quite quickly. Although I haven’t had […]

Installing or upgrading to MXNet version 0.12.1 on Windows 10

This post is a continuation and somewhat a revision of  “Installing MXNet on Windows 10” MXNet is evolving and recently there was a release of version 0.12 I want to share the upgrade process that worked for me on my Windows 10 machine. You can use this tutorial as installation tutorial of MXNet 0.12 First, […]

Python NLTK module and its download() function

I am trying to build a small machine learning service that would use Python NLTK library. As it is a pet project, and a very small one – I’ve decided to use Heroku for the hosting. And as I am using NLTK library I needed to download models and corpora by calling nltk.download() method to parse […]

Generators in Python!

Python generators code tutorial: import string import inspect # Informal tutorial on the generators. We will cover very briefly: ## 1) What are the generators (PEP 255). ## 2) What is yield (PEP268). # Generator in Python is a fancy object that maintain its state between calls. # In simple words generator knows what to […]

UUID3 cross compatible in Java and Python

Sometimes, in the world of microservices you want to generate consistent hashes across several languages. I’ve faced a problem of getting the same UUID in Java and Python, and wanted to share how it can be done. Java UUID.nameUUIDFromBytes(“name”.getBytes()) # b068931c-c450-342b-a3f5-b3d276ea4297 Python class NULL_NAMESPACE: bytes = b” uid.uuid3(NULL_NAMESPACE, “name”) # b068931c-c450-342b-a3f5-b3d276ea4297 Enjoy!

PyMongo insert_many with overwrite

I’ve recently needed to insert lots of objects into the Mongo collection. The only problem was that some of the objects would have an ‘_id’ key pre-set and would conflict with existing objects in the database. PyMongo inser_many operation doesn’t support it out of the box, so here is a work-around using bulk api: try: […]