25th Week of 2021
New: Add the Life seedling project.
Life is a real time sandbox role game where you play as yourself surviving in today's world.
New: Add bruty to the dormant plant projects.
bruty is a Python program to bruteforce dynamic web applications with Selenium.
Improvement: Add textual as interesting library to explore.
textual: Textual is a TUI (Text User Interface) framework for Python using Rich as a renderer.
- Improvement: Explain how to change the command line help description.
- New: Explain how to make redirections with fastapi.
- New: Explain how to run a FastAPI server in the background for testing purposes.
New: Explain how to set a timeout for your tests.
New: Explain how to rerun tests that fail sometimes.
With pytest-rerunfailures that is a plugin for pytest that re-runs tests to eliminate intermittent failures. Using this plugin is generally a bad idea, it would be best to solve the reason why your code is not reliable. It's useful when you rely on non robust third party software in a way that you can't solve, or if the error is not in your code but in the testing code, and again you are not able to fix it.
feat(python_snippets#Create combination of elements in groups of two): Explain how to create combination of elements in groups of two
>>> list(itertools.combinations('ABC', 2)) [('A', 'B'), ('A', 'C'), ('B', 'C')]
- New: Explain how to use selenium with python.
New: Explain how to Set timeout of a response.
New: Explain how to fix when Chromedriver hangs up unexpectedly.
os.environ["DBUS_SESSION_BUS_ADDRESS"] = "/dev/null"
New: Explain how to rerun failed cronjobs.
If you have a job that has failed after the 6 default retries, it will show up in your monitorization forever, to fix it, you can manually trigger the job.
kubectl get job "your-job" -o json \ | jq 'del(.spec.selector)' \ | jq 'del(.spec.template.metadata.labels)' \ | kubectl replace --force -f -
New: Explain how to split a file into many with equal number of lines.
split -l 200000 filename
New: Explain how to identify what a string or file contains.