Skip to content

Instantly share code, notes, and snippets.

View CHBresser's full-sized avatar

Zach Bresser CHBresser

View GitHub Profile
using System;
using System.Collections.Generic;
public interface HuffBaseNode {
bool isLeaf();
int weight();
}
public class HuffLeafNode : HuffBaseNode {
private char _element;
@CHBresser
CHBresser / compress_s3_images.py
Last active August 1, 2022 13:34
Compress S3 Images using Boto3
import sys, botocore
import boto3
from io import BytesIO
from PIL import Image as pil
def start_compressing(dry_run=False):
s3 = boto3.resource('s3')
bucket = s3.Bucket('mybucketname')
exists = True