Skip to content

Instantly share code, notes, and snippets.

View subham13-02's full-sized avatar

Subham Sahu subham13-02

  • 03:54 (UTC -12:00)
View GitHub Profile
@subham13-02
subham13-02 / IPL-project Using SQL
Created February 16, 2024 06:42
SQL Queries on IPL-PROJECT situation based question
1.Number of matches played per year of all the years in IPL.
SELECT season,COUNT(*)
FROM matches
GROUP BY season
ORDER BY season;
2.Number of matches won of all teams over all the years of IPL.
SELECT winner,COUNT(winner)
@subham13-02
subham13-02 / GIT Exercise 4
Created January 25, 2024 13:20
GIT Exercise 4
mkdir exercise4
cd exercise4
touch README.md intro.txt
echo "Hello WOrld" >intro.txt
git add .
git commit -m "hiillo word"
git --amend -m "Hello world"
git commit --amend -m "Hello world"
git log
echo "Hello WOrld" >>README.md
@subham13-02
subham13-02 / GIT Exercise 2
Created January 25, 2024 10:18
GIT Exercise 2
mkdir exercise2
cd exercise2
git status #current branch : master
git -b new-branch
git checkout new-branch #currrent branch : new-branch
mkdir newFolder
cd newFolder
echo "random message" >message.txt
git add message.txt
git commit -m "commited on newbranch"
@subham13-02
subham13-02 / Git Exercise-1
Created January 25, 2024 09:32
Git Exercise-1
mkdir exercise1 #created exercise1 directory
cd exercise
git init
touch README.md
git status
git add .
git status
git commit -m "first commit"
mkdir src #created src directory inside exercise
cd src
@subham13-02
subham13-02 / CLI Drill 2
Created January 23, 2024 12:06
CLI Practice Drill 2
curl -o url #downloaded content from the given url
head -n 3 'Harry Potter and the Goblet of Fire.txt' #printed first three lines of this file
tail -n 10 'Harry Potter and the Goblet of Fire.txt' #printed last 10 lines of this file
grep -o -i -w 'Harry\|Ron\|Hermione\|Dumbledore' "Harry Potter and the Goblet of Fire.txt" | wc -l v #printed number of time those word apear together
sed -n '100,200p' "Harry Potter and the Goblet of Fire.txt" #Print lines from 100 through 200 i
tr -s '[:space:]' '\n' < "Harry Potter and the Goblet of Fire.txt" |sed 's/[^A-Za-z]/ /g' | tr 'A-Z' 'a-z' | sort | uniq | wc -l #printed number of unique words
@subham13-02
subham13-02 / CLI Drill 1
Created January 23, 2024 11:32
CLI Practice Drill 1
mkdir hello #created a directory hello
mkdir one #created a directory one
cd one #changed the current directory from home to one
touch a.txt b.txt #created empty txt files a.txt and b.txt
mkdir two #created a directory two
cd two #changed the current directory from home to two
tocu d.txt #created a empty txt file d.txt
mkdir three #created a directory three
cd three #changed the current directory from two to three
tocuh e.txt #created a empty txt file e.txt