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 resource | |
def log_memory_usage(): | |
# On linux, defaults to KB | |
memory_usage_kb = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss | |
# Convert to GB | |
memory_usage_gb = memory_usage_kb / 1000000 | |
# Output | |
print("Memory Usage: {:.3f}GB".format(memory_usage_gb)) |
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 urllib.request | |
import zipfile | |
from tqdm import tqdm | |
from util import create_dir_if_not_exist | |
ZIP_URL = "https://www.dropbox.com/s/<drop_box_id>/<file_name>?dl=1" | |
ZIP_PATH = "<path_to_download_dest>" |
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
Twine must be installed (pip install twine) | |
1. Bump version | |
2. python setup.py sdist | |
3. twine check dist/* (should be passed) | |
4. twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u <username> -p <password> (test upload) | |
5. twine upload dist/* -u <username> -p <password> (true upload) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.