Делаем простой интерфейс используя tkinter
tkinter - это стандартная библиотека для создания графического пользовательского интерфейса (GUI) в Python. Она предоставляет простой и удобный способ создания оконных приложений с использованием виджетов, таких как кнопки, текстовые поля, списки и многое другое.
Хотя tkinter может показаться менеемощным по сравнению с некоторыми другими библиотеками GUI для Python, такими как PyQt или wxPython, она остается популярным выбором для начинающихразработчиков и для создания простых и удобных в использовании GUI-приложений.
#python#tkinter
#python
I find poetry a great tool to manage Python requirements.
I used to manage Python requirements using requirements.txt(environment.yaml) and install them using pip(conda). The thing is, in this stack, we have to pin the version ranges manually. It is quite tedious, and we easily run into version problems for a large project.
Poetry is the savior here. When developing a package, we add some initial dependencies to the pyproject.yaml, a PEP standard. Whenever a new package is needed, we run poetry add package-name. Poetry tries to figure out the compatible versions. A lock file for the dependencies with restricted versions will be created or updated. To recreate an identical python environment, we only need to run poetry install.
There's one drawback and may be quite painful at some point. Recreating the lock file for dependencies is extremely slow when the complexity grows in the requirements. But this is not a problem if poetry but rather constraints from pypi. One solution to this problem is to use cache.
https://python-poetry.org/
#python
I thought it was a trivial talk in the beginning.
But I quickly realized that I may know every each piece of the code mentioned in the video but the philosophy is what makes it exciting.
He talked about some fundamental ideas of Python, e.g., protocols.
After watching this video, an idea came to me. Pytorch lightning has implanted a lot of hooks in a very pythonic way. This is what makes pytorch lightning easy to use. (So if you do a lot of machine learning experiments, pytorch lightning is worth a try.)
https://youtu.be/cKPlPJyQrt4
🖥
Tip: You can use functools.reduce() in #Python to apply a function to all elements of the iterable set.
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#Python
🖥
Test your typing knowledge in Python
Cool free project Python Type Challenger is a quiz where you have to write code. A good way to remember the basics of type hints (dictionaries, variables, return) and drill into the depths of the typing ocean (recursive, decorators, constructors, etc.).
🔗Link
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#Python
tstock is a tool to easily generate stock charts from the command line.
tstock is a Python tool that allows you to easily generate stock charts from the command line.
Just enter tstock aapl to get a three-month candlestick chart of $AAPL in your terminal
▪Github
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----