Build a web page scraping and testing service using GraphQL and Playwright.
In my previous article, I walked through with you on developing serverless APIs to test web pages under different resolutions using Puppeteer
. In this article let’s use Playwright
, which is a similar library to perform web browser automation.
Playwright
is a library available in Node.js, Python, and Java to automate Chromium
, Firefox
, and WebKit
with a single API. It is built to enable cross-browser web automation that is ever-green, capable, reliable, and fast.
Let’s install Playwright
and browser binaries for Chromium
, Firefox
, and WebKit
. Playwright
requires Python 3.7+.
…
Use Flask AppBuilder to develop CRUD REST APIs.
For Python, when it comes to API development, we have an abundance of choices. Popular ones are Django, Flask, and FastAPI, to name a few.
In this article, let’s use Flask to build RESTful APIs to create, read, update and delete (CRUD) records in a database table. Specifically, I will use Flask + Flask AppBuilder to build the APIs in 5 minutes.
Let’s install the flask-appbuilder
library. I also installpython-dotenv
in order to use a .env
file as my configuration file.
$ pip install flask-appbuilder python-dotenv
Using Vim/Neovim to manage your notes and to-do list.
Comparing to Vim/Neovim, one of the great features of Emacs is Org Mode. Org Mode is for keeping notes, maintaining to-do lists, planning projects, authoring documents, computational notebooks, literate programming, and more — in a fast and effective plain-text system.
In this article let’s go through the available options for Vim/Neovim for taking notes and managing to-do lists.
This is one of the most popular options we have for Vim/Neovim. Combining this withglow.nvim
which I mentioned in my previous article makes writing a Markdown document extremely easy.
With VimWiki
, you can:
New Neovim plugins to improve development workflow and productivity.
In previous articles, I talked about Vim/Neovim plugins to help you code faster, and some of the niche Neovim plugins. In this article let’s go through new Neovim plugins that can improve your development workflow and productivity.
As a developer, we normally need to write documentation in Markdown.
glow.nvim uses glow to directly render Markdown in Neovim buffer. Compared to other plugins which leverage browser, this plugin is definitely more convenient.
Text to image using Jupyter Notebook on Google Colab.
In one of my articles, I went through code examples on image classification using CLIP and ResNext. In this article let’s go through a few algorithms and libraries which can be used to generate an image from text.
This library uses OpenAI’s CLIP and the generator from a BigGAN to generate images from text.
And this is the image generated for the phrase “flying cartoon elephant”.
Managing project-specific settings for Vim/Neovim projects.
I talked about managing multiple databases and projects in my previous articles. On some occasions, you may have a need to manage multiple projects with configurations only specific to the projects.
In this article, let’s explore the available options we have in Vim/Neovim. I will start with the simplest solution and then move on to explore plugins we can use.
If you set the exrc
option in your .vimrc
or init.vim
file, Vim/Neovim will execute .exrc
(for both Vim/Neovim), .vimrc
(Vim), .nvimrc
(Neovim) found in the current directory when Vim/Neovim is started.
set exrc
…
Additional features to enhance your LSP experience in Neovim.
In the previous article, I walked through with you how to set up LSP and DAP in Neovim. In this article let’s enhance the LSP experience in Neovim by configuring and setting up additional features.
Just like the previous article, let’s get started by installing the language servers.
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.
For Python, let’s install pyright
.
$ npm install -g…
Managing databases and run SQL statements, all within Vim/Neovim.
In my previous article, I walked through with you how to manage multiple projects within Vim/Neovim. In this article let’s extend this to see how to manage multiple databases.
I am going to use PostgreSQL and MySQL as examples. For this to work, on the client machine you will need to install the database clients.
Yes, you can play games in Emacs!
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.
M-x tetris
C-h m
Python application for real time object detection and segmentation.
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 uses opencv-python and Detectron2 pre-trained model to capture camera images and try to detect the objects.
python setup.py install
d2
to start the applicationq
to…Programmer and occasional blogger.