Skip to content

Instantly share code, notes, and snippets.

View nicbor's full-sized avatar

Nic Borensztein nicbor

View GitHub Profile
@nicbor
nicbor / snapshots.py
Last active October 23, 2020 16:27 — forked from Eyjafjallajokull/README.md
AWS EBS - Find unused snapshots - this script generates csv raport about snapshot usage
import re
import boto3
import csv
from botocore.exceptions import ClientError
ec2 = boto3.client('ec2')
def get_snapshots():
return ec2.describe_snapshots(OwnerIds=['self'])['Snapshots']
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nicbor
nicbor / f1.py
Last active June 12, 2020 01:44
From team at CrowdAI (https://crowdai.com) How to calculate segmentation f1 scores for video sequences
from typing import Union, Tuple, Callable, List, Dict
import numpy as np
from past.utils import old_div
import numpy as np
from shapely import ops, wkt, geometry
import shapely.geometry as shg
from shapely.geometry.base import BaseGeometry as Shape
import cv2