I hereby claim:
- I am somacdivad on github.
- I am somacdivad (https://keybase.io/somacdivad) on keybase.
- I have a public key ASBLJLQAvzm-joiPvv1HxlcD8LeRadySvwU0iGkoh-BNEQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import itertools as it | |
import random | |
import timeit | |
def shuffle(deck): | |
"""Return iterator over shuffled deck.""" | |
deck = list(deck) | |
random.shuffle(deck) | |
return iter(tuple(deck)) |
import LinearAlgebra as LinAlg | |
import SparseArrays | |
import Graphs | |
import WAV | |
function normalized_laplacian_matrix(g::Graphs.SimpleGraph) | |
A = Graphs.CombinatorialAdjacency(Graphs.adjacency_matrix(g).+ 0.0) | |
 = Graphs.NormalizedAdjacency(A) |
import LinearAlgebra as LinAlg | |
import SparseArrays | |
import Graphs | |
import GraphRecipes: graphplot | |
import Plots: savefig | |
import WAV | |
function normalized_laplacian_matrix(g::Graphs.SimpleGraph) |
using Javis | |
using ColorSchemes | |
# Set the color scheme | |
# More options: | |
# https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue/ | |
colors = ColorSchemes.cool | |
function circ(radius, color="white") | |
sethue(color) # Set the color of the circle |
using ColorSchemes | |
using Javis | |
N = 6 # Number of dots | |
radius = 20 # Radius of each dot | |
colors = ColorSchemes.rainbow1 # Color palette | |
speed = 10 # Degrees per frame | |
function draw_circle(frame, i, radius, speed) | |
# Angle of the direction vector for the dot |
using Animations | |
using ColorSchemes | |
using Javis | |
N = 6 # number of circles | |
radius = 20 # Radius of each circles | |
speed = 5 # degrees per frame | |
colors = ColorSchemes.rainbow1 | |
video = Video(500, 500) |
using Javis | |
video = Video(500, 500) | |
N = 12 | |
frames = 4(N+1) | |
Background(1:frames, (args...) -> background("grey70")) | |
# Draw crosshairs | |
Object(@JShape begin |
using Base.Iterators | |
RIGHT = (0, 1) | |
DOWN = (1, 0) | |
LEFT = (0, -1) | |
UP = (-1, 0) | |
function involute(n::Int)::Matrix{Int} | |
directions = cycle((RIGHT, DOWN, LEFT, UP)) | |
repeats = pushfirst!(collect(flatten(zip(n-1:-1:1, n-1:-1:1))), n-1) |