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 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:
Set your username:
git config --global user.name "kawshikbuet17"
Set your email:
git config --global user.email "email@example.com"
Now to see git configuration details
git config --list
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
View codes from this link because medium DOT com doesn’t manage indentation.
Setup a virtual environment and activate it.
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
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.
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.
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:
Open a schema of Database using your SQL editor (PopSQL, DataGrip, Navicat etc).
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. …