May.la
  • Blog
  • Machine Learning
  • Python
  • IT
  • Linux
  • Open Source Contributions
  • May.la
    • Blog
      • Options for Date Encoding
      • Python Installation and Package Management with conda and pip
      • Migration from Sphinx to Hugo
      • Anomalies in the MLSUM Dataset
      • Clean German Wikipedia Text Corpus released
      • LightGBM with Optuna: Demo released
      • German colossal, cleaned Common Crawl corpus (GC4) released
      • Talk: Training and Evaluation of our German Electra Language Model
    • Machine Learning
      • CUDA
      • Dimensionality Reduction
      • Experiment Documentation
      • German Electra Training
      • Graph Database
      • Graph Neural Network
      • Hugging Face - Datasets
      • Hugging Face - Transformers
      • LightGBM
      • Machine Learning at AWS
      • NLP Datasets
      • Optuna
      • Paraphrase Mining
      • Seldon
      • T5 and MT5 Models
    • Python
      • Beautiful Soup
      • Colab
      • Conda
      • Context Manager
      • Docstrings
      • Exceptions
      • Filesystem
      • Iterate
      • Joblib
      • Jupyter & JupyterLab
      • Linter
      • Logging
      • Mock
      • Pandas
      • PIP
      • PyCharm
      • Python Naming
      • REST API with Python
      • tqdm
      • Typing
    • IT
      • Docker
      • Duply with MinIO
      • Duply with Windows
      • Freifunk
      • GIT
      • GitHub
      • GnuPG
      • Hugo
      • kubectl
      • Kubernetes
      • Minecraft
      • PostgreSQL
      • Regular Expressions
      • Sphinx
      • Tor
      • Visual Studio Code
      • YubiKey
    • Linux
      • Archlinux Installation
      • Archlinux on Hetzner Cloud with Btrfs
      • Btrfs
      • Disk and Partition Management
      • File & Disk Tools
      • File Compression
      • Linux Commands
      • NixOS
      • Screen
      • SSH
      • SSL
      • Systemd
      • Ubuntu
      • ZFS
    • Open Source Contributions
View page source Edit this page Create child page Create documentation issue Print entire section
Tag Cloud
  • ablog1
  • common-crawl1
  • conda1
  • date1
  • docsy1
  • documentation1
  • electra1
  • encoding1
  • german-data3
  • hugo1
  • hyperparameter1
  • language-model1
  • lightgbm1
  • mlsum1
  • mt51
  • optuna1
  • pip1
  • somajo1
  • spacy1
  • sphinx1
  • summarization1
  • t51
  • text-corpus2
  • time1
  • tokenizer1
  • wikipedia1
Categories
  • Blog1
  • Data3
  • Gradient Boosted Trees1
  • NLP4
  • Python1
  1. Python
  2. Context Manager

Context Manager

Links

  • https://book.pythontips.com/en/latest/context_managers.html
  • https://alysivji.github.io/managing-resources-with-context-managers-pythonic.html
  • https://docs.python.org/3.7/reference/datamodel.html?highlight=context%20manager#with-statement-context-managers
Last modified July 16, 2022: fix headlines in python doc (3992313)