this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

start rapport

Signed-off-by: Gwenn Le Bihan <gwenn.lebihan7@gmail.com>

+222 -43
+6 -4
.github/workflows/typst.yml
··· 18 18 - name: Checkout repository 19 19 uses: actions/checkout@v3 20 20 21 - - name: Compile logs 22 - uses: lvignoli/typst-action@main 23 - with: { source_file: "logs.typ" } 21 + # - name: Compile logs 22 + # uses: lvignoli/typst-action@main 23 + # with: { source_file: "logs.typ" } 24 24 25 25 - name: Compile rapport 26 26 uses: lvignoli/typst-action@main 27 - with: { source_file: "rapport.typ" } 27 + with: 28 + source_file: rapport/main.typ 29 + options: --root=. 28 30 29 31 - name: Commit and push changes 30 32 uses: EndBug/add-and-commit@v9
enseeiht.jpeg

This is a binary file and will not be displayed.

enseeiht.png

This is a binary file and will not be displayed.

laas.jpeg

This is a binary file and will not be displayed.

rapport/main.pdf

This is a binary file and will not be displayed.

+95
rapport/main.typ
··· 1 + #import "template.typ": arkheion, arkheion-appendices, monospace 2 + #import "utils.typ": cut-around, cut-between, dedent, include-function 3 + 4 + #import "@preview/diagraph:0.3.2" 5 + #show raw.where(lang: "dot"): it => diagraph.render(it.text) 6 + #show raw.where(lang: "mermaid"): it => diagraph.render( 7 + it.text.replace("graph TD", "digraph {").replace("-->", "->") + "}", 8 + ) 9 + 10 + 11 + #let imagefigure(path, caption, size: 100%) = figure( 12 + image(path, width: size), 13 + caption: caption, 14 + ) 15 + 16 + #let diagram(caption: "", size: 100%, content) = figure( 17 + caption: caption, 18 + kind: image, 19 + scale(size, content, reflow: true), 20 + ) 21 + 22 + #let breakout(content) = block( 23 + inset: 1em, 24 + fill: luma(95%), 25 + radius: 4pt, 26 + width: 100%, 27 + pad(x: 1em, align(center, text(size: 1.1em, content))), 28 + ) 29 + 30 + #let codesnippet(caption: "", content, lang: "rust", size: 1em) = { 31 + let snip = text( 32 + size: size, 33 + block( 34 + inset: 1.5em, 35 + fill: luma(95%), 36 + radius: 4pt, 37 + width: 100%, 38 + // Figure itself is already non breakable, AFAIK 39 + breakable: caption != "", 40 + if type(content) == str { 41 + raw( 42 + lang: lang, 43 + content, 44 + ) 45 + } else { 46 + content 47 + }, 48 + ), 49 + ) 50 + 51 + if caption != "" { 52 + figure(caption: caption, align(left, snip)) 53 + } else { 54 + snip 55 + } 56 + } 57 + 58 + #show link: underline 59 + 60 + #show: arkheion.with( 61 + title: [_gz-unitree_: Reinforcement learning en robotique avec validation par moteurs de physique multiples pour le H1v2 d'Unitree], 62 + headertitle: "gz-unitree", 63 + authors: ( 64 + ( 65 + name: "Gwenn Le Bihan", 66 + email: "gwenn.lebihan@etu.inp-n7.fr", 67 + affiliation: "ENSEEIHT", 68 + ), 69 + ), 70 + logo: [ 71 + #stack( 72 + dir: ltr, 73 + spacing: 2em, 74 + image("../laas.jpeg", height: 10em), 75 + image( 76 + "../enseeiht.png", 77 + height: 10em, 78 + width: 11em, 79 + fit: "contain", 80 + ), 81 + ) 82 + ], 83 + date: [#datetime.today().day() Novembre 2025], 84 + ) 85 + 86 + #pagebreak() 87 + 88 + 89 + 90 + #bibliography("../bib.yaml") 91 + 92 + #show: arkheion-appendices 93 + 94 + #heading(numbering: none)[Annexes] 95 +
+111
rapport/utils.typ
··· 1 + #let cut-lines = ( 2 + starts, 3 + ends, 4 + content, 5 + keep_delimiting: false, 6 + ) => { 7 + let lines = content.split(regex("\r?\n")) 8 + let predicate = pred => if type(pred) == str { 9 + it => it.trim() == str 10 + } else if type(pred) == function { 11 + pred 12 + } else if type(pred) == regex { 13 + it => it.find(pred) != none 14 + } else { 15 + panic("cut-between predicates must be strings or functions") 16 + } 17 + let start_index = lines.position(predicate(starts)) 18 + 19 + if start_index == none { 20 + none 21 + } else { 22 + let lines_from_start = lines.slice(if keep_delimiting { 23 + start_index 24 + } else { 25 + calc.max(start_index + 1, 0) 26 + }) 27 + 28 + lines_from_start 29 + .slice( 30 + 0, 31 + lines_from_start.position(predicate(ends)) 32 + + if keep_delimiting { 1 } else { 0 }, 33 + ) 34 + .join("\n") 35 + } 36 + } 37 + 38 + #let cut-between = (starts, ends, content) => cut-lines( 39 + starts, 40 + ends, 41 + content, 42 + keep_delimiting: false, 43 + ) 44 + #let cut-around = (starts, ends, content) => cut-lines( 45 + starts, 46 + ends, 47 + content, 48 + keep_delimiting: true, 49 + ) 50 + 51 + #let dedent = content => { 52 + let lines = content.split(regex("\r?\n")) 53 + let min_indent = lines 54 + .filter(it => it.trim() != "") 55 + .map(it => it.clusters().position(c => c != " ")) 56 + .fold(99999, (a, b) => calc.min(a, b)) 57 + 58 + lines.map(it => it.slice(calc.min(it.len(), min_indent))).join("\n") 59 + } 60 + 61 + 62 + #let include-function = ( 63 + filepath, 64 + name, 65 + lang: none, 66 + is_method: false, 67 + transform: it => it, 68 + ) => { 69 + let start_pattern = if lang == "rust" { 70 + if is_method { 71 + regex("^ (pub )?fn " + name) 72 + } else { 73 + regex("^(pub )?fn " + name) 74 + } 75 + } else if lang == "python" { 76 + regex("^def " + name) 77 + } else if lang == none { 78 + panic("specify a source language") 79 + } else { 80 + panic(lang + " is not supported for now. Use cut-between directly.") 81 + } 82 + 83 + let end_pattern = if lang == "rust" { 84 + if is_method { 85 + regex("^ \}") 86 + } else { 87 + regex("^\}") 88 + } 89 + } else if lang == "python" { 90 + regex("^# end") // TODO pass next line to cut-between 91 + } else { 92 + none 93 + } 94 + 95 + let contents = cut-around( 96 + start_pattern, 97 + end_pattern, 98 + read(filepath), 99 + ) 100 + 101 + if contents == none { 102 + [ 103 + Woops! function #name not in #filepath .\_. 104 + Searched for a line beginning with #start_pattern in: 105 + 106 + #raw(lang: lang, read(filepath)) 107 + ] 108 + } else { 109 + raw(lang: lang, dedent(transform(contents))) 110 + } 111 + }
snazzylight.tmTheme rapport/snazzylight.tmTheme
+10 -39
template.typ rapport/template.typ
··· 1 - // #let sig(in-between) = stack( 2 - // dir: ltr, 3 - // spacing: 0.5em, 4 - // move(dy: -0.07em, image("heart.png", width: 2%)), 5 - // in-between, 6 - // move(dy: -0.15em, image("flag.png", width: 2.5%)), 7 - // ) 8 1 9 2 // From https://github.com/mgoulao/arkheion, slightly tweaked parce que le Français. 10 3 #let arkheion( ··· 22 15 set document(author: authors.map(a => a.name), title: title) 23 16 set page( 24 17 margin: (left: 25mm, right: 25mm, top: 25mm, bottom: 30mm), 18 + numbering: (no, total) => if no > 1 { 19 + [#no / #total] 20 + } else { 21 + none 22 + }, 25 23 header: text( 26 24 fill: luma(30%), 27 25 stack( ··· 64 62 ), 65 63 ), 66 64 ), 67 - numbering: (current, ..total) => if total.pos().len() > 0 and current == total.at(0) { 68 - // sig(str(current)) 69 - str(current) 70 - } else { 71 - str(current) 72 - }, 73 65 number-align: center, 74 66 ) 75 - show raw: set text(size: 0.85em, font: ("MartianMono NF", "Martian Mono")) 67 + show raw: set text(size: 0.85em, font: ("MartianMono Nerd Font", "MartianMono NF", "Martian Mono")) 76 68 set text(font: "New Computer Modern", lang: "fr") 77 69 set raw(theme: "snazzylight.tmTheme") 78 70 show math.equation: set text(weight: 400) ··· 105 97 106 98 pad( 107 99 x: 0%, 108 - y: 25%, 100 + y: 30%, 109 101 { 110 102 if logo != none { 111 103 pad( 112 - top: 1em, 113 - align(center)[ 114 - #image(logo, width: 80%) 115 - ], 104 + top: -8em, 105 + align(center, logo), 116 106 ) 117 107 } 118 108 ··· 176 166 ) 177 167 } 178 168 179 - align(center)[#{ 180 - if type(date) == datetime { 181 - date 182 - .display("[day padding:none] [month repr:long] [year]") 183 - .replace("January", "janvier") 184 - .replace("February", "février") 185 - .replace("March", "mars") 186 - .replace("April", "avril") 187 - .replace("May", "mai") 188 - .replace("June", "juin") 189 - .replace("July", "juillet") 190 - .replace("August", "août") 191 - .replace("September", "septembre") 192 - .replace("October", "octobre") 193 - .replace("November", "novembre") 194 - .replace("December", "décembre") 195 - } else { 196 - date 197 - } 198 - }] 169 + align(center)[#date] 199 170 200 171 // Abstract. 201 172 if abstract != none {