SlideShare a Scribd company logo
1 of 19
LESSON SUMMARY
OOP
Git is a version control system. Distributed version control systems exist
because these systems will "merge" changes together intelligently,
enabling multiple developers to work on a project at the same time.
There are a few distributed version control systems, including Mercurial
and Bazzar. However, Git is by far the most popular.
Git is a command-line tool we can access by typing git in the shell. The
first step in using Git is to initialize a folder as a repository. A repository
(or "repo") tracks multiple versions of the files in the folder, enabling
collaboration.
We can initialize a repository by typing git init inside the folder we
want to use for our project.
The typical Git workflow
involves adding files, making
changes, and storing a
checkpoint (or "snapshot") of
those changes. These
checkpoints are called
commits.
Instead of storing every file in
every commit, Git stores the
diff, or the things that change
between commits.
Every project is a sequence of
commits. Commits give us a
powerful way to merge the
changes of multiple team
members together. We can
even restore the repository to
an earlier checkpoint, or
moment in time.
committed - The current version of the file has been added to a commit, and Git
has stored it.
staged - The file has been marked for inclusion in the next commit, but hasn't
been committed yet (and Git hasn't stored it yet). You might stage one file
before working on a second file, for example, then commit both files at the same
time when you're done.
modified - The file has been modified since the last commit, but isn't staged yet.
After we make changes to a Git repository, we can run the git status command to
check the state of each file within it. Any files that don't show up in git status are
in the committed state (i.e., don't have unsaved changes).
Files can have one of three states in Git:
Before we can make our first commit, we need to tell Git who we are so it
can store that information along with the commit. This step ensures that all of
the members on a team can tell who made a certain commit.
We can do this by running git config. We only need to run this command
once per computer, because Git will save the information.
Git needs two pieces of information about you -- your email address and your
name. You can configure your email with:
git config --global user.email "your.email@domain.com"
You can configure your name with:
git config --global user.name "Your name"
To make a commit, we use git commit -m "Commit message here".
The -m flag indicates that we're adding a message, and the text in quotes that
comes after it is the commit message itself. It's customary to make the commit
message something informative, so if we do have to rewind or merge code, it's
obvious what changes we made and when.
we can use git diff to see all of the line differences between the current
and previous version. We can scroll up and down with the arrow keys, and exit
git diff with the q key. If we want to see the differences after we stage a file, we
can use git diff --staged
We can pull up a repository's commit history using the git log command. This command will
show us a list of all of the commits to the repository, in descending order by creation date. If the
output is very long, it will allow us to scroll. We can scroll through the log with the up and down
arrows, and use the q key to exit.
We can use git log --stat to see more details about the commits in the git log output.
Command
Getting started with Git:
git
Initializing a repo:
git init
Check the state of each file:
git status
Add files to staging area:
git add
Configure identity in Git:
• Configure email
git config --global user.email
"your.email@domain.com"
• Configure name
git config --global user.name
"Your name"
Making a commit
git commit -m "Commit
message here"
Viewing the diff
• View the diff before staged
git diff
• View the diff after staged
git diff --staged
View repo's commit history
git log
Docker is basically seen as a tool. It can package our applications and
algorithms along with their dependencies. it makes it easy for us to
replicate our code or our projects, allows us to run them in the cloud or
in other environments, share them across teams, deploy containers to
production and much more.
Docker Container
A Docker container is the same idea as a physical container--think of it like a box with an
application in it. Inside the box, the application seems to have a computer all to itself: it
has its own machine name and IP address, and it also has its own disk drive (Windows
containers have their own Windows Registry too). Figure 2.2 shows how the app is boxed
by the container.
The application inside the box (container) can’t see anything
outside the box, but the box is running on a computer, and that
computer can also be running lots of other boxes. The applications
in those boxes have their own separate environments (managed by
Docker), but they all share the CPU and memory of the computer,
and they all share the computer’s operating system
List all container
docker container ps to list running container
or docker container ps -a to list all container
docker container inspect shows you all the details of a container:
Running a docker container
docker run [docker_image]
You can run containers from locally stored Docker
images. If you use an image that is not on your system,
the software pulls it from the online registry.
Run a Container Under a Specific Name
docker container run --name [container_name] [docker_image]
You can check whether you have successfully set a container name by displaying
a list of all containers (running and stopped) with the command:
docker ps -a
Stop and start container
docker container stop [CONTAINER_ID]
docker container start [CONTAINER_ID]
Exec into a running container
Sometimes, we want to run another process insi. How can we do this? First, we need to know
either the ID or the name of the container, and then we can define which process we want to run
and how we want it to run
docker exec -it [CONTAINER NAME/ID] bash
The -i flag signifies that we want to run the additional process interactively, and -t tells Docker
that we want it to provide us with a TTY (a Terminal emulator) for the command. Finally, the
process we run is bash.
OOP
Python Import
Python code is organized into both modules and packages.
In Python, you use the import keyword to make code in
one module available in another. Imports in Python are important
for structuring your code effectively. Using imports properly will
make you more productive, allowing you to reuse code while
keeping your projects maintainable.
In practice, a module usually corresponds to
one .py file containing Python code.
The true power of modules is that they can be
imported and reused in other code.
>>> import math
>>> math.pi
3.141592653589793
In the first line, import math, you import the code in
the math module and make it available to use. In the
second line, you access the pi variable within
the math module. math is part of Python’s standard
library, which means that it’s always available to import
when you’re running Python.
Modules Package
You can use a package to further organize your
modules. Note that a package is still a module. As a
user, you usually don’t need to worry about whether
you’re importing a module or a package.
The package will consist of the following
directories and files:

More Related Content

What's hot

11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python FundamentalsPraveen M Jigajinni
 
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Ranel Padon
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonYi-Fan Chu
 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.Nicholas Pringle
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File ProcessingRanel Padon
 
Python Summer Internship
Python Summer InternshipPython Summer Internship
Python Summer InternshipAtul Kumar
 
Python Collections Module
Python Collections ModulePython Collections Module
Python Collections ModuleMaryamAnwar10
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installingMohd Sajjad
 
Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Simplilearn
 
Most Asked Python Interview Questions
Most Asked Python Interview QuestionsMost Asked Python Interview Questions
Most Asked Python Interview QuestionsShubham Shrimant
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing filesMukesh Tekwani
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Codemotion
 

What's hot (20)

11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
 
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Chapter 02 functions -class xii
Chapter 02   functions -class xiiChapter 02   functions -class xii
Chapter 02 functions -class xii
 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File Processing
 
Python Summer Internship
Python Summer InternshipPython Summer Internship
Python Summer Internship
 
Python Collections Module
Python Collections ModulePython Collections Module
Python Collections Module
 
Python modules
Python modulesPython modules
Python modules
 
Intervies
InterviesIntervies
Intervies
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
Learn python
Learn pythonLearn python
Learn python
 
Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...
 
Most Asked Python Interview Questions
Most Asked Python Interview QuestionsMost Asked Python Interview Questions
Most Asked Python Interview Questions
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing files
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
 

Similar to Git, Docker, Python Package and Module

Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptxHitesh670643
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?9 series
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxAbelPhilipJoseph
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdfAliaaTarek5
 
GDSC23 - Github Workshop Presentation.pptx
GDSC23 - Github Workshop Presentation.pptxGDSC23 - Github Workshop Presentation.pptx
GDSC23 - Github Workshop Presentation.pptxChitreshGyanani1
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitRasan Samarasinghe
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbieAnuj Sharma
 
SessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystemsSessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystemsHellen Gakuruh
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoLuis Bertel
 

Similar to Git, Docker, Python Package and Module (20)

Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
 
Git learning
Git learningGit learning
Git learning
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
 
16 Git
16 Git16 Git
16 Git
 
Git introduction
Git introductionGit introduction
Git introduction
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
 
GDSC23 - Github Workshop Presentation.pptx
GDSC23 - Github Workshop Presentation.pptxGDSC23 - Github Workshop Presentation.pptx
GDSC23 - Github Workshop Presentation.pptx
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
github_gyan.pptx
github_gyan.pptxgithub_gyan.pptx
github_gyan.pptx
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
 
SessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystemsSessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystems
 
Git
GitGit
Git
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocido
 

More from Novita Sari

Summary python coding
Summary python codingSummary python coding
Summary python codingNovita Sari
 
Summary machine learning and model deployment
Summary machine learning and model deploymentSummary machine learning and model deployment
Summary machine learning and model deploymentNovita Sari
 
Summary introduction to data engineering
Summary introduction to data engineeringSummary introduction to data engineering
Summary introduction to data engineeringNovita Sari
 
Summary data visualization
Summary data visualizationSummary data visualization
Summary data visualizationNovita Sari
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modellingNovita Sari
 
Summary business knowledge for data professional
Summary business knowledge for data professionalSummary business knowledge for data professional
Summary business knowledge for data professionalNovita Sari
 
Practice case legal for data professional
Practice case legal for data professionalPractice case legal for data professional
Practice case legal for data professionalNovita Sari
 
OOP, Networking, Linux/Unix
OOP, Networking, Linux/UnixOOP, Networking, Linux/Unix
OOP, Networking, Linux/UnixNovita Sari
 
Python Function and Looping
Python Function and LoopingPython Function and Looping
Python Function and LoopingNovita Sari
 
Basic Data Engineering
Basic Data EngineeringBasic Data Engineering
Basic Data EngineeringNovita Sari
 

More from Novita Sari (13)

Advanced python
Advanced pythonAdvanced python
Advanced python
 
Summary python coding
Summary python codingSummary python coding
Summary python coding
 
Summary machine learning and model deployment
Summary machine learning and model deploymentSummary machine learning and model deployment
Summary machine learning and model deployment
 
Summary legal
Summary legalSummary legal
Summary legal
 
Summary introduction to data engineering
Summary introduction to data engineeringSummary introduction to data engineering
Summary introduction to data engineering
 
Summary data visualization
Summary data visualizationSummary data visualization
Summary data visualization
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
 
Summary business knowledge for data professional
Summary business knowledge for data professionalSummary business knowledge for data professional
Summary business knowledge for data professional
 
Practice case legal for data professional
Practice case legal for data professionalPractice case legal for data professional
Practice case legal for data professional
 
Big data tools
Big data toolsBig data tools
Big data tools
 
OOP, Networking, Linux/Unix
OOP, Networking, Linux/UnixOOP, Networking, Linux/Unix
OOP, Networking, Linux/Unix
 
Python Function and Looping
Python Function and LoopingPython Function and Looping
Python Function and Looping
 
Basic Data Engineering
Basic Data EngineeringBasic Data Engineering
Basic Data Engineering
 

Recently uploaded

VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Onlineanilsa9823
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxolyaivanovalion
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlkumarajju5765
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 

Recently uploaded (20)

VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 

Git, Docker, Python Package and Module

  • 2. Git is a version control system. Distributed version control systems exist because these systems will "merge" changes together intelligently, enabling multiple developers to work on a project at the same time. There are a few distributed version control systems, including Mercurial and Bazzar. However, Git is by far the most popular. Git is a command-line tool we can access by typing git in the shell. The first step in using Git is to initialize a folder as a repository. A repository (or "repo") tracks multiple versions of the files in the folder, enabling collaboration. We can initialize a repository by typing git init inside the folder we want to use for our project.
  • 3. The typical Git workflow involves adding files, making changes, and storing a checkpoint (or "snapshot") of those changes. These checkpoints are called commits. Instead of storing every file in every commit, Git stores the diff, or the things that change between commits. Every project is a sequence of commits. Commits give us a powerful way to merge the changes of multiple team members together. We can even restore the repository to an earlier checkpoint, or moment in time.
  • 4. committed - The current version of the file has been added to a commit, and Git has stored it. staged - The file has been marked for inclusion in the next commit, but hasn't been committed yet (and Git hasn't stored it yet). You might stage one file before working on a second file, for example, then commit both files at the same time when you're done. modified - The file has been modified since the last commit, but isn't staged yet. After we make changes to a Git repository, we can run the git status command to check the state of each file within it. Any files that don't show up in git status are in the committed state (i.e., don't have unsaved changes). Files can have one of three states in Git:
  • 5. Before we can make our first commit, we need to tell Git who we are so it can store that information along with the commit. This step ensures that all of the members on a team can tell who made a certain commit. We can do this by running git config. We only need to run this command once per computer, because Git will save the information. Git needs two pieces of information about you -- your email address and your name. You can configure your email with: git config --global user.email "your.email@domain.com" You can configure your name with: git config --global user.name "Your name"
  • 6. To make a commit, we use git commit -m "Commit message here". The -m flag indicates that we're adding a message, and the text in quotes that comes after it is the commit message itself. It's customary to make the commit message something informative, so if we do have to rewind or merge code, it's obvious what changes we made and when. we can use git diff to see all of the line differences between the current and previous version. We can scroll up and down with the arrow keys, and exit git diff with the q key. If we want to see the differences after we stage a file, we can use git diff --staged
  • 7. We can pull up a repository's commit history using the git log command. This command will show us a list of all of the commits to the repository, in descending order by creation date. If the output is very long, it will allow us to scroll. We can scroll through the log with the up and down arrows, and use the q key to exit. We can use git log --stat to see more details about the commits in the git log output.
  • 8. Command Getting started with Git: git Initializing a repo: git init Check the state of each file: git status Add files to staging area: git add Configure identity in Git: • Configure email git config --global user.email "your.email@domain.com" • Configure name git config --global user.name "Your name" Making a commit git commit -m "Commit message here" Viewing the diff • View the diff before staged git diff • View the diff after staged git diff --staged View repo's commit history git log
  • 9. Docker is basically seen as a tool. It can package our applications and algorithms along with their dependencies. it makes it easy for us to replicate our code or our projects, allows us to run them in the cloud or in other environments, share them across teams, deploy containers to production and much more.
  • 10. Docker Container A Docker container is the same idea as a physical container--think of it like a box with an application in it. Inside the box, the application seems to have a computer all to itself: it has its own machine name and IP address, and it also has its own disk drive (Windows containers have their own Windows Registry too). Figure 2.2 shows how the app is boxed by the container.
  • 11. The application inside the box (container) can’t see anything outside the box, but the box is running on a computer, and that computer can also be running lots of other boxes. The applications in those boxes have their own separate environments (managed by Docker), but they all share the CPU and memory of the computer, and they all share the computer’s operating system
  • 12. List all container docker container ps to list running container or docker container ps -a to list all container
  • 13. docker container inspect shows you all the details of a container:
  • 14. Running a docker container docker run [docker_image] You can run containers from locally stored Docker images. If you use an image that is not on your system, the software pulls it from the online registry.
  • 15. Run a Container Under a Specific Name docker container run --name [container_name] [docker_image] You can check whether you have successfully set a container name by displaying a list of all containers (running and stopped) with the command: docker ps -a
  • 16. Stop and start container docker container stop [CONTAINER_ID] docker container start [CONTAINER_ID]
  • 17. Exec into a running container Sometimes, we want to run another process insi. How can we do this? First, we need to know either the ID or the name of the container, and then we can define which process we want to run and how we want it to run docker exec -it [CONTAINER NAME/ID] bash The -i flag signifies that we want to run the additional process interactively, and -t tells Docker that we want it to provide us with a TTY (a Terminal emulator) for the command. Finally, the process we run is bash.
  • 18. OOP Python Import Python code is organized into both modules and packages. In Python, you use the import keyword to make code in one module available in another. Imports in Python are important for structuring your code effectively. Using imports properly will make you more productive, allowing you to reuse code while keeping your projects maintainable.
  • 19. In practice, a module usually corresponds to one .py file containing Python code. The true power of modules is that they can be imported and reused in other code. >>> import math >>> math.pi 3.141592653589793 In the first line, import math, you import the code in the math module and make it available to use. In the second line, you access the pi variable within the math module. math is part of Python’s standard library, which means that it’s always available to import when you’re running Python. Modules Package You can use a package to further organize your modules. Note that a package is still a module. As a user, you usually don’t need to worry about whether you’re importing a module or a package. The package will consist of the following directories and files: