Skip to content

Instantly share code, notes, and snippets.

Avatar

Haojian Jin haojian

View GitHub Profile
View secret_garden.py
import skimage;
from skimage import data
from skimage.filters import threshold_otsu
from skimage.segmentation import clear_border
from skimage.measure import label
from skimage.morphology import closing, square
from skimage.measure import regionprops
from skimage.color import label2rgb
import cv2
import numpy as np
@haojian
haojian / .block
Created Mar 27, 2018
Vega-Lite Bl.ocks example
View .block
license: bsd-3-clause
View mar_23_evaluation_elasticplay.json
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
View gist:054902f6886de32c4ca8
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"#### Problem definition:\n",
"\n",
View elastic_play.json
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# elasticplay"
]
},
{
View circle packing
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Circle packing"
]
},
{
View gist:4f5183db8739de5eadf0
import os
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
def list_files(path):
# returns a list of names (with extension, without full path) of all files
# in folder path
files = []
for name in os.listdir(path):
You can’t perform that action at this time.