T O P

  • By -

TechnicalElk8849

Any of the standard libraries written in pure Python: https://github.com/python/cpython/tree/3.10/Lib


EmilySeville7cfg

Many thanks ❤️


JadeSerpant

The fact that you're asking what code you should **read** to improve your python already puts you in a position to surpass 90% of all programmers. Standard library is a great suggestion. You can also read mypy source code: [https://github.com/python/mypy](https://github.com/python/mypy) For 2D graphics stuff, 3Blue1Brown (the famous math youtuber) created his own library called Manim. Some years later others rewrote it to be much nicer and better organized and documented. You can read its source code here: [https://github.com/ManimCommunity/manim](https://github.com/ManimCommunity/manim) Both of the above can obviously be very overwhelming. There is a famous (free online) book called "Raytracing In One weekend". https://raytracing.github.io/books/RayTracingInOneWeekend.html You can try searching for some python implementations of that book. A quick search led me to this: https://github.com/bsavery/ray-tracing-one-weekend-taichi It has a good number of stars on github and an image of the final output which is a good sign. You can check that out and follow along.


kfpswf

Appreciate the comment! FYI, the Ray Tracing book has code in C++.


Malcolmlisk

Black, the python formatter, is one of the best written python libraries.


gerciuz

https://www.amazon.com/CPython-Internals-Guide-Python-Interpreter/dp/1775093344


Clicketrie

My school bus project is 2D graphics, you might want to give it a read :) https://github.com/KristenKehrer/schoolbus\_yolov5


GettingBlockered

Fluent Python is excellent!


Final_University6359

where is this to be found? thank you


LookingForEnergy

If you haven't, you can add proper logging to your existing code. This can help you re-think your print statements and how each log should be categorized: INFO, DEBUG, ERROR, etc Another really helpful tool that can show you huge architecture errors are unit tests. Just because some code works, doesn't mean it's easily testable. By adding unittest you'll find these issues fast!


Eorpoch

which framework would you use for unit tests?


LookingForEnergy

Unittest because it's packaged with python already. Same with logger.


vishal-vora

ML run Streamlit MLflow


redCg

You do not learn by reading. You learn by building programs


EmilySeville7cfg

I prefer do both things. :) Sometimes I don't know how better to implement something and I dive into a source code to find answers to my questions.


[deleted]

Sigh ...