This file contains hidden or 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 hashlib | |
from pathlib import Path | |
from typing import Optional | |
import boto3 | |
import math | |
# Etag Calculation funcs take from https://stackoverflow.com/a/77362525 | |
def get_local_etag(path: Path, chunk_size_bytes: Optional[int] = None) -> str: | |
"""Calculates an expected AWS s3 upload etag for a local on-disk file. |
This file contains hidden or 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
list_of_races = [[('c','d'), ('a','b'),('b','c')], | |
[('C', 'B'), ('D', 'C'), ('B', 'E'), ('A', 'D')]] | |
for races in list_of_races: | |
print(races) | |
races = dict(races) | |
start_city = (set(races.keys()) - set(races.values())).pop() | |
end_city = (set(races.values()) - set(races.keys())).pop() | |
all_cities = list(set(races.keys()).union(set(races.values()))) |
This file contains hidden or 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
activate="E:\_virtual_envs\$*\Scripts\activate" | |
listenvs=ls 'E:\_virtual_envs' | |
virtualenv=virtualenv "E:\_virtual_envs\$*" |