Let’s face it, robots are cool. In this post, Toptal Engineer Nick McCrea provides a step-by-step, easy-to-follow tutorial (with code samples) that walks you through the process of building a basic autonomous mobile robot.Continue reading →
Leveraging DeepMind’s breakthrough AI approaches takes some work, but the results are astounding. In this article, Toptal Freelance Deep Learning Engineer Neven Pičuljan guides us through the building blocks of reinforcement learning, training a neural network to play Flappy Bird using the PyTorch framework.Continue reading →
Employing Python to make machine learning predictions can be a daunting task, especially if your goal is to create a real-time solution. However, Tensorflow and Scikit-Learn can significantly speed up implementation.
In this article, Toptal Python Developer Guillaume Ferry outlines a simple architecture that should help you progress from a basic proof of concept to a minimal viable product without much hassle.Continue reading →
The microservices architectural pattern is an architectural style that is growing in popularity, given its flexibility and resilience.
In this article, Toptal Freelance Python Developer Guilherme Caminha will focus on building a proof of concept microservices application in Python using Nameko, a microservices framework.Continue reading →
Computational photography is about enhancing the photographic process with computation. While we normally tend to think that this applies only to post-processing the end result (similar to photo editing), the possibilities are much richer since computation can be enabled at every step of the photographic process—starting with scene illumination.
In this article, Toptal OpenCV Expert Radu Balaban walks us through two examples of computational photography: low light and high dynamic range.Continue reading →
Threading is just one of the many ways concurrent programs can be built. In this article, we will take a look at threading and a couple of other strategies in building concurrent programs in Python, as well as discuss how each is suitable in different scenarios.Continue reading →
As applications become more complex, having good logs can be very useful, not only when debugging but also to provide insight in application issue/performance.
The Python standard library comes with a logging module that provides most of the basic logging features and is very handy but contains some quirks that can cause hours of headachesContinue reading →
While machine learning sounds highly technical, an introduction to the statistical methods involved quickly brings it within reach. In this article, Toptal Freelance Software Engineer Vladyslav Millier explores basic supervised machine learning algorithms and scikit-learn, using them to predict survival rates for Titanic passengers.Continue reading →
TensorFlow makes implementing deep learning on a production scale a breeze. However, understanding its core mechanisms and how dataflow graphs work is an essential step in leveraging the tool’s power.
In this article, Toptal Freelance Software Engineer Oliver Holloway demonstrates how TensorFlow works by first solving a general numerical problem and then a deep learning problem.Continue reading →
Donald Knuth said that “premature optimization is the root of all evil.” But there comes a time, usually in mature projects with high loads, when the need to optimize presents itself. In this article, Toptal Freelance Software Engineer Iulian Gulea talks about five common methods to optimize a web project’s code using principles that can be used in Django as well as other frameworks and languages. Using these principles, he demonstrates how to reduce the response time of a query from 77 to 3.7 seconds.Continue reading →
In this article, I will try to give you a good understanding of which scenarios could be covered by Celery. Not only will you see interesting examples, but will also learn how to apply Celery with real world tasks such as background mailing, report generation, logging and error reporting. I will share my own way of testing tasks beyond emulation and explain a few tricks that go beyond the official documentation and took me hours of research to discover myself.Continue reading →
Twitter is a goldmine of data. Unlike other social platforms, almost every user’s tweets are completely public and pullable.
In this tutorial, Toptal Freelance Software Engineer Anthony Sistilli will be exploring how you can use Python, the Twitter API, and data mining techniques to gather useful data.Continue reading →
Social networks are among the biggest sources of data today, and this means they are an extremely valuable asset for marketers, big data specialists, and even individual users like journalists and other professionals. Harnessing the potential of real-time Twitter data is also useful in many time-sensitive business processes.
In this article, Toptal Freelance Software Engineer Hanee’ Medhat explains how you can build a simple Python application to leverage the power of Apache Spark, and then use it to read and process tweets to identify trending hashtags.Continue reading →
In this tutorial, we will look at some common mistakes that are often made by Django developers and ways to avoid them. This tutorial is useful even if you’re a skilled Django developer because these mistakes aren’t just limited to new developers taking their first stab at Django.Continue reading →
So you’ve implemented user authentication. Now, you want to allow your users to log in with Twitter, Facebook or Google. No problem. You’re only a few lines of code away from doing so.
But while there are hundreds of OAuth 2 packages that pip knows, only a few actually do what they’re supposed to do.
In this article, Toptal Software Engineer Peter Goodspeed-Niklaus explains how to integrate OAuth 2 into your Django or Django Rest Framework using Python Social Auth.Continue reading →
Genome data is one of the most widely analyzed datasets in the realm of Bioinformatics. The SciPy stack offers a suite of popular Python packages designed for numerical computing, data transformation, analysis and visualization, which is ideal for many bioinformatic analysis needs.
In this tutorial, Toptal Software Engineer Zhuyi Xue walks us through some of the capabilities of the SciPy stack. He also answers some interesting questions about the human genome, including: How much of the genome is incomplete? How long is a typical gene?Continue reading →
More than 60 percent of trading activities with different assets rely on automated trading and machine learning instead of human traders. Today, specialized programs based on particular algorithms and learned patterns automatically buy and sell assets in various markets, with a goal to achieve a positive return in the long run.
In this article, Toptal Freelance Data Scientist Andrea Nalon explains how to predict, using machine learning and Python, which trade should be made next on the S&P 500 to get a positive gain.Continue reading →
The threaded model and global interpreter lock has always been in the way of Python handling thousands of concurrent long-lived connections. Modern web frameworks, such as Tornado, use non-blocking network I/O to make Python feasible for implementing WebSocket servers.
In this article, Toptal engineer Jongwook Kim walks us through the process of implementing a simple WebSocket-based web application in Python using the Tornado web framework.Continue reading →
Since its debut in 2008, Python 3 has come a long way. Gone are the days when it lacked support for almost all useful libraries and tools. Python 3 offers many improvements and amazing new features that make writing robust code in Python easier than ever.
In this article, Toptal engineer Dario Bertini discusses some of the improvements and features that Python 3 has to offer, and explains whether switching to Python 3 is a smart choice right now.Continue reading →
Robot Operating System, a framework for building robot applications, allows developers to assemble a complex system by connecting existing solutions for small problems.
In this article, Toptal engineer Adnan Ademovic gives us a step-by-step tutorial to building software for an onboard computer that allows us to remotely control and monitor a robot and running it in a simulated world using Robot OS.Continue reading →
AWS Lambda offers a relatively thin service with a rich set of ancillary configuration options, making it possible to implement easily scalable and maintainable applications leveraging these services.
In this article, Toptal engineer Andrew Crosio gives us a step-by-step tutorial for building an image uploading and resizing service and demonstrates how AWS Lambda can be used as a platform to easily build service oriented architecture applications.Continue reading →
Python is a powerful, object-based, high-level programming language with dynamic typing and binding. Due to its flexibility and power, developers often employ certain rules, or Python design patterns. What makes them so important and what do does this mean for the average Python developer?
In this post, Toptal Senior Software Engineer Andrei Boyanov explains why Python is great for design patterns, and how they can be used to unlock even more potential, or to streamline development and make code more maintainable.Continue reading →
Nowadays, almost all Python frameworks use WSGI as a means, if not the only means, to communicate with their web servers. This is how Django, Flask and many other popular frameworks do it.
This article intends to provide the reader with a glimpse into how WSGI works, and allow the reader to build a simple WSGI application or server.Continue reading →
Analysts have come to recognize social network data as a virtual treasure trove of information for sensing public opinion trends and groundswells of support. In this article, Toptal Engineer Elder Santos describes the techniques he employed for a proof-of-concept that effectively analyzed Twitter Trend Topics to predict, as a sample test case, regional voting patterns in the 2014 Brazilian presidential election.Continue reading →
Although the most wide-spread and supported way of running Django is on a Linux system (e.g., with uwsgi and nginx), it actually doesn’t take much work to get it to run on IIS. In this article, Toptal Engineer Ivan Voras walks you through a step-by-step tutorial, clearly explaining how to install Django on IIS.Continue reading →
Reverse engineering and hacking are usually related to malicious activities that result in sleepless nights of engineers responsible for system maintenance.
Reverse engineering is a tool that we can utilize to find the flaws and improve our software in many aspects. This article shows us how to use these techniques to learn more about different implementations of web API.Continue reading →
Scientific computing is hard. But thanks to an ever-growing landscape of open source tools, really tough problems are becoming easier to solve. Toptal engineer Charles Cook provides an in-depth example, leveraging open source tools to solve a problem in computational fluid dynamics.Continue reading →
Python’s simple, easy-to-learn syntax can mislead Python developers – especially those who are newer to the language – into missing some of its subtleties and underestimating the power of the language.
In this article, Toptal’s Martin Chikilian presents a “top 10” list of somewhat subtle, harder-to-catch mistakes that can trip up even the most advanced Python developer.Continue reading →
This post explores some of the more common types of GPS tracking errors to expect with low-end GPS devices, providing an understanding of what causes them as well as some approaches for correcting them. The techniques outlined can provide users of low-end GPS devices with a reasonable level of automated improvement of the accuracy of their GPS tracks.Continue reading →
I love and use Django in lots of my personal and client projects, mostly for those involving relational databases and more classical web applications. However, by design, Django is very tightly coupled with its ORM, Template Engine System, and Settings object. Plus, it’s not a new project: it carries a lot of baggage from the past to remain backwards compatible.
In a few of my client projects, we’ve chosen to give up on Django and use a micro framework like Flask, typically when the client wants to do some interesting stuff with the framework. At the same time, we often need user registration, login, and more, all of which is easily handled with Django.
The question emerged: is Django an all-or-nothing deal? Should we drop it completely from the project, or is there a way to combine some it with the flexibility of other frameworks?Continue reading →
In a recent phone screen, I decided to use a class attribute in my implementation of a certain Python API. My interviewer challenged me, questioning whether my code was syntactically valid, when it was executed, etc. In fact, I wasn’t sure of the answers myself. So I did some digging.
Python class attributes. No one really knows when (or how) to use ‘em. In this guide, I walk through common pitfalls and conclude with a list of valid use-cases that could save you time, energy, and lines of code.Continue reading →
When people think computational geometry, in my experience, they typically think one of two things:
- Wow, that sounds complicated.
- Oh yeah, convex hull.
In this post, I’d like to shed some light on computational geometry, starting with a brief overview of the subject before moving into some practical advice based on my own experiences in computational geometric programming with Python.Continue reading →
More often than not, the software we write directly interacts with what we would label as “dirty” services. In layman’s terms: services that are crucial to our application, but whose interactions have intended but undesired side-effects—that is, undesired in the context of an autonomous test run.
For example: perhaps we’re writing a social app and want to test out our new ‘Post to Facebook feature’, but don’t want to actually post to Facebook every time we run our test suite.
unittest library includes a subpackage named
unittest.mock—or if you declare it as a dependency, simply
mock—which provides extremely powerful and useful means by which to mock and stub out these undesired side-effects.
Python is amazing.
Surprisingly, that’s a fairly ambiguous statement. What do I mean by ‘Python’? Do I mean Python the abstract interface? Do I mean CPython, the common Python implementation? Or do I mean something else entirely? Maybe I’m obliquely referring to Jython, or IronPython, or PyPy. Or maybe I’ve really gone off the deep end and I’m talking about RPython or RubyPython (which are very, very different things).
While the technologies mentioned above are commonly-named and commonly-referenced, some of them serve completely different purposes (or at least operate in completely different ways). In this post, I’ll start from scratch and move through the various Python implementations, concluding with a thorough introduction to PyPy, which I believe is the future of the language.Continue reading →
It’s always fun to put your programming skills on display. A while back, I figured it’d be cool to try and control my laptop via my Android mobile device. Think about it: being able to play and pause music, start and stop programming jobs or downloads, etc., all by sending messages from your phone. Neat, huh?Continue reading →
Porn is a big industry. There aren’t many sites on the Internet that can rival the traffic of its biggest players.
And juggling this immense traffic is tough. To make things even harder, much of the content served from porn sites is made up of low latency live streams rather than simple static video content. But for all of the challenges involved, rarely have I read about the developers who take them on. So I decided to write about my own experience on the job.Continue reading →