This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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('.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* nats(n) { | |
yield n | |
yield* nats(n + 1) | |
} | |
function* sieve(gen) { | |
const n = gen.next().value | |
yield n | |
yield* sieve((function* () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> |