All Articles

Pytorch cuda tries to allocate memory but it is not available

If you see an error similar to this one:

RuntimeError: CUDA out of memory. Tried to allocate 11.88 MiB (GPU 4; 15.75 GiB total capacity; 10.50 GiB already allocated; 1.88 MiB free; 3.03 GiB cached)

then, try reducing the batch size.

    train_loader = DataLoader(
        train_dataset,
        shuffle=False,
        pin_memory=False,
        batch_size=2, # was: 16
        num_workers=12,
    )

Canon Digital Photo Professional - free download

One of the pieces of software that I enjoy using very much is the Canon Digital Photo Professional. I originally got it a loooong time ago, back when I was taking photography classes. It came with one of the Canon cameras that I've bought over the years. At the time I used it to browse and sort my pictures, sure - and only years later I realized just how valuable and useful this piece of software is.

A recommendation to rename "criticality" -> "priority"

Just throwing two cents here - if the pandemic taught us 10 things, one of those ten gotta be that small details in communication matter very much. With that, I recommend renaming the word "criticality" -> "priority". The reasoning is as follows. And be careful with the red color in the smart sheet too, please, for the same reason. 

An example of a bug report and the technical conversation around it to resolve it

I recently had to justify the amount of effort that software development takes. Someone unfamiliar with the process thought that software development is easy, or that it doesnt take much time. They thought, for example, that an advanced reporting app can get pdf export capability if they just said to the development team, "implement pdf export." Literally, they thought that writing a single line of text like that in a specification document would result in the organization gaining that functionality. 

Пример отчета об ошибке и технического обсуждения для ее решения

Недавно мне пришлось обосновать объем усилий, которые требуются для разработки программного обеспечения. Кто-то, незнакомый с процессом, думал, что разработка программного обеспечения проста или что она не занимает много времени. Например, они думали, что расширенное приложение для создания отчетов может получить возможность экспорта в PDF, если просто сказать команде разработчиков: «Внедрите экспорт в PDF». Буквально, они думали, что написание одной строки текста в документе спецификации приведет к тому, что организация получит эту функциональность.

Encryption (on linux and mac)

What I'm using is encfs. The advantage is that it's portable: just a folder. The disadvantage, I think, is that it is slow. I would actually prefer an encrypted partition.

Some choices of encrypted partitions are:

A directory of SMTP sending services

Due to an unexpected service interruption, I've recently had to evaluate numerous options for SMTP services, to replace a one that was showing signs of performance degradation. The AWS SES is an obvious choice, but what if it is not available, or your organization requires diversifying to other providers? Below is a quick list of contenders that I have compiled, with my comments on each. 

Drupal 9: How to make the /user/register form available in a twig template

Q: When comments in a (content type) Article are enabled, for an anonymous user Drupal 9.5 shows a text with links, "please regiter or login to post a comment". I would like the login form to be rendered there already, so that the user can login without leaving the article. For this, I would like to make the /user/register form available inside a twig template. How would I do that?

A: Install Twig Tweak (reference) and try this:

Testing async code with Jest

After a little bit of struggle, I have managed to implement a jest that correctly tests an async fetch call. That is, suppose clicking a button initiates a POST request, and upon success some action takes place or some message gets displayed. I needed a test to assert that the action indeed took place.

My component looks as follows:

How to import and export users to keycloak

First, I recommend setting up a backup. This way, exporting and importing users is done via backup. You would not need to recreate the realm: you can do a partial import of users into an existing realm.

My keycloak is setup with backups via docker:

A review of some on-prem software services

I recently came by this picture at r/selfhosted and thought it useful for reviewing which services I use, and more importantly, which services I am missing.

The original post said that he hosted all of these on a single raspberry pi. Regardless of whether that is the case for you, or for me, I think reviewing which services are running, would be useful.

Structure of Information (SoIII)

This article will outline how I deal with managing my own data, tasks, hardware, people, etc. This is the latest of many versions - continuous iteration across many revisions has been done!

A list of one-click deployment providers

As Wasya Co offers one-click deployments of several applications and stacks, it makes sense for us to track our competitors. Nothing is new under the sun, and turn-key web applications (appliances) have existed for quite some time. There are many, many solutions for deploying infrastructure as a service (IaaS, SaaS). Multiple industries support the general Installation & Provisioning specialization. Of note, Docker, which we use extensively in-house, provides "one-click" deployments at scale, and more.