Adding GitHub Actions to your Django project while eating potato chips.

Introduction

In nowadays, when we develop a web application, we usually apply CI (Continuous Integration) and CD (Continuous Deployment) to automate the processes of testing and deployment.

To run such automation, we use Jenkins [¹] and Travis [²] in the old days. However, in this decade, there are lots of tool popping up for our needs, and one of them is GitHub Actions. As a web developer and GitHub lovers, I would like to use GitHub Actions for not only can be easily integrated with GitHub projects but also show off my ability to customize GitHub Actions [³] for my needs…


Create your VTuber system with just CPU and webcam!

In this article, I am going to present a Virtual YouTuber (VTuber) system just using an ordinary CPU and webcam written in C++. I will also talk about the phenomenon of VTuber and some basics of gaze tracking. At last, I will leave some personal thoughts after working on this system.

Introduction of VTuber

VTuber means a person streaming or uploading to YouTube with an anime avatar following his movement in real-time. [¹] Though VTuber originated in mid-2010 in Japan, it started to boom from the beginning of 2020 with the help of COVID-19 and the push of some commercial companies such as…


Co-performance with human that generates violin music automatically.

In this post, A Human-Computer Duet System for Music Performance [1], by Academia Sinica, is reviewed. In this paper:

  • A virtual violinist is created who can perform chamber music with a human pianist that does not need any intervention.
  • The proposed system has performed in a public concert.
  • Discussions of effective improvement of the system is presented.

This work is supported by the Automatic Music Concert Animation (AMCA) project of the Institute.

Outline

Illustration of the automatic concert animation system.
  1. Proposed Virtual Musician System
  2. Real-time Music Tracking
  3. Automatic Animation
  4. Discussion

1. Proposed Virtual Musician System


Photo by Bill Oxford on Unsplash

Introduction

sudo is a commonly used linux command which grants a command with root permission temporarily. However, as its code is bloated and complicated settings, it usually happens of misconfiguration, not mention to commonly reports about vulnerabilities including the latest one [1].

Alternatives of sudo

As a consequence, there are many alternatives of sudo not only to avoid security vulnerabilities but also configuration in simplicity.

doas

On famous substitution is doas. Originated from freeBSD, doas aims to provide a light-weighted package and less complex setting for grant root permission [2].

If you want to try doas, you can install it either with your distro's package…


Using a token not only fit GitHub but also the future trend.

Photo by Markus Winkler on Unsplash

Introduction

On Dec. 15, 2020, GitHub released a post talking about they won’t accept account passwords for authenticating Git operations on GitHub after Aug. 13, 2021. [1] As a consequences, GitHub provides the following two methods for authentication:

  1. A personal access token over HTTPS.
  2. SSH key over SSH.

As a person prefer using HTTPS (I switch working computer frequently, for instance, I use one computer at my workspace, and use another computer at home). What’s more GitHub recommends HTTPS method because of these reasons:

  1. SSH key, when being stolen, will cause a huge problem. Not only replacing it is cumbersome, but…

A showcase of Gunicorn async workers with clear example.

Photo by Dominik Bednarz on Unsplash

Scenario

Recently, I have been working on a project using Django as an API server, and there is one special API which generates a file with arbitrary generating time and size. When calling this API, I always got a 502 error. In the beginning, I thought it might be the problem of timeout setting, so I changed the timeout settings of both Django and Apache (using as reverse proxy) to 300 seconds. However, I still received 502 error.

Then I started to investigate the cause and realized the meaning of worker setting of Gunicorn. After I altered the worker type from…


It is always hack-able with a twist.

TL;DR

  • If you have to work on MySQL with version lower than 5.6, you can change DATETIME(6), which is default when using DateTimeField() in Django ORM, intoDATETIME, with the following two lines:
  • Drawback: not able to record datetime to milliseconds.

The Way I Solve the Problem

So here’s the plot, I was dedicating myself on a Django 3.x project recently. The database of this project is MySQL 5.1 due to historical reason. Every time when I tried to run migration, I always receive the following error on Django built-in tables:

Therefore, I read the Django document about supporting database, and I got a frustrating message [1]:


The fastest superpixel segmentation now comes to Julia.

Motivation

Image segmentation plays a great role in order to realize which objects construct an image. In order to reach this goal, people have invented a lot of strategies — one of which is superpixel.

SLIC is a well-known algorithm that runs in linear time complexity and has been implemented in various image processing libraries including OpenCV and scikit-image. However, JulaImages has not implemented SLIC yet, though this Julia image processing package contains Felzenswalb and quick shift. Therefore, I want to implement SLIC in Julia to let me familiar with SLIC algorithm but also Julia.

Image segmentation

Image segmentation is a process to…


Streamlit your project and run it in browser!

Visit part 2 and part 3 by clicking them.

Click this to pass through paywall.

TL;DR You can get the example project here.

Demo on my local computer.

Motivation

As time passes, you have done a lot of machine learning projects, but you need a visualization or other guys won’t know the procedure and result of your project. What’s worse, some people think that you are not prepared because you cannot use Docker and PaaS deployment (many of the machine learning jobs in Taiwan need frontend or backend skills).

Therefore, I write this series to not only create a web-based app, but also show basic Docker…


A Docker a day keeps your boss away.

Visit part 1 and part 3 by clicking them.

Use this friend link to spread this post with unlimited access.

TL;DR You can get the example project here.

Docker your app and say goodbye to environment setting time!

Motivation

So you finally finish your machine learning project with streamlit for presentation, but you fell tedious that you have to create a virtual environment every time on a new computer. What’s worse, sometimes your virtual environment breaks because you are using different OS.

Hopefully, we can use Docker to ease the problems of setting up and deploying environments, and you create a microservice which is suitable for scaling.

Goal of This part

For this part, I…

Lu-Hsuan Chen

Enthusiastic of image processing, machine learning, and parallel computing. Current status: beggar on the street.

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