Blog
4 posts, 2016 — 2019
20191 post
20163 posts
- Python's GIL ProblemThe GIL means Python can only interpret one thread at a time. Here is a demonstration…
- A Simple Decision Tree ImplementationA classmate said the cafeteria food is awful. I go there often and noticed it isn't bad every day — just occasionally bad enough to make you queasy. Since the dorm has only this one cafeteria and everyone is lazy, plenty of people still queue up for it. Let's use that as an example and build a quick predictor for tomorrow…
- Building a Huffman Tree to Compress DataThe effect is obvious when a file contains many repeated characters. Because Python is slow, I compress a file of around 1 MB as a demonstration; compressing a large file this way would be painfully slow. Building the Huffman tree is fast, though, and this is not a real problem — it can be rewritten in C with the same method.