[ml] Visualizing K-Means Clustering

January 22, 2017 Leave a comment

Here is a very nice visualization tool for k-means clustering: https://www.naftaliharris.com/blog/visualizing-k-means-clustering/ .

k-means clustering

k-means clustering

Jerly: A Java implementation of Earley’s efficient parsing algorithm

January 22, 2017 Leave a comment

I found an old project of mine called Jerly. I wrote it in 2004-2005. I tried it in 2017 and it still works fine :) You can find it on GitHub.

Jerly is a Java implementation of Earley’s efficient parsing algorithm for lambda-free context-free grammars. To put it in a nutshell, it tells you if a word can be generated with a set of rules or not.

Categories: java Tags: , , ,

[math] Why is regression called “regression”?

January 19, 2017 Leave a comment

Have you ever wondered why regression is called “regression”? It makes no sense. Why is it not “line fitting” for instance?

Here is a nice read that explains why it’s called “regression”.

Categories: math Tags: ,

[manjaro] Python was updated to 3.6

January 19, 2017 Leave a comment

Under Manjaro, Python 3.5 was updated to version 3.6. This is a big change, so check out the release notes, you might have to do some manual changes.

Categories: manjaro Tags: ,

grab a Twitch video in mp3

January 17, 2017 Leave a comment

Problem
You want to grab a Twitch video in mp3. For instance, you want to listen to it offline.

Solution
You need two programs for it: youtube-dl and ffmpeg. Let’s take a concrete example:

$ youtube-dl -g "https://www.twitch.tv/wearethevr/v/115335579"
https://vod067-ttvnw.akamaized.net/v1/AUTH_system/vods_c631/wearethevr_24261824064_585034506/chunked/index-dvr.m3u8
$ ffmpeg -i "https://vod067-ttvnw.akamaized.net/v1/AUTH_system/vods_c631/wearethevr_24261824064_585034506/chunked/index-dvr.m3u8" -f mp3 out.mp3

Where https://www.twitch.tv/wearethevr/v/115335579 is the URL of this particular Twitch video.

I wrote a script for it to automate the whole process: twitch2mp3.

Categories: bash, python Tags: , ,

cleaning a laser mouse

January 12, 2017 2 comments

Problem
I have a laser mouse that worked very well. However, about a week ago the cursor started to move erratically. It was not moving smoothly.

Solution
The optical eye is dirty and needs some cleaning. Put a little alcohol (I used pálinka) on the tip of a Q-tip, and clean the optical eye gently. It solved the issue for me.

Here is a video of the cleaning process. The relevant part starts at 2:25.

[manjaro] install new fonts

January 2, 2017 Leave a comment

Problem
Under Manjaro I wanted to install new fonts. I needed a font pack; I didn’t want to bother with individual fonts.

Solution
At https://wiki.archlinux.org/index.php/fonts#TrueType I found some packages:

  • ttf-ms-fonts
  • ttf-google-fonts-git
  • ttf-bitstream-vera
  • ttf-vista-fonts
  • ttf-hack

The Google font kit contains hundreds of fonts.

Gimp
If you type a text in Gimp and you want to see the text with different fonts, i.e. you want to browse the fonts, here is how to do it.

Move the mouse above the font selector button (between “Font:” and “Sans” on the screenshot) and use the mouse wheel. That’s the trick.

Categories: manjaro Tags: ,