Background image by Ian Dooley

So, with this article I want to do three things:

  1. Provide you with an interactive content-aware resizer so that you could play around with resizing your own images
  2. Explain the idea behind the Seam Carving algorithm
  3. Explain the dynamic programming approach to implement the algorithm (we’ll be using TypeScript for it)

Content-aware image resizing

Content-aware image resizing might be applied when it comes to changing the image proportions (i.e. reducing the width while keeping the height) and when losing some parts of the image is not desirable. Doing the straightforward image scaling in this case would distort the objects in it. …


Image source: https://newnow.co/me-myself-and-i/

This article has interactive version. You may open it to play around with the device orientation right from your mobile device.

Accessing device orientation in pure JavaScript

In Javascript, you may access your device orientation data by listening to the deviceorientation event. It is as easy as the following:

window.addEventListener('deviceorientation', handleOrientation);

function handleOrientation(event) {
const alpha = event.alpha;
const beta = event.beta;
const gamma = event.gamma;
// Do stuff...
}

Here is the meaning of the alpha, beta and gama angles:


2020 is coming to its end, and we may do another snapshot of 33 most starred open-sourced JavaScript repositories on GitHub as of December 10th, 2020.

You may compare it to the snapshot from 2018. You may also query the GitHub to fetch the latest results.

#1 freeCodeCamp/freeCodeCamp

freeCodeCamp.org’s open-source codebase and curriculum. Learn to code at home.
★ 317k

#2 vuejs/vue

Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
★ 176k

#3 facebook/react

A declarative, efficient, and flexible JavaScript library for building user interfaces.
★ 160k

#4 twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first projects on…


Image by Author

📃 TL;DR

In this article we will start solving the issue of making the printed links (i.e. in a book or in a magazine) clickable via your smartphone camera.

We will use TensorFlow 2 Object Detection API to train a custom object detector model to find positions and bounding boxes of the sub-strings like https:// in the text image (i.e. in smartphone camera stream).

The text of each link (right continuation of https:// bounding box) will be recognized by using Tesseract library. …


Photo by home_full_of_recipes (Instagram channel)

TL;DR

I’ve trained a character-level LSTM (Long short-term memory) RNN (Recurrent Neural Network) on ~100k recipes dataset using TensorFlow, and it suggested me to cook “Cream Soda with Onions”, “Puff Pastry Strawberry Soup”, “Zucchini flavor Tea” and “Salmon Mousse of Beef and Stilton Salad with Jalapenos”.

Here you may find more examples of what I ended up with:


Here’s a recipe for how you can ruin your happiness and start feeling miserable using social media:

  1. Stop all attempts to figure out who you are, what your purpose is and what your identity is.
  2. Start comparing yourself to others by scrolling social media feeds as often as possible and as much as possible.
  3. While doing that start thinking that people have it all (while they are not).
  4. Pay attention to their triumphs and victories only (they won’t show you their trials, hardships and cost they paid anyway).

Here you are! You don’t know who you are and thoughts of everybody having everything and you just having something doesn’t leave your head. Where are you happiness?! 🧐


TL;DR

Hey readers!

I’ve open-sourced new 🤖 Interactive Machine Learning Experiments project on GitHub. Each experiment consists of 🏋️ Jupyter/Colab notebook (to see how a model was trained) and 🎨 demo page (to see a model in action right in your browser).

Although the models may be a little dumb (remember, these are just experiments, not a production ready code), they will try to do their best to:

  • 🖌 Recognize digits or sketches you draw in your browser
  • 📸 Detect and recognize the objects you’ll show to your camera
  • 🌅 Classify your uploaded image
  • 📝 Write a Shakespeare poem with you


I’ve recently open-sourced a new 📈 Coronavirus (COVID-19) Dashboard which shows the dynamics (the curvature of the graph) of Сoronavirus distribution per country.

Reasoning

The reason for creating a new dashboard was to complement the well-known JHU Dashboard (which is made by Johns Hopkins CSSE) with the feature of seeing the charts with the number of COVID-19 confirmed / recovered/ deaths use-cases per country.

Basically I personally had a question like: “What about the Netherlands/Ukraine?”, “Is the virus spread (growth factor) slowing down?”, “How I can compare the recovered/deaths dynamics per-country?”,


This a list of state-of-the-art shitcode principles your project should follow.

💩 Full version of the list on GitHub

Get Your Badge

If your repository follows the state-of-the-art shitcode principles you may use the following “state-of-the-art shitcode” badge:


7 simple JavaScript functions that will give you a feeling of how machines can actually “learn”.

Image by mohamed_hassan on pixabay

TL;DR

NanoNeuron is an over-simplified version of a Neuron concept from the Neural Networks. NanoNeuron is trained to convert a temperature value from Celsius to Fahrenheit.

NanoNeuron.js code example contains 7 simple JavaScript functions (model prediction, cost calculation, forward and backwards propagation, training) that will give you a feeling of how machines can actually “learn”. No 3rd-party libraries, no external data-sets and dependencies, only pure and simple JavaScript functions.

☝🏻These functions by any means are NOT a complete guide to machine learning. A lot of…

Oleksii Trekhleb

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store