Skip to content

Instantly share code, notes, and snippets.

import itertools
import os
import adaptive
import holoviews.plotting.mpl
import matplotlib
import matplotlib.cm
import matplotlib.tri as mtri
import numpy as np
from matplotlib import animation
@kaxing
kaxing / lxc-loop-device.note.md
Last active October 24, 2022 01:27
Mount Image file or loop device inside lxc container
@benneely
benneely / dlo_slo_swiftclient_bakeoff.py
Created August 13, 2015 19:19
SLO vs DLO using swiftclient in python script
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 11 14:03:59 2015
@author: nn31
"""
import swiftclient
import swiftclient.service
from swiftclient.service import SwiftService
import time
import json
@cat-in-136
cat-in-136 / cairo_colored_font_experiment.c
Created July 27, 2014 08:38
Study for the colored-emoji-font drawing using cairo and freetype2.5
/* vim:fileencoding=utf-8 tabstop=2 expandtab shiftwidth=2 softtabstop=0:
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* Version 2, December 2004
*
* Copyright (C) 2014 @cat_in_136
*
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
@pv
pv / colorized_voronoi.py
Last active April 9, 2024 21:55
Colorized Voronoi diagram with Scipy, in 2D, including infinite regions
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial import Voronoi
def voronoi_finite_polygons_2d(vor, radius=None):
"""
Reconstruct infinite voronoi regions in a 2D diagram to finite
regions.
Parameters