This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import requests_mock | |
import requests_cache | |
with requests_mock.mock() as mock: | |
mock.get("mock://test", text="test") | |
requests_cache.install_cache("test_cache", backend="memory") | |
requests.get("mock://test") | |
# -> RecursionError: maximum recursion depth exceeded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "einfuehrung-in-jupyter-notebooks" | |
version = "0.1.0" | |
description = "Workshop material for 'Einführung in Jupyter Notebooks'" | |
authors = ["Marvin Kastner <marvin.kastner@tuhh.de>"] | |
[tool.poetry.dependencies] | |
python = "^3.8" | |
jupyterlab = "^3.0.10" | |
pandas = "^1.2.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import datetime | |
import comtypes.client | |
from PyPDF2 import PdfFileMerger | |
target_dir = os.path.abspath(os.path.join( | |
os.path.dirname(os.path.realpath(__file__)), | |
os.pardir, | |
"data transfer" | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set ORIGDIR="%CD%" | |
set MINICONDAPATH=%USERPROFILE%\Miniconda3 | |
set CONDAINSTALLER=%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%-condainstall.exe | |
set "OS=" | |
set "MCLINK=" | |
where conda >nul 2>nul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
REM Insert your conda env here | |
SET CONDA_ENV=MY_DESIRED_CONDA_ENV | |
CALL :activate_conda_env | |
REM Insert your python script here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
OlderNewer