Yes, you can play games in Emacs!

Image for post
Image for post
Photo by JESHOOTS.COM on Unsplash

Overview

Continue from my previous article where I walked through with you on setting up LSP and DAP for Emacs, in this article let’s explore gaming in Emacs for amusement and relaxation after a hard day of coding, all within Emacs.

Built-in Games

  • Command: M-x tetris
  • Instructions: C-h m

Python application for real time object detection and segmentation.

Image for post
Image for post
Photo by Cory Schadt on Unsplash

Overview

In previous article I walked through with you on using YOLOv5 for real time object detection. In this article let’s develop a Python application for real time object detection using Detectron2, which is a Facebook AI Research’s next generation software system that implements state-of-the-art object detection algorithms.

The Application

The application uses opencv-python and Detectron2 pre-trained model to capture camera images and try to detect the objects.

  • Git clone the repository.
  • Run python setup.py install
  • Install Detectron2 based on Python version and GPU availability
  • Type d2 to start the application
  • Type q to…

Managing multiple projects from Vim/Neovim.

Image for post
Image for post
Photo by Sigmund on Unsplash

Overview

Normally I work on multiple projects on a daily basis. Most projects are under a common folder and I will be switching among projects from time to time. For Emacs users, projectile makes it very easy for project management and navigation. Using projectile, I can switch projects and fuzzy find files easily. For Vim/Neovim, we also have few options available.

I will be using the dotfiles I developed in my previous article for the walk through.

Tab and Session

The default Vim way is to use tabs for multiple projects. You can create 1 tab for each project.


Debugging application written in Python, Golang, Rust and Javascript/Typescript.

Image for post
Image for post
Neovim Debugging Application

Overview

In previous article on Neovim LSP and DAP, I setup DAP using nvim-dap. In this article, let’s set up debugger for Python, Golang, Rust and Javascript/Typescript using vimspector.

Setup

I am going to leverage the dotfiles I configured in my previous article.

Inlua/plugins.lua, add the following line to install vimspector. You can use whatever plugin manager that you prefer.

-- Debugging
use { 'puremourning/vimspector' }

Run :luafile % and :PackerInstall to install the plugin.

Adapter Installation

Create a file called vimspector.vim under the plugin folder with the following content.

let g:vimspector_enable_mappings = 'HUMAN'nmap…

Application to transform camera photo into cartoon image.

Image for post
Image for post
Cartoon Camera

Overview

In previous articles I developed a web based object detection system using YOLO and a text recognition application using Tesseract. In this article let’s build a fun cartoon camera which transforms camera photo into cartoon image.

The Application

The is a web based application built using React and FastAPI. The frontend application uses the web camera to capture photo and send to the backend through web socket. The backend application transforms it into a cartoon image, and sends the cartoon image back to the web application.

There are different styles that you can apply…


LSP and DAP for Python, Golang, Rust and Typescript/Javascript.

Image for post
Image for post
Emacs LSP and DAP

Overview

In previous article I developed a configuration for Emacs beginner. In this article let’s continue to set up LSP (Language Server Protocol) and DAP (Debug Adapter Protocol). Particularly the languages that I will focus on are Python, Golang, Rust and Typescript.

Language Servers Installation

I am going to use the same language servers in my earlier article on setting up Neovim LSP using Lua.

Python

For Python, let’s install pyright.

$ npm install -g pyright

For Golang, let’s install gopls.

$ GO111MODULE=on go get golang.org/x/tools/gopls@latest

For Rust, let’s use rust_analyzer. The easiest way to install…


LSP and DAP for Python, Golang, Rust, and Typescript/Javascript.

Image for post
Image for post
Neovim IDE with LSP and DAP

Overview

In my previous article I walked through with you on how to convert existing .vimrc to a Lua based configuration and set up LSP for Lua.

In this article let’s add LSP and DAP support. Particularly I will focus on Python, Typescript, Golang and Rust.

Installation of Language Servers

Let’s get started by installing the language server.

If you are using coc.nvim, normally the language server is installed automatically for you. For Neovim LSP, there are available plugins to automate this process. Here I will go through the manual installation steps.

Python

For Python, let’s install…


Image for post
Image for post
Photo by Markus Spiske on Unsplash

Overview

In previous article I walked through with you on how to build a real time object detection system using YOLOv5. In this article let’s build a web based text recognition system using Tesseract OCR, which is an open source optical character recognition engine for various operating systems.

Tesseract

I am going to use Tesseract version 4.1. The default installed language is English but you can install for other supported languages as well. The installation differs for each operating system and you can refer to the documentation.


Image for post
Image for post
Emacs for Beginner

Overview

In my previous article I documented a very brief tutorial of Emacs Lisp. In this article let’s continue to create an Emacs configuration for beginner.

Introduction

Emacs is more than just a text/code editor (LSP, DAP). It is an extensible computing environment which can be used as email client (mu4e), window manager (exwm), editing remote files (tramp) and much more. With org-mode, you can use Emacs for keeping notes, maintaining to-do lists, planning projects, authoring documents, computational notebooks, literate programming (Babel) and more.

Unlike VSCode which is easy to get started, Emacs requires customization using elisp in order to be useful…


Image for post
Image for post
Photo by Paul Skorupskas on Unsplash

Overview

You Only Look Once (YOLO) is a state-of-the-art, real-time object detection system. In my previous articles, I walked through with you on how to serve DCGAN, PCGAN, ResNext, and DeepLabV3 models on different platforms. In this article, let’s see how to serve YOLOv5 using FastAPI WebSocket as backend, and React as front-end.

Introduction

For the frontend application, I use React to control and capture image from the camera. The captured image is sent through websocket to the FastAPI backend, get processed using YOLOv5 model and then the predictions and processed image are sent back to the frontend.

In below screenshot, YOLOv5…

alpha2phi

Programmer and occasional blogger.

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