Commit 03694413 authored by P Fournier's avatar P Fournier

Mon journal mis à jour

parent bc2b57f6
# -*- mode: org -*-
# -*- coding: utf-8 -*-
#+STARTUP: overview indent inlineimages logdrawer
#+TITLE: Journal
#+AUTHOR: Pfou
#+LANGUAGE: en
#+TAGS: LIG(L) HOME(H) Europe(E) Blog(B) noexport(n) Stats(S)
#+TAGS: Epistemology(E) Vulgarization(V) Teaching(T) R(R) OrgMode(O) Python(P)
#+EXPORT_SELECT_TAGS: Blog
#+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+COLUMNS: %25ITEM %TODO %3PRIORITY %TAGS
#+SEQ_TODO: TODO(t!) STARTED(s!) WAITING(w@) APPT(a!) | DONE(d!) CANCELLED(c!) DEFERRED(f!)
* 2018
** 2018-02 March
*** 2018-02-12 Monday
**** Demonstrating Emacs/Orgmode shortcuts
These informations were gathered and first demonstrated in my [[https://github.com/alegrand/RR_webinars/blob/master/1_replicable_article_laboratory_notebook/index.org][First
webinar on reproducible research: litterate programming]].
***** Emacs shortcuts
Here are a few convenient emacs shortcuts for those that have never
used emacs. In all of the emacs shortcuts, =C=Ctrl=, =M=Alt/Esc or Cmd with MacOs= and
=S=Shift=. Note that you may want to use two hours to follow the emacs
tutorial (=C-h t=). In the configuration file CUA keys have been
activated and allow you to use classical copy/paste (=C-c/C-v=)
shortcuts. This can be changed from the Options menu.
- =C-x C-c= exit
- =C-x C-s= save buffer
- =C-g= panic mode ;) type this whenever you want to exit an awful
series of shortcuts
- =C-Space= start selection marker although selection with shift and
arrows should work as well
- =C-l= reposition the screen
- =C-_= (or =C-z= if CUA keys have been activated)
- =C-s= search
- =M-%= REPLACE
- =C-X C-H= GET THE LIST OF EMACS SHORTCUTS
- =C-C C-H= GET THE LIST OF EMACS SHORTCUTS CONSIDERING THE MODE YOU ARE
CURRENTLY USING (E.G., C, LISP, ORG, ...)
- WITH THE "/REPRODUCIBLE RESEARCH/" EMACS CONFIGURATION, ~C-X G~ ALLOWS
YOU TO INVOKE [[HTTPS://MAGIT.VC/][MAGIT]] (PROVIDED YOU INSTALLED IT BEFOREHAND!) WHICH
IS A NICE GIT INTERFACE FOR EMACS.
THERE ARE A BUNCH OF CHEATSHEETS ALSO AVAILABLE OUT THERE (E.G.,
[[HTTP://WWW.SHORTCUTWORLD.COM/EN/LINUX/EMACS_23.2.1.HTML][THIS ONE FOR EMACS]] AND [[HTTP://ORGMODE.ORG/ORGCARD.TXT][THIS ONE FOR ORG-MODE]] OR THIS [[HTTP://SACHACHUA.COM/BLOG/WP-CONTENT/UPLOADS/2013/05/HOW-TO-LEARN-EMACS-V2-LARGE.PNG][GRAPHICAL ONE]]).
***** ORG-MODE
:LOGBOOK:
- STATE "TODO" FROM [2022-07-25 LUN. 15:59]
:END:
MANY EMACS SHORTCUTS START BY =C-X=. ORG-MODE'S SHORTCUTS GENERALY
START WITH =C-C=.
- =TAB= FOLD/UNFOLD
- =C-C C= CAPTURE (FINISH CAPTURING WITH =C-C C-C=, THIS IS EXPLAINED ON
THE TOP OF THE BUFFER THAT JUST OPENED)
- =C-C C-C= DO SOMETHING USEFUL HERE (TAG, EXECUTE, ...)
- =C-C C-O= OPEN LINK
- =C-C C-T= SWITCH TODO
- =C-C C-E= EXPORT
- =M-ENTER= NEW ITEM/SECTION
- =C-C A= AGENDA (TRY THE =L= OPTION)
- =C-C C-A= ATTACH FILES
- =C-C C-D= SET A DEADL1INE (USE =S-ARROWS= TO NAVIGATE IN THE DATES)
- =A-ARROWS= MOVE SUBTREE (ADD SHIFT FOR THE WHOLE SUBTREE)
***** ORG-MODE BABEL (FOR LITERATE PROGRAMMING)
- =<S + TAB= TEMPLATE FOR SOURCE BLOC. YOU CAN EASILY ADAPT IT TO GET
THIS:
#+BEGIN_EXAMPLE
#+BEGIN_SRC SHELL
LS
#+END_SRC
#+END_EXAMPLE
NOW IF YOU =C-C C-C=, IT WILL EXECUTE THE BLOCK.
#+BEGIN_EXAMPLE
#+RESULTS:
| #JOURNAL.ORG# |
| JOURNAL.HTML |
| JOURNAL.ORG |
| JOURNAL.ORG~ |
#+END_EXAMPLE
- SOURCE BLOCKS HAVE MANY OPTIONS (FORMATTING, ARGUMENTS, NAMES,
SESSIONS,...), WHICH IS WHY I HAVE MY OWN SHORTCUTS =<B + TAB= BASH
BLOCK (OR =B= FOR SESSIONS).
#+BEGIN_EXAMPLE
#+BEGIN_SRC SHELL :RESULTS OUTPUT :EXPORTS BOTH
LS /TMP/*201*.PDF
#+END_SRC
#+RESULTS:
: /TMP/2015_02_BORDEAUX_OTL_TUTORIAL.PDF
: /TMP/2015-ASPLOS.PDF
: /TMP/2015-EUROPAR-THREADMAP.PDF
: /TMP/EUROPAR2016-1.PDF
: /TMP/EUROPAR2016.PDF
: /TMP/M2-PDES-PLANNING-EXAMENS-JANVIER2016.PDF
#+END_EXAMPLE
- I HAVE DEFINED MANY SUCH TEMPLATES IN MY CONFIGURATION. YOU CAN
GIVE A TRY TO =<R=, =<R=, =<RR=, =<G=, =<P=, =<P=, =<M= ...
- SOME OF THESE TEMPLATES ARE NOT SPECIFIC TO BABEL: E.G., =<H=, =<L=,
=<L=, =<C=, =<E=, ...
Calculs en R
:LOGBOOK:
- State "TODO" from [2022-07-25 lun. 16:00]
:END:
#+begin_src R :results output :session *R* :exports both
cars
#+end_src
#+RESULTS:
#+begin_example
speed dist
1 4 2
2 4 10
3 7 4
4 7 22
5 8 16
6 9 10
7 10 18
8 10 26
9 10 34
10 11 17
11 11 28
12 12 14
13 12 20
14 12 24
15 12 28
16 13 26
17 13 34
18 13 34
19 13 46
20 14 26
21 14 36
22 14 60
23 14 80
24 15 20
25 15 26
26 15 54
27 16 32
28 16 40
29 17 32
30 17 40
31 17 50
32 18 42
33 18 56
34 18 76
35 18 84
36 19 36
37 19 46
38 19 68
39 20 32
40 20 48
41 20 52
42 20 56
43 20 64
44 22 66
45 23 54
46 24 70
47 24 92
48 24 93
49 24 120
50 25 85
#+end_example
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
plot(cars)
#+end_src
#+RESULTS:
[[file:/tmp/babel-mKDiCj/figurekDTY2a.png]]
#+begin_src python :results output :session :exports both
x = 20
print (x)
#+end_src
#+RESULTS:
: 20
#+begin_src python :results output :session :exports both
x += 20
print(x)
print(x)
#+end_src
#+RESULTS:
: 40
: 40
#+begin_src shell :results output :exports both
ls /tmp
#+end_src
#+RESULTS:
#+begin_example
babel-mKDiCj
emacsSWd96L
hsperfdata_micercle
mozilla_micercle0
pid-1739
qtsingleapp-RStudi-c679-3e8-lockfile
RtmpLqjHYc
sddm-:0-JqIdPD
sddm-auth33164a56-3431-448a-be7c-af5cb1353068
snap.keepassxc
ssh-r9FAvanImVyg
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-bolt.service-DVQ9We
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-colord.service-fn7Sxg
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-fwupd.service-t9Uw0h
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-haveged.service-Y1cVig
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-ModemManager.service-JSlm3f
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-systemd-logind.service-lIeVdh
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-systemd-resolved.service-BAVrLh
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-systemd-timesyncd.service-pE552g
systemd-private-1f80d17fef804f5db92b4c1365e8ffbe-upower.service-u97c9g
Temp-720cb998-9422-44af-9020-befd81cdacb4
xauth-1000-_0
#+end_example
* 2022
** 2022-07 juillet
*** 2022-07-25 lundi
**** Première manipulation d'Emacs en mode org Journal
C'est un peu compliqué !
Entered on [2022-07-25 lun. 16:06]
[file:~/org/journal.org::*2022][2022]] Calculs en R
:LOGBOOK:
- State "TODO" from [2022-07-25 lun. 16:00]
:END:
*** 2022-07-27 mercredi
**** Une nouvelle entrée ce mercredi 27/07/22 !
Des notes :
- note 1
- note 2
Entered on [2022-07-27 mer. 15:00]
[[file:~/org/journal.org::*Premi%C3%A8re%20manipulation%20d'Emacs%20en%20mode%20org%20Journal][Première manipulation d'Emacs en mode org Journal]]
*** 2022-07-29 vendredi
**** Nouvelle entrée
Base de donnée : Résultats des étapes 16 à 21 sauvegardées en csv
~/Documents/Data-Sciences/Tutoriel/Data-tourisme/
Entered on [2022-07-29 ven. 02:00]
[[file:~/org/journal.org]]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment