One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
FROM ubuntu:16.04 | |
RUN apt-get update && apt-get install -y wget gcc g++ make ant gawk libcups2-dev libfreetype6-dev libxtst-dev libxrender-dev cpio X11* python-software-properties software-properties-common | |
RUN apt-get install -y vim | |
RUN apt-get install -y zip unzip libasound2-dev | |
RUN apt-get install -y aria2 | |
RUN mkdir -p /usr/lib/jvm && cd /usr/lib/jvm && aria2c -x4 http://bridsys.com/downloads/java/jdk-6u45-linux-x64.bin && \ | |
chmod a+x ./jdk-6u45-linux-x64.bin && ./jdk-6u45-linux-x64.bin | |
RUN ln -sf -b /usr/lib/jvm/jdk1.6.0_45/jre/bin/java /etc/alternatives/java && ln -sf -b /usr/lib/jvm/jdk1.6.0_45/jre/bin/java /usr/bin/java |
Carbon to SVG
function decodeBase62(number) { | |
var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
var out = 0 | |
var len = number.length - 1 | |
for (var t = 0; t <= len; t++) { | |
out = out + alphabet.indexOf(number.substr(t, 1)) * Math.pow(62, len - t) | |
} | |
return out | |
} |
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
# Mathieu Blondel, September 2010 | |
# License: BSD 3 clause | |
import numpy as np | |
from numpy import linalg | |
import cvxopt | |
import cvxopt.solvers | |
def linear_kernel(x1, x2): | |
return np.dot(x1, x2) |
# Mathieu Blondel, September 2010 | |
# License: BSD 3 clause | |
import numpy as np | |
from numpy import linalg | |
import cvxopt | |
import cvxopt.solvers | |
def linear_kernel(x1, x2): | |
return np.dot(x1, x2) |
import json, sys, numpy as np | |
from scipy import misc, signal | |
from PIL import Image | |
infile, outfile, modelpath = sys.argv[1:] | |
model = json.load(open(modelpath)) | |
im = Image.open(infile).convert("YCbCr") | |
im = misc.fromimage(im.resize((2*im.size[0], 2*im.size[1]), resample=Image.NEAREST)).astype("float32") | |
planes = [np.pad(im[:,:,0], len(model), "edge") / 255.0] | |
for step in model: | |
o_planes = [sum([signal.convolve2d(ip, np.float32(kernel), "valid") |
Based on the example file from the announcement blog post http://sketchplugins.com/d/87-new-file-format-in-sketch-43
type UUID = string // with UUID v4 format
type SketchPositionString = string // '{0.5, 0.67135115527602085}'
type SketchNestedPositionString = string // '{{0, 0}, {75.5, 15}}'
# found this from Armin R. on Twitter, what a beautiful gem ;) | |
import ctypes | |
from types import DictProxyType, MethodType | |
# figure out side of _Py_ssize_t | |
if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'): | |
_Py_ssize_t = ctypes.c_int64 | |
else: | |
_Py_ssize_t = ctypes.c_int |