Aditya Chatterjee's Blog, page 102

March 24, 2022

Splitting VIM windows

VIM is a powerful, lightweight open-source text editor. In this article, we learn how to split VIM screens, switch between them, change sizes and close them.

Table of contents.Introduction.Splitting vim vertically.Splitting vim horizontally.Switching between windows.Closing windows.Changing window sizes.Closing windows.Summary.References.Introduction.

VIM is a powerful lightweight text editor that comes pre-installed in Linux systems. We can use it to edit simple files or even manage...

 •  0 comments  •  flag
Share on Twitter
Published on March 24, 2022 11:14

March 23, 2022

source command in Linux

The source command reads and executes the contents of a file in the current shell environment. In this article, we learn about this command through various examples.

Table of contents.Introduction.Syntax.Command usage.Summary.References.Introduction.

We use the source command in Linux to read and execute the contents of a file which we pass as an argument in the current shell environment. In other words, it reads a file and executes its contents as commands in the terminal.

Syntax.

We wr...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 11:47

Open multiple files with Vim

VIM is one of the many Linux text editors. It is configurable and programmable. Usually, we open a single file with VIM. In this article, we demonstrate how to open multiple files in a single VIM session.

Table of contents.Introduction.Opening multiple files.Switching files.Managing buffers.Saving changes.Quitting VIM.VIM tabs.Copying files.Summary.References.Opening multiple files.

A basic example, is the following, to open two files, file1.txt and file2.txt we write:

vim file1.txt...
 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 11:40

Octal to Binary Conversion

In this article, we have presented a method to convert Octal numbers into their Binary equivalents along with Java implementation.

Table of Contents:Introduction to Octal and Binary numbersOctal to Binary conversionCode ImplementationMCQs on Number conversionsIntroduction

The letters or characters typed by a human on a computer is transmitted in the form of numbers to the computer. A computer is capable of understanding only the positional number system that is in the form of symbols and ...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 02:28

Fixed Radius Near Neighbor Problem

Table of ContentsIntoductionApproachesBrute ForceCell ListsK-D TreesComparisonOveriewIntroduction

In this article, we will be tackling the fixed radius nearest neighbor problem, this is a variation on a nearest neighbor search. Generally, we can state the problem as such: Given an input set of points in d-dimensional Euclidean space and a fixed distance Δ. Design a data structure that given a query point q, find the points of the data structure that are within distance Δ to point q.

Th...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 02:22

Point on a line with minimum sum distance from set of points

Table of ContentsIntroductionAlgorithmImplementationOverviewIntroduction

In this article, we will be discussing how to find the geometric median, this is, the point on a line with the minimum sum distance from a set of points. We may assume that this is essentially asking us to find the geometric midpoint since the sum distances from the center point should automatically be at minima, however this is not always the case.

Take this as an example, for the set of points (0,0), (0,0), (0,12),...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 02:17

Python Script to Send WhatsApp Message

In this article, we have developed Python Script to Send WhatsApp Message using two approaches: one Whatsapp library and by using Selenium Web Driver.

Table of contents:

Approach 1: PyWhatKitApproach 2: SeleniumApproach 1: PyWhatKit

A simple way to send a WhatsApp message is to use the PyWhatKit. This is a Python library that can send messages through the WhatsApp web client. The IDE used in this project is Visual Studio Code, but feel free to use any IDE with Python support.

In order to use...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 02:03

Python script to create GitHub issues

In this article, we have developed a Python script to create GitHub issues and added features like adding a comment, label and others. We have used GitHub API for this.

Table of contents:

IntroductionBefore we start: Introduce Github APIs & TokensBasic Script: Create one issue using Python to upload to GithubCreate multiple issues at the same timeCommenting & Adding Labels under an issueIntroduction

Github is a place where you can find useful open-source applications, scripts or extension...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 02:00

Python script to control keyboard

In this article, we have developed a Python script to control keyboard by stimulate pressing any key combination and stimulate typing.

Table of contents:

Introduction to PyAutoGuiwrite() functionpress() functionkeyDown() and keyUp() functionhold() functionhotkey() functionKeyboard keys attributeSimulate typingIntroduction to PyAutoGui

PyAutoGui is a Python module for automation with the Graphical User Interface (GUI). It can be used to programmatically control the keyboard. To install ...

 •  0 comments  •  flag
Share on Twitter
Published on March 23, 2022 00:20

March 22, 2022

System Design of GitHub

In this article, we will look into the system design of Github, the various protocols it offers, and how they work.

Table of Contents

GitHubA little about GitFunctional RequirementsNon-Functional RequirementsProtocols Supported by GitHubHandling HTTPS RequestsHandling SSH RequestsHandling GIT RequestsGitHub

GitHub is a repository hosting service. It provides distributed version control and Source Code Management using Git. It helps team members to work together on a project and collabo...

 •  0 comments  •  flag
Share on Twitter
Published on March 22, 2022 14:18