Explain Codes LogoExplain Codes Logo

Python

Open S3 object as a string with Boto3

python
boto3
s3-object
memory-efficient

Get the last 4 characters of a string

python
string-slicing
python-features
substring-extraction

How do I clone a list so it doesn't change unexpectedly after assignment?

python
deepcopy
list-cloning
python-objects

How do you generate dynamic (parameterized) unit tests in Python?

python
pytest
unit-tests
parameterized-tests

Reading binary file and looping over each byte

python
performance
best-practices
memory-handling

How can I rename a conda environment?

python
conda
environment-management
renaming-environment

Django order_by query set, ascending and descending

python
django
queryset
ordering

Generating an MD5 checksum of a file

python
file-io
hashing
performance-benchmarking

Threading pool similar to the multiprocessing Pool?

python
multiprocessing
threading
performance

How do I add an extra column to a NumPy array?

python
numpy
array-manipulation
dataframe

How to retry after exception?

python
retry-mechanisms
exception-handling
resilience

How to find children of nodes using BeautifulSoup

python
node-traversal
beautifulsoup
html-parsing

How to flatten a hierarchical index in columns

python
dataframe
pandas
best-practices

Checking if an element exists with Python Selenium

python
selenium
webdriver
explicit-wait

Check if a key exists in a bucket in S3 using boto3

python
boto3
s3
aws-sdk

How to emulate a do-while loop?

python
state-machines
iteration-handling
error-handling

How do I get user IP address in Django?

python
prompt-engineering
best-practices
tools

How to state in requirements.txt a direct github source

python
pip-installation
requirements-file
package-management

Get the first item from an iterable that matches a condition

python
iterators
generator-expressions
lazy-evaluation

How do I get file creation and modification date/times?

python
file-handling
timestamp
pathlib