Import work from year 2013-2014

This commit is contained in:
Benjamin Bertrand
2017-06-16 09:46:40 +03:00
commit 32262a4ecf
1788 changed files with 113187 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
\documentclass[a4paper,10pt]{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/tools/style/classDS}
\usepackage{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/2013_2014}
% Title Page
\titre{4}
% \quatreC \quatreD \troisB \troisPro
\classe{\quatreD}
\date{18 décembre 2013}
%\duree{1 heure}
\sujet{%{{infos.subj%}}}
% DS DSCorr DM DMCorr Corr
\typedoc{DS}
\begin{document}
\maketitle
Le barème est donné à titre indicatif, il pourra être modifié.
\begin{Exo}[6]
% Copié de http://euler.ac-versailles.fr/eulerwikis/attach/Yann_Bourit/tri_rect_cercles_%E9quations_a.pdf
$[AB]$ est un segment de 10cm.$C$ un point du segment $[AB]$ tel que $AC = 6cm$. $\mathcal{C}1$ est le cercle de diamètre $[AC]$ et $\mathcal{C}2$ est le cercle de diamètre $[CB]$.
\begin{enumerate}
\item Tracer la figure.
\item Placer $D$ un point du cercle $\mathcal{C}1$ different de $A$ et $C$. Puis placer le point $E$, le point d'intersection entre le cercle $\mathcal{C}2$ et $(CD)$.
\item Quelle est la nature du triangle $ADC$?
\item Quelle est la nature du triangle $BEC$?
\item Démontrer que $(AD)$ et $(EB)$ sont parallèles.
\end{enumerate}
\end{Exo}
\begin{Exo}[6]
\begin{minipage}[h]{0.4\textwidth}
\includegraphics[scale=0.2]{./fig/rectangle.pdf}
\end{minipage}
\begin{minipage}[h]{0.6\textwidth}
\begin{enumerate}
\item Exprimer $AD$ en fonction de $x$.
\item Expliquer pourquoi l'aire du rectangle $ABCD$ est égale à $21x$.
\item Expliquer pourquoi le périmètre du rectangle $ABCD$ est égale à $6x + 14$.
\item Si $x = 2$, quelle est l'aire du rectangle $ABCD$?
\item Si $x = 1,5$, quel est le périmètre du rectangle $ABCD$?
\end{enumerate}
\end{minipage}
\end{Exo}
\begin{Exo}[3]
Calculer sans utiliser de nombres à virgule,les opérations suivantes:
\begin{eqnarray*}
A & = & %{{ exo.frac1() %}} \\
B & = & %{{ exo.frac3() %}} \\
C & = & %{{ exo.frac4() %}}
\end{eqnarray*}
\end{Exo}
\begin{Exo}[2]
Évaluer les expressions suivantes:
\begin{eqnarray*}
%{{ exo.exp1(letter = "A")%}} \\
%{{ exo.exp2(letter = "B") %}}
\end{eqnarray*}
\end{Exo}
\begin{Exo}[2]
Simplifier les expressions suivantes
%\begin{eqnarray*}
% I & = &
% J & = &
%\end{eqnarray*}
\end{Exo}
%\begin{Exo}[bonus]
%
%\end{Exo}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End:

View File

@@ -0,0 +1,80 @@
\documentclass[a4paper,10pt]{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/tools/style/classDS}
\usepackage{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/2013_2014}
% Title Page
\titre{4}
% \quatreC \quatreD \troisB \troisPro
\classe{\quatreD}
\date{18 décembre 2013}
%\duree{1 heure}
\sujet{1}
% DS DSCorr DM DMCorr Corr
\typedoc{DS}
\begin{document}
\maketitle
Le barème est donné à titre indicatif, il pourra être modifié.
\begin{Exo}[6]
% Copié de http://euler.ac-versailles.fr/eulerwikis/attach/Yann_Bourit/tri_rect_cercles_%E9quations_a.pdf
$[AB]$ est un segment de 10cm.$C$ un point du segment $[AB]$ tel que $AC = 6cm$. $\mathcal{C}1$ est le cercle de diamètre $[AC]$ et $\mathcal{C}2$ est le cercle de diamètre $[CB]$.
\begin{enumerate}
\item Tracer la figure.
\item Placer $D$ un point du cercle $\mathcal{C}1$ different de $A$ et $C$. Puis placer le point $E$, le point d'intersection entre le cercle $\mathcal{C}2$ et $(CD)$.
\item Quelle est la nature du triangle $ADC$?
\item Quelle est la nature du triangle $BEC$?
\item Démontrer que $(AD)$ et $(EB)$ sont parallèles.
\end{enumerate}
\end{Exo}
\begin{Exo}[6]
\begin{minipage}[h]{0.4\textwidth}
\includegraphics[scale=0.2]{./fig/rectangle.pdf}
\end{minipage}
\begin{minipage}[h]{0.6\textwidth}
\begin{enumerate}
\item Exprimer $AB$ en fonction de $x$.
\item Expliquer pourquoi l'aire du rectangle $ABCD$ est égale à $21x$.
\item Expliquer pourquoi le périmètre du rectangle $ABCD$ est égale à $6x + 14$.
\item Si $x = 2$, quelle est l'aire du rectangle $ABCD$?
\item Si $x = 1,5$, quel est le périmètre du rectangle $ABCD$?
\end{enumerate}
\end{minipage}
\end{Exo}
\begin{Exo}[3]
Calculer sans utiliser de nombres à virgule,les opérations suivantes:
\begin{eqnarray*}
A & = & -\frac{-1}{9}-\frac{-1}{9} \\
B & = & \frac{-1}{6}-\frac{-11}{5} \\
C & = & 5+\frac{14}{5}
\end{eqnarray*}
\end{Exo}
\begin{Exo}[2]
Évaluer les expressions suivantes:
\begin{eqnarray*}
A = -4x + 7 & \mbox{avec} & x = -3 \\
B = 9x(-8x + 2) & \mbox{avec} & x = 8
\end{eqnarray*}
\end{Exo}
\begin{Exo}[2]
Simplifier les expressions suivantes
\begin{eqnarray*}
I & = & -5 \times 2y \times (-3) \times 2\\
J & = & 5t - 2t + 4 - 12 + 6t
\end{eqnarray*}
\end{Exo}
%\begin{Exo}[bonus]
%
%\end{Exo}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End:

View File

@@ -0,0 +1,80 @@
\documentclass[a4paper,10pt]{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/tools/style/classDS}
\usepackage{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/2013_2014}
% Title Page
\titre{4}
% \quatreC \quatreD \troisB \troisPro
\classe{\quatreD}
\date{18 décembre 2013}
%\duree{1 heure}
\sujet{2}
% DS DSCorr DM DMCorr Corr
\typedoc{DS}
\begin{document}
\maketitle
Le barème est donné à titre indicatif, il pourra être modifié.
\begin{Exo}[6]
% Copié de http://euler.ac-versailles.fr/eulerwikis/attach/Yann_Bourit/tri_rect_cercles_%E9quations_a.pdf
$[AB]$ est un segment de 10cm.$C$ un point du segment $[AB]$ tel que $AC = 6cm$. $\mathcal{C}1$ est le cercle de diamètre $[AC]$ et $\mathcal{C}2$ est le cercle de diamètre $[CB]$.
\begin{enumerate}
\item Tracer la figure.
\item Placer $D$ un point du cercle $\mathcal{C}1$ different de $A$ et $C$. Puis placer le point $E$, le point d'intersection entre le cercle $\mathcal{C}2$ et $(CD)$.
\item Quelle est la nature du triangle $ADC$?
\item Quelle est la nature du triangle $BEC$?
\item Démontrer que $(AD)$ et $(EB)$ sont parallèles.
\end{enumerate}
\end{Exo}
\begin{Exo}[6]
\begin{minipage}[h]{0.4\textwidth}
\includegraphics[scale=0.2]{./fig/rectangle.pdf}
\end{minipage}
\begin{minipage}[h]{0.6\textwidth}
\begin{enumerate}
\item Exprimer $AB$ en fonction de $x$.
\item Expliquer pourquoi l'aire du rectangle $ABCD$ est égale à $21x$.
\item Expliquer pourquoi le périmètre du rectangle $ABCD$ est égale à $6x + 14$.
\item Si $x = 2$, quelle est l'aire du rectangle $ABCD$?
\item Si $x = 1,5$, quel est le périmètre du rectangle $ABCD$?
\end{enumerate}
\end{minipage}
\end{Exo}
\begin{Exo}[3]
Calculer sans utiliser de nombres à virgule,les opérations suivantes:
\begin{eqnarray*}
A & = & -\frac{-16}{5}-\frac{13}{5} \\
B & = & \frac{-11}{2}-\frac{7}{9} \\
C & = & 6-\frac{17}{8}
\end{eqnarray*}
\end{Exo}
\begin{Exo}[2]
Évaluer les expressions suivantes:
\begin{eqnarray*}
A = -6x + 1 & \mbox{avec} & x = 3 \\
B = -2x(-6x + 5) & \mbox{avec} & x = 1
\end{eqnarray*}
\end{Exo}
\begin{Exo}[2]
Simplifier les expressions suivantes
\begin{eqnarray*}
I & = & -2 \times (-2y) \times (-4) \times 2\\
J & = & 7t - t + 4 - 14 + 6t
\end{eqnarray*}
\end{Exo}
%\begin{Exo}[bonus]
%
%\end{Exo}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End:

View File

@@ -0,0 +1,219 @@
#!/usr/bin/env python
# encoding: utf-8
from random import randint, random
"""Classe which generate randomly fractions sums
Types of sums
1 -> b / a + c / a
2 -> b / a + c / ka
3 -> b / a + e / d
4 -> f + b / a or b / a + f
where:
a integer > 2
b integer different from 0 (could be coprime with a)
c integer different from 0 (could be coprime with a or ka)
e integer different from 0 (could be coprime with d)
d integer > 2 ( a not divisible by d and d not divisible by a)
k integer > 2
f integer different from 0
Signs can be mod
"""
def a(min_ = 2, max_ = 10):
"""Generate randomly a
:param min_: minimum value for a
:param max_: maximum value for a
:returns: a value
"""
return randint(min_, max_)
def k(min_ = 2, max_ = 5):
"""Generate randomly k
:param min_: minimum value for k
:param max_: maximum value for k
:returns: k value
"""
return randint(min_, max_)
def b(a_ = 0, min_ = -20, max_ = 20):
"""Generate randomly b
:param a: the value of a if b has to be coprime with a (default 0 which means not necessarily coprime)
:param min_: minimum value for b (default -20)
:param max_: maximum value for b (default 20)
:returns: b value
"""
b_ = 0
while b_ == 0 or not coprime:
b_ = randint(min_, max_)
if a_ == 0:
coprime = 1
elif b_ != 0:
gcd_ = gcd(abs(a_),abs(b_))
coprime = (gcd_ == 1)
return b_
def c(a_ = 0, k_ = 1, min_ = -20, max_ = 20):
"""Generate randomly c
:param a: the value of a if c has to be coprime with a (default 0 which means not necessarily coprime)
:param k: the value of a if c has to be coprime with ak (default 0 which means not necessarily coprime)
:param min_: minimum value for c (default -20)
:param max_: maximum value for c (default 20)
:returns: c value
"""
return b(a_ = a_*k_, min_ = min_, max_ = max_)
def e(d_ = 0, min_ = -20, max_ = 20):
"""Generate randomly e
:param d: the value of a if e has to be coprime with a (default 0 which means not necessarily coprime)
:param min_: minimum value for e (default -20)
:param max_: maximum value for e (default 20)
:returns: e value
"""
return b(a_ = d_, min_ = min_, max_ = max_)
def d(a_, min_ = 2, max_ = 10):
"""Generate randomly d
:param a: the value of a
:param min_: minimum value for d
:param max_: maximum value for d
:returns: d value
"""
d_ = randint(min_, max_)
div = (not a_ % d_) or (not d_ % a_)
while div:
d_ = randint(min_, max_)
div = (not a_ % d_) or (not d_ % a_)
return d_
def f(min_ = -10, max_ = 10):
"""Generate randomly f
:param min_: minimum value for f
:param max_: maximum value for f
:returns: f value
"""
f_ = randint(min_, max_)
while f_ == 0:
f_ = randint(min_, max_)
return f_
def plusOrMinus(p = 0.5):
"""Return plus with prob p and minus otherwise
"""
pm = random()
return "+"*(pm >= p) + "-"*(pm < p)
def nothingOrMinus(p = 0.5):
"""Return nothing with prob p and minus otherwise
"""
pm = random()
return ""*(pm >= p) + "-"*(pm < p)
def type1():
"""@todo: Docstring for type1
:returns: @todo
"""
a_ = a()
b_ = b(a_=a_)
c_ = c(a_=a_)
return nothingOrMinus() + "\\frac{" + str(b_) + "}{" + str(a_) + "}" + plusOrMinus() + "\\frac{" + str(c_) + "}{" + str(a_) + "}"
def type2():
"""@todo: Docstring for type2
:returns: @todo
"""
a_ = a()
b_ = b(a_=a_)
k_ = k()
c_ = c(a_=a_, k_ = k_)
return nothingOrMinus() + "\\frac{" + str(b_) + "}{" + str(a_) + "}" + plusOrMinus() + "\\frac{" + str(c_) + "}{" + str(k_*a_) + "}"
def type3():
"""@todo: Docstring for type3
:returns: @todo
"""
a_ = a()
b_ = b(a_=a_)
c_ = c(a_=a_)
d_ = d(a_)
return nothingOrMinus() + "\\frac{" + str(b_) + "}{" + str(a_) + "}" + plusOrMinus() + "\\frac{" + str(c_) + "}{" + str(d_) + "}"
def type4():
"""@todo: Docstring for type4
:returns: @todo
"""
a_ = a()
b_ = b(a_=a_)
f_ = f()
return str(f_) + plusOrMinus() + "\\frac{" + str(b_) + "}{" + str(a_) + "}"
def gcd(a_, b_):
"""Compute gcd(a,b)
:param a: first number
:param b: second number
:returns: the gcd
"""
if a_ > b_:
c_ = a_ % b_
else:
c_ = b_ % a_
if c_ == 0:
return min(a_,b_)
elif a_ == 1:
return b_
elif b_ == 1:
return a_
else:
return gcd(min(a_,b_), c_)
if __name__ == '__main__':
# print(a())
# print(b())
# print(c())
# print(d(3))
# print(e())
# print(f())
print(type1())
print(type2())
print(type3())
print(type4())
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del

View File

@@ -0,0 +1,163 @@
#!/usr/bin/env python
# encoding: utf-8
from random import randint, uniform
from math import sqrt
from jinja2 import Template
"""
Generate expression for litteral calculous
3 types of expression (a, b, c != 0, 1)
1 -> ax + b and eval for x != -b / a
2 -> ax(bx + c) and eval for x != 0 and x != -c / b
3 -> ax^2 + b and eval for x != +-sqrt(b/a) (if a and b have same sign)
"""
def gene_type1(min_ = -10, max_ = 10):
"""@todo: Docstring for gene_type1
:param min_: @todo
:param max_: @todo
:returns: @todo
"""
a, b = 0, 0
while (b in [0]) or (a in [0, 1]):
a = randint(min_, max_)
b = randint(1, max_)
return "{}x + {}".format(a,b), [-b/a]
def gene_type2(min_, max_):
"""@todo: Docstring for gene_type2
:param min_: @todo
:param max_: @todo
:returns: @todo
"""
a, b, c = 0, 0, 0
while (a in [0, 1]) or (b in [0, 1]) or c in [0]:
a = randint(min_, max_)
b = randint(min_, max_)
c = randint(1, max_)
return "{}x({}x + {})".format(a,b,c), [0, -c/b]
def gene_type3(min_ = -10, max_ = 10):
"""@todo: Docstring for gene_type3
:param min_: @todo
:param max_: @todo
:returns: @todo
"""
a, b = 0, 0
while (b in [0]) or (a in [0, 1]):
a = randint(min_, max_)
b = randint(1, max_)
if a*(-b) > 0:
VI = [-sqrt(-b/a), sqrt(-b/a)]
else:
VI = []
return "{}x^2 + {}".format(a,b), VI
def get_goodX(VI, approx = 0, min_ = -10, max_ = 10):
"""@todo: Docstring for get_goodX
:param VI: @todo
:returns: @todo
"""
x = uniform(min_, max_)
if approx == 0:
x = int(x)
else:
x = round(x,approx)
while x in VI:
x = uniform(min_, max_)
if approx == 0:
x = int(x)
else:
x = round(x,approx)
return x
def fullExo(min_ = -10 , max_ = 10):
"""Generate the whole exo
:param min_: @todo
:param max_: @todo
:returns: @todo
"""
template = Template("""
\\begin{equation*}
A = {{type1}} \\qquad B = {{type2}} \\qquad C = {{type3}}
\\end{equation*}
Évaluer $A$, $B$ et $C$ pour $x = {{x1}}$ puis $x = {{x2}}$""")
type1, VI1 = gene_type1(min_, max_)
type2, VI2 = gene_type2(min_, max_)
type3, VI3 = gene_type3(min_, max_)
VI = VI1 + VI2 + VI3
x1, x2 = get_goodX(VI), get_goodX(VI, approx = 1)
info = {"type1": type1, "type2": type2, "type3": type3, "x1":x1, "x2":x2}
exo = template.render(**info)
return exo
def exp1(min_ = -10, max_ = 10, letter = "A"):
"""@todo: Docstring for exp1
:param min: @todo
:param max: @todo
:returns: @todo
"""
exp, VI = gene_type1(min_,max_)
x = get_goodX(VI)
tpl = Template("{{A}} = {{exp}} & \\mbox{avec} & x = {{x}}")
return tpl.render(A = letter, exp = exp, x = x)
def exp2(min_ = -10, max_ = 10, letter = "A"):
"""@todo: Docstring for exp1
:param min: @todo
:param max: @todo
:returns: @todo
"""
exp, VI = gene_type2(min_,max_)
x = get_goodX(VI)
tpl = Template("{{A}} = {{exp}} & \\mbox{avec} & x = {{x}}")
return tpl.render(A = letter, exp = exp, x = x)
if __name__ == '__main__':
print(fullExo())
# -----------------------------
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del

Binary file not shown.

View File

@@ -0,0 +1,293 @@
<?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="1052.3622"
height="744.09448"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="carre.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.78215874"
inkscape:cx="526.18109"
inkscape:cy="372.04724"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1364"
inkscape:window-height="748"
inkscape:window-x="0"
inkscape:window-y="274"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-308.2677)">
<rect
style="fill:none;stroke:#000000;stroke-width:5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-4"
width="87.994865"
height="87.994865"
x="62.565792"
y="677.79578" />
<g
id="g3947"
transform="translate(14.063641,-7.6710771)">
<g
transform="matrix(1.1508674,0,0,1.1508674,101.20168,130.22774)"
id="g3822"
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753"
width="76.459602"
height="76.459602"
x="105.65327"
y="475.78723" />
<g
id="g3794"
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none">
<rect
y="475.78723"
x="259.1832"
height="76.459602"
width="76.459602"
id="rect3753-1"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
y="475.78723"
x="182.4604"
height="76.459602"
width="76.459602"
id="rect3753-7"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
<g
id="g3794-9"
transform="matrix(0,-1.1508674,1.1508674,0,-236.42714,975.77835)"
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-1-4"
width="76.459602"
height="76.459602"
x="259.1832"
y="475.78723" />
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-7-8"
width="76.459602"
height="76.459602"
x="182.4604"
y="475.78723" />
</g>
</g>
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3990"
transform="matrix(1.1508674,0,0,1.1508674,184.02686,94.312645)">
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
transform="translate(329.83303,30.931413)"
id="g3822-2">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-45"
width="76.459602"
height="76.459602"
x="105.65327"
y="475.78723" />
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3794-5">
<rect
y="475.78723"
x="259.1832"
height="76.459602"
width="76.459602"
id="rect3753-1-1"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
y="475.78723"
x="182.4604"
height="76.459602"
width="76.459602"
id="rect3753-7-7"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3794-9-1"
transform="matrix(0,-1,1,0,36.46403,765.63865)">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-1-4-1"
width="76.459602"
height="76.459602"
x="259.1832"
y="475.78723" />
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-7-8-5"
width="76.459602"
height="76.459602"
x="182.4604"
y="475.78723" />
</g>
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3822-27"
transform="translate(406.32072,30.931416)">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-6"
width="76.459602"
height="76.459602"
x="105.65327"
y="475.78723" />
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3794-1">
<rect
y="475.78723"
x="259.1832"
height="76.459602"
width="76.459602"
id="rect3753-1-42"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
y="475.78723"
x="182.4604"
height="76.459602"
width="76.459602"
id="rect3753-7-3"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3822-27-2"
transform="translate(252.17588,30.133169)">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-6-2"
width="76.459602"
height="76.459602"
x="105.65327"
y="475.78723" />
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3794-1-1">
<rect
y="475.78723"
x="259.1832"
height="76.459602"
width="76.459602"
id="rect3753-1-42-6"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
y="475.78723"
x="182.4604"
height="76.459602"
width="76.459602"
id="rect3753-7-3-8"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3822-27-2-5"
transform="matrix(0,-1,1,0,36.218278,689.10708)">
<rect
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect3753-6-2-7"
width="76.459602"
height="76.459602"
x="105.65327"
y="475.78723" />
<g
style="stroke-width:4.34454918;stroke-miterlimit:4;stroke-dasharray:none"
id="g3794-1-1-6">
<rect
y="475.78723"
x="259.1832"
height="76.459602"
width="76.459602"
id="rect3753-1-42-6-1"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
y="475.78723"
x="182.4604"
height="76.459602"
width="76.459602"
id="rect3753-7-3-8-8"
style="fill:none;stroke:#000000;stroke-width:4.34454918;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
</g>
<text
xml:space="preserve"
style="font-size:57.15011597px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="7.0528221"
y="848.96002"
id="text4050"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4052"
x="7.0528221"
y="848.96002">Motif 0</tspan></text>
<text
xml:space="preserve"
style="font-size:57.15011597px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="270.43103"
y="848.96002"
id="text4054"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
x="270.43103"
y="848.96002"
id="tspan3910">Motif 1</tspan></text>
<text
xml:space="preserve"
style="font-size:57.15011597px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="718.33698"
y="848.96002"
id="text4058"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4060"
x="718.33698"
y="848.96002">Motif 2</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

View File

@@ -0,0 +1,189 @@
<?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"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="rectangle.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.46093032"
inkscape:cx="376.12504"
inkscape:cy="530.90875"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1022"
inkscape:window-height="580"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Serif;-inkscape-font-specification:Droid Serif"
x="144.47932"
y="439.92328"
id="text3862"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3864"
x="144.47932"
y="439.92328" /></text>
<rect
style="fill:none;stroke:#000000;stroke-width:6.86689806;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3753"
width="472.66934"
height="712.85144"
x="143.07857"
y="172.54842" />
<text
xml:space="preserve"
style="font-size:63.63145828px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
x="78.381531"
y="148.34587"
id="text3791"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3793"
x="78.381531"
y="148.34587">A</tspan></text>
<text
xml:space="preserve"
style="font-size:63.63145828px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
x="643.81812"
y="148.25266"
id="text3795"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3797"
x="643.81812"
y="148.25266">B</tspan></text>
<text
xml:space="preserve"
style="font-size:63.63145828px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
x="644.70361"
y="939.55042"
id="text3799"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3801"
x="644.70361"
y="939.55042">C</tspan></text>
<text
xml:space="preserve"
style="font-size:63.63145828px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
x="74.808472"
y="939.53491"
id="text3803"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3805"
x="74.808472"
y="939.53491">D</tspan></text>
<text
xml:space="preserve"
style="font-size:57.26831436px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Serif;-inkscape-font-specification:Droid Serif"
x="361.09982"
y="140.2101"
id="text3807"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3809"
x="361.09982"
y="140.2101">x</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:5.96544933;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 388.76163,150.00417 -28.28169,48.98531"
id="path3811"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:5.96544933;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 551.03871,150.00417 -28.28169,48.98531"
id="path3811-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:5.96544933;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 233.9121,150.00417 -28.28169,48.98531"
id="path3811-5"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:5.96544933;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 393.43583,862.59727 -28.28168,48.98531"
id="path3811-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:5.96544933;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 555.71292,862.59727 -28.28169,48.98531"
id="path3811-2-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:5.96544933;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 238.58631,862.59727 -28.28169,48.98531"
id="path3811-5-8"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:63.63145828px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
x="68.211792"
y="528.69354"
id="text3866"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3868"
x="68.211792"
y="528.69354">7</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 297.90868,193.79701 0,-47.94667"
id="path3102"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 458.37024,194.11665 0,-47.94667"
id="path3102-5"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 459.00952,911.39895 0,-47.94667"
id="path3102-8"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 297.2694,908.2025 0,-47.94667"
id="path3102-7"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -0,0 +1,33 @@
Notes sur 12 litt frac triCerc
##############################
:date: 2014-07-01
:modified: 2014-07-01
:tags: DS
:category: 4e
:authors: Benjamin Bertrand
:summary: Pas de résumé, note créée automatiquement parce que je ne l'avais pas bien fait...
`Lien vers 12_litt_frac_triCerc.pdf <12_litt_frac_triCerc.pdf>`_
`Lien vers 12_litt_frac_triCerc_1.pdf <12_litt_frac_triCerc_1.pdf>`_
`Lien vers 12_litt_frac_triCerc_1.tex <12_litt_frac_triCerc_1.tex>`_
`Lien vers 12_litt_frac_triCerc_2.tex <12_litt_frac_triCerc_2.tex>`_
`Lien vers number_rotation.py <number_rotation.py>`_
`Lien vers 12_litt_frac_triCerc.tex <12_litt_frac_triCerc.tex>`_
`Lien vers call_litt.py <call_litt.py>`_
`Lien vers 12_litt_frac_triCerc_2.pdf <12_litt_frac_triCerc_2.pdf>`_
`Lien vers add_frac.py <add_frac.py>`_
`Lien vers fig/rectangle.pdf <fig/rectangle.pdf>`_
`Lien vers fig/carre.pdf <fig/carre.pdf>`_

View File

@@ -0,0 +1,90 @@
#!/usr/bin/env python
# encoding: utf-8
import jinja2, random, os
import sys
import optparse
def randfloat(approx = 1, low = 0, up = 10):
""" return a random number between low and up with approx floating points """
ans = random.random()
ans = ans*(up - low) + low
ans = round(ans, approx)
return ans
random.randfloat = randfloat
def gaussRandomlist(mu = 0, sigma = 1, size = 10, manip = lambda x:x):
""" return a list of a gaussian sample """
ans = []
for i in range(size):
ans += [manip(random.gauss(mu,sigma))]
return ans
random.gaussRandomlist = gaussRandomlist
def gaussRandomlist_strInt(mu = 0, sigma = 1, size = 10):
return gaussRandomlist(mu, sigma, size, manip = lambda x: str(int(x)))
random.gaussRandomlist_strInt = gaussRandomlist_strInt
# ------------------
# Spécial exo!
from add_frac import type1, type3, type4
exo = {"frac1": type1, "frac3": type3, "frac4": type4}
from call_litt import exp1, exp2
exo["exp1"] = exp1
exo["exp2"] = exp2
report_renderer = jinja2.Environment(
block_start_string = '%{',
block_end_string = '%}',
variable_start_string = '%{{',
variable_end_string = '%}}',
loader = jinja2.FileSystemLoader(os.path.abspath('.'))
)
def main(options):
template = report_renderer.get_template(options.template)
if options.output:
output_basename = options.output
else:
tpl_base = os.path.splitext(options.template)[0]
output_basename = tpl_base + "_"
for subj in range(options.num_subj):
subj = subj+1
dest = output_basename + str(subj) + '.tex'
with open( dest, 'w') as f:
f.write(template.render(random = random, infos = {"subj" : subj}, exo = exo))
os.system("pdflatex " + dest)
if not options.dirty:
os.system("rm *.aux *.log")
if __name__ == '__main__':
parser = optparse.OptionParser()
parser.add_option("-t","--tempalte",action="store",type="string",dest="template", help="File with template")
parser.add_option("-o","--output",action="store",type="string",dest="output",help="Base name for output (without .tex or any extension))")
parser.add_option("-n","--number_subjects", action="store",type="int", dest="num_subj", default = 2, help="The number of subjects to make")
parser.add_option("-d","--dirty", action="store_true", dest="dirty", help="Do not clean after compilation")
(options, args) = parser.parse_args()
if not options.template:
print("I need a template!")
sys.exit(0)
main(options)
# -----------------------------
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del