2022 YEAR IN REVIEW

Слава Україні! Support our Ukrainian friends.. It’s been a long year and only now do I realize how much has changed in just 363 days (it’s Dec 29, ok?). Here’s a list of the things I’ve learned (or was reminded of), in no particular order. Some are accompanied with links to the books I’ve read that touch on that topic; I recommend all of them to a varying degree. People and presentation skills Ask for the things you want.

Read more

J2ME

Come to think about it, quite a few personal projects I’ve worked on over the years came about because I felt I needed to go against the grain in terms of conditions or expectations. In this particular case, I started working on J2ME because a certain university professor said you can do this project with any mobile technology, which led to a conversation along the lines of: Me: So I can go with any mobile technology I want, correct?

Read more

MONEYPRINTER().GO() => BRRR

Слава Україні! Support our Ukrainian friends.. As you may or may not have realized by now, I am an avid memer. Recently one of my favourites is the Money Printer Go Brrr meme that’s so well-fitting given the current state of affairs. I also came across a modification that I’ve enjoyed even more: Thus, the moneyprintergobrr pip package was born. Installation: pip install moneyprintergobrr Usage: from moneyprinter.moneyprinter import MoneyPrinter MoneyPrinter().go() ## prints out 'brrr' Actual usage:

Read more

FLASK + TESSERACT IN A DOCKER CONTAINER

Слава Україні! Support our Ukrainian friends.. Imagine you have a Flask app with some sort of a model that depends on Tesseract and you want to Dockerize it (because why not?) …but then it turns out you also have to have Leptonica installed first, …but it doesn’t want to work off apt, so you decide to build it from source, …but then it turns out that the Leptonica’s docs are not up to date but you somehow manage to make it work,

Read more

READABILITY, REVISITED

Слава Україні! Support our Ukrainian friends.. A long, long time ago (to be exact – in February 2018) I prepared a Shiny app to explore the books of the most popular Project Gutenberg authors. The original app is still available (and bugged) via ShinyApps, and was inspired by this article. I first decided to port the unique words plot from Python to R, then utilised some readability scripts I’d written earlier, and all of a sudden it was all nice and Shiny.

Read more

REMOVING CIRCLES, LINES, AND OTHER PATTERNS WITH OPENCV AND PYTHON, PART 2

Слава Україні! Support our Ukrainian friends.. It took me a while to come up with an (at least) semi-effective method of removing the text pattern. While the thicker outlines can be disposed of pretty easily (click, click), developing a method which wouldn’t harm the text too much turned out to be much more challenging. import matplotlib.pyplot as plt import numpy as np import cv2 %matplotlib inline # a little helper function to display our image in a bigger plot def display_img(image): fig = plt.

Read more

REMOVING CIRCLES, LINES, AND OTHER PATTERNS WITH OPENCV AND PYTHON, PART 1 & 1/2

Слава Україні! Support our Ukrainian friends.. Why 1.5? Because I’m not addressing the issue of the overlay text and instead present a small improvement on removing the thick outlines. import matplotlib.pyplot as plt import numpy as np import cv2 %matplotlib inline # a little helper function to display our image in a bigger plot def display_img(image): fig = plt.figure(figsize=(20,16)) ax = fig.add_subplot(111) ax.imshow(image, cmap="gray") img = cv2.imread('obfuscated.jpg', 0) #read in as a grayscale image display_img(img) Note that in the previous post I found out that a naive removal method and the Hough transform worked better than the Suzuki algorithm for contour location.

Read more

REMOVING CIRCLES, LINES, AND OTHER PATTERNS WITH OPENCV AND PYTHON, PART 1

Слава Україні! Support our Ukrainian friends.. As an exercise in Python and OpenCV I wanted to try removing some obfuscating patterns from a PDF file. This could potentially come in handy if, as a university student, I had access to some lecture files with obfuscation patterns, and I wanted to save up on the ink while printing them out ;) The PDF file was generated using LaTeX. This post on TeX Stack Exchange was of much help.

Read more

SETTING UP SHARED FOLDERS IN VIRTUALBOX ON WINDOWS, OR ALL THE ISSUES YOU CAN RUN INTO IN A SINGLE AFTERNOON

Слава Україні! Support our Ukrainian friends.. A little background This year for Rails Girls Poznan we wanted to have VirtualBox-ready images that would (a) be lightweight enough (both size- and resources-wise) for non-developer computers, (b) be user-friendly (so if someone wanted to do something on their machine, they wouldn’t feel completely lost, i.e. we needed an OS with a GUI), (c) most importantly, include the latest Ruby and Rails as well as other useful gimmicks (image magick etc), (d) support shared folders.

Read more