Image for post
Image for post

wow. worst title of any thing I’ve ever written

If, on Python, you need the precious vectors of embeddings from fastText but cannot load the model via fasttext.load_model() method, You can use gensim library to load the fastText embeddings. (pytorch is not necessary, even though used in the example)

Image for post
Image for post
lovely color scheme

I can tell you that the code snippet will be shorter than the title ….

Recently I needed to run a daemon , for every user in the product , just after every midnight. The problem is , every user has their own time zones and their own midnight moments. Turns out that , calculating , or mostly figuring out which time zones just passed their midnight moment , or simply moved to the next day , at a given moment, is pretty complicated and mind boggling. …

Image for post
Image for post

Creating backups and restoring them via mongodump and mongorestore binaries is pretty easy and straightforward . But what If you need to do so programmatically, simultaneously, for hundreds of times every hour, for creating different views or partitions of that DB? You should be doing some coding and the ProcessBuilder API in Java8 is your friend!

You can use mongodump and mongorestore from within your Java code by using ProcessBuilder to make system calls conveniently , and easily reading the standard and error outputs. ProcessBuilder actually helps us with creating and managing a process, with many customization options available.

Below…

After creating the data set for the PES2021 game and having the PES2020 data in my hands already , I’ve decided to calculate the euclidean distances between the old and the new versions of each player, and see who changed much , or stayed the same. There are some interesting results , as expected.

Biggest Losers

Image for post
Image for post
Kevin Mirallas — a fall that can be compared to Freddy Adu

Some players take a huge hit to their profile and standing. I’ll list some of the biggest losers , but also some of losers of importance , like Sokratis . …

After creating the data set for the PES2021 game and having the PES2020 data in my hands already , I’ve decided to calculate the euclidean distances between the old and the new versions of each player, and see who changed much , or stayed the same. There are some interesting results , as expected.

Biggest Winners

Some players , mostly not big stars, are the ones that make huge changes in their profile and overall ratings. I’ll be listing some interesting catches

Kristiyan Malinov (58 to 72)

Image for post
Image for post

Being a Free Agent previously, Kristiyan fella made a transfer to Belgium side OH Leuven this August. There’s a huge…

Almost 4–5 months ago, I decided to do some coding for better Scout utilization on PES2020 and I saw that there was no data set to begin with. So, I web-scaped some and uploaded the data set on here on kaggle. After only a few days , some good fellow created a notebook on kaggle, using my dataset for some visualizations. It was really a nice surprise , even though the visualizations were pretty generic and didn’t provide any insight or whatsoever.

I’ve created a new notebook and new visualizations, filtering out the players from the leagues other than English…

Image for post
Image for post

Does one care for yet another key-value store ? not really. Fortunately, Apache Ignite is a lot more than that. It’s an “In-Memory Computing Platform … horizontally scalable, fault-tolerant, distributed… for building real-time applications that can process terabytes of data with in-memory speed”. But I’ll be using it just as a key-value store , nonetheless.

Why ?

With a baseline topology of 2 server nodes, you can turn one off and on , for maintenance , while the other one is keeping the whole cluster operational for fully replicated caches.

Nodes & Caches

Apache Ignite has 2 types of nodes : Server nodes and Client…

Image for post
Image for post
MongoDB and a 16$ Metal Bucket for kids

In some cases, using the driver or SDK of some system is a lot harder and confusing than interacting with that system directly. In my experience, the Java drivers of MongoDB provide such case.

Using the Java Driver , you might feel at a loss while trying to make something simple work, something that you already can easily do on the console. Even though the aggregation pipeline is really such a torture to code on the console , the Java Driver might set you back a little as well. Mostly because it’s not structured intuitive enough.

New in version 3.4…

Image for post
Image for post
json logic logo from jsonlogic.om

Have you ever tried to implement some sort of data structure for storing or transferring a set of rules ? It is usually what happens when you’re asked to create some sort of interface for the user to create queries or such directives with drag&drop ing or simply selecting from appropriate options. A decade ago , it wasn’t considered so impractical to build such tools from scratch , just to wait for the user to deem them useless and throw them away.

Most popular and familiar ones must be the SQL query builders and “detailed filter query” builders for about…

Image for post
Image for post

So, with some encouraging from a friend , after a rough-edge system requirements calculations, and some curiosity, I decided to add scaling capacity to the code base , using multiple browser windows. You can find the new modules , and the old ones here on GITHUB , and part-1 here.

I added 2 new modules , parallel-starter and parallel-analyzer .

parallel-starter , is taking the same old output of get-urls module as input , and splitting it to a number of input files , depending on the CONCURRENCY_LEVEL set. And later , using the threading module on python , starting…

kommradHomer

proud seeder of 146.5GB The.Lord.of.the.Rings.Trilogy.1080p.Extended.Complete.Bluray.DTS-HD-6.1.x264-Grym

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