This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mandelbrot</title> | |
<style> | |
html, body { width: 100%; height: 100%; margin: 0; padding: 0} | |
#leap-overlay { position: fixed; top: 0; left: 0;} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [poligon,indices]=poligon_from_set_of_points(points,max_distance) | |
% | |
% Note that a subset of the points may be selected if the distance between | |
% two points exceeds max_distance | |
dist = pdist2(points,points); | |
N = size(points,1); | |
indices = NaN(1,N); | |
indices(1) = 1; % first point is first row in x matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MXNet | |
function accuracy(predicted_probability::mx.NDArray,label::mx.NDArray) | |
predicted_label=copy(mx.argmax(predicted_probability,axis=1)) | |
julia_label=copy(label) | |
result=sum(predicted_label.==julia_label) | |
result | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
n=200 # samples per center | |
centers= [ [10,5], [-2,4], [13,-25], [11,20], [15,-30], [3,-2], ] # centers | |
#centers= [ [10,5], [-2,4], [11,20], [15,-34], ] | |
dataset=np.zeros((0,3)) | |
sigma=2 | |
for i in range(len(centers)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IMPORTANT install packages from command line | |
# pip install numpy scikit-video scikit-image | |
import skvideo.io | |
import numpy as np | |
from skimage import transform | |
import skimage.io | |
import os | |
# read original image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keycode 26 = e E e E Greek_epsilon Greek_EPSILON Greek_epsilon Greek_EPSILON | |
keycode 27 = r R r R Greek_rho Greek_RHO Greek_rho Greek_RHO | |
keycode 28 = t T t T Greek_theta Greek_THETA Greek_theta Greek_THETA | |
keycode 33 = p P p P Greek_pi Greek_PI Greek_pi Greek_PI | |
keycode 38 = a A a A Greek_alpha Greek_ALPHA Greek_alpha Greek_ALPHA | |
keycode 39 = s S s S Greek_sigma Greek_SIGMA Greek_sigma Greek_SIGMA | |
keycode 40 = d D d D Greek_delta Greek_DELTA Greek_delta Greek_DELTA | |
keycode 41 = f F f F Greek_phi Greek_PHI Greek_phi Greek_PHI | |
keycode 42 = g G g G Greek_gamma Greek_GAMMA Greek_gamma Greek_GAMMA | |
keycode 56 = b B b B Greek_beta Greek_BETA Greek_beta Greek_BETA |