Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Monday, October 7, 2024

Git Commands Cheat Sheet

 Here are some basic Git commands:

Commands 

Description

git add <file>Adds a specific file to the staging area.
git add . or git add –allAdds all modified and new files to the staging area.
git statusShows the current state of your repository, including tracked and untracked files, modified files, and branch information.
git status –ignoredDisplays ignored files in addition to the regular status output.
git diffShows the changes between the working directory and the staging area (index).
git diff <commit1> <commit2>Displays the differences between two commits.
git diff –staged or git diff –cachedDisplays the changes between the staging area (index) and the last commit.
git diff HEADDisplay the difference between the current directory and the last commit
git commitCreates a new commit with the changes in the staging area and opens the default text editor for adding a commit message.
git commit -m “<message>” or git commit –message “<message>”Creates a new commit with the changes in the staging area and specifies the commit message inline.
git commit -a or git commit –allCommits all modified and deleted files in the repository without explicitly using git add to stage the changes.
git notes addCreates a new note and associates it with an object (commit, tag, etc.).
git restore <file>Restores the file in the working directory to its state in the last commit.
git reset <commit>Moves the branch pointer to a specified commit, resetting the staging area and the working directory to match the specified commit.
git reset –soft <commit>Moves the branch pointer to a specified commit, preserving the changes in the staging area and the working directory.
git reset –hard <commit>Moves the branch pointer to a specified commit, discarding all changes in the staging area and the working directory, effectively resetting the repository to the specified commit.
git rm <file>Removes a file from both the working directory and the repository, staging the deletion.
git mvMoves or renames a file or directory in your Git repository.


Git Commit (Updated Commands)

Here are some of the updated commands for Git commit:

Commands 

Description

git commit -m “feat: message”Create a new commit in a Git repository with a specific message to indicate a new feature commit in the repository.
git commit -m “fix: message”Create a new commit in a Git repository with a specific message to fix the bugs in codebases
git commit -m “chore: message”Create a new commit in a Git repository with a specific message to show routine tasks or maintenance.
git commit -m “refactor: message”Create a new commit in a Git repository with a specific message to change the code base and improve the structure.
git commit -m “docs: message”Create a new commit in a Git repository with a specific message to change the documentation.
git commit -m “style: message”Create a new commit in a Git repository with a specific message to change the styling and formatting of the codebase.
git commit -m “test: message”Create a new commit in a Git repository with a specific message to indicate test-related changes.
git commit -m “perf: message”Create a new commit in a Git repository with a specific message to indicate performance-related changes.
git commit -m “ci: message”Create a new commit in a Git repository with a specific message to indicate the continuous integration (CI) system-related changes.
git commit -m “build: message”Create a new commit in a Git repository with a specific message to indicate the changes related to the build process.
git commit -m “revert: message”Create a new commit in a Git repository with a specific message to indicate the changes related to revert a previous commit.

Branching and Merging

Here are some Git branching and merging commands:

Commands 

Description

git branchLists all branches in the repository.
git branch <branch-name>Creates a new branch with the specified name.
git branch -d <branch-name>Deletes the specified branch.
git branch -aLists all local and remote branches.
git branch -rLists all remote branches.
git checkout <branch-name>Switches to the specified branch.
git checkout -b <new-branch-name>Creates a new branch and switches to it.
git checkout — <file>Discards changes made to the specified file and revert it to the version in the last commit.
git merge <branch>Merges the specified branch into the current branch.
git logDisplays the commit history of the current branch.
git log <branch-dDisplays the commit history of the specified branch.
git log –follow <file>Displays the commit history of a file, including its renames.
git log –allDisplays the commit history of all branches.
git stashStashes the changes in the working directory, allowing you to switch to a different branch or commit without committing the changes.
git stash listLists all stashes in the repository.
git stash popApplies and removes the most recent stash from the stash list.
git stash dropRemoves the most recent stash from the stash list.
git tagLists all tags in the repository.
git tag <tag-name>Creates a lightweight tag at the current commit.
git tag <tag-name> <commit>Creates a lightweight tag at the specified commit.
git tag -a <tag-name> -m “<message>”Creates an annotated tag at the current commit with a custom message.
git checkout -- /path/to/source.cppDiscards changes made to the specified file and revert it to the version in the last commit.

Remote Repositories

Here are some Git remote repositories commands:

Commands 

Description

git fetchRetrieves change from a remote repository, including new branches and commit.
git fetch <remote>Retrieves change from the specified remote repository.
git fetch –pruneRemoves any remote-tracking branches that no longer exist on the remote repository.
git pullFetches changes from the remote repository and merges them into the current branch.
git pull <remote>Fetches changes from the specified remote repository and merges them into the current branch.
git pull –rebaseFetches changes from the remote repository and rebases the current branch onto the updated branch.
git pushPushes local commits to the remote repository.
git push <remote>Pushes local commits to the specified remote repository.
git push <remote> <branch>Pushes local commits to the specified branch of the remote repository.
git push –allPushes all branches to the remote repository.
git remoteLists all remote repositories.
git remote add <name> <url>Adds a new remote repository with the specified name and URL.

Git Comparison

Here are some Git comparison commands:

Commands 

Description

git showShows the details of a specific commit, including its changes.
git show <commit>Shows the details of the specified commit, including its changes.

Git Managing History

Here are some Git managing history commands:

Commands 

Description

git revert <commit>Creates a new commit that undoes the changes introduced by the specified commit.
git revert –no-commit <commit>Undoes the changes introduced by the specified commit, but does not create a new commit.
git rebase <branch>Reapplies commits on the current branch onto the tip of the specified branch.

To squash 2 commits into one, you have several options:

Option 1: Interactive Rebase (Most Common)

git rebase -i HEAD~2

This will open an editor with your last 2 commits. You’ll see something like:

pick abc1234 First commit message
pick def5678 Second commit message

Change pick to squash (or just s) for the second commit:

pick abc1234 First commit message
squash def5678 Second commit message

Save and close the editor. Git will then prompt you to edit the combined commit message.

Option 2: Soft Reset and Recommit

git reset --soft HEAD~2
git commit -m "Your new combined commit message"

This keeps all changes from both commits staged, then creates a single new commit.

Option 3: Reset and Amend (If the second commit is the most recent)

git reset --soft HEAD~1
git commit --amend

This moves the last commit’s changes into the staging area and lets you amend the previous commit.

Option 4: Using git merge --squash (For branch merging)

If you have commits on a branch and want to squash them when merging:

git checkout main
git merge --squash feature-branch
git commit -m "Squashed commit message"

Verify After Squashing

git log --oneline

Note: If the commits have already been pushed to a remote repository, you’ll need to force push after squashing:

git push --force-with-lease

⚠️ Warning: Force pushing rewrites history. Only do this on branches where you’re the sole contributor or have coordinated with your team.

------------------------------------------------------------------------------------

How to remove untracked files from your Git repository

To remove untracked files in Git, you use the command. This operation is permanent, so it is best practice to perform a "dry run" first to see which files will be deleted. [123


Safely Remove Untracked Files 
  1. Preview files to be removed (dry run): Run this command to see a list of all files that would be deleted, without actually removing anything. 
  2. To also preview the removal of untracked directories, use the flag in addition to : 
  3. Execute the removal: If the list from the dry run is correct, run the command without the flag to permanently delete the files. The (force) flag is required by default. 
  4. To remove both untracked files and untracked directories, combine the and flags: [13456
Additional Options 
  • Remove ignored files: By default, will not remove files listed in your file. To remove all untracked files, including ignored ones (e.g., build artifacts), use the flag: 
  • Interactive mode: For more granular control over which specific files or directories to delete, use the interactive flag . This will present a menu with options to select files by number, filter by pattern, or ask for confirmation for each item. [12478
Alternative: Temporarily Stash Untracked Files [9


If you might need the files later, you can temporarily save them using with the () option instead of permanently deleting them with : [1011


You can restore the stashed files later using . [12


For more details and options, consult the official Git clean documentation or the Atlassian Git Tutorial. [1314

Wednesday, August 14, 2024

Interview preparation Guide for Software Engineers


- Designing Data-Intensive Applications by Martin Kleppmann
Amazon: https://amzn.to/4dlfPed

- Database Internals by Alex Petrov
Amazon: https://amzn.to/3YI515e

- System Design Interview (Volume 1) by Alex Xu
Amazon: https://amzn.to/3WJzwVV 

- System Design Interview (Volume 2) by Alex Xu
Amazon: https://amzn.to/3M7zEtv 

- Grokking the System Design Interview
https://lnkd.in/ebEwFWbP

- Grokking the Advanced System Design Interview
https://lnkd.in/e_c2CWge

- Donne Martin's System Design Primer
https://github.com/krmadhukar/system-design-primer

- Site Reliability Engineering: How Google Runs Production Systems
https://lnkd.in/edYzQwXW

- The Site Reliability Workbook: Practical Ways to Implement SRE
https://lnkd.in/e9tKypna

- Understanding Distributed Systems
https://amzn.to/4fGzg2H

- Fundamentals of Software Architecture - Mark Richards & Neal Ford
https://amzn.to/3Xdozxv

- Software Architecture: The Hard Parts - Mark Richards & Neal Ford
https://amzn.to/4cp3NyX

- System Design Interview by Lewis Lin
- Hacking the System Design Interview by Stanley Chiang
- Distributed Systems by Tanenbaum
- Building Microservices by Sam Newman

► YouTube Channels

- The Facebook E6 Guy
https://lnkd.in/ehwMYjeD

- ByteByteGo (Alex Xu)
https://lnkd.in/emgA9inH

- InfoQ
https://lnkd.in/eicU_fx3
covers Facebook's TAO architecture: https://lnkd.in/eryi_ZTT

- Jordan Has No Life
https://lnkd.in/ePUshbhX

- Usenix
https://lnkd.in/e5A5s4Xv
https://lnkd.in/ersgNbfg

- MIT Distributed Systems Course
https://lnkd.in/eDjvUJa7

- Amazon Principal Engineer's Channel (A Life Engineered)
https://lnkd.in/egxKHJxU

- Fireship : https://lnkd.in/esqeG7T9

- Martin Kleppmann
https://lnkd.in/eQQ8f2aX

- DistSys Reading Group
https://lnkd.in/ec9FZUbs

- Leslie Lamport's Video Series on Learning TLA+
https://lnkd.in/eFFABEgW

- Carnegie Mellon's Distributed Databases Course
https://lnkd.in/eTdJqU3b


P.S: Image Credits: https://lnkd.in/eAt-mmZF

LinkedIn Credits - https://www.linkedin.com/in/karan-saxena-466b07190



Sunday, July 28, 2024

Free AI/ML LLM Fundamentals Course

 Free AI/ML LLM Fundamentals Course

Save 1000s of dollars.
Bookmark this and follow the curriculum below.
You want to learn AI/ML LLM?
I have curated the Best FREE AI/ML roadmap that covers essential knowledge about maths, Python, NNs with hands-on projects Learning.

🙏 Help me spread the free courses! Kindly like, repost and comment! ♻️

Google Courses
https://www.cloudskillsboost.google/?qlcampaign=6y-in1-event-90

𝟭. 𝗠𝗮𝘁𝗵𝗲𝗺𝗮𝘁𝗶𝗰𝘀 𝗳𝗼𝗿 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴
• Linear Algebra - 3Blue1Brown:
https://lnkd.in/ejApha3z
• Immersive Linear Algebra: https://lnkd.in/ekaUs4Wz
• Linear Algebra - KA: https://lnkd.in/emCEHTq5
• Calculas - KA: https://lnkd.in/emCEHTq5
• Statistics and Probability - KA: https://lnkd.in/e6_SirMr

𝟮. 𝗣𝘆𝘁𝗵𝗼𝗻 𝗳𝗼𝗿 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴
• Real Python: https://realpython.com
• Learn Python - freecodecamp: https://lnkd.in/ejfBftNf
• Python Data Science: https://lnkd.in/g4ZysfEe
• ML for Everybody: https://lnkd.in/ehR6xaGZ
• Intro to ML - udacity: https://lnkd.in/eVudd2Zm

𝟯. 𝗡𝗲𝘂𝗿𝗮𝗹 𝗡𝗲𝘁𝘄𝗼𝗿𝗸𝘀
• Neural Networks explained: https://lnkd.in/ehsg362K
• Deep Learning Crash Course: https://lnkd.in/edgfWdEv
• Practical Deep Learning - fast_ai: https://course.fast.ai
• PyTorch Tutorials: https://lnkd.in/dNUfmaCm

𝟰. 𝗡𝗮𝘁𝘂𝗿𝗮𝗹 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 𝗣𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴 (𝗡𝗟𝗣)
• RealPython - NLP with spaCy: https://lnkd.in/eqPbFf_d
• NLP Guide Kaggle: https://lnkd.in/eT2DsqdN
• Illustrated Word2vec by Jay: https://lnkd.in/e5wK5yg9
• PyTorch RNN from Scratch: https://lnkd.in/eJWj5fUH
• Understanding LSTMN: https://lnkd.in/ed9ZVBnf

𝟱. 𝗣𝗿𝗼𝗷𝗲𝗰𝘁𝘀
• ML Projects in Python: https://lnkd.in/eC_gG8WH
• Super Duper NLP Repo: notebooks.quantumstat.com

I hope you find this helpful.

Kindly Like, Repost & Comment, if you find it helpful.

Follow Arpit Singh for more...


hashtagai hashtagllm hashtagmachinelearning hashtagdatascience hashtagdeveloper

Wednesday, June 26, 2024

Cloud Computing and data storage terminology glossary


1. Control Plane 
The control plane provides management and orchestration across an organization's cloud environment. This is where configuration baselines are set, user and role access are provisioned, and applications sit so they can execute with related services.

2. Cloud computing service Types
IaaS, PaaS & SaaS

Within the cloud deployment models, there are several types of cloud services, including infrastructure, platforms, and software applications. Cloud service models are not mutually exclusive, and you can choose to use more than one in combination or even all of them at once.

Here are the three main cloud service models:
Infrastructure as a Service (IaaS)
IaaS delivers on-demand infrastructure resources, such as compute, storage, networking, and virtualization. With IaaS, the service provider owns and operates the infrastructure, but customers will need to purchase and manage software, such as operating systems, middleware, data, and applications.
Platform as a Service (PaaS)
PaaS delivers and manages hardware and software resources for developing, testing, delivering, and managing cloud applications. Providers typically offer middleware, development tools, and cloud databases within their PaaS offerings.
Software as a Service (SaaS)
SaaS provides a full application stack as a service that customers can access and use. SaaS solutions often come as ready-to-use applications, which are managed and maintained by the cloud service provider.
Serverless computing
Serverless computing in cloud service models is also called Function as a Service (FaaS). This is a relatively new cloud service model that provides solutions to build applications as simple, event-triggered functions without managing or scaling any infrastructure.

3. Containers
Containers are lightweight packages of your application code together with dependencies such as specific versions of programming language runtimes and libraries required to run your software services.
In this way, containers virtualize the operating system and run anywhere, from a private data center to the public cloud or even on a developer’s personal laptop. From Gmail to YouTube to Search, everything at Google runs in containers.

4. What are the benefits of containers?
Separation of responsibility
Containerization provides a clear separation of responsibility, as developers focus on application logic and dependencies, while IT operations teams can focus on deployment and management instead of application details such as specific software versions and configurations.
Workload portability
Containers can run virtually anywhere, greatly easing development and deployment: on Linux, Windows, and Mac operating systems; on virtual machines or on physical servers; on a developer’s machine or in data centers on-premises; and of course, in the public cloud.
Application isolation
Containers virtualize CPU, memory, storage, and network resources at the operating system level, providing developers with a view of the OS logically isolated from other applications.

5. Kubernetes
Kubernetes, also known as K8s, is an open source system for automating deployment, scaling, and management of containerized applications.

It groups containers that make up an application into logical units for easy management and discovery.

6. Virtual Machines
A virtual machine (VM) is a digital representation of a physical computer. It behaves like an actual computer, with its own CPU, memory, and storage. VMs run within a software-based environment, separate from the host system. 
Here are some common uses and benefits of VMs:

Cloud Deployment: VMs are used to build and deploy applications in cloud environments.
Testing and Development: Developers create VMs to test new operating systems or software.
Efficient Resource Utilization: VMs allow multiple virtual environments to run on a single physical infrastructure, reducing the need for many physical servers.
Isolation and Portability: VMs remain independent of each other and can be easily moved between different hosts.
In summary, VMs provide flexibility, cost savings, and efficient resource management. 

7.Virtual Machines vs Containers



8. Microservices
Microservices are an architectural and organizational approach to software development. In this model, software is composed of small, independent services that communicate over well-defined APIs. Here are some key points about microservices:

Independence: Each microservice is developed, deployed, operated, and scaled independently without affecting other services. They don’t share code or implementation with each other.

Specialization: Each service focuses on solving a specific problem or business capability. If a service becomes complex, it can be broken down into smaller services.

Agility: Microservices foster small, independent teams that take ownership of their services. This allows faster development cycles and better overall throughput.

Flexible Scaling: Services can be independently scaled to meet demand for specific features, optimizing infrastructure needs and maintaining availability.

                            Breaking a monolithic application into microservices

9. Monolithic vs. Microservices Architecture

With monolithic architectures, all processes are tightly coupled and run as a single service. This means that if one process of the application experiences a spike in demand, the entire architecture must be scaled. Adding or improving a monolithic application’s features becomes more complex as the code base grows. This complexity limits experimentation and makes it difficult to implement new ideas. Monolithic architectures add risk for application availability because many dependent and tightly coupled processes increase the impact of a single process failure.

With a microservices architecture, an application is built as independent components that run each application process as a service. These services communicate via a well-defined interface using lightweight APIs. Services are built for business capabilities and each service performs a single function. Because they are independently run, each service can be updated, deployed, and scaled to meet demand for specific functions of an application.

10. Edge Computing
Edge computing is a form of computing that is done on-site or near a particular data source, minimizing the need for data to be processed in a remote data center. Edge computing is a distributed computing standard that brings compute services and data storage close to the site where it is needed to speed up the response times and preserve bandwidth.


Data Storage Terminologies
Split Brain situation - In a synchronous replication configuration - a split-brain situation where both arrays serve data for the same volume.


Thursday, May 23, 2024

𝐅𝐑𝐄𝐄 𝐂𝐨𝐮𝐫𝐬𝐞𝐬 𝐲𝐨𝐮 𝐰𝐢𝐥𝐥 𝐫𝐞𝐠𝐫𝐞𝐭 𝐧𝐨𝐭 𝐭𝐚𝐤𝐢𝐧𝐠 𝐢𝐧 𝟐𝟎𝟐𝟒


1 Introduction Generative Al
imp.i384100.net/5gNjVj

2. Generative AI with Large Language Models
imp.i384100.net/k0qRez

2 a) React Fundamentals
imp.i384100.net/9gYeRW

2 b) Angular: imp.i384100.net/eKWR9r

2 c) SEO: imp.i384100.net/xkGnW5

3. Generative Adversarial Networks (GANs) Specialization
imp.i384100.net/DKNLPn

4. Introduction to Artificial Intelligence (AI)
imp.i384100.net/QyQKoA

5. AI Engineering
imp.i384100.net/9gYeRy

6. Natural Language Processing Specialization
imp.i384100.net/rQPgZR

7. Deep Learning Specialization
imp.i384100.net/jrL1k5

8. Generative AI for Data Scientists Specialization
imp.i384100.net/k0qReN

9. IBM Data Science Professional Certificate
imp.i384100.net/AWNK91

10. Introduction to Data Science
imp.i384100.net/GmNDek

11. Learn SQL Basics for Data Science
imp.i384100.net/Vm54E3

12. Excel for Business
imp.i384100.net/g1EojB

13. Python for Everybody
imp.i384100.net/B0MKrL

14. Machine Learning Specialization
imp.i384100.net/WqkYnM

15. SQL for Data Science
imp.i384100.net/Vm54E3

Like and Share with your friends and Help Them 😊

#oops #c++ #cpp #interviewquestions #interview #prep #it #cse #cs #systemdesign

Popular Posts