Skip to content

Instantly share code, notes, and snippets.

View nermin99's full-sized avatar
🏎️

Nermin Skenderovic nermin99

🏎️
View GitHub Profile
@nermin99
nermin99 / rename_exams.py
Created August 9, 2022 08:55
Batch rename exam names
import os
# Batch rename all files on the form:
# exam_211028.pdf -> exam_2021-10-28.pdf
filePath = './Exams/'
for fileName in sorted(os.listdir(filePath)):
prefix, after = fileName.split('_')
date, ext = after.split('.')
@nermin99
nermin99 / PrimeGenerator.js
Last active March 11, 2025 10:48
JavaScript Prime Number Generator
function* nats(n) {
yield n
yield* nats(n + 1)
}
function* sieve(gen) {
const n = gen.next().value
yield n
yield* sieve((function* () {
@nermin99
nermin99 / prime-factorizer.php
Last active June 13, 2022 07:01
Prime Factorizer
<html lang="en">
<head>
<title>Prime Factorizer</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<form method="post">