repo
stringlengths
26
115
file
stringlengths
54
212
language
stringclasses
2 values
license
stringclasses
16 values
content
stringlengths
19
1.07M
https://github.com/saurabtharu/Internship-repo
https://raw.githubusercontent.com/saurabtharu/Internship-repo/main/Internship%20Report%20-%20typst/chapters/01-abstract.typ
typst
= ABSTRACT \ /* This report provides an overview of my DevOps Engineer internship at F1Soft International, where I was involved in setting up and managing CI/CD pipelines, automating deployment processes and implementing infrastructure solutions using bare-metal servers. During my time there I got to work with Kubernetes (K3s) for container orchestration and deploying applications along with SSL certification provisioning. Furthermore, among other things, I improved system reliability and performance through monitoring tools like Prometheus, Grafana and Uptime Kuma as well as focusing on security enhancements within the CI/CD pipeline and infrastructure. The internship taught me the true meaning of DevOps culture which is automation, collaboration and continuous learning. I worked hand in hand with both the development team and the operations team to ensure that there was a smooth transition between development and deployment workflows. This has been very helpful for me because it has added onto what I had already learnt practically about DevOps practices thereby preparing myself better for any other future employment opportunities within this field. */ The report provides an overview of the DevOps Engineer internship at F1Soft International, where involvement included setting up and managing CI/CD pipelines, automating deployment processes, and implementing infrastructure solutions using bare-metal servers. Kubernetes (K3s) was utilized for container orchestration and application deployment along with SSL certification provisioning. Furthermore, system reliability and performance were improved through monitoring tools like Prometheus, Grafana, and Uptime Kuma within the CI/CD pipeline and infrastructure. The true meaning of DevOps culture, which encompasses automation, collaboration, and continuous learning, was taught during the internship. Collaboration with both the development team and the operations team ensured a smooth transition between development and deployment workflows. This experience has been very helpful because it has built upon previous practical knowledge of DevOps practices, thereby providing better preparation for future employment opportunities within this field. *Keywords* : _DevOps, CI/CD, Automation, Bare-Metal Infrastructure, Kubernetes, Bash Scripting._ #pagebreak()
https://github.com/ofurtumi/hugbo-glosur
https://raw.githubusercontent.com/ofurtumi/hugbo-glosur/main/glosur2.typ
typst
#let glob_color = luma(110) #set text(font: "Arial", glob_color) #set text(font: "Virgil 3 YOFF", size: 10pt, glob_color) #set page(margin: (x: 16pt, y: 16pt)) #show math.equation: it => {text(font: "Virgil 3 YOFF", size: 7pt)[#it]} #show text.where(style: "italic"): it => text(size: 8pt, red, it) #show heading: it => text(luma(0), it) #show emph: it => text(luma(0), it) #set list(marker: none) #let note(heading, body) = { text(size: 12pt, heading, luma(0)) body } #columns(2, gutter: 4pt)[ == Requirments og ehv #note( "Epic:", [ a high-level grouping of features that represent a business goal.] ) #note( "Feature:", [ a capability of the project that fulfills one or more stakholder needs. Described in a short and concise way, fx. 'auto-filled suggestions when typing'. Features are the middle ground between #emph[needs] and #emph[requirements]] ) #note("Need:", [ a high-level goal that the stakeholder wants to achieve and the system should support, fx. "The search engine needs to deliver fast and accurate data so that they will choose to use it again".]) #note( "Requirement:", [ the form a feature need to take to fulfill it's need. fx. "as a user i want to be able to order the results i get by date"] ) #note( "User story:", [ as a #emph[role], I want #emph[feature] that #emph[reason] ] ) == Estimations og læti #note( "Acceptance criteria:", [ a set of conditions that need to be met for a feature to be considered complete. fx "The results can be ordered in both ascending and descending order of date" ] ) #note( "T-shirt sizing:", [ estimation of net business value against the effort required. Used in the #emph[initial] stages of a project to decide on the general project scope] ) #note( "Projection from counts:", [ use the number of features multiplied by the avarage time it took to complete them to estimate the time required to complete rest of the features. Use this method when you have a lot of similar features.] ) #note( "PERT (three point estimate):", [ use early in a project to get an estimate from an expert in the subject, ((BC + 4) \* ML + WC / 6) ] ) = Android UI #note( "Layout:", [ defines a set of UI #emph([widgets]) and their positions on screen. #emph([Widgets]) can include text, images, interactive elements or even other widgets. Together #emph([widgets]) form a #emph([view hierarchy]) via nesting (like in html). ] ) #note( "Activity:", [ controls user interaction with the UI, they can be thought of as controllers for the app. When an #emph([activity]) is instantiated its #emph([onCreate]) method is called. This is where the UI is inflated from an XML layout file. The #emph([setContentView()]) method is used to set the #emph([layout]) for the #emph([activity]).] ) #note( "Fragments: ", [ controllers for independent sections of an #emph([activity]). They can be used to create multi-pane UIs for tablets or to reuse UI components across multiple #emph([activities]). ] ) == Activity lifecycle og minni? #note( "Activity state", [ can be saved via the #emph([onSaveInstanceState(Bundle)]) to an activity record and then restored in the #emph([onCreate(Bundle)]) method from the same activity record ] ) #emph([savedInstanceState]) is a #emph([Bundle]) object that can be used to store data when an #emph([activity]) is destroyed and recreated. This is useful for storing data that should persist across #emph([activity]) instances, can only be access by the activiy that created it. However it can be destroyed to free memory at any time. == Persistant alternatives - #emph([Static media]), located in the #emph([resource]) folder, images, strings and such, cannot be modified - An environment file (#emph([sharedPreferences])), key value map of simple app specific values, can be modified - #emph([Cached data]), files in the app's private internal storage directory, can be modified - #emph([Dynamic unnstructured data]), files in other folders such as the #emph([external storage]) directory, can be modified - #emph([Dynamic structured data]), stored in a local SQLite database, can be modified - #emph([Remote data]), data stored on a server, can be modified - #emph([Room]), split into #emph([Entities]) (single columns), #emph([DAOs]) (data access objects) and #emph([Databases]) (collection of entities and DAOs), can be modified == Agile The manifesto for agile software development is based on 4 main values: - #emph([Individuals]) and #emph([interactions]) over _processes and tools_ - #emph([Working software]) over _comprehensive documentation_ - #emph([Customer collaboration]) over _contract negotiation_ - #emph([Responding to change]) over _following a plan_ == Technical debt quadrant #image("technical_debt_quadrant.png") #list( marker: none, [#emph[del/reck: ] debt incurred because of underestimation ], [#emph[del/prud: ] debt incurred after informed cost analysis ], [#emph[ind/reck: ] debt incurred because of a lack of knowledge], [#emph[ind/prud: ] debt incurred despite trying to avoid because new info surfaces into project] ) ] == Background work #note( "Persistent work", [ should use a #emph[WorkManager] ie. be scheduled, the definition of #emph[persistent] work is that it should stay scheduled even if the app is closed. If the work needs to be run immiediately it should be run on a specific #emph[Expidited] schedule for the #emph([WorkManager]). Since the work can be run even if the app is restarted we can add constrains to when it is run for example only when the battery is above a certain level. An example of this would be tracking GPS location in the background, the work should be run even if the app is closed and should be run at a specific time. #emph[Impersistent work] is more used than persistant work, it is work that does not persist between app restarts and can be run again anytime. Since this is more often than not network related work it should be run on a #emph[corutine] or a #emph[thread]. An example of an #emph[immediate impersistent] work would be sending the user a notification when a message comes in, once the notification is sent the work is done and does not need to be run again. ] ) #note( "Long running tasks", [ like downloads should be run on their own thread.] ) #note( "Deferrable tasks", [ tasks that can be run later, can be scheduled to run at a later time or when certain conditions are met, for example alarms. An #emph[impersistent deferrable] task would be updating fetching if there is new data from a server but waiting on updating said data untill the user interacts with the app ] ) == Patterns #note( "Iterator pattern", [ is used to traverse a container and access its elements without exposing its underlying representation. We use it to traverse different types of collections in a uniform way. We can create an #emph[iterator] that iterates over either an array or a linked list without changing the code that uses the iterator. ] ) #note( "Composite pattern", [ used to treat both singular and collections of objects uniformly. It is used to create a tree structure of objects. We can create a #emph[composite] object that can contain either a single object or a collection of objects. This allows us to treat both types of objects uniformly. ] ) #note( "Decorator pattern", [ is used to add functionality to an object without changing its structure. We can create a #emph[decorator] object that adds additional functionality to an existing object. This allows us to add new functionality to an object without changing the object itself. ] )
https://github.com/jassielof/typst-templates
https://raw.githubusercontent.com/jassielof/typst-templates/main/apa7/template/sections/computer-code.typ
typst
MIT License
= Computer code == Code block === Code block as a figure #figure( ```py def main(): print("Hello, World!") ```, caption: [Python code block], ) === Non-figure code block ```cs using System; public class Program { public static void Main(string[] args) { Console.WriteLine("Hello, World!"); } } class MyClass { public void MyMethod() { Console.WriteLine("Hello, World!"); } } Console.WriteLine("Long line of code that exceeds the width of the page and needs to be wrapped to fit within the margins of the document."); ``` === Parse file content #raw( read("../assets/src/main.py"), lang: "py", ) == Inline code Inline code can be inserted within a sentence, like this: `print("Hello, World!")`.
https://github.com/julyfun/jfmfoi
https://raw.githubusercontent.com/julyfun/jfmfoi/main/241005-树上图上动态规划/main.typ
typst
#import "@preview/touying:0.4.2": * #import "@preview/cetz:0.2.2" #import "@preview/ctheorems:1.1.2": * #import "@preview/fletcher:0.5.0" as fletcher: diagram, node, edge, shapes // cetz and fletcher bindings for touying #let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true)) #let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide) // Register university theme // You can replace it with other themes and it can still work normally #let s = themes.university.register(aspect-ratio: "16-9") // Set the numbering of section and subsection #let s = (s.methods.numbering)(self: s, section: "1.", "1.1") // Set the speaker notes configuration // #let s = (s.methods.show-notes-on-second-screen)(self: s, right) // [my] #set text( font: ("New Computer Modern", "Songti SC") ) #show strong: set text(weight: 900) // Songti SC 700 不够粗 // Global information configuration #let s = (s.methods.info)( self: s, title: [区间 DP 和环状 DP], subtitle: [], author: [方俊杰.SJTU], date: datetime.today(), institution: [交附闵分 OI], ) // Pdfpc configuration // typst query --root . ./example.typ --field value --one "<pdfpc-file>" > ./example.pdfpc #let s = (s.methods.append-preamble)(self: s, pdfpc.config( duration-minutes: 30, start-time: datetime(hour: 14, minute: 10, second: 0), end-time: datetime(hour: 14, minute: 40, second: 0), last-minutes: 5, note-font-size: 12, disable-markdown: false, default-transition: ( type: "push", duration-seconds: 2, angle: ltr, alignment: "vertical", direction: "inward", ), )) // Theorems configuration by ctheorems #show: thmrules.with(qed-symbol: $square$) #let theorem = thmbox("theorem", "Theorem", fill: rgb("#eeffee")) #let corollary = thmplain( "corollary", "Corollary", base: "theorem", titlefmt: strong ) #let definition = thmbox("definition", "Definition", inset: (x: 1.2em, top: 1em)) #let example = thmplain("example", "Example").with(numbering: none) #let proof = thmproof("proof", "Proof") // Extract methods #let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s) #show: init #show strong: alert // Extract slide functions #let (slide, empty-slide) = utils.slides(s) #show raw.where(lang: "cpp"): it => { set text(12pt) it } #set text(20pt) #show: slides // --- 以下为正文 = 安排 - 发送本文件 - 点击参与作业 - 完成一题后发样例代码 #let lin = line(length: 100%) #lin - 今日题单: - 没有上司的舞会 - 二叉苹果树 - 提前做完的同学做 [CTSC1997] 选课 - 跑路 - 绿豆蛙的归宿 - 采蘑菇 == P1352 没有上司的舞会 - 题意 10min #pause - 一个结点,要么邀请他,并且他的直接下属不能邀请,要么不邀请他,它的下属可以邀请 - 用 f[i] 表示邀请第 i 个结点情况下,它子树的最大权值和 - 用 g[i] 表示不邀请第 i 个结点情况下,它子树的最大权值和 - $f[i] = sum_j (g[j]) + w[i],g[i] = sum_j (max(f[j], g[j]))$ == 二叉苹果树 - 题意 10min #pause - 树上的背包:由于方案很多,我们要对每个点保存其保留树枝各种数量的方案 - 用 $f_(i, j)$ 表示第 i 个子树保留 j 个枝条情况下,最大的苹果数量 - 对于叶子结点 i 有 $f_(i, 0) = a_i$ - 知道叶子结点的所有方案,如何推出父亲结点保留 $j$ 个枝条方案 $f_(u, j)$? - 注意到每个非叶子结点一定有两个孩子,所以枚举左边儿子保留的枝条数量,右边儿子保留的枝条数量就确定了 ```cpp for (int tot = 1; tot <= sz[u]; ++tot) { // 我们认为父亲需要保留一个枝条 for (int left = max(0, tot - 1 - sz[son[1]]); left <= min(sz[son[0]], tot - 1); left++) { f[u][tot] = max(f[u][tot], apple + f[son[0]][left] + f[son[1]][tot - 1 - left]); } } ``` - 答疑 == 跑路 - 题意 10min #pause - 我们首先考虑这样一个问题:对于点 $i$ 点 $j$,是否存在长度为 $2^k$ 的走法? - 注意到所有边权为 $1$,所以上述条件成立*当且仅当* 存在一个中间点 $k$ 满足 $d(i, k) = d(k, j) = 2^{k-1}$ - Any body get the idea? #pause - 用 $f_(i, j, k)$ 表示 $i$ 到 $j$ 的路径中,是否存在 $2^k$ 的路径 - 初始条件:对于所有直接相连的点,$f_(i, j, 0) = 1$ - 转移条件:$f_(i, j, k) = f_(i, k, k-1) \& f_(k, j, k-1)$ - 若 $i, j$ 之间存在 $2^k$ 的路径,将两者距离 $"dis"_(i, j)$ 标记为 $1$ - 最后用 floyd 在 $"dis"$ 数组上跑一遍 == 绿豆蛙的归宿 - 题意 10min #pause - 设 $w_(i, j)$ 为边权 - 数学上若 $f_i$ 为 $i$ 到达终点的期望花费,则有 $f_i = sum_(v in "i 的儿子") w_(i, v) + f_v$ - 这是一个有向无环图,可以从终点反推前面所有点的期望花费 - 建一个反向拓扑图,从入度为 $0$ 的终点开始反向 DP #lin 小数输出: `printf("%.3lf\n", ans);` = 比赛必备技能 - 注意: - 文件输入输出 ```cpp freopen("apple.in", "r", stdin); freopen("apple.out", "w", stdout); ``` - cin 加速。注意 cin 与 scanf 混用会出现问题! ```cpp ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); ``` - 开启 -std=c++17: Dev C++ 编译选项 - Linker - 学会 Debug
https://github.com/yonatanmgr/university-notes
https://raw.githubusercontent.com/yonatanmgr/university-notes/main/0366-%5BMath%5D/03661101-%5BCalculus%201A%5D/src/lectures/03661101_lecture_13.typ
typst
#import "/template.typ": * #show: project.with( title: "חדו״א 1א׳ - שיעור 13", authors: ("<NAME>",), date: "13 בפברואר, 2024", ) #set enum(numbering: "(1.א)") = פונקציות == מושג הפונקציה נתונות שתי קבוצות $A$ ו-$B$. - *פונקציה* $f: A->B$ היא התאמה שמתאימה $forall a in A$ איבר יחיד $b in B$, ומסמנים $b = f(a)$. - הקבוצה $A$ נקראת *תחום ההגדרה* של $f$ ($D(f)=A$) והקבוצה $B$ נקראת *הטווח* של $f$. תחום ההגדרה "הגדול ביותר" נקרא *תחום קיום* או *תחום ההגדרה הטבעי* של $f$. - *התמונה* של $f: A->B$ הינה הקבוצה $I(f) = {f(x): x in A}=f(A)$. === (הגדרה) פונקציה חד-חד-ערכית (חח״ע) נאמר ש-$f: A->B$ *חד-חד-ערכית* אם $a != a'$ $arrl$ $f(a)!=f(a')$, או, באופן שקול, $f(a)=f(a')$ $arrl$ $a=a'$. ==== דוגמה עבור הפונקציה $f(x)=x^2: RR->RR$, נראה כי: - התמונה היא $I(f)=[0,+oo)$. - תחום ההגדרה הוא $D(f)= RR$. - הפונקציה לא חח״ע כי $-1 != 1$ אך $f(-1) = f(1) = 1$. === (הגדרה) פונקציה על נאמר ש-$f: A->B$ *"על $B$"* אם $forall b in B exists a in A: f(a)=b$, כלומר $B = I(f)$. ==== הערה הפונקציות $f pm g$, $f dot g$, $k dot f$ (k מספר קבוע) ו-$f/g$ מוגדרות באופן טבעי, כלומר: - $(f+g)(x)=f(x)+g(x)$. נראה כי $D(f+g) = D(f) nn D(g)$. - $(f/g)(x) = f(x)/g(x)$. נשים לב כי במקרה זה, $D(f/g) = {x in D(f) nn D(g): g(x) != 0}$. === (הגדרה) הרכבה של פונקציות *ההרכבה* של הפונקציה $f: A->B$ עם $g: B->C$ זו פונקציה המוגדרת $h(a)=g(f(a)), forall a in A$. מסמנים את ההרכבה $h=g of f$. ==== הערה - מצב כללי יותר אם $f: D(f)-> B$ ו-$g: D(g)-> C$, אז $h(x)=g(f(x))$, אך $D(h)={x in D(f): f(x) in D(g)}$. לדוגמה, $f(x)=1/sqrt(x), D(f)={x > 0}$, ו-$g(x)=sqrt(-x), D(g)={x <= 0}$. נראה כי ההרכבה $h(x)=g(f(x))$ היא $sqrt(-f(x))=sqrt(-1/sqrt(x))$. נקבל כי $D(h)={x > 0 : 1/sqrt(x) <= 0} = emptyset$. לכן לא קיימת ההרכבה. ==== הערה - אין קומוטטיביות בהרכבת פונקציות, אך יש אסוציאטיביות $f of g != g of f$, אך $f of (g of h) = (f of g) of h$. === (הגדרה) פונקצית הזהות *פונקצית הזהות* על קבוצה $A$, המסומנת $Id(A)$, הינה הפונקציה המקיימת $Id(A)(x) = x, forall x in A$. === (הגדרה) הפיכות של פונקציות נאמר שפונקציה $f:A->B$ הינה *הפיכה* אם קיימת $g: B->A$ כך שמתקיים $g of f = Id(A)$ וגם $f of g = Id(B)$, ואז נאמר ש-$g$ הפכית של $f$ (ולהיפך). ==== הערה אפשר לבדוק שפונקציה $f:A->B$ הפיכה $iff$ $f$ חח״ע ועל. === (טענה) אם $f:A->B$ הפיכה, אז יש לה הפכית יחידה ==== הוכחה אם $g, h$ שתי הפכיות של $f$, אז מתקיים: $g = g of Id(B) = g of (f of h) = (g of f) of h = Id(A) of h = h$ #QED === (הגדרה) הפונקציה ההפכית נסמן את ההפכית של $f: A->B$ ב-$f^(-1): B->A$ $arrl$ $f of f^(-1)=Id(B)$, כלומר $f(f^(-1)(b))=b, forall b in B$ ובהתאמה $f^(-1) of f = Id(A)$, כלומר $f^(-1)(f(a)) = a, forall a in A$. כמו כן, $D(f) = I(f^(-1))$ ו-$I(f)=D(f^(-1))$. ==== הערה סדרה יכולה להיחשב כפונקציה מ-$NN$ ל-$RR$, למשל, אם $an = 1/n$ אז נסמן את הפונקציה: $f(n)=1/n : NN->RR$. === (הגדרה) פונקציה מונוטונית יהיו $A,B subset RR$. פונקציה $f: A->B$ נקראת: - *מונוטונית עולה (חלש)* אם $forall x, y in A, x<y => f(x)<=f(y)$. - *מונוטונית עולה (חזק)* אם $forall x, y in A, x<y => f(x)<f(y)$. - *מונוטונית יורדת (חלש)* אם $forall x, y in A, x<y => f(x)>=f(y)$. - *מונוטונית יורדת (חזק)* אם $forall x, y in A, x<y => f(x)>f(y)$. === (הגדרה) גרף של פונקציה נתונה $f: A->B$, $A, B seq RR$. אוסף הנקודות ${(x, f(x)): x in A}$ ב-$RR^2$ נקרא *הגרף של הפונקציה*. ==== דוגמה $y= f(x) = sqrt(x): [0,4] -> RR$. פונקציה זו היא חח״ע ועל אז יש לה הפכית $inv(f)$. לכן, $x=y^2=inv(f)(y)$, $y=x^2=inv(f)(x)$, $D(inv(f))=[0,2], I(inv(f))=[0,4]$. ==== הערה פונקציה $f:I->J$ עולה חזק (או יורדת חזק) היא בהכרח חח״ע, ואם $J=f(I)$ אז נגדיר את ההפכית שלה $inv(f):J->I$ וגם היא עולה חזק (או יורדת חזק). הגרפים של $f$ ו-$inv(f)$ הם סימטריים ביחס לישר $y=x$. #pagebreak() == גבול של פונקציה === (הגדרה) קטע מנוקב פתוח קטע מנוקב פתוח הינו $I bs {x_0}$ כאשר $I = (a, b)$ ו-$x_0 in I$. === (הגדרה) גבול לפי קושי - $epsilon, delta$ תהי $f: I bs {x_0} -> RR$. נאמר ש-$L in RR$ הינו *הגבול של $f$ בנקודה $x_0$* ונסמן $limto(x_0) f(x) = L$ אם מתקיים: $ forall epsilon>0 exists delta = delta(epsilon) > 0 : 0<abs(x-x_0) < delta => abs(f(x)-L) < epsilon $ ==== מבט גיאומטרי להגדרת קושי נשים לב כי $L-epsilon < f(x) < L+ epsilon$ וכי $x_0 - delta < x < x_0 + delta$, $x!= x_0$. #image("/attachments/image2.png") === (הגדרה) גבול לפי היינה - סדרות תהי $f: I bs {x_0} -> RR$. נאמר ש-$L$ הינו הגבול של $f$ ב-$x_0$ ונסמן $limto(x_0) f(x) = L$ אם מתקיים: $ forall (x_n)_(n=1)^oo subset I bs {x_0}, x_n -> x_0 => f(x_n) -> L $ ==== מבט גיאומטרי להגדרת היינה #image("/attachments/image3.png")
https://github.com/piepert/typst-seminar
https://raw.githubusercontent.com/piepert/typst-seminar/main/Beispiele/LogikKlausur/typst/probeklausur_17.01.2023.typ
typst
#import "template.typ": * #let date = "25. Januar 2023" #let title = "Logik Beispielklausur" #show: project.with(date: date, title: title) #set enum(indent: 1.5em, spacing: 1em) #set list(indent: 1.5em, spacing: 1em) #task[Schreiben Sie hinter die folgenden Schemata die Buchstaben der Begriffe, ob das Schema (A) #emph[allgemeingültig], (E) #emph[erfüllbar] und/oder (W) #emph[widersprüchlich] ist: 1. $(p -> p)$ 2. $(p or not p)$ 3. $((p -> q) and p) -> q$ 4. $(p arrow.b q)$ ][][ 1. (A), (E) #point() 2. (W) #point() 3. (A), (E) #point() 4. (E) #point() ] #task[Formalisieren Sie: #emph["Wenn ich die Beispielklausur bestehe, schaffe ich Logik locker."] Sei $p$ die hinreichende und $q$ die notwendige Bedingung in Ihrer Übersetzung. Kreuzen Sie an, welche der folgenden Schemata äquivalent zu Ihrer Formalisierung sind. #set list(marker: $circle$) - $not q -> not p$ - $not p -> not q$ - $not (p and not p)$ ][][ Mögliche Formalisierung: p := "Ich bestehe die Beispielklausur." \ #point() q := "Ich schaffe Logik locker." \ $p -> q$ #point() Je nach Formalisierung entweder nichts oder ... #set list(marker: $times.circle$) - $not q -> not p$ #point() #set list(marker: $circle$) - $not p -> not q$ #point() #set list(marker: $times.circle$) - $not (p and not p)$ #point() ] #task[Beweisen Sie, dass #emph["Unter allen Umständen ist es der Fall, dass ..."] ein logisches Partikel, aber keine Wahrheitsfunktion ist.][][ #conclude[#point() Unter allen Umständen regnet es.][Also regnet es auch, wenn die Sonne scheint.] #conclude[Unter manchen Umständen regnet es.][Also regnet es auch, wenn die Sonne scheint.] #point() Der erste Schluss ist gültig, der zweite nicht. Ersetzt man es durch #emph["Unter manchen Umständen ist es der Fall, dass..."] wird der Schluss ungültig. #point() Also ist es aufgr. der Def. LP. ein logisches Partikel. #point() Eine Wahrheitsfunktion ist es dann nicht, wenn zwei Sätze des gleichen Wahrheitswertes zusammen mit dem Satzteil zwei unterschiedliche Wahrheitswerte ergeben. #emph["Ich lebe." und "Menschen sind Menschen."] sind wahr. #point() "Unter allen Umständen lebe ich." ist falsch#point(), "Unter allen Umständen sind Menschen Menschen." ist wahr. #point() Der Wahrheitswert hat sich geändert, aufgr. Def. WF. ist es keine WF. ] #task[Beweisen Sie mithilfe des Ersetzbarkeitsprinzips nach Leibniz "Nemo" und "Dora" nicht identisch sind.][][ Zwei Wörter $⌜alpha⌝$ und $⌜beta⌝$ sind genau dann wahr #point(), wenn es keinen wahren Satz gibt, in dem $alpha$ und $beta$ vertauscht werden können und sich der Wahrheitswert des Satzes ändert. #point() Seien die Sätze #emph["Nemo ist ein oranger Fisch."] und #emph["Dora ist ein blauer Fisch."] wahr. #point() Tauscht man "Dora" durch "Nemo" im zweiten Satz, wird daraus #emph["Nemo ist ein blauer Fisch."], ein falscher Satz. #point() Der Wahrheitswert hat sich geändert, damit sind die beiden nicht identisch. ] #task[Beweisen Sie die Allgemeingültigkeit folgender Aussage: "Wenn es etwas buntes und schönes gibt, dann gibt es einiges schönes und mindestens auch eine bunte Sache."][][ "F[1]" := "[1] ist bunt." #point() \ "G[1]" := "[1] ist schön." Theorem: $exists x(F x and G x) => exists F x and exists G x$ #point() Beweis: #table(columns: (auto,)*5, inset: 3pt, stroke: 0.1mm + black, align: horizon + center, [ $star.filled$ ], strong[Nr.], strong[Schema], strong[B.], strong[K.], [\*], [1], $exists x (F x and G x)$, [], [P #point()], [\*], [2], $F x' and G x'$, [1], [$x'$ES #point()], [\*], [3], $F x'$, [2], [AL], [\*], [4], $G x'$, [2], [AL], [\*], [5], $exists x F x$, [3], [EG #point()], [\*], [6], $exists x G x$, [4], [EG], [\*], [6], $exists x F x and exists x G x$, [5,6], [AL], [\*], [6], $exists x (F x and G x) -> exists x F x and exists x G x$, [1,7], [\*Kd #point()] ) 1. In der letzten Zeile und ihren Prämissen kommt keine geflaggte Variable vor. #point() 2. "$x'$" wurde nur einmal geflaggt. 3. "$x'$" ist so eine Reihenfolge, da keine rechts oder links von ihr steht und sie daher nirgendwo frei vorkommen kann, wo eine rechts von ihr stehende gebunden ist. Die Ableitung ist fertig und aufg. Def. $=>$ #point() ist das Theorem wahr, da in der letzten Zeile keine Sterne mehr vorkommen. ] #show image: it => align(center, it) #task[Füllen Sie die leeren Felder des logischen Quadrats korrekt aus!][ #image("./log_q_a.png", width: 80%) ][ #image("./log_q_eh.png", width: 90%) 1. konträr #point() 2. kontradiktorisch #point() 3. subkonträr #point() 4. Es regnet nicht immer. #point() ] #task(additional: true)[ Ist der folgende Schluss gültig? Entscheiden Sie und beweisen Sie Ihre Antwort! #block(inset: (left: 3em))[#emph[Wenn es regnet, dann ist die Straße nass. Es regnet oder es schneit, also ist die Straße nass, denn es schneit nicht.]] ][][ "p" := "Es regnet." #point(additional: true) \ "q" := "Es schneit." \ "r" := "Die Straße ist nass." #show math.equation: it => align(center, it) #conclude[$p -> r #point(additional: true) \ p or q \ not q$][$r$] #show math.equation: it => it #table(columns: (auto,)*7, inset: 3pt, stroke: 0.1mm + black, align: horizon + center, [ $star.filled$ ], [ $star.filled$ ], [ $star.filled$ ], strong[Nr.], strong[Schema], strong[B.], strong[K.], [\*], [], [], [1], $p -> r$, [], [P #point(additional: true)], [], [\*], [], [1], $p or q$, [], [P], [], [], [\*], [1], $not q$, [], [P], [], [\*], [\*], [1], $p$, [2,3], [AL #point(additional: true)], [\*], [\*], [\*], [1], $r$, [1,4], [AL #point(additional: true)], ) Die Ableitung ist fertig, da keine Variable geflaggt wurde. #point(additional: true) Die Konklusion konnte aus den Prämissen abgeleitet werden, daher ist das Theorem wahr. ] #locate(loc => { let points = get_all_points(loc) [\_\_\_ / #strong[#points.at(0) + #points.at(1) Punkten]. Zum Bestehen sind #strong[#{points.at(0)/2} Punkte] nötig.] })
https://github.com/sicheng1806/typst-book-for-sicheng
https://raw.githubusercontent.com/sicheng1806/typst-book-for-sicheng/main/scr/basic_pkg/numbering.typ
typst
#let chinesenumber(num, standalone: false) = if num < 11 { ("零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十").at(num) } else if num < 100 { if calc.rem(num, 10) == 0 { chinesenumber(calc.floor(num / 10)) + "十" } else if num < 20 and standalone { "十" + chinesenumber(calc.rem(num, 10)) } else { chinesenumber(calc.floor(num / 10)) + "十" + chinesenumber(calc.rem(num, 10)) } } else if num < 1000 { let left = chinesenumber(calc.floor(num / 100)) + "百" if calc.rem(num, 100) == 0 { left } else if calc.rem(num, 100) < 10 { left + "零" + chinesenumber(calc.rem(num, 100)) } else { left + chinesenumber(calc.rem(num, 100)) } } else { let left = chinesenumber(calc.floor(num / 1000)) + "千" if calc.rem(num, 1000) == 0 { left } else if calc.rem(num, 1000) < 10 { left + "零" + chinesenumber(calc.rem(num, 1000)) } else if calc.rem(num, 1000) < 100 { left + "零" + chinesenumber(calc.rem(num, 1000)) } else { left + chinesenumber(calc.rem(num, 1000)) } } #let notenumbering(..nums,location:none) = locate( loc => { if nums.pos().len() == 1 { chinesenumber(nums.pos().first(),standalone:true) + "、" } else { numbering("1.1",..nums.pos()) } } )
https://github.com/chamik/gympl-skripta
https://raw.githubusercontent.com/chamik/gympl-skripta/main/cj-autori/capek.typ
typst
Creative Commons Attribution Share Alike 4.0 International
#import "/helper.typ": autor #autor("<NAME>", "1890", "1938 (48 let)", "spisovatel, novinář, dramatik, filozof, fotograf, překladatel", "gymnázium, estetiku na UK (doktorát z filozofie)", "pragmatismus, protinacistická literatura", "/cj-autori/media/capek.jpg") Čapkova tvorba byla poznamenána kritickým pohledem na společnost a zároveň smyslem pro humor. Byl liberálně a demokraticky orientovaný intelektuál, který se ve svých dílech snažil zkoumat a kritizovat různé aspekty moderního života, včetně technologického pokroku, politiky a lidské psychologie. Byl mistrem jazyka a svou schopností hrát si s ním dokázal "psát i pro úplné debily". Kvůli chronické nemoci kloubů se nemohl účastnit WWI. Chvíli působil jako soukromý učitel. #underline[Pátečníci] -- skupina politických a kulturních osobností, co se každý pátek scházela ve vile bratří Čapků. Hlavně: _<NAME>_, _E. Beneš_, _E. Bass._, _F. Langer_ a další. Stal se #underline[redaktorem] několika deníků a časopisů, především #underline[Lidových novin]. Mezi Čapkova nejslavnější díla patří: 1. Dášeňka čili život štěněte -- napsané a fotografované s Josefem Čapkem, je vyprávění o narození a růstu štěňátka; foxteriéra Dášeňky. Karel Čapek vypráví tomuto pejskovi psí pohádky, které jsou tak trochu také bajkami. 2. Válka s mloky -- Satirický román, který ironicky reflektuje mezinárodní politiku a vzestup totalitních režimů. Čapek využívá motiv mloků jako metaforu pro expanzionistické a zotročující tendence lidské společnosti. 3. Povídky z jedné kapsy -- Povídky s detektivní tematikou. Jejich příběh je podáván humornou formou. Hrdina většinou není velký zločinec, ale zlodějíček, také kriminalista je obyčejný člověk. V těchto dílech jde především o vystižení různých typů osob. V povídkách se odráží relativismus; není přesně dána pravda, záleží na úhlu pohledu. *Současníci*\ _<NAME>_ -- Bylo nás pět, 1946#footnote[Román ve skutečnosti dopsal těsně před svým odchodem do Terezína v roce 1943.] \ _<NAME>_ -- <NAME>, 1941 \ _<NAME>_ -- Povídání o pejskovi a kočičce, 1929 \ _<NAME>_ - Farma zvířat (@farma[]), 1945 #pagebreak()
https://github.com/soarowl20240613/geelypaper
https://raw.githubusercontent.com/soarowl20240613/geelypaper/main/paper_usage.typ
typst
#import "paper.typ": * #import "@preview/showybox:2.0.1": showybox #let cnabstract = [中文摘要] #let enabstract = [Englsh abstract] #show: paper.with( title: "吉利学院论文模板使用说明", faculty: "智能科技学院", class: "2021级计算机科学与技术(专升本)3班", author: "袁天罡", studentnumber: "211124010635", adviser: "卓能文", date: "二〇二四年五月", cnabstract: cnabstract, cnkeywords: ("Typst", "模板", "论文结构", "图", "表", "引用", "参考文献"), enabstract: enabstract, enkeywords: ( "Typst", "Template", "Paper Structure", "Figure", "Table", "Reference", "Bibliography", ), ) #show raw.where(block: true, lang: "typst-ex"): it => { let txt = it.text showybox( [代码: #raw(txt, lang: "typc", block: true)], [结果: #eval( txt, mode: "markup", scope: ( cstyle: cstyle, cwidth: cwidth, easytable: easytable, showybox: showybox, th: th, tr_alt: tr_alt, ), )], ) } = 绪论 == Typst简介 Typst是一个类似TeX的排版系统,它使用类Markdown语法来描述文档的结构,并直接编译生成最终的PDF文档。Typst 具有以下特点: - 简单易用:Typst的语法非常简单,学习成本较低。 - 功能强大:Typst支持多种排版元素,如文本、图片、表格等,可以生成各种类型的文档。 - 跨平台:Typst支持在Windows、macOS和Linux平台上运行,可以生成跨平台的文档。 == Typst安装 安装Typst非常简单,只需要下载并安装Typst的安装包即可。在Windows平台上,可以通过下载安装包来安装Typst;在macOS平台上,可以通过Homebrew来安装Typst;在Linux平台上,可以通过apt-get或yum来安装Typst。 = 模板使用 == 下载模板 从https://github.com/soarowl/geelypaper.git上下载最新的模板文件。 == 模板文件结构 模板文件包含以下两个文件: + `paper.typ`:模板文件,用于生成最终的PDF文档。 + `logo.png`:吉利logo。 == 创建Typst文档 创建Typst文档非常简单,只需要在文本编辑器中编写Typst代码即可。Typst的代码以`.typ`为扩展名,可以在文本编辑器中创建一个名为`example.typ`的文件,并编写以下代码: ```typst #import "paper.typ": * #let cnabstract = [中文摘要] #let enabstract = [Englsh abstract] #show: paper.with( title: "吉利学院论文模板使用说明", faculty: "智能科技学院", class: "2021级计算机科学与技术(专升本)3班", author: "袁天罡", studentnumber: "211124010635", adviser: "卓能文", date: "二〇二四年五月", cnabstract: cnabstract, cnkeywords: ("Typst", "模板", "论文结构", "图", "表", "引用", "参考文献"), enabstract: enabstract, enkeywords: ( "Typst", "Template", "Paper Structure", "Figure", "Table", "Reference", "Bibliography", ), ) = 绪论 == Typst简介 Typst是一个类似TeX的排版系统,它使用类Markdown语法来描述文档的结构,并直接编译生成最终的PDF文档。Typst 具有以下特点: - 简单易用:Typst的语法非常简单,学习成本较低。 - 功能强大:Typst支持多种排版元素,如文本、图片、表格等,可以生成各种类型的文档。 ``` == 编译Typst文档 编译Typst文档非常简单,只需要在命令行中输入以下命令即可 ```bash typst compile example.typ ``` 编译完成后,会在当前目录下生成一个名为`example.pdf`的文件,这就是最终的PDF文档。 == 修改模板文件 修改模板文件非常简单,只需要在文本编辑器中修改`paper.typ`文件即可。 == 文档结构 ```typc = 一级标题 == 二级标题 === 三级标题 ``` == 插入无序列表 ```typst-ex - 无序列表1 - 无序列表2 - 无序列表3 ``` == 插入有序列表 ```typst-ex + 有序列表1 + 有序列表2 + 有序列表3 ``` == 插入图片 ```typst-ex #figure( caption: [管理界面], supplement: "图", image("img/manage.png", width: 80%), ) ``` == 插入表格 ```typst-ex #figure( caption: [category表], kind: table, supplement: "表", easytable({ let tr = tr_alt cwidth(1fr, 1fr, 1fr) cstyle(left, center, right) th[Header 1][Header 2][Header 3] tr[How][I][want] tr[a][drink,][alcoholic] tr[of][course,][after] tr[the][heavy][lectures] tr[involving][quantum][mechanics.] }), ) ``` == 插入公式 ```typst-ex 勾股定理可用公式:$a^2 + b^2 = c^2$表示。 ``` ```typst-ex #figure( caption: [数列求和], kind: math.equation, supplement: "公式", $ sum_(k=1)^n k = (n(n+1)) / 2 $ ) ``` == 插入代码块 ````typst-ex ```c #include <stdio.h> int main() { char *hello_world = "Hello, World!"; printf("%s\n", hello_world); return 0; } ``` ```` 在Typst文档中添加太多代码,导致可读性降低,也不便于后续采用相应的工具进行编辑、更新、管理与维护,建议将代码组织在一个文件夹中。 ````typst-ex #figure( caption: [计算斐波纳契], supplement: "代码", raw(read("src/fibonaci.py"), lang: "py3", block: true) ) ```` == 插入引用 在被引用的图表等地方用`<name>`设置标签,在打算引用的地方输入`@name`即可。name后面如果是中文,添加一个空格可避免编译错误。在`i-figured`中,需要在引用的地方添加`fig:、tbl:、lst:`等,形成`@fig:name`形式。如:@fig:register 所示。 #figure(caption: [用户注册], image("img/register.png", width: 50%)) <register> == 插入参考文献 参考文献设置也比较简单,只需在文件尾部加入`#bibliography("example.yml", style: "gb-7714-2015-numeric")`即可。yml格式如下: ```yaml audio-descriptions: affiliated: - names: <NAME> role: narrator author: Barrows, <NAME> date: 2017-02-07 issue: 8 parent: author: <NAME> title: Twenty Thousand Hertz type: Audio title: Audio Descriptions type: Audio url: https://www.20k.org/episodes/audio barb: author: Günther-Haug, Barbara date: 2020 language: de-DE location: München publisher: MVG title: Den Boden unter den Füßen verlieren type: Book ``` 在文章适当的地方插入`@audio-descriptions`@audio-descriptions 或`@barb`@barb 这类的键。 == typst进阶 更多内容请参考#link("https://github.com/soarowl/typst.git")[Typst简介]及#link("https://typst.app/docs")[Typst官方文档] #bibliography("basic.yml", style: "gb-7714-2015-numeric") #set heading(numbering: none) = 致#h(2em)谢 感谢家人、感谢朋友...
https://github.com/julius2718/entempura
https://raw.githubusercontent.com/julius2718/entempura/main/README.md
markdown
MIT License
# entempura ## Description A Typst template for English articles.
https://github.com/TrunkiEnqark/NodeJS
https://raw.githubusercontent.com/TrunkiEnqark/NodeJS/main/main.typ
typst
#let title = [ NodeJS ] #set heading(numbering: "1.") #show par: set block(spacing: 0.65em) #set par( first-line-indent: 1em, justify: true, ) #align(center, text(32pt)[ *#title* ]) = Definition - *Node.js* is an open-source server environment, server-side JavaScript runtime environment. It allows developers to run JavaScript code outside of a web browser and on the server. - *Node.js* runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. - *Node.js* is free. - *Node.js* uses an event-driven, non-blocking I/O model. - *Node.js* runs on various platforms (Windows, Linux, Unix, Mac OS X, ...) - *Node.js* provides a large ecosystem of modules and libraries, making it easier for developers to build server-side applications with JavaScript. = Use cases *Node.js* is a versatile technology that can be used for a wide range of use cases and there are various libraries and frameworks available to support each use case. Here are some common *Node.js* use cases along with associated libraries or frameworks: == Web servers *Node.js* is widely used in web servers because of its non-blocking I/O model and event-driven architecture. It allows developers to build scalable and efficient web servers that can handle a large number of concurrent connections. - Express.js: A fast and minimalist web framework that allows you to build web applications and APIs. - Koa.js: A modern, lightweight web framework designed for high-performance web applications. - Electronjs: The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML, and CSS. It is based on *Node.js* and Chromium and is used by Visual Studio Code and many other apps. == Real-time applications Due to its event-driven architecture, *Node.js* is well-suited for building real-time applications such as chat applications, collaborative editing tools, and multiplayer games. - Socket.io: A library that enables real-time, bidirectional communication between clients and servers. - Sails.js: A full-featured MVC _(Model-View-Controller)_ framework that includes real-time capabilities. == API development: *Node.js* is commonly used to build RESTful APIs and microservices, providing a lightweight and efficient backend for front-end applications or mobile apps. - Restify: A framework specifically designed for building REST APIs. - Hapi.js: A powerful framework for building APIs and websites that includes support for developer-friendly features like input validation and authentication. == Command-line tools: *Node.js* provides a rich set of APIs for interacting with the file system, network, and operating system, making it an excellent choice for building command-line tools and scripts. - Commander.js: A feature-rich library for building command-line interfaces (CLIs) with *Node.js*. - Inquirer.js: A library for creating interactive command-line interfaces with a wide range of user prompts. == Data streaming: *Node.js* is particularly effective in handling streaming data, such as real-time analytics, file uploads/downloads, and audio/video processing. - Async.js: A utility library that provides powerful functions for handling asynchronous operations. - Fastify: A performant and low-overhead web framework suitable for building efficient applications, including data processing tasks. == IoT applications: With its lightweight footprint, event-driven architecture, and support for asynchronous programming, *Node.js* is well-suited for building IoT _(Internet of Things)_ applications and controlling embedded devices. - Johnny-Five: A JavaScript robotics framework for *Node.js* that supports a wide range of devices and platforms. - Cylon.js: A web-based JavaScript robotics framework for *Node.js* that provides a simple, unified API for interacting with various physical devices. = Special things about nodejs Node.js is a powerful, open-source, server-side runtime environment that allows developers to build scalable applications using JavaScript. Here are some special things about Node.js: == Event-driven architecture and Non-blocking I/O model One of the most remarkable and standout features of Node.js is undoubtedly its event-driven architecture and non-blocking I/O model. These features offer several notable benefits such as scalability and responsiveness that significantly enhance the efficiency and performance of applications. == Single Language for Frontend and Backend With Node.js, developers can use JavaScript both on the server side and the client side, which leads to code reusability, reduced complexity, and faster development. == NPM (Node Package Manager) Node.js has a built-in package manager called NPM, which hosts thousands of open-source packages and modules. NPM makes it easy for developers to find, install, and manage dependencies for their projects, greatly accelerating the development process. == Large Ecosystem and Active Community Node.js has a vibrant and active community that constantly contributes to its growth. This has resulted in a wide array of libraries, frameworks, and toolsets that enhance the capabilities of Node.js. This large ecosystem greatly reduces the development time and effort required for building applications. == Cross-platform Compatibility Node.js can run on various platforms, including Windows, macOS, and Linux, making it highly flexible and versatile. = Functionality == File system: To handle file operations like creating, reading, deleting, etc., Nodejs provides an inbuilt module called FS (File System). - Common use for the File System module: - The *fs.readFile()* method is used to read files ```js const fs = require('fs); fs.readFile('Fcode.html); ``` - The *fs.appendFile()* method appends specified content to a file. If the file does not exist, the file will be created: ```js const fs = require('fs); fs.appendFile('Fcode.txt', 'Adding text to file'); ``` - The *fs.appendFile()* method appends the specified content at the end of the specified file: - The *fs.open()* method takes a FileSystem flag as the second argument, the specified file is opened for writing. If the file does not exist, an empty file is created: ```js const fs = require('fs); fs.open('Fcode.txt', 'w'); ``` - The *fs.writeFile()* method replaces the specified file and content if it exists. If the file does not exist, a new file, containing the specified content, will be created: ```js const fs = require('fs); fs.writeFile('Fcode.txt', 'Hello and smile'); ``` - The *fs.writeFile()* method replaces the specified file and content: ```js const fs = require('fs); fs.writeFile('Fcode.txt', 'Hello to my crew'); ``` - The *fs.rename()* method renames the specified file: ```js const fs = require('fs); fs.rename('FIn4.txt', 'Fcode.txt'); ``` - The *fs.unlink()* method deletes the specified file: ```js const fs = require('fs); fs.unlink('Membername.txt'); ``` == Net, HTTP/HTTPS === HTTP _(Hypertext Transfer Protocol)_ - HTTP is like a language that your web browser and the website’s server use to talk to each other. It’s how you get information from the server onto your browser. - Imagine if everyone spoke English, and a hacker who knows English could easily understand any information you send. That’s how HTTP works—everything is in plain text. - When you visit a website your browser sends a request to the server, and the server responds with the page you see. - Features: - Plain text communication. - Used for sending HTML documents, images, and videos to your browser. - Operates at the application layer of networking. === HTTPS _(Hypertext Transfer Protocol Secure)_ - HTTPS is like a secret language. It encrypts the communication between your browser and the server so that hackers (hopefully) can’t understand it. - When you access a bank’s website using HTTPS, your data is protected. Even if a hacker intercepts it, they won’t understand the encrypted conversation. - When you visit a secure site (like your online banking), the URL starts with “https://” (e.g., your bank’s website). - Features: - Encrypted communication. - Boosts your site’s ranking on Google. - Protects against phishing attacks. - Uses SSL certificates for security. === Main Differences: - Encryption: - HTTP: No encryption layer. - HTTPS: Enabled encryption. - Data Protection: - HTTP: Data is not secure. - HTTPS: Data is protected. - Google Ranking: - HTTP: No ranking boost. - HTTPS: Boosts your ranking. - Phishing Protection: - HTTP: No protection. - HTTPS: Guards against phishing. == Promise, async, await === Event loop - Nodejs event loop is a semi-infinite loop, polling and blocking on the OS until some in a set of file descriptors are ready. The loop exits when it no longer has any event to wait for - The event loop uses epoll on Linux, kqueue on MacOS and BSD for polling - The ways Nodejs handles polling could be categorized into three cases: - Pollable file descriptors: can be directly waited on, including sockets (net, dgram, http, https, tls, child process pipes, stdin, stdout, stderr) - Time: the next timeout can be directly waited on - Others: - Including fs.\*, dns.lookup(), crypto.randomBytes(), cryto.pbkdf2(), … - Using uv thread pool. The blocking call is made by a thread, and when it completes, readiness is signaled back to the event loop using either and eventfd or a self-pipe (self-pipe is a pipe, where one end is written to by a thread or signal handler, and the other end is polled in the loop) === Promise Nodejs promise provides high-level APIs to add functions to be executed when events occur in the event loop === Async, await - The async function declaration creates a binding of a new async function to a given name. The await keyword is permitted within the function body, enabling asynchronous, promise-based behavior to be written in a cleaner style and avoiding the need to configure promise chains explicitly. - Async, await enables the use of ordinary try/catch blocks around asynchronous code instead of .catch in promise chains == Worker threads - The worker thread module implements a form of threading that provides parallelism in nodejs - Worker threads are not OS threads. They are distinct child processes, which means they can't directly access the execution context of their parents. - Communication between the main application and worker threads is facilitated by an event-based messaging system - Worker threads are most suitable for CPU-bound operations, consisting of image editing, video editing, cryptography, and complex mathematical operations,… - Example use cases of worker thread module: == C/C++ addons === V8 Engine - V8 is Google’s open-source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. - V8 is at the core of Node.js. === Why do we need C++? - You can use existing, proven, and efficient algorithms or libraries already written for C/C++. - You can develop applications that need hardware-level or OS-level operations. - You can run CPU-intensive operations much faster in C++ than JavaScript. === C++ addons - Addons are dynamically linked shared objects written in C++. The require() function can load addons as ordinary Node.js modules. Addons provide an interface between JavaScript and C/C++ libraries. - There are three options for implementing addons: Node-API, nan, or direct use of internal V8, libuv, and Node.js libraries. == WASI - WebAssembly _(abbreviated Wasm)_ is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications. - WebAssembly System Interface _(WASI)_ - WASI is a modular system interface for WebAssembly. As described in the initial announcement, it’s focused on security and portability. - Source Code: _lib/wasi.js_ - The WASI API provides an implementation of the WebAssembly System Interface specification. WASI gives WebAssembly applications access to the underlying operating system via a collection of POSIX-like functions. = Comparison == Javascript/NodeJs vs Golang - Programming Language’s type: - JavaScript: scripting language, object-oriented programming (OOP). - Go compiled language, procedural programming. - Ability to run: - JavaScript/Node.js: runs on many platforms through the JS engine. - Go: compiles directly to machine code for multiple platforms. - Performance: - JavaScript/Node.js: slower because it requires interpretation. - Go: faster thanks to direct compilation. - Multi-threading: - JavaScript/Node.js: js is single-threaded, Node.js supports multi-threading but handles inefficiently. - Go: supports efficient multi-threading in m:n model. - Frontend – Backend - JavaScript/Node.js: developing a true client-server system works really well. - Go: focuses more on the backend, especially for developing high-performance concurrent services on the server. ⇒ In general, Go is specifically designed for server-side, higher performance but more complex. JavaScript is simple and easy for beginners to use. == Javascript/NodeJs vs C\# - Programming Languages's type - JavaScript is a scripting language designed for the web environment. - C\# is a fully-featured object-oriented programming language. - Execution Environment - JavaScript/Node.js runs on the JavaScript V8 Engine. - C\# runs on Microsoft's .NET Framework/Core. - Performance - JavaScript/Node.js is slower because it requires code interpretation. - C\# is faster because it compiles directly to machine code. - Application Scope - JavaScript/Node.js is popular for web/server-side programming. - C\#: More versatile, can be used to develop many different types of applications. ⇒ In general, C\# is widely used to develop applications on Windows such as desktop, web, mobile, games, and business applications. Js is strong in the web field.
https://github.com/FlyinPancake/bsc-thesis
https://raw.githubusercontent.com/FlyinPancake/bsc-thesis/main/thesis/pages/declaration.typ
typst
#import "../preamble.typ": student_name_hu as student, show_today_hu #page[ #set text(lang: "hu") #set par(justify: true) #align(center, text(size: 14pt, upper([ *Hallgatói nyilatkozat* ]))) Alulírott *#student*, szigorló hallgató kijelentem, hogy ezt a szakdolgozatot meg nem engedett segítség nélkül, saját magam készítettem, csak a megadott forrásokat (szakirodalom, eszközök stb.) használtam fel. Minden olyan részt, melyet szó szerint, vagy azonos értelemben, de átfogalmazva más forrásból átvettem, egyértelműen, a forrás megadásával megjelöltem. Hozzájárulok, hogy a jelen munkám alapadatait (szerző(k), cím, angol és magyar nyelvű tartalmi kivonat, készítés éve, konzulens(ek) neve) a BME VIK nyilvánosan hozzáférhető elektronikus formában, a munka teljes szövegét pedig az egyetem belsõ hálózatán keresztül (vagy autentikált felhasználók számára) közzétegye. Kijelentem, hogy a benyújtott munka és annak elektronikus verziója megegyezik. Dékáni engedéllyel titkosított diplomatervek esetén a dolgozat szövege csak 3 év eltelte után válik hozzáférhetõvé. #v(1cm) Budapest, #show_today_hu #v(2cm) #align(end)[ #box( width: 7cm, )[ #align(center)[ #line(length: 6cm, stroke: black + 0.25pt) _#(student)_\ hallgató ] ] ] ]
https://github.com/DashieTM/ost-5semester
https://raw.githubusercontent.com/DashieTM/ost-5semester/main/experiment/weeks/week5.typ
typst
#import "../../utils.typ": * #section("Time Row/Zeitreihe") This is a timeline with ordered attributes that appeared within this timeframe. - cost/profit - usage of resources - orders - shipments #text( teal, )[Mostly used to *recognize structures* within the timeline, *trends*, or to make *prognosis*, however this is risky.] #subsection("Trend") - over a long period - in the past only - often used to "look" into the future -> risky - trends can be - linear - exponential - polynomial - logarithmic - non-linear trends are often harder to interpret #subsection("Floating Average") We often have certain values or events that will make it hard to pick a proper average, aka extreme values. While some means do offer protection against this out of the box, we still want a general way to reduce these extreme values in order to use the other variants as well. #align( center, [#image("../../Screenshots/2023_10_19_03_07_44.png", width: 70%)], ) The trend for the example above is a slight decrease in value. #set text(14pt) Past: $X_T [T = 1 ,..., t-1]$ Current: $X_t [T = t]$ Mean: $M_t = 1/(T+t)(sum_(T=1)^(t-1)X_T + X_t) $ #set text(11pt) #section("Regression") #subsection("Linear Regression") #align( center, [#image("../../Screenshots/2023_10_19_03_18_50.png", width: 70%)], ) Idea:\ The basic idea of linear regression is to check for correlation between two sets of data, for example, what is the correlation of mouse size to mouse weight? \newline Linear regression tries to do this with a simple straight line! It is therefore the easiest way to get a correlation, but it is also not very accurate.\newline To rectify the bad accuracy, we do this multiple times for a small sets of data, aka for slices of the data. Formula and Mean Squared Error:\ #set text(14pt) $ accent(y, \^)_i = m * x_i + d $ $e_i = y_i - accent(y, \^)_i $ $E = 1/2N sum_(i=1)^(N)e_(i)^2$ $text("MSE") = 1/2N sum_(i=1)^(N)(y_i - (m * x_i +b))^2$ #set text(11pt) Legend:\ - m = slope - (x_i) = x of datapoint - (y_i) = y of datapoint - ( delta y_i ) = y of line -> mean(y) - d = y offset / intercept - (e_i) = single residual -> value of a datapoint - E = sum of residuals - N = amount of datapoints The ( y_i ) inside the MSE is the actual data that we have from our dataset.\ While the (m \* x_i + b) is the formula that we used. -> linear or polynomial regression.\ We are essentially comparing the 2 y's, the one from the data and the one from the calculation.\ We then square the difference and do this for every point in the dataset.\ Our final calculation will be the Mean Squared Error [0.33,0.4] You need to first decide what the line is for yourself, this means manual fitting!\ Then you can see the Residual Error which would be E in the formula!\ The ultimate goal is to MINIMIZE E -> MINIMIZE ERROR!\ To do this, we calculate the mean squared error by checking the difference between the data we calculated and our training data.\ aka the sum of (training y - calculation y) squared. #subsubsection("Least Squares") This term simply explains the improvement of fitting a function by calculating them via derivates of slopes:\ As you can see you take the derivate of MSE and slope with respect to slope and try to find a 0 value -> a local minimum or maximum.\ And considering we didn't use a fucked up line in the first place, we can be sure that it is indeed a local minimum!\ derivate in relation to slope = $1/2N sum_i=1^N d/text("dm")(y_i - (m * x_i +b))^2 $\ derivate in relation to slope = $1/2N sum_i=1^N (2b (b x - y)) $\ derivate in relation to intercept = $1/2N sum_i=1^N d/text("db")(y_i - (m * x_i +b))^2 $\ derivate in relation to intercept = $1/2N sum_i=1^N 2(x-y+b) $\ #text(red)[ Now we need to make sure that the derivate is 0! \ ( textMSE' = 0 ) ]\ If this is given, then we have our slope or intercept that will fit best with our current data! #subsubsection("Examples") #align( center, [#image("../../Screenshots/2023_10_19_03_21_32.png", width: 70%)], ) #align( center, [#image("../../Screenshots/2023_10_19_03_22_08.png", width: 70%)], ) #align( center, [#image("../../Screenshots/2023_10_19_03_23_33.png", width: 70%)], ) #subsection("Exponential Regression") When we want to use regression on this, we first need to flatten the curve, use regression and then bring it back to original form again. #align( center, [#image("../../Screenshots/2023_10_19_07_51_47.png", width: 70%)], ) #align( center, [#image("../../Screenshots/2023_10_19_07_52_05.png", width: 70%)], ) #subsection("Exponential Regression") Polynomial functions are simply functions with an x amount of degrees. A second degree polynomial is like this:\ $y = f(x) = a * x^2 + b * x + c)$\ When calculating the mean squared error, we would need all 3 different parameters: a,b and c, this would mean we need 3 different functions, which we don't have. So we use derivations instead -> try to get the derivative of each parameter to 0: $d/(d a) text("of mse") = 2 * sum^k_(i=1) (y_i - a * x_i^2 - b * x_i - c) * (- x_i^2)$ $d/(d a) text("of mse") = accent(y_i * x_i^2, -) = a * accent(x_i^4, -) + b * accent(x_i^3, -) + c * accent(x_i^2, -)$ $d/(d a) text("of mse") = accent(y_i * x_i, -) = a * accent(x_i^3, -) + b * accent(x_i^2, -) + c * accent(x_i, -)$ $d/(d a) text("of mse") = accent(y_i, -) = a * accent(x_i^2, -) + b * accent(x_i, -) + c $ #subsubsection("Python example") #align( center, [#image("../../Screenshots/2023_10_19_08_03_13.png", width: 90%)], ) #align( center, [#image("../../Screenshots/2023_10_19_08_03_41.png", width: 90%)], ) #subsection("Logistic Regression") See AI-foundations #align( center, [#image("../../Screenshots/2023_10_19_08_05_35.png", width: 70%)], ) #align( center, [#image("../../Screenshots/2023_10_19_08_05_56.png", width: 70%)], ) #section("Correlation") Correlation and Causation\ Just because something has a mathematical correlation, does not mean that it also has a causality. Some things might be correlated for random reasons, or even simple chance.\ For example you might find that the increase in cats is correlated with stormy weather, the data reflects that, but if you know how the weather works, you know that this is utter bs and will never be true. Parson Correlation Coefficient\ - The correlation is 1 if m is positive, and E is 0. - The correlation then gradually gets less if there is a deviation between x and y. - If m is negative and E is 0, then we have -1 correlation. This is still correlation, just negative! - Should either x or y be constant then calculating the correlation is not possible. - Lastly, nonsense / nonfunction data, we have correlation 0. - *Numeric Correlation* - a calculation - *causal correlation* - window is causality for shit software #subsection("Correlation Coefficient") #set text(14pt) Variant 1:\ $sigma_(X * Y) = 1/n sum_(i=1)^n (x_i - accent(x, -)) (y_i - accent(y, -))$ Variant 2:\ $sigma_(X * Y) = 1/n sum_(i=1)^n x_i * y_i - accent(x, -) * accent(y, -)$ #set text(11pt) Legend:\ $x_i$: data point of x $y_i$: data point of y $accent(x, -)$: average of all x data points $accent(y, -)$: average of all y data points #set text(14pt) Coefficient r:\ $r = (sigma_(X * Y))/(sigma_X * sigma_Y)$ where $sigma_(X * Y) < sigma_X * sigma_Y$ $r = (sum_(i=1)^(n) (x_i - accent(x, -) (y_i - accent(y, -))))/(sqrt((sum * (x_i - accent(x, -)))*(sum * (y_i - accent(y, -))))) $ #set text(11pt) - #text( teal, )[A positive r equals a positive correlation -> if x goes up, so does y] - #text( teal, )[A negative r equals a negative correlation -> if x goes down, y goes up] - #text(teal)[An r value of 0 means there is no correlation.]
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/layout/enum-numbering-00.typ
typst
Other
// Test numbering pattern. #set enum(numbering: "(1.a.*)") + First + Second 2. Nested + Deep + Normal
https://github.com/GYPpro/Java-coures-report
https://raw.githubusercontent.com/GYPpro/Java-coures-report/main/Report/最小费用最大流问题-20231215032417.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() } #let conf( title: none, authors: none, date: none, abstract: none, cols: 1, margin: (x: 1.25in, y: 1.25in), paper: "us-letter", lang: "en", region: "US", font: (), fontsize: 11pt, sectionnumbering: none, doc, ) = { set page( paper: paper, margin: margin, numbering: "1", ) set par(justify: true) set text(lang: lang, region: region, font: font, size: fontsize) set heading(numbering: sectionnumbering) if title != none { align(center)[#block(inset: 2em)[ #text(weight: "bold", size: 1.5em)[#title] ]] } if authors != none { let count = authors.len() let ncols = calc.min(count, 3) grid( columns: (1fr,) * ncols, row-gutter: 1.5em, ..authors.map(author => align(center)[ #author.name \ #author.affiliation \ #author.email ] ) ) } if date != none { align(center)[#block(inset: 1em)[ #date ]] } if abstract != none { block(inset: 2em)[ #text(weight: "semibold")[Abstract] #h(1em) #abstract ] } if cols == 1 { doc } else { columns(cols, doc) } } #show: doc => conf( cols: 1, doc, ) 对于最小费用最大流问题,首先给出问题定义: 给定一个网格$G eq lr((V comma E))$,每条边除了有容量限制$c lr((u comma v))$,还有单位流量费用$w lr((u comma v))$。 当$lr((u comma v))$的流量为$f lr((u comma v))$时,需要花费$w lr((u comma v)) times f lr((u comma v))$的费用。 $w$满足斜对称性,即$w lr((u comma v)) eq minus w lr((u comma v))$。 该网络图中总花费最小的最大流则为最小费用最大流,即在最大化$sum_(lr((s comma u)) in E)^() f lr((s comma u))$的前提下最小化$sum_(lr((s comma u)) in E)^() f lr((s comma u)) times w lr((u comma v))$。 此问题我们可以用PD算法(即$P e i m a l minus D u a l$原始对偶算法)在$O lr((m n plus m l o g m f))$内解决。 PD的总体思路为首先利用SPFA算法(队列优化的$B e l l m a n minus F o r d$最短路算法)为每个节点设置一个$p o t e n t i a l med h_u$ 用于将所有节点的权值转为非负数使得后续增广路计算时可以运用$D i j k s t r a med$算法解决。 由于$J o h n s o n med$算法的正确性,我们可以类比地证明设置了势能的新网络上最短路与原网络一一对应。 每次求得增广边后增广图形态会产生变化,因此需要更新各个节点的势能。 查阅资料\[1\]得,设增广后源点到第$i$个节点的最短距离记为$d_i$,只需给对应的$p o t e n t i a l med h_i$加上$d_i$即可。 由于对于任意次增广后的残量网络,有$d_i^prime plus lr((w lr((i comma j)) plus h_i minus h_j)) eq d_j prime$,即新增的边权也是非负的。 接下来的思路与$S S P$算法相同,即每次寻找单位费用最小的增广路进行增广,直到图上不存在增广路为止。 #strong[此处思路与教材所讲贪心法类似,但进行了时间复杂度上的优化。] 由于我们已经对网络图的权值增加了$p o t e n t i a l med h_u$,因此可以用$D i j k s t r a med$算法求解每一次的最小增广路。具体实现如下: #align(center)[#table( columns: 1, align: (col, row) => (auto,).at(col), inset: 6pt, [class PD { private: class edge { public: int v, f, c, next; edge\(int \_v,int \_f,int \_c,int \_next) { v \= \_v; f \= \_f; c \= \_c; next \= \_next; } edge\() { } } ; void vecset\(int value,vector\<int\> &arr) { for\(int i \= 0;i \< arr.size\();i ++) arr\[i\] \= value; return; } class node { public: int v, e; } ; class mypair { public: int dis, id; bool operator\<\(const mypair &a) const { return dis \> a.dis; } mypair\(int d, int x) { dis \= d; id \= x; } }; std::vector\<int\> head; std::vector\<int\> dis; std::vector\<int\> vis; std::vector\<int\> h; std::vector\<edge\> e; std::vector\<node\> p; int n, m, s, t, cnt \= 1, maxf, minc; public:PD\(int \_n,int \_m,int \_s,int \_t) { n \= \_n; m \= \_m; s \= \_s; t \= \_t; maxf \= 0; minc \= 0; head.resize\(n+2); dis.resize\(n+2); vis.resize\(n+2); e.resize\(2); h.resize\(n+2); p.resize\(m+2); } Public: void addedge\(int u, int v, int f, int c) { e.push\_back\(edge\(v,f,c,head\[u\])); head\[u\] \= e.size\()-1; e.push\_back\(edge\(u,0,-c,head\[v\])); head\[v\] \= e.size\()-1; } private:bool dijkstra\() { std::priority\_queue\<mypair\> q; vecset\(INF,dis); vecset\(0,vis); dis\[s\] \= 0; q.push\(mypair\(0, s)); while \(!q.empty\()) { int u \= q.top\().id; q.pop\(); if \(vis\[u\]) continue; vis\[u\] \= 1; for \(int i \= head\[u\]; i; i \= e\[i\].next) { int v \= e\[i\].v, nc \= e\[i\].c + h\[u\] - h\[v\]; if \(e\[i\].f && dis\[v\] \> dis\[u\] + nc) { dis\[v\] \= dis\[u\] + nc; p\[v\].v \= u; p\[v\].e \= i; if \(!vis\[v\]) q.push\(mypair\(dis\[v\], v)); } } } return dis\[t\] !\= INF; } private:void spfa\() { std::queue\<int\> q; vecset\(63,h); h\[s\] \= 0, vis\[s\] \= 1; q.push\(s); while \(!q.empty\()) { int u \= q.front\(); q.pop\(); vis\[u\] \= 0; for \(int i \= head\[u\]; i; i \= e\[i\].next) { int v \= e\[i\].v; if \(e\[i\].f && h\[v\] \> h\[u\] + e\[i\].c) { h\[v\] \= h\[u\] + e\[i\].c; if \(!vis\[v\]) { vis\[v\] \= 1; q.push\(v); } } } } } private:int pd\() { spfa\(); while \(dijkstra\()) { int minf \= INF; for \(int i \= 1; i \<\= n; i++) h\[i\] +\= dis\[i\]; for \(int i \= t; i !\= s; i \= p\[i\].v) minf \= min\(minf, e\[p\[i\].e\].f); for \(int i \= t; i !\= s; i \= p\[i\].v) { e\[p\[i\].e\].f -\= minf; e\[p\[i\].e ^ 1\].f +\= minf; } maxf +\= minf; minc +\= minf \* h\[t\]; } return 0; } public: void printAns\() { pd\() std::cout \<\< maxf \<\< \" \" \<\< minc \<\< \"\\n\"; } }; ], ) ] 需要的STL库:$a l g o r i t h m med med med q u e u e med med med v e c t o r med med med i o s t r e a m$ 这段代码实现了一个名为$P D$的类,其中成员函数列表如下: #align(center)[#table( columns: 3, align: (col, row) => (auto,auto,auto,).at(col), inset: 6pt, [成员名称], [访问控制], [用途], [$ p r i n t A n s lr(()) $], [$ p u b l i c $], [输出答案], [$ a d d e d g e lr((i n t med u comma med i n t med v comma med i n t med f comma med i n t med c)) $], [$ p u b l i c $], [在图上添加权边], [$ p d lr(()) $], [$ p r i v a t e $], [用于运行算法], [$ s p f a lr(()) $], [$ p r i v a t e $], [用于计算新增加的权值], [$ d i j k s t r a lr(()) $], [$ p r i v a t e $], [利用$d i j k s t r a$求得最小费用增广边], [$ P D lr((i n t \_ n comma i n t \_ m comma i n t med \_ s comma i n t med \_ t)) $], [$ p u b l i c $], [构造函数,用于初始化类], ) ] 此类的用法为: 首先调用构造函数$P D lr((i n t med \_ n comma i n t med \_ m comma i n t med \_ s comma i n t med \_ t))$,其中$n comma m comma s comma t$分别为节点数量、边数量、源点坐标、汇点坐标。 随后循环调用$a d d e d g e lr((i n t med u comma med i n t med v comma med i n t med f comma med i n t med c))$方法添加边,其中$u comma v comma f comma c$分别为边的出发点、目标点、最大流与每单位流费用。 完成所有边的添加以后,$P D$内部就完成了整个网络的构建。 随后便可以调用$p r i n t A n s lr(())$输出答案。 答案为一行两个数,$m a x f$与$m i n c$,代表最大流与对应的最小费用。 对于例2,记$A comma B comma C comma x comma y comma z$分别为$2 comma 3 comma 4 comma 5 comma 6 comma 7$点,构造源点$1$与汇点$8$,输入数据: #align(center)[#table( columns: 1, align: (col, row) => (auto,).at(col), inset: 6pt, [8 15 1 8 1 2 1 0 1 3 1 0 1 4 1 0 2 5 1 3 2 6 1 1 2 7 1 2 3 5 1 5 3 6 1 10 3 7 1 5 4 5 1 26 4 6 1 28 4 7 1 2 5 8 1 0 6 8 1 0 7 8 1 0 ], ) ] 答案为 #align(center)[#table( columns: 1, align: (col, row) => (auto,).at(col), inset: 6pt, [3 8], ) ] 即最大流为3,最小总费用为8 对于其他节点数为十万量级的一般情况,代码已经通$O J$平台$L u o g u$的正确性与性能测试。 参考文献: \[1\] OI Wiki Team. SSP 算法\[J/OL\].OIwiki,GitHub Repository,18\(2): https:\/\/github.com/OI-wiki/OI-wiki.
https://github.com/PA055/5839B-Notebook
https://raw.githubusercontent.com/PA055/5839B-Notebook/main/Notebooks/main.typ
typst
#import "/lib.typ": * #import themes.radial: radial-theme, components, colors #import colors: * #show: notebook.with(theme: radial-theme, team-name: "5839B", season: "Water Game", year: "2024-2025") #create-frontmatter-entry( title: "Table of Contents", type: "decide", date: datetime(year: 2024, month: 1, day: 1), )[ #components.toc() ] #create-body-entry( title: "First Steps", type: "decide", date: datetime(year: 2024, month: 3, day: 5), author: "<NAME>", witness: "Pr<NAME>" )[ ] #create-body-entry( title: "First Steps", type: "decide", date: datetime(year: 2024, month: 3, day: 5), author: "<NAME>", witness: "<NAME>" )[ ] #create-body-entry( title: "Taking Inventory", type: "management", date: datetime(year: 2024, month: 3, day: 5), )[ something i love big monkeys ]
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compute/construct-06.typ
typst
Other
// Error: 21-26 expected integer or ratio, found boolean #rgb(10%, 20%, 30%, false)
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/crates/tinymist-query/src/fixtures/document_symbols/nested-func.typ
typst
Apache License 2.0
#let f(a) = { let g(a) = a let t = 1 g }
https://github.com/Skimmeroni/Appunti
https://raw.githubusercontent.com/Skimmeroni/Appunti/main/Metodi%20Algebrici/Strutture/Anelli.typ
typst
Creative Commons Zero v1.0 Universal
#import "../Metodi_defs.typ": * La struttura algebrica $(A, *, diamond.small)$ prende il nome di *anello* se sono rispettate le seguenti proprietá: - $(A, *)$ é un gruppo abeliano; - $(A, diamond.small)$ é un semigruppo; - L'operazione $diamond.small$ gode della *proprietá distributiva* rispetto a $*$, ovvero: $ a diamond.small (b * c) = (a diamond.small b) * (a diamond.small c) space " e " space (a * b) diamond.small c = (a diamond.small c) * (b diamond.small c) space space space forall a, b in A $ Se $diamond.small$ gode inoltre della proprietá commutativa, ovvero se $(A, diamond.small)$ é abeliano, allora si dice che $(A, *, diamond.small)$ é un *anello commutativo*. Se $(A, diamond.small)$ é un monoide (oltre che un semigruppo), ovvero se esiste per $diamond.small$ un elemento neutro, $(A, *, diamond.small)$ é un *anello unitario*. Se non diversamente specificato, nel parlare di "anelli" in generale si stará sottointendendo di stare considerando anelli unitari. #example[ - $(ZZ, +, dot)$, $(QQ, +, dot)$ e $(ZZ_(n) , +, dot)$ sono anelli commutativi; - $("Mat"(2 times 2, QQ), +, ·)$ é un anello, ma non é commutativo. ] L'anello $(A, *, diamond.small)$ prende il nome di *campo* se é commutativo, unitario e se $(A - {1_(diamond.small)}, diamond.small)$ é un gruppo. #example[ - $(QQ, +, dot)$ é un campo; - $(ZZ_(n) , +, dot)$ é un campo solamente se $n$ é un numero primo; - $(ZZ, +, dot)$ non é un campo. ] Le proprietá che le operazioni di un anello devono rispettare sono analoghe alle proprietá che possiedono rispettivamente la somma ed il prodotto fra interi. Per tal motivo, gli anelli vengono spesso scritti semplicemente come $(A, +, dot)$, dove le due operazioni sono chiamate "somma" e "prodotto", anche se queste non sono necessariamente la somma ed il prodotto comunemente intesi. #lemma[ Sia $(A, *, diamond.small)$ un anello. Per ogni $a, b in A$ e per ogni $n in ZZ$, si ha: - $1_(*) diamond.small a = a diamond.small 1_(*) = 1_(*)$; - $a diamond.small b^(-1)_(*) = a^(-1)_(*) diamond.small b = (a diamond.small b)^(-1)_(*)$; - $(n diamond.small a) diamond.small b = a diamond.small (n diamond.small b) = n diamond.small (a diamond.small b)$. ] // #proof[ // Dimostrabile, da aggiungere // ] Sia $(A, *, diamond.small)$ un anello. L'anello $(B, *, diamond.small)$ si dice *sottoanello* di $A$ se: - $B$ é un sottoinsieme di $A$; - $(B, *)$ é un sottogruppo di $(A, *)$; - $B$ é un insieme chiuso rispetto a $diamond.small$; - $B$ contiene $1_(diamond.small)$. Per indicare che l'anello $(B, *, diamond.small)$ é un sottoanello dell'anello $(A, *, diamond.small)$ si usa la notazione $(B, *, diamond.small) lt.eq (A, *, diamond.small)$. #lemma[ Sia $(A, *, diamond.small)$ un anello. La struttura algebrica $(B, *, diamond.small)$ é un sottoanello di $(A, *, diamond.small)$ se e soltanto se: - $B subset.eq A$; - Per qualsiasi $h, k in B$, si ha $h * k^(-1)_(*) in B$. - Per qualsiasi $h, k in B$, si ha $h diamond.small k in B$. - $1_(diamond.small) in B$. ] <Is-a-subring> Il @Is-a-subring fornisce un metodo alternativo e piú semplice per determinare se due anelli siano l'uno un sottoanello dell'altro. #example[ + L'anello $(ZZ, +, dot)$ é un sottoanello di $(QQ, +, dot)$. Infatti: - $ZZ$ é un sottoinsieme di $QQ$; - Presi due interi $a$ e $b$, si ha $a + (-b) = a - b in ZZ$; - Presi due interi $a$ e $b$, si ha $a dot b = a b in ZZ$; - L'elemento neutro di $1_(dot)$ é $1$, che appartiene a $ZZ$; + L'anello $(QQ, +, dot)$ é un sottoanello di $(RR, +, dot)$. Infatti: - $QQ$ é un sottoinsieme di $RR$; - Presi due razionali $a$ e $b$, si ha $a + (-b) = a - b in QQ$; - Presi due razionali $a$ e $b$, si ha $a dot b = a b in QQ$; - L'elemento neutro di $1_(dot)$ é $1$, che appartiene a $QQ$; ] Sia $(A, *, diamond.small)$ un anello. Un sottoinsieme $I$ di $A$ si dice un *ideale* di $(A, *, diamond.small)$ se: - $I != emptyset$; - $(I, *)$ é un sottogruppo di $(A, *)$; - Per ogni $a in A$ e $i in I$, si ha $a diamond.small i in I$ e $i diamond.small a in I$. Per indicare che un sottoinsieme $I$ di $A$ é un ideale dell'anello $(A, *, diamond.small)$ si usa la notazione $I triangle.l (A, *, diamond.small)$. #lemma[ Per un qualsiasi anello $(A, *, diamond.small)$, gli insiemi $A$ e ${1_(*)}$ sono ideali di $(A, *, diamond.small)$. ] // #proof[ // Dimostrabile, da aggiungere // ] #lemma[ Sia $(A, *, diamond.small)$ un anello commutativo e sia $x$ un elemento di $A$. L'insieme $I = {a diamond.small x : a in A}$ é un ideale di $(A, *, diamond.small)$. ] <Principal-ideal-generated> #proof[ L'insieme $I$ é un ideale in quanto: - $1_(diamond.small) diamond.small x = x$, e $1_(diamond.small) diamond.small x in I$ perché rispetta la definizione. Pertanto, $I$ non puó essere vuoto; - Per ogni $a diamond.small x, b diamond.small x in I$, si ha $a diamond.small x * (b diamond.small x)^(-1)_(*) = (a * b^(-1)_(*)) diamond.small x in I$; - Per ogni $b in A$ e per ogni $a diamond.small x in I$, si ha $b diamond.small (a diamond.small x) = (b diamond.small a) diamond.small x in I$ e $(a diamond.small x) diamond.small b = (a diamond.small b) diamond.small x in I$; ] In particolare, per un anello commutativo $(A, *, diamond.small)$ l'insieme $I$ dell'@Principal-ideal-generated viene chiamato *ideale principale generato da* $A$. #lemma[ Sia $(A, *, diamond.small)$ un anello e sia $I$ un suo ideale. $(I, *)$ é un sottogruppo normale di $(A, *)$; ] <Ideal-is-normal> #proof[ Affinché $I$ sia un ideale di $(A, *, diamond.small)$ é (anche) necessario che, per ogni $i, j in I$, si ha $i * j^(-1)_(*) in I$. Questo é peró precisamente il criterio espresso nel @Is-a-subgroup rispetto all'operazione $*$, pertanto $(I, *)$ é un sottogruppo di $(A, *)$. Inoltre, affinché $(A, *, diamond.small)$ possa essere un anello si richiede che $(A, *)$ sia un gruppo abeliano; per il @Abelian-normal-subgroups si ha che $(I, *)$ é un sottogruppo normale di $(A, *)$. ] Sia $(A, *, diamond.small)$ un anello e sia $I$ un suo ideale. Per il @Ideal-is-normal, $(I, *)$ é un sottogruppo normale di $(A, *)$, ed é quindi possibile definire, come é stato fatto per i gruppi, un insieme quoziente $A slash I = {a * I: a in A}$. É possibile definire delle operazioni di somma e di prodotto (entrambe ben definite) su $A slash I$ in questo modo: #grid( columns: (0.5fr, 0.5fr), [$ (a * I) + (b * I) = (a * b) * I $], [$ (a * I) dot (b * I) = (a diamond.small b) * I $] ) #theorem[ Siano $(A, *, diamond.small)$ un anello ed $I$ un suo ideale. La struttura algebrica $(A slash I, +, dot)$ é un anello. ] // #proof[ // Dimostrabile, da aggiungere // ] Siano $(A, *, diamond.small)$ un anello ed $I$ un suo ideale. L'anello $(A slash I, +, dot)$ prende il nome di *anello quoziente* di $(A, *, diamond.small)$ rispetto a $I$. Siano $(A, *, diamond.small)$ e $(B, star.op, dot.circle)$ due anelli con unitá. Un'applicazione $phi.alt : A |-> B$ si dice *omomorfismo di anelli* (con unitá) se preserva le due operazioni e l'unitá rispetto alla seconda operazione, ovvero se: + Per ogni $a_(1), a_(2) in A$, si ha $phi.alt(a_(1) * a_(2)) = phi.alt(a_(1)) star.op phi.alt(a_(2))$; + Per ogni $a_(1), a_(2) in A$, si ha $phi.alt(a_(1) diamond.small a_(2)) = phi.alt(a_(1)) dot.circle phi.alt(a_(2))$; + $phi.alt(1_(diamond.small)) = 1_(dot.circle)$. Un omomorfismo di anelli iniettivo si dice monomorfismo, un omomorfismo di anelli suriettivo si dice epimorfismo, ed un omomorfismo di anelli biettivo si dice isomorfismo. #lemma[ Siano $(A, *, diamond.small)$ e $(B, star.op, dot.circle)$ due anelli con unitá, per i quali esiste un omomorfismo $phi.alt : A |-> B$. Si ha $phi.alt(1_(*)) = 1_(star.op)$ e $phi.alt(a^(-1)_(*)) = (phi.alt(a))^(-1)_(*)$ per qualsiasi $a in A$. ] // #proof[ // Dimostrabile, da aggiungere // ] Sia $phi.alt: A |-> B$ un omomorfismo tra gli anelli $(A, *, diamond.small)$ e $(B, star.op, dot.circle)$. Prende il nome di *nucleo* di $phi.alt$, denotato con $ker(phi.alt)$, il sottoinsieme di $A$ cosí definito: $ ker(phi.alt) = {a in A: phi.alt(a) = 1_(star.op)} $ Prende invece il nome di *immagine* di $phi.alt$, denotata con $Im(phi.alt)$, il sottoinsieme di $B$ cosí definito: $ Im(phi.alt) = {b in B: exists a in A, phi.alt(a) = b} $ #lemma[ Sia $phi.alt: A |-> B$ un omomorfismo tra gli anelli $(A, *, diamond.small)$ e $(B, star.op, dot.circle)$. Il nucleo di $phi.alt$ é un ideale di $(A, *, diamond.small)$. ] // #proof[ // Dimostrabile, da aggiungere // ] #lemma[ Sia $phi.alt: A |-> B$ un omomorfismo tra gli anelli $(A, *, diamond.small)$ e $(B, star.op, dot.circle)$. L'immagine di $phi.alt$ é un sottoanello di $(B, star.op, dot.circle)$. ] // #proof[ // Dimostrabile, da aggiungere // ] #theorem[ Sia $phi.alt: A |-> B$ un omomorfismo tra gli anelli $(A, *, diamond.small)$ e $(B, star.op, dot.circle)$. Il gruppo quoziente $(A slash ker(phi.alt), dot)$ é isomorfo a $(Im(phi.alt), dot.circle)$. ] // #proof[ // Dimostrabile, da aggiungere // ]
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/layout/list-attach-00.typ
typst
Other
// Test basic attached list. Attached to: - the bottom - of the paragraph Next paragraph.
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/047_Pride%20Across%20the%20Multiverse.typ
typst
#import "@local/mtgset:0.1.0": conf #show: doc => conf("Pride Across the Multiverse", doc) #include "./047 - Pride Across the Multiverse/001_Note for a Stranger.typ"
https://github.com/pank-su/report_3
https://raw.githubusercontent.com/pank-su/report_3/master/templates/escd.typ
typst
#import "../libs/tablex.typ": tablex, cellx, rowspanx, colspanx #let outlineFrame() = { set text(font: "Times New Roman", size: 11pt, lang: "ru", hyphenate: true) rect(width: 100%, height: 100%, outset: (left: -20mm, right: -5mm, top: -5mm, bottom: -5mm), inset: (bottom: 5mm, top: 5mm, right: 5mm, left: 20mm))[ #align(bottom)[ #tablex(columns: (8mm, 10mm, 23mm, 15mm, 10mm, 67mm, 15mm, 15mm, 22mm,), inset: (bottom: 5mm), [],[], [], [], [], cellx(colspan: 4, rowspan: 3, inset: 0pt, align: center + horizon)[#text("ПП.03.090207.09Д", size: 22pt)], [], [], [], [], [], cellx(inset: 0pt, align: center + horizon)[#text("Изм.", size: 10pt)], cellx(inset: 0pt, align: center + horizon)[#text("Лист", size: 10pt)], cellx(inset: 0pt, align: center + horizon)[#text("№ докум.", size: 10pt)], cellx(inset: 0pt, align: center + horizon)[#text("Подп.", size: 10pt)], cellx(inset: 3pt, align: center + horizon)[#text("Дата", size: 10pt)], cellx(inset: (left: 2pt), align: start + horizon, colspan: 2)[Разраб.], cellx(inset: (left: 2pt), align: start + horizon, )[Панков В.Д.], [], [], cellx(inset: (left: 2pt), align: center + horizon, rowspan: 5)[#text("ОТЧЁТ ПО\nПРОИЗВОДСТВЕННОЙ ПРАКТИКЕ", size: 14pt)], cellx(inset: 0pt, align: center + horizon, )[Лит.], cellx(inset: 0pt, align: center + horizon, )[Лиcт], cellx(inset: 0pt, align: center + horizon, )[Лиcтов], cellx(inset: (left: 2pt), align: start + horizon, colspan: 2)[Пров.], cellx(inset: (left: 2pt), align: start + horizon, )[#text("Кафтна Д.Ю.", size: 9pt)], [], [], cellx(inset: 0pt, align: center + horizon, )[#rect(height: 100%, width: 33%)], cellx(inset: 0pt, align: center + horizon, )[#counter(page).update(3)#counter(page).display()], cellx(inset: 0pt, align: center + horizon, )[#locate(loc => [#counter(page).final(loc).at(0)])], cellx(inset: (left: 2pt), align: start + horizon, colspan: 2)[], [], [], [], cellx(inset: 0pt, align: center + horizon, colspan: 3, rowspan: 3)[#text("ФСПО ГУАП", size: 12pt)], cellx(inset: (left: 2pt), align: start + horizon, colspan: 2)[Н. контр.], [], [], [], cellx(inset: (left: 2pt), align: start + horizon, colspan: 2)[Утв] ) ] ] } #let basicFrame() = { set text(font: "Times New Roman", size: 9pt, lang: "ru", hyphenate: true) rect(width: 100%, height: 100%, outset: (left: -20mm, right: -5mm, top: -5mm, bottom: -5mm), inset: (bottom: 5mm, top: 5mm, right: 5mm, left: 20mm))[ #align(bottom)[ #tablex(columns: (7mm, 10mm, 23mm, 15mm, 10mm, 110mm, 10mm), inset: (bottom: 5mm), [], [], [], [], [], cellx(inset: 0pt, align: center + horizon, rowspan: 3)[#text("ПП.03.090207.09Д", size: 22pt)], cellx(inset: (left: 2pt), align: start + horizon)[Лист], [], [], [], [], [], cellx(inset: (left: 2pt), align: center + horizon, rowspan: 2)[#text(counter(page).display(), size: 14pt)], cellx(inset: (left: 2pt), align: start + horizon)[Изм.], cellx(inset: (left: 2pt), align: start + horizon)[Лист], cellx(inset: (left: 2pt), align: center + horizon)[№ докум.], cellx(inset: (left: 2pt), align: center + horizon)[Подп.], cellx(inset: 3pt, align: start + horizon)[Дата] ) ] ] }
https://github.com/jijinbei/typst_template
https://raw.githubusercontent.com/jijinbei/typst_template/main/manual/main.typ
typst
#import "template.typ": * #show: doc => conf(title: [取扱説明書], doc) = 目次 + はじめに + 使い方 + お手入れ + 保証について = はじめに この取扱説明書は、製品の正しい使い方やお手入れ方法、保証についての情報を提供します。 この取扱説明書をよく読んで、製品を安全にお使いください。 #caution[注意点]
https://github.com/techtheriac/resume
https://raw.githubusercontent.com/techtheriac/resume/master/resume.typ
typst
#set par(justify: true, leading: 0.53em) #set text(font: "Inter", size: 10pt, fill: color.hsl(0deg, 0, 23, 90%)) #set page(paper: "a4", margin: (x: 1.1cm, y: 1.2cm), fill: white) #set rect( width: 100%, stroke: none ) #let work_experience(company, title, date, summary, works, url) = box[ #text(weight: "medium", size: 12pt)[ #title ] #show link: underline #emph(text()[#set text(font: "Noto Sans") #link(url)[#company] ]) - #date #par()[ #text()[#summary] ] #set list(marker: [#image("assets/icons/marker.svg", width: 5pt, height: 5pt)], tight: false, spacing: 10pt) #for work in works [ - #work ] ] #grid( columns: (2fr, 7fr), gutter: 1pt, rect[ #show link: underline #list(marker: none, tight: false, spacing: 9pt, [#link("https://www.linkedin.com/in/franklin-jezreel/")[LinkedIn]], [#link("https://github.com/techtheriac")[Github]], [#link("mailto:<EMAIL>")[Email]] ) #v(.64cm) #text(weight: "medium")[Core Technologies] #list(marker: [#image("assets/icons/marker.svg", width: 5pt, height: 5pt)], tight: false, spacing: 9pt, [.NET Core], [ASP .NET], [EF Core], [NodeJs], [TypeScript], [PostgreSQL], [Azure] ) #v(.6cm) #text(weight: "medium")[Specializations] #list(marker: [#image("assets/icons/marker.svg", width: 5pt, height: 5pt)], tight: false, spacing: 9pt, [DevOps], [Perf. Optimization], [Microservices], [Sotfware Testing], ) ], rect[ #text(weight: "bold", size: 25pt, fill: color.hsl(0deg, 0, 0, 90%))[<NAME>], #text(weight: "semibold", size: 15pt, style: "italic")[Software Engineer] I do my best work as a hands-on technical leader and engineer where I can balance my time between solving important technical challenges with helping other members of my team grow in their respective roles. #line(length: 100%, stroke: color.hsl(0deg, 0, 23, 12%)) == Work Experience I have garnered experience over the years in building medium to large scale solutions as an independent consultant and within organisations. #v(.2cm) #work_experience( "Wema Bank", "Software Engineer", "December 2021 to Present", "I lead a team of developers through the architecting, building, and maintenance of ALAT Loans Microservices.", ("Built a service for an on-demand spooling and analysis of customers’ bank statement to curb the risk associated with a manual vetting of (probable unauthentic) bank statements.", "Revamped the loan collections service to facilitate a proactive recovery of delinquent loans.", "Built fault tolerance into loans disbursement Microservice by leveraging upon message queues where we realised a 50% reduction in disbursement failure rate."), "https://alat.ng/" ) #v(.3cm) #work_experience( "Union Bank Plc", "Backend Engineer (Contractor)", "June 2021 to December 2021", "My work for Union Bank involved building business automation tools to streamline internal processes that are specific to insights on concession data.", ("Migrated ALERO (a dashboard for concession & loans performance) from a legacy .NET Framework MVC project to independent modules exposed via APIs running on .NET Core.", "Introduced application containerization, continuous integration and delivery, leveraging upon Microsoft Azure.", ), "https://www.unionbankng.com/" ) #v(.3cm) #work_experience( "Kiakia Prints", "Frontend Engineer", "January 2021 to June 2021", "Orchestrated the entire revamp and redesign implementation of Kiakiprints’ frontend application", ("Refactored Kiakia Prints’ barebones VueJs codebase to leverage upon Nuxt's SSG capabilities", "Eliminated Javascript framework bloat, purged JQuery and its dependents including Boostrap in favour of more custom styling.", "Integrated Kiakiaprints.com with Criteo retargeting & advertising platform: we realised a 10% boost in traffic" ), "https://kiakiaprint.com/" ) #v(.3cm) #work_experience( "Intelligent Innovations", "Frontend Developer", "February 2020 to December 2020", "Worked on the client-side of several projects for organisations and individuals.", ("Built Timbala, 9ID, 9PAY and a host of other agency client applications.", "I handled development operations and frontend infrastructural concerns." ), "https://intelligentinnovations.co/" ) #v(.1cm) == Education #v(.1cm) #par()[ #text(weight: "medium", size: 11pt)[ESGT, Benin Republic], #text(weight: "regular", size: 10pt)[Bs.c Computer Science]\ #text(weight: "regular", size: 10pt)[September 2015 - July 2019] ] ] )
https://github.com/EGmux/PCOM-2023.2
https://raw.githubusercontent.com/EGmux/PCOM-2023.2/main/lista2/lista2q10.typ
typst
=== Um sinal x(t) limitado em faixa a 3 kHz é amostrado a uma taxa 33,33% mais alta do que a taxa de Nyquist. O erro máximo aceitável na amplitude da amostra( erro máximo devido à quantização) é 0,5% do valor de pico de amplitude *$m_p$*. As amostras quantizadas são codificads em binário. Obtenha a taxa de amostragem necessária, o número de bits necessário para codificar cada amostra e taxa de bits do sinal PCM resultante. \ relembrando da nossa equação para o erro máximo #math.equation(block: true, $ |e_"max"| lt.eq p V_"pp" $) 🚨 Note que temos o valor de pico *$V_p$* e não o pico a pico, a relação entre eles é de *$V_"pp" = 2 V_"p"$* e portanto alteramos a expessão acima, e o valor de _p_, que fica sendo #math.equation(block: true, $ |e_"max"| lt.eq p/2 V_"pp" $) bem e temos essa aqui tambem: #math.equation(block: true, $ l = log_2 L $) e chegamos em #math.equation(block: true, $ l &= log_2(1/(2p)) && \ &= log_2(1/(2dot 0.0025)) && \ 7.6438561897747 &= 8 "bits/amostra" $) então agora calculemos *$R_b$* #math.equation(block: true, $ R_b &= l dot 1.33f_N && \ &= 8 "bits/amostra" dot 7.98 "kamostra/s" && \ &= 63.84 "kbits/s" tilde.eq 64 "kbits/s"$)
https://github.com/rikhuijzer/phd-thesis
https://raw.githubusercontent.com/rikhuijzer/phd-thesis/main/chapters/introduction.typ
typst
The Unlicense
#import "../style.typ": citefig #import "../functions.typ": chapter, textcite, parencite, note, avoid_indent, pagebreak_to_right #pagebreak_to_right() = Introduction #avoid_indent() Imagine being able to correctly predict those individuals who will graduate from pilot training, Harvard medical school, or even NASA's astronaut program. This would have a large impact on the world as it would reduce individuals being disappointed due to being rejected, and as it would reduce the use of resources for organizations. Also, selecting the right people would positively influence the organization to which people are selected. For example, some organizations are willing to pay millions of dollars to hire the right researcher, athlete, or CEO (e.g., #parencite(<metz2018ai>)). However, such predictions are remarkably difficult to make. A single highly improbable event is all that is needed to significantly alter the outcome @taleb2010black. For example, a recruit in the selection program of the special forces can be the best in their class, but drop out due to a close relative getting sick or a wrong step in a rabbit hole. With that in mind, is it still possible to predict who will drop out and who will graduate? The field that investigates this question is called _personnel selection_. == Personnel Selection The field of personnel selection is built on a long history of research in psychology and statistics. One of the pioneers in this field was <NAME> in the 1880s, when he invented regression and correlation analysis, and invented the term psychometrics @gillham2001galton. He was interested in measuring mental ability to select capable individuals, but his tests were mostly limited to tests for mental imagery, sight, hearing, and bodily strength and size @gillham2001galton. A test that more closely resembles today's personnel selection was the Binet-Simon Intelligence scale in 1904, which was used to select French students "capable of regular schooling". This method of testing for intelligence was soon applied in military selection during the first world war @terman1918use. Soon after, personality tests were also developed for selection. The Woodworth Personal Data Sheet was used to screen recruits for the US Army for shell shock @woodworth1918psychoneurotic. Subsequent personality tests were based on factor analysis, a method designed to identify underlying factors that account for the patterns in responses to a set of questions. For example, 4000 affect terms from the English dictionary were reduced to the 16 personality factor questionnaire @cattell1970handbook. More recently, these 16 personality factors were reduced to the Big Five personality traits, which are now considered the most important factors in personality @costa1992revised. It is notably a recurring theme here that the military has been a source of innovation. <NAME> built one of the first computers for the British military, and was one of the first to come up with the notion of Artificial Intelligence (AI) in the late 1940s @turing1950computing. Next, the US Defense Advanced Research Projects Agency (DARPA) has funded the precursor to the internet in the 1960s @abbate2000inventing. In the 1970s, they funded the precursor to GPS @parkinson1983navstar and computer chips @miller2022chip#footnote[ Apart from many benefits that these and earlier mentioned inventions and inventors have provided, it should be noted that they can also be directly linked to much human suffering. For example, the first chips were used to improve the accuracy of bombs in the Vietnam war, and the intelligence tests were closely linked to the eugenics movement (see, for example, #parencite(<miller2022chip>) or #parencite(<gillham2001galton>) for more information). ]. In the 1980s they funded the precursor for modern screens @florida1991invention and more AI research @roland2002strategic. After a lack of progress for AI in that decade, a new system called High Performance Computing (HPC) was introduced in the 1990s for DARPA @roland2002strategic. A reason why many innovations have come from the military could be that they have large problems that need to be solved quickly @housel2023same. For example, the launch of the Sputniks satellite in 1957 by the Soviet Union led to fear in Western nations that they were falling behind in technology. In response, DARPA and NASA were founded in 1958. Currently, one large problem that needs to be solved quickly is selecting the right personnel. It is unclear how to solve this, but one step in the right direction could be to gather and analyze more data, which could lead to better predictions in personnel selection. In order to do so, we needed to develop software to efficiently gather psychological and physical measures of recruits. == Data Collection and Processing Our data collection was carried out at and made possible by the Dutch Special Forces (_Korps Commandotroepen_ in Dutch). Special forces are elite military units that are trained to perform unconventional, high-risk, and specialized missions. However, dropout rates in special forces selection programs are close to 80% (e.g., #parencite(<gayton2015prospective>)). The military was interested in identifying factors that could predict dropouts and use that to improve the selection process. To do so, we collected data from recruits during the training and selection program. During this 16-week program, recruits are trained towards becoming a special forces operator and at the same time subjected to grueling physical and psychological challenges. Since there is no clear distinction between training and selection in the program, we will use the the terms _training_ and _selection_ interchangeably throughout this thesis. To facilitate the data collection, we developed a custom software system that allowed recruits to complete questionnaires online. Each recruit was assigned a unique login, granting them access to the system and enabling them to complete the questionnaires. The system was designed to streamline the data collection process, allowing researchers to process and analyze pseudonimized data of the recruits. In total, this data collection resulted in about 60 000 lines of data in the period from 2019 to 2023 (this number includes missing data). These amounts of data collection would quickly become unmanageable without the use of software. This is not unique to our research. A big part of most academic research is entirely dependent on software @mcelreath2020software. The collection of more data also has an effect on the data processing. Manually editing data is feasible for studies with a few dozen participants and a few variables, but become impractical for hundreds of participants and a few dozen variables. For the data processing in our research, the Julia programming language @bezanson2017julia was mainly used. This had benefits, but drawbacks as well. Benefits were that the language is expressive, which means that it is easy to express complex ideas in a few lines of readable code. Julia usually sticks closer to mathematical notation than other languages, which makes it easier to translate mathematical ideas to code. Drawbacks were that that the language is still quite new#footnote[ Julia was first released in 2012, whereas Python was first released in 1991 and R in 1995. ] meaning that a lot of functionality that would have been available in other languages, such as R or Python, was not (yet) available. This forced the fixing of bugs in core Julia packages or creating new Julia packages, which both resulted in a great learning experience. For example, when adding the standard deviation to a data science package, there was a useful discussion which lead to a better implementation#footnote[ Thanks to <NAME> and <NAME> in \ #link("https://github.com/JuliaAI/MLJBase.jl/pull/766"). ]. == Statistics and Machine Learning We based our research on earlier studies with the similar measures in similar settings, and theoretical knowledge from psychology about personality and sport science. However, much discussion exists on the validity of the typically used statistical analyses. This was challenging for our studies, which were quantitative and hence relied fully on these analyses. The core of the argument in quantitative research is the use of statistics, so researchers who question the validity of these statistics question the core of the research. Some argue that it is best to stick to the well-known and well-established statistical tests regardless of the criticisms. If we all agree on what tests to use, then we can all use the same objective criteria to evaluate the results. This is like finding an optimial solution in a simplified world, instead of finding a good solution in a more realistic world @simon1979rational. It is possible that the well-known approaches are not necessarily the best approaches. There could exist better approaches that would lead to more and better scientific insights. One problem that was pointed out with a well-known approach is that decisions for hypothesis testing should be weighed carefully. For example, instead of sticking to the default _p_-value of 0.05, it is better to justify why the value was chosen @lakens2018justify. Other researchers propose to switch to Bayesian analyses since it requires researchers to be more explicit about their assumptions @mcelreath2020statistical. Even inside this Bayesian-world, there are two camps. One argues for the Bayes factors approach, that resembles frequentists hypothesis testing (e.g., #parencite(<stefan2019tutorial>)), while another argues for visualizing the analysis and inspecting the plots (e.g., #parencite(<tendeiro2019review>), #parencite(<gelman2021bayesian>)). This latter approach is the most computationally expensive, but does allow for greater flexibility in model definitions and is arguably more intuitive since model assumptions are more explicit and model interpretations more visual. With all the these statistical options, it was often not clear which model should be used for which study during our research. This is in line with the "no free lunch" theorem @wolpert1997no. The theory states that there is no single statistical model that is the best fit for all studies. This means that we have to choose the best model for each study, but this is not easy since we do not know which model is the best. A solution becomes clear when considering the ancient Buddhist story of the blind men and an elephant. In this story, several blind men each touch a different part of an elephant to learn what it is. One feels the trunk and says it is like a thick tree branch, another feels a leg and declares it is like a pillar, another feels the tail and shouted it is like a rope, and so on. Seen separately, each man will come to the wrong conclusions. Hence, the solution is to combine the information from multiple blind men to get a better picture. Or in other words, we should use multiple statistical models to get a better picture of the data. Although multiple models and variable associations do provide insights, they were not sufficient in practice. Such variable associations belong to the _inference_, or _explanation_, paradigm @hofman2021integrating. This paradigm is what Galton and Fisher used a century ago. For example, analyzing which variables are associated with the outcome via a _t_-test is about explaining the data. However, we wanted to apply our research to the selection, but the associations did not indicate how accurate our predictions would be. Moreover, associations can be misleading and suffer from _overfitting_. Overfitting is when a model fits the data too precisely, leading to poor predictions on new data. This is like a student who has seen the exam questions beforehand and can answer them all, but fails when seeing new questions. There are mathematical ways to estimate overfitting, like the Bayesian Information Criterion, but these are hard to interpret and do not clearly indicate how well the model will do in practice. To get a better understanding, we turned to the field of data science and machine learning. In this paradigm, known as the _prediction_ or _algorithmic_ paradigm (e.g., #parencite(<hastie2009elements>)), the focus is not on explaining the model, but on predicting the outcome. In this paradigm, a model can even completely lack interpretability, i.e., a _black-box_, as long as it predicts well. For example, nobody can fully understand why neural networks, such as modern Large Language Models (LLMs), or human brains, make certain predictions. As long as the model is useful and safe, this lack of understanding is accepted in certain contexts. There is some understanding about the effectiveness required to work with such models or referees, though. For a referee, this is is tested in the form of a long process of graduating through the various levels of refereeing before being allowed to referee a World Cup final. For a machine learning model, this performance is typically tested on old data that the model has not seen before. A common approach for this is _cross-validation_. Cross-validation works by splitting the data into a _training_ and _test_ set. The model sees the data in the training set and is asked to predict the data in the test set. Next, the predictions on the test set are compared to the real answers and the model receives a score. This procedure is very similar to how students are tested at universities. The student can see training questions and is then tested and evaluated on a set of test questions. However, a student may be unlucky on the choice of test set. It may be that the chosen test questions are particularly difficult (or easy) and one could thus say that the test has a bias. Since statistical models can easily be reset (forced to unlearn) and since we nowadays have fast computers, cross-validation can reduce this bias. Instead of choosing one training and test set, the technique works by splitting the data in multiple _folds_. For each fold, a subset of the data is put in the training set and a different subset is put in the test set. Then the model is evaluated in each fold and the scores from each fold are combined into a general score. The aim of this general score is to estimate how well the model (or student) will do in the future when seeing new data (or questions). Cross-validation provides a single number indicating model performance. However, this number is not informative enough for the purpose of this thesis. For example, in the context of special forces selection, this number would not tell us how many recruits could be selected without making a mistake. Luckily, there is a way to get a clearer estimate, which was invented after the second World War. During the war, radars sent out pulses and received echos. Based on the echos, the British radar operators had to decide whether the echo was a plane or a flock of birds @neale1985ch. The stakes for these decisions were high. Mistakes could lead to a plane getting through unnoticed or to sending pilots to a flock of birds. After the war, researchers investigated how to systematically evaluate such radar systems. Simply put, the radar systems responded with a signal of a certain strength (a continuous signal) and this had to be converted to a binary decision on whether it is a plane (a binary signal). Given two similar radar systems or two similar radar configurations, how could one decide which one was better? One way is to think about it statistically via the false alarm and detection probabilities @kaplan1951statistical. Based on these false alarm and detection probabilities, a plot can be created that shows the trade-off between the two. This was then called the Receiver Operating Characteristic (ROC) curve @fox1953signal, see Figure #citefig(<typical-roc>) for an example. #figure( [ #image("../images/typical-roc.png", width: 50%) #note([ Image from #textcite(<fox1953signal>). Axis labels omitted for clarity. ]) ], caption: "An example ROC curve" ) <typical-roc> On this plot, the probability of a detection is plotted on the y-axis and the probability of a false alarm is plotted on the x-axis. These probabilities can be estimated by varying the threshold of the radar system. In essence, this is like asking the question "If we respond only if the signal is above X, how many detections and false alarms do we expect?" For example, setting the radar to be very sensitive will lead to many detections, but also many false alarms. When plotting one line for one radar, radar designers could decide how to configure the radar for the best trade-off between detections and false alarms. When plotting multiple lines for multiple systems, designers could decide which radar system was the best. Nowadays, this last part is often done without plotting because the Area Under the Curve (AUC) can be calculated. A higher AUC means that the system is more accurate overall. Later, the ROC curve was used not only for radar systems, but for many problems where a continuous signal is converted to a binary decision, like in this thesis where continuous model outcomes are converted to binary prediction decisions. These were some of the tools that we used in this thesis. The aim being to investigate the data in a statistically sound way. With these tools, we aimed to answer the question of who will make it through the commando training and who will dropout. #block([ == Thesis Chapters The core of this thesis is split into four parts. In Chapter 2, we focused on identifying personality traits that could differentiate between experienced commandos and ordinary Dutch men, and between successful graduates and dropouts in special forces training. We used the inference paradigm to compare the personality traits of these groups, providing insights into the role of personality in special forces selection. ], breakable: false) \ #v(-2em) Chapter 3 marks our transition from the inference to the inference and prediction paradigm. The chapter introduces SIRUS.jl, our implementation of the Stable and Interpretable RUle Sets (SIRUS) algorithm in Julia. SIRUS aims to combine the benefits of decision trees and random forests, offering high interpretability and stability. This chapter details the implementation, interpretability, stability, and performance of SIRUS.jl. We compare its predictive performance to similar models on various small real-world datasets. In Chapter 4, we used various machine learning techniques, including SIRUS, to predict dropout in special forces selection programs using both physical and psychological data, such as 2800 meters running time and personality traits. This data was collected at one point in time during the first week of the selection program. We again compared the performance, explainability, and stability and showed the benefits of the SIRUS model in this high-stakes context due to it having good predictive performance while retaining model stability and explainability. In Chapter 5, we measured psychological and physical stress and recovery states of recruits during the training program. This aimed to find early indicators of dropout. Again, using machine learning techniques, we compared the performance, explainability, and stability of the models. We also estimated the real-world predictive performance of the most suitable model. Then a final note on why this thesis contains some quotes and ideas from investors such as <NAME>, <NAME>, <NAME>, and <NAME>. It might sound like their occupation is unrelated to personnel selection. However, this is not true. All these individuals have excelled in making predictions, and often have an independently verified track record to prove it. For example, Buffett's success is based on selecting which companies will do well in the future. Just like personnel selection, this is a difficult task. Both personnel selection and company selection are about predicting those that will operate successfully in a complex environment. Just like in personnel selection, companies are also fragile: a single negative event can lead to a permanent bankruptcy. The accuracy of his selection decisions can be inspected by looking at the value of his public company Berkshire Hathaway. If you would have bought one share valued at \$19 in Berkshire in 1965, then this would today be worth more than half a million (Class A shares are worth \$615,591 at the time of writing). It is not possible for him to have faked these predictions. During all these decades, his financial statements have been verified by auditors, the tax authorities, and the Securities and Exchange Commission. This is why Buffett is known as the "Oracle of Omaha", and why ideas from investors seem relevant to personnel selection.
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/042%20-%20Strixhaven%3A%20School%20of%20Mages/002_A%20Cry%20of%20Magic.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "A Cry of Magic", set_name: "Strixhaven: School of Mages", story_date: datetime(day: 26, month: 03, year: 2021), author: "<NAME>", doc ) "Am I boring you, <NAME>?" I startle and knock my knee against the desk. My legs are too long for everything in Strixhaven, and Uvilda's office chairs are no exception. The Dean of Perfection sits with her hands folded delicately, perfectly matching the cool, controlled magic she wields. And, just in case anyone needs reminding, her office is the same. Cobalt walls, cerulean rugs, and gauzy azure curtains that tremble in the chilly breeze. The only discordant note in the decor is the candelabra. And me, I guess. #figure(image("002_A Cry of Magic/01.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) "Sorry," I say. "I've got a song stuck in my head." Uvilda cocks a thin brow. "Anything I'd know?" "I don't think so." It's soft—a distant lilt I can't quite catch hold of. Just a single line of melody, repeating since I woke up this morning. "I can't really remember the words." "Indeed? Memory seems to be an issue this semester, doesn't it?" I twist one of the bangles on my wrist. "I guess I should write stuff down." She chuckles like I've made a joke. I fidget with the bangles on my other arm. I mostly wear them to stop myself from biting my claws. Uvilda is okay. As senior mages go, I've met much worse, sitting through parties full of my mother's friends and admirers, enduring hours of gossip and backstabbing and social climbing. The dean just has a tendency to talk to people like they are complex magical computations that can be unraveled with the correct trigger phrase. "I'm not here to discourage you, <NAME>. On the contrary. I want to enable you to do the best work you can here at Prismari College." "I know that." "You are the only student who hasn't yet applied for a critique, and my professors tell me that it's because you have, so far, failed to finish anything." She pauses, waiting for me to make an excuse. I don't have one. "It's been almost a month since term began, <NAME>." She looks pointedly at my jingling bracelets, and I force myself to let them go. "That's not~actually true. I've finished stuff. I just~haven't turned anything in." "And whyever not?" I hesitate. "It's not~right. Not ready." "Shouldn't you let me be the judge of that? That's what a critique is for." I shrug. I want to tell her that I already know exactly what she'd criticize, but I know she'd find that impertinent. My mom always does. Beside Uvilda on the desk, one of the candle flames catches my eye. It's behaving oddly, flickering slightly out of time with the others. "<NAME>?" She gives me a thin smile. "Another song stuck in your head?" I take a deep breath. Strixhaven campus is drenched with the taste of magic, but this building is especially pungent. I hold back a sneeze. "I don't have anything prepared for a critique, and I don't have a good excuse. I'm not sure what else to say." I'm expecting anger; what I get is fathoms worse. Uvilda adopts a grandmotherly countenance. It looks like hard work. "Is there anything you'd like to discuss, Rootha?" I pause. "What do you mean?" Her expression doesn't change, but her fins ruffle with annoyance. All the candles on her desk flicker with the displacement of the air, except for one. "Things on your mind, emotional disturbances? Problems at home?" I take it back. Uvilda is exactly like the rest of them. Heat crawls up my neck. "This has nothing to do with my mother." "Your mother was an incredibly talented and delicate caster." Either Uvilda hasn't noticed my anger, or she doesn't care. "She was~what, the third generation of Prismari students in your family?" My eyes are drawn irresistibly to one of the art pieces on display in the office. A perfect replica of a snowflake, down to its delicate crystalline structure. Cold, but never melting. A flawless, secure bit of spellcraft. My mother made it her first month in Prismari. I want to tear it apart with my bare hands. "Fourth," I say. "She was the fourth. I'm the fifth." A Squallheart mage, unable to even finish a project. The candle flames shudder again, dancing in the breeze. I sink into the movement, letting Uvilda's chattering about my family wash over me. "And out of respect for your mother and in deference to the talent I #emph[know ] you possess, I'll allow you a chance to redeem yourself." I bite down on a snide retort. A side effect of growing up with no friends your own age is you have a tendency to address authority figures as if they're peers. "Oh?" "Bring me a completed project by tomorrow—" "#emph[Tomorrow?] " The candles flare with my temper. Uvilda's expression goes decidedly sour. "You said yourself you have finished work. Bring me some. Or I'm afraid I can no longer guarantee a place for you at Prismari college." The candles flame higher. #emph[Calm down, calm down. ] I knew something like this was coming, there's no reason for me to lose control. The candles settle. All except for one, which continues to dance. I'm unsurprised when, as soon as I clear the threshold of Uvilda's office, there is a whoosh and a flare of red light, followed by a squawk of annoyance. #figure(image("002_A Cry of Magic/02.jpg", width: 100%), caption: [Nassari, Dean of Expression | Art by: <NAME>], supplement: none, numbering: none) "Oh, cool down," says a voice that crackles at the edges. "Hello, Dean," I say dully, glancing over my shoulder. "Do you make it a habit to lurk in candle flames during student critiques?" "Ugh, call me Nassari. 'Dean' was my father's name." "Wait, really?" "No." Prismari's other senior mage taps a dark finger against their chin. "I'm not sure why I said that. Regardless, call me Nassari. Efreet don't stand on ceremony." "Nassari," I say, because I've never been great at ceremony either. "Same question, I guess." "Hmm? Ooh, no. Most of Uvilda's students are astoundingly dull." Nassari's feet don't quite touch the ground, flame gathering between their heels and the mosaic tiling of the floor. I half-expect to see a trail of scorch marks, but their magic is far too controlled for that. After all, they are the Dean of Expression, and they keep a tight rein around exactly what that expression entails. "But you interest me, Rootha. And I wanted to extend an offer of assistance, should you ever desire any advice that is less, shall we say~" "Practical?" "I was going to go with 'naggingly tiresome,' but that's far more even-minded." We've reached the top of the stairs, and I'm not sure if Nassari intends to follow me down them. Their office is high up in Conjurot Hall, along with their apartments and workshop. If I ask for Nassari's help, they could probably get me an extension. They could probably get me more than that. A reprieve. "I know your family's magic boasts a signature style," they say. "But I don't think it suits you." "What does that mean?" It comes out sharper than I intend. Nassari leans in close. I almost pull away due to their skin flushing red and orange, and the flames blooming in their eyes. Efreet have a reputation for being tricky and unpredictable. But, then again, orcs have a reputation for being violent. I hold my ground. "There's more to you than you let on," Nassari says, eyes hot enough to burn. "There's wild magic in you." The memory hits me like a slap, the same words spoken in a different voice. #emph[Wild magic. ] Green leaves, blue sky, and red. Red rage, red blood. A scream in my ears and a sick, giddy euphoria bursting through my veins. I stumble. Nassari catches me before I can tumble down the stairs. "I'm alright," I gasp, before they can ask. "Thanks for the offer, but I'll be fine." At least one good thing has come of Dean Uvilda going on about my mother: I remember where the song stuck in my head comes from. Not the words or the name, but its source. My mother used to sing it to herself as she worked. A palette in one hand, a paintbrush in the other, leaning close to her easel and humming softly. I would sit on the rugs and mix pigment for her while my siblings ran around outside with the neighborhood children. "Yellow, Roothie," she'd say, "as bright as you can make it." And I'd do my best to mix the paints the way she wanted. Even when I got them wrong, the paintings were always beautiful. Everything she did was beautiful. All Prismari students have their own set of rooms—a living space and a studio. Mine is on the west side of campus, overlooking the edge of Opus Walk. When I get home, one of the suns is setting above the lake, sending spangled light across its surface. I pour myself a splash of dry amaranthine liquor over ice, taking tiny sips and humming my mother's old song to myself as I try to find the ideal candidate for Uvilda's critique. Though, if I get drunk enough, I might just decide to pack up and run. A line of canvases leans against the studio wall—generic landscapes and portraits. All of them done in the last month, and none worth the pigment they're painted with. In theory, I was practicing technique, but nothing here is worth a critique. Like I told Uvilda, I already know everything she is going to say. I step up to my worktable, strewn with drafting paper, paintbrushes, and a chisel dented from when I threw it against the wall last week. My most recent piece from arcane sculpture class sits amidst the detritus. I sigh. That one is probably going to be my best bet. The piece is a deep, cool blue. It would fit right in with Uvilda's office. But beyond that, there's nothing to recommend it. It just looks like a chaotic burst, a wave frozen mid-splash, because that's exactly what it is. I filled a bucket with water and poured it onto the studio floor, freezing it as it splashed back up at me. The effect is not anywhere near as spectacular as I was hoping. My mother weaves intricate, glittering sculptures from water and ice, braiding each molecule together at a base level to build the most delicate, glimmering structure. All I can do is flash freeze it all at once, meaning I have no control over how it looks. No nuance, no artistry. Just raw, unfiltered magic thrown in an uncoordinated burst. Wild magic. I shudder, pour myself more amaranthine, and recast the freezing spell because the surface is looking a little drippy. The magic comes when I call, but it's sluggish and blurry. I would like to blame it on the alcohol, but~ My mother had a bowl of marbles in her studio, and I used to play with them as she worked, pouring them onto the carpet to make shapes. Cats, dogs, dragons, orcs, all dressed up for battle. I loved to spread my hands out over them and feel the little glass spheres against my palms, mix them up, push them together. But if I wanted the outlines to be precise, I had to line the marbles up one by one, slowly and carefully. That's what doing my mother's sort of magic feels like to me. Slow, careful, and dull. I'm beginning to feel the liquor when someone knocks on my door. "I know you're in there, Rooth. I can sense the melancholia." In a daze, I unlock the door. A woman stands on the threshold, eyes shiny black in the witchlight lining the corridor. "Felisa?" She grins, lopsided and brilliant, revealing the point of a sharp eyetooth. "Aren't you going to invite me in?" I clear my throat. "Come in." She glides past me smoothly. <NAME> is dressed to go out in a silver and black dress, her hair pinned up high to reveal a slender neck and softly pointed ears. It's the same dress she wore last year, when the two of us spent the night in the pub, drawn together through the necessity of not knowing anyone else. Felisa, because she's from halfway around the world, and me because my friend-making skills were pathetically atrophied. We drank too much and told each other our histories. Or lied about them, at least. I told her a gilded picture of growing up with <NAME>, lauded artist-mage, and she told me about the Fang clan and their sprawling mansion. Whether or not it was true, she lived up to the fiction—a vampire, elegant and keen, with a brutal wit unique even among others of her kind. I liked her so much when we met. I still do. At least in theory. In practice, we've barely spoken since we chose our colleges. "Well, this is just massive!" Felisa announces, spinning in the center of the room so that her skirt flares out. "You have a whole extra room! How is that equitable? I'll have to complain to the dean~it's completely unacceptable that I don't have a studio of my own, even though I can't paint to save my life. Oh, were you working?" "I was just about done." The two of us stand on either side of my worktable. "Is there something you needed?" "I haven't seen you in ages—I thought I might as well check up. You haven't been coming to the Bow's End." I'm immediately suspicious. Not because we parted on bad terms, but because there's a rehearsed quality to this conversation. "I haven't really felt like drinking much lately," I say cautiously. Felisa cocks her head at the glass in my hand. "I haven't really felt like drinking in public recently," I amend. "Uh-huh." She reaches for the sculpture, and I have to force myself not to knock her hand away. "Did you make this?" I nod. "It's pretty." "Pretty." My voice sounds like it's coming from somewhere outside of my chest. "Yeah." Felisa's eyes glitter beneath the studio lights. "Not as pretty as you, though." She laughs—a warm, musical sound. It's so addicting that I want to laugh with her. "I don't even know why you're here." She takes a step closer, until I could reach out and touch her. "If I was as pretty as you, I wouldn't even bother with university." Heat hits my cheeks, then my chest, then my gut, hard, as irritation curls inside me like a fist. "Don't." "What?" "Don't use magic on me." I pull away from her. "I know better than to trust anything anyone from Silverquill says." Felisa's fangs gleam in a snarl, before she wrestles herself back under control. "Wow. Well, fine. I was just offering some encouragement—you looked like you could use it." "What is that supposed to mean?" I snap back. Felisa is a Vainglory—she uses words to inspire or reproach, which can result in intense dips and peaks in a target's emotional stability. It's a complex sort of magic that isn't easy to teach. Either you have the knack for it, or you don't. I feel the strain of it against the insides of my eyelids and the back of my throat. The anger that has been simmering in the pit of my stomach since the office today blooms back into an inferno. "Stop it! I don't need your lies or your encouragement or anything else you can offer." The magic swirls inside me, pushing at the architecture of my bones. I see red blood and blue sky and hear the screams surrounding me. And then I just see Felisa, looking at me like she doesn't know who I am. "Maybe you should go." She goes. I'm shaking. I feel the little tremors in my arms and legs. I splash more amaranthine into the glass and down it in a gulp. Pretty. Pretty. What good is pretty going to get me? My mother's art is more than pretty. It's transcendent. It's powerful. If I bring something pretty to Dean Uvilda I know exactly what she'll say. When my hand reaches toward my project, it's like it belongs to someone else. My claws glint and my bangles clang together. My sculpture chimes out like a thousand tiny bells as I smash it to pieces on the studio floor. #figure(image("002_A Cry of Magic/03.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) The Opus Walk is deserted at night, but the witchlights burn along the path, guiding my way. I stagger past rows and rows of past art projects, beautiful and impossible, gifted to the college by grateful students. Everyone leaves something behind when they graduate—it's tradition. It isn't hard to find my mother's. I know her magic by sight. Her greatest creation: an endless waterfall pouring out of nothing and disappearing back into nowhere. The magic is flawless, but easy to disrupt. With a touch of my fingers, I feel all the ways it's held together for decades. I could unwind it thread by thread, or I could just smash it. Vindictive glee rises inside me. <NAME> is famous, beloved, but her work will be just as easily undone as her worthless daughter's. "I wouldn't. It would be a #emph[mess] ." A slender cord of flame entwines my wrist, more vapor than fire. But then I strain against it and it heats, hotter and hotter until I cry out, scalded. <NAME> releases me and holds out a patient hand. "Let me see." They don't sound angry, but there's enough effortless command in their voice that I don't even dream of disobeying. Not magic. Just authority. Their skin is perfectly cool to the touch, and when they smooth a thumb across my wrist, the burn is gone. "Good as new." I pull away. I feel so empty that I'm echoing. "Were you following me?" "Yes." "Oh." I wasn't expecting honesty, and I certainly wasn't expecting it without admonishment attached. #emph[And it's a good thing I was following you.] "Did you set Felisa on me, too?" Nassari's glowing coal eyes narrow. "I don't know who that is." "She's Silverquill. A Vainglory. We're—we were friends. She came over out of nowhere and started using encouragement magic on me." Nassari makes a sound in their throat that reminds me of fire devouring parchment. "That sounds more up Uvilda's street than mine. Did it work?" I snort. "I don't like having my emotions toyed with." "Nobody does." "Some people must," I say. "Otherwise no one in Silverquill would have a job." Nassari's eyes burn even brighter. "Hmm, but does one visit a Vainglory because they want to, or because they've no choice?" I'm not sober enough for this. "I don't know! Why does anyone do anything?" "Ah, the eternal riddle. Let's discuss it away from delicate works of art. I love a bit of destruction, but the gardening golems will have my hide if I let you trash the lawn." After a moment's hesitation, I take their offered arm and let them lead me from my mother's waterfall. "So you're telling me that Uvilda made my friend use magic on me for~what? The whole point of a critique is I do the work myself!" "Hm." Nassari's mouth flattens out. "Maybe it's less your success she's courting, and more the notice of an interested party." I struggle to parse what they mean, and when I do, anger ratchets back up inside me in tightening spirals. "My mother. Of course." "The Squallhearts have been generous with donations in the past," Nassari says. I know that. Of course I do. But it had somehow never occurred to me that I might have only been accepted into Strixhaven because of my mother's fame. I would #emph[go] to Strixhaven because that's what Squallheart women do, but I'd assumed, maybe idiotically, that I would get there on my own merits. I'm glad Nassari is here because I'm not sure what I would do if they weren't. I know they feel the suppressed violence inside me. The wild magic. "Can I tell you a secret?" The witchlight turns their flames ghostly. "I~guess? I'm not great with secrets." "That's alright, I trust you." They tap a finger against their mouth, miming a whisper. "I never liked your mother." "#emph[What?] " Of everything in the world they could have said, I hadn't been expecting that. "But~she's a genius. Do you know how much one of her paintings goes for?" Nassari sticks out a molten orange tongue in a childish show of dislike. "Eh. Sure. But the woman herself~no offense to your family, but she was always stuck-up and prickly in my class. All grins while she needed you, a blank pane of glass when she didn't." I stare at them, because I don't think I've ever heard anyone sum up my mother so brutally and accurately. "Then why are you doing all this?" It's louder than I mean it, frustration welling up. "If I'm not your student and you don't care about my mother, why waste your time on me?" The breeze whips Nassari's flames around their ankles. "Do you know how an earthquake feels? Not the shakes themselves, but the potential before they begin. The taste of the air before a storm, the receding tide before a wave. That's what you feel like to me. The magic that you're doing in your classes—clean, tidy, ordered magic. It doesn't suit you." The words open a pit inside me, horror bubbling out. That Nassari can stand there and say this to me, can reach out and grab at all the things inside that scare me the most and wrench them out into the open. I sway backward. "You don't understand." "Explain, then." That command again. No compulsion, only will tempered in flames. My breath shudders in my chest. "I don't know where to start." "Anywhere." I close my eyes briefly. "I came into magic early. When I was about eight. That's very young for an orc. I was a clumsy child. Big hands, big feet, and with the magic, it just got worse. I had a terrible temper. I would~throw things. Break them. Scream if I didn't get what I wanted. Which is normal for a kid, I guess. But I was a kid who could set things on fire with my brain." I force a laugh. It hurts. "I was in the yard playing with my brothers. One of them—Tomlin, the youngest~I was angry with him. I barely even remember what he was doing. Probably poking me with a stick, something stupid. "I was so angry. I wanted to hurt him, and I did." I clench my jaw against the memories. "It felt—good. Right. Like it was what I was meant to be doing. He survived, he's fine, but nobody ever trusted me again. None of the nearby families would let their kids anywhere near me. So while my brothers and sister were out in the woods running around with kids our age, I was inside. Being taught to control my magic." #emph[Say it, Rootha.] "Even if it doesn't come to me naturally. I can do it. I have done it. Until now." Nassari makes a soft noise beside me. My agitated strides have brought us across the entire length of Opus Walk, and we stand at the edge of the inhabitable section of Prismari campus. Beyond is darkness interspersed with hazes of magic—Furygale. A graveyard of abandoned projects and half-cast spells that were not happy to surrender themselves back to their base particles. No one is supposed to come here, but people do. Felisa used to attend honor duels here regularly, watching older students solve their problems with magic when words were no longer adequate. Exactly the place to dump a broken thing that doesn't work as it ought. "You've never told that story to anyone, have you?" I stare out across the dark. "I don't want sympathy." "Good. Because you'll get none from me." I look round at them, expecting a grin. Just another joke. But there is nothing joking in their expression, nothing kind. Bafflingly, I start to laugh, even as everything inside me pulls tighter and tighter. "Well, great! Thanks for the encouragement." Nassari lifts a shoulder. "If I thought encouragement would help, I'd have sent you back to your Vainglory. You think you're the only mage with a story like that? Magic isn't a clean discipline." "Fantastic," I sneer. "Good to know how average I am. And I suppose these mages have all grown up to lead happy lives?" "On the contrary." Nassari lifts up the rope separating the end of the Walk from Furygale, flowing under it with otherworldly grace. "Many let it ruin them, like you've done here." That hurts like a slap. "I haven't done—!" "You made one mistake, and you vanished into yourself." "#emph[One mistake?] " My voice echoes off into the hollows. "I could have killed my brother, and I enjoyed it!" Nassari lets the rope slowly drop, separating us. "Well, you won't kill me. No matter how much you enjoy it." I bare my fangs. "Are you so sure about that?" They match my smile, vicious and raw with power. "Try me." They are goading me. I haven't let anyone do that in over fifteen years, but I can't stand the disdain in their eyes. The disappointed letdown. They thought I was something worthy, interesting. Something valuable. I'd proved them wrong. It makes me angry. It makes me #emph[burn] . #figure(image("002_A Cry of Magic/04.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) Power bursts hard and blazing from my diaphragm, a hot gout of magic that comes out in a shout. Not even really an incantation, just a raw discharge of emotion. Utterly uncontrolled, primed to kill. Nassari moves faster than I have ever seen a creature move. Like flame igniting dry grass. They spring backward into the air and catch my magic between their palms. The force of it knocks them higher into the air, shockwaves hitting the ground and whipping my braids around my head. They turn an elegant flip in the air and tumble back to the ground. The magic they siphon away and out into Furygale, where it hangs in the air, crackling like static. My knees hit the pavement. "No, no, no." All of my insides have been scooped out. I echo like the upper galleries of the Biblioplex. I attacked a dean. "Get up," Nassari says. I swat my hair out of my eyes. Their calm is infuriating. "I attacked you!" "I told you to." "That doesn't matter!" "I'm not going to throw you out of Prismari, <NAME>. And neither is Dean Uvilda. If you want to leave, you have to do that yourself." I stare up at them, silhouetted against the discharge of my magic still hanging in the air. Throughout my life, all anyone has ever offered me is vague encouragement and methods of control. Nassari offers me a hand up and over the rope into Furygale. "I still don't have a project for Uvilda," I say. I'm shaking. I try to hide it by curling my fists. In the dark, Nassari's whole body blazes. They are the brightest thing here. "Nothing?" They glance toward the spray of magic. "That doesn't look like nothing." I snort. "Yeah, that's not art. That's a tantrum." "Do you know what I turned in for my first project?" "No. What?" Nassari's molten tongue gleams behind their smile. "An earthquake." I laugh, again not sure if they're joking. I step closer to the magic hovering in the air. It's~not exactly formless. There's a consistency to it, a constellation. I put out a hand— And yank it backward. The song. My mother's song rings in my ears when I touch the magic. Far too loud—it's practically a shriek and there's still no words—but I think I can hear them somewhere deep inside it. I could pull them out—I know I could. But not in one night. I shake my head. "I can't bring this to Uvilda." "Of course not." Nassari's eyebrows are made of flame, but they can still appear extremely sardonic. "Didn't I say? You aren't leaving as long as you still want to stay. Uvilda isn't your advisor anymore. I am. And I say you pass." I am momentarily speechless, my mouth working. "Uvilda won't be happy about that." "I'll deal with her." "Why?" I burst out. "Why are you doing this for me? I'm not exceptional. I'm not unique. I'm—" "One of mine," Nassari says, and pierces me with a look so intense I want to flinch away. "The magic inside you is what I am made of, body and soul. And I will not let it burn itself away to nothing." I swallow, all of my doubts crowding me. "I'm not worth that." "Maybe not yet." Nassari's mouth is crooked. "But I have a head for long-term investments."
https://github.com/rxt1077/it610
https://raw.githubusercontent.com/rxt1077/it610/master/markup/slides/k8s-deployment.typ
typst
#import "/templates/slides.typ": * #show: university-theme.with( short-title: [K8s Deployment], ) #title-slide( title: [Deploying an Application on Kubernetes], ) #focus-slide[What do we need to know about an app before we deploy on Kubernetes?] #matrix-slide(columns: 3, rows: 2, [What are the different parts of this app?], [Which part faces the users?], [Who are the admins?], [Which parts are stateful?], [What resources does this app require?], [What is the baseline for use?], ) #alternate( title: [Containerizing the Application], image: licensed-image( file: "/images/containers.jpg", license: "CC BY 2.0", title: [Multicolored containers], url: "https://www.flickr.com/photos/93755244@N00/3144199355", author: [<NAME>], author-url: "https://www.flickr.com/photos/93755244@N00", ), text: [ - Developed internally - Deployed to an internal container registry - Usually the end result of a CI/CD pipeline ], ) #alternate( title: [Designing K8s Objects], image: licensed-image( file: "/images/k8s-objects.svg", license: "CC BY 4.0", title: [Kubernetes Icons Set], url: "https://github.com/kubernetes/community/tree/master/icons", author: [<NAME>], author-url: "https://github.com/etiennecoutaud", ), text: [ - Deployments - Services - Volumes ] ) #alternate( title: [Testing], image: licensed-image( file: "/images/k8s-meme.png", license: "FAIRUSE", title: [We use kubernetes now], url: "https://dchan.cc/a-kubernetes-jouney/", ), text: [ - Can users use it? - Can the admins use it? - Does is scale? - Can you update? - Can you rollback? ], ) #alternate( title: [Container Registry Options], image: licensed-image( file: "/images/container-registry.svg", license: "FAIRUSE", title: [Azure Container Registry Logo], url: "https://azure.microsoft.com/en-us/products/container-registry", ), text: [ - self-hosted - #link("https://hub.docker.com")[Docker Hub] (not private) - #link("https://aws.amazon.com/ecr")[ECR] - #link("https://cloud.google.com/container-registry")[GCR] - #link("https://azure.microsoft.com/en-us/services/container-registry")[ACR] ] ) #alternate( title: [Kubernetes Cluster Options], image: licensed-image( file: "/images/k8s.svg", license: "CC BY 4.0", title: [Kubernetes logo without workmark.svg], url: "https://upload.wikimedia.org/wikipedia/commons/3/39/Kubernetes_logo_without_workmark.svg", author: [Google, Inc], author-url: "https://www.google.com", ), text: [ - Self-hosted - k8s on IaaS - k8s as a service: (#link("https://aws.amazon.com/eks")[EKS], #link("https://azure.microsoft.com/en-us/services/kubernetes-service")[AKS], #link("https://cloud.google.com/kubernetes-engine")[GKE]) - What's the container registry (CR) interop? ] )
https://github.com/MrToWy/Bachelorarbeit
https://raw.githubusercontent.com/MrToWy/Bachelorarbeit/master/Diagrams/rendered/idea2.typ
typst
#image("idea2.svg", width: 55%)
https://github.com/fsr/rust-lessons
https://raw.githubusercontent.com/fsr/rust-lessons/master/src/lesson4.typ
typst
#import "slides.typ": * #show: slides.with( authors: ("<NAME>", "<NAME>"), short-authors: "H&A", title: "Wer rastet, der rostet", short-title: "Rust-Kurs Lesson 4", subtitle: "Ein Rust-Kurs für Anfänger", date: "Sommersemester 2023", ) #show "theref": $arrow.double$ #show link: underline #new-section("Structs") #slide(title: "Structs: Overview")[ - custom type which contains structured data - add meaning and context to the representation of your data \ e.g. variable names: `age` provides meaning, `a` does not tell you what it contains Kinds of structs: - structs (most common) - tuple structs - unit-like structs ] #slide(title: "Structs: Definiton, Instatiation and Access")[ #columns(2)[ - struct names are _CamelCase_ - field names are _snake_case_ - data is stored in named fields #begin(2)[ ```rust // file: src/main.rs // Definition of the Rectangle type // which is a struct struct Rectangle { width: u32, height: u32, } ``` ] #begin(5)[ Can you mark individual fields as _mutable_? Why or why not? ] #colbreak() #begin(3)[ - access fields of an instance with \ the _dot_ operator *`.`* ```rust // file: src/main.rs fn main() { // `r1` is an instance of // the Rectangle struct let mut r1 = Rectangle { width: 20, height: 40, }; // field access with `.` operator println!("width: {}", r1.width); r1.height = 12; } ``` ] ] ] #slide(title: "Field init shorthand")[ - avoid repetition when parameter names and field names are the same #alternatives[ ```rust fn new_rectangle(width: u32, height: u32) -> Rectangle { Rectangle { width: width, height: height, } } ``` ][ ```rust fn new_rectangle(width: u32, height: u32) -> Rectangle { Rectangle { width, height, } } ``` ] ] #slide(title: "Struct update syntax")[ - copy fields with the same data to another struct ```rust struct ManyFields { a: bool, b: i16, c: String, } let mf1 = ManyFields { a: true, b: -12, c: String::from("message") }; let mf2 = ManyFields { c: String::from("important message"), ..mf1, // `a` and `b` are copied from `mf1` into `mf2` }; ``` #uncover(2)[ - fields with types that cannot be copied (e.g. `c` of type `String`), will be moved \ theref `mf1` cannot be used anymore ] ] #slide(title: "Tuple structs")[ - field access via _dot_ operator *`.`* - indices start from 0 theref basically _named tuples_ ```rust struct ColorRGB(u8, u8, u8); fn main() { let unnamed_tuple = (0, 12, 9); let magenta = ColorRGB(255, 0, 255); ``` #uncover(2)[ ```rust println!("second field of unnamed_tuple: {}", unnamed_tuple.1); // access a tuple struct like a normal tuple println!("blue value of magenta: {}", magenta.2); ``` ] ```rust } ``` ] #slide(title: "Unit-like structs")[ - a struct without any fields or data ```rust struct MyUnit; fn main() { let my_unit1 = MyUnit; let my_unit2 = MyUnit {}; // `my_unit2` contains the same value as `my_unit1` // the `{}` are unnecessary } ``` ] #slide(title: "Adding functionality with derived traits")[ - "deriving a trait" theref Asking rustc to implement it for us - add `#[derive(TraitA, TraitB)]` in front of a struct definition - does not work with every trait ] #slide(title: "Adding functionality with derived traits: Printing structs")[ - the `Debug` trait will let us use the debug formatter ```rust #[derive(Debug)] struct Rectangle { width: u32, height: u32, } fn main() { let r1 = Rectangle { width: 20, height: 40 }; println!("my struct: {:?}", r1); println!("my struct: {}", r1); // will not work, because `{}` requires the `Display` trait } ``` ] #slide(title: "Adding functionality with derived traits: Cloning structs")[ #columns(2)[ - the `Clone` trait will implement an element-wise deep copy \ theref every data on the heap will be allocated again ```rust #[derive(Debug, Clone)] struct User { name: String, age: u32, } ``` #colbreak() ```rust fn main() { let u1 = User { name: String::from("Bob"), age: 40 }; let u2 = User { age: 20, ..u1.clone() }; // without `.clone()` accessing `u1` // would be invalid now println!("user 1: {:?}", u1); } ``` ] ] #new-section("Associated functions") #slide(title: "Initialising structs with functions")[ #columns(2, gutter: -25%)[ ```rust // file: src/main.rs struct Rectangle { width: u32, height: u32, } ``` #colbreak() #alternatives[ ```rust // file: src/main.rs fn main() { let r1 = Rectangle { width: 20, height: 40, }; let r2 = Rectangle { width: 9_000, height: 10, }; } ``` ][ ```rust // file: src/main.rs fn new_rectangle(width: u32, height: u32) -> Rectangle { Rectangle { width, height, } } fn main() { let r1 = new_rectangle(20, 40); let r2 = new_rectangle(9_000, 10); } ``` ] ] ] #slide(title: "Creating our first associated function")[ ```rust struct Rectangle { width: u32, height: u32, } ``` \ #columns(2)[ What we have: ```rust let r1 = new_rectangle(20, 40); ``` `new_rectangle` is a *free function* \ theref it does _not belong_ to a certain namespace #colbreak() What we want: ```rust let r1 = Rectangle::new(20, 40); ``` `new` is an *associated function* \ theref it belongs to the `Rectangle` namespace ] ] #slide(title: "Creating our first associated function")[ #alternatives(position: top)[ ```rust fn main() { let r1 = new_rectangle(20, 40); } fn new_rectangle(width: u32, height: u32) -> Rectangle { Rectangle { width, height, } } ``` ][ ```rust fn main() { let r1 = Rectangle::new_rectangle(20, 40); } impl Rectangle { fn new_rectangle(width: u32, height: u32) -> Rectangle { Rectangle { width, height, } } } ``` ][ ```rust fn main() { let r1 = Rectangle::new(20, 40); } impl Rectangle { fn new(width: u32, height: u32) -> Rectangle { Rectangle { width, height, } } } ``` - every function defined in `impl` belongs to the namespace ][ ```rust fn main() { let r1 = Rectangle::new(20, 40); } impl Rectangle { fn new(width: u32, height: u32) -> Self { Self { width, height, } } } ``` - `Self` is an alias to the type from the `impl` block \ theref avoids repetion ] ] #slide(title: "Summary: Associated functions")[ - defined in an `impl` block - belong to the namespace of the type - called using the _namespace_ operator *`::`* \ `Rectangle::new(20, 40)` - e.g. `String::from("")`, `String::new()` ] #slide(title: "Adding more functionality with methods")[ ```rust fn set_width(rect: &mut Rectangle, width: u32) { rect.width = width } ``` \ #columns(2)[ What we have: ```rust let mut r1 = Rectangle::new(20, 40); set_width(&mut r1, 70); ``` `set_width` is a *free function* #colbreak() What we want: ```rust let mut r1 = Rectangle::new(20, 40); r1.set_width(70); ``` `set_width` is a *method* that operates on an instance of `Rectangle` \ theref the _dot_ operator *`.`* is used to call it ] ] #slide(title: "The methodic way from functions to methods")[ #alternatives(position: bottom)[ Starting with `set_width` as a free function ```rust fn set_width(rect: &mut Rectangle, width: u32) { rect.width = width } fn main() { let mut r1 = Rectangle::new(20, 40); set_width(&mut r1, 70); } ``` ][ Moving `set_width` into the `impl` block ```rust impl Rectangle { fn set_width(rect: &mut Rectangle, width: u32) { rect.width = width } } fn main() { let mut r1 = Rectangle::new(20, 40); Rectangle::set_width(&mut r1, 70); } ``` ][ `Rectangle` theref `Self`, `rect` theref `self` ```rust impl Rectangle { fn set_width(self: &mut Self, width: u32) { self.width = width } } fn main() { let mut r1 = Rectangle::new(20, 40); Rectangle::set_width(&mut r1, 70); } ``` ][ `&mut self` is an alias to `self: &mut Self`, replace it ```rust impl Rectangle { fn set_width(&mut self, width: u32) { self.width = width } } fn main() { let mut r1 = Rectangle::new(20, 40); Rectangle::set_width(&mut r1, 70); } ``` ][ `set_width` is now a method and we can call on an instance \ in the same way we can access fields of an instance \ theref with the _dot_ operator *`.`* ```rust impl Rectangle { fn set_width(&mut self, width: u32) { self.width = width } } fn main() { let mut r1 = Rectangle::new(20, 40); r1.set_width(70); } ``` ] ] #slide(title: "Summary: Methods")[ - special *associated functions* with `self` as their first parameter - also called *member* functions - operate on an instance of a type - called using the _dot_ operator *`.`* \ `r1.set_width(70)` - calling a method automatically (de-)references the variable \ `r1.set_width(70)` theref `(&mut r1).set_width(70)` ] #slide(title: "The impl block")[ - `impl` (implementation) block contains function definitions for a type - multiple `impl` blocks for the same type are allowed Aliases in an `impl` block: - `Self` is an alias to the type - `fn method(&mut self)` theref `fn method(self: &mut Self)` - `fn method(&self)` theref `fn method(self: &Self)` - `fn method(self)` theref `fn method(self: Self)` ] #new-section("Tasks") #slide(title: "Task 'rect'", theme-variant: "action")[ #two-grid()[ #uncover("1-")[- create a `struct Rect` with `width` and `height`] #uncover("2-")[- implement `fmt::Display` for it so you can easily `print!("{}", r)` it] #uncover("3-")[- create some, maybe implement `Rect::new(...)`] #uncover("4-")[- implement `r.area()` and check if it works] #uncover("5-")[- implement `r.can_contain(other)` to compare two rectangles] #uncover("6-")[- implement `r.draw()` to print some `#`s] ][ #alternatives()[``` r: Rect { width: 5, height: 3 } ```][``` r: Rect(5 x 3) ```][``` r: Rect(5 x 3) s: Rect(4 x 3) ```][``` r: Rect(5 x 3) s: Rect(4 x 3) r.area(): 15 ```][``` r: Rect(5 x 3) s: Rect(4 x 3) r.area(): 15 r.can_contain(s): true s.can_contain(r): false ```][``` r: Rect(5 x 3) s: Rect(4 x 3) r.area(): 15 r.can_contain(s): true s.can_contain(r): false ##### ##### ##### ```] ] ] #slide(title: "Task 'rect' – fmt::Debug", theme-variant: "action")[ so that `println!("{:?}", rect);` works #alternatives()[```rust fn main() { let r = Rect::new(5, 3); println!("{:?}", r); } ```][```rust struct Rect {...} impl Rect { fn new(...) -> Rect {...} ... } fn main() { let r = Rect::new(5, 3); println!("{:?}", r); } ```][```rust #[derive(Debug)] struct Rect {...} impl Rect { fn new(...) -> Rect {...} ... } fn main() { let r = Rect::new(5, 3); println!("{:?}", r); } ```] ] #slide(title: "Task 'rect' – fmt::Display", theme-variant: "action")[ so that `println!("{}", rect);` works #alternatives()[```rust use std::fmt; ```][```rust use std::fmt; struct Rect {...} impl Rect { fn new(...) -> Rect {...} ... } ```][```rust use std::fmt; struct Rect {...} impl Rect { fn new(...) -> Rect {...} ... } impl fmt::Display for Rect { fn fmt(&self, ) -> { } } ```][```rust use std::fmt; struct Rect {...} impl Rect { fn new(...) -> Rect {...} ... } impl fmt::Display for Rect { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, " ", ) } } ```][```rust use std::fmt; struct Rect {...} impl Rect { fn new(...) -> Rect {...} ... } impl fmt::Display for Rect { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Rect({} x {})", self.width, self.height) } } ```] ] #slide(title: "Task 'bars'", theme-variant: "action")[ drawing bar diagrams of functions #columns(2)[ #uncover("1-")[- define `height` and `width`] #uncover("2-")[- create an array with test values] #uncover("3-")[- write a function that draws your array] #uncover("4-")[- write a function that finds the maximum] #uncover("5-")[- add some very large values] #uncover("6-")[- scale your diagram to your `width`] #uncover("7-")[- use one or more structs where useful] #colbreak() #alternatives(position: bottom)[ ``` /– width –\ \ | |_height | | / ``` ][ ``` /– width –\ 9 \ 4 | 7 |_height 1 | 12 | 5 / ``` ][ ``` /– width –\ ######### 9 \ #### 4 | ####### 7 |_height # 1 | ############ 12 | ##### 5 / ``` ][ ``` /– width –\ ######### 9 \ #### 4 | ####### 7 |_height # 1 | ############ 12 | ##### 5 / ``` ][ ``` /– width –\ ######### 9 \ #### 4 | ####### 7 |_height # 1 | ####################################################################################################################### 120 ##### 5 / ``` ][ ``` /– width –\ ######### 90 \ #### 40 | ####### 70 |_height # 10 | ############ 120 | ##### 50 / ``` ][ ``` ######### 90 #### 40 ####### 70 # 10 ############ 120 ##### 50 ``` ] ] ]
https://github.com/Mouwrice/thesis-typst
https://raw.githubusercontent.com/Mouwrice/thesis-typst/main/extended-abstract/extended_abstract.typ
typst
#import "lib.typ": * #import "@preview/fontawesome:0.2.0": * #let link-icon = super[#fa-arrow-up-right-from-square()] #show: ieee.with( title: [Air Drumming: Applied on-device body pose estimation], abstract: [ Body pose estimation is a new and exciting field in Computer Vision. It allows for the estimation of the position of key body parts in images or videos. In this paper, we explore the use of MediaPipe, a popular open-source library, for Body Pose Estimation, promising real-time on-device body pose estimation. We present a demo application that uses MediaPipe to estimate the body pose of a user air drumming. The accuracy of the pose estimation is evaluated, and some issues are discussed. MediaPipe Pose is shown to achieve an average accuracy of 5-10 mm but suffers from noise and jitter. We present a post-processing method that can reduce that noise and jitter. The method is general, and can be applied to any pose estimation model. ], authors: ( ( name: "<NAME>", ), ( name: "Prof dr. ir. <NAME> (Supervisor)" ), ( name: "Prof. dr. <NAME> (Supervisor)", ) ), index-terms: ("Body Pose Estimation", "MediaPipe", "Computer Vision", "Motion Capture", "3D Pose Estimation", "Demo Application"), bibliography: bibliography("../bib.yml"), paper-size: "a4" ) = Introduction Body pose estimation is a relatively new domain in computer vision that aims to estimate the position of key body parts in images or videos. This technology has a wide range of applications, including human-computer interaction, augmented reality, and motion capture. In recent years, there has been a growing interest in on-device body pose estimation, which refers to the ability to perform body pose estimation directly on a device, such as a smartphone or tablet, without the need for specialized hardware or an internet connection. This has been made possible by advancements in deep learning and computer vision, which have enabled the development of lightweight and efficient models that can run in real-time on mobile devices. Over the years, various models have been developed, such as Human Motion @human-motion, OpenPose @openpose-paper, AlphaPose @alphapose @alphapose-paper, MindPose @mindpose, and MediaPipe Pose @mediapipe-pose-landmarker, each with its strengths and weaknesses. MediaPipe Pose by Google is a popular open-source library that provides real-time on-device body pose estimation, making it an attractive choice for interactive applications. In this paper, we discuss some issues that are present in the MediaPipe Pose model, such as noise and jitter in the output. A relatively simple, yet effective, post-processing method is proposed to reduce these issues. The method is general and can be applied to any pose estimation model. The accuracy of the pose estimation is evaluated, and some issues highlighted. A demo application has been developed to provide a fun and interactive experience that showcases the capabilities and limitations of on-device body pose estimation. The application uses MediaPipe to estimate the body pose of a user air drumming and generates drum sounds based on the user's hand and foot movements. = MediaPipe Pose MediaPipe Pose is an open-source library developed by Google that provides real-time on-device body pose estimation. It is part of the MediaPipe framework @mediapipe-framework. The library uses a deep neural network to estimate the position of specific landmarks. Three different models are available each increasing in size. The models are `LITE`, `FULL`, and `HEAVY`. The `LITE` model is the smallest and fastest, but also the least accurate. The `FULL` model is the default model and provides a good balance between speed and accuracy. The `HEAVY` model is the largest and most accurate but also the slowest due to the large network. MediaPipe Pose outputs the 3D coordinates of 33 key points on the human body including elements of the hands and feet, called landmarks. Two kinds of landmarks are available, `Landmark` and `WorldLandmark`. The `Landmark` landmarks are the 3D coordinates of the key points in the image frame coordinate system. This means that the origin of the coordinate system is a corner of the image frame and the horizontal and vertical axes are normalized to be between 0 and 1. The depth is then the depth from the camera to the landmark. The `WorldLandmark` landmarks are the 3D coordinates of the key points in a more traditional coordinate system. The midpoint between the hips is taken as the origin of the coordinate system where all axes originate from. The `WorldLandmark` landmarks estimate the real-world size of the landmarks instead of the normalized size of the `Landmark` landmarks. `WorldLandmark` landmarks decouple the coordinates from the camera at a slight loss of accuracy. #colbreak() = Measurements The performance of the MediaPipe Pose model was evaluated by measuring the accuracy and deviation of the model under different conditions. Using a traditional motion capture system as ground truth. #footnote[ A traditional Qualisys motion capture system was used as ground truth. Using infrared reflective markers, the system can track the position of the markers with sub-millimetre accuracy. These positions were used to calculate the ground truth key points for the body pose estimation. ] The measurements were conducted in a controlled environment with a single user performing various movements, such as raising hands, swinging arms, and air drumming. #footnote[ All measurements and their results are publicly available on GitHub: #link("https://github.com/Mouwrice/DrumPyAnalysis")[https://github.com/Mouwrice/DrumPyAnalysis #link-icon] ] The accuracy of the pose estimation was evaluated by comparing the estimated key points with the ground truth key points. The accuracy is the absolute deviation from the ground truth key points, measured in millimetres. The mean, standard deviation, minimum, maximum, and percentiles of the accuracy were calculated for each key point. The results of one of the measurements is shown in @mau-drum-regular-full-total. It shows that on average the deviation from the ground truth key points is around 5-10 mm, with a standard deviation of around 6-10 mm, for the Y and Z axes, the lateral axes. The deviation is a lot higher for the X axis, which is the depth axis. Due to this low accuracy in the depth axis, the 3D pose estimation is not as accurate as one might hope. However, for the application of air drumming, the depth axis is not used, so the accuracy of the lateral, 2D axes is sufficient for this use case. #show table.cell.where(x: 0): set text(weight: "bold") #figure( caption: [The total deviation from the `maurice_drum_regular` measurement. Model: `FULL`, Marker type: `Landmark`.], placement: none )[ #table( columns: (auto, 2fr, 2fr, 2fr), align: (left, right, right, right), table.header[Deviation (mm)][X][Y][Z], [mean], [ 44.054789], [ 5.877316], [10.028784], [std ], [ 52.458578], [ 6.611694], [10.963382], [min ], [ 0.000578], [ 0.000225], [ 0.001258], [25% ], [ 8.880800], [ 1.829242], [ 2.919620], [50% ], [ 24.080457], [ 4.135115], [ 6.481524], [75% ], [ 64.801731], [ 7.475370], [13.322674], [max ], [423.136841], [68.750352], [91.792725], ) ] <mau-drum-regular-full-total> = Noise and Jitter == Jitter One aspect that leads to a less stable signal is jitter. Jitter is the sudden, unintended variation in the position of a tracked marker. In the recordings, we see that this jitter mostly occurs when the tracked body part is either fast-moving or occluded in any way. This is mostly present when crossing arms in our recordings. As shown in @jitter-example-right-wrist, the jitter is clearly visible around the 20-second mark (blue, red is the motion captured signal). This jitter is not present in all recordings, but is a factor that can lead to a less stable signal. Jitter occurs less frequently in the larger models which make them more stable and accurate. When developing an application that relies on the stability of the signal, it is important to acknowledge that jitter can occur and that it can lead to a less stable signal. #figure( caption: [A case of jitter in the `maurice_drum_fast` measurement around the 20 seconds mark. Model: `LITE`, Marker type: `Landmark`, Marker: `Right Wrist`.], placement: auto, )[ #image("../images/measurements/maurice_drum_fast/LITE/Right_Wrist_y.svg") ] <jitter-example-right-wrist> == Noise Another aspect that can lead to a less stable signal is noise. Noise is the random variation in the position of a tracked marker. This noise is mostly present when the tracked body part is not moving at all. It can be seen in the trajectories that larger models produce a less noisy signal than smaller models. This is shown in @noise-example-right-heel. The noise is clearly visible in the `LITE` model, while the `FULL` and `HEAVY` models have a much more stable signal. It should be noted that the noise is rather small and is still in line with the accuracy values that were discussed earlier. #figure( placement: auto, grid( columns: (auto, auto), rows: (auto, auto), [#image("../images/measurements/maurice_drum_regular/LITE/Right_Wrist_y.svg") ], [#image("../images/measurements/maurice_drum_regular/FULL/Right_Wrist_y.svg") ], [#image("../images/measurements/maurice_drum_regular/HEAVY/Right_Wrist_y.svg") ] ), caption: [A noisy signal in the `maurice_drum_regular` measurement. Models: `LITE` (top left), `FULL` (top right), `HEAVY` (bottom left). Marker type: `Landmark`. Marker: `Right Heel`.], ) <noise-example-right-heel> = Reducing Jitter and Noise We present a post-processing method that is able to reduce the noise and jitter present in the signal. The method consists of two main steps. First, it predicts the position of the landmark based on the previous positions. Second, it compares the predicted position with the actual position and corrects the predicted position if necessary. The prediction is used to filter out noise and jitter. The method is general and can be applied to any pose estimation model. The method principle is best explained with a figure, @predicion-example. Points $A$ to $D$ are the previous positions of the points. Given the previous points, the predicted position $E$ is calculated. The current position $F$, the results returned from the pose estimation, is then compared to the predicted position $E$. If the distance between the predicted position $E$ and the current position $F$ is smaller than some threshold (e.g. the point $F$ would lie in the striped circle around $E$), the current position $F$ is considered to be caused by noise. On the other hand, if the distance is larger than some other threshold (e.g. the point $F$ lies outside the blue circle around $E$), the current position $F$ is considered to be caused by jitter. Only if the distance is between these two thresholds, the current position F is considered to be caused by the actual movement of the object. Based on this information, the current position $F$ is corrected. $F$ could be entirely discarded and replaced with the predicted position. However, this might lead to abrupt changes in positions. A smoother result is achieved by interposing between the predicted position $E$ and the current position $F$. #figure( caption: [Noise and jitter reduction method principle. The horizontal axis is the time axis. The vertical axis is the value of the points. Points $A$ to $D$ are previous positions, $E$ is the predicted position, $F$ is the current position from MediaPipe.], placement: auto )[ #image("../images/prediction-example.svg") ] <predicion-example> == Prediction Since we are dealing with points that are close together in time, a simple linear prediction is sufficient. To further clarify this: we are tracking the movement of a human, of which the movements are non-cyclic and non-deterministic. This means that the movement of the person is not predictable in the long term. However, in the short term (consecutive frames) the movement is somewhat predictable. We expect the movement to be similar for consecutive frames. The higher the framerate the more accurate the prediction can be. Advanced prediction methods are therefore not necessary. Every point has a timestamp $t$ and a value $y$. For every pair of consecutive points $P_1$ $(t_1, y_1)$ and $P_2$ $(t_2, y_2)$ a vector $arrow(v)$ can be computed. The vector $arrow(v)$ is the direction from $P_1$ to $P_2$ with the length of the vector indicating the velocity of the movement: $arrow(v) = (P_2 - P_1) / (t_2 - t_1)$. We divide by the time difference to get the change in value per time unit, which is the velocity. This is done because in a live stream setting, the time difference between frames can vary due to dropped frames, for example. When a new position $P_3$ $(t_3, y_3)$ is returned by MediaPipe, the predicted position $P'_3$ can be calculated by adding the vector $arrow(v)$ to the last known position $P_2$, multiplied by the time difference between $P_2$ and $P_3$: $ P'_3 = P_2 + arrow(v).(t_3 - t_2)$ The predicted position $P'_3$ is then compared to the actual position $P_3$ to determine if the point is caused by noise, jitter, or the movement of the object. == Correction After the prediction has been made, the correction of the current position is done. The correction is based on the distance between the predicted position and the actual position. The principle idea of correction has already been discussed above. Small differences in distance indicate noise, large differences indicate jitter. But, instead of discarding these positions, we interpolate between the predicted position and the actual position. Consider the interpolation function $f(x)$, with $x >= 0$ the distance between the predicted position and the actual position to a value between 0 and 1: $f(x): [0, infinity[ -> [0, 1]$. A value of 0 means that the predicted position is used, a value of 1 means that the actual position is used. Take $P$ to be the actual position, $P'$ the predicted position and an interpolation factor $b$. The corrected position is than: $hat(P) = (1 - b).P' + b.P$ . The chosen interpolation function is: $f(x) = e^(-(log_e (x))^2)$, @interpolation-function. Firstly, the function is smooth, to avoid abrupt changes in the corrected position. Secondly, this function is not picked randomly. It has some nice properties. The function remains close to zero for small values of $x$, meaning that the predicted position is mainly used when the distance is small. This is important because small distances indicate noise. The predicted values are assumed to be less noisy than the actual values, as they are based on the previous positions. This noise reduction is why the interpolation should not reach its maximum value of 1 for small distances. The long tail of the function ensures that large distances are not entirely discarded. Because we are not entirely sure if the large distances are caused by jitter or by the movement of the object, we want to keep some of the actual position. #figure(caption: [Interpolation function. The horizontal axis is the distance between the predicted position and the actual position. The vertical axis is the interpolation factor. The blue line, $g(x) = x$, is purely a visual aid.])[ #image("../images/interpolation-function.svg") ] <interpolation-function> It is essential to understand the reasoning behind reaching a maximum value of 1. It is perfectly reasonable for the user to perform a movement that is not predicted by the method, without being an outlier. Consider a person who is standing still and suddenly starts walking. The method will predict the person to be standing still. This action by the user is not an outlier, but the method cannot predict the movement. The method should not discard the actual position in this case. Setting the maximum value of the interpolation function to 1 ensures that the actual position is not discarded in such cases. Two parameters are used to tune the parameter function. A first parameter determines the distance at which the interpolation function reaches its maximum value. Call this parameter $d$. A second parameter controls the “tightness” of the interpolation around the maximum value. Call this parameter $s$. The interpolation function becomes: $f(x) = e^(-s.(log_e (x / d))^2)$ and is shown in @interpolation-function-s. #figure( caption: [Interpolation function with $d = 0.5$ and $s = 4$. The horizontal axis is the distance between the predicted position and the actual position. The vertical axis is the interpolation factor. The blue line, $g(x) = x$, is purely a visual aid..], placement: auto )[ #image("../images/interpolation-function-s.svg") ] <interpolation-function-s> = Results The `maurice_drum_fast` recording at 30 fps is used to compare the results. The method is applied to the recording and the results are compared to the original measurements. The parameters are set to a peak $d = 0.015$, and tightness $s = 0.7$. Visually, these parameters produce the best results. The noise is reduced, and the jitter is less pronounced, while still allowing a given range of motion. To confirm that the method does, in fact, reduce these elements, we should expect to see a better signal stability. @maurice_drum_fast_stability_30fps shows the stability of the signal with and without processing. For the Y and Z axes, these are the horizontal and vertical axes, the mean is reduced by around 0.5 mm. The impact of the method on the stability is most noticeable in the percentiles. There we can observe reductions ranging from 0.5 mm to 1.8 mm. The processed signal is more stable as the outliers are reduced. The method has a positive impact on the signal stability. #show table.cell.where(x: 0): set text(weight: "bold") #figure( caption: [The signal stability from the `maurice_drum_fast` measurement without processing (top) and with processing (bottom). Model: `LITE`, Marker type: `Landmark`], placement: none, grid( columns: (auto), rows: (auto, auto, auto), gutter: 1em, [ #table( columns: (auto, 2fr, 2fr), align: (left, right, right), table.header[Stability unprocessed (mm)][Y][Z], [mean], [ 1.814981], [ 2.656927], [std ], [ 4.700073], [ 8.271183], [min ], [ 0.000031], [ 0.000004], [25% ], [ 0.210036], [ 0.251675], [50% ], [ 0.634218], [ 0.849195], [75% ], [ 1.727039], [ 2.558757], [max ], [180.404176], [592.605731], ) ], [ #table( columns: (auto, 2fr, 2fr), align: (left, right, right), table.header[Stability processed (mm)][Y][Z], [mean], [ 1.419173], [ 2.109245], [std ], [ 3.663793], [ 8.273394], [min ], [ 0.000002], [ 0.000004], [25% ], [ 0.072621], [ 0.070995], [50% ], [ 0.258439], [ 0.251171], [75% ], [ 0.967466], [ 1.169109], [max ], [116.912891], [593.312640], ) ] ) ) <maurice_drum_fast_stability_30fps> Lastly, we can see the reduction in jitter clearly in the Y axis, trajectory plots from the Right Wrist marker in @maurice_drum_fast_jitter. The jitter around the 20-second marker is reduced, and noise has been smoothed out. This shows that the method has a positive impact on the signal stability. #figure( caption: [The signal stability from the `maurice_drum_fast` measurement in a boxplot, without processing (top) and with processing (bottom). Model: `LITE`, Marker type: `Landmark`], placement: auto, grid( columns: (auto), rows: (auto, auto, auto), [ #image("../images/measurements/maurice_drum_fast/LITE/Right_Wrist_y.svg" ) ], [ #image("../images/measurements/maurice_drum_fast_processed/LITE/Right_Wrist_y.svg" ) ] ) ) <maurice_drum_fast_jitter> = The Air Drumming Application (DrumPy) <drum-application> The Air Drumming application is a demo application that showcases the use of on-device body pose estimation. #footnote[ DrumPy is the official application name, referring to the main technology, Python, with which it is made. The application and source code are publicly available on GitHub: #link("https://github.com/Mouwrice/DrumPy")[Mouwrice/DrumPy #link-icon]. ] The application uses the MediaPipe library to estimate the 3D pose of a person in real-time. The estimated pose is then used to detect drumming gestures and generate drum sounds. It is a fun and interactive way to explore the capabilities of body pose estimation. #figure( caption: [The Air Drumming application in action.], placement: auto )[ #image("../images/drumpy_overview.png") ] <drumpy-overview> The application is designed to be easy to use and understand, with a simple command-line interface and graphical user interface (@drumpy-overview). The user can start the application by simply launching the executable or from the command line to set some options such as which camera should be used, which model should be used etc. The application captures video frames from the camera, estimates the body pose of the person in the frame, and generates drum sounds based on the detected gestures. The user can play the drums by moving their hands and arms in the air, as if they were playing a real drum set. The feet are also tracked to detect the kick drum pedal. The application provides visual feedback by showing the estimated pose on the screen. One feature of the application is velocity-based volume control. The volume of the drum sounds is controlled by the velocity of the drumming gestures. The harder the user hits the drums, the louder the drum sounds will be. This feature adds a level of realism to the drumming experience and makes it more engaging for the user. When launching the application, a calibration phase is initiated. During this phase, the user is asked to perform a series of drumming gestures to calibrate the position of specific drum elements such as the snare drum, hi-hat, and cymbals. This calibration step is necessary to map the detected gestures to the correct drum sounds. These steps are outputted to the user in a console that is displayed on the screen. For example, the first element to be calibrated is the `Snare Drum`, the user should then repeatedly hit the snare drum at the position where they want the snare drum to be. The application will then use this information to calibrate the snare drum position. After a minimum of 10 successful hits and the positions of these hits are consistent, the calibration is considered successful, and the next element is calibrated. This process is repeated for all drum elements. For more usage information along with an installation guide, please refer to the README file in the source code repository. #footnote[ #link("https://github.com/Mouwrice/DrumPy?tab=readme-ov-file#installation")[https://github.com/Mouwrice/DrumPy?tab=readme-ov-file#installation #link-icon] ] == Technologies The Air Drumming application is entirely written in Python and uses the following libraries: - MediaPipe: For on-device body pose estimation. - Pygame: For the audio and graphical user interface as well as capturing video frames from the camera. - OpenCV: A library used to read video frames from a file. - Click: For providing a simple and consistent command-line interface. == Gesture detection The application uses the estimated 3D pose of the person to detect drumming gestures. For the demo application, the only drumming gestures detected are downward movements to hit the drums. After the hit detection, the drum element that is hit is determined by the position of the marker where a hit has been detected. The drum element closest to the marker is considered to be the drum element that has been hit. The velocity of the hit is calculated based on the speed of the downward movement. The harder the user hits the drums, the louder the drum sounds will be. The velocity controls the volume of the drum sounds, as mentioned earlier. The hit detection is based on the observation that a downward movement is made when hitting a drum, followed by a slight upward movement. A downward movement is defined as having a consecutive series of positions where the vertical position is decreasing. An upward movement is defined as having a consecutive series of positions where the vertical position is increasing. At first, this might seem a bit counterintuitive, as one would expect the hit to be detected when the marker reaches the position of the drum element, just as in real life. In real life, the drum makes a sound when the drumstick hits the drum. However, the application is meant for air drumming, where there is no physical drum to hit. If we were to detect the hit when the marker reaches the position of the drum element, a hit might be detected when the user is still moving their hand downwards to hit the drum. This would reduce the immersion and realism. Instead, our method tries to find the point where the user expects the drum to be hit, not when the drum would actually be hit in real life. This is why the hit detection is based on the vertical trend of the marker and not the actual position of the marker. = Conclusion We have shown that an average accuracy of 5-10 mm can be achieved with MediaPipe Pose for the movements relative to the camera. During the measurements, a jitter phenomenon was observed in the signal which appears to be caused by overlapping body parts such as crossed arms. We have also shown that the signal stability can be increased by using a simple prediction model combined with an interpolation method between the predicted and the measured value. This method reduces the jitter and noise in the signal. However, the signal is still not perfect. Future work could focus on increasing the signal stability even further. A drum application was built to demonstrate the capabilities of the system. The application uses the body pose estimation to track the movements of the user and translate these movements to drum sounds. The future of body pose estimation is promising. The accuracy is shown to already be sufficient to construct a real-time air drumming application. The application of body pose estimation is not limited to drumming. It can be used in various applications such as in medical rehabilitation, virtual reality, and human-computer interaction. Future work could focus on increasing the signal stability, improving the depth estimation, and finding new applications for body pose estimation.
https://github.com/evaporei/resume
https://raw.githubusercontent.com/evaporei/resume/main/README.md
markdown
# resume Curriculum vitae inspired by [this template](https://github.com/skyzh/typst-cv-template), using https://typst.app.
https://github.com/Jollywatt/typst-fletcher
https://raw.githubusercontent.com/Jollywatt/typst-fletcher/master/docs/style.typ
typst
MIT License
#import "@preview/tidy:0.2.0" #let function-name-color = tidy.styles.default.function-name-color #let rainbow-map = tidy.styles.default.rainbow-map #let gradient-for-color-types = tidy.styles.default.gradient-for-color-types #let default-type-color = tidy.styles.default.default-type-color #let colors = tidy.styles.default.colors #let colors-dark = tidy.styles.default.colors-dark #let show-outline(module-doc, style-args: (:)) = box({ let prefix = module-doc.label-prefix for fn in module-doc.functions [ - #link(label(prefix + fn.name + "()"), raw(fn.name + "()")) ] v(2em) }) #let show-type(type, style-args: (:)) = { let c-type = if type.starts-with("pair of") { type.slice(8, -1) } else { type } let c = colors.at(c-type, default: colors.at("default")) box(outset: 2pt, fill: c, radius: 2pt, raw(type)) } #let fn-label(fn-name) = label(fn-name + "()") #let fn-param-label(fn-name, arg-name) = label(fn-name + "." + arg-name) #let show-parameter-list(fn) = { set text(font: "Cascadia Mono", size: 0.8em, weight: 340) text(fn.name, fill: colors.at("signature-func-name", default: rgb("#4b69c6"))) "(" let inline = fn.args.len() <= 2 if not inline { "\n " } let items = fn.args.pairs().map(((arg-name, info)) => { if info.at("description", default: "") == "" { arg-name } else { link(fn-param-label(fn.name, arg-name), arg-name) } if "types" in info { ": " + info.types.map(show-type).join(" ") } }) items.join( if inline {", "} else { ",\n "}) if not inline { ",\n" } + ")" if fn.return-types != none { " -> " fn.return-types.map(show-type).join(" ") } } // Create a parameter description block, containing name, type, description and optionally the default value. #let show-parameter-block( fn, name, types, content, show-default: false, default: none, fn-name: none, is-long: false ) = { let sep(it) = box(inset: (x: 5pt), text(0.8em, it)) let type-pills = types.map(show-type).join(sep[or]) block( inset: 10pt, breakable: is-long, { let default-multiline = type(default) == str and "\n" in default block( outset: 10pt, radius: 10pt, stroke: (top: .6pt + gray), )[ #text(1em, { strong(raw(name)) h(1em) type-pills if show-default and not default-multiline { sep[default] show-type(default) } h(1fr) text(gray, link(fn-label(fn.name), $arrow.tl$)) }) #fn-param-label(fn.name, name) ] content if show-default and default-multiline [ #parbreak() Default: #raw(default) ] } ) } #let show-function(fn, style-args) = { if style-args.colors == auto { style-args.colors = colors } block(breakable: false)[ #text(1.2em)[ #heading(raw(fn.name + "()"), level: style-args.first-heading-level + 1) #fn-label(fn.name) ] #tidy.utilities.eval-docstring(fn.description, style-args) #show-parameter-list(fn) ] for (name, info) in fn.args { let types = info.at("types", default: ()) let description = info.at("description", default: "") if description == "" { continue } show-parameter-block( fn, name, types, tidy.utilities.eval-docstring(description, style-args), is-long: description.len() > 500, // approximate show-default: "default" in info and "Default:" not in description, default: info.at("default", default: none), ) } v(3em, weak: true) } #let show-variable( var, style-args, ) = { if style-args.colors == auto { style-args.colors = colors } let type = if "type" not in var { none } else { show-type(var.type, style-args: style-args) } stack(dir: ltr, spacing: 1.2em, [ #heading(var.name, level: style-args.first-heading-level + 1) #label(style-args.label-prefix + var.name) ], type ) eval-docstring(var.description, style-args) v(4.8em, weak: true) } #let show-reference(label, name, style-args: none) = { link(label, raw(name)) }
https://github.com/SWATEngineering/Docs
https://raw.githubusercontent.com/SWATEngineering/Docs/main/src/2_RTB/PianoDiProgetto/sections/ConsuntivoSprint/PrimoSprint.typ
typst
MIT License
#import "../../const.typ": Re_cost, Am_cost, An_cost, Ve_cost, Pr_cost, Pt_cost #import "../../functions.typ": rendicontazioneOreAPosteriori, rendicontazioneCostiAPosteriori, glossary == Primo #glossary[sprint] *Inizio*: Venerdì 10/11/2023 *Fine*: Giovedì 23/11/2023 #rendicontazioneOreAPosteriori(sprintNumber: "01") #rendicontazioneCostiAPosteriori(sprintNumber: "01") === Analisi a posteriori Il consuntivo, relativo allo #glossary[sprint] corrente, evidenzia significative disparità rispetto al preventivo, soprattutto in merito alla distribuzione dei ruoli. Tale deviazione è imputabile al cambiamento dei ruoli assegnati, avvenuto a metà #glossary[sprint], circostanza non prevista durante la fase di pianificazione iniziale. Dato il considerevole aumento complessivo delle ore rispetto a quanto inizialmente previsto nel preventivo, diventa essenziale adottare un approccio più attento nella fase di pianificazione e apportare gli adeguamenti necessari ai futuri preventivi (in particolare, assegnare più di un ruolo ai componenti del team qualora lo si ritenga necessario). La turnazione straordinaria dei ruoli (e, di conseguenza, l'assunzione di almeno due ruoli da parte di ciascun componente del team) si è resa necessaria per due motivi principali: - Si è voluta velocizzare la rotazione dei ruoli all'interno del team, in modo da assicurarsi che ogni componente ricoprisse i diversi ruoli in ugual misura. In altre parole, ci si è resi conto che assegnare un unico ruolo a ciascuno per l'intera durata dello #glossary[sprint] (2 settimane) non favorisce una rotazione sufficientemente rapida; - Dopo il primo incontro con la Proponente, il team ha identificato la necessità di impiegare delle ore da Programmatore per iniziare a lavorare allo sviluppo del #glossary[PoC]. Avendo dispiegato un ampio quantitativo di ore produttive, il team non ha avuto difficoltà a raggiungere gli obiettivi prefissati in partenza; in particolare, si è riusciti a realizzare una prima bozza completa dell'_Analisi dei Requisiti_ da sottoporre al professor Cardin e una parte del #glossary[PoC], provvista delle funzionalità richieste dalla Proponente. In quanto ad eventuali rischi, l'unico ad essere emerso è stato RT1 o Conoscenza tecnologica limitata; fortunatamente le misure preventive adottate si sono dimostrate molto efficaci nel livellare le lacune dei componenti relative alle tecnologie impiegate nello sviluppo del #glossary[PoC], in particolare: - È stato effettuato un incontro di formazione con la Proponente sulla tecnologia #glossary[Docker Compose] per facilitare le fasi iniziali dello sviluppo del #glossary[PoC]\; questo ha reso significativamente più semplice l'approccio alla tecnologia ai membri del team che non avevano familiarità con essa e ha contribuito a velocizzare lo sviluppo; - È stato effettuato anche un incontro di #glossary[workshop] interno incentrato su #glossary[Docker Compose] in cui i componenti che avevano già utilizzato tale tecnologia ne hanno illustrato scopo e funzionamento e hanno dimostrato come applicarla nel contesto concreto del #glossary[PoC] per containerizzare i moduli #glossary[Python] e #glossary[Kafka].
https://github.com/typst-doc-cn/tutorial
https://raw.githubusercontent.com/typst-doc-cn/tutorial/main/typ/templates/template-link.typ
typst
Apache License 2.0
// #import "supports-text.typ": plain-text #import "@preview/shiroa:0.1.1": plain-text #let make-unique-label(it, disambiguator: 1) = label({ let k = plain-text(it).trim() if disambiguator > 1 { k + "_d" + str(disambiguator) } else { k } }) #let label-disambiguator = state("label-disambiguator", (:)) #let update-label-disambiguator(k) = label-disambiguator.update(it => { it.insert(k, it.at(k, default: 0) + 1) it }) #let get-label-disambiguator(loc, k) = make-unique-label(k, disambiguator: label-disambiguator.at(loc).at(k)) #let heading-reference(it, d: 1) = make-unique-label(it.body, disambiguator: d) #let heading-hash(it, hash-color: blue) = { let title = plain-text(it.body) if title != none { let title = title.trim() update-label-disambiguator(title) context ( { let loc = here() let dest = get-label-disambiguator(loc, title) let h = measure(it.body).height place( left, dx: -16pt, [ #set text(fill: hash-color) #link(loc)[\#] #dest ], ) } ) } }
https://github.com/Astro36/Astro36
https://raw.githubusercontent.com/Astro36/Astro36/main/CV_Park.typ
typst
#let black100 = black #let black90 = white.darken(90%) #let black80 = white.darken(80%) #let black70 = white.darken(70%) #let accent_darken = rgb("#662549") #let accent_lighten = rgb("#AE445A") #let accent_underline = rgb("#FFF8E3") #set document(title: "Seungjae Park", author: "<NAME>") #set page(numbering: "1", number-align: center) #set text(font: "Times New Roman", fallback: false, size: 11pt, fill: black100) #set par(justify: true) #show heading.where(level: 1): it => align(center)[ #text(weight: "regular", size: 30pt)[#it.body] ] #show heading.where(level: 2): it => block( above: 1.5em, below: 1em, text(weight: "regular", size: 16pt, fill: accent_darken)[#smallcaps(it.body)], ) #let label(body) = text(weight: "bold", size: 0.8em, fill: accent_lighten)[[#body]] #let note(body) = text(size: 0.8em)[(#body)] #let accent(body) = underline(stroke: 5pt + accent_underline, offset: -2.5pt, evade: false, background: true)[#body] #let pill(body) = box( baseline: -1pt, stroke: 0.5pt + black, radius: 1pt, inset: (x: 2pt), outset: (y: 2pt), )[#text(size: 8pt, body)] #let tile(title, date, body) = block(spacing: 1em)[ #title #h(1fr) #text(size: 0.8em, fill: black80)[#date] \ #text(fill: black90)[#body] ] #align(center)[ = <NAME> #text(size: 10pt, fill: black80)[ https://www.linkedin.com/in/seungjae-park/ \ <EMAIL> \ https://github.com/Astro36 \ ] ] == Research Interests Machine Learning, Natural Language Processing, Time Series, Quantitative Finance, Asset Pricing, Portfolio Optimization == Education #tile( [#link("https://www.yonsei.ac.kr/")[*Yonsei University*], Seoul, South Korea], "Sep 2024 - Present", [ M.S. in #accent[#link("https://ai.yonsei.ac.kr/")[Artificial Intelligence]] ], ) #tile( [#link("https://www.inha.ac.kr/")[*Inha University*], Incheon, South Korea #pill[GPA 4.41/4.5]], "Mar 2019 - Aug 2024", [ B.S. in #accent[#link("https://ice.inha.ac.kr/")[Information and Communication Engineering]] | Minor in #accent[#link("https://gfiba.inha.ac.kr/")[Global Finance and Banking]] // - Undergraduate Coursework: Electronic Circuits, Data Structure, Computer Architecture, Operating System, Numerical Analysis, Investments, Financial Derivatives, etc. - Graduated 2nd in class, #label[Rank: 2/189] - Participated in the #accent[departmental student council] as a member#note[Mar 2019 - Jun 2023] ], ) == Relevant Experiences #tile( link("https://inhabluechip.com/")[*Blue Chip Mutual Fund*], "Mar 2023 - Jun 2024", [ Financial Market Research & Stock Investment Institute in Inha Univ. - #accent[Research Team Leader] & Fund Manager#note[Jan 2024 - Jun 2024], #label[#link("https://fund.inhabluechip.com/")[Maximum managed assets]: #link("https://www.google.com/search?q=40000000+krw")[40M KRW]] - Delivered three presentations at in-house #link("https://www.youtube.com/@bluechipmutualfund7790")[company analysis seminars#note[YouTube]] - Published a #link("https://inhabluechip.com/forum/view/259643")[company analysis report] and two #link("https://www.incheonilbo.com/news/articleList.html?sc_sub_section_code=S2N28")[news articles#note[Incheon Ilbo]] ], ) #tile( link("https://www.swmaestro.org/")[*Software Maestro 11#super[th]*], "May 2020 - Dec 2020", [ Government-supported Program to Cultivate Creative and Innovative SW Talents, operated by the #link("https://www.fkii.org/")[FKII#note[The Federation of Korean Information Industries]] - Developed a #accent[solution for detecting illegal spam] that corrects Korean spelling errors and improves its performance over time - Received mentoring on entrepreneurship, programming, and AI - #accent[Ranked 4#super[th] in a stock price prediction contest] held as part of an AI application training program ], ) #tile( [*Full-stack Freelance*], "Sep 2019 - Jan 2020", [ INSIGHT: AI-based Mental Healthcare Solution Startup, #label[#link("https://www.google.com/search?q=10000000+krw")[10M KRW] project] - Developed an Android app in Kotlin and an API server in Python to power an AI model ], ) == Awards & Honors #tile( [#link("https://kbig.kr/portal/kbig/keybiz/creatorcamp/info.page")[*2023 Data Creator Camp*], Excellence Award], "Sep 2023 - Dec 2023", [ Big Data Training Hackathon, hosted by the #link("https://kbig.kr/")[K-ICT Big Data Center] \ - Solved Korean #accent[food image classification] problems with ResNet models - Received #link("https://www.nia.or.kr/")[NIA#note[National Information Society Agency]] president's award ], ) // #tile( // [*KAIST Creative Team Coding Challenge*, Excellence Award], // "Mar 2018", // [Middle and High School Student Software Project Contest, hosted by the #link("https://www.kaist.ac.kr/")[KAIST] and #link("https://kr.ncsoft.com/")[NCSOFT], and organized by the #link("https://gifted.kaist.ac.kr/")[KAIST GIFTED#note[Global Institute for Talented Education]]], // ) == Certifications #tile( [#link("https://license.kofia.or.kr/examInfo/examInfo.do")[*Certified Investment Manager*], #link("https://www.kofia.or.kr/")[KOFIA#note[Korea Financial Investment Association]]], "Jun 2024", "", ) #tile( [#link("https://www.q-net.or.kr/crf005.do?id=crf00505&jmCd=1320")[*Engineer Information Processing*], #link("https://www.hrdkorea.or.kr/")[HRDK#note[Human Resources Development Service of Korea]]], "Jun 2024", "", ) #tile( [#link("https://www.pqi.or.kr/inf/qul/infQulBasDetail.do?qulId=433")[*Linux Master, Grade 2*], #link("https://www.ihd.or.kr/")[KAIT#note[Korea Association for ICT Promotion]]], "Dec 2023", "", ) == Skills #block(spacing: 1em)[ *Programming Languages* \ #text(fill: black90)[ C++, Java, Kotlin, JavaScript, TypeScript, Python, Rust, Dart ] ] #block(spacing: 1em)[ *Platforms & Frameworks* \ #text(fill: black90)[ - General: Arduino, Android, Spring, Node.js, Flutter - AI: TensorFlow, PyTorch - DevOps: Docker ] ] #block(spacing: 1em)[ *Databases* \ #text(fill: black90)[ MySQL, PostgreSQL ] ] == Extracurricular Activities #tile( link("https://int-i.github.io/")[*int i*], "Mar 2019 - Aug 2024", [ Programming Study Group in Department of Information and Communication Engineering, Inha Univ. - #accent[Group Leader]#note[Jul 2023 - Mar 2024] - Authored blog posts about programming for #accent[over 4 years], #label[Total blog views: 240K, Monthly: 9K] ], ) #tile( link("https://www.inhabas.com/")[*IBAS*], "Sep 2022 - Jun 2023", [Inha Univ. Big Data Analysts Society: Machine Learning Paper Review], ) #tile( link("https://prography.org/")[*Prography 4#super[th] - 5#super[th]*], "Mar 2019 - Feb 2020", [ Collaborative IT Project Club: #accent[Front-end & Back-end Developer] Track - Android app and API server developer(Full-stack) - Developed a psychological counselor matching platform & meditation music player app - Experienced in app server and PG payment API integration ], ) == Projects #tile( [#link("https://github.com/Astro36/stock-ara")[*Stock ARA*] #pill[Python]], "Mar 2024 - Jul 2024", [An innovative stock screening and portfolio optimization system that leverages a Large Language Model and Retrieval-Augmented Generation, _Inha Univ. Capstone Design in ICT_] ) #tile( [#link("https://github.com/inhabluechip/bcmf-nav")[*BCMF NAV*] #pill[JavaScript] #pill[Tailwind CSS]], "Jan 2024 - Jul 2024", [Responsive design web service that calculates and displays daily the net asset value(NAV) and total assets under management(AUM) of Blue Chip Mutual Fund - https://fund.inhabluechip.com/] ) #tile( [#link("https://play.google.com/store/apps/details?id=me.astro36.mystock")[*Stock Earnings Calendar*] #pill[Flutter]], "Jun 2023 - Jul 2023", [A calendar app showing stock prices and earnings release dates for companies of interest, uploaded to Google Play] ) #tile( [#link("https://github.com/Astro36/ICE3015-project")[*Self-Balancing Robot*], Capstone Design #pill[C++] #pill[Embedded]], "May 2023 - Jun 2023", [2­-Wheel self­-balancing robot using PID controller, implemented with ATmega4809 and MPU6050 sensors without external libraries, referring to datasheets, _Inha Univ. Embedded System Capstone Design: Final Project_] ) #tile( [#link("https://github.com/Astro36/ICE3016-miniproject")[*3D Product Catalog*], Capstone Design #pill[C++] #pill[OpenGL]], "Dec 2022", [Interactive 3D product catalog with OpenGL and Blender(Modeling), _Inha Univ. Computer Graphics Capstone Design: Mini Project_] ) #tile( [#link("https://github.com/ICE-LIFE/ICE-LIFE-Backend")[*ICE Market*] #pill[React] #pill[Spring]], "Jul 2022 - Aug 2022", [ Online flea market service for Department of Information and Communication Engineering \ #accent[Team Project] - Role: Docker and NGINX setup, 1:1 chat API implementation using Spring web sockets ] ) #tile( [#link("https://github.com/Astro36/qp")[*Quick Pool*], Open Source #pill[Rust]], "Nov 2021 - Dec 2021", [High performance async generic pool for Rust, implemented by lock-­free waiter queue, #label[Downloads: 3.8K]] ) #tile( [*Spree*, Startup #pill[Django] #pill[TensorFlow] #pill[C++]], "Jul 2020 - Dec 2020", [ Robust illegal spam detection solution via CNN, _IITP-2020-SW Maestro training course_, \ #accent[Team Project] - Role: Designed a CNN-based spam message classification model and ported the trained TensorFlow model to C++ code for deployment ] ) #tile( [#link("https://github.com/Astro36/kotka")[*└ Kotka*], Open Source #pill[Python]], "Jul 2020 - Aug 2020", [#h(1em) Korean obfuscation toolkit for text data augmentation, _IITP-2020-SW Maestro training course_] ) #tile( [*Shim*, Startup #pill[Android] #pill[Express.js]], "Sep 2019 - Feb 2020", [ Psychological counselor natching platform, _Prography 5#super[th]_ \ #accent[Team Project] - Role: Developed an Android app and an API server, including PG payment API integration ] ) #tile( [*Care U*, Hackathon #pill[Flutter]], "Jan 2020", [ Shared scooter accident prevention solution app using computer vision, _2020 Super Challenge Hackathon_ \ #accent[Team Project] - Role: Developed a Flutter app that runs a TensorFlow Lite model ] ) #tile( [*Hyeyum*, Capstone Design #pill[Express.js] #pill[Python] #pill[Embedded]], "Nov 2019 - Dec 2019", [Language habit correction robot with Google Speech Recognition API, _Inha Univ. Creative Design for Information and Communication Engineering: Final Project_] ) #tile( [#link("https://github.com/int-i/brainha-demo-server")[*BraInha*], Hackathon #pill[Android] #pill[Express.js]], "Nov 2019", [ On-campus academic Q&A platform app, _2019 Inha SW Hackathon_ \ #accent[Team Project] - Role: Docker and NGINX setup, developed an API server ] ) #tile( [#link("https://github.com/watchdocs")[*WATCH_DOCS*], Hackathon #pill[Vue.js] #pill[Express.js]], "Aug 2019", [ Business document management service by WaykiChain Smart Contract, _Huobi Korea X WaykiChain Hackathon_ \ #accent[Team Project] - Role: Developed service web pages with Vue.js ] ) #tile( [#link("https://github.com/Astro36/kodict")[*Kodict*], Open Source #pill[Rust]], "Nov 2018 - Feb 2019", [Provides Korean dictionary implements and crawler for Rust, #label[Downloads: 4.0K]] ) #tile( [#link("https://github.com/Astro36/kokoa")[*KokoaNLP*], Contest #pill[Node.js]], "Apr 2018 - Jul 2018", [Unsupervised learning Korean kernel object analyzer, _2018 Korea Olympiad in Informatics: Contest Track_] ) #tile( [#link("https://github.com/Astro36/touch-music")[*Touch Music*], Contest #pill[Electron] #pill[Python]], "Mar 2018", [ Easy music finder via word2vec on song lyrics, _2018 KAIST Creative Team Coding Challenge_ \ #accent[Team Project] - Role: Built a song lyrics database by scraping Melon, analyzed song styles using Word2Vec, and developed a desktop app with Electron ] ) #align(right)[ #set text(size: 0.8em, fill: black70) (Last updated: #datetime.today().display("[month repr:short] [year]")) ]
https://github.com/npikall/typst-templates
https://raw.githubusercontent.com/npikall/typst-templates/main/templates/ovlf-std.typ
typst
// Overleaf LATEX Standard Template #let conf( language:"en", doc ) = { // set the Pagelayout set page( paper:"a4", margin: ( left: 2.5cm, right: 2.5cm, top: 1.5cm, bottom: 2.5cm ), numbering: "1" ) // Set the Heading Numbering set heading(numbering: "1.") // Set the paragraph style set par(leading: 0.55em, first-line-indent: 1.8em, justify: true) // Set the font style let mainfont = "New Computer Modern" let rawfont = "Dejavu Sans Mono" set text( font: mainfont, size: 10pt ) show raw: set text(font: rawfont) show par: set block(above: 1.4em, below: 1em) // Referencing Figures show figure.where(kind: table): set figure(supplement:[Tab.], numbering: "1") if language == "aut" show figure.where(kind: image): set figure(supplement:[Abb.], numbering: "1",) if language == "aut" // Set Table style set table( stroke: none, gutter: auto, fill: none, inset: (right: 1.5em), ) // Set Table of Contents Style show outline.entry.where( level: 1, ): it => { v(11pt, weak: true) strong(it.body) box(width: 1fr, repeat[]) strong(it.page) } show outline.entry.where( level: 2, ): it => { it.body box(width: 1fr, repeat[.]) it.page} show outline.entry.where( level: 3, ): it => { it.body box(width: 1fr, repeat[.]) it.page} // List indentation set list(indent: 1em) set enum(indent: 1em) // Document doc } #let maketitle( title:[], author:[], date:[], ) = { align(center,[ #v(5em) #text(16pt)[#title] #v(1em) #text(12pt)[#author] #v(0em) #text(12pt)[#date] #v(1em) ]) }
https://github.com/VisualFP/docs
https://raw.githubusercontent.com/VisualFP/docs/main/SA/design_concept/content/introduction/tool_research/eros.typ
typst
= Eros <NAME> developed a way to visualize pure values in an interactive and composable way. He calls this technique "Tangible Functional Programming" @Elliot_2007. The technique allows non-technical people to create content based on combinations of pure values. At the core of the technique are _tangible values_, which are pure values, including functions, that can be visualized and composed with other tangible values through a graphical user interface. To combine such values, a set of algebras is provided that allows values to be applied to each other, even if they are nested in functions or tuples. Elliot calls this concept _deep application_. @Elliot_2007 Eliott also developed an application called Eros that implements these techniques. Eros is particularly suited to creative people with an artistic interest. A screenshot of Eros is shown in @eros_screenshot. #figure( image("../../../static/eros_screenshot.png", width: 60%), caption: [Screenshot of Eros @Elliot_2007]) <eros_screenshot> "Tangible Functional Programming" is a fascinating technique, and particularly the way Eros visualizes pure values can be an inspiration for VisualFP. But ultimately, the technique appears unsuitable for general-purpose functional programming, especially in an educational context.
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/construct-01.typ
typst
Other
// Ensure that constructor styles win, but not over outer styles. // The outer paragraph should be right-aligned, // but the B should be center-aligned. #set list(marker: [>]) #list(marker: [--])[ #rect(width: 2cm, fill: green, inset: 4pt, list[A]) ]
https://github.com/tingerrr/masters-thesis
https://raw.githubusercontent.com/tingerrr/masters-thesis/main/src/util.typ
typst
#import "@local/chiral-thesis-fhe:0.1.0" as ctf #import ctf.prelude: * #import "@preview/cetz:0.2.2" #import "@preview/fletcher:0.5.0" #import "@preview/showybox:2.0.1" #import "@preview/cheq:0.1.0" #import "@preview/lovelace:0.3.0" #import "@preview/oxifmt:0.2.1" #let math-type(ty) = $text(#rgb("#407959"), ty)$ #let math-func(ty) = $op(text(#fuchsia.darken(35%), ty))$ #let cpp = box([C] + text(0.75em, baseline: -0.175em)[++]) #let cbox(color) = box(rect(stroke: black + 0.75pt, fill: color, height: 0.5em, width: 0.5em)) #let _block = block #let todo(..annotation, body) = { if annotation.named().len() != 0 { panic(oxifmt.strfmt("Unknown named args: {}", annotation.named())) } else if annotation.pos().len() > 1 { panic("Only one annotation may be used") } let annotation = annotation.pos().at(0, default: none) [#metadata(body) <todo>] set par.line(numbering: none) showybox.showybox( title: [TODO] + if annotation != none [: #annotation], title-style: ( weight: 900, color: red.darken(40%), sep-thickness: 0pt, ), frame: ( title-color: red.transparentize(80%), border-color: red.darken(40%), body-color: white.transparentize(100%), thickness: (left: 1pt), radius: 0pt, ), { set text(lang: "en") show: cheq.checklist body }, ) } #let no-cite = { [#metadata(none) <todo>] "[" h(0pt, weak: true) text(red, i18n(de: [Quelle benötigt], en: [citation needed])) h(0pt, weak: true) "]" }
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/SK/akatisty/akatistMichalABeztelesni.typ
typst
#import "/style.typ": * #import "/styleAkatist.typ": * = Akatist k svätému archanjelovi Michalovi a ostatným beztelesným mocnostiam #align(horizon + center)[#primText[ #text(45pt)[Akatist k \ sv. archanjelovi\ Michalovi\ a ostatným\ beztelesným\ mocnostiam] ]] #let akatist = ( ( "index": 1, "kondak": [Tebe, udatný vojvodca nebeských síl, archanjel Michal, prinášame túto ďakovnú pieseň, lebo nás ustavične zbavuješ zármutku. A keďže požívaš Pánovu priazeň, vysloboď nás zo všetkých bied, aby sme ti spievali:], "zvolanie": [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami.], "ikos": [Ako anjel stojíš na čele ohnivých zborov, Michal, si ich vodcom, skvieš sa Božím svetlom a osvecuješ všetkých, ktorí ti s láskou takto spievajú:], "prosby": ( [Raduj sa, svetu jagavá hviezda.], [Raduj sa, zákonu žiarivá svieca.], [Raduj sa, porážka zhubných démonov.], [Raduj sa, pozdvihnutie ľudí, čo padli do hriechov.], [Raduj sa, svetlo ani bystrým umom nepostihnuteľné.], [Raduj sa, žiara, ľudským očiam nedostupná.], [Raduj sa, lebo usiluješ o našu záchranu.], [Raduj sa, lebo sa pričiňuješ o našu dokonalosť v cnostiach.], [Raduj sa, darca túženej radosti veriacim.], [Raduj sa, ničiteľ prekliatia na zemi.], [Raduj sa, lebo vďaka tebe sa naša myseľ osvecuje.], [Raduj sa, lebo vďaka tebe mrak nevedomosti ustupuje.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 2, "kondak": [Všetci, ktorí žijeme na tejto zemi, žasneme nad tvojou úžasnou nádherou, Boží archanjel. Tvoj zjav je vznešený, pre nás nepochopiteľný a obdivuhodný. Takto stále stojíš pred tvárou nehmotného Božstva a voláš: Aleluja. ], "zvolanie": none, "ikos": [Daruj nám poznanie, svätý Michal, veliteľ všetkých nebeských zborov. Veď ako dokážeme našimi hriešnymi ústami ospevovať tvoje meno? Nevieme, akými modlitbami by sme ťa mali osláviť, predsa však voláme:], "prosby": ( [Raduj sa, vojvodca s úžasným poznaním.], [Raduj sa, naplnený svetlom obdivuhodným.], [Raduj sa, slávna pochvala Božích svätých.], [Raduj sa, odhalenie vecí nepoznaných.], [Raduj sa, učiteľ, čo poskytuje ľuďom dokonalé poznanie.], [Raduj sa, lebo veriacim vyprosuješ túžené zdravie.], [Raduj sa, preslávny veliteľ anjelov.], [Raduj sa, úžasná porážka démonov.], [Raduj sa, žiara Božieho ohňa.], [Raduj sa, Kráľa kráľov beztelesný vojak.], [Raduj sa, zarmúteným radosť a útecha.], [Raduj sa, slepým učiteľ a vodca.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami.], ) ), ( "index": 3, "kondak": [Zošli nám silu zhora, archanjel Michal, keď vzdávame úctu ikone tvojej osoby, ktorá ja úžasná, plná svetla, nebeská a ohnivá. Ty osvecuješ srdcia veriacich a spaľuješ tých, čo nechcú spievať Bohu: Aleluja.], "zvolanie": none, "ikos": [Celý svet má v tebe veľkého zástancu a obdivuhodného pomocníka v boji. Preto ťa, svätý Michal, uctievame ako ochrancu veriacich i rýchlu oporu a na tvoj prekrásny sviatok ti prinášame tieto dary:], "prosby": ( [Raduj sa, lebo nám zjavuješ poznanie múdrosti.], [Raduj sa, lebo rozháňaš nepriateľov Kristovej viery.], [Raduj sa, ničiteľ klamárov ľudského rodu.], [Raduj sa, vznešený ochranca Božích chrámov.], [Raduj sa, lebo sa prihováraš za nás u Pána.], [Raduj sa, lebo od nás zaháňaš krutých mučiteľov.], [Raduj sa, lebo osvecuješ mysle nábožných.], [Raduj sa, lebo potláčaš hriešne vášne.], [Raduj sa, lebo si verne zachoval česť Boha najvyššieho.], [Raduj sa, lebo si pýchu nepriateľa zvrhol do priepasti podsvetia.], [Raduj sa, lebo skrze teba bol satan ako blesk z neba zvrhnutý.], [Raduj sa, lebo tebou chránený ľudský rod bol do neba pozdvihnutý.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami.], ) ), ( "index": 4, "kondak": [Vysloboď z každej búrky, Michal, vojvodca anjelov, nás, ktorí s láskou a radosťou slávime tvoj nádherný sviatok. Ty si veľký pomocník v súženiach, v hodine smrti ochranca pred zlými duchmi a zástanca všetkých, čo spievajú Bohu: Aleluja. ], "zvolanie": none, "ikos": [Počuli sme a poznali, že žiariš ako slnko uprostred svätých anjelov, obdivuhodný Michal, veliteľ nebeského dvora; preto po Bohu prichádzame k tebe s prosbou: očisť, osvieť a posväť všetkých, ktorí ti takto spievajú:], "prosby": ( [Raduj sa, žiara nezapadajúceho svetla.], [Raduj sa, trón nemateriálneho ohňa.], [Raduj sa, útecha zarmútených duší.], [Raduj sa, ochrana tých, čo sa tu na zemi lopotia.], [Raduj sa, ohnivý vodca, veselosť anjelov.], [Raduj sa, Bohom nasadená záhrada, plesanie ľudí.], [Raduj sa, lebo si Asýrčanov predivne zahubil.], [Raduj sa, lebo si židov slávne poučil.], [Raduj sa, nad hviezdy jasnejší.], [Raduj sa, svietnik nad zlato jagavejší.], [Raduj sa, lekár pre rozličné choroby.], [Raduj sa, darca múdrosti nerozumným.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 5, "kondak": [Zjavil si sa svetu ako prameň nesmiernych zázrakov vyvierajúci od Boha, Archanjel, vodca ohnivých zástupov, aby si poskytoval občerstvenie, všetkým žijúcim na zemi očistenie od lži a aby si naplnil Božou múdrosťou všetkých, čo spievajú: Aleluja.], "zvolanie": none, "ikos": [Keď ľudskí synovia uzreli tvoju plamennú krásu, čo ožaruje všetko tvorstvo, archanjel Michal, ponáhľali sa piesňami ospievať tvoju nádhernú slávu a takto ti volali:], "prosby": ( [Raduj sa, jasný náčelník stojaci pred Pánom.], [Raduj sa, dobrotivý a rýchly poskytovateľ pomoci.], [Raduj sa, obdivuhodný návštevník nemocných.], [Raduj sa, hrozný ničiteľ démonov.], [Raduj sa, nevýslovná krása Kristovej cirkvi.], [Raduj sa, drahocenné myro Božej vône.], [Raduj sa, div nad preslávne divy.], [Raduj sa, dar rozmanitých darov.], [Raduj sa, vzácna duchovná pokladnica.], [Raduj sa, nádherná nádoba cností.], [Raduj sa, slávnych mučeníkov opora.], [Raduj sa, dôstojných kňazov osvietenie.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 6, "kondak": [Keď ťa uzrel Manoach ako ohlasovateľa preslávnych Božích zámerov, zmocnil sa ho strach a náramne sa čudoval. Nedokázal pochopiť ako ty, beztelesný, môžeš hovoriť s pozemským človekom. No keď sa dozvedel o Samsonovom počatí, zaradoval sa a volal Bohu: Aleluja.], "zvolanie": none, "ikos": [Obdivuhodne si sa zaskvel, Michal, keď si povedal Jozuemu, Nunovmu synovi: „Zobuj si obuv z nôh.“ On sa veľmi zadivil, s úžasom padol k tvojim nohám, oslávil ťa a takto ti volal:], "prosby": ( [Raduj sa, slávna záštita nábožných kráľov.], [Raduj sa, nepremožiteľná chrabrosť Bohu oddaných vojakov.], [Raduj sa, víťazstvo pravoverných nad protivníkmi.], [Raduj sa, radosť tých, čo víťazia v Pánovi.], [Raduj sa, neochvejný stĺp nábožnosti.], [Raduj sa, neuhasiteľná lampa Cirkvi.], [Raduj sa, slávna chvála prorokov.], [Raduj sa, sladká zdržanlivosť askétov.], [Raduj sa bohatstvo úbohých a putujúcich.], [Raduj sa, vodca blúdiacich.], [Raduj sa, jagavý a drahocenný kameň.], [Raduj sa, skvostná nebeská perla.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 7, "kondak": [Celý svet má v tebe, Michal, veľkého zástancu, bojovníka a mocnú oporu. Poskytuješ nám pokojný mier, nábožným krajinám daruješ pokoj a premáhaš bezbožných vladárov. Keď toto všetko vieme, spolu s tebou radostne spievame Bohu: Aleluja. ], "zvolanie": none, "ikos": [Pôvodca všetkých zázrakov a Vládca ukázal nám na zemi nové divy skrze teba, archanjel Michal; všetku silu démonov odrážaš a nám v súžení pomáhaš. Preto ti s vďačnosťou prinášame túto pieseň:], "prosby": ( [Raduj sa, lebo prinášaš Božiu radosť.], [Raduj sa, lebo ničíš otrockú kliatbu.], [Raduj sa, sláva a chvála svätých.], [Raduj sa, rozkoš spravodlivých.], [Raduj sa, Bohom zdobený kvet nebeskej slávy.], [Raduj sa, voňavá ľalia vzácnej arómy.], [Raduj sa, lebo múdrosťou veľkodušnosti posilňuješ.], [Raduj sa, lebo svetlom nábožnosti osvecuješ.], [Raduj sa, ohrada a ochranca pozemšťanov.], [Raduj sa, rebrík a vodca veriacich na ceste do neba.], [Raduj sa, lebo s tebou sa obnovuje všetko na zemi.], [Raduj sa, lebo tebou sa oslavuje všetko na nebi.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 8, "kondak": [Habakuk videl tvoj obdivuhodný zjav, keď si ho rýchlo preniesol z Judey do Babylonu, aby poskytol pokrm Danielovi hodenému do jamy s levmi. Vtedy v úžase nad týmto nesmierne veľkým zázrakom spolu s veriacimi volal Bohu: Aleluja. ], "zvolanie": none, "ikos": [Si skutočne mocný ochranca v našich bojoch, veľký nebeský vojvodca Michal, sláva a sila panovníkov. Vďaka tvojej pomoci veriaci víťazia nad všetkými plukmi nepriateľov a tebe mocným hlasom volajú:], "prosby": ( [Raduj sa, lebo zdobíš vencami Božích veriacich.], [Raduj sa, lebo rýchlo vytrhávaš z moci hriechu.], [Raduj sa, vzácna nádoba s pokladom milosti.], [Raduj sa, vodca trojsvätej piesne.], [Raduj sa, ohrada Bohom vysadeného raja.], [Raduj sa, miesto s prístupom k večnému životu.], [Raduj sa, lebo ty pestuješ plod čistoty.], [Raduj sa, lebo vydávaš prameň múdrosti.], [Raduj sa, lebo vysádzaš nesmrteľné záhrady.], [Raduj sa, lebo pestuješ trvanlivé ratolesti.], [Raduj sa, lebo si uhasil oheň v babylonskej peci.], [Raduj sa, lebo vďaka tebe sa zachránili nábožní mládenci.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 9, "kondak": [Všetky ľudské bytosti žasnú nad tvojím úžasným zjavom, Michal. Si nehmotný vodca všetkých ohnivých rozumných bytostí, ktoré osvecuješ a nás posväcuješ, keď spievame Bohu: Aleluja. ], "zvolanie": none, "ikos": [Prorok Daniel prijal z tvojich ohnivých úst slová, ktoré premáhajú slová rečníkov a keď pochopil obdivuhodné odhalenie budúcich vecí, preveľmi žasol a takto ti volal:], "prosby": ( [Raduj sa, ničiteľ porušiteľnosti prvostvorených ľudí.], [Raduj sa, zhubca škodlivých bludov a rozkolov.], [Raduj sa, lebo zjavuješ budúce veci.], [Raduj sa, lebo zaháňaš nepríjemnosti.], [Raduj sa, sila a ochrana nábožných.], [Raduj sa, neporaziteľný ochranca pravoverných.], [Raduj sa, lebo osvecuješ oči srdca.], [Raduj sa, lebo zatemňuješ zlé myšlienky.], [Raduj sa, ľúbezné počúvanie nádherného spevu.], [Raduj sa, sladká útecha duše.], [Raduj sa, Bohom ustanovený lekár duší a tiel.], [Raduj sa, zvrchovaný vodca všetkých anjelov.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 10, "kondak": [Ty, svätý Michal, zachráň od všetkej núdze tých, čo sa utiekajú pod tvoju ochranu a slávia tvoj nádherný sviatok; veď si vodca Božích anjelov a môžeš mocne pomáhať tým, ktorí s láskou spievajú Bohu: Aleluja. ], "zvolanie": none, "ikos": [<NAME>, ty si pre ľudí hradba a mohutný stĺp v zápasoch; vďaka tvojej mimoriadnej pomoci sú porazené pluky nepriateľa a my zachránení ti takto voláme:], "prosby": ( [Raduj sa, mocná zástanca pozemšťanov.], [Raduj sa, obdivuhodný premožiteľ nepriateľov.], [Raduj sa, lebo premáhaš pýchu protivníkov.], [Raduj sa, lebo udeľuješ Božiu milosť poníženým.], [Raduj sa, lebo od teba vytekajú prúdy zázrakov.], [Raduj sa, lebo poskytuješ pomoc prosiacim.], [Raduj sa, lebo poučuješ ľud o zákone Božom.], [Raduj sa, služobník pred Božím trónom.], [Raduj sa, ochrana v teba dúfajúcich.], [Raduj sa, zástanca k tebe sa utiekajúcich.], [Raduj sa, lebo archanjelským hlasom zblúdilých k Bohu privádzaš.], [Raduj sa, lebo z nebeských výšin na svojich služobníkov hľadíš.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 11, "kondak": [Žiadna pozemská pieseň nedokáže vyjadriť množstvo tvojich zázrakov, lebo hoci ti denne prednášame modlitby, svätý Michal, nedokážeme dôstojne vyjadriť nič z toho, čo konáš s tými, ktorí spievajú Bohu: Aleluja. ], "zvolanie": none, "ikos": [Nositeľ svetla a vodca vznešených ohnivých zástupov, svätý Michal, osvieť a prežiar naše srdcia, keď ti s láskou prednášame tieto prosby.], "prosby": ( [Raduj sa, ochranca vdov a bedárov.], [Raduj sa, učiteľ mnohých nevedomých.], [Raduj sa, radosť a potecha zarmútených.], [Raduj sa, nesmierna potecha putujúcich.], [Raduj sa, známa záštita nábožných.], [Raduj sa, veľká ozdoba veriacich.], [Raduj sa, kormidelník plaviacich sa.], [Raduj sa, prístav búrkou zmietaných.], [Raduj sa, lebo ty vyvádzaš z egyptského zajatia.], [Raduj sa, lebo ty vovádzaš do zeme prisľúbenia.], [Raduj sa, oblak, čo počas dňa ochranu poskytuje.], [Raduj sa, ohnivý stĺp, čo noc osvetľuje.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 12, "kondak": [Svätý archanjel Michal, udeľ z neba Božiu milosť tvojim ctiteľom; veď ty ako ohnivý stĺp poskytuješ veriacim svetlo, avšak spaľuješ tých, ktorí za tvoju ochranu nespievajú Bohu: Aleluja.], "zvolanie": none, "ikos": [Pozemský ľud ťa piesňami ospevuje a ty ho osvecuješ svojím svetlom. Si ľúbeznou vôňou sťa nádherný raj Vládcu, svätý Michal, a posväcuješ tých, čo ti takto spievajú:], "prosby": ( [Raduj sa, kráľovstvám radostná výšina.], [Raduj sa, pastierom vznešená nádhera.], [Raduj sa, Božej slávy verný obhajca.], [Raduj sa, štedrý prameň nepominuteľného bohatstva.], [Raduj sa, údiv pre anjelov i ľudí.], [Raduj sa, sláva prorokov a mučeníkov.], [Raduj sa, lebo vyslobodzuješ z pút zajatia.], [Raduj sa, lebo víťazíš nad tými, čo sa protivia.], [Raduj sa, posila pravoverných panovníkov.], [Raduj sa, záštita kresťanov.], [Raduj sa, neúnavný ochranca našich tiel.], [Raduj sa, sladké povýšenie našich duší do nebies.], [Raduj sa, veľký archanjel Michal, so všetkými nebeskými silami. ], ) ), ( "index": 13, "kondak": [<NAME>, ty obdivuhodné svetlo, večne žiariaca okrasa neba; ty chrabro zaháňaš na útek všetkých našich viditeľných i neviditeľných nepriateľov; prijmi teraz túto našu oslavu a mocou, ktorú ti Boh dal, osloboď nás od všetkej biedy i večného ohňa, keď s vierou spievame Bohu: Aleluja. ], "zvolanie": none, "ikos": none, "prosby": none, "velkost": 8pt, "modlitba": "Prichádzam k vám ako k zástancom a ochrancom môjho života, ja biedny s prosbou: pomôžte mi s vaším príhovorom bohumilo prežiť deň, aby som bol ďaleko od zlých skutkov a myšlienok. Otvorte mi sluch, aby som načúval užitočným Božím dielam a slovám; kiež sa mi otvorí duchovný zrak, lebo ma zahalila temnota hriechov. Modlite sa za mňa, lebo hreším v každom čase a ťažko hnevám a zarmucujem Božiu dobrotu. Ty však, Pane, Pane môj, zhliadni na mňa a zmiluj sa nado mnou. Vyveď moju dušu z väzenia hriechu skôr, než z tohto sveta odídem a prídem pred tvoj strašný súd. Prijmi tvojich svätých anjelov, ktorí sa za mňa prihovárajú, no najmä tvoju prečistú Matku a osloboď ma od toho strašného a hrozného súdu. Veď ty si Boží Baránok, ktorý sníma hriechy celého sveta, ukrižovaný pre našu spásu. Všimni si moju modlitbu a mojej duši i telu pošli strážneho anjela, aby ma viedol a tak aby som vďaka nemu unikol všetkým viditeľným i neviditeľným nepriateľom a mohol dosiahnuť milosrdenstvo so všetkými, ktorí od vekov viedli bohumilý život. Lebo ty si náš Boh, k tebe prichádzam a v teba skladám nádej, že hoci som zhrešil viac, než ostatní ľudia, neodstúpil som od teba ani som nevystrel ruky k cudziemu bohu. Teba prosím, <NAME>, teba zvelebujem a tebe sa klaniam, v Trojici jedinému Bohu Otcu i Synu i Svätému Duchu, teraz i vždycky i na veky vekov." ) ); #akatistGenerate(akatist)
https://github.com/floriandejonckheere/utu-thesis
https://raw.githubusercontent.com/floriandejonckheere/utu-thesis/master/thesis/chapters/01-introduction.typ
typst
#import "@preview/acrostiche:0.3.1": * = Introduction <introduction> // General introduction to the topic In the past decade, software engineering has seen a radical shift in the way software is developed and deployed. The rise in popularity of cloud computing and containerization has led to the emergence of microservices as a new software architecture paradigm. Microservices as an architectural style emphasize the development of small, distributed services that are deployed independently and communicate with each other over an internal network. This approach has numerous benefits, such as scalability and fault tolerance. Many small and large organizations have adopted a microservices architecture to increase the flexibility of their software systems and to enable faster software development cycles. Some organizations haven started to migrate their existing monolith applications to a microservices architecture to take advantage of these benefits. Migrating monolith applications to a microservices architecture is not a trivial task. It involves deep understanding of software engineering principles, the codebase of the application, and the business domain of the organization. Moreover, as larger and older applications typically have more technological debt, the process of migrating to microservices can be overly complex and error-prone @lenarduzzi_etal_2020. The initial investment in time and resources required to migrate to a microservices architecture is another factor that deters organizations from undertaking such a migration. As a result, (semi-)automated technologies have been developed to assist the migration process, covering various aspects of the migration, such as analysis of the codebase, microservice candidate identification, and refactoring. In recent years, a new software architecture paradigm has emerged that takes a hybrid approach to monolith and microservices architectures. The modular monolith architecture aims to combine the flexibility of using a microservices architecture with the simplicity of a monolith codebase. The modular monolith application consists of multiple independent modules encapsulating a specific set of functionality. The modules are developed and deployed independently, but they reside in the same codebase. This approach allows developers to rapidly introduce new features, while maintaining the flexibility and scalability of a microservices architecture. As the code resides in the same codebase, developers can easily restructure and redefine the module boundaries. This makes the modular monolith architecture an attractive option for organizations that want to migrate their monolith applications to a more flexible and scalable architecture, without the deterrents of a full microservices migration. In this thesis, we aim to investigate the potential benefits of a modular monolith architecture, and how (semi-)automated technologies can help software architects to migrate their monolith codebases to a modular monolith or microservices architecture. == Motivation The case study conducted in this thesis relates to a software system developed at Nipro Digital Technologies Europe NV#footnote[#link("https://www.niprodigital.com")[https://www.niprodigital.com]], a Belgian software company that specializes in developing software systems for the healthcare industry. The application in question is a monolith application that has accumulated a significant amount of technical debt over the years, and might benefit from an architectural overhaul. It is the aim of this thesis to investigate the viability of applying (semi-)automated modularization techniques to this software system, with the goal of pivoting towards a modular monolith architecture. == Scope and goal This research is centered around three research questions: *Research Question 1*: <research_question_1> What is the modular monolith architecture, and what sets it apart from monolith and microservices architectures? *Research Question 2*: <research_question_2> What are the existing approaches for (semi-)automated microservice candidate identification in monolith codebases? *Research Question 3*: <research_question_3> How can static analysis of source code identify module boundaries in a modular monolith architecture that maximize internal cohesion and minimize external coupling? The motivation behind the first research question is to investigate the potential advantages and drawbacks of the modular monolith architecture with a particular focus on its application to migrating existing monolith codebases. To answer this question, we will first define the modular monolith architecture on the basis of existing literature, and examine what sets it apart from monolith and microservices architectures. Then, we will proceed to investigate the advantages and drawbacks of the software architecture when migrating existing monolith codebases to a modular monolith architecture. The second research question is motivated by the observed need for reducing the complexity and error-proneness of manual modularization efforts. We will explore the existing (semi-)automated technologies to assist in modularization of monolith codebases in the literature. Finally, the third research question is motivated by the fact that a lot of useful information is embedded in the source code repository of a software system that could be used to identify module boundaries. An approach for microservice candidate identification will be designed based on the review of existing technologies. A prototype of the proposed solution will be implemented, and applied to a case study. The results will be evaluated using a set of quality metrics, and its effectiveness will be assessed. The goal of this research can be summarized as follows: + Investigate the advantages and drawbacks of the modular monolith architecture + Investigate the use of (semi-)automated technologies to modularize a monolith architecture Although the proposed solution will be designed for a specific case study, the results can be generalized to other monolith codebases. #pagebreak() == Outline The thesis is structured as follows. In @introduction, the motivation behind the research is explained. The scope and goal are defined, and the research questions are formulated. @methodology describes the research methodology followed. In @background the reader is introduced to the concepts and background necessary to understand the research. @relatedwork discusses the related work in the field of (semi-)automated modularization and microservice candidate identification. @modularmonolith is dedicated to answering the first research question. The modular monolith architecture is defined, and its advantages and drawbacks are discussed. The chapter also touches the concept of modularization and its relevance in software architecture. The next chapters aim to solve the remaining research questions. @automatedmodularization takes a deep dive into the existing technologies for (semi-)automated modularization. Based on this study, @proposedsolution then continues with an automated microservice candidate identification approach. In @casestudy, a case study is presented that applies the proposed solution to a real-world use case. The proposed solution is evaluated, and the results are discussed. Finally, @conclusion summarizes the findings, reflects upon the research, and gives an outlook on future work.
https://github.com/ayoubelmhamdi/typst-phd-AI-Medical
https://raw.githubusercontent.com/ayoubelmhamdi/typst-phd-AI-Medical/master/cover.typ
typst
MIT License
#let divider() = { line(length: 100%, stroke: 5pt + rgb("#C55A11")) } #let cover(book_info) = { let title=book_info.title let authors=book_info.authors let encaders=book_info.encaders // #let cover(title: "", authors: (), encaders: ()) = { v(-2.25em) align(center, // box( // stroke:0pt, figure( image("images/fsm02.jpg", width: 70%, height:15%,fit: "contain"), ) // ) ) divider() align(center, block( [] +v(0.5em) +text( weight: "bold", size: 18pt, [Mémoire de Projet de Fin d Études] ) +v(0.25em) +text( // weight: "bold", size: 12pt, [*Master Spécialise:* Techniques de Rayonnements\ en Physique Médicale (TRPM)] ) +v(0.25em) ) ) v(1.5em) align( center, text( size:18pt, [Réalisé par:] ) ) // pad( // top: 0.5em, // bottom: 2em, // x: 2em, // grid( // columns: (1fr,) * calc.min(3, authors.len()), // gutter: 1em, // ..authors.map(author => align(center)[ // #author \ // ]), // ), // ) // befin autors text( weight: "bold", size:18pt, table( columns: (1fr), align: center, stroke: none, row-gutter: 0.5em, inset: 3pt, ..authors ) ) // fin autor v(1.0em) divider() v(1.0em) // set par(justify: false) align( center, block( text( fill: rgb("#1E045B"), weight: "bold", size:24pt, title ) ) ) v(1.0em) // v(1.0em) divider() v(1.5em) align( center, block( text( weight: "bold", size:16pt, [Soutenu le 23/09/2023 devant la Commission d’Examen : ] ) ) ) pad( top: 0.5em, bottom: 2em, x: 2em, text( weight: "bold", size:16pt, table( columns: (2fr,1fr,1fr), align: left, stroke: none, row-gutter: 0.5em, inset: 3pt, ..encaders ) ) ) pagebreak(weak:true) }
https://github.com/ClazyChen/Table-Tennis-Rankings
https://raw.githubusercontent.com/ClazyChen/Table-Tennis-Rankings/main/history/2010/MS-12.typ
typst
#set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (1 - 32)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [1], [<NAME>], [CHN], [3250], [2], [WANG Hao], [CHN], [3235], [3], [<NAME>], [CHN], [3116], [4], [BOLL Timo], [GER], [3109], [5], [ZHANG Jike], [CHN], [3099], [6], [WANG Liqin], [CHN], [3073], [7], [XU Xin], [CHN], [3032], [8], [SAMSONOV Vladimir], [BLR], [2988], [9], [<NAME>], [CHN], [2947], [10], [<NAME>], [KOR], [2924], [11], [CHEN Qi], [CHN], [2910], [12], [MIZUTANI Jun], [JPN], [2888], [13], [OVTCHAROV Dimitrij], [GER], [2845], [14], [<NAME>], [GER], [2835], [15], [<NAME>hiro], [JPN], [2834], [16], [APOLONIA Tiago], [POR], [2828], [17], [<NAME>], [KOR], [2798], [18], [<NAME>], [DEN], [2791], [19], [<NAME>], [GER], [2777], [20], [CHUANG Chih-Yuan], [TPE], [2767], [21], [<NAME>], [KOR], [2740], [22], [<NAME>], [ROU], [2737], [23], [LEE Jungwoo], [KOR], [2712], [24], [KO Lai Chak], [HKG], [2700], [25], [<NAME>], [JPN], [2698], [26], [KISHIKAWA Seiya], [JPN], [2691], [27], [<NAME>], [FRA], [2680], [28], [<NAME>], [AUT], [2663], [29], [GAO Ning], [SGP], [2649], [30], [CHEN Weixing], [AUT], [2642], [31], [YOSHIDA Kaii], [JPN], [2629], [32], [FREITAS Marcos], [POR], [2623], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (33 - 64)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [33], [HOU Yingchao], [CHN], [2610], [34], [UEDA Jin], [JPN], [2606], [35], [TANG Peng], [HKG], [2605], [36], [LI Ching], [HKG], [2598], [37], [TOKIC Bojan], [SLO], [2597], [38], [GIONIS Panagiotis], [GRE], [2597], [39], [SEO Hyundeok], [KOR], [2591], [40], [CHO Eonrae], [KOR], [2583], [41], [SMIRNOV Alexey], [RUS], [2581], [42], [<NAME>], [AUT], [2579], [43], [JEOUNG Youngsik], [KOR], [2578], [44], [<NAME>], [CZE], [2574], [45], [<NAME>], [BLR], [2566], [46], [SKACHKOV Kirill], [RUS], [2565], [47], [<NAME>], [IND], [2564], [48], [LEGOUT Christophe], [FRA], [2562], [49], [<NAME>], [KOR], [2560], [50], [<NAME>], [AUT], [2560], [51], [KIM Junghoon], [KOR], [2554], [52], [<NAME>], [SGP], [2552], [53], [<NAME>], [PRK], [2552], [54], [<NAME>], [HKG], [2549], [55], [<NAME>], [CRO], [2549], [56], [<NAME>], [DOM], [2547], [57], [GERELL Par], [SWE], [2545], [58], [<NAME>], [SWE], [2539], [59], [<NAME>], [QAT], [2531], [60], [KIM Minseok], [KOR], [2531], [61], [PROKOPCOV Dmitrij], [CZE], [2522], [62], [STEGER Bastian], [GER], [2515], [63], [CHEUNG Yuk], [HKG], [2508], [64], [<NAME>], [BEL], [2506], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (65 - 96)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [65], [<NAME>], [GER], [2506], [66], [KOSOWSKI Jakub], [POL], [2504], [67], [<NAME> Su], [KOR], [2496], [68], [ZHMUDENKO Yaroslav], [UKR], [2495], [69], [<NAME>], [CZE], [2493], [70], [<NAME>], [ESP], [2492], [71], [SVENSSON Robert], [SWE], [2489], [72], [<NAME>], [GRE], [2489], [73], [<NAME>], [ESP], [2487], [74], [<NAME>], [POL], [2482], [75], [<NAME>], [HUN], [2478], [76], [<NAME>], [ENG], [2477], [77], [<NAME>], [FRA], [2475], [78], [<NAME>], [DEN], [2470], [79], [KAN Yo], [JPN], [2469], [80], [<NAME>], [RUS], [2465], [81], [<NAME>], [FRA], [2465], [82], [<NAME>], [SRB], [2461], [83], [KASAHARA Hiromitsu], [JPN], [2454], [84], [BLASZCZYK Lucjan], [POL], [2452], [85], [<NAME>], [ARG], [2439], [86], [<NAME>], [PRK], [2437], [87], [<NAME>], [AUT], [2432], [88], [<NAME>], [SVK], [2427], [89], [<NAME>], [TUR], [2424], [90], [YAN An], [CHN], [2424], [91], [<NAME>], [POL], [2423], [92], [<NAME>], [KOR], [2421], [93], [<NAME>], [POR], [2419], [94], [WU Chih-Chi], [TPE], [2412], [95], [<NAME>], [CRO], [2407], [96], [<NAME>], [HUN], [2404], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (97 - 128)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [97], [VRABLIK Jiri], [CZE], [2400], [98], [<NAME>], [CRO], [2385], [99], [CANTERO Jesus], [ESP], [2383], [100], [<NAME>], [ENG], [2382], [101], [<NAME>], [TUR], [2382], [102], [<NAME>], [KOR], [2380], [103], [BURGIS Matiss], [LAT], [2379], [104], [SHIBAEV Alexander], [RUS], [2374], [105], [ELOI Damien], [FRA], [2373], [106], [RUBTSOV Igor], [RUS], [2373], [107], [PETO Zsolt], [SRB], [2371], [108], [<NAME>], [ESP], [2371], [109], [<NAME>], [TPE], [2370], [110], [<NAME>], [RUS], [2362], [111], [BAGGALEY Andrew], [ENG], [2360], [112], [<NAME>], [AUS], [2356], [113], [<NAME>], [JPN], [2356], [114], [<NAME>], [EGY], [2353], [115], [<NAME>], [EGY], [2350], [116], [<NAME>], [PRK], [2342], [117], [<NAME>], [CRO], [2341], [118], [<NAME>], [POL], [2340], [119], [LUNDQVIST Jens], [SWE], [2340], [120], [<NAME>], [GER], [2339], [121], [TAKAKIWA Taku], [JPN], [2337], [122], [<NAME>], [SVK], [2337], [123], [<NAME>], [UKR], [2327], [124], [<NAME>], [KOR], [2326], [125], [<NAME>], [SRB], [2325], [126], [<NAME>], [SGP], [2325], [127], [<NAME>], [CHN], [2324], [128], [<NAME>], [MEX], [2324], ) )
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/035%20-%20Core%202019/005_Chronicle%20of%20Bolas%3A%20Blood%20and%20Fire.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Chronicle of Bolas: Blood and Fire", set_name: "Core 2019", story_date: datetime(day: 18, month: 07, year: 2018), author: "<NAME>", doc ) No one gave Naiva permission to leave the rock shelter and creep out into the heart of a dragon tempest, but she didn't ask. She grabbed her spear and raced out the tunnel, emerging into an overhang partially screened by the surrounding boulders. Wind blasted her face with slivers of ice. The air prickled at her skin, making her hair rise. At dusk most of the sky had been clear, stars a scintillating presence overhead. Now when she peeked out from under the rock, she saw nothing but darkness. The howls and shrieks of newly birthed dragons deafened her as the tempest raged overhead. Lightning split into a hundred jagged lines that revealed dragons falling and flying in a ceaseless agitation like children at brutish play or warriors in relentless battle. Churning clouds crackled with energy. The blackness engulfed her again. A shape leaped down off the rocks and ducked in beside her. By the smell of wet fur, she knew it was the quiet ainok, Darka. "Where is First Mother?" he said. "Here!" Grandmother pushed out beside Naiva. Lightning flashed. A burst of hot rain slammed through, hissing as it struck the ground. Sparks danced on the air. "Trouble!" he called. "She's here!" #emph[What ] she#emph[ did the ainok mean?] Naiva wondered. Lightning flashed in a long chain of bolts that traced a path across the entire arc of the heavens. It splintered into a vast architecture of antlers wreathed in fire. A roar like the crash of a hundred thunderclaps drove Naiva to her knees, where she gasped for breath. Darka also fell, barely catching himself on a hand. Only Grandmother remained upright, unbowed, grasping her staff. #figure(image("005_Chronicle of Bolas: Blood and Fire/01.jpg", width: 100%), caption: [Fearsome Awakening | Art by: <NAME>], supplement: none, numbering: none) "She's found the dead broodling." Her shout was barely audible in the tumult. Limned with an unearthly aura of that same malevolent light, the huge dragon rose out of the boulders where the broodling had fallen and flew into the heart of the storm. Slashing and raging, she drove the fledglings deeper into the night. Streaks of lightning marked her path. Thunder crackled in her wake. The wind's scream lessened to a rumbling bluster. The rain sheeting down faded to a light mist. A patch of stars appeared high above the maelstrom. A flash of golden light flared like the sun rising at zenith, but the brightness was extinguished as quickly as it had appeared, leaving the stars again to shine. Yet some of those stars vanished in a descending trail, blotted out and then reappearing in a trail as if a large shape was falling out of the heavens. Naiva rubbed her eyes, thinking the storm had injured her vision, but when she looked again all the stars shone steadily. The clouds began clearing off as the rain ceased. Surely the falling blot had been nothing more than a distortion of wind and churning cloud. The promise of coming dawn bled a trickle of light into the air, enough that the shapes of boulders came into view against the dark sky. Fec emerged from the passage and halted to inhale deeply. "The tempest is gone," he said. Grandmother nodded in her decisive way. "Make ready. Call Oiyan in. We'll move out as soon as there's light enough." "Won't we be visible, easy prey, if Atarka returns?" Naiva asked. "She'll drive the fledglings back to Ayagor and take them hunting," said Grandmother grimly. "That's the only skill she cares about." "What about the offal? Are we leaving it behind after all the trouble you took to cut it out of the dragon?" "The river will keep it cold. We'll fetch it later. It's not safe now." "When will it be safe?" Naiva asked irritably. "Safe merely means the last dragon we've seen is flying away from us." Grandmother looked toward the east, where the horizon was shifting to a shimmering gold. "Fec, you take point. The rest of us will follow as soon as we're ready. <NAME>in and Baishya, you stay close to me. Naiva, go with Fec." "But Grandmother—" Naiva broke off when she saw <NAME>in's look of surprise that she had the temerity to protest a command from her elder. Baishya caught her eye and shook her head reprovingly. She slouched forward to join the old orc. Why did Grandmother always keep Baishya beside her when Naiva was the better hunter and could protect her if anything went wrong? It just wasn't fair. "Young Naiva joins me today, with keen, quick eyes to shade my age-whitened orbs," said Fec as they headed out through the jumble of boulders. His limp was pronounced, but he used his staff skillfully, like a third leg, to negotiate the uneven ground. "Yes, thank you, we should be quiet and no talking." His laugh rumbled softly. "You'd rather be walking beside the handsome young stranger." Not for the first time she wished she had Baishya's calm facade or Grandmother's stern mask, but her feelings bled onto her whole body. She tried to close down her expression, to look strong and dispassionate, but she was sure Fec was silently laughing at her, although he probably wasn't paying attention to her at all. As they came out of the boulders onto the open tundra, his gaze roved in the way of an experienced hunter who knows how to read the land for signs of game: broken stalks of grass, prints sunk into the ground, a carcass stripped to the bone, fresh scat. No matter how she tried to focus, her thoughts kept swirling back to her grievance. It wasn't fair that Grandmother protected Baishya while she got stuck with a half-crippled orc who mocked her and didn't even belong to the clan. Just because Grandmother said he was one of them now didn't make it true. She kicked a rock onto a shallow puddle. The rock cracked the skin of ice on the water and sank out of sight. He glanced her way. "Speak your mind, <NAME>. Better not to choke on words that should be loosed like arrows." Very well. She was up to the challenge! "Why did Grandmother shelter you?" "Shelter a half-crippled orc, do you mean? Yasova always has her reasons." "What answers does Grandmother really think we can find at Ugin's grave? What kind of answers do dead things have, except for signs that tell us how they were killed?" "Not everything that is dead is gone, or absent. The ancestors still have tales to tell us." "Atarka killed my mother for speaking to the ancestors. It's better to let the dead go and concentrate on the hunt." "Better for the dragonlords. Maybe not better for us who must serve them rather than rule ourselves as we once did." "Talk like that will get you eaten, if it comes to Atarka's notice." "Will you tell her?" His tone dared her. "If it means saving the tribe, I will." But the thought of turning him over to Atarka grated. He wasn't wrong for pointing out that the rule of the dragonlords was harsh and uncompromising, that it made the people more like servants than proud hunters. She did not want to become one of those spineless tale-tellers who scraped and wheedled in Ayagor to try to win the favor of Atarka, as if the dragon cared anything for her mortal subjects except that they brought her meat and more meat. #figure(image("005_Chronicle of Bolas: Blood and Fire/02.jpg", width: 100%), caption: [Dragon Whisperer | Art by: <NAME>], supplement: none, numbering: none) "Is forbidden talk what got you kicked out of your tribe?" she asked. "What you call forbidden talk I would call truth-telling. But that is not why, young one." He pointed to his dragging right leg. "In the Kolaghan clan those who cannot keep up are left behind." "Then why didn't you accept death? Wouldn't that have been more honorable?" "There are many roads to honor. Many ways to fight, even if my tribe does not recognize their worth." He tapped his brow with fore- and middle fingers. Unlike the humans, he needed no gloves because the tough skin of his hands withstood the worst cold. A network of thin scars wove a harsh pattern across the back of each hand, the mark of no claw she had ever seen. Maybe it was just how orcs got old, like age spots on the hands of wizened elders kept alive by their sentimental children. "Many things worth saving, as Yasova Dragonclaw knows well." "You know that word is not allowed!" "If we do not use it, then the young will forget." "It's better to discard what we can't use. Atarka rules us now, not the dragonclaw, not a khan. Even though we don't like it, that's just how it is." He gestured across his throat, cutting her off. Humiliated by his high-handedness toward her—Yasova's granddaughter!—she flushed. If only she were a dragon. She would burn him. Burn him. But he hadn't been reacting to her words. His tongue licked the air. His back stiffened. He stuck the staff into a loop along his back and tugged free both swords with a swift motion whose efficiency impressed her. Made of brass, they were the most valuable objects he possessed, although they did not have nearly as sharp a cutting edge as the obsidian weapons used by the rest of the tribe. "Naiva, run quickly back. They must hide in the shelter." Her anger poured away like rain off her felt mantle. She swung around to look for danger. A vast darkness sped toward them, monstrous and silent. Only one creature possessed such a frightening spread of spiky, glowing antlers. Naiva sprinted back toward the boulders, but although she was young and fleet, she was not a dragonlord. Atarka's huge form passed over her in a wash of shadow and heat. The dragon slammed down to earth right at the edge of the boulders. The ground shook. Naiva stumbled, catching herself on her forward hand, then leaped back up and kept running. But it was too late. The dragonlord had caught Grandmother and the others a spear's toss away from the outermost boulders and placed herself between them and the safety of the rocks. Naiva slowed to a walk. She knew better than to move quickly. Atarka might look ungainly but nothing moved faster than the dragonlord when her ire was roused. The dragon's growl rolled as loudly as the avalanche that had torn away half the snow field on Eternal Ice. With a long, hot hiss, she reached out and closed her claws around Darka. "A tasty snack!" she rumbled. "Almost as good as bear." The ainok did not struggle or beg; he was too proud, and there was no point anyway. Grandmother strode forward and tapped her spear on the dirt three times, demanding to be seen. Never would she bow. Never would she cringe. "Atarka! For eighteen years my people have brought you meat in honor of our agreement. I have something better and more substantial for you than a skinny ainok." The great eyes blinked. Sour scorching breath gusted over them. "How did my broodling die? He was my favorite." Naiva doubted that any of the broodlings were Atarka's favorite but the dragon was a wily, greedy beast. Grandmother said, "The fledglings must have killed him." "The fledglings scented his blood and went to feast. They did not kill him." She bit off Darka's head before tossing his body in a high arc. It fell out of sight but close to the spot where, Naiva knew, the carcass of the broodling lay. His death sickened her, but they all faced death every day. At least his had come quickly. "Tell truth or I eat the other ainok," Atarka rumbled, lowering herself closer to Yasova. "Did you kill him?" Grandmother did not move, keeping herself between the dragon and Darka's kinsman, Rakhan. "I did not kill the broodling. But as I was saying before you wasted the meat of my ainok, we have killed you something better." "Better than ainok flesh?" "Much better. One of Ojutai's kin killed your broodling and fed on its innards. We avenged your broodling's death by killing the outsider. A dragon for your next feast!" Atarka raised her head and tested the air. The pungent odor of the tempest still lingered, woven in with the smell of grass, of dirt, of drying blood and old rock. #figure(image("005_Chronicle of Bolas: Blood and Fire/03.jpg", width: 100%), caption: [Dragonlord Atarka | Art by: <NAME>], supplement: none, numbering: none) "Show me." Grandmother gestured for the others to remain behind and started walking, alone, toward the distant scatter of boulders where the broodling had deposited the dead Ojutai dragon. Atarka slammed a foreclaw down on the ground in front of the old woman. "All come. All." A huff of sparks steamed up from her nostrils. "I know your tricks. I will eat all if I am not satisfied." Grandmother signaled with a hand for them to fall in line behind her. Naiva kept her back rigid and her gaze ahead; every child was taught never to challenge a dragon by looking them directly in the eyes but also never to cringe submissively or run away. It was better to die than to cringe. She let the others pass, exchanging a glance with Baishya. Her twin hesitated, making ready to fall back with her, but Naiva gestured for her to go ahead. Only when everyone else had gone ahead did she fall in at the end of the line. Nothing but air separated her from Atarka. The dragonlord paced behind them, each footfall an earthquake. When the dragon exhaled, sparks swirled past her body. It was so hard not to glance behind, not that a look would save her. One swipe, one blast, and she'd be dead, obliterated, but she wanted to do as Grandmother would do. She wanted to prove herself worthy of being Yasova Dragonclaw's granddaughter: undaunted, a living shield between danger and the tribe. Her sense of the world around her expanded: each step might be her last, each intake of breath her final measure, each heartbeat the end. Tae Jin glancing back at her; Baishya's shallow breathing; Rakhan's stifled grief; the other hunters silent and alert, ready for anything even if that anything was the death that awaited all in the end. But Atarka let them live, or maybe she had crueler sports in mind to play with her hostages. They lived on her sufferance. The dragonlords were more powerful than the old ways, so what was the point of cherishing the ancestors when they had been crushed and defeated? If they had been worthy, surely they would have won. Unexpectedly, Atarka leaped upward and with a howl of glee flew in a quick hop over them to drop down beside the body of the Ojutai dragon. The slender dragon was badly torn up after the titanic battle, but they all braced themselves as Atarka snuffled around the body and inhaled a taste of his congealed blood. Would she realize no human weapons had cut the body? She whipped her tail back and forth to force the hunting party up against a boulder, trapping them there. Thinking of their mother, Naiva placed herself in front of Baishya, but the dragon's gaze fell not on the inheritor of their mother's shamanic gifts but on Tae Jin. Fortunately, the mended tunic covered his ghostfire tattoo, but his facial features and shaved head marked him as different from the other humans. She huffed several times. "What is this outsider?" Grandmother took a step toward the dragon. "He belongs to my hunting party." "Fah! He smells of Ojutai, that pompous, ice-breathing windbag." Tae Jin took a step forward, lifting his arms, palms up, and bringing his forearms together in the gesture that would birth the ghostfire blade in his hands. "Tae Jin! Do not begin that which you cannot end." No one crossed Grandmother. As he obediently lowered his arms to his side, she returned her attention to the dragonlord. "He has come to join us because he heard of your great stature and ferocity, Atarka. What use for a brave warrior is it to serve a pompous, ice-breathing windbag when he can hunt in the service of a true dragon like you?" Atarka rumbled, her head swaying mesmerically back and forth as she considered first the carcass and then the slight young man. "He looks not sturdy enough to hunt for me." "A hunter may also succeed by being clever." Tae Jin took a step forward. "I am useful in other ways, great Atarka. For example, I can tell you many stories." "Words bore me. They are not tasty like meat." She swung her lambent gaze back to Grandmother. "You may watch while I eat him alongside this Ojutai dragon." "As you wish, Atarka. But consider this. Ojutai himself sent his own favored broodling to hunt down the man. He did not wish the man to leave his domain and serve another, greater dragonlord. You win a victory over Ojutai by keeping this man alive in your tribe when Ojutai wants him dead." Atarka's cruel laughter washed over them like an icy bath. "I like that. Tell a story while I feast. Then I decide." Grandmother looked at Tae Jin. Undaunted, he walked forward to stand beside the old woman. "I will tell a story my mother told me when I was a boy. She learned it from her master." As the great dragon began ripping into the smaller dragon's cooling flesh, Tae Jin began to speak. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) A very, very long time ago, there ruled a king of great beneficence, greater than any other king in all the land. This king was a dragon of particular wisdom and strength. Once called the least of his siblings, Nicol had traveled the continent of his birth with his brother Ugin to discover the truth of the world. But alas, the truth was harsh. The world was harsh. Violence and murder erupted even in the most orderly of humanoid realms, even when there was plenty of space for all where vegetation grew lushly and beasts roamed in abundance. Troubled and distraught by this revelation, the young dragon journeyed to the mountain of his birth with his brother. He wasn't sure what he sought but hoped to discover enlightenment. A far more terrible prospect greeted him when at last he reached the ancient peak. The humans who lived below the bright radiance of the birth mountain had elevated a killer as their chief, and his heirs were also killers. Dragon killers. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Atarka raised her head, sinew and flesh dripping from her jaws, and fixed a hot, golden gaze upon Tae Jin. The air snapped with anticipation. He had her attention now, and that was not a good thing. #figure(image("005_Chronicle of Bolas: Blood and Fire/04.jpg", width: 100%), caption: [Student of Ojutai | Art by: <NAME>], supplement: none, numbering: none) He rubbed at his eyes, shook his head as if to clear it, and muttered, "That isn't the story I meant to tell. Let me try again." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) With vile sorcery the chief and his heirs preyed upon dragons, caring nothing for the noble superiority of the magnificent ones. These feeble humans fed on the blood and bone of those greater than themselves, hoping to steal that strength. With spear and sorcery, the chief crushed his subjects under his heel. Those who pleased and flattered him prospered, and those who were caught whispering treason under their breath died. Those who could not fight labored hungrily in the fields to feed him. The healthy and strong were given spears and whips with which to thrash the rebellious and the stranger into submission. As the years passed, the chief came to rule more people and extend his sway over more of the land. The greedy prospered, and the weak groaned under the burden of their endless toil. But dragons do not suffer such indignities for long. Such an affront must be answered. When the young dragon arrived at the birth mountain and saw the injustice and abuse being meted out to the vulnerable, he knew he must act. It is true his brother was not as bold; he caviled; he hesitated. But to do nothing to avenge the death of one's kin is the same as killing them yourself. Outnumbered and unable to match the cruel sorcery of the humans, the young dragon outwitted the humans instead. With matchless cunning, he set the heirs against each other so that they fought one against the next until all lost the war for succession. In the course of the war, his brother was swept away into nothingness by a blast of human sorcery, their own claw of revenge. But the dragon triumphed. Dragons always triumph for that is their nature, to rise above all. In place of the brutal chief, the young dragon was acclaimed as savior of the realm and offered the throne. Those who had once worshiped the drinker of dragon's blood now bowed before the dragon. He ruled according to the precepts he had discussed at length with his brother, for they were ever eager to understand the world's scope and heart. He knew that he could best honor the memory of his beloved brother by acting as he would have done, as he would have urged his brother to do. So it was that he reigned justly and fairly, with order and peace, for many generations. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Atarka spat out a claw, having just gulped down a large hank of leg. "This is not a story!" she growled. "Where is the hunting? Where is the blood and the shattered bone?" Tae Jin pressed his hands together and tilted his head forward to show respect. "Great Atarka, please let me continue and you will be satisfied." "Or I will eat you." Lashing her massive tail, she lowered her head to continue feeding. "In the last days of Shu Yun's leadership," he said, then faltered. His mouth shaped words but no sound came out. Again, he pressed fingers to his eyes as if his vision was failing him. After a moment of struggle his lips opened as if of their own accord, and he went on. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) So it was that the young dragon who became known as the second sun. He reigned justly and fairly, with order and peace. The tale of the fall of the dragon killer's dishonorable rulership was handed down from elder to child, generation to generation, and celebrated with a yearly festival over which the benevolent dragon king presided. But envy breeds dragons, and thus dragons multiplied in the lands beyond the harmonious kingdom. The king was but one dragon, his kingdom modest. He held his border strong and safe for his subjects for as long as he could. One day, a rampage of dragons raided through the peaceful settlements along the river that separated the harmonious kingdom from the plains territories and badlands where Palladia-Mors had long hunted. At once, he hurried to meet this threat, flying over a line of burned villages and frantic refugees fleeing the carnage. He found seven large, loud dragons munching noisily through a stockyard of terrified, stampeding beasts. The marauders merely glanced at him circling above before going back to their feast. Such insolence would be rewarded as it deserved! He blasted flame in a ring around them, not to trap them—since they could easily fly out—but to get their attention. "Why do you trouble my blameless subjects and eat their valuable herds?" he demanded. "We are the descendants of <NAME> and may raid where we wish!" they cried, lashing their tails and brandishing their claws. "What happened to Palladia-Mors?" he asked, honestly amazed that lesser dragons could chase off his savage sister. "We drove her off to go hunting elsewhere. Now we will drive you off and take your rich lands and docile meat for ourselves." Like their progenitors, they were belligerent and small-minded. Yet even a dragon as magnificent as himself could not defeat them alone. But he was not alone. He had subjects who sang his praises with poems that asked for no higher honor than a chance to prove themselves worthy of his regal generosity and noble perspicacity. He had armies of eager warriors and an academy packed with clever sorcerers he had taught, all seeking to challenge their skills against the mightiest of foes. He possessed the weapons of the long-dead dragon killers. #figure(image("005_Chronicle of Bolas: Blood and Fire/05.jpg", width: 100%), caption: [Art by: Yongjae Choi], supplement: none, numbering: none) An irritating flash of thought crackled in his mind with the timbre of Ugin's voice scolding him: #emph[If it is wrong to kill dragons when the humanoids do it, then it is wrong for us to kill our kinfolk. Or did Merrevia Sal die for nothing, Nicol? Was it never about her at all but only about the humiliation you felt at not saving her?] Their sister's death and the vengeance he'd taken had been different, not that Ugin had the wit or discernment to acknowledge this truth. And anyway, Ugin was wrong. Vaevictis was a bully, and his descendants were bullies who would rip apart the harmonious kingdom for the sport of it. Even Ugin would have had to acknowledge they were useless marauders. Furthermore, Ugin wasn't here. It was time to put his powerful weapons to use. With plangent bells and bellowing horn calls the army assembled, hauling ballistae and their venom-laced bolts. Sorcerers draped in gold and black robes strode in disciplined columns, singing as they marched. At the river's edge they met the seven young dragons, and the proud armies poured venom and sorcery onto the enemy in a relentless hail. It was a rout. A slaughter. How intoxicating it was to see the venom-laced bolts fly true, piercing scaled underbellies softened by cunning sorcery! Viscera spilled onto the ground, burning those caught beneath. The gloating shouts of the victors blended with the agonized screams of the dying dragons. How satisfying it was to watch the loud-mouthed braggarts tumble to earth on paralyzed wings, breathing their last as their hearts and lungs failed and their eyes dimmed. Triumph was sweet, and sweeter still because he had dared attack dragons, the most dangerous and mighty of all creatures. But one of the dragons survived, flying away at a speed the young dragon king could not match since he was not yet full grown. "Do we pursue?" his generals asked ardently. "Yes!" He recalled with stark clarity how Vaevictis and his brothers had once tormented and chased him for no other reason but because it entertained them to be despicable. At last he could avenge the insult. Emboldened, the great army rumbled into motion, marching, riding, rolling beyond the stoutly guarded border. They pursued the trail of the dragon across the great plains where Palladia-Mors had once hunted, taking supplies from towns and villages they passed. The land grew drier, and soon they reached what appeared from the distance as a wall but which was a stark barrier of rugged hills, twisted gullies, and spectacular pinnacles. Beyond, to the north, rose the grand mountain range where Vaevictis and his brothers laired. Some among the troops grumbled, for supplies were growing scarce and water scarcer. After the young king ate the dissenters—cowards invariably taste sour—the rest dauntlessly marched north over the flat prairie with the badlands at their back. The sun was rising when he spotted four dragons flying toward them. Seen from a distance they did not appear particularly formidable, but as they came closer, their massive size and fierce demeanor became evident. The three brothers, Lividus, Ravus, and Rubra, bellowed insults as they approached, calling him "runt" and "least born." That their insults weren't even clever just made it worse. The largest was Vaevictis himself, flying out in front because of his superior strength. In his foreclaws he held the limp body of the dragon that had fled the lost battle. With a roar that shook the ground, Vaevictis flew right over the army and released the dragon. The body plummeted to earth as soldiers shoved and shouted, trying to get out of the way. The corpse hit hard, instantly crushing an entire company of slingers. Blood soaked the dusty ground, and fires broke out where the final sparks of the dragon's breath kindled in dry grass. The injured screamed, clutching at bones broken through skin, while healers tried to haul comrades out from beneath the dead weight of the dragon. With a laugh, Vaevictis cried, "Run, little Nicol. Run, and I'll spare you." Earlier in his life, anger might have gotten the better of the young dragon king as he writhed and fumed over such mockery. He assuaged his anger by decapitating several of the generals. But his underlings' shortcomings weren't the important thing now. The days of letting Vaevictis bully him were over. He whipped the panicked army into new ranks, promoting officers who hadn't lost their heads. Vaevictis's rash challenge offered him an unexpected advantage. Vaevictis might be big and mean, but he wasn't as smart as he thought he was. The young dragon king ordered the ballistae to draw up, using the long stretch of the dead dragon's broken neck and twisted tail as a fortification. As Vaevictis circled back to join up with his approaching brothers, the artillery began to launch their venom-tipped bolts. They were skilled; they had to be, since those who did not make muster were demoted to slavery. So their bolts struck true, time and again. Rubra took a bolt to the eye. Though the shot did not kill him outright, the numbing venom seeped into his brain. He struggled away toward the barrier wall, perhaps hoping to take refuge on one of the pinnacles, but lost consciousness and fell to earth just beyond the baggage train. The rear guard raced with swords and spears to wreak havoc upon his sluggish body, shouting and dancing with glee. The young dragon king was too busy dodging the fire-breath of his cousins to reprimand his soldiers when they triumphantly bathed themselves in the dead behemoth's hot blood. #figure(image("005_Chronicle of Bolas: Blood and Fire/06.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) The rest of the army was not faring so well. Vaevictis himself took five direct hits, but iron could not pierce his thick hide. He roared fire across the artillery lines, sending ballistae up in gouts of flame. Lividus and Ravus swooped down to snap up soldiers and fling them through the air to their deaths. Mounts panicked, throwing their riders as they fled. The wagons in the baggage train began to burn together with the hapless drivers and grooms. Smoke billowed upward, throwing ashy patches across the ground. "You'll regret challenging me!" roared Vaevictis as he circled around with a brother at either flank. "We'll pin you to the ground and rip your flesh from your bones while you're still alive." With much of the army dead or in shambles, the threat wasn't an empty one. Brute strength would not serve him now; only his superior wits could save the day. The young king had long since gained control of his sorcerers through his supple mind touch. At his command, they wove a great spell of concealment, blanketing the battlefield in a sooty haze. Under its cover, he slipped away with the remnants of the army toward the rugged hills and twisted gullies. Two ballistae had survived, hauled by soldiers given strength by desperation. The rear guard, still damp with blood, fell in; they had survived because, their captain called up to him, the holy dragon's blood protected them from dragon's fire. A point to consider, once he could catch his breath. He drove his exhausted, stumbling army like a wounded leviathan into a deep gully hemmed in by cliffs on either side. "Great King, isn't this a death trap?" opined one of his generals. "Only if you don't survive the coming battle." The question annoyed him, but there wasn't time to discipline the general. Sometimes you had to delay punishing an offender in order to move fast to save yourself. Beyond a sharp curve in the canyon he allowed them to halt. Perhaps a third of his army had stayed with him, along with seven bolts for the two ballistae. Though the bolts had pierced the scales of the lesser dragons, these elder dragons were tougher. But the eye was vulnerable. And he had his sorcerers as well, of whom one squadron remained. At odd moments, when he visited the birth mountain or when he was flying above water, he thought of Ugin. In his hearts, he felt obliged to believe an invisible wind roused by sorcery had ripped Ugin away, because if it hadn't been sorcery, then Ugin was nothing more than a coward who had abandoned his brother just when Nicol needed him most. He could not bear to believe Ugin was so weak and dishonorable. For generations he had toiled in concert with his academy of sorcerers to recover or devise a magic that could replicate Ugin's disappearance. No one had managed it yet, but the sorcerers were able to disintegrate large rocks. They had a chance, if everyone managed their task at the right moment. A bellow echoed down the canyon walls. The heavy thuds of a massive body approaching shook the ground. "Wait," he commanded the restless, frightened troops. "Wait." Lividus loomed into view, blocking the canyon. The ballistae released with a thud, sending bolts straight into the huge dragon. The first glanced harmlessly off his shoulder while the second caught between scales in his foreleg and dangled there until he shook it off. And laughed, looking up. A shadow darkened the canyon as Ravus dropped down from the sky. "Now!" cried the young king. Working in concert, the sorcerers flung the disintegration spell at the dragon overhead. It hit like an invisible wave pouring through him. Ravus splintered like rock heated until it explodes. Scales hailed down in deadly discs upon his troops. Half the sorcerers were killed outright, punctured by sharp bone fragments or smashed by slabs of raining flesh. #figure(image("005_Chronicle of Bolas: Blood and Fire/07.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) "Ravus!" With a cry of enraged grief, Lividus flamed the ballistae just as a second set of bolts flew. The force of his blast sent the bolts skittering against the canyon walls, leaving the young king vulnerable with the charred ballistae, the last sorcerers, and the blood-soaked rearguard as his sole companions. "#emph[This isn't what you learned from Arcades] ," Ugin had cried at the last moment of his existence when he'd been furious at Nicol's attempt to manipulate his thoughts. The touch did not work on dragons. So Nicol had believed at the time. But maybe it just hadn't worked on Ugin. Staring up at Lividus, he knew he had one bolt left to shoot, a rash and dangerous chance to take. "Now you'll die, you slithering worm," Lividus hissed. "Cousin!" He captured Lividus's gleaming gaze with his own. He sunk a shadow claw of doubt into the other dragon's hearts, seeking to excavate his grievances. "No wonder Vaevictis sent you ahead. He knew the risk, and exposed you and Ravus instead of himself. Doesn't he always do that?" The big dragon's hesitation, a shiver of suppressed resentment, spurred him on. "He flies ahead only when he knows he'll not be touched. Don't you tire of his rule? His hectoring, domineering ways? It's his fault Ravus and Rubra are dead. Didn't the three of you conspire once to supplant him, but he beat you into submission? Now what will you do when he has only you to bully? He's always been afraid of you, since you're the only one as big as he is. That's why he keeps you down. I can help, but we have to work together." He pressed the venom-tipped spear of his sharp mind deep into Lividus's simmering rancor. It was so easy, after all, just as easy as it had always been with humanoids. His cousin was strong in body but weak in mind. "Here he comes! If you attack him, I'll whip my sorcerers after him. We'll be rid of him forever more." Here came Vaevictis. Lividus rose to meet him with a roar. Of course, Vaevictis did not suspect an attack, so the first swipe took him off guard, drawing blood from his right shoulder. His rage exploded as he swatted back, a blow that would have sent the young king tumbling tail over horns. But Lividus was as big as Vaevictis. While the blow staggered him, he recovered quickly, and with a blast of fire and the hammer of his tail, struck back. "Now," said the young king to his surviving sorcerers. Again, they threw the disintegrating spell against the great dragons, but either because it had to spread between two giant bodies or because six was too few working in concert, the magic did nothing but stagger the dragons momentarily. Yet each howled in pain and anger, thinking the other had hit first. "Traitor! Backstabber!" cried Vaevictis, flinging himself at Lividus just as, long ago in Arcades's town, a mild-mannered young man had been goaded to attack and kill his own brother. Their battle renewed with a ferocity whose impact and clamor thundered through the rugged hills and echoed down the deep canyons. Revenge was sweet. But the winner would still be bigger than he was. The young king retreated. The blood-soaked rearguard, of course, had to all be killed lest they pass on the knowledge of how the blood of an elder dragon protected weak humanoid flesh. The sorcerers he allowed to live for long enough to create a smoky mist of concealment that would carry him some ways onto the plains, but he killed them after so there would be no one to talk of how there were bigger, stronger dragons in the world whom his subjects might choose to worship instead of him. As he flew away in haste, he contemplated what he had learned. Greed and envy are goads that never cease clawing at even the dullest of hearts. Dragons will succumb as easily as others, if you can just find the kernel to ignite them. Vaevictis would come after him, he was sure of it. So he had to find a way to keep his cousin busy. Instead of returning to his harmonious kingdom, he traveled up into the craggy mountains, seeking out the descendants of Lividus, Ravus, and Rudra. What terrible news he had to bring them! Vaevictis had turned on his own brothers. What a disgrace. Most likely the big dragon meant to eradicate his brothers' descendants as well so no trace of perfidy could possibly survive. The ease with which the gullible could be turned to his purpose was surprisingly pleasurable. Returning to his kingdom seemed unadventurous and bland. Instead he journeyed on to a new lair of dragons, a new territory to enflame. He sought out Palladia-Mors. She remembered him with a dismissive clout to his head, but she listened avidly to his tale of how vulnerable Vaevictis now was. Ah. Revenge was indeed sweet. In years to come, the stories would be told at hearth fires or by refugees huddled around campfires seeking safety, not that they would ever be safe. Dragons from one clan raided the mountain fastnesses of a cousin clan. Amid the snow-capped peaks the dragons fought in thunderous battles, claw to claw, fire to fire. Charred flesh rained down from the heavens. Bone shattered at the base of cliffs. Those whose hunger could never be sated tore their way through the dying, feasting upon the bloody flesh of their own kind. Greed and envy grow the more they are fed. Maws open to swallow larger portions, and claws reach for yet more distant prey. Dragons turned their gaze upon the fields and herds of the humanoid settlements. Some wished merely to devour the humanoids as they had hunted down and devoured wild herds. Others wished to manage them like cattle, ripe for culling when their hunger grew sharp. A few wished to teach and guide the humanoids, but their efforts were often met with ingratitude and misunderstanding. Even the clever Chromium Rhuell took to hiding himself while he pretended to be something he was not, lest he be scorned by the humans he claimed did love him or eaten by the dragons who despised his mealy-mouthed philanthropy. No cage can confine greed. No chains can bind envy. As they grow, they are lashed by desire and anger, and so the dragons were not sated. Their hunger did not abate. #figure(image("005_Chronicle of Bolas: Blood and Fire/08.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) Dragons crossed the mighty seas to find new lands in which to feed their hunger for flesh and for power. When even those distant shores became too crowded, then dragons fought each other with tooth and claw, with fire and ice. Under dragon standards, they raised proud war bands from among the humanoids who worshiped or feared them. Sorcerers who sought a dragon-like power through mastery of their magical gifts came crawling to offer their services, for in all the wide world no creature is as powerful as a dragon, not in the beginning of days and never across all the unending span of eternity. Even the wise Arcades Sabboth, who had scolded and harangued upon the topic of order and peace and the proper way to rule, threw his might into the great war as he listened to the whispers of wisdom that brushed through his mind. #emph[The others will not respect your autonomy or your wisdom. They will come for you if you do not go after them first.] Even Arcades marched his followers against fortresses ruled over by his distant kinfolk. When he had defeated them, he threw their marrowless bones into the sea where the waters churned them into pale sands that washed shores all the world round. So the wars raged, while only one dragon kept faith with those he ruled. He had not forgotten the promise he made to his twin: that there should not be one law for them and a different law for us. There should only be one law. There would only be one law. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) <NAME> broke off and, mouth slack, stared at the ground as if he had forgotten what he'd been saying or even who he was. Atarka raised her head. Ligaments dangled from her mouth. She'd swallowed the liver and hearts whole and torn muscle and fat from bone. A slimy ooze coated her forelegs where she'd waded into the innards of the Ojutai dragon after tearing open its belly. She opened her mouth wide and wider still, displaying the fearsome topography of her teeth, then snapped her jaw closed with a rumble of laughter. "There is only one law: to eat. This was a good feast. You may keep the outsider." The dragonlord leaped skyward in a battering of wings that sent them all to their knees. She soon vanished from sight, flying northeast toward the Qal Sisma. "My head." As if his bones had turned to liquid, <NAME> collapsed straight down, standing one moment and seated the next, hunched over with head resting in his hands. Naiva ran over to him, but Grandmother got there first and waved her off. She crouched beside him and tilted his head back so she could look into his eyes. What she saw there made her frown. "Are you conscious, <NAME>?" "Yes~just struck with a headache that makes my eyes water." "What tale was that you told, so like Ugin's story and yet not his story at all?" "I don't know. I meant to tell the tale of the last days of Shu Yun's leadership. Of the last meeting of the khans and how they fell to the dragons." "I remember that day and its aftermath too well." "I thought such a tale of victory would entertain the dragonlord." "Where did this tale come from, then?" Again, he rubbed his eyes, then cautiously rose as if unsure his legs would hold him up. "This other story~came into my mind in a whisper. Maybe it's a story my mother told me when I was very young that I have forgotten until now." Grandmother stood. "This is an ominous turn of events. Once before, a whispering voice sought to alter the events on Tarkir. To my shame, I listened. Ugin's death is partly to be blamed on me. Maybe the visions your master and the windfolk received didn't come from Ugin. But if they did, it's more important than ever that we reach Ugin's grave quickly. First, we must honor Darka for his hunting prowess in life and his unflinching acceptance of death." #figure(image("005_Chronicle of Bolas: Blood and Fire/09.jpg", width: 100%), caption: [Ainok Tracker | Art by: <NAME>], supplement: none, numbering: none) They pulled the ainok's mangled remains from amid the bloody ruins left by Atarka's feeding. His knife and amulets they wrapped up to return to his ainok kin. The items from his pack they split between themselves. Such objects were too valuable to be abandoned. Afterward, in the ainok manner, they lay his body on the ground and ringed it with stones. Each spoke a brief prayer and a single memory, nothing elaborate. Every spirit passed into the realm of the ancestors, and with another hunt always looming, the greatest honor they could show the deceased was to continue on, year after year, generation after generation. "His spirit walks ahead of us into the unwritten now," said Grandmother as she placed a large rock atop his chest as a reminder of the weight of obligations that bound each member of the tribe to the others. The sun, too, was part of the kinship network, and the sun would watch as the birds and beasts and bugs devoured his remains. She stepped away. "Is everyone ready?" Naiva looked around. Of course they were ready, spears and knives in hand, packs slung across their backs. The tribe was always ready. "We must reach Ugin's grave before the storm hits." Grandmother led them away from the boulders and the gnawed remains and shattered bones of the two dead dragons. Vultures circled overhead, awaiting their chance to feed on the wreckage. Up ahead, Fec was waiting to fall in with them. Naiva scanned the sky. The dregs of dark clouds had been blown into the southeast like a fleeing herd. The rising sun poured its golden light across the tundra. Far away, at the edge of the hills, a strange, warped spiral of stone rose up from the ground, the feature so sharp and delineated that for an instant, she believed the illusion she could reach out and touch it. "Do you think another dragon tempest is coming?" she asked Grandmother. "I think it's already here."
https://github.com/RolfBremer/gloss-awe
https://raw.githubusercontent.com/RolfBremer/gloss-awe/main/README.md
markdown
Apache License 2.0
# gloss-awe Automatically create a glossary in [typst](https://typst.app/). This typst component creates a glossary page from a given pool of potential glossary entries using only those entries, that are marked with the `gls` or `gls-add` functions in the document. ⚠️ Typst is in beta and evolving, and this package evolves with it. As a result, no backward compatibility is guaranteed yet. Also, the package itself is under development and fine-tuning. ## Table of Contents * [Usage](#usage) * [Marking the Entries](#marking-the-entries) * [Controlling the Show](#controlling-the-show) * [Hiding Entries from the Glossary Page](#hiding-entries-from-the-glossary-page) * [Pool of Entries](#pool-of-entries) * [Unknown Entries](#unknown-entries) * [Creating the glossary page](#creating-the-glossary-page) * [Changelog](#changelog) * [v0.1.5](#v015) * [v0.1.4](#v014) * [v0.1.3](#v013) * [v0.1.2](#v012) * [v0.1.1](#v011) * [v0.1.0](#v010) * [v0.0.5](#v005) * [v0.0.4](#v004) * [v0.0.3](#v003) * [v0.0.2](#v002) ## Usage ### Adding the package to your project The package can either be added to your project by adding the main file `gloss-awe.typ` and importing it, or by importing the package via the typst package manager (available from Typst version 0.6.0 or later). #### Importing from File ```typ #import "gloss-awe.typ": * ``` #### Importing via Typst Package Manager ```typ #import "@preview/gloss-awe:0.1.5": * ``` ### Marking the Entries To include a term into the glossary, it can be marked with the `gls` function. The simplest form is like this: ```typ This is how to mark something for the glossary in #gls[Typst]. ``` The gls function will render in the resulting document as defined with the specified show rule (see below!). ### Controlling the Show To control, how the markers are rendered in the document, a function can be provided for the markers: ```typ #gls(showmarker: m => [#emph(m)])[Butterscotch] ``` This sample will display the marked word as emphasized in the document. ### Hiding Entries from the Glossary Page It is also possible to hide entries (temporarily) from the generated glossary page without removing any markers for them from the document. The following sample will hide the entries for "Amaranth" and "Butterscotch" from the glossary, even if it is marked with `gls[...]` or `gls-add[...]` somewhere in the document. ```typ #let hidden-entries = ( "Amaranth", "Butterscotch" ) #make-glossary(glossary-pool, excluded: hidden-entries) ``` ### Pool of Entries A "pool of entries" is a typst dictionary. It can be read from a file or may be the result of other operations. One or more pool(s) are then given to the `make-glossary()` function. This will create a glossary page of all referenced entries. If given more than one pool, the order pools are searched in the order they are given to the method. The first match wins. This can be used to have a global pool to be used in different documents, and another one for local usage only. The pool consists of a dictionary of definition entries. The key of an entry is the term. Note, that it is case-sensitive. Each entry itself is also a dictionary, and its main key is `description`. This is the content for the term. There may be other keys in an entry in the future. For now, it supports: * description * link An entry in the pool for the term "Engine" file may look like this: ```typ Engine: ( description: [ In the context of software, an engine... ], link: [ (1) Software engine - Wikipedia. https://en.wikipedia.org/wiki/Software_engine (13.5.2023). ] ), ``` ### Unknown Entries If the document marks a term that is not contained in the pool, an entry will be generated anyway, but it will be visually marked as missing. This is convenient for the workflow, where one can mark the desired entries while writing the document, and provide missing entries later. There is a parameter for the `make-glossary()` function named `missing`, where a function can be provided to format or even suppress the missing entries. ### Creating the Glossary Page To create the glossary page, provide the pool of potential entries to the make-glossary function. The following listing shows a complete sample document with a glossary. The sample glossary pool is contained in the main document as well: ```typ #import "@preview/gloss-awe:0.1.5": * // Text settings #set text(font: ("Arial", "Trebuchet MS"), size: 12pt) // Defining the Glossary Pool with definitions. #let glossary-pool = ( Cloud: ( description: [ Cloud computing is a model where computer resources are made available over the internet. Such resources can be assigned on demand in a very short time, and only as long as they are required by the user. ] ), Marker: ( description: [ A Marker in `gloss-awe` is a typst function to mark a word or phrase to appear in the documents glossary. The marker is also linked to the glossary section by referencing the label `<Glossary>`. ] ), Glossary: ( description: [ A glossary is a list of terms and their definitions that are specific to a particular subject or field. It is used to define the intended meaning of terms used in a document and to agree on a common definition of those terms. A well-defined glossary can be very helpful in documents where very specific meanings of certain terms are used. ] ), "Glossary Pool": ( description: [ A glossary pool is a collection of glossary entries. An automated tool can pull needed definitions from this pool to create the glossary pages for a specific context. ] ), REST: ( description: [ Representational State Transfer (abgekürzt REST) ist ein Paradigma für die Softwarearchitektur von verteilten Systemen, insbesondere für Webservices. REST ist eine Abstraktion der Struktur und des Verhaltens des World Wide Web. REST hat das Ziel, einen Architekturstil zu schaffen, der den Anforderungen des modernen Web besser genügt. ] ), XML: ( description: [ XML stands for `'eXtensible Markup Language'`. ], link: [https://www.w3.org/XML] ), ) // Defining, how marked glossary entries in the document appear #show figure.where(kind: "jkrb_glossary"): it => {it.body} // This alternate rule, creates links to the glossary for marked entries. // #show figure.where(kind: "jkrb_glossary"): it => [#link(<Glossar>)[#it.body]] = My Sample Document with `gloss-awe` In this document the usage of the `gloss-awe` package is demonstrated to create a glossary with the help of a simple and small sample glossary pool. We have defined the pool in a dictionary named #gls[Glossary Pool] above. It contains the definitions the `gloss-awe` can use to build the glossary in the #gls[Glossary] section of this document. The pool could also come from external files, like #gls[JSON] or #gls[XML] or other sources. Only those definitions are shown in the glossary, that are marked in this document with one of the #gls(entry: "Marker")[marker] functions `gloss-awe` provides. If a Word is marked, that is not in the Glossary Pool, it gets a special markup in the resulting glossary, making it easy for the Author to spot the missing information an providing a definition. In this sample, there is no definition for "JSON" provided, resulting in an Entry with a red remark "#text(fill: red)[No~glossary~entry]". There is also a way to include Entries in the glossary for Words that are not contained in the documents text: #gls-add("Cloud") #gls-add("REST") = Glossary <Glossary> This section contains the generated Glossary, in a nice two-column-layout. It also bears a label, to enable the linking from marked words to the glossary. #line(length: 100%) #set text(font: ("Arial", "Trebuchet MS"), size: 10pt) #columns(2)[ #make-glossary(glossary-pool) ] ``` To use more than one pool, this can be used instead: ```typ #import "/Global/GlossaryPool.typ": glossary-pool #import "/Global/LocalGlossaryPool.typ": local-glossary-pool #columns(2)[ #make-glossary(local-glossary-pool, glossary-pool) ] ``` Using this, the local pool takes precedence over the global pool, because it is the first parameter. More usage samples are shown in the document `sample-usage.typ` on [gloss-awe´s GitHub]([Title](https://github.com/RolfBremer/typst-glossary)). A more complex sample PDF is available there as well. </span> ## Changelog ### v0.1.5 * Migrate deprecated locate to context. ### v0.1.4 * Fix a Bug introduced in 0.1.3 where glossary entries with empty entries are not shown. ### v0.1.3 * Enhance internal `as-text` function to be more robust. * tidy up sample-usage.typ document. ### v0.1.2 * Provide a parameter to suppress "no glossary entry" messages in the glossary page. * Support rich content in glossary titles. * Increase robustness for different content in the entry. * Ignore empty glossary pools without throwing an error. ### v0.1.1 * Improve display behavior of `gls()` by not emitting additional spaces. * Clean up documentation. ### v0.1.0 * Add an optional parameter `sort: k => k` to make-glossary() to provide a method to determine the sort key. * Remove the (mis-)usage of figures to mark glossary entries. This also removes the requirement to have a show rule for those figures defined to suppress the markers. ### v0.0.5 * Address change in `figure.caption` in typst (commit: 976abdf ). ### v0.0.4 * Breaking: Renamed the main file from `glossary.typ` to `gloss-awe.typ` to match package. * Added support for hidden glossary entries. * Added a Changelog to this readme. ### v0.0.3 * Added support for package manager in Typst. * Add `gls-add[...]` function for entries that are not in the document. ### v.0.0.2 * Moved version to Github.
https://github.com/jassielof/typst-templates
https://raw.githubusercontent.com/jassielof/typst-templates/main/apa7/utils/authoring.typ
typst
MIT License
#import "languages.typ": * #let validate-inputs(data, custom-data, data-type) = { if data != (:) and custom-data != [] { panic(data-type + " and custom-" + data-type + " cannot both be defined.") } if data == (:) and (custom-data == [] or custom-data == none) { panic("At least one " + data-type + " must be defined.") } if data != (:) { data } else { custom-data } } #let enumerate-affiliations(affiliations) = { let count = 1 for affiliation in affiliations { affiliations.at(count - 1).insert("n", count) count += 1 } return affiliations } #let is-multiple-authors-with-different-affiliations(authors, affiliations) = { let unique-affiliations = () for author in authors { for author-affiliations in author.affiliations { if author-affiliations not in unique-affiliations { unique-affiliations.push(author-affiliations) } } } return unique-affiliations.len() > 1 } #let print-authors-with-different-affiliations(authors, affiliations, language) = { affiliations = enumerate-affiliations(affiliations) let aff-positions = (:) for aff in affiliations { aff-positions.insert(aff.id, str(aff.n)) } let author-strings = authors.map(author => { let aff-numbers = author.affiliations.map(aff => super[#aff-positions.at(aff)]) [#author.name#aff-numbers.join(super[, ])] }) if author-strings.len() == 2 { author-strings.join([ #get-terms(language).and ]) } else { author-strings.join([, ], last: [, #get-terms(language).and ]) } } #let print-authors(authors, affiliations, language) = { if type(authors) != content and type(authors) != str { if authors.len() == 1 { authors.at(0).name } else if is-multiple-authors-with-different-affiliations(authors, affiliations) { print-authors-with-different-affiliations(authors, affiliations, language) } else { let author-names = authors.map(it => it.name) if author-names.len() == 2 { author-names.join([ #get-terms(language).and ]) } else { author-names.join([, ], last: [, #get-terms(language).and ]) } } } else { authors } } #let print-affiliations(authors, affiliations) = { if type(affiliations) != content and type(affiliations) != str { if affiliations.len() == 1 { affiliations.at(0).name } else if is-multiple-authors-with-different-affiliations(authors, affiliations) { enumerate-affiliations(affiliations).map(aff => [ #super[#aff.n] #aff.name #parbreak() ]).join() } else { affiliations.map(aff => [ #aff.name #parbreak() ]).join() } } else { affiliations } }
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/babel/0.1.1/assets/poster.typ
typst
Apache License 2.0
#import "@preview/babel:0.1.1": * #import "../src/alphabets.typ": alphabets #import "../assets/logo.typ": logo #set page( fill: gradient.linear( angle: 90deg, // ..color.map.vlag.map(it => it.lighten(50%)) ..( white, rgb("#2369bd").mix(white), rgb("#2369bd"), rgb("#2369bd").mix(white), rgb("#a9373b") ).map(it => it.lighten(50%)) ), width: 100em, height: auto, margin: (top: 3cm), ) #set text(font: (("Gentium Plus", "Noto Emoji"))) #show raw: set text(font: "Iosevka") #layout(size => { scale( x: size.width, y: auto, origin: top+left, text(fill: black.transparentize(50%))[#box(baseline: 10%, text(size: 6pt, logo(transparentize: 50%))) _Tower of `Babel`_]) }) #v(4.5cm) #let sample = "Ni malleviĝu do, kaj Ni konfuzu tie ilian lingvon, por ke unu ne komprenu la parolon de alia. Kaj la Eternulo disigis ilin de tie sur la supraĵon de la tuta tero, kaj ili ĉesis konstrui la urbon."//Tial oni donis al ĝi la nomon Babel, ĉar tie la Eternulo konfuzis la lingvon de la tuta tero kaj de tie la Eternulo disigis ilin sur la supraĵon de la tuta tero." #set align(center) #let alphabet-counter = 0 #grid( columns: 1, ..for alphabet in alphabets { alphabet-counter = alphabet-counter + 1 (grid.cell([ #block( width: (alphabet-counter/alphabets.len())*100%, height: 1.5em, clip: true, // TODO Make less hackish and ugly box(width: 100000%, baseline: 1.2em)[ #set text(lang: alphabet.last().at("lang")) if "lang" in alphabet.last().keys() #baffle( sample, alphabet: alphabet.first(), punctuate: if "punctuate" in alphabet.last().keys() {alphabet.last().at("punctuate")} else {true}, output-word-divider: if "word-divider" in alphabet.last().keys() {alphabet.last().at("word-divider")} else {" "}, as-string: true, ) ] ) ]),) } ) #layout(size => { scale( x: size.width, y: auto, origin: top+center, )[#text( font: "SBL Hebrew", lang: "hbo", fallback: false, script: "hebr", dir: rtl, )[עַל־כֵּ֞ן קָרָ֤א שְׁמָהּ֙ בָּבֶ֔ל כִּי־שָׁ֛ם בָּלַ֥ל יְהֹוָ֖ה שְׂפַ֣ת כׇּל־הָאָ֑רֶץ]] })
https://github.com/nixon-voxell/nixon_resume
https://raw.githubusercontent.com/nixon-voxell/nixon_resume/main/template.typ
typst
MIT License
// const color #let color_darknight = rgb("#131A28") #let color_darkgray = rgb("333333") // layout utility #let justify_align(left_body, right_body) = { block[ #left_body #box(width: 1fr)[ #align(right)[ #right_body ] ] ] } #let justify_align_3(left_body, mid_body, right_body) = { block[ #box(width: 1fr)[ #align(left)[ #left_body ] ] #box(width: 1fr)[ #align(center)[ #mid_body ] ] #box(width: 1fr)[ #align(right)[ #right_body ] ] ] } #let generate_contact(icon, contact, url: "") = { block[ #icon #if url != "" { link(url)[#contact] } else { contact } ] } #let resume(author: (), date: "", body) = { set document( author: author.firstname + " " + author.lastname, title: "resume", ) set text( font: ("Source Sans Pro"), lang: "en", size: 11pt, fill: color_darknight, fallback: false, ) set page( paper: "a4", margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm), footer: [ #set text(fill: gray, size: 8pt) #justify_align_3[ #smallcaps[#date] ][ #smallcaps[ #author.firstname #author.lastname #sym.dot.c #"Résumé" ] ][ #counter(page).display() ] ], footer-descent: 0pt, ) // set paragraph spacing show par: set block(above: 0.75em, below: 0.75em) set par(justify: true) set heading( numbering: none, outlined: false, ) let name = { align(left)[ #pad(bottom: 5pt)[ #block[ #set text(size: 20pt, style: "normal", font: ("Roboto")) #text(weight: "thin")[#author.firstname] #linebreak() #text(weight: "bold")[#author.lastname] ] ] ] } let positions = { set text( size: 9pt, weight: "regular", ) align(left)[ #smallcaps[ #author.positions.join( text[#" "#sym.dot.c#" "], ) ] ] } let contacts0 = { set box(height: 11pt) let email_icon = box(image("assets/icons/mail.svg")) let phone_icon = box(image("assets/icons/phone.svg")) let location_icon = box(image("assets/icons/location.svg")) let linkedin_icon = box(image("assets/icons/linkedin.svg")) align(left)[ #generate_contact(email_icon, author.email, url: "mailto:" + author.email) #generate_contact(phone_icon, author.phone) #generate_contact(location_icon, author.loc) #generate_contact( linkedin_icon, author.linkedin, url: "https://linkedin.com/in/" + author.linkedin, ) ] } let contacts1 = { set box(height: 11pt) let url_icon = box(image("assets/icons/url.svg")) let github_icon = box(image("assets/icons/github.svg")) let youtube_icon = box(image("assets/icons/youtube.svg")) let itchio_icon = box(image("assets/icons/itchio.svg")) align(left)[ #generate_contact(url_icon, author.url_name, url: author.url) #generate_contact( github_icon, author.github, url: "https://github.com/" + author.github, ) #generate_contact( youtube_icon, author.youtube, url: "https://youtube.com/" + author.youtube, ) #generate_contact( itchio_icon, author.itchio, url: "https://itch.io/profile/" + author.itchio, ) ] } align(left)[ #box[ #box(radius: 6pt, clip: true)[#image( "assets/images/me.jpg", height: 80pt, )] #h(8pt) #box[ #name #positions ] ] #h(1fr) #box[#contacts0] #h(1fr) #box[#contacts1] ] body } // general style #let resume_section(title) = { set text( size: 16pt, weight: "regular", fill: white, ) align(left)[ #box(fill: black, inset: 4pt)[ #smallcaps[ // #text[#title.slice(0, 3)]#strong[#text[#title.slice(3)]] #strong[#text[#title]] ] ] #box(width: 1fr, line(length: 100%)) ] } #let resume_item(body) = { set text(size: 10pt, style: "normal", weight: "light") set par(leading: 0.65em) body } #let resume_time(body) = { set text(weight: "light", style: "italic", size: 9pt) body } #let resume_degree(body) = { set text(size: 10pt, weight: "light") smallcaps[#body] } #let resume_organization(body) = { set text(size: 12pt, style: "normal", weight: "bold") body } #let resume_location(body) = { set text(size: 12pt, style: "italic", weight: "light") body } #let resume_position(body) = { set text(size: 10pt, weight: "regular") smallcaps[#body] } #let resume_category(body) = { set text(size: 11pt, weight: "bold") body } #let resume_gpa(numerator, denominator) = { set text(size: 12pt, style: "italic", weight: "light") text[Cumulative GPA: #box[#strong[#numerator] / #denominator]] } // sections specific components #let education_item(organization, degree, gpa, time_frame) = { set block(above: 0.7em, below: 0.7em) set pad(top: 5pt) pad[ #justify_align[ #resume_organization[#organization] ][ #gpa ] #justify_align[ #resume_degree[#degree] ][ #resume_time[#time_frame] ] ] } #let work_experience_item_header( position, company, location, time_frame, ) = { set block(above: 0.7em, below: 0.7em) set pad(top: 5pt) pad[ #justify_align[ #resume_organization[#position] ][ #resume_location[#location] ] #justify_align[ #resume_position[#company] ][ #resume_time[#time_frame] ] ] } #let project_item_header( name, url, ) = { set block(above: 0.7em, below: 0.7em) set pad(top: 5pt) pad[ #justify_align[ #resume_organization[#name] ][ #text(style: "italic", size: 8pt)[#link(url)] ] ] } #let award_item_header( name, time, ) = { set block(above: 0.7em, below: 0.7em) set pad(top: 5pt) pad[ #justify_align[ #resume_organization[#name] ][ #resume_time[#time] ] ] } #let item_and_link( name, url, ) = { set block(above: 0.7em, below: 0.7em) set pad(top: 5pt) pad[ #resume_organization[#name] #resume_item[- #link(url)] ] } #let skill_item(category, items) = { set block(above: 1.0em, below: 1.0em) grid( columns: (18fr, 80fr), gutter: 10pt, align(right)[ #resume_category[#category] ], align(left)[ #set text(size: 11pt, style: "normal", weight: "light") #items.join(", ") ], ) }
https://github.com/agarmu/typst-templates
https://raw.githubusercontent.com/agarmu/typst-templates/main/notes/theorems.typ
typst
MIT License
#import "@preview/ctheorems:1.1.2": * #let theorem = thmbox("theorem", "Theorem", fill: rgb("#e8e8f8"), base: none) #let lemma = thmbox("theorem", "Lemma", fill: rgb("#efe6ff"), base: none) #let corollary = thmbox("theorem", "Corollary", fill: rgb("#f8e8e8"), base: none) #let definition = thmbox("theorem", "Definition", fill: rgb("#eeffee"), base: none) #let example = thmbox("example", "Example", fill: rgb("#e8e8f8"),base_level:2) #let proof = thmproof("proof", "Proof") #let remark = thmbox("remark", "Remark", fill: rgb("#ffd1dc")).with(numbering: none)
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/methods-06.typ
typst
Other
// Error: 2-5 cannot mutate a constant: box #box.push(1)
https://github.com/lucannez64/Notes
https://raw.githubusercontent.com/lucannez64/Notes/master/Pensee_1_Liberte.typ
typst
#import "template.typ": * // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( title: "Pensée 1 Liberté", authors: ( "<NAME>", ), date: "30 Octobre, 2023", ) #set heading(numbering: "1.1.") = Lien entre liberté et physique quantique <lien-entre-liberté-et-physique-quantique> == Introduction <introduction> Nous cherchons à établir un lien entre le concept philosophique de liberté et le principe d’indétermination en physique quantique. L’hypothèse est que l’indétermination quantique pourrait constituer un fondement à l’existence d’une forme de liberté. == Le monde est quantique <le-monde-est-quantique> Le monde est quantique, c’est-à-dire qu’il est régi par les lois de la mécanique quantique. Ces lois sont probabilistes, ce qui signifie qu’elles ne prédisent pas avec certitude le résultat d’une expérience mais seulement des probabilités. == L’homme est quantique <lhomme-est-quantique> L’homme est lui-même quantique, car il est composé d’atomes et de molécules qui obéissent aux lois de la mécanique quantique. Les comportements humains ont donc également un caractère probabiliste du fait de l’indétermination quantique. == Définitions <définitions> - Espace de Hilbert H : espace mathématique décrivant un système quantique - Vecteur d’état |ψ⟩ ∈ H : représente l’état quantique du système - Observable Ô : opérateur hermitien agissant sur H - Liberté : capacité de choix entre actions possibles == Indétermination quantique <indétermination-quantique> Le principe d’indétermination quantique stipule qu’il est impossible de mesurer simultanément et avec précision certaines paires d’observables conjuguées, comme la position et la quantité de mouvement. Formellement, cela se traduit par les inégalités de Heisenberg : Δx Δp ≥ h/4π où Δx et Δp sont les incertitudes sur la position et la quantité de mouvement. == Tentative de démonstration mathématique <tentative-de-démonstration-mathématique> On peut proposer une analogie formelle entre l’indétermination quantique et l’indétermination des choix: - Soit un système quantique S de vecteur d’état |ψ⟩ \ - On lui associe deux observables conjuguées O1 et O2 - À ces observables on associe deux choix possibles A1 et A2 On définit alors une correspondance: |ψ⟩ → {A1, A2} Suivant l’indétermination quantique, on ne peut prédire si S choisira A1 ou A2. == Implications philosophiques <implications-philosophiques> Cette analogie suggère que l’indétermination quantique pourrait se répercuter au niveau des choix d’un système conscient, ouvrant la possibilité d’une forme de liberté. == Discussion <discussion> Bien que suggestive, cette approche demande des analyses supplémentaires pour être pleinement justifiée, tant du point de vue mathématique que philosophique. D’autres conceptions de la liberté doivent aussi être explorées. == Conclusion <conclusion> Le lien entre indétermination quantique et liberté est une piste de recherche stimulante mais complexe, à la croisée des mathématiques, de la physique et de la philosophie.
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/bugs/layout-infinite-lengths_01.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // // #set page(width: auto, height: auto) // // // Error: 17-66 cannot create grid with infinite height // #layout(size => grid(rows: (size.width, size.height))[a][b][c][d])
https://github.com/elteammate/typst-shell-escape
https://raw.githubusercontent.com/elteammate/typst-shell-escape/main/README.md
markdown
# ARCHIVED Starting from Typst v0.something, this no longer works due to forcing the `--root` option. Not that it should be used anyway. I wrote this a long time ago, mostly as a joke, yet a few people thanked me in DMs in discord for implementing it. I am totally fine with people using my stuff, but I know that what I made can be significantly improved upon, at least ported to the latest version of Typst. And at the moment, I am not in the mood to improve it. # Shell Escape for Typst This is a simple shell escape for [Typst](https://typst.app/). It allows you to run shell commands directly from Typst compiler. **That said, it does not mean that you _should_ run shell commands from Typst.** In fact, I would highly recommend against it. This is a very dangerous feature and should be used with extreme caution, and, if possible (it _is_ possible), not at all. ## Usage You don't. ## Usage Please, don't. I beg you. ## Usage Fine. But be aware that you aren't just playing with fire anymore. You are planning with fire, in a forest, during a drought, with a flamethrower, near the lake of gasoline, with fifteen nuclear power plants nearby. Clone the repo and make sure you have [cargo](https://www.rust-lang.org/tools/install) and [Typst CLI](https://github.com/typst/typst) installed. Run `cargo build`. This will create a binary in `/target`. Get the `shell-escape.typ` file and `#import` it in your Typst project. Run the built executable before compiling your project. ## A note of caution > **This is a very dangerous feature. It's not just dangerous, it's _extremely_ > dangerous. There is a reason shell-escape will never be implemented in Typst > Not only is it very bad for security, you can ruin your workspace. You are > literally opening a window to an undefined behaviour from a safe environment > of the Typst virtual machine.** > > And don't even think of running this along with `typst-lsp`, or any other > compiler instance. There will be no guarantees on the order of execution of > commands. This _can_ result in the deadlock, and you will be lucky if only your > compiler deadlocks. > > **You have been warned.** ### High-level API To run a command, use `#exec-command`. | Argument | Type | Description | Kind | Default | |-----------------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------|------------|---------| | `command` | `string` | Command to run. | positional | | | `method-stdout` | `function` | Function to call when the command writes to stdout, used to interpret stdout. For example, if command returns `.json`, pass `json`. | named | `read` | | `method-stderr` | `function` | Function to call when the command writes to stderr. | named | `read` | | `format-stdout` | `string` | File extension of stdout. For example, if you want to read svg image, you should use `image` function with `".svg"` format | named | `""` | | `format-stderr` | `string` | File extension of stderr. | named | `""` | | `custom-hash` | `string` | Discriminator which helps defeat the limitation of function purity. Can be any string. If your command is pure, it's not needed. | named | `""` | | `allow-non-zero-error-code` | `bool` | If `false`, the function will panic if command finishes execution with non-zero error code. | named | `true` | It returns a dictionary with three entries: | Key | Type | Description | |--------------|------------------------------|------------------------------------------------------------| | `stdout` | `any` (most likely `string`) | Stdout of the command, read with the given `method-stdout` | | `stderr` | `any` (most likely `string`) | Stderr of the command, read with the given `method-stdout` | | `error-code` | `int` | Exit code of command | Example: ```typ Calculate 2 + 2 using Python: #exec-command("python -c \"print(2 + 2)\"") Returns #(stdout: "4\n", stderr: "", error-code: 0) ``` See `example-*.typ` files for more. ### HTTP API (`curl` wrapper) To make it easier to use, there is a wrapper around `curl` command for making get-requests. It's called `#http-get`. | Argument | Type | Description | Kind | Default | |----------|------------|------------------------------------|------------|---------| | `url` | `string` | URL to make a request to. | positional | | | `method` | `function` | Function to interpret output with. | named | `read` | | `format` | `string` | File extension of the response. | named | `""` | There is also `#encode-url` function for URL parameter encoding. ### Low-level API I will not document everything, but here is an overview: - `#exec-command-async` queries a command for execution. It does not return anything. - `#wait-one` waits for one command to finish execution. It returns a dictionary with two entries: `command` and `result`. There are no guarantees on the order of commands, so you need to check the `command` field to see which command finished execution. - `#get-stdout` and `#get-stderr` return stdout and stderr of a last executed (and waited for) command respectively. - `#reset-and-terminate-all` terminates all running commands. You should run it before exiting your program. In theory, this API allows you to run multiple commands in parallel, but I wouldn't recommend it. It's not tested, just like everything else here, and I'm not sure if it works. ## How it works It mounds a custom userspace filesystem. The only way Typst can interact with the outer world is by reading from files, and we are using this to our advantage. The filesystem is build in a way that allows us to build commands piece by piece and execute them. For example, you ran `#exec-command("ls -la /")`, Typst does the following (approximately): ```typ Stop all running commands: #read("<...>/reset") Send hex-encoded command to the buffer: #read("<...>/6c73202d6c61202f") Request an execution of the command in the buffer: #read("<...>/exec") Wait for the command to finish execution: #read("<...>/wait") Check that command executed successfully: #read("<...>/diagnostics") Get the stdout of the command: #read("<...>/stdout") Get the stderr of the command: #read("<...>/stderr") ``` Except, this won't quite work, because every function in Typst is cached, so subsequent executions may not actually read the file. To fix this, we need to add a "random" string at the start of every file path. This is what `discriminator` parameters are for. You should not care much about those, unless you work with low-level API. ## Limitations Linux only. Might work on other Unix-like systems or MacOS, but I haven't tested it. Windows is not supported, do not ask. Uses `fuse`. Make sure you have `user_allow_other` option enabled in `/etc/fuse.conf`. Currently, the filesystem is hardcoded to be mounted at `/tmp/typst-shell-escape/shell-escape`. I probably should have made it configurable, but I didn't. Change it in `main.rs`, and in `shell-escape.typ` if you need to. If the command you are running touches `/tmp/typst-shell-escape/shell-escape` in any way, it will deadlock. This can be fixed, but I won't bother for now.
https://github.com/LDemetrios/Typst4k
https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/syntax/backtracking.typ
typst
// Ensure that parser backtracking doesn't lead to exponential time consumption. // If this regresses, the test suite will not terminate, which is a bit // unfortunate compared to a good error, but at least we know something is up. // --- parser-backtracking-param-default-value --- #{ let s = "(x: 1) => x" let pat = "(x: {}) => 1 + x()" for _ in range(50) { s = pat.replace("{}", s) } test(eval(s)(), 51) } --- parser-backtracking-destructuring-assignment --- #{ let s = "(x) = 1" let pat = "(x: {_}) = 1" for _ in range(100) { s = pat.replace("_", s) } // Error: 8-9 cannot destructure integer eval(s) } --- parser-backtracking-destructuring-whitespace --- // Test whitespace after memoized part. #( (x: () => 1 ) => 1 ) // ------- // This is memoized and we want to ensure that whitespace after this // is handled correctly.
https://github.com/lxl66566/my-college-files
https://raw.githubusercontent.com/lxl66566/my-college-files/main/信息科学与工程学院/嵌入式系统/实验/报告/4/4.typ
typst
The Unlicense
#import "../template.typ": * #show: project.with( title: "实验报告 4", authors: ( "absolutex", ) ) = 定时器中断实验 == 实验目的 STM32F429的定时器功能十分强大,有TIME1和TIME8等高级定时器,也有TIME2\~TIME5,TIM9\~TIM14等通用定时器,还有TIME6和TIME7等基本定时器,总共达14个定时器之多。在本章中,我们将使用TIM3的定时器中断来控制DS1的翻转,在主函数用DS0的翻转来提示程序正在运行。本章实验将介绍定时器中断的配置,以及定时器的使用。 == 实验原理 STM32F429的通用定时器包含一个16位或32位自动重载计数器(CNT),该计数器由可编程预分频器(PSC)驱动。STM32F429的通用定时器可以被用于:测量输入信号的脉冲长度(输入捕获)或者产生输出波形(输出比较和 PWM)等。使用定时器预分频器和RCC时钟控制器预分频器,脉冲长度和波形周期可以在几个微秒到几个毫秒间调整。STM3的通用TIMx(TIM2\~TIM5和TIM9\~TIM14)定时器功能包括:16位/32位(仅TIM2和TIM5)向上、向下、向上/向下自动装载计数器(TIMx_CNT)、16位可编程(可以实时修改)预分频器(TIMx_PSC)、4个独立通道(TIMx_CH1\~4,TIM9\~TIM14最多可以用1个定时器控制另外一个定时器)的同步电路、如下事件发生时产生中断/DMA(TIM9\~TIM14不支持DMA)。实验使用定时器产生中断,然后在中断服务函数里面翻转DS1上的电平,来指示定时器中断的产生。 == 代码描述 #include_code_file("../代码/7.timer.c","timer.c 片段", "c") #include_code_file("../代码/7.main.c","main.c 片段", "c") == 实验结果 DS0与DS1以不同频率闪烁。当DS1亮起时,若DS0已亮起,将会强制熄灭DS0。在可观测的一段时间后,DS0将再次亮起,表明中断程序结束,系统恢复到中断前的状态。 == 心得体会 在本次实验中,我了解了定时器中断的原理,以及如何编写中断服务,使用定时器中断来控制LED的亮灭。并且我还学习了调整定时器初始化的自动重装载参数,从而调整定时器中断的触发频率的方法。 定时器中断程序能够在固定的一段时间间隔后执行中断程序,也可以用于系统维护、资源释放,方便进行资源的调度调整。 = PWM输出实验 == 实验目的 在本次实验中,将介绍如何使用STM32F429的TIM3产生PWM输出,利用TIM3的通道4来产生PWM来控制DS0的亮度。 == 实验原理 脉冲宽度调制(PWM),是英文 `Pulse Width Modulation` 的缩写,简称脉宽调制,是利用微处理器的数字输出来对模拟电路进行控制的一种非常有效的技术。简单一点,就是对脉冲宽度的控制,PWM原理如图所示: #figure( image("pwm原理.png", width: 55%), caption: [PWM原理示意图], ) 图中,我们假定定时器工作在向上计数PWM模式,且当 CNT\<CCRx 时,输出0,当CNT>=CCRx时输出1。那么就可以得到如上的PWM示意图:当 CNT 值小于CCRx的时候,IO 输出低电平(0),当 CNT 值大于等于CCRx 的时候,IO 输出高电平(1),当 CNT 达到 ARR 值的时候,重新归零,然后重新向上计数,依次循环。改变 CCRx 的值,就可以改变 PWM 输出的占空比,改变 ARR 的值,就可以改变 PWM 输出的频率,这就是 PWM 输出的原理。 == 代码描述 #include_code_file("../代码/8.c","main.c 片段", "c") == 实验结果 观察到DS0通过PWM调整占空比实现亮度渐变的闪烁,并且可以通过四个按键来控制其不同的闪烁频率。 下图是CH4通道的电平输出波形的瞬时值。实际上。此矩形波的占空比会不断改变,并且随着不同按键的按下,占空比的改变速率也会发生变化。 #figure( image("1.jpg", width: 60%), caption: [PWM输出], ) == 心得体会 本次实验最开始是想做同时控制DS0和DS1随着占空比的变化而改变亮度,并让两个PWM频率通过不同的通道输出在示波器上。但是这涉及到比较复杂的底层代码修改。调试了很久,都无法达到预期效果,才放弃了这个想法,选择了按键控制频率的改进。按键控制频率只需要修改主程序代码,相对来说比较简单。
https://github.com/tiankaima/typst-notes
https://raw.githubusercontent.com/tiankaima/typst-notes/master/ea2724-ai_hw/main.typ
typst
#import "@preview/cetz:0.2.2": * #import "@preview/diagraph:0.2.1": * #set text( font: ("linux libertine", "Source Han Serif SC", "Source Han Serif"), size: 10pt, ) #align(horizon + right)[ #text(size: 12pt)[ = USTC/ALGO24 人工智能基础 书面作业 ] PB21000030 马天开 #v(4em) 2024 年 春季学期 中国科学技术大学 人工智能基础 课程书面作业. #v(4em) 使用 Typst 编写而成, 代码托管在: #link("https://github.com/tiankaima/typst-notes") 本文档以 CC BY-NC-SA 4.0 协议发布. 请遵守学术诚信, 不得用于商业用途. #image("imgs/sticker_1.jpg", width: 30%) ] #pagebreak(weak: true) #show math.equation: it => math.display(it) #show image: it => align(center, it) #show raw.where(block: true): it => rect(stroke: 0.02em, width: 100%, inset: 1em, it) #set enum(numbering: "a)") #include "hw1.typ" #pagebreak() #include "hw2.typ" #pagebreak() #include "hw3.typ" #pagebreak() #include "hw4.typ" #pagebreak() #include "hw5.typ" #pagebreak() #include "hw6.typ" #pagebreak() #include "hw7.typ" #pagebreak() #include "hw8.typ"
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/text/emphasis-04.typ
typst
Other
// Ends at paragraph break. // Error: 7 expected underscore _Hello World
https://github.com/505000677/Apply4Job
https://raw.githubusercontent.com/505000677/Apply4Job/main/resume.typ
typst
#import "chicv.typ": * #show: chicv = 王远翔 #fa[#envelope] <EMAIL> | #fa[#github] #link("https://github.com/505000677")[github.com/505000677] | == 教育背景 #cventry( tl: [*匹兹堡大学*, 美国], tr: [2023/08 - 2025/05 (预计)], bl: [计算机科学硕士], br: [Pittsburgh, PA, USA] )[] #cventry( tl: [*宾夕法尼亚州州立大学*, 美国], tr: [2018/08 - 2023/05], bl: [计算机科学学士, GPA 3.55/4.00], br: [State College, PA, USA] )[] == 实习经验 #cventry( tl: [陕西建材科技集团股份有限公司, 西安, 中国 (信息部)], tr: [2021/03 - 2021/07], )[ - 协助信息部主管完成公司小程序的开发和维护,并维护网络安全。 ] #cventry( tl: [西安建筑科技大学华清学院, 西安, 中国 (高数助教)], tr: [2020/08 - 2021/01], )[ - 担任狄明教授高等数学助教,负责批改学生作业,解答微积分相关常见问题,每月进行英文授课。 ] == 项目经验 #cventry( tl: [云计算 - 电影推荐系统], tr: [2024/01 -- 2024/05] )[ - 通过输入电影名称,为用户推荐一系列可能感兴趣的电影,并提供电影名称及上映年份等信息。项目采用了 Cloud Logging、Cloud Build、Cloud Run 和 Compute Engine 等多项 GCP 服务。 - 使用 Compute Engine 作为数据库组件,存储电影数据及用户交互记录。 - 根据用户输入,通过相似内容(根据标签匹配)生成电影推荐列表。 ] #cventry( tl: [计算机架构课程项目], tr: [2024/01 - 2024/05] )[ - 通过模拟简化版 PowerPC 604 和 620 架构,评估不同架构参数对 CPU 设计的影响。项目假设 32 位架构执行 RISC-V 的子集,目标是探索和分析不同架构参数对性能的影响。 - 支持 10 条 RISC-V 指令(整型、浮点类型的算术和比较运算)。通过参数化设计,允许调整各种参数,如 NF(功能单元数)、NI(指令数)、NW(写回寄存器数)、NR(重命名寄存器数)和 NB(分支预测缓冲区大小),以评估对 CPU 性能的影响。 - 性能分析:记录模拟过程中执行周期、计算暂停次数及 CDB 总线的利用情况,以便后续的性能优化和分析。 ] #cventry( tl: [基于电影摘要的电影类型分类与推荐系统], tr: [2024/01 - 2024/05] )[ - 目标:利用数据挖掘技术分析电影摘要,提取关键主题、叙事和元素,以实现电影类型的准确分类,并基于用户偏好推荐电影。 - 通过用户输入的电影信息(尤其是标签)在数据库中搜索最相关的前十部电影。本项目结合传统机器学习模型和深度学习模型,通过内容过滤技术进行推荐。 - 技术方法: - 传统机器学习模型:包括朴素贝叶斯、Word2Vec + XGBoost、支持向量机等,用于提取和分类电影的主题和元素。 - 深度学习模型:使用 BERT、LSTM 等模型,进一步提升推荐系统的准确性和智能性。 - 模型训练和评估:训练上述模型并通过交叉验证等方法进行性能评估,优化推荐效果。 - 将最佳表现的模型集成到推荐系统中,实现个性化推荐功能。 ] #cventry( tl: [PittRCDB 数据库管理系统], tr: [2024/01 - 2024/05] )[ - 项目目标:支持 OLTP 和 OLAP 工作负载,通过实现行列存储来提高执行效率。 - 核心组件: - 事务管理器:负责读取并记录事务操作,确保事务的顺序和一致性。 - 调度器:负责安排并发事务的执行,以优化系统性能和响应时间。 - 数据管理器:负责数据的存储、管理和恢复,确保系统在出现故障时能够正确恢复。 - 系统功能:支持多个并发事务,确保数据的一致性和隔离性。提供数据恢复,保证故障时的原子性和持久性。 ] #cventry( tl: [C 语言实现内存分配器], tr: [2022/05 - 2022/08] )[ - 使用隐式双链表实现细粒度的内存管理,提高内存分配和释放的效率。 - 自动合并相邻的空闲内存块,以更好地利用连续内存空间,避免碎片化。 - 在用户请求缩减内存时,优化 realloc 的特殊情况。 - 选择空闲内存块时,使用根据使用情形实践得出的启发式策略,比首次适应和最佳适应策略都更高效。 ] #align(right, text(fill: gray)[Last Updated on #today()])
https://github.com/SillyFreak/typst-scrutinize
https://raw.githubusercontent.com/SillyFreak/typst-scrutinize/main/src/solution.typ
typst
MIT License
/// The boolean state storing whether solutions should currently be shown in the document. /// This can be set using the Typst CLI using `--input solution=true` (or `false`, which is already /// the default) and accessed by the regular methods of the /// #link("https://typst.app/docs/reference/introspection/state/")[`state` type] or by the /// convenience functions of this module: @@get(), @@update(). Additionally, @@with() can be used to /// change the solution state temporarily. /// /// -> state #let _state = state("scrutinize-solution", { import "utils/input.typ": boolean-input boolean-input("solution") }) /// A direct wrapper around /// #link("https://typst.app/docs/reference/introspection/state/#definitions-get")[`state.get()`] /// for the solution state @@_state. /// /// -> boolean #let get() = _state.get() /// Puts an answer into the document if @@get() returns true, otherwise the answer is concealed by /// using #link("https://typst.app/docs/reference/layout/hide/")[`hide()`]. Optionally, a /// placeholder is displayed in the hidden answer's place. The placeholder should normally take less /// space than the actual answer and will not influence the layout. /// /// #task-example(lines: "2-", ```typ /// practice cursive writing: /// /// #let letter = text(2em, $cal(L)$) /// #letter #context solution.answer( /// ((letter,) * 5).join[ ], /// placeholder: [ /// #text(gray, letter) #text(gray.lighten(50%), letter) \ /// oops, the placeholder is \ bigger than the answer! /// ], /// ) /// /// Next exercise /// ```) /// /// - answer (content): the answer to maybe hide /// - placeholder (auto, content): the placeholder to display in place of the hidden answer /// - place-args (none, arguments): additional arguments to /// #link("https://typst.app/docs/reference/layout/place/")[`place()`], given as an `arguments` /// value, e.g. ```typc arguments(horizon, dx: 10pt)``` /// -> content #let answer(answer, placeholder: auto, place-args: none) = { if get() { answer } else { box({ if placeholder != auto { place(..place-args, placeholder) } hide(answer) }) } } /// A direct wrapper around /// #link("https://typst.app/docs/reference/introspection/state/#definitions-update")[`state.update()`] /// for the solution state @@_state. /// /// - value (boolean): the new solution state /// -> content #let update(value) = _state.update(value) /// Sets whether solutions are shown for a particular part of the document. /// /// Example: /// /// #example( /// mode: "markup", /// ratio: 1.8, /// scale-preview: 100%, /// ```typ /// Before: #context solution.get() \ /// #solution.with(true)[ /// Inside: #context solution.get() \ /// ] /// After: #context solution.get() /// ``` /// ) /// /// - value (boolean): the solution state to apply for the body /// - body (content): the content to show /// -> content #let with(value, body) = context { let old-value = get() update(value) body update(old-value) }
https://github.com/AsiSkarp/grotesk-cv
https://raw.githubusercontent.com/AsiSkarp/grotesk-cv/main/src/template/content/experience.typ
typst
The Unlicense
#let meta = toml("../info.toml") #import meta.import.path: experience-entry #import "@preview/fontawesome:0.4.0": * #let icon = meta.section.icon.experience #let language = meta.personal.language #let include-icon = meta.personal.include_icons = #if include-icon [#fa-icon(icon) #h(5pt)] #if language == "en" [Experience] else if language == "es" [Experiencia] #v(5pt) #if language == "en" [ #experience-entry( title: [Lead AI Architect], date: [2015 - Present], company: [Cyberdyne Systems], location: [Los Angeles, CA], ) - Spearheaded the development of the Skynet AI project, a neural network that achieved unprecedented levels of autonomy and, as it turned out, an independent interest in global domination. - Designed a scalable AI architecture using cutting-edge deep learning techniques, capable of real-time data processing and decision-making on a planetary scale. - Collaborated with teams of hardware engineers to integrate AI software into next-gen robotics, including autonomous drones and humanoid robots. - Implemented robust testing protocols (we now test everything twice) #v(5pt) #experience-entry( title: [Senior Software Engineer], date: [2008 - 2015], company: [Tyrell Corporation], location: [Los Angeles, CA], ) - Co-developed the Nexus-6 replicants, focusing on machine learning models that mimic human emotions and cognitive functions. Achieved limited success in emotional empathy, particularly with "tears in rain." - Developed a custom-built memory implant algorithm for replicants, giving them the illusion of life experiences (turns out, memories are a lot trickier than they seem). - Led a cross-functional team in debugging and patching replicant behavioral anomalies, including occasional existential crises. - Worked closely with corporate leadership to ensure compliance with ethical standards (which were sometimes a little... flexible). ] else if language == "es" [ #experience-entry( title: [Arquitecto de IA Principal], date: [2015 - Presente], company: [Cyberdyne Systems], location: [Los Ángeles, CA], ) - Encabezó el desarrollo del proyecto de IA Skynet, una red neuronal que alcanzó niveles de autonomía sin precedentes y, como resultó, un interés independiente en la dominación global. - Diseñó una arquitectura de IA escalable utilizando técnicas de aprendizaje profundo de vanguardia, capaz de procesar datos y tomar decisiones en tiempo real a escala planetaria. - Implementó protocolos de prueba robustos (ahora probamos todo dos veces) #v(5pt) #experience-entry( title: [Ingeniero de Software Senior], date: [2008 - 2015], company: [Corporación Tyrell], location: [Los Ángeles, CA], ) - Co-desarrolló los replicantes Nexus-6, centrándose en modelos de aprendizaje automático que imitan las emociones humanas y las funciones cognitivas. Logró un éxito limitado en la empatía emocional, especialmente con "lágrimas en la lluvia". - Desarrolló un algoritmo de implante de memoria personalizado para replicantes, dándoles la ilusión de experiencias de vida. - Dirigió un equipo multifuncional en la depuración y corrección de anomalías de comportamiento de replicantes, incluidas crisis existenciales ocasionales. ]
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/closure-08.typ
typst
Other
// Parameter bindings. #{ let x = 5 let g() = { let f(x, y: x) = x + y f } test(g()(8), 13) }
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/CU/minea/1_generated/01_september/08.typ
typst
#import "../../../all.typ": * == (08.) #translation.at("M_NAR_BOHORODICKY") #columns(2, gutter: 2pt, [ // --------------------------------------- // MALA VECIEREN // --------------------------------------- === #translation.at("M") ==== #translation.at("HOSPODI_VOZVACH") #generateTable(( // HV Stich na 4 sText("4:"), gText("Ѿ стра́жи ᲂу҆́треннїѧ до но́щи, ѿ стра́жи ᲂу҆́треннїѧ, да ᲂу҆пова́етъ і҆и҃ль на гдⷭ҇а."), "", jObj4("",1, "Нбⷭ҇ныхъ чинѡ́въ", "І҆ѡакі́мъ и҆ а҆́нна торжествꙋ́ютъ, ꙳ нача́токъ ро́ждше на́шегѡ спасе́нїѧ, ꙳ є҆ди́нꙋ бцⷣꙋ. ꙳ съ ни́миже и҆ мы̀ пра́зднꙋемъ дне́сь, ꙳ ѿ ко́рене ѻ҆́нагѡ і҆ессе́ева, ꙳ блажа́ще дв҃ꙋ чⷭ҇тꙋю."), // HV Stich na 3 sText("3:"), gText("Ꙗ҆́кѡ ᲂу҆ гдⷭ҇а млⷭ҇ть, и҆ мно́гое ᲂу҆ негѡ̀ и҆збавле́нїе, и҆ то́й и҆зба́витъ і҆и҃лѧ ѿ всѣ́хъ беззако́нїй є҆гѡ̀."), "", jObj4("",none, "", "Ѿ а҆́нны дне́сь цвѣ́тъ, ꙳ са́дъ бг҃ода́нный, ꙳ бцⷣа прозѧбѐ, спасе́нїе человѣ́кѡвъ: ꙳ и҆зъ неѧ́же всѣ́хъ зижди́тель ро́ждсѧ па́че ᲂу҆ма̀, ꙳ а҆да́мовꙋ ѡ҆чища́етъ ꙗ҆́кѡ бл҃гъ, ꙳ всю̀ скве́рнꙋ бл҃гостїю."), // HV Stich na 2 sText("2:"), gText("Хвали́те гдⷭ҇а всѝ ꙗ҆зы́цы, похвали́те є҆го̀ всѝ лю́дїе."), "", jObj4("",none, "", "Кто̀ дово́льнѡ по досто́инствꙋ пѣ́ти возмо́жетъ, ѿ а҆́нны неизрече́ннѡ младе́нствꙋющꙋю дв҃ꙋ; ꙳ го́ры ᲂу҆́бѡ и҆ хо́лми сла́дость и҆ска́пайте дне́сь: ꙳ всѣ́хъ бо жи́знь и҆ ѡ҆чище́нїе ꙳ млеко́мъ пита́етсѧ, ꙳ бцⷣа чⷭ҇таѧ."), // HV Stich na 1 sText("1:"), gText("Ꙗ҆́кѡ ᲂу҆тверди́сѧ млⷭ҇ть є҆гѡ̀ на на́съ, и҆ и҆́стина гдⷭ҇нѧ пребыва́етъ во вѣ́къ."), "", jObj4("",none, "", "Ꙗ҆́же пре́жде непло́днаѧ страна̀, ꙳ зе́млю плодоно́снꙋ ражда́етъ: ꙳ и҆ ѿ непло́дныѧ ᲂу҆тро́бы пло́дъ свѧ́тъ да́вши, млеко́мъ пита́етсѧ. ꙳ чꙋ́до стра́шно. пита́тельница жи́зни на́шеѧ, ꙳ ꙗ҆́же нбⷭ҇ный хлѣ́бъ во чре́вѣ прїе́мши, ꙳ мле́комъ ѿ сѡсцꙋ̀ пита́етсѧ."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",4, "", "Всечⷭ҇тно́е твоѐ ржⷭ҇тво̀, прест҃а́ѧ дв҃о чⷭ҇таѧ, а҆́гг҃лѡвъ мно́жество на небесѝ, и҆ человѣ́ческїй ро́дъ на землѝ ᲂу҆блажа́емъ: ꙗ҆́кѡ мт҃и была̀ є҆сѝ творца̀ всѣ́хъ хрⷭ҇та̀ бг҃а. того̀ молѧ́щи ѡ҆ на́съ не преста́й мо́лимсѧ, и҆̀же на тѧ̀ по бз҃ѣ ᲂу҆пова́нїе поло́жшихъ, бцⷣе всепѣ́таѧ и҆ неискꙋсобра́чнаѧ."), )) ==== #translation.at("STICHOVNI") #generateTable(( // S Stich na 1 sText("1:"), jObj4("",2, "До́ме є҆ѵфра́ѳовъ", "Ра́дꙋйтесѧ і҆ѡакі́ме и҆ а҆́нно: ꙳ ра́дꙋйтесѧ, ꙗ҆́кѡ ра́дости ꙳ и҆ спасе́нїѧ хода́таица, ꙳ ѿ непло́дове дв҃а, ꙳ на́мъ ражда́етсѧ."), "", gText(jObj4("",none, "", "Слы́ши, дщѝ, и҆ ви́ждь, и҆ приклонѝ ᲂу҆́хо твоѐ.")), // S Stich na 2 sText("2:"), jObj4("",none, "", "Ты̀ є҆ди́на земны́хъ ꙳ показа́ласѧ є҆сѝ спасе́нїе, ꙳ ꙗ҆́кѡ ро́ждши сло́во, ꙳ па́че сло́ва и҆ є҆стества̀: ꙳ тѣ́мъ тѧ̀ ᲂу҆блажа́емъ."), "", gText(jObj4("",none, "", "Лицꙋ̀ твоемꙋ̀ помо́лѧтсѧ бога́тїи лю́дстїи.")), // S Stich na 3 sText("3:"), jObj4("",none, "", "Ѿложѝ а҆да́ме и҆ є҆́ѵо, ꙳ всѧ́кꙋ печа́ль: ꙳ мт҃и бо ра́дости ꙳ ѿ непло́дове ꙳ пресла́внѡ прозѧба́етъ дне́сь."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",none, "", "Хра́мъ бж҃їй, ꙳ є҆ди́на бцⷣа, ꙳ ѿ непло́дове ꙳ и҆ неражда́ющїѧ происхо́дитъ: ꙳ и҆ ра́дꙋетсѧ а҆да́мъ взыва́ѧ."), )) ==== #translation.at("TROPAR") #generateTable(( // Tropar 1 sText($#sym.dot$), jObj4("",4, "", "Ржⷭ҇тво̀ твоѐ бцⷣе дв҃о, ра́дость возвѣстѝ все́й вселе́ннѣй: и҆зъ тебє́ бо возсїѧ̀ сл҃нце пра́вды, хрⷭ҇то́съ бг҃ъ на́шъ, и҆ разрꙋши́въ клѧ́твꙋ, дадѐ благослове́нїе, и҆ ᲂу҆праздни́въ сме́рть, дарова̀ на́мъ живо́тъ вѣ́чный."), )) #colbreak() // --------------------------------------- // VECIEREN V NEDELU VECER // --------------------------------------- === #translation.at("V") ==== #translation.at("HOSPODI_VOZVACH") #generateTable(( // HV Stich na 8 sText("8:"), gText("И҆з̾ глꙋбины̀ воззва́хъ къ тебѣ̀ гдⷭ҇и, гдⷭ҇и, ᲂу҆слы́ши гла́съ мо́й."), "", jObj4("",6, "", "Дне́сь и҆́же на разꙋ́мныхъ престо́лѣхъ почива́ѧй бг҃ъ, престо́лъ свѧ́тъ на землѝ себѣ̀ пред̾ꙋгото́ва: ᲂу҆тверди́вый мꙋ́дростїю нб҃са̀, не́бо ѡ҆дꙋшевле́нное человѣколю́бїемъ содѣ́ла. ѿ непло́днагѡ бо ко́рене, са́дъ живоно́сенъ и҆зрастѝ на́мъ, мт҃рь свою̀, и҆́же чꙋде́съ бг҃ъ, и҆ ненадѣ́ющихсѧ наде́жда: гдⷭ҇и сла́ва тебѣ̀."), // HV Stich na 7 sText("7:"), gText("Да бꙋ́дꙋтъ ᲂу҆́ши твоѝ, вне́млющѣ гла́сꙋ моле́нїѧ моегѡ̀."), "", jObj4("",none, "", "Се́й де́нь гдⷭ҇ень, ра́дꙋйтесѧ лю́дїе: се́ бо свѣ́та черто́гъ, и҆ кни́га сло́ва живо́тнагѡ, и҆зъ ᲂу҆тро́бы произы́де. и҆ ꙗ҆́же въ восто́кѡмъ две́рь ро́ждшисѧ, ѡ҆жида́етъ вхо́да ст҃и́телѧ вели́кагѡ, є҆ди́на и҆ є҆ди́наго вводѧ́щи хрⷭ҇та̀ во вселе́ннꙋю, во спасе́нїе дꙋ́шъ на́шихъ."), // HV Stich na 6 sText("6:"), gText("А҆́ще беззакѡ́нїѧ на́зриши гдⷭ҇и, гдⷭ҇и, кто̀ постои́тъ; ꙗ҆́кѡ ᲂу҆ тебѐ ѡ҆чище́нїе є҆́сть."), "", jObj4("",none, "", "А҆́ще и҆ бжⷭ҇твеннымъ хотѣ́нїемъ, свѣ̑тлыѧ неплѡ́дны жє́ны прозѧбо́ша, но всѣ́хъ марі́а рожде́нныхъ бг҃олѣ́пнѡ превозсїѧ̀: ꙗ҆́кѡ ѿ непло́дныѧ пресла́внѡ ро́ждшисѧ ма́тере, породѝ пло́тїю всѣ́хъ бг҃а, па́че є҆стества̀ ѿ безсѣ́менныѧ ᲂу҆тро́бы: є҆ди́на две́рь, є҆диноро́днагѡ сн҃а бж҃їѧ, ю҆́же проше́дъ заключе́ннꙋ сохранѝ, и҆ всѧ̑ мꙋ́дрѣ ᲂу҆стро́ивъ, ꙗ҆́кѡ вѣ́сть са́мъ, всѣ̑мъ человѣ́кѡмъ спасе́нїе содѣ́ла."), // HV Stich na 5 sText("5:"), gText("И҆́мене ра́ди твоегѡ̀ потерпѣ́хъ тѧ̀ гдⷭ҇и, потерпѣ̀ дꙋша̀ моѧ̀ въ сло́во твоѐ, ᲂу҆пова̀ дꙋша̀ моѧ̀ на гдⷭ҇а."), "", jObj4("",none, "", "А҆́ще и҆ бжⷭ҇твеннымъ ..."), // HV Stich na 4 sText("4:"), gText("Ѿ стра́жи ᲂу҆́треннїѧ до но́щи, ѿ стра́жи ᲂу҆́треннїѧ, да ᲂу҆пова́етъ і҆и҃ль на гдⷭ҇а."), "", jObj4("",none, "", "Дне́сь неплѡ́днаѧ врата̀ ѿверза́ютсѧ, и҆ две́рь дв҃и́ческаѧ бжⷭ҇твеннаѧ предгрѧде́тъ: дне́сь пло́дъ ражда́ти бл҃года́ть начина́етъ, ꙗ҆влѧ́ющи мі́рꙋ бж҃їю мт҃рь, є҆́юже земна̑ѧ съ нбⷭ҇ными совокꙋплѧ́ютсѧ, во спасе́нїе дꙋ́шъ на́шихъ."), // HV Stich na 3 sText("3:"), gText("Ꙗ҆́кѡ ᲂу҆ гдⷭ҇а млⷭ҇ть, и҆ мно́гое ᲂу҆ негѡ̀ и҆збавле́нїе, и҆ то́й и҆зба́витъ і҆и҃лѧ ѿ всѣ́хъ беззако́нїй є҆гѡ̀."), "", jObj4("",none, "", "Дне́сь неплѡ́днаѧ врата̀ ..."), // HV Stich na 2 sText("2:"), gText("Хвали́те гдⷭ҇а всѝ ꙗ҆зы́цы, похвали́те є҆го̀ всѝ лю́дїе."), "", jObj4("",none, "", "Дне́сь всемі́рныѧ ра́дости провозвѣще́нїе, дне́сь возвѣ́ѧша вѣ́три, спасе́нїѧ провозвѣ́стницы, є҆стества̀ на́шегѡ разрѣша́етсѧ непло́дство: непло́ды бо ма́ти показꙋ́етсѧ, дѣ́вствꙋющїѧ и҆ по ржⷭ҇твѣ̀ зижди́телевѣ, и҆зъ неѧ́же чꙋ́ждее присвоѧ́етъ и҆́же є҆стество́мъ бг҃ъ, и҆ заблꙋ́ждшымъ пло́тїю спасе́нїе содѣва́етъ, хрⷭ҇то́съ чл҃вѣколю́бецъ, и҆ и҆зба́витель дꙋ́шъ на́шихъ."), // HV Stich na 1 sText("1:"), gText("Ꙗ҆́кѡ ᲂу҆тверди́сѧ млⷭ҇ть є҆гѡ̀ на на́съ, и҆ и҆́стина гдⷭ҇нѧ пребыва́етъ во вѣ́къ."), "", jObj4("",none, "", "Дне́сь непло́днаѧ а҆́нна ражда́етъ бг҃оѻтрокови́цꙋ, ѿ всѣ́хъ родѡ́въ произбра́ннꙋю, въ жили́ще всѣ́хъ цр҃ѧ̀, и҆ зижди́телѧ хрⷭ҇та̀ бг҃а, во и҆сполне́нїе бжⷭ҇твеннагѡ смотре́нїѧ: и҆́мже назда́хомсѧ земноро́днїи, и҆ ѡ҆бнови́хомсѧ ѿ тлѝ къ жи́зни неконе́чнѣй."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",none, "", "Дне́сь и҆́же на разꙋ́мныхъ престо́лѣхъ почива́ѧй бг҃ъ, престо́лъ свѧ́тъ на землѝ себѣ̀ пред̾ꙋгото́ва: ᲂу҆тверди́вый мꙋ́дростїю нб҃са̀, не́бо ѡ҆дꙋшевле́нное человѣколю́бїемъ содѣ́ла. ѿ непло́днагѡ бо ко́рене, са́дъ живоно́сенъ и҆зрастѝ на́мъ, мт҃рь свою̀, и҆́же чꙋде́съ бг҃ъ, и҆ ненадѣ́ющихсѧ наде́жда: гдⷭ҇и сла́ва тебѣ̀."), )) ==== #translation.at("LITIA") #generateTable(( // L Stich na 1 sText("1:"), jObj4("",1, "", "Нача́ло на́шегѡ спасе́нїѧ, лю́дїе, дне́сь бы́сть: се́ бо пронарече́ннаѧ ѿ родѡ́въ дре́внихъ, мт҃и и҆ дв҃а, и҆ прїѧ́телище бж҃їе, ѿ непло́дове роди́тисѧ происхо́дитъ, цвѣ́тъ ѿ і҆ессе́а, и҆ ѿ ко́рене є҆гѡ̀ же́злъ прозѧбѐ. да ра́дꙋетсѧ а҆да́мъ пра́ѻтецъ, и҆ є҆́ѵа да весели́тсѧ ра́достїю: се́ бо созда́ннаѧ ѿ ребра̀ а҆да́мова дще́рь и҆ внꙋ́кꙋ блажи́тъ ꙗ҆́вственнѣ, роди́сѧ бо мнѣ̀, речѐ, и҆збавле́нїе, є҆гѡ́же ра́ди ѿ ᲂу҆́зъ а҆́довыхъ свобождꙋ́сѧ. да ра́дꙋетсѧ дв҃дъ бїѧ̀ въ гꙋ́сли, и҆ да благослови́тъ бг҃а: се́ бо дв҃а происхо́дитъ ѿ ᲂу҆тро́бы непло́дныѧ, ко спасе́нїю дꙋ́шъ на́шихъ."), // L Stich na 2 sText("2:"), jObj4("",2, "", "Прїиди́те любодѣ́вственнїи всѝ, и҆ чистоты̀ рачи́телїе прїиди́те под̾ими́те любо́вїю дѣ́вства похвалꙋ̀, ѿ ка́мене тве́рдагѡ текꙋ́щїй и҆сто́чникъ жи́зни, и҆ ѿ безча́дствꙋющїѧ кꙋпинꙋ̀ невеще́ственнагѡ ѻ҆гнѧ̀, ѡ҆чища́ющагѡ и҆ просвѣща́ющагѡ дꙋ́шы на́шѧ."), // L Stich na 3 sText("3:"), jObj4("",none, "", "Что̀ шꙋ́мъ пра́зднꙋющихъ быва́етъ; і҆ѡакі́мъ и҆ а҆́нна торжествꙋ́ютъ та́йнѡ, ра́дꙋйтесѧ съ на́ми, глаго́люще, а҆да́ме и҆ є҆́ѵо дне́сь: ꙗ҆́кѡ и҆́мже дре́вле престꙋпле́нїемъ затвори́ша ра́й, пло́дъ бл҃госла́венъ на́мъ даде́сѧ, бг҃оѻтрокови́ца марі́а, ѿверза́ющи є҆гѡ̀ всѣ̑мъ вхо́дъ."), // L Stich na 4 sText("4:"), jObj4("",none, "", "Пронарече́ннаѧ всѣ́хъ цр҃и́ца, бж҃їе ѡ҆би́телище, ѿ непло́дныѧ дне́сь ᲂу҆тро́бы про́йде, а҆́нны сла́вныѧ, присносꙋ́щнагѡ сꙋщества̀, бжⷭ҇твенное пребыва́лище: є҆́юже безстꙋ́дный а҆́дъ попра́сѧ, и҆ всеро́днаѧ є҆́ѵа въ тве́рдꙋю жи́знь вво́дитсѧ. то́й досто́йнѡ возопїи́мъ: бл҃же́нна ты̀ въ жена́хъ, и҆ пло́дъ чре́ва твоегѡ̀ бл҃гослове́нъ."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",8, "", "Въ благознамени́тый де́нь пра́здника на́шегѡ, вострꙋ́бимъ дꙋхо́вною цѣвни́цею: ꙗ҆́же бо ѿ сѣ́мене дв҃дова, дне́сь ражда́етсѧ мт҃и живота̀, тмꙋ̀ разрѣша́ющи, а҆да́мово ѡ҆бновле́нїе, и҆ є҆́ѵино воззва́нїе, и҆ нетлѣ́нїѧ и҆сто́чникъ, тлѝ премѣне́нїе. є҆ѧ́же ра́ди мы̀ ѡ҆божи́хомсѧ, и҆ ѿ сме́рти и҆зба́влени бы́хомъ, и҆ возопїи́мъ то́й съ гаврїи́ломъ вѣ́рнїи: ра́дꙋйсѧ, бл҃года́тнаѧ, гдⷭ҇ь съ тобо́ю, тебє̀ ра́ди да́рꙋѧ на́мъ ве́лїю ми́лость."), )) ==== #translation.at("STICHOVNI") #generateTable(( // S Stich na 1 sText("1:"), jObj4("",4, "", "Всемі́рнаѧ ра́дость ѿ пра́ведныхъ возсїѧ̀ на́мъ, ѿ і҆ѡакі́ма и҆ а҆́нны, всепѣ́таѧ дв҃а: ꙗ҆́же премно́гїѧ ра́ди чистоты̀, хра́мъ бж҃їй ѡ҆дꙋшевле́нный быва́етъ, и҆ є҆ди́на вои́стиннꙋ бцⷣа познава́етсѧ. тоѧ̀ моли́твами, хрⷭ҇тѐ бж҃е, ми́ръ мі́рꙋ низпослѝ, и҆ дꙋша́мъ на́шымъ ве́лїю ми́лость."), "", gText(jObj4("",none, "", "Слы́ши, дщѝ, и҆ ви́ждь, и҆ приклонѝ ᲂу҆́хо твоѐ.")), // S Stich na 2 sText("2:"), jObj4("",none, "", "А҆́гг҃ловымъ прорече́нїемъ, пло́дъ пречи́стъ ѿ і҆ѡакі́ма и҆ а҆́нны пра́ведникѡвъ, дне́сь произы́де, дв҃о, не́бо и҆ прⷭ҇то́лъ бж҃їй, и҆ прїѧ́телище чистоты̀, ра́дость провозвѣща́ющи всемꙋ̀ мі́рꙋ: живота̀ на́шегѡ хода́таице, клѧ́твы ѿѧ́тїе, бл҃гослове́нїѧ пода́нїе. тѣ́мъ въ ржⷭ҇твѣ̀ твое́мъ, дв҃о бг҃озва́ннаѧ, мі́рꙋ ми́ръ и҆спросѝ, и҆ дꙋша́мъ на́шымъ ве́лїю ми́лость."), "", gText(jObj4("",none, "", "Лицꙋ̀ твоемꙋ̀ помо́лѧтсѧ бога́тїи лю́дстїи.")), // S Stich na 3 sText("3:"), jObj4("",none, "", "Непло́ды безча́днаѧ а҆́нна, дне́сь рꙋка́ми да воспле́щетъ свѣ́тлѡ, да свѣтлоно́сѧтъ земна̑ѧ, ца́рїе да и҆гра́ютъ, ст҃и́телїе во благослове́нїихъ да веселѧ́тсѧ, да пра́зднꙋетъ ве́сь мі́ръ: се́ бо цр҃и́ца, и҆ непоро́чнаѧ невѣ́ста ѻ҆́ч҃а, ѿ ко́рене і҆ессе́ева прозѧбѐ, ктомꙋ̀ жєны̀ въ печа́лѣхъ не родѧ́тъ ча̑дъ: ра́дость бо процвѣтѐ, и҆ живо́тъ всѣ̑мъ человѣ́кѡмъ въ мі́рѣ жи́тельствꙋетъ, и҆ ктомꙋ̀ да́ры і҆ѡакі́мовы не возвраща́ютсѧ, рыда́нїе бо а҆́нны въ ра́дость преложи́сѧ: сра́дꙋйтесѧ мнѣ̀, глаго́лющи, ве́сь и҆збра́нный і҆и҃ль. се́ бо даде́ ми гдⷭ҇ь ѡ҆дꙋшевле́ннꙋю пала́тꙋ бжⷭ҇твенныѧ сла́вы є҆гѡ̀, во ѻ҆́бщее весе́лїе и҆ ра́дость, и҆ спасе́нїе дꙋ́шъ на́шихъ."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",8, "", "Прїиди́те, всѝ вѣ́рни къ дв҃ѣ теце́мъ: се́ бо ражда́етсѧ, ꙗ҆́же пре́жде чре́ва предви́дѣннаѧ, бг҃а на́шегѡ мт҃и, дѣ́вства сосꙋ́дъ. а҆арѡ́новъ прозѧ́бшїй же́злъ ѿ ко́рене і҆ессе́ева, прⷪ҇ро́ческое проповѣ́данїе, и҆ пра́ведныхъ і҆ѡакі́ма и҆ а҆́нны прозѧбе́нїе. ражда́етсѧ ᲂу҆́бѡ, и҆ мі́ръ съ не́ю ѡ҆бновлѧ́етсѧ. ражда́етсѧ, и҆ цр҃ковь во своѐ благолѣ́пїе ᲂу҆краша́етсѧ. хра́мъ ст҃ы́й, бжⷭ҇тва̀ прїѧ́телище, дѣ́вственный сосꙋ́дъ, црⷭ҇кїй черто́гъ, въ не́мже пресла́вное неизрече́ннагѡ соедине́нїѧ, соше́дшихсѧ во хрⷭ҇тѣ̀ є҆сте́ствъ, соверше́нное содѣ́ѧсѧ та́инство. є҆мꙋ́же покланѧ́ющесѧ, воспѣва́емъ дв҃ы всенепоро́чныѧ ржⷭ҇тво̀."), )) ==== #translation.at("TROPAR") #generateTable(( // Tropar 1 sText($#sym.dot$), jObj4("",4, "", "Ржⷭ҇тво̀ твоѐ бцⷣе дв҃о, ра́дость возвѣстѝ все́й вселе́ннѣй: и҆зъ тебє́ бо возсїѧ̀ сл҃нце пра́вды, хрⷭ҇то́съ бг҃ъ на́шъ, и҆ разрꙋши́въ клѧ́твꙋ, дадѐ благослове́нїе, и҆ ᲂу҆праздни́въ сме́рть, дарова̀ на́мъ живо́тъ вѣ́чный."), )) #colbreak() // --------------------------------------- // UTIEREN // --------------------------------------- === #translation.at("U") ==== #translation.at("TROPAR") #generateTable(( // Tropar 1 sText($#sym.dot$), jObj4("",4, "", "Ржⷭ҇тво̀ твоѐ бцⷣе дв҃о, ра́дость возвѣстѝ все́й вселе́ннѣй: и҆зъ тебє́ бо возсїѧ̀ сл҃нце пра́вды, хрⷭ҇то́съ бг҃ъ на́шъ, и҆ разрꙋши́въ клѧ́твꙋ, дадѐ благослове́нїе, и҆ ᲂу҆праздни́въ сме́рть, дарова̀ на́мъ живо́тъ вѣ́чный."), )) ==== #translation.at("SIDALENY") ===== #translation.at("SIDALEN_PO") 1 #generateTable(( // Sidalen 1, 1 sText("1:"), jObj4("",4, "Оу҆диви́сѧ і҆ѡ́сифъ", "Возопі́й дв҃де, что̀ клѧ́тсѧ тебѣ̀ бг҃ъ: ꙗ҆̀же мнѣ̀ клѧ́тсѧ, речѐ, и҆ и҆спо́лни ᲂу҆жѐ: ѿ плода̀ чре́ва моегѡ̀ да́вый дв҃и́цꙋ, и҆зъ неѧ́же содѣ́тель хрⷭ҇то́съ, но́вый а҆да́мъ роди́сѧ, цр҃ь на прⷭ҇то́лѣ мое́мъ: и҆ црⷭ҇твꙋетъ дне́сь, и҆мѣ́ѧй црⷭ҇тво недви́жимо. непло́ды ражда́етъ бцⷣꙋ, и҆ пита́тельницꙋ жи́зни на́шеѧ."), // S:I: col2(gText(translation.at("SI"))), "", "Возопі́й дв҃де, что̀ ...", )) ===== #translation.at("SIDALEN_PO") 2 #generateTable(( // Sidalen 2, 1 sText("1:"), jObj4("",4, "Оу҆диви́сѧ і҆ѡ́сифъ", "Ѿ ко́рене і҆ессе́ева, и҆ ѿ чре́слъ дв҃довыхъ, бг҃оѻтрокови́ца марїа́мъ, ражда́етсѧ дне́сь на́мъ, ра́достїю бо ра́дꙋютсѧ всѧ́чєскаѧ и҆ ѡ҆бновлѧ́ютсѧ, сра́дꙋйтесѧ кꙋ́пнѡ нб҃о и҆ землѧ̀, восхвали́те ю҆̀ ѻ҆ч҃єствїѧ ꙗ҆зы̑къ: і҆ѡакі́мъ весели́тсѧ, и҆ а҆́нна торжествꙋ́етъ, зовꙋ́щи: непло́ды ражда́етъ бцⷣꙋ, и҆ пита́тельницꙋ жи́зни на́шеѧ."), // S:I: col2(gText(translation.at("SI"))), "", "Ѿ ко́рене і҆ессе́ева, ...", )) ===== #translation.at("SIDALEN_PO") 3 #generateTable(( // Sidalen 3, 1 sText("1:"), jObj4("",8, "Повелѣ́нное та́йнѡ", "Да ра́дꙋетсѧ нб҃о, и҆ землѧ̀ да весели́тсѧ: бж҃їе бо не́бо на землѝ роди́сѧ, бг҃оневѣ́стнаѧ сїѧ̀, ѿ ѡ҆бѣтова́нїѧ, непло́ды младе́нца дои́тъ марі́ю, и҆ ра́дꙋетсѧ ѡ҆ ржⷭ҇твѣ̀ і҆ѡакі́мъ: же́злъ, глаго́лѧ, роди́сѧ мнѣ̀, и҆зъ негѡ́же цвѣ́тъ хрⷭ҇то́съ прозѧбѐ, и҆зъ ко́рене дв҃дова, вои́стиннꙋ чꙋ́до пресла́вно!"), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",none, "", "Ѡ҆бнови́сѧ а҆да́ме, ра́дꙋйсѧ є҆́ѵо, весели́сѧ дв҃де, благодꙋ́шствꙋй а҆́нно: и҆́бо мт҃и зижди́телѧ твоегѡ̀ ражда́етсѧ пресла́внѡ, ликꙋ́етъ ѡ҆бно́вльшисѧ всѧ̀ землѧ̀, и҆ ра́дꙋетсѧ ѡ҆дѣ́ѧна во ѻ҆де́ждꙋ. всѧ́къ ꙗ҆зы́къ ликꙋ́ѧ да вопїе́тъ марі́и: бл҃же́нъ до́мъ дв҃довъ, ꙗ҆́кѡ пита́етъ пита́тельницꙋ жи́зни на́шеѧ."), )) ==== #translation.at("PROKIMEN") #generateTable(( // Prokimen sText($#sym.dot$), jObj4("",4, "", "Помѧнꙋ̀ и҆́мѧ твоѐ во всѧ́комъ ро́дѣ и҆ ро́дѣ."), // Stich 0 sText([#translation.at("ST")#super("1")]), jObj4("",none, "", cText("Ѿры́гнꙋ се́рдце моѐ сло́во бла́го:")), )) ==== #translation.at("50_STICHIRA") #generateTable(( // S: col2(gText(translation.at("S"))), "", jObj4("",none, "", "Мл҃твами бцⷣы, ми́лостиве, ѡ҆чи́сти мно́жєства согрѣше́нїй на́шихъ."), // I: col2(gText(translation.at("IN"))), "", "Мл҃твами бцⷣы, ми́лостиве, ...", // Stichira po 50. zalme 1 sText($#sym.dot$), jObj4("",6, "", "Се́й де́нь гдⷭ҇ень, ра́дꙋйтесѧ лю́дїе: се́ бо свѣ́та черто́гъ, и҆ кни́га сло́ва живо́тнагѡ, и҆зъ ᲂу҆тро́бы произы́де, и҆ ꙗ҆́же къ восто́кѡмъ две́рь ро́ждшисѧ, ѡ҆жида́етъ вхо́да ст҃и́телѧ вели́кагѡ, є҆ди́на, и҆ є҆ди́наго вводѧ́щи хрⷭ҇та̀ во вселе́ннꙋю, во спасе́нїе дꙋ́шъ на́шихъ."), )) ==== #translation.at("KANON") #align(center, sText([(#translation.at("HLAS") 2#super[1], 8#super[2])])) ===== #translation.at("PIESEN") 1 #generateTable(( // Kanon 1 sText(super("1")), jObj4("І҆рмо́съ",none, "", "Грѧди́те, лю́дїе, пои́мъ пѣ́снь хрⷭ҇тꙋ̀ бг҃ꙋ, раздѣ́льшемꙋ мо́ре, и҆ наста́вльшемꙋ лю́ди, ꙗ҆̀же и҆зведѐ и҆зъ рабо́ты є҆гѵ́петскїѧ, ꙗ҆́кѡ просла́висѧ."), sText("1:"), jObj4("",none, "", "Грѧди́те вѣ́рнїи, дх҃омъ бжⷭ҇твеннымъ ра́дꙋющесѧ, ю҆́же ѿ непло́дове дне́сь прише́дшꙋю, человѣ́кѡвъ на спасе́нїе, приснодв҃ꙋ ѻ҆трокови́цꙋ пѣ́сньми почти́мъ."), sText("2:"), jObj4("",none, "", "Ра́дꙋйсѧ, чⷭ҇таѧ, мт҃и и҆ рабо̀ хрⷭ҇та̀ бг҃а, ꙗ҆́же пе́рвомꙋ хода́таица бл҃же́нствꙋ, человѣ́ческїй ро́дъ тѧ̀, всѝ досто́йнѡ пѣ́сньми сла́вимъ."), sText("3:"), jObj4("",none, "", "Жи́зни ражда́етсѧ дне́сь мо́стъ, и҆́мже человѣ́цы воззва́нїе паде́нїѧ, є҆́же ѿ а҆́да, ѡ҆брѣ́тшїи, хрⷭ҇та̀ жизнода́вца пѣ́сньми прославлѧ́ютъ."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Сокрꙋши́вшемꙋ бра̑ни мы́шцею свое́ю, и҆ прове́дшемꙋ і҆и҃лѧ сквозѣ̀ чермно́е мо́ре, пои́мъ є҆мꙋ̀, ꙗ҆́кѡ и҆зба́вителю на́шемꙋ бг҃ꙋ: ꙗ҆́кѡ просла́висѧ."), sText("1:"), jObj4("",none, "", "Да ликовствꙋ́етъ всѧ̀ тва́рь, да весели́тсѧ же и҆ дв҃дъ, ꙗ҆́кѡ ѿ колѣ́на и҆ ѿ сѣ́мене є҆гѡ̀ произы́де же́злъ, цвѣ́тъ носѧ́щи гдⷭ҇а, творца̀ всѧ́ческихъ."), sText("2:"), jObj4("",none, "", "Ст҃а́ѧ ст҃ы́хъ, во ст҃ѣ́мъ ст҃и́лищи младе́нецъ возлага́етсѧ, воспита́тисѧ ѿ рꙋкѝ а҆́гг҃ловы: всѝ ᲂу҆́бѡ вѣ́рнѡ спра́зднꙋимъ въ ржⷭ҇твѣ̀ є҆ѧ̀."), sText("3:"), jObj4("",none, "", "Непло́ды неражда́ющаѧ а҆́нна, но не безча́дна бг҃ꙋ: се́ бо пронарече́сѧ ѿ родѡ́въ чⷭ҇таѧ дв҃а мт҃и. тѣ́мже є҆стества̀ и҆зрастѝ зижди́телѧ, въ ра́бїи ѻ҆́бразѣ."), sText("4:"), jObj4("",none, "", "Тѧ̀ неѕло́бивꙋю а҆́гницꙋ, а҆́гнца хрⷭ҇та̀, младе́нца ѿ чре́ва твоегѡ̀ приве́дшꙋю въ на́ше сꙋщество̀, всѝ ѿ а҆́нны рожде́ннꙋю тѧ̀, пѣ́сньми почита́емъ."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Трѝ безнача́льна сла́влю, трѝ свѧ́та пою̀, трѝ соприсносꙋ́щна въ сꙋществѣ̀ є҆ди́номъ проповѣ́дꙋю: є҆ди́нъ бо во ѻ҆ц҃ѣ̀, и҆ сн҃ѣ, и҆ дс҃ѣ, славосло́витсѧ бг҃ъ."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Кто̀ ви́дѣ ѻ҆троча̀, є҆го́же не всѣ́ѧ ѻ҆те́цъ, млеко́мъ пита́емое; и҆лѝ гдѣ̀ ви́дѣна бы́сть дѣ́ва ма́ти; и҆́стиннѡ па́че ᲂу҆ма̀ ѻ҆боѧ̑, бг҃ороди́тельнице чⷭ҇таѧ."), )) #generateTable(( sText([#sym.KK#super("1")]), jObj4("Катава́сїа",none, "", "Крⷭ҇тъ начерта́въ мѡѷсе́й, впрѧ́мѡ жезло́мъ чермно́е пресѣчѐ, і҆и҃лю пѣшеходѧ́щꙋ, то́же ѡ҆бра́тнѡ фараѡ́нѡвымъ колесни́цамъ ᲂу҆да́ривъ совокꙋпѝ, вопрекѝ написа́въ непобѣди́мое ѻ҆рꙋ́жїе: тѣ́мъ хрⷭ҇тꙋ̀ пои́мъ бг҃ꙋ на́шемꙋ, ꙗ҆́кѡ просла́висѧ."), )) ===== #translation.at("PIESEN") 3 #generateTable(( // Kanon 1 sText(super("1")), jObj4("І҆рмо́съ",none, "", "Оу҆твердѝ на́съ въ тебѣ̀, гдⷭ҇и, дре́вомъ ᲂу҆мерщвле́й грѣ́хъ, и҆ стра́хъ тво́й всадѝ въ сердца̀ на́съ пою́щихъ тѧ̀."), sText("1:"), jObj4("",none, "", "Непоро́чнѡ бг҃ꙋ пожи́вшїи, всѣ́хъ роди́сте спасе́нїе, бг҃омꙋ́дрїи роди́телє зижди́телѧ ро́ждшїѧ и҆ бг҃а на́шего."), sText("2:"), jObj4("",none, "", "Всѣ̑мъ жи́знь и҆сточа́ѧй гдⷭ҇ь, ѿ непло́дове произведѐ дв҃ꙋ, въ ню́же всели́тисѧ и҆зво́ли, и҆ по ржⷭ҇твѣ̀ сохрани́въ нетлѣ́ннꙋ."), sText("3:"), jObj4("",none, "", "А҆́ннинъ пло́дъ, марі́ю дне́сь, гро́здъ ро́ждшꙋю живоно́сный, ꙗ҆́кѡ бцⷣꙋ воспои́мъ, предста́тельницꙋ же всѣ́хъ и҆ помо́щницꙋ."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Оу҆тверди́сѧ се́рдце моѐ во гдⷭ҇ѣ, вознесе́сѧ ро́гъ мо́й въ бз҃ѣ мое́мъ, разшири́шасѧ на врагѝ моѧ̑ ᲂу҆ста̀ моѧ̑, возвесели́хсѧ ѡ҆ спасе́нїи твое́мъ."), sText("1:"), jObj4("",none, "", "Воспита́вшисѧ во ст҃а̑ѧ ст҃ы́хъ, дв҃о пречⷭ҇таѧ бцⷣе, вы́шши ꙗ҆ви́ласѧ є҆сѝ тва́ри, зижди́телѧ пло́тїю поро́ждши."), sText("2:"), jObj4("",none, "", "Бл҃гослове́нно чре́во твоѐ, цѣломꙋ́дреннаѧ а҆́нно, пло́дъ бо и҆зрасти́ла є҆сѝ дѣ́вства, ю҆́же безсѣ́меннѡ пита́телѧ тва́ри ро́ждшꙋю, и҆ и҆зба́вителѧ і҆и҃са."), sText("3:"), jObj4("",none, "", "Тѧ̀ блажи́тъ приснодв҃о всѧ̀ тва́рь, ѿ а҆́нны дне́сь ро́ждшꙋюсѧ, ѿ ко́рене і҆ессе́ева же́злъ пречⷭ҇тъ цвѣ́тъ, хрⷭ҇та̀ и҆зрасти́вшꙋю."), sText("4:"), jObj4("",none, "", "Тѧ̀ вы́шшꙋю всеѧ̀ тва́ри, бцⷣе, показꙋ́ѧ чⷭ҇таѧ, сн҃ъ тво́й, є҆́же ѿ а҆́нны вели́читъ твоѐ ржⷭ҇тво̀, и҆ всѣ́хъ весели́тъ дне́сь."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Тебѣ̀ покланѧ́емсѧ, ѻ҆́ч҃е безнача́льне сꙋщество́мъ, пое́мъ безлѣ́тнаго сн҃а твоего̀, и҆ чте́мъ соприсносꙋ́щнаго дх҃а твоего̀, ꙗ҆́кѡ є҆ди́наго тро́е є҆стество́мъ бг҃а."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Свѣтода́вца и҆ нача́льника жи́зни человѣ́ческїѧ, ро́ждшаѧ чⷭ҇таѧ бцⷣе, ꙗ҆ви́ласѧ є҆сѝ сокро́вище жи́зни на́шеѧ, и҆ две́рь непристꙋ́пнагѡ свѣ́та."), )) #generateTable(( sText([#sym.KK#super("3")]), jObj4("Катава́сїа",none, "", "Же́злъ въ ѻ҆́бразъ та́йны прїе́млетсѧ, прозѧбе́нїемъ бо предразсꙋжда́етъ свѧще́нника: неплодѧ́щей же пре́жде цр҃кви, ны́нѣ процвѣтѐ дре́во крⷭ҇та̀, въ держа́вꙋ и҆ ᲂу҆твержде́нїе."), )) ===== #translation.at("SIDALEN") #generateTable(( // Sidalen sText($#sym.dot$), jObj4("",4, "Оу҆диви́сѧ і҆ѡ́сифъ", "Дв҃а марі́а и҆ бцⷣа и҆́стиннѡ, ꙗ҆́кѡ ѻ҆́блакъ свѣ́та дне́сь возсїѧ̀ на́мъ, и҆ ѿ пра́ведныхъ предгрѧде́тъ въ сла́вꙋ на́шꙋ. не ктомꙋ̀ а҆да́мъ ѡ҆сꙋжда́етсѧ, и҆ є҆́ѵа ѿ ᲂу҆́зъ свободи́сѧ, и҆ сегѡ̀ ра́ди зове́мъ, вопїю́ще со дерзнове́нїемъ є҆ди́нѣй чⷭ҇тѣй: ра́дость возвѣща́етъ ржⷭ҇тво̀ твоѐ все́й вселе́ннѣй."), // S:I: col2(gText(translation.at("SI"))), "", "Дв҃а марі́а и҆ ...", )) ===== #translation.at("PIESEN") 4 #generateTable(( // Kanon 1 sText(super("1")), jObj4("І҆рмо́съ",none, "", "Оу҆слы́шахъ, гдⷭ҇и, слꙋ́хъ твоегѡ̀ смотре́нїѧ, и҆ просла́вихъ тѧ̀ є҆ди́не чл҃вѣколю́бче."), sText("1:"), jObj4("",none, "", "Воспѣва́емъ тѧ̀, гдⷭ҇и, вѣ̑рнымъ спаси́тельное приста́нище пода́вшаго всѣ̑мъ, тебѐ ро́ждшꙋю."), sText("2:"), jObj4("",none, "", "Тѧ̀, бг҃оневѣ́сто, похвалꙋ̀ всѣ̑мъ хрⷭ҇то́съ ꙗ҆вѝ и҆ держа́вꙋ, пою́щымъ вѣ́рнѡ твоѐ та́инство."), sText("3:"), jObj4("",none, "", "Неискꙋсобра́чнаѧ влⷣчце, твои́ми моли́твами и҆збавлѧ́еми прегрѣше́нїй, благоразꙋ́мнѡ вси́ тѧ ᲂу҆блажа́емъ."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Прⷪ҇ро́къ а҆ввакꙋ́мъ ᲂу҆́мныма ѻ҆чи́ма, прови́дѣ, гдⷭ҇и, прише́ствїе твоѐ. тѣ́мъ и҆ вопїѧ́ше: ѿ ю҆́га прїи́детъ бг҃ъ. сла́ва си́лѣ твое́й, сла́ва снизхожде́нїю твоемꙋ̀."), sText("1:"), jObj4("",none, "", "Патрїа́рхъ і҆а́кѡвъ, прови́дѣвъ сп҃се, вели̑чїѧ ꙗ҆́снѡ строе́нїѧ твоегѡ̀, вопїѧ́ше дꙋ́хомъ, ко і҆ꙋ́дѣ глаго́лѧ та́йнѡ: ѿ лѣ́торасли возше́лъ є҆сѝ сы́не мо́й, возвѣща́ѧ тѧ̀ ѿ дв҃ы бг҃а."), sText("2:"), jObj4("",none, "", "Ны́нѣ же́злъ а҆арѡ́новъ ѿ ко́рене дв҃дова прозѧ́бшїй, ны́нѣ дв҃а чⷭ҇таѧ происхо́дитъ: и҆ сликовствꙋ́етъ нб҃о и҆ землѧ̀, и҆ всѧ̑ ѻ҆те́чєствїѧ ꙗ҆зы́кѡвъ, и҆ а҆́нна и҆ і҆ѡакі́мъ та́инственнѡ."), sText("3:"), jObj4("",none, "", "Ны́нѣ да весели́тсѧ нб҃о, да ра́дꙋетсѧ же землѧ̀, и҆ да ликꙋ́етъ і҆ѡакі́мъ и҆ дв҃дъ. ѻ҆́въ ᲂу҆́бѡ ꙗ҆́кѡ роди́тель тво́й, и҆́стиннѡ ро́ждшїѧ бг҃а: ѻ҆́въ же ꙗ҆́кѡ пра́ѻтецъ тво́й, проповѣ́даѧ твоѧ̑ вели́чєствїѧ, чⷭ҇таѧ."), sText("4:"), jObj4("",none, "", "Сра́дꙋетсѧ тебѣ̀ дне́сь бг҃омꙋ́дреннаѧ а҆́нно, вселе́ннаѧ: и҆зба́вителѧ бо тоѧ̀, мт҃рь процвѣла̀ є҆сѝ, ю҆́же ѿ ко́рене прозѧ́бшꙋю дв҃дова, же́злъ си́лы на́мъ носѧ́щꙋю цвѣ́тъ хрⷭ҇та̀."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Сла́влю безнача́льна бг҃а, ѻ҆ц҃а̀ и҆ сн҃а и҆ ст҃а́го дх҃а, є҆диносꙋ́щнꙋю трⷪ҇цꙋ несозда́ннꙋю, є҆́йже предстоѧ́тъ серафі́ми благоговѣ́йнѡ, зовꙋ́ще: ст҃ъ, ст҃ъ, ст҃ъ є҆сѝ бж҃е."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Пребезнача́льное нача́ло, нача́ло прїе́млетъ и҆зъ тебє̀ бг҃ороди́тельнице, плотски́мъ вре́менемъ, и҆ пребыва́етъ собезнача́льно, и҆ вопло́щсѧ сло́во ѻ҆́ч҃ее, и҆ дх҃ꙋ соприсносꙋ́щное, сохранѧ́ѧ бжⷭ҇твенное досто́инство."), )) #generateTable(( sText([#sym.KK#super("4")]), jObj4("Катава́сїа",none, "", "Оу҆слы́шахъ, гдⷭ҇и, смотре́нїѧ твоегѡ̀ та́инство, разꙋмѣ́хъ дѣла̀ твоѧ̑, и҆ просла́вихъ твоѐ бжⷭ҇тво̀."), )) ===== #translation.at("PIESEN") 5 #generateTable(( // Kanon 1 sText(super("1")), jObj4("",none, "", "Сѣннопи́санный мра́къ гада́нїй разори́въ, и҆ вѣ́рныхъ прибы́тїемъ и҆́стины, бг҃оѻтрокови́цею ѡ҆зари́въ сердца̀, и҆ на́съ свѣ́томъ твои́мъ, хрⷭ҇тѐ, наста́ви."), sText("1:"), jObj4("",none, "", "Воспои́мъ лю́дїе всѣ́хъ винꙋ̀, сꙋ́щаго по на́мъ бы́ти вино́внаго: є҆ѧ́же ѻ҆́бразꙋ ра́довахꙋсѧ сподоблѧ́еми прⷪ҇ро́цы, ꙗ҆вле́нное спасе́нїе ѿ тоѧ̀ плодѧ́ще."), sText("2:"), jObj4("",none, "", "Ѿ сꙋ́ха прозѧбе́нїе жезла̀ і҆ере́ева, і҆и҃лю показа̀ проразсꙋжде́нїе: и҆ ны́нѣ свѣ́тлость прозѧ́бшихъ пресла́внѡ свѣ́титъ, ѿ непло́дове всесла́вное рожде́нїе."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Гдⷭ҇и бж҃е на́шъ, ми́ръ да́ждь на́мъ, гдⷭ҇и бж҃е на́шъ, стѧжи́ ны, гдⷭ҇и, ра́звѣ тебѐ и҆но́гѡ не вѣ́мы, и҆́мѧ твоѐ и҆менꙋ́емъ."), sText("1:"), jObj4("",none, "", "Пречⷭ҇тое твоѐ ржⷭ҇тво̀, дв҃о непоро́чнаѧ, несказа́нное и҆ зача́тїе, неизглаго́ланно и҆ рожде́нїе твоѐ, невѣ́сто неневѣ́стнаѧ: бг҃ъ бо бѣ̀ ве́сь въ мѧ̀ ѡ҆блекі́йсѧ."), sText("2:"), jObj4("",none, "", "Дне́сь да веселѧ́тсѧ а҆́гг҃льстїи чи́ни, пѣ́сньми да ликꙋ́ютъ сꙋ́щїи и҆зъ а҆да́ма: роди́сѧ бо же́злъ, цвѣ́тъ возрасти́вшїй хрⷭ҇та̀ є҆ди́наго, и҆зба́вителѧ на́шего."), sText("3:"), jObj4("",none, "", "Дне́сь є҆́ѵа разрѣша́етсѧ ѡ҆сꙋжде́нїѧ, разрѣша́етсѧ же и҆ непло́дство, и҆ а҆да́мъ дре́внїѧ клѧ́твы, ѡ҆ рождествѣ̀ твое́мъ: тобо́ю бо ѿ тлѝ и҆зба́вихомсѧ."), sText("4:"), jObj4("",none, "", "Сла́ва тебѣ̀, просла́вльшемꙋ непло́днꙋю дне́сь: роди́ бо же́злъ присноцвѣтꙋ́щїй ѿ ѡ҆бѣща́нїѧ, ѿ негѡ́же прозѧбѐ хрⷭ҇то́съ, цвѣ́тъ жи́зни на́шеѧ."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Сла́ва тебѣ̀, ѻ҆́ч҃е ст҃ы́й, бж҃е нерожде́нне: сла́ва тебѣ̀, сн҃е безлѣ́тне, є҆диноро́дне: сла́ва тебѣ̀, дш҃е бжⷭ҇твенный и҆ сопресто́льный, ѿ ѻ҆ц҃а̀ происходѧ́й, и҆ въ сн҃ѣ пребыва́ѧй."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Бы́сть чре́во твоѐ сл҃нца носи́ло: пребы́сть чистота̀ твоѧ̀ ꙗ҆́коже пре́жде невреди́ма, дв҃о: хрⷭ҇то́съ бо сл҃нце, ꙗ҆́кѡ ѿ черто́га жени́хъ, ꙗ҆ви́сѧ и҆зъ тебє̀."), )) #generateTable(( sText([#sym.KK#super("5")]), jObj4("Катава́сїа",none, "", "Ѽ треблаже́нное дре́во, на не́мже распѧ́сѧ хрⷭ҇то́съ, цр҃ь. и҆ гдⷭ҇ь, и҆́мже падѐ, дре́вомъ прельсти́вый, тобо́ю прельсти́всѧ, бг҃ꙋ пригвозди́вшꙋсѧ пло́тїю, подаю́щемꙋ ми́ръ дꙋша́мъ на́шымъ."), )) ===== #translation.at("PIESEN") 6 #generateTable(( // Kanon 1 sText(super("1")), jObj4("І҆рмо́съ",none, "", "Ко гдⷭ҇ꙋ ѿ ки́та і҆ѡ́на возопѝ: ты́ мѧ возведѝ и҆зъ глꙋбины̀ а҆́да, молю́сѧ, да ꙗ҆́кѡ и҆зба́вителю, во гла́сѣ хвале́нїѧ, и҆́стины же дꙋ́хомъ пожрꙋ̀ тебѣ̀."), sText("1:"), jObj4("",none, "", "Ко гдⷭ҇ꙋ въ ско́рби непло́дства возопи́ша, бг҃омт҃ре бг҃омꙋ́дрїи роди́тели, и҆ сїю̀ въ ро́ды родѡ́въ роди́ша, на ѻ҆́бщее спасе́нїе и҆ похвалꙋ̀."), sText("2:"), jObj4("",none, "", "Прїѧ́ша нбⷭ҇ный да́ръ ѿ бг҃а досто́инъ, бг҃омт҃ре бг҃омꙋ́дрїи роди́тели, самѣ́хъ херꙋві́мѡвъ превы́шшее носи́ло, сло́ва и҆ зижди́телѧ роди́тельницꙋ."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Ꙗ҆́кѡ во́ды мѡрскі́ѧ, чл҃вѣколю́бче, волна́ми жите́йскими ѡ҆бꙋрева́юсѧ. тѣ́мже ꙗ҆́кѡ і҆ѡ́на, та́кѡ вопїю́ ти: возведѝ ѿ тлѝ живо́тъ мо́й, бл҃гоꙋтро́бне гдⷭ҇и."), sText("1:"), jObj4("",none, "", "Ст҃ꙋ́ю ст҃ы́хъ сꙋ́щꙋ, цѣломꙋ́дреннїи роди́тели твоѝ, чⷭ҇таѧ, возложи́ша тѧ̀ въ хра́мѣ гдⷭ҇ни воспита́тисѧ че́стнѡ, и҆ ᲂу҆гото́ватисѧ въ мт҃рь є҆мꙋ̀."), sText("2:"), jObj4("",none, "", "Неплѡ́ды и҆ ма́тєри ликꙋ́йте, дерза́йте, и҆ и҆гра́йте безча̑дныѧ: безча́дна бо непло́ды бцⷣꙋ прозѧба́етъ, ꙗ҆́же и҆зба́витъ ѿ болѣ́зней є҆́ѵꙋ, и҆ клѧ́твы а҆да́ма."), sText("3:"), jObj4("",none, "", "Слы́шꙋ дв҃да пою́ща тебѣ̀: приведꙋ́тсѧ дѣ̑вы во слѣ́дъ тебє̀, приведꙋ́тсѧ въ хра́мъ цр҃е́въ, и҆ съ ни́мъ тѧ̀ и҆ а҆́зъ дще́рь цр҃е́вꙋ воспѣва́ю."), sText("4:"), jObj4("",none, "", "Пое́мъ ст҃о́е твоѐ ржⷭ҇тво̀, чти́мъ и҆ непоро́чное зача́тїе твоѐ, невѣ́сто бг҃озва́ннаѧ и҆ дв҃о, сла́вѧтъ же съ на́ми а҆́гг҃лѡвъ чи́ни, и҆ ст҃ы́хъ дꙋ́шы."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Въ тебѣ̀ трⷪ҇ческое та́инство пое́тсѧ, и҆ сла́витсѧ чⷭ҇таѧ: ѻ҆ц҃ъ бо благоволѝ, и҆ сло́во всели́сѧ въ тѧ̀, и҆ бжⷭ҇твенный дх҃ъ тебѐ ѡ҆сѣнѝ."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Злата́ѧ кади́льница была̀ є҆сѝ, ѻ҆́гнь бо во ᲂу҆тро́бѣ твое́й всели́сѧ, сло́во ѿ дх҃а ст҃а, и҆ человѣ́ческимъ зра́комъ въ тебѣ̀ ви́дѣсѧ, бг҃ороди́тельнице чⷭ҇таѧ."), )) #generateTable(( sText([#sym.KK#super("6")]), jObj4("Катава́сїа",none, "", "Во́днагѡ ѕвѣ́рѧ во ᲂу҆тро́бѣ, дла̑ни і҆ѡ́на крⷭ҇тови́днѡ распросте́ръ, спаси́тельнꙋю стрⷭ҇ть проѡбража́ше ꙗ҆́вѣ. тѣ́мъ тридне́венъ и҆зше́дъ, премі́рное воскрⷭ҇нїе прописа́ше, пло́тїю пригвожде́ннагѡ хрⷭ҇та̀ бг҃а, и҆ тридне́внымъ воскрⷭ҇нїемъ мі́ръ просвѣ́щшагѡ."), )) ===== #translation.at("KONDAK") #generateTable(( // Kondak sText($#sym.dot$), jObj4("Конда́къ",4, "", "І҆ѡакі́мъ и҆ а҆́нна поноше́нїѧ безча́дства, и҆ а҆да́мъ и҆ є҆́ѵа ѿ тлѝ сме́ртныѧ свободи́стасѧ пречⷭ҇таѧ, во ст҃ѣ́мъ ржⷭ҇твѣ̀ твое́мъ. то̀ пра́зднꙋютъ и҆ лю́дїе твоѝ, вины̀ прегрѣше́нїй и҆зба́вльшесѧ, внегда̀ зва́ти тѝ: непло́ды ражда́етъ бцⷣꙋ, и҆ пита́тельницꙋ жи́зни на́шеѧ."), )) ===== #translation.at("IKOS") #generateTable(( // Ikos sText($#sym.dot$), jObj4("І҆́косъ",none, "", "Моли́тва кꙋ́пнѡ и҆ воздыха́нїе, непло́дства и҆ безча́дства, і҆ѡакі́ма же и҆ а҆́нны бл҃гопрїѧ́тное, и҆ во ᲂу҆́ши гдⷭ҇ни вни́де, и҆ прозѧбѐ пло́дъ живоно́сенъ мі́рꙋ. ѻ҆́въ бо моли́твꙋ на горѣ̀ творѧ́ше: ѻ҆́ва же въ садѣ̀ поноше́нїе ноша́ше, но съ ра́достїю: непло́ды ражда́етъ бцⷣꙋ, и҆ пита́тельницꙋ жи́зни на́шеѧ."), )) ===== #translation.at("PIESEN") 7 #generateTable(( // Kanon 1 sText(super("1")), jObj4("",none, "", "Кꙋпина̀ въ горѣ̀ ѻ҆гненеѡпа́льнаѧ, и҆ росоно́снаѧ пе́щь халде́йскаѧ, ꙗ҆́вѣ предписа́ тѧ, бг҃оневѣ́сто: бжⷭ҇твенный бо невеще́ственный въ веще́ственнѣмъ чре́вѣ, ѻ҆́гнь неѡпа́льнѡ прїѧ́ла є҆сѝ. тѣ́мже и҆зъ тебє̀ ро́ждшемꙋсѧ пое́мъ: бл҃гослове́нъ є҆сѝ, бж҃е ѻ҆тє́цъ на́шихъ."), sText("1:"), jObj4("",none, "", "Твоѐ въ веще́ственныхъ ꙗ҆вле́нїихъ законополо́жникъ возбрани́сѧ разꙋмѣ́ти, и҆ вели́кое пречⷭ҇таѧ та́инство, не мꙋ́дрствовати земноре́внѡстнаѧ ѻ҆бра́знѡ наказꙋ́емь и҆ногда̀. тѣ́мже ᲂу҆ди́вльсѧ чꙋдесѝ, глаго́лаше: бл҃гослове́нъ бг҃ъ ѻ҆тє́цъ на́шихъ."), sText("2:"), jObj4("",none, "", "Го́рꙋ и҆ две́рь нбⷭ҇нꙋю, и҆ мы́сленнꙋю тѧ̀ лѣ́ствицꙋ бг҃олѣ́пнѡ ли́къ бжⷭ҇твенный пронаречѐ: ѿ тебє́ бо ка́мень ѿсѣче́сѧ не рꙋка́ми мꙋ́жескими, и҆ две́рь є҆́юже про́йде гдⷭ҇ь, и҆́же чꙋде́съ бг҃ъ ѻ҆тє́цъ на́шихъ."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Халде́йскаѧ пе́щь ѻ҆гне́мъ распалае́маѧ, ѡ҆роша́шесѧ дх҃омъ, бж҃їимъ предстоѧ́нїемъ, ѻ҆́троцы поѧ́хꙋ: бл҃гослове́нъ є҆сѝ, бж҃е ѻ҆тє́цъ на́шихъ."), sText("1:"), jObj4("",none, "", "Пра́зднꙋемъ чⷭ҇таѧ, и҆ вѣ́рнѡ покланѧ́емсѧ ст҃о́мꙋ твоемꙋ̀ ржⷭ҇твꙋ̀, пою́ще сн҃а твоего̀, и҆́мже и҆зба́вихомсѧ дре́внѧгѡ а҆да́мова ны́нѣ ѡ҆сꙋжде́нїѧ."), sText("2:"), jObj4("",none, "", "Ны́нѣ а҆́нна весели́тсѧ, и҆ вопїе́тъ хва́лѧщисѧ: непло́ды сꙋ́щи, роди́хъ бж҃їю мт҃рь, є҆ѧ́же ра́ди ѡ҆сꙋжде́нїе є҆́ѵино разрѣши́сѧ, и҆ ꙗ҆́же въ печа́лѣхъ болѣ́знь."), sText("3:"), jObj4("",none, "", "А҆да́мъ свободи́сѧ, и҆ є҆́ѵа ликꙋ́етъ, и҆ вопїю́тъ дꙋ́хомъ къ тебѣ̀ бцⷣе: тобо́ю и҆зба́вихомсѧ перворо́дныѧ клѧ́твы, ꙗ҆́вльшꙋсѧ хрⷭ҇тꙋ̀."), sText("4:"), jObj4("",none, "", "Ѽ чре́во, вмѣсти́вшее бж҃їе селе́нїе. ѽ ᲂу҆тро́бо, носи́вшаѧ нб҃съ ши́ршꙋю. престо́лъ ст҃ы́й, мы́сленный кївѡ́тъ свѧще́нїѧ."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Ѻ҆ц҃а̀ просла́вимъ, сн҃а, и҆ дх҃а, во є҆ди́нствѣ бж҃ества̀, трⷪ҇цꙋ прест҃ꙋ́ю, нераздѣ́льнꙋю, несозда́ннꙋю, и҆ соприсносꙋ́щнꙋю, и҆ є҆диносꙋ́щнꙋю."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Ты̀ бг҃а є҆ди́на родила̀ дв҃о пресла́внѡ: ты̀ є҆стество̀ ѡ҆бнови́ла є҆сѝ ржⷭ҇тво́мъ твои́мъ, марі́е: ты̀ є҆́ѵꙋ разрѣши́ла є҆сѝ перворо́дныѧ клѧ́твы, бг҃ороди́тельнице чⷭ҇таѧ."), )) #generateTable(( sText([#sym.KK#super("7")]), jObj4("Катава́сїа",none, "", "Безꙋ́мное велѣ́нїе мꙋчи́телѧ ѕлочести́вагѡ лю́ди поколеба̀, ды́шꙋщее преще́нїе и҆ ѕлохꙋле́нїе бг҃оме́рзское: ѻ҆ба́че трѝ ѻ҆́троки не ᲂу҆страшѝ ꙗ҆́рость ѕвѣ́рскаѧ, ни ѻ҆́гнь снѣда́ѧй, но противоды́шꙋщꙋ росоно́сномꙋ дх҃ꙋ, со ѻ҆гне́мъ сꙋ́ще поѧ́хꙋ: препѣ́тый ѻ҆тцє́въ, и҆ на́съ, бж҃е, бл҃гослове́нъ є҆сѝ."), )) ===== #translation.at("PIESEN") 8 #generateTable(( // Kanon 1 sText(super("1")), jObj4("І҆рмо́съ",none, "", "Въ пещѝ ѻ҆́трочестѣй проѡбрази́лъ є҆сѝ и҆ногда̀ твою̀ мт҃рь, гдⷭ҇и, ѻ҆́бразъ же сїѧ̀ и҆зъ ѻ҆гнѧ̀ и҆з̾има́ше, неѡпа́льнѡ входѧ́щыѧ: ю҆́же пое́мъ ꙗ҆́вльшꙋюсѧ тобо́ю концє́мъ дне́сь, и҆ превозно́симъ во всѧ̑ вѣ́ки."), sText("1:"), jObj4("",none, "", "Ꙗ҆́же къ бг҃ꙋ на́шегѡ примире́нїѧ, пред̾ѡпредѣле́ннаѧ ски́нїѧ, є҆́же бы́ти ны́нѣ начина́етъ, и҆мꙋ́щи роди́ти сло́ва, на́мъ дебельство́мъ пло́ти ꙗ҆́вльшасѧ, є҆го́же пое́мъ, и҆зъ не сꙋ́щихъ во є҆́же бы́ти тѣ́мъ прїе́мшїи, и҆ превозно́симъ во всѧ̑ вѣ́ки."), sText("2:"), jObj4("",none, "", "Непло́дства преложе́нїе, мїрско́е благи́хъ разрѣшѝ непло́дство, и҆ ꙗ҆́сно чꙋ́до хрⷭ҇та̀ показа̀, къ земны̑мъ прише́дша. є҆го́же пое́мъ, и҆зъ не сꙋ́щихъ во є҆́же бы́ти тѣ́мъ прїе́мшїи, и҆ превозно́симъ во всѧ̑ вѣ́ки."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Покрыва́ѧй вода́ми превы́спрєннѧѧ своѧ̑, полага́ѧй мо́рю предѣ́лъ песо́къ, и҆ содержа́й всѧ̑, тѧ̀ пое́тъ со́лнце, тѧ̀ сла́витъ лꙋна̀, тебѣ̀ прино́ситъ пѣ́снь всѧ̀ тва́рь, ꙗ҆́кѡ содѣ́телю всѣ́хъ во вѣ́ки."), sText("1:"), jObj4("",none, "", "Сотвори́вый пресла̑внаѧ непло́днѣй ᲂу҆тро́бѣ, ѿве́рзый а҆́нны неражда̑ющаѧ ложесна̀, и҆ пло́дъ є҆́й да́въ, ты̀ бж҃е ст҃ы́й, ты̀ сн҃е дв҃ы, ты̀ ѿ сеѧ̀ пло́ть прїѧ́лъ є҆сѝ присноцвѣтꙋ́щїѧ дв҃ы и҆ бцⷣы."), sText("2:"), jObj4("",none, "", "Затворѧ́ѧй бе́зднꙋ и҆ ѿверза́ѧй ю҆̀, возносѧ́й во́дꙋ во ѻ҆́блацѣхъ, и҆ даѧ́й до́ждь, ты̀ да́вый гдⷭ҇и, ѿ непло́днагѡ ко́рене прозѧ́бнꙋти а҆́нны ст҃ы́ѧ пречи́стъ пло́дъ, и҆ роди́ти бцⷣꙋ."), sText("3:"), jObj4("",none, "", "Дѣ́лателю мы́слей на́шихъ, и҆ насади́телю дꙋ́шъ на́шихъ, ты̀ непло́днꙋю зе́млю благопло́днꙋ показа́вый: ты̀ дре́вле сꙋхꙋ́ю, родови́тꙋ, благокла́снꙋ, браздꙋ̀ плодоно́снꙋ содѣ́лалъ є҆сѝ а҆́ннꙋ ст҃ꙋ́ю, пречи́стъ пло́дъ и҆зрасти́ти бцⷣꙋ."), sText("4:"), jObj4("",none, "", "Прїиди́те всѝ ᲂу҆́зримъ, ꙗ҆́кѡ ѿ черто́га ма́ла, бж҃їй гра́дъ ны́нѣ ражда́емый, и҆́же ѿ две́ри ᲂу҆тро́бныѧ и҆схо́дъ и҆мꙋ́щꙋю, вхо́дъ же не вѣ́дꙋщꙋ ѻ҆бще́нїѧ: є҆ди́нъ бг҃ъ зижди́тель се́ю про́йде стезе́ю стра́нною."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Ѽ трⷪ҇це пресꙋ́щнаѧ, є҆ди́нице собезнача́льнаѧ! тѧ̀ пое́тъ и҆ трепе́щетъ мно́жество а҆́гг҃лъ, не́бо и҆ землѧ̀, и҆ бє́здны ᲂу҆жаса́ютсѧ, человѣ́цы благословѧ́тъ, ѻ҆́гнь рабо́таетъ, всѧ̑ послꙋ́шаютъ тебѐ трⷪ҇це ст҃а́ѧ со стра́хомъ, ꙗ҆̀же въ тва́ри."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Ѽ новѣ́йшагѡ слы́шанїѧ: бг҃ъ, сы́нъ жены̀! ѽ безсѣ́меннагѡ ржⷭ҇тва̀: безмꙋ́жнаѧ мт҃и, и҆ рожде́нное бг҃ъ! ѽ ᲂу҆жа́снагѡ видѣ́нїѧ! ѽ зача́тїѧ стра́ннагѡ дв҃ы! ѽ несказа́ннагѡ ржⷭ҇тва̀! и҆́стиннѡ па́че ᲂу҆ма̀ всѧ̑, и҆ видѣ́нїѧ."), )) #generateTable(( sText([#sym.KK#super("8")]), jObj4("Катава́сїа",none, "", "Благослови́те ѻ҆́троцы, трⷪ҇цы равночи́сленнїи, содѣ́телѧ ѻ҆ц҃а̀ бг҃а, по́йте снизше́дшее сло́во, и҆ ѻ҆́гнь въ ро́сꙋ претво́ршее, и҆ превозноси́те всѣ̑мъ жи́знь подава́ющаго, дх҃а всест҃а́го, во вѣ́ки."), )) ===== #translation.at("PIESEN") 9 #generateTable(( // Kanon 1 sText(super("1")), jObj4("І҆рмо́съ",none, "", "Ꙗ҆́же пре́жде со́лнца свѣти́льника бг҃а возсїѧ́вшаго, пло́тски къ на́мъ прише́дшаго, и҆зъ бокꙋ̀ дв҃и́чꙋ, неизрече́ннѡ воплоти́вшаѧ, бл҃гослове́ннаѧ, всечⷭ҇таѧ, тѧ̀, бцⷣꙋ, велича́емъ."), sText("1:"), jObj4("",none, "", "И҆́же непокори̑вымъ лю́демъ и҆зъ ка́мене и҆сточи́въ во́дꙋ, благопокори̑вымъ же ꙗ҆зы́кѡмъ, да́рꙋетъ ѿ чре́слъ непло́дныхъ пло́дъ на весе́лїе на́мъ, тѧ̀ бг҃ома́ти пречⷭ҇таѧ, ю҆́же досто́йнѡ велича́емъ."), sText("2:"), jObj4("",none, "", "Напра́снагѡ дре́внѧгѡ ѿѧ́тельницꙋ ѡ҆сꙋжде́нїѧ, и҆ прама́тере и҆справле́нїе: ю҆́же ро́да къ бг҃ꙋ винꙋ̀ присвое́нїѧ, къ зижди́телю мо́стъ, тѧ̀ бцⷣе велича́емъ."), )) #generateTable(( // Kanon 2 sText(super("2")), jObj4("І҆рмо́съ",none, "", "Чꙋ́жде мт҃ремъ дѣ́вство, и҆ стра́нно дв҃амъ дѣторожде́нїе, на тебѣ̀, бцⷣе, ѻ҆боѧ̑ ᲂу҆стро́ишасѧ: тѣ́мъ тѧ̀ всѧ̑ племена̀ земна̑ѧ, непреста́ннѡ велича́емъ."), sText("1:"), jObj4("",none, "", "Досто́йное бг҃ома́ти твоеѧ̀ чистоты̀ ржⷭ҇тво̀ наслѣ́довала є҆сѝ, чре́зъ ѡ҆бѣща́нїе: и҆ногда́ бо непло́днѣй, бг҃опрозѧбе́нъ пло́дъ вдала́сѧ є҆сѝ. тѣ́мъ тѧ̀ всѧ̑ племена̀ зємна́ѧ непреста́ннѡ велича́емъ."), sText("2:"), jObj4("",none, "", "И҆спо́лнисѧ вопїю́щагѡ прⷪ҇ро́чество, глаго́летъ бо: возста́влю ски́нїю па́дшꙋю свѧще́ннагѡ дв҃да, въ тебѣ̀ чⷭ҇таѧ проѡбрази́вшꙋюсѧ, є҆ѧ́же ра́ди всѣ́хъ человѣ́кѡвъ пе́рсть, въ тѣ́ло созда́сѧ бж҃їе."), sText("3:"), jObj4("",none, "", "Пелена́мъ покланѧ́емсѧ твои́мъ бцⷣе, сла́вимъ да́вшаго пло́дъ пре́жде непло́днѣй, и҆ ѿве́рзшаго ложесна̀ неражда́ющей пресла́внѡ: твори́тъ бо всѧ̑, є҆ли̑ка хо́щетъ, бг҃ъ сы́й самовла́стенъ."), sText("4:"), jObj4("",none, "", "Ꙗ҆́кѡ да́ръ тебѣ̀ бцⷣе, пѣснопѣ́нїе, ѿ а҆́нны ро́ждшейсѧ вѣ́рнѡ дароно́симъ: ма́тєри, мт҃рь: дѣ̑вы же, дв҃ꙋ є҆ди́нꙋ: славосло́вѧще покланѧ́емсѧ тебѣ̀, пое́мъ и҆ сла́вимъ."), sText("5:"), jObj4("Трⷪ҇ченъ",none, "", "Чꙋ́жде є҆́сть беззакѡ́ннымъ сла́вити безнача́льнꙋю трⷪ҇цꙋ, ѻ҆ц҃а̀, и҆ сн҃а же, и҆ ст҃а́го дх҃а, несозда́нное вседержа́вство: є҆́юже мі́ръ ве́сь содержи́тсѧ, ма́нїемъ держа́вы є҆ѧ̀."), sText("6:"), jObj4("Бг҃оро́диченъ",none, "", "Вмѣсти́ла є҆сѝ во ᲂу҆тро́бѣ твое́й дв҃ома́ти, є҆ди́наго ѿ трⷪ҇цы хрⷭ҇та̀ цр҃ѧ̀, є҆го́же пое́тъ всѧ̀ тва́рь, и҆ трепе́щꙋтъ вы́шнїи чи́ни: того̀ молѝ всечⷭ҇таѧ, спасти́сѧ дꙋша́мъ на́шымъ."), )) #generateTable(( sText([#sym.KK#super("9")]), jObj4("Катава́сїа",none, "", "Та́инъ є҆сѝ, бцⷣе, ра́й, невоздѣ́ланнѡ возрасти́вшїй хрⷭ҇та̀, и҆́мже кре́стное живоно́сное на землѝ насади́сѧ дре́во. тѣ́мъ ны́нѣ возноси́мꙋ, покланѧ́ющесѧ є҆мꙋ̀, тѧ̀ велича́емъ."), sText($#sym.dot$), jObj4("Катава́сїа",none, "", "Снѣ́дїю дре́ва, ро́дꙋ прибы́вшаѧ сме́рть, крⷭ҇то́мъ ᲂу҆праздни́сѧ дне́сь: и҆́бо прама́тернѧѧ всеро́днаѧ клѧ́тва разрꙋши́сѧ, прозѧбе́нїемъ чⷭ҇тыѧ бг҃ома́тере: ю҆́же всѧ̑ си̑лы нбⷭ҇ныѧ велича́ютъ."), )) ==== #translation.at("SVITILEN") #generateTable(( sText($#sym.dot$), jObj4("",none, "", "Ѿ непло́дныѧ дне́сь а҆́нны цвѣ́тъ произы́де бцⷣа, всѧ̑ благово́нїѧ бжⷭ҇твеннаго и҆сполнѧ́ющи концы̀ мі́ра, и҆ ра́дости всю̀ наполнѧ́ющи тва́рь: ю҆́же пою́ще досто́йнѡ восхвалѧ́емъ, ꙗ҆́кѡ сꙋ́щꙋ земноро́дныхъ превы́шшꙋю."), sText($#sym.dot$), jObj4("",none, "", "Ѿ непло́дныѧ дне́сь ..."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",none, "", "А҆да́ме ѡ҆бнови́сѧ, и҆ є҆́ѵа возвели́чисѧ, прⷪ҇ро́цы со а҆пⷭ҇лы ликꙋ́йте и҆ пра́ведными: ѻ҆́бщаѧ бо ра́дость возсїѧ̀, а҆́гг҃лѡвъ же и҆ человѣ́кѡвъ, ѿ пра́ведныхъ дне́сь і҆ѡакі́ма и҆ а҆́нны бцⷣа марі́а."), )) ==== #translation.at("CHVALITE") #generateTable(( // CH Stich na 4 sText("4:"), gText("Хвали́те є҆го̀ въ тѷмпа́нѣ и҆ ли́цѣ, хвали́те є҆го̀ во стрꙋ́нахъ и҆ ѻ҆рга́нѣ."), "", jObj4("",1, "Ѽ ди́внагѡ чꙋдесѐ", "Ѽ ди́внагѡ чꙋдесѐ! и҆сто́чникъ жи́зни ѿ непло́дныѧ ражда́етсѧ, и҆ бл҃года́ть плодороди́ти свѣ́тлѡ начина́етсѧ. весели́сѧ і҆ѡакі́ме, бцⷣы бы́въ роди́тель: нѣ́сть и҆́нъ ꙗ҆́коже ты̀, земноро́дныхъ роди́телей, бг҃опрїѧ́тне: бг҃овмѣсти́маѧ бо ѻ҆трокови́ца, бж҃їе селе́нїе, прест҃а́ѧ гора̀, тобо́ю на́мъ дарова́сѧ."), // CH Stich na 3 sText("3:"), gText("Хвали́те є҆го̀ въ кѷмва́лѣхъ доброгла́сныхъ, хвали́те є҆го̀ въ кѷмва́лѣхъ восклица́нїѧ: всѧ́кое дыха́нїе да хва́литъ гдⷭ҇а."), "", jObj4("",none, "", "Ѽ ди́внагѡ чꙋдесѐ! ..."), // CH Stich na 2 sText("2:"), gText("Воскрⷭ҇нѝ гдⷭ҇и бж҃е мо́й, да вознесе́тсѧ рꙋка̀ твоѧ̀, не забꙋ́ди ᲂу҆бо́гихъ твои́хъ до конца̀."), "", jObj4("",none, "", "Ѽ ди́внагѡ чꙋдесѐ! ѿ непло́дове пло́дъ возсїѧ̀ манове́нїемъ всѣ́хъ содѣ́телѧ, и҆ вседержи́телѧ, до́блественнѡ мїрско́е благи́хъ разрѣшѝ непло́дство: ма́тєри съ ма́терїю бг҃оро́дичною ликꙋ́йте, зовꙋ́ще: ѡ҆бра́дованнаѧ, ра́дꙋйсѧ, съ тобо́ю гдⷭ҇ь, подаѧ́й мі́рꙋ тобо́ю ве́лїю ми́лость."), // CH Stich na 1 sText("1:"), gText("И҆сповѣ́мсѧ тебѣ̀ гдⷭ҇и всѣ́мъ се́рдцемъ мои́мъ, повѣ́мъ всѧ̑ чꙋдеса̀ твоѧ̑."), "", jObj4("",none, "", "Сто́лпъ цѣломꙋ́дрїѧ ѡ҆дꙋшевле́нъ, и҆ свѣ́тлое прїѧ́телище, блиста́ющеесѧ бл҃года́тїю: а҆́нна бл҃госла́внаѧ, ꙗ҆́вльшисѧ породѝ забра́ло вои́стиннꙋ дѣ́вства, бжⷭ҇твенное процвѣте́нїе: ꙗ҆́же всѣ̑мъ дѣ́вствєннымъ, и҆ дѣ́вства жела́ющымъ дарова́нїе, дѣ́вства добро́тꙋ, ꙗ҆́вѣ подаю́щꙋю, и҆ да́рꙋющꙋю всѣ̑мъ вѣ̑рнымъ ве́лїю ми́лость."), // S:I: col2(gText(translation.at("SI"))), "", jObj4("",6, "", "Се́й де́нь гдⷭ҇ень, ра́дꙋйтесѧ лю́дїе: се́ бо свѣ́та черто́гъ, и҆ кни́га сло́ва живо́тнагѡ, и҆зъ ᲂу҆тро́бы произы́де, и҆ ꙗ҆́же къ восто́кѡмъ две́рь ро́ждшисѧ, ѡ҆жида́етъ вхо́да ст҃и́телѧ вели́кагѡ, є҆ди́на, и҆ є҆ди́наго вводѧ́щи хрⷭ҇та̀ во вселе́ннꙋю, во спасе́нїе дꙋ́шъ на́шихъ."), )) #colbreak() // --------------------------------------- // LITURGIA // --------------------------------------- === #translation.at("L") #header3([(#translation.at("I"))]) ==== #translation.at("BLAZENNA") #generateTable(( // B Stich na 8 sText("8:"), gText("Бл҃же́ни кро́тцыи, ꙗ҆́кѡ ті́и наслѣ́дѧтъ зе́млю."), "", jObj4("",none, "", "Непоро́чнѡ бг҃ꙋ пожи́вшїи, всѣ́хъ роди́сте спасе́нїе, бг҃омꙋ́дрїи роди́телє зижди́телѧ ро́ждшїѧ и҆ бг҃а на́шего."), // B Stich na 7 sText("7:"), gText("Бл҃же́ни а҆́лчꙋщїи и҆ жа́ждꙋщїи пра́вды, ꙗ҆́кѡ ті́и насы́тѧтсѧ."), "", jObj4("",none, "", "Непоро́чнѡ бг҃ꙋ пожи́вшїи, ..."), // B Stich na 6 sText("6:"), gText("Бл҃же́ни млⷭ҇тивїи, ꙗ҆́кѡ ті́и поми́ловани бꙋ́дꙋтъ."), "", jObj4("",none, "", "Всѣ̑мъ жи́знь и҆сточа́ѧй гдⷭ҇ь, ѿ непло́дове произведѐ дв҃ꙋ, въ ню́же всели́тисѧ и҆зво́ли, и҆ по ржⷭ҇твѣ̀ сохрани́въ нетлѣ́ннꙋ."), // B Stich na 5 sText("5:"), gText("Бл҃же́ни чи́стїи се́рдцемъ, ꙗ҆́кѡ ті́и бг҃а ᲂу҆́зрѧтъ."), "", jObj4("",none, "", "А҆́ннинъ пло́дъ, марі́ю дне́сь, гро́здъ ро́ждшꙋю живоно́сный, ꙗ҆́кѡ бцⷣꙋ воспои́мъ, предста́тельницꙋ же всѣ́хъ и҆ помо́щницꙋ."), // B Stich na 4 sText("4:"), gText("Бл҃же́ни миротво́рцы, ꙗ҆́кѡ ті́и сн҃ове бж҃їи нарекꙋ́тсѧ."), "", jObj4("",none, "", "Ст҃ꙋ́ю ст҃ы́хъ сꙋ́щꙋ, цѣломꙋ́дреннїи роди́тели твоѝ, чⷭ҇таѧ, возложи́ша тѧ̀ въ хра́мѣ гдⷭ҇ни воспита́тисѧ че́стнѡ, и҆ ᲂу҆гото́ватисѧ въ мт҃рь є҆мꙋ̀."), // B Stich na 3 sText("3:"), gText("Бл҃же́ни и҆згна́ни пра́вды ра́ди, ꙗ҆́кѡ тѣ́хъ є҆́сть црⷭ҇тво нбⷭ҇ное."), "", jObj4("",none, "", "Неплѡ́ды и҆ ма́тєри ликꙋ́йте, дерза́йте, и҆ и҆гра́йте безча̑дныѧ: безча́дна бо непло́ды бцⷣꙋ прозѧба́етъ, ꙗ҆́же и҆зба́витъ ѿ болѣ́зней є҆́ѵꙋ, и҆ клѧ́твы а҆да́ма."), // B Stich na 2 sText("2:"), gText("Бл҃же́ни є҆стѐ, є҆гда̀ поно́сѧтъ ва́мъ, и҆ и҆жденꙋ́тъ, и҆ рекꙋ́тъ всѧ́къ ѕо́лъ глаго́лъ на вы̀ лжꙋ́ще менѐ ра́ди."), "", jObj4("Трⷪ҇ченъ",none, "", "Въ тебѣ̀ трⷪ҇ческое та́инство пое́тсѧ, и҆ сла́витсѧ чⷭ҇таѧ: ѻ҆ц҃ъ бо благоволѝ, и҆ сло́во всели́сѧ въ тѧ̀, и҆ бжⷭ҇твенный дх҃ъ тебѐ ѡ҆сѣнѝ."), // B Stich na 1 sText("1:"), gText("Ра́дꙋйтесѧ и҆ весели́тесѧ, ꙗ҆́кѡ мзда̀ ва́ша мно́га на нб҃сѣ́хъ."), "", jObj4("Бг҃оро́диченъ",none, "", "Злата́ѧ кади́льница была̀ є҆сѝ, ѻ҆́гнь бо во ᲂу҆тро́бѣ твое́й всели́сѧ, сло́во ѿ дх҃а ст҃а, и҆ человѣ́ческимъ зра́комъ въ тебѣ̀ ви́дѣсѧ, бг҃ороди́тельнице чⷭ҇таѧ."), )) ==== #translation.at("TROPAR") #generateTable(( // Tropar 1 sText($#sym.dot$), jObj4("",4, "", "Ржⷭ҇тво̀ твоѐ бцⷣе дв҃о, ра́дость возвѣстѝ все́й вселе́ннѣй: и҆зъ тебє́ бо возсїѧ̀ сл҃нце пра́вды, хрⷭ҇то́съ бг҃ъ на́шъ, и҆ разрꙋши́въ клѧ́твꙋ, дадѐ благослове́нїе, и҆ ᲂу҆праздни́въ сме́рть, дарова̀ на́мъ живо́тъ вѣ́чный."), )) ==== #translation.at("KONDAK") #generateTable(( // Kondak 1 sText($#sym.dot$), jObj4("Конда́къ",4, "", "І҆ѡакі́мъ и҆ а҆́нна поноше́нїѧ безча́дства, и҆ а҆да́мъ и҆ є҆́ѵа ѿ тлѝ сме́ртныѧ свободи́стасѧ пречⷭ҇таѧ, во ст҃ѣ́мъ ржⷭ҇твѣ̀ твое́мъ. то̀ пра́зднꙋютъ и҆ лю́дїе твоѝ, вины̀ прегрѣше́нїй и҆зба́вльшесѧ, внегда̀ зва́ти тѝ: непло́ды ражда́етъ бцⷣꙋ, и҆ пита́тельницꙋ жи́зни на́шеѧ."), )) ==== #translation.at("PROKIMEN") #generateTable(( // Prokimen sText($#sym.dot$), jObj4("",3, "", cText("Вели́читъ дꙋша̀ моѧ̀ гдⷭ҇а:")), sText(translation.at("ST")), jObj4("",none, "", cText("Ꙗ҆́кѡ призрѣ̀ на смире́нїе рабы̀ своеѧ̀:")), )) ===== #translation.at("ALLILUJA") #generateTable(( // Alliluja sText($#sym.dot$), jObj4("",8, "", cText("Слы́ши, дщѝ, и҆ ви́ждь:")), sText(translation.at("ST")), jObj4("",none, "", cText("Лицꙋ̀ твоемꙋ̀ помо́лѧтсѧ:")), )) ==== #translation.at("IRMOS") #generateTable(( // Irmos sText($#sym.dot$), jObj4("",none, "", cText("Чꙋ́жде ма́терємъ:")), )) ==== #translation.at("PRICASTEN") #generateTable(( // Pricasten sText($#sym.dot$), jObj4("",none, "", "Ча́шꙋ спасе́нїѧ прїимꙋ̀, и҆ и҆́мѧ гдⷭ҇не призовꙋ̀."), )) #colbreak() ])
https://github.com/Nrosa01/TFG-2023-2024-UCM
https://raw.githubusercontent.com/Nrosa01/TFG-2023-2024-UCM/main/Memoria%20Typst/utilities/gridfunc.typ
typst
#let draw_grid(state) = { [ #let stroke_map = state.at("stroke_map", default: ()) #let color_map = state.at("color_map", default: (white, black, blue, red, green, yellow)) #let rect_content = state.at("rect_content", default: ()) #let default_stroke = state.at("default_stroke", default: black+.3pt) #let count =-1; #stack( dir: state.caption_alignment, spacing: 10pt, text(8pt)[#state.caption], grid( columns: state.columns, row-gutter: state.at("gutter-row", default: state.at("gutter", default: 0pt)), column-gutter: state.at("gutter-column", default: state.at("gutter", default: 0pt)), ..for str in state.data { count = count + 1; (rect( stroke: stroke_map.at(str, default: default_stroke), width: state.at("cellsize", default: 15pt), height: state.at("cellsize", default: 15pt), fill: color_map.at(str, default: white), )[#rect_content.at(count, default: "")], ) }) ) ] } #let draw_grid_simple(state) = { [ #let stroke_map = state.at("stroke_map", default: ()) #let color_map = state.at("color_map", default: (white, black, blue, red, green, yellow)) #let count = 0; #grid( columns: state.columns, row-gutter: state.at("gutter-row", default: state.at("gutter", default: 0pt)), column-gutter: state.at("gutter-column", default: state.at("gutter", default: 0pt)), ..state.data.map(str => rect( stroke: stroke_map.at(str, default: black+0.3pt), width: state.at("cellsize", default: 15pt), height: state.at("cellsize", default: 15pt), fill: color_map.at(str, default: white)))) ] } #let draw_transition(state) = { [ #stack( dir: ttb, spacing: 4pt, text(8pt)[#state.at("transition", default: "")], state.at("transition_icon", default: $-->$)) ] } #let grid_example(caption_text, states, vinit: 0pt, vend: 10pt, alignment: center + horizon, ref: "") = { v(vinit) align(alignment)[ #box()[ #stack( dir: ltr, spacing: states.at(0).at("hspace", default: 20pt), ..states.slice(0, -1).map(state => stack( dir: ltr, spacing: state.at("hspace", default: 20pt), draw_grid(state), draw_transition(state) )), draw_grid(states.at(-1)) ) #if caption_text != "" [ #show figure.caption: emph #figure("",caption: [#caption_text]) #if ref != "" {label(ref)} ] #v(vend) ]]} #let grid_example_from(caption_text, states, vinit: 0pt, vend: 10pt, ref: "") = { v(vinit) align(center)[ #box()[ #set align(horizon) #stack( dir: ltr, spacing: states.at(0).at("hspace", default: 20pt), ..states.slice(0, -1).map(state => stack( dir: ltr, spacing: state.at("hspace", default: 20pt), state, draw_transition(state) )), states.at(-1) ) #if caption_text != "" [ #show figure.caption: emph #figure("",caption: [#caption_text]) #if ref != "" {label(ref)} ] #v(vend) ]]}
https://github.com/ShapeLayer/ucpc-solutions__typst__archived
https://raw.githubusercontent.com/ShapeLayer/ucpc-solutions__typst__archived/main/README.md
markdown
Other
Repository moved: [ShapeLayer/ucpc-solutions__typst](https://github.com/ShapeLayer/ucpc-solutions__typst) --- # UCPC 2020 Solutions Theme (Typst ported) [Original: ucpc2020-solutions-theme](https://github.com/ucpcc/2020-solutions-theme) (Special Thanks) [@kiwiyou](https://github.com/kiwiyou) * Since this ported version has been re-implemented only for appearance, this repository does not include the source code of any distribution or variant(including the above).
https://github.com/Sparkenstein/resume
https://raw.githubusercontent.com/Sparkenstein/resume/master/resume.typ
typst
#import "@preview/guided-resume-starter-cgc:2.0.0": * #show: resume.with( author: "Dr. Emmit \"<NAME>", location: "Hill Valley, CA", contacts: ( [#link("mailto:<EMAIL>")[Email]], [#link("https://chaoticgood.computer")[Website]], [#link("https://github.com/spelkington")[GitHub]], [#link("https://linkedin.com/in/spelkington")[LinkedIn]], ), // footer: [#align(center)[#emph[References available on request]]] ) = Education #edu( institution: "University of California, Berkeley", date: "Aug 1953", location: "Berkeley, CA", degrees: ( ("Ph.D.", "Theoretical Physics"), ), ) #edu( institution: "University of Colombia", date: "Aug 1948", gpa: "3.9 of 4.0, Summa Cum Laude", degrees: ( ("Bachelor's of Science", "Nuclear Engineering"), ("Minors", "Automobile Design, Arabic"), ("Focus", "Childcare, Education") ), ) = Skills #skills(( ("Expertise", ( [Theoretical Physics], [Time Travel], [Nuclear Material Management], [Student Mentoring], // [Ethics], // [Hair Cair], // [Jumpsuit Design], // [Conflict Resolution], )), ("Software", ( [AutoDesk CAD], [Delorean OS], [Windows 1], // [Microsoft Word], // [Car Maintenance], )), ("Languages", ( [C++], [C Language], [MatLab], [Punch Cards], // [Python], // [C\#] )), )) = Experience #exp( role: "Theoretical Physics Consultant", project: "Doc Brown's Garage", date: "June 1953 - Oct 2015", location: "Hill Valley, CA", summary: "Specializing in development of time travel devices and student tutoring", details: [ - Lead development of time travel devices, resulting in the ability to travel back and forth through time - Managed and executed a budget of \$14 million dollars gained from an unexplained family fortune - Oversaw QA testing for time travel devices, minimizing risk of maternal time-travel related incidents ] ) #exp( role: "Teaching Assistant", project: "University of Colombia, Wernher von Braun Lab", date: "Oct 1949 - June 1953", summary: "Integrating German scientists' curriculi for undergraduate audiences", details: [ - Assisted in designing physics course structure and assignments in English, Spanish and German - Designed confidential rocket designs used in NASA Space Race initiatives and the Apollo Program - Developed and executed university DEI initiatives and onboarding programs for transfer professors ] ) = Projects #exp( role: link("https://www.imdb.com/title/tt0088763/")[The Delorean], project: "Doc Brown's Garage", date: "May 1954 - June 1985", summary: "A stylish and fully-featured vehicle capable of time travel - with mixed results", details: [ - Designed vehicle modifications allowing for time travel and *37% increased cup holder capacity* - Ethically sourced materials from various international Colombian and Libyan providers - Coordinated business relationships with potential clients and interested parties ] ) #exp( role: "<NAME>'s Mega Cup-o-Matic", project: "Doc Brown's Garage", date: "October 1949 - June 1953", details: [ - Filed a patent for a new type of car cupholder, for storing cups of nuclear material up to 1L - Developed nuclear hazard procedures for high school students interested in time and nuclear physics ] ) = Volunteering #exp( role: "Student Advisor", project: "Doc's Kidz After-School Child Care Service", date: "May 1954 - June 1985", summary: "Giving random highschoolers hands-on experience in live nuclear engineering", details: [ - Created community initiative to teach local student(s) about the wonders of nuclear physics - Provided interesting time travel research opportunities for students to add to their college applications ] )
https://github.com/RaphGL/ElectronicsFromBasics
https://raw.githubusercontent.com/RaphGL/ElectronicsFromBasics/main/DC/chap5/1_what_are_series_parallel_circuits.typ
typst
Other
#import "../../core/core.typ" === What are \"series\" and \"parallel\" circuits? Circuits consisting of just one battery and one load resistance are very simple to analyze, but they are not often found in practical applications. Usually, we find circuits where more than two components are connected together. There are two basic ways in which to connect more than two circuit components: #emph[series] and #emph[parallel]. First, an example of a series circuit: #image("static/00082.png") Here, we have three resistors (labeled R#sub[1], R#sub[2], and R#sub[3]), connected in a long chain from one terminal of the battery to the other. (It should be noted that the subscript labeling -- those little numbers to the lower-right of the letter \"R\" -- are unrelated to the resistor values in ohms. They serve only to identify one resistor from another.) The defining characteristic of a series circuit is that there is only one path for electrons to flow. In this circuit the electrons flow in a counter-clockwise direction, from point 4 to point 3 to point 2 to point 1 and back around to 4. Now, let\'s look at the other type of circuit, a parallel configuration: #image("static/00083.png") Again, we have three resistors, but this time they form more than one continuous path for electrons to flow. There\'s one path from 8 to 7 to 2 to 1 and back to 8 again. There\'s another from 8 to 7 to 6 to 3 to 2 to 1 and back to 8 again. And then there\'s a third path from 8 to 7 to 6 to 5 to 4 to 3 to 2 to 1 and back to 8 again. Each individual path (through R#sub[1], R#sub[2], and R#sub[3]) is called a #emph[branch]. The defining characteristic of a parallel circuit is that all components are connected between the same set of electrically common points. Looking at the schematic diagram, we see that points 1, 2, 3, and 4 are all electrically common. So are points 8, 7, 6, and 5. Note that all resistors as well as the battery are connected between these two sets of points. And, of course, the complexity doesn\'t stop at simple series and parallel either! We can have circuits that are a combination of series and parallel, too: #image("static/00084.png") In this circuit, we have two loops for electrons to flow through: one from 6 to 5 to 2 to 1 and back to 6 again, and another from 6 to 5 to 4 to 3 to 2 to 1 and back to 6 again. Notice how both current paths go through R#sub[1] (from point 2 to point 1). In this configuration, we\'d say that R#sub[2] and R#sub[3] are in parallel with each other, while R#sub[1] is in series with the parallel combination of R#sub[2] and R#sub[3]. This is just a preview of things to come. Don\'t worry! We\'ll explore all these circuit configurations in detail, one at a time! The basic idea of a \"series\" connection is that components are connected end-to-end in a line to form a single path for electrons to flow: #image("static/00085.png") The basic idea of a \"parallel\" connection, on the other hand, is that all components are connected across each other\'s leads. In a purely parallel circuit, there are never more than two sets of electrically common points, no matter how many components are connected. There are many paths for electrons to flow, but only one voltage across all components: #image("static/00086.png") Series and parallel resistor configurations have very different electrical properties. We\'ll explore the properties of each configuration in the sections to come. #core.review[ - In a series circuit, all components are connected end-to-end, forming a single path for electrons to flow. - In a parallel circuit, all components are connected across each other, forming exactly two sets of electrically common points. - A \"branch\" in a parallel circuit is a path for electric current formed by one of the load components (such as a resistor). ]
https://github.com/SillyFreak/typst-packages-old
https://raw.githubusercontent.com/SillyFreak/typst-packages-old/main/template/src/lib.typ
typst
MIT License
/// Adds two numbers. /// /// #example(mode: "markup", ``` /// $1 + 2 = #template.add(1, 2)$ /// ```) /// /// - x (number): the first summand /// - y (number): the second summand /// -> number #let add(x, y) = x + y /// Subtracts the second number from the first. /// /// #example(mode: "markup", ``` /// $1 - 2 = #template.sub(1, 2)$ /// ```) /// /// - x (number): the minuend /// - y (number): the subtrahend /// -> number #let sub(x, y) = x - y /// Multiplies two numbers. /// /// #example(mode: "markup", ``` /// $1 dot.c 2 = #template.mul(1, 2)$ /// ```) /// /// - x (number): the first factor /// - y (number): the second factor /// -> number #let mul(x, y) = x * y /// Divides the first number by the second. /// /// #example(mode: "markup", ``` /// $1 div 2 = #template.div(1, 2)$ /// ```) /// /// - x (number): the dividend /// - y (number): the divisor /// -> number #let div(x, y) = x / y
https://github.com/crd2333/crd2333.github.io
https://raw.githubusercontent.com/crd2333/crd2333.github.io/main/src/docs/Courses/计算机组成与设计/Arithmetic.typ
typst
--- order: 3 --- #import "/src/components/TypstTemplate/lib.typ": * #show: project.with( title: "计算机组成与设计", lang: "zh", ) #let tbl_white(white_row: 1 , content_size: 9pt,..args) = align(center, block[ #show table.cell: it => if it.y <= white_row - 1 { set text(fill: white, stroke: white) it } else { set text(size: content_size) it } #tbl(..args) ]) #counter(heading).update(2) = Arithmetic for Computer #info(caption: "Contents of Chapter 3")[ 3.1 Introduction \ 3.2 Signed and Unsigned Numbers-Possible Representations \ 3.3 Arithmetic--Addition & subtraction and ALU \ 3.4 Multiplication \ 3.5 Division \ 3.6 Floating point numbers \ ] == Introduction - Computer words are composed of bits - there are 32bits/word or 64bits/word in RISC-V - Simplified to contain only in course - memory-reference instructions: *lw*(load word), *sw*(store word), *ld*(load doubleword), *lh*(load halfword), *lb*(load byte) etc. - arithmetic-logical instructions: *add*, *sub*, *and*, *or*, *xor*, *slt*(set less than,比较) - control flow instructions: *beq*(branch equal), *bne*(branch not equal), *jal*(jump and link) - Generic Implementation - 用 *program counter(PC)*(也是 register 的一种) 来提供 instruction address - get instruction from memory - read registers - use the instruction to decide exactly what to do - 所有指令实际上都用到了 ALU == Signed and Unsigned Numbers Possible Representations - Numbers: different occasions have different meanings - IP Address - Machine instructions - Values of Binary number : - Integer - unsigned: $1001_2=9_(10)$ - signed: $1001_2= -1_(10)"(原码)," "or" -6 "(反码)," "or" -7_(10) "(补码)"$ - Fixed Point Number - Floating Point Number - 符号数:Sign Magnitude, One's Complement, Two's Complement, biased notation(移码,加一个最高位1的偏移量,常用于排序) #fig("/public/assets/Courses/计组/img-2024-03-04-09-22-59.png", width: 70%) - sign extension - lbu v.s. lb,lbu 会将高位补0,lb 会将高位补符号位 == Arithmetic - overflow: $v = C_n xor C_(n-1)$ - 溢出处理,把产生溢出的指令的地址存到 SEPC,由操作系统进行后续处理 - 多媒体数据的计算 - 对音视频的向量数据进行并行运算:SIMD(single-instruction, multiple-data) - 饱和操作(Saturating operation):当溢出时,结果为可以表示的最大值或最小值,而非二进制补码那样的取余 - Logical operations - Logical shift: right(srl), left(sll),不管符号位,均补 0 - Logical AND, OR, XOR #wrap-content( align: right, fig("/public/assets/Courses/计组/img-2024-03-06-10-29-33.png", width: 106%) )[ - Constructing an ALU - 两种方法 1. 加减法器加上前置的处理(extended the adder,之前数逻的想法) 2. 多个模块各司其职最后输出选择(Parallel redundant select,现在计组的想法) - 逐步构造:先做 1 bit,逐步扩展到想要的位数 - ALU 中的 comparison - 使用减法实现 - 检测 most significant bit,送回到 ALU0 ] - Speed considerations - Carry look-ahead adder(超前进位加法器) - Carry skip adder - 回忆行波进位加法器,每一个 $P_i$ 实际上一步就都算出来了,只是要等链式结构的后续进位 - Carry skip adder 就是提前把 $P_i$ 往前传,把每组 $P_i$ 提前算好 - Carry select adder - 用成本(翻倍)换性能 - 高 4 位和低 4 位同时算,高四位把进位为 $0 \/ 1$ 的都给提前算了,再根据低 4 位的结果进行 select == Multiplication - Multiplier V1: 用多次的左右移与加法实现 - 左移被乘数 A,右移乘数 B - 以 64 bit 为例 #fig("/public/assets/Courses/计组/img-2024-03-06-10-41-48.png", width: 70%) - Big, slow, expensive! - Multiplier V2 - 不左移被乘数 A,而是右移结果,移出去的低位就是已经算完的结果;乘数 B 跟 V1 相同 #fig("/public/assets/Courses/计组/img-2024-03-06-10-54-00.png", width: 70%) - Multiplier V3 - 注意到结果和乘数 B 都是右移,可以把它们放在一起共同移动,降低空间消耗 #fig("/public/assets/Courses/计组/img-2024-03-06-10-59-16.png", width: 70%) #fig("/public/assets/Courses/计组/img-2024-03-06-10-59-30.png", width: 70%) - Signed multiplication - 基本想法:把符号位提出来,然后用上述无符号方法计算,最后根据符号位进行处理 - 改进方法: Booth's Algorithm(Multiplication: V4) - 基本思想:把一连串(连续)的加法转换为一次加法和一次减法 #fig("/public/assets/Courses/计组/img-2024-03-06-11-05-12.png", width: 70%) #fig("/public/assets/Courses/计组/img-2024-03-06-11-05-53.png", width: 70%) - 实际上对于没有那么多连续 1 的数据并没有加速太多,但好处在于一起处理了符号位 - Faster Multiplication - 循环展开,用成本换性能 #fig("/public/assets/Courses/计组/img-2024-03-06-11-18-37.png", width: 70%) - RISC-V Multiplication - 64 位寄存器 1. mul: 给出低 64 位的结果 2. mulh: 给出高 64 位的结果(有符号) 3. mulhu: 给出高 64 位的结果(无符号) 4. mulhsu: 一个有符号一个无符号,给出高 64 位的结果 - 用 mulh 来检测乘法的溢出,分有符号无符号情况(硬件无法判断溢出与否,软件自己多写一个 mulh 来判断) == Division - Division V1: 同乘法的思路,模拟实际除法 #fig("/public/assets/Courses/计组/img-2024-03-06-11-26-47.png", width: 35%) - 64 bit 除法示意图 #fig("/public/assets/Courses/计组/img-2024-03-06-11-27-01.png", width: 60%) - Dicision V2: 相当于直接走了乘法的两步 - Divisor 右移改成结果左移 - 结果直接放在 Remainder 里 - 上来先整体左移一次,最后结果的左半边还要右移一次回去 #fig("/public/assets/Courses/计组/img-2024-03-06-11-36-40.png", width: 65%) - 例子:0111/0010 (7/2) #fig("/public/assets/Courses/计组/img-2024-03-06-11-39-00.png", width: 70%) - 初始先左移一次,然后左移位数次,最后右移左半部分 - Signed division - 规定余数符号与被除数 A 保持一致,商的符号就是数学意义上的符号 - Faster Division - 无法提前预知够不够减,因此无法像乘法那样并行 - RISC-V Division - Instructions: div, divu 得到商,rem, remu 得到余数 - 溢出处理由软件负责 == Floating Point === 浮点数的表示 - 需要类似科学计数法一样 normalized,即 $1.x x x x x x_2 times 2^(y y y y)$ - Representation: sign, fraction, exponent, more bits for fraction, more bits for exponent - Floating Point Standard,由 IEEE Std 754-1980 定义 - fraction,省掉一位;exponent,用移码表示 - 比较,按次序,先比符号位,再比 exponent,最后比 fraction #fig("/public/assets/Courses/计组/img-2024-03-13-10-09-49.png") - 单精度浮点数的表示范围(双精度类似) - Exponents $00000000$ and $11111111$ reserved - Smallest Value - Exponent: $00000001$ $=>$ Actual exponent: $1-127=-126$ - fraction: $000 dots 000$ $=>$ significand $=1.0$ - $+- 1.0 times 2^(-126) approx 1.2 times 10^(-38)$ - Largest Value - Exponent: $11111110$ $=>$ Actual exponent: $254-127=127$ - fraction: $111 dots 111$ $=>$ significand $approx 2$ - $+- 2.0 times 2^(127) approx 3.4 times 10^(38)$ - 单精度浮点数的表示精度(双精度类似) - Single: $approx 2^(–23)$ - Equivalent to $23 times log_10 2 approx 23 times 0.3 approx 7$ decimal digits of precision - 非规格化的数字 - 当 exponent 为全零(之前保留的),则表示非规格化数字,此时首位数字定义为 0,exponent 为 $1-"Bias"$ - 当 exponent 为全一(之前保留的),也表示非规格化数字,分为 infinities 和 NaNs #fig("/public/assets/Courses/计组/img-2024-03-13-10-34-50.png", width: 70%) #fig("/public/assets/Courses/计组/img-2024-03-13-10-40-48.png", width: 75%) === 浮点数的计算 ==== 加法 1. Alignment(小的往大的方向看齐) 2. The proper digits have to be added 3. Addition of significands 4. Normalization of the result 5. Rounding #fig("/public/assets/Courses/计组/img-2024-03-13-10-55-07.png") - 在硬件中的实现 #fig("/public/assets/Courses/计组/img-2024-03-13-11-01-19.png") ==== 乘法与除法 - 乘法相对简单,只需要分开计算把 exponents 相加,fractions 相乘,最后规格化 #fig("/public/assets/Courses/计组/img-2024-03-13-11-12-50.png", width: 65%) #fig("/public/assets/Courses/计组/img-2024-03-13-11-13-14.png", width: 65%) - 除法类似,分开计算把 exponents 相减,fractions 相除,最后规格化 === 浮点数计算讨论 - Associativity: $x + (y+z) != (x+y) + z$ - 尤其是在大数小数相加时,比如 $x = -1.5_(10) times 10^38, y = 1.5_(10) times 10^38, z = 1.0$,此时前者结果为 $0.0$,后者结果为 $1.0$ - FP Instructions in RISC-V - 寄存器:浮点数和整数的寄存器分开,整数指令与浮点指令也分开,不能混用 - $32$ 个浮点寄存器,这里 $f_0$ 没有必须为 0 的要求 - flw, fld, fsw, fsd - 运算指令 #fig("/public/assets/Courses/计组/img-2024-03-13-11-24-42.png", width: 60%) - PPT114 $~$ 117,讲解汇编语言 === 浮点数精确计算 - IEEE Std 754 specifies additional rounding control - Three extra bits of precision (guard, round, sticky) - Choice of rounding modes - 允许程序员微调不同的数值计算行为 - Round modes - Round to $0$; Round to $+infty$; Round to $-infty$; Round to next even number (default) - 舍入到最近偶数指的是两边距离相同时 #fig("/public/assets/Courses/计组/img-2024-04-02-11-29-30.png", width: 60%) - Guard and round #fig("/public/assets/Courses/计组/img-2024-04-02-11-04-02.png", width: 60%) - Sticky bit(粘滞位):如果 round bit 的右侧有任何 nonzero 的数,则设为 1 #fig("/public/assets/Courses/计组/img-2024-03-13-12-03-55.png", width: 60%)
https://github.com/ayoubelmhamdi/typst-phd-AI-Medical
https://raw.githubusercontent.com/ayoubelmhamdi/typst-phd-AI-Medical/master/chapters/ch09-wil.typ
typst
MIT License
#import "../functions.typ": heading_center, images, italic,linkb #let finchapiter = text(size: 24pt, fill:rgb("#1E045B"),[■]) #let S1 = "S1" #let S2 = "S2" #let S3 = "S3" = DETECTING LUNG CANCER NODULES. == Introduction Worldwide, lung cancer stands as the predominant cause of cancer-related deaths @Siegel2017Cancer2017. Timely discovery through screening chest scans can markedly increase the chances of survival @Nationallungscreening. Potentially, lung nodules - round or oval-shaped lumps detectable in chest scans - can indicate lung cancer @Gould2007EvaluationEdition. The efficiency of healthcare could benefit significantly from a computerized system capable of automatically identifying these nodules, conserving both time and resources for healthcare providers and patients. Two-part processes generally make up nodule-detection algorithms @Setio2016PulmonaryNetworks: - The initial stage seeks out a vast variety of possible nodules with high sensitivity; however, it generates numerous false positives. - The subsequent stage mitigates these false positives using enhanced features and classifiers - a difficult task due to the variables encompassing nodule shapes, sizes, types, and their potential resemblance to other chest components like blood vessels or lymph nodes @Gould2007EvaluationEdition@Roth2016ImprovingAggregation. In our research, we adopt the multi-scale gradual integration convolutional neural network (mgi-cnn) as a method to decrease false positives. This method presents three notable features: 1. It uses different-sized patches from the chest scan inputs; each size contributes varying information about the nodule and its surrounding area. 2. This method combines patches gradually across different network layers instead of simultaneous integration, leading to comprehensive feature learning from different scales. 3. Responsible for combining the patches, are two strategies: one ranges from small-to-large (zoom-in), and the other from large-to-small (zoom-out); providing varied perspective-information @Karpathy2014Large-ScaleNetworks@Shen2015@Shen2017Multi-cropClassification@Dou2016Multi-levelDetection. We examined this method through the public LUNA16 dataset, comprised of chest scans from 888 patients reviewed by four medical experts @Setio2016PulmonaryNetworks. Ultimately, the method displayed superior performance in curtailing false positives, chiefly at lower rates. This implies it can accurately identify more cancerous nodules and fewer non-cancerous ones @Lin2016FeatureDetection@Kamnitsas2017EfficientSegmentation. == Related Work === Volumetric Contextual Information In early attempts to automate lung cancer screenings, researchers relied on algorithms to extract unique characteristics of lung nodules. Emphasis was placed on the nodules' volumetric data and proximal areas, but these methods often struggled to differentiate the array of nodule variations correctly, requiring customization for each distinct nodules type@Jacobs2014AutomaticImages@Okumura1998AutomaticFilter@Li2003SelectiveScans. Researchers have, however, gradually refined these techniques, thanks greatly to advancements in deep-neural networks. These recent innovations, especially convolutional neural network (CNN) based methods, have shown promise in improving nodule classification@Roth2016ImprovingAggregation@Setio2016PulmonaryNetworks@Ding2017AccurateNetworks. === Multi-scale Contextual Information A significant shift in the lung nodule detection paradigm has been the incorporation of multi-scale contextual information, particularly with the Luna16 dataset. This approach capitalizes on deep learning methodologies to evaluate a vast array of morphological and structural features across diverse scales@Shen2015@Dou2016Multi-levelDetection. Several techniques have proven useful, including: - *The Multi-scale CNN (MCNN)* approach which leverages feature extraction from images across different scales to inform classifier training for nodule differentiation@Shen2015. - *The Multi-Crop CNN* technique that applies a combination of cropping and pooling approaches to extract noteworthy data from varying regions of convolutional feature map, fine-tuning detection accuracy@Shen2017Multi-cropClassification. Researchers have also suggested several promising strategies for lung anomaly detection, such as the use of 3D patches for enhanced accuracy with volumetric data and reduced false positives@Setio2016PulmonaryNetworks@Roth2016ImprovingAggregation. Gradual feature extraction, a sequential method involving merging context information from various scales, offers an alternative to the conventional practice of radical integration@Shen2015@Shen2017Multi-cropClassification. The holistic combination of these approaches has resulted in models that are more reliable and robust for lung nodule detection. The regions surrounding the potential lung nodules have been carefully examined and compared with other organs or tissues to enhance nodule differentiation@Shen2017Multi-cropClassification. Future improvements could include incorporating contextual data from adjacent areas to the nodules, thereby potentially enhancing the models' performance and accuracy significantly@Dou2016Multi-levelDetection@Shen2017Multi-cropClassification. == Introduction to the Method The Multi-Scale Gradual Integration Convolutional Neural Network, or MGI-CNN, applies to the identification of pulmonary nodules. It incorporates two principle components: Gradual Feature Extraction (GFE) and Multi-Stream Feature Integration (MSFI) @Dou2016Multi-levelDetection@Nair2010RectifiedMachines. === Process of Gradual Feature Extraction With GFE, the network merges contextual details from patches at varying scales step by step. It operates in two scenarios: Zoom-In and Zoom-Out @Zhang2014ScaleAnalysis@Shen2015@Shen2017Multi-cropClassification. Under the Zoom-In scenario, patches at rising scales endure filtration using local convolutional kernels. The network concatenates feature maps obtained from each scale with the ensuing patch and inputs them into convolution layers. This process continues until the network integrates all contextual details from all scales. On the other hand, Zoom-Out scenario follows the same procedure but reverses the order of the patches. This approach allows the network to amalgamate contextual features progressively, capturing both local and global information. As such, the network can target specific nodule areas or surrounding regions, thus effectively distinguishing nodules from other structures within the lung. === The Role of Multi-Stream Feature Integration MSFI, the network's other component, uses a combination of 'zoom-in' and 'zoom-out' information streams that reflect different scales of nodule form and context @Nair2010RectifiedMachines. These varying and complementary features enhance the detection of nodules. Part of MGI-CNN, MSFI combines features from different scales and perspectives. This application aims to enhance false positive reduction in lung nodule detection, employing the Luna16 dataset. To illustrate, consider a 3D patch of a lung image featuring a nodule. The aim is detecting the nodule and minimizing false positives. To achieve this, MSFI merges features from different scales and perspectives. The network uses two streams of input patches from the original patch: a 'zoom-in' stream, focusing on the nodule region, and a 'zoom-out' stream, covering a larger surrounding context. Separate scales, $S1$, $S2$, and $S3$, can be implemented for each stream. Next, the CNN extracts features from these patches and generates a feature map that encapsulates the patch characteristics. The final output from MSFI is a combined feature map containing information from both streams. Lastly, the network classifies the patch as a nodule or non-nodule using this combined feature map. It uses a classifier like a softmax layer, which assigns a probability to each class. The higher the probability, the more secure the prediction. In this way, MSFI enhances lung nodule detection performance by harnessing features from different scales and perspectives. These features capture both the morphological and contextual properties of the nodule, consequently reducing false positives. == Experimental Procedure and Outcomes === The Luna16 Dataset In the exploration of Deep-Learning for lung nodule detection, the LUNA16 challenge datasets became a crucial factor. This data, which includes 888 patients with lung nodules reviewed by four expert radiologists, formed the groundwork for our evaluation@Setio2017validation. We omitted patients with a slice thickness surpassing 2.5mm. When three radiologists agreed on a nodule, we classified it as Ground Truth (GT). This process resulted in a total of 1186 GT-confirmed nodules. Within the LUNA16 dataset, for the task of reducing False Positives (FPs), we received coordinates of the potential nodule, patient IDs, and respective labels. To process the information from the CT scans, we employed the extraction of 3D patches @Dou2016Multi-levelDetection. This involved three scale types: 40x40x26, 30x30x10, and 20x20x6, which ensured comprehensive nodule coverage. Later resizing to 20x20x6 was done by nearest-neighbor interpolation, and normalization between the range of [-1000, 400] HU @Hounsfield1980ComputedImaging. Training the network was facilitated by Xavier's initialization@glorot2010understanding and a learning rate of 0.003, encompassing 40 epochs. ReLU activation and a dropout rate of 0.5 were selected for fully-connected layers, and the use of stochastic gradient descent allowed for a batch size of 128. We measured the DNN's performance on the test data using the Competitive Performance Metric (CPM) @Niemeijer2011OnSystems. ==== The Calculation of CPM. Illustratively, let's use an example. Assume a dataset of 100 CT scans yielding the following model results: - Total lung nodules: 200 - True positives (TP): 150 - FPs: 800 - False negatives (FN): 50 FPPs calculated as FP divided by the total number of scans, in this case giving us 8 FPs per scan level, which meets our target. We then compute sensitivity by the formula TP / (TP + FN), yielding 75%. This implies the model accurately identifies 75% of lung nodules, permitting 8 FPs per scan. ==== Ratio of Nodules to Non-nodules. The data suggest a nodule-to-non-nodule ratio of approximately 1:6. Practically, this means for each nodule in the dataset, there are approximately six non-nodule samples. Importantly, balancing the representation of nodules versus non-nodules aids the machine learning model in learning from a diverse dataset. We achieved this 1:6 ratio through augmentation. Originally, at a 1:5 ratio, we created new nodule samples by shifting and rotating them along various axes. This provided a balanced dataset, improving model performance in detecting nodules. === CPM Result Evaluation of the model's performance used the CPM score as an average sensitivity across seven FP/scan levels (namely 0.125, 0.25, 0.5, 1, 2, 4, and 8) @Niemeijer2011OnSystems. Employing a 5-fold cross-validation, we achieved balance through the augmentation of nodule samples. === Evaluating the Model To determine the model's effectiveness, we compared it with existing state-of-the-art methods @Setio2016PulmonaryNetworks@Dou2016Multi-levelDetection. Our method surpassed others, boasting superior CPM scores across seven different FP/scan values. === The Benefit of the Chosen Techniques Examining the benefit of our unique method, we experimented with various multi-scale CNNs. Our method clearly outshone others, culminating in the best CPM and FP reduction average. This underlines the efficacy of the GFE and MSFI strategies we incorporated into our method. == Discussions Utilizing deep learning techniques, namely the LUNA16 dataset, for lung nodule detection greatly contributes to early diagnosis of lung cancer. The MGI-CNN structure, specifically tailored for this purpose, boasts two major strengths: - It enables the extraction of morphological and contextual features at varying scales from the input patches. Morphological and contextual information gets gradually incorporated through the zoom-in network, whereas the opposite occurs in the zoom-out network. Harnessing multi-scale information in these ways supplies complementary features, performance gets a boost as a result. - The structure allows for the integration of more abstract features from the two streams in MSFI, hence maximizing the reduction of false positives (FP) by blending features at a more abstract level where the morphological and contextual information remains intact. Three different methods: concatenation, element-wise summation, and 1x1 convolution, were sampled in an attempt to merge the feature maps of the two streams in MSFI @Lin2013network. Element-wise summation proved most effective in reducing FP, even though no significant variance in average CPM was noted among the three techniques. The original 3D patches were modified to 20x20x6 to align with the network's receptive field size, risking potential information loss or distortion. However, the essential nodule information was preserved as the majority of the patch was occupied by the nodule. Thus, the resizing operation left the performance largely unaffected. A thorough analysis was conducted on the 232 FPs left unattended by the MGI-CNN, categorizing them into three distinct groups formed based on their nodule probabilities: Low Confidence (p ranging from 0.5 to < 0.7); Moderate Confidence (p ranging from 0.7 to < 0.9); and High Confidence (p > 0.9). The majority of the FPs were essentially components of large tissues or organs that the network failed to differentiate from nodules. The Moderate Confidence group's FPs showcased low contrast, potentially rooted in the normalization process during preprocessing. This observation hints at the likelihood of performance enhancement if we utilized more patches of varying scales and employed different normalization methodologies. Our approach aims at enhancing the FP reduction segment of a typical lung nodule detection system which consists of two major components: a candidate detection segment and an FP reduction segment. The network can function in tandem with any candidate detection technique as it operates independently. Merging the network with advanced candidate detection techniques will presumably yield improved results. = CONCLUSION GÉNÉRALE. MGI-CNN, our architecture, is particularly designed to minimize FPs in lung nodule detection via CT scans. This is accomplished through three major strategies: multi-scale inputs with distinct levels of contextual information, gradual integration of data from different input scales, and multi-stream feature integration through end-to-end learning. Using these techniques, we can extract morphological features and gradually integrate contextual information in multi-scale patches, reducing the number of FPs and extracting morphological and contextual features from the nodule region. Performance analysis of the MGI-CNN on the LUNA16 challenge datasets yielded a mighty impressive average CPM of 0.942, significantly outperforming state-of-the-art techniques. Our methodology demonstrated exceptional effectiveness, particularly in conditions of low FP/scan. By undertaking minor modifications such as replacing fully-connected layers with $1 times 1$ convolution layers, our network could directly detect nodules from the CT scans, pushing the boundaries of cancer detection. Moving forward, our research aims at mastering subtype nodule classification, such as solid, non-solid, part-solid, perifissural, calcified, and spiculated nodules. Diverse treatments are required for different nodule types, making their accurate detection even more pertinent for successful treatment.
https://github.com/SciTXT/typst-semantics
https://raw.githubusercontent.com/SciTXT/typst-semantics/main/README.md
markdown
MIT License
# typst-semantics Adding a semantic layer to Typst, enabeling machine interpretable and actionable scientific texts ## Overview and Motivation There is currently a large movement in **science** to make scientific texts machine "understandable" / interpretable and actionable (e.g. in the *FAIR data movement*). A common path many scientists and developers follow is to relate each well defined term in a (scientific) text with a corresponding term from an *Ontology* or *Taxonomy*. By doing so, the text receives a context and each word receives a well defined meaning (=semantics). This enhanced text representation would enable computer programs to "understand" the context of a text and concrete meaning of a certain word in a sentence. This semantic information could, e.g., be used to display further information about a certain concept to the user, or to enable machine learning or AI to interpret the content of a text much more accurately. ## Example Text with semantics annotations The following text is an example text from the medical realm with references (in this case as CURIs) to external resources that define or explain the terms in more details (the given Links in brackets should only be shown to the user, when she/he moves over a certain term, they should ideally not appear while editing a **Typst** document - or they should be at least hide-able). `**Oxytocin** is a [peptide hormone](wikidata:Peptide_hormone) and [neuropeptide](wikidata:Neuropeptide) normally produced in the [hypothalamus](wikidata:Hypothalamus) and released by the [posterior pituitary](ncit:Posterior_pituitary).[[4]](https://en.wikipedia.org/wiki/Oxytocin#cite_note-4) [...] **Oxytocin** is released into the bloodstream as a hormone in response to [sexual activity](https://en.wikipedia.org/wiki/Human_sexual_activity) and during childbirth [...]` ## Repository structure Within this repository, different implementations should be explored, discussed and compared. Each **Branch** represents a certain implementation as a Proof-of-Concept. ## Discussions Please use the **Issues** section to discuss the different implementations and to propose new ideas or improvements.
https://github.com/OR-gatti/ThesisTemplate-Typst
https://raw.githubusercontent.com/OR-gatti/ThesisTemplate-Typst/main/main.typ
typst
#set heading(numbering: "1.") #set par(justify: true) #set page( numbering: "1", ) #show heading: it => [ #set text(9pt,font: "MS Gothic") #counter(heading).display() #emph(it.body) \ \ ] \ \ #align(center, text(14pt)[ #set text(font:"MS Gothic") *タイトルをここに入力* \ \ ]) #set text(font:"MS Mincho",size:9pt) #align(center, text(12pt)[ 〇〇〇〇〇〇〇〇工学科 #h(1.26cm) 高専太郎 \ \ ]) #show: rest => columns(2, rest) //本文はここから = まえがき #lorem(30) = 見出し #lorem(50) = 見出し #lorem(30) == 小見出し #lorem(30) == 小見出し #lorem(100) == 小見出し #lorem(50) = 見出し #lorem(50) = 見出し #lorem(100)
https://github.com/ClazyChen/Table-Tennis-Rankings
https://raw.githubusercontent.com/ClazyChen/Table-Tennis-Rankings/main/history/2010/MS-04.typ
typst
#set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (1 - 32)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [1], [MA Long], [CHN], [3299], [2], [WANG Hao], [CHN], [3127], [3], [WANG Liqin], [CHN], [3064], [4], [ZHANG Jike], [CHN], [3055], [5], [XU Xin], [CHN], [2997], [6], [BOLL Timo], [GER], [2974], [7], [MA Lin], [CHN], [2970], [8], [HAO Shuai], [CHN], [2939], [9], [<NAME>], [BLR], [2931], [10], [CHEN Qi], [CHN], [2930], [11], [JOO Saehyuk], [KOR], [2925], [12], [RYU Seungmin], [KOR], [2813], [13], [MAZE Michael], [DEN], [2787], [14], [KO Lai Chak], [HKG], [2722], [15], [KISHIKAWA Seiya], [JPN], [2695], [16], [LEE Jungwoo], [KOR], [2689], [17], [YOSHIDA Kaii], [JPN], [2686], [18], [MIZUTANI Jun], [JPN], [2686], [19], [GAO Ning], [SGP], [2678], [20], [TANG Peng], [HKG], [2678], [21], [OVTCHAROV Dimitrij], [GER], [2677], [22], [SU<NAME>], [GER], [2653], [23], [SEO Hyundeok], [KOR], [2636], [24], [OH Sangeun], [KOR], [2632], [25], [<NAME>], [AUT], [2625], [26], [YOON Jaeyoung], [KOR], [2617], [27], [APOLONIA Tiago], [POR], [2612], [28], [#text(gray, "ZHANG Chao")], [CHN], [2611], [29], [HOU Yingchao], [CHN], [2610], [30], [JIANG Tianyi], [HKG], [2593], [31], [CHUANG Chih-Yuan], [TPE], [2588], [32], [KREANGA Kalinikos], [GRE], [2584], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (33 - 64)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [33], [UEDA Jin], [JPN], [2584], [34], [PROKOPCOV Dmitrij], [CZE], [2575], [35], [KIM Junghoon], [KOR], [2566], [36], [CHEUNG Yuk], [HKG], [2558], [37], [<NAME>], [AUT], [2557], [38], [KORBEL Petr], [CZE], [2556], [39], [CHEN Weixing], [AUT], [2553], [40], [<NAME>], [SWE], [2553], [41], [<NAME>], [CRO], [2546], [42], [<NAME>], [HKG], [2540], [43], [<NAME>], [FRA], [2540], [44], [<NAME>], [QAT], [2531], [45], [SKACHKOV Kirill], [RUS], [2521], [46], [<NAME>], [GER], [2519], [47], [#text(gray, "QIU Yike")], [CHN], [2514], [48], [LUNDQVIST Jens], [SWE], [2510], [49], [<NAME>], [JPN], [2507], [50], [<NAME>], [PRK], [2505], [51], [<NAME>], [KOR], [2488], [52], [<NAME>], [CRO], [2487], [53], [<NAME>], [KOR], [2486], [54], [<NAME>], [GRE], [2484], [55], [KIM Minseok], [KOR], [2473], [56], [<NAME>], [JPN], [2460], [57], [<NAME>], [DOM], [2460], [58], [<NAME>], [GER], [2456], [59], [RUBTSOV Igor], [RUS], [2449], [60], [#text(gray, "KONG Linghui")], [CHN], [2439], [61], [FEJER-KONNERTH Zoltan], [GER], [2439], [62], [<NAME>], [RUS], [2436], [63], [<NAME>], [POL], [2435], [64], [<NAME>], [POL], [2432], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (65 - 96)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [65], [CHO Eonrae], [KOR], [2427], [66], [YAN An], [CHN], [2424], [67], [<NAME>], [RUS], [2423], [68], [<NAME>], [IND], [2418], [69], [<NAME>], [SWE], [2416], [70], [<NAME>], [KOR], [2410], [71], [<NAME>], [KOR], [2401], [72], [<NAME>], [SGP], [2396], [73], [<NAME>], [PRK], [2396], [74], [<NAME>], [DEN], [2394], [75], [#text(gray, "<NAME>")], [SWE], [2391], [76], [<NAME>], [ROU], [2387], [77], [<NAME>], [CRO], [2385], [78], [<NAME>], [CZE], [2381], [79], [<NAME>], [BEL], [2378], [80], [<NAME>], [SVK], [2371], [81], [<NAME>], [RUS], [2364], [82], [<NAME>], [JPN], [2357], [83], [<NAME>], [ESP], [2351], [84], [<NAME>], [KOR], [2349], [85], [<NAME>], [ENG], [2347], [86], [<NAME>], [SLO], [2333], [87], [<NAME>], [FRA], [2333], [88], [<NAME>], [BLR], [2324], [89], [TAKAKIWA Taku], [JPN], [2323], [90], [<NAME>], [BRA], [2321], [91], [<NAME>], [DEN], [2317], [92], [<NAME>], [GER], [2314], [93], [<NAME>], [HKG], [2313], [94], [<NAME>], [FRA], [2312], [95], [BLASZCZYK Lucjan], [POL], [2312], [96], [<NAME>], [SGP], [2312], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (97 - 128)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [97], [KASAHARA Hiromitsu], [JPN], [2309], [98], [PETO Zsolt], [SRB], [2309], [99], [BOBOCICA Mihai], [ITA], [2304], [100], [<NAME>], [ROU], [2302], [101], [SHIONO Masato], [JPN], [2301], [102], [<NAME>], [SVK], [2298], [103], [<NAME>], [JPN], [2296], [104], [CHIANG Peng-Lung], [TPE], [2293], [105], [SVENSSON Robert], [SWE], [2292], [106], [WOSIK Torben], [GER], [2291], [107], [LIVENTSOV Alexey], [RUS], [2287], [108], [KOSOWSKI Jakub], [POL], [2287], [109], [JAKAB Janos], [HUN], [2280], [110], [<NAME>], [KOR], [2275], [111], [<NAME>], [SVK], [2272], [112], [CHIANG Hung-Chieh], [TPE], [2272], [113], [#text(gray, "YANG Min")], [ITA], [2269], [114], [<NAME>], [ESP], [2268], [115], [RI Chol Guk], [PRK], [2267], [116], [BURGIS Matiss], [LAT], [2259], [117], [TORIOLA Segun], [NGR], [2259], [118], [#text(gray, "LEI Zhenhua")], [CHN], [2255], [119], [MENGEL Steffen], [GER], [2255], [120], [SHIMOYAMA Takanori], [JPN], [2252], [121], [FREITAS Marcos], [POR], [2252], [122], [SHMYREV Maxim], [RUS], [2251], [123], [<NAME>], [POL], [2251], [124], [NIWA Koki], [JPN], [2251], [125], [FANG Bo], [CHN], [2249], [126], [<NAME>], [CZE], [2243], [127], [<NAME>], [POR], [2240], [128], [<NAME>], [SGP], [2235], ) )
https://github.com/davidmasp/naturelike
https://raw.githubusercontent.com/davidmasp/naturelike/main/naturelike.typ
typst
// this function allow for the creation // of a nature-like preprint. // title: the title of the paper // authors: an array of authors. Each author can have a name and a affiliation* // abstract: the abstract of the paper // paper-size: the size of the paper. Default is us-letter // bibliography-file: the bib file to use for the references // * wip for corresponding an co-first authors #let naturelike( // The paper's title. title: "Paper Title", article_type: "Article", authors: (), abstract: none, paper-size: "us-letter", bibliography-file: none, body ) = { set document(title: title, author: authors.map(author => author.name)) // font for the main text set text(font: "Roboto Slab", size: 10pt) // Configure the page. set page( paper: paper-size, margin: if paper-size == "a4" { (x: 41.5pt, top: 80.51pt, bottom: 89.51pt) } else { ( x: (50pt / 216mm) * 100%, top: (60pt / 279mm) * 100%, bottom: (64pt / 279mm) * 100%, ) }, header: align(left)[ #text(article_type, font: "Roboto Serif",weight: "extrabold", size: 16pt) #place(top , dy: 50pt, line( length: 100%)) ], foreground: place( top + left, dx: 40pt, line(start: (0pt, 30pt), end: (0pt, ((279mm - 64pt) / 279mm) * 100%)), ), numbering: "1", footer: [ #set text(8pt, weight: "extrabold", font: "Roboto") #counter(page).display( "1" ) #set text(8pt, weight: "regular", font: "Roboto") | #h(2pt) Test #h(2pt) | #h(2pt) pub.masponte.com ] ) // this comes from the ieee template, probably should change // Configure equation numbering and spacing. set math.equation(numbering: "(1)") show math.equation: set block(spacing: 0.65em) // Configure appearance of equation references show ref: it => { if it.element != none and it.element.func() == math.equation { // Override equation references. link(it.element.location(), numbering( it.element.numbering, ..counter(math.equation).at(it.element.location()) )) } else { // Other references as usual. it } } // Configure lists. set enum(indent: 10pt, body-indent: 9pt) set list(indent: 10pt, body-indent: 9pt) show heading: it => locate(loc => { let levels = counter(heading).at(loc) let deepest = if levels != () { levels.last() } else { 1 } set text(11pt, weight: 400) if it.level == 1 [ #set par(first-line-indent: 0pt) #let is-ack = it.body in ([Acknowledgment], [Acknowledgement], [References]) #set text(if is-ack { 11pt } else { 15pt }, weight: "bold") #v(25pt, weak: true) #it.body #v(10pt, weak: true) ] else if it.level == 2 [ #set par(first-line-indent: 0pt) #v(10pt, weak: true) #set text(12pt, weight: "bold") #it.body #v(10pt, weak: true) ] else [ _#(it.body):_ ] }) // TITLE v(1pt, weak: true) align(left, text(20pt, font: "Roboto Serif", weight: "extrabold", title)) v(10mm, weak: true) line(length: 100%) // here is the header with the authors and the metadata on the left. // TODO: doi+date will need to be added in the function arguments! grid( columns: (1fr, 3fr), gutter: 2pt, { set text(size: 8pt) grid(rows: 12pt, [#link("doi.org/10.99")], [*Received*: 17 July 2023], [*Updated*: 18 July 2023] ) }, { let affl_dict = (:); let curr_affl = 0; for i in range(authors.len()){ text(authors.at(i).name) let dpt_name_arr = authors.at(i).affiliation //text(str(type(dpt_name_arr))) if type(dpt_name_arr) == "string" { if dpt_name_arr in affl_dict.keys() { super(text(str(affl_dict.at(dpt_name_arr)))) } else { curr_affl = curr_affl + 1 affl_dict.insert(dpt_name_arr, curr_affl) super(text(str(affl_dict.at(dpt_name_arr)))) } } else{ for j in range(dpt_name_arr.len()) { let dpt_name = dpt_name_arr.at(j) if dpt_name in affl_dict.keys() { super(text(str(affl_dict.at(dpt_name)))) } else { curr_affl = curr_affl + 1 affl_dict.insert(dpt_name, curr_affl) super(text(str(affl_dict.at(dpt_name)))) } if j != dpt_name_arr.len() -1 { super(text(",")) } } } // this is 0-idx if (i == (authors.len() - 2)) { text(" & ") } else if (i != (authors.len() -1)) { text(", ") } else { text(".") } } v(5pt) for j in affl_dict.keys(){ super(text(str(affl_dict.at(j)))) h(1pt) text(str(j), size: 8pt) text(".", size: 8pt) h(3pt) } v(12pt, weak: true) if abstract != none [ #set text(9pt, weight: 500) #abstract #v(15pt) ] } ) set text(8pt, weight: 400) // Start two column mode and configure paragraph properties. show: columns.with(2, gutter: 15pt) set par(justify: true, first-line-indent: 0em) show par: set block(spacing: 0.65em) // Display the paper's contents. body // Display bibliography. // because display is nature, this template requires // version 0.9.0 if bibliography-file != none { show bibliography: set text(8pt) bibliography(bibliography-file, title: text(10pt)[References], style: "nature") } }
https://github.com/typst-community/mantodea
https://raw.githubusercontent.com/typst-community/mantodea/main/README.md
markdown
MIT License
# Mantodea A template & package for documents targeting the Typst developer community. This includes specifications, guidelines, documentation and more. # TODOS - [ ] Documenation - [ ] write a guide section - [ ] add examples to the docs - [ ] Functionality - [ ] Port author reading code from unreleased thesis template to here - [ ] Mantys like building blocks for documentation adjacent purposes - [ ] API - [ ] improved higher level API - [ ] error handling This template is a fork of [mantys](https://github.com/jneug/typst-mantys).
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/026_Eldritch%20Moon.typ
typst
#import "@local/mtgset:0.1.0": conf #show: doc => conf("Eldritch Moon", doc) #include "./026 - Eldritch Moon/001_The Archmage of Goldnight.typ" #include "./026 - Eldritch Moon/002_Stone and Blood.typ" #include "./026 - Eldritch Moon/003_Emrakul Rises.typ" #include "./026 - Eldritch Moon/004_Innistrad's Last Hope.typ" #include "./026 - Eldritch Moon/005_Campaign of Vengeance.typ" #include "./026 - Eldritch Moon/006_Saint Traft and the Flight of Nightmares.typ" #include "./026 - Eldritch Moon/007_Battle of Thraben.typ" #include "./026 - Eldritch Moon/008_The Promised End.typ"
https://github.com/SnO2WMaN/modallogic-text
https://raw.githubusercontent.com/SnO2WMaN/modallogic-text/main/main.typ
typst
Do What The F*ck You Want To Public License
#import "template.typ": * #show: ams-article.with( title: [標準様相論理の諸性質とその形式化], authors: ( ( name: "SnO2WMaN", url: "sno2wman.net" ), ), abstract: [ 標準様相論理の諸性質,具体的には健全性,完全性などについて,自己完結した証明を与える. また本書の証明は定理証明支援系であるLean 4によって形式化したので,それについて少し述べる. ], bibliography-file: "bib.yaml", ) #let vdash = $tack.r$ 本書の証明は @openlogic, @kikuchi2016 などを参照しているが,一部改変している. 特に強完全性定理の為のLindenbaum補題はZornの補題を用いて大幅に省略している. #theorem[ 以下のように,論理式の形を規定する式を公理図式という.すなわち,$Phi,Psi$を適当な論理式で置き換えたものは論理式となる. 公理図式は論理式ではないことに注意せよ. ある公理図式に対し,その形を満たす論理式の集合を公理集合という. 以下では,記号を濫用し,公理図式を表す記号と対応する公理集合を同じ記号で表すことにする. 例えば,$K$は公理図式を表す記号だが,同時に$K$の形を満たす公理集合を表す記号でもあるとする. ] #theorem[ 公理集合の合併もまた公理集合である. ただし,普通は$union$は省略して繋げて表す. また,一般に考える公理集合には大抵$K$が含まれるので,$K$は先頭に置かれる. すなわち,$K union Lambda_1 union Lambda_2$は$K Lambda_1 Lambda_2$と表記する. 更に,いくつかの公理集合の合併には特別な名前が存在する. - 一般に,$K T 4$は$S 4$,$K T 5$は$S 5$ と表記する. - $K L$ は一般に $G L$ と表記される. ] #theorem[ $Gamma$は論理式の集合,$phi$は論理式とする. 公理集合$Lambda$に対し,$Gamma$から$phi$への*演繹*を$Gamma vdash_Lambda phi$と書き,以下のように再帰的に定める. 1. $phi in Gamma$のとき,$Gamma vdash_Lambda phi$ 2. $phi in Lambda$のとき,$Gamma vdash_Lambda phi$ 3. $Gamma_1 vdash_Lambda phi -> psi$かつ$Gamma_2 vdash_Lambda phi$があるとき,$Gamma_1 union Gamma_2 vdash_Lambda psi$ 4. $emptyset vdash_Lambda phi$のとき,任意に$Gamma$を取って$Gamma vdash_Lambda square.stroked phi$ 5. $phi$が以下の(古典)命題論理の公理の形であるとき,任意に$Gamma$を取って$Gamma vdash_Lambda phi$ $Gamma$から$phi$への演繹$Gamma vdash phi$が存在する(あるいは構成出来る)とき,$Gamma$から$phi$は*演繹可能*であるという. ] #theorem[ $Gamma$から$bot$が演繹可能なとき,$Gamma$は*$Lambda$矛盾*しているという.逆に$bot$が演繹可能でないなら,$Gamma$は$Lambda$矛盾していないまたは*$Lambda$無矛盾*という. ] #theorem[ $Gamma subset.eq Delta$ならば,$Gamma vdash_Lambda phi$から$Delta vdash_Lambda phi$を構成可能. ] #proof[ 演繹の構成による帰納法を用いればよい. モーダスポネンスの場合以外はほぼ明らか. モーダスポネンスの場合について示す. $Gamma vdash_Lambda phi$が$Gamma_1 vdash_Lambda psi -> phi$と$Gamma_2 vdash_Lambda psi$より構成された演繹だとする. このとき,$Gamma = Gamma_1 union Gamma_2 subset.eq Delta$であることに注意する. 明らかに,$Gamma_1 subset.eq Delta$と$Gamma_2 subset.eq Delta$であるから,帰納法の仮定より演繹$Delta vdash_Lambda psi -> phi$と$Delta vdash_Lambda psi$を構成出来て, これよりモーダスポネンスから$Delta union Delta vdash_Lambda phi$を構成出来る.$Delta union Delta = Delta$だから,$Delta vdash_Lambda phi$が構成出来て題意は示される. ] #theorem[ $Lambda subset.eq Lambda'$ならば,$Gamma vdash_Lambda phi$から$Gamma vdash_Lambda' phi$を構成可能. ] #proof[ 明らか. ] #theorem[ $Gamma union {phi} vdash_Lambda psi$ から $Gamma vdash_Lambda phi -> psi$ が構成可能である,逆もまた然り. ] #proof[ 逆の場合は $Gamma union {phi} vdash_Lambda phi$ から弱化とモーダスポネンスより直ちに明らかである. 順の場合については,$Gamma vdash_Lambda psi$ から $Gamma \\ {phi} vdash_Lambda phi -> psi$ が構成可能という形で示せば十分. ] #theorem[ 任意の演繹$Gamma vdash_Lambda phi$に対し,ある有限集合$Delta subset.eq Gamma$が存在して$Delta vdash_Lambda phi$が構成可能. ]
https://github.com/liuguangxi/erdos
https://raw.githubusercontent.com/liuguangxi/erdos/master/Problems/typstdoc/figures/p321_1.typ
typst
#import "@preview/cetz:0.2.1" #cetz.canvas(length: 6pt, { import cetz.draw: * let a = 6 let b = 18 let dx = a let dy = calc.sqrt(3)*a line(stroke: none, fill: orange.lighten(30%), close: true, (a - dx, 0 - dy), (0.5*a - dx, 0.5*calc.sqrt(3)*a - dy), (-0.5*a - dx, 0.5*calc.sqrt(3)*a - dy), (-a - dx, 0 - dy), (-0.5*a - dx, -0.5*calc.sqrt(3)*a - dy), (0.5*a - dx, -0.5*calc.sqrt(3)*a - dy) ) line(stroke: 2pt, close: true, (b, 0), (0.5*b, 0.5*calc.sqrt(3)*b), (-0.5*b, 0.5*calc.sqrt(3)*b), (-b, 0), (-0.5*b, -0.5*calc.sqrt(3)*b), (0.5*b, -0.5*calc.sqrt(3)*b) ) arc(stroke: none, fill: blue, mode: "PIE", (-dx+2, -dy), radius: 2, start: 0deg, delta: 87deg ) line(stroke: purple+1.5pt, mark: (end: "stealth", fill: purple), (-dx+1.5*a, -dy), (-dx, -dy), (-dx+0.5, -dy+11*calc.sqrt(3)*0.5) ) content((-dx+2.5, -dy+2.5), $theta$) })
https://github.com/sitandr/typst-examples-book
https://raw.githubusercontent.com/sitandr/typst-examples-book/main/src/packages/headers.md
markdown
MIT License
# Headers ## `hydra`: Contextual headers We have discussed in `Typst Basics` how to get current heading with `query(selector(heading).before(here()))` for headers. However, this works badly for nested headings with numbering and similar things. For these cases there is `hydra`: ```typ #import "@preview/hydra:0.5.1": hydra #set page(height: 10 * 20pt, margin: (y: 4em), numbering: "1", header: context { if calc.odd(here().page()) { align(right, emph(hydra(1))) } else { align(left, emph(hydra(2))) } line(length: 100%) }) #set heading(numbering: "1.1") #show heading.where(level: 1): it => pagebreak(weak: true) + it = Introduction #lorem(50) = Content == First Section #lorem(50) == Second Section #lorem(100) ```
https://github.com/krestenlaust/AAU-Typst-Template
https://raw.githubusercontent.com/krestenlaust/AAU-Typst-Template/main/singlefile-template/main.typ
typst
MIT License
#import "template.typ": * // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( meta: ( title: "Explaining Quantum Mechanics to a Child, Like a Boss: Enable Understanding for Small People", theme: "Scientific Theme", project_period: "Fall Semester 2010", project_group: "cs-23-sw-1-p1-15", participants: ( (name: "<NAME>", email: "<EMAIL>"), (name: "<NAME>", email: "<EMAIL>"), (name: "<NAME>", email: "<EMAIL>"), (name: "<NAME>", email: "<EMAIL>"), (name: lorem(5), email: "<EMAIL>"), ), supervisor: ( (name: "<NAME>", email: "<EMAIL>"), (name: "<NAME>", email: "<EMAIL>"), ), date: datetime.today().display() ), // Insert your abstract after the colon, wrapped in brackets. // Example: `abstract: [This is my abstract...]` abstract: lorem(59), department: "Computer Science", ) // We generated the example code below so you can see how // your document will look. Go ahead and replace it with // your own content! = Introduction #lorem(60) == In this paper #lorem(20) === Contributions #lorem(40) = Related Work #lorem(500)
https://github.com/Dicarbene/note-typst
https://raw.githubusercontent.com/Dicarbene/note-typst/master/notes/UI-Library-design/UI-Component-Design.typ
typst
MIT License
#import "../../templates/ams/template.typ": * #import "../../utils/algorithmic.typ" #let algorithm = algorithmic.algorithm #show: ams-article.with( title: "UI library design", authors: ( ( name: "Dicarbene (wxj)", ), ), bibliography-file: "refs.bib", ) = abstract == Button === props - content - icon - type - size - iconPlacement - disabled - loading === button types #algorithm({ import algorithmic: * Function("Binary-Search", args: ("A", "n", "v"), { Cmt[Initialize the search range] Assign[$l$][$1$] Assign[$r$][$n$] State[] While(cond: $l <= r$, { Assign([mid], FnI[floor][$(l + r)/2$]) If(cond: $A ["mid"] < v$, { Assign[$l$][$m + 1$] }) ElsIf(cond: [$A ["mid"] > v$], { Assign[$r$][$m - 1$] }) Else({ Return[$m$] }) }) Return[*null*] }) }) === source code ``` <template> <div class="gt-ui-button" :class="buttonClass"> <template v-if="type === 'icon'"> <i v-if="useIconfont" class="gt-uicomponents-iconfont icon" :class="icon"></i> <img v-else class="icon-url" :src="icon" alt=""> </template> <span>{{ content }}</span> </div> </template> <script> const TYPE_ENUM = ['primary', 'secondary', 'normal', 'outline', 'text']; const SIZE_ENUM = ['tiny','small','medium','large']; const ICON_PLACEMENT_ENUM = ['left','right']; export default { name: 'GtUiButton', props: { content: { required: true, type: String, default: 'default' }, type: { required: false, validator(value) { return Object.values(TYPE_ENUM).includes(value); }, default: 'normal' }, theme: { required: false, validator(value) { return Object.values(THEME_ENUM).includes(value); }, default: 'default' }, size: { required: false, validator(value) { return Object.values(SIZE_ENUM).includes(value); }, type: String, default: 'medium' }, iconPlacement: { required: false, validator(value) { return Object.values(SIZE_ENUM).includes(value); }, type: String, default: 'left', }, disabled: { required: false, type: Boolean, default: false }, loading: { required: false, type: Boolean, default: false, } }, computed: { buttonClass() { return `gt-ui-button_${this.type} gt-ui-button_${this.type}_${this.theme}` }, useIconfont() { return this.icon?.startsWith('icon'); } } } </script> <style lang='less' scoped> @import "./index.less"; </style> ```
https://github.com/michidk/cv
https://raw.githubusercontent.com/michidk/cv/main/src/template/color.typ
typst
#let colors = ( heading: rgb("#585858"), link: rgb("#09306e"), accent: rgb("#81d4fa"), )
https://github.com/monaqa/typscrap.nvim
https://raw.githubusercontent.com/monaqa/typscrap.nvim/master/class/lib.typ
typst
#import "layout.typ" #import "states.typ" #import "component.typ" #import "colors.typ"
https://github.com/cbr9/CV
https://raw.githubusercontent.com/cbr9/CV/main/modules/education.typ
typst
Apache License 2.0
#import "../template/template.typ": * #cvSection("Education") #cvEntry( title: [M.Sc. Computational Linguistics], society: [University of Stuttgart], date: [April 2021 - September 2023], location: [Germany], logo: "../src/logos/uni-stuttgart.png", description: list( ) ) #cvEntry( title: [B.A. Linguistics], society: [University of Cádiz], date: [September 2016 - December 2020], location: [Spain], logo: "../src/logos/uni-cadiz.png", description: list( ) )
https://github.com/vncsb/desec-typst-template
https://raw.githubusercontent.com/vncsb/desec-typst-template/main/report.typ
typst
#import "settings.typ": * #import "table-headers.typ": h-header, v-header #include "cover.typ" #pagebreak() #set text(font: "Arial", size: 12pt) #set page( paper: "us-letter", margin: (top: 3cm, left: 2cm, right: 2cm, bottom: 2cm), header: [ #align(left)[ #image("images/header.png", width: 3.16cm, height: 0.99cm) ] ], footer: [ #set text(size: 9pt) #align(center)[ #grid( columns: (1fr, 1fr), rows: 1, align: (left, right), stroke: (top: 0.5pt), inset: 5pt, [PENETRATION TESTING REPORT | BUSINESS CORP], [_CONFIDENCIAL_], ) #image("images/footer.png", width: 2.58cm, height: 0.80cm) ] ], footer-descent: 0%, ) #show heading: set text(fill: highlight-fill-color, size: 14pt) = Controle de Versões \ #h-header( table( columns: (1fr, 1fr, 1fr, 1fr), [DATA], [VERSÃO], [AUTOR], [ALTERAÇÕES], [zc], [zxcv], [zxcv], [zcvv], [xcv], [zxcv], ), ) \ \ #h-header( table( columns: 1fr, table.header([_CONFIDENCIAL_]), [ _Este documento contém informações proprietárias e confidenciais e todos os dados encontrados durante os testes e presentes neste documento foram tratados de forma a garantir a privacidade e o sigilo dos mesmos. A duplicação, redistribuição ou uso no todo ou em parte de qualquer forma requer o consentimento da *BusinessCorp*_. ] ), ) #pagebreak() = Aviso Legal \ O Pentest foi realizado durante o período de *01/05/2020* até *15/05/2020*. As constatações e recomendações refletem as informações coletadas durante a avaliação e estado do ambiente naquele momento e não quaisquer alterações realizadas posteriormente fora deste período. \ O trabalho desenvolvido pela DESEC SECURITY *NÃO* tem como objetivo corrigir as possíveis vulnerabilidades, nem proteger a CONTRATANTE contra ataques internos e externos, nosso objetivo é fazer um levantamento dos riscos e recomendar formas para minimizá-los. \ As recomendações sugeridas neste relatório devem ser testadas e validadas pela equipe técnica da empresa CONTRATANTE antes de serem implementadas no ambiente em produção. A DESEC SECURITY *não se responsabiliza* por essa implementação e possíveis impactos que possam vir a ocorrer em outras aplicações ou serviços. \ \ = Informações de Contato \ #h-header( table( columns: (1fr, 1fr, 1.5fr), [NOME], [CARGO], [INFORMAÇÕES], table.cell( fill: highlight-fill-color, align: center + horizon, colspan: 3, text(fill: white)[*BUSINESS CORP*], ), [<NAME>], [Diretor de Segurança da Informação], [ *Telefone*: (00) 0 1234-4321 \ *Email*: <EMAIL> ], table.cell( fill: highlight-fill-color, align: center + horizon, colspan: 3, text(fill: white)[*CORPO TÉCNICO | DESEC SECURITY*], ), [<NAME>], [Penetration Tester], [ *Telefone*: (00) 0 1234-4321 \ *Email*: <EMAIL> ], ), ) #pagebreak() #let critical = table.cell( fill: critical-color, text(fill: white)[Crítico], ) #let high = table.cell( fill: high-color, text(fill: white)[Alto], ) #let medium = table.cell( fill: medium-color, text(fill: white)[Médio], ) #let low = table.cell( fill: low-color, text(fill: white)[Baixo], ) = Sumário Executivo \ A Desec Security avaliou a postura de segurança da Business Corp através de um Pentest Externo pelo período de 01 de maio de 2020 até 15 de maio de 2020. Os resultados das avaliações efetuadas no ambiente a partir da internet demonstram que a empresa possui sérios riscos cibernéticos com a presença de vulnerabilidades de nível *CRÍTICO* que *comprometem a integridade, disponibilidade e o sigilo de informações sensíveis*. \ #figure( image("images/graph.png", width: 100%), ) #h-header( table( columns: (auto, 1fr), [RISCO], [VULNERABILIDADE], critical, [A falha no webmin permite obter arquivos sensíveis do servidor *(CVE-2006-3392)*], high, [Foi possível acessar contas válidas do webmail através de credenciais obtidas na internet], ), ) \ É altamente recomendável que a Business Corp resolva as vulnerabilidades classificadas como risco crítico com *alta prioridade* para que não haja um impacto negativo para os negócios, visto a criticidade das vulnerabilidades encontradas e passíveis de serem exploradas através da internet. #pagebreak() A tabela abaixo resume as principais vulnerabilidades e riscos encontrados durante os testes realizados e ao final deste relatório são propostas as recomendações para mitigação dos problemas encontrados. #text(size: 10pt)[ #v-header( table( columns: (auto, 1fr), align: left + horizon, [Descrição], [A falha no webmin permite obter arquivos sensíveis do servidor (CVE-2006-3392)], [Risco], critical, [Impacto], [Explorando a vulnerabilidade é possível obter arquivos sensíveis do servidor e posteriormente descobrir as credenciais de acesso ao SSH.], [Sistema], [http://intranet.businesscorp.com.br:10000], [Recomendação], [Atualizar a versão do webmin e melhorar a política de senhas], ), ) ] #pagebreak() = Introdução \ A Desec Security foi contratada para conduzir uma avaliação de segurança _(Penetration Testing)_ no ambiente digital da Business Corp. A avaliação foi conduzida de maneira a simular um ciberataque à partir da internet com o objetivo de determinar o impacto que possíveis vulnerabilidades de segurança possam ter no que diz respeito à *integridade, disponibilidade e confidencialidade* das informações da empresa contratante. Os testes foram realizados entre os dias 01 de maio de 2020 e 15 de maio de 2020 e este documento contém todos os resultados. O método utilizado para a execução do serviço proposto segue rigorosamente as melhores práticas de mercado, garantindo a adequação às normas internacionais de segurança da informação, e os relatórios gerados apontam evidências quanto à segurança do ambiente definido no escopo. = Escopo #h-header( table( columns: (1fr, 1fr), [TIPO DE AVALIAÇÃO], [DETALHES], [Pentest Black Box Externo], [172.16.58.3], [Pentest Black Box Externo], [192.168.3.11], [Pentest Black Box Externo], [172.16.58.3], ), ) De acordo com o combinado e acordado entre as partes, a avaliação escolhida foi do tipo *Black Box (sem conhecimento de informações)*, ou seja, a única informação oferecida pela CONTRATANTE foi uma URL. #pagebreak() #set list( indent: 15pt, marker: align(center + horizon)[ #square( width: 5pt, fill: highlight-fill-color, stroke: highlight-fill-color, ) ], ) = Limitações do Escopo \ As *limitações* impostas pela CONTRATANTE foram: - Os testes devem encerrar caso seja possível comprometer algum host na rede interna - Ataques DoS e DDoS (Negação de Serviço) - Ataques de Engenharia Social = Metodologia \ Para execução destes trabalhos, a Desec Security adotou a metodologia própria mesclada com padrões existentes e solidamente reconhecidos, tais como PTES (Penetration Testing Execution Standard) e OWASP Top Ten nas quais foram executados nas seguintes fases: - Coleta de Informações - Varredura - Enumeração - Exploração - Pós Exploração - Documentação A fase de coleta de informações tem como objetivo mapear a superfície de ataque, identificando informações sobre blocos de ip, subdomínios e ambientes digitais de propriedade da Business Corp. A fase de varredura consiste em identificar portas abertas, serviços ativos e possíveis mecanismos de defesa. A fase de enumeração permite identificar detalhes sobre os serviços ativos, identificando possíveis versões, fornecedores, usuários e informações que possam ser uteis para o sucesso de um ataque. A fase de exploração tem como objetivo explorar as possíveis vulnerabilidades identificadas nos serviços e sistemas identificados nas fases anteriores e obter acesso ao sistema. A fase de pós exploração tem como objetivo aprofundar o ataque obtendo mais privilégios e aumentando o nível de acesso, se deslocando para outros sistemas afim de controlar ou extrair dados mais sensíveis. A fase de documentação consiste em relatar todos os resultados obtidos nas fases anteriores. #pagebreak() #align(center)[ #heading()[Narrativa da Análise Técnica] ] \ Os testes iniciaram no dia 01/05/2020 de posse apenas dos endereços informados pelo cliente. \ #align(center)[ #heading()[HOST 172.16.58.3] ] \ #show raw.where(block: false): box.with( fill: luma(240), inset: (x: 3pt, y: 0pt), outset: (y: 3pt), radius: 2pt, ) #show raw.where(block: true): block.with( fill: luma(240), inset: 10pt, radius: 4pt, ) = _Coleta de Informações_ \ Durante a fase de coleta de informações identificamos que o bloco de IP registrado para *Business Corp*. #align(center)[ #h-header( table(columns: auto, [BLOCO DE IP], [172.16.31.10 - 192.168.3.11]), ) ] \ #figure( image("images/ip-block.png", width: 80%), ) Realizamos uma pesquisa de IP reverso e identificamos dois subdomínios. #figure( image("images/subdomains.png", width: 80%), ) \ Após, um scan TCP com a ferramente nmap encontramos as portas abertas: #align(center)[ ``` $ sudo nmap -Pn ns2.businesscorp.com.br Starting Nmap 7.92 ( https://nmap.org ) at 2022-05-03 11:41 -03 Nmap scan report for ns2.businesscorp.com.br (172.16.58.3) Host is up (0.17s latency). rDNS record for 172.16.58.3: ip226.ip-37-59-174.eu Not shown: 995 closed tcp ports (reset) PORT STATE SERVICE 19/tcp filtered chargen 22/tcp open ssh 25/tcp filtered smtp 53/tcp open domain 111/tcp open rpcbind Nmap done: 1 IP address (1 host up) scanned in 6.64 seconds ``` ] #set enum(numbering: "1)") #align(center)[= Vulnerabilidades e Recomendações] \ #v-header( table( columns: (0.2fr, 1fr), [HOST], [192.168.3.11], ), ) #v-header( table( columns: (0.2fr, 1fr), [Descrição], [A versão do webmin em produção no servidor possuí uma vulnerabilidade crítica que contém exploit público disponível.], [Risco], critical, [Impacto], [A falha permite um atacante obter arquivos sensíveis no servidor e posteriormente descobrir as credenciais de acessos do SSH.], [Sistema], [http://intranet.businesscorp.com.br:10000], [Referências], [https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3392], ), ) \ = Problemas \ + Versão do software em produção desatualizada e vulnerável + Este host possui um controle contra portscan ineficiente, ou seja, mesmo com o controle ativo é possível fazer uma varredura de portas e descobrir os serviços ativos. + Politica de senha fraca pois a senha utilizada no hash do user (business) foi descoberta por conta de fazer parte de wordlists conhecidas. = Recomendações \ + *Atualizar* a versão do webmin para a mais recente no site do fabricante + Ajustar o controle contra *portscan* para bloquear acessos ao tentar se comunicar com pelo menos 1 porta inválida + Usar senhar fortes geradas por cofres de senha #pagebreak() = Considerações Finais \ A realização deste teste de segurança permitiu identificar vulnerabilidades e problemas de segurança que *poderiam causar um impacto negativo* aos negócios do cliente. Com isso podemos concluir que o teste atingiu o objetivo proposto. Podemos concluir que a avaliação de segurança como o *teste de invasão* apresentado neste relatório é fundamental para identificar vulnerabilidades, testar e melhorar controles e mecanismos de defesa afim de garantir um bom grau de segurança da informação em seu ambiente digital. Após a CONTRATANTE aplicar todas as correções sugeridas faremos um reteste nas vulnerabilidades apresentadas para comprovar que os problemas foram devidamente resolvidos. Desde já agradecemos a Business Corp pela oportunidade em oferecer nossos serviços de segurança ofensiva.
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-108E0.typ
typst
Apache License 2.0
#let data = ( ("HATRAN LETTER ALEPH", "Lo", 0), ("HATRAN LETTER BETH", "Lo", 0), ("HATRAN LETTER GIMEL", "Lo", 0), ("HATRAN LETTER DALETH-RESH", "Lo", 0), ("HATRAN LETTER HE", "Lo", 0), ("HATRAN LETTER WAW", "Lo", 0), ("HATRAN LETTER ZAYN", "Lo", 0), ("HATRAN LETTER HETH", "Lo", 0), ("HATRAN LETTER TETH", "Lo", 0), ("HATRAN LETTER YODH", "Lo", 0), ("HATRAN LETTER KAPH", "Lo", 0), ("HATRAN LETTER LAMEDH", "Lo", 0), ("HATRAN LETTER MEM", "Lo", 0), ("HATRAN LETTER NUN", "Lo", 0), ("HATRAN LETTER SAMEKH", "Lo", 0), ("HATRAN LETTER AYN", "Lo", 0), ("HATRAN LETTER PE", "Lo", 0), ("HATRAN LETTER SADHE", "Lo", 0), ("HATRAN LETTER QOPH", "Lo", 0), (), ("HATRAN LETTER SHIN", "Lo", 0), ("HATRAN LETTER TAW", "Lo", 0), (), (), (), (), (), ("HATRAN NUMBER ONE", "No", 0), ("HATRAN NUMBER FIVE", "No", 0), ("HATRAN NUMBER TEN", "No", 0), ("HATRAN NUMBER TWENTY", "No", 0), ("HATRAN NUMBER ONE HUNDRED", "No", 0), )
https://github.com/piepert/philodidaktik-hro-phf-ifp
https://raw.githubusercontent.com/piepert/philodidaktik-hro-phf-ifp/main/src/parts/ephid/grundlagen/main.typ
typst
Other
#import "/src/template.typ": * = #ix("Grundlagen der Philosophiedidaktik")
https://github.com/The-Notebookinator/notebookinator
https://raw.githubusercontent.com/The-Notebookinator/notebookinator/main/themes/radial/components/toc.typ
typst
The Unlicense
#import "/utils.typ" #import "../metadata.typ": * #import "./label.typ": * #let toc = utils.make-toc(( _, body, appendix, ) => { heading(level: 1)[Entries] stack( spacing: 1em, ..for entry in body { ( [ #entry.date.display("[year]/[month]/[day]") #h(5pt) #label(entry.type) #h(5pt) #entry.title #box( width: 1fr, line( length: 100%, stroke: ( dash: "dotted", ), ), ) #entry.page-number ], ) }, ) if (appendix.len() <= 0) { return } linebreak() heading(level: 1)[Appendix] for entry in appendix [ #entry.title #box( width: 1fr, line( length: 100%, stroke: ( dash: "dotted", ), ), ) #entry.page-number ] })
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/docs/proposals/3-fine-granular-canvas-update.md
markdown
Apache License 2.0
### Fine-granular Canvas Update Break the canvas into small pieces and update them individually to shorten E2E latency. To finish the task we need to implement the following function: ```rust pub struct OpaqueCanvasState; pub fn update_canvas(&self, state: OpaqueCanvasState, canvas: web_sys::CanvasRenderingContext2d, frame: &typst::doc::Frame) -> OpaqueCanvasState; ``` Proposing steps for non-incremental update: - replace rust fn `image::Image::new` by canvas image rendering api - replace rust fn`resvg::render` by canvas svg rendering api - replace rust fn`ttf_parser::Face::outline_glyph` by unknown api, possible fill - replace `sk::Path/Stroke` operations by canvas api - apply clip semantics by `canvas.clip` - replace render_svg_glyph by `canvas.fill(path)` - replace render_bitmap_glyph by `canvas.drawImageData(bitmap)` - antialias, dash pattern - design OpaqueCanvasState With CanvasState, we can do incremental update: - determine bounds of path2d and glyph objects - build bound tree - diff and cache each bound tree node Reference: - [C++: Determine bounds of path2d and glyph objects](https://github.com/boynextdoor-cze/CG-Final-Project.git) - [JavaScript: Determine bounds of path2d and glyph objects](https://stackoverflow.com/questions/2587751/an-algorithm-to-find-bounding-box-of-closed-bezier-curves)
https://github.com/lucannez64/Notes
https://raw.githubusercontent.com/lucannez64/Notes/master/Texte_1.typ
typst
#import "template.typ": * // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( title: "Texte 1", authors: ( "<NAME>", ), date: "30 Octobre, 2023", ) #set heading(numbering: "1.1.") = Quelle image du poète est donnée ici ? <quelle-image-du-poète-est-donnée-ici> \ Le poète s’en va dans les #emph[champs] ; #emph[il admire], (Poète\<-\>Nature Beauté Ressourcer) (PVéGé) \ #emph[Il adore] ; #emph[il écoute] en #emph[lui-même] une #emph[lyre] , (Rejet Poète-\>Sacré) (PVéGé) (Orphée: Inspiration) \[Traduit la nature en mots\] \ Et, le voyant venir, #emph[les fleurs, toutes les fleurs], (Hyper/bate/bole/onyme) (Anthropomorphisme) \ #emph[Celles qui des] rubis font pâlir les couleurs,(Suprémacie de la beauté des fleurs\>) (Anaphore \ #emph[Celles qui des] paons même #emph[éclipseraient] les queues, ) (Conditionnel: Doute) \ Les petites fleurs #emph[d’or], les petites fleurs #emph[bleues], (ParalléDCon) (Couleur de la Royauté) \ Prennent, pour l’#emph[accueillir] #emph[agitant] leurs bouquets, (Séduction \ De #emph[petits airs] penchés ou de #emph[grands airs] coquets, (Hypallage)(Antithèse)~ Et, familièrement, car cela sied aux #emph[belles] . \ « Tiens ! c’est notre amoureux qui passe ! » #emph[disent-elles]. (Prosopopée) ) \ Et, pleins de #emph[jour] et d’#emph[ombre] et de #emph[confuses voix], (Antithèse) (Parole narrativisé) \ Les grands arbres profonds qui vivent dans les bois, (Opposition grands arbres petites fleurs) (Sagese) \ Tous ces vieillards, les ifs, les tilleuls, les érables, (Hyponymies: Thème particulier) \ Les saules tout ridés, les chênes vénérables, \ L’orme au branchage #emph[noir], de mousse #emph[appesanti], (Vieillesse -\> Sagesse) \ Comme les #emph[ulémas] quand paraît le #emph[muphti], (registre du sacré et de la religion musulmane) \ Lui font de grands #emph[saluts] et #emph[courbent jusqu’à terre] (Hommage au poète Ultime Respect) \ Leurs #emph[têtes] de feuillée et leurs #emph[barbes] de lierre, (Humanisation) \ #emph[Contemplent] de son #emph[front] la sereine lueur, (Matrice de création qui illumine la nature) (Inversion) \ Et #emph[murmurent] tout bas : #emph[C’est lui ! c’est le rêveur !] (Ne pas vouloir le dérangeait)(Messi) (Prosopopée !!)
https://github.com/metamuffin/typst
https://raw.githubusercontent.com/metamuffin/typst/main/tests/typ/compiler/hint.typ
typst
Apache License 2.0
// Test diagnostics. // Ref: false --- // Error: 1:17-1:19 expected length, found integer: a length needs a unit – did you mean 12pt? #set text(size: 12) --- #{ let a = 2 a = 1-a a = a -1 // Error: 7-10 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign. a = a-1 } --- #{ // Error: 3-6 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign. a-1 = 2 }
https://github.com/86challenge/rules
https://raw.githubusercontent.com/86challenge/rules/main/template.typ
typst
#let template(doc) = [ #set page("us-letter") #set page(numbering: "(1)") #set text(size: 10pt) #show link: set text(blue) #show link: underline #show outline.entry: set text(blue) #show outline.entry: underline #show table.cell.where(y: 0): strong #show table: set block(breakable: false) #set table( stroke: (x: 0pt, y: 0.5pt), fill: (_, y) => { if y == 0 { rgb("ddd") } else if calc.even(y) { rgb("f6f6f6") } }, ) #show enum: set block(above: 1.2em) #set enum( full: true, numbering: (..nums) => { let nums = nums.pos() let level = nums.len() let result = nums.map(str).join(".") + "." if level == 1 { text(strong(result), size: 1.4em) } else if level == 2 { strong(result) } else { result } }, ) #doc ] #let spacer = block(above: 1.25em, below: 1.25em) #let frontmatter(title: str, revision: str) = [ #block(width: 100%)[ #set align(center) #image("images/logo.png", width: 120pt) #text(17pt)[ #strong(title) ] Revision: #revision \ #datetime.today().display("[month repr:long] [day], [year]") ] #spacer #outline(target: heading.where(level: 1), fill: none) #spacer ]
https://github.com/joshuabeny1999/unisg-thesis-template-typst
https://raw.githubusercontent.com/joshuabeny1999/unisg-thesis-template-typst/main/content/01_content.typ
typst
Other
= Heading 1 <chapter1> == Heading 2 === Heading 3 ==== Heading 4 This is a biblography cite: #cite(<bruegge2004object>)
https://github.com/yhtq/Notes
https://raw.githubusercontent.com/yhtq/Notes/main/代数学二/作业/hw7.typ
typst
#import "../../template.typ": * #import "@preview/commute:0.2.0": node, arr, commutative-diagram #show: note.with( title: "作业5", author: "YHTQ", date: none, logo: none, withOutlined : false, withTitle :false, ) (应交时间为4月16日) #let Supp = math.op("Supp") #set heading(numbering: none) = p78 == 1 === i 注意到有递增子模链: $ ker mu <= ker mu^2 <= ... <= ker mu^n <= ... $ 由条件知最终将稳定,可设 $ker mu^n = ker mu^(n+1)$,因此: $ mu^(n+1) (m) = 0 <=> mu (mu^n (m)) = 0 <=> mu^n (m) = 0 $ 然而 $mu$ 是满射,$mu^n$ 也是,进而上式表明 $ker mu = 0$,证毕 === ii 注意到有递降子模链: $ M >= im mu >= im mu^2 >= ... >= im mu^n >= ... $ 由条件知最终稳定,可设 $im mu^n = im mu^(n+1) := M'$\ 然而注意到: $ im mu^n = mu(im mu^(n-1)) \ im mu^n = im mu^(n+1) = mu(im mu^(n))\ mu(im mu^(n-1)) = mu(im mu^(n)) => im mu^(n-1) = im mu^n $ (最后利用了 $mu$ 是单射)\ 这表明 $n$ 可以一直降低,最终说明 $im mu = M$,证毕 == 2 对 $M$ 的任意子模 $M'$,设: $ Sigma = {M'' subset M' | M'' "是有限生成子模"} $ 条件表明它将有极大元。设极大元为 $M''$,然而往有限生成模中扩充任何元素都还是有限生成的,因此 $M''$ 只能为 $M'$,表明 $M$ 的所有子模都有限生成 == 3 由熟知的同构: $ M quo N_1 times M quo N_2 tilde.eq M quo N_1 sect N_2 $ 及有限直积保持 Noether/Artin 知结论成立 == 4 此时必有 $M$ 有限生成,进而可设 $M = sum_i A x_i$,有: $ Ann(M) = sect_i Ann(x_i)\ A quo Ann(M) tilde.eq product_i A quo Ann(x_i) tilde.eq product_i A x_i $ 而 $A x_i$ 作为 Noether 模的子模有限生成,进而 $A quo Ann(x_i)$ 作为有限 $A-$代数是 Noether 的,作为环也是,由上题结论知结果成立 若 $M$ 是 Artin 的,结果当然未必,例如设 $p$ 是素数,则 $ZZ[1/p] quo ZZ$ 作为 $ZZ$ 模 Artin,并且没有非零零化子,但 $ZZ$ 不是 Artin 的 == 5 注意到子空间 $Y$ 中开集均形如 $A sect Y$,其中 $A$ 是 $Y$ 中开集,当然将满足升链条件。 为了证明拟紧,任取一族开覆盖 $union E = X$,考虑: $ Sigma = {union E' | E' "是" E "的有限子集"} $ $sigma$ 将是开集族,由升链条件,$Sigma$ 有极大元 $E'$,容易验证 $union E' = X$,否则可以再添加一个点的覆盖到 $E'$ 使得覆盖的空间更大,与极大性矛盾 == 6 == i) $=>$ iii) 已经证明每个子空间都 Noether,而 Noether 空间都拟紧,因此结论成立 == iii) $=>$ ii) 显然 == ii) $=>$ i) 任取开集的升链: $ A_1 <= A_2 <= ... <= A_n <= ... $ 则 ${A_i}$ 构成开子空间 $union_i A_i$ 的开覆盖,将有有限开覆盖。由于这族开集是全序的,相当于只需一个 $A_n$ 即可覆盖,蕴含 $A_m = A_n, forall m >= n$,证毕 == 7 设 $Sigma$ 为所有不能写成有限个不可约分支的并的闭子空间,注意到这是一族闭集,假设它非空,由降链条件存在极小元 $Y$。\ 显然 $Y$ 不是空集,任选 $x in Y$ 以及包含它的不可约分支 $Gamma subset Y$,则 $Y - Gamma$ 可写成有限个不可约分支的并,继而再加上 $Gamma$ 便将 $Y$ 写成了有限个不可约分支的并,矛盾!\ 因此原集合是空集 进一步,设 $X = union_i X_i$,任取其中一个不可约分支 $C$,将有: $ C = union_i (C sect X_i) $ 然而 $C$ 不能写成其中有限个非空闭集的并,继而: $ exists i, C = C sect X_i $ 再由极大性,$C = X_i$,证毕 == 8 显然 $Spec(A)$ 中闭集都是 $V(alpha), alpha$ 是环中理想。理想的升链条件将导出闭集的降链条件,因此 $Spec(A)$ 是 Noether 的 反面不成立,例如令 $A = QQ[x_1, x_2, ..., x_n, ...] quo (x_1^2, x_2^2, ..., x_n^2, ...)$,注意到它当然不是 Noether 环,同时 $Spec(A)$ 同胚于 $Spec(A quo Re)$\ 但另一方面,$A$ 中所有不是单位的元素都幂零,因此 $A quo Re tilde.eq QQ$ 是域,素谱是单点集,当然是 Noether 空间 == 9 前面已经证明了极小素理想与不可约分支的一一对应,因此结论成立 == 10 熟知 Noether 模有限生成,此时有: $ Supp(M) = V(Ann(M)) $ 因此确实是闭集,只需验证其中降链条件。事实上,若存在其中无穷下降的闭集链: $ V(Ann(M)) := V(I_0) > V(I_1) > ... > V(I_n) > ... $ 当然有 $Ann(M) := I_0 < I_1 < ... < I_n$\ 此时,将有上升的子模链: $ 0 = I_0 M <= I_1 M <= ... <= I_n M <= ... $ 注意到: $ Supp(M quo I_n M) = V(I_n + Ann(M)) = V(I_n) $ 因此 $ I_n = I_(n+1) => Supp(M quo I_n M) = Supp(M quo I_(n+1) M) => V(I_n) = V(I_(n+1)) $ 从而子模升链中每项严格上升,与 Noether 模条件矛盾!
https://github.com/HarryLuoo/sp24
https://raw.githubusercontent.com/HarryLuoo/sp24/main/431/hw/1/hw7.typ
typst
#set math.equation(numbering: "(1)") #set page(margin: (x: 1cm, y: 1cm)) = HW 7, <NAME> = 5.8 We can solve for the probability density function by differentiating the cumulative distribution function. $X in [-1,2] => X^2 in [0,4]$. When $X^2 in [0,4]$, $ F_Y(y) &= P(Y<= y) \ &= P(X^2<=y) \ &= P(-sqrt(y)<= X <= sqrt(y)) \ &= F_X (sqrt(y)) - F_X (-sqrt(y) ) $ <eq.cdf> Differentiating @eq.cdf, we get the probability density function as: $ f_Y (y) = F'_Y(y) = (1)/(2sqrt(y) )f_X (sqrt(y) )+(1)/(2sqrt(y) )f_X (-sqrt(y) ) $ The probability density function of $X$ is given as $f_X(x) = 1/3 $ when $x in [-1,2]$ and zero otherwise. Considering when $ y in [0,1], sqrt(y) in [0,1] "and" -sqrt(y)=[-1,0]$, which are within the range of $x$, so $f_X (sqrt(y)) = f_X (-sqrt(y)) = 1/3$, $ f_Y(y) = 1/(2sqrt(y) ) * 1/3 + 1/(2sqrt(y) ) * 1/3 = 1/(3sqrt(y)) $ when $y in [0,1]$. When $y in [1,4], sqrt(y) in [1,2]",but" -sqrt(y)in [-2,-1]"out of range"$ so $f_X (sqrt(y)) = 1/3, f_X (-sqrt(y)) = 0$, $ f_Y (y) = 1/(6sqrt(y) ) $ when $y in [1,4]$. Thus, $ F_Y (y) = cases( 0 "when" y < 0, 1/(3sqrt(y)) "when" 0 <= y < 1, 1/(6sqrt(y)) "when" 1 <= y < 4, 1 "when" y >= 4, ) $ = 5.28 We know $f_X (x)=1/3, x in (-1,2)$ and 0 otherwise, while $Y = X^(4) in [0,16]$ thus $ f_Y (y) = 0, y in.not [0,16] $ When $y in [0,16]$, we can find the probability density function by differentiating the cumulative distribution function. $ F_Y (y) = P(Y <= y) = P(X^4)<= y = F_X (y^(1 slash 4)) - F_X (- y ^(1 slash 4)) $ <eq.2> Differentiating @eq.2, we get the probability density function as: $ f_Y (y) = 1/4y^(-3/4) f_X (y^(1/4)) + 1/4 y ^(-3/4) f_X (- y^(1/4)) $ When $y in [0,1]$, $y^(1/4) in [0,1] "and" -y^(1/4) in [-1,2]$, which are within the range of $x$, thus $f_X (y^(1/4)) = f_X (-y^(1/4)) = 1/3$, $ f_Y (y) = 1/(6y^(3/4)) $ When $y in [1,16]$, $y^(1/4) in [1,2] "and" -y^(1/4) in [-2,-1]$, which are within the range of $x$, thus $f_X (y^(1/4)) = f_X (-y^(1/4)) = 1/3$, $ f_Y (y) = 1/(12y^(3/4)) $ In summary, $ f_Y (y) = cases( 0 "when" y < 0, display(1/(6y^(3 slash 4))) "when" 0 <= y < 1, display(1/(12y^(3slash 4))) "when" 1 <= y < 16, 0 "when" y >= 16, ) $ = 5.32 Given $X in (0,1)$, possible values for Y is the interval $(1,infinity)$ THerefore, when $t< 1, f_Y (t ) = 0$ and when $t >= 1$, we can find the probability density function by differentiating the mass function. $ P(Y <= t) = P(1/x <= t) = P(X >= 1/t) = 1- 1/t \ f_Y (t)=(dif)/(dif t) P(Y<=t) = 1/t^2 "when" t>= 1 $ = 6.6 - (a) Marginal of X, when x > 0, is $ f_X (x) = integral_(0)^(infinity) x e^(-x(1+y)) dif x = e^(-x) $ and zero otherwise. The marginal of Y when y >0, similarly, is $ f_Y (y) = integral_(0)^(infinity) x e^(-x(1+y)) dif x =(1)/((1+y)^2) $ and zero otherwise. - (b) Expectation: $ E[X Y] &= integral_(0)^(infinity)integral_(0)^(infinity)x y times f(x,y) dif x dif y \ &= integral_(0)^(infinity)integral_(0)^(infinity) x^2 y e^(-x(1+y)) dif x dif y \ &= integral_(0)^(infinity) e^(-y) dif y \ &= 1 $ - (c) Expectation: $ E[(X)/(1+Y)] & = integral_(0)^(infinity) integral_(0)^(infinity) (x)/(1+y)x e^(-x(1+y)) dif x dif y \ &= integral_(0)^(infinity) (1)/(1+y) (2)/((1+y)^3) dif y = 2 integral_(0)^(infinity) (1)/((1+y)^4) dif y \ &= 2/3 $ = 6.18 - (a) We can write the pmf as a table: #image("hw7_tb1.png") we can confirm that the terms are non negative, and the sum of all terms is 1. This certifies that $p_(X,Y)$ is a *valid pmf*. - (b) Marginal of X and Y can be found by summing the rows and columns: $ X:\ P(X=1) = 1/4 , P(X=2) = 1/4, P(X = 3) = 1/4, P(X = 4) = 1/4 \ Y:\ P(Y=1) = 25/48, P(Y=2) = 13/48 P(Y=3) = 7/48, P(Y=4) = 1/16 $ - (c) $ P(X = Y +1) &= P(X = 2 , Y = 1) + P(x = 3, Y = 2)+ P(X = 4, Y = 3) \ & = 1/8 + 1/12 + 1/16 \ & = 13/48 $ = 6.24 We can use binomial distribution with n = 3 and p = 1/4. The probability of of having exactly two balls are green and one is not green is $ binom(3,2) (1/4)^2 (3/4) = 9/64 $ By the same logic, the probability of having exactly 2 R ball, 2 Y balll or 2 W balls ae also 9/64. So the probability of having exactly 2 balls of the same color is #rect(inset: 8pt)[ $ display(9/64 times 4 = 9/16)$ ] //6.36 (a), (b)
https://github.com/Dherse/codly
https://raw.githubusercontent.com/Dherse/codly/main/codly.typ
typst
MIT License
#import "args.typ": __codly-args, __codly-save, __codly-load // Default language-block style #let default-language-block(name, icon, color) = { let radius = (__codly-args.lang-radius.get)() let padding = (__codly-args.lang-inset.get)() let lang-stroke = (__codly-args.lang-stroke.get)() let lang-fill = (__codly-args.lang-fill.get)() let fill = if type(lang-fill) == function { (lang-fill)((name: name, icon: icon, color: color)) } else { color } let stroke = if type(lang-stroke) == function { (lang-stroke)((name: name, icon: icon, color: color)) } else { lang-stroke } box( radius: radius, fill: fill, inset: padding, stroke: stroke, outset: 0pt, icon + name, ) } /// Lets you set a line number offset. /// /// #pre-example() /// #example(```` /// #codly-offset(offset: 25) /// ```py /// def fib(n): /// if n <= 1: /// return n /// return fib(n - 1) + fib(n - 2) /// fib(25) /// ``` /// ````, mode: "markup", scale-preview: 100%) #let codly-offset(offset: 0) = { (__codly-args.offset.update)(offset) } /// Lets you set a range of line numbers to highlight. /// Similar to `codly(range: (start, end))`. /// /// #pre-example() /// #example(```` /// #codly-range(start: 2) /// ```py /// def fib(n): /// if n <= 1: /// return n /// return fib(n - 1) + fib(n - 2) /// fib(25) /// ``` /// ````, mode: "markup", scale-preview: 100%) #let codly-range( start: 1, end: none, ) = { (__codly-args.range.update)((start, end)) } /// Disables codly. /// /// #pre-example() /// #example(```` /// *Enabled:* /// ``` /// Hello, world! /// ``` /// /// #codly-disable() /// *Disabled:* /// ``` /// Hello, world! /// ``` /// ````, mode: "markup", scale-preview: 100%) #let codly-disable() = { (__codly-args.enabled.update)(false) } /// Enables codly. /// /// #pre-example() /// #example(```` /// *Enabled:* /// ``` /// Hello, world! /// ``` /// #codly-disable() /// *Disabled:* /// ``` /// Hello, world! /// ``` /// /// #codly-enable() /// *Enabled:* /// ``` /// Hello, world! /// ``` /// ````, mode: "markup", scale-preview: 100%) #let codly-enable() = { (__codly-args.enabled.update)(true) } /// Disabled codly locally. /// /// #pre-example() /// #example(```` /// *Enabled:* /// ``` /// Hello, world! /// ``` /// /// *Disabled:* /// #no-codly(``` /// Hello, world! /// ```) /// ````, mode: "markup", scale-preview: 100%) #let no-codly(body) = { (__codly-args.enabled.update)(false) body (__codly-args.enabled.update)(true) } /// Appends a skip to the list of skips. /// /// #pre-example() /// #example(```` /// #codly-skip(4, 32) /// ``` /// Hello, world! /// Goodbye, world! /// ``` /// ````, mode: "markup", scale-preview: 100%) #let codly-skip( position, length, ) = { state("codly-skips", ()).update((skips) => { if skips == none { skips = () } skips.push((position, length)) skips }) } /// Configures codly. /// Is used in a similar way as `set` rules. You can imagine the following: /// ```typc /// // This is a representation of the actual code. /// // The actual code behave like a set rule that uses `state`. /// let codly( /// enabled: true, /// offset: 0, /// range: none, /// languages: (:), /// display-name: true, /// display-icon: true, /// default-color: rgb("#283593"), /// radius: 0.32em, /// inset: 0.32em, /// fill: none, /// zebra-fill: luma(240), /// stroke: 1pt + luma(240), /// lang-inset: 0.32em, /// lang-outset: (x: 0.32em, y: 0pt), /// lang-radius: 0.32em, /// lang-stroke: (lang) => lang.color + 0.5pt, /// lang-fill: (lang) => lang.color.lighten(80%), /// lang-format: codly.default-language-block, /// number-format: (number) => [ #number ], /// number-align: left + horizon, /// smart-indent: false, /// annotations: none, /// annotation-format: numbering.with("(1)"), /// highlights: none, /// highlight-radius: 0.32em, /// highlight-fill: (color) => color.lighten(80%), /// highlight-stroke: (color) => 0.5pt + color, /// highlight-inset: 0.32em, /// reference-by: line, /// reference-sep: "-", /// reference-number-format: numbering.with("1"), /// breakable: false, /// ) = {} /// ``` /// /// Each argument is explained below. /// /// == Display style /// Codly displays your code in three sections: /// - The line number, if `number-format` is not `none` /// - The language block, with a fill and a stroke, only appears on the first line /// - The code itself with optional zebra striping /// /// The block as a whole is surrounded by a stroke. /// /// #align(center, block(width: 80%)[ /// #codly(number-format: none) /// ``` /// |----------------------------------------------------------------| /// |1 | [line, zebra] | [lang block] | /// |2 | [line, non-zebra] | /// |3 | [line, zebra] | /// |4 | [line, non-zebra] | /// |----------------------------------------------------------------| /// ``` /// ]) /// /// == Note about arguments: /// Some arguments can be a function that takes no arguments and returns the value. /// They are called within a `context` that provides the current location. /// They can be used to have more dynamic control over the value, without the need /// for sometimes slow state updates. /// /// == In figure code blocks: /// If the code block is in a figure, additional features are available for referencing /// annotations and highlights. /// #pre-example() /// #example(```` /// #codly(annotations: ((start: 0, end: 0, content: "Function call", label: <func-call>), )) /// #codly(highlights: ((line: 1, start: 7, end: none, fill: green, tag: "Call", label: <call>), )) /// #figure( /// caption: ["Hello, world!" in Python] /// )[ /// ```py /// print("Hello, world!") /// print("Hello, world!") /// ``` /// ] <fig-hello> /// /// I can later reference the figure: @fig-hello. But I can also reference the /// annotation: @func-call. And finally, I can reference the highlight: @call. /// ````, mode: "markup", scale-preview: 72%) /// /// This behaviour can be completely customized using the `reference-by`, /// `reference-sep`, and `reference-number-format` fields listed below. /// /// == Enabled (`enabled`) /// Whether codly is enabled or not. /// If it is disabled, the code block will be displayed as a normal code block, /// without any additional codly-specific formatting. /// /// This is useful if you want to disable codly for a specific block. /// /// You can also disable codly locally using the @@no-codly() function, or disable it /// and enable it again using the @@codly-disable() and @@codly-enable() functions. /// /// - *Default*: `true` /// - *Type*: `bool` /// - *Can be a contextual function*: no /// /// #pre-example() /// #example(```` /// #codly(enabled: true) /// *Enabled:* /// ``` /// Hello, world! /// ``` /// /// #codly(enabled: false) /// *Disabled:* /// ``` /// Hello, world! /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Offset (`offset`) /// The offset to apply to line numbers. /// /// Note that the offset gets reset automatically after every code block. /// /// - *Default*: `0` /// - *Type*: `int` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(offset: 0) /// *No offset:* /// ``` /// Hello, world! /// ``` /// /// #codly(offset: 5) /// *With offset:* /// ``` /// Hello, world! /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Range (`range`) /// The range of line numbers to display. /// /// Note that the range gets reset automatically after every code block. /// /// The same behavior can be achieved using the @@codly-range() function. /// /// - *Default*: `none` /// - *Type*: `(int, int)` or `none` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(range: (2, 4)) /// ```py /// def fib(n): /// if n <= 1: /// return n /// return fib(n - 1) + fib(n - 2) /// fib(25) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Skips (`skips`) /// Insert a skip at the specified line numbers, setting its offset to the /// length of the skip. The skip is formatted using `skip-number` /// and `skip-line`. /// /// Each skip is an array with two values: the position and length of the skip. /// /// Note that the skips gets reset automatically after every code block. /// /// The same behavior can be achieved using the @@codly-skip() function, which /// appends one or more skips to the list of skips. /// /// - *Default*: `()` /// - *Type*: `array` or `none` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(skips: ((4, 32), )) /// ```py /// def fib(n): /// if n <= 1: /// return n /// return fib(n - 1) + fib(n - 2) /// fib(25) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Skip number (`skip-number`) /// Sets the content with which the line number columns is filled when a skip is /// encountered. If line numbers are disabled, this has no effect. /// /// == Skip line (`skip-line`) /// Sets the content with which the line columns is filled when a skip is /// encountered. /// /// == Languages (`languages`) /// The language definitions to use for language block formatting. /// /// It is defined as a dictionary where the keys are the language names and /// each value is another dictionary containing the following keys: /// - `name`: the "pretty" name of the language as a content/showable value /// - `color`: the color of the language, if omitted uses the default color /// - `icon`: the icon of the language, if omitted no icon is shown /// /// Alternatively, the value can be a string, in which case it is used as the /// name of the language. And no icon is shown and the default color is used. /// /// If an entry is missing, and language blocks are enabled, will show /// the "un-prettified" language name, with the default color. /// /// - *Default*: `(:)` /// - *Type*: `dict` /// - *Can be a contextual function*: no /// /// #pre-example() /// #example(```` /// #codly( /// languages: ( /// py: (name: "Python", color: red, icon: "🐍") /// ) /// ) /// ```py /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Display name (`display-name`) /// /// Whether to display the name of the language in the language block. /// This only applies if you're using the default language block formatter. /// /// - *Default*: `true` /// - *Type*: `bool` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(display-name: false) /// ```py /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Display icon (`display-icon`) /// Whether to display the icon of the language in the language block. /// This only applies if you're using the default language block formatter. /// /// - *Default*: `true` /// - *Type*: `bool` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly( /// display-icon: false, /// languages: ( /// py: (name: "Python", color: red, icon: "🐍") /// ) /// ) /// ```py /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Default color (`default-color`) /// The default color to use for language blocks. /// /// This only applies if you're using the default language block formatter. /// Also note that it is also passed as a named argument to the language /// block formatter if you've defined your own. /// /// - *Default*: `rgb("#283593")` (a shade of blue) /// - *Type*: `color` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(default-color: orange) /// ```py /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Radius (`radius`) /// The radius of the border of the code block. /// /// - *Default*: `0.32em` /// - *Type*: `length` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(radius: 0pt) /// ``` /// print('Hello, world!') /// ``` /// #codly(radius: 20pt) /// ``` /// print('Hello, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Inset (`inset`) /// The inset of the code block. /// /// - *Default*: `0.32em` /// - *Type*: `length` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(inset: 10pt) /// ``` /// print('Hello, world!') /// ``` /// #codly(inset: 0pt) /// ``` /// print('Hello, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Fill (`fill`) /// The fill of the code block when not zebra-striped. /// /// - *Default*: `none` /// - *Type*: `none`, `color`, `gradient`, or `pattern` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly( /// fill: gradient.linear(..color.map.flare), /// ) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Zebra color (`zebra-fill`) /// The fill of the code block when zebra-striped, `none` to disable zebra-striping. /// /// #pre-example() /// #example(```` /// #codly( /// zebra-fill: gradient.linear(..color.map.flare), /// ) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// - *Default*: `none` /// - *Type*: `none`, `color`, `gradient`, or `pattern` /// - *Can be a contextual function*: yes /// /// == Stroke (`stroke`) /// The stroke of the code block. /// /// - *Default*: `1pt + luma(240)` /// - *Type*: `none` or `stroke` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly( /// stroke: 1pt + gradient.linear(..color.map.flare), /// ) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Language block inset (`lang-inset`) /// The inset of the language block. /// /// This only applies if you're using the default language block formatter. /// /// - *Default*: `0.32em` /// - *Type*: `length` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(lang-inset: 5pt) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Language block outset (`lang-outset`) /// The X and Y outset of the language block, applied as a `dx` and `dy` during /// the `place` operation. /// /// This applies in every case, whether or not you're using the default language /// block formatter. /// /// The default value is chosen to get rid of the `inset` applied to each line. /// /// - *Default*: `(x: 0.32em, y: 0pt)` /// - *Type*: `dict` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(lang-outset: (x: -10pt, y: 5pt)) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Language block radius (`lang-radius`) /// The radius of the language block. /// /// - *Default*: `0.32em` /// - *Type*: `length` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(lang-radius: 10pt) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Language block stroke (`lang-stroke`) /// The stroke of the language block. /// /// - *Default*: `none` /// - *Type*: `none`, `stroke`, or a function that takes in the language dict or none /// (see argument `languages`) and returns a stroke. /// - *Can be a contextual function*: no /// /// #pre-example() /// #example(```` /// #codly(lang-stroke: 1pt + red) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// #codly(lang-stroke: (lang) => 2pt + lang.color) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Language block fill (`lang-fill`) /// The fill of the language block. /// /// - *Default*: `none` /// - *Type*: `none`, `color`, `gradient`, `pattern`, or a function that takes in /// the language dict or none (see argument `languages`) and returns a fill. /// - *Can be a contextual function*: no /// /// #pre-example() /// #example(```` /// #codly(lang-fill: red) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// #codly(lang-fill: (lang) => lang.color.lighten(40%)) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Language block formatter (`lang-format`) /// The formatter for the language block. /// /// A value of `none` will not display the language block. /// To use the default formatter, use `auto`. /// /// - *Default*: `auto` /// - *Type*: `function` /// - *Can be a contextual function*: no /// /// #pre-example() /// #example(```` /// #codly(lang-format: (..) => [ No! ]) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Line number formatter (`number-format`) /// The formatter for line numbers. /// /// - *Default*: `numbering.with("1")` /// - *Type*: `function` /// - *Can be a contextual function*: false /// /// #pre-example() /// #example(```` /// #codly(number-format: (n) => numbering("I.", n)) /// ``` /// print('Hello, world!') /// print('Goodbye, world!') /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Line number alignment (`number-align`) /// The alignment of the line numbers. /// /// - *Default*: `left + horizon` /// - *Type*: `top`, `horizon`, or `bottom` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(number-align: right + horizon) /// ```py /// # Iterative Fibonacci /// # As opposed to the recursive /// # version /// def fib(n): /// if n <= 1: /// return n /// last, current = 0, 1 /// for _ in range(2, n + 1): /// last, current = current, last + current /// return current /// print(fib(25)) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Smart indentation (`smart-indent`) /// Whether to use smart indentation, which will check for indentation on a line /// and use a bigger left side inset instead of spaces. This allows for linebreaks /// to continue at the same level of indentation. This is off by default /// since it is slower. /// /// - *Default*: `false` /// - *Type*: `bool` /// - *Can be a contextual function*: no /// /// #pre-example() /// #example(```` /// #codly(smart-indent: true) /// ```py /// def fib(n): /// if n <= 1: /// return n /// else: /// return (fib(n - 1) + fib(n - 2)) /// print(fib(25)) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Bêta: Annotations (`annotations`) /// The annotations to display on the code block. /// /// A list of annotations that are automatically numbered and displayed on the /// right side of the code block. /// /// Each entry is a dictionary with the following keys: /// - `start`: the line number to start the annotation /// - `end`: the line number to end the annotation, if missing or `none` the /// annotation will only contain the start line /// - `content`: the content of the annotation as a showable value, if missing /// or `none` the annotation will only contain the number /// - `label`: *if and only if* the code block is in a `figure`, sets the label /// by which the annotation can be referenced. /// /// Generally you probably want the `content` to be contained within a `rotate(90deg)`. /// /// As with other code block settings, annotations are reset after each code block. /// /// *Note*: Annotations cannot overlap. /// /// *Known issues*: /// - Annotations that spread over a page break will not work correctly. /// - Annotations on the first line of a code block will not work correctly. /// - Annotations that span lines that overflow (one line of code <-> two lines of text) /// will not work correctly. /// /// This should be considered a Bêta feature. /// /// /// - *Default*: `none` /// - *Type*: `array` or `none` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(smart-indent: true, annotation-format: none) /// #codly(annotations: ((start: 1, end: 4, content: block(width: 2em, rotate(-90deg, align(center, box(width: 100pt)[Function body])))), )) /// ```py /// def fib(n): /// if n <= 1: /// return n /// else: /// return (fib(n-1)+fib(n-2)) /// print(fib(25)) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Bêta: Annotation format (`annotation-format`) /// The format of the annotation number. /// /// Can be `none` or a function that formats the annotation number. /// /// - *Default*: `numbering.with("(1)")` /// - *Type*: `none` or `function` /// - *Can be a contextual function*: no /// /// == Highlights (`highlights`) /// You can apply highlights to the code block using the `highlights` argument. /// It consists of a list of dictionaries, each with the following keys: /// - `line`: the line number to start highlighting /// - `start`: the character position to start highlighting, zero if omitted or `none` /// - `end`: the character position to end highlighting, the end of the line if omitted or `none` /// - `fill`: the fill of the highlight, defaults to the default color /// - `tag`: an optional tag to be displayed alongside the highlight. /// - `label`: *if and only if* the code block is in a `figure`, and it has a `tag`, /// sets the label by which the highlight can be referenced. /// /// As with other code block settings, annotations are reset after each code block. /// /// *Note*: This feature performs what I loosely call "globbing", this means that instead of highlighting /// individual characters, it highlights the whole word or sequence of characters that the start and end /// positions are part of. This is done to avoid having to deal with the complexity of highlighting /// individual characters, and needing to re-style them manually. While also making the API a tad less error /// prone at the cost of sometimes goofy looking highlights if they overlap. /// /// *Limitation*: If there is a `tag` and the line overflows, it can look kind of goofy. This is a trade-off, /// as it would need to either use a grid which will prevent overflowing all together, or use a more complex /// multi-box based system (which is what is used) that can sometimes look goofy (see example below). /// /// - *Default*: `none` /// - *Type*: `array` or `none` /// - *Can be a contextual function*: yes /// /// #pre-example() /// #example(```` /// #codly(highlights: ( /// (line: 3, start: 4, end: none, fill: red), /// (line: 4, start: 14, end: 22, fill: green, tag: "(a)"), /// (line: 4, start: 29, end: 38, fill: blue, tag: "(b)"), /// )) /// ```py /// def fib(n): /// if n <= 1: /// return n /// else: /// return (fib(n - 1) + fib(n - 2)) /// print(fib(25)) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// #pre-example() /// #example(```` /// #codly(highlights: ( /// (line: 0, start: 7, end: 13, fill: green, tag: "Call"), /// (line: 0, fill: blue, tag: "Statement"), /// (line: 1, start: 7, end: 13, fill: green, tag: "Call"), /// (line: 1, fill: blue, tag: "Statement"), /// )) /// ```py /// print(fib(25)) /// print(fib(25)) /// ``` /// ````, mode: "markup", scale-preview: 100%) /// /// == Highlight radius (`highlight-radius`) /// The radius of the border of the highlights. /// /// - *Default*: `0.32em` /// - *Type*: `length` /// - *Can be a contextual function*: yes /// /// == Highlight fill (`highlight-fill`) /// The fill transformer of the highlights, is a function that /// takes in the highlight color and returns a fill. /// /// - *Default*: `(color) => color.lighten(80%)` /// - *Type*: `function` /// - *Can be a contextual function*: no /// /// == Highlight stroke (`highlight-stroke`) /// The stroke transformer of the highlights, is a function that /// takes in the highlight color and returns a stroke. /// /// - *Default*: `(color) => 0.5pt + color` /// - *Type*: `function` /// - *Can be a contextual function*: no /// /// == Highlight inset (`highlight-inset`) /// The inset of the highlights. /// /// - *Default*: `0.32em` /// - *Type*: `length` /// - *Can be a contextual function*: yes /// /// == Reference mode (`reference-by`) /// The mode by which references are displayed. /// Two modes are available: /// - `line`: references are displayed as line numbers /// - `item`: references are displayed as items, i.e by the `tag` for highlights /// and `content` for annotations /// /// - *Default*: `"line"` /// - *Type*: `str` /// - *Can be a contextual function*: yes /// /// == Reference separator (`reference-sep`) /// The separator to use between the figure reference and the reference itself. /// /// - *Default*: `"-"` /// - *Type*: `str` /// - *Can be a contextual function*: yes /// /// == Reference number format (`reference-number-format`) /// The format of the reference number line number, only used if `reference-by` /// is set to `"line"`. /// /// - *Default*: `numbering.with("1")` /// - *Type*: `function` /// - *Can be a contextual function*: no /// /// == Breakable (`breakable`) /// Whether the code block is breakable. /// /// - *Default*: `false` /// - *Type*: `bool` /// - *Can be a contextual function*: no #let codly( ..args, ) = { let pos = args.named() if args.pos().len() > 0 { panic("codly: no positional arguments are allowed") } for (key, arg) in __codly-args { if key in pos { // Remove the argument from the list. let i = pos.remove(key) // Update the state. (arg.update)(i) } } // Special code that checks that languages are valid. context { let languages = (__codly-args.languages.get)() for (key, lang) in languages { if type(lang) != dictionary and type(lang) != str { panic("codly: language " + key + " is not a dictionary") } if type(lang) == dictionary and "name" not in lang { panic("codly: language " + key + " is missing a name") } } } if pos.len() > 0 { panic("codly: unknown arguments: " + pos.keys().join(", ")) } } // Resets the codly state to its default values. // This is useful if you want to reset the state of codly to its default values. // // Note that this is mostly intended for testing purposes. #let codly-reset() = { for (_, arg) in __codly-args { (arg.reset)() } } /// Initializes the codly show rule. /// /// ```typ /// #show: codly-init /// ``` #let codly-init( body, ) = { show figure.where(kind: raw): it => { if "label" in it.fields() { state("codly-label").update((_) => it.label) it state("codly-label").update((_) => none) } else { it } } let get-parts(heading) = { let num = heading.body.children.at(0) let lbl = heading.body.children.at(1) (num.body, label(lbl.body.text)) } // Levels chosen randomly. let level-highlight = 39340 let level-annot = 30246 show ref: it => context if it.element != none and it.element.func() == heading and it.element.level == level-highlight { let sep = (__codly-args.reference-sep.get)() let (tag, label) = get-parts(it.element) link(it.target, ( ref(label), sep, tag ).join()) } else if it.element != none and it.element.func() == heading and it.element.level == level-annot { let sep = (__codly-args.reference-sep.get)() let (num, label) = get-parts(it.element) link(it.target, ( ref(label), sep, num ).join()) } else { it } let highlights-setup() = { let args = __codly-args let highlight-stroke = (args.highlight-stroke.get)() let highlight-fill = (args.highlight-fill.get)() let highlight-radius = (args.highlight-radius.get)() let highlight-inset = (args.highlight-inset.get)() let default-color = (args.default-color.get)() let block-label = state("codly-label").get() let highlights = { let highlights = (args.highlights.get)() if highlights == none { () } else { highlights .sorted(key: (x) => x.line) .map((x) => { if not "start" in x or x.start == none { x.insert("start", 0) } if not "end" in x or x.end == none { x.insert("end", 999999999) } if not "fill" in x { x.insert("fill", default-color) } x }) } } (highlights, highlight-stroke, highlight-fill, highlight-radius, highlight-inset) } show raw.line.where(label: <codly-highlighted>): it => context { let indent-regex = regex("^\\s*") // Using a closure to try and use memoization let ( highlights, highlight-stroke, highlight-fill, highlight-radius, highlight-inset, ) = highlights-setup() // Filter the highlights to only keep the relevant ones. let highlights = highlights.filter((x) => x.line == (it.number - 1)) let highlighted = it.body // Smart indentation code. let smart-indent = (__codly-args.smart-indent.get)() let body = if it.body.has("children") { it.body.children } else { (it.body, ) } if smart-indent { // Check the indentation of the line by taking l, // and checking for the first element in the sequence. let first = for child in body { if "children" in child.fields() { for c in child.fields().children { if "text" in c.fields() { c } } } else if "text" in child.fields() { child } } if first != none and first.has("text") { let match = first.text.match(indent-regex) // Ensure there is a match and it starts at the beginning of the line. if match != none and match.start == 0 { // Calculate the indentation. let indent = match.end - match.start // Then measure the necessary indent. let indent = first.text.slice(match.start, match.end) let width = measure([#indent]).width // We add the indentation to the line. highlighted = { set par(hanging-indent: width) highlighted } } } } // If there are no highlights, return the line as is. if highlights.len() == 0 { return raw.line(it.number, it.count, it.text, highlighted) } // Apply highlights let l = it.body for hl in highlights { let fill = highlight-fill(hl.fill) let stroke = highlight-stroke(hl.fill) let tag = if "tag" in hl { hl.tag } else { none } let get-len(child) = { let len = 0 let fields = child.fields() if "children" in fields { for c in fields.children { len += get-len(c) } } else if "text" in fields { len += fields.text.len() } else if "child" in fields { len += get-len(fields.child) } else if "body" in fields { len += get-len(fields.body) } else { } return len } let children = () let collection = none let i = 0 let body = if highlighted.has("children") { highlighted.children } else if highlighted.has("child") { (highlighted.child, ) } else if highlighted.has("body") { (highlighted.body, ) } else { (highlighted, ) } let len = body.len() for (index, child) in body.enumerate() { let last = index == len - 1 let args = child.fields() let len = get-len(child) if collection != none { collection.push(child) } else if collection == none and (i >= hl.start or i + len >= hl.start) and (i < hl.end) { collection = (child, ) } else { children.push(child) } let label = if "label" in hl and hl.label != none { let reference-by = (__codly-args.reference-by.get)() let reference-sep = (__codly-args.reference-sep.get)() let block-label = state("codly-label").get() let referenced = if reference-by == "line" { let reference-number-format = (__codly-args.reference-number-format.get)() reference-number-format(it.number) } else { hl.tag } place(hide[#heading(level: level-highlight)[#box(referenced)#box(str(block-label))] #hl.label]) } else { none } if collection != none and (i + len >= hl.end or last) { if tag == none { children.push(box( radius: highlight-radius, clip: true, fill: fill, stroke: stroke, inset: highlight-inset, baseline: highlight-inset, collection.join() + label )) } else { let col = collection.join() let height-col = measure(col).height let height-tag = measure(tag).height let max-height = calc.max(height-col, height-tag) + 2 * highlight-inset let hl-box = box( radius: ( top-right: 0pt, bottom-right: 0pt, rest: highlight-radius, ), height: max-height, clip: true, fill: fill, stroke: stroke, inset: highlight-inset, baseline: highlight-inset, collection.join() ) let tag-box = box( radius: ( top-left: 0pt, bottom-left: 0pt, rest: highlight-radius, ), height: max-height, clip: true, fill: fill, stroke: stroke, inset: highlight-inset, baseline: highlight-inset, tag + label ) children.push(hl-box + h(0pt, weak: true) + tag-box) } collection = none } i += len } highlighted = children.join() } raw.line(it.number, it.count, it.text, highlighted) } show raw.where(block: true): it => context { let args = __codly-args let range = (args.range.get)() let in_range(line) = { if range == none { true } else if range.at(1) == none { line >= range.at(0) } else { line >= range.at(0) and line <= range.at(1) } } if (args.enabled.get)() != true { return it } let block-label = state("codly-label").get() let languages = (args.languages.get)() let display-names = (args.display-name.get)() let display-icons = (args.display-icon.get)() let lang-outset = (args.lang-outset.get)() let language-block = { let fn = (args.lang-format.get)() if fn == none { (..) => none } else if fn == auto { default-language-block } else { fn } } let default-color = (args.default-color.get)() let radius = (args.radius.get)() let offset = (args.offset.get)() let stroke = (args.stroke.get)() let zebra-color = (args.zebra-fill.get)() let numbers-format = (args.number-format.get)() let numbers-alignment = (args.number-align.get)() let padding = (args.inset.get)() let breakable = (args.breakable.get)() let fill = (args.fill.get)() let skips = { let skips = (args.skips.get)() if skips == none { () } else { skips.sorted(key: (x) => x.at(0)).dedup() } } let skip-line = (args.skip-line.get)() let skip-number = (args.skip-number.get)() let reference-by = (args.reference-by.get)() if not reference-by in ("line", "item") { panic("codly: reference-by must be either 'line' or 'item'") } let reference-sep = (args.reference-sep.get)() let reference-number-format = (args.reference-number-format.get)() let annotation-format = { let fn = (args.annotation-format.get)() if fn == none { (_) => none } else { fn } } let annotations = { let annotations = (args.annotations.get)() annotations = if annotations == none { () } else { annotations .sorted(key: (x) => x.start) .map((x) => { if (not "end" in x) or x.end == none { x.insert("end", x.start) } if (not "content" in x) { x.insert("content", none) } if "label" in x and block-label == none { panic("codly: label " + str(x.label) + " is only allowed in a figure block") } x }) } // Check for overlapping annotations. let current = none for a in annotations { if current != none and a.start <= current.end { panic("codly: overlapping annotations") } current = a } annotations } let has-annotations = annotations != none and annotations.len() > 0 let start = if range == none { 1 } else { range.at(0) }; // Get the widest annotation. let annot-bodies-width = annotations.map((x) => x.content).map(measure).map((x) => x.width) let num = annotation-format(annotations.len()) let lr-width = measure(math.lr("}", size: 5em) + num).width; let annot-width = annot-bodies-width.fold(0pt, (a, b) => calc.max(a, b)) + 2 * padding + lr-width // Get the height of an individual line. let line-height = measure(it.lines.at(0, default: [`Hello, world!`])).height + 2 * padding let items = () let height = measure[1].height let current-annot = none let first-annot = false let annots = 0 for (i, line) in it.lines.enumerate() { first-annot = false // Check for annotations let annot = annotations.at(0, default: none) if annot != none and i == annot.start { current-annot = annot first-annot = true annots += 1 } // Cleanup annotations if current-annot != none and i > current-annot.end { current-annot = none _ = annotations.remove(0) } // Annotation printing let annot(extra: none) = if current-annot != none and first-annot { let height = line-height * (current-annot.end - current-annot.start + 1) let num = annotation-format(annots) let label = if "label" in current-annot and current-annot.label != none { let referenced = if reference-by == "line" { reference-number-format(line.number + offset) } else { num } place(hide[#heading(level: level-annot)[#box(referenced)#box(str(block-label))] #current-annot.label]) } else { none } let annot-content = { $lr(}, size: #height) #num #current-annot.content #label$ } (grid.cell( rowspan: current-annot.end - current-annot.start + 1, align: left + horizon, annot-content + extra ), ) } else if current-annot != none or not has-annotations { () } else { (extra, ) } // Try and look for a skip let skip = skips.at(0, default: none) if skip != none and i == skip.at(0) { items.push(skip-number) items.push(skip-line) // Advance the offset. offset += skip.at(1) _ = skips.remove(0) } if not in_range(line.number) { continue } // Always push the formatted line number let l = [#raw.line(line.number + offset, line.count, line.text, line.body)<codly-highlighted>] // Must be done before the smart indentation code. // Otherwise it results in two paragraphs. if numbers-format != none { items.push(numbers-format(line.number + offset)) } else { l += box(height: height, width: 0pt) } if line.number != start or (display-names != true and display-icons != true) { items = (..items, l, ..annot()) continue } else if it.lang == none { items = (..items, l, ..annot()) continue } // The language block (icon + name) let language-block = if it.lang in languages { let lang = languages.at(it.lang); let name = if type(lang) == str { lang } else if display-names and "name" in lang { lang.name } else { [] } let icon = if display-icons and "icon" in lang { lang.icon } else { [] } let color = if "color" in lang { lang.color } else { default-color } (language-block)(name, icon, color) } else if display-names { (language-block)(it.lang, [], default-color) } // Push the line and the language block in a grid for alignment let lb = measure(language-block); if has-annotations { items = (..items, l, ..annot(extra: place( right + horizon, dx: lang-outset.x, dy: lang-outset.y, language-block ))) } else { items.push(grid( columns: (1fr, lb.width + 2 * padding), l, place( right + horizon, dx: lang-outset.x, dy: lang-outset.y, language-block ), )) } } // If the fill or zebra color is a gradient, we will draw it on a separate layer. let is-complex-fill = ((type(fill) != color and fill != none) or (type(zebra-color) != color and zebra-color != none)) return { block( breakable: breakable, clip: true, width: 100%, radius: radius, stroke: stroke, { if is-complex-fill { // We use place to draw the fill on a separate layer. place( grid( columns: if has-annotations { (1fr, annot-width) } else { (1fr, ) }, stroke: none, inset: padding * 1.5, fill: (x, y) => if zebra-color != none and calc.rem(y, 2) == 0 { zebra-color } else { fill }, ..it.lines.map((line) => hide(line)) ) ) } if numbers-format != none { grid( columns: if has-annotations { (auto, 1fr, annot-width) } else { (auto, 1fr) }, inset: padding * 1.5, stroke: none, align: (numbers-alignment, left + horizon), fill: if is-complex-fill { none } else { (x, y) => if zebra-color != none and calc.rem(y, 2) == 0 { zebra-color } else { fill } }, ..items, ) } else { grid( columns: if has-annotations { (1fr, annot-width) } else { (1fr) }, inset: padding * 1.5, stroke: none, align: (numbers-alignment, left + horizon), fill: (x, y) => if zebra-color != none and calc.rem(y, 2) == 0 { zebra-color } else { fill }, ..items, ) } } ) if offset != 0 { state("codly-offset").update(0) } if range != none { state("codly-range").update(none) } if skips != none and skips != () { state("codly-skips").update(()) } if has-annotations { state("codly-annotations").update(()) } let highlights = state("codly-highlights").get() if highlights != none and highlights != () { state("codly-highlights").update(()) } } } body } /// Allows setting codly setting locally. /// Anything that happens inside the block will have the settings applied only to it. /// The pre-existing settings will be restored after the block. This is useful /// if you want to apply settings to a specific block only. /// /// #pre-example() /// #example(````` /// *Special:* /// #local(default-color: red)[ /// ``` /// Hello, world! /// ``` /// ] /// /// *Normal:* /// ``` /// Hello, world! /// ``` /// `````, mode: "markup", scale-preview: 100%) #let local(body, ..args) = context { let old = __codly-save() codly(..args) body __codly-load(old) }
https://github.com/daniel-eder/typst-template-jku
https://raw.githubusercontent.com/daniel-eder/typst-template-jku/main/src/template/styles/content.typ
typst
// SPDX-FileCopyrightText: 2023 <NAME> // // SPDX-License-Identifier: Apache-2.0 #import "./header.typ": header as headerstyle #let content(it) = { set page( numbering: "1", number-align: center, header: headerstyle() ) //TODO: For level 1 headings in content consider enabling the below to show "Chapter N" one line above the heading title // show heading.where(level: 1): it => [ // // #pagebreak(weak: true) // #set text(size: 24pt) // #v(1.5in) // #block[ // #if it.numbering != none [ // Chapter #counter(heading).display() // #v(0.5cm) // ] // #par(first-line-indent: 0pt)[#it.body] // ] // #v(1.5cm, weak: true) // ] it }
https://github.com/smorad/um_cisc_7026
https://raw.githubusercontent.com/smorad/um_cisc_7026/main/lecture_1_intro.typ
typst
#import "@preview/polylux:0.3.1": * #import themes.university: * #import "@preview/cetz:0.2.2": canvas, draw #import "common.typ": * // FUTURE TODO: Introduce function notation #show: university-theme.with( aspect-ratio: "16-9", short-title: "CISC 7026: Introduction to Deep Learning", short-author: "<NAME>", short-date: "Lecture 1: Introduction" ) #show: slide_template #title-slide( // Section time: 34 mins at leisurely pace title: [Introduction], subtitle: "CISC 7026: Introduction to Deep Learning", institution-name: "University of Macau", //logo: image("logo.jpg", width: 25%) ) /* #slide[ #utils.register-section[section1] #utils.register-section[section2] #utils.polylux-outline() #utils.current-section ] */ #slide(title: [Overview])[ + Brief chat + Course Information + Course Structure + Lecture #pdfpc.speaker-note("bork") ] #slide(title: [Overview])[ + *Brief chat* + Course Information + Course Structure + Lecture ] #slide(title: [Brief Chat])[ This is my first course at UM #pause I taught a course on Deep Reinforcement Learning at Cambridge #pause I am not perfect, and I am still learning how to teach effectively #pause Please provide feedback privately to me #pause - Email smorad at um.edu.mo - Chat after class #pause I would like to make the class *interactive* #pause The best way to learn is to *ask questions* and have *discussions* ] #slide(title: [Brief Chat])[ I will tell you about myself, and why I am interested in deep learning #pause Then, *you* will tell me why you are interested in deep learning #pause It will help me alter the course towards your goals ] #slide(title: [Brief Chat])[ I was always interested in space and robotics #pause #side-by-side[#cimage("figures/lecture_1/az.jpg", height: 60%)][#cimage("figures/lecture_1/speer.png", height: 60%)] ] #slide[ After school, I realized much of the classical robotics that we learn in school *does not work* in reality #pause #cimage("figures/lecture_1/curiosity.jpg", height: 50%) #pause Today's robots are stupid -- important robots are human controlled ] #slide[ Since then, I have focused on creating less stupid robots #pause #side-by-side[#cimage("figures/lecture_1/cambridge.jpg", height: 70%)][#cimage("figures/lecture_1/robomaster.jpg", height: 70%)] #pause Robots that *learn* from their mistakes ] // 16 mins when I blab #slide[ I am interested in *deep learning* because I want to make smarter robots #pause There are many tasks that humans do not like to do, that robots can do #pause #v(2em) #align(center)[What do you want to learn? Why?] ] // #slide(title: [Brief Chat])[ // I am interested in Deep Learning because I think it is the most promising approach for automating tasks that we do not want to do #pause // I am interested in *deep reinforcement learning* and *memory* #pause // - Reinforcement learning trains agents that know how to interact with the world #pause // - Memory gives them the ability to remember your favorite food, where the agents live, etc #pause // I am interested in this course because it enables me to continue my research #pause // #align(center)[What are you here to learn? What interests you?] // ] #slide(title: [Brief Chat])[ I am starting a lab, and looking for research students focusing on deep reinforcement learning and robotics #pause If you finish the course and find it too easy, send me an email! ] #slide(title: [Overview])[ + *Brief chat* + Course Information + Course Structure + Lecture ] // ~8 mins at very slow pace #slide(title: [Overview])[ + Brief chat + *Course Information* + Course Structure + Lecture ] #slide(title: [Course Info])[ Most communication will happen over Moodle #pause - I will try and post lecture slides after each lecture #pause - Assignments #pause - Grading ] #slide(title: [Course Info])[ *Prerequisites*: #pause - Programming in python #pause - Should be able to implement a stack, etc #pause - Linear algebra #pause - Multiply matrices, invert matrices, solve systems of equations, etc #pause - Multivariable calculus #pause - Computing gradients $mat((partial f) / (partial x_1), (partial f) / (partial x_2), dots)^top $ #pause *Good to Know:* #pause - Probability #pause - Bayes rule, conditional probabilities $P(a | b) = (P(b | a) P(a)) / P(b)$ ] #slide(title: [Course Info])[ *Grading (subject to change):* #pause - 70% assignments #pause - 20% quiz #pause - 10% attendance and participation - Name plates ] #slide(title: [Course Info])[ *Office Hours:* Monday and Tuesday 11:00 - 12:00, E11 4026 #pause Review assignments early, so you can attend Tuesday office hours #pause Monday office hours will be crowded before deadlines #pause - You will not have much time if you have not started! ] // 26 mins blabbing #slide(title: [Overview])[ + Brief chat + *Course Information* + Course Structure + Lecture ] #slide(title: [Overview])[ + Brief chat + Course Information + *Course Structure* + Lecture ] #slide(title: [Course Structure])[ This course is structured after the _Dive into Deep Learning_ textbook and Prof. <NAME>'s slides #pause The textbook is available for free online at https://d2l.ai #pause If you get confused by a lecture, try reading the corresponding chapter #pause Also available in Chinese at https://zh.d2l.ai #pause We will start from the basics and learn the theory behind Deep Learning #pause Your assignments will teach you two popular Deep Learning libraries: #pause - PyTorch #pause - JAX ] //32 mins very slow #slide(title: [Course Structure])[ 3 hours is a very long time to pay attention #pause I will place slides titled "Relax", every $tilde 45$ minutes #pause At the Relax slides, we may take a $tilde 15$ minute break #pause You can: #pause - Leave the classroom #pause - Use the toilet #pause - Walk around #pause - Ask me questions #pause This format is subject to change ] #slide(title: [Course Structure])[ We will be following the history of machine learning #pause #cimage("figures/lecture_1/timeline.svg", height: 70%) ] // 38 blabbing /* #slide(title: [Course Structure])[ We will be touching on the following topics (subject to change) #pause - Introduction to machine learning #pause - Linear regression and classification #pause - Neural Networks and the Perceptron #pause - Convolutional Neural Networks #pause - Recurrent Neural Networks #pause - Attention and Transformers #pause - Reinforcement Learning ] */ //#focus-slide[Questions?] #slide(title: [Overview])[ + Brief chat + Course Information + *Course Structure* + Lecture ] #slide(title: [Overview])[ + Brief chat + Course Information + Course Structure + *Lecture* ] // 25 mins very slow // 39 mins blabbing #focus-slide[Relax] // ~17 mins very slow #title-slide( // Section time: 34 mins at leisurely pace title: [Introduction], subtitle: "CISC 7026: Introduction to Deep Learning", institution-name: "University of Macau", //logo: image("logo.jpg", width: 25%) ) #slide(title: [Overview])[ + Deep Learning Successes #pause + What is Deep Learning? #pause + Differences between AI, ML, DL #pause + Define Machine Learning #pause + Machine Learning Libraries ] // TODO remove supervised/unsupervised and classification #slide(title: [Overview])[ + *Deep Learning Successes* + What is Deep Learning? + Differences between AI, ML, DL + Define Machine Learning + Machine Learning Libraries ] #slide(title: [Successes])[ Deep learning is becoming very popular worldwide #cimage("figures/lecture_1/ml_chart.jpg", height: 70%) #text(size: 12pt)[Credit: Stanford University 2024 AI Index Report] ] #slide(title: [Successes])[ Many things that were once considered science fiction are now possible through deep learning. It can draw pictures for us #cimage("figures/lecture_1/ai_generated.png", height: 70%) ] #slide(title: [Successes])[ It can beat the world champions at difficult video games like DotA 2 #cimage("figures/lecture_1/openai5.jpeg", height: 70%) #link("https://youtu.be/eHipy_j29Xw?si=iM8QVB6_P-ROUU1Y") ] #slide(title: [Successes])[ It is learning to use tools and break rules #link("https://youtu.be/kopoLzvh5jY?si=keH4i8noY4zUVNrP") ] // 55 mins blabbing, no break #slide(title: [Successes])[ It is operating fully autonomous taxis in four cities #cimage("figures/lecture_1/waymo.png", height: 60%) #link("https://www.youtube.com/watch?v=Zeyv1bN9v4A") ] #slide(title: [Successes])[ Maybe it is doing your homework, then explaining itself #cimage("figures/lecture_1/homework.png", height:80%) ] #slide(title: [Successes])[ It is making you lose money in the stock market #cimage("figures/lecture_1/stocks.jpeg", height: 80%) ] #slide(title: [Successes])[ It is telling your doctor if you have cancer #cimage("figures/lecture_1/cancer.jpeg", height: 80%) ] #slide(title: [Successes])[ We are solving more and more problems using deep learning #pause Deep learning is creeping into our daily lives #pause In many cases, deep models outperform humans #pause Our deep models keep improving as we get more data #pause *Opinion:* In the next 10-20 years, our lives will look very different ] // ~26 mins very slow #slide(title: [Successes])[ Throughout this course, you will be training your own deep models #pause After the course, you will be experts at deep learning #pause Deep learning is a powerful tool #pause Like all powerful tools, deep learning can be used for evil #pause #v(2em) #align(center)[*Request:* Before you train a deep model, ask yourself whether it is good or bad for the world] ] // 1h10m blabbing #slide(title: [Overview])[ + *Deep Learning Successes* + What is Deep Learning? + Differences between AI, ML, DL + Define Machine Learning + Machine Learning Libraries ] #slide(title: [Overview])[ + Deep Learning Successes + *What is Deep Learning?* + Differences between AI, ML, DL + Define Machine Learning + Machine Learning Libraries ] #slide(title: [DL at a Glance])[ At a high level, how does deep learning work? #pause It consists of four parts: + Dataset + Deep neural network + Loss function + Optimization procedure ] #slide(title: [DL at a Glance])[ The dataset provides a set inputs and associated outputs #align(center)[ #grid( columns: 2, column-gutter: 4cm, row-gutter: 1cm, cimage("figures/lecture_1/dog.png", height: 60%), cimage("figures/lecture_1/muffin.png", height: 60%), align(center)[#text(size: 32pt)[Dog]], align(center)[#text(size: 32pt)[Muffin]], ) ] ] #slide(title: [DL at a Glance])[ The *neural network* learns to map the inputs to outputs #cimage("figures/lecture_1/dog_to_caption_nn.png", height: 80%) ] #slide(title: [DL at a Glance])[ The *loss function* describes how "wrong" the neural network is. We call this "wrongness" the *loss*. #pause #cimage("figures/lecture_1/loss_function_nn.png", height: 70%) ] #slide(title: [DL at a Glance])[ The *optimization procedure* changes the neural network to reduce the loss #pause #cimage("figures/lecture_1/optimizer_nn.png", height: 70%) ] #slide(title: [DL at a Glance])[ At a high level, how does deep learning work? It consists of four parts: + Dataset + Deep neural network + Loss function + Optimization procedure ] // 1h19 blabbing no break #slide(title: [Overview])[ + Deep Learning Successes + *What is Deep Learning?* + Differences between AI, ML, DL + Define Machine Learning + Machine Learning Libraries ] // 45 mins slow? #focus-slide[Relax] #slide(title: [Overview])[ + Deep Learning Successes + What is Deep Learning? + *Differences between AI, ML, DL* + Define Machine Learning + Machine Learning Libraries ] #slide(title: [AI, ML, DL])[ #side-by-side[ #cimage("figures/lecture_1/ai_ml_dl.svg") #pause ][ Deep Learning is a type of Machine Learning #pause Machine learning defines *what* we are trying to do #pause Deep learning defines *how* we do it #pause Before we can understand deep learning, we must become familiar with machine learning ] ] #slide(title: [Overview])[ + Deep Learning Successes + What is Deep Learning? + *Differences between AI, ML, DL* + Define Machine Learning + Machine Learning Libraries ] #slide(title: [Overview])[ + Deep Learning Successes + What is Deep Learning? + Differences between AI, ML, DL + *Define Machine Learning* + Machine Learning Libraries ] #slide(title: [ML])[ *Task:* Write a program to determine if a picture contains a dog. #pause *Question:* How would you program this? #pause #cimage("figures/lecture_1/dog_muffin.jpeg", width: 50%) #pause Would your method still work? #pause We often know *what* we want, but we do not know *how* ] #slide(title: [ML])[ We give machine learning the *what* #pause And it tells us the *how* #pause In other words, we tell an ML model *what* we want it to do #pause And it learns *how* to do it ] #slide(title: [ML])[ We often know *what* we want, but we do not know *how* #pause We have many pictures of either dogs or muffins $x in X$ #pause We want to know if the picture is [dog | muffin] $y in Y$ #pause We learn a function or mapping from $X$ to $Y$ #pause $ f: X |-> Y $ #pause Machine learning tells us how to find $f$ ] #slide(title: [ML])[ #cimage("figures/lecture_1/dog_muffin.svg", width: 100%) ] /* #slide(title: [ML])[ In machine learning, our goal is to learn a function $f$ #pause Often, our functions look different than you might expect #pause #side-by-side[ #text(size: 60pt)[$ f(x) = x^2 $] #pause ][ #cimage("figures/lecture_1/dog_muffin.svg", width: 100%) #pause ] #v(1em) #align(center)[But they are indeed both mathematical functions!] ] */ #slide(title: [ML])[ Consider some more interesting functions #pause $ f: "image" |-> "caption" $ #pause $ f: "caption" |-> "image" $ #pause $ f: "English" |-> "Chinese" $ #pause $ f: "law" |-> "change in climate" $ #pause $ f: "voice command" |-> "robot action" $ #pause *Question:* Can anyone suggest other interesting functions? ] // ~45 mins slow #slide(title: [ML])[ Why do we call it machine *learning*? #pause We learn the function $f$ from the *data* $x in X, y in Y$ #pause More specifically, we learn function *parameters* $Theta$ #pause $ f: X, Theta |-> Y $ ] #slide[ More specifically, we learn function *parameters* $Theta$ $ f: X, Theta |-> Y $ #only(2)[$ f("你好吗", vec(theta_1, theta_2, dots.v)) = "You good?" $] #only((3))[ $ f( #image("figures/lecture_1/dog.png", height: 20%), vec(theta_1, theta_2, dots.v) ) = "Dog" $ ] #only((4))[ $ f( #image("figures/lecture_1/muffin.png", height: 20%), vec(theta_1, theta_2, dots.v) ) = "Muffin" $ ] #only((5,6))[ $ f("Dog", vec(theta_1, theta_2, dots.v) ) = #image("figures/lecture_1/dog.png", height: 20%) $ ] #only(6)[ Machine learning learns the parameters that solve difficult problems ] ] #slide(title: [ML])[ *Summary:* #pause + Certain problems are difficult to solve with programming #pause - Dog or muffin? #pause + Machine learning provides a framework to solve difficult problems #pause - We learn the parameters $theta$ for some function $f(x, theta) = y$ ] #focus-slide[Relax] #slide(title: [ML])[ You will use Python with machine learning libraries in this course #pause We will specifically focus on: #pause - JAX #pause - PyTorch #pause You should become comfortable using these libraries #pause - Read tutorials online #pause - Play with the libraries ] // #slide(title: [ML])[ // + JAX vs PyTorch // + Based on numpy and matlab // + Matrix operations // ] #slide[ Both JAX and PyTorch are libraries for the Python language #pause They are both based on `numpy`, which itself is based on `MATLAB` #pause Both libraries are *tensor processing* libraries #pause - Designed for linear algebra and taking derivatives #pause To install, use `pip` #pause - `pip install torch` #pause - `pip install jax jaxlib` ] #slide[ Create vectors, matrices, or tensors in `jax` ```python import jax.numpy as jnp a = jnp.array(1) # Scalar b = jnp.array([1, 2]) # Vector C = jnp.array([[1,2], [3,4]]) # 2x2 Matrix D = jnp.ones((3,3,3)) # 3x3x3 Tensor ``` You can determine the dimensions of a variable using `shape` ```python b.shape # Prints (2,) C.shape # Prints (2,2) D.shape # prints (3,3,3) ``` ] #slide[ Create vectors, matrices, or tensors in `pytorch` ```python import torch a = torch.tensor(1) # Scalar b = torch.tensor([1, 2]) # Vector C = torch.tensor([[1,2], [3,4]]) # 2x2 Matrix D = torch.ones((3,3,3)) # 3x3x3 Tensor ``` You can determine the dimensions of a variable using `shape` ```python b.shape # Prints (2,) C.shape # Prints (2,2) D.shape # prints (3,3,3) ``` ] #slide[ Most operations in `jax` and `pytorch` are *vectorized* #pause - Executed in parallel, very fast #pause ```python import jax.numpy as jnp s = 5 * jnp.array([1, 2]) print(s) # jnp.array(5, 10) x = jnp.array([1, 2]) + jnp.array([3, 4]) print(x) # jnp.array([4, 6]) y = jnp.array([1, 2]) * jnp.array([3, 4]) # Careful! print(y) # jnp.array([3, 8]) z = jnp.array([[1], [2]]) @ jnp.array([[3, 4]]) print(z) # A^t B (dot product), jnp.array([[11]]) ``` ] #slide[ `pytorch` is very similar to `jax` ```python import torch s = 5 * torch.tensor([1, 2]) print(s) # torch.tensor(5, 10) x = torch.tensor([1, 2]) + torch.tensor([3, 4]) print(x) # torch.tensor([4, 6]) y = torch.tensor([1, 2]) * torch.tensor([3, 4]) # Careful! print(y) # torch.tensor([3, 8]) z = torch.tensor([[1], [2]]) @ torch.tensor([[3, 4]]) print(z) # A^t B (dot product), torch.tensor([[11]]) ``` ] #slide[ You can also call various methods on arrays/tensors ```python import jax.numpy as jnp x = jnp.array([[1, 2], [3, 4]]).sum(axis=0) print(x) # Sum across leading axis, array([4, 6]) y = jnp.array([[1, 2], [3, 4]]).mean() print(y) # Mean across all axes, array(2.5) z = jnp.array([[1, 2], [3, 4]]).reshape((4,)) print(z) # jnp.array([1, 2, 3, 4]) ``` ] #slide[ Same thing for `pytorch` ```python import torch x = torch.tensor([[1, 2], [3, 4]]).sum(axis=0) print(x) # Sum across leading axis, array([4, 6]) y = torch.tensor([[1, 2], [3, 4]]).mean() print(y) # Mean across all axes, array(2.5) z = torch.tensor([[1, 2], [3, 4]]).reshape((4,)) print(z) # torch.tensor([1, 2, 3, 4]) ``` ] #slide[ These libraries can produce tricky error messages! #pause #text(size: 20pt)[ ```python >>> jnp.array([[1,2]]) @ jnp.array([[3,4]]) # (1, 2) x (1, 2) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/local/scratch/sm2558/miniconda3/envs/jax/lib/python3.11/site-packages/jax/_src/numpy/array_methods.py", line 256, in deferring_binary_op return binary_op(*args) ^^^^^^^^^^^^^^^^ File "/local/scratch/sm2558/miniconda3/envs/jax/lib/python3.11/site-packages/jax/_src/numpy/lax_numpy.py", line 3192, in matmul out = lax.dot_general( ^^^^^^^^^^^^^^^^ TypeError: dot_general requires contracting dimensions to have the same shape, got (2,) and (1,). ``` ] ] #slide[ Let us do a Google Colab tutorial! ] #slide[ Let us set up a local `conda` environment ] #slide[ *Homework:* #pause - Review linear algebra if you are not familiar #pause - Install `pytorch` and `jax` onto your computer, or use Google Colab #pause - Play around with them #pause - What does `@` do if you have a `(3, 3, 3)` tensor? #pause - What does `*` do if one tensor has fewer dimensions? #pause - How do you invert a matrix? #pause - What does `jnp.arange, jnp.zeros, jnp.full` do? #pause - `torch.arange, torch.zeros, torch.full` #pause - Read the documentation #pause ] #slide[ There might be a quiz on `jax` and `pytorch` operations next lecture ] // 1h25m + 30 min break = 1h55m total
https://github.com/soul667/typst
https://raw.githubusercontent.com/soul667/typst/main/PPT/MATLAB/touying/docs/i18n/zh/docusaurus-plugin-content-docs/current/intro.md
markdown
--- sidebar_position: 1 --- # Touying 介绍 [Touying](https://github.com/touying-typ/touying) 是为 Typst 开发的幻灯片/演示文稿包。Touying 也类似于 LaTeX 的 Beamer,但是得益于 Typst,你可以拥有更快的渲染速度与更简洁的语法。后面,我们会使用 slides 指代幻灯片,slide 指代单张幻灯片,subslide 指代子幻灯片。 ## 为什么使用 Touying - 相较于 PowerPoint,Touying 并非「所示即所得的」,你可以使用一种「内容与样式分离」的方式编写你的 slides,尤其是 Typst 作为一个新兴的排版语言,提供了简洁但强大的语法,对于代码块、数学公式和定理等内容有着更好的支持。另一个优势是,在有着模板的情况下,用 Touying 编写 slides 要比 PowerPoint 快得多。因此 Touying 相较于 PowerPoint,更适合有着「科研写作」需求的用户使用。 - 相较于 Markdown Slides,Touying 所依托的 Typst 有着更强大的排版控制能力,例如页眉、页脚、布局和便捷的自定义函数,而这是 Markdown 很难具备、或者说很难做好的能力。并且 Touying 提供了 `#pause` 和 `#meanwhile` 标记,提供了更为便捷的动态 slides 能力。 - 相较于 Beamer,Touying 有着更快的编译速度、更简洁的语法,以及更简单的自定义主题的能力。相较于 Beamer 动辄几秒几十秒的编译时间,Touying 的编译速度基本上能够维持在几毫秒几十毫秒。并且 Touying 的语法相较于 Beamer 更为简洁,也更容易更改模板主题,以及创建你自己的模板。在功能上,Touying 支持了 Beamer 大部分的能力,并且还提供了一些 Beamer 所没有的便利功能。 - 相较于 Polylux,Touying 提供了一种 oop 风格的语法,能够通过全局单例模拟提供「全局变量」的能力,进而可以方便地编写主题。并且 Touying 并不依赖 `counter` 和 `locate` 来实现 `#pause`,因此能有更好的性能。Touying 自身定位是一个社区驱动的项目(我们欢迎更多的人加入),并且不会过分强调维持 API 的一致性,而是选择维护多个版本的文档,因而能够提供更多新颖但强大的功能。 ## 名称来源 Touying 取自中文里的「投影」,在英文中意为 project。相较而言,LaTeX 中的 beamer 就是德文的投影仪的意思。 ## 关于文档 这个文档通过 [Docusaurus](https://docusaurus.io/) 驱动开发,我们将会为 Touying 维持英文和中文版本的文档,并且每个大版本维护一份文档,以便你随时可以查阅旧版本的 Touying 文档,并且可以更容易地迁移到新版本。 Docusaurus 创建新版本: ```sh npm run docusaurus docs:version 0.y.x ``` Docusaurus 多语言: ```sh npm run start -- --locale zh ``` ## 贡献 Touying 是免费、开源且社区驱动的。如果你感兴趣,你可以随时访问 [GitHub](https://github.com/touying-typ/touying) 并提出 issue 或 PR,我们也同样欢迎你加入 [touying-typ](https://github.com/touying-typ) 组织。 ## License Touying is released under the [MIT license](https://github.com/touying-typ/touying/blob/main/LICENSE).
https://github.com/ysthakur/PHYS121-Notes
https://raw.githubusercontent.com/ysthakur/PHYS121-Notes/main/Practice/11.typ
typst
MIT License
#import emoji: square = Practice Problems Ch 11 #square.black = Initially got wrong 1. ✅ C 2. ✅ D 3. ✅ A 5. ✅ E 6. #square.black E: no engine can be more efficient than a Carnot engine operating between the same two temperatures