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
# Inspired from https://medium.com/@ismailakkila/black-hat-python-encrypt-and-decrypt-with-rsa-cryptography-bd6df84d65bc | |
# Updated to use python3 bytes and pathlib | |
import zlib | |
import base64 | |
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_OAEP | |
from pathlib import Path | |
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 logging | |
import boto3 | |
from botocore.exceptions import ClientError | |
def create_presigned_url(bucket_name, object_name, expiration=3600): | |
"""Generate a presigned URL to share an S3 object | |
:param bucket_name: string | |
:param object_name: string |
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 pandas as pd | |
import imagehash | |
from PIL import Image | |
from dask import dataframe as dd | |
from dask.diagnostics import ProgressBar | |
from dask.diagnostics import Profiler, ResourceProfiler, CacheProfiler, visualize | |
from pathlib import Path | |
import shutil | |
def create_presigned_url(bucket_name, object_name, expiration=3600): |
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
# create_head_tf_record.py | |
# | |
# Created by Dustin Dorroh on 1/07/2019 | |
# | |
import hashlib | |
import io | |
import json | |
import logging | |
import os |
OlderNewer