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 pickle | |
# get the WriterCheckout | |
master = repo.checkout(write=True) | |
# Add a New Column | |
master.add_bytes_column(name='data') | |
# Add the Data | |
master['data'][0] = pickle.dumps(df, protocol=4) |
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
from hangar import Repository | |
import os | |
repo_name = 'test' | |
if not os.path.isdir(repo_name): | |
print(f'{repo_name} directory was not found. Creating an empty directory.') | |
os.makedirs(repo_name) | |
repo = Repository(path=repo_name) |
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 threading | |
import os | |
import time | |
from urllib.parse import urlparse | |
from urllib.request import urlretrieve | |
from typing import List | |
from numpy import round | |
IMGS_URL_LIST = \ | |
['https://dl.dropboxusercontent.com/s/2fu69d8lfesbhru/pexels-photo-48603.jpeg', |