A collection of useful snippets using third party packages.
Snippet Name | Description |
---|---|
animated_graphics | Gives an inside in the usage of animatplot - animated graphics build on matplotlib |
attention_message | Display a message on the screen in different colors or blinking |
auto_login_website | Using Selenium to auto-login into a website |
change_bg | Use OpenCV to change image background |
cli_help_strings | Beautiful rendered cli help strings |
clint_cli_tool | Tool helping you to create awesome CLIs |
colored_python | Print colored text to stdout using termcolor |
complex_list_ops | Speed up complex list ops using blist |
cooked_input_example | Getting, cleaning, converting, and validating command line input |
count_python_bytes | Get the bytes size of all Python files in a certain directory and it's subdirectories |
display_tables | Using prettytable to display tables well-formatted in the console |
fancy_cli_header | Turns strings into ASCII text with arts fonts (fancy CLI header) |
folium_snippet | Folium is used to create interactive maps |
formatted_json | Dump json-objects in a formatted way |
f-strings_vs_str | Compare the time of f-strings and str |
img_to_ascii(_2) | Create ascii arts based on images |
inspect_docker | Control docker from within Python |
interactive_cli | Example of PyInquirer to create interactive CLIs |
is_holiday | Checks whether a given date is a holiday in a certain country |
manipulate_images | Small example on how to manipulate images |
mathematicians | Small project crawling the most popular mathematicians |
medium | Get a list of interesting users to follow based on your profile |
mocking_requests | Mocking the entire requests library and check for correct response handling |
mypy_example | Example on how to use Pythons type hints and mypy |
numpy_array_operations | Reveiling the behaviour of simply array operations using NumPy |
parse_complex_excel_sheets | Parse complex Excel Sheets using pandas and xlrd |
port_scanner_nmap | Port Scanner using nmap |
pytest_rename_class_backwards_compatibility | Rename a critical class and test for backwards compatibility |
range_vs_repeat | itertools.repeat() is faster than range() for looping a fixed number of times when you don't need the loop variable |
reduce_pandas_df_memory | Reduce pandas df memory usage by converting object to category |
refactoring_code | Refactoring Python code using rope |
resize_images | Resize all images in the current directory using OpenCV |
show_progress | Shows the progress using progressbar |
simple_debugger | Use PySnoopers's decorator to debug functions |
simple_progressbar | Create a simple progressbar using tqdm.tqdm() |
steganography | Hide an image inside another |
tensorflow_image | Generate an image using tensorflow |
test_asyncio | Example on how to use asyncio |
test_gevent | Demonstrates the usage of gevent |
test_tornado | Reveales the usage of tornado |
text_analysis | Analyse text using TextBlob |
timing_tool | Illustrates the usage of boxx.timeit() reveilling the time a certain code block takes to run |
world_bank_data | Using official world bank data to demonstrate the usage of zipfile and csv |