Daily code in Python
- This repo is for my personal study of Python and its basic libraries
- Jupyter Notebooks have some markdown cells which contain explanations in LaTeX which are sometimes rendered incorrectly by GitHub. So, it is sometimes better to study locally
- Examples in this repo are not ordered
- All code and all examples are prone to all kinds of errors
- Any corrections, suggestions, improvements, etc. are welcome
- /topics/argparse with argparse library
- /topics/argparse/argparse.ipynb calls /topics/argparse/with.py and /topics/argparse/without.py
- __name__ == '__main__' check
- Call .py files using !python or %%bash from a Jupyter notebook cell
- /topics/colab/colab.ipynb
- Working on Google Colab
- Accessing Google Drive folders
- /topics/functions/functions.ipynb
- Unknown number of arguments: '*args'
- Keyword arguments
- Unknown number of keyword arguments: '**kwargs'
- Default values to the arguments
- /topics/image/image.ipynb
- Displaying an image from the internet
- Displaying an image from a local directory
- /topics/importing/importing.ipynb
- Importing everything in a file
- Importing only a part of a file
- /topics/interactive
- /topics/interactive/inline.ipynb displays matplotlib plots as images
- /topics/interactive/widget.ipynb displays matplotlib plots interactively
- /topics/interactive/plotly.ipynb draws interactive plots using plotly library
- /topics/logging/logging.ipynb
- /topics/misc/zip.ipynb
- zip and enumerate functions in Python
- /topics/navigating/navigating.ipynb
- Tutorial on pathlib library
- Iterate over the files in a directory
- Create, move, rename, and delete files and folders (and more)
- /topics/oop/oop.ipynb
- __init__ method
- Inheritance
- Class attributes
- @staticmethod and @classmethod
- /topics/pandas/word_frequency.ipynb
- Some pandas operations including apply, drop_duplicates, and sort_values
- /topics/requirements/create.ipynb
- pip install and pip uninstall
- Creating requirements.txt file using pipreqs library
Written by serhatsoyer