Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test-org
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stéphane Del Pino
test-org
Commits
135d1ea1
Commit
135d1ea1
authored
3 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Test d'export Markdown
parent
c0e1cb0f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test.md
+153
-0
153 additions, 0 deletions
test.md
with
153 additions
and
0 deletions
test.md
0 → 100644
+
153
−
0
View file @
135d1ea1
# Table des matières
1.
[
Bases
](
#Bases
)
1.
[
pugs
](
#pugs
)
2.
[
Équations
](
#%C3%89quations
)
3.
[
Python
](
#Python
)
1.
[
Exécution Python
](
#Ex%C3%A9cution%20Python
)
2.
[
Exemple de code python non exécuté
](
#Exemple%20de%20code%20python%20non%20ex%C3%A9cut%C3%A9
)
4.
[
gnuplot
](
#gnuplot
)
L'utilisation reste très basique, mais cela donne un aperçu de ce
qu'on peut faire.
Pour changer le style de rendu
`html`
, on peut simplement remplacer
`bigblow`
par
`readtheorg`
.
<a
id=
"Bases"
></a>
# Bases
D'abord, on peut juste afficher un bloc de code sans l'évaluer
import math
On peut aussi Afficher le code puis le résultat de son exécution
echo "Hello world"
Hello world
Et évidemment n'afficher que le résultat. Ici, on utilise un script
python pour approcher (bien mal) la valeur de $
\p
i$.
pi ~ 3.14063710098594
<a
id=
"pugs"
></a>
## pugs
let f:R -> R, x -> 2*x+1;
cout << 2*f(3) << "\n";
----------------- pugs exec info ----------------------
MPI number of ranks 1
Kokkos::OpenMP thread_pool_topology[ 1 x 8 x 1 ]
-------------------------------------------------------
* setting random seed to 1378430315
Parsing file /tmp/babel-dXeodt/nJYNmOs.pugs ...
- loaded modules
- checked symbols declaration
- build node data types
- checked node data types
-------------------------------------------------------
Executing AST...
14
<a
id=
"%C3%89quations"
></a>
# Équations
Il est possible d'écrire des maths normalement dans le texte ($
\p
artial_t u -
\D
elta u = f$), mais aussi d'afficher les sources LaTeX et la compilation
associée
\begin{equation*}
\frac{\pi^2}{6}=\sum_{n=1}^{\infty}\frac{1}{n^2}
\end{equation*}
\b
egin{equation
*
}
\f
rac{
\p
i^2}{6}=
\s
um_{n=1}^{
\i
nfty}
\f
rac{1}{n^2}
\e
nd{equation
*
}
On peut aussi n'afficher que les sources LaTeX
\begin{equation*}
\frac{\pi^2}{6}=\sum_{n=1}^{\infty}\frac{1}{n^2}
\end{equation*}
Ou d'utiliser un bloc de sources comme pour d'autres langages et
n'afficher que le résultat.
Soit $u_0
\i
n
\m
athbb{N}^
*
$,
\b
egin{equation
*
}
\f
orall n
\g
e 1
\q
uad
u_n=
\b
egin{cases}
\f
rac{u_n}{2},&
\m
box{si }
\f
rac{u_n}{2}
\i
n
\m
athbb{N},
\\
3 u_n+1,&
\m
box{sinon.}
\e
nd{cases}
\e
nd{equation
*
}
<a
id=
"Python"
></a>
# Python
<a
id=
"Ex%C3%A9cution%20Python"
></a>
## Exécution Python
On trace une courbe, qu'on stocke dans un fichier, et on écrit les
sorties textes
import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(-5,5,100)
print ("déclare une figure")
fig = plt.figure()
print ("trace la fonction sinus")
plt.plot(x,np.sin(x))
filename = 'sin.png'
fig.tight_layout()
print ("sauve la fonction dans le fichier,", filename)
plt.savefig(filename)
print ("fin")
déclare une figure
trace la fonction sinus
sauve la fonction dans le fichier, sin.png
fin
Et voici la figure obtenue (elle est stockée dans un fichier)

<a
id=
"Exemple%20de%20code%20python%20non%20ex%C3%A9cut%C3%A9"
></a>
## Exemple de code python non exécuté
print("x=",(both))
<a
id=
"gnuplot"
></a>
# gnuplot
reset
set grid
plot [0:2] sin(x**x)**2*exp(x)

This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment