I hereby claim:
- I am AnnaMag on github.
- I am amk (https://keybase.io/amk) on keybase.
- I have a public key whose fingerprint is 5C68 832F 118E CB69 87C4 8A11 A289 C432 AF46 6FA8
To claim this, I am signing this object:
const util = require('util'); | |
const vm = require('vm'); | |
var globalVar = 3; | |
const sandbox = { globalVar: 1 }; | |
vm.createContext(sandbox); | |
vm.runInContext('globalVar *= 2;', sandbox); |
var snap = require("./js/snap.svg-min.js"); | |
var under = require("./js/underscore-min.js"); | |
function getRandom (weights, values) { | |
var num = Math.random(), | |
s = 0, | |
lastIndex = weights.length - 1; | |
for (var i = 0; i < lastIndex; ++i) { | |
s += weights[i]; | |
if (num < s) { |
I hereby claim:
To claim this, I am signing this object:
colors = ximport( "colors" ) | |
font( "Courier", 350 ) | |
align( CENTER ) | |
text_path_line = textpath( "PURA VIDA", 0, 200, width = WIDTH) | |
resx = 200 | |
resy = 80 | |
rx = 2.0 | |
ry = 1.5 |
#! /usr/bin/env python3 | |
""" | |
Created on Sun Jan 24 2016 | |
Anna M. Kedzierska | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import collections | |
import math |
#!/usr/bin/python | |
""" | |
Created on Mon Jan 17 2016 | |
Anna M. Kedzierska | |
Python3 implementation of the Douglas-Peucker algorithm for polyline simplification | |
""" | |
from functools import singledispatch | |
from functools import reduce |
#! /usr/bin/env python | |
""" | |
Toy code for a very special application:) | |
Write a program that prints out the numbers 1 to 100 (inclusive). If the number is divisible by 3, print Crackle | |
instead of the number. If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop. | |
""" | |
def print_crackle_pop(max_no): | |
x = range(1, max_no + 1) | |
return ['CracklePop' if (i % 3 == 0 and i % 5 == 0) else 'Crackle' if not (i % 3) else 'Pop' if not (i % 5) else i for i in x] |