Ajout des fichiers

This commit is contained in:
Hugo LEVY-FALK 2018-09-23 23:27:56 +02:00
commit e527b3f7cf
7 changed files with 545 additions and 0 deletions

260
.gitignore vendored Normal file
View file

@ -0,0 +1,260 @@
# Created by https://www.gitignore.io/api/latex
### LaTeX ###
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Comment the next line if you want to keep your tikz graphics files
*.tikz
*-tikzDictionary
# listings
*.lol
# makeidx
*.idx
*.ilg
*.ind
*.ist
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# easy-todo
*.lod
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices
*.xyc
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# KBibTeX
*~[0-9]*
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
### LaTeX Patch ###
# glossaries
*.glstex
# End of https://www.gitignore.io/api/latex

BIN
commit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

144
dessin.svg Normal file
View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="dessin.svg">
<defs
id="defs2">
<marker
inkscape:isstock="true"
style="overflow:visible;"
id="marker5378"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="scale(0.8) rotate(180) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path5376" />
</marker>
<marker
inkscape:stockid="SquareM"
orient="auto"
refY="0.0"
refX="0.0"
id="SquareM"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4599"
d="M -5.0,-5.0 L -5.0,5.0 L 5.0,5.0 L 5.0,-5.0 L -5.0,-5.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.4)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lend"
style="overflow:visible;"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path4529"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.8) rotate(180) translate(12.5,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.0810119"
inkscape:cx="340.88431"
inkscape:cy="644.01247"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="713"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<circle
id="path3713"
cx="29.363096"
cy="80.916664"
style="stroke-width:4.014;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
r="15"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<circle
r="15"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:4.01399994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cy="80.916664"
cx="82.279762"
id="circle4520"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<circle
id="circle4522"
cx="135.19643"
cy="80.916664"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:4.01399994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
r="15"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.865;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:29.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="M 44.363096,80.916664 H 67.279762"
id="path4524"
inkscape:connector-type="polyline"
inkscape:connector-curvature="3"
inkscape:connection-start="#path3713"
inkscape:connection-end="#circle4520"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.865;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5378);stroke-miterlimit:4;stroke-dasharray:none"
d="M 97.279762,80.916664 H 120.19643"
id="path5368"
inkscape:connector-type="polyline"
inkscape:connector-curvature="3"
inkscape:connection-start="#circle4520"
inkscape:connection-end="#circle4522"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

6
fichier.py Normal file
View file

@ -0,0 +1,6 @@
def say(sentence):
print("I'm told to say :", end="")
print(sentence)
if __name__=='__main__':
say("Hello !")

135
git.tex Normal file
View file

@ -0,0 +1,135 @@
\documentclass{beamer}
\usetheme{metropolis} % Use metropolis theme
\usepackage{minted}
\title{Formation Git}
\date{\today}
\author{Klafyvel}
\institute{Rézo Metz}
\begin{document}
\maketitle
\section{Git : la babibase}
\begin{frame}{Pourquoi ?}
\begin{itemize}
\item Partager le même code ;
\item Travailler sur une copie indépendante sans impacter le travail
des autres ;
\item Propager ses modifications ou importer celles de ses
collègues ;
\item Revenir sur une version antérieure du code ;
\item Faire évoluer simultanément lapplication dans des directions
différentes ;
\item Sappuyer sur un système de sauvegarde du code.
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Installation}
Sous Linux :
\begin{minted}{bash}
sudo apt install git
\end{minted}
Sous Windows :
https://gitforwindows.org/
\end{frame}
\begin{frame}[fragile]{Configuration de git}
\begin{minted}{bash}
git config --global --edit
\end{minted}
\end{frame}
\begin{frame}[fragile]{Créons un projet}
\begin{minted}{bash}
git init
\end{minted}
Ou si vous récupérez le projet de quelqu'un d'autre
\begin{minted}{bash}
git clone <url>
\end{minted}
\end{frame}
\begin{frame}[fragile]{Principe général}
\begin{itemize}
\item<1-> Une modification = Un 'commit'
\item<2-> Prendre le code ici : https://bit.ly/2zpTX0u ou le recopier dans le fichier 'code.py':
\begin{minted}{python}
def say(sentence):
print("I'm told to say :", end="")
print(sentence)
if __name__=='__main__':
say("Hello !")
\end{minted}
\item<3-> Ajouter le fichier
\begin{minted}{bash}
git add fichier
\end{minted}
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Principe général}
\begin{itemize}
\item<1-> Voir l'état de notre projet
\begin{minted}{bash}
git status
\end{minted}
\item<2-> Voir nos modifications
\begin{minted}{bash}
git diff [<fichier>]
\end{minted}
\item<3-> Commiter
\begin{minted}{bash}
git commit fichier
\end{minted}
\end{itemize}
\end{frame}
\begin{frame}{Que sait-on faire ?}
Avoir un historique de nos modifications.
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{commit}
\caption{}
\label{fig:commit}
\end{figure}
\end{frame}
\section{Gitlab}
\begin{frame}{Le Gitlab du Rézo}
Connectez-vous ici : https://gitlab.rezometz.org/
\end{frame}
\begin{frame}{Le Gitlab du Rézo}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{gitlab}
\caption{le GitLab du Rézo}
\label{fig:gitlab}
\end{figure}
\end{frame}
\begin{frame}[fragile]{Le Gitlab du Rézo}
\begin{itemize}
\item<1-> Créez un nouveau projet
\item<2-> Récupérez l'URL de clonage
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{url_gitlab}
\caption{URL de clonage}
\label{fig:urlgitlab}
\end{figure}
\item<3-> Enregistrez cet URL comme étant l'origine de votre projet
\begin{minted}{bash}
git remote add origin <url>
\end{minted}
\item<4-> Envoyez vos modifications
\begin{minted}{bash}
git push
\end{minted}
\item<5-> Récupérer les modifications distantes
\begin{minted}{bash}
git pull
\end{minted}
\end{itemize}
\end{frame}
\end{document}

BIN
gitlab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
url_gitlab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB