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
#!/bin/bash | |
# Prep before running this file | |
#apt update && apt install curl | |
#curl this files url --output some.file | |
# Dependencies | |
apt update | |
apt install -y build-essential wget openssh-server rsync vim zlib1g-dev git curl software-properties-common | |
add-apt-repository --yes ppa:fkrull/deadsnakes && apt-get update && apt-get install --yes python3.5 python3.5-dev | |
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" |
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
def scan_frameio_project(client, parent_asset_id): | |
folder_assets = client.get_asset_children(parent_asset_id) | |
folders = [] | |
for a in folder_assets: | |
if a['type'] == 'file': | |
# Save asset somewhere, a['name'] | |
elif a['type'] == 'folder': | |
folders.append(a) |
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 requests | |
import math | |
class FrameioUploader(object): | |
def __init__(self, asset, file): | |
self.asset = asset | |
self.file = file | |
self.session = None | |
self.file_position = 0 |
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
""" | |
Dir structure | |
xxhash_arm | |
setup.py | |
xxhash | |
__init__ | |
.so | |
.so name needs to match py version | |
""" |
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
class ResponseIterator: | |
def __init__(self, response): | |
self.result_index = 0 | |
self.asset_index = 0 | |
self.total_assets = response.total | |
self.current_page = 1 | |
self.total_pages = response.total_pages | |
self.response = response |
NewerOlder