This is a short handbook for git and github. It covers the basic things which are needed to know while working with git and github.

Git is an open-source, version control tool. GitHub is a code hosting platform for version control and collaboration.

Install Git

install git scm from https://git-scm.com/

I am using git version 2.29.2.windows.1 here.

Open Git Bash from Start Menu.

To check your version after installation:

git --version

Set your username:

git config --global user.name "kawshikbuet17"

Set your email:

git config --global user.email "kawshik.kumar.paul@gmail.com"

Now to see git configuration details

git config --list

Image for post
Image for post

Initialize Git

Now go to the specific directory which you want to track with git. Then open git bash there and run this command. …


Getting Data from website HTML

https://www.codewithharry.com/videos/python-web-scraping-tutorial-in-hindi

https://paste.ubuntu.com/p/dfpwWwJjsG/

View codes from this link because medium DOT com doesn’t manage indentation.

Setup a virtual environment and activate it.

virtualenv myenv
.\myenv\Scripts\activate

Install the packages

pip install requests
pip install bs4
pip install html5lib

Initially type it and run it. This is the hello world of web scraping.

import requestsfrom bs4 import BeautifulSoup
url = "https://codewithharry.com/"r = requests.get(url)htmlContent = r.contentprint(htmlContent)

Output will be messy. Like this

Image for post
Image for post

You we will parse the html source code to view it in a good structure.

soup = BeautifulSoup(htmlContent, 'html.parser')print(soup)

Output will be parsed, that means organized. Like this. This is the source code of that html. …


I am using Django 3.1.2 (In other versions also, it should be the same thing)

First of all, some points should be clear :

While using django login/logout, a session method is used.

When an user logs into his account from a browser, a session is made for him. When that user logs out of his account, the session is deleted or expired. Session is usually saved in the browser cookies, that’s why you get your account logged in unless you log it out.

Each login is a session to be simple. A session is made for only one browser. That means if you switch browser, the session won’t be there because cookies won’t be shifted there. You will have to create another session by logging into your account. …


Microsoft Excel is a very popular software for instant graph drawing using data table. To draw a graph, simply we need one X axis and one(usually) Y axis. We also can use multiple Y axis for same X axis. It’s very easy. But sometimes we need to use multiple X axis for same Y axis. It’s not so easy and there are not enough sources in online to learn this. Btw, I mean this type of graph.

Image for post
Image for post
There is two X axis and one Y axis

I also faced difficulties while doing this, then a friend helped me to do this. I’m writing this process here for future use (as source is not so available). …


Suppose you have some tables in Database (Oracle, MySQL etc) . Sometimes you need the SQL queries of that tables. These SQL queries will be able to make exactly similar tables like these. You can even get the data of these tables by running sql queries. You can also get it without data (only table structure), it’s up to yours. But first of all, we need the SQL of the already generated tables. To do this, follow the steps:

Step1

Open a schema of Database using your SQL editor (PopSQL, DataGrip, Navicat etc).

Step2

Go to Tables. Then you can see the tables of your schema. …


Suppose, you want to work with some previously generated tables of a schema in Oracle database, but you don’t want to modify or lose the data of that tables. Then you have to copy the tables and work with the copied version. There are options like duplicate or copy paste etc. But I know what you want to do. Actually you want to make a copy of that tables to another schema and work with them. Here you go.

Here I’m copying the built-in HR Schema tables to another schema, and I will use this copied version for making experiments and rough uses fearlessly. …

About

Kawshik Kumar Paul

CS Undergrad | BUET

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