In Python <= 3.8, if you run:
from collections import namedtuple
MyClass = namedtuple("MyClass", "")
m = MyClass()
print(m.__class__['__name__'])
print(type(m.__class__['__name__']))It will raise TypeError in:
| sudo nsenter -t `pidof watch` -m -u -i -n -p /bin/bash |
| docker run --rm -it -v ~/Desktop:/work ubuntu | |
| cd work/ | |
| apt update | |
| apt-get install libimage-exiftool-perl | |
| exiftool 20200703_111009.jpg | |
| exiftool -all= 20200703_111009.jpg | |
| exiftool 20200703_111009.jpg |
| FROM quay.io/pypa/manylinux_2_34_x86_64 | |
| ARG python_version=cp313-cp313 | |
| ARG borg_version=1.4.0 | |
| RUN yum -y update && \ | |
| yum -y install openssl-devel libacl-devel lz4-devel libzstd-devel xxhash-devel | |
| RUN git clone https://github.com/borgbackup/borg.git |
| from collections import defaultdict | |
| from constraint import * | |
| example = """.......92 | |
| ...1...4. | |
| 9..24...7 | |
| 8..7..15. | |
| 65.9.1.78 | |
| .74..8..6 | |
| 3...95..1 |
| from constraint import * | |
| def fact(n): | |
| f = 1 | |
| for i in range(1,n+1): | |
| f = f * i | |
| return f |
In Python <= 3.8, if you run:
from collections import namedtuple
MyClass = namedtuple("MyClass", "")
m = MyClass()
print(m.__class__['__name__'])
print(type(m.__class__['__name__']))It will raise TypeError in:
| from sqlalchemy import create_engine | |
| from sqlalchemy.ext.automap import automap_base | |
| from sqlalchemy.orm import sessionmaker | |
| url = 'mysql://<user>:<password>@<ip>:<port>/<name>' | |
| engine = create_engine(url, echo=True) | |
| Base = automap_base() | |
| Base.prepare(autoload_with=engine) | |
| Session = sessionmaker(bind=engine) | |
| session = Session() |
| import setuptools | |
| if __name__ == "__main__": | |
| setuptools.setup() |
| llvmlite | |
| numpy==1.20.1 | |
| netdata-pandas==0.0.32 | |
| numba==0.50.1 | |
| scikit-learn==0.23.2 | |
| pyod==0.8.3 | |
| wheel | |
| cython | |
| pybind11 |
| import hashlib | |
| import psutil | |
| BUF_SIZE = 65536 | |
| exes = set() | |
| for p in psutil.process_iter(): | |
| exe = p.exe() |