Функция dir() - удобна для получения списка атрибутов у любого объекта.
Ранее я писал про функцию __dir__() в модуле (не путайте её с переменной __all__(), которая указывает список объектов для импорта если встречается конструкция from module import *).
Скорее всего вы уже знаете как использовать функцию dir(). Любой объект может реализовать метод __dir__() чтобы указать список имеющийхся и динамических атрибутов. И функция dir() поможет получить список этих атрибутов.
>>> dir(str)
['__add__', '__class__', '__contains__', ...]
У этой функции есть еще один способ применения. Её можно вызвать без аргумента, и в таком случае она вернёт список имён в текущем неймспейсе.
>>> dir()
['__builtins__', '__doc__', '__file__', ...]
>>> def test():
>>> x = 1
>>> print(dir())
>>> test()
['x']
#basic#tricks
#DL
📱
Zeus New Pytorch Ecosystem Tool
Zeus is an open source toolkit for measuring and optimizing power consumption of deep learning workloads.
🖥Github
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#dl
Park, Chanwook, Sourav Saha, Jiachen Guo, Hantao Zhang, Xiaoyu Xie, Miguel A. Bessa, Dong Qian, et al. 2025. “Unifying Machine Learning and Interpolation Theory via Interpolating Neural Networks.” Nature Communications 16 (1): 1–12.
https://www.nature.com/articles/s41467-025-63790-8
#dl
A few cool ideas in this model.
Introducing Gemma 3n: The developer guide - Google Developers Blog
https://developers.googleblog.com/en/introducing-gemma-3n-developer-guide/
#dl
There is this new lib called scale. One could compile CUDA code to use it on AMD GPU.
https://docs.scale-lang.com/manual/how-to-use/
I don't know who is more pissed off, NVidia or AMD.
#dl
This repo is really nice.
yuanchenyang/smalldiffusion: Simple and readable code for training and sampling from diffusion models
https://github.com/yuanchenyang/smalldiffusion
#dl
Google & USC benchmarked a prompt based forecasting method, and the results are amazing.
Cao D, Jia F, Arik SO, Pfister T, Zheng Y, Ye W, et al. TEMPO: Prompt-based Generative Pre-trained Transformer for time series forecasting. arXiv [cs.LG]. 2023. Available: http://arxiv.org/abs/2310.04948