Search
Write a publication
Pull to refresh

All streams

Show first
Period
Level of difficulty

Algorithms in Go: Dutch National Flag

Reading time3 min
Views2.9K

The flag of the Netherlands consists of three colors: red, white and blue. Given balls of these three colors arranged randomly in a line (it does not matter how many balls there are), the task is to arrange them such that all balls of the same color are together and their collective color groups are in the correct order.

For simplicity instead of colors red, white, and blue we will be dealing with ones, twos and zeroes.

Let's start with our intuition. We have an array of zeroth, ones, and twos. How would we sort it? Well, we could put aside all zeroes into some bucket, all ones into another bucket, and all twos into the third. Then we can fetch all items from the first bucket, then from the second, and from the last bucket, and restore all the items. This approach is perfectly fine and has a great performance. We touch all the elements when we iterate through the array, and then we iterate through all the elements once more when we "reassamble" the array. So, the overall time complexity is O(n) + O(n) ~= O(n). The space complexity is also O(n) as we need to store all items in the buckets.

Can we do better than that? There is no way to improve our time complexity. However, we can think of a more efficient algorithm in regard to space complexity. How would we solve the problem without the additional buckets?

Let's make a leap of faith and pretend that somehow we were able to process a part of the array. We iterate through part of the array and put encountered zeroes and ones at the beginning of the array, and twos at the end of the array. Now, we switched to the next index i with some unprocessed value x. What should we do there?

Read more

Distributed File Systems

Reading time9 min
Views10K

The Big Data Tools plugin seamlessly integrates HDFS into your IDE and provides access to different cloud storage systems (AWS S3, Minio, Linode, Digital Open Space, GS, Azure). But is this the end? Have we implemented everything and now progress has stopped? Of course not.


In this short digest, we'll take a look at 15 popular distributed file systems available on the market and try to get a sense of their individual advantages.


Almost all of these systems are free or open-source, and you can find the sources on GitHub. The sites of these projects, their documentation, and online reviews provide most of the information we’ll consider here. Other than HDFS, none of these technologies have been implemented yet in Big Data Tools. But who knows? Perhaps someday we'll see them in our plugin.


Read more →

Brainless Platform for a Robotic Vacuum Cleaner

Reading time11 min
Views1.3K
More on robotics.snowcron.com

First of all, this is just an exercise, useful as is, but the result is going to be far from an industrial level robots. Why doing it then?

For the same reasons we do all exercise: to get an experience. After all, when we write a character recognition «MNIST classifier» neural network, we know that the problem is solved long time ago. But we need to become familiar with tools and approaches. Same here.

Now, why is it called «brainless»?

Compensation for Error Caused by Limited Gain-Bandwidth of Operational Amplifiers in Low-pass Filters

Reading time6 min
Views4.7K
Amateur vs Pro

An operational amplifier has the internal compensation circuit for stability which limits its working bandwidth. Frequency response of the compensated Op Amp has slope of −6 dB/octave or −20 dB/decade. Unity gain frequency defines the bandwidth where the Op Amp is able to amplify a signal. If we multiply the gain and frequency at any point, the result is the same, allowing us to use this parameter to select the appropriate Op Amp. It is called Gain-Bandwidth Product, GBW or GBP. The limited open-loop gain introduces a closed-loop gain and phase error.

But we want to optimize our circuits, right?
Read more →

JavaCC 21 Parser Generator

Reading time4 min
Views2.7K

JavaCC 21 is a continuation of work on the venerable JavaCC parser generator, originally developed at Sun Microsystems in the 1990’s and released under a liberal open source license in 2003. It is currently the most advanced version of JavaCC. It has many feature enhancements (with more to come soon) and also generates much more modern, readable Java code. Also, certain key bugs have finally been fixed. (N.B. The “21” in JavaCC 21 is not a version number. It is simply part of the project name and means that this is a JavaCC for the 21st century!)

Read more →

Laser that cuts inside the cornea: ReLEx procedure at the physical level

Reading time6 min
Views2K
The idea — to take and cut a lens in a transparent cornea — is not new. At first it was done manually, with a scalpel directly on the surface (difficult and very rough, with a sea of side effects). The first laser was used in 1979, then it was a pulsed infrared emitter with an effective pulse length of 4 nanoseconds.


Step 1: creating a plasma bubble, in fact — a microburst. Step 2: expansion of the shock and heat waves. Step 3: cavitation bubble (plasma expansion). Step 4: the formation of a parallel slice at the expense of several adjacent laser focus points.

Read more →

Custom instruments: When signpost is not enough

Reading time7 min
Views2.7K
In our previous article, we discussed the reasons of unit-tests’ instability and how to make them stable. Now let’s look through a new tools for debugging and profiling which were introduced by Apple in iOS 12 — the framework os_log and instrument for performance analysis os_signpost.

image

In one of the sprints, we were tasked with implementing the generation of a pdf-document on the client-side. We completed the task. But we wanted to make sure the effectiveness of the technical nuances of the decision. Signpost helped us with this. Using it we increased he document’s displaying speed several times.

To learn more about os_signpost application technology, see where it can help you and how it has already helped us, go further forward.
Read more →

Using Data Science for house hunting in Montreal

Reading time7 min
Views4.9K

Introduction


I happen to live in Montreal, in my condo on the edge of McGill Ghetto. Close to Saint Laurent Boulevard or the Maine as locals call it, with all it's attractions — bars, restaurants, night clubs, drunken students. And once upon a time, on a particular lively night, listening to the sounds of McGill frosh students drunkenly heading home after hard night of studying. I thought, that it might be a good idea to move into my own house, a little bit further away from the action.


Image

Read more →

Prettier is a Must-Have for Large-Scale Projects: Spent 20 Minutes Setting It Up and Forgot About Formatting for a Year

Reading time3 min
Views4.4K
Many dev teams get split over formatting. And their typical day looks like this: you come to work, have some coffee, write some code, everything’s fine — then bam! Code review where you’re told you put a brace in the wrong place.

image

It was an everyday reality for one of Skyeng dev teams a year ago. Then someone had enough and said, “Guys, from now on we use Prettier. Is everyone ok with that?” And then there were no more debates about formatting. We’ve installed Prettier in the frontend repo and all the teams use it.
Read more →

Lab tour: Functional Materials and Devices of Optoelectronics at ITMO University

Reading time3 min
Views1.4K
Today we’re taking a look at the Functional Materials and Devices of Optoelectronics Lab at ITMO University, the equipment it houses, and the projects underway at the facility. It is an international research facility located in the center of St. Petersburg. The staff is primarily occupied with the search for innovative materials (semiconductors, metals, and nanostructured oxides), and the manufacturing of next-gen micro- and optoelectronic gadgets. Here we take a look at the high-tech equipment it utilizes.

Read more →

Content Localization Strategies

Reading time7 min
Views1.7K


Setting up the content localization and, thus, configuring the interface language of the product in such a way that the right language is rendered to the right user is extremely important for each digital platform. That’s why we have decided to translate and share with you this expert article by Nicolai Goshin from Hellicht Medien.


And we strongly hope that some strategic points would be valuable for your localization projects!


Background and preliminary considerations


Digital projects targeting audiences in different countries or different language areas are doomed to take advantage of localization strategies. So we must answer the following question: which users should be given which content in which languages? The question at the first sight seems simple. But later in this article we will point out why this topic is, in fact, complex. And, of course, we will also address how to deal with this complexity.


Let's assume a scenario in which content (for example, an online magazine) is available in three languages: German, English, and Arabic. The goal is ideally to provide content to each user in their native language. If this is not possible, the content should be provided to the user in the language that they best understand apart from their mother tongue.

Read more →

Python in Visual Studio Code – October 2019 Release

Reading time3 min
Views3K
We are pleased to announce that the October 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about  Python support in Visual Studio Code in the documentation.  

In this release we addressed 97 issues, including native editing of Jupyter Notebooks, a button to run a Python file in the terminal, and linting and import improvements with the Python Language Server. The full list of enhancements is listed in our changelog

Read more →

Python vs JavaScript: Which One Can Benefit You The Most?

Reading time10 min
Views23K


The web development arena is moving at a fast pace and has reached an advanced stage today. Python and Javascript making some significant contributions for almost three decades. Now, being a developer or a business if you are planning to pick one of these, then it’s going to be tough just because both are too good to avoid. Hence, this brings up the topic ‘Python vs JavaScript: Which One Can Benefit You The Most?’

These two languages are supported by various trending web frameworks and libraries which are the real game-changers. The introduction of these frameworks and libraries to the web ecosystem has brought new paradigms, traditional notions, and standards of software development.
Read more →

Quintet instead of Byte — data storage and retrieval approach

Reading time13 min
Views1.8K
Quintet is a way to present atomic pieces of data indicating their role in the business area. Quintets can describe any item, while each of them contains complete information about itself and its relations to other quintets. Such description does not depend on the platform used. Its objective is to simplify the storage of data and to improve the visibility of their presentation.



We will discuss an approach to storing and processing information and share some thoughts on creating a development platform in this new paradigm. What for? To develop faster and in shorter iterations: sketch your project, make sure it is what you thought of, refine it, and then keep refining the result.

The quintet has properties: type, value, parent, and order among the peers. Thus, there are 5 components including the identifier. This is the simplest universal form to record information, a new standard that could potentially fit any programming demands. Quintets are stored in the file system of the unified structure, in a continuous homogeneous indexed bulk of data. The quintet data model — a data model that describes any data structure as a single interconnected list of basic types and terms based on them (metadata), as well as instances of objects stored according to this metadata (data).
Read more →

Python in Visual Studio Code – September 2019 Release

Reading time3 min
Views2.8K
We are pleased to announce that the September 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about  Python support in Visual Studio Code in the documentation.

This was a short release where we closed 35 issues, including improvements to the Python Language Server and to Jupyter Notebook cell debugging, as well as detection of virtual environment creation. The full list of enhancements is listed in our changelog

Read more →

Say hello to the new Visual Studio terminal

Reading time2 min
Views1.8K
Building on the momentum from the recently announced Developer PowerShell, we are excited to share the first preview of the new Visual Studio terminal. This new preview experience is part of Visual Studio version 16.3 Preview 3.


 
Rather than build everything from scratch, the Visual Studio terminal shares most of its core with the Windows Terminal. For you, that translates into a more robust terminal experience, and faster adoption of new functionality.
Read more →

A/B test is not enough

Reading time3 min
Views1.4K

A/B test is not enough


There is a common opinion that A/B test is a universal, half-automatic tool that always helps to increase conversion, loyalty and UX. However misinterpretation of results or wrong sampling leads to the loss of loyal audience and decrease of margin. Why? A/B is based on the basic assumption that this sample is homogeneous and representative, scalability of results. In reality, the audience is heterogeneous — recall the “20/80” distribution for income. Heterogeneity means that sensitivity to A/B varies significantly within the sample.
Read more →