Skip to content

About

python practice: basics, algorithms, scripts and small projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

271 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-playground

my python practice repo. basics, algorithms, little scripts i actually use, and some small projects. everything runs with plain python 3, no installs needed.

basics

strings, lists, dicts/sets, comprehensions, functions and closures, files (csv/json/pathlib), exceptions and context managers, classes and dunder methods, generators, decorators. each file has a __main__ block you can just run.

algorithms

searching (binary search variations), sorting from scratch (bubble, selection, insertion, merge, quick), two pointers / sliding window, recursion and backtracking (subsets, permutations, hanoi, n-queens), and a linked list.

scripts

  • word_counter.py - word/line stats and most common words in a file
  • password_generator.py - random passwords + passphrases with a strength check
  • file_organizer.py - sorts a messy downloads folder into subfolders (has --dry-run)
  • unit_converter.py - length, weight, temperature
  • csv_summary.py - mean/median/std for every numeric column, no pandas

projects

  • cli_todo - todo list in the terminal, saves to json, has unit tests (python -m unittest)
  • expense_tracker - log expenses to csv and print monthly summaries with little bar charts
  • hangman - terminal hangman

intermediate

second round, more "real world" python:

  • typing_dataclasses.py - type hints, dataclasses (ordering, frozen), enums, protocols, generics
  • regex_practice.py - emails, phone numbers, dates, log parsing, masking card numbers
  • async_basics.py - asyncio gather, semaphores, timeouts, a producer/consumer queue
  • sqlite_practice.py - sqlite3 with parameterized queries and transactions

more projects

  • flashcards - spaced repetition flashcards (simplified anki sm-2 algorithm)

About

python practice: basics, algorithms, scripts and small projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages