Skip to content

Instantly share code, notes, and snippets.

View dominicpacquing's full-sized avatar

Paul Dominic Pacquing dominicpacquing

View GitHub Profile
@pdemarti
pdemarti / s3-fast-upload.ipynb
Last active April 19, 2024 13:50
Example (from a notebook) on how to exploit the concurrency inside boto3 for fast uploads of many files
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gabrielfalcao
gabrielfalcao / rsa_encryption.py
Created November 30, 2019 00:39
Using python cryptography module to generate an RSA keypair, serialize, deserialize the keys and perform encryption and decryption
import base64
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
def utf8(s: bytes):
return str(s, 'utf-8')