Skip to content

Instantly share code, notes, and snippets.

"""OpenCV contours to Shapely polygons converter
This script allows the user to convert the contours hirarchy generated by cv2.find_contours()
into a list of Shapely polygons.
This script requires that `cv2` `numpy` and `shapely` be installed within the Python
environment you are running this script in.
This file can also be imported as a module and contains the following
functions:
@tejaskhot
tejaskhot / shapenet_synset_list
Created June 24, 2018 00:44
List of category names and their id in the ShapeNet dataset
04379243 table
03593526 jar
04225987 skateboard
02958343 car
02876657 bottle
04460130 tower
03001627 chair
02871439 bookshelf
02942699 camera
02691156 airplane
@timrs2998
timrs2998 / ubuntu_chromebook.md
Last active December 30, 2020 22:58
Ubuntu on Acer CB3-111-C670 Chromebook

This markdown file explains how to run Ubuntu on your Acer CB3-111-C670 Chromebook through Crouton.

Developer Mode

You first need to put your chromebook in developer mode.

To invoke Recovery mode, you hold down the ESC and Refresh (F3) keys and poke the Power button.

To enter Dev-mode you first invoke Recovery, and at the Recovery screen press Ctrl-D (there's no prompt - you have to know to do it). It will ask you to confirm, then reboot into dev-mode.

@wmayner
wmayner / lru_cache.py
Created May 5, 2014 20:58
[Python] Memory-aware LRU cache decorator
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Memory-aware LRU Cache function decorator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A modification of the builtin ``functools.lru_cache`` decorator that takes an
additional keyword argument, ``use_memory_up_to``. The cache is considered full
if there are fewer than ``use_memory_up_to`` bytes of memory available.