Skip to content

Instantly share code, notes, and snippets.

View SimonBrandner's full-sized avatar
🎉

Šimon Brandner SimonBrandner

🎉
View GitHub Profile
@SimonBrandner
SimonBrandner / natural-deduction-rules.typ
Created February 14, 2026 18:45
Pravidla Přirozené Dedukce
#import "@preview/curryst:0.4.0": rule, proof-tree
#let proof-box(assumption, conclusion) = box(
stroke: 0.5pt + black,
table(columns: auto, align: center + horizon, stroke: none, assumption, $dots.v$, conclusion)
)
#set page("a4", flipped: true, margin: 10pt)
#align(center + horizon)[
@SimonBrandner
SimonBrandner / pst_tahak.typ
Created January 18, 2026 08:44
Poznámky ke zkoušce na předmět Pravděpodobnost a statistika
#let margin-size = 5mm
#set page(
paper: "a4",
flipped: true,
margin: (top: margin-size, left: margin-size, bottom: margin-size, right: margin-size),
numbering: "1",
number-align: center,
)
#set text(size: 11pt, lang: "cs")
#set par(justify: true)
@SimonBrandner
SimonBrandner / gem.py
Last active November 17, 2024 09:38
GEM
from typing import List, Self, Union
import math
import copy
class Ratio:
numerator: int
denominator: int
def __init__(self, numerator: int, denominator=1):
@SimonBrandner
SimonBrandner / longest_sentence.js
Last active July 11, 2026 07:40
Longest sentence
const text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
let currentSentence = "";
let longestSentence = "";
let numberOfSentences = 0;
let numberOfWords = 0;
const numberOfLettersInSentence = (sentence) => Array.from(sentence).reduce((acc, curr) => {
if (curr !== " ") return acc + 1;
return acc;