- Time of benchmark: 15 May 2021 - 21:57
- Package commit: dirty
- Julia commit: 6aaede
- Julia command flags: None
- Environment variables: None
This file contains hidden or 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
""" | |
Sigmoid activation function | |
""" | |
function sigmoid(Z) | |
A = 1 ./ (1 .+ exp.(.-Z)) | |
return (A = A, Z = Z) | |
end | |
""" |
This file contains hidden or 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
inputs = [1.0, 2.0, 3.0] | |
weights1 = [0.2, 0.8, -0.5, 1.0] | |
weights2 = [0.5, -0.91, 0.26, -0.5] | |
bias1 = 2.0 | |
bias2 = 3.0 | |
output = [inputs[1]*weights1[1] + inputs[2]*weights1[2] + inputs[3]*weights1[3] + inputs[4]*weights1[4] + bias1, | |
inputs[1]*weights2[1] + inputs[2]*weights2[2] + inputs[3]*weights2[3] + inputs[4]*weights2[4] + bias2] |
This file contains hidden or 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
# MIT License | |
begin | |
using Luxor, Random, Colors | |
Drawing(512, 512, "hello-world.png") | |
background("black") | |
sethue("white") | |
translate(50, 50) | |
radius = 30 | |
grid = GridHex(O, radius, 2) |
This file contains hidden or 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 BenchmarkTools | |
using ImageMorphology, TestImages,ColorTypes | |
function test() | |
img = TestImages.shepp_logan(512); | |
img_erode = Gray.(img); # keeps white objects white | |
img_erosion1 = erode(img_erode) | |
end | |
test() |
This file contains hidden or 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 cProfile | |
from skimage import data | |
from skimage.util import img_as_ubyte | |
from skimage import io | |
from skimage.morphology import disk | |
from skimage.morphology import erosion | |
def test(): | |
orig_phantom = img_as_ubyte(data.shepp_logan_phantom()) | |
selem = disk(6) |
This file contains hidden or 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
vert=CartesianIndex{2}[] | |
push!(vert, CartesianIndex(2,2)) | |
push!(vert, CartesianIndex(3,2)) | |
push!(vert, CartesianIndex(4,2)) | |
push!(vert, CartesianIndex(5,2)) | |
push!(vert, CartesianIndex(6,3)) | |
push!(vert, CartesianIndex(7,4)) | |
push!(vert, CartesianIndex(8,4)) | |
push!(vert, CartesianIndex(9,3)) | |
push!(vert, CartesianIndex(10,2)) |
This file contains hidden or 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
# Instructions to get something running of Malmo | |
# In terminal 1 and a particular environment | |
# 1) Do `pip3 install gym lxml numpy pillow` | |
# 2) Do `git clone https://github.com/Microsoft/malmo.git` | |
# 3) Go to `cd malmo/MalmoEnv` | |
# 4) Do `(echo -n "malmomod.version=" && cat ../VERSION) > ./src/main/resources/version.properties` | |
# 5) Then run this file `julia run.jl` | |
# In terminal 2 |
This file contains hidden or 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 Gtk | |
win = GtkWindow("Doritos Calculator", 300, 350) | |
set_gtk_property!(win,:resizable,false) | |
grid = GtkGrid() | |
set_gtk_property!(grid,:margin,20) | |
text = "" | |
b1 = GtkButton("1") |
OlderNewer