anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

TheAlgorithms’ open source collection of algorithms and data structures, each written in Python for learning. Setup notes cover reading it on GitHub or its docs site, a clone or ZIP, running a file’s doctests, the dev container, and using Claude Code, Codex or Cursor as a tutor.
The Algorithms Python is an open-source project on GitHub in the Education category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.
git clone https://github.com/TheAlgorithms/Python.git cd Python
The Algorithms Python is a public collection of algorithms and data structures, each one a Python file you can read. The README calls it “All algorithms implemented in Python” and says it is for education. Files sit in folders by topic, such as sorts, searches, graphs, dynamic_programming, ciphers and maths. Contributors write them, and CONTRIBUTING.md asks for type hints, docstrings and doctests, so most files come with examples you can run. The README warns that the implementations “may be less efficient than the implementations in the Python standard library.”
People who learn an algorithm best by reading working code: students, self-taught developers and anyone preparing for interviews. The README says the code is for learning, and GitHub’s topics for the repository include education, interview and practice. It also suits anyone who wants a first open source pull request, since CONTRIBUTING.md welcomes new implementations and better doctests.
| Who | How they use it | Example |
|---|---|---|
| Students | Read a file next to a course and run its doctests | A student studying sorting opens sorts/bubble_sort_recursive.py and runs its doctests to see what each call returns. |
| Self-taught developers | Write their own version first, then compare | Someone writes a greatest common divisor function, then checks it against the cases in maths/greatest_common_divisor.py, such as negative numbers and zero. |
| Interview candidates | Read the file for a classic problem, then write it again from memory | A candidate reads searches/binary_search.py, closes it and writes the function again. |
| Teachers | Send learners to one folder or file for one topic | A teacher gives a class the ciphers folder and asks each student to explain one file. |
| First-time contributors | Fix a doctest or add an algorithm by pull request | A newcomer improves the doctests of one file in a pull request that changes nothing else. |
Skip it if you need a library to import in production. The README says the implementations are for learning only and to “Use them at your discretion.”
You can read it anywhere you open a web page, and you can run a file wherever a new enough Python runs (pyproject.toml asks for 3.15 or later).
The repository has an AGENTS.md and three agent skill files, written for people who send or review pull requests and triage issues. Mindket’s notes show how to use Claude Code, Codex or Cursor as a tutor while you read the repository, and they mark which steps are Mindket’s.
Get it saves a zip of Mindket’s setup notes in your downloads folder. The code needs no install to read. To run a file you need Python and your own copy of the repository.
| Need | Detail |
|---|---|
| Nothing | To read the code on GitHub or the docs site |
| Python | 3.15 or later: pyproject.toml says requires-python = ">=3.15", CONTRIBUTING.md asks for free-threaded 3.15t+, and .python-version holds 3.15t. In Mindket’s test run, two files passed on 3.14 and one failed on 3.12 with a SyntaxError |
| Git or a ZIP | A clone, or Code then Download ZIP on GitHub (Mindket’s note: ordinary GitHub, not in the README), gives you the files |
| Packages | Only some files import them. pyproject.toml lists numpy, pandas, scikit-learn, httpx2 and others |
| uv | Optional. The maker’s commands use uv and uvx |
git clone https://github.com/TheAlgorithms/Python.git cd Python
The next command is from CONTRIBUTING.md. Replace my_submission.py with the file’s path, such as sorts/bubble_sort_recursive.py.
python3 -m doctest -v my_submission.py
Start from DIRECTORY.md, which lists every Python file under its folder, and open one. Read the docstring first. CONTRIBUTING.md says it should explain the code or link a source such as Wikipedia, and that doctests should cover both valid and erroneous input. So the doctests read as a list of inputs and the answer each must give. Run them. Then change the code and run them again to see what breaks.
Read the end of a file before you run it directly. maths/greatest_common_divisor.py asks you to type two integers, and web_programming/current_stock_price.py requests Yahoo Finance pages.
The grouping below is Mindket’s. The folder names are the repository’s.
| Topic | Folders |
|---|---|
| Data and searching | data_structures, sorts, searches, hashes, strings |
| Problem-solving methods | backtracking, divide_and_conquer, dynamic_programming, greedy_methods, knapsack, graphs, networking_flow |
| Maths and science | maths, matrix, linear_algebra, linear_programming, geometry, physics, quantum, fractals, geodesy, electronics, bit_manipulation, boolean_algebra, conversions |
| Data and signals | machine_learning, neural_network, genetic_algorithm, fuzzy_logic, audio_filters, computer_vision, digital_image_processing, data_compression, graphics, cellular_automata |
| Everything else | ciphers, blockchain, file_transfer, scheduling, web_programming, financial, project_euler, other |
With an agent, name the file and ask for an explanation or a check, not a rewrite.
Open sorts/bubble_sort_recursive.py and explain in plain words what each doctest checks. Do not change any file.
You open sorts/bubble_sort_recursive.py from the Sorts list in DIRECTORY.md. It opens with “A pure Python implementation of the recursive bubble sort algorithm.” The function takes a type parameter, def bubble_sort_recursive[T: Comparable](arr: list[T]) -> list[T]:, and its docstring holds doctests such as:
>>> bubble_sort_recursive([5, 1, 4, 2, 8]) [1, 2, 4, 5, 8] >>> bubble_sort_recursive([1, "two"]) # doctest: +ELLIPSIS Traceback (most recent call last): ... TypeError: ...
The second example is the file’s rule for bad input: mixing a number and a string must raise a TypeError. You run the doctests with the command above. In Mindket’s test run on 3 November 2026 they passed under Python 3.14 and 3.12, with this file and one other copied from the repository into an empty folder. Then you change the comparison in the function and run them again to see which examples fail.
If you are new. An algorithm is a fixed method for one task, such as putting a list in order or finding an item in it. A data structure is a way to hold data, such as a linked list or a tree. A doctest is an example inside a function’s docstring: a line that starts with >>> is a call, and the line under it is what the call must return. Python’s doctest module runs those examples and reports any that differ. You need to be able to install Python and type a command in a terminal. Start with a folder whose name you know, such as sorts, and open the first file.
For experts. The repository tracks the newest CPython and its free-threaded builds. .python-version holds 3.15t, pyproject.toml requires 3.15 or later, and build.yml runs pytest with pytest-run-parallel and --ignore-gil-enabled. Its comment says some compiled dependencies do not yet ship the slot that keeps the GIL off, so importing them re-enables the GIL under 3.15t.
The build workflow’s pytest run skips four files that import cv2, the digital_image_processing folder, project_euler, docs/conf.py, scripts/validate_solutions.py and two web files. Pre-commit runs ruff, codespell, a filename check, rumdl for Markdown and uv-lock, among others. ty runs as an informational check that does not block a merge yet.
DIRECTORY.md is regenerated by scripts/build_directory_md.py at the end of a passing build. Project Euler answers are checked by scripts/validate_solutions.py, not by doctests, and that folder’s README says the ten slowest solutions show in the Actions logs. The scripts folder also holds shell scripts that close pull requests for missing tests, type hints or descriptive names, which its README ties to the Hacktoberfest rush in October.
The code is for study. Read a file before you build on it.
This kit holds setup notes only. Mindket wrote them. The code stays in the TheAlgorithms/Python repository: https://github.com/TheAlgorithms/Python
These notes are not made or endorsed by TheAlgorithms. GitHub's description of the repository is "All Algorithms implemented in Python". The README's own line under its title is "All algorithms implemented in Python - for education", and its first paragraph says "Implementations are for learning purposes only. They may be less efficient than the implementations in the Python standard library. Use them at your discretion." The notes were written from the README, CONTRIBUTING.md, AGENTS.md, SECURITY.md, LICENSE.md, pyproject.toml, the .python-version file, the dev container files, four of the GitHub Actions workflows (build, ruff, sphinx and ty), the three agent skill files and the docs site's home page, all read on 3 November 2026. A test run of two of the repository's files is described in setup/run-a-file.md.
License: MIT. GitHub's answer for the repository names it "MIT License" (SPDX id MIT), and LICENSE.md begins "MIT License" and "Copyright (c) 2016-2022 TheAlgorithms and contributors". The README of the project_euler/ folder adds that its problems come from https://projecteuler.net/ and "are licensed under CC BY-NC-SA 4.0", so that folder's problem statements have a second license. These notes quote only short lines from the repository, among them two single lines of its code, and name the page each came from. They hold no whole file.
A public collection of algorithms and data structures, each written in Python as a file you can read, grouped in folders by topic. The README calls the project "All algorithms implemented in Python" and says it is for education. Contributors write the files. CONTRIBUTING.md asks for type hints, docstrings and doctests, so most files carry examples that you can run. Source: https://github.com/TheAlgorithms/Python/blob/master/README.md
The repository's folders, as the table of contents of DIRECTORY.md names them on 3 November 2026: Audio Filters, Backtracking, Bit Manipulation, Blockchain, Boolean Algebra, Cellular Automata, Ciphers, Computer Vision, Conversions, Data Compression, Data Structures, Digital Image Processing, Divide And Conquer, Docs, Dynamic Programming, Electronics, File Transfer, Financial, Fractals, Fuzzy Logic, Genetic Algorithm, Geodesy, Geometry, Graphics, Graphs, Greedy Methods, Hashes, Knapsack, Linear Algebra, Linear Programming, Machine Learning, Maths, Matrix, Networking Flow, Neural Network, Other, Physics, Project Euler, Quantum, Scheduling, Searches, Sorts, Strings, Tests and Web Programming. The list changes as folders are added. Source: https://github.com/TheAlgorithms/Python/blob/master/DIRECTORY.md
Besides the algorithm folders, the repository holds:
DIRECTORY.md: a list of every Python file, by folder, that the build regeneratesCONTRIBUTING.md, AGENTS.md, SECURITY.md, LICENSE.md and index.mdpyproject.toml, uv.lock and .python-version: the Python version and the packages.devcontainer/, .gitpod.yml and .pre-commit-config.yaml: the maker's setup for a dev container, Gitpod and pre-commit.github/: the workflows, the pull request template and three agent skill files under .github/skills/docs/ and scripts/: the Sphinx configuration, and the maker's maintenance scriptsSource: the repository's file tree (https://api.github.com/repos/TheAlgorithms/Python/git/trees/master?recursive=1).
Nothing from this kit. The repository is source files. To run one, you need Python and, for some folders, third-party packages. See setup/run-a-file.md.
requires-python = ">=3.15"). Some files fail on 3.12. See setup/run-a-file.md..devcontainer/README.md, and the Gitpod badgeA ZIP is a snapshot: download a new one to get later changes. A clone is updated with git pull (Mindket's note, ordinary Git). To remove either, delete the folder, and the downloaded ZIP file if you kept it.
git clone and git pull talk to GitHub.web_programming/current_stock_price.py requests Yahoo Finance pages.README.md 6 KB setup/ai-agents.md 4 KB setup/contribute-a-change.md 4 KB setup/dev-container-and-gitpod.md 4 KB setup/get-a-copy.md 1 KB setup/read-online.md 4 KB setup/run-a-file.md 6 KB
Updated by Mindket to the current version of this kit.
Listed GitHub projects in the same category that share the most topics with this one.
| Product | Stars | Activity | Language | License | Last change |
|---|---|---|---|---|---|
| The Algorithms Python This page | 225,927 | — | — | MIT | — |
| Free Programming BooksShares hacktoberfest · education | 401,147 | — | — | CC-BY-4.0 | — |
| System Design PrimerShares interview · python | 377,360 | Quiet | Python | — | |
| Coding Interview UniversityShares algorithm · interview | 364,052 | — | — | CC-BY-SA-4.0 | — |
| Hello AlgoShares algorithm · education | 131,980 | — | — | — | — |
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
EbookFoundation · Kit
A community list of free programming books, courses, cheat sheets, interactive tutorials, podcasts and playgrounds in many languages, administered by the Free…
donnemartin · Kit
Donne Martin’s organized collection for learning to design large-scale systems and preparing for the system design interview, with worked solutions and Anki de…
jwasham · Kit
jwasham’s multi-month study plan for becoming a software engineer, written as one long README of videos, lectures and things to implement. Setup notes cover a…