Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3024faf9f3fb6d4a4556f625ee88167e
mooc-rr
Commits
db415418
Commit
db415418
authored
Jul 16, 2020
by
ZackOSX
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
un dernier commit après all
parent
c91d3a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
234 additions
and
0 deletions
+234
-0
toy_document_orgmode_R_fr.org
module2/exo1/toy_document_orgmode_R_fr.org
+234
-0
No files found.
module2/exo1/toy_document_orgmode_R_fr.org
View file @
db415418
...
...
@@ -82,3 +82,237 @@ faisant ~<r~ ou ~<R~ suivi de ~Tab~).
Maintenant, à vous de jouer! Vous pouvez effacer toutes ces
informations et les remplacer par votre document computationnel.
#+BEGIN_SRC emacs-lisp
(directory-files ".")
#+END_SRC
#+RESULTS:
| #toy_document_orgmode_R_fr.org# | . | .#toy_document_orgmode_R_fr.org | .. | cars.png | cosxsx.png | toy_document_en.Rmd | toy_document_fr.Rmd | toy_document_orgmode_R_en.org | toy_document_orgmode_R_fr.html | toy_document_orgmode_R_fr.org | toy_document_orgmode_python_en.org | toy_document_orgmode_python_fr.org | toy_notebook_en.ipynb | toy_notebook_fr.ipynb |
#+BEGIN_SRC ruby :results list
Dir.entries('.')
#+END_SRC
#+RESULTS:
- .
- ..
- #toy_document_orgmode_R_fr.org#
- .#toy_document_orgmode_R_fr.org
- cars.png
- cosxsx.png
- toy_document_en.Rmd
- toy_document_fr.Rmd
- toy_document_orgmode_python_en.org
- toy_document_orgmode_python_fr.org
- toy_document_orgmode_R_en.org
- toy_document_orgmode_R_fr.html
- toy_document_orgmode_R_fr.org
- toy_notebook_en.ipynb
- toy_notebook_fr.ipynb
#+RESULTS:
| #toy_document_orgmode_R_fr.org# | .#toy_document_orgmode_R_fr.org | cars.png | cosxsx.png | toy_document_en.Rmd | toy_document_fr.Rmd | toy_document_orgmode_python_en.org | toy_document_orgmode_python_fr.org | toy_document_orgmode_R_en.org | toy_document_orgmode_R_fr.html | toy_document_orgmode_R_fr.org | toy_notebook_en.ipynb | toy_notebook_fr.ipynb |
#+BEGIN_SRC sh
ls -1a
#+END_SRC
#+RESULTS:
| #toy_document_orgmode_R_fr.org# |
| 0 |
| .#toy_document_orgmode_R_fr.org |
| .. |
| cars.png |
| cosxsx.png |
| double-space.rb |
| primes.txt |
| toy_document_en.Rmd |
| toy_document_fr.Rmd |
| toy_document_orgmode_R_en.org |
| toy_document_orgmode_R_fr.html |
| toy_document_orgmode_R_fr.html~ |
| toy_document_orgmode_R_fr.org |
| toy_document_orgmode_R_fr.pdf |
| toy_document_orgmode_R_fr.tex |
| toy_document_orgmode_python_en.org |
| toy_document_orgmode_python_fr.org |
| toy_notebook_en.ipynb |
| toy_notebook_fr.ipynb |
#+BEGIN_SRC ruby :results output
puts 'Hello World'
5 * 6
#+END_SRC
#+RESULTS:
: Hello World
#+BEGIN_SRC ruby :results list
Dir.entries('.').sort.select do |file|
file[0] != '.'
end
#+END_SRC
#+RESULTS:
- #toy_document_orgmode_R_fr.org#
- cars.png
- cosxsx.png
- toy_document_en.Rmd
- toy_document_fr.Rmd
- toy_document_orgmode_R_en.org
- toy_document_orgmode_R_fr.html
- toy_document_orgmode_R_fr.org
- toy_document_orgmode_python_en.org
- toy_document_orgmode_python_fr.org
- toy_notebook_en.ipynb
- toy_notebook_fr.ipynb
#+BEGIN_SRC ruby :results output :file primes.txt
require 'prime'
Prime.each(5000) do |prime|
p prime
end
#+END_SRC
#+RESULTS:
[[file:primes.txt]]
#+BEGIN_SRC ruby :tangle double-space.rb
while s = gets
print s ; puts
end
#+END_SRC
#+RESULTS:
: nil
Precede each line in the text from standard in (or file) with the
current line number.
See [[http://benoithamelin.tumblr.com/ruby1line][one liners]].
#+BEGIN_SRC ruby :results output
while s = gets
puts "#{$<.file.lineno}: #{s}"
end
#+END_SRC
#+RESULTS:
#+PROPERTY: tangle lineno.rb
#+PROPERTY: comments org
#+BEGIN_SRC ruby
while s = gets
puts "#{$<.file.lineno}: #{s}"
end
#+END_SRC
#+RESULTS:
: nil
#+PROPERTY: tangle lineno.rb
#+PROPERTY: comments org
#+HEADER: :var a=42 d=56 :var f=23
#+HEADERS: :var b=79 e=79
#+BEGIN_SRC ruby :var c=3 g=2 :export both
[ a, b, c, d, e, f, g ]
#+END_SRC
#+RESULTS:
| 42 | 79 | 3 | 56 | 79 | 23 | 2 |
#+NAME: twelve-primes
#+BEGIN_SRC ruby
require 'prime'
Prime.first 12
#+END_SRC
#+RESULTS: twelve-primes
| 2 | 3 | 5 | 7 | 11 | 13 | 17 | 19 | 23 | 29 | 31 | 37 |
#+BEGIN_SRC python :var primes=twelve-primes
return primes[-1]
#+END_SRC
#+RESULTS:
: 37
#+NAME: cool-numbers
#+BEGIN_SRC emacs-lisp
(mapcar (lambda (i)
(list i (random 10)
(expt i 2) (random 100)
(expt i 3) (random 1000)))
(number-sequence 1 10))
#+END_SRC
#+RESULTS: cool-numbers
| 1 | 0 | 1 | 99 | 1 | 657 |
| 2 | 8 | 4 | 5 | 8 | 720 |
| 3 | 1 | 9 | 19 | 27 | 252 |
| 4 | 6 | 16 | 68 | 64 | 549 |
| 5 | 4 | 25 | 20 | 125 | 772 |
| 6 | 0 | 36 | 28 | 216 | 821 |
| 7 | 6 | 49 | 14 | 343 | 572 |
| 8 | 0 | 64 | 47 | 512 | 654 |
| 9 | 5 | 81 | 8 | 729 | 874 |
| 10 | 0 | 100 | 34 | 1000 | 462 |
#+NAME: skip_first
#+BEGIN_SRC elisp
(require 'use-package)
(use-package graphviz-dot-mode
:ensure t
:config
(setq graphviz-dot-indent-width 4))
(use-package company-graphviz-dot)
#+END_SRC
#+BEGIN_SRC sh :post skip_first(data=*this*)
ls -lhG
#+END_SRC
#+RESULTS:
| -rw-r--r-- | 1 | zackx | staff | 9,1K | 16 | jul | 02:45 | #toy_document_orgmode_R_fr.org# |
| -rw-r--r-- | 1 | zackx | staff | 21K | 16 | jul | 02:26 | cars.png |
| -rw-r--r-- | 1 | zackx | staff | 19K | 15 | jul | 17:59 | cosxsx.png |
| -rw-r--r--@ | 1 | zackx | staff | 42B | 16 | jul | 02:28 | double-space.rb |
| -rw-r--r-- | 1 | zackx | staff | 3,1K | 16 | jul | 02:25 | primes.txt |
| -rw-r--r-- | 1 | zackx | staff | 1,3K | 15 | jul | 17:59 | toy_document_en.Rmd |
| -rw-r--r-- | 1 | zackx | staff | 1,4K | 15 | jul | 17:59 | toy_document_fr.Rmd |
| -rw-r--r-- | 1 | zackx | staff | 3,2K | 15 | jul | 17:59 | toy_document_orgmode_R_en.org |
| -rw-r--r--@ | 1 | zackx | staff | 16K | 16 | jul | 02:26 | toy_document_orgmode_R_fr.html |
| -rw-r--r--@ | 1 | zackx | staff | 13K | 15 | jul | 19:24 | toy_document_orgmode_R_fr.html~ |
| -rw-r--r-- | 1 | zackx | staff | 6,1K | 16 | jul | 02:28 | toy_document_orgmode_R_fr.org |
| -rw-r--r-- | 1 | zackx | staff | 3,8K | 15 | jul | 17:59 | toy_document_orgmode_python_en.org |
| -rw-r--r-- | 1 | zackx | staff | 3,9K | 15 | jul | 17:59 | toy_document_orgmode_python_fr.org |
| -rw-r--r-- | 1 | zackx | staff | 441B | 15 | jul | 17:59 | toy_notebook_en.ipynb |
| -rw-r--r-- | 1 | zackx | staff | 441B | 15 | jul | 17:59 | toy_notebook_fr.ipynb |
#+BEGIN_SRC dot :file some-illustration.png
digraph {
a -> b;
b -> c:
c -> a;
}
#+END_SRC
#+RESULTS:
[[file:some-illustration.png]]
- Unicode References :: for instance, \alpha, \beta and \gamma.
- Subscripts :: like Hydrogen atoms, H_2, and Water, H_{2}O.
- Superscripts :: The mass of the sun is 1.989 x 10^30 kg.
- Embedded Equations :: Surrounded with either single =$=, like $a^2=b$,
or escaped parenthesis, like: \( b=\frac{1}{2} \)
- Separated equations :: Either in double =$$= or escaped brackets, like
this: $$ a=\frac{1}{2}\sqrt{2} $$ or this: \[ a=-\sqrt{2} \] or this:
\begin{equation}
x=\sqrt{b}
\end{equation}
#+OPTIONS: tex:t
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment