repo
stringlengths
26
115
file
stringlengths
54
212
language
stringclasses
2 values
license
stringclasses
16 values
content
stringlengths
19
1.07M
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compute/data-06.typ
typst
Other
// Test reading JSON data. #let data = json("test/assets/files/zoo.json") #test(data.len(), 3) #test(data.at(0).name, "Debby") #test(data.at(2).weight, 150)
https://github.com/JeyRunner/tuda-typst-templates
https://raw.githubusercontent.com/JeyRunner/tuda-typst-templates/main/templates/lib.typ
typst
MIT License
#import "tudapub/tudapub.typ": tudapub #import "tudapub/tudacolors.typ": tuda_colors #import "tudapub/common/props.typ": * #import "tudapub/common/tudapub_title_page.typ": * #import "tudapub/common/outline.typ": *
https://github.com/Its-Alex/resume
https://raw.githubusercontent.com/Its-Alex/resume/master/lib/volunteering.typ
typst
MIT License
#import "components/title.typ": customTitle #import "components/link_with_icon.typ": linkWithIcon #let volunteering(title, volunteering) = [ #customTitle(title) #grid( columns: (100%), gutter: 0pt, row-gutter: 1.5em, ..volunteering.map((volunteeringItem) => [ #block(breakable: false)[ #grid( columns: (40%, 60%), gutter: 0pt, { grid( columns: 100%, gutter: 5pt, { text(weight: 600)[#volunteeringItem.name] } ) }, { grid.cell(align: right)[ #text(weight: 400, rgb("BCBABF"))[(#volunteeringItem.dates)] ] } ) #eval(volunteeringItem.description, mode: "markup") #if type(volunteeringItem.link) == str [ #linkWithIcon( "link.svg", volunteeringItem.link, volunteeringItem.link ) ] ] ]) ) ]
https://github.com/yonatanmgr/university-notes
https://raw.githubusercontent.com/yonatanmgr/university-notes/main/0366-%5BMath%5D/03661101-%5BCalculus%201A%5D/src/attachments/trigo.typ
typst
#import "@preview/cetz:0.2.0" #show math.equation: block.with(fill: white, inset: 1pt) #text(lang: "en", dir: ltr)[ #cetz.canvas(length: 2cm, { import cetz.draw: * set-style( mark: (fill: black, scale: 2), stroke: (thickness: 0.4pt, cap: "round"), angle: ( radius: 0.3, label-radius: .22, fill: green.lighten(80%), stroke: (paint: green.darken(50%)) ), content: (padding: 1pt) ) grid((-1.5, -1.5), (1.4, 1.4), step: 0.5, stroke: gray + 0.2pt) circle((0,0), radius: 1) line((-1.5, 0), (1.5, 0), mark: (end: "stealth")) content((), $ x $, anchor: "west") line((0, -1.5), (0, 1.5), mark: (end: "stealth")) content((), $ y $, anchor: "south") for (x, ct) in ((-1, $ -1 $), (-0.5, $ -1/2 $), (1, $ 1 $)) { line((x, 3pt), (x, -3pt)) content((), anchor: "north", ct) } for (y, ct) in ((-1, $ -1 $), (-0.5, $ -1/2 $), (0.5, $ 1/2 $), (1, $ 1 $)) { line((3pt, y), (-3pt, y)) content((), anchor: "east", ct) } // Draw the green angle cetz.angle.angle((0,0), (1,0), (1, calc.tan(30deg)), label: $\ \ \ \ x$) line((0,0), (1, calc.tan(30deg))) set-style(stroke: (thickness: 1.2pt)) line((1, 0), (1, calc.tan(30deg)), name: "tan", stroke: (paint: red)) content("tan.end", $C$, anchor: "west") }) ]
https://github.com/ohmycloud/computer-science-notes
https://raw.githubusercontent.com/ohmycloud/computer-science-notes/main/Misc/make_cover.typ
typst
#let cover = ( "课题名称": "Raku 中关于 Grammar 的研究", "副标题": "Rakulang Rocks", "学院": "霍格沃兹浪浪山学院", "专业": "魔法与炼丹", "学生姓名": "小猪妖", "学号": "20080214107", "指导老师": "邓布利多", "日期": datetime.today().display(), "我还没说的": "我的脑子乱哄哄的" ) #let max_title_len = calc.max(..cover.keys().map(x => x.clusters().len())) #grid( columns: (9em, auto), gutter: 16pt, row-gutter: 23pt, ..(cover.keys().zip(cover.values())).flatten().enumerate().map(((idx, value)) => { set text(size: 18pt) if calc.even(idx) { let arr = value.clusters() let padding = (max_title_len - arr.len()) / (arr.len() - 1) arr.join([#h(1em * padding)]) } else { v(-0.6em) block( width: 100%, inset: 4pt, stroke: (bottom: 1pt + black), align(center, value), ) } }), )
https://github.com/Vortezz/fiches-mp2i-physique
https://raw.githubusercontent.com/Vortezz/fiches-mp2i-physique/main/chapitre_5.typ
typst
#import "@preview/cetz:0.0.1" #import "@local/typst-plot:0.0.1": plot, sample #set page(header: box(width: 100%, grid( columns: (100%), rows: (20pt, 8pt), align(right, text("CHAPITRE 5. CIRCUITS ÉLECTRIQUES LINÉAIRES D'ORDRE 2")), line(length: 100%), )), footer: box(width: 100%, grid( columns: (50%, 50%), rows: (8pt, 20pt), line(length: 100%), line(length: 100%), align(left, text("<NAME> - MP2I")), align(right, text("<NAME> - 2023/2024")), ))) #set heading(numbering: "I.1.a") #let titleBox(title) = align(center, block(below: 20pt, box(height: auto, fill: rgb("#eeeeee"), width: auto, inset: 40pt, text(title, size: 20pt, weight: "bold")))) #let proof(content) = text("Preuve", weight: "semibold", fill: rgb("#666666")) + h(1em) + text(content, size: 10pt, fill: rgb("#888888")) #titleBox("Circuits électriques linéaires d'ordre 2") = L'oscillateur non amorti == Présentation On considère le schéma suivant pour l'*oscillateur non amorti* : #figure( cetz.canvas(length: 1cm, debug: false, { import cetz.draw: line, content import "@local/circuitypst:0.0.1": node, to to("idealTension", (-2, -1), (-2, 1), name: "idealTension", i: $i$) to("interruptor", (-2,1), (2,1), label: $K$) to("capacitor", (2,1), (2,-1), label: $C$, i: $i$, v: $U_C$) to("bobine", (2,-1), (-2,-1), label: $L$, i: $i$, v: $U_L$, name: "R2") }), caption: [Oscillateur non amorti (LC série)] ) On a la loi des mailles $E = U_L + U_C$, la caractéristique $U I$ de la bobine $U_L = L (d i)/(d t)$ et la caractéristique $U I$ du condensateur $i = c (d U_c)/(d t)$. Ainsi on a l'équation différentielle linéaire à coefficient constant d'ordre 2 suivante : $E = L C (d^2 U_C)/(d t^2) + U_C " avec " U_(c)(0) = 0 $ C'est l'équation différentielle de _l'oscillateur harmonique_. Il est possible de la mettre sous forme canonique : $dot.double(Theta) + omega_0^2 Theta = "2"^"nd" "membre"$, avec $omega_0$ la *pulsation caractéristique* en $r a d . s^(-1)$. La pulsation caractéristique du LC série est $omega_0 = 1/(sqrt(L C))$. La forme générale des équations différentielles linéaires à coefficient constant d'ordre 2 sont : $Theta_g = A cos(omega_0 t) + B sin(omega_0 t)$ et $Theta_g = C cos(omega_0 + phi)$. Dans le cas des LC série, $U_(C)(t) = E(1 - cos(omega_0 t))$. #proof("On a " + $s_p = E "ainsi" U_(C)(t) = E - A cos(omega_0 t) + B sin(omega_0 t) "," "ensuite on évalue" A "et" B$ + " avec les conditions initiales. " + $cases(U_(C)(0^-) = 0, i(0^-) = 0) ==> cases(U_(C)(0^+) = 0, i(0^+) = 0) ==> cases(U_(C)(0^+) = 0, C (d U_C)/(d t)(0^+) = 0) ==> cases(E + A cos(0) + B sin(0) = 0, (d E)/(d t) - A sin(0) + B cos(0) = 0) ==> cases(A = -E, B = 0)$) == Remarques L'oscillateur non amorti admet la courbe suivante : #figure(plot( sample(x => (1 - calc.cos(3 * x)), min: 0.1, max: 6, samples: 50), width: 6cm, mirror: false, height: 2cm, x-label: $t$ + " (s)", y-label: $E$ + " (V)" ), caption: [Courbe de l'oscillateur amorti]) L'oscillateur possède donc un _comportement oscillent_ avec $2 pi f = omega_0$. Dans la solution $E cos(omega_0 t)$, $E$ représente l'amplitude des oscillements tandis que $omega_0 t$ représente la ? de phase. Dans la formule $A cos(omega_0 t + phi)$ avec $phi$ la phase à l'origine des temps. _Le portrait de phase ne sera pas évoqué dans cette fiche, il forme une ellipse autour de l'origine pour $U$ et une ellipse autour de $E$ pour $u$._ == Énergie du GBF L'énergie fournie par le GBF (*générateur basse fréquence*) se distribue entre une petite partie stockée dans la bobine et une partie stockée dans le condensateur. En moyenne le GBF ne fournit pas de puissance. #proof("On réalise un bilan d'énergie, et on intègre sur une grande valeur de t.")
https://github.com/maucejo/book_template
https://raw.githubusercontent.com/maucejo/book_template/main/template/chapters/intro.typ
typst
MIT License
#import "../../src/book.typ": * // #chapter("Introduction", abstract: lorem(50), numbered: false)[ #show: chapter.with( title: "Introduction", abstract: [#lorem(50)], numbered: false ) == Objectifs #lorem(100) #lorem(25) $ y = f(x) $ #v(1.25em) === Sous-objectifs #figure( image("../images/chapitre1/cas_indus_absorbants.png", width: 75%), caption: [#ls-caption([#lorem(10)], [#lorem(2)])], ) <fig:intro> #lorem(50) #v(1.25em) == Méthodologie #lorem(100) // ]
https://github.com/Lypsilonx/Game-of-Intrigue
https://raw.githubusercontent.com/Lypsilonx/Game-of-Intrigue/main/cover.typ
typst
#import "data.typ": * #set page(fill: black, width: 1024pt, height: 1024pt, margin: 0%) #set text(font: "Inter Tight", fill: white, size: 2.6em) #place( center + horizon, dx: -14pt )[ #logo(banner: true) ]
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/docs/tinymist/module/preview.typ
typst
Apache License 2.0
#import "mod.typ": * #show: book-page.with(title: "Tinymist Preview") Todo: rewrite this guide #link("https://enter-tainer.github.io/typst-preview/arch.html")[Developer Guide: Typst-Preview Architecture]. == Contributing See #link("https://github.com/Myriad-Dreamin/tinymist/blob/main/CONTRIBUTING.md")[CONTRIBUTING.md].
https://github.com/darioglasl/Arbeiten-Vorlage-Typst
https://raw.githubusercontent.com/darioglasl/Arbeiten-Vorlage-Typst/main/01_Einleitung/05_problemstellung.typ
typst
== Aufgabenstellung <headingScope> TODO: text Genauere Informationen zu der Aufgabenstellung und der Beschreibung aus dem #link("https://avt.i.ost.ch/")[AVT] sind im @appendixScope zu finden.
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/CSL_old/oktoich/Hlas5/5_Piatok.typ
typst
#let V = ( "HV": ( ("","Prepodóbne ótče","Vsjá drevá dubrávnaja da vozrádujutsja, drévo víďašče vsečestnóje, strástiju Vladýčneju obrádovanno, blahodáť oblistavájuščeje jáko plámeň ohňá, istočájuščeje jákože vódy darovánija vsím, dúšy prosviščájuščeje i pomyšlénija, nedúhi očiščájuščeje i strásti othoňájuščeje nevídimyja, jazýki inopleménnyja pobeždájuščeje jávi, pobídy podajúščeje vsehdá vírnym, blahoslovénije i véliju mílosť."), ("","","Místu, iďíže stojásťi nózi Hospódni, víroju poklaňájuščesja, jákože prorók rečé: Christá slavoslóvim raspénšahosja i sraspénša prehrišénija náša: júže ot dréva razorívšaho kľátvu, i primirívša Otcú otstojáščyja otňúd pomyšléňmi. Ručnýja že jehó i nožnýja hvózdija, kopijé i trósť, húbu i vinéc oblobyzájušče, dosaždénija i naruhánija, i ína jelíka podját, čéstňi počitájem, ímiže spasóchomsja."), ("","","Vsjá údy Christú sraspném, i mírovi umertvímsja, i mirodéržcu Christú po stopám chodíti voždeľívše, tohóže na rámich božéstvennyj krest nósim, otveržénijem plotskáho vzyhránija, i pochotéj zlých, jáže dúšu vlekút ko hrichú, tomú mňášče predstáti, i zríti tohó na kresťí prihvoždéna, i dúšu svojú v rúci rodíteľu so izdychánijem predávša, jáko da vsehdá s ním búdem nerazlúčni."), ("","Prepodóbne ótče","Jehdá hrózd nenasaždén súšč, jáko lozá otrastíla jesí, uzrívši na drévi povíšena, probodéna že kopijém v božéstvennyja rébra: čtó sijé, hlahólaše, Sýne i Bóže mój? Káko íže nedúhi vsjá i strásti isciľájaj, strásti terpíši, bezstrásten sýj po jestestvú božéstvennomu? Čtó ti bezblahodátniji ľúdije blahodáteľu, sijá vozdáša vmísto blahoďijánij? vopijáše prečístaja: no tohó strasťmí, strastéj mjá svobodíti molí neprestánno, jáko da slávľu ťá."), ("","","Pláčem vsí, i rúci rasprostrém, i bijém v pérsi, tépľi slezjášče i preklóňše koľína, licém bijúšče v zémľu priľížno, i vozdychánija vozpústim k vysoťí, íže bezmístnymi ďíly prohňívavšiji Bóha, zápovidej jehó otveržénijem, izbáviti zovúšče v búduščem suďí vsjákaho mučénija, íže tebé opečálivšyja, i obraščájuščyjasja, moľbámi Mátere tvojejá: za níchže krest preterpíl jesí voplóščsja, i tvojehó cárstvija pričástniki sotvorí."), ("","","Komú upodóbilasja jesí dušé, uspevájušči v hóršich vsehdá, i prilahájušči bezúmno tvojím jázvam strúpy mnóžajšyja, jáko vseťilésňij býti jázvi: ne pomyšľájušči, jáko sudijá približájetsja, jemúže predstáneši vosprijáti po ďijánijem, viný i tomlénija? No obráščšisja pripadí k Ďívi zovúšči: Vladýčice Vladýčice, ne prézri mjá prohňívavšaho Bóha blahomílostivaho, iz tebé na spasénije čelovíkov róždšahosja, i raspénšahosja plótiju."), ("Krestobohoródičen","Rádujsja póstnikom","Izbavlénije nás rádi, i cínu velíkuju, prečístuju króv tvojú izvólil jesí dáti bezhríšne Christé mój, vsím choťáj spasénije polučíti. ťímže ťá zrjášči prihvoždéna Máti tvojá, rydájušči vlasý terzáše svojá, hlahóľušči: čádo, áhnče vseneporóčnyj, mír choťá izbáviti čestnóju tvojéju króviju, ot óčiju mojéju káko zašél jesí Spáse, nezachodímoje sólnce, vsím podajáj prosviščénije, i mír, i véliju mílosť."), ), "S": ( ("","","Hóspodi, pri Moiséji inohdá proróci, tóčiju óbraz krestá tvojehó javľájem, pobiždáše vrahí tvojá. Nýňi že sámyj krest tvój imúšče, pómošči prósim: ukripí cérkov tvojú, mnóhija rádi mílosti, čelovikoľúbče."), ("","","Krest tvój Christé, ášče i drévo vídimo jésť suščestvóm, no božéstvennoju oďíjano jésť síloju: i čúvstvenno mírovi javľájasja, mýslenno náše čudotvorít spasénije. Jemúže poklaňájuščesja, slávim ťá Spáse, pomíluj nás."), ("Múčeničen","","O zemných vsích neradívše, i na múki múžeski derznúvše, blažénnych nadéžd ne pohrišíste: no nebésnomu cárstviju nasľídnicy býste, prechváľniji múčenicy, imúšče derznovénije k čelovikoľubívomu Bóhu, míru umirénije isprosíte, i dušám nášym véliju mílosť."), ("Krestobohoródičen","","Zrjášči drévle áhnca i Sýna svojehó Ďíva Máti i vseblážénnaja otrokovíca, na kresťí vozvýšena, vopijáše slezjášči: uvý mňí Sýne mój, káko umiráješi, Bóh jestestvóm sýj bezsmérten?"), ), ) #let P = ( "1": ( ("","","Koňá i vsádnika v móre čermnóje, sokrušájaj bráni, mýšceju vysókoju Christós istrjasé, Izráiľa že spasé, pobídnuju písň pojúšča."), ("","","Druhíj ráj znájem ťá mýslennyj bez sravnénija, Ďívo Bohonevísto, odoľivájuščij íže vo Jedémi rajú, Bohomáti: tý bo netľínije čelovíkom prozjablá jesí."), ("","","Drévo žízni objáti v raí Adám vozbranén býsť, ot dréva pričastívsja razúmnaho: bezsmértije že podadé, plóť ot tebé Ďívo prijémyj."), ("","","Pérvije ot zemlí sózdan býsť Adám, prečístyma rukáma vsederžíteľa: ot tebé že Bohoródice Ďívo rodísja bez símene nóvyj Adám, ziždíteľ čelovíčestva."), ("","","Bézdna posľídňaja obýde mjá bezmírnych prehrišénij, i vo hlubinú nizvódit mjá ľútaho otčájanija: róždšaja bézdnu milosérdija, uskorí, i spasí mja."), ), "3": ( ("","","Vodruzívyj na ničesómže zémľu poveľínijem tvojím, i povísivyj neoderžímo ťahoťíjuščuju, na nedvížimim Christé, kámeni zápovidej tvojích, cérkov tvojú utverdí, jedíne bláže i čelovikoľúbče."), ("","","Íže živótnym sadóm zémľu sotvorívyj rodíteľnicu, ne súščym na néj pérvije, ot neiskusomúžnyja žený ábije jáko ot zemlí, bezsímennyj voploščájem prišél jesí Slóve Bóžij neizmínnyj."), ("","","Tý jesí zemnoródnych nadéžda i pómošč, i rádosť, i pokróv, i pribížišče, Vladýčice Máti životá. Ťímže mólim: tvojú pómošč nizposlí vsím pojúščym ťá."), ("","","Nedúhujuščij napásťmi ľútymi oderžími, vseďíteľu ščédre, íže vsjáčeskich Bóže, trisvjatúju tvojú skíniju privódim tí vsí v molítvu, i vopijém tí: razriší obderžánija ráb tvojích."), ("","","Smuščájet mjá ľúťi hrichóvnaja volná, vo hlubinú prehrišénij nizvlečá, prečístaja, i búrja soprotívnych pomyšlénij oburevájet dúšu mojú: okormíteľa róždšaja, uskorí izjáti rabá tvojehó."), ), "4": ( ("","","Božéstvennoje tvojé razumív istoščánije, prozorlívo Avvakúm, Christé, so trépetom vopijáše tebí: vo spasénije ľudéj tvojích, spastí pomázannyja tvojá prišél jesí."), ("","","Jéva povinúvšisja zmíju, rodí pečáľ ženám: tý že Ďívo vírovavši Bóžijim viščánijem, vsemú míru rádosť procvilá jesí."), ("","","Pérvije ot rébr Adámovych roždéna Jéva: nýňi že Bóh ot Mátere Bohonevísty, jehóže voploščénna Ďíva bez Otcá rodilá jésť."), ("","","Jéva rádujetsja, drévňaho bo pramáterňa osuždénija svoboždénu otrokovíca pokazá, jáže sudijú začénšaja netľínno, i róždšaja milosérdaho."), ("","","Žitijé mojé prehrišénij ispólnisja, pómysl že strásten, i dušá mojá osuždéna: ťímže tvojím blahoutróbijem pomíluj, i spasí mja Vladýčice."), ), "5": ( ("","","Oďijájsja svítom jáko rízoju, k tebí útreňuju, i tebí zovú: dúšu mojú prosvití omračénnuju Christé, jáko jedín blahoutróben."), ("","","Stólp i óblak svíta ťá obrítše, Ďívo Máti svitodávca, íže po pustýni léstňij choďáščiji ot ľút izbihájem."), ("","","Rádujsja róždšaja Bóha plótiju, préžde vík roždénnaho ot Otcá bezplótňi, javítisja že ábije nám izvólivšaho."), ("","","Sólnce pobidísja tvojéju svítlostiju Maríje: tý bo svitíly nébo ukrasívšaho rukáma objála jesí, i ot tvojéju soscú pitála jesí."), ("","","Da ne osúdiši mené vo óhň nehasímyj, Christé Spáse mój, moľbámi čístyja, róždšija ťá."), ), "6": ( ("","","Neístovstvujuščejesja búreju dušetľínnoju, Vladýko Christé, strastéj móre ukrotí, i ot tlí vozvedí mja jáko blahoutróben."), ("","","Íže v kíťi spásšaho proróka drévle Jónu, nevrédno nosíla jesí vo utróbi tvojéju čúdnaho Bóha čístaja prisnoďívo."), ("","","Deržáščaho Hóspoda morjá, prečístaja Ďívo Bóha nebúrno, jákože síly nosjášči, slánoje vozmuščénija ľstí uspíla jesí."), ("","","Vsjáčeskich tišinú róždši prečístaja Christá, jáže k nemú blahoukrotí molítvami tvojími, júže na mjá strastéj nepostojánnuju búrju."), ("","","V déň pečáli, jehdá choščú ťilésnych soúz razrišítisja, predstáni mí, i obderžánija bisóvskaho ischití."), ), "S": ( ("","","Na kresťí zrjášči ťá Christé Máti tvojá vóleju posreďí razbójniku vísjašča, rasterzájuščisja Máterski utróboju, hlahólaše: bezhríšne Sýne, káko neprávedno na kresťí jákože zloďíj raspjátsja, íže čelovíčeskij oživíti choťá ród, jáko preblahíj?"), ), "7": ( ("","","Prevoznosímyj otcév Hóspodi, plámeň uhasí, ótroki orosí sohlásno pojúščyja: Bóže blahoslovén jesí."), ("","","Íže k práotcu Avraámu prišéstvije Bóh soverší, Sýn tvój býv: i símja jehó vo jazýki blahosloví, blahoslovénnaja."), ("","","Tý ľístvica jesí Jákovľa neskvérnaja: Máter bo jedínu ťá Bóh napisá, jejáže rádi Bóh sovokupí ónaho isčádija."), ("","","Prevoznosímyj so Otcém i Dúchom Sýn, izbráv tebé čístaja, ziló vozľubí v žilíšče sebí voploščájem."), ("","","Bóha, jehóže rodilá jesí, vsehdá molí, otčájannaho mjá spastí, i ulučíti prostýňu, víroju vopijúščemu: Bóže blahoslovén jesí."), ), "8": ( ("","","Tebí vseďíteľu, v peščí ótrocy, vsemírnyj lík splétše, pojáchu: ďilá vsjákaja Hóspoda pójte, i prevoznosíte vo vsjá víki."), ("","","Ispytánija tvojé ubihájet roždestvó Ďívo, víroju že javľájetsja vopijúščym: vsjá ďilá Hospódňa Hóspoda pójte, i prevoznosíte jehó vo víki."), ("","","Vsjáko ďivíčeskija ne otpádši slávy, máterskoju obohatílasja jesí čéstiju, beznevístnaja: vísť íže sijá jávi čudoďíjstvovavyj, jehóže prevoznósim vo víki."), ("","","Vížď blahája prečístaja, smirénnyja mojejá duší ozloblénije, i boľízň preminí vskóri: da ťá slávľu vo víki."), ("","","Prijimí mílostivno tvojú Máter Slóve, moľáščujusja spastí tvojá ľúdi bláže, jáže sťažál jesí čestnóju tvojéju króviju: da tebé blahoslovím vo vsjá víki."), ), "9": ( ("","","Isáije likúj, Ďíva imí vo črévi, i rodí Sýna Jemmanúila: Bóha že i čelovíka, vostók ímja jemú: jehóže veličájušče, Ďívu ublažájem."), ("","","Bohoródice Vladýčice, umolí poklaňájemuju Tróicu, ot nejáže bezstrástno jedínaho plótiju nám rodilá jesí, umiríti súščyja na zemlí, i razrišéniju prehrišénij pojúščym ťá darovátisja."), ("","","Ášče i jedín razumíjetsja licém Jemmanúiľ, no jestestvóm suhúb: sé bo dví vozviščája vóli, jáže v ném i ďíjstva, jehóže rodíteľnicu Bohoródicu ispovídujem."), ("","","Sebé rydáju pomyšľája mojích hrichóv mnóžestvo, i strastéj vozšéstvija, duší mojejá unýnija, i umá mojehó izstuplénija, otčájannaho mjá spasénija spodóbi."), ("","","Vrazí mojí našédše Hóspodi, jákože razbójnicy, výšňuju svítluju i svitovídnuju odéždu sovlékše, i rány mí naložíša mnóhi: tý predstávši jéle žíva vozstávi."), ), ) #let U = ( "S1": ( ("","","Místo lóbnoje ráj býsť: tóčiju bo vodruzísja drévo krestnoje, ábije izrastí hrózd živótnyj, tebí Spáse v náše vesélije, sláva tebí."), ("","","Raspénšahosja Spása i izbáviteľa nášeho vóleju jáko vísť, i jákože blahoizvóli, vospojím vírniji, i proslávim: jáko prihvozdí na kresťí hrichí čelovíkov, izbavľája ot lésti ród čelovíčeskij, i cárstvija spodóbil jésť."), ("Krestobohoródičen","","Na kresťí ťa Christé, zrjášči Máti tvojá, vóleju posreďí razbójniku vísjašča, rasterzájuščisja Máterski utróboju, hlahólaše: bezhríšnyj Sýne, káko bez právdy na kresťí jáko zloďíj prihvozdílsja jesí, ród čelovíčeskij oživíti choťá jáko preblahíj?"), ), "S2": ( ("","","Raspjátije preterpív tvojéju vóleju, i ot tlí čelovíki svobodíl jesí Spáse! Vospivájem vírniji, i poklaňájemsja tí, jáko prosvitíl jesí nás síloju krestnoju, i vsí proslavľájem ťá čelovikoľúbče ščédryj, jáko žiznodávca i Hóspoda."), ("","","Vóleju ščédre krest preterpíl jesí, i drévňuju kľátvu jáže rádi sňídi, jáko vsesíľnyj Bóh tý potrebíl jesí. Ťímže božéstvennyja i čestnýja strásti tvojá Vladýko Christé, pojém i poklaňájemsja slavoslóvjašče neprestánno, jéže páče slóva smotrénije tvojé."), ("","","Sijájet dnés pámjať strástotérpec ímať bo i ot nebés zarjú: lík ánheľskij toržestvújet, i čelovíčeskij ród sprázdnujet. Ťímže móľatsja Hóspodevi, pomílovatisja dušám nášym."), ("Krestobohoródičen","","Krestóm Sýna tvojehó Bohoblahodátnaja, ídoľskaja prélesť vsjá uprazdnísja, i démonskaja kríposť poprásja. Sehó rádi vírniji po dólhu ťá prísno pojém, i blahoslovím, i Bohoródicu voístinnu ispovídajušče ťá veličájem."), ), "S3": ( ("","Sobeznačáľnoje Slóvo","Na kresťí ťa prihvoždéna, i usnúvša, ánheľstiji čínove víďivše, užasóšasja, Iisúse vsích carjú: i pobiždéni byváchu ábije bisóvstviji polcý, i sokrušíšasja vereí ádovy: i smértnoje mučíteľstvo nizložísja, i súščiji vo hrobích mértviji voskresóša."), ("","","Ot dréva hóresť Adám obját, k tľíniju popólzsja závistiju zmiínoju: tebí že prihvoždénu bývšu Iisúse, životá nasladísja, i dréva rádi krestnaho páki vseľájem byvájet na nebesích. I uprazdnísja zmíj, i tľá požérta býsť: i vsí slávu tí prinósim."), ("Krestobohoródičen","","Vozneséna na drévo jáko víďi, róždšaja ťá Spáse, boľíznej kromí, rydáše s pláčem, i vzyváše: uvý mňí sladčájšij Sýne, ujazvľájusja dušéju, na kresťí zrjášči ťá prihvoždéna posreďí dvojú zloďíju, sudóm zloďíjstvennym."), ), "K": ( "P1": ( "1": ( ("","","Spasíteľu Bóhu, v móri ľúdi nemókrymi nohámi nastávľšemu, i faraóna so vsevójinstvom potópľšemu, tomú jedínomu poím, jáko proslávisja."), ("","","Strastoubíjstvennuju Christé, choťínijem tvojím preterpíl jesí strásť, i ubíl jesí v raí drévle nás ubívšaho: ťímže tvojú slávim blahostýňu."), ("","","Vozdvíhlsja jesí na krest, i nizpadésja vráh: i pádšiji vozdvihóchomsja, i rájstiji žíteli Christé, býchom, deržávu slávjašče cárstvija tvojehó."), ("Múčeničen","","Ščitóm kréstnym vooružívšesja dóbri, k boréniju vsjákomu bisóvskomu opolčístesja premúdriji velikomúčenicy: i tohó pobidívše, slávu polučíste."), ("Múčeničen","","Jáko áhncy čestníji, nás rádi stradáľcy áhncu požrénomu prinesóstesja, nečístyja žértvy jávi ustávľše: ťímže ublažájem vás vsechváľniji."), ("Bohoródičen","","Nóvo otročá nám vétchaho déňmi, čístaja Ďívo rodilá jesí, obetšávšeje jestestvó čelovíčeskoje obnovľájušča, vseneporóčnaja, božéstvennoju strástiju svojéju."), ), "2": ( ("","","Spasíteľu Bóhu, v móri ľúdi nemókrymi nohámi nastávľšemu, i faraóna so vsevójinstvom potópľšemu, tomú jedínomu poím, jáko proslávisja."), ("","","Blahoutróbija istóčnik, i predstáteľnicu tépluju vím ťá vseneporóčnaja, Ďívo Máti Maríje, i vzyváju tí: pomíluj i uščédri smirénnuju mojú dúšu."), ("","","V ňídrich tvojích Sýn Bóžij čístaja, vselívsja, i vospriját čelovíčeskoje suščestvó jáko preblahíj, vsích izbávi ot tlí zmíjevy."), ("","","Prosviščénije mí búdi, i spaséniju nadéžda Bohorodíteľnice vseneporóčnaja, prehrišénij razrišájušči plenícy, i izbavľájušči mjá búduščija múki i osuždénija."), ("","","Pomyšlénij lukávych smirénnuju mojú dúšu svobodí, Bohorodíteľnice: i žilíšče Bóžije tú soďílaj, da po dólhu ťá slávľu vsehdá."), ), ), "P3": ( "1": ( ("","","Síloju krestá tvojehó Christé, utverdí mojé pomyšlénije, vo jéže píti i sláviti spasíteľnoje tvojé voznesénije."), ("","","Uvjadáješi plodá tľú, na drévo Spáse vozdvizájem, i netľínija istóčniki nám ot rébr istočáješi, Vladýko."), ("","","Zaklásja na kresťí jákože áhnec, práhi naznámenuja dúš nášich božéstvennoju tvojéju króviju Vladýko: ťímže ťá so stráchom slávim."), ("Múčeničen","","Vjážemi Christóvy stradáľcy, i mnohoobrázňi uraňájemi, i zvirém pometájemi, neprelóžni prebýste."), ("Múčeničen","","Jákože hrózdije vinohráda živótnaho, mučénija vinó istočíša, vírnych serdcá veseľáščeje, Bóha nášeho múčenicy."), ("Bohoródičen","","Žízni nám chodátaj čístaja, umirája na drévi javísja tvój Sýn že i Hospóď, proslavľájaj pojúščyja ťá."), ), "2": ( ("","","Síloju krestá tvojehó Christé, utverdí mojé pomyšlénije, vo jéže píti i sláviti spasíteľnoje tvojé voznesénije."), ("","","V róv pohíbeľnyj ľútych sohrišénij vpádša mjá, Bohorodíteľnice, izvedí blahoutróbnoju tvojéju bláhostiju."), ("","","K véčeru žitijá prišéd, i nedoumínijem oderžím jésm, vopijú ti vsepítaja: tý pomóščnica mí javísja."), ("","","Svjatája Bohoródice čístaja, podážď razrišénije prehrišénij mojích: i spasénije mí isprosí, i rádovanije víčnoje."), ("","","Kápľu mí sléz čístaja podážď, jáko da ot sérdca mojehó otženú nedoumínije, i ískrenno vospojú ťa."), ), ), "P4": ( "1": ( ("","","Uslýšach slúch síly krestá, jáko ráj otvérzesja ím, i vozopích: sláva síľi tvojéj Hóspodi."), ("","","Jehdá zašél jesí na kresťí právdy sólnce Christé, svít nevečérnij vozsijál jesí nám, pojúščym tvojé, Slóve, strášnoje smotrénije."), ("","","Stojášču tí sudijé, inohdá pred sudíščem Christé, osudíl jesí neprávednaho vrahá: i raspjálsja jesí posreďí neprávednych, nás opravdája."), ("Múčeničen","","Vinčájemi pobidítelno, Hospódni stradáľcy, nevídimaho posramíša vrahá, i vzyváchu: sláva síľi tvojéj Hóspodi."), ("Múčeničen","","Neuvjadájemyja cvíty mýslennaho rajá mnohocínnyja sosúdy, Christóvy strastotérpcy, víroju sšédšesja da počtím."), ("Bohoródičen","","Jehdá uzríla na kresťí Christá, jehóže rodilá jesí čístaja, divílasja jesí neizrečénnomu jehó dolhoterpíniju: ťímže ťá s ním proslavľájem."), ), "2": ( ("","","Uslýšach slúch síly krestá, jáko ráj otvérzesja ím, i vozopích: sláva síľi tvojéj Hóspodi."), ("","","O soďíjanijich mojích lukávych, i prehrišénijich mnóhich, któ vozmóžet umolíti sudijú, ášče ne tý čístaja, jedína sohrišájuščich zastúpnice?"), ("","","Mnóhimi mjá pádša prehrišéniji, i hrichí porabotívša mojú dúšu, vozdvíhni síloju tvojéju prečístaja, i razriší mja molítvoju ot rabóty."), ("","","Jáko róždšaja tvorcá i carjá vsjáčeskich, Bohoródice vseneporóčnaja čístaja, tý mja izbávi vsjákaho skvérnaho sohrišénija."), ("","","Sebé samáho pláču, jehdá v pomyšlénije prijidú mnóhich mojích prehrišénij, i ohňá nehasímaho: moľúsja, dážď mí vrémja pokajánija, prečístaja."), ), ), "P5": ( "1": ( ("","","Útreňujušče vopijém tí Hóspodi, spasí ny: tý bo jesí Bóh náš, rázvi vo tebé inóho ne znájem."), ("","","Kámenije ťá na kámeni oščutívše Christé, vozdvížena, raspadóšasja, i zemlí potrjasóšasja osnovánija."), ("","","Otloží svítlosť sólnce, vozdvíženu tebí na drévo, sólnce právednoje dolhoterpilíve."), ("Múčeničen","","Čudés blistájete svjatíji svítlostiju, ťmú othoňájušče boľíznej dúchom."), ("Múčeničen","","Razsikájema bíša ťilesá váša mečí, dúch že božéstvennyja ľubvé ne otsikájem imíste múčenicy."), ("Bohoródičen","","Víďivši na krest vozdvížena Spása, rydájušči vosklicáše, Ďívo Máti vseneporóčnaja."), ), "2": ( ("","","Útreňujušče vopijém tí Hóspodi, spasí ny: tý bo jesí Bóh náš, rázvi vo tebé inóho ne znájem."), ("","","Vseťilésnuju mí jázvu prijémšu hrichá, býlijem uvračúj milosérdija tvojehó Vladýčice."), ("","","Tečénije tľíniju drévle ustávila jesí božéstvennym roždestvóm: i nýňi prehrišénij mojích ustávi tečénije, preneporóčnaja."), ("","","Pomíluj i uščédri Vladýčice, dúšu mojú, i izbávi osuždénija, i víčnyja múki."), ("","","Prízri i uslýši Vladýčice, hlás mój: i moľúsja, izbávi mjá víčnaho mučénija."), ), ), "P6": ( "1": ( ("","","Obýde mjá bézdna, hrób mňí kít býsť, áz že vozopích k tebí čelovikoľúbcu, i spasé mja desníca tvojá Hóspodi."), ("","","Krest na zemlí vodružášesja, i padénije bisóm byváše: i víra utverždénija načálo prijimáše, i zlóba ot sredý othoníma byváše."), ("","","Sólnce uhasé, plóť tvojú jákože sviščú vozžéhšu tí na drévi Hóspodi: dráchma že obritášesja pohrebénaja mráčnymi strasťmí."), ("Múčeničen","","Vozdvíženu tí čelovikoľúbče na drévo, lík múčenik posľídujušč stopám tvojím imíl jesí, strásti tvojéj podóbjaščsja, bezstrástiju chodátaici."), ("Múčeničen","","Potóki izsušíli jesté preléstnyja króvnym tečénijem, i óhň uhasíste čúždij bisóv božéstvennoju rosóju, vincenóscy múčenicy."), ("Bohoródičen","","Orúžije prójde sérdce tvojé Ďívo vseneporóčnaja, jehdá raspinájema ziždíteľa víďila jesí, i kopijém božéstvennaja rébra iskopavájema."), ), "2": ( ("","","Obýde mjá bézdna, hrób mňí kít býsť, áz že vozopích k tebí čelovikoľúbcu, i spasé mja desníca tvojá Hóspodi."), ("","","Obýde mjá bézdna prehrišénij, i hlubiná soderžít mjá hrichóvnaja, i ko otčájaniju prinósit pohíbeľnomu: svjatája Vladýčice, tý mja nýňi spasí."), ("","","Vozdvíhni mjá ležášča na odrí sohrišénij, presvjatája Vladýčice: i dážď mí osijánije spasíteľnoje pokajánijem."), ("","","Očísti čelovikoľúbče, molítvami čísto róždšija ťá: i izbávi mír tvój ot vsjákija skórbi, i víčnyja slávy spodóbi."), ("","","Prísno obiščavájusja ďíl zlých otstupíti, no vsehdá lhú, i oskorbľáju Vladýku mojehó: prečístaja Vladýčice, tý mi dážď ispravlénije."), ), ), "P7": ( "1": ( ("","","V peščí óhnenňij pisnoslóvcy spasýj ótroki, blahoslovén Bóh otéc nášich."), ("","","Da izbávimsja mý slástnaho hrichá, žélči vkusíl jesí Christé, sládoste žíznennaja."), ("","","Tebí na drévi Christé ujázvenu, isciľíša jázvy Adámovy mnohoľítnyja."), ("Múčeničen","","Svoími vóľnymi ustremléňmi otlučíšasja ko stradániju, strastotérpcy, i pobidítelije javíšasja."), ("Múčeničen","","Počétše Bóha boľíznennym bezčéstijem, i výšňuju póčesť polučíste stradáľcy."), ("Bohoródičen","","Po roždeství čístaja, jákože i préžde roždestvá prebyváješi: Bóh bo bí roždéjsja, da obožít čelovíki."), ), "2": ( ("","","V peščí óhnenňij pisnoslóvcy spasýj ótroki, blahoslovén Bóh otéc nášich."), ("","","Bohorodíteľnice čístaja, ne prézri mené, víroju pod króv tvój prísno pribihájuščaho."), ("","","Strastéj mojích pážiť izsušájušči, podážď točíti sléz kápli Bohorodíteľnice."), ("","","Svjazújema mjá veríhami hrichóvnymi, tvojími molítvami razriší preneporóčnaja, vsepítaho Bóha róždšaja."), ("","","K tebí pribiháju vírno, i tebí čístaja, prizyváju: izbávi mjá Ďívo, ohňá víčnaho."), ), ), "P8": ( "1": ( ("","","Iz Otcá préžde vík roždénnaho Sýna i Bóha, i v posľídňaja ľíta voploščénnaho ot Ďívy mátere, svjaščénnicy pójte, ľúdije prevoznosíte vo vsjá víki."), ("","","Íže kľátvu dréva drévom iscilívyj, i blahoslovénije istočívyj čelovíkom preblahíj: tebé Spáse pojém, i tebé slavoslóvim vo víki."), ("","","Prevozvyšájemaho zmíja krestóm tvojím smiríl jesí, i ľúťi pádšahosja smirjájem voznésl jesí: tebé Spáse pojém, i prevoznósim vo vsjá víki."), ("Múčeničen","","Potrebíteli prélesti, i pobórniki božéstvennyja víry, cerkóvnyja stolpý, i tvérdyja voístinnu adamánty, Christóvy orúžniki, víroju strástonóscy da počtím v písnech."), ("Múčeničen","","Slávniji strastotérpcy, jákože sólnce vozsijáša, boľíznej óblaki razhnávše blahodátiju , i nečéstija mrák razoríša víroju Tróičeskoju."), ("Bohoródičen","","Nevistovodítel tebé Ďívo, Havriíl póslan býsť: rádujsja, vopijáše tí hlahóľa: svitľíjšaja paláto vsích carjá Christá, v ňúže vselívsja, oboží vsjá čelovíki."), ), "2": ( ("","","Iz Otcá préžde vík roždénnaho Sýna i Bóha, i v posľídňaja ľíta voploščénnaho ot Ďívy mátere, svjaščénnicy pójte, ľúdije prevoznosíte vo vsjá víki."), ("","","V nedoumíniji sýj, i sérdcem, i mýsliju, preščénija hejénskaho ne bojásja, sohrišáju prísno: no tý Ďívo, nedoumínije mojé razriší, i ohňá izbávi mjá."), ("","","Slasťmí plóti mojejá částo privlačím jésm, i jáko pľinén prodajém jésm, Bóha prohňivľáju prísno: Bohoródice, jedína nadéžda nenadéžnych, samá pomíluj mjá."), ("","","Jáko nepostýdna jésť molítva tvojá vseneporóčnaja, jelíka bo chóščeši podajéši, moľášči tvojehó Sýna i Bóha. Ťímže moľúsja tí, pomíluj i spasí smirénnuju dúšu mojú."), ("","","Ťilésnymi boľízňmi, i strastnými vozdvižéňmi, i dušévnymi ránami ľúťi isťazújem jésm: róždšaja jedínaho blahodáteľa, tvojími moľbámi zdráva sotvorí mja."), ), ), "P9": ( "1": ( ("","","Ťá páče umá i slovesé Máter Bóžiju, v ľíto bezľítnaho neizrečénno róždšuju, vírniji jedinomúdrenno veličájem."), ("","","Kríposť vrážija i deržáva otjáta býsť, deržávnyj jedíne Hóspodi, na krest voznesénu tí, i pérsty na ném okrovavívšu."), ("","","Iskopáša Christé mój rúci i nózi tvojí, i kósti tvojá izočtóša raspénšiji bezzakónnicy, i žélči so óctom tebé napoíša."), ("Múčeničen","","Ustý svítlymi Bóha propovídaste bývšaho čelovíka, pred mučíteli strastotérpcy, i slávu nasľídovaste."), ("Múčeničen","","Boľízň prijáša ujazvívšiji vrazí ránami, i razlíčnymi múkami bijúšče vás, vsečestníji vráčeve boľíznej, božéstvenniji múčenicy."), ("Bohoródičen","","Svít nám čístaja, iz tebé vozsijá Iisús, i prosvití tvár vsjú raspjátijem, i bisóvskuju ťmú prohnál jésť."), ), "2": ( ("","","Ťá páče umá i slovesé <NAME>, v ľíto bezľítnaho neizrečénno róždšuju, vírniji jedinomúdrenno veličájem."), ("","","Slézy mí podážď pokajánija prečístaja: da pláčusja ďíl mojích ľútych i neprávednych, préžde prispíjanija koncá žitijá mojehó."), ("","","Vskúju dušé oskorbľáješi Vladýku tvojehó, neprávednaja ďíjušči, i ne vozníčeši? Préžde koncá úbo potščávšisja pokájsja."), ("","","Izbávi mjá ot zlých prehrišénij i skorbéj: podážď mí mílosť Ďívo vsečístaja, i životá netľínnaho božéstvennoje pričástije."), ("","","Tebé Bóha neizrečénno róždšuju predstáteľnicu sťažáchom, i sťínu neoborímuju, i dušám spasénije, i čudés istóčnik."), ), ), ), "CH": ( ("","","Tóčiju vodruzísja drévo Christé krestá tvojehó, prélesť prohnána býsť, i blahodáť procvité: užé bo ktomú ňísť osuždénija mučíteľstvo, no pobída javísja nám spasénija: krest bo nám jésť pochvalá, krest nám utverždénije, krest nám rádovanije."), ("","","Vedén býl jesí nás rádi na žértvu Christé, jáko ovčá, i jáko áhnec nezlóbiv Jemmanúiľ na zakolénije vóľnoje, so bezzakónniki vminén býl jesí. Prijidíte, vospójte otéčestvija jazýk, i poklonítesja na kresťí povíšennomu, životú bezkonéčnomu."), ("Múčeničen","","Blahoslovéno vóinstvo nebésnaho carjá: ášče bo i zemnoródni bíša strástotérpcy, no ánheľskoje dostojánije potščášasja dostíhnuti, o ťilesích nebréhše, i strastéj rádi bezplótnych spodóbišasja čésti, molítvami ích Hóspodi, spasí dúšy náša."), ("Krestobohoródičen","","Stávši u krestá Iisúse, tebé róždšaja pláčuščisja rydáše, vopijúšči: ne terpľú sijá, prihvoždéna zrjášči ťá na drévi, jehóže porodích áz, i izbihóch boľízni jáko bezmúžna, i káko nýňi boľízniju soderžíma jésm, i ujazvľájusja sérdcem? Nýňi bo ispólnisja hlahól, íže rečé Simeón: sérdce tvojé neporóčnaja, orúžije prójdet. No nýňi, o Sýne mój, voskresní, i spasí pojúščyja ťá!"), ), ) #let L = ( "B": ( ("","","Razbójnik na kresťí Bóha ťá býti vírovav, Christé, ispovída ťá čísťi ot sérdca: pomjaní mja Hóspodi, vopijá, vo cárstviji tvojém."), ("","","Umertvívsja na kresťí, sňídi rádi uméršaho Adáma: jehóže oživíl jesí žiznodávče ščédryj, i žíteľa páki bláže rajá pokazál jesí."), ("","","Prihvozdílsja jesí na kresťí Christé, lozá ístinnaja, i istočíl jesí pitijé spasénija, napajája vsích vírnych serdcá blahodátiju ."), ("Múčeničen","","Bijémi múdriji, i na udesá razsikájemi voobrazíste zakolénije Vladýčneje: sehó rádi múčenicy Christóvy prísno ublažájemi jesté."), ("Tróičen","","Poklaňájemsja tí vírno, v trijéch lícach jedínomu Bóhu, nerazďíľnu, i prebožéstvennomu jestestvú, vopijúšče tí: sláva tebí Tróice, jedínice Bóže náš."), ("Bohoródičen","","Pláčem bijáše sebé Vladýčice, víďašči na drévi krestňim životá nášeho, vóleju umérša: ťímže vsí božéstvennymi hlásy ťá prísno ublažájem."), ), )
https://github.com/chrischriscris/Tareas-CI5651-EM2024
https://raw.githubusercontent.com/chrischriscris/Tareas-CI5651-EM2024/main/tarea07/src/ej3/main.typ
typst
#import "prefix-suffix.typ": prefix-suffix #let string = json("inputs.json") #for s in string { [\"#s\" $=>$ #prefix-suffix(s)\ ] }
https://github.com/Error-418-SWE/Documenti
https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/3%20-%20PB/Documentazione%20interna/Verbali/24-03-03/24-03-03.typ
typst
#import "/template.typ": * #show: project.with( date: "03/03/24", subTitle: "Meeting di retrospettiva e pianificazione", docType: "verbale", authors: ( "<NAME>", ), timeStart: "15:10", timeEnd: "16:20", ); = Ordine del giorno - Valutazione del progresso generale; - Analisi retrospettiva; - Schema ER; - Pianificazione. = Valutazione del progresso generale <avanzamento> Lo Sprint 17 ha visto le task assegnate completate nei tempi previsti, ad eccezione di una, il cui svolgimento continuerà nello Sprint 18. Il giorno giovedì 29/02/2024 si è svolto il meeting esterno con il Proponente, come pianificato, per aggiornare riguardo lo stato dei lavori ed esporre dubbi riguardo il design del prodotto. == #adr L'#adr ha visto l'inizio della sua revisione completa, che proseguirà nel prossimo Sprint. == #glo Il #glo ha visto l'aggiunta delle seguenti definizioni: - Jest; - Virtual Private Server; - Testing; - Unit test; - Test di integrazione; - Test di sistema. == #man Il #man ha visto completati i lavori: - creazione del documento; - redazione della sezione Introduzione. == #ndp Le #ndp hanno visto completati i lavori: - redazione capitolo Organizational Project-Enabling processes/Quality Management process; - redazione capitolo Technical processes/Implementation process; - redazione capitolo Technical processes/Integration process; - redazione capitolo Technical processes/Verification process; - aggiunta norma riguardo il sistema di tracciamento rischi-risoluzioni. == #pdp Il #pdp ha visto completati i lavori: - redazione preventivo Sprint 16; - redazione consuntivo Sprint 16. == #pdq Il #pdq ha visto completati i lavori: - aggiornamento i grafici delle metriche per lo Sprint 16; - aggiornamento della dashboard con i dati sullo Sprint 16. == #st La #st ha visto le completati i lavori: - creazione documento; - redazione sezione Introduzione. == Automazioni Le automazioni hanno visto completato il lavoro: - correzione errore di registrazione versione. == Progettazione L'attività di progettazione ha visto completati i lavori: - aggiornamento schema ER del database; - aggiornamento mock-up. == Codifica L'attività di codifica ha visto completati i lavori: - implementazione modulo di sanificazione SVG; - implementazione pagina di selezione della modalità di creazione dell'ambiente. = Analisi retrospettiva Lo Sprint 17 è terminato con il raggiungimento della quasi totalità degli obiettivi prefissati. Il rendimento positivo dello Sprint è sostenuto dalle principali metriche esposte dal #pdq\: - CPI di progetto cala leggermente passando da 1.02 a 1.01, continuando a rappresentare l'ottimabilità, data da valori $>=1$; - EAC aumenta passando da € 12.777,29 a € 12.987,48. Il gruppo non lo considera un aumento problematico in quanto risulta abbastanza contenuto; - $"SEV" <= "SPV"$ ma comunque accettabile in quanto $>=80% "del" "SPV"$. Maggiori dettagli in merito al valore delle metriche alla loro analisi sono reperibili all'interno dei documenti #pdq_v e #pdp_v. == Keep doing <keep-doing> Come nello Sprint precedente il gruppo ha saputo mantenere una modalità di lavoro e di comunicazione asincrona. Il gruppo riconosce di aver stabilito una buona comunicazione con il Proponente durante i meeting. == Improvements <improvements> === Criticità evidenziate *P01*: Sono presenti dei dubbi riguardo il design del prodotto, nonostante i chiarimenti forniti dal #cardin via mail. === Soluzioni predisposte #figure(caption: [Soluzioni individuate alle criticità riscontrate.], table( align: left, columns: (auto, 1fr, auto), [ID risoluzione], [Titolo], [Criticità affrontate], [R1],[Richiesta di colloquio via Zoom al #cardin], [P01] ) ) = Schema ER Il gruppo ha discusso lo schema ER realizzato, individuando ridondanze da risolvere riguardo gli attributi `height` e `width` dell'entità `Bin`. Questi risultano uguali rispettivamente per tutti i bin sullo stesso ripiano e sulla stessa colonna, di conseguenza il gruppo decide di creare due ulteriori entità, `Ripiano` e `Colonna`, che conterranno queste informazioni. = Pianificazione <pianificazione> #show figure: set block(breakable: true) #let table-json(data) = { let keys = data.at(0).keys() table( align: left, columns: keys.len(), ..keys, ..data.map( row => keys.map( key => row.at(key, default: [n/a]) ) ).flatten() ) } #figure(caption: [Task pianificate per lo Sprint 17.], table-json(json("tasks.json")) )
https://github.com/maxgraw/bachelor
https://raw.githubusercontent.com/maxgraw/bachelor/main/apps/document/src/4-concept/wireframe.typ
typst
Um die Anforderungen an die Benutzeroberfläche zu visualisieren, wurden Wireframes erstellt. Dabei dienen die zuvor definierten Anforderungen sowie der User Flow als Grundlage. Die Wireframes wurden mithilfe des 3D-Modellierungsprogramms Blender erstellt. Das Wireframe stellt hierbei keine endgültige Version der Benutzeroberfläche dar, sondern dient als Grundlage für die Implementierung der Anwendung. Im Folgenden werden einzelne Bilder des Wireframes als Screens bezeichnet. Es handelt sich hierbei nicht um klassische Screens einer Anwendung, sondern um spezifische Ansichten. Die Bezeichnung Screens hilft jedoch dabei, die einzelnen Ansichten voneinander zu unterscheiden. Das Wireframe besteht aus sechs verschiedenen Screens, die alle zuvor definierten Interaktionen und Informationen darstellen. Die Screens werden in ihrer Reihenfolge dargestellt und bieten einen Programmablauf, der die Interaktion des Benutzers mit der Anwendung widerspiegelt. #grid( columns: (1fr, 1fr, 1fr), rows: (auto), gutter: 20pt, figure( image("../media/wireframe/screen1.jpg", width: 100%), caption: [Erste Screen - Cursor auf dem Boden], ), figure( image("../media/wireframe/screen2.jpg", width: 100%), caption: [Zweite Screen - Menü "Auswahl" wird angezeigt], ), figure( image("../media/wireframe/screen3.jpg", width: 100%), caption: [Dritte Screen - Möbelstück wird platziert], ), ) Der erste Screen zeigt den Beginn der zweiten Interaktionsphase, die bereits im User Flow definiert wurde. Es wird ein Cursor auf dem Boden dargestellt, der eine geeignete Fläche zur weiteren Interaktion signalisiert. Der Cursor folgt hierbei der Position und Rotation der Kamera. Der zweite Screen zeigt das Menü "Auswahl". Dieses Menü ermöglicht die Auswahl eines Möbelstücks zur Platzierung. Um sicherzustellen, dass das Menü unabhängig von der Position oder Rotation der Kamera sichtbar bleibt, wird es am unteren Bildschirmrand platziert. Diese Positionierung gewährleistet eine ergonomische Bedienung und eine kontinuierliche Sichtbarkeit, wie im Kapitel zur Architektur beschrieben. Auf dem dritten Screen wird der Abschluss der Interaktion dargestellt. Durch die Auswahl einer Option wird ein Möbelstück in der Szene platziert und alle Menüs werden ausgeblendet. Das System ist nun bereit, einen neuen Interaktionszyklus aufzunehmen. #grid( columns: (1fr, 1fr, 1fr), rows: (auto), gutter: 20pt, figure( image("../media/wireframe/screen4.jpg", width: 100%), caption: [Vierter Screen - Menüs "Löschen" und "Möbelstück anhängen" sichtbar], ), figure( image("../media/wireframe/screen5.jpg", width: 100%), caption: [Fünfter Screen - Menü "Auswahl" wird angezeigt], ), figure( image("../media/wireframe/screen6.jpg", width: 100%), caption: [Sechster Screen - Möbelstück wird angehängt], ), ) Wie zuvor im User Flow dargestellt, ermöglicht die Anwendung die Auswahl eines platzierten Möbelstücks. Diese Interaktion wird im vierten Screen dargestellt. Hierbei wird das Menü "Löschen" und "Anhängen" sichtbar. Das Menü "Löschen" ermöglicht das Entfernen des ausgewählten Möbelstücks und wird, wie das Menü "Auswahl", am unteren Bildschirmrand platziert. Das Menü "Anhängen" stellt jedoch eine Herausforderung dar. Eines der Probleme bei der Interaktion mit Augmented-Reality-Systemen über Bildschirme ist das Mapping von 2D-Eingaben auf 3D-Objekte. Im Fall des "Löschen" oder "Auswahl"-Menüs ist dies unproblematisch, da die 3D-Szene hierbei nicht benötigt wird. Beim "Anhängen"-Menü ist dies jedoch anders. Aus diesem Grund wird eine 3D-Interaktion verwendet. Hierbei werden, wie in der Abbildung dargestellt, Plus-Objekte verwendet, die um das ausgewählte Möbelstück platziert werden. Dadurch kann der Nutzer frei entscheiden, an welcher Stelle das Möbelstück angehängt werden soll. Der fünfte Screen zeigt das Menü "Auswahl", welches durch die Auswahl eines "Anhängen" Menüs geöffnet wurde. Im Falle des Wireframes wurde das obere "Anhängen"-Menü ausgewählt, wodurch im sechsten Screen ein Möbelstück an das obere Ende des ausgewählten Möbelstücks angehängt wird.
https://github.com/7sDream/fonts-and-layout-zhCN
https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/chapters/02-concepts/char-glyph.typ
typst
Other
#import "/template/template.typ": web-page-template #import "/template/components.typ": note #import "/lib/glossary.typ": tr #show: web-page-template // ## Characters and glyphs == #tr[character]和#tr[glyph] // We've been talking loosely about "letters" and "numbers" and "stuff you want to typeset". But that's a bit cumbersome; we need a better way to talk about "letters and numbers and symbols and other stuff." As it happens, we're going to need *two* specific terms to be able to talk about "letters and numbers and symbols and other stuff." 我们一直在不很严谨地使用“字母”、“数字”和“你想排版的东西”等等词语。但这有点麻烦,我们需要一个更好的方式来讨论它们。实际上,我们需要*两个*不同的术语来描述这个概念。 // The first term is a term for the things that you design in a font - they are *glyphs*. Some of the glyphs in a font are not things that you may think need to be designed: for example, the space between words is a glyph. Some fonts have a variety of different space glyphs. Font designers still need to make a decision about how wide those spaces ought to be, and so there is a need for space glyphs to be designed. 第一个术语是指在字体中实际被设计的那个东西——它们是*#tr[glyph]*。你可能认为字体中的某些#tr[glyph]可能并不需要实际的设计,比如单词之间的空格。但实际上,字体中会有各种不同的空格,字体设计师仍然需要决定,也就是设计,这些空格#tr[glyph]的宽度。 // Glyphs are the things that you draw and design in your font editor - a glyph is a specific design. My glyph for the letter "a" will be different to your glyph for the letter "a". But in a sense they're both the letter "a". Their semantic content is the same. #tr[glyph]一般在字体编辑器中绘制,每个#tr[glyph]都是一个独特的设计。我为字母a设计的#tr[glyph]会和你设计的不同,但它们都是字母a。它们背后的语义是相同的。 // So we are back to needing a term for the generic version of any letter or number or symbol or other stuff, *regardless of how it looks*: and that term is a *character*. "a" and `a` and *a* and **a** are all different glyphs, but the same character: behind all of the different designs is the same Platonic ideal of an "a". So even though your "a" and my "a" are different, they are both the character "a"; this is something that we will look at again when it comes to the chapter on Unicode, which is a *character set*. 我们也需要一个术语来描述这种内在语义,一个去除了外形设计之后,这个“字母、数字、符号或其他东西”的通用版本:*#tr[character]*。a、`a`、_a_、*a*,这些是不同的#tr[glyph],但都是相同的#tr[character]。在这些不同的设计背后,有一个对于a的共同的柏拉图式完美理型。所以即使你的a和我的a看起来不一样,但它们都是相同的#tr[character]a。在后续对于Unicode这个*#tr[character set]*的章节中,我们会再次讨论这些概念。
https://github.com/Skimmeroni/Appunti
https://raw.githubusercontent.com/Skimmeroni/Appunti/main/Matematica4AI/Math4AI_definitions.typ
typst
Creative Commons Zero v1.0 Universal
#import "@preview/ctheorems:1.1.2": * #let theorem = thmbox("theorem", "Theorem", fill: rgb("#e7f7e6")) #let lemma = thmbox("lemma", "Lemma", fill: rgb("#f7ebf4")) #let corollary = thmbox("corollary", "Corollary", fill: rgb("#f7ebf4")) #let proof = thmproof("proof", "Proof") #let exercise = thmbox("exercise", "Exercise", fill: rgb("#e9eef7")) #let solution = thmproof("solution", "Solution")
https://github.com/The-Notebookinator/notebookinator
https://raw.githubusercontent.com/The-Notebookinator/notebookinator/main/themes/radial/components/title.typ
typst
The Unlicense
#import "../colors.typ": * /// The title for an entry. This function is used internally by the theme, and not meant to be called by the user. /// /// - color (color): /// - beginning (content): /// - end (content): /// - body (content): /// -> content #let title(color: gray, beginning: none, end: none, body) = { let highlight(color: none, body, width: auto) = { box( fill: color, outset: 5pt, radius: 1.5pt, body, height: 1em, width: width, ) } set text(size: 18pt, weight: "bold") set align(horizon) if not beginning == none { highlight(color: color, beginning) h(15pt) } highlight(color: color.lighten(80%), width: 1fr)[ #body ] if not end == none { h(15pt) highlight(color: color.lighten(80%), end) } }
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/meta/numbering-03.typ
typst
Other
#set text(lang: "zh") #for i in range(9,21, step: 2){ numbering("一", i) [ and ] numbering("壹", i) [ for #i \ ] }
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/figure-localization_02.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // Test Russian #set text(lang: "ru") #figure( polygon.regular(size: 1cm, vertices: 8), caption: [Пятиугольник], )
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/g-exam/0.2.0/examples/exam-localization.typ
typst
Apache License 2.0
#import "../g-exam.typ": g-exam, g-question, g-subquestion #show: g-exam.with( localization: ( grade-table-queston: [Number of *questions*], grade-table-total: [Total _poinst_], grade-table-points: [#text(fill: red)[Points]], grade-table-calification: [#text(fill: gradient.radial(..color.map.rainbow))[Grades obtained]], point: [point], points: [Points], page: [], page-counter-display: "1 - 1", family-name: "*Family* _name_", personal-name: "*Personal* _name_", group: [*Classroom*], date: [*Date* of exam] ), ) #g-question(point: 2)[Question 1] #g-question(point: 1)[Question 2] #g-question(point: 1.5)[Question 3]
https://github.com/kdog3682/typkit
https://raw.githubusercontent.com/kdog3682/typkit/main/0.1.0/src/headers/chapter.typ
typst
// igidrawu // https://discord.com/channels/1054443721975922748/1262779001735479298 // 07-16-2024 // pretty cool // it is able to accurately display chapter titles #let last-hd = state("body", []) #set page( header: context { set text(size:12pt,hyphenate:false) let first-heading = query( heading.where(level: 1) ).find(h => h.location().page() == here().page()) let last-heading = query( heading.where(level: 1) ).rev( ).find(h => h.location().page() == here().page()) let header = if not first-heading == none { first-heading.body last-hd.update(last-heading.body) } else { last-hd.display() } let n = counter(page).get().first() if (n > 1) { align(center, header) } } ) #let section(title: none) = { if title != none { heading(title) } lorem(10) pagebreak() } #{ outline() pagebreak() text("instead of saying 'contents', it should say first chapter too", size: 25pt, fill: red) section(title: "first chapter") section() section() section(title: "second chapter") section() }
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/CU/oktoich/1_generated/0_all/Hlas4.typ
typst
#import "../../../all.typ": * #show: book = #translation.at("HLAS") 4 #include "../Hlas4/0_Nedela.typ" #pagebreak() #include "../Hlas4/1_Pondelok.typ" #pagebreak() #include "../Hlas4/2_Utorok.typ" #pagebreak() #include "../Hlas4/3_Streda.typ" #pagebreak() #include "../Hlas4/4_Stvrtok.typ" #pagebreak() #include "../Hlas4/5_Piatok.typ" #pagebreak() #include "../Hlas4/6_Sobota.typ" #pagebreak()
https://github.com/noahjutz/AD
https://raw.githubusercontent.com/noahjutz/AD/main/notizen/sortieralgorithmen/heapsort/buildheap_step_1.typ
typst
#import "/components/lefttree.typ": lefttree, draw_node, number, note #import "@preview/cetz:0.3.0" #let nums = (45, 43, 38, 34, 23, 18, 12, 17, 34, 7) #cetz.canvas({ import cetz.draw: * import cetz.tree: tree tree( lefttree(nums.map(n => str(n))), spread: 1.2, draw-node: draw_node, name: "tree" ) note(4, ang: -135deg)[$ floor(n/2)-1 $] note(0, ang: -90deg)[$h=3$] note(2, ang: -90deg)[$h=2$] note(6, ang: -90deg)[$h=1$] let half = calc.div-euclid(nums.len(), 2) for i in range(nums.len()).slice(0, half) { number(i, str(half - i - 1)) } })
https://github.com/fredguth/bid_produto_1
https://raw.githubusercontent.com/fredguth/bid_produto_1/main/produto-1.v1.3.0.typ
typst
// Some definitions presupposed by pandoc's typst output. #let blockquote(body) = [ #set text( size: 0.92em ) #block(inset: (left: 1.5em, top: 0.2em, bottom: 0.2em))[#body] ] #let horizontalrule = [ #line(start: (25%,0%), end: (75%,0%)) ] #let endnote(num, contents) = [ #stack(dir: ltr, spacing: 3pt, super[#num], contents) ] #show terms: it => { it.children .map(child => [ #strong[#child.term] #block(inset: (left: 1.5em, top: -0.4em))[#child.description] ]) .join() } // Some quarto-specific definitions. #show raw.where(block: true): block.with( fill: luma(230), width: 100%, inset: 8pt, radius: 2pt ) #let block_with_new_content(old_block, new_content) = { let d = (:) let fields = old_block.fields() fields.remove("body") if fields.at("below", default: none) != none { // TODO: this is a hack because below is a "synthesized element" // according to the experts in the typst discord... fields.below = fields.below.amount } return block.with(..fields)(new_content) } #let empty(v) = { if type(v) == "string" { // two dollar signs here because we're technically inside // a Pandoc template :grimace: v.matches(regex("^\\s*$")).at(0, default: none) != none } else if type(v) == "content" { if v.at("text", default: none) != none { return empty(v.text) } for child in v.at("children", default: ()) { if not empty(child) { return false } } return true } } #show figure: it => { if type(it.kind) != "string" { return it } let kind_match = it.kind.matches(regex("^quarto-callout-(.*)")).at(0, default: none) if kind_match == none { return it } let kind = kind_match.captures.at(0, default: "other") kind = upper(kind.first()) + kind.slice(1) // now we pull apart the callout and reassemble it with the crossref name and counter // when we cleanup pandoc's emitted code to avoid spaces this will have to change let old_callout = it.body.children.at(1).body.children.at(1) let old_title_block = old_callout.body.children.at(0) let old_title = old_title_block.body.body.children.at(2) // TODO use custom separator if available let new_title = if empty(old_title) { [#kind #it.counter.display()] } else { [#kind #it.counter.display(): #old_title] } let new_title_block = block_with_new_content( old_title_block, block_with_new_content( old_title_block.body, old_title_block.body.body.children.at(0) + old_title_block.body.body.children.at(1) + new_title)) block_with_new_content(old_callout, new_title_block + old_callout.body.children.at(1)) } #show ref: it => locate(loc => { let target = query(it.target, loc).first() if it.at("supplement", default: none) == none { it return } let sup = it.supplement.text.matches(regex("^45127368-afa1-446a-820f-fc64c546b2c5%(.*)")).at(0, default: none) if sup != none { let parent_id = sup.captures.first() let parent_figure = query(label(parent_id), loc).first() let parent_location = parent_figure.location() let counters = numbering( parent_figure.at("numbering"), ..parent_figure.at("counter").at(parent_location)) let subcounter = numbering( target.at("numbering"), ..target.at("counter").at(target.location())) // NOTE there's a nonbreaking space in the block below link(target.location(), [#parent_figure.at("supplement") #counters#subcounter]) } else { it } }) // 2023-10-09: #fa-icon("fa-info") is not working, so we'll eval "#fa-info()" instead #let callout(body: [], title: "Callout", background_color: rgb("#dddddd"), icon: none, icon_color: black) = { block( breakable: false, fill: background_color, stroke: (paint: icon_color, thickness: 0.5pt, cap: "round"), width: 100%, radius: 2pt, block( inset: 1pt, width: 100%, below: 0pt, block( fill: background_color, width: 100%, inset: 8pt)[#text(icon_color, weight: 900)[#icon] #title]) + block( inset: 1pt, width: 100%, block(fill: white, width: 100%, inset: 8pt, body))) } #let report( title: none, subtitle: none, authors: none, date: none, abstract: none, iadb_contract: none, iadb_project: none, iadb_product: none, cols: 1, lang: "pt", region: "BR", font: (), fontsize: 10pt, sectionnumbering: none, toc: false, toc-depth: none, bib_syle: "apa", theme: ( color: blue.darken(30%), serif: "Harding Text Web", sans: "Lato", mono: "SF Mono", normal: 10pt, small: 8pt, ), doc, ) = { set page( paper: "a4", margin: (inside: 1cm, top: 1.5cm, outside: 1cm, bottom: 1.5cm), numbering: "1", header-ascent: .5cm, footer-descent: .5cm, header: locate(loc => { if (loc.page() != 1) { block( width: 100%, stroke: (bottom: 1pt + gray), inset: (bottom: 8pt, right: 2pt, left: 2pt), [ #set text(font: theme.sans, size: theme.small, fill: gray.darken(50%)) #grid( columns: (1fr, 1fr), align(left, []), align(right, text(weight: "bold", upper[Relatório])), ) ], ) } }), footer: block( width: 100%, stroke: (top: 1pt + gray), inset: (top: 8pt, right: 2pt), [ #set text(font: theme.sans, size: theme.small, fill: gray.darken(50%)) #grid( columns: (75%, 25%), align(left)[#date], align( right )[#counter(page).display() de #locate((loc) => { counter(page).final(loc).first() })], ) ], ) ) set par(justify: true) set text(lang: lang, region: region, historical-ligatures: true, ligatures: true, font: theme.sans, size: theme.normal) set heading(numbering: sectionnumbering) if title != none { text(font: theme.sans, fill: gray.lighten(60%), upper[Relatório]) v(.2cm) text(font: theme.serif, size: 20pt, weight: "black", title) if subtitle != none { v(-.3cm) text(font: theme.serif, size: 16pt, weight: "light", subtitle) } v(1cm) line(length: 100%, stroke: 2pt + theme.color) v(1cm) } grid(columns: (62%, 3%, 35%), text(font: theme.serif, doc) ,[], { if authors != none { if toc { block(above: 2em, below: 2em)[ #outline( title: auto, depth: 1, indent: auto ); ] } place(dy:10cm, block(fill: blue.lighten(95%),width: 100%,inset: 1em,radius: 6pt)[ #for (author) in authors [ #if author.role!= none [*#author.role*] #h(1em)#author.name #if author.affiliation!=none {text(font: theme.mono, size: theme.small)[(#author.affiliation)]} #if author.email!=none [#v(-.5em)#h(1em)#text(size: theme.small, author.email)] ] #if iadb_contract != none [ *Contrato*\ #h(1em)#text(size: theme.small, iadb_contract) ] #if iadb_project != none [ *Projeto*\ #text(size: theme.small, pad(left: 1em,[#iadb_project])) ] #if iadb_product != none [ *Produto*\ #h(1em)#text(size: theme.small, iadb_product) ] ]) } }) if abstract != none { block(inset: 2em)[ #text(weight: "semibold")[Abstract] #h(1em) #abstract ] } } #show: doc => report( title: [Plano de Trabalho], subtitle: [Consultoria Individual de Ciência de Dados e Aprendizado de Máquina no Departamento de Economia e Desenvolvimento em Saúde ], authors: ( ( name: [<NAME>], role: [Autor ], corresponding: [true], affiliation: [BID], email: [<EMAIL>] ), ), iadb_contract: [Cooperação Técnica BR-T1550 \(BID/MS)], iadb_project: [Consultoria Individual de Ciência de Dados e Aprendizado de Máquina no Departamento de Economia e Desenvolvimento em Saúde], iadb_product: [Produto 1], date: [2024-02-08], lang: "pt", region: "BR", sectionnumbering: "1.1.a", toc: true, cols: 1, doc, ) = Introdução <sec-intro> O presente projeto é uma iniciativa de 12 meses no âmbito da #emph[Cooperação Técnica BR-T1550] do Ministério da Saúde com o Banco Inter-americano de Desenvolvimento \(BID). Seu objetivo maior é fortalecer a capacidade de análise de dados do Departamento de Economia e Desenvolvimento em Saúde \(DESID/MS), integrando técnicas avançadas de ciência de dados e preparando a organização para a adoção de modelos de inteligência artificial. == Motivação <motivação> #figure([ #box(width: 70%,image("images/pratos.svg")) ], caption: figure.caption( position: bottom, [ Sistemas são meios e não fins. \ Todas imagens desse relatório são do próprio autor, \ exceto quando explicitado em contrário. ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-pratos> A Coordenação-Geral de Informações em Economia da Saúde \(CGES/DESID) é uma área multidiprofissional e interdisciplinar responsável por importantes sistemas de registro de informações econômicas de saúde \(SIOPS, BPS e ApuraSUS) e pelo uso desses dados para fornecer evidências econômicas para formulação de políticas, diretrizes e metas para a contínua melhoria do Sistema Único de Saúde \(SUS). Desde o início de 2023, a CGES tem investido em melhorias para automatizar e reduzir esforços na obtenção dos registros e aumentar a produção de evidências econômicas baseadas na análise de dados. Tais evidências são a missão principal da DESID e subsidiam a formulação de políticas, diretrizes e metas para que as ações e serviços públicos de saúde sejam prestados de forma eficiente, equitativa e com qualidade para melhor acesso da população, atendendo aos princípios da universalidade, igualdade e integralidade da atenção à saúde estabelecidos constitucionalmente para o Sistema Único de Saúde \(SUS). A coordenação identificou a necessidade urgente e prioritária de fortalecer suas capacidades de análise de dados, uma vez que conta atualmente com reduzida equipe especializada na área, a maior parte das análises ainda é realizada apenas em planilhas e os processos de ingestão e transformação de dados são #emph[ad-hoc] e não institucionalizados. Essa necessidade se torna ainda mais crítica com a responsabilidade assumida pela CGES na produção futura do Sistema de Contas de Saúde \(SHA), em cooperação com a a Organização para a Cooperação e Desenvolvimento Econômico \(OCDE) e outras instituições governamentais brasileiras. Por esses motivo, a CGES está criando o Núcleo de Ciência de Dados da DESID \(NCD) que o presente projeto ajudará a organizar. == Objetivos do Projeto <objetivos-do-projeto> - Melhorar a qualidade e facilitar os processos de análise de dados da CGES; - Reduzir a dependência externa da CGES para a realização de suas funções; - Apoiar a produção do SHA de acordo com a metodologia da OCDE. - Melhorar os processos de desenvolvimento de produtos de dados. == Escopo do Projeto <escopo-do-projeto> - Análise dos desafios, processos e capacidade técnica atual e desenvolvimento de uma estratégia de utilização de técnicas de Ciência de - Dados e Aprendizado de Máquinas para melhoria dos processos da CGES. - Desenvolvimento de plano de infraestrutura técnica e capacitação da equipe. - Desenvolvimento de metodologia de desenvolvimento de produtos de dados. - Desenvolvimento de proposta de portfólio de produtos de dados. - Desenvolvimento de produtos de dados: datasets, esteiras de dados, relatórios, painéis etc. == Este documento <este-documento> #figure( align(center)[#table( columns: 2, align: (col, row) => (center,left,).at(col), inset: 6pt, [#strong[Contrato];], [Cooperação Técnica BR-T1550], [#strong[Projeto];], [Consultoria Individual de Ciência de Dados e Aprendizado de Máquina no Departamento de Economia e Desenvolvimento em Saúde do Ministério da Saúde], [#strong[Produto];], [Entregável 1 - Plano de Trabalho], )] ) = Objetivos <objetivos> O presente #emph[Plano de Trabalho] tem como objetivos: - Contextualizar o Projeto \(#link(<sec-intro>)[1 Introdução];) - Apresentar e justificar a abordagem sociotécnica que será adotada \(#link(<sec-metodo>)[3 Método];) - Descrever os entregáveis e o cronograma de entregas \(#link(<sec-result>)[4 Resultados];) - Estabelecer expectativas e critérios de sucesso do Projeto \(#link(<sec-conclusao>)[5 Conclusão];) = Método <sec-metodo> == Contexto <contexto> #block[#box(width: 7.5in, figure( image("images/MAD-2.png"), caption: [A imensidão do confuso mercado de ferramentas analíticas.], ))] Estima-se que o investimento em ferramentas analíticas tenha superado 80 bilhões de dólares em 2023#cite(<snowflake2020s1>);. Muitas organizações já estão na terceira geração de suas #emph[plataformas de dados];, com a esperança de obter #emph[insights] e tomar decisões rápidas baseadas em evidências. Poucas, porém, podem se dizer verdadeiramente #emph[data-driven];. #block( fill:yellow.lighten(90%), above: 2em, below: 2em, outset:1em, radius:6pt, width:70%, [ #strong[Datawarehouses e BI \(primeira geração):] consolidando dados de diversas fontes, essa estratégia foca na limpeza e verificação dos dados antes de torná-los disponíveis. Essa centralização enfrenta desafios de escalabilidade à medida que as fontes de dados aumentam. Principais artefatos são relatórios e painéis \(#emph[dashboards];). Tabelas e relatórios complicados entendidos por poucos especialistas, impacto limitado nos negócios. #strong[Big Data e Data Lakes \(segunda geração):] Como resposta aos gargalos da geração anterior e aproveitando a redução de custos de #emph[hardware];, #emph[Data Lakes] armazenam dados em arquivos, com transformações ocorrendo no momento do consumo. Embora ofereça flexibilidade, esta abordagem apresenta desafios quanto à qualidade e documentação dos dados. #strong[Plataformas em Nuvem \(terceira geração):] semelhante à geração anterior, mas modernizada com: - #strong[\(a)] dados em tempo real \(#emph[streams];); - #strong[\(b)] processamento unificado de dados em #emph[batch] e #emph[stream];; e - #strong[\(c)] uso intensivo da nuvem. Embora aborde falhas anteriores, ainda carrega problemas das gerações passadas. ]) #figure([ #box(width: 70%,image("images/missing_leg.svg")) ], caption: figure.caption( position: bottom, [ Investimento em capacidade tecnológica, ferramentas e #emph[know-how] é condição necessária mas não suficiente para se tornar #emph[data-driven];. ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-missing-leg> Entender por que tantas implantações de plataformas de dados não entregam os resultados esperados é essencial para assegurar o sucesso deste projeto. Em nossa experiência, muitos projetos pecam por acreditar que basta investimento em tecnologia. Investimento em capacidade tecnológica, ferramentas e #emph[know-how];, é condição necessária mas não suficiente para uma organização se tornar #emph[data-driven] @fig-missing-leg. Para compreensão do método a ser adotado no presente projeto, partiremos da definição do problema explorando-o em todas as suas dimensões. == Definição do Problema <definição-do-problema> === Servir, Aprender e Evoluir <servir-aprender-e-evoluir> #figure([ #box(width: 70%,image("images/servico.svg")) ], caption: figure.caption( position: bottom, [ Serviço como fluxo de valor e feedback; um ciclo. ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-servico> Todo serviço deve transformar seu #emph[usuário] para melhor #footnote[#emph[Usuário] Pessoa ou organização que se beneficia de um serviço. Também chamado de #emph[cliente];.];; um #emph[fluxo de valor] que pode envolver diversas etapas e atendimentos \(@fig-servico). O SUS atua diariamente para melhorar a saúde dos brasileiros, milhares de vezes por dia. A importância de #emph[servir] \(atender) está fortemente imbuída na cultura do Ministério. Cada #emph[transação] #footnote[Uma transação é uma execução do serviço, um atendimento.] deixa um rastro de dados. A imensa quantidade de dados gerados pelo SUS é vista por alguns como um ativo: essa é uma visão equivocada. Ativos têm valor quando guardados, mas #emph[dados] só tem valor quando usados. #block( fill:yellow.lighten(90%), above: 2em, below: 2em, outset:1em, radius:6pt, width:70%, [ #strong[Dados transacionais:] dados primários que sustentam o funcionamento dos serviços diretos ao usuário e mantêm seu estado atual. Também conhecidos como #emph[dados operacionais];. #strong[Dados analíticos:] dados derivados das bases transacionais \(secundários), fornecem visão agregada e histórica dos serviços. ]) #figure([ #box(width: 40%,image("images/evolucao.svg")) ], caption: figure.caption( position: bottom, [ Evolução contínua. ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-evolucao> O #emph[feedback] do usuário, direto e indireto \(via indicadores), fornece informações cruciais para aprimorar o serviço: um fluxo de valor no sentido contrário, do usuário para o serviço. O propósito do SUS vai além de atender o usuário no momento presente, mas também envolve a #emph[evolução contínua] do serviço \(@fig-evolucao,) baseada em evidências. Quanto mais rápido o ciclo de #emph[servir];, #emph[analizar] e #emph[aprender];, mais hipóteses podem ser testadas e mais rápido o serviço evolui. === Desafios Organizacionais <sec-prisao> #quote(block: true)[ "Nos primeiros quatro meses de 2023, mais de 10,3 mil servidores \[1/3 do quadro\] da Secretaria de Saúde do Distrito Federal \(SES-DF) precisaram de atestados de afastamento do trabalho. Grande parte desses servidores são técnicos em enfermagem" – #cite(<Schwingel2023>);. ] Organizações doentes adoecem pessoas. No serviço público, são servidoras #emph[da ponta];, que tem contato direto com usuário, as que mais adoecem. #emph[O que está acontecendo?] #figure([ #box(width: 50%,image("images/grinder.png")) ], caption: figure.caption( position: bottom, [ O "sistema" moendo pessoas. \ Arte de #emph[Gerald Scarfe] para o filme #emph[The Wall] \(1982). ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-grinder> #figure([ #box(width: 50%,image("images/paredes3.svg")) ], caption: figure.caption( position: bottom, [ Muros organizacionais. ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-paredes> Organizações públicas e privadas ainda são majoritariamente estruturadas em silos funcionais \(@fig-paredes), com equipes especializadas em áreas como negócio, tecnologia, jurídico, controle; herança da burocracia de Weber e da #emph[gestão científica] de Taylor do início do século XX. Esta estrutura exige que cada serviço seja coordenado entre equipes distintas, com diferentes hierarquias, prioridades e linguagens. A dinâmica lembra a brincadeira da #emph[corrida de três pernas] das #emph[gincanas infantis];, onde se amarra o pé de um criança ao de outra: a falta de alinhamento entre equipes resulta em atrasos e falhas, fazendo com que o conjunto mova-se ao ritmo imposto pela equipe mais lenta. Os servidores #emph[da ponta] atendem os #emph[usuários reais];, enfrentam a realidade; os servidores #emph[meio] atendem os servidores mais à ponta, #emph[usuários internos];. Estar na ponta traz clareza da importância da sua contribuição individual, #strong[senso de propósito];. Ao mesmo tempo, exarceba a #strong[sensação de impotência] diante de uma realidade que não se tem total autonomia para mudar. #quote(block: true)[ O servidor na ponta está preso entre a realidade e o muro organizacional. ] #figure([ #box(width: 50%,image("images/danpink3.svg")) ], caption: figure.caption( position: bottom, [ Auto-motivação segundo <NAME> \ (Figura inspirada em #emph[\@sketchplanations];) ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-danpink> <NAME> argumenta que a auto-motivação é impulsionada por três elementos fundamentais: autonomia, maestria e propósito #cite(<pink2010drive>);. Autonomia refere-se à capacidade de controlar o próprio trabalho; maestria é o desejo de evoluir continuamente em algo que importa; e propósito diz respeito à conexão do trabalho com algo maior e mais significativo. Pink sugere que quando esses três elementos estão presentes, os indivíduos são mais motivados, engajados e produtivos. Em certa medida, a organização em silos produz a antítese das condições para a automotivação. === Evolução orientada a missões <sec-missoes> A gestão orientada a evidências estabelece apenas o método da resposta, mas não o que perguntar, para onde evoluir. Para isso é primordial definir escolhas estratégicas, decisões políticas. O conceito de "#emph[missões];" em políticas públicas tem sido popularizado pela economista Mariana Mazzucato#footnote[O Nova Indústria Brasil, proposta do governo para reverter a desindustrialização precoce do país, é inspirada nas ideias de Mazzucato \(vide #cite(<investnewsNIB>) e #cite(<cartaNIB>);).];. Ela destaca a importância de definir objetivos claros, ambiciosos e mensuráveis para orientar a inovação, metas #emph[moonshot] #cite(<Mazzucato2022>);. #block( fill:yellow.lighten(90%), above: 2em, below: 2em, outset:1em, radius:6pt, width:70%, [ #strong[Moonshot:] Meta ambiciosa, que requer inovação radical para ser atingida. Remete ao projeto Apollo que ambicionou levar humanos à Lua. Difere-se da missão-maior de servir por ser uma missão-meta, com prazo e escopo definidos. #emph[Ex.] Meta "Três Bilhões" da OMS: #cite(<gpw13>) - 1 bilhão de pessoas a mais com cobertura universal de saúde. - 1 bilhão de pessoas a mais protegidas de emergências de saúde. - 1 bilhão de pessoas a mais gozando de melhor saúde e bem-estar. ]) A ambição de uma meta #emph[moonshot] envolve essencialmente risco. Elas definem concretamente "#emph[onde];" se quer chegar, mas não "#emph[como];". Para o "#emph[como];" existem "apostas", caminhos-hipótese que se pode testar. Algumas hipóteses vão falhar, mas o aprendizado é parte do processo. === Cultura organizacional <sec-cultura> Uma grande contribuição do arcabouço de missões apresentado por Mazzucato é lembrar no debate econômico que mudança é feita por pessoas e que as pessoas são motivadas por propósitos \(@fig-danpink). Para criar um ambiente em que os indivíduos se auto-motivem, é importante criar uma cultura organizacional adequada. Para isso, é importante pensar em governança. #figure([ #box(width: 70%,image("images/alinha_autonomia.svg")) ], caption: figure.caption( position: bottom, [ Governança: Alinhamento e Autonomia. ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-governanca> Governança é o conjunto de políticas, procedimentos, padrões e responsabilidades estabelecidos para orientar e monitorar a gestão e o uso de recursos \(incluindo dados, tecnologia e processos) de maneira eficaz e alinhada com os objetivos da organização. A governança garante que haja clareza nas decisões, responsabilidades e que os riscos sejam gerenciados adequadamente, protegendo os interesses de todas as partes envolvidas. A relação entre #emph[alinhamento] e #emph[autonomia] entre equipes e pessoas determina a governança em uma organização. Quando há pouco alinhamento e pouca autonomia, o resultado tende a ser a uma cultura apática, onde a falta de direção clara e a restrição na tomada de decisão geram desengajamento e falta de iniciativa. Em contraste, um cenário de muito alinhamento com pouca autonomia caracteriza a autocracia, que limita a inovação e a velocidade das mudanças. Por outro lado, pouco alinhamento combinado com muita autonomia pode levar a uma forma de anarquia, onde há esforços descoordenados e ineficiência. Muros organizacionais \(@sec-prisao) favorecem o surgimento de #emph[autocracia] dentro dos silos e #emph[anarquia] entre silos. O ideal é uma cultura ágil, de muito alinhamento e muita autonomia, que propicia decisões rápidas, bem embasadas e inovadoras. Para tanto, é preciso romper com silos e montar equipes multifuncionais, autônomas e responsáveis por um ou mais serviços do início ao fim e alinhadas à estragégia maior. #figure([ #box(width: 50%,image("images/missao.svg")) ], caption: figure.caption( position: bottom, [ O arcabouço sociotécnico ]), kind: "quarto-float-fig", supplement: "Figure", numbering: "1", ) <fig-missao> == Abordagem sociotécnica <abordagem-sociotécnica> A análise do problema torna transparente que além de direcionamento estratégico \(missão) e capacidade técnica, a evolução contínua de um serviço depende de uma cultura organizacional adequada, ou seja, depende de aspectos sociais. Esse é o argumento central da teoria sociotécnica, cujas lições foram descobertas, esquecidas e redescobertas várias vezes com diferentes nomes ao longo dos anos, das minas de carvão de Yorkshire, ao vale do silício. === Das minas de carvão de Yorkshire ao Spotify <das-minas-de-carvão-de-yorkshire-ao-spotify> No final dos anos 1940, o carvão era a principal fonte de energia da Inglaterra. Para apoiar a reconstrução industrial pós-guerra, era essencial aumentar a sua produção e reduzir custos. Com esse intuito, introduziram-se novas máquinas nas minas de Yorkshire. A produtividade, contudo, diminuiu. Chamados para investigar o problema, pesquisadores do Instituto Tavistock descobriram que as novas máquinas alteraram a dinâmica e cooperação entre os mineiros, que antes trabalhavam em equipes multifuncionais e autônomas com foco na resolução de problemas e alto grau de adaptabilidade. Dessa observação nasceu a teoria sociotécnica, que enfatiza a importância de equilibrar tecnologia e relações humanas. Essa lição foi ora esquecida, ora redescoberta em diferentes contextos: - No esforço de guerra americano que dobrou o PIB em 4 anos; - Na reconstrução do devastado Japão com o que se tornou conhecido como sistema Toyota de produção \(Lean Manufacturing); - No movimento de Lean Startups e DevOps do Vale do Silício que culminaram no que hoje é referido como modelo Spotify. #figure( align(center)[#table( columns: 2, align: (col, row) => (left,left,).at(col), inset: 6pt, [Princípio], [Descrição], [#strong[Foco no Valor];], [Focar em entregar valor aos usuários.], [#strong[Times Multifuncionais];], [Colaboração entre diferentes especialidades para agilizar e melhorar a qualidade do serviço.], [#strong[Autonomia];], [Empoderar equipes para tomar decisões e falhar.], [#strong[Alinhamento];], [Garantir alinhamento de padrões e objetivos comuns.], [#strong[Entrega Contínua];], [Automatizar com toque humano, reduzindo o tempo entre pedido e feedback do usuário.], [#strong[Feedback Contínuo];], [Utilizar o feedback dos usuários em ciclos rápidos de melhoria.], [#strong[Melhoria Contínua];], [Otimizar constantemente processos e serviços para alcançar excelência operacional.], [#strong[Eliminação de Desperdícios];], [Eliminar atividades que não agregam valor.], [#strong[Comunicação Aberta];], [Promover a transparência e compartilhamento de informações.], [#strong[Liderança Servil];], [Apoiar, capacitar e servir às equipes, em vez de direcioná-las.], )] , caption: [Os 10 princípios sociotécnicos] ) === DevOps: Abordagem sociotécnica no desenvolvimento de software <devops-abordagem-sociotécnica-no-desenvolvimento-de-software> No início do milênio, a prestação de serviços via web começou a se sofisticar e #emph[sites] passaram a ficar cada vez mais parecidos com #emph[aplicações];. Em grande medida, a #emph[web];, que foi criada como uma plataforma para publicação e consumo de documentos \(páginas), é um ambiente hostil para desenvolvimento de \_aplicações. Desenvolver aplicações web requer a coordenação de tarefas variadas e complexas. Incluindo design de interfaces visuais e a experiência do usuário \(UI/UX), gestão da compatibilidade entre diferentes navegadores, a garantia de interoperabilidade com bancos de dados e sistemas de terceiros, além de cuidar da manutenção da infraestrutura. A entrega de valor acontece quando novas #emph[funcionalidades] são publicadas e usadas pelos usuários. A evolução do serviço e ganho de competitividade depende de acelerar o ciclo de lançamento, análise e aprendizado. Ainda assim, mesmo entre os líderes de mercado, este era um processo lento, arriscado e custoso e o desenvolvimento de aplicações web envolvia lidar com diversos desafios: + #strong[Silos entre Desenvolvimento e Operações];: As equipes de desenvolvimento e operações \(negócios) trabalhavam frequentemente em isolamento, com pouca colaboração ou comunicação entre elas. Isso levava a uma transferência ineficaz do software do desenvolvimento para a produção, com operações lutando para gerenciar e manter aplicativos que não compreendiam completamente. + #strong[Ciclos de Lançamento Lentos];: Os métodos de desenvolvimento de software tradicionais, como o modelo em cascata, dominavam, levando a ciclos de lançamento longos e inflexíveis. Isso dificultava a capacidade das empresas de responder rapidamente às mudanças no mercado ou às necessidades dos clientes. + #strong[Falta de Automação];: A automação em áreas como testes, integração e implantação de software era limitada ou inexistente. Isso resultava em processos manuais propensos a erros, atrasos significativos e uma qualidade de produto inconsistente. + #strong[Dificuldades de Escalabilidade e Estabilidade];: Com a popularidade crescente da internet e das aplicações web, as organizações enfrentavam desafios significativos em escalar e manter a estabilidade de seus sistemas sob demanda variável. A falta de práticas e ferramentas adequadas para gerenciar a infraestrutura de TI complicava esses problemas. + #strong[Desafios de Qualidade e Confiabilidade];: A falta de práticas contínuas de integração e testes levava frequentemente a bugs de software e problemas de confiabilidade que só eram descobertos após o lançamento. Isso afetava negativamente a experiência do usuário e a reputação das empresas. + #strong[Resistência à Mudança];: Existia uma resistência cultural significativa à mudança dentro das organizações. Isso incluía a hesitação em adotar novas tecnologias e práticas, bem como a dificuldade em quebrar os silos organizacionais existentes. Por volta dos anos 2000, a Amazon implantava melhoria em sua plataforma de e-commerce em ciclos que duravam de muitos meses e até anos. Já em 2015, o varejista implantava mais de 50 milhões de melhorias por ano \(uma implantação por segundo) #cite(<HowAmazon>);. Em 15 anos a empresa mudou totalmente os seus processos e as inovações criadas no processo deram origem a toda uma nova linha de negócios, a AWS \(Amazon Web Services). O lançamento do #emph[framework] Rails em 2004 é um marco na trajetória de disseminação de práticas culturais para o desenvolvimento de aplicações web. Surge a ideia de #strong[convenção sobre configuração];, ou seja, a adoção de padrões de processo que tornam possível automatizar tarefas do desenvolvimento. Já no final dos anos 2000, início dos anos 2010, os aspectos sociotécnicos começaram a ser disseminados e conhecidos como #strong[DevOps] a integração dos silos de desenvolvimento e operações. Hoje o desenvolvimento web é muito mais engenharia que arte. Já estão bastante disseminados em toda a indústria processos de: - controle de versão; - testes automatizados; - integração contínua \(Continuous Integration, CI); - implantação contínua \(Continuous Deployment, CD). === DataOps: Abordagem sociotécnica para Dados <dataops-abordagem-sociotécnica-para-dados> Nos últimos poucos anos, as equipes responsáveis de gestão e análise de dados despertaram para as vantagens da abordagem sociotécnica e começaram a desenvolver e disseminar metodologia ágeis similares ao DevOps. Esse movimento passou a ser chamado #strong[DataOps];. == Arcabouço Data Mesh <arcabouço-data-mesh> O presente projeto pretende aplicar uma metodologia sociotécnica chamada #strong[Data Mesh];, proposta por <NAME> em 2019 e adotada por empresas como Netflix e PayPal. Data Mesh propõe uma arquitetura de dados descentralizada, com foco no design orientado ao domínio e autosserviço. Inspirado em teorias de design orientado ao domínio e topologias de equipe, o Data Mesh busca escalar a análise de dados através da descentralização, transferindo a responsabilidade dos dados de equipes especialistas em dados para as equipes de domínio \(áreas de negócio), com suporte de uma equipe de plataforma de dados. Os quatro princípios fundamentais do Data Mesh são: + Dados como Produto; + Propriedade do Domínio; + Plataforma Autosserviço de Dados; + Governança Compartilhada. === Dados como Produto <dados-como-produto> Encarar os dados como um produto implica tratá-los com o mesmo nível de cuidado e atenção dedicados ao desenvolvimento de produtos de software. Um dado tem valor quando usado e para que seja usado ele precisa ter algumas características identificadas pelo acrônimo #emph[FAIR];: #figure( align(center)[#table( columns: 2, align: (col, row) => (left,left,).at(col), inset: 6pt, [Princípio FAIR], [Descrição], [Localizável \(#strong[F];indable)], [Os dados devem ser facilmente descobertos e endereçáveis tanto por humanos quanto por computadores.], [Acessível \(#strong[A];ccessible)], [Os dados devem ser nativamente acessíveis e independentes de sistemas e formatos, permitindo o acesso através de diversas plataformas e ferramentas.], [Interoperável \(#strong[I];nteroperable)], [Os dados devem ser capazes de se integrar com outros conjuntos de dados, aplicações e processos de trabalho para análise, armazenamento e processamento.], [Reutilizável \(#strong[R];eusable)], [Os dados devem possuir valor intrínseco, ser confiáveis e estruturados de forma que suportem sua reutilização em diferentes contextos.], )] ) Além dessas características, é importante a #emph[codificação] de todo o processo de transformação dos dados, o que permite a criação de processos automáticos de documentação, testes e publicação dos dados. === Propriedade do Domínio <propriedade-do-domínio> Este princípio enfatiza a importância de atribuir a autonomia e responsabilidade dos dados às equipes que estão intimamente ligadas ao domínio específico do negócio. A ideia é que as equipes de domínio, que possuem conhecimento especializado sobre seus respectivos setores, estão melhor posicionadas para gerenciar, curar e atualizar os dados de maneira eficaz. Isso promove uma maior qualidade e relevância dos dados, já que a equipe de domínio entende as nuances e requisitos específicos dos dados que gerencia. No contexto do Projeto, os domínios da CGES são: - Orçamentos - Preços - Custos - SHA === Governança Compartilhada <governança-compartilhada> Este princípio enfatiza a importância de manter padrões e políticas de dados coesos em todos os domínios de uma organização e até entre organizações. Além de facilitar a interoperabilidade e automação, a adoção de #strong[convenções] facilita a comunicação entre equipes e reduz a quantidade de decisões de pouca relevância que precisam ser tomadas. No contexto deste projeto, além de buscar criar políticas de governança compartilhadas entre as coordenações da DESID, buscaremos alinhar nossas políticas a outras áreas como o Departamento de Monitoramento, Avaliação e Disseminação de Informações Estratégicas em Saúde \(DEMAS) e às políticas da Infraestrutura Nacional de Dados Abertos \(INDA). === Infraestrutura de autosserviço <infraestrutura-de-autosserviço> A ideia de uma plataforma de dados autosserviço é fornecer às equipes as ferramentas e capacidades necessárias para acessar, manipular e analisar dados sem depender excessivamente de suporte técnico especializado. Isso democratiza o acesso aos dados e capacita os usuários finais, permitindo que eles realizem tarefas de dados de forma independente, com agilidade e eficiência. Essas plataformas são projetadas para serem intuitivas e fáceis de usar, reduzindo barreiras para o trabalho com dados. No contexto deste projeto, será desenvolvida uma plataforma autosserviço de análise de dados para o DESID baseada em ferramentas open-source: DESID Playground. O #strong[DESID Playground] é um dos principais entregáveis do projeto. == Critérios de Sucesso <critérios-de-sucesso> O conceito de nível de maturidade é aplicado por diferentes governos e organizações para avaliar qualitativamente a eficácia das práticas de gestão e análise de dados e monitorar a evolução desses processos. À medida que uma organização avança nos níveis de maturidade, ela implementa práticas de governança de dados mais formalizadas e padronizadas, alcançando maior eficiência, qualidade dos dados e capacidade de inovação. #figure( align(center)[#table( columns: 3, align: (col, row) => (center,left,left,).at(col), inset: 6pt, [#strong[Nível];], [#strong[Nome];], [#strong[Descrição];], [1], [Inicial], [Processos ad-hoc, não estruturados e frequentemente caóticos.], [2], [Repetível], [Processos gerenciáveis e repetitivos, mas com pouca formalização.], [3], [Definido], [Processos documentados, padronizados e integrados.], [4], [Gerenciado], [Processos monitorados e controlados, com melhoria contínua baseada em métricas.], [5], [Otimizado], [Foco na otimização contínua e no uso de dados para inovação e vantagem competitiva.], )] , caption: [Níveis de Maturidade de Processos de Governança de Dados] ) Acreditamos que a melhor forma de medir o sucesso deste projeto é através de uma auto-avaliação da equipe beneficiária \(CGES/DESID) do nível de maturidade da análise de dados antes e depois do projeto. A auto-avaliação inicial é um dos entregáveis da próxima etapa do projeto; == Gestão de Projeto <gestão-de-projeto> A gestão do projeto adotará práticas inspiradas na metodologia ágil Scrum, incluindo: - #emph[sprints] de 2 a 3 semanas para cada domínio; - uma reunião de retrospectiva da #emph[sprint] anterior e planejamento da próxima #emph[sprint];; = Resultados <sec-result> == Entregáveis <entregáveis> #figure( align(center)[#table( columns: 4, align: (col, row) => (left,left,left,center,).at(col), inset: 6pt, [Entrega], [Data], [Produto], [% Projeto], [1], [02-Fev-2024], [#strike[Plano de Trabalho];], [10%], [2], [04-Mar-2024], [Mapeamento de sistemas e processos de geração de dados], [20%], [3], [01-Abr-2024], [Descrição da Infraestrutura de Desenvolvimento de Produtos de Dados], [20%], [4], [01-Jul-2024], [Mapeamento de potenciais produtos de dados], [20%], [5], [06-Dez-2024], [Apresentação de Produtos de Dados], [30%], )] ) === Mapeamento de sistemas e processos de geração de dados <mapeamento-de-sistemas-e-processos-de-geração-de-dados> - Auto-avaliação do nível de maturidade - Mapeamento produtos de dados atuais - Mapeamento do gap de capacidades === Descrição da Infraestrutura de Desenvolvimento de Produtos de Dados <descrição-da-infraestrutura-de-desenvolvimento-de-produtos-de-dados> - Especificação DESID Playground - Documentação de processos de desenvolvimento de produtos - Proposta de plano de capacitação === Mapeamento de potenciais produtos de dados <mapeamento-de-potenciais-produtos-de-dados> - Proposta de catálogo de produtos === Apresentação de Produtos de Dados <apresentação-de-produtos-de-dados> - 1 ou mais produtos do domínio Orçamentos \(SIOPS) - 1 ou mais produtos do domínio Preços \(BPS) - 1 ou mais produtos do domínio Custos \(ApuraSUS) - 1 ou mais produtos do domínio Contas de Saúde \(SHA) - Auto-avaliação do nível de maturidade == Cronograma <cronograma> #block[ #block[ #block[ #block[ #block[ #box(width: 8.17in, image("relatorio_files/figure-typst/mermaid-figure-1.png")) ] ] ] ] ] = Conclusão <sec-conclusao> Este plano de trabalho representa o primeiro entregável de um projeto ambicioso, cujo objetivo principal é promover a evolução da governança da análise de dados da CGES/DESID. Esperamos contribuir para uma evolução nas práticas, processos e ferramentas de análise de dados que represente a elevação de pelo menos um nível de maturidade até o término do projeto. A descrição dos entregáveis e o cronograma apresentado reflete a nossa melhor estimativa para a conclusão das etapas planejadas. No entanto, caso identifiquemos oportunidades para adiantar as entregas sem comprometer a qualidade, certamente o faremos. Este compromisso não apenas reflete a nossa dedicação em atingir os objetivos estabelecidos, mas também em superar as expectativas da equipe. // #block[ // #heading( // level: // 1 // , // numbering: // none // , // [ // Bibliografia // ] // ) // ] #block[ #bibliography("references.bib") ] <refs>
https://github.com/crd2333/crd2333.github.io
https://raw.githubusercontent.com/crd2333/crd2333.github.io/main/src/docs/AI/Reinforce%20Learning/价值学习.typ
typst
--- order: 2 --- #import "/src/components/TypstTemplate/lib.typ": * #show: project.with( title: "AI 笔记之强化学习", lang: "zh", ) = 价值学习 == 价值估计 === 蒙特卡洛方法 在现实问题中,通常不能假设对环境有完全了解,即无法明确地给出*状态转移和奖励函数*(例如,围棋的状态空间约为 $10^768$ 的大小)。因此需要一种*直接从经验数据*中学习价值和策略,无需构建马尔可夫决策过程模型的方法。 蒙特卡洛方法在强化学习中的基本思想是通过多次采样来估计状态或动作的值函数,随后利用*值函数*进行策略改进 - 目标:从策略 $pi$ 采样的历史经验中估计 $V^pi$ - 累计奖励(return)是总折扣奖励 $G_t = R_(t+1) + gamma R_(t+2) + dots + gamma^(T-1)R_T$ - 值函数(value function)是期望累计奖励 $V^pi(s) = E[R(s_0)+gamma R(s_1) +dots |s_0=s,pi] = E[G_t|S_0 = s,pi] approx 1/N sum_(i=1)^N G_t^i$ #note(caption: "总结")[ + 直接从经验回合进行学习,不需要模拟/搜索 + 模型无关(model-free),无需环境信息 + 核心思想简单直白:value = mean return + 使用完整回合进行更新(缺陷):只能应用于有限长度的马尔可夫决策过程,即所有的回合都应有终止状态 ] === 时序差分方法 $ G_t = R_(t+1) + gamma R_(t+2) + dots + gamma^(T-1)R_T = R_(t+1) + gamma G_(t+1)\ V(s_t) = V(s_t) + alpha [G_t - V(s_t)] = V(s_t) + alpha [R_(t+1) + gamma V(s_(t+1)) - V(s_t)] $ - 时序差分方法(Temporal Difference methods,简称 TD)能够直接使用经验回合学习,同样也是模型无关的 - 与蒙特卡洛方法不同,时序差分方法结合了自举(bootstrapping),能从不完整的回合中学习 - 时序差分通过更新当前预测值,使之接近估计出来的累计奖励,而非真实累计奖励 #note(caption: "时序差分 v.s. 蒙特卡洛")[ - 时序差分方法能够在每一步之后进行在线学习,蒙特卡洛方法必须等待回合终止,直到累计奖励已知 - 时序差分方法能够从不完整的序列中学习,蒙特卡洛方法只能从完整序列中学习 - 时序差分方法能够应用于无限长度的马尔可夫决策过程,蒙特卡洛方法只适用于有限长度 #set grid.cell(align: center+horizon) #grid(columns: (1fr, 1fr),row-gutter: 8pt, [时序差分方法],[蒙特卡洛方法], [$ V(s_t) <- V(s_t) +\ alpha(R_(t+1)+gamma V(s_(t+1))-V(s_t)) $],[$ V(s_t)<-V(s_t)+alpha(G_t - V(s_t)) $], [- 低方差,有偏差 - 更高效 - 最终收敛到 $V^pi$ - 对初始值更敏感 ], [- 高方差,无偏差 - 良好收敛性 - 对初始值不敏感 - 易于理解和使用 ], ) ] === 资格迹方法 - 为了实现方差与偏差的平衡,一种可行的方案是将蒙特卡洛方法与时序差分方法融合,实现*多步时序差分*,介于时序差分方法和蒙特卡洛方法(等效于无限步时序差分)之间。在此基础上提出*资格迹方法*,而 TD-$lambda$ 是一种比较常见的资格迹方法 - $n$ 步时序差分学习 $ "定义 " n " 步累计奖励" ~~~ G_t^n = R_(t+1) + gamma R(t+2) + dots + gamma^(n-1) R_(t+n) + gamma^n V(s_(t+n))\ V(s_t) <- V(s_t) + alpha(G_t^n - V(s_t)) $ - 资格迹方法(TD-$lambda$方法)通常使用一个超参数$lambda in [0, 1]$控制值估计蒙特卡罗还是时序差分 - TD-$lambda$方法 把 $n$ 从 $1$ 到 $infty$ 做加权和,从而在 $n$ 步时序差分方法上更进一步 - 当$lambda = 1$等价于蒙特卡罗方法,当$lambda = 0$等价于时序差分方法 $ "定义 " n " 步累计奖励" ~~~ G_t^n = R_(t+1) + gamma R(t+2) + dots + gamma^(n-1) R_(t+n) + gamma^n V(s_(t+n))\ G_t^lambda = (1-lambda)sum_(n=1)^infty lambda^(n-1)G_t^n $ - TD-$lambda$ 的两种视角 #grid2( fig("/public/assets/AI/AI_RL/img-2024-07-10-14-21-56.png"), fig("/public/assets/AI/AI_RL/img-2024-07-10-14-22-17.png") ) == SARSA & Q-learning - SARSA是一种针对表格环境中的*时序差分*方法,其得名于表格中的内容(状态-动作-奖励-状态-动作) - SARSA的策略评估为更新状态-动作值函数$ Q(s_t,a_t)<-Q(s_t,a_t)+alpha(R_(t+1)+gamma Q(s_(t+1),a_(t+1))-Q(s_t,a_t)) $ - SARSA的策略改进为$epsilon-"greedy"$ - 在线策略时序差分控制(on-policy TD control)使用当前策略进行动作采样,即SARSA算法中的两个动作“A”都是由当前策略选择的 - Q-learning学习状态动作值函数$Q(s, a) in RR$,是一种离线策略(off-policy)方法 $ Q(s_t, a_t)=sum_(t=0)^T gamma^t R(s_t,a_t), ~~~ a_t wave mu(s_t) $ - 为什么使用离线策略学习 - 平衡探索(exploration)和利用(exploitation) - 通过观察人类或其他智能体学习策略 - 重用旧策略所产生的经验 - 遵循一个策略时学习多个策略 - 具体实现 - 使用行为策略$mu(dot|s_t)$选择动作$a_t$ - 使用当前策略$pi(dot|s_(t+1))$选择后续动作$a'_(t+1)$,计算目标 $Q'(s_t, a_t) = R_t + gamma Q(s_(t+1),a'_(t+1))$ #hline() - 总结:SARSA 中新的 $Q(s,a)$ 通过当前策略得到,而 Q-Learning 通过 $max_a Q(s,a)$ 选取,除此之外代码上非常类似 == DQN === 经典 DQN - 回顾表格式 Q-Learning #mitex(`Q(s,a)\leftarrow Q(s,a)+\alpha(r+\gamma ~ max\limits_{a^{\prime}\in A} Q(s^{\prime},a^{\prime})-Q(s,a))`) - 如果我们将表格式的$Q(s, a)$的取值用神经网络代替,且该网络以“状态+行为作为输入,该状态行为价值作为输出”(或者,“状态作为输入,该状态的所有行为空间作为输出然后取最大值”),那么 Q-learning 算法就可以直接扩展为 DQN 学习 - 状态价值网络:$Q_omega (s,a)$ - 时序差分目标:$r + gamma display(max_a') Q_omega (s',a')$ - 给定一组状态转移数据:${(s_i,a_i,r_i,s'_i)}$,DQN 的损失函数构造为均方误差形式:#mitex(`\omega^{*}=\operatorname{argmin}\limits_{\omega}\frac{1}{2N}\sum_{i=1}^{N}\left[Q_{\omega}(s_{i},a_{i})-\left(r_{i}+\gamma\operatorname*{max}_{a^{\prime}} Q_{\omega}(s_{i}^{\prime},a^{\prime})\right)\right]^{2}`) - 训练时,有两种方法:*fitted Q 值迭代*和*在线 Q 值迭代算法* - 两种方法都有一些问题 + 神经网络训练需要独立同分布数据,但是状态转移数据强相关; + 更新神经网络参数并不是梯度下降,$y_i$的计算也更新梯度(target 和神经网络双向奔赴); + Q 值的更新不稳定 - 第一个通过并行 Q-learning(同步或异步)解决,但更好的策略是*经验回放缓存* - 第二第三个通过*目标网络*解决 - 最后得到经典 DQN 网络 #fig("/public/assets/AI/AI_RL/img-2024-07-04-16-11-51.png") === Double DQN - 经典 DQN 的问题:过高估计 Q 值(原因,噪声导致最大值的期望大于期望的最大值) - 引出 Double DQN,使用两个网络减少随机噪声的影响,恰巧,我们就有*目标网络*($omega^-$)和*当前策略网络*($omega$)这两个网络,分别用于计算TD目标值、选择行为 #fig("/public/assets/AI/AI_RL/img-2024-07-04-16-20-27.png") - 其算法流程 #algo(caption: "DDQN")[ ```typ #no-number 算法输入:迭代轮数$T$,状态特征维度$n$,动作集$A$,步长$alpha$,衰减因子$gamma$,探索率$epsilon$,当前网络$Q$,目标网络$Q'$,批量梯度下降的样本数$m$,目标网络参数更新频率$C$ #no-number 算法输出:$Q$网络参数 #no-number 随机初始化所有的状态和动作对应的价值$Q$,随机初始化当前网络$Q$的参数,目标网络$Q'$的参数$w'=w$。清空经验回放集合$D$ 初始化$S$为当前状态序列的第一个状态,拿到其特征向量$phi(S)$ 在$Q$网络中使用$phi(S)$作为输入,得到$Q$网络的有动作对应的$Q$值输出。用$epsilon-"greedy"$法在输出中选择对应的动作$a$ 在状态$S$执行当前动作$a$,得到新状态$S'$对应的特征向量$phi(S')$和奖励$R$,是否终止状态`is_end` 将${phi(S), a, R, phi(S'), "is_end"}$这个五元组存入经验回放集合$D$ 令 $S = S'$ 从经验回放集合$D$中采样$m$个样本${phi(S_j), a_j,R_j,phi(S'_j),"is_end"_j},j = 1,2,dots,m$,计算当前目标$Q$值$y_j$ $ y_j = cases(R_j\, &"is_end"_j = "True", R_j + gamma Q'(phi(S'_j)\, arg max_a' Q(phi(S'_j)\,a\, w)\, w')\, & "is_end"_j = "False") $ 使用均方差损失函数$1/m sum_(j=1)^m (y_j-Q(phi(S_j),a_j,w))^2$,通过神经网络的梯度反向传播来更新$Q$网络的所有参数$w$ 如果 `i % C == 1`,则更新目标网络参数$w' <- w$ 如果 $S'$ 是终止状态,则当前轮迭代完毕,转到2,否则转到3 #no-number #no-number 注意,上述的7步和8步的$Q$值计算也都需要通过$Q$网络计算得到。另外,实际应用中,为了算法较好的收敛,探索率$epsilon$需要随着迭代的进行而变小。 ``` ] === Dueling DQN - 将原来的$Q$网络拆分成两个部分:$V$网络和$A$网络 + $V$网络:以状态为输入、以实数为输出的表示状态价值的网络; + $A$网络:优势网络,它用于度量在某个状态$s$下选取某个具体动作$a$的合理性, - 它直接给出动作$a$的性能与所有可能的动作的性能的均值的差值。如果该差值(优势)大于$0$,说明动作$a$优于平均,是个合理的选择;如果差值(优势)小于$0$,说明动作$a$次于平均,不是好的选择; - 一般来说:$Q(s,a) = V(s) + A(s, a)$ - 这两个网络可以设计成完全独立,也可以共用一大部分,最后用全连接层区分。如下左图,假设状态输入为图像,用 CNN 做前置处理,然后分别全连接得到 $V$ 和 $A$ #grid2( fig("/public/assets/AI/AI_RL/img-2024-07-04-16-31-52.png"), fig("/public/assets/AI/AI_RL/img-2024-07-04-16-34-33.png") ) - 为什么要这样拆呢?分辨当前的价值是由状态价值提供还是行为价值提供,进而有针对性的更新,增加样本利用率。如上右图中,当前方有车时,不同$a$应有不同的优势价值$A_theta (s,a)$;而$V(s)$则更关注远方的目标 #fig("/public/assets/AI/AI_RL/img-2024-07-04-16-47-05.png") - 最后这个实际使用时的替代没什么理论依据,纯粹是实证效果好 === 优先经验回放池PER - 一般来说,具有较大TD误差的样本应该给予更高的优先级,有两种方法 + 采样第$t$个样本的概率$p$正比于TD误差$delta$: $p_t prop |delta_t| + epsilon$,其中$epsilon$是一个小正数,防止采样概率为$0$。 + 采样第$t$个样本的概率$p_t$反比于TD误差在全体样本中的排位$"rank"(t)$: $p_t prop 1/"rank"(t)$ - 第二种方法相对于第一种针对异常数据更鲁棒,过大或过小的异常点不影响其排位。 - 除了更改每个样本的采样概率之外,还需要相应调整样本的学习率,具有高优先级的样本使用较低的学习率 - 引入参数$beta in [0,1]$来调整各个样本的学习率$alpha$:$alpha_t <- alpha dot (n p_t)^(-beta)$,其中 $n$ 为样本数目。当均匀采样时 $p_i$ 均为 $1/n$,所有样本的学习率均为原始的 $alpha$,回到普通情况。 #hline() - 其它优化方法 + 在蒙特卡洛方法和时序差分中平衡 + 噪声网络 + 分布式 Q 学习 + Rainbow
https://github.com/mariuslb/thesis
https://raw.githubusercontent.com/mariuslb/thesis/main/content/02-theorie.typ
typst
= Theoretischer Hintergrund == Grundlagen zu Elektro- und Verbrennerfahrzeugen @ev und @ice stellen zwei grundlegend verschiedene Ansätze in der Automobiltechnologie dar, die jeweils ihre eigenen einzigartigen Vorteile und Herausforderungen mit sich bringen. === Elektrofahrzeuge Elektrofahrzeuge nutzen eine Batterie als Energiequelle und einen Elektromotor statt eines traditionellen Verbrennungsmotors. Diese Konfiguration ermöglicht es EVs, Emissionen am Auspuff zu eliminieren, was sie zu einer umweltfreundlicheren Option im Vergleich zu herkömmlichen ICE-Fahrzeugen macht. Die Energie für EVs stammt aus der Elektrizität, die entweder aus dem Stromnetz bezogen oder durch regenerative Technologien wie Solar- oder Windkraft gewonnen werden kann. Die Umweltauswirkungen von EVs hängen daher stark von der Energiequelle ab, die zum Laden der Batterien verwendet wird. Ist die Energiequelle nachhaltig, sind die gesamten Umweltauswirkungen geringer @energy-gov. EVs bieten außerdem den Vorteil niedrigerer Betriebskosten, da Strom in der Regel günstiger ist als Benzin oder Diesel und weil EVs weniger wartungsintensive Komponenten haben. Sie benötigen beispielsweise keine Ölwechsel oder komplexen Getriebesysteme, was zu langfristigen Kosteneinsparungen führen kann (U.S. Department of Energy). === Verbrennungsmotorfahrzeuge Verbrennungsmotoren, die entweder mit Benzin oder Diesel betrieben werden, nutzen die Energie, die durch die Verbrennung von Kraftstoffen freigesetzt wird. Diese Technologie ist gut etabliert und bietet eine hohe Energiedichte, was zu einer ausgezeichneten Reichweite und schnellen Betankung führt. Allerdings führt die Verbrennung fossiler Brennstoffe zu erheblichen Emissionen von Treibhausgasen und anderen Schadstoffen, was besonders in städtischen Gebieten ein großes Umweltproblem darstellt​ @epa-gov​. @ice sind in der Anschaffung oft günstiger als EVs, verursachen jedoch höhere Betriebskosten durch Kraftstoffverbrauch und regelmäßige Wartung. Moderne ICEs haben zwar erhebliche Verbesserungen in Bezug auf Emissionen und Effizienz erfahren, können aber den grundlegenden Nachteil der Emissionen nicht vollständig eliminieren​ (Energy.gov)​​ (HowStuffWorks)​. === Zusammenfassung tbd Während EVs Vorteile in Bezug auf Umweltfreundlichkeit und Betriebskosten bieten, punkten ICEs mit etablierter Technologie und schneller Betankung. Die Wahl zwischen diesen Fahrzeugtypen hängt oft von den spezifischen Bedürfnissen und Prioritäten der Nutzer sowie von der verfügbaren Infrastruktur ab. Mit fortschreitender Entwicklung der Batterietechnologie und des Ladensetzwerks könnten EVs jedoch eine immer attraktivere Option werden, was durch politische Anreize und wachsendes Umweltbewusstsein weiter verstärkt wird @emobicon. == ISO 23795-1:2022 Die ISO 23795-1:2022 ist ein ISO Standard im Bereich der intelligenten Transportsysteme. Er legt eine Methodik fest, wie Daten über Fahrten mittels nomadischer und mobiler Geräte erfasst und zur Schätzung des Kraftstoffverbrauchs sowie der CO2-Emissionen genutzt werden können. Diese Norm ist speziell darauf ausgerichtet, Flottenmanagern, Logistikdienstleistern oder Fahrern zu ermöglichen, den Energieverbrauch und die damit verbundenen Emissionen nachhaltig zu reduzieren​ @ISO​. === Kernmerkmale des Standards Die ISO 23795-1:2022 konzentriert sich auf die präzise Bestimmung des Kraftstoffverbrauchs durch die Erfassung detaillierter Fahrtdaten und Geschwindigkeitsprofile. Diese Daten werden von einem Global Navigation Satellite System (GNSS) Empfänger, der in einem nomadischen Gerät (Nomadic Device, ND) integriert ist, erfasst. Die Datenübertragung erfolgt über mobile Kommunikationsnetze zu einem zentralen Server, wo sie analysiert werden, um die verschiedenen Komponenten des mechanischen Energieaufwands zu berechnen. Diese Komponenten umfassen: - *Aerodynamik*: Der Luftwiderstand, den ein Fahrzeug während der Fahrt überwinden muss, beeinflusst den Energieverbrauch erheblich. Durch die Analyse der Geschwindigkeit und der Form des Fahrzeugs kann der aerodynamische Widerstand berechnet werden. - *Rollreibung*: Der Widerstand, der durch den Kontakt der Reifen mit der Fahrbahn entsteht. Dieser hängt von der Reifenbeschaffenheit und dem Straßenzustand ab. - *Beschleunigung/Bremsen*: Die Energie, die benötigt wird, um das Fahrzeug zu beschleunigen, sowie die Energie, die bei Bremsvorgängen verloren geht. - *Steigungswiderstand*: Die zusätzliche Energie, die erforderlich ist, um Steigungen zu überwinden. - *Standzeiten*: Die Energie, die während der Standzeiten, z.B. im Leerlauf an Ampeln, verbraucht wird. Durch die Kombination dieser Faktoren können präzise Modelle zur Schätzung des Kraftstoffverbrauchs und der CO2-Emissionen entwickelt werden, die sowohl für Echtzeit- als auch für nachträgliche Analysen verwendet werden können @ISO. === Anwendung und Nutzen ISO 23795-1:2022 bietet zahlreiche Vorteile und Anwendungsmöglichkeiten, die sich vor allem auf die Optimierung des Kraftstoffverbrauchs und die Reduktion der CO2-Emissionen konzentrieren. Die Norm ermöglicht eine genaue Erfassung und Analyse von Fahrtdaten, was verschiedene positive Effekte zur Folge hat: - *Optimierung des Kraftstoffverbrauchs* aufgrund von Identifikation ineffizienter Fahrmuster und der daraus folgenden Optimierung der Fahrweise - *Verbesserung des Flottenmanagements* aufgrund von fundierten, datenbasierten Entscheidungen der Disposition mittels präziser Daten zu Kraftstoffverbrauch und Emissionen - *Bewertung von Verkehrsmanagementmaßnahmen*: Analyse von Verkehrsflüssen sowie Engpassidentifikation, aber auch z. B. zur Erkennung von Auswirkungen von Verkehrsmanagementmaßnahmen auf die CO2-Emissionen Insgesamt bietet die ISO 23795-1:2022 eine strukturierte Methodik zur Erfassung und Analyse von Fahrtdaten, die es ermöglicht, den Kraftstoffverbrauch zu optimieren, die CO2-Emissionen zu reduzieren und das Flottenmanagement effizienter und nachhaltiger zu gestalten. === Physikalische Grundlagen Die physikalischen Grundlagen, die der ISO 23795-1:2022 zugrunde liegen, basieren auf den Prinzipien der Mechanik und Thermodynamik. ==== Mechanische Energie und Fahrzeugdynamik Die Berechnung des Kraftstoffverbrauchs und der CO2-Emissionen basiert auf den Grundsätzen der mechanischen Energie. Die wichtigsten Komponenten hierbei sind: - *Kinetische Energie*: Diese Energieform hängt von der Masse des Fahrzeugs und seiner Geschwindigkeit ab. Änderungen in der kinetischen Energie sind direkt mit Beschleunigung und Bremsvorgängen verbunden. - *Potentielle Energie*: Diese Energieform ist relevant bei Fahrten über Steigungen und Gefälle. Sie hängt von der Höhe ab, die ein Fahrzeug überwinden muss. - *Reibungskräfte*: Sowohl Rollreibung als auch Luftwiderstand sind wichtige Faktoren, die den Energieverbrauch beeinflussen. Rollreibung hängt von der Beschaffenheit der Reifen und der Straße ab, während der Luftwiderstand von der Fahrzeugform und der Geschwindigkeit abhängt @ISO. ==== Thermodynamik und Verbrennung Der Kraftstoffverbrauch ist auch eng mit thermodynamischen Prozessen verbunden, insbesondere mit der Verbrennung von Kraftstoffen in Verbrennungsmotoren. Wichtige Aspekte sind hier: - *Wirkungsgrad des Motors*: Der Wirkungsgrad beschreibt, wie effizient der Motor den chemischen Energiegehalt des Kraftstoffs in mechanische Energie umwandelt. Ein höherer Wirkungsgrad bedeutet weniger Kraftstoffverbrauch und geringere CO2-Emissionen. - *Energieverluste*: Während des Verbrennungsprozesses und der mechanischen Arbeit treten unvermeidbare Energieverluste auf, z.B. durch Wärmeabgabe an die Umgebung und Reibungsverluste im Motor und Antriebsstrang @ISO. ==== Berechnungsmethoden Die physikalischen Prinzipien werden durch komplexe mathematische Modelle umgesetzt, die verschiedene Parameter und deren Wechselwirkungen berücksichtigen. Diese Modelle basieren auf empirischen Daten und theoretischen Ansätzen, um präzise Vorhersagen über den Energieverbrauch und die Emissionen zu ermöglichen. Dazu werden unter anderem Geschwindigkeitsprofile, Fahrzeugmasse, Luftwiderstandskoeffizient und Rollwiderstand in die Berechnungen einbezogen @ISO. ==== Anwendung der Newtonschen Physik ISO 23795-1:2022 basiert auf den Prinzipien der Newtonschen Physik. Insbesondere die Berechnung des Kraftstoffverbrauchs durch GNSS-Geschwindigkeitsprofile nutzt diese Prinzipien. Das Newtonsche Bewegungsgesetz und die Energieerhaltung spielen eine zentrale Rolle bei der Bestimmung des Energieverbrauchs eines Fahrzeugs während der Fahrt @willenbrock2023lcmm. Beispielsweise wird die Energie, die notwendig ist, um ein Fahrzeug zu beschleunigen, durch das zweite Newtonsche Gesetz $ F = m * a $ bestimmt. Die Arbeit, die geleistet wird, um diese Beschleunigung zu erreichen, ist das Produkt aus der Kraft und der zurückgelegten Strecke. Diese Arbeit wird in Form von Kraftstoffverbrauch bzw. Energie ausgedrückt und bildet die Grundlage für die Berechnungen, die in der ISO 23795-1:2022 verwendet werden @willenbrock2023lcmm @ISO. == Worldwide Harmonised Light Vehicles Test Procedure Der Worldwide Harmonised Light Vehicles Test Procedure (WLTP) ist ein globaler Standard, der entwickelt wurde, um präzise und vergleichbare Daten über den Kraftstoffverbrauch und die CO2-Emissionen von Fahrzeugen zu liefern. Dieser Standard wurde eingeführt, um die Unzulänglichkeiten des vorherigen New European Driving Cycle (NEDC) zu adressieren und eine realitätsnähere Darstellung der Fahrzeugleistung zu gewährleisten. Das Hauptziel des WLTP ist es, Verbrauchern und Herstellern bessere Informationen zur Verfügung zu stellen, um die Umweltauswirkungen von Fahrzeugen zu reduzieren @gov-uk-wltp. Dieser Standard wurde seit September 2017 schrittweise eingeführt wurde und ab September 2018 verbindlich für alle neuen Fahrzeuge wurde, beinhaltet umfangreichere Testverfahren und Bedingungen, die die realen Fahrbedingungen besser widerspiegeln sollen. Der Test umfasst vier Geschwindigkeitsbereiche: - niedrig, - mittel, - hoch und - sehr hoch, die verschiedene Alltagsfahrbedingungen von städtischem Stop-and-Go-Verkehr bis zu Autobahnfahrten abdecken. Jeder dieser Bereiche beinhaltet unterschiedliche Aktivitäten wie Beschleunigen, Bremsen und Halten, was dazu beiträgt, dass die Tests die tatsächlichen Betriebsbedingungen besser abbilden​ @acea-2017​. Obwohl der WLTP einen erheblichen Fortschritt gegenüber dem NEDC darstellt, gibt es weiterhin Herausforderungen und Kritikpunkte. Erstens sind die Testbedingungen immer noch laborbasiert, was bedeutet, dass einige Variablen des realen Fahrens, wie Wetterbedingungen und individuelle Fahrstile, nicht vollständig erfasst werden können. Dies kann dazu führen, dass die realen Emissionen und der Verbrauch unter bestimmten Umständen von den Testergebnissen abweichen​ @holloway-2024​. Ebenso gibt es Bedenken bezüglich der globalen Einheitlichkeit des WLTP. Obwohl der Standard einen "globalen Kern" hat, wird er in verschiedenen Regionen unterschiedlich angewendet, je nach lokalen Vorschriften und Bedürfnissen. Diese Inkonsistenzen können zu Schwierigkeiten bei der globalen Vergleichbarkeit von Fahrzeugemissionen führen​ @acea-2017​. Zusammenfassend lässt sich sagen, dass der WLTP bedeutende Verbesserungen gegenüber seinem Vorgänger bietet, indem er genauere und zuverlässigere Daten liefert, die eine bessere Entscheidungsgrundlage für Verbraucher und Politik bieten. Dennoch sind weitere Verbesserungen und Anpassungen nötig, um die Diskrepanzen zwischen Labor- und Realbedingungen weiter zu reduzieren und eine wirklich globale Standardisierung zu erreichen @gov-uk-wltp @acea-2017 @holloway-2024. #pagebreak()
https://github.com/Amelia-Mowers/typst-tabut
https://raw.githubusercontent.com/Amelia-Mowers/typst-tabut/main/doc/example-snippets/example-data/titanic.typ
typst
MIT License
#import "@preview/tabut:<<VERSION>>": records-from-csv #let titanic = records-from-csv(csv("titanic.csv")); #let classes = ( "N/A", "First", "Second", "Third" );
https://github.com/long-paddy-field/typst_template
https://raw.githubusercontent.com/long-paddy-field/typst_template/main/README.md
markdown
# typst_template my typst template
https://github.com/jhnko/umu-templates
https://raw.githubusercontent.com/jhnko/umu-templates/main/report/README.md
markdown
The Unlicense
# En enkel rapportmall för Typst Denna rapportmall är baserad på mallen från kursen _datastrukturer och algoritmer_, vårterminen 2024. ## Hur man använder denna mall Du kan antingen skriva din rapport med webappen [typst.app](https://typst.app/), detta är [metod 1](#metod-1-skriva-på-typstapp), eller ladda ned denna mall lokalt och kompilera din rapport med terminalprogrammet `typst` ([metod 2](#metod-2-kompilera-lokalt)). ### Metod 1: Skriva rapporten med typst.app 1. Skapa ett konto (om du inte redan har ett) på [typst.app](https://typst.app/). 2. Skapa ett nytt projekt. 3. Ladda ned denna mapp ("report") som en .zip fil och packa upp. 4. Ladda upp `main.typ`, `template.typ` `reference.yml` och karlstad-universitet-harvard.csl filen i ditt nya projekt. 5. Börja skriva din rapport i filen `main.typ`. ### Metod 2: kompilera lokalt 1. Installera `typst` CLI programmet: Windows, i en PowerShell terminal: ```pwsh winget install --id Typst.Typst ``` macOS: ```zsh brew install typst ``` För Linux, se [Repology](https://repology.org/project/typst/versions) för hur du installerar programmet pakethanteraren på din distribution. 2. Ladda ned denna mapp ("report") som en .zip-fil och extrahera på ett lämpligt ställe. 3. Börja skriva din rapport i filen `main.typ`. 4. Kompilera till en PDF med kommandot: ```sh typst compile main.typ ``` ## Referenssystem Denna rapportmall använder referenssystemet Harvard, men det är enkelt att byta [CSL](https://citationstyles.org/)-fil och på sätt få ett annat referenssystem.[Sök efter andra referenssystem här](https://www.zotero.org/styles).
https://github.com/VisualFP/docs
https://raw.githubusercontent.com/VisualFP/docs/main/SA/design_concept/content/results/outlook_language.typ
typst
#import "../../../acronyms.typ": * = Visual and Textual Language <outlook-visual-textual> The function editor shown in the #ac("PoC") application could be extended into a language that can be viewed, edited, and executed in both a visual and textual fashion simultaneously. One could imagine a dedicated application for such an environment, but a web application or an extension for existing editors could also be envisioned. A Visual Studio Code extension mockup can be seen in @vscode-visual-textual to illustrate the idea. #figure( image("../../static/vscode-visual-textual.png"), caption: "Visual Studio Code Concept" )<vscode-visual-textual> The advantage of such an approach is that learners can build an understanding of functional concepts graphically and then have a clear learning path into code.
https://github.com/RaphGL/ElectronicsFromBasics
https://raw.githubusercontent.com/RaphGL/ElectronicsFromBasics/main/DC/chap2/4_calculating_electric_power.typ
typst
Other
#import "../../core/core.typ" === Calculating electric power We've seen the formula for determining the power in an electric circuit: by multiplying the voltage in "volts" by the current in "amps" we arrive at an answer in "watts." Let's apply this to a circuit example: #image("static/4-circuit.png") In the above circuit, we know we have a battery voltage of 18 volts and a lamp resistance of 3 $Omega$. Using Ohm's Law to determine current, we get: $ I = E / R = (18 V) / (3 Omega) = 6 A $ Now that we know the current, we can take that value and multiply it by the voltage to determine power: $ P = I E = 6 A times 18 V = 108 W $ Answer: the lamp is dissipating (releasing) 108 watts of power, most likely in the form of both light and heat. Let's try taking that same circuit and increasing the battery voltage to see what happens. Intuition should tell us that the circuit current will increase as the voltage increases and the lamp resistance stays the same. Likewise, the power will increase as well: #image("static/4-circuit-2.png") Now, the battery voltage is 36 volts instead of 18 volts. The lamp is still providing 3 Ω of electrical resistance to the flow of electrons. The current is now: $ I = E / R = (36 V) / (3 Omega) = 12 A $ This stands to reason: if $I = E/R$, and we double E while R stays the same, the current should double. Indeed, it has: we now have 12 amps of current instead of 6. Now, what about power? Notice that the power has increased just as we might have suspected, but it increased quite a bit more than the current. Why is this? Because power is a function of voltage multiplied by current, and both voltage and current doubled from their previous values, the power will increase by a factor of $2 times 2$, or 4. You can check this by dividing 432 watts by 108 watts and seeing that the ratio between them is indeed 4. Using algebra again to manipulate the formulae, we can take our original power formula and modify it for applications where we don't know both voltage and current: If we only know voltage (E) and resistance (R): If $I = E/R$ and $P = I E$ then $P = (E/R) E$ or $P = E^2/R$ If we only know current (I) and resistance (R): If $E = I R$ and $P = I E$ then $P = I (I R)$ or $P = I^2 R$ An historical note: it was <NAME>, not <NAME>, who first discovered the mathematical relationship between power dissipation and current through a resistance. This discovery, published in 1841, followed the form of the last equation $P = I 2 R$, and is properly known as Joule's Law. However, these power equations are so commonly associated with the Ohm's Law equations relating voltage, current, and resistance ($E = I R$ ; $I = E/R$ ; and $R = E/I$) that they are frequently credited to Ohm. #align(center)[Power Equations] $ P = I E $ $ P = E^2 / R $ $ P = I^2 R $ #core.review[ - Power measured in watts, symbolized by the letter "W". - Joule's Law: $P = I^2 R$ ; $P = I E$ ; $P = E^2/R$ ]
https://github.com/GYPpro/Java-coures-report
https://raw.githubusercontent.com/GYPpro/Java-coures-report/main/Report/5.typ
typst
#set text(font:("Times New Roman","Source Han Serif SC")) #show raw.where(block: false): box.with( fill: luma(240), inset: (x: 3pt, y: 0pt), outset: (y: 3pt), radius: 2pt, ) // Display block code in a larger block // with more padding. #show raw.where(block: true): block.with( fill: luma(240), inset: 10pt, radius: 4pt, ) #set math.equation(numbering: "(1)") #set text( font:("Times New Roman","Source Han Serif SC"), style:"normal", weight: "regular", size: 13pt, ) #set page( paper:"a4", number-align: right, margin: (x:2.54cm,y:4cm), header: [ #set text( size: 25pt, font: "KaiTi", ) #align( bottom + center, [ #strong[暨南大学本科实验报告专用纸(附页)] ] ) #line(start: (0pt,-5pt),end:(453pt,-5pt)) ] ) #show raw: set text( font: ("consolas", "Source Han Serif SC") ) = 实现一个高性能的基础正则表达式匹配方法 \ #text("*") 实验项目类型:设计性\ #text("*")此表由学生按顺序填写\ #text( font:"KaiTi", size: 15pt )[ 课程名称#underline[#text(" 面向对象程序设计/JAVA语言 ")]成绩评定#underline[#text(" ")]\ 实验项目名称#underline[#text(" 实现一个高性能的基础正则表达式匹配方法 ")]\ 指导老师#underline[#text(" 干晓聪 ")]\ 实验项目编号#underline[#text(" 1 ")]实验项目类型#underline[#text(" 设计性 ")]实验地点#underline[#text(" 数学系机房 ")]\ 学生姓名#underline[#text(" 郭彦培 ")]学号#underline[#text(" 2022101149 ")]\ 学院#underline[#text(" 信息科学技术学院 ")]系#underline[#text(" 数学系 ")]专业#underline[#text(" 信息管理与信息系统 ")]\ 实验时间#underline[#text(" 2023年11月1日上午 ")]#text("~")#underline[#text(" 2023年11月1日中午 ")]\ ] #set heading( numbering: "一、" ) #set par( first-line-indent: 1.8em) = 实验目的 \ #h(1.8em)练习字符串相关操作与基础数组的使用 = 实验环境 \ #h(1.8em)计算机:PC X64 操作系统:Windows 编程语言:Java IDE:Visual Studio Code 在线测试平台:leetcode = 程序原理 \ #h(1.8em)实现的正则规则为`.`与`*` `.` 匹配任意单个字符,`*` 匹配零个或多个前面的那一个元素 算法使用动态规划,复杂度为严格线性,即$O(N)$ 具体实现的过程使用了`String`类、`boolean`数组 代码正确性已通过`leetcode`平台测试 = 程序代码 文件`sis4\regularExp`实现了一个`boolean`函数,用于字符串匹配 ```java package sis4; public class regularExp { public static boolean isMatch(String s, String p) { int lenS = s.length(); int lenP = p.length(); boolean[][] m = new boolean[lenS+1][lenP+1]; m[0][0] = true; for(int i = 1; i <= lenS; i++){ m[i][0] = false; } for(int j = 1; j <= lenP; j++){ m[0][j] = false; if(j>=2 && p.charAt(j-1)=='*'){ m[0][j] = m[0][j-2]; } } for(int i = 1; i <= lenS; i++){ for(int j = 1; j <= lenP; j++){ if(s.charAt(i-1) == p.charAt(j-1) || p.charAt(j-1) == '.'){ m[i][j] = m[i-1][j-1]; } else if(p.charAt(j-1) == '*'){ if(p.charAt(j-2) == s.charAt(i-1) || p.charAt(j-2) == '.'){ m[i][j] = m[i-1][j] || m[i][j-2]; } else{ m[i][j] = m[i][j-2]; } } } } return m[lenS][lenP]; } } ``` = 出现的问题、原因与解决方法 \ #h(1.8em)一开始二维数组`m`使用`ArrayList`实现,随后在后续的编码过程中发现操作过于复杂。 例如对于`boolean`数组,`m[0][j] = m[i-1][j] || m[i][j-2]`这段代码,若使用`ArrayList`则需要写成 ```java m.get(i).set(j,Boolean.valueOf((boolean)m.get(i-1).get(j) || (boolean)m.get(i).get(j-2))); ``` #h(1.8em)研究过后发现,在不太需要访问控制的场合,适当使用数组而非对象会提高编码效率。 于是本段代码没有使用`ArrayList`。 = 测试数据与运行结果 #figure( table( align: left + horizon, columns: 3, [*输入*],[*输出*],[*解释*], [`s = "ab", p = ".*"`],[`true`],["`.*`" 表示可匹配零个或多个('`*`')任意字符('`.`')。], [`s = "aa", p = "a"`],[`false`],["`a`" 无法匹配 "`aa`" 整个字符串。], [`s = "accomplish", p = "ac*m.l.*"`],[`true`],[`*`匹配为上一个`c`,`.`匹配为`m`\ 之后`.*`匹配为`ish`] ) ) 注:测试平台`leetcode`的特性为直接向函数传参,因此不需要实现输入输出。
https://github.com/kdog3682/typkit
https://raw.githubusercontent.com/kdog3682/typkit/main/0.1.0/src/ink.typ
typst
#import "typography.typ": factory #let blue = factory.with(fill: blue) #let purple = factory.with(fill: purple) #let red = factory.with(fill: red) #let green = factory.with(fill: green) #let orange = factory.with(fill: orange) #let black = factory.with(fill: black) #let gray = factory.with(fill: gray)
https://github.com/FlixCoder/typst-slides
https://raw.githubusercontent.com/FlixCoder/typst-slides/main/template.typ
typst
MIT License
#import "metadata.typ": * #let slides(doc) = { // Variables for configuration. let scale = 2cm let width = beamer_format.at(0) * scale let height = beamer_format.at(1) * scale // Setup. set document( title: presentation_title, author: author, ) set text( font: font, size: 25pt, ) set page( width: width, height: height, margin: 0pt, ) set align(center + horizon) show heading: title => { pagebreak(weak: true) rect( width: 100%, height: 100%, fill: gradient.radial(theme_background.lighten(15%), theme_background.darken(15%)), text(fill: theme_text, title) ) counter(page).update(x => x - 1) pagebreak(weak: true) } // Title page. rect( width: 100%, height: 100%, fill: gradient.radial(theme_background.lighten(15%), theme_background.darken(15%)), { set text(fill: theme_text) text(size: 50pt, weight: "bold", presentation_title) linebreak() text(size: 30pt, presentation_subtitle) v(2em) text(size: 25pt, author) linebreak() text(size: 15pt, date) } ) pagebreak(weak: true) counter(page).update(1) // Actual content. doc } #let slide(title: "", content) = { // Header with slide title. let header = context { let headers = query(selector(heading).before(here())) set align(left + top) set text(fill: theme_text, weight: "bold") rect(width: 100%, fill: theme_background, pad(x: 10pt, y: 10pt)[ #if headers == () { text(size: 30pt, title) } else { let section = headers.last().body if title == "" { text(size: 30pt, section) } else { text(size: 15pt, section) linebreak() text(size: 25pt, title) } } ]) } // Footer with left and right section. let footer = grid(columns: (1fr, auto), pad(x: 5pt, y: 8pt)[ // Presentation title and author. #set align(left) #set text(12pt) #presentation_title \ #set text(10pt) #author -- #date ], [ // Page counter. #rect( width: 60pt, height: 40pt, fill: theme_background, align( center + horizon, text(20pt, fill: theme_text, context counter(page).display()) ) ) ]) pagebreak(weak: true) grid(rows: (auto, 1fr, auto), { header }, { // Inner slide content. pad(x: 10pt, y: 10pt, box(align(left, content))) }, { footer }) pagebreak(weak: true) }
https://github.com/thornoar/lambda-calculus-course
https://raw.githubusercontent.com/thornoar/lambda-calculus-course/master/main-lectures/problems-1.5.typ
typst
#import "template.lib.typ": * #import "@local/common:0.0.0": * #show: problemlist($(3 \/ 2)$, [ Редукционные графы ]) + Нарисуйте редукционные графы выражений:\ [a]#hs $H #I H$, где $H == @x%y.. x(\z.. y z y)x$;\ [b]#hs $L L #I$, где $L == @x%y.. x(y y)x$;\ [c]#hs $P Q$, где $P == @u.. u #I u$, $Q == @x%y.. x y #I (x y)$. + Постройте л-выражения с редукционными графами: #v(.7cm) #grid( columns: (6.5cm, 6.5cm), align: (center, center), gutter: 1.7cm, lambda-diagram( spacing: 2cm, { let (A,B,C) = ((0,0),(1,0),(2,0)) lnode(A) lnode(B) lnode(C) ledge(A,B, bend: 15deg) ledge(B,C, bend: 15deg) self(A, angle: -90deg) self(B, angle: -90deg) } ), lambda-diagram( spacing: 2cm, { let (A,B,C) = ((0,0),(1,0),(2,0)) lnode(A) lnode(B) lnode(C) ledge(A,B, bend: 15deg) ledge(B,C, bend: 15deg) self(B, angle: -90deg) self(C, angle: -90deg) } ), grid.cell( colspan: 2, lambda-diagram( spacing: 1cm, { let (A1,B1,C1) = ((0,1),(1,0),(0,-1)) let (A2,B2,C2) = ((4,1),(5,0),(4,-1)) let (A3,B3,C3) = ((8,1),(9,0),(8,-1)) let (A4,B4,C4) = ((9,1),(10,0),(9,-1)) lnode(A1) lnode(B1) lnode(C1) lnode(A2) lnode(B2) lnode(C2) lnode(A3) lnode(B3) lnode(C3) ledge(A1, A2) ledge(B1, B2) ledge(C1, C2) ledge(A2, A3) ledge(B2, B3) ledge(C2, C3) ledge(A1, B1) ledge(B1, C1) ledge(C1, A1) ledge(A2, B2) ledge(B2, C2) ledge(C2, A2) ledge(A3, B3) ledge(B3, C3) ledge(C3, A3) ledge(A3, A4) ledge(B3, B4) ledge(C3, C4) } ) ) ) #v(.7cm) + Покажите, что *ни одно* л-выражение не имеет редукционный граф #align(center, lambda-diagram( spacing: 1.8cm, { let (A,B1,B2,B3,C) = ((0,1),(-1,0),(0,0),(1,0),(0,-1)) lnode(A) lnode(B1) lnode(B2) lnode(B3) lnode(C) ledge(A,B1) ledge(A,B2) ledge(A,B3) ledge(B1,C) ledge(B2,C) ledge(B3,C) } )) + Найдите л-выражение $M_0$ с редукционным путём $ M_0 ->>_beta M_1 ->_eta M_2 ->>_beta M_3 ->_eta M_4 ->>_beta dots.h.c $ + Пусть $M_1 == (@x.. b x (b c))c$, $M_2 == (@x.. x x)(b c)$. Докажите, что *не* существует такого выражения $M$, что $M ->> M_1$ и $M ->> M_2$.
https://github.com/pluttan/typst-bmstu
https://raw.githubusercontent.com/pluttan/typst-bmstu/main/bmstu/bmstu.typ
typst
MIT License
#import "report_tituls.typ": * #import "g7.32-2017.typ": *
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/039.%20college.html.typ
typst
college.html Undergraduation Want to start a startup? Get funded by Y Combinator. March 2005(Parts of this essay began as replies to students who wrote to me with questions.)Recently I've had several emails from computer science undergrads asking what to do in college. I might not be the best source of advice, because I was a philosophy major in college. But I took so many CS classes that most CS majors thought I was one. I was certainly a hacker, at least.HackingWhat should you do in college to become a good hacker? There are two main things you can do: become very good at programming, and learn a lot about specific, cool problems. These turn out to be equivalent, because each drives you to do the other.The way to be good at programming is to work (a) a lot (b) on hard problems. And the way to make yourself work on hard problems is to work on some very engaging project. Odds are this project won't be a class assignment. My friend Robert learned a lot by writing network software when he was an undergrad. One of his projects was to connect Harvard to the Arpanet; it had been one of the original nodes, but by 1984 the connection had died. [1] Not only was this work not for a class, but because he spent all his time on it and neglected his studies, he was kicked out of school for a year. [2] It all evened out in the end, and now he's a professor at MIT. But you'll probably be happier if you don't go to that extreme; it caused him a lot of worry at the time.Another way to be good at programming is to find other people who are good at it, and learn what they know. Programmers tend to sort themselves into tribes according to the type of work they do and the tools they use, and some tribes are smarter than others. Look around you and see what the smart people seem to be working on; there's usually a reason.Some of the smartest people around you are professors. So one way to find interesting work is to volunteer as a research assistant. Professors are especially interested in people who can solve tedious system-administration type problems for them, so that is a way to get a foot in the door. What they fear are flakes and resume padders. It's all too common for an assistant to result in a net increase in work. So you have to make it clear you'll mean a net decrease.Don't be put off if they say no. Rejection is almost always less personal than the rejectee imagines. Just move on to the next. (This applies to dating too.)Beware, because although most professors are smart, not all of them work on interesting stuff. Professors have to publish novel results to advance their careers, but there is more competition in more interesting areas of research. So what less ambitious professors do is turn out a series of papers whose conclusions are novel because no one else cares about them. You're better off avoiding these.I never worked as a research assistant, so I feel a bit dishonest recommending that route. I learned to program by writing stuff of my own, particularly by trying to reverse-engineer Winograd's SHRDLU. I was as obsessed with that program as a mother with a new baby.Whatever the disadvantages of working by yourself, the advantage is that the project is all your own. You never have to compromise or ask anyone's permission, and if you have a new idea you can just sit down and start implementing it.In your own projects you don't have to worry about novelty (as professors do) or profitability (as businesses do). All that matters is how hard the project is technically, and that has no correlation to the nature of the application. "Serious" applications like databases are often trivial and dull technically (if you ever suffer from insomnia, try reading the technical literature about databases) while "frivolous" applications like games are often very sophisticated. I'm sure there are game companies out there working on products with more intellectual content than the research at the bottom nine tenths of university CS departments.If I were in college now I'd probably work on graphics: a network game, for example, or a tool for 3D animation. When I was an undergrad there weren't enough cycles around to make graphics interesting, but it's hard to imagine anything more fun to work on now.MathWhen I was in college, a lot of the professors believed (or at least wished) that computer science was a branch of math. This idea was strongest at Harvard, where there wasn't even a CS major till the 1980s; till then one had to major in applied math. But it was nearly as bad at Cornell. When I told the fearsome Professor Conway that I was interested in AI (a hot topic then), he told me I should major in math. I'm still not sure whether he thought AI required math, or whether he thought AI was nonsense and that majoring in something rigorous would cure me of such stupid ambitions.In fact, the amount of math you need as a hacker is a lot less than most university departments like to admit. I don't think you need much more than high school math plus a few concepts from the theory of computation. (You have to know what an n^2 algorithm is if you want to avoid writing them.) Unless you're planning to write math applications, of course. Robotics, for example, is all math.But while you don't literally need math for most kinds of hacking, in the sense of knowing 1001 tricks for differentiating formulas, math is very much worth studying for its own sake. It's a valuable source of metaphors for almost any kind of work.[3] I wish I'd studied more math in college for that reason.Like a lot of people, I was mathematically abused as a child. I learned to think of math as a collection of formulas that were neither beautiful nor had any relation to my life (despite attempts to translate them into "word problems"), but had to be memorized in order to do well on tests.One of the most valuable things you could do in college would be to learn what math is really about. This may not be easy, because a lot of good mathematicians are bad teachers. And while there are many popular books on math, few seem good. The best I can think of are <NAME>'s. And of course Euclid. [4]Everything<NAME> said "Try to learn something about everything and everything about something." Most universities aim at this ideal.But what's everything? To me it means, all that people learn in the course of working honestly on hard problems. All such work tends to be related, in that ideas and techniques from one field can often be transplanted successfully to others. Even others that seem quite distant. For example, I write essays the same way I write software: I sit down and blow out a lame version 1 as fast as I can type, then spend several weeks rewriting it.Working on hard problems is not, by itself, enough. Medieval alchemists were working on a hard problem, but their approach was so bogus that there was little to learn from studying it, except possibly about people's ability to delude themselves. Unfortunately the sort of AI I was trying to learn in college had the same flaw: a very hard problem, blithely approached with hopelessly inadequate techniques. Bold? Closer to fraudulent. The social sciences are also fairly bogus, because they're so much influenced by intellectual fashions. If a physicist met a colleague from 100 years ago, he could teach him some new things; if a psychologist met a colleague from 100 years ago, they'd just get into an ideological argument. Yes, of course, you'll learn something by taking a psychology class. The point is, you'll learn more by taking a class in another department.The worthwhile departments, in my opinion, are math, the hard sciences, engineering, history (especially economic and social history, and the history of science), architecture, and the classics. A survey course in art history may be worthwhile. Modern literature is important, but the way to learn about it is just to read. I don't know enough about music to say.You can skip the social sciences, philosophy, and the various departments created recently in response to political pressures. Many of these fields talk about important problems, certainly. But the way they talk about them is useless. For example, philosophy talks, among other things, about our obligations to one another; but you can learn more about this from a wise grandmother or E. B. White than from an academic philosopher.I speak here from experience. I should probably have been offended when people laughed at Clinton for saying "It depends on what the meaning of the word 'is' is." I took about five classes in college on what the meaning of "is" is.Another way to figure out which fields are worth studying is to create the dropout graph. For example, I know many people who switched from math to computer science because they found math too hard, and no one who did the opposite. People don't do hard things gratuitously; no one will work on a harder problem unless it is proportionately (or at least log(n)) more rewarding. So probably math is more worth studying than computer science. By similar comparisons you can make a graph of all the departments in a university. At the bottom you'll find the subjects with least intellectual content.If you use this method, you'll get roughly the same answer I just gave.Language courses are an anomaly. I think they're better considered as extracurricular activities, like pottery classes. They'd be far more useful when combined with some time living in a country where the language is spoken. On a whim I studied Arabic as a freshman. It was a lot of work, and the only lasting benefits were a weird ability to identify semitic roots and some insights into how people recognize words.Studio art and creative writing courses are wildcards. Usually you don't get taught much: you just work (or don't work) on whatever you want, and then sit around offering "crits" of one another's creations under the vague supervision of the teacher. But writing and art are both very hard problems that (some) people work honestly at, so they're worth doing, especially if you can find a good teacher.JobsOf course college students have to think about more than just learning. There are also two practical problems to consider: jobs, and graduate school.In theory a liberal education is not supposed to supply job training. But everyone knows this is a bit of a fib. Hackers at every college learn practical skills, and not by accident.What you should learn to get a job depends on the kind you want. If you want to work in a big company, learn how to hack Blub on Windows. If you want to work at a cool little company or research lab, you'll do better to learn Ruby on Linux. And if you want to start your own company, which I think will be more and more common, master the most powerful tools you can find, because you're going to be in a race against your competitors, and they'll be your horse.There is not a direct correlation between the skills you should learn in college and those you'll use in a job. You should aim slightly high in college.In workouts a football player may bench press 300 pounds, even though he may never have to exert anything like that much force in the course of a game. Likewise, if your professors try to make you learn stuff that's more advanced than you'll need in a job, it may not just be because they're academics, detached from the real world. They may be trying to make you lift weights with your brain.The programs you write in classes differ in three critical ways from the ones you'll write in the real world: they're small; you get to start from scratch; and the problem is usually artificial and predetermined. In the real world, programs are bigger, tend to involve existing code, and often require you to figure out what the problem is before you can solve it.You don't have to wait to leave (or even enter) college to learn these skills. If you want to learn how to deal with existing code, for example, you can contribute to open-source projects. The sort of employer you want to work for will be as impressed by that as good grades on class assignments.In existing open-source projects you don't get much practice at the third skill, deciding what problems to solve. But there's nothing to stop you starting new projects of your own. And good employers will be even more impressed with that.What sort of problem should you try to solve? One way to answer that is to ask what you need as a user. For example, I stumbled on a good algorithm for spam filtering because I wanted to stop getting spam. Now what I wish I had was a mail reader that somehow prevented my inbox from filling up. I tend to use my inbox as a todo list. But that's like using a screwdriver to open bottles; what one really wants is a bottle opener.Grad SchoolWhat about grad school? Should you go? And how do you get into a good one?In principle, grad school is professional training in research, and you shouldn't go unless you want to do research as a career. And yet half the people who get PhDs in CS don't go into research. I didn't go to grad school to become a professor. I went because I wanted to learn more.So if you're mainly interested in hacking and you go to grad school, you'll find a lot of other people who are similarly out of their element. And if half the people around you are out of their element in the same way you are, are you really out of your element?There's a fundamental problem in "computer science," and it surfaces in situations like this. No one is sure what "research" is supposed to be. A lot of research is hacking that had to be crammed into the form of an academic paper to yield one more quantum of publication.So it's kind of misleading to ask whether you'll be at home in grad school, because very few people are quite at home in computer science. The whole field is uncomfortable in its own skin. So the fact that you're mainly interested in hacking shouldn't deter you from going to grad school. Just be warned you'll have to do a lot of stuff you don't like.Number one will be your dissertation. Almost everyone hates their dissertation by the time they're done with it. The process inherently tends to produce an unpleasant result, like a cake made out of whole wheat flour and baked for twelve hours. Few dissertations are read with pleasure, especially by their authors.But thousands before you have suffered through writing a dissertation. And aside from that, grad school is close to paradise. Many people remember it as the happiest time of their lives. And nearly all the rest, including me, remember it as a period that would have been, if they hadn't had to write a dissertation. [5]The danger with grad school is that you don't see the scary part upfront. PhD programs start out as college part 2, with several years of classes. So by the time you face the horror of writing a dissertation, you're already several years in. If you quit now, you'll be a grad-school dropout, and you probably won't like that idea. When Robert got kicked out of grad school for writing the Internet worm of 1988, I envied him enormously for finding a way out without the stigma of failure. On the whole, grad school is probably better than most alternatives. You meet a lot of smart people, and your glum procrastination will at least be a powerful common bond. And of course you have a PhD at the end. I forgot about that. I suppose that's worth something.The greatest advantage of a PhD (besides being the union card of academia, of course) may be that it gives you some baseline confidence. For example, the Honeywell thermostats in my house have the most atrocious UI. My mother, who has the same model, diligently spent a day reading the user's manual to learn how to operate hers. She assumed the problem was with her. But I can think to myself "If someone with a PhD in computer science can't understand this thermostat, it must be badly designed."If you still want to go to grad school after this equivocal recommendation, I can give you solid advice about how to get in. A lot of my friends are CS professors now, so I have the inside story about admissions. It's quite different from college. At most colleges, admissions officers decide who gets in. For PhD programs, the professors do. And they try to do it well, because the people they admit are going to be working for them.Apparently only recommendations really matter at the best schools. Standardized tests count for nothing, and grades for little. The essay is mostly an opportunity to disqualify yourself by saying something stupid. The only thing professors trust is recommendations, preferably from people they know. [6]So if you want to get into a PhD program, the key is to impress your professors. And from my friends who are professors I know what impresses them: not merely trying to impress them. They're not impressed by students who get good grades or want to be their research assistants so they can get into grad school. They're impressed by students who get good grades and want to be their research assistants because they're genuinely interested in the topic.So the best thing you can do in college, whether you want to get into grad school or just be good at hacking, is figure out what you truly like. It's hard to trick professors into letting you into grad school, and impossible to trick problems into letting you solve them. College is where faking stops working. From this point, unless you want to go work for a big company, which is like reverting to high school, the only way forward is through doing what you love.Notes [1] No one seems to have minded, which shows how unimportant the Arpanet (which became the Internet) was as late as 1984.[2] This is why, when I became an employer, I didn't care about GPAs. In fact, we actively sought out people who'd failed out of school. We once put up posters around Harvard saying "Did you just get kicked out for doing badly in your classes because you spent all your time working on some project of your own? Come work for us!" We managed to find a kid who had been, and he was a great hacker.When Harvard kicks undergrads out for a year, they have to get jobs. The idea is to show them how awful the real world is, so they'll understand how lucky they are to be in college. This plan backfired with the guy who came to work for us, because he had more fun than he'd had in school, and made more that year from stock options than any of his professors did in salary. So instead of crawling back repentant at the end of the year, he took another year off and went to Europe. He did eventually graduate at about 26.[3] <NAME> says the best metaphors for hackers are in set theory, combinatorics, and graph theory.T<NAME> reminds you to take math classes intended for math majors. "'Math for engineers' classes sucked mightily. In fact any 'x for engineers' sucks, where x includes math, law, writing and visual design."[4] Other highly recommended books: What is Mathematics?, by Courant and Robbins; Geometry and the Imagination by Hilbert and Cohn-Vossen. And for those interested in graphic design, Byrne's Euclid. [5] If you wanted to have the perfect life, the thing to do would be to go to grad school, secretly write your dissertation in the first year or two, and then just enjoy yourself for the next three years, dribbling out a chapter at a time. This prospect will make grad students' mouths water, but I know of no one who's had the discipline to pull it off.[6] One professor friend says that 15-20% of the grad students they admit each year are "long shots." But what he means by long shots are people whose applications are perfect in every way, except that no one on the admissions committee knows the professors who wrote the recommendations.So if you want to get into grad school in the sciences, you need to go to college somewhere with real research professors. Otherwise you'll seem a risky bet to admissions committees, no matter how good you are.Which implies a surprising but apparently inevitable consequence: little liberal arts colleges are doomed. Most smart high school kids at least consider going into the sciences, even if they ultimately choose not to. Why go to a college that limits their options?Thanks to <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, and several anonymous CS professors for reading drafts of this, and to the students whose questions began it.More Advice for UndergradsJoel Spolsky: Advice for Computer Science College Students<NAME>: How to Become a Hacker
https://github.com/VisualFP/docs
https://raw.githubusercontent.com/VisualFP/docs/main/SA/project_documentation/content/quality_assurance.typ
typst
#import "../../acronyms.typ": ac = Quality Assurance The quality assurance concentrated on the #ac("PoC") application. Since it is intended to prove the feasibility of the concept only and wouldn't be released to end-users, we decided that the quality wasn't as important as the included functionality. The time budget for the #ac("PoC") has also been limited, so the quality measurements employed had to be cost-effective. Still, we did follow some quality guidelines while developing the application. == Compiler Warnings The project utilized #ac("GHC") warnings by enabling the `-Wall` option for all compilations. All warnings were resolved at the time of submission. == Workflow In the first weeks of the #ac("PoC") implementation, we've established a baseline of functionality to build upon. Afterwards, all changes were appropriately reviewed by the other member through pull requests to establish some consistency within the sources. == Testing We've opted for the test automation pyramid @testing-pyramid as the guideline for our testing strategy, and have made some adjustments to account for the small scope of the project. The underlying idea of the test automation pyramid is to categorize tests according to their cost, which is determined by their brittleness, the effort required to write them, and their execution time. Then, it dictates that the cheaper a test category is, the more tests there should be of it. In turn, there should be as few costly tests as possible. For VisualFP, we've adjusted the test automation pyramid for our situation as follows: / 1. Manual: Since manual tests are the most expensive, we've limited manual testing to exploratory runs. In such runs, we've tried to accomplish different things using the complete application while searching for bugs. / 2. Component: Component tests test the functionality of a component as a subsystem of the application in isolation. We didn't interpret out the term 'component' too strictly and wrote tests according to how we felt they made sense. / 3. Unit: Unit tests are the cheapest; thus, most tests are of this kind. We've opted against dedicated integration or #ac("UI") tests since setting them up would have been costly, which, given the limited time budget of the #ac("PoC"), we've deemed them not to be a good investment.
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/.github/ISSUE_TEMPLATE/short_bug_report.md
markdown
Apache License 2.0
--- name: Short bug report about: Create a short bug report if you are confident that the bug is simple and does not require a detailed report title: '' labels: '' assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **Package/Software version:** tinymist extension version: `v0.11.0`. Get it by `tinymist --version` in terminal. ```plain tinymist Build Timestamp: 2024-03-22T02:18:18.207134800Z Build Git Describe: v0.11.1-rc2-5-gf0a96cb-dirty Commit SHA: f0a9... Commit Date: None Commit Branch: None Cargo Target Triple: x86_64-pc-windows-msvc Typst Version: 0.11.0 ```
https://github.com/kotfind/hse-se-2-notes
https://raw.githubusercontent.com/kotfind/hse-se-2-notes/master/cpp/lectures/2024-09-20.typ
typst
#import "/utils/math.typ": * = Обобщенное программирование (шаблоны) #def[ #defitem[Обобщенное программирование] --- набор методов для создания структур и алгоритмов, которые могут работать в различных ситуациях и с различными исходными данными. ] Пример: ```cpp double total(const double* data, size_t len) { double sum = 0; for (size_t i = 0; i < len; ++i) { sum += data[i]; } return sum; } ``` Плохой вариант: трижды сделать `Ctrl-C, Ctrl-V` Мета программирование --- программы, которые пишут программы Пример с шаблонами: ```cpp template <typename V> V total(const V* data, size_t len) { V sum = 0; for (size_t i = 0; i < len; ++i) { sum += data[i]; } return sum; } ``` Обращение к функции от конкретного типа создает реализацию перегруженной функции. Т.е. шаблон создает семейство функций. Улучшение. Из ```cpp V sum = 0; ``` в ```cpp V sum{}; ``` Посчитать сумму: ```cpp auto result = std::accumulate(A.begin(), A.end(), decltype(A)::value_type(0)); auto result = std::reduce(A.begin(), A.end()); std::for_each(A.begin(), A.end(), [&](int n) { result += n; }); ``` == Правила вывода типов шаблонов ```cpp template<typename T> void f(const T& param); int x = 1; f(x); // Чему равно T? // T = int // ParamType = const int& ``` Правила: + Если в `f(expr)`, `expr` --- ссылка, то ссылка отбрасывается + Тип `T` получается из сопоставления (pattern matching) типа `expr` и `ParamType` *TODO:* см презентацию == Виды шаблонов - Функции ```cpp template<typename T> void f(T arg); ``` - Классы ```cpp template<typename T> class Matrix; ``` - Переменные ```cpp template<class T> T pi = T(3.1415926L); ``` - Типы (псевдонимы типов) ```cpp template<typename T> using ptr = T*; ptr<int> x; ``` - Концепты (будет позднее) ```cpp template<typename T> concept C1 = sizeof(T) != sizeof(int); ``` == Специализация Специализации должны быть написаны до первого использования === Полная специализация ```cpp // Общая реализация template<typename T> class Matrix {...}; // Более эффективная // реализация для bool-ок template<> class Matrix<bool> {...}; ``` === Частичная специализация ```cpp template<class T1, class T2, int I> class A {}; // основной шаблон template<class T, int I> class A<T, T*, I> {}; // T2 --- указатель на T1 template<class T, class T2, int I> class A<T*, T2, I> {}; // T1 --- указатель template<class T> class A<int, T*, 5> {}; // T1 = int, T2 --- указатель, I = 5 ``` === Контроль подставляемых типов ```cpp template<typename T> void swap(T& a, T& b) noexcept { static_assert(std::is_copy_constructable_v<T>, "Swap requires copying"); static_assert( std::is_nothrow_copy_constructable_v<T> && std::is_nothrow_copy_assinable_v<T>, "Swap requires copying" ); auto c = b; b = a; a = c; } ``` === Предикаты времени компиляции ```cpp #include <type_traits> ``` *TODO*: ... === Концепты #def[ #defitem[Концепт] --- семейство типов, обладающих определенными свойствами ("утинная типизация") ] ```cpp template<typename T> concept C1 = sizeof(T) != sizeof(int); template<C1 T> struct S1 {...}; ``` === Требования ```cpp #include <type_traits> template<typename T> requires std::is_copy_constructible_v<T> T get_copy(T* pointer) { if (!pointer) { throw std::runtime_error{"Null-pointer dereference"}; } return *pointer; } ```
https://github.com/imkochelorov/ITMO
https://raw.githubusercontent.com/imkochelorov/ITMO/main/src/algorithms/s2/l5/main.typ
typst
#import "../template.typ": * #set page(margin: 0.4in) #set par(leading: 0.55em, first-line-indent: 0em) #set text(font: "New Computer Modern") #show par: set block(spacing: 0.55em) #show heading: set block(above: 1.4em, below: 1em) #show heading.where(level: 1): set align(center) #show heading.where(level: 1): set text(1.44em) #set page(height: auto) #set page(numbering: none) #set raw(tab-size: 4) #set raw(lang: "py") #show: project.with( title: "Алгоритмы и Структуры Данных. Лекция 5", authors: ( "_scarleteagle", //"imkochelorov", // F // ноутбук его подвел "AberKadaber" ), date: "13.03.2024", ) #let make = $supset.sq$ = Декартово дерево #quote("Мы уже рассмотрели два хороших варианта деревьев, а декартово дерево будет работать на рандом", attribution:"<NAME>", block: true) Будем хранить:\ - `key` --- ключ (BST)\ - `priority` (По ним выполняются свойства кучи) Вершина выглядит как `(key, priority)` Команды: - `insert(t, x)` - `find(x)` - `remove(t, x)` - `split(t, x)` - `merge(l, r)` По английски это дерево называется Treap = Tree + Heap или Cartesian Tree\ По русски иногда называется: + Пиво = Пирамида + Дерево + Курево = Куча + Дерево + Дуча = Дерево + Куча + Дерамида = Дерево + Пирамида #columns(2)[ #align(center)[#image("1.png", width: 70%) _Декартово дерево_] #colbreak() #align(center)[#image("2.png", width: 55%) _Декартово дерево в\ декартовой системе координат_] ] Как балансировать?\ //как значек пусть нарисовать вроде make // make $k_1, k_2, dots, k_n$ --- ключи\ $p_1, p_2, dots p_n$ --- случайные целые числа (попарно различные)\ \ Для начала т.к. по приоритетам выполняются свойства кучи элемент с максимальным приоритетом в корень\ Теперь разделим оставшиеся вершины на те у которых ключ меньше и те у кого ключ больше чем у корня и запустимся рекурсивно от каждого из двух получившихся множеств\ Заметим что такое построение практически такое же как сортировка QuickSort, поэтому асимптотика времени работы будет $O(n log(n))$. Также мы знаем что матожидание глубины рекурсии QuickSort $O(log(n))$, а в терминах дерева это означает что матожидание глубины дерева равна $O(log(n))$ \ \ Теперь научимся делать операции `split` и `merge` #columns(2)[ ``` def split(t: Node, x: int): # на L <= x, R > x if t is None: return (None, None) if t.key <= x: l, r = split(t.r, x) t.r = l return t, r else: l, r = split(t.l, x) t.l = r return (t, l) ``` #colbreak() #align(center)[#image("3.png", width: 100%)] ] #quote("Раньше мы проталковали в детей, теперь мы их режем на куски. Ютуб не блокируй пожалуйста", attribution:"<NAME>", block: true) #columns(2)[ ``` def merge(l: Node, r: Node) -> Node: if l is None: return r if r is None: return l if l.priority > r.priority: l.r = merge(l.r, r) return l else: r.l = merge(l, r.l) return r ``` #colbreak() #align(center)[ #image("4.png") ] ] #quote("Тут в чате пишут что сейчас сделаем смешную нарезку детей...", attribution:"<NAME>", block: true) Работает за $O(log(n))$ в среднем (в средем здесь $!=$ амортизировано, а = матожидание) \ ``` def insert(t: Node, x: int): l, r = split(t, x) t = merge(merge(l, x), r) ``` Круто, работает за $O(log(n))$, но при этом константа достаточно большая, как минимум 3, а на самом деле больше \ ``` def remove(t: Node, x: int): m, r = split(t, x) l, m = split(m, x - 1) t = merge(l, r) ``` Круто, это тоже работает за $O(log(n))$, но опять же с большой константой == Декартово дерево по неявному ключу Пусть есть некоторый массив и мы хотим научиться делать на нем операции типа циклически сдвинуть\ Для этого представим его в виде декартового дерева: + #strike(`key`+" = индекс элемента в массиве" + `(i)`)\ `size` = размер поддерева + `priority` + `value` = значение элемента ($a_i$) `split(x)` разделит нам дерево на два: первый с индексами от 0 $dots$ $x$, второй с индексами $x+1 space dots space n$\ После этого делаем `merge()` и все ломается\ Чтобы этого не происходило сделаем фукнцию update и вместо ключа будем хранить размер поддерева // допиши в фукнции update везде // ?? что ты имеешь в виду//ну он сказал что перед return в merge и split надо добавить // т.к. мы update только тут вводим, лучше просто словами написать // кста, у меня дискра через 30 минут // ??? // мне дзшку сдать надо :( если что-то надо, допишу, только в комментариях напиши // грустна ``` def update(t: Node)" t.sz = 1 if t.l != None: t.sz += t.l.sz if t.r != None: t.sz += t.r.sz ``` при `merge()` произведем `update()` перед каждым `return`\ \ Теперь поменяем `split` ``` def split(t: Node, x: int): if t is None: return (None, None) if t.l.sz + 1 <= x: l, r = split(t.r, x-(t.l.sz+1)) t.r = l update(t) return (t, r) else: l, r = split(t.l, x) t.l = r update(t) return (l, t) ``` #image("5.png", width: 30%) #image("6.png", width: 30%) Победа, теперь мы можем сделать циклический сдвиг массива, причем за $O(log(n))$\ \ ``` t = None # a_0, a_1, ... a_n for i in range(n): t = merge(t, Node(a[i])) l, r = split(t, k) t = merge(r, l) ``` #image("7.png", width: 30%) А еще мы умеем искать ответы на запросы на отрезке: ``` L, M = split(t, l) M, R = split(M, r - l) print(M.min) # здесь мы добавили поле min - минимум в поддереве ``` #image("8.png", width: 30%) Также можно сделать и отложеные операции на отрезке\ \ Итог: мы умеем делать кучу интересных операций, даже за $O(log(n))$, но к сожалению константа достаточно большая
https://github.com/SkiFire13/master-thesis
https://raw.githubusercontent.com/SkiFire13/master-thesis/master/config/translated.typ
typst
#let translated(..dict) = context dict.named().at(text.lang) #let degree = translated( it: [ Tesi di Laurea ], en: [ Master thesis ], ) #let supervisor-prefix = translated( it: [ Relatore ], en: [ Supervisor ], ) #let candidate-prefix = translated( it: [ Laureando ], en: [ Candidate ], ) #let academic-year-prefix = translated( it: [ Anno accademico ], en: [ Academic year ], ) #let acknowledgements = ( it: "Ringraziamenti", en: "Acknowledgements", )
https://github.com/0xpapercut/wypst
https://raw.githubusercontent.com/0xpapercut/wypst/main/README.md
markdown
MIT License
# wypst Typst math typesetting for the web. ## Current Project Status I feel like there's something like 20% of work left to get Wypst in a more stable state, but for some months now I haven't been able to allocate the necessary time to do it. There's still no conclusive roadmap for native HTML export in Typst, and because this project gained some traction, I'll make a commitment to complete all unimplemented functionality, fix issues, and add whatever is needed to achieve equivalency of `obsidian-wypst` to `obsidian-typst`. ## Usage You can load this library either by using a script tag, or installing it with npm. ### Script tag (simple usage) ```html <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/wypst.min.css" crossorigin="anonymous"> <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/wypst.min.js" crossorigin="anonymous"></script> <script> wypst.initialize().then(() => { wypst.renderToString("x + y"); // Test it out! }) </script> ``` Keep in mind that the javascript file is 17M, so if your internet is slow it might take some seconds to load. ### npm package (advanced usage) If having the wasm inlined directly is an incovenience, install the npm package ```bash npm install wypst ``` You may then load the wasm binary ```javascript import wypst from 'wypst'; import wasm from 'wypst/dist/wypst.wasm'; await wypst.initialize(wasm); wypst.renderToString("x + y"); // Test it out! ``` Keep in mind that you will probably need to tell your bundler how to load a `.wasm` file. If you have difficulties you can open an issue. ### Rendering Typst Math To render a Typst math expression, you can use either `render` or `renderToString`, as the example below shows: ```javascript wypst.render('sum_(n >= 1) 1/n^2 = pi^2/6', element); // Renders into the HTML element wypst.renderToString('sum_(n >= 1) 1/n^2 = pi^2/6'); // Renders into an HTML string ``` ## Contributing All help is welcome. Please see [CONTRIBUTING](CONTRIBUTING.md).
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/g-exam/0.3.0/src/auxiliary.typ
typst
Apache License 2.0
#import "./global.typ" : * #let __g-student-data(show-line-two: true) = { locate(loc => { [#__g-localization.final(loc).family-name: #box(width: 2fr, repeat[.]) #__g-localization.final(loc).given-name: #box(width:1fr, repeat[.])] if show-line-two { v(1pt) align(right, [#__g-localization.final(loc).group: #box(width:2.5cm, repeat[.]) #__g-localization.final(loc).date: #box(width:3cm, repeat[.])]) } } ) } #let __g-grade-table-header(decimal-separator: ".") = { locate(loc => { let end-g-question-locations = query(<end-g-question-localization>, loc) let columns-number = range(0, end-g-question-locations.len() + 1) let question-row = columns-number.map(n => { if n == 0 {align(left + horizon)[#text(hyphenate: false,__g-localization.final(loc).grade-table-queston)]} else if n == end-g-question-locations.len() {align(left + horizon)[#text(hyphenate: false,__g-localization.final(loc).grade-table-total)]} else [ #n ] } ) let total-point = 0 if end-g-question-locations.len() > 0 { total-point = end-g-question-locations.map(ql => __g-question-point.at(ql.location())).sum() } let points = () if end-g-question-locations.len() > 0 { points = end-g-question-locations.map(ql => __g-question-point.at(ql.location())) } let point-row = columns-number.map(n => { if n == 0 {align(left + horizon)[#text(hyphenate: false,__g-localization.final(loc).grade-table-points)]} else if n == end-g-question-locations.len() [ #strfmt("{0:}", calc.round(total-point, digits:2), fmt-decimal-separator: decimal-separator) ] else { let point = points.at(n) [ #strfmt("{0}", calc.round(point, digits: 2), fmt-decimal-separator: decimal-separator) ] } } ) let calification-row = columns-number.map(n => { if n == 0 { align(left + horizon)[#text(hyphenate: false, __g-localization.final(loc).grade-table-calification)] } } ) align(center, table( stroke: 0.8pt + luma(80), columns: columns-number.map( n => { if n == 0 {auto} else if n == end-g-question-locations.len() {auto} else {30pt} }), rows: (auto, auto, 30pt), ..question-row.map(n => n), ..point-row.map(n => n), ..calification-row.map(n => n), ) ) } ) } #let __g-show_clarifications = (clarifications: none) => { if clarifications != none { let clarifications-content = [] if type(clarifications) == "content" { clarifications-content = clarifications } else if type(clarifications) == "string" { clarifications-content = clarifications } else if type(clarifications) == "array" { clarifications-content = [ #for clarification in clarifications [ - #clarification ] ] } else { panic("Not implementation clarificationso of type: '" + type(clarifications) + "'") } rect( width: 100%, stroke: luma(120), inset:8pt, radius: 4pt, clarifications-content ) v(5pt) } } #let __document-name = ( exam-info: ( academic-period: none, academic-level: none, academic-subject: none, number: none, content: none, model: none )) => { let document-name = "" if exam-info.at("name", default: none) != none { document-name += " " + exam-info.name } if exam-info.at("content", default: none) != none { document-name += " " + exam-info.content } if exam-info.at("number", default: none) != none { document-name += " " + exam-info.number } if exam-info.at("model", default: none) != none { document-name += " " + exam-info.model } return document-name } #let __read-localization = ( languaje: "en", localization: ( grade-table-queston: none, grade-table-total: none, grade-table-points: none, grade-table-calification: none, point: none, points: none, page: none, page-counter-display: none, family-name: none, given-name: none, group: none, date: none )) => { let __lang_data = toml("./lang.toml") if(__lang_data != none) { let __read_lang_data = __lang_data.at(languaje, default: localization) if(__read_lang_data != none) { let __read-localization_value = (read_lang_data: none, field: "", localization: none) => { let __parameter_value = localization.at(field) if(__parameter_value != none) { return __parameter_value } let value = read_lang_data.at(field, default: __g-default-localization.at(field)) if(value == none) { value = __g-default-localization.at(field)} return value } let __grade_table_queston = __read-localization_value(read_lang_data: __read_lang_data, field: "grade-table-queston", localization: localization) let __grade_table_total = __read-localization_value(read_lang_data: __read_lang_data, field: "grade-table-total", localization: localization) let __grade_table_points = __read-localization_value(read_lang_data: __read_lang_data, field: "grade-table-points", localization: localization) let __grade_table_calification = __read-localization_value(read_lang_data: __read_lang_data, field: "grade-table-calification", localization: localization) let __point = __read-localization_value(read_lang_data: __read_lang_data, field:"point", localization: localization) let __points = __read-localization_value(read_lang_data: __read_lang_data, field: "points", localization: localization) let __page = __read-localization_value(read_lang_data: __read_lang_data, field: "page", localization: localization) let __page-counter-display = __read-localization_value(read_lang_data: __read_lang_data, field: "page-counter-display", localization: localization) let __family_name = __read-localization_value(read_lang_data: __read_lang_data, field: "family-name", localization: localization) let __given_name = __read-localization_value(read_lang_data: __read_lang_data, field: "given-name", localization: localization) let __group = __read-localization_value(read_lang_data: __read_lang_data, field: "group", localization: localization) let __date = __read-localization_value(read_lang_data: __read_lang_data, field: "date", localization: localization) let __g-localization_lang_data = ( grade-table-queston: __grade_table_queston, grade-table-total: __grade_table_total, grade-table-points: __grade_table_points, grade-table-calification: __grade_table_calification, point: __point, points: __points, page: __page, page-counter-display: __page-counter-display, family-name: __family_name, given-name: __given_name, group: __group, date: __date, ) __g-localization.update(__g-localization_lang_data) } } } #let __show-watermark = ( author: ( name: "", email: none, watermark: none ), school: ( name: none, logo: none, ), exam-info: ( academic-period: none, academic-level: none, academic-subject: none, number: none, content: none, model: none ), question-point-position: left, ) => { let dx = if question-point-position == left { 58pt } else { 72pt } place( top + right, float: true, clearance: 0pt, // dx:72pt, dx:dx, dy:-115pt, rotate(270deg, origin: top + right, { if author.at("watermark", default: none) != none { text(size:7pt, fill:luma(90))[#author.watermark] h(35pt) } if exam-info.at("model", default: none) != none { text(size:8pt, luma(40))[#exam-info.model] } } ) ) }
https://github.com/Area-53-Robotics/53E-Notebook-Over-Under-2023-2024
https://raw.githubusercontent.com/Area-53-Robotics/53E-Notebook-Over-Under-2023-2024/giga-notebook/entries/notebook-graphs/entry.typ
typst
Creative Commons Attribution Share Alike 4.0 International
#import "/packages.typ": notebookinator #import notebookinator: * #import themes.radial.components: * #import "/utils.typ": grid, plot-from-csv #show: create-body-entry.with( title: "Notebook: Graphing", type: "notebook", date: datetime(year: 2024, month: 1, day: 20), author: "<NAME>", witness: "<NAME>", ) #metadata(none) <notebook-graphs> While making graphs for this notebook we noticed that our workflow was very long and convoluted. In order to get a graph into the notebook we had to: + Download the data from the Loginator as .csv file + Clean up the data so that it can be graphed + Plug the data into our python script, and plot it with MatPlotLib + Export the graph as a .png file + Move the .png into the notebook + Render the image with the `#image()` function If we wanted to make changes to the graph we'd have to follow the entire process again. We decided we wanted a native Typst solution to this problem, to reduce the amount of steps in this workflow. Typst supports parsing .csv files out of the box, so we all we'd need to do is put the .csv file inside the notebook, and then call our new plotting function. This means our new workflow looks like this: + Down the data from the Loginator as a .csv file + Move the .csv file into the notebook's file structure + Call our graphing function If we want to make changes, all we have to do is edit the .csv file. The notebook will do the rest automatically. = Implementation We decided to separate the functions for parsing the .csv file and creating the plot in order to allow the plot to be used without having a .csv file. == CSV Parsing ```typ #let gen-from-csv(data) = { let raw-data = csv.decode(data) let labels = raw-data.at(0) let data = () for (label-index, label) in labels.enumerate() { if label-index == 0 { continue } let label-data = () for (row-index, row) in raw-data.enumerate() { if row-index == 0 { continue } label-data.push((row-index, float(row.at(label-index)))) } data.push((name: label, data: label-data)) } return data } ``` #admonition( type: "warning", )[ Currently our exports from the Loginator do not include timestamps that are accurate down to the millisecond. This means that in order to approximate the time we're simply using the index as our time. We'll fix this in the future. ] == Plot Component Our plot component is a wrapper around the CeTZ package's plotting library. We did some basic styling, and simplified the API greatly. ```typ #let plot(title: "", x-label: "", y-label: "", length: auto, ..data) = { // The length of the whole plot is 8.5 units. let length = if length == auto { 8.5% } else { length / 8.5 } // Will be populated by the names of the rows of data, and their corresponding colors let legend = () set align(center) cetz.canvas( length: length, { import cetz.draw: * import cetz.plot import cetz.palette // Style for the data lines let plot-colors = (blue, red, green, yellow, pink, orange) let plot-style(i) = { let color = plot-colors.at(calc.rem(i, plot-colors.len())) return ( stroke: (thickness: 1pt, paint: color, cap: "round", join: "round"), fill: color.lighten(75%), ) } set-style(axes: (grid: ( stroke: (paint: luma(66.67%), dash: "loosely-dotted", cap: "round"), fill: none, ), tick: (stroke: (cap: "round")), stroke: (cap: "round"))) plot.plot( name: "plot", plot-style: plot-style, size: (9, 5), axis-style: "left", x-grid: "both", y-grid: "both", { for (index, row) in data.pos().enumerate() { plot.add(row.data) legend.push((color: plot-colors.at(index), name: row.name)) } }, ) content("plot.north", [*#title*]) content((to: "plot.south", rel: (0, -0.5)), [#x-label]) content((to: "plot.west", rel: (-0.5, 0)), [#y-label], angle: 90deg) }, ) // legend time for label in legend [ #box(rect(fill: label.color, radius: 1.5pt), width: 0.7em, height: 0.7em) #label.name #h(10pt) ] } ``` = Examples #grid([ ```typ #let data = gen-from-csv(read("./data.csv")) #plot( title: "Flywheel PID Data", x-label: "Voltage (mV)", y-label: "Time (ms)", ..data // Flatten the data into individual arguments ) ``` ], { let data = plot-from-csv(read("./data.csv")) plot( title: "Flywheel PID Data", x-label: "Time (ms)", y-label: "Voltage (mV)", ..data, ) }) Overall we're very happy with how this turned out, and are excited to put it to use. This has dramatically shortened the workflow needed to put graphs in the notebook, and we hope to be able to visually present data in the notebook more often.
https://github.com/noahjutz/AD
https://raw.githubusercontent.com/noahjutz/AD/main/notizen/sortieralgorithmen/mergesort/merge_algorithm_1.typ
typst
#import "/components/num_row.typ": num_row, arrowed #let nums = (12, 23, 34, 45, 7, 17, 18, 38, 43) #let n = nums.len() #let m = calc.div-euclid(n, 2) #table( columns: (auto, ) + (1fr,) * nums.len(), align: center, ..num_row( nums, hl_tertiary: (0, m+1), hl_gray: m, arrow_down: ( (0, 1), (m+1, 1) ), labels: ( (0, 1, arrowed[`a1f`]), (m+1, m+2, arrowed[`a2f`]) ), below: 0pt ), ..num_row( (7, 12) + ([],)*(nums.len()-2), hl_success: range(2) ) )
https://github.com/Shedward/dnd-charbook
https://raw.githubusercontent.com/Shedward/dnd-charbook/main/dnd/game/character.typ
typst
#let character( name: none, class: none, subclass: none, race: none, type: none, alignment: none, story: none, spellcasting: none, level: 1 ) = ( name: name, class: class, subclass: subclass, race: race, type: type, alignment: alignment, story: story, spellcasting: spellcasting, level: level ) #let STR = "STR" #let DEX = "DEX" #let CON = "CON" #let INT = "INT" #let WIS = "WIS" #let CHA = "CHA" #let stats = (STR, DEX, CON, INT, WIS, CHA) #let acrobatics = "Acrobatics" #let animalHandling = "Animal H." #let arcana = "Arcana" #let athletics = "Athletics" #let deception = "Deception" #let history = "History" #let insight = "Insight" #let intimidation = "Intimidation" #let investigation = "Investigation" #let medicine = "Medicine" #let nature = "Nature" #let perception = "Perception" #let performance = "Performance" #let religion = "Religion" #let sleighOfHand = "Sleigh of Hand" #let stealth = "Stealch" #let survival = "Survival" #let skills = ( (name: acrobatics, stat: DEX), (name: animalHandling, stat: WIS), (name: arcana, stat: INT), (name: athletics, stat: STR), (name: deception, stat: CHA), (name: history, stat: INT), (name: insight, stat: WIS), (name: intimidation, stat: INT), (name: investigation, stat: INT), (name: medicine, stat: WIS), (name: nature, stat: INT), (name: perception, stat: WIS), (name: performance, stat: CHA), (name: religion, stat: INT), (name: sleighOfHand, stat: DEX), (name: stealth, stat: DEX), (name: survival, stat: WIS) ) #let spellcasting( focus: none, rutualCasting: false, prepearing: false, resources: () ) = ( focus: focus, ritualCasting: rutualCasting, prepearing: false, resources: resources )
https://github.com/ludwig-austermann/typst-funarray
https://raw.githubusercontent.com/ludwig-austermann/typst-funarray/main/examples/vertitable.typ
typst
MIT License
#import "../funarray.typ": chunks; #let vertitable(..items) = chunks(items.pos(), 2).map(x => box( x.at(0) + " (" + text(gray, x.at(1)) + ")" )).join(h(5pt) + "|" + h(5pt)) Skills: #vertitable[German][C1][English][B2][Italian][B1]
https://github.com/harrellbm/Bookletic
https://raw.githubusercontent.com/harrellbm/Bookletic/main/README.md
markdown
Apache License 2.0
# Bookletic :book: Create beautiful booklets with ease. The current version of this library (0.3.0) contains a single function to take in an array of content blocks and order them into a ready to print booklet, bulletin, etc. No need to fight with printer settings or document converters. ### Example Output Here is an example of the output generated by the `sig` function (short for a book's signature) with default parameters and some sample content: ![Example1](example/basic.png) Here is an example with some customization applied: ![Example2](example/fancy.png) ## `sig` Function The `sig` function is used to create a signature (booklet) layout from provided content. It takes various parameters to automatically configure the layout. ### Parameters - `page_margin_binding`: The binding margin for each page in the booklet (space between pages). - `page_border`: Takes a color space value to draw a border around each page. If set to none no border will be drawn. - `draft`: A boolean value indicating whether to output an unordered draft or final layout. - `p-num-layout`: A configuration for page numbering styles, allowing multiple layouts that apply to specified page ranges. Each layout can be provided as a dictonary specifying the following options: - `p-num-start`: Starting page number for this layout - `p-num-alt-start`: Alternative starting page number (e.g., for chapters) - `p-num-pattern`: Pattern for page numbering (e.g., `"1"`, `"i"`, `"a"`, `"A"`) - `p-num-placment`: Placement of page numbers (`top` or `bottom`) - `p-num-align-horizontal`: Horizontal alignment of page numbers (`left`, `center`, or `right`) - `p-num-align-vertical`: Vertical alignment of page numbers (`top`, `horizon`, or `bottom`) - `p-num-pad-left`: Extra padding added to the left of the page number - `p-num-pad-horizontal`: Horizontal padding for page numbers - `p-num-size`: Size of page numbers - `p-num-border`: The border color for the page numbers. If set to none no border will be drawn. - `p-num-halign-alternate`: A boolean for whether to alternate horizontal alignment between left and right pages. - `pad_content`: The padding around the page content. - `contents`: The content to be laid out in the booklet. This should be an array of blocks. ### Usage To use the `sig` function, first set your desired page settings using the native page function. Then simply call the sig function with the desired parameters and provide the content to be laid out in the booklet: ```typst #set page(flipped: true, paper: "us-letter") #bookletic.sig( contents: [ ["Page 1 content"], ["Page 2 content"], ["Page 3 content"], ["Page 4 content"], ], ) ``` This will create a signature layout with the provided content, using the default values for the other parameters. You can customize the layout by passing different values for the various parameters. For example: ```typst #set page(flipped: true, paper: "us-legal", margin: (top: 1in, bottom: 1in, left: 1in, right: 1in)) #bookletic.sig( page_margin_binding: 0.5in, page_border: none, draft: true, p-num-layout: ( bookletic.num-layout( p-num-start: 1, p-num-alt-start: none, p-num-pattern: "~ 1 ~", p-num-placment: bottom, p-num-align-horizontal: right, p-num-align-vertical: horizon, p-num-pad-left: -5pt, p-num-pad-horizontal: 0pt, p-num-size: 16pt, p-num-border: rgb("#ff4136"), p-num-halign-alternate: false, ), ), pad_content: 10pt, contents: ( ["Page 1 content"], ["Page 2 content"], ["Page 3 content"], ["Page 4 content"], ), ) ``` This will create an unordered draft signature layout with US Legal paper size, larger margins, no page borders, page numbers at the bottom right corner with a red border, and more padding around the content. ### Notes - The `sig` function is currently hardcoded to only handle two-page single-fold signatures. Other more complicated signatures may be supported in the future. - The `num-layout` function is a helper to create page number layouts with default values. - The `booklet` function is a placeholder for automatically breaking a single content block into pages dynamically. It is not implemented yet but will be added in coming versions. ## Collaboration I would love to see this package eventually turn into a community effort. So any interest in collaboration is very welcome! You can find the github repository for this library here: [Bookletic Repo](https://github.com/harrellbm/Bookletic). Feel free to file an issue, pull request, or start a discussion. ## Changlog #### 0.3.0 - Remove internal dependency on native page function. This allows the user to set the page function separately with full control over paper type, outer margins and everything else defined by the native page function. - Add p-num-halign-alternate to page number layout allowing setting page numbers to alternate on facing pages making it possible to place page numbers along the outside or inside edges of facing pages. - Internal improvements for ordering algorithm. - Add `num-layout` function helper. #### 0.2.0 - Handle odd number of pages by inserting a blank back cover - Implements page number layouts to allow defining different page numbers for different page ranges. - Add various other page number options #### 0.1.0 Initial Commit
https://github.com/huyufeifei/grad
https://raw.githubusercontent.com/huyufeifei/grad/master/docs/paper/src/template/ch_padding.typ
typst
#let ch_padding(pad: 0.5em, s) = { // if regex lookaround feature is supported, use ".(?=.)" instead these two show regex("."): it => { context { it + h(pad) } } show regex(".$"): it => { context { it + h(-pad) } } s }
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/string-09.typ
typst
Other
// Test the `clusters` and `codepoints` methods. #test("abc".clusters(), ("a", "b", "c")) #test("abc".clusters(), ("a", "b", "c")) #test("🏳️‍🌈!".clusters(), ("🏳️‍🌈", "!")) #test("🏳️‍🌈!".codepoints(), ("🏳", "\u{fe0f}", "\u{200d}", "🌈", "!"))
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/033%20-%20Rivals%20of%20Ixalan/005_Wool%20Over%20the%20Eyes.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Wool Over the Eyes", set_name: "Rivals of Ixalan", story_date: datetime(day: 14, month: 02, year: 2018), author: "<NAME> & <NAME>", doc ) = HUATLI, ON KALADESH #figure(image("005_Wool Over the Eyes/01.jpg", width: 100%), caption: [Inspiring Vantage | Art by Jonas De Ro], supplement: none, numbering: none) Huatli couldn't stop smiling. She emerged into a city unlike any she had seen before. The air was warm, like home, but nothing else was familiar. The city fairly vibrated with creativity and ingenuity, and Huatli marveled at the buildings and devices and . . . #emph[things]  . . . these people had crafted. Spheres to ride around in! Little metal creatures that delivered packages! She wandered a market that smelled of strange, unfamiliar spices, and watched as strange blue currents twisted like rivers in the sky. The people here walked fast and talked even faster, and their market stalls were crammed with beautiful inventions unlike any Huatli had seen before. There were people of different species—short humanoids, tall blue people (with six fingers on each hand!), and charcoal-like beings with bright blue light flowing under their skin. Huatli was elated to have the chance to meet them all. None of her tamales had made it through the journey (they had crumbled to an inedible dust somewhere in the metaphysical space between Ixalan and here), so she traded a piece of amber from home for a bag full of odd-looking coins. They jingled in her pack as she walked, and she wondered if she would be able to find an inn to stay in for the night in a place as busy and overwhelming as this. As she made her way through the city, she got a few odd looks, but every stare was quickly followed up by a compliment on the intricacies of her armor. "What craftsmanship! Who's your artificer?" they asked. Huatli smiled happily and announced in response, "I have no idea what that is!" She asked a nearby shopkeeper to recommend an exciting place for a visitor and was directed to a large open-air plaza in the center of the city. She soon arrived at an exhibition filled with people craning for a look at the stage, which was raised above the plaza and flanked on one side by a large tent. Huatli spotted a group watching the stage, holding pads of paper and writing utensils in their hands. She knew that she had found her people, and moved to sit beside them, her own paper and lead in her hand. A figure came out onto the stage, their skin black like charcoal, with deep cracks that revealed swirling blue light underneath. The figure was clothed in opulent silks that hung elegantly across their strange, dissipating body. They waved, the crowd cheered, the people with the pens took notes and asked questions, and Huatli was excited to be caught up in the action. The figure motioned for the audience to quiet, and gestured theatrically toward an object covered with a cloth at the end of the stage. "Welcome, distinguished guests!" Their voice was light and joyful, and commanded the attention of the crowd around Huatli. "Like many of you, I have focused my existence on improving the lives of those around me. Aetherborn culture is centered around making the most of the time we are given, of celebrating the glorious ecstasy of #emph[being alive] . All things must end. But what if that end were easier for those of us who must meet it sooner?" The audience murmured as the person (#emph[the aetherborn?] ) drew back the cloth over the concealed object, revealing an ornate golden box. "This is the aether regulator, an instrument #emph[not ] for the energy regulation of aether-consuming devices, but for aether-made #emph[people] . It is a medical device that will ease uncomfortable symptoms of dissipation and allow aetherborn persons a more dignified, pain-free transition back into the aether cycle!" The audience clapped enthusiastically, and the people to either side of Huatli took furious notes. Huatli was awed. Her brain turned over trying to understand what the inventor had discussed, and she marveled at the fusion of science and empathy. She wanted to ask questions: How did it work? What was the aether cycle? How revelatory would this device be for a group of people she didn't know existed until a few minutes ago? Huatli felt a tug on her sleeve and turned to find a woman of about her age staring back at her. #figure(image("005_Wool Over the Eyes/02.jpg", width: 100%), caption: [<NAME> | Art by <NAME>ai], supplement: none, numbering: none) With a concerned look on her face, the woman leaned closer to Huatli and whispered, "Are you from here?" Huatli shook her head. "No! I'm from . . . out of town." The woman's eyes darted back and forth. She leaned in even closer. "#emph[Off of plane ] out of town?" Huatli smiled. "You're a Planeswalker, too!" she guessed excitedly. "Not here!" the woman said, waving her hands alarmedly as she shooed Huatli away from the stage. Together they navigated through the crowd with some difficulty—the woman kept getting stopped by strangers asking for her autograph—and made their way toward a nearby park. Massive statues lined the pavilion, and Huatli assumed that the bold poses they struck reflected their subjects' important accomplishments. "I apologize for interrupting," the woman said. "My name is Saheeli. Your outfit is incredible—I had a hunch you might be a Planeswalker too." "It's a pleasure to meet you, Saheeli. My name is Huatli. It's my first time away from my world," Huatli said. "What is this one called?" "This plane is Kaladesh, and this city is Ghirapur. You picked a good time to arrive. Where are you from?" Huatli thought for a moment and sat down on a bench. She kept getting distracted by the plumes of blue streaking across the sky above. "The continent I'm from is called Ixalan, so I suppose that is what my plane is called, too." "#emph[Ixalan] . I haven't heard of that one before!" Saheeli smiled. "What is it like?" Huatli paused. How could she describe her home to someone who had never seen it before? #emph[The only way I know how.] "It is a land as bright as the sun.#linebreak The air, thick with light,#linebreak And the soil, dark with life.#linebreak Endless trees coat endless vistas,#linebreak And dinosaurs answer the songs of my people." Saheeli's eyes were wide with curiosity. "What is a dinosaur?" Huatli frowned. "Scales? Feathers?" Saheeli stared blankly back at her. "Some as short as your knees, others as tall as a building? Do you not have them around here?" "No, but I'd love to make one!" Saheeli grinned and pulled Huatli up off the bench. "We are going back to my workshop #emph[right now] so you can describe them to me. I've been needing a new artificing project!" Huatli allowed herself to be dragged up and smiled in response. "Can I help?" "Of course you can! You're the expert. I need to know #emph[everything ] about dinosaurs!" Huatli was elated. She was exactly where she needed to be. The two Planeswalkers happily walked back to Saheeli's workshop. <NAME> told Saheeli about her home. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) = ANGRATH It looked just like he remembered. The road was dusty and broad, peppered here and there with stores that had been in business longer than he had been alive. It was a sleepy sort of place, and Angrath was happy very little had changed. A little plume of smoke was rising from his foundry. A hand-painted window on the outside read "OPEN" in blocky lettering. The building was little more than a shack on the far end of town, but it had been #emph[his] shack on the far end of town. Piles of iron and metal were stacked outside, and a number of items and weapons were hung on a rack, each tagged to mark which order was which. Angrath's ear flicked as he heard the clang of metal and sizzle of water inside. He approached, and his chains clanked with each step he took. Angrath ducked slightly to avoid hitting his head on the doorway (he could still make out the bumps in the wood from every time he had forgotten) and paused as he looked for the blacksmith at work. Two minotaurs glanced up from their anvils. They were tall like their mother had been. They wore bulky leather aprons, and their horns were adorned with the jewelry worn by unmarried women of their age. Their eyes went wide. The one on the right snorted in shock. The other's ears stood up in surprise. The one on the right sniffed the air and trembled with emotion. "Father?" Steam softly hissed where Angrath's tears met his skin. He smiled. "<NAME>. I'm home." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) = VRASKA It felt almost unfamiliar to pass through the Blind Eternities after having not done so for such a long time. She had passed through just as the planar portal closed, and as quickly as she had departed Ixalan, she was standing back in her own chamber on Ravnica. It smelled like home. Vraska was immeasurably pleased with herself. She immediately crossed to her favorite chair and picked up the history book she had been reading when she left. Tucked inside was a new letter. Only two words, "MEDITATION PLANE," appeared in familiar, elegant script. Vraska grinned. She cheerily shrugged off her jacket and began to change out of her sweat-stained clothes (no need to rush, after all). She picked up her book and walked to her bookcase to shelve it. As she set it back in its place on the shelf, her eyes wandered to a title she hadn't picked up in a while. She contemplated the book, pulling it down and then absent-mindedly setting it on the table next to her chair. It would have to wait until after she met with the dragon, of course. Ready to depart, she planeswalked through a slice of black in the air to the meditation plane. #figure(image("005_Wool Over the Eyes/03.jpg", width: 100%), caption: [Pools of Becoming | Art by Jason Chan], supplement: none, numbering: none) <NAME> was waiting for her. She arrived in the now-familiar water, surrounded by a magical cage. Vraska performed the unlocking spell from her first visit perfectly, and the cage vanished. She stared at the dragon, and he stared back. "I did what you asked," Vraska said. "Take a look for yourself." And he did. <NAME> investigated every corner of her mind with a scrutiny she could #emph[feel] . He peered into each corner of her memories of Ixalan and replayed them all in the blink of an eye. Vraska winced at the feeling. It was like having her insides scrubbed clean. She watched internally as he looked over the entirety of her mind like a mural. Vraska didn't mind. She felt proud at what she had accomplished. She remembered journeying upriver alone . . . #figure(image("005_Wool Over the Eyes/04.jpg", width: 100%), caption: [Highland Lake | Art by Noah Bradley], supplement: none, numbering: none) bravely diving into the river that ran through the city . . . #figure(image("005_Wool Over the Eyes/05.jpg", width: 100%), caption: [Resplendent Griffin | Art by Sam Rowan], supplement: none, numbering: none) watching as a sphinx rampaged through Orazca . . . #figure(image("005_Wool Over the Eyes/06.jpg", width: 100%), caption: [Sphinx's Decree | Art by Daarken], supplement: none, numbering: none) and standing atop the Immortal Sun to turn said sphinx—along with dozens of other enemies—into gold. #figure(image("005_Wool Over the Eyes/07.jpg", width: 100%), caption: [Golden Demise | Art by Deruchenko Alexander], supplement: none, numbering: none) Vraska remembered it all as clear as day, and gladly laid bare her mind for <NAME> to inspect. Then, suddenly, the feeling vanished. The dragon departed her mind, and as he left, she saw how transparently happy with her mission he was. <NAME> practically #emph[beamed ] with joy#emph[.] His claws curled in pleasure. "#strong[Well done, Vraska] ," he said. "#strong[You will be rewarded for your loyalty.] " Vraska bowed, her mind her own once again, and felt the weight of something manifest in her pocket. "#strong[A gift, faithful servant. You have earned a kingdom of your own design.] " "Thank you for your trust." "#strong[The thanks are all mine. I would very much like to work with you again in the future.] " "You know how to reach me," Vraska said with a professional's smile. <NAME> waved his hand to signal that they were finished, and Vraska departed. The meeting had taken only a few minutes. Vraska arrived back in her flat in Ravnica feeling . . . confused. Bolas had been satisfied, and yet she found herself thinking that he had missed something important . . . or was it her who was missing something? She felt unsettled, though she could not remember anything that might be missing . . . or why. Vraska dismissed the feeling. The dragon got what he wanted, and she got what she wanted! She put her hand in her pocket and pulled out a small piece of paper. "HE IS ALONE AND IMPRISONED HERE," it read in the same wandering flourish as <NAME>'s earlier messages. "CONGRATULATIONS, GUILDLEADER VRASKA." The location listed below the message was in a sparsely populated corner of the city. A perfect place to deal with filth in an appropriately sinister manner. Vraska smiled and wandered to her sink. Tonight would be a fun night after all, and Vraska reasoned she ought to look and feel her best before she left. Her task could wait for a few hours. She cleaned her face with a cloth, put the kettle on the stove, opened the memoir she had pulled from her bookshelf, and contemplated what she ought to say to Jarad before she petrified him. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) = JACE Jace had shrouded himself in invisibility as the Immortal Sun vanished, watching as Vraska planeswalked away. A barrage of familiar faces had fallen through the ceiling the moment the Immortal Sun was gone. He had watched, perfectly hidden, as they bickered and left in a huff. Malcolm and Breeches were still in the room above. Jace reached out to Malcolm (certainly the more reliable of the two) and sent him a simple message. He felt Malcolm pause above him. #emph[Captain is safe, but far away, ] Jace thought, choosing his words carefully. #emph[I'm leaving for a while, but need you to tell the crew how much you all meant to me.] #emph[You'll always be a crewmate, Jace] , said a gentle tenor voice in Jace's mind. #emph[You were an excellent pirate.] #emph[Who says I'm going to stop now? ] Jace thought with a grin. #emph[Raise hell, Malcolm.] #emph[You too, Jace.] Jace closed the connection and felt as Malcolm departed, his mind traveling farther and farther away. He watched as each of the other people in Azor's chamber left, and then allowed himself to become visible once more. Jace knew he needed to go to Dominaria, but paused. The evening air of Ixalan was drifting into the sanctum. Calls of nightbirds and dinosaurs echoed over the hum of insects in the setting sun. His mind drifted to the promise of coffee and a book. The thought of it made his insides twirl like leaves in the wind. He remembered his captain's confident voice and steady love for herself, no matter what frightening gifts she was born with (finally, someone who understood what that burden felt like). She would do anything for her community, and had sacrificed part of herself to ensure the survival of Ravnica. She was remarkable. And she thought he was, too. Jace smiled to himself and looked around the sanctum. It was a beautiful room, despite the massive hole in the ceiling. Ixalan was a strange, ridiculous, and wonderful place. Jace hoped he could come back with Vraska again someday. Meet the crew of the #emph[Belligerent] . Go on a few more raids for the hell of it. But that would have to wait; he didn't want to be like Azor. Jace looked down at himself. The tan was real. The scrapes, the newly callused hands, the muscles (the muscles!) were all his. Jace felt proud of his body for the first time in his life. He must not lose track of it now. Gideon would help with that—he'd been trying to foist a workout regimen on Jace for a year now. A thought halted Jace's inner momentum. #emph[What am I supposed to say when I meet the Gatewatch?] Jace began to panic. #emph[Do any of them know Vraska? What if they're in the middle of something? What if they have already left for somewhere else and I can't find them to tell them about Ravnica? What if they went back to Innistrad, or Kaladesh, or Zendikar? What if they're with Ugin?! What the hell am I supposed to say to Ugin?! "Hey, so about your friend, you know, the one you haven't talked to in a thousand years; he's on an island now because he's terrible. Also, you were trying to use me to lure Bolas to Ixalan to be imprisoned, weren't you? What stopped you on Tarkir? Has ] everything#emph[ you've ever done actually just been about defeating Nicol Bolas? If so, we're going to need you to step up."] Jace felt incredibly small. None of these questions would help him now. None of his hand-wringing would protect his home. He made a choice to set his questions aside. Ravnica must come first. He #emph[was] the Living Guildpact, but he was more than that, too. Jace's mouth tilted in a half-smile#emph[. I am someone who devises a plan so a pirate captain can sabotage a dragon. ] That #emph[is who I am.] Azor's chamber was dark, now. Little lights danced in the jungle beyond, and the canopy was bathed in moonlight. He couldn't delay any longer. Planeswalking was a tricky business; it was imperfect, and destinations could usually only be reached if one had been there before. More often than not, traveling to a new plane was achieved by focusing on a familiar Planeswalker. Jace's first instinct was to reach his friends on Dominaria by focusing on Liliana, but the thought of her gave him pause. What he felt for her now wasn't anything resembling affection. It felt more sickly than that. An anemic, old, anxious tether between them that felt more like dread than tenderness. The entire notion of her was unsettling him, so he focused on the others instead. The bright, brilliant goodness of Gideon shone across the Blind Eternities like a searchlight, so Jace decided to aim for that. Jace felt his physical form shimmer and fade, and he stepped forward into the aether, accustomed to the sound and light that greeted him. #figure(image("005_Wool Over the Eyes/08.jpg", width: 100%), caption: [Omniscience | Art by Jason Chan], supplement: none, numbering: none) But something was wrong. Gideon's position on Dominaria was moving—not just at normal walking speed or mounted speed, but faster than he had any reason to be going. #emph[How is he moving like that?!] His heart began to race as he realized that he was going to need to aim. Jace adjusted his course through the aether, keeping his destination locked on Gideon's position, quickly accounting for his velocity of travel. He tucked his arms into his sides, minutely shifted his course to match the speed of whatever the hell it was he was apparently going to land on, and felt as the veil of Dominaria approached. He couldn't see his destination, of course, but he had the general idea of the size and shape of the thing he was aiming for. What gave Jace pause was the fact that Gideon appeared to be traveling at a #emph[very] high velocity. He swore and adjusted his vector once more. #emph[WHAT IS HE TRAVELING ON?] Jace knew full well if he failed to do this correctly he would either planeswalk into a solid object or planeswalk in front of the object just in time to be hit by it. The parts of his brain that weren't focused on travel and trajectory were an endless chorus of curses. He distantly noted that Vraska would have been proud of how his vocabulary had expanded. Through the aether he could sense Gideon, his target, and concentrated as he slowed himself down just enough to not materialize in solid matter. Jace stepped through the aether forcefully and immediately caught himself on a wall. He let out a long breath, then inhaled the air of a new plane. The first thing he heard was the creak of wood and the soothing hum of a machine. He realized he had landed in something slightly gooey, and looked up to see who was nearby. The room was full of people staring back at him. Jace caught his breath and awkwardly waved. "Hello. Hi. Sorry. I really didn't expect to land that," he panted. "Had to adjust my trajectory because of your velocity." Jace shook the nervousness from his limbs and laughed. "Wow! I've never planeswalked onto a moving object before—what exactly are we riding in? How is it powered? How fast are we going?" He pointed vaguely at the structure around him as he breathlessly rambled out questions. He looked from face to face and found absolutely no insight. He heard quick footsteps on metal and saw Gideon skid out from a nearby door, eyes wide and body frozen with shock. His expression was overcome with emotion. This was someone who was happy to the point of tears to see that he was alive. This was a friend. Jace grinned with elation. "Gideon! I'm not dead!" He saw Gideon lurching forward to hug him, but one of the other people in the room abruptly stepped in his way. She appeared to be in her seventies. She wore thick red robes, and her silver hair was tied in a loose, somewhat frizzy braid at her side. She looked Jace up and down with a distant, amused smile tugging at the corners of her mouth. The woman looked over her shoulder at Gideon and raised an eyebrow. "Who's the bookworm?" #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #figure(image("005_Wool Over the Eyes/09.jpg", width: 100%), caption: [Looming Altisaur | Art by <NAME>-West], supplement: none, numbering: none) Apatzec smiled as he watched his xocolātl tip from side to side in his cup. Each lumbering step of the sauropod underneath his caravan nearly sent the liquid spilling over one side, leaving the surface teetering on the cup's rim before gravity swung it back to the other side with the next step. The dinosaur's steps beat a slow but steady drumbeat that echoed in Emperor Apatzec III's heart. Part of him wondered if the River Heralds would think to take Orazca first, but the rest of him remembered how spineless they were. This would be easy. The emperor's platform was tightly strapped to the Sun Empire's most resilient altisaur for the journey to Orazca, which Apatzec enjoyed greatly. As royalty, he never had much reason to leave the palace. The royal processional platform had grown dusty with disuse. Huatli's return—and the dinosaur she brought with her—gave him all the reason he needed to order the platform cleaned and readied for his journey. Despite Huatli's insistence on a peace agreement, Apatzec knew what was #emph[his] . He had immediately sent a battalion of his strongest knights to clear the city, and was now on his way to claim it in the name of the Sun Empire. The mission had gone off without a hitch. The city was empty. The River Heralds hadn't even #emph[tried] . Above the tips of the trees in front of him, he could make out the golden spires of Orazca. They pierced the sky like needles and glittered in the afternoon sun like a jewel. Apatzec marveled at the sight, and wondered how the poets of the future would describe the scene. The emperor was not one for flowery language. All he knew was that he was satisfied to have done what his mother could not. Orazca was revealing itself on either side of him, now. The trees gave way to pillars of endless gold as they entered the city. The buildings reached high into the sky above, high enough to make Apatzec marvel at how his ancestors could have built so tall. Even Apatzec's altisaur easily passed underneath the main archway. With some assistance, Apatzec descended from the platform to the ground. The procession had stopped at the base of a central temple, and hundreds of knights were in formation awaiting his arrival. A priest slipped a cloak of feathers over his shoulders and placed a staff of amber in his hand. Apatzec felt the weight of his ancestors in his cloak. He felt the presence of an unbroken line of emperors before him, and felt immeasurably proud to have reclaimed what had been lost. He turned to his people, and smiled. "Orazca is ours once more," he said. "The three aspects of the sun shine bright, and thus begins a new age of conquest for the Sun Empire. Ixalan is ours . . . and Torrezon is next." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #figure(image("005_Wool Over the Eyes/10.jpg", width: 100%), caption: [Rekindling Phoenix | Art by <NAME>ville], supplement: none, numbering: none)
https://github.com/posit-dev/bcorp-report
https://raw.githubusercontent.com/posit-dev/bcorp-report/main/README.md
markdown
# Posit's Benefit Corporation Annual Report This repository holds the source for the PDF version of Posit's Benefit Corporation Annual Report found at <https://posit.co/about/pbc-report/>. The report content lives in `pbc-report.qmd` and is produced using `format: typst` with the custom template partials in `typst-template.typ` and `typst-show.typ`.
https://github.com/liuguangxi/erdos
https://raw.githubusercontent.com/liuguangxi/erdos/master/Problems/typstdoc/figures/p249.typ
typst
#import "@preview/cetz:0.2.1" #cetz.canvas(length: 60pt, { import cetz.draw: * for x in range(0, 3) { for y in range(0, 3) { rect((x, y), (rel: (1, 1)), stroke: luma(100)) } } merge-path( stroke: red, fill: rgb(255, 0, 0, 50), close: true, { arc((0, 0), start: -90deg, stop: 0deg, radius: 3) arc((3, 3), start: 0deg, stop: -90deg, radius: 2) arc((1, 1), start: 180deg, stop: 90deg, radius: 1) arc((2, 2), start: 90deg, stop: 180deg, radius: 2) }) })
https://github.com/lphoogenboom/typstThesisDCSC
https://raw.githubusercontent.com/lphoogenboom/typstThesisDCSC/master/chapters/introduction.typ
typst
#import "../typFiles/chapter.typ": * #show: chapter.with(chapterTitle: "Introduction", content: [ This is a Typst thesis and this is Chapter 1. = About Typst Typst.app is a document preparation system for the TEX typesetting program. It offers programmable desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop publishing, including numbering and cross-referencing, tables and figures, page layout, bibliographies, and much more. Typst was originally written in 1984 by <NAME> and has become the dominant method for using TEX; few people write in plain TEX anymore. The current version is Typst 13.01. If you want to know more about L A TEX you better read = About Acronyms This section contains an acronym of the Delft Center for Systems and Control (DCSC). The DCSC is our department within the faculty of Mechanical, Maritime and Materials Engineering (3mE) at Delft University of Technology (TU Delft). Acronyms are automatically listed in the Glossary in the back of this thesis. You have to define acronyms in glossary.tex using \\acro{ACRONYM}{Full text}. You print an acronym by using the command \\ac{...}. You can always force a full, long or short printout by using \\acf{...}, \\acl{...} or \\acs{...} respectively. #linebreak();#linebreak() - \\acf{DCSC}: Delft Center for Systems and Control (DCSC - \\acl{DCSC}: Delft Center for Systems and Control; - \\acs{DCSC}: DCSC. ])
https://github.com/dccsillag/minienvs.typ
https://raw.githubusercontent.com/dccsillag/minienvs.typ/main/README.md
markdown
MIT License
# Minienvs Theorem environments in [Typst](https://typst.app/) with minimal fuss. To use, import and add a show rule: ```typst #import "@preview/minienvs:0.1.0": * #show: minienvs ``` You can optionally pass a custom configuration in the show-rule via `minienvs.with(…)` (see [Customization](#customization)). You can now just add a theorem along with its proof using the term list syntax. For example: ```typst / Theorem (Ville's inequality): Let $X_0, ...$ be a non-negative supermartingale. Then, for any real number $a > 0$, $ PP[sup_(n>=0) X_n >= a] <= EE[X_0]/a. $ Let us now prove it: / Proof: Consider the stopping time $N = inf {t >= 1 : X_t >= a}$. By the optional stopping theorem and the supermartingale convergence theorem, we have that $ EE[X_0] >= EE[X_N] &= EE[X_N | N < oo] PP[N < oo] + EE[X_oo | N = oo] PP[N = oo] \ &>= EE[X_N | N < oo] PP[N < oo] = EE[X_N/a | N < oo] a PP[N < oo]. \ $ And, therefore, $ PP[N < oo] <= EE[X_0] \/ a EE[X_N/a | N < oo] <= EE[X_0] \/ a. $ ``` ![](./assets/ville.png) ## Labels and references Currently, in order to label a minienv one needs to use the `envlabel` function. For example: ```typst / Lemma (Donsker and Varadhan's variational formula) #envlabel(<change-of-measure>): For any measureable, bounded function $h : Theta -> RR$ we have: $ log EE_(theta ~ pi)[exp h(theta)] = sup_(rho in cal(P)(Theta)) [ EE_(theta~rho)[h(theta)] - KL(rho || pi) ]. $ As we will see, @change-of-measure is a fundamental building block of PAC-Bayes bounds. ``` ![](./assets/donsker-varadhan.png) ## Customization You can customize the appearance of minienvs by providing a configuration to the show-rule. For example, for the default configuration, you can do: ```typst #show: minienvs.with(config: ( // Whether to give numbers for environments. // If the environment is not mentioned in this dict, it has a number. no-numbering: ( proof: true, ), // Additional options for the `block` containing the minienv (e.g., to put a box around the minienv). // If the environment is not mentioned in this dict, no additional options are passed. bbox: (:), // How to format the head of the minienv. // If the environment is not mentioned in this dict, then it is formatted in bold. head-style: ( proof: it => [_#{it}_], ), // How to format the body of the minienv. // If the environment is not mentioned in this dict, then it is formatted in italic. transforms: ( proof: it => [#it #h(1fr) $space qed$], ) )) ``` ## Coming soon / Work in progress - Presets for multiple languages - Separate counters - More customization <!-- - Labelling environments directly, without needing `envlabel` -->
https://github.com/EGmux/PCOM-2023.2
https://raw.githubusercontent.com/EGmux/PCOM-2023.2/main/lista2/lista2q3.typ
typst
=== Determine a taxa de Nyquist e o intervalo de Nyquist para os seguintes sinais: \ ==== #math.equation(block: true, $ "a)" m_1(t) = 5cos(1000pi t)cos(4000pi t) $) \ 💡 lembrar que $cos(f_a pi t)cos(f_b pi t) = 1/2(cos(f_a+f_b)pi t + cos(f_a - f_b)pi t)$ vamos adaptar para o caso de a) #math.equation( block: true, $ m_1(t) = 5 cos(1000 π t)cos(4000 π t) = 5/2(cos(1000+4000)π t + cos(1000 - 4000)π t)$, ) simplificando #math.equation(block: true, $ m_1(t) = 5/2cos(5000 pi t) + 5/2cos(-3000 pi t) $) agora devemos encontrar o componente espectral de maior frequência que deverá ser $5000 "rad/s"$ #math.equation(block: true, $ f_a = ( 5000 pi ) / ( 2 pi ) = 2500 "Hz" $) e agora é encontrar a frequência de Nyquist que é o dobro desse valor e o intervalo é o inverso do valor encontrado, assim: #math.equation(block: true, $ f_N = 5000 "Hz" $) #math.equation(block: true, $ T_N = 2 dot 10^(-4) "s" $) ==== #math.equation(block: true, $ m_2(t) = sin(200pi t)/(pi t) $) \ Note que a $f_m = 200pi "rad/s"$ consequentemente a $f_N = 2 dot 200pi "rad/s" = 400pi "rad/s"$ que é $(4000pi)/(2pi) = 200 "Hz"$ e o $T_N = 5 dot 10^(-2) "s" $
https://github.com/AOx0/expo-nosql
https://raw.githubusercontent.com/AOx0/expo-nosql/main/book/src/theme-gallery/index.md
markdown
MIT License
# Theme Gallery Here you can find an overview over all themes shipped with this template. - [Default](#default) - [Bipartite](#bipartite) - [Bristol](#bristol) --- ## Default _[go to top](#theme-gallery)_ If you do not specify a theme, the default one will be used. You can specify it explicitly by referring to `slides-default-theme`: ```typ #show: slides( // ... theme: slides-default-theme(color: your-favourite-color) ) ``` ### Options - `color`: the color to use for decorative elements, default `teal` ### Variants - `"title slide"`: displays presentation title and subtitle between horziontal lines above horizontally positioned authors and the date - `"wake up"`: no decoration, colored background, enlarged text ### Extra keyword arguments - `title`: a title for that slide ### Showcase ```typ #import "slides.typ": * #show: slides.with( authors: ("Author A", "Author B"), short-authors: "Short author", title: "Title", short-title: "Short title", subtitle: "Subtitle", date: "Date", ) #slide(theme-variant: "title slide") #new-section("section name") #slide(title: "Slide title")[ A slide ] #slide(theme-variant: "wake up")[ Wake up! ] ``` ![default theme screenshot](./default.png) --- ## Bipartite _[go to top](#theme-gallery)_ This theme is inspired by [Modern Annual Report](https://slidesgo.com/theme/modern-annual-report). It features a dominant partition of space into a bright and a dark side. ```typ #import "themes/bipartite.typ": * #show: slides( // ... theme: bipartite-theme(), ) ``` ### Options - *none* ### Variants - `"title slide"`: displays presentation title on a large bright portion above the subtitle, the authors and the date - `"east"`: same as default variant, but dark side on the right, text is right aligned - `"center split"`: bright left and dark right half of equal size, requires two content bodies, one for each half (does not display a slide title) ### Extra keyword arguments - `title`: a title for that slide ### Showcase ```typ #import "slides.typ": * #import "themes/bipartite.typ": * #show: slides.with( authors: ("Author A", "Author B"), short-authors: "Short author", title: "Title", short-title: "Short title", subtitle: "Subtitle", date: "Date", theme: bipartite-theme(), ) #slide(theme-variant: "title slide") #new-section("section name") #slide(title: "A longer slide title")[ #lorem(40) ] #slide(theme-variant: "east", title: "On the right!")[ #lorem(40) ] #slide(theme-variant: "center split")[ #lorem(40) ][ #lorem(40) ] ``` ![bipartite theme screenshot](./bipartite.png) ## Bristol _[go to top](#theme-gallery)_ This is a variation of the default theme, to feature academic branding. It is inspired by an old version of David Barton's [Beamer theme](https://github.com/dawbarton/UoB-beamer-theme). It features a University of Bristol branding by default, however the logos and colour choices can easily be swapped, to tailor the theme to any institution of your choice. ```typ #import "themes/bristol.typ": * #show: slides( // ... theme: bristol-theme(), ) ``` ### Options - `color`: the colour to use for decorative elements, default University of Bristol red - `watermark`: file path for a watermark image to span the title slide, default "bristol/watermark.svg" - `logo`: file path for a logo image to appear on every slide, default "bristol/logo.svg" - `secondlogo`: file path for an additional logo image, to appear on the first slide only, default "bristol/secondlogo.svg" Default logos are shipped with the theme, however they can be swapped out for another institution's branding by changing the `watermark`, `logo`, and `secondlogo` file paths when instantiating the theme. ### Variants - `title slide`: shows a nicely formatted title slide - `wake up`: no decoration, colored background, enlarged text ### Extra keyword arguments - `title`: optional, a title for that slide - `colwidths` : optional, array specifying width of each column; default `1fr` per column - `gutter` : optional, integer, relative length, fraction, or array, specifying the gap between columns if a multicolumn (multi-body) slide is chosen; default `0.2em` ### Showcase ```typ #import "slides.typ": * #import "themes/bristol.typ": * #show: slides.with( authors: ("Author A", "Author B"), short-authors: "Short author", title: "Title", short-title: "Short title", subtitle: "Subtitle", date: "Date", theme: bristol-theme(), ) #slide(theme-variant: "title") #new-section("section name") #slide(title: "Slide title")[ A slide ] #slide(title: "Two column", gutter: .5em)[ Column A goes on the left... ][ And column B goes on the right! ] #slide(title: "Variable column sizes", colwidths: (2fr, 1fr, 3fr))[ This is a medium-width column ][ This is a rather narrow column ][ This is a quite a wide column ] #slide(theme-variant: "wake up")[ Wake up! ] ``` ![UoB theme screenshot](./bristol.png) ---
https://github.com/The-Notebookinator/notebookinator
https://raw.githubusercontent.com/The-Notebookinator/notebookinator/main/glossary.typ
typst
The Unlicense
#import "./globals.typ" /// Adds a term to the glossary. /// /// *Example Usage:* /// /// ```typ /// #glossary.add-term( /// "Word", /// "The definiton of the word." /// ) /// ``` /// /// - word (string): The word you're defining /// - definition (string): The definition of the word /// #let add-term(word, definition) = { globals.glossary-entries.update(entries => { entries.push((word: word, definition: definition)) entries }) }
https://github.com/Dherse/masterproef
https://raw.githubusercontent.com/Dherse/masterproef/main/masterproef/parts/1_background.typ
typst
#import "../ugent-template.typ": * = Programmable photonics <sec_programmable_photonics> As previously mentioned in @motivation, the primary goal of this thesis is to find which paradigms and languages are best suited for the programming of photonic @fpga[s]. However, before discussing these topics in detail, it is necessary to start discussing the basics of photonic processors. This chapter will discuss photonic processors, their niche, and how they work. From this, the chapter will discuss the different types of photonic processors and how they differ. Finally, this chapter will conclude with the first and most important assumption made in all subsequent design decisions. #uinfo[ This document uses the names photonic @fpga and photonic processor interchangeably. They both refer to the same thing: a programmable photonic device. The difference is that the former predates the latter in its use. Sometimes, they are also called #gloss("fppga", long: true) @perez-lopez_multipurpose_2020. ] == Photonic processors <photonic_processor> A photonic @fpga or photonic processor is the optical analogue to the traditional digital @fpga. It comprises gates connected using waveguides, which can be programmed to perform some function @capmany_programmable_2016. However, whereas traditional @fpga[s] use electrical current to carry information, photonic processors use light confined within waveguides to perform analog processing tasks. However, it is interesting to note that, just like traditional @fpga[s], some devices are more general forms of programmable #gloss("pic", long: true, suffix: "s")@bogaerts_programmable_2020-1 than others, just like @cpld[s] are less general forms of @fpga[s]. As any @pic with configurable elements could be considered a programmable @pic, it is reasonable to construct a hierarchy of programmability, where the most general device is the photonic processor, which is of interest for this document, going down to the simplest tunable structures. Therefore, looking at @pic_hierarchy, one can build four large categories of @pic[s] based on their programmability. The first one #link(<pic_hierarchy>)[(a)] is not programmable at all; they require no tunable elements and are, therefore, the simplest. The second category #link(<pic_hierarchy>)[(b)] contains circuits that have tunable elements but fixed functions; the tunable element could be a tunable coupler or phase shifter, and allows the designer to tweak the properties of their circuit during use for purposes such as calibration, temperature compensation, or more generally, altering the behaviour of the circuit. The third kind of @pic is the feedforward architecture #link(<pic_hierarchy>)[(c)], which means that the light is expected to travel in a specific direction; it is composed of gates, generally containing tunable couplers and phase shifters. External devices such as high-speed modulators, amplifiers, and other elements can be added. Finally, the most generic kind of programmable @pic is the recirculating mesh #link(<pic_hierarchy>)[(d)], which, while also composed of tunable couplers and phase shifters, allows the light to travel in either direction, allowing for more general circuits to be built as explored in @sec_meshes. #ufigure( kind: image, outline: [ A hierarchy of programmable #gloss("pic", long: true, suffix: "s"). ], caption: [ Shows a hierarchy of programmable #gloss("pic", long: true, suffix: "s"), starting at the non-programmable single function @pic (a), moving then to the tunable @pic (b), the feedforward architecture (c) and finally to the photonic processor (d). ], table( columns: (auto, auto), stroke: none, align: center + horizon, image( "../assets/drawio/non-programmable-pic.png", width: 100%, alt: "Shows a non programmable PIC composed of three ports, a double ring resonator filter, a MZI-based modulator and a photodetector.", ), image( "../assets/drawio/tunable-pic.png", width: 100%, alt: "Shows a non tunable PIC composed of three ports, a double ring resonator filter, where the directional couplers have been replaced with tunable couplers and the rings have been replaced with tunable phase shifter, a MZI-based modulator and a photodetector.", ), "(a)", "(b)", image( "../assets/drawio/feedforward-pic.png", width: 100%, alt: "Shows a very simple feedforward PIC composed of eight ports, each going in groups of two to gates. In total, there are five gates.", ), image( "../assets/drawio/recirculating.png", width: 100%, alt: "Shows a very simple recirculating PIC composed of eight ports, three hexagonal sections, and two modulators.", ), "(c)", "(d)", ), ) <pic_hierarchy> In this work, the focus will be on the fourth kind of tunability, the most generic. However, the work can also apply to photonic circuit design in general and is not limited to photonic processors. As discussed in @sec_meshes, the recirculating mesh is the most general kind of programmable @pic but also the most difficult to represent with a logic flow of operation because the light can travel in either direction. Therefore, the following question may be asked: #uquestion( footer: [ This will be answered in @feedforward_approx. ], )[ At a sufficiently high level of abstraction, can a photonic component be considered equivalent to a feedforward component? ] This question, which will be the driving factor behind this first section, will be answered in @feedforward_approx. However, before answering this question, it is necessary first to discuss the different types of photonic processors and how they differ. The answer to that question will also show that the solution suggested in this thesis also applies to feedforward systems. As this thesis is not focused on creating a photonic processor, but on the programming of said processors, building techniques will not be explored in detail. === Components <sec_photonic_proc_comp> As previously mentioned, a photonic gate consists of several components. This section will therefore discuss the different components that can be found in a photonic processor and how they work, as well as some of the more advanced components that can also be included as part of a photonic processor. ==== Waveguides The most basic photonic component that is used in #gloss("pic", suffix: "s") is the waveguide. It is a structure that confines light within a specific area, allowing it to travel, following a pre-determined path from one place on the chip to another. Waveguides are, ideally, low loss, meaning that as small of a fraction of the light as possible is lost as it travels through the waveguide. They can also be made with low dispersion allowing the light to travel at the same speed regardless of its wavelength. This last point allows modulated signals to be transmitted without distortion, which is essential for high-speed communication. ==== Tunable 2x2 couplers A @2x2 is a structure that allows two waveguides to interact pre-determinedly. It is composed of two waveguides whose coupling, the amount of light "going" from one waveguide to the other, can be controlled. There are numerous ways of implementing couplers. In @tunable_2x2, an overview of the different modes of operation of a @2x2 are given, along with a basic diagram of a @2x2 #link(<tunable_2x2>)[(a)]. It shows that depending on user input, an optical coupler can be in one of three modes; the first one #link(<tunable_2x2>)[(b)] is the bar mode, where there is little to no coupling between the waveguides, the second one #link(<tunable_2x2>)[(c)] is the cross mode, where the light is mainly coupled from one waveguide to the other, and the third one #link(<tunable_2x2>)[(d)] is the partial mode, where the light is partially coupled from one waveguide to the other based on proportions given by the user. The first mode #link(<tunable_2x2>)[(b)] allows light to travel without interacting, allowing for tight routing of light in a photonic mesh. The second mode is also useful for routing, allowing signals to cross with little interference. The final state allows the user to combine two optical signals based on predefined proportions. This is useful for applications such as filtering for ring resonators or splitting. #ufigure( kind: image, outline: [ Different states of a 2x2 optical coupler. ], caption: [ @2x2 (a) and its different states: in "bar" mode (b), in "cross" mode (c), and in "partial" mode (d). The blue triangles are optical inputs and outputs. ], )[ #table( columns: 2, stroke: none, align: center + horizon, image( "../assets/drawio/2x2_coupler.png", width: 80%, alt: "Shows the general structure of a 2x2 coupler, with two ports on each end, inside of the coupler, lines are drawn to show the different paths that light can take: cross in dashed line and bar in solid line.", ), image( "../assets/drawio/2x2_coupler_bar.png", width: 80%, alt: "Shows the general structure of a 2x2 coupler, with two ports on each end, inside of the coupler, lines are drawn to show the different paths that light can take: bar in solid line.", ), "(a)", "(b)", image( "../assets/drawio/2x2_coupler_cross.png", width: 80%, alt: "Shows the general structure of a 2x2 coupler, with two ports on each end, inside of the coupler, lines are drawn to show the different paths that light can take: cross in solid line.", ), image( "../assets/drawio/2x2_coupler_partial.png", width: 80%, alt: "Shows the general structure of a 2x2 coupler, with two ports on each end, inside of the coupler, lines are drawn to show the different paths that light can take: cross in dashed line and bar in solid line.", ), "(c)", "(d)", ) ]<tunable_2x2> #unote[ The colour scheme shown in @tunable_2x2 for the different modes is kept throughout this document when showing photonic gates and their modes. ] There are many construction techniques for building @2x2[s], each with its own advantages and disadvantages. The most common ones are the Mach-Zehnder interferometers with two phase shifters. However, other techniques involve using #gloss("mems") or liquid crystals @bogaerts_programmable_2020-1 @capmany_programmable_2016 @perez_programmable_2019. ==== Detectors <sec_detectors> Detectors are used to turn optical signals into electrical signals. In photonic processors, there are commonly two kinds: low-speed detectors used to measure optical power at several points inside the processor and high-speed detectors used to demodulate high-speed signals. ==== Modulators <sec_modulators> Contrary to detectors, modulators turn electrical signals into optical signals. They do not do this by producing the optical signal but by modulating the phase or the amplitude of an existing optical signal. === Meshes <sec_meshes> Four main kinds of meshes can be built for programmable photonics, shown in @fig_meshes: the feedforward mesh #link(<fig_meshes>)[(a)] and three kinds of recirculating mesh: hexagonal #link(<fig_meshes>)[(b)], rectangular #link(<fig_meshes>)[(c)], and triangular meshes #link(<fig_meshes>)[(d)]. It is also possible to create meshes not made of a single kind of cell, but these will not be discussed in this thesis. This section will discuss the major differences between the feedforward and the recirculating architectures. In the case of this thesis, hexagonal meshes are the primary focus. This is because they are the most capable kind of meshes @bogaerts_programmable_2020-1. #ufigure( kind: image, outline: [ Different kinds of programmable photonic meshes. ], caption: [ The four kinds of programmable meshes: feedforward (a), hexagonal (b), rectangular (c), and triangular (d). ], )[ #let width = 90% #table( columns: 2, stroke: none, align: center + horizon, image( "../assets/drawio/mesh_feedforward.png", width: width, alt: "Shows a feedforward photonic mesh, setup in a triangular pattern.", ), image( "../assets/drawio/mesh_hexagonal.png", width: width, alt: "Shows an hexagonal photonic mesh.", ), "(a)", "(b)", image( "../assets/drawio/mesh_square.png", width: width, alt: "Shows a square photonic mesh.", ), image( "../assets/drawio/mesh_triangular.png", width: width, alt: "Shows a triangular photonic mesh.", ), "(c)", "(d)", ) ]<fig_meshes> #pagebreak(weak: true) All of the architectures rely on the same components @bogaerts_programmable_2020-1, those being #gloss("2x2", suffix: "s", long: true), optical phase shifters and optical waveguides. These elements are combined in all-optical gates, which can be configured to achieve the user's intent. Additionally, to provide more functionality, the meshed gates can be connected to other devices, such as high-speed modulators, amplifiers, and detectors @bogaerts_programmable_2020-1 @capmany_programmable_2016 @perez_programmable_2019. The primary difference between the feedforward architecture and the recirculating architecture is the ability of the designer to make light travel both ways in one waveguide. As is known @ghatak_introduction_1998, light can travel in two directions in a waveguide with little to no interactions. This means that, without additional waveguides or hardware complexity, a photonic circuit can support two guiding modes, one in each direction. This property can be used for more efficient routing and creating more complex and varied structures @bogaerts_programmable_2020-1. As it has been shown in @perez_programmable_2019, recirculating meshes can create more advanced structures, such as @iir elements, whereas feedforward architectures are limited to @fir components. This is due to the inability of the feedforward architecture to express feedback loops, limiting them to @fir components, whereas recirculating meshes allow the creation of feedback loops and @iir components. Indeed, in a feedforward mesh, the typical structure being built is the Mach-Zehnder interferometer. In contrast, in a recirculating mesh, one may build structures such as ring resonators, which are inherently @iir components. Recirculating meshes can also express structures such as @mzi and can represent both @iir and @fir components. #uconclusion[ The recirculating mesh is more capable as it allows feedback loops and @iir components, whereas the feedforward mesh is limited to @fir components. Additionally, recirculating meshes allow light to travel in both directions in a single waveguide, allowing for more efficient routing and complex structures. ] === Potential use cases of photonic processors <photonic_processors_use_cases> There are many use cases for photonic processors, some of which will be shown in this thesis as examples in @sec_examples. However, this section will first discuss areas of particular interest for photonic processors. Photonic processors' first and primary advantage is that they can replace the need to develop custom @pic[s], which is extremely expensive. They can also be used during the development of said @pic[s] as a platform for prototyping. Another one of their advantages, which broadens their reach, is the ability to reprogram the processor in the field, just like a traditional @fpga. In the following paragraphs, several broad areas of interest will be discussed, and examples of applications in those areas will be mentioned. Those areas are telecommunication, optical computation, @rf processing, and sensing applications. ==== Telecommunications The telecommunications industry is one of the largest existing users of photonic technologies, most notably optical fibers. Therefore, it should come as no surprise that this is one of the applicative areas of particular interest for programmable photonics. They can be used by service providers close to their customers for multiplexing, transceivers, and resource allocations, such as in fiber-to-the-home deployments @bogaerts_programmable_2020-1. ==== Optical computation In some cases, such as machine learning, it has been shown that processing can be accelerated and energy efficiency improved by using photonic processing. As photonic processors are reprogrammable by nature, they could be used to accelerate workloads in data centers and edge computing scenarios. Companies like _LightMatter_ are already making strides in optical computing accelerators for machine learning applications @demirkiran_electro-photonic_2021. ==== RF processing @rf processing refers to the concept of processing radio signals using photonic technologies by modulating the @rf signals of interest onto optical signals and then benefiting from the low-energy, very high bandwidth of photonic components to efficiently process signals in the analog domain. This has interest for RADAR applications, but also mm-Wave communications and 5G @perez-lopez_silicon_2021. ==== Sensing Sensing can take many forms, such as LiDAR, which is used in self-driving cars, or even in the medical field, such as in the case of sensing for the detection of cancerous cells, where a photonic processor could be used to process the signals produced by a sensor @bogaerts_programmable_2020-1 @daher_design_2022. In recent years, fiber sensing has been used in many applications, such as aviation, oil, gas, and more @trutzel_smart_2000 @ashry_review_2022. The advantages of photonic processors for these use cases allow the reduction of weight, overall system complexity, and design cost. Therefore, photonic processors are interesting for sensing applications, as they may significantly reduce system design costs. === Embedding a photonic processor in a larger system <photonic_processors_in_systems> In this thesis, the focus will mainly be on the design of circuits for photonic processors. However, one must keep in mind that photonic processors are not standalone systems but rather components of larger, more complex systems. Complex systems are rarely limited to a single domain. Indeed, they are often composed of multiple technologies, such as digital electronics, analog electronics, photonic circuits, and real-time processing. Therefore, it is important to understand how photonic processors can be embedded into these larger systems and how they can be integrated into existing systems. The act of integrating multiple technologies is often called codesign. Photonic processors are already a form of codesign since they are composed of both photonic and electronic components. ==== Integration with electronics As previously mentioned, photonic processors integrate two types of electro-optic interfaces: modulators and detectors. These components can be used to interface the insides of the photonic processor with a larger electronic scheme. Due to their nature, these components can be used for both digital and analog electronics. Indeed, photonic processors can be used as analog signal processors and in mixed-signal systems. This is particularly interesting for @rf signal processing, as photonic processors can offer high bandwidth, high-speed, and low energy consumption signal processing, all of which are difficult to achieve in analog electronics. ==== Integration with software While this thesis will not discuss integration with electronics at length, integration with the software will. As discussed in @initial_requirements, there is an interest in integrating software control over the functionality and behaviour of photonic processors. Due to their nature, photonic processors cannot make decisions, but they can be interfaced with software that is able to process data and make decisions. Additionally, the designer may use software to create feedback loops to control their photonic circuit from the software. In @fig_uses, one can see how a photonic processor may be integrated with analog electronics, digital electronics, and embedded software by using @dac[s] and @adc[s] to interface with the photonic processor, an @fpga for high-speed digital processing, and an embedded processor for control. However, while it does not show how optical inputs and outputs may be used, it provides a high-level overview of how a photonic processor and some of its internal components may be interfaced with in a bigger system. #ufigure( outline: [ Figure showing the integration of a photonic processor with electronics and software. ], caption: [ Figure showing the integration of a photonic processor with electronics and software. It shows how a photonic processor is composed of the photonic @ic, @adc[s], and @dac[s] to interface with its integrated controller. It then shows how the overall photonic processor may be integrated with digital electronics and software running on an embedded processor. Blue elements represent digital electronics, while green elements represent analog electronics. ], )[ #image( "../assets/drawio/uses.png", width: 70%, alt: "Shows a photonic processor interfaced to two DACs and to ADCs on either side, communicating with an FPGA, the FPGA then communicates to an embedded processor, which itself communicates to the digital integrated controller for the photonic processor. This integrated controller then controls a set of ADCs and DACs inside of the photonic processor to control the photonic gates in the processor.", ) ] <fig_uses> == Circuit representation <circuit_repr> When creating tools for circuit design, it is important to carefully consider how the circuit will be represented, as both the users of the tool, and its developers, will need to interact with this model for many steps in the design process, such as for simulation, optimisation, synthesis, and validation. As far as this thesis is concerned, it will use one of the most common photonic circuit representations, the netlist. In addition, the guided mode in each direction of the waveguides will be represented as a separate net. #udefinition( footer: [ Adapted from @netlist. ], )[ A *netlist* is a list of components and their connections used to represent a photonic circuit. A *net* is a connection between two components, which represents a waveguide. ] Netlists are common abstractions in electronics to represent a list of components and their connections. However, in the case of photonics, the definition is altered and made more limited: in electronics, a net can be connected to many components. However, in the case of a photonic circuit, the port of a component is only ever connected to the port of another component, never more. This is because, in this thesis, splitters are considered components in and of themselves; therefore, splitting the signal is equivalent to adding a component to the circuit. Bidirectional ports, such as the ones on the edge of a photonic processor, are represented as two separate logical ports, one for each direction: incoming and outgoing light. This representation is acceptable because light can travel in both directions in photonic waveguides with little to no interaction. Therefore, one can model these modes as being two separate signals @xing_behavior_2017. This model is beneficial in the case of recirculating photonic meshes, as it helps distinguish the direction of the light in the circuit, making it easier to efficiently reuse photonic gates for bidirectional signal routing. === Feedforward approximation <feedforward_approx> As mentioned in @photonic_processor, a type of programmable photonic @ic is the feedforward processor, which assumes that light travels from an input port to an output port in a single direction. However, this thesis is focused on the more general kind of processor that uses recirculating meshes. Therefore, one may wonder whether it is possible to model components using a feedforward approximation. Indeed, this section will discuss the axiom that any photonic circuit can be represented as a feedforward circuit, given a sufficiently high level of abstraction. From theory, it is known that light can travel in both directions of a waveguide with little to no interactions @xing_behavior_2017. Additionally, the scattering matrix defining the circuit is symmetric for reciprocal and time-invariant components. Conveniently, it so happens that most passive, or pseudo-passive#footnote[Components that are actively powered, but slow varying enough to be considered passive.] photonic components are reciprocal and time-invariant. Therefore, most photonic components can always be represented under this formalism. For components that are not reciprocal, one can split the component into two components, one for each direction, and model them as a set of separate components. Finally, components that are not time-invariant, such as modulators, can be modelled as time-invariant components as long as the variation in time is slow enough, compared to the oscillation period of the light, such that it can be considered constant. Finally, for components such as isolators, one can consider them a three-port device with two inputs, one being sunk, the other not, and one output. Some components may be difficult to accurately model in this formalism. For example, @soa[s] can be challenging to express in this formalism since their gain is spread over both modes. However, this can be solved by modelling the @soa as a unidirectional component. This removes the ability to model the @soa as a bidirectional component, but it is a reasonable approximation for most cases. Additionally, if the user needs to model the @soa as a bidirectional component, they could model it as two components whose exact response depends on the other component. Intuitively, one can think of these abstracted models as black boxes, where the contents do not matter as long as the expected functionality is present. For example, a ring resonator can be modelled as a black box with two inputs and two outputs, where the input and output ports are labelled as $a_"in", b_"in"$ and $a_"out", b_"out"$ respectively. This is shown in @fig_ring_resonator_black_box. In this model, one can use the properties of a ring resonator to model the relations between these ports. #ufigure( outline: [ A black box representation of a ring resonator. ], caption: [ A black box representation of a ring resonator. The input and output ports are labelled as $a_"in", b_"in"$ and $a_"out", b_"out"$ respectively., ], )[ #image( "../assets/ring_resonator_black_box.png", width: 200pt, alt: "Shows an unloaded microring resonator, with two inputs and two outputs, respectively labelled as a_in, b_in, a_out, b_out.", ) ]<fig_ring_resonator_black_box> #uconclusion[ It has been shown that, given a sufficient level of abstraction, any bidirectional photonic circuit can be represented by an equivalent, higher-level, feedforward circuit. This result is crucial for formulating the requirements for the programming interface of such a photonic processor. ] == Non-idealities <fppga-difficulties> Like all other photonic components, photonic processors are impacted by non-idealities, temperature dependence, and manufacturing variabilities. These impact the well-functioning of the circuit programmed within the processor. Therefore, one must consider this impact when designing the circuit, or programming the design, in the case of a photonic processor. However, photonic processors should mitigate these variations as much as possible, as they are high-level design platforms, to allow for a more efficient design process. This section will discuss these non-idealities, and solutions to automatically mitigate their impact will be proposed. ==== Temperature dependence Most photonic components exhibit a temperature dependence, which can be exploited to build structures such as phase shifters. However, undesired temperature changes can impact the circuit in unexpected ways. One traditional way to mitigate temperature changes is to maintain the device at a constant temperature using external means, such as Pelletier elements. However, this limits the potential use cases of the device, as such means tend to be bulky and power-hungry. ==== Wavelength dependence In addition to the temperature dependence mentioned above, photonic components also exhibit a strong wavelength dependence. Part of this dependence is desired, such as in the case of wavelength filters. Nevertheless, in all other cases, the user expects that the device behaves with a flat frequency response. Therefore, photonic processors must also provide mitigations for this dependence. ==== Manufacturing variability Variabilities in the manufacturing process of the @pic cause the third kind of non-idealities; they can introduce all kinds of non-idealities, such as higher losses, reflections, and more. The imperfection of the manufacturing process causes these variabilities; therefore, the resulting devices are not identical. This means that the user's design will work differently from one chip to the next. However, one of the goals of photonic processors is to act as a high-level design platform, which means that the user should not have to worry about these variabilities. == Initial design requirements <initial_requirements> This section will discuss the basic design requirements for a programming interface to photonic processors. These requirements form the base of the design of the programming interface and are, therefore, crucial to the design of the interface. More requirements and details for each will be provided in @sec_intent. ==== High-level of abstraction & modularity Ideally, the programming interface of photonic processors should be high-level enough that it is entirely abstracted from the underlying hardware, making it easier to design circuits. Furthermore, the interface should be modular, allowing users to build complex circuits from smaller, simpler building blocks. This is a crucial requirement, as it allows the user to build complex circuits from incrementally more complex building blocks, allowing them to build more advanced circuits without understanding the underlying hardware. ==== Platform independence The code should work across devices with little to no adjustment. This would avoid the fracturing of the ecosystem that can be observed in @fpga[s], as well as reduce the burden of the user to port their code to different devices. ==== Tunability and reconfigurability Ideally, the user would want to tune their design while it is running, allowing them to build feedback loops of their control and adjust their design's behaviour on the fly; this functionality is called tunability. Furthermore, the user might want to completely replace parts of their device's functionality without reprogramming the entire device. This is called reconfigurability. These two features work hand-in-hand, providing a powerful tool for the user to build their designs and fully exploit the photonic processor's field-programmable nature. ==== Solutions to non-idealities One can categorise the previously mentioned non-idealities into time-invariant non-idealities and time-variant ones. The former does not change over time, such as manufacturing variabilities. It, therefore, can be compensated by using calibration tables that are uniquely generated for each chip or batches of chips. Time variant non-idealities, however, require an active approach, such as feedback loops, which the design solution for these photonic processors must provide for the user. In order to build these feedback loops, measurements must be taken of the signals of interest. These measurements are taken inside the photonic processor using photodetectors built into the chip. These measurements allow the integrated control system to adjust components, such as gain sections or phase shifters, to compensate for the non-idealities.
https://github.com/alperari/cyber-physical-systems
https://raw.githubusercontent.com/alperari/cyber-physical-systems/main/week6/solution.typ
typst
#import "@preview/diagraph:0.1.2": * #set text( size: 15pt, ) #set page( paper: "a4", margin: (x: 1.8cm, y: 1.5cm), ) #align(center, text(21pt)[ *Cyber Physical Systems - Discrete Models \ Exercise Sheet 6 Solution* ]) #grid( columns: (1fr, 1fr), align(center)[ <NAME> \ <EMAIL> ], align(center)[ <NAME> \ <EMAIL> ] ) #align(center)[ November 25, 2023 ] = Exercise 1: Linear Time Properties == Part A #block( $ & bullet T_1 : {A_0 A_1 A_2 ... | forall i in N_(>0) space . space a in.not A_i} \ & bullet T_2 : {A_0 A_1 A_2 ... | forall i in N space . space a in A_i -> b in A_(i + 1)} \ & bullet T_3 : {A_0 A_1 A_2 ... | forall i in N space . space a in A_i -> b in.not A_i} \ & bullet T_4 : {A_0 A_1 A_2 ... | limits(exists)^infinity i in N space . space a in A_i} \ & bullet T_5 : {A_0 A_1 A_2 ... | limits(exists)^infinity i in N space . space a in.not A_i} \ $ ) == Part B #block( $ & bullet T_1 : {A_0 A_1 A_2 ... | forall i in N space . space a in A_i} \ & bullet T_2 : {A_0 A_1 A_2 ... | forall i in N space . space a in A_i -> a in A_(i + 1)} \ & bullet T_3 : {A_0 A_1 A_2 ... | forall i in N space . space a in A_i and b in A_i} \ & bullet T_4 : {A_0 A_1 A_2 ... | limits(exists)^infinity i in N space . space b in A_i} \ & bullet T_5 : {A_0 A_1 A_2 ... | forall i in N space . space a in.not A_i} \ $ ) = Exercise 2: Starvation Freedom == Part A #label("2-part-a") We can prove that $"LIVE"' subset.eq "LIVE"$ if we can show that all words in $"LIVE"'$ is also in $"LIVE"$. Let $w in "LIVE"'$, we have the following cases: Case 1: $w$ doesn't have infinitely many $"wait"_1$s In this case $w in "LIVE"$ since $w$ doesn't satisfy the predicate $limits(exists)^infinity in N space . space "wait"_1 in A_i$, therefore doesn't need to satisfy $limits(exists)^infinity in N space . space "crit"_1 in A_i$. Case 2: $w$ has infinitely many $"wait"_1$s In this case, it follows that $w$ also has infinitely many $"crit"_1$s as well, because for all $"wait"_1 in A_i$ there must be a $"crit"_1 in A_j$ such that $j$ comes after $i$. There can't be a "last" $j$ that comes after all $"wait"_1$s, since there are infinitely many $"wait"_1$s. Which would mean that $"crit"_1$s can be finitely many in this case. Since this is not possible, we can conclude that $w in "LIVE"$. Same reasoning can be trivially applied to $"wait"_2$ and $"crit"_2$ as well. $qed$ == Part B Let $pi = {"wait"_1}emptyset^omega$. $p in "LIVE"$ because there is no infinite $"wait"_1$ which would require that there must be infinitely many $"crit"_1$s. However, $p in.not "LIVE"'$ because there is no $"crit"_1$ after the initial $"wait"_1$. == Part C No, because that system only enters $"crit"_i$ after a $"wait"_i$ is received. Therefore, ordering is always as described in $"LIVE"'$. == Part D No, because we proved that $"LIVE"' subset.eq "LIVE"$ in #link(label("2-part-a"))[Part A], this is not a possible trace for any transition system. #pagebreak() = Exercise 3: Trace Inclusion == Part A #label("3-a") === $tau_P_1$ #raw-render()[```dot digraph { rankdir=TD; node [fixedsize=true, width=1]; start1 [style=invis, width=0, height=0, fixedsize=true]; start2 [style=invis, width=0, height=0, fixedsize=true]; l0x_eq_0 [label="l_0\nx = 0", xlabel="{x = 0}", shape=circle]; l0x_gt_0 [label="l_0\nx > 0", xlabel="{x > 0}", shape=circle]; l1x_eq_0 [label="l_1\nx = 0", xlabel="{x = 0}", shape=circle]; start1 -> l0x_eq_0; start2 -> l0x_gt_0; l0x_gt_0 -> l0x_gt_0; l0x_eq_0 -> l1x_eq_0; l1x_eq_0 -> l1x_eq_0; l0x_gt_0 -> l1x_eq_0; } ```] === $tau_P_2$ #raw-render()[```dot digraph { rankdir=TD; node [fixedsize=true, width=1]; start1 [style=invis, width=0, height=0, fixedsize=true]; start2 [style=invis, width=0, height=0, fixedsize=true]; l0x_eq_0 [label="l_0\nx = 0", xlabel="{x = 0}", shape=circle]; l0x_gt_0 [label="l_0\nx > 0", xlabel="{x > 0}", shape=circle]; l1x_eq_0 [label="l_1\nx = 0", xlabel="{x = 0}", shape=circle]; start1 -> l0x_eq_0; start2 -> l0x_gt_0; l0x_gt_0 -> l0x_gt_0; l0x_eq_0 -> l1x_eq_0; l1x_eq_0 -> l1x_eq_0; l0x_gt_0 -> l1x_eq_0; } ```] === $tau_(P_(3a) bar.triple P_(3b))$ #raw-render()[```dot digraph { rankdir=TD; node [fixedsize=true, width=1]; start1 [style=invis, width=0, height=0, fixedsize=true]; l0l2x_gt_0 [label="l_0 l_2\nx > 0", xlabel="{x > 0}", shape=circle]; l0l3_x_eq_0 [label="l_0 l_3\n x = 0", xlabel="{x = 0}", shape=circle]; l1l3x_eq_0 [label="l_1 l_3\n x = 0", xlabel="{x = 0}", shape=circle]; start1 -> l0l2x_gt_0; l0l2x_gt_0 -> l0l2x_gt_0; l0l2x_gt_0 -> l0l3_x_eq_0; l0l3_x_eq_0 -> l1l3x_eq_0; l1l3x_eq_0 -> l1l3x_eq_0; } ```] == Part B - $(tau_P_1, tau_P_2) = "true"$ and $(tau_P_2, tau_P_1) = "true"$ Their transition systems are identical from #link(label("3-a"))[Part A]. Therefore, their traces are equivalent as well. Therefore, they are subset of each other in both directions. - $(tau_P_1, tau_(P_(3a) bar.triple P_(3b))) = "false"$ and $(tau_P_2, tau_(P_(3a) bar.triple P_(3b))) = "false"$ Both $tau_P_1$ and $tau_P_2$ has the trace ${x = 0}^omega$ but $tau_(P_(3a) bar.triple P_(3b))$ doesn't. - $(tau_P_1, tau_4) = "false"$ and $(tau_P_2, tau_4) = "false"$ Both $tau_P_1$ and $tau_P_2$ has the trace ${x = 0}^omega$ but $tau_4$ doesn't. - $(tau_(P_(3a) bar.triple P_(3b)), tau_4) = "true"$ and $(tau_4, tau_(P_(3a) bar.triple P_(3b))) = "true"$ Both has the same set of traces: #pad(left: 15pt)[ - ${x > 0}^omega$ - ${x > 0}^n {x = 0}^omega$ where $n in N_(>0)$ ] Therefore, they are subset of each other. - $(tau_(P_(3a) bar.triple P_(3b)), tau_P_1) = "true"$ and $(tau_(P_(3a) bar.triple P_(3b)), tau_P_2) = "true"$ Both $tau_P_1$ and $tau_P_2$ has all the traces $tau_(P_(3a) bar.triple P_(3b))$ have so it satisfies the subset relation. #pad(left: 15pt)[ - ${x > 0}^omega$ - ${x > 0}^n {x = 0}^omega$ ] - $(tau_4, tau_P_1) = "true"$ and $(tau_4, tau_P_2) = "true"$ Both $tau_P_1$ and $tau_P_2$ has all the traces $tau_4$ have so it satisfies the subset relation. #pad(left: 15pt)[ - ${x > 0}^omega$ - ${x > 0}^n {x = 0}^omega$ ] == Part C This is not possible, because $tau_(P_(3a) bar.triple P_(3b))$ and $tau_4$ are subsets of $tau_P_1$ and $tau_P_2$. So each $E$ that satisfies the latter must necesarily satisfy the former ones due to transitivity.
https://github.com/timetraveler314/Note
https://raw.githubusercontent.com/timetraveler314/Note/main/Discrete/sets.typ
typst
#import "@local/MetaNote:0.0.1" : * = Set Theory == Ordinals #lemma("Properties of Ordinals")[ (ii) For any ordinals $alpha, beta$, if $alpha subset.neq beta$, then $alpha in beta$. ] #proof[ (ii) Denote $gamma$ the minimal element of $(beta backslash alpha, in)$. We assert $alpha = S := {x in beta | x < gamma}$, and $S$ is nothing but $gamma$ by the axiom of foundation ($gamma in S$ breaks the definition; $S = {x in beta | x < gamma} in gamma$ implies $S in S$, a contradiction). $S subset alpha$: for any $x in S$, $x < gamma => x in alpha$ by minimal choice of $gamma$. $alpha subset S$: for any $y in alpha subset beta$, $y != gamma$ because $gamma in.not alpha$; besides, by transitivity, $y subset alpha$ contradicts with $gamma in y$. Therefore, $y < gamma$. ] #question[ Is it the case that $ abs(S union T) = abs(W) => abs(S) = abs(W) or abs(T) = abs(W) ? $ ] #solution[ It is clear that the statement does not hold for finite cases. However, consider $abs(W) >= abs(NN)$. ] #definition("Dedekind Finite")[ A set $S$ is Dedekind finite if $ forall T subset.neq S, abs(T) < abs(S). $ // there is no injective function $f : NN -> S$. ]
https://github.com/mumblingdrunkard/mscs-thesis
https://raw.githubusercontent.com/mumblingdrunkard/mscs-thesis/master/src/computer-architecture-fundamentals/reduced-vs-complex-instruction-set-computers.typ
typst
== Reduced vs. Complex Instruction Set Computers There has been ongoing discussion about this topic for decades. It boils down to whether ISAs should be designed with a large spectrum of instructions that do many things, or if it should be designed with few instructons. When programmers were still writing their own assembly instead of generating it with a compiler, it was arguably nicer to have dedicated instructions for string manipulation built into the processor. These instructions could become quite obscure and could require many steps. This meant more work for the hardware engineers who had to implement all of the instructions, but it resulted in a nicer face for programmers. These are the _complex instruction set computers_ (CISC). The opposing alternative is _reduced instruction set computers_ (RISC) that uses very few instructions. RISC-V, a RISC architecture has fewer than 50 instructions in its base specification @bib:riscv. The argument for RISC is that implementing all the CISC instructions in hardware increases hardware cost and the effort needed to maintain and implement them. The argument for CISC was that it lessened effort for programmers, and it required less storage for equivalent programs because each instruction could do more. In the end, CISC won. As the technology evolved, processor performance increased and compiled languages became viable. However, it was quickly discovered that compilers preferred to stay away from some of the more obscure instructions of CISC ISAs, choosing instead to emit multiple instructions for what could be expressed in a single instruction. This happened for various reasons such as the compiler simply not recognising that the optimisation could be performed, or it was recognised and the compiler developers found out that it would be no optimisation at all. What had happened is that as processors grew in complexity, these complex instructions became increasingly difficult to implement in any obvious manner in more modern architectures without breaking them up into many, smaller steps. Because of this, the special instructions that were included for the sake of programmers---and included in modern revisions because of backwards compatibility---were being implemented by falling back to a slow mode of processing. Compilers were choosing to emit only those instructions that did not require this fallback mode. Lots of development has happened since then, and CISC architectures still have a strong presence in the market of high-end computing, mostly for historical reasons. A symbiotic relationship between compiler developers and hardware engineers has caused a subset of the CISC ISAs to become reliably fast, while more obscure instructions can be much slower. The fast subset almost resembles a RISC in how it is used. Additionally, CISC processor design has started to resemble RISC processors internally and the fetch/decode stages break large CISC instructions into multiple RISC-like operations before they are passed to the backend. Our own interpretation of the subject is that anything that has an obvious path to implementation in a typical state of the art OoO processor can be considered RISC. RISC-V extensions add hundreds of instructions for things like vector processing, bit-manipulation, hardware-accelerated cryptography, and more, but implementation is relatively clear and straightforward. Another way RISC and CISC ISAs are typically different is in instruction encodings. RISC architectures have traditionally opted for fixed-size instructions which are much simpler for the processor to decode.
https://github.com/simon-epfl/notes-ba3-simon
https://raw.githubusercontent.com/simon-epfl/notes-ba3-simon/main/probastats/resume.typ
typst
#let intinf = $integral_(-infinity)^(+infinity)$ #let stick-together(a, threshold: 3em) = { block(a + v(threshold), breakable: false) v(-1 * threshold) } #let note_block(body, class: "Block", fill: rgb("#FFFFFF"), stroke: rgb("#000000")) = { locate(loc => { v(2pt) stick-together( text(12pt, weight: "bold")[Exemple] + v(-8pt) + block(fill:fill, width: 100%, inset:8pt, radius: 4pt, stroke:stroke, body) ) }) } #let example(body) = note_block( body, class: "Exemple", fill: rgb("#FFF4E0"), stroke: rgb("#F4B183") ) == Distributions "distribution function" #sym.equiv "cumulative distribution function" Donc quand on nous demande la distribution function d'une variable c'est la fonction qui $forall t " donne " P(X <= t)$. Quand on demande la PDF souvent c'est plus simple de trouver la CDF puis de dériver. == Indicator function $ I("some expression") = cases( 1 "if the expression is true", 0 "otherwise" ) $ === Distribution Exponentielle et Poisson Poisson est utilisé pour des variables aléatoires discrète. Il modélise la probabilité qu'un certain nombre d'évènements se produise durant une période de temps ou d'espace, à partir d'un taux $lambda$. $ f_X (x) = lambda^x/x! e^(-lambda) $ Poisson est une approximation de la loi binomiale pour un $p$ très petit et un $n$ très grand (on a $lambda = n p$). Le temps entre deux occurences est modélisé par une distribution exponentielle. La distribution exponentielle est *memoryless*. $ f_D (t) = cases( lambda e^(-lambda t) " pour " t > 0, 0 " sinon " ) arrow.double.r F(t) = 1 - e^(-lambda t) $ #example[ Si un client arrive toutes les 2 minutes, $lambda = 1/2$. La probabilité qu'un client arrive durant une période de 7 minutes est $1 - e^(-0.5 dot 7)$. La probabilité qu'un client arrive durant une période de 7 minutes *sachant que* 8 minutes se sont déjà écoulées est identique. Car les évènements sont *indépendants* entre eux (peu importe qui est venu avant au magasin). ] == Moments - the $r$th moment of $X$ is $E(X^r)$. == P.D.F #sym.arrow.double.r.l CDF On a la P.D.F $f(x)$ et on veut la C.D.F $G(y)$, avec $Y = 1/X$. D'abord on définit nos fonctions pour passer de $x$ à $y$ : $ r(x) = 1/x " et " s(y) = 1/y $ $ G(y) = F(s(y)) = F(1/y) $ $ (d G(y)) / (d y) = d(F(1/y))/(d y) $ $ g(y) = (d F)/(d y)(1/y)dot|-1/(y^2)| "(on s'intéresse à la vitesse, on enlève le signe -") $ $ g(y) = f(1/y) dot 1/y^2 $ Et ensuite pour trouver $G(y)$ on intègre. == Expected Value Continue : $intinf f_D (x) x d x$ Attention, c'est la P.D.F. qu'on intègre, parfois il faut dériver la C.D.F. == Variance $E(X^2) - E(X)^2$ donc, quand continue : $intinf f_D (x) x^2 d x - E(X)^2$
https://github.com/typst-doc-cn/tutorial
https://raw.githubusercontent.com/typst-doc-cn/tutorial/main/src/basic/png.typ
typst
Apache License 2.0
#let xor(a, b, bits: 32) = { import calc: * let x = 0 for k in range(bits) { x += int(odd(a) != odd(b)) * pow(2, k) a = quo(a, 2) b = quo(b, 2) } x } #let slice(x, bits: 32) = calc.rem(x, calc.pow(2, bits)) #let le32(n) = { assert(n >= 0 and n < calc.pow(2, 32)) for _ in range(4) { (calc.rem(n, 256),) n = calc.quo(n, 256) } } #let be32(n) = le32(n).rev() #let crc32-table = for n in range(256) { let c = n for k in range(8) { if calc.odd(c) { c = xor(0xEDB88320, calc.quo(c, 2)) } else { c = calc.quo(c, 2) } } (c,) } #let crc32(bytes) = { let crc = 0xFFFFFFFF for n in bytes { let x = crc32-table.at(xor(crc, n, bits: 8)) crc = xor(x, calc.quo(crc, 256)) } xor(crc, 0xFFFFFFFF) } #let adler32(bytes) = { let (a, b) = (1, 0) for n in bytes { a = calc.rem(a + n, 65521) b = calc.rem(a + b, 65521) } b * calc.pow(2, 16) + a } #let chunk(type, data) = { let type = array(bytes(type)) be32(data.len()) type data be32(crc32(type + data)) }
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/033.%20polls.html.typ
typst
polls.html Bradley's Ghost November 2004 A lot of people are writing now about why Kerry lost. Here I want to examine a more specific question: why were the exit polls so wrong?In Ohio, which Kerry ultimately lost 49-51, exit polls gave him a 52-48 victory. And this wasn't just random error. In every swing state they overestimated the Kerry vote. In Florida, which Bush ultimately won 52-47, exit polls predicted a dead heat.(These are not early numbers. They're from about midnight eastern time, long after polls closed in Ohio and Florida. And yet by the next afternoon the exit poll numbers online corresponded to the returns. The only way I can imagine this happening is if those in charge of the exit polls cooked the books after seeing the actual returns. But that's another issue.)What happened? The source of the problem may be a variant of the Bradley Effect. This term was invented after <NAME>, the black mayor of Los Angeles, lost an election for governor of California despite a comfortable lead in the polls. Apparently voters were afraid to say they planned to vote against him, lest their motives be (perhaps correctly) suspected.It seems likely that something similar happened in exit polls this year. In theory, exit polls ought to be very accurate. You're not asking people what they would do. You're asking what they just did.How can you get errors asking that? Because some people don't respond. To get a truly random sample, pollsters ask, say, every 20th person leaving the polling place who they voted for. But not everyone wants to answer. And the pollsters can't simply ignore those who won't, or their sample isn't random anymore. So what they do, apparently, is note down the age and race and sex of the person, and guess from that who they voted for.This works so long as there is no correlation between who people vote for and whether they're willing to talk about it. But this year there may have been. It may be that a significant number of those who voted for Bush didn't want to say so.Why not? Because people in the US are more conservative than they're willing to admit. The values of the elite in this country, at least at the moment, are NPR values. The average person, as I think both Republicans and Democrats would agree, is more socially conservative. But while some openly flaunt the fact that they don't share the opinions of the elite, others feel a little nervous about it, as if they had bad table manners.For example, according to current NPR values, you can't say anything that might be perceived as disparaging towards homosexuals. To do so is "homophobic." And yet a large number of Americans are deeply religious, and the Bible is quite explicit on the subject of homosexuality. What are they to do? I think what many do is keep their opinions, but keep them to themselves.They know what they believe, but they also know what they're supposed to believe. And so when a stranger (for example, a pollster) asks them their opinion about something like gay marriage, they will not always say what they really think.When the values of the elite are liberal, polls will tend to underestimate the conservativeness of ordinary voters. This seems to me the leading theory to explain why the exit polls were so far off this year. NPR values said one ought to vote for Kerry. So all the people who voted for Kerry felt virtuous for doing so, and were eager to tell pollsters they had. No one who voted for Kerry did it as an act of quiet defiance.Support for a Woman PresidentJapanese Translation If you liked this, you may also like Hackers & Painters.
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/051%20-%20March%20of%20the%20Machine/016_Zendikar%3A%20Battles%20in%20the%20Field%20and%20in%20the%20Mind.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Zendikar: Battles in the Field and in the Mind", set_name: "March of the Machine", story_date: datetime(day: 27, month: 04, year: 2023), author: "<NAME>", doc ) Nahiri has only ever wanted to save her home. She stands at a vantage point atop one of the countless drifting fragments of stone in Zendikar's sky and takes stock of her plane. Far below her, the Phyrexian invasion is gaining ground. She sees the vanguard marching forward, spreading their viscous oil and their mechanical seeds as they advance, and the green earth beneath their feet withering and smoldering black as they move toward Sea Gate. They are conquering this plane, quickly, and soon Zendikar will be healed and at peace, like all the other planes to which Phyrexia has brought unity and order. #emph[Good] , Nahiri thinks. She has tried to change her homeworld before, return it to its ancient glory and calm the Roil, and she didn't succeed. She tried to protect this plane from the Eldrazi and could not. But this time, she would not fail. This time, she would save Zendikar by aiding its transformation into its purest and most idyllic form. She is wiser now too. She understands that Zendikar and its residents will fight the change and that if left to their own devices the misguided inhabitants of this plane #emph[might ] succeed in hindering the Phyrexians. So, she must help with the rebirth of her home, sculpt it, chip away at its impurities and impulses until only perfection remains. Nahiri closes her eyes and with her lithomancy, feels through the scattered network of hedrons, the defense she created so long ago to keep the Eldrazi at bay. She needs a stronghold, a nexus for her new forged power. A satisfied grin spreads across her face when she finds it. Yes, the Skyclave in Emeria will be the perfect access point to connect the entire hedron networks and tear open the rifts between planes, allowing the current trickle of Phyrexian invasion to become a flood. A cascade that will wash this plane anew. She looks down at her own arms, freshly covered by the glowing, shining symbols of Phyrexia and where her hands once were, there are now two burning stone blades. #figure(image("016_Zendikar: Battles in the Field and in the Mind/01.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) She smiles. For she has been sculpted too, into something better. She understands that now. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) There is solace in line-slinging, despite the fresh horrors these new mechanical invaders have brought to her home. Akiri is grateful for this one unblemished thing even as she searches the floating ruins of Emeria in vain. #emph["The vision was not clear," Tazri had said. "I saw] #emph[stones reforming and the hedrons aligning] , #emph[from which oil and corruption spread. In the center was a single figure. I felt our doom, but also our salvation."] #emph["Where?" asked Akiri.] #emph["Not sure," replied Tazri, flushing slightly. "Looked like somewhere above Tazeem. Lots of hedrons."] It wasn't much to go on. The hedrons in Zendikar were as scattered and numerous as secret tunnels and caverns were in Guum Wilds. But Akiri trusted Tazri, and her halo-blessed vision meant Akiri had to at least try. There was a small, guilty part of her that felt relief at being away from the battle at Sea Gate. To be climbing, swinging, and grappling through the thin, cold air once again. She hears scrambling on the stones behind her and a moment later, her two companions meet her on the ledge she stands on. "Anything?" she asks. Orah shakes his head, the kor cleric keeping his own counsel. Kaza, shrugs. "Sorry, boss." But even the typically cheerful human wizard looks deflated. Akiri nods and doesn't let her frustration show. Her companions—her friends—insisted on coming with her even though they knew that they searched for the slimmest of hopes. And they so desperately needed hope. In the distance, Linvala glides on the wind. The angel catches Akiri's eye and Akiri shakes her head. "Keep your eyes sharp," Akiri says, and with one fluid motion, hooks another line into a cliff drifting fifty paces away. Then, she's soaring again. Here, in the treacherous space above the earth, in the empty spaces between footholds, she must focus, she must listen and watch. For at any moment something could shift and a reaction that is a moment too late, spells death. When Akiri is line-slinging, there is no room for past ghosts or regrets. With practiced ease, she makes her way across the gap, casting lines mid-arc, deftly snagging onto treacherous debris and hedrons, until she rolls onto a solid looking ledge. It is only because she is attuned to every movement that she catches the flicker in the distance. Akiri turns to see a lithe kor woman appear from thin air on an isolated fragment, her gray skin covered in dark, glowing symbols, spikes jutting from her shoulders, her arms ending not with hands, but with long, fire-bright burning blades. She has changed, but even from a distance, Akiri knows who it is. That figure, that face, has haunted her dreams since she lost Zareth. Since she fell. "What do you see?" Linvala asks, alighting besides her Akiri can only point, horror pooling in her stomach. "Warn Tazri," she whispers. "Hurry." Nahiri, the Planeswalker, has returned to Zendikar and Akiri understands in that moment with unbridled dread, the Phyrexian invasion has gained the upper hand. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) They have been fighting ceaselessly for days uncounted and still, the Phyrexians keep coming. Tazri has fought enough battles to know that the struggle is as much on the field as it is in the mind. So, she keeps her jaw set and her voice clear as she shouts commands to the ragtag army of Sea Gate's fighters and does not let her exhaustion show. But the Invasion Tree's branches keep coming. White, cracked, metallic, and massive, the branches burst from the portals opening in the sky, and in the sea. From each new branch, a wave of Phyrexian invaders spill onto the battlefield. Tazri sees the fear on the face of Erem, the kor warrior standing beside her as the newest surge of machine monstrosities rush up to join the already swelling forces at the base of Sea Gate. The slick, sickly looking oil that trails the enemy climbs up Sea Gate's marble columns that Tazri had so lovely planned and designed. She comes up beside Erem and places a hand on his shoulder. "The Eldrazi were scarier," she says, and he lets out a shaky laugh. But her mind goes back to her vision. Her thoughts are never far from it, it seems. The clash of stone, the hair-singeing heat of unfettered power, the figure in the center of it all, only their outline visible. The feeling of despair, tinged with hope. Secretly, she hopes Linvala and Akiri have found nothing in their search in the days since they left. That her vision is a problem for another day. She already has an army worth of problems before her. The enemy is almost at the gate. "Warriors!" Tazri shouts. "This is our home! We've killed false gods for it! No invader will ever claim it from us!" Around her, her fighters rally and roar fiercely, hoarse and tired as they are. Tazri screams her battle cry, turning to face the invaders. Then, she charges, running headlong into the fray. Massive, warped seedpods strike the earth around her as she swerves and parries the strike of a Phyrexian warrior's spear. Towering and more machine than flesh, the enemy moves in orderly rows, with mechanical precision. These soulless fighters with only one goal: total assimilation. A ripple of horror settles in her, even as Tazri cuts down Phyrexian warrior after Phyrexian warrior. "How are you doing that so fast?" someone says from beside her. Tazri turns a fraction. Erem is defending her flank. "They have no imagination," she says with a grin. They fight well together, she and Erem. But still there are more seedpods, more portals, more branches. The enemy is relentless, perhaps endless. #emph[No. No despair. ] Tazri thinks and doubles down on her offense, Still, she is relieved when she sees the angel in the sky and when that angel comes to join her and Erem, wielding her staff with deadly precision. "The lithomancer has returned. We spied her near Emeria," Linvala's voice is barely audible over the clash of weapons against machine. "Good. We could use the help of a Planeswalker," Tazri shouts and sinks her sword into another enemy. "She has not returned as an ally." "What?" But before the angel can answer, there is a terrible scream from beside Tazri. She turns to see that Erem has been speared through the leg by one of the invaders and is being dragged toward an open, oil-slick pod. "No!" she shouts and runs through the Phyrexian holding the spear. She bends to help Erem up. But before she can grasp his arm, another seedpod slams into the ground, mere feet away, knocking her back. With a hiss, the pod begins to unlatch, allowing the Phyrexian monsters within to uncoil and spill out. Tazri recovers quickly, but not quick enough. Erem thrashes and screams her name as two invaders drag him into the nearest seedpod and seal him within. Tazri fights and fights to reach him, but there are so many enemies. Too many. And still, more come. All around her, the brave warriors of Sea Gate are being overwhelmed. She reaches the pod in time to hear Erem's screams change. From within his metal prison, her friend begins to laugh. His voice morphing into something mechanical and twisted. "Tazri!" shouts Linvala. "The city is lost. We must leave!" "No," replies Tazri, but her own voice is swallowed up among the terror and the distorted laughter. Nor does she fight as the angel wraps her arms around her and soars up into the air. From above, Tazri watches in horror as her home is, again, consumed by creatures not from this plane. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Nahiri knows her plane is poisoned and understands that it will attempt to reject her antidote. And so, she isn't surprised when the Roil comes for her. She is running through the sky, leaping from stone to stone as she builds a path through the open air, all but flying, when the earth far below begins to rumble and shake, dislodging her rhythm. Cursing, Nahiri stumbles, and vaults to a nearby hedron to regain her balance. The Roil has always tried to undermine her. It has always been unpredictable, unruly, and destructive. But she is wiser now, and more powerful. The symbols on her body glow as she throws back her arms and begins to sculpt the earth beneath her. When the ground shakes and attempts to unbalance her, she smothers it with rocks so heavy and so thick that the violent shaking quiets to mere shivers. When it attacks her with geysers of water and magma, she throttles their escape routes, asphyxiating the turmoil so far down below the land that it will take a millennium for the magma to wrestle to the surface again. Every change, every trick the Roil lashes at her with, Nahiri suffocates with her newfound strength. Eventually the earth quiets. The Roil shudders like a gasping fish out of water, then finally stops. For miles, the landscape has become the gray uniformity of bed-rock. Nahiri holds up her arms in triumph. Black oil drips down the burning blades that were once her hands. She laughs in delight. What perfection! Before her Phyrexian conversion, she would have never been able to perform such a feat. And so, joyfully, she turns to the Emeria Skyclave. She will not be stopped in her righteous mission. She cannot be stopped. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Akiri has been tracking the corrupted Planeswalker for days. She's witnessed the Skyclave's broken stone mend and transform into white metal. The hedrons align, buzz with power, and begin to glow with an unearthly light. There's oil now seeping from the cracks of the reforged stones. With each change to the Skyclave above, more enemies arrive below. They burst through portals, the Invasion Tree's branches horrifically long and gargantuan, turning the sky red and filling the air with the sounds of droning engines and footsteps as the Phyrexian army marches forward. Below their feet, the land transforms into cracked white metal, broken by thick red sinew-like veins. Even at this distance, Akiri can see that her plane is dying. "Any sign of the angel?" she says to Orah on the ledge below her. "Not yet," he replies. "Kaza hasn't seen Linvala yet either." Akiri grimaces and wills herself to be patient. The journey from Sea Gate to Emeria is long, even by wing. If Zareth was here, he would have argued not to wait, to charge in after Nahiri and fight for their home. But Zareth is a memory and an empty hole in her chest that cannot be filled. Akiri knows Nahiri well enough to understand that facing her alone would mean death. So, Akiri waits, but is not idle. Light on her feet and quick in the air, she line-slings, exploring the shrinking few uncorrupted pieces of the Skyclave, searching for a way in. That is how she finds an entrance on the west side, recessed and small enough to have been sheltered from the corrupting oil. Finally, Akiri spots Linvala in the reddening sky. The angel's holding someone in her arms, and Akiri recognizes the glowing halo around Tazri's neck. Orah and Kaza spot them as well, and with Akiri, the three adventurers stand to greet the new arrivals. Linvala alights and sets Tazri down. They both look windswept and drawn. "I flew as quickly as my wings allowed," Linvala says. "I know," Akiri replies, clasping both the angel and Tazri on the shoulders. "You're sure Nahiri is here as our enemy?" asks Tazri, not quite able to keep the mixture of faded hope and despair from her voice. "Yes. They changed her," replies Akiri, hesitating before adding: "And I know that expression on her face. She means to transform Zendikar." "That's not proof," Tazri protests. "No, but this is!" snaps Akiri and points at the Skyclave looming before them, it's thrumming hedrons and dripping oil. Then to the dead landscape below. "A few days ago, the land was green. It was full of life. The more hedrons connected, the quicker the enemy arrives. Nahiri is going to destroy our home if we do nothing." #figure(image("016_Zendikar: Battles in the Field and in the Mind/02.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) The two adventurers stare at each other for a moment. "She is correct, Tazri," Linvala says quietly. Tazri nods, her fists clenching at her sides. "Sea Gate~" Akiri begins to ask. But the expression on Tazri and Linvala's faces answer her question. "We are the only ones left to stop Nahiri," Tazri says as she surveys the Skyclave, transformed and reeking of the Phyrexian invasion. "Within is our final hope to save our home," Linvala agrees. "We cannot fail. The only question that remains is how to proceed." For a moment, no one speaks. "We found a way in," offers Kaza. "And it's not corrupted yet," says Orah, pointing at the small entrance deep within the cliffside of the Skyclave. "I'll take you there," Akiri says, handing Tazri a rope. "Don't touch the oil." "I know." Tazri grits her teeth. Akiri leads her companions, traveling between the rocks and through the air that is no longer cold and clear, but sickly warm and choked with the smell of grease. The entrance into the Skyclave is foreboding, a rough gap in the stone leading into a darkness with no end in sight. Akiri coils her ropes as she says: "I don't know what horrors await us within. I don't know what Nahiri is planning, but she is relentless. You might die or be changed. Anyone who does not want to go, should leave and not feel ashamed." She looks at Linvala, Tazri, Orah, and Kaza in turn. They all meet her gaze and do not move. "Zareth would never forgive us if we let her win," says Kaza, quietly. Orah nods and Akiri's chest aches with memory of her lost friend's infamous stubbornness. Still, Akiri hesitates. "We did not defeat the Eldrazi to be destroyed by this," says Tazri through a clenched jaw and strides into the dark. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) At first, Tazri wonders why the passageway is so quiet. From the stories she heard in the taverns from adventurers, the Skyclave tunnels should be filled with terrifying creatures and dazzling wonders from the ancient kor civilization. They say everything moves in floating, fragmented cities in the sky. Everything is treacherous, you can't trust where you put your feet. But here in the dark of the Skyclave that Nahiri is corrupting, all is still. "Something's off," Orah whispers, his gray eyes surveying every crack and every corner as they walk. "Yeah. We usually get attacked by now," agrees Kaza. Before her, Tazri can just make out Akiri's tall silhouette. The kor woman moves with stealth and caution and Tazri finds herself grateful to have such an experienced ally by her side. Despite her anger and her grief, Tazri's glad she asked Akiri to explore the ruins after she had her vision. Far down the tunnel, there is a flicker. Something shining briefly red, then gone. "Wha—" Linvala begins, but Akiri silences her with a gesture. The line-slinger inches forward. Behind her, Orah and Kaza draw their weapons. For the first time, Tazri wishes the halo around her neck did not shine so brightly in the dark. There is a flicker again. And then a longer one, closer now. Lightning fast, though Tazri can just make out the form of a humanoid, red and black and hunched. Then, for agonizing seconds, there is nothing. They don't move, Tazri barely breathes. "Where did it go?" Kaza whispers, eventually. Something roars behind them. The five adventurers turn to find a huge creature, like a giant twisted tree, mouth wide and devouring, eyes filled with rage. Its remaining ragged leaves are black and its bark has been replaced with strips of dull metal. Oil, instead of sap oozes from between its metallic bark. The corrupted elemental raises its limbs and Tazri rolls, the impact missing her by inches. She rises to a knee, draws her sword, and snarls. With her years of battle experience, Tazri understands that the creature's attacks rely on its massive size and that if it lands a blow, its limbs would crush them like a boot on a twig. There's a thunderous crash as thick bough smashes into the stones a hand's breadth away from Tazri. There's no way she can deflect and parry #emph[that] . So, she changes tactics, striking the vulnerable points; the vees of its limbs, its face when she can, its roots when she can't. Her fellow adventurers do a beautiful job of keeping it distracted, but it's only when Akiri sinks one of her hook-lines into the creature and uses the rope to pull it off balance, does Tazri get the opening she's waiting for. She thrusts her sword into the creature's gaping mouth. It does not make a sound as it dies. And somehow, that unsettles Tazri more than any death scream. "Well," says Linvala, folding her wings and brushing the hair out her eyes. "How unexpected." "Oh gods," Orah says in a strangled voice. Tazri turns to see the cleric holding up his right hand. The tips of his fingers are covered in a sickly black oil. "Orah~" Akiri takes a step forward. But Orah recoils. "They're coming," he says and nods down the tunnel. In the distance, there is another red flash. Then another. "For Zareth," Orah says, and meets Akiri's gaze. "For #emph[us] ." With that, he charges into the Skyclave, staff in hand. The five adventurers fight like demons. The elementals they meet are mighty and strangely familiar, with massive fronts and gleaming moss. But they have been all changed into a subversion of their former selves. Once guardians of Zendikar, now zealots of Phyrexia. Tazri and the others defeat one Phyrexianized elemental, then two, then four. But there are too many for the one adventuring parting to withstand. "Run!" Akiri shouts and leads them down an empty passageway. For the second time in recent memory, Tazri flees from an enemy instead of facing and defeating them. Shame burns in her. #emph[Nothing else matters if you don't stop Nahiri] , she reminds herself, and runs faster. Eventually the tunnel opens to a wide room, old, vast, and once beautiful. It is covered in ancient kor designs. But Tazri only absorbs a glimpse of her surroundings before they are swallowed by red flickers from all around. Within moments, she and the others are surrounded by dozens of red and black, oily elementals that were once the very soul of Zendikar. There is no way out. "We can't die yet," Orah wheezes and holds his weapon in his left hand. His right is brittle and white, his veins the darkest black. "Not for a long time," Kaza agrees. "I have plans after this." The elementals close in, twisted and relentless. Tazri's sword does not waver, but she clasps the halo around her neck and prays to anyone listening. She can feel the acrid smelling oil oozing from the elementals' skins. There is no way out. Then, from her left, there is a blinding light. With a collective gasp, the elementals stagger back, confused and alarmed. Tazri looks and sees Linvala radiating with light and charging forward. The elementals part before her, like water before a prowl. Only then does Tazri see the door at the far side of the chamber. "Run!" Linvala shouts and they do. Around her, Tazri is vaguely aware of the sounds of metal plates striking stone, but she does not look away from the doors, does not slow her pace. She grabs the handles and with a half-formed prayer, pushes. The doors open and Tazri almost crumbles in relief. Quickly, the five adventurers barricade the entrance with anything they can find. Rocks, bones, broken pieces of wood. "How?" Tazri asks the angel as she jams another piece of timber under the door handle. "I glimpsed the exit a mere moment before the elementals arrived," replies Linvala with a sly smile. But that isn't what Tazri was asking. The angel's light~ #emph[Later, ask again later. Focus. Survive now. ] she thinks. It's only when she is certain their enemies cannot get through, does Tazri stop to survey her new surroundings. She inhales sharply. Around them are the carcasses of every living creature that didn't survive the Phyrexian transformation. Half changed corpses of metal and flesh, rotting, oozing, reeking of decay and corruption. Beasts and elementals, everything that once called this Skyclave its home, is now perverted or eradicated. Tazri doesn't wonder why the tunnels are so quiet anymore. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Nahiri indoctrinates another elemental before it even crosses the threshold. When she first entered the Skyclave, the tunnels were crawling with them. Zendikar's heart, Nissa called the creatures. But what does that foolish elf know of hearts? That first elemental she faced was massive, all leaves and thorns, heaving a rock for a weapon. Nahiri stared down her enemy and laughed. With her new powers, with her arms as blades, she #emph[is ] a weapon. Within minutes, the soft green thing was under her boots, turning black as the blessed oil of change transformed it into a believer of Phyrexia. Endless were the elementals and the other creatures that arrived to stop her as she worked in the heart of the Skyclave. One by one, she converted them all. Or killed them and left their bodies outside the chamber, if she was feeling impatient. #emph[This time they will not stop me. This time I ] will #emph[heal Zendikar. ] Nahiri thinks as she pours more of her power into the Skyclave's core. She is simply trying to do her best to help her home. Always has. When she first arrived in this central chamber, days ago, she used her joy of her new transformation and her new strength to realign the hedrons and widen the rifts between planes. Millennia ago, with Ugin and Sorin, she had drawn the Eldrazi from the Blind Eternities to Zendikar by using the hedron network. Now she did the same, joyously calling to Realmbreaker across planes. Her newfound joy was powerful indeed, but it was not enough. By the second day Nahiri resorted to old tactics and poured all her anger into the transformation, nearly reforging the Skyclave whole and expanding the hedron network across vast swathes of the plane. She was shocked, though, when a few days later, her anger ran dry and still the work was not done. So, she channeled her pain, her grief from the betrayals, the losses, the loneliness over the millennia. She was just trying to do the right thing. She is always trying to do the right thing. All around Zendikar, the hedrons began to reconnect and thrum with power. And so, Nahiri learns that grief is as powerful as rage. But it isn't endless either. The work is almost done when Nahiri expends the last of her grief. Her new network spans across oceans, the boundaries between planes have become fragile and thin. She is so close. But for the first time in her long existence, the ancient Planeswalker is empty of rage, grief, and pain. Nahiri has nothing left to give. No. She has one thing left to offer. She steps into the grand, beautiful network she's built and fuses herself with the stones in the center, becoming its keystone, the heart that binds her work here together. There, Nahiri begins to pour her very essence into her glorious creation. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) The only path left to them is forward, as terrible as it might be. There is another set of doors across the room. Tazri approaches. She can hear the hum of power and shifting stones on the other side. "The Planeswalker's in here," she says and moves to open the door. But she hesitates. #emph[Nahiri's too powerful. What hope do we have?] Tazri knows the battle is as much in the mind as it is in the field. But still, she cannot push the thought away. Behind her, Linvala and Akiri hesitate, as if wrestling with doubts of their own. It is Kaza who steps up and places her hands on the handle above Tazri's own. "We have no other home," she says and pushes open the imposing stone doors. Tazri gasps at the tableau before her. Her vision gave her some warning about what to expect and yet to see it with her own eyes; the ancient kor chamber transformed into a grotesque mixture of cracked white metal, red sinew, and gray stones. Glistening oil running in streams on the floor. Tazri has witnessed too many horrors to frighten easily, but the sight of Nahiri, compleated and embedded in the Skyclave's heart, makes her blood run cold. "Tiny elementals. Cute," Nahiri says when she notices them, her lips curved with a lazy smile. But then her gaze fixes on Akiri and her eyes narrow with recognition. "#emph[You] ." Akiri says nothing. Instead, with the quickness and surety of a line-slinger, Akiri throws a knife at the Planeswalker's throat. The knife does not even make it halfway across the room before a stone slams it into the ground. "You cannot stop me," Nahiri snarls. The room begins to tremble. Tazri rushes at the corrupted Planeswalker, drawing her sword as she runs. She dodges oil slicks, jutting stone, and cracked metal. A slab of granite hurtles toward her from her left and she ducks. Another flies at her from the front and she rolls, and comes smoothly to her feet. She does not stop moving. She's close, she can see the burning veins on Nahiri's arms. She raises her sword with a roar. #emph[For Zendikar] , she screams without words as she brings her weapon down. She doesn't feel the stone shift under her until it's too late. Suddenly, she is flying toward the ceiling at bone breaking speed. She rolls off the platform at the last moment and lands on the floor with a loud #emph[thud] . Tazri groans, more from shock than pain. Inches away there's a pool of black oil and it's growing, reaching toward her. She scrambles to her feet and charges again. The floor tilts, and a tendril of braid stone whips across the backs of Tazri's knees. She cries out, hitting the ground hard. Again, she stands. Again, she attacks. From the corner of her eye, Tazri sees the Orah and Kaza frantically dodging flying debris and razor-sharp stones. Kaza throws firebomb spells when she can, though she doesn't get many chances. Akiri and Linvala charge, both flying, one with wings and the other with hooks. But they too are pushed back with rocks and the sheer ferocity of Nahiri's attacks. A massive stone slams into Tazri's hip mid-jump, knocking her down. From the center of the room, the Planeswalker smirks. Tazri cannot touch the oil, she cannot reach Nahiri. Her hair and skin singe with the heat of the Planeswalker's power. She fights, but she knows in her heart it is in vain. The image before her is exactly that of her vision, but there is no hope. Zendikar is lost. The halo around her neck begins to burn. Linvala is only five paces away, but her voice sounds as if it's traveled a thousand miles as the angel begins to scream. Suddenly, everything becomes bright. At first, Tazri doesn't understand. The chamber glows with an iridescent light. Akiri gleams, and Kaza, too. Orah's face is an expression of shock as he clutches his infected right hand, watching the oil burn away. Tazri looks down and is stunned to find that she is shining with an incandescent glow, too, the halo about her neck brighter than ever before. Linvala, however, radiates. The light spilling from her is just like the momentarily illumination in the chamber with the elementals, but stronger, unfettered now. Tazri can barely look directly at the angel. Within her stone tomb, Nahiri screams and the Skyclave trembles with her strength. But the angel's light has stunned Phyrexia's power. Suddenly, the boulders and white metal shards hang suspended, unmoving. The oil about their feet is drying up. Nahiri curses as the burning runes on her body grow dim. #emph[Go. Attack now. ] A voice whispers, from below her chin. Tazri touches the halo around her neck and obeys. One last time, she charges the Phyrexian Planeswalker. Her allies—no, her friends—run alongside her: Kaza throwing spells to distract Nahiri as Akiri launches her grappling hook, tangling the lithomancer's arms. Tazri spots her opening but knows her sword will be useless against the metal and stone encasing the Planeswalker. #figure(image("016_Zendikar: Battles in the Field and in the Mind/03.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) #emph[Use me] , whispers the halo. #emph[Quick!] Tazri yanks the halo off from around her neck and in one desperate movement, hurls it at the entombed Planeswalker. There is a flash. There are screams—Nahiri's, Orah's, Linvala's, perhaps her own. Then, the radiant light is gone. For a moment, there is only silence. In the center of the room, the keystone breaks and Nahiri crumbles from her stone and metal embrace. She collapses onto the floor with a groan. For the briefest of moments, Tazri swears an expression of horror flashes across her face when she sees her sword-for-hands. Then, the Planeswalker recovers, getting to her feet, a snarl contorting her features. "#emph[No] ." she says and raises her arms. But she is no longer the linchpin, holding this perverted Skyclave together by power and will alone. Before Nahiri can unleash her attack there is a thundering, deafening #emph[crack ] from deep within the Skyclave. A look of surprise flashes across the Planeswalker's face, before everyone, including Nahiri, is knocked from their feet. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Akiri knows what total collapse sounds like, feels like. Panic catches her breath and for a moment, it's almost like she's back on that other Skyclave with Nahiri, minutes away from losing Zareth. But no, this is different. She's here, fighting for her home, and the floor she's standing on is collapsing. She needs to move. #emph[Now] . So, Akiri runs. She grabs Tazri's halo from the ground, and then Tazri by the waist, and uncoils her ropes. A second before the floor gives out entirely, she lets her hooks fly and they are arcing through emptiness. They land hard on stone outside the chamber. Above them, there's another ear-splitting #emph[crack ] and the ceiling begins to tumble. They sprint forward, swinging across gaps and dodging, all action and reaction. Akiri glances to her left and sees Linvala soaring beside her, still glowing with radiance, but dimmer than before. She glances right and is relieved that Kaza and Orah together, flying on Kaza's magic staff. Just like that other Skyclave. #emph[Focus. ] Akiri shakes the memory away and runs faster. There is no room for the past or distraction now. The tunnel they walked through hours before is barely stable, loud crashes ring out around them. But Akiri can see the sky ahead. She grabs Tazri again. "Jump!" she shouts. Then, they are falling. The wind rips mercilessly at her hair and clothes. Her stomach clenches at the sudden emptiness. The rapid descent. She feels Tazri's death grip around her waist tighten. But Akiri is a master line-slinger and midway through their failing arc, she lets her rope fly. They latch onto a spinning hedron and in an instance, the dangerous fall becomes a smooth arc. They glide and land safely to a ledge where the drifting ground is stable for the moment. Only then does Akiri look behind her. The Emeria Skyclave is falling to the earth. The corrupted Planeswalker trapped within. "Do you think we stopped her?" Tazri says, her voice tired and hoarse. Akiri gazes out at the vast invasion occurring below. The mechanical soldiers stumble slightly, no longer marching in neat rows. "Perhaps," she says. For the line-slinger has faced this foe before and knows that she is more stubborn than stone. But Akiri looks up. Zendikar's sky is no longer red and greasy. Now, it glows with a soft iridescent light. Though the odds are stacked against them, they have found their slimmest of hopes. And with it, she and her friends will fight to save their home.
https://github.com/Error-418-SWE/Documenti
https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/3%20-%20PB/Documentazione%20interna/Verbali/24-02-18/24-02-18.typ
typst
#import "/template.typ": * #show: project.with( date: "18/02/24", subTitle: "Meeting di retrospettiva e pianificazione", docType: "verbale", authors: ( "<NAME>", ), reviewers: ( "<NAME>", ), timeStart: "15:00", timeEnd: "15:45", ); = Ordine del giorno - Valutazione del progresso generale; - Analisi retrospettiva; - Analisi valutazione RTB; - Pianificazione. = Valutazione del progresso generale <avanzamento> Lo Sprint 15 ha raggiunto gli obiettivi prefissati. In data 16/02/2024 il gruppo ha sostenuto il colloquio con il #vardanega per il secondo sportello di valutazione RTB, di cui ha ottenuto l'esito, risultato positivo, in data 17/02/2024. == #adr L'aggiornamento del documento #adr è terminato: il documento ora risponde e corregge le criticità evidenziate dal #cardin al primo sportello di valutazione RTB. Il gruppo considera completato l'aggiornamento e l'adeguamento del documento, ritenendolo pronto per una seconda revisione. == #glo Le definizioni contenute all'interno del documento sono state estese. == #ndp Rimosso capitolo 3 inerente alle convenzioni stilistiche non derivante dallo standard ISO/IEC 12207:2017, il cui contenuto era già assorbito dal capitolo 4.6.3 delle #ndp_v. == #pdp Redatti il consuntivo dello Sprint 14, terminato in data 4/02/2024, e il preventivo dello Sprint 15 iniziato in data 11/02/2024. == Automazioni Alcune componenti delle GitHub Actions implementate dal gruppo all'intero del _repository_ sono state aggiornate a seguito del rilascio della loro nuova versione. In particolare: - `upload-artifact` si aggiorna dalla versione _v3_ alla versione _v4_; - `download-artifact` si aggiorna dalla versione _v3_ alla versione _v4_; - `setup-python` si aggiorna dalla versione _v4_ alla versione _v5_. Rimossa la GitHub Action di supporto alla revisione di spellchecking mediante ChatGPT. Tale action era stata precedentemente disattivata a causa dei risultati non soddisfacenti prodotti e dei numerosi falsi positivi generati. == Modifiche di carattere generale === Termini ricorrenti I nomi dei documenti, dei professori e del gruppo, sono stati resi variabili riutilizzabili all'interno dei documenti. La modifica sarà estesa all'intero contenuto di tutti i documenti nello Sprint 16. === Sezione dei riferimenti uniformata La sezione dei riferimenti presente all'interno dei documenti soggetti a ciclo di vita è stata uniformata conseguentemente all'utilizzo delle variabili introdotte. Aggiunta la data di ultima consultazione ai riferimenti. = Analisi retrospettiva Lo Sprint 15 è terminato con il raggiungimento di tutti gli obiettivi prefissati, il cui rendimento positivo è sostenuto dalle principali metriche esposte dal #pdq\: - CPI di progetto cresce passando da 0.97 a 0.98; - EAC diminuisce passando da 13.437,22 a € 13.292,70; - $"SEV" >= "SPV"$ Maggiori dettagli in merito al valore delle metriche alla loro analisi sono reperibili all'interno dei documenti #pdq_v e #pdp_v. == Keep doing <keep-doing> Le review di questo Sprint sono state tempestive e precise e hanno permesso di mantenere un numero ridotto di branch contemporaneamente aperti, riducendo frequenza e incidenza di merge conflict. Il risultato è pertanto un progresso costante ed equamente distribuito nel corso della settimana. == Improvements <improvements> === Criticità evidenziate *PO1*: Seppur durante lo Sprint siano state portate a termine tutte la task previste raggiungendo gli obiettivi prefissati, per alcune task non è stata rispettata la data di scadenza fissata. Ciò, pur non comportando rallentamenti o sovraccarico di lavoro, ha permesso di evidenziare nuovamente l'importanza di una comunicazione attiva. *PO2*: Alcuni membri del gruppo evidenziano gli impegni universitari non ancora conclusi, che comportano una riduzione in termini di disponibilità. *PO3*: Mancato sfruttamento del tempo alla conclusione delle task assegnate al singolo membro: si rinnova l'importanza di essere maggiormente proattivi. === Soluzioni predisposte #figure(caption: [Soluzioni individuate alle criticità riscontrate.], table( align: left, columns: (auto, 1fr, auto), [ID risoluzione], [Titolo], [Criticità affrontate], [RO1],[Riassegnazione task], [PO1, PO2], [RO2],[Proattività],[PO3] ) ) Le risoluzioni predisposte sono descritte nel documento #pdp_v paragrafo 2.1 e saranno oggetto di verifica e valutazione nel corso dello Sprint 16. = Analisi valutazione RTB In data 17/02/2024 il gruppo ha ricevuto l'esito del colloquio sostenuto con il #vardanega in data 16/02/2024 relativo al secondo sportello di valutazione RTB. #figure(caption: [Esito RTB.], table( columns: (1fr, 1fr, 1fr), [Presentazione (peso 40%)], [Documentazione (peso 60%)], [Media], [26,50],[22,50],[24,10] ) ) === Valutazione Le motivazioni in relazione alla valutazione della milestone RTB sono reperibili al seguente link: #align(center, link("https://www.math.unipd.it/~tullio/IS-1/2023/Progetto/RTB/Error_418.pdf")) === Analisi interna della valutazione ottenuta Il gruppo prende visione e comprende le criticità evidenziate, le quali hanno generato task mirate alla loro risoluzione. Nello specifico: - la struttura dei verbali verrà revisionata, predisponendo una sezione dedicata al tracciamento delle attività e delle decisioni intraprese; - il documento #adr è stato aggiornato, rispondendo alle criticità evidenziate dal #cardin\; - il documento #ris verrà assorbito dal #pdp, prestando maggiore attenzione alla gestione dei rischi e alle risoluzioni adottate: - i riferimenti assenti nel #pdq devono essere risolti. Dovranno inoltre essere definite le metriche di valutazione in riferimento alla qualità del prodotto. = Pianificazione <pianificazione> #let table-json(data) = { let keys = data.at(0).keys() table( align: left, columns: keys.len(), ..keys, ..data.map( row => keys.map( key => row.at(key, default: [n/a]) ) ).flatten() ) } #figure(caption: [Task pianificate per lo Sprint 16.], table-json(json("tasks.json")) )
https://github.com/daskol/typst-templates
https://raw.githubusercontent.com/daskol/typst-templates/main/jmlr/jmlr.typ
typst
MIT License
/** * jmlr.typ * * This is a Typst template for Journal of Machine Learning Research (JMLR). It * is based on textual instructions [1-3] as well as an example paper [4]. * * [1]: https://www.jmlr.org/format/authors-guide.html * [2]: https://www.jmlr.org/format/format.html * [3]: https://www.jmlr.org/format/formatting-errors.html * [4]: https://github.com/jmlrorg/jmlr-style-file */ #let std-bibliography = bibliography // Due to argument shadowing. #let font-family = ("New Computer Modern", "Times New Roman", "Latin Modern Roman", "CMU Serif", "New Computer Modern", "Serif") #let font-family-mono = ("Latin Modern Mono", "New Computer Modern Mono", "Mono") #let font-size = ( tiny: 6pt, script: 8pt, // scriptsize footnote: 9pt, // footnotesize small: 10pt, normal: 11pt, // normalsize large: 12pt, Large: 14pt, LARGE: 17pt, huge: 20pt, Huge: 25pt, ) /** * h, h1, h2, h3 - Style rules for headings. */ #let h(body) = { set text(size: font-size.normal, weight: "regular") set block(above: 11.9pt, below: 11.7pt) body } #let h1(body) = { set text(size: font-size.large, weight: "bold") set block(above: 13pt, below: 13pt) body } #let h2(body) = { set text(size: font-size.normal, weight: "bold") set block(above: 11.9pt, below: 11.8pt) body } #let h3(body) = { set text(size: font-size.normal, weight: "regular") set block(above: 11.9pt, below: 11.7pt) body } /** * join-authors - Join a list of authors (full names, last names, or just * strings) to a single string. */ #let join-authors(authors) = { return if authors.len() > 2 { authors.join(", ", last: ", and ") } else if authors.len() == 2 { authors.join(" and ") } else { authors.at(0) } } #let make-author(author, affls) = { let author-affls = if type(author.affl) == array { author.affl } else { (author.affl, ) } let lines = author-affls.map(key => { let affl = affls.at(key) let affl-keys = ("department", "institution", "location") return affl-keys .map(key => { let value = affl.at(key, default: none) if key != "location" { return value } // Location and country on the same line. let country = affl.at("country", default: none) if country == none { return value } else if value == none { return country } else { return value + ", " + country } }) .filter(it => it != none) .join("\n") }).map(it => emph(it)) return block(spacing: 0em, { show par: set block(spacing: 5.5pt) text(size: font-size.normal)[*#author.name*] set par(justify: true, leading: 5pt, first-line-indent: 0pt) text(size: font-size.small)[#lines.join([\ ])] }) } #let make-email(author) = { let label = text(size: font-size.small, smallcaps(author.email)) return block(spacing: 0em, { // Compensate difference between name and email font sizes (10pt vs 9pt). v(1pt) link("mailto:" + author.email, label) }) } #let make-authors(authors, affls) = { let cells = authors .map(it => (make-author(it, affls), make-email(it))) .join() return grid( columns: (6fr, 4fr), align: (left + top, right + top), row-gutter: 12pt, // Visually perfect. ..cells) } #let make-title(title, authors, affls, abstract, keywords, editors) = { // 1. Title. v(31pt - (0.25in + 4.5pt)) block(width: 100%, spacing: 0em, { set align(center) set block(spacing: 0em) text(size: 14pt, weight: "bold", title) }) // 2. Authors. v(23.6pt, weak: true) make-authors(authors, affls) // 3. Editors if exist. if editors != none and editors.len() > 0 { v(28.6pt, weak: true) text(size: font-size.small, [*Editor:* ] + editors.join([, ])) } // Render abstract. v(28.8pt, weak: true) block(spacing: 0em, width: 100%, { set text(size: font-size.small) set par(leading: 0.51em) // Original 0.55em (or 0.45em?). align(center, text(size: font-size.large, weight: "bold", [*Abstract*])) v(8.2pt, weak: true) pad(left: 20pt, right: 20pt, abstract) }) // Render keywords if exist. if keywords != none { keywords = keywords.join([, ]) v(6.5pt, weak: true) // ~1ex block(spacing: 0em, width: 100%, { set text(size: 10pt) set par(leading: 0.51em) // Original 0.55em (or 0.45em?). pad(left: 20pt, right: 20pt)[*Keywords:* #keywords] }) } // Space before paper content. v(23pt, weak: true) } /** * jmlr - Template for Journal of Machine Learning Research (JMLR). * * Args: * title: Paper title. * short-title: Paper short title (for page header). * authors: Tuple of author objects and affilation dictionary. * last-names: List of authors last names (for page header). * date: Creation date (used in PDF metadata). * abstract: Paper abstract. * keywords: Publication keywords (used in PDF metadata). * bibliography: Bibliography content. If it is not specified then there is * not reference section. * appendix: Content to append after bibliography section. * pubdata: Dictionary with auxiliary information about publication. It * contains editor name(s), paper id, volume, and * submission/review/publishing dates. */ #let jmlr( title: [], short-title: none, authors: (), last-names: (), date: auto, abstract: [], keywords: (), bibliography: none, appendix: none, pubdata: (:), body, ) = { // If there is no short title then use title as a short title. if short-title == none { short-title = title } // Authors are actually a tuple of authors and affilations. let affls = () if authors.len() == 2 { (authors, affls) = authors } // If last names are not specified then try to guess last names from author // names. if last-names.len() == 0 and authors.len() > 0 { last-names = authors.map(it => it.name.trim("\s").split(" ").at(-1)) } // If there is only one editor then create an `editors` field with a single // editor. let is_preprint = pubdata.len() == 0 let editors = if is_preprint { () } else if pubdata.at("editors", default: none) == none { (pubdata.editor, ) } else { pubdata.editors } // Set document metadata. let meta-authors = join-authors(authors.map(it => it.name)) set document(title: title, author: meta-authors, keywords: keywords, date: date) set page( paper: "us-letter", margin: (left: 1.25in, right: 1.25in, top: 1.25in + 4.5pt, bottom: 1in), header-ascent: 24pt + 0.25in + 4.5pt, header: locate(loc => { // The first page is a title page. Short title on even pages and authors // on odd ones. let pageno = counter(page).at(loc).first() if pageno == 1 { // If this is preprint then there is nothing in header on title page. if is_preprint { return } let volume = pubdata.volume let year = pubdata.published-at.year() let nopages = locate(loc => counter(page).final().at(0)) let format-date = (date, supplement) => { return date .display(supplement + " [month padding:none]/[year repr:last_two]") } let submitted = format-date(pubdata.submitted-at, "Submitted") let revised = format-date(pubdata.revised-at, "Revised") let published = format-date(pubdata.published-at, "Published") set text(size: font-size.script) grid( columns: (1fr, 1fr), align: (left, right), [Journal of Machine Learning Research #volume (#year) 1-#nopages], [#submitted\; #revised\; #published]) } else if calc.rem(pageno, 2) == 0 { set align(center) set text(size: font-size.small) smallcaps[#join-authors(last-names)] } else { set align(center) set text(size: font-size.small) smallcaps(short-title) } }), footer-descent: 10%, footer: locate(loc => { let pageno = counter(page).at(loc).first() if pageno == 1 { set text(size: font-size.script) set par(first-line-indent: 0pt, justify: true) show par: set block(spacing: 9pt) // NOTE If this is preprint then we use metadata `date` for copyright // notice. let owners = join-authors(authors.map(it => it.name)) let year = if not is_preprint { pubdata.published-at.year() } else if date == auto { datetime.today().year() } else { date.year() } [©#year #owners\.] parbreak() let href = addr => link(addr, raw(addr)) let url-license = "https://creativecommons.org/licenses/by/4.0/" [License: CC-BY 4.0, see #href(url-license).] if not is_preprint { let url-attrib = ( "http://jmlr.org/papers/v", str(pubdata.volume), "/", pubdata.id, ".html", ).join() [Attribution requirements are provided at #href(url-attrib).] } } else { v(-1pt) // Compensatation for what? align(center, text(size: font-size.small, [#pageno])) } }), ) // Basic paragraph and text settings. set text(font: font-family, size: font-size.normal) set par(leading: 0.55em, first-line-indent: 17pt, justify: true) show par: set block(spacing: 0.55em) // Configure heading appearence and numbering. set heading(numbering: "1.1") show heading.where(level: 1): it => { show: h1 // Render section with such names without numbering as level 3 heading. let unnumbered = ( [Acknowledgments], [Acknowledgments and Disclosure of Funding], ) if unnumbered.any(name => name == it.body) { set align(left) set text(size: font-size.large, weight: "bold") set par(first-line-indent: 0pt) v(0.3in, weak: true) block(spacing: 0pt, it.body) v(0.2in, weak: true) } else { it } } show heading.where(level: 2): h2 show heading.where(level: 3): h3 set enum(indent: 14pt, spacing: 15pt) show enum: set block(spacing: 18pt) set list(indent: 14pt, spacing: 15pt) show list: set block(spacing: 18pt) set math.equation(numbering: "(1)") show ref: it => { let eq = math.equation let el = it.element if el != none and el.func() == eq { numbering(el.numbering, ..counter(eq).at(el.location())) } else { it } } set cite(form: "prose") set figure(gap: 14pt) show figure.caption: it => { set text(size: font-size.small) set par(leading: 6.67pt, first-line-indent: 0pt) let numb = locate(loc => numbering(it.numbering, ..it.counter.at(loc))) let index = it.supplement + [~] + numb + it.separator grid(columns: 2, column-gutter: 5pt, align: left, index, it.body) } make-title(title, authors, affls, abstract, keywords, editors) parbreak() body if appendix != none { set heading(numbering: "A.1.", supplement: [Appendix]) show heading: it => { let rules = (h1, h2, h3) let rule = rules.at(it.level - 1, default: h) show: rule let numb = locate(loc => { let counter = counter(heading) return numbering(it.numbering, ..counter.at(loc)) }) block([Appendix~#numb~#it.body]) } counter(heading).update(0) pagebreak() appendix } if bibliography != none { show heading: it => { show: h1 block(above: 0.32in, it.body) } // TODO(@daskol): Closest bibliography style is "bristol-university-press". set std-bibliography( title: [References], style: "bristol-university-press") bibliography } }
https://github.com/Rhinemann/mage-hack
https://raw.githubusercontent.com/Rhinemann/mage-hack/main/src/templates/cover.typ
typst
#import "interior_template.typ": gold, purple, interior_image #let cover_image = "images/cover/" #let placeholder_im = rect( fill: gold.transparentize(40%), width: 80%, inset: 30pt, )[ #set text(font: "Abbess", size: 20pt, fill: white) #rotate(-30deg, reflow: true)[Placeholder image!] ] #let logo = context { set text(font: "<NAME>", fill: gold, tracking: 1pt, bottom-edge: "bounds", top-edge: "bounds") set block(above: 4pt, below: 4pt) show text: it => { box()[#it] } let small_f_size = 25pt let big_f_size = 80pt let line_width = measure(text(size: big_f_size)[#upper()[Mage]]).width + 5pt let t_gradient = gradient.radial(white, gold) set text(fill: t_gradient) text(size: small_f_size)[Primed by Cortex] line(length: line_width, stroke: 1.5pt + gold) text(size: big_f_size)[#upper()[Mage]] line(length: line_width, stroke: 1.5pt + gold) text(size: small_f_size)[The Ascension] } #let front_cover = { page( background: { place(image("../../assets/images/cover/Silk.jpg", width: 100%, height: 100%)) place(image("../../assets/images/cover/Frame.png", width: 100%, height: 100%)) }, paper: "us-letter", margin: 30mm, )[ #set text(font: "Abbess", size: 20pt, fill: white) #set align(center) #logo #v(1fr) #image("../../assets/images/cover/result.png", width: 80%) #v(1fr) A guide to Cortex Prime system conversion of the game ] } #let temp_cover = { show heading: set text(fill: yellow, size: 60pt) page( fill: purple, paper: "us-letter", margin: 30mm, )[ #set text(font: "Abbess", size: 20pt, fill: white) #set align(center) #logo #v(1fr) A guide to Cortex Prime system conversion of the game ] } #let back_cover = { page( background: { place(image("../../assets/images/cover/Silk.jpg", width: 100%, height: 100%)) place(image("../../assets/images/cover/Frame.png", width: 100%, height: 100%)) }, paper: "us-letter", margin: 30mm, )[ #show heading: it => { set text( font: ("XWGXSC+CortexSymbology", "Abbess"), fill: gold, size: 16pt, ) align(center)[#it] } #set text( font: ("XWGXSC+CortexSymbology", "Goudy Old Style"), fill: white, size: 10pt, ) #align(center)[#logo] #v(1fr) #block(width: 100%)[#align(center + horizon)[ #stack( dir: ltr, spacing: 5%, image("../../assets/images/cover/WW_Logo.svg", height: 13%), image("../../assets/images/cover/M4 logo.png", height: 13%), image("../../assets/images/cover/Cortex Prime Community - Dark Background - Color.png", height: 10%), ) ]] ] }
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/SK/zalmy/Z054.typ
typst
Čuj, Bože, moju modlitbu a pred mojou úpenlivou prosbou sa neskrývaj: \* pohliadni na mňa a vyslyš ma. Keď premýšľam o sebe, som rozrušený, \* zmätený krikom nepriateľa a útlakom hriešnika. Lebo ma zavaľujú bezprávím a zúrivo do mňa dorážajú. \* Srdce sa vo mne chveje a padá na mňa hrôza predsmrtná. Úzkosť a triaška idú na mňa \* a zmocňuje sa ma des. A tak si hovorím: „Ktože mi dá holubičie krídla, \* aby som mohol odletieť a odpočinúť si? Aby som mohol utiecť do diaľav a pobudnúť v samote? \* Vyčkávam, kto by ma zachránil pred búrkou a víchricou.“ Pane, zmäť ich jazyky a rozdeľ; \* bo v meste vidím násilie a hádky. Na jeho hradbách dňom i nocou krúžia dokola; \* v jeho strede sú neprávosť, strasti a úklady a v jeho uliciach ustavične panuje \* podvod a klam. Lebo keby mi zlorečil môj nepriateľ, to by som ešte vedel zniesť; \* a keby sa nado mňa vyvyšoval ten, čo ma nenávidí, azda by som sa pred ním skryl. Ale ty, človeče, ty si predsa mne roveň, \* môj dobrý známy, ba dôverný priateľ. S tebou ma spájal veľmi nežný zväzok; \* v sprievode sme kráčali Božím domom. Smrť nech sa vrhne na nich a do podsvetia nech zídu zaživa, \* lebo zloba je v ich príbytkoch, je medzi nimi uprostred. Ja však budem volať k Bohu \* a Pán ma zachráni. Večer i ráno, i napoludnie budem rozjímať a vzdychať \* a vypočuje môj hlas. Vykúpi ma v pokoji z moci tých, čo na mňa útočia, \* lebo ich je mnoho proti mne. <NAME> vypočuje, ale ich zrazí, on, ktorý je spred vekov. \* Lebo oni sa nezmenia a Boha sa neboja. Každý z nich vystiera ruku proti svojim druhom \* a porušuje zmluvu. Jeho slová sú hladšie ako maslo, ale v srdci strojí vojnu. \* Jeho reči sú jemnejšie než olej, ale sú to vytasené meče. Zlož svoju starosť na Pána a on ťa zachová; \* a nikdy nedopustí, aby bol spravodlivý zmietaný. Ty ich však, Bože, \* zhodíš do priepastí skazy. Krvilačníci a podvodníci nedožijú sa ani polovice svojich dní; \* ale ja dúfam v teba, Pane.
https://github.com/Mc-Zen/quill
https://raw.githubusercontent.com/Mc-Zen/quill/main/src/arrow.typ
typst
MIT License
#let draw-arrow(start, end, length: 5pt, width: 2.5pt, stroke: 1pt + black, arrow-color: black) = { place(line(start: start, end: end, stroke: stroke)) let dir = (end.at(0) - start.at(0), end.at(1) - start.at(1)) dir = dir.map(x => float(repr(x).slice(0,-2))) // let angle = calc.atan2(dir.at(0), dir.at(1)) let len = calc.sqrt(dir.map(x => x*x).sum()) dir = dir.map(x => x/len) let normal = (-dir.at(1), dir.at(0)) let arrow-start = end let arrow-end = (end.at(0) + length*dir.at(0), end.at(1) + length*dir.at(1)) let w = width/2 let v1 = (arrow-start.at(0) - w*normal.at(0), arrow-start.at(1) - w*normal.at(1)) let v2 = (arrow-start.at(0) + w*normal.at(0), arrow-start.at(1) + w*normal.at(1)) path(arrow-end, v1, v2, closed: true, fill: arrow-color) } #let test-arrow() = { draw-arrow((0pt, 0pt), (20pt, 10pt), stroke: .1pt) }
https://github.com/jamesrswift/frackable
https://raw.githubusercontent.com/jamesrswift/frackable/main/tests/generator/test.typ
typst
The Unlicense
#import "/src/lib.typ" as frackable: frackable, generator #set page( width: auto, height: auto, margin: 0.25cm, background: none ) #set text(font: "Calibri") #let my-frackable = generator( shift-numerator-x: -0.1em, shift-denominator-x: -0.1em, ) #my-frackable(1, 2) #my-frackable(1, 3) #my-frackable(3, 4, whole: 9) #my-frackable(9, 16) #my-frackable(31, 32) #my-frackable(0, "000")
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/002%20-%20Return%20to%20Ravnica/006_In%20Praise%20of%20the%20Worldsoul%2C%20Part%203.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "In Praise of the Worldsoul, Part 3", set_name: "Return to Ravnica", story_date: datetime(day: 10, month: 10, year: 2012), author: "<NAME>", doc ) Kuma smelled the blood before Ruzi saw the smoke. The wolf sprinted through the clutter of ruined buildings, rapidly closing the distance between them and the Selesnyan settlement. The wooden gate had been ripped from its hinges, and Ruzi urged Kuma through the shattered entrance, heedless of whatever threat might be inside. The two surprised Massacre Girl and her men as they searched the bodies for anything valuable. At the sight of a Rakdos bloodmark dripping down the wall, Ruzi yanked the knife from the sheath on his leg and gutted the first degenerate that leapt toward him. But before he could yank the blade out of the man’s throat, the cultists surrounded him, swinging spiked maces and bloody chains. Ruzi had dealt with Rakdos in the past. They were beyond compassion: Life was as unremarkable as air and killing as easy as breathing. Kuma’s growl reverberated off the high walls. Out of the corner of his eye, Ruzi glimpsed the bodies of his fellows Selesnyans near the desecrated guild-tree. Cecilee’s body would be among the dead, and that knowledge made Ruzi weak. Too weak to defend himself against this many enemies. #figure(image("006_In Praise of the Worldsoul, Part 3/02.jpg", width: 100%), caption: [Splatter Thug | Art by Kev Walker], supplement: none, numbering: none) Their skin-and-bones ringleader skulked outside the circle of her thugs, themselves covered in freakish spikes and scars. She was a lunatic who called herself <NAME>irl. He knew her reputation. He’d seen the aftermath of her crimes before. And he knew there was only one reason she would be here. "Who hired you?" Ruzi screamed. Massacre Girl motioned to one of her followers. An ogre armed with hooks-and-chains lurched forward. A dented metal mask partially covered the nearly eight-foot-tall ogre’s mutilated face. Snarling, Kuma circled away from him. Ruzi thanked the Worldsoul for the wolf’s steady legs, as his own were trembling. Ruzi’s emotions had betrayed him. Even if he could notch his bow in time, his shot wouldn’t be steady enough to hit the Rakdos. "Price paid. Don’t care." Massacre Girl squinted at him. "Do I know you, dogboy?" "These were innocents!" Ruzi snarled. "No one cares," she said. She began humming, and did a little dance step. Then, singing loudly—no one cares, no one cares—her taunts echoed across the bleak courtyard. Turning to leave, Massacre Girl reached into her patchwork jacket and pulled out a handful of colorful confetti. Tossing it up into the air, she did a twisted bow and sashayed for the gate. Following her cue, the rest of the cultists made for the gate. All except the ogre, who swung his hooked chains in a brutal arc. #figure(image("006_In Praise of the Worldsoul, Part 3/04.jpg", width: 100%), caption: [Hellhole Flailer | Art by <NAME>], supplement: none, numbering: none) Kuma tossed his head against the reins, but Ruzi held Kuma back just long enough to memorize the space between them and the ogre. Just long enough for his wolf’s instincts to claim that space for killing. And then they danced across the span, breezing between the whisper of the ogre’s chains. Expecting a frontal assault, the ogre charged at them mindlessly. Instantly, Ruzi spurred Kuma to the left, dodging a downward stroke of the razor-sharp hook. With a powerful burst of speed, the wolf leapt toward the wall. Ruzi pulled back, and Kuma sprang against the boards, twisting backwards to come around behind the ogre. The ogre roared in surprise as its chains fell, useless, to the ground. It spun clumsily to meet their attack, but the wolf’s teeth closed around its throat before the ogre could raise its meaty arms to defend itself. The ogre toppled to the ground, while Ruzi leapt off the wolf’s back with his sword drawn. Feeling murderous, Ruzi sliced off the ogre’s head while the it still lay blubbering on the ground. He avoided the sorrowful eyes of his wolf as he stalked around the courtyard, checking for anyone else who might have stayed behind. At that moment, Ruzi would have happily slaughtered anyone who had ever called themselves Rakdos. #figure(image("006_In Praise of the Worldsoul, Part 3/06.jpg", width: 100%), caption: [Rakdos Charm | Art by Zoltan Boros], supplement: none, numbering: none) Even when he was sure the courtyard was empty, Ruzi did not pause to search for his sister. He was afraid if he acknowledged the atrocity, he would fall to his knees and never find the strength to rise. So he took a shovel and began digging as if his own life depended on it. Indeed, he had to get it done before the scent of blood drew the beasts and savages. Life was about the work. Life is work. And without the work, there is nothing. Kuma curled up near Cecilee’s body, watching mournfully as Ruzi worked frantically for hours. Ruzi had first heard of Massacre Girl years earlier, when she killed one Azorius arrestor for coin and a second just for fun. She had become untouchable by threatening the lives and families of anyone who tried to stop her. Once, the father of one of her victims tried to kill her in vengeance. When he failed, she slaughtered the male line of the family and blinded the women. The Azorius would not lift a finger to arrest her for murders in their own guild. They certainly would do nothing for the murder of Selesnyan elves in an illegal homestead. To kill Massacre Girl, Ruzi would need the help of his fellow Wolf Riders. But Trostani would never permit a vengeance-killing done by her guild. If justice was to be done, Ruzi must break from Selesnya and find another way. Although he couldn’t bear to look at his sister—not even as he placed her body into the mass grave—he knew that destroying Massacre Girl must become his purpose in life. If he had to burn down the entire city to find her rathole, he would do it. Only when the last body was buried did Kuma come and rest his head against his master. Only then did Kuma insist that Ruzi take a moment to grieve. As Ruzi wrapped his arms around his wolf, he wished he could give himself over to the Worldsoul. He needed comfort, and his inner voice told him he would find it there. But he silenced the voice instantly. Little good it did Cecilee, he reminded himself. Little good it did for the dead. Kuma heard the sound first. His ears perked up and he whined. Ruzi was on his feet instantly, expecting an attack. But it was not the returning Rakdos. Or Gruul scouts, although he’d been expecting them. It was the sound of a crying infant, suddenly awake and very alone, sobbing for its mother. The cradle had been hidden under a table and behind some boxes in Cecilee’s cottage. The baby—his nephew—quieted when he gently picked up him. A Gruul baby. A baby they wanted back. He knew they would go to great lengths for the child, but not enough to hire the Rakdos to kill the entire community. Whoever hired Massacre Girl was someone from the city proper, someone who had coin to waste on murder. Looking down at the sweet face of the infant, now drowsing against his shoulder, he knew how to make someone else care about killing Massacre Girl. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Ruzi found the Gruul encampment a few miles south in the heart of the Rubblebelt. But their leader, Nikya of the Old Ways, would not allow Ruzi beyond the entrance. Flanked by a dozen of her warriors, the Gruul leader indicated that they should sit together on the ground, a welcome sign she was willing to listen to what Ruzi had to say. Nikya was the leader of the Zhur-Taa clan, one of the Gruul tribes who worshiped the ancient gods of old Ravnica. Ruzi could not begin to guess her age. She had the well-muscled physique of a youthful fighter but the battle scars of a veteran. Age-lines branched from the corner of her eyes, which seemed wiser than many of the elder dryads of Vitu-Ghazi. The walls of her encampment were teetering piles of bones, each considered an offering to the gods of the deep earth, who they believed were suffocating under the weight of the city. #figure(image("006_In Praise of the Worldsoul, Part 3/08.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none) "My sister should not have taken your infant-cousin," Ruzi said. "It was wrong. But she did it out of compassion and innocence." "Innocence is not an excuse for ignorance," Nikya said. "We do not shield our children from the hardness of life." "My sister is dead, murdered in her home. Her blood was used to make the Rakdos mark. Let that satisfy your bloodthirst for her grave error." "Your sister wasn’t marked for death," Nikya said. "Blood is for blood. Killing is for killing." "They killed your infant!" Ruzi said. "They dashed his head against the stones. I buried his body myself." "Who did this," Nikya asked. "Did you see them with your own eyes?" "Rakdos," Ruzi said. "All Rakdos are responsible for the crime. But it was carried about by a ringleader who calls herself <NAME>. She is a killer of children in exchange for coin." "My scouts have returned from the compound," Nikya said. "We have seen the bloodwriting on the wall. What you say is true. By my eyes, everyone loyal to the demon is guilty of a bloodcrime against the Gruul. They will be slaughtered in the streets where they live." After Ruzi left the camp, he walked for miles through the darkness of the wasteland. Without his wolf, he found travelling tediously slow. He felt like a child, tripping over roots in the dark. Ruzi doubled back on himself several times to make sure he wasn’t followed by the Gruul. #figure(image("006_In Praise of the Worldsoul, Part 3/10.jpg", width: 100%), caption: [Art by <NAME>legos], supplement: none, numbering: none) Finally, he reached the city’s edge and scaled up the wall of a familiar building. At the top, under a sheltered rooftop, his wolf waited for him. Kuma’s paw was curled protectively around the baby Zi, who clutched tightly to Kuma’s soft fur. Ruzi took his nephew in his arms and settled against his wolf for the night. "Tomorrow I’ll show you more of this great city," he whispered to Zi. "And then we’ll tear it down." Rakdos against Selesnya. Gruul against Rakdos. Ruzi against them all. #figure(image("006_In Praise of the Worldsoul, Part 3/12.jpg", width: 100%), caption: [], supplement: none, numbering: none)
https://github.com/LDemetrios/Typst4k
https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/org/ldemetrios/typst4k/test.typ
typst
#let reify(..args) = args #metadata( ( nones: none, autos: auto, bools: true, ints: 10, floats: 2.71828, lengths: 1pt + 2em, angles: 1rad, ratios: 50%, relatives: 1pt + 2em + 50%, fractions: 1fr, colors: ( luma(50), oklab(50%, 50%, 50%), oklch(50%, 50%, 5deg), rgb(50, 50, 50, 50), color.linear-rgb(50, 50, 50, 50), cmyk(50%, 50%, 50%, 50%), color.hsl(50deg, 50, 50, 50), color.hsv(50deg, 50, 50, 50), ), gradients: ( gradient.linear(yellow, blue), gradient.radial(yellow, blue, focal-center: (10%, 40%), focal-radius: 5%), gradient.conic(yellow, blue, center: (20%, 30%)), ), patterns: pattern(size: (30pt, 30pt))[ #place(line(start: (0%, 0%), end: (100%, 100%))) #place(line(start: (0%, 100%), end: (100%, 0%))) ], symbols: math.arrow.l, versions: version(1, (2, 3)), strs: "abc", byte-arrs: (bytes((123, 160, 22, 0)), bytes("Hello 😃"),), labels: <lbl>, datetimes: datetime(year: 2020, month: 10, day: 4), durations: datetime.today() - datetime(year: 2020, month: 10, day: 4), contents: ([*Hi* there], [ #place(line(start: (0%, 0%), end: (100%, 100%))) #place(line(start: (0%, 100%), end: (100%, 0%))) ]), arrays: (1, "hi", 12cm), dicts: (a: 1, b: "hi"), funcs: (it) => it, arguments: reify(1, b: 2), types: (int, str, dictionary), modules: sys, aligns: (top, left, center + horizon,), dirs: ltr, counters: counter(heading), selectors: heading.where(level: 1).or(heading.where(level: 2)), regexes: regex("[a-z]+"), states: state("a" , 0), strokes: 2pt + red ), ) <full> = aaa <a> == bbb === ccc <c> ==== ddd <d> #[ aaa <bbb> ] <ccc> #metadata( ( a : 1, b : "aaaa", ) ) <sample> #metadata(heading.where(level:1)) <selector> #[ - a - b ] <list> #type(1pt + blue) #stroke() #metadata( (1, "2") )<s> #metadata( ((1, "2") , (3, "2")) )<sss> $a/b^c$ <eq>
https://github.com/HPDell/typst-mathshortcuts
https://raw.githubusercontent.com/HPDell/typst-mathshortcuts/main/manual.typ
typst
#import "lib.typ": * #import "@preview/tablex:0.0.5": tablex, rowspanx, colspanx, hlinex, vlinex #import "@preview/tidy:0.1.0" #set page(margin: (x: 0.5in, y: 0.5in)) #set document(title: "Package mathshortcuts", author: "<NAME>") #show heading: body => block(above: 1em, below: 1em, body) #set heading(numbering: "1.") #align(center)[ #text(size: 1.5em)[Package *mathshortcuts*] #text(style: "italic")[Aegon Huke] ] #outline(indent: auto) = Symbols #columns(2)[ == Bold Letters #align(center)[ #tablex( columns: 8, align: center, auto-vlines: false, auto-hlines: false, header-rows: 1, hlinex(), colspanx(4)[*Alphabets*], vlinex(), colspanx(4)[*Greek*], hlinex(), [`va`], [$va$], [`vA`], [$vA$], [`valpha`], [$valpha$], [], [], [`vb`], [$vb$], [`vB`], [$vB$], [`vbeta`], [$vbeta$], [], [], [`vc`], [$vc$], [`vC`], [$vC$], [`vchi`], [$vchi$], [], [], [`vd`], [$vd$], [`vD`], [$vD$], [`vdelta`], [$vdelta$], [`vDelta`], [$vDelta$], [`ve`], [$ve$], [`vE`], [$vE$], [`vepsilon`], [$vepsilon$], [], [], [`vf`], [$vf$], [`vF`], [$vF$], [`veta`], [$veta$], [], [], [`vg`], [$vg$], [`vG`], [$vG$], [`vgamma`], [$vgamma$], [`vGamma`], [$vGamma$], [`vh`], [$vh$], [`vH`], [$vH$], [`vtheta`], [$vtheta$], [`vTheta`], [$vTheta$], [`vi`], [$vi$], [`vI`], [$vI$], [`viota`], [$viota$], [], [], [`vj`], [$vj$], [`vJ`], [$vJ$], [], [], [], [], [`vk`], [$vk$], [`vK`], [$vK$], [`vkappa`], [$vkappa$], [], [], [`vl`], [$vl$], [`vL`], [$vL$], [`vlambda`], [$vlambda$], [`vLambda`], [$vLambda$], [`vm`], [$vm$], [`vM`], [$vM$], [`vmu`], [$vmu$], [], [], [`vn`], [$vn$], [`vN`], [$vN$], [`vphi`], [$vphi$], [`vPhi`], [$vPhi$], [`vo`], [$vo$], [`vO`], [$vO$], [`vomega`], [$vomega$], [`vOmega`], [$vOmega$], [`vp`], [$vp$], [`vP`], [$vP$], [`vpi`], [$vpi$], [`vPi`], [$vPi$], [`vq`], [$vq$], [`vQ`], [$vQ$], [`vpsi`], [$vpsi$], [`vPsi`], [$vPsi$], [`vr`], [$vr$], [`vR`], [$vR$], [`vrho`], [$vrho$], [], [], [`vs`], [$vs$], [`vS`], [$vS$], [`vsigma`], [$vsigma$], [`vSigma`], [$vSigma$], [`vt`], [$vt$], [`vT`], [$vT$], [`vtau`], [$vtau$], [], [], [`vu`], [$vu$], [`vU`], [$vU$], [`vupsilon`], [$vupsilon$], [`vUpsilon`], [$vUpsilon$], [`vv`], [$vv$], [`vV`], [$vV$], [], [], [], [], [`vw`], [$vw$], [`vW`], [$vW$], [], [], [], [], [`vx`], [$vx$], [`vX`], [$vX$], [`vxi`], [$vxi$], [`vXi`], [$vXi$], [`vy`], [$vy$], [`vY`], [$vY$], [], [], [], [], [`vz`], [$vz$], [`vZ`], [$vZ$], [`vzeta`], [$vzeta$], [], [], hlinex() ) ] == Special Matrices #align(center)[ #tablex( columns: 4, align: center, header-rows: 1, auto-vlines: false, [*Code*], [*Out*], vlinex(), [*Code*], [*Out*], [`vzero`], [$vzero$], [`vones`], [$vones$] ) ] == Vector/Matrix Marks #align(center)[ #tablex( columns: 3, align: (left, center, center), header-rows: 1, auto-vlines: false, [*Symbol*], colspanx(2)[*Example*], [Transport], [`vA^mT`], [$vA^mT$], [Inverse], [`vA^mI`], [$vA^mI$], [Generalized Inverse], [`vA^mIG`], [$vA^mIG$], ) ] == Operators #align(center)[ #tablex( columns: 3, align: (left, center, center), header-rows: 1, auto-vlines: false, [*Symbol*], colspanx(2)[*Example*], [Variance], [`var(vA)`], [$var(vA)$], [Co-variance], [`cov(vA)`], [$cov(vA)$], ) ] ] = Functions #{ import "lib.typ" let module = tidy.parse-module(read("lib.typ"), scope: (msc: lib)) tidy.show-module(module, style: tidy.styles.minimal) }
https://github.com/gumelarme/nuist-master-thesis-proposal
https://raw.githubusercontent.com/gumelarme/nuist-master-thesis-proposal/main/strings/en.typ
typst
#let cover-title = [Postgraduate Degree Thesis Proposal \ and Degree Thesis Work Implementation Plan] #let notes-title = [Notes] #let notes-content = [ + Following the thesis proposal report to the school postgraduate affiliated by the postgraduate student, the applicant should follow given opinions and fill out this form; + _Degree Thesis Work Implementation Plan_ should be filled in by the postgraduate under the guidance of the supervisor; + Doctoral students with study duration of three years and master’s students with study duration of two years should finish before the end of the second semester, and master’s students with study duration of three years should finish before the end of the third semester; + This form shall be completed in duplicate, submitted to the Graduate School for review and stamp, and retained and archived by the School where the degree is affiliated. (Have the copies archived under the student degree status files and student enrollment status files respectively.) + Degree Type: Academic Doctoral Degree, Professional Master’s Degree, Academic Master’s Degree ] #let student-number = "Student Number" #let degree = "Graduate Degree" #let school-name = "Nanjing University of Informations and Technology" #let cover-entries = ( "School Affiliated": (lorem(1), lorem(3)), "Major": "人工智能", "Student Name": "", "Degree Type": "", "Suprevisor Name": "", "Proposal Date": "", "Enrollment Date": "", ) #let section-1 = "Thesis Proposal report" #let title-sources =( [04 National Social Science Planning/Fund Program], [05 Humanities/Social Science Research Program of Ministry of Education], [06 National Natural Science Foundation of China (NSFC)], [09 Program Funded by the Provincial Government (Autonomous Region/Municipality directly under the Central Government)], [14 Program Entrusted by Enterprises and Institiutions], [16 Self-selected Program of School], [99 Others], ) #let th-thesis-title = "Thesis Title" #let th-research-dir = [Research \ Direction] #let th-title-source = "Title Source" #let th-title-type = "Title Type" #let th-proposal-content = "Proposal Contents" #let th-notes = "Notes" #let tt-engineering = "Engineering Technology" #let tt-applied = "Applied Technology" #let tt-theoritical = "Theoritical Research" #let tt-interdis = "Insterdisciplinary Research" #let tt-other = "Others"
https://github.com/TypstApp-team/typst
https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/compiler/spread.typ
typst
Apache License 2.0
// Test argument sinks and spreading. // Ref: false --- // Test standard argument overriding. #{ let f(style: "normal", weight: "regular") = { "(style: " + style + ", weight: " + weight + ")" } let myf(..args) = f(weight: "bold", ..args) test(myf(), "(style: normal, weight: bold)") test(myf(weight: "black"), "(style: normal, weight: black)") test(myf(style: "italic"), "(style: italic, weight: bold)") } --- // Test multiple calls. #{ let f(b, c: "!") = b + c let g(a, ..sink) = a + f(..sink) test(g("a", "b", c: "c"), "abc") } --- // Test doing things with arguments. #{ let save(..args) = { test(type(args), arguments) test(repr(args), "(three: true, 1, 2)") } save(1, 2, three: true) } --- // Test spreading array and dictionary. #{ let more = (3, -3, 6, 10) test(calc.min(1, 2, ..more), -3) test(calc.max(..more, 9), 10) test(calc.max(..more, 11), 11) } #{ let more = (c: 3, d: 4) let tostr(..args) = repr(args) test(tostr(a: 1, ..more, b: 2), "(a: 1, c: 3, d: 4, b: 2)") } --- // None is spreadable. #let f() = none #f(..none) #f(..if false {}) #f(..for x in () []) --- // unnamed spread #let f(.., a) = a #test(f(1, 2, 3), 3) --- // Error: 13-19 cannot spread string #calc.min(.."nope") --- // Error: 10-14 expected identifier, found boolean #let f(..true) = none --- // Error: 13-16 only one argument sink is allowed #let f(..a, ..b) = none --- // Test spreading into array and dictionary. #{ let l = (1, 2, 3) let r = (5, 6, 7) test((..l, 4, ..r), range(1, 8)) test((..none), ()) } #{ let x = (a: 1) let y = (b: 2) let z = (a: 3) test((:..x, ..y, ..z), (a: 3, b: 2)) test((..(a: 1), b: 2), (a: 1, b: 2)) } --- // Error: 11-17 cannot spread dictionary into array #(1, 2, ..(a: 1)) --- // Error: 5-11 cannot spread array into dictionary #(..(1, 2), a: 1) --- // Spread at beginning. #{ let f(..a, b) = (a, b) test(repr(f(1)), "((), 1)") test(repr(f(1, 2, 3)), "((1, 2), 3)") test(repr(f(1, 2, 3, 4, 5)), "((1, 2, 3, 4), 5)") } --- // Spread in the middle. #{ let f(a, ..b, c) = (a, b, c) test(repr(f(1, 2)), "(1, (), 2)") test(repr(f(1, 2, 3, 4, 5)), "(1, (2, 3, 4), 5)") } --- #{ let f(..a, b, c, d) = none // Error: 4-10 missing argument: d f(1, 2) }
https://github.com/actsasflinn/typst-rb
https://raw.githubusercontent.com/actsasflinn/typst-rb/main/test/test.typ
typst
Apache License 2.0
#set text(12pt, font: "Fasthand") #emph[Hello] \ #emoji.face #"hello".len() #lorem(20) #lorem(50)
https://github.com/jakobjpeters/Typstry.jl
https://raw.githubusercontent.com/jakobjpeters/Typstry.jl/main/HEADER.md
markdown
MIT License
<div align="center"> <p><img height="200px" src="docs/source/assets/logo.svg"/></p> # Typstry.jl [![Documentation stable](https://img.shields.io/badge/Documentation-stable-blue.svg)](https://jakobjpeters.github.io/Typstry.jl/) [![Documentation development](https://img.shields.io/badge/Documentation-development-blue.svg)](https://jakobjpeters.github.io/Typstry.jl/development/) [![Continuous Integration](https://github.com/jakobjpeters/Typstry.jl/workflows/Continuous%20Integration/badge.svg)](https://github.com/jakobjpeters/Typstry.jl/actions/workflows/continuous_integration.yml) [![Documentation](https://github.com/jakobjpeters/Typstry.jl/workflows/Documentation/badge.svg)](https://github.com/jakobjpeters/Typstry.jl/actions/workflows/documentation.yml) [![Codecov](https://codecov.io/gh/jakobjpeters/Typstry.jl/branch/main/graph/badge.svg?token=X<KEY>)](https://codecov.io/gh/jakobjpeters/Typstry.jl) [![Dependents](https://juliahub.com/docs/General/Typstry/stable/deps.svg)](https://juliahub.com/ui/Packages/General/Typstry?t=2) </div>
https://github.com/bennyhandball/PA1_LoB_Finance
https://raw.githubusercontent.com/bennyhandball/PA1_LoB_Finance/main/PA/supercharged-dhbw/2.1.0/appendix.typ
typst
#let appendix = { figure(image("../../assets/Business Process Automation.jpg", width: 80%), caption: [Bildgenerator Aktivierung (Eigene Darstellung)]) //Bilder im Anhang }
https://github.com/PmaFynn/cv
https://raw.githubusercontent.com/PmaFynn/cv/master/src/content/en/drive.typ
typst
The Unlicense
#import "../../template.typ": * #cvSection("My Motivation") #set par( justify: true, ) As an Information Systems student with a passion for technology and innovation, I am enthusiastic about applying my skills to complex challenges in a dynamic work environment. My multifaceted experience spanning web development, quality assurance, and hyperautomation positions me as a versatile candidate capable of adapting to various IT roles. //My goal is to contribute to projects that leverage cutting-edge technologies while further developing my expertise in software development and data science. I am eager to pivot my career in an unexpected direction, leveraging my adaptability and passion for learning to excel in a completely new /*technological*/ domain.
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/meta/bibliography-02.typ
typst
Other
// Test unconventional order. #set page(width: 200pt) #bibliography("/works.bib", title: [Works to be cited], style: "chicago-author-date") #line(length: 100%) #[#set cite(brackets: false) As described by @netwok], the net-work is a creature of its own. This is close to piratery! @arrgh And quark! @quark
https://github.com/swablab/documents
https://raw.githubusercontent.com/swablab/documents/main/templates/common.typ
typst
Creative Commons Zero v1.0 Universal
#let colors = ( primary: oklch(93.84%, 0.09, 183.69deg), secondary: oklch(73.51%, 0.168, 40.25deg), subtext: oklch(60%, 0, 0deg), highlight: oklch(90%, 0, 0deg), ) #let money(i) = { if i == 0 { return "0.00€" } let j = str(calc.round(i * 100)) if i < 1 { "0." + j.slice(-2) + "€" } else { j.slice(0,-2)+ "." + j.slice(-2) + "€" } } #let common(title: none, doc) = { set document( title: title, author: "<NAME>." ) set text( font: "Noto Sans", size: 11pt, lang: "de" ) set par( justify: true ) set page( paper: "a4", margin: (x: 2cm, y: 2cm), ) show link: underline doc }
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/cheda-seu-thesis/0.2.0/seu-thesis/pages/statement-bachelor-ic.typ
typst
Apache License 2.0
#import "../utils/fonts.typ": 字体, 字号 #page(paper: "a4", margin: (top: 2cm+0.5cm, bottom: 2cm+0.5cm, left: 2cm + 0.5cm, right: 2cm))[ #v(80pt-0.5cm) #set text(font: 字体.宋体, size: 字号.小四) #align(right, image("../assets/statement-bachelor.svg", width: 468pt)) // 小四字号 39em -> 468pt ]
https://github.com/noahjutz/AD
https://raw.githubusercontent.com/noahjutz/AD/main/notizen/komplexitaet/main.typ
typst
#import "/components/math.typ": hlp, hls #import "/components/timeline.typ": timeline = Komplexität == O-Notation Ein Landau-Symbol $M in {O, o, Omega, omega, Theta}$ ist eine Menge, welche aus Funktionen besteht. Diese Menge ist in Abhängigkeit einer Funktion $f$ definiert, welche alle $g in M$ nach oben oder unten beschränkt. #table(columns: (auto, 1fr, auto), $O$, $g(n) <= c dot f(n)$, table.cell(rowspan: 2)[Obere\ Schranke], $o$, $g(n) < c dot f(n)$, $Omega$, $g(n) >= c dot f(n)$, table.cell(rowspan: 2)[Untere\ Schranke], $omega$, $g(n) > c dot f(n)$, $Theta$, $c_1 dot f(n) <= g(n) <= c_2 dot f(n)$, "Beides" ) Die Schranke muss erst ab einem beliebigen $n_0 in NN$ gelten, und sie darf um einen Konstanten Faktor $c > 0$ von $f$ abweichen. #grid( columns: 2, include "start_value.typ", include "factor.typ" ) === Grenzwertdefinition $ lim_(n -> infinity) g(n)/f(n) = cases( infinity <=> cases( f(n) in O(g(n)), g(n) in Omega(f(n)) ), c <=> cases( g(n) in Theta(f(n)), f(n) in Theta(g(n)) ), 0 <=> cases( f(n) in Omega(g(n)), g(n) in O(f(n)) ) ) $ === Mengendefinition $ O(hls(f(n))) = {#h(2pt) hlp(g(n)) mid(|) #box(baseline: 50%)[$ exists n_0 in NN, c > 0 : \ forall n >= n_0 : g(n) <= c dot f(n) $]#h(2pt)} $ $ Omega(f(n)) = {#h(2pt)g(n) mid(|) #box(baseline: 50%)[$ exists n_0 in NN, c > 0 : \ forall n >= n_0 : g(n) >= c dot f(n) $]#h(2pt)} $ $ Theta(f(n)) = {#h(2pt)g(n) mid(|) #box(baseline: 50%)[$ exists n_0 in NN, c > 0 : \ forall n >= n_0 : g(n) = c dot f(n) $]#h(2pt)} $ === Rechenregeln - $ f in Theta(f) $ - $ g in Theta(f) \ => c dot g in Theta(f) $ - $ g_1 in Theta(f_1), g_2 in Theta(f_2) \ => g_1+g_2 in O(max(f_1, f_2)) \ => g_1+g_2 in Omega(min(f_1, f_2)) \ => g_1+g_2 in Theta(f_1 + f_2) \ => g_1 dot g_2 in Theta(f_1 dot f_2) $ == Komplexitätsklassen #timeline[ - $Theta(1)$ Diese Laufzeitfunktionen konvergieren gegen einen konstanten Wert. Es gibt keine geringere Komplexität als $Theta(1)$. - $Theta(log n)$ Ein Logarithmus zur Basis $b_1$ kann mit einem konstanten Faktor die Basis $b_2$ verwenden. $ log_b_1 n = underbrace(log_b_1 b_2, "konstant") dot log_b_2 n $ ] == WC, BC, AC Ein Algorithmus hat bei unterschiedlichen Eingaben $Sigma^n$ der gleichen Länge $n$ ggf. unterschiedliche Laufzeiten. ==== Beispiel Sei $A = #raw("inc_bin")$. Desto mehr 1en am Ende hängen, desto länger muss der Carry weitergereicht werden. $ T_A (#raw("0000")) < T_A (#raw("0111")) $ === Worst-Case und Best-Case Die Menge aller Laufzeitfunktionen bei einer Eingabelänge $n$ sei $ Phi(n) := {T(x) | x in Sigma^n} $ Die Worst- und Best-Case Laufzeiten sind jeweils: #grid(columns: (1fr,) * 2, $ T^"WC" (n) &= max(Phi(n)) \ &= max_(x in Sigma^n) {T(x)} $, $ T^"BC" (n) &= min(Phi(n)) \ &= min_(x in Sigma^n) {T(x)} $ ) Die Funktionen in $Phi$ sind nach Wachstumsrate geordnet. Es gilt $g <= f$, falls $f$ dominiert: $ lim_(n -> infinity) g(n)/f(n) <= c $ Die größte Funktion $T^"WC"$ beschränkt alle $T in Phi$ nach oben, die kleinste Funktion $T^"BC"$ nach unten. #grid( columns: (1fr,) * 2, $ T(n) = O(T^"WC" (n)) $, $ T(n) = Omega(T^"BC" (n)) $ ) === Average-Case Die Average-Case-Laufzeit ist das arithmetische Mittel über alle Laufzeiten. $ T^"AC" (n) = 1/(|Sigma^n|) sum_(x in Sigma^n) T(x) $ Beispiel: @ex-average-case == Rekursionsgleichungen Die Komplexität rekursiver Algorithmen wird durch eine Rekursionsgleichung beschrieben. === Aufstellen der Rekursionsgleichung Eine rekursive Funktion hat mindestens eine Abbruchbedingung, welche bei einer trivialen Eingabelänge $n$ eintritt. Die Laufzeiten der Base-Cases sind die _Initialwerte_ der Rekursionsgleichung. $ T(0) = ..., #h(12pt) T(1) = ..., #h(12pt) T(2) = ..., #h(12pt) ... $ Für alle komplexeren Eingaben $n$ gibt es mindestens einen Selbstaufruf. Dieser Selbstaufruf löst ein einfacheres Subproblem, hat also eine geringere Eingabelänge. Beispiel: $ T(n) = 5 T(n-1) + T(sqrt(n)) + n^2 $ === Charakteristisches Polynom Lineare Rekursionsgleichungen können als exponentielle Funktion dargestellt werden. $ T(n) = sum_(i=1)^k a_i dot T(n-i) ==> T(n) = r^n $ Um die Basis $r$ herauszufinden, lösen wir das charakteristische Polynom. $ r^n = sum_(i=0)^k a_i dot r^(n-i) $ === Substitutionsmethode Komplexität abschätzen und mittels vollständiger Induktion beweisen. === Iterationsmethode Schrittweise die Formel in Selbstaufrufe einsetzen und ein Muster erkennen. === Master-Theorem Viele Divide & Conquer Algorithmen zerlegen die Eingabe in $b$ Teile, und erzeugen $a$ Subprobleme, welche diese Teile verarbeiten. Die Ergebnisse der Subprobleme werden anschließend kombiniert. Die Laufzeit der Zerlegung und Kombination in jedem Rekursionsschritt ist $f(n)$. $ T(n) = a T(n/b) + f(n) $ Der Einfachheit halber gehen wir von einem Base-Case $T(1) = Theta(1)$ aus. Desto größer $a$ ist, desto breiter wird der Rekursionsbaum, und desto kleiner $b$ ist, desto tiefer wird die Rekursion. Der Rekursionsbaum sieht bei $a=2$ so aus: #include "master_tree.typ" Die Gesamtlaufzeit setzt sich aus den _rekursiven Schritten_ und den _Base Cases_ zusammen. $ T(n) = underbrace( sum_(k=0)^(log_b n-1) a^k dot f(n/b^k), =: T_R ) + underbrace( a^(log_b n) dot Theta(1), =: T_B ) $ Ausschlaggebend für die asymptotische Laufzeit ist, ob $T_R$ oder $T_B$ dominiert. #grid(columns: (1fr, ) * 2, $ T_R (n) <= a^(log_b n) dot f(n) \ T_R (n) >= f(n) $ ) $ a^(log_b n) = n^(log_b a) $
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/bibliography_03.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // // // Test ambiguous reference. // = Introduction <arrgh> // // // Error: 1-7 label occurs in the document and its bibliography // @arrgh // #bibliography("/assets/files/works.bib")
https://github.com/jassielof/typst-templates
https://raw.githubusercontent.com/jassielof/typst-templates/main/upsa-bo/estudio-de-factibilidad/template/capítulos/3.diagnóstico interno de la empresa.typ
typst
MIT License
= Diagnóstico Interno de la Empresa == Estrategias Básicas == Cadena de Valor == Recursos de la Empresa == Análisis de los Estados Financieros == Fortalezas y Debilidades
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/grayness/0.1.0/lib.typ
typst
Apache License 2.0
/* Copyright 2024 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #let plg = plugin("grayness.wasm") ///Create a grayscale-image representation of the provided imagedata /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #grayscale-image(data) /// ``` /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #grayscale-image(data, width: 50%, height: 80%) /// ``` /// -> content #let grayscale-image(imagebytes, ..args) = { image.decode(plg.grayscale(imagebytes), ..args) } ///Crop the given imagedata to the specified width and height /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #crop(data, 0, 0, 150, 200) /// ``` /// - start-x (int, str): left starting coordinate (in pixels) of the crop window /// - start-y (int, str): top starting coordinate (in pixels) of the crop window /// - crop-width (int, str): horizontal size (in pixels) of the crop window /// - crop-height (int, str): vertical size (in pixels) of the crop window /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #crop-image(data, 0, 70, 120, 250, width: 50%, height: 80%) /// ``` /// -> content #let crop-image(imagebytes, crop-width, crop-height, start-x: 0, start-y: 0, ..args) = { image.decode( plg.crop(imagebytes, bytes(str(start-x)), bytes(str(start-y)), bytes(str(crop-width)), bytes(str(crop-height))), ..args, ) } ///Flip the provided imagedata horizontally /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #flip-image-horizontal(data) /// ``` /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #flip-image-horizontal(data, width: 50%, height: 80%) /// ``` /// -> content #let flip-image-horizontal(imagebytes, ..args) = { image.decode(plg.fliph(imagebytes), ..args) } ///Flip the provided imagedata vertically /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #flip-image-vertical(data) /// ``` /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #flip-image-vertical(data, width: 50%, height: 80%) /// ``` /// -> content #let flip-image-vertical(imagebytes, ..args) = { image.decode(plg.flipv(imagebytes), ..args) } ///performs a Gaussian blur on the imagedata. /// ///Warning: This operation is *SLOW* /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #blur-image(data) /// ``` /// - sigma (int, str): a measure of how much to blur by (standard deviation) /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #blur-image(data, 5) /// ``` /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #blur-image(data, 7, width: 50%, height: 80%) /// ``` /// -> content #let blur-image(imagebytes, sigma: 5, ..args) = { image.decode(plg.blur(imagebytes, bytes(str(sigma))), ..args) } ///Displays an image from bytes in formats not natively supported by typst /// ///Supported formats are: /// /// - Bmp /// - Dds /// - Farbfeld /// - Gif /// - Hdr /// - Ico /// - Jpeg /// - OpenExr /// - Png /// - Pnm /// - Qoi /// - Tga /// - Tiff /// - WebP /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #show-image(data) /// ``` /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #show-image(data, width: 50%, height: 80%) /// ``` /// -> content #let show-image(imagebytes, ..args) = { image.decode(plg.convert(imagebytes), ..args) } ///Adds transparency to the provided image data /// /// /// - imagebytes (bytes): Raw imagedata provided by the read function /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #transparent-image(data) /// ``` /// - alpha (ratio): remaining amount of visibility /// /// 0% = fully transparent, 100% = fully opaque /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #transparent-image(data, 70%) /// ``` /// - ..args (any): Arguments to pass to typst image function /// i.e. width, height, alt and fit /// /// _Example:_ /// ```typst /// #let data = read("file.webp", encoding:none) /// #transparent-image(data, width: 50%, height: 80%) /// ``` /// -> content #let transparent-image(imagebytes, alpha: 50%, ..args) = { let ratio = bytes(str(int(float(alpha) * 255))) image.decode(plg.transparency(imagebytes, ratio), ..args) }
https://github.com/mattyoung101/uqthesis_eecs_hons
https://raw.githubusercontent.com/mattyoung101/uqthesis_eecs_hons/master/pages/contents.typ
typst
ISC License
#import "../util/macros.typ": * //#import "@preview/acrotastic:0.1.0": * = Contents #[ // https://typst.app/docs/reference/model/outline/#definitions-entry #show outline.entry.where( level: 1 ): it => { v(12pt, weak: true) strong(it) } #outline( // https://www.reddit.com/r/typst/comments/1bp8zty/how_to_make_dots_in_outline_spaced_the_same_for/ fill: box(width: 1fr, repeat(h(5pt) + "." + h(5pt))) + h(8pt), indent: auto, title: none ) ] #pagebreak() = List of Figures #outline( title: none, fill: box(width: 1fr, repeat(h(5pt) + "." + h(5pt))) + h(8pt), target: figure, ) #pagebreak() = List of Tables // TODO #pagebreak() = List of Abbreviations and Symbols #let acronyms = yaml("../acronyms.yaml") #table( columns: (0.5fr, 1fr), inset: 10pt, align: horizon, table.header( [*Abbreviation*], [*Meaning*], ), ..for pair in acronyms.acronyms { let key = pair.keys().at(0); let value = pair.values().at(0); (key, value) } )
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/050%20-%20Phyrexia%3A%20All%20Will%20Be%20One/009_A%20Man%20of%20Parts.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "A Man of Parts", set_name: "Phyrexia: All Will Be One", story_date: datetime(day: 17, month: 01, year: 2023), author: "<NAME>", doc ) Unless ordered to do otherwise, all denizens of the Fair Basilica moved in predefined paths according to their station. Aspirants circulated among the vertebral towers like blood coursing through arteries, each step an invitation for the apothegms of the Argent Etchings—Elesh Norn's word made metal and flesh—to seize them with spasms of convulsive delirium. High above, angels on mute pilgrimages between mist-bound aeries soared on wings of patchwork cartilage. From their vantage point, the constant motion of the aspirants was not the assemblage of thousands, but the handiwork of a great mover, the crafting of a single divine sigil umbilically writhing into existence. Back down upon the grounds of Elesh Norn's cathedral, chancellors swaddled in oil-soaked pinions and skitterlings possessed by ecstatic frenzy filed in and out of the Grand Annex like lathering maggots proclaiming the wisdom of their beloved Mother of Machines. Exempt from these endless cycles were those chosen from the armored legions of the Alabaster Host to guard the avenues into and out of the cathedral proper. Their role, unlike all others in the Fair Basilica, was to stand perfectly, inhumanly still, for they were the unblinking gaze of the Mother herself. Woe be to the legionnaire who shirked this distinction to so much as wipe away a blemish on its armor. So it was no surprise to Tezzeret when the twin centurions standing watch over the front gate didn't flinch when the Planar Bridge fractured, then tore open the hallowed space in front of them. He was once again on the accursed plane of New Phyrexia, the charred endoskeleton of Rona in his arms. #figure(image("009_A Man of Parts/01.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) "I must see Mother," he barked to the guards, the energies from the Planar Bridge eating away his flesh like a murder of ravenous carrion birds. Neither moved nor acknowledged his presence. "Is she here or in the core?" Still no response. "Answer me, damn you!" "Bring him to us," a voice boomed out. Her voice. "Send the other to Jin-Gitaxias for reconditioning." At that, the guards stepped aside, one taking Rona's remains away, and the other accompanying him on the long march through the internal courtyard. A steady hum filled the area, as did the stink of the sickly sweet, slightly acrid incense burning in the central brazier. There was a fervor that Tezzeret hadn't observed before, the thrill-engorged moments before a ritual sacrifice. Tezzeret's journey ended inside a chamber held up by struts of bone-like porcelain flaring out from the walls, a set of ribs meeting in the center to form a dais of high steps leading up to the throne of Elesh Norn. A pair of gargantuan animarchs stopped their toiling at the back of the cavern to glare at Tezzeret's approach through the intercostal spaces. "Honored Mother," he said, kneeling. "We did not call for you," said <NAME>, her voice so loud it felt like it was bursting out of his head. "Why have you abandoned Dominaria?" "Our forces were overwhelmed," Tezzeret began. "Not possible. Our breadth is all-encompassing." "So true, Mother. But~ there was treachery. Rona, the one I arrived with—" "One of Sheoldred's minions," said <NAME>. There was judgment in her voice as she rose from her seat and began to descend the steps. "Sheoldred, who is an apostate in our eyes! Her forces have moved against us in a reckless grasp at power. The flouting of our mercy despite the thanes' past transgressions~ Such sacrilege pains us." Tezzeret almost stumbled backward. Sheoldred? After the events on Dominaria, Tezzeret had been convinced that Sheoldred had been brought to heel—a wild, headstrong pet, but a pet nonetheless. He'd already planned to blame Rona for his failures. Sheoldred's betrayal was a delicious detail to add credibility to his cover story. "Rona played her part in Sheoldred's plan perfectly, fooling even me. We were routed when our own troops turned on us." "And the Planeswalkers?" <NAME> asked. "Escaped." "You did not follow?" Elesh Norn's shadow towered over him. Reflexively, his shoulders retreated inward, causing sharp jolts of pain from the Planar Bridge to spike, making him feel lightheaded. "I would have, Mother," he said through gritted teeth. "But I needed to warn you of the snake in our midst. I was~ concerned." Norn was close enough now to lean forward, her arm extended, and tip Tezzeret's chin up with her finger. "You love us, don't you?" One well-placed thrust of his sharpened arm could impale her head or take it right off. Would the sweetness of that action be worth the hell he'd face afterward? Death? If he was lucky. Torture? Still, preferable to what he suspected would truly unfold—the stretching and warping of his body and mind, the victory of the oil over his own tenacious spirit, the end of him and the beginning of his everlasting servitude. Like Tamiyo. Like Goldmane. Tezzeret closed his eyes and willed his heart to slow, concentrated on the sound of his breathing. "What child does not love his mother?" he said, looking back up. "Tell us then #emph[child] . Tell us of the enemy." "We encountered the Planeswalkers' new leader. She struck Rona with her terrifying weapon." Tezzeret watched Elesh Norn's ire fade, replaced with apprehension. "The leader's name is <NAME>." Tezzeret let the name linger. In other circumstances, witnessing the Mother of Machines genuinely fearful would have been a rare treat to savor. But the Planar Bridge was sapping away any pleasure he would have felt. "The weapon—" "A blade of gleaming white," said Tezzeret. "Like a shard of a star. We had no answer, just like we will have no answer when she arrives on New Phyrexia. You must agree that this is now an inevitability." "We will be ready," Norn growled. "None of us is ready. However, she has given up the advantage of surprise. We must take the opportunity—" Another wave of pain swept over Tezzeret, forcing him back onto his knees in faux-penitence. "The boon that was promised to me," he said, clutching his chest. "With a body of darksteel, I can be your invincible shield. Believe in me as I believe in you, Mother, and together, even the enemy's mighty general cannot conquer us." Tezzeret's vision dimmed. He'd gone too long without his treatments in Kuldotha, and now he was wavering on the knife edge between life and death, dependent upon the mercy—and the gullibility—of the one being he hated most in the Multiverse. How fitting that he'd found himself again in this situation. How infuriating, as well. He fell onto the floor, onto his back, unable to focus past the invisible electric fire overtaking his body. "You've carried such a burden for us," said <NAME>, caressing Tezzeret's cheek with her claw. "It is time to reward your faith. A promise is a promise." Elesh Norn's sickeningly haughty smile was the last thing he saw before he lost consciousness. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) The air was cold and wet and smelled of oil. Tezzeret's eyes shot open. Tentacle-like cables were coiled around his legs and arms, locking him into place. Looming over his head was an iridescent orb, pincers of hardened quicksilver jutting out from its sides like the legs of a mechanical spider. #figure(image("009_A Man of Parts/02.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) "Stabilization procedures have been successful. Subject is regaining consciousness." #emph[Jin-Gitaxias.] Tezzeret strained to take in as much of his surroundings as he could. He recognized the minutia of Jin-Gitaxias's dimly lit laboratory, a panoply of stasis tanks preserving slices of the plane's history. A metallic suit routinely worn by Neurok agents. A fist-sized, five-sided prism, dim yellow light oozing from its center like a darkened sun. The remains of a small black cube floating in suspension, dissected as if it were an animal to study. "How long have I been asleep?" Tezzeret asked. His voice was hoarse, his throat dry. "Long enough to prepare for the task delegated to me," said Jin-Gitaxias, stepping into view. He paused for a moment to study a tablet in his hand, a device he used to monitor the integrity of his lab apparatuses, then undulated his neck to look square at Tezzeret. "Embarking upon projects on short notice is imprudent. And at such a sensitive time. Elesh Norn's discretion is several percentiles less than acceptable." So it was happening. His reward, finally here. Tezzeret would have felt more elated were he not bound in the seat where Tamiyo was cut open and flayed like an overripe fruit, her organs removed and replaced with glands that swam in oily ichor, an acid liver, bones of black metal. Beholding her rebirth as a Phyrexian, Tezzeret vowed that no such fate would befall him, that he'd die before he subjected himself to Jin-Gitaxias's mad experiments. But musing about death was not the same as facing it head on. The door at the far end of the laboratory slid open with an almost imperceptible swish. In scuttled several tentacled skitterlings tugging a floating platform similar to the one Tezzeret had used to escort Karn's dismembered body to Elesh Norn's garden. Only, this platform bore something of much greater importance to him—the prize he'd long sought, streaks of gold swirling across and around its otherwise jet-black surface. A body of darksteel. Cold. Indestructible. Invincible. Something welled in Tezzeret's chest, overcoming even the constant burn of the Planar Bridge against his flesh. Was it hope? Not at all. Such a delusion was fine for simpletons; Tezzeret had no use for it. What he had was #emph[clarity] . There was nothing like desperation to renew one's conviction, to harden one's resolve. #figure(image("009_A Man of Parts/03.jpg", width: 100%), caption: [Art by: Zezhou Chen], supplement: none, numbering: none) "There are costs to working with darksteel," Jin-Gitaxias lectured in his characteristic monotone. "Once the metal has been forged, it must be shaped into its desired configuration immediately. The haste with which this is done inevitably requires lax standards in other areas. Urabrask condones such waste, but I do not." "I am well aware," Tezzeret said, inwardly sneering at Jin-Gitaxias pretending to understand something he clearly did not. Tezzeret had seen enough in Urabrask's domain to know that the metal was not mined or shaped in any way remotely traditional. Forging darksteel lay in forging the #emph[reality] around where the metal would be, presaging it so that it could be willed into shape. Tezzeret conjectured that the exact magical mechanism was a chance collision of rituals assembled over countless cycles—perhaps in part cribbed from Vulshok technique and in part from knowledge gained outside the plane long ago. Despite his insight, all his attempts at replicating it had failed. Tezzeret did not like it, was not comfortable with his own inability to grasp darksteel's secrets. But he'd learned to accept it. "A lesson in efficiency," said Jin-Gitaxias, beckoning a pair of slug-like assistance drones to approach. "The etherium extracted from your husk will be shaped and charged to create a bonding force stabilizing your new form." The drones leaned forward, and from apertures on the tops of their heads came concentrated beams of energy directed at Tezzeret's metal arm. At first, he felt nothing, but soon the sensation of slowly rising warmth gave way to searing heat where his arm met his organic shoulder. Tezzeret watched as the embodiment of his own exceptionalism melted into slag. Jin-Gitaxias collected it in a bowl and poured the superheated etherium into a narrow channel cut into the back of the darksteel body. "This will remain a weakness in an otherwise impregnable form, but adequate precautions can mitigate the danger to yourself." #emph[Ingenious] , Tezzeret thought. A lesser artificer would have tried to invent a more complex way to create the bond. All the better to impress an academy of simpering colleagues. Not Jin-Gitaxias. He understood that the elementary attraction of elements—of like clinging to like—was pure, inviolate, and unparalleled. "Now," said Jin-Gitaxias. "Commence with the procedure." The operator orb descended onto Tezzeret, a ring of pincers closing around his neck. Then the orb began its work, first by implanting microfilaments into his skin, each puncture like a dagger stroke. Surgical needles embedded in his seat did the same, knitting a weave of etherium strands around his spinal column. Tezzeret flexed his fingers, curled them into fists. A numbing thrum of energy began to course through the metal threads, causing a sudden bout of dizziness to wash over him. Then his head and spine were separated from his body, now little more than a mass of scarred meat and scorched metal surrounding the Planar Bridge. The pain was magnitudes beyond any other he'd ever felt, so much so that visions began to flood his mind—pieces of a familiar fever dream he'd experienced when Bolas saved him from the brink of death. An ocean cloaked in cerulean haze. An island of metal, grasses of burnished pewter and tree leaves like age-tarnished razor blades. Mournful contrabasso chords growing into earsplitting peals—the chimes of a titanic clock. Then~ blackness. Silence. Tezzeret opened his eyes to the glare of the lights overhead on the speckled marble slab. Did it work? Was he alive or dead? He wasn't sure. He focused on his fingertip upon the slab and marveled when it moved on command. Yes, he felt the muscles—if they could be called that—in his limbs bursting with a raw, physical strength he'd never known. More importantly, the burning of the Planar Bridge was gone, and his mind felt keener than it had in months, as if a diseased piece had been excised. "You have outdone yourself," said Tezzeret. "Negative," said Jin-Gitaxias, "This advancement was well within my abilities." "In any case, my admiration for your skill is sincere," said Tezzeret. #emph[As sincere as my contempt for your loathsome plane and everything on it.] At that, he willed himself to enter the Blind Eternities, this time as a man reforged. He relished the thought of visiting restitution upon all who had wronged him, then amassing power to attain his proper place in the pantheon of the Multiverse. Except, he didn't move. There was no characteristic snap of the universal edges parting, no bout of momentary queasiness that routinely accompanied his planeswalking. Tezzeret flexed his limbs, but the clamps around his wrists and ankles were made of the same unbreakable darksteel that now composed his body. It was then that he noticed a thin inlay of rippling silver metal fed into shallow crevices stretching across the marble slab he lay on. He cursed, recalling how Karn had been prevented from saving himself. Tezzeret had fallen into the same trap. "Release me at once!" Tezzeret attempted to planeswalk away again, and again he failed. "Do you hear me?" "Darksteel has another drawback," said Jin-Gitaxias, paying no heed to Tezzeret's cries. "The conversion to blightsteel requires weeks, if not months, of exposure to the glistening oil." With a click of his claws, the praetor called the operator orb back down to hover near his shoulder. He tapped the orb, causing a slithery tentacle to emerge from within its nest of appendages. "Fortunately, advancements have been made to minimize this issue as it pertains to the task at hand." The tentacle unfolded, revealing a small module at its tip. The Reality Chip, a new version dripping with glistening oil. "This was not part of my agreement with our Mother!" screamed Tezzeret. "Her wrath will rain down upon your head!" "There is no violating an agreement already broken." Jin-Gitaxias gestured toward the far wall, which slid open to reveal a tank of blue liquid. Suspended inside was the body of one of Urabrask's chief lieutenants, a scrapchief, its arms stretched away from its body like a spider being pulled apart. He knew. Jin-Gitaxias knew about it all—Urabrask, the Mirrans, the impending attacks. Everything. "Such developments do not displease me. They introduce possibilities intriguing enough to let them unfold as they will." #emph[His own play for the throne] , thought Tezzeret. "Nevertheless, I regret not feeding your tissues to my larvae upon our first encounter. But, as oversights can be corrected, so too can the treasonous be~ What is E<NAME>'s nomenclature? Ah. #emph[Forgiven.] " Tezzeret tried again to break his bonds, casting spells in every direction he could. But with each incantation, the metal inlay on the slab would flare, changing color from silver to a bright opalescence, siphoning away the energy he needed to escape. Still, he kept casting, desperate for anything that could penetrate the dampening field. Something did. #emph[Planeswalker] , he heard a presence speak, a voice that boiled with the rage of Phyrexia's forges, albeit one nearly extinguished from exhaustion. #emph[How do you reach into my mind?] It had been so long since Tezzeret had initiated contact with a telemin that he had almost forgotten how. Less a true spell than an Esper mentalist's trick, establishing a mental bond in this way allowed the caster to assume total control of another individual, provided full permission had been granted. Useless against an enemy. But in a situation such as the present one, it was exactly the improvised weapon he needed. #emph[Give me control] , #emph[Phyrexian] , thought Tezzeret. #emph[I am your only means of salvation, and you mine. Otherwise, we both end here.] There was an initial resistance by the scrapchief—a natural reflex—which quickly gave way to Tezzeret's psyche melding into his new host. He could feel the creature's flagging rage, like a smoldering furnace, and stoked it with his own. Beholding Jin-Gitaxias standing over his body through the transparent wall of the scrapchief's prison, Tezzeret aimed a single hit onto the glass with the creature's sharpened upper jaw. He struck it again and again, each time widening the fracture until the tank exploded in a hail of shrapnel. #figure(image("009_A Man of Parts/04.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) Tezzeret drove the scrapchief forward, ramming Jin-Gitaxias onto the ground, knocking the Reality Chip from his grip. Given different circumstances, Tezzeret's next step would have been to beat Jin-Gitaxias mercilessly. To break him. Instead, he commanded the scrapchief to charge past and bring the full weight of its heavy, metal-capped arm onto the marble slab, punching a hole straight through. Again and again. The more damage to the slab—and to the lattice on its surface—the stronger Tezzeret's connection to magic. He raised the scrapchief's arms overhead for one final smash when pain ripped through his—or rather, the scrapchief's—back. Looking down, he saw the claw of Jin-Gitaxias protruding through the scrapchief's chest. Tezzeret's mind snapped back into his own body in time to see Jin-Gitaxias throw the scrapchief's corpse down to the ground, a lifeless pile in front of him. No words came out of the praetor's mouth. The time had passed for intellectual cogitations; both praetor and Planeswalker understood this. One moved—Jin-Gitaxias lunged forward, armed with the Reality Chip—and so did the other. Tezzeret planeswalked away. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #emph[Filth. Darkness. Desolation.] Many words have been said of Tidehollow, the forsaken underground where the Esper elite relegated the dregs who reminded them of their sins. #emph[Tidehollow the heartless! Tidehollow the unmerciful!] The longer you lived there, the longer and more complex the phrasing. #emph[Tidehollow, who impales the skulls of the forgotten with spikes of machined perfection! Tidehollow, whose plumes of trash fire soot gag the toxic hopes of the young, the acidic pleas of the old! Tidehollow with teeth like window shards, sarcophagus bones hollowed of marrow and force-fed to infants!] Tezzeret, on his knees, dug between hunks of broken pavement and scraped up the dirt underneath. He brought the soot and soil up to his face, smelled the blood, the sick, the hopelessness. Then he leaned back and howled with laughter. The poets could choke on their verses. For Tezzeret, there was only one word associated with Tidehollow that truly resonated. #emph[Home] . "Oy!" he heard a voice say behind him. It echoed off the walls of the condemned buildings lining the grimy alleyway. "Looks like someone's had too much of the piss. Probably don't have a lot left in your pockets, but we'll take what you got!" Tezzeret turned his head to see a gang of cave brats, the tallest and oldest out front armed with a knife. He had the steely look of someone who'd been on his end of a weapon before, who'd carried out forced transactions like those up in Vectis enjoyed their afternoon tea. Long ago, before planeswalking dragons, plane-churning confluxes, and biomechanical scourges, Tezzeret dressed in the same tatters, bore the same scowl on his face that these youths now wore on theirs. "I am at a moment of weakness," Tezzeret said, calmly. "I will permit you to leave." "I think we'll stay, thank you very much!" said a girl, the lead boy's second-in-command, Tezzeret guessed. "What are those things floating around him?" The lead boy smirked. "Magic. Decorations rich folks spend a fortune on." He jabbed his knife in Tezzeret's direction. "C'mon. Give us your stuff, and you won't get hurt." "I have nothing for you." "I'll be the judge of that," said the lead boy. "You would judge me? What makes you think you're worthy?" "Got a knife in my hand, see?" "Yes," said Tezzeret. Then, in one movement, he turned, stood, and cast a spell to animate the knife in the leader's hand. It wrested itself from the boy's grip and then plunged into his palm, nearly severing his fingers entirely. "I see." "Aether lich!" the girl screamed, sparking a stampede, the lead boy holding his wrist as he scampered away. The gang scattered, its bigger members trampling over the smaller ones who made up the back ranks, leaving behind a lone, blond child, pushed down into the gutter by his erstwhile fellows. The boy huddled against a nearby building—one that Tezzeret recognized. He'd brought himself to the threshold of his childhood home, the abysmal station he'd been born into. "Why is this building boarded up?" Tezzeret asked the boy. "And what of the man who lived here?" "No one's ever lived here, far as I know." Had his father died? It wouldn't have been surprising. When he wasn't cursing other scrappers for "stealing his rightful claim" or screaming at his son to allay his frustrations, he was in his cups babbling to the phantom of his dead wife—Tezzeret's mother—before passing out in a pool of his own vomit. Before he knew better, a young Tezzeret would wait until his father was asleep, then wipe the table dry and lay his father down upon his cot with blanket drawn. #emph[Imbecile.] He'd merely enabled his father's cruelty toward him. Only when Tezzeret was older, after he'd learned about the power of mages, did he see the role he played in his own suffering. "What is your name, boy?" "Estel," the young man stammered out. "Come." Tezzeret tried to reshape his arm into a bent edge to pry off the wooden panels nailed across the doorway, only for his body to ignore his command. He grunted, realizing that for all the strengths of his new form, there were tradeoffs. #emph[With time] , he thought as he tore the panels down as if they were scraps of paper. Inside didn't look much different from what he remembered. Two rooms, one a kitchen area with a shallow fireplace and a table and the other used as sleeping quarters. Both were stripped of anything of value. The only things visible implying his father's existence were bits of twisted metal—all cheap alloys—scattered across the floor and a heavy cloak that smelled of mold and sawdust. But what of things invisible? Tezzeret pushed the table aside and, counting three tiles from the back wall, he inserted a finger into the crack between the third and fourth. Underneath was a small metal door locked with a heavy deadbolt. Tezzeret ripped the door off its hinges, reached in, and pulled out a small wooden box with floral patterns carved onto its lid. This was his mother's handiwork, the last remnant of the hobby that gave her solace amid the squalor. He remembered hugging the box on the journey up to Lower Vectis to collect his mother's corpse, how his fingernail fit perfectly into the shallow grooves of the carving. He remembered her promise that morning to return with supper—a promise, he supposed, she'd intended to keep. Witnesses told a familiar tale. She'd been begging for alms when a wealthy guildmaster's wagon hit her and didn't stop. Of course, the authorities did nothing. Humiliation and death were common enough occurrences for downslopers like her. Long after and armed with his Seeker training, Tezzeret searched out his mother's killer, only to find that he'd died years before, peacefully, surrounded by his loving family. #emph[Tidehollow, whose claws of rags and misery drag dreams to ash!] "Do you know what this is?" Tezzeret asked Estel after cracking open the box for the boy to see. Inside were metallic scraps of all shapes—nuggets, shavings, irregular threads. "Etherium," Estel answered, shriveling under the Planeswalker's gaze. "This paltry amount is worth more than all the denizens of Tidehollow combined, anything that you are now or will be in the future." Tezzeret began to shape a spell, murmuring words he'd learned long ago as a member of the Seekers. "Its value is derived from its extreme rarity, its inability to be reproduced. At least, that's what you're told." He let his hand drop, the etherium suspended in the air, and watched as the liquid metal reformed itself into a thin square. "Those in Tidehollow need little motivation to fight among ourselves for the scraps we're allowed to have. All the better for those above. It keeps us out of their way." Letters began to raise themselves onto its surface, Tezzeret's mind pressing the metal into a message. Tezzeret took the etherium, curled it into a tight tube, and placed it back into the box. He looked to Estel and intended to place it in his hands when thunder tore through the air, the sound of steel doors being wrenched apart. Tezzeret ducked outside to see an angular crack, flaring with bright crackles of energy, breaking the cave ceiling. Tearing through it was a column of white material that he at first thought was a building falling through from the city above. But upon closer inspection, he spotted creatures moving across the column's surface, scampering down like insects to street level. Then he realized what he was looking at. Bone-white metal. The Phyrexians had arrived. "Too soon," Tezzeret snarled. He clutched Estel's arm and dragged him inside the hovel. He forced the boy to take the box, then spotted the small dagger strapped to the boy's belt. "Give me your knife." With a shaking hand, Estel drew the knife from its sheath. Tezzeret grabbed it and looked it over. Cheap make. Loose handle. Chipped tip. Still, it would suffice for Tezzeret's ends. A beginner's spell solidified the knife's handle; another filed the edge down until it was sharp and tapered. One last enchantment made it quasi-ethereal such that its cutting edge could cleave through a well-forged sword. "The cistern at Bellow's End," he said. "Do you know of it? There is a passage leading to a forgotten house in Upper Vectis." "Aye. We use it to watch the parades." #emph[As did I in my youth.] "Go there—stick to the Shadow Way, the narrowed passages." "How do you know—" "Be quiet and listen. You are to leave the city, taking supplies as you come across them. Do not stop moving. If something gets in your way, use this." Tezzeret placed Estel's refashioned knife back into its sheath. "Make your way to Bant." "Bant?" "Follow the shoreline northward, keeping the silver wind at your back to guide you to Valeron. Approach the first outpost you see and find the knight decorated with the most sigils. Request an audience with Knight-General Rafiq and give him the box. Am I clear?" The boy nodded, but his expression was one of worry and confusion, exacerbated by the shouts and screams—not to mention the inhuman roars—from outside. "What is happening? What were those things? Who are you?" "I am the one giving you a chance to live," he said. "When you see Rafiq, tell him that an ally of <NAME> sent you." Tezzeret pushed Estel away, and the boy turned to leave. But before exiting, he looked back, nodded, and said, "Thank you." "Wasted words," he spat, heat rising behind his eyes. "But sir—" "Just go!" he screamed, prompting Estel to run out the door. Tezzeret stood, his body trembling. #emph[I have not fully recovered from the grafting] , he told himself as he regained his composure. #emph[If the boy dies, he dies.] Death would have been Estel's destiny anyway had he stayed in Tidehollow. But if he managed to live, if he got word to the Knights of Bant that they alone possessed a way to defend themselves—a legion of angelic warriors, just as New Capenna once boasted—then Alara could become a quagmire slowing the Phyrexians' spread. All the more time to re-establish his networks, gain resources, and enact his plans. Tezzeret donned his father's cloak—a menial disguise, but it sufficed—and then, for the briefest of moments, stared back at the dingy hole where he was born and raised. Flecks of rotten wood and plaster rained down from the ceiling as the air filled with noises of slaughter and mayhem. #emph[A fitting goodbye] , he thought as he entered the Blind Eternities. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Tezzeret's travels took him to plane after plane transformed, ripped apart by invading hordes of Phyrexians. Sabers snapping upon iron-clad carapaces, monstrous incisors grinding bone, and near-constant weeping seemed to bridge planes, blending into an uninterrupted symphony of suffering. Elesh Norn's "great work" was unfolding faster than Tezzeret could have imagined. Aranzhur. Ilcae. Obsidias. All planes that contained safehouses set up by Baltrice, his second-in-command in the Infinite Consortium. Their existence—and hers, for that matter—was one of the few shreds of specific knowledge Beleren had left behind when he scraped out Tezzeret's mind in the Nezumi swamps. But there was nothing safe about these planes anymore. They'd become mere extensions of New Phyrexia, fresh blossoms on Elesh Norn's debased World Tree. Other planes—Mirrankkar, Cabralin—were in the process of being subsumed. Their inhabitants would fight back, only to fail and become one with the Machine Legion. Tezzeret had no choice but to keep moving. One more plane held a safehouse he could use as a refuge, though it was a place he was hesitant to return to. But he'd run out of alternatives. To his relief, there was no sign of invasion—at least an overt one—among the bustle at dusk of Towashi's narrow streets. Gone was the tension fueled by the recent Upriser aggression, leaving the people to resume their normal, dismal lives. Unaware. Cattle fit for slaughtering. No matter. Tezzeret's concern was finding the safehouse, resting, and claiming what materials Baltrice had stashed there. Unfortunately, the snaking layers of gridwork that marked the Towashi Undercity had proven as formidable a barrier to his reprieve as a Phyrexian horde. "Where is it?" he muttered, emerging from yet another alleyway back onto the street. Tezzeret stiffened the hood of his cloak and kept his face low. Surveillance was everywhere. He'd long been unwelcome in most parts of Kamigawa, and he had no doubt that his enemies had renewed their hunt for him after his most recent stint on the plane. He continued walking until he found himself in Dragon's Well, one of the lowest sections of the Undercity, an area forever shielded from the sunlight by a matrix of bridges that serviced those who worked and lived in Towashi's skyscrapers. It was a logical place for the safehouse's location. Out of sight. Buried. Forgotten by all but the Undercity's biker gangs that eke out a meager existence in petty crime. Somewhere Tezzeret would have chosen—perhaps a location he #emph[did] choose but could no longer remember. He placed his hands on the support column of a bridge and murmured a rhabdomantic spell, sending his mind sizzling through the metal in search of a doorway with the Consortium's magical imprint. "It is you~" he heard someone say, a split second before feeling a surge of electricity overtake him. Tezzeret suddenly felt helpless to gravity, the weight of his body toppling him over like a tipped statue. It took all his strength to reach backward, where he felt a blade piercing the threadbare cloth of his father's cloak, penetrating the soft etherium in the middle of his back. Lucky shot—or unlucky, as it were. A bright light then burst out of the darkness, shining down upon him from atop a hovering surveillance drone, its cannon still smoking from a recently fired shot. Stepping out from the periphery was a Nezumi, young from his stature, with gray-spotted, white fur unlike most of his brethren. "Where is she?" Tezzeret groaned and attempted to planeswalk away. But his mind was too scrambled to escape or to cast spells. He reached back again, this time tapping the shaft of the blade with his fingertips. "Tamiyo," the Nezumi continued. "Tell me where she is." He raised a control rod, using it to command the drone to lower. "Is she~ dead?" With a click, the cannon chamber loaded with another shot trained on Tezzeret's head. "Tell me now!" #figure(image("009_A Man of Parts/05.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) "What is she to you, rat whelp?" Tezzeret said, with a dry grunt. "You're her champion? Her hero swooping in to save her from the darkness?" "My mother." #emph[Mother.] Of course. Tamiyo's "family," as she would endlessly drone about. It was never quiet with her around—her inane singing, a broken music box stuck in an endless loop. #emph[Genku, my love, I will come back for you. Hiroku, my love, I will see you again. Rumiyo, my love, we shall embrace. Nashi, my love, not of my blood, but of my heart] ~ Yes, Nashi. That was his name. "I saw you die once for burning my village to the ground," he said, his arm wavering, fingers positioned on the buttons of the control rod. "Tell me where she is, or you'll die again." #emph[Full circle.] Tezzeret looked up and stared into the boy's eyes. "Then do it." Nashi's hand shook. "I swear~" "Do it! What are you waiting for, you coward?!" A dam broke inside Tezzeret. He reached backward one more time, feeling his fingers elongate and wrap around the blade lodged in his back. He wrenched the blade out and threw it at Nashi's drone, knocking it askew enough that the cannon shot far wide of its target. Shadows danced. Nashi tried to bolt away, but Tezzeret was faster, snatching him by the collar of his leather jacket and dragging him to the ground. "You pathetic weakling!" Tezzeret, in control of his faculties once more, lifted Nashi with one arm and threw him against the bridge support. "Fate handed vengeance to you, and you squandered it! Few #emph[ever] get that chance!" Tezzeret picked Nashi up again and pinned him to the wall. The boy was battered, red patches sunk into his fur like blood on snow. "In this life, you take what you deserve! Others will try to stop you, so you stop them first! You #emph[kill] them first!" The rumble of engines erupted all around Tezzeret. He turned just as light flooded the area from more than a dozen motorbikes forming a semicircle around him. No exit. "Let him go," ordered the leader, a female Nezumi atop a bike styled like a dragon. "This is no concern of yours." "Yes, it is—he's one of ours," the leader said. "You're outnumbered. Let him go, or else." Tezzeret dropped Nashi in front of his feet. More threats. Always threats that tasked him for a response. Very well. Metal would be his answer, brutal and precise. #emph[For hate's sake.] With that thought, he expanded his magic out past himself in all directions—into the bridges that spanned the iron firmament above his head, into the ground to contact deposits of ore deep underneath them. Perhaps detecting something amiss, the leader ordered three of her henchmen to dismount from their bikes and approach. Too late. Tezzeret twitched, making the short blades in the henchmen's hands move of their own accord, impaling their wielders and dragging them away from the light. The rest of the Nezumi mounted their bikes again and revved the engines to ready for a charge. Another futile effort. Each of their mechanical steeds was a magnificent work, an artifact in its own right, gleaming and powerful and #emph[metal] . Raising his hand in front of his face, palm up, Tezzeret slowly squeezed his fingers together. Realization hit the gang members seconds after, as their bikes began to shake. Some tried to jump off, only to find that the metal on their persons—weapons, buckles, and pins on their clothing—had fused to their bikes, shackling them in place. They could do nothing when, all at once, Tezzeret clenched his fingers into a tight fist, lifting the bikes into the air and then slamming them together with a gruesome crunch. He gazed at the mass of metal and flesh, used his magic to rotate it in the scant light of Nashi's grounded drone. Shrieks of incredible pain. Fractured limbs skewered by chrome shafts glittering in the darkness like a jewel. A false jewel. A curse masked as treasure. No, true power was not in either of these—in amassing armies or gathering weapons. It was in surviving, in thriving, in outliving all those who had ever come after him. With a shred of his will, Tezzeret sent the mass of crushed metal and bodies careening into the dark, where it collided with a far wall. Then all was quiet. He looked down where Nashi lay, crouched down, and cradled the boy's head in his hand. Nashi wrapped his fingers around Tezzeret's wrist, the half-congealed blood on his palms leaving a residue, black and viscous upon Tezzeret's darksteel skin. "Your mother still lives." "Alive," Nashi gasped, the smallest sliver of a smile flashing across his face. Tezzeret nodded. "She will come for you soon enough." He leaned in closer. "And when she does, you will wish I had killed her." Gently, he placed Nashi's head onto the ground, stood up, and walked away. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) The safehouse was located behind a false wall in a gaming parlor, bright and raucous, where people from the lower strata of Kamigawan society sunk their money into machines promising riches but delivering little more than flashing lights and clanking sounds. It shouldn't have surprised Tezzeret. Baltrice always had a penchant for such frivolities. Inside, he found exactly what he was looking for. A private place to rest. To strategize. To ruminate. The supplies were also most welcome: a new suit of light armor, the spine and neck area of which he magically reinforced; several denominations of currency from many different planes; a manablade—one of the very few not in the possession of the Church of the Incarnate Soul; and last, a small crystal that, when held, projected a pattern of pinpoint lights onto the wall, an esoteric telemetry that rekindled a memory long snuffed out. Tezzeret planeswalked from Kamigawa to a plane so forlorn that even he did not know its name. The journey—the flexing of a neglected muscle still retaining the imprint of endless practice—found him standing amid an ocean of sand. In the distance rose a shallow hill made of seamless metal, and emerging from its top was a single spiked tower. Once, this was his tower, the base of operations from which he steered the fortunes of other planes as the shadowy leader of the Infinite Consortium. "Smart, Beleren, to keep this from me," Tezzeret mused. "But no longer." As Tezzeret began his trek forward, he pondered the battle happening across other planes—Beleren and his cohort against Elesh Norn. They would reach the end soon, the stage when both opponents would unleash their final salvos against each other. This was always the most important part of the game—one he was glad to sit out. Eventually, one of them would be victorious but weakened. Then—and only then—would he make his move. In the meantime, there was much rebuilding to do.
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/docs/cookery/guide/trouble-shooting.typ
typst
Apache License 2.0
#import "/docs/cookery/book.typ": book-page #show: book-page.with(title: "Trouble shooting") = Trouble shooting We are collecting questions and answers about the `typst.ts` project here. Feel free to ask questions in #link("https://github.com/Myriad-Dreamin/typst.ts/discussions")[Github Discussions].
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/024%20-%20Shadows%20over%20Innistrad/008_Liliana's%20Indignation.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Liliana's Indignation", set_name: "Shadows Over Innistrad", story_date: datetime(day: 20, month: 04, year: 2016), author: "<NAME>", doc ) #emph[When we last saw her, <NAME> was ] receiving an unwelcome guest#emph[: fellow Planeswalker <NAME>. Jace was looking for Sorin Markov, and tried to convince Liliana to come with him to Markov Manor. When she refused, he set out on his own. What he found there eventually led him to the coast of Nephalia.] #emph[Liliana, meanwhile, has problems of her own....] #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Rain hammered against the windows. A flash of lightning illuminated bare stone walls and a couple of shambling corpses. A boom of thunder followed half a breath later. Getting closer, then. Good. She needed the lightning, and the storm matched her mood. She sat on a high-backed stone chair, brooding. #emph[How did it come to this?] Every path she sought toward freedom only seemed to lead her to more closed doors, more dead ends to escape. She'd made demonic pacts to make herself ageless, undying, at the paltry cost of a soul she was hardly using anyway. Her breath no longer steamed, even on cold nights like this one. But demons are harsh masters, and soon she found herself working to subvert her pacts, to kill her demons—to have immortality and freedom both. And so...the Chain Veil. #figure(image("008_Liliana's Indignation/01.jpg", width: 100%), caption: [Swamp | Art by Jonas De Ro], supplement: none, numbering: none) It whispered to her, even now, from the hidden pocket where she kept it. With it, she had killed two demons, lords among their kind. With it, she had commanded armies of the undead even she had never dreamt of, had besieged and taken Thraben itself, the greatest city on Innistrad, just to get her hands on one of those demons. But the Veil... She could no longer bring herself to wear the thing on her face, to feel its silken-soft links against her skin. She hated touching it. But when she tried to get rid of it, the pain was unbearable. And using it was worse. "Liliana," said a voice. A familiar voice. Wasn't it? She stood. "I'm busy," she said, loudly and clearly. "If you've come to torment me again, get on with it." Something prickled at her temples, a sensation like fingers prying at the door. "Torment?" said the voice. "I didn't realize it was that bad." Lightning flashed, illuminating a large black bird perched on the windowsill. As the thunder's echo in her ears subsided, a second voice spoke, seemingly right in her ear. "I didn't say anything," said the Raven Man. She turned. There he was beside her, with his white hair, golden eyes, and elegant black and gold robes belonging to a very different time and place. He was...well, she wasn't sure quite what he was, an ignorance she tolerated only because she had no choice. He had appeared to her in her youth, taunted her, taught her. He had set her on the path that brought her here, and appeared now and then to keep her on it. He could rot in in the nearest available hell, as far as she was concerned. #figure(image("008_Liliana's Indignation/02.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none) "I'm not in the mood for wordplay," said Liliana. "Fine," said the first voice. A different voice, definitely, full of sharp suspicion. "Then let's cut to the chase." The Raven Man's spectral lips hadn't moved. And he didn't look wryly amused, as he usually did. He looked...worried. #emph[Oh, hells.] Liliana looked away from the Raven Man. She made a fist, filling it with deadly magic ready to unleash at a moment's notice. "Let's do," she said. "We'll start with who you are and what you're doing in my house." Lightning flashed again, this time illuminating a figure, cloaked and hooded. Liliana's scalp crawled. "You know who I am," said the voice—not from where the figure had been standing. "What you don't know is what I know." That prickling sensation again. Almost like... "You'd better do something," said the Raven Man. "I can't keep him out of your head forever." In an instant, fear became fury. "#emph[Jace?] Are you insane? I almost killed you!" "You almost tried," said the voice. Jace. She'd befriended him on false pretenses, played on his emotions, manipulated him into joining an interplanar crime syndicate, then into overthrowing it. By the time it all went wrong, she'd grown genuinely fond of him, and betraying him had torn out one more strand of her threadbare sense of humanity. Not that that had stopped her, and anyway, if she hadn't done it they'd both be heroically, uselessly dead. Still, she could see why he might bear a grudge. But never before, at any point in their dysfunctional association, had he threatened her. She could see him now, right in front of her. She willed her zombie minions to attack him, but ropes of light bound their arms and legs, sent them toppling to the ground. She mentally beckoned more to help, to overwhelm him, but felt no reply. "They're not coming," said Jace. "All tied up." Liliana had never actually seen Jace lose a fight he'd had time to prepare for. "Get out of my house," said Liliana. "Why?" said Jace. "Am I scaring you?" His eyes glinted beneath his hood. "I certainly hope this display is frightening you," said the Raven Man. "This isn't like him." "Yes," said Liliana, to Jace. "This isn't like you. I'm not convinced this #emph[is] you." The sensation at her temples became a pounding, with a whisper of voices behind it. She resisted the impulse to strain to hear them, which would only give him an opening. He really was attacking her, then. #emph[Enough!] She lashed out at him with a whip of death magic—just enough to cause agony. The bolt of purple light slid right through him, and his image popped like a soap bubble. "First you try to hide it from me," he said, this time from a corner of the room. "Now you're trying to silence me. But you can't hide something this big. Not forever." "I don't know what you're talking about," said Liliana. "I don't know what you think is happening. But you are #emph[way] out of line." She turned toward him, but when he spoke again he was behind her. She'd seen him use his illusions and his mind magic to melt away into the shadows and become a phantom, to keep his opponents guessing. He'd never done it to her, and she didn't care for it. "The drownyard," he said. "The angels! I've seen what they're building out there. And you're helping them. Admit it!" The pressure at her temples became a splitting pain. "Liliana," said the Raven Man. "I've invested too much in you—" "Stop it!" said Liliana. "There are a lot of drownyards on Innistrad, I #emph[warned ] you about the angels, and you know damn well I wouldn't help an angel for all the gold in Orzhova!" "Not for gold," he said. "For the Chain Veil, for the problem I wouldn't help you solve. You tried to keep me from seeing what happened to Markov Manor. You tried to keep me from finding Sorin. Why? Afraid I'll tell him what you're up to?" "I tried to keep you from getting yourself killed," said Liliana. "And I don't know anything about Markov Manor I haven't already told you." "You can't lie to me," said Jace. He seemed to be losing his train of thought. "You know better. You're...you're redirecting a whole world's mana into this...moon...thing, just to—just to be rid of the Chain Veil? Is that it?" His voice was coming from all around the room now, his hooded form moving every time she blinked. There were two of him, then three. This little show would be annoying enough even if she'd actually done whatever it was. Based on false accusations, it was downright infuriating. "Days ago you came to my door asking for help, Jace," she said. "Yet now here you are with accusations?" "You can't keep secrets from me," he said, an edge of menace creeping into his voice. "All I need is time." "I don't know what you ever saw in him," said the Raven Man, his face very close to hers. "You're nothing to him but a puzzle to be solved. And he's nothing to you, nothing whatsoever. Or did I misunderstand you?" "Whatever you're accusing me of," said Liliana, "step out into the light and say it to my face. This isn't what you think it is." "How would you know what I think?" snapped Jace. "And why should I trust anything you say? You've done nothing but lie to me, caused me nothing but pain." Her head throbbed. "He's getting through your defenses," hissed the Raven Man. "#emph[Do something!] " One of the images of Jace snapped his head toward the Raven Man, eyes wide. "Who—" #emph[So you ] can#emph[ see him!] There was no time to dwell on that revelation, which was followed quickly by another. Liliana smiled. #emph[And I can see you.] She let loose a bolt of magic at Jace, the real Jace, that left him doubled over in pain. The other two Jaces vanished. "Now then—" she started to say. But the pressure at her temples started up again. Damned fool. She raked another blast of necromantic energy over him. He cried out, fell to the floor—and lifted his head, eyes glowing, face contorted. #figure(image("008_Liliana's Indignation/03.jpg", width: 100%), caption: [Liliana's Indignation | Art by Daarken], supplement: none, numbering: none) "Tell me what I need to know," he said, rising. "Tell me about the drownyard." "He's asking leading questions, trying to bring certain thoughts to the front of your mind," said the Raven Man. He smirked. "A basic maneuver of the telepath." The smug bastard was right. Liliana's vision swam as Jace tried to force his way into her mind. "Stop it," she said. "Even if I knew anything about a drownyard, your tricks wouldn't work on me." She sent another bolt of agony through him, then another, but he kept up his attacks. He fell, rose, fell again—and this time only made it back up to his knees before she lashed him again. "Tell me," he growled. Her skin had begun to burn, her demonic scars etched in purple flame. And the Veil...oh, the Veil wanted to help her. It siphoned off a few stray rivulets of necromantic energy and returned them to the stream fivefold. She struggled to hold it back, to keep it from killing him instantly. "Stop doing this!" she said. "I can't control—" Jace was screaming now, eyes still glowing, his assaults on her mind intensifying along with the pain. "#emph[Just...tell...me!] " The backlash started, agony suffusing Liliana as the Chain Veil took its toll. Blood began to drip from her scars. She gritted her teeth. She'd felt worse, though—when the scars were administered, for instance. She'd survive this. Jace might not. "He's almost broken through," said the Raven Man. "Kill him." "Don't tell me what to do!" she shouted—at both of them, at the Chain Veil, at the moon and the world and at death itself. "Stop it!" "You'll have to kill me," wheezed Jace, tears streaming from inhuman glowing eyes. Liliana's vision began to fade. "Do it," said the Raven Man. "Jace,#emph[ I don't want to hurt you anymore!] " The words echoed against stone, the pounding in her head stopped, and for a moment there was no sound but the boom of thunder and the drumming of the rain. The Raven Man sighed in disgust and disappeared in a rustle of feathers. The glow in Jace's eyes faded, and he stared up at her, wan and sweating, looking suddenly very vulnerable and very young. "Any more?" said Jace. His voice was hoarse. "As in, any longer? Or as in more than you already—" "I don't owe you any answers," said Liliana. "And you damn well owe me some." That, at least, told her she was dealing with the real Jace. Who else would pick apart her wording rather than face the reality of the situation? "What did you do to me?" he asked, breath still coming in heavy gasps. "I feel like death." "That's the idea." He almost smiled, then his eyes went wide and he staggered to his feet. "You're bleeding!" he said. "Yes." Genuine concern, moments after trying to pry open her mind like a jam jar. "We should—" "No," she said. "Tell me what the hell is going on." Finally, a few zombies padded into the room. Not her freshest specimens. These were the tattered ones she used for sentry duty—he'd probably missed them on his sweep. She set them between her and Jace, but didn't have them attack. Not yet. "You really don't know?" Zombies grabbed his arms and legs. He didn't struggle. "Jace," she said through gritted teeth. "Explain. Now." "I went to Markov Manor," he said. "It was...inside out, rocks floating everywhere, vampires stuck in the walls. All that. Right? I found a book. It's a fascinating book. She's been studying—" "Who?" Lightning flashed, and Liliana saw the book on his belt. It was a large, ornate thing with an unusual binding. She wouldn't mind perusing it herself—unless it was the reason Jace was so out of sorts. #figure(image("008_Liliana's Indignation/04.jpg", width: 100%), caption: [Tamiyo's Journal | Art by Chase Stone], supplement: none, numbering: none) "The moonfolk! She's been—you know moonfolk? #emph[Fascinating] book. She's been studying the moon—the moon, and what it causes. The tides, the werewolves, the angels. It's all connected! Those weird stones in the countryside—you haven't touched them, have you? Don't touch them. Just...don't. They all point the same way, so there was a, um...a...they all point #emph[toward] something, is what I'm saying. Not a compass point. A place." "Where?" A crash of thunder. "Parallax!" said Jace, looking at the window, as though the storm had answered him. "That's the word, thank you." "#emph[What place?] " "Nephil...Neph...Nephalia," he stammered. "A drownyard, on the coast. I mean, they're all on the coast. Of course they are. #emph[Drown] . Drawn. I was drawn, to this particular one. That's where I saw it." "Saw what?" "The moon!" he said. She glanced out the window and raised an eyebrow. The moon was hidden behind rain clouds, but her point was clear. "Not #emph[that] moon," he said. "The other moon. Invisible...but I saw...doesn't matter. There were angels flying around. Zombies, too. I mean, the angels were flying. They were—uh, the zombies—were building some huge stone structure, angels wheeling in the sky, and I thought—I thought—since you'd tried to keep me from going to Markov Manor...and I know how much you're worried about the Veil. Enough to try something really...crazy." He stared at her, eyes suddenly clear. "It's full of ghosts," he said. "Souls. And you want to be rid of the ghosts but keep their power for yourself. And if there's one thing they know about here, it's ghosts—" Her throat tightened, and for a moment she thought he really had read her mind. Then he snapped his head to one side, where there was nothing but a silent zombie, holding him in place. "Shut up!" he hissed. "Geists, fine! Who cares?" "Who—" "Never mind!" he said. "These stone things are redirecting all this mana, and it's all going to this drownyard henge, and the zombies are building it and the angels are going mad and you hate angels and you might...you might need a lot of mana. To be rid of the Chain Veil, or to alter it somehow. That makes sense. Doesn't it?" "No," she said. "It doesn't make any sense, and you're not acting like yourself." It wasn't that unlike Jace, really, to get over-involved in a particularly enticing mystery. But no matter how deep he got, he maintained some measure of control—of himself and his powers, if not of the situation. And the one time she'd seen him lose control, he'd ended up putting himself under a mental lockout that took half a year and the death of a friend to snap him out of. Jace was a very powerful telepath. If he went mad, he'd take her with him. Among others. "Don't experiment with the Veil," he said. "Don't do it. So many voices. So many souls. You don't know what you might unleash." "I—" "Tell me you won't experiment with the Veil." #figure(image("008_Liliana's Indignation/05.jpg", width: 100%), caption: [The Chain Veil | Art by <NAME>], supplement: none, numbering: none) She knelt down next to him and tried to hold his attention. She didn't want to touch him. She was, in fact, afraid of him. Nonetheless, she cupped his chin, made him look at her. He blinked and flinched. "Jace," she said quietly. "What happened to you out there?" "Nothing," he said. "Everything. Nothing #emph[happened] . Everything was already like this." He tried to turn his head, but she held him in place until he was forced to look at her. She stared into eyes that were not quite the eyes she knew. "You really didn't do this?" he said. "I really didn't." "Oh, thank #emph[gods] ," he said. He slumped forward, and her zombies let go of him. Liliana gently laid his head in her lap, running her fingers through his hair, thinking fast. She had to keep him here. Had to get him to a healer, or maybe a geistmage—to someone, anyone, who could untangle whatever had happened to his mind. He wouldn't be safe until she did, and neither would she. "You need some rest," she said. "Some time to think. And a bath, if you don't mind me saying so." He pushed her hand off of his head and sat up. She rested her hand on his on the stone floor, trying to anchor him. Trying to keep him here. "No time," he said. "If it's not you—" "It's not like you to go running off on a hunch," said Liliana. Keep him focused. Keep him here. "I know people here. I have access to resources you don't. If this drownyard you saw is connected to what's happening with the angels, we can uncover it." "'The shepherd turns on her flock.'" said Jace. He meant Avacyn. Avacyn had turned on her own, had unleashed violence and cruelty that seemed to shock everyone besides Liliana. "Is that from your book?" said Liliana. Jace looked at her, eyes suddenly focused again. He pulled his hand back and clutched the book on his belt. "You don't get to read it." "I don't want—" said Liliana, then decided on honesty. "I won't." "I have to go to Thraben," he said. "What?" "Thraben," he said. "That's where the cathedral is, right? That's where I'll find Avacyn." "You can't just walk up to Avacyn and demand answers," said Liliana. "Especially not now. She will kill you." #emph[And I'm not sure she'd be wrong, at this point. ] That grim calculation still stung, and Liliana took a measure of comfort in that. "Thraben," he said firmly. "Have you been there?" "Yes." Been there, seen it, sacked it with an army of zombies. She wasn't keen on going back. "Will you—" "No," she said. "I'm not going with you. Jace, be sensible. Stay here. We'll make inquiries. We'll find out what's really going on." "We," echoed Jace. He staggered to his feet, looming over her as lightning flashed and thunder boomed. She let him. "You and I are not a #emph[we] ," he said. "You're trying to keep me here." She rose, smoothly, and looked him in the eye. "You got me," she said. "I am trying to keep you here. Because you need help, and I want to help you." "You want to help me," he said, "but only if I'll stay with you. Only as long as it's convenient. That about sums things up, doesn't it?" There was only so much of this she could take. Her right hand flared with necromantic energy, acrid and purple-white. "Right now," she said, "the most #emph[convenient] thing I could possibly do is strike you dead and stop worrying what kind of violence you're going to stir up by shouting accusations at an insane archangel." He stepped closer, grabbed her wrist—had he ever grabbed her wrist like that?—and pointed her glowing palm at his chest. "Do it," he said. His voice was hoarse and wild. It wouldn't be the worst thing she'd ever done. End the threat. End the uncertainty. If their situations were reversed, she knew he'd at least consider it. "You ever have a pet when you were a kid?" she asked instead. "A mouse or something?" Her hand still crackled with carefully contained necromancy. "I...I don't remember when I was a kid. Much anyway." He glanced down at her hand in almost childlike confusion. "W-why?" "Humor me," she said. "You must have taken care of an animal at some point." "There was...a dog," he said. "In Ovitzia. I fed her scraps. Scratched her head when I went by." "What happened to the dog?" "One day I came by and she was—" He stopped, swallowed, blinked. "Why are you asking me this?" "How did you #emph[feel] ?" "Sad," he said. "Pretty devastated, actually, for a while. But I—I got over it, obviously." "Why?" "Because...because I always knew it was going to end that way. Didn't think about it, but I knew. I—Lili, #emph[why?] " "Because that's how I'll feel when you're dead, you idiot," she said. "Sad. For a while. And then I'll get over it. Because I always knew it was going to end that way. So don't lean too hard on my good intentions toward you. One of these days you'll find they no longer support your weight." He let go of her wrist and stepped back. "I'm probably going to die in Thraben," he said. "Sorry in advance for that. But somebody has to know what's going on." Jace turned and walked away. She watched him go, then peered out the rain-streaked window as his hooded shape slipped into the shadows outside her manor. "Mistress," said a rasping voice from the stairwell. Gared, his name was. With his hunched back and different-sized eyes, he did a fair impression of a homunculus. #figure(image("008_Liliana's Indignation/06.jpg", width: 100%), caption: [Behind the Scenes | Art by David Gaillet], supplement: none, numbering: none) She turned, trying not to look startled. "How long have you been watching?" "Oh, a while," croaked the squat figure, tapping a finger against his engorged right eyeball. "S'what I do around here, mostly." "So he could've read your mind?" "Oh, no, Mistress. Haven't got one. Master says so, anyway." He cackled inanely. "Fine," said Liliana. "Is it time?" "The Master bids you come to the tower," said Gared, head bobbing. "Storm's in full swing. He needs the Object." She snorted. Gared turned and ambled toward the stairs. "I wish you'd call it what it is," she said. "<NAME> is a man of learning," said Gared. "He wishes to remain detached from the, ah, poetry of the situation. What does it chain, hmm? What does it veil? You? #emph[Them] ?" "Shut up," said Liliana. But she followed. "Yes, Mistress," said Gared, with no greater deference. "That's the rest of what I do around here, mostly." Liliana followed the lurching figure to the stairwell of the high tower. She pulled the Chain Veil from her pocket and glanced to the window, thinking of Jace, unsure whether to worry for him or fear him. On a branch, in silhouette, a raven croaked its reproach. Then lightning flashed, thunder boomed, and the raven was gone. Liliana walked upward, into darkness. #figure(image("008_Liliana's Indignation/07.jpg", width: 100%), caption: [Crow of Dark Tidings | Art by Tianhua X], supplement: none, numbering: none)
https://github.com/Error-418-SWE/Documenti
https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/1%20-%20Candidatura/Valutazione%20capitolati/Valutazione%20Capitolati.typ
typst
#block[ ERROR\_418 \ DOCUMENTAZIONE PROGETTO \ #block[ #figure( align(center)[#table( columns: 2, align: (col, row) => (left,left,).at(col), inset: 6pt, [Mail:], [<EMAIL>], [Redattori:], [<NAME>, <NAME>], [Verificatori:], [<NAME>, <NAME>, <NAME>], [Amministratori:], [<NAME>, <NAME>], [Destinatari:], [<NAME>, <NAME>], )] ) ] ] = Valutazione Capitolato Scelto, C5 – WMS3: Warehouse Management 3D <valutazione-capitolato-scelto-c5-wms3-warehouse-management-3d> == Descrizione <descrizione> - Proponente: - Sanmarco Informatica S.p.a. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Creare un ambiente 3D che permetta la gestione di un magazzino. Lo scopo di questo capitolato è quello di fornire un modo nuovo per visualizzare un magazzino tramite il 3D, controllare la posizione di materiali e scaffalature con la possibilità di modificarne la posizione. Il proponente richiede che il programma permetta sessioni volatili senza persistenza delle modifiche \(lo spostamento di un elemento nel magazzino viene gestito tramite una notifica inviata ai magazzinieri che noi applichiamo sotto forma di API in modo che sia poi il richiedente ad integrarla con i suoi sistemi). == Dominio Tecnologico <dominio-tecnologico> L’azienda \(all’interno del capitolato e nel meeting privato con il nostro gruppo) lascia molta libertà in merito alle tecnologie da utilizzare. Per quanto riguarda lo sviluppo dell’ambiente 3D suggerisce: - Three.js; - Unity; - Unreal. Anche per quanto riguarda la scelta del database l’azienda lascia libertà decisionale suggerendo comunque l’uso di un dabase relazionale. == Motivazione della Scelta <motivazione-della-scelta> - L’idea è molto originale, utile e permette di esplorare ambiti poco conosciuti come la modellazione 3D; - La libreria Three.js risulta molto interessante e moderna, tenendo conto anche del supporto che l’azienda può fornire in quanto specializzata su di essa; - L’azienda è sembrata molto disponibile, come mostratosi dalle risposte tempestive dateci negli ultimi giorni, difatti metterà a disposizione figure di diverso livello in modo tale da poter rispondere nella maniera più appropriata alle nostre esigenze, come detto durante la giornata di presentazione dei capitolati. == Conclusioni <conclusioni> Nonostante i dubbi iniziali, la proposta offerta da Sanmarco Informatica S.p.a. ha cominciato sempre di più ad interessarci, complice anche la disponibilità, simpatia e competenza del referente che ci ha offerto subito l’opportunità di un incontro per chiarire i punti non chiari del capitolato. La possibilità di lavorare con un ambiente 3D è stimolante e sono chiare le possibili applicazioni reali. = Valutazione C1 – Knowledge Management AI <valutazione-c1-knowledge-management-ai> == Descrizione <descrizione-1> - Proponente: - azzurrodigitale. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Semplificare la consultazione di informazioni all’interno di un’azienda. Il capitolato punta a semplificare la consultazione di diverse tipologie di informazioni aziendali sfruttando un’intelligenza artificiale, il cui training avverrà grazie API di terze parti. In particolare si richiede lo sviluppo di una piattaforma web all’interno della quale sarà possibile caricare, consultare ed eliminare i documenti \(che verranno poi indicizzati) e utilizzare una chat per interagire con il motore di intelligenza artificiale. == Dominio Tecnologico <dominio-tecnologico-1> L’azienda consiglia alcune tecnologie sia per la parte legata alla creazione della piattaforma web che per la parte di elaborazione dei documenti e API per l’intelligenza artificiale. Le tecnologie consigliate sono le seguenti: - Node.js; - Angular; - OpenAI; - LangChain. == Conclusioni <conclusioni-1> Il capitolato risulta essere interessante per l’adozione di tecnologie innovative e in particolare per l’ampio raggio d’uso del prodotto che propone, in quanto risulta essere molto utile in diversi ambienti di lavoro. Ad esempio potrebbe essere utilizzato sia in una postazione d’ufficio per richiedere informazioni di carattere amministrativo, che in una postazione all’interno di una fabbrica per comprendere il funzionamento di un determinato strumento. = Valutazione C2 – Sistemi di Raccomandazione <valutazione-c2-sistemi-di-raccomandazione> == Descrizione <descrizione-2> - Proponente: - Ergon Informatica. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Utilizzare il machine learning per creare un sistema di raccomandazione. In questo capitolato si vuole creare un sistema di raccomandazione che usi il machine learning per migliorare le sue funzionalità. Il prodotto sarà composto da: - Un database che raccoglie tutti i dati relativi al comportamento dei clienti, e quindi anche i prodotti a loro correlati; - Il sistema di raccomandazione, che utilizza i dati del database; - Un’interfaccia utente che permetta di visualizzare i primi $N$ prodotti correlati a un dato utente oppure i primi $N$ clienti correlati a un dato prodotto. Questo sistema dovrà quindi calcolare e stimare le correlazioni tra clienti e prodotti, ma anche tra clienti stessi, in modo da utilizzare queste correlazioni anche per gestire le correlazioni sui prodotti. == Dominio Tecnologico <dominio-tecnologico-2> Risulta esserci molta scelta per quanto riguarda le tecnologie, dato che l’azienda ne propone diverse lasciando anche la libertà di adottarne altre. \ Per quanto riguarda il database vengono consigliati: - Sql Server Express; - MySql; - MariaDB. Per il sistema di raccomandazione: - ML.NET; - Surprise \(libreria Python). Mentre per l’interazione tra database e applicativo vengono consigliate: - Entity Framework \(ORM), in caso si usi ML.NET; - ODBC, in caso si usi Surprise; - Middleware, ad esempio JSON, se si vuole l’indipendenza del sistema dal database. L’azienda, inoltre, rende possibile la condivisione di un set di dati da usare per l’apprendimento del modello di machine learning. == Conclusioni <conclusioni-2> La logica alla base del capitolato è molto complessa, e inoltre le capacità del gruppo risultano essere non allineate. Tutto ciò ha fatto pensare che la scelta di questo capitolato avrebbe portato a una situazione in cui il tempo di studio richiesto per la piena comprensione delle tecnologie e del capitolato in sé avrebbe causato un rallentamento considerevole del ritmo di lavoro. = Valutazione C3 – Easy Meal <valutazione-c3-easy-meal> == Descrizione <descrizione-3> - Proponente: - Imola Informatica. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Web app per migliorare l’esperienza culinaria nei ristoranti. Imola Informatica propone lo sviluppo di EasyMeal, una web app innovativa che vuole trasformare il settore dei ristoranti, semplificando la prenotazione e l’esperienza culinaria per gli utenti. \ I clienti possono anticipare l’esperienza culinaria creando il proprio ordine da qualsiasi luogo in base alle proprie esigenze, allergie e preferenze alimentari, oltre che specificando l’orario di arrivo nel locale. L’applicazione facilita l’interazione con lo staff del ristorante, consente la divisione del conto tra i partecipanti e contribuisce a ridurre lo spreco alimentare grazie a una pianificazione della spesa più precisa. Includendo funzionalità come la registrazione, la prenotazione di tavoli, l’ordinazione collaborativa dei pasti, l’interazione con il personale del ristorante, la divisione del conto, la consultazione delle prenotazioni da parte dei ristoratori e la possibilità di inserire feedback e recensioni, EasyMeal si propone di offrire una convenienza, personalizzazione ed efficienza superiori sia ai clienti che ai ristoratori. == Dominio Tecnologico <dominio-tecnologico-3> Il proponente non fornisce tecnologie particolari e lascia libertà di scelta. L’unico vincolo imposto è che venga sviluppata un’applicazione web responsive \(PC, iOS e Android). == Conclusioni <conclusioni-3> Lo sviluppo di un’applicazione sia per iOS che Android risulta essere molto interessante, e sono state apprezzate la precisione con cui sono stati presentati i requisiti e l’alta disponibilità da parte dell’azienda anche per quanto riguarda gli incontri periodici per monitorare l’avanzamento del progetto. Il numero di richieste minime risulta però essere elevato e rischia di portare a tempi di sviluppo molto lunghi. = Valutazione C4 – A ChatGPT plugin with Nuvolaris <valutazione-c4-a-chatgpt-plugin-with-nuvolaris> == Descrizione <descrizione-4> - Proponente: - Nuvolaris. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Creare un plugin di ChatGPT usando Nuvolaris serverless. Il capitolato si propone di ridurre, tramite IA, la barriera in ingresso per la gestione di setup di cloud computing complessi e normalmente riservati ad utenti esperti. \ Il capitolato prevede lo studio e l’utilizzo di diverse tecnologie per ottenere: - Costruzione e utilizzo di plugin di ChatGPT; - Automatizzazione della costruzione e modifica di applicazioni in base alla richiesta dell’utente; - Una serie di template da cui poi verranno generate le applicazioni richieste; - Corretta gestione e modifica automatica dei file di configurazione per la generazione delle applicazioni. == Dominio Tecnologico <dominio-tecnologico-4> ChatGpt, Nuvolaris, Redis, in base al tipo di applicazione possono variare le tecnologie utilizzate, ad esempio per applicazioni CRUD si può usare SQL. == Conclusioni <conclusioni-4> Il capitolato non risulta chiarissimo nella proposta, sono state necessarie delle mail all’azienda per chiarire alcuni punti non chiarissimi che sono arrivate molto celermente. In generale uno dei motivi per cui abbiamo faticato nel capire la proposta di Nuvolaris è che i membri del team non si sono mai trovati a dover interagire con Docker o Kubernetes. \ L’azienda mette a disposizione molte risorse quali: account ChatGPT Pro, documentazione, ambiente Nuvolaris dedicato e completo in cloud. = Valutazione C6 – SyncCity: Smart city monitoring platform <valutazione-c6-synccity-smart-city-monitoring-platform> == Descrizione <descrizione-5> - Proponente: - SyncLab. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Creare una piattaforma che rappresenti in una serie di dashboard dati provenienti da molti sensori per il monitoraggio della qualità della vita di una città. L’azienda propone lo sviluppo di una piattaforma che rappresenti una serie di dati ricavati da diversi sensori collocati in una città \(questi dati devono essere opportunamente simulati o ottenuti da sensori reali) in modo da rappresentarne lo stato di salute. Il capitolato prevede lo studio e l’utilizzo di diverse tecnologie per ottenere: - Implementazione di Simulatori di dati con documentazione relativa; - Configurazione del database per lo storage dei dati; - Piattaforma di stream processing mediante invio di dati a Kafka; - Sviluppo di una dashboard a fini di consultazione dei dati raccolti mediante Grafana; - Testing con copertura \>\= 80%. Il proponente nomina come informazioni da rappresentare per esempio: - Temperatura, espressa in °C; - Polveri sottili, espressa in $mu g \/ m c$; - Umidità, espressa in percentuale; - Livello dell’acqua nella zona d’installazione del sensore; - Guasti elettrici, 0 o 1 in caso si verifichi un interruzione della corrente nella zona d’installazione del sensore; - Riempimento dei vari conferitori di un isola ecologica, 0 o 1 a seconda se sia piena o meno. == Dominio Tecnologico <dominio-tecnologico-5> L’azienda suggerisce come tecnologie da impiegare: - Script Pyton \(o altri linguaggi) e librerie per la generazione dati per ottenere una simulazione dati realistica; - Per lo stream processing: Apache Kafka; - Per lo storage dei dati: ClickHouse \(database colonnare); - Per il data visualization: Grafana. == Considerazioni <considerazioni> Interessante applicazione IoT, la possibilità di modellare dei dati rappresentandoli in un ambiente che mostra lo stato di salute di una città è appassionante e in linea con i bisogni moderni degli utenti sempre più attenti alla salute. I requisiti sono chiari e ben esposti e lo stack tecnologico ben definito ma comunque flessibile, il capitolato è in generale completo ed esaustivo. = Valutazione C7 – ChatGPT vs BedRock developer analysis <valutazione-c7-chatgpt-vs-bedrock-developer-analysis> == Descrizione <descrizione-6> - Proponente: - Zero12. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Utilizzare il machine learning per produrre epic e user stories automaticamente. L’obiettivo prefissato dal capitolato è la realizzazione di un applicativo in grado di analizzare i requisiti di business e il codice sorgente al fine di produrre epic&user stories, mediante l’utilizzo di sistemi come ChatGPT e AWS BedRock. Il capitolato pertanto si concentra sull’utilizzo di sistemi di comprensione e analisi testuali sfruttando le capacità dell’emergente tecnologia dell’intelligenza artificiale. Una volta generate le epic&user storie, la verifica di correttezza e completezza dovrà avvenire manualmente tramite la webapp, dando la possibilità all’utente di visualizzarle e valutarle. Il capitolato prevede lo studio e l’utilizzo di diverse tecnologie per ottenere: - Middleware in grado di ricevere in input requisiti di business e codice sorgente per la produzione di epic&user stories; - Plugin per VisualStudio Code; - Plugin per Apple XCode; - Sviluppo modulare dell’applicativo in modo da poter confrontare il sistema utilizzando ChatGPT rispetto a AWS BedRock; - Architettura basata su micro-servizi. == Dominio Tecnologico <dominio-tecnologico-6> Tecnologie consigliate: - Gestione del container: AWS Fargate; - Per lo storage dei dati: MongoDB; - Sviluppo di API: NodeJS; - Linguaggio per lo sviluppo del plugin per XCode: Python; - Linguaggio per lo sviluppo del plugin per VisualStudio Code: Typescript. == Conclusioni <conclusioni-5> Si tratta di un prodotto dedicato agli sviluppatori, difficile da testare il grado di correttezza dell’output, XCode richiede MacOS \(ma Zero12 fornirebbe computer nella loro sede), forte carattere esplorativo, sarebbe un primo approccio ad AWS \(standard di settore), crediti AWS inclusi. = Valutazione C8 – JMAP: il nuovo protocollo per la posta elettronica <valutazione-c8-jmap-il-nuovo-protocollo-per-la-posta-elettronica> == Descrizione <descrizione-7> - Proponente: - Zextras. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Utilizzare il protocollo JMAP per realizzare un’applicazione per lo scambio di email. Il capitolato si propone di esplorare nuovi sviluppi nella comunicazione e-mail, probabilmente la tecnologia di comunicazione più utilizzata al mondo. Per farlo bisogna lavorare con il protocollo JMAP che dovrà sostituire il protocollo IMAP precedentemente utilizzato per queste applicazioni. Scopo di tale lavoro è, da parte del proponente, capire se ha senso investire tempo e denaro per estendere questo standard in Carbonio, un servizio di collaborazione che offre un’insieme di funzionalità con focus principale sulla gestione delle email. \ È previsto lo sviluppo di un servizio che permetta: - Invio e ricezione di mail; - Gestione, eliminazione, condivisione di una cartella; - Gestione dei contenuti delle cartelle. Opzionalmente anche l’implementazione di un sistema di sincronizzazione che permetta ad un client di mantenersi aggiornato con gli ultimi aggiornamenti della casella di posta visualizzata, contenente anche Calendari, Rubriche contatti, contatti e appuntamenti. Altri vincoli da rispettare: - Il servizio sviluppato deve essere eseguibile in un sistema container; - Il servizio sviluppato deve essere scalabile mediante l’inizializzazione di più nodi stateless; - Opzionalmente aggiungere stress test che riescano a misurare le performance della soluzione. == Dominio Tecnologico <dominio-tecnologico-7> Tecnologie consigliate: - Linguaggio di programmazione: Java; - Librerie per l’implementazione del protocollo JMAP: iNPUTmice o jmap; - Sistema per gestione container: Docker. == Conclusioni <conclusioni-6> Capitolato di carattere esplorativo basato su standard recenti, è un lavoro basato sul protocollo e non su applicazione, il quale tenta di innovare il servizio email. La documentazione fornita è estensiva e il supporto è fornito direttamente dal development team di Carbonio. È interessante la possibilità di valutare le performance tramite stress test. = Valutazione C9 – ChatSQL: creare frasi SQL da linguaggio naturale <valutazione-c9-chatsql-creare-frasi-sql-da-linguaggio-naturale> == Presentazione <presentazione> - Proponente: - Zucchetti. - Committente: - Prof. <NAME> e Prof. <NAME>. - Obbiettivo: - Sviluppare un’applicazione che permetta di generare prompt di testo utili alla creazione di comandi SQL. == Descrizione del capitolato <descrizione-del-capitolato> Il proponente chiede di sviluppare un’applicazione che permetta di generare, immettendo una richiesta in linguaggio naturale e il database \(o parte di esso) in un modello di machine learning adeguatamente istruito, una frase anch’essa in linguaggio naturale, la quale attraverso l’utilizzo di ChatGPT possa generare i comandi SQL richiesti. L’applicazione deve svolgere quindi i seguenti compiti: - Archiviazione della descrizione della struttura di un database, possibilmente commentata in tutte le sue parti; - Maschera di richiesta di una frase di interrogazione del database in linguaggio naturale; - Procedura che combina la richiesta di interrogazione con le informazioni della struttura del database creando un "prompt" che sottoposto ad un sistema di AI fornisce l’interrogazione equivalente al linguaggio naturale in linguaggio SQL. == Dominio Tecnologico <dominio-tecnologico-8> Il proponente non pone vincoli sulle tecnologie da utilizzare, ma suggerisce, riguardo i Large Language Model, l’utilizzo di ChatGPT, Palm o LLaMa. == Conclusioni <conclusioni-7> Sono emersi dubbi su come valutare i prompt generati e ci si è soffermati su come elaborare il dataset per ricavare le informazioni necessarie alla creazione del prompt. Interessante l’utilizzo di tecnologie attuali come le intelligenze artificiali e la possibilità di fare training di modelli di machine learning, in questo aiuta la flessibilità nella scelta dei modelli di Large Language Model a supporto.
https://github.com/ivaquero/book-control
https://raw.githubusercontent.com/ivaquero/book-control/main/A-傅立叶变换.typ
typst
#import "@local/scibook:0.1.0": * #show: doc => conf( title: "附录A:Fourier 变换", author: ("ivaquero"), header-cap: "现代控制理论", footer-cap: "github@ivaquero", outline-on: false, doc, ) = 三角函数 <三角函数> == 函数的正交 <函数的正交> #definition[ 对向量$𝒙, 𝒚 in ℝ^n$,$x$和$y$的点积,定义为其对应坐标乘积之和,即 $ 𝒙⋅𝒚 = ∑_(i=1)^n x_i y_i $ ] 向量正交时,有 $ 𝒙⋅𝒚 = 0 ↔ 𝒙 ⊥ 𝒚 $ 对两个连续函数$f(x)$和$g(x)$,其内积可表示为 $ ∫_a^b f(x) g(x) dd(x) $ 若两函数正交,则该积分的值为$0$。 == 三角函数的正交 <三角函数的正交> 如下集合,构成一个三角函数系 $ {1, cos θ, sin θ, cos 2 θ, sin 2 θ, …, cos n θ, sin n θ, … n in ℕ_+} $ - 正交性质 1 $ & ∫_(-π)^π sin n x = 0\ & ∫_(-π)^π cos n x = 0\ & ∫_(-π)^π sin n x cos m x dd(x) = 0 $ - 正交性质 2 $ & ∫_(-π)^π sin n x sin m x dd(x) = 0 & n ≠ m\ & ∫_(-π)^π cos n x cos m x dd(x) = 0 & n ≠ m $ #tip[ 利用积化和差公式,可证。 ] = 周期为 2π 的函数 <周期为-2π-的函数> == 构建函数 <构建函数> 对周期为$2π$的函数 $ f(x) = f(x + 2π) $ 利用三角函数构造函数 $ f(x) &= ∑_(n = 0)^∞ a_n cos n x + ∑_(n = 0)^∞ b_n sin n x\ &= a_0 + ∑_(n=1)^∞ a_n cos n x + ∑_(n=1)^∞ b_n sin n x $ == $a_0$ <a_0> $ ∫_(-π)^π f( x ) dd(x) &= ∫_(-π)^π a_0 dd(x) + ∫_(-π)^π ∑_(n=1)^∞ a_n cos n x dd(x) + ∫_(-π)^π ∑_(n=1)^∞ b_n sin n x dd(x)\ &= a_0 ∫_(-π)^π dd(x)\ &= 2π a_0 → π a_0 $ 故有 $ a_0 = 1 / π ∫_(-π)^π f(x) dd(x) $ == $a_n$和$b_n$ <a_n和b_n> 等式两边乘以$cos n x$ $ ∫_(-π)^π f(x) cos n x dd(x) &= ∫_(-π)^π a_0 / 2 cos n x dd(x) + ∫_(-π)^π ∑_(n=1)^∞ a_n cos n x cos n x dd(x) + ∫_(-π)^π ∑_(n=1)^∞ b_n sin n x cos n x dd(x)\ &= ∫_(-π)^π ∑_(n=1)^∞ a_n cos n x cos m x dd(x) $ 故有 $ ∫_(-π)^π f(n) cos n x dd(x) = a_n ∫_(-π)^π cos^2 x dd(x) = π a_n $ 即 $ a_n = 1 / π ∫_(-π)^π f(n) cos n x dd(x) $ 类似地,等式两边乘以$sin n x$,可得 $ b_n = 1 / π ∫_(-π)^π f(n) sin n x dd(x) $ = 周期为 2L 的函数 <周期为-2l-的函数> == 构建函数 <构建函数-1> 对周期为$2L$的函数 $ f(t) = f(t + 2L) $ 令 $x = π/L t$,得 $ f(t) = f(L / π x) ≡ g(x) $ 从而可得 $ g(x) = g(x + 2π) $ == 求系数 <求系数> 由之前的结论,可得 $ g(x) = a_0 / 2 + ∑_(n=1)^n (a_n cos n x + b_n sin n x) $ 将$x$回代,得 $ cos n x &= cos frac(n π, L) t\ sin n x &= sin frac(n π, L) t $ 由 $ ∫_(-π)^π dd(x) = ∫_(- L)^L d π / L t $ 得 $ 1 / π ∫_(-π)^π dd(x) &= 1 / π π / L ∫_(- L)^L dd(t)\ &= 1 / L ∫_(- L)^L dd(t) $ 最终有 $ f(t) = a_0 / 2 + ∑_(n=1)^∞ (a_n cos frac(n π, L) t + b_n sin frac(n π, L) t) $ 其中, $ a_0 &= 1 / L ∫_(- L)^L f(t) dd(t)\ a_n &= 1 / L ∫_(- L)^L f(t) cos frac(n π, L) t dd(t)\ b_n &= 1 / L ∫_(- L)^L f(t) sin frac(n π, L) t dd(t) $ == 工程调整 <工程调整> 工程中,因为时间总为正数,故令$t_0 = 0$,周期为$2 T$,则有 $ ω = π / L = frac(2π, T) $ 同时 $ ∫_(- L)^L dd(t) → ∫_0^(2L) dd(t) → ∫_0^T dd(t) $ 此时,有 $ & a_0 = 2 / T ∫_0^T f(t) dd(t)\ & a_n = 2 / T ∫_0^T f(t) cos n ω t\ & b_n = 2 / T ∫_0^T f(t) sin n ω t $ = Fourier 级数 <fourier-级数> == 复数形式 <复数形式> 由 Euler 公式,可知 $ cos θ &= 1 / 2(e^(i θ) + e^(- j θ))\ sin θ &= -1 / 2(e^(i θ) - e^(- i θ)) $ 回代入之前的周期函数公式,得 $ f(t) &= a_0 / 2 + ∑_(n=1)^∞ ( a_n cos frac(n π, L) t + b_n sin frac(n π, L) t )\ &= a_0 / 2 + ∑_(n=1)^∞ (a_n 1 / 2(e^(i n ω t) + e^(-i n ω t))) - 1 / 2 i b_n (e^(i n ω t) - e^(-i n ω t))\ &= a_0 / 2 + ∑_(n=1)^∞ frac(a_n - i b_n, 2) e^(i n ω t) + ∑_(n=1)^∞ frac(a_n + i b_n, 2) e^(-i n ω t) $ 令第二项中的$n ≡ - n$,则 $ f(t) &= ∑_(n = 0)^0 a_0 / 2 e^(i n ω t) + ∑_(n=1)^∞ frac(a_n - i b_n, 2) e^(i n ω t) + ∑_(n = -∞)^(-1) frac(a_(- n) + i b_(- n), 2) e^(i n ω t)\ &= ∑_(-∞)^∞ C_n e^(i n ω t) $ 对$C_n$,有 $ C_n = cases(delim: "{", a_0/2 & n = 0, frac(a_n - i b_n, 2) & n = 1\, 2\, 3\, 4\, …, frac(a_(- n) + i b_(- n), 2) quad & n = -1\, -2\, -3\, -4\, …) $ 分别展开,整理得 $ C_n = 1 / T ∫_0^T f(t) e^(-i n ω t) dd(t) $ == 汇总 <汇总> 综上猜想,任意周期函数都可写成三角函数之和 对周期函数分解 $ f(x) = frac(f(x) + f(-x), 2) + frac(f(x) - f(-x), 2) = f_("even") + f_("odd") $ 可得 $ f(x) = a_0 / 2 + ∑_(n=1)^∞ ( a_n cos (frac(2π n, T) x) + b_n sin (frac(2π n, T) x) ), C ∈ ℝ $ 其中 $ a_n = 2 / T ∫_(- T \ 2)^(T \ 2) f(x) cos frac(2 n π, T) x dd(x)\ b_n = 2 / T ∫_(- T \ 2)^(T \ 2) f(x) sin frac(2 n π, T) x dd(x) $ = 常用变换 <常用变换> == 一般形式 <一般形式> 由 Fourier 级数的复数形式(频域形式) $ f_T(t) = ∑_(n = -∞)^∞ C_n e^(i n ω_0 t) $ 其中, $ C_n = 1 / T ∫_(- T / 2)^(T / 2) f_T(t) e^(- i n ω_0 t) dd(t) $ 此处,称$ω_0 = frac(2π, T)$为基频率。 当 Fourier 级数中的$T → ∞$,$f(t)$则不再是周期函数,此时需要寻找更一般的形式。 对如下频率 $ Δ ω = (n + 1) ω_0 - n ω_0 = ω_0 = frac(2π, T) $ $T$增大,则$Δ ω$减小。此处,令$1/T = frac(Δ ω, 2π)$,并将$C_n$表达式代入 Fourier 级数的复数表达式,得 $ f_T(t) = ∑_(n = -∞)^∞ frac(Δ ω, 2π) ∫_(- T / 2)^(T / 2) f_T(t) e^(- i n ω_0 t) dd(t) e^(i n ω_0 t) $ 当$T → ∞$,有 $ ∫_(- T / 2)^(T / 2) dd(t) & → ∫_(-∞)^(+∞) dd(t)\ n ω_0 & → ω\ ∑_(n = -∞)^∞ Δ ω & → ∫_(-∞)^(+∞) d ω $ #tip[ 变换 3 用到了黎曼和 ] 于是,有 $ f(t) = frac(1, 2π) ∫_(-∞)^(+∞) ∫_(-∞)^(+∞) f(t) e^(- i ω t) dd(t) e^(i ω t) d ω $ 其中,将如下积分称为 Fourier 变换 $ F(ω) = ∫_(-∞)^(+∞) f(t) e^(- i ω t) dd(t) $ 而将如下公式,称为 Fourier 逆变换 $ f(t) = frac(1, 2π) ∫_(-∞)^(+∞) F(ω) e^(i ω t) d ω $ == 与 Laplace 变换 <与-Laplace-变换> 令$s = i ω$,即可得 Laplace 变换 $ F(s) = ∫_(-∞)^(+∞) f(t) e^(- s t) dd(t) $ 由此,Fourier 变换为 Laplace 变换的一个特例,具有 Laplace 变换的所有性质。
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/linguify/0.1.0/linguify.typ
typst
Apache License 2.0
// linguify #let __lang_setting = state("lang-setting", "en"); #let __lang_dict = state("lang-dict", (default-lang: "en")); #let __lang_fallback = state("lang-fallback", true); #let linguify_config(data: auto, lang: "en", fallback: true, content) = { assert.eq(type(lang), str, message: "The lang parameter needs to be a string") __lang_setting.update(lang); if data != auto { assert.eq(type(data), dictionary, message: "The data parameter needs to be of type dict.") __lang_dict.update(data); } assert.eq(type(fallback), bool, message: "fallback can only be [true] or [false]") __lang_fallback.update(fallback) content } #let _get_default_lang(data) = { let default_lang = data.at("default-lang", default: "en") assert(default_lang in data, message: "No entry for the `default-lang` (" + default_lang + ") could be found in the lang data.") default_lang } #let linguify(key) = { locate(loc => { // get current state. let selected_lang = __lang_setting.at(loc) let data = __lang_dict.at(loc) let fallback = __lang_fallback.at(loc) // process. if (fallback) { let default_lang = _get_default_lang(data); if (not selected_lang in data) {selected_lang = default_lang} return data.at(selected_lang).at(key, default: data.at(default_lang).at(key)) } else { return data.at(selected_lang).at(key) } }) }
https://github.com/gongke6642/tuling
https://raw.githubusercontent.com/gongke6642/tuling/main/基础/基础总纲/基础.typ
typst
= 基础 = 基本类型和功能。 在这里,您将找到整数和字符串等基本数据类型的文档以及有关核心计算函数的详细信息。 = == 定义 #image("1.png", width: 95%) = #image("2.png", width: 95%)
https://github.com/kdog3682/2024-typst
https://raw.githubusercontent.com/kdog3682/2024-typst/main/src/cetz-setup.typ
typst
#import "@preview/cetz:0.2.0" #import cetz.draw: line, content #let canvas = cetz.canvas #let hpos(x1, x2, y: 0) = { return ((x1, y), (x2, y)) } #let vpos(y1, y2, x: 0) = { return ((x, y1), (x, y2)) } #let offset(point, x: 0, y: 0) = { x1 = point.at(0) + x y1 = point.at(1) + y return (x1, y1) } #let vline(a, b, x: 0, ..sink) = { let points = vpos(a, b, x: x) return line(..points, ..sink.named()) } #let hline(a, b, y: 0, ..sink) = { let points = hpos(a, b, y: y) return line(..points, ..sink.named()) } #let inline-canvas(fn, length: 1in) = { import "@preview/cetz:0.2.0" let c = cetz.canvas(length: length, fn(cetz.draw)) return box(attrs.get("inline-canvas"), c) }
https://github.com/QuadnucYard/touying-theme-seu
https://raw.githubusercontent.com/QuadnucYard/touying-theme-seu/main/examples/beamer-sms.typ
typst
MIT License
#import "@preview/touying:0.4.2": * #import "@preview/unify:0.6.0": num #import "/themes/seu-beamer.typ" as theme-seu #let s = theme-seu.register(aspect-ratio: "4-3") #let s = (s.methods.info)( self: s, title: [Sending out an SMS: Characterizing the Security of the SMS Ecosystem with Public Gateways], short-title: [Sending out an SMS], subtitle: [利用公共网关的SMS生态系统的安全性描述], author: [QuadnucYard], date: datetime.today(), institution: [Florida Institute for Cybersecurity Research (FICS)\ University of Florida], ) #let (init, slides, touying-outline, alert, speaker-note, tblock) = utils.methods(s) #show: init // #show strong: alert #let (slide, empty-slide, title-slide, outline-slide, new-section-slide, ending-slide) = utils.slides(s) #show: slides.with(title-slide: false) #title-slide(authors: [<NAME>, <NAME>, <NAME>, <NAME>, \ <NAME> and <NAME> \ #set text(size: 0.9em) {reaves, scaife, daveti, <EMAIL> \ {<EMAIL>nor, but<EMAIL> ]) #outline-slide() = 引言 == 引言 #tblock(title: [研究背景])[ - 短信息(SMS)成为现代通讯的重要组成部分 - 很多组织或网站使用短信息作为身份验证的辅助通道 - 现代短消息的发送,在抵达终端之前不接触蜂窝网络 ] #tblock(title: [主要工作])[ - 对SMS数据进行迄今为止最大的挖掘分析 - 评估良性短消息服务的安全态势 - 刻画通过SMS网关进行的恶意行为 ] #new-section-slide(short-title: [系统])[现代SMS生态系统] == 短消息服务中心(SMSC) #figure( image("figures/figure1.png", width: 90%), caption: [短消息服务中心], ) <fig:SMSC> *短消息服务中心*通过运营商网络路由消息,是SMS系统的核心。\ SMSC接受文本消息,并将消息转发到蜂窝网络中的移动用户。 == 外部短消息实体(ESME) #figure( image("figures/figure2.png", width: 90%), caption: [外部短消息实体], ) <fig:ESME> *外部短消息实体*为外部组织提供针对运营商网络的短消息接入服务。\ ESME可以用于紧急通报、慈善捐款、或接受一次性验证码等功能。 == OTT服务 #figure( image("figures/figure3.png", width: 90%), caption: [OTT服务], ) <fig:OTT> *OTT服务*支持在数据网络上提供短信和语音等第三方服务。\ OTT可以使用云服务来存储和同步SMS到用户的其他设备。 #new-section-slide(short-title: [方法])[研究方法与数据集特征] == 爬取公共短消息网关 #slide[ #set text(0.8em) - 使用Scrapy框架爬取公共网关 - 收集8个公共短信网关在14个月的数据 - 共抓取 #num(386327) 条数据 ][ #show table: set text(0.8em) #figure( table( columns: 2, [*Site*], [*Messages*], [receivesmsonline.net], [81313], [receive-sms-online.info], [69389], [receive-sms-now.com], [63797], [hs3x.com], [55499], [receivesmsonline.com], [44640], [receivefreesms.com], [37485], [receive-sms-online.com], [27094], [e-receivesms.com], [7107], ), caption: [公共网关及抓取的信息数], ) <tab:gateways> ] == 消息聚类分析 #tblock(title: [基本思路])[ - 使用编辑距离矩阵将类似的消息归于一张连通图中。 - 使用固定值替换感兴趣的消息,如代码、email地址。 - 查找归一化距离小于阈值的消息,并确定聚类边界。 ] #tblock(title: [实现步骤])[ + 加载所有消息。 + 用固定的字符串替换数字、电子邮件和URL以预处理消息。 + 将预处理后的信息按字母排序。 + 通过使用编辑距离阈值(0.9)来确定聚类边界。 + 手动标记各个聚类,以确定服务提供者、消息类别等。 ] == 消息分类结果 - *账户创建确认信息*:向来自服务提供者的用户提供了一个代码,该服务提供者需要在新帐户创建期间进行SMS验证。 - *活动确认信息*:向来自服务提供者的用户提供了请求授权进行活动的代码(例如,付款确认)。 - *一次性密码*:包含用户登录的代码的短信息。 - *用于绑定不同设备的一次性口令*:将消息发送给用户,以绑定一个新的电话号码或启用相应的移动应用程序。 - *重置密码口令*:包含密码重置密码的短信息。 - *其他*:其他未被指定为某种特定功能的消息。 == 消息分类结果 #slide[ #set text(0.8em) - 账户创建和移动设备绑定占比最大,占51.6% - 一次性密码信息占7.6% - 密码重置消息占1.3% - 包含“测试”关键词的消息占0.8% ][ #show table: set text(0.8em) #figure( image("figures/figure4.png"), caption: [消息的聚类], ) <fig:classification> ] #new-section-slide(short-title: [分析])[SMS使用情况分析] == 使用SMS作为安全信道 #tblock(title: [PII和其他敏感信息])[ - 财务信息 - 用户名和密码 - 重置密码口令 - 其他个人识别信息(PII) - 敏感程序的SMS活动 ] == 使用SMS作为安全信道 #tblock(title: [SMS编码熵])[ 使用 $chi^2$ 检验测试每组编码的熵。$chi^2$ 检验是一个零假设的显著性检验,用于测试SMS服务的编码是否是从低位到高位均匀分布的。若 $p$ 值小于 $0.01$,则表明观测值和理想均匀分布之间存在统计学上的显著差异。 检验结果表明,$65%$ 的SMS服务的编码熵较低,容易被预测和攻击。 ] #grid( columns: (1fr, 1fr, 1fr), figure( image("figures/figure6.png"), caption: [WeChat], ), figure( image("figures/figure7.png"), caption: [Talk2], ), figure( image("figures/figure8.png"), caption: [Google], ), ) == SMS的恶意应用 #tblock(title: [公共网关检测到的恶意信息])[ - *泄露用户位置信息*:短URL可以用于确定消息的源和目的地,即会泄漏用户的位置信息。 - *垃圾邮件宣传广告*:在公共网关服务中比例较低,约为1.0%。 - *网络钓鱼活动*:试图欺骗用户,使其相信自己正与合法网站通信。 ] #grid( columns: (1fr, 1fr, 1fr), figure( image("figures/figure9.png"), caption: [SMS地址分布], ), figure( image("figures/figure10.png"), caption: [钓鱼短信实例], ), figure( image("figures/figure11.png"), caption: [钓鱼网站], ), ) = 结论 == 结论 - SMS生态系统在智能手机时代出现了新的发展,加入了更多新的设备和参与者。 - 公共网关为用户提供了基于SMS的各种安全解决方案。 - 根据该研究,将SMS作为安全信道传递敏感信息存在一定的危险性。一些一次性的消息传递机制亟待改进。 - 至于短信滥用,公共网关可以用于规避一些安全性较差的认证机制,或进行PVA欺诈行为。 #ending-slide(title: [Thanks for Listening.])[ Touying theme for Southeast University https://github.com/QuadnucYard/touying-theme-seu Welcome Star and Fork! ]
https://github.com/zenor0/FZU-report-typst-template
https://raw.githubusercontent.com/zenor0/FZU-report-typst-template/main/fzu-report/utils/fonts.typ
typst
MIT License
#let 字号 = ( 初号: 42pt, 小初: 36pt, 一号: 26pt, 小一: 24pt, 二号: 22pt, 小二: 18pt, 三号: 16pt, 小三: 15pt, 四号: 14pt, 中四: 13pt, 小四: 12pt, 五号: 10.5pt, 小五: 9pt, 六号: 7.5pt, 小六: 6.5pt, 七号: 5.5pt, 小七: 5pt, ) #let 字体 = ( 仿宋: ("Times New Roman", "Noto Sans Mono CJK SC", "FangSong", "STFangSong"), 宋体: ("Fandolsong", "Times New Roman"), 黑体: ("FandolHei", "Noto Sans CJK SC", "Times New Roman",), 标题黑体: ("SimHei"), 标题宋体: ("Times New Roman", "STZhongsong", "Fandolsong"), 楷体: ("FandolKai", "Times New Roman", ), 代码: ("Cascadia Code", "Fira Code", "Alibaba PuHuiTi 3.0"), ) #let ziti = 字体 #let zihao = 字号 #let chineseunderline(s, width: 300pt, bold: false) = { // 来自 pku-thesis let chars = s.clusters() let n = chars.len() style(styles => { let i = 0 let now = "" let ret = () while i < n { let c = chars.at(i) let nxt = now + c if measure(nxt, styles).width > width or c == "\n" { if bold { ret.push(strong(now)) } else { ret.push(now) } ret.push(v(-1em)) ret.push(line(length: 100%, stroke: (thickness: 0.5pt))) if c == "\n" { now = "" } else { now = c } } else { now = nxt } i = i + 1 } if now.len() > 0 { if bold { ret.push(strong(now)) } else { ret.push(now) } ret.push(v(-0.9em)) ret.push(line(length: 100%, stroke: (thickness: 0.5pt))) } ret.join() }) } #let justify-words(s, width: none) = { assert(type(s) == str and s.clusters().len() >= 2) context { let measure-width = measure(s).width let expected-width = if width == none { 0pt } else if type(width) in (str, content) { measure(width).width.to-absolute() } else if type(width) == length { width.to-absolute() } let spacing = if measure-width > expected-width { 0pt } else { (expected-width - measure-width)/(s.clusters().len() - 1) } text(tracking: spacing, s) } }