Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.96 KB

README.md

File metadata and controls

67 lines (42 loc) · 1.96 KB

Python 2 examples.

Algorithms Data structures documentation is here

Patterns documentation is here

  1. Caching - examples of decorator usage. Run python caching.py

  2. Class properties - example of accessing of class fields and adding new ones. Prints help info about object. Run python class_properties.py

  3. Context - exceptions handling. Run python context.py

  4. Converter - dummy converter of number to string of 'y'-character multiplied by this number. Run python converter.py

  5. Coroutines - coroutine implementation.

  6. Cycle coding - Code a given binary vector using cycling coding algorithm and check for errors. Run python cycle_coding

  7. Distinct Dict - dictionary holding only unique key-value pairs. Run python distinct_dict.py

  8. Echo server - tiny server echoing as a response.

  9. Folder - a tiny class with list. Run python folder.py

  10. Generators - usage of generators in python. Run python generators.py

  11. Indexer - multithreaded document indexer in directory.

  12. Iterator - custom iterator Run python iterator.py

  13. Listing comprehension - sequences and enums usage. Run python listing_comprehension.py

  14. Meta programming - classes,metaclasses and inheritance.

  15. Multiprocessing - create multiple separate os processes. Run python multiprocessing.py

  16. Parse - parse data from incoming file by regex and print slices of result.

  17. Profile - get profiling data of cmd_profile script and save in stats.file. Run python profile.py

  18. Processing - processing queue usage.

  19. Pystones - convert seconds to pystones. Run python pystones.py

  20. Slots - check if string exists in collection. Run python slots.py

  21. With - Read file using with operator and print contents Run python with_example.py

Note

  1. Python 2 is going to be deprecated soon.
  2. Demos without run mentioning can't be run due to missing libraries.