Skip to content
Snippets Groups Projects
Commit 27761012 authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

cleans up.

parent 02c40e51
Branches
No related tags found
No related merge requests found
......@@ -2,3 +2,4 @@
_config.yml
_build
_toc.yml
.DS_Store
<!---
This file was generated from `meta.yml`, please do not edit manually.
Follow the instructions on https://github.com/coq-community/templates to regenerate.
--->
# {{& fullname }}
{{# action }}
[![Docker CI][docker-action-shield]][docker-action-link]
{{/ action }}
{{# action }}
[docker-action-shield]: https://github.com/{{ organization }}/{{ shortname }}/workflows/Docker%20CI/badge.svg?branch={{branch}}{{^branch}}develop{{/branch}}
[docker-action-link]: https://github.com/{{ organization }}/{{ shortname }}/actions?query=workflow:"CI"
{{/ action }}
{{& description }}
{{# license }}
- License: [{{& fullname }}]({{ file }}{{^ file }}LICENSE{{/ file }})
{{/ license }}
{{& build }}{{^ build }}## Building and installation instructions
{{& documentation }}
#!/bin/bash
docker build --progress=plain -t brunoe/${PWD##*/}:$(git rev-parse --abbrev-ref HEAD) .
## 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
# comment
*.cut
# 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
*.lzo
*.lzs
*.slg
*.slo
*.sls
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplot
*.gnuplot
*.table
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# svg
svg-inkscape/
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# titletoc
*.ptc
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib
File deleted
\documentclass{article}
\title{My first document}
\date{2023-03-24}
\author{John Doe}
\begin{document}
\maketitle
\section{Introduction}
Hello World!
\section{Conclusion}
It's cool.
\end{document}
\ No newline at end of file
#!/usr/bin/env bash
WORK_DIR="${HOME}/JUPYTER_WORK_DIR"
IMAGE_REPO=brunoe
IMAGE_NAME=jupyter-base
IMAGE_TAG=develop
OUTPUT_DIR="/home/jovyan/work/nbartefacts/${PWD##*/}"
docker run --rm \
--name ${IMAGE_NAME}-book-${PWD##*/} \
--volume ${PWD}:/home/jovyan/notebooks/ \
--volume ${WORK_DIR}:/home/jovyan/work/ \
--env NB_UID=$UID \
--env OUTPUT_DIR=$OUTPUT_DIR \
${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG} \
sh -c 'cd /home/jovyan/notebooks/ && \
mkdir -p $OUTPUT_DIR && \
jupyter nbconvert --to notebook --execute --inplace *.ipynb
for format in html pdf slides; do
jupyter nbconvert --output $OUTPUT_DIR --to $format *.ipynb;
done'
# --user root \
# --volume /var/run/docker.sock:/var/run/docker.sock \
This diff is collapsed.
#!/usr/bin/env bash
WORK_DIR="${HOME}/JUPYTER_WORK_DIR"
IMAGE_REPO=brunoe
IMAGE_NAME=jupyter-base
IMAGE_TAG=develop
OUTPUT_DIR="/home/jovyan/work/nbartefacts/${PWD##*/}/book/"
docker run --rm \
--name ${IMAGE_NAME}-book-${PWD##*/} \
--volume ${PWD}:/home/jovyan/notebooks/ \
--volume ${WORK_DIR}:/home/jovyan/work/ \
--env OUTPUT_DIR=$OUTPUT_DIR \
--env NB_UID=$UID \
${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG} \
sh -c 'mkdir -p $OUTPUT_DIR && \
cd /home/jovyan/notebooks/ && \
jupyter-book clean $OUTPUT_DIR && \
for builder in html singlehtml pdflatex; do \
jupyter-book build \
--path-output $OUTPUT_DIR \
--toc /home/jovyan/notebooks/book/_toc.yml \
--config /home/jovyan/notebooks/book/_config.yml \
--builder $builder \
.
done'
# --user root \
# --volume /var/run/docker.sock:/var/run/docker.sock \
---
fullname: Quickstart notebook for Jupyter Base Image
branch: develop
description: |-
A simple notebook to present the basic usage of https://github.com/ebpro/jupyter-base/
build: |-
## Building and installation instructions
documentation: |-
## Documentation
print("hello python in jupyer vscode.")
\ No newline at end of file
%% Cell type:markdown id:a0074533-2d1c-489e-be74-12cdbdaecbb3 tags:
# A Book from Base
## Introduction
Il est aussi possible d'écrire des livres jupyter book donc à contenu dynamique avec une syntaxe étendue de markdown : <https://jupyterbook.org/en/stable/reference/cheatsheet.html>
%% Cell type:markdown id:4f5cce20-c342-4b79-848b-3b221ddc115b tags:
## Blocs
Avec des citations :
> this is a nice book.
```{epigraph}
Real cool book.
-- John Doe
```
A footnote[^mylabel]: My footnote text.
%% Cell type:markdown id:dee7f519-0067-4d5a-b137-41a44ed9ab2a tags:
des blocs
```{note}
Here is a note (not working in slides).
```
```{warning} Avertissement
C'est un outil addictif.
```
%% Cell type:markdown id:5f5177f8-db62-4ee6-9436-8617f8471a23 tags:
## Tables
Des tables et figures plus avancées comme {numref}`t_ex-table-01` qui est un exemple de table avec référence.
```{list-table} Table title
:name: t_ex-table-01
:header-rows: 1
* - Col1
- Col2
* - Row1 under Col1
- Row1 under Col2
* - Row2 under Col1
- Row2 under Col2
```
%% Cell type:markdown id:63044cb9-5756-4e1e-b462-ed6dd6af6a8a tags:
## Math
Ou des Mathématiques
soit en ligne dans le texte ($z=\sqrt{x^2+y^2}$).
mais avec des références dans les équations :
$$
a^2 + b^2 = c^2
$$(eqn:pyth)
Pythagore cf. {eq}`eqn:pyth`
%% Cell type:markdown id:a6fc252d-ddb4-48d4-8534-f87eaf199f7e tags:
mais aussi des environnements LaTeX comme `align`
\begin{align}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{align}
%% Cell type:markdown id:8fd894e3-529d-4d49-a2e8-164e6234e111 tags:
## Code
Il est possible de mettre du code dans le texte :
en blocs :
```python
note = "Python"
print(node)
```
```java
String note = "Java";
System.out.println(node);
```
ou en ligne : {python}` for i in range(1,5)`
%% Cell type:code id:1a915546-c484-4ed4-81c1-07473db6bcc9 tags:
``` python
from myst_nb import glue
my_variable = "here is some text!"
sum=0
for i in range(1,10):
sum+=i
glue("glued_text", my_variable)
glue("ss_sum", sum)
```
%% Output
%% Cell type:markdown id:f66fe296-75e2-456b-939c-ff3b23e5ef99 tags:
Here is an example of how to glue text: {glue:}`glued_text` and numbers : {glue:}`ss_sum`
%% Cell type:markdown id:2daae2ee-33c0-47e8-b89c-4178d8335b58 tags:
```{uml}
Alice -> Bob: Hi!
Alice <- Bob: How are you?
```
%% Cell type:code id:1c87b47f-c025-4a27-b95c-aa194ff20ac0 tags:
``` python
```
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.14.5
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---
# A Book from Base
## Introduction
Il est aussi possible d'écrire des livres jupyter book donc à contenu dynamique avec une syntaxe étendue de markdown : <https://jupyterbook.org/en/stable/reference/cheatsheet.html>
## Blocs
Avec des citations :
> this is a nice book.v
```{epigraph}
Real cool book.
-- John Doe
```
A footnote[^mylabel]: My footnote text.
des blocs
```{note}
Here is a note (not working in slides).
```
```{warning} Avertissement
C'est un outil addictif.
```
+++ {"user_expressions": []}
## Tables
Des tables et figures plus avancées comme {numref}`t_ex-table-01` qui est un exemple de table avec référence.
```{list-table} Table title
:name: t_ex-table-01
:header-rows: 1
* - Col1
- Col2
* - Row1 under Col1
- Row1 under Col2
* - Row2 under Col1
- Row2 under Col2
```
+++ {"user_expressions": []}
## Math
Ou des Mathématiques
soit en ligne dans le texte ($z=\sqrt{x^2+y^2}$).
mais avec des références dans les équations :
$$
a^2 + b^2 = c^2
$$(eqn:pyth)
Pythagore cf. {eq}`eqn:pyth`
+++ {"user_expressions": []}
mais aussi des environnements LaTeX comme `align`
\begin{align}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{align}
+++ {"user_expressions": []}
## Code
Il est possible de mettre du code dans le texte :
en blocs :
```python
note = "Python"
print(node)
```
```java
String note = "Java";
System.out.println(node);
```
ou en ligne : {python}`for i in range(1,5)`
```{code-cell} ipython3
from myst_nb import glue
my_variable = "here is some text!"
sum=0
for i in range(1,10):
sum+=i
glue("glued_text", my_variable)
glue("ss_sum", sum)
```
+++ {"user_expressions": []}
Here is an example of how to glue text: {glue:}`glued_text` and numbers : {glue:}`ss_sum`
+++ {"user_expressions": []}
```{uml}
Alice -> Bob: Hi!
Alice <- Bob: How are you?
```
```{code-cell} ipython3
```
This diff is collapsed.
run.sh 0 → 100755
#!/usr/bin/env bash
WORK_DIR="${HOME}/JUPYTER_WORK_DIR"
IMAGE_REPO=brunoe
IMAGE_NAME=jupyter-base
IMAGE_TAG=develop
docker run --rm \
--name ${IMAGE_NAME}-${PWD##*/} \
--user root \
--volume ${PWD}:/home/jovyan/notebooks/ \
--volume ${WORK_DIR}:/home/jovyan/works/ \
--publish 8888:8888 \
--env NB_UID=$UID \
${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG} \
start-notebook.sh --notebook-dir=/home/jovyan/notebooks/
# --volume /var/run/docker.sock:/var/run/docker.sock \
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment