Skip to content

Instantly share code, notes, and snippets.

cormullion cormullion

Block or report user

Report or block cormullion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cormullion
cormullion / JuliaCon2019 Videos.md
Last active Jul 24, 2019
JuliaCon 2019 Videos
View JuliaCon2019 Videos.md

no longer being updated - go here instead!

title url viewcount
A General-Purpose Toolbox for Efficient Kronecker-Based Learning 🔗 0
A New Breed of Vehicle Simulation 🔗 0
A Probabilistic Programming Language for Switching Kalman Filters 🔗 0
A Showcase for Makie 🔗 0
Analyzing Social Networks with SimpleHypergraphs.jl 🔗 0
Array Data Distribution with ArrayChannels.jl 🔗 0
View flowers.jl
using Luxor, Colors
function phyllotaxis(L, startrad, N)
deviation = 5/8
goldenangle = mod2pi(Base.MathConstants.φ * 2π)
lgrad = 0.45L
lgarea = lgrad^2 * π
meanarea = lgarea/N
minarea = meanarea * (1 - deviation)
maxarea = meanarea * (1 + deviation)
View julialabeltags.jl
using Luxor
function drawtag(w, h, pos;
ratio = 0.2,
rotation = 0)
@layer begin
translate(pos)
rotate(rotation)
shape = box(O + (w/4, 0), w, h, vertices=true)
# need point middle/left of box
View energy.jl
using Luxor, Colors
function flame(pos, col, action=:none)
@layer begin
translate(pos)
col == 1 && (mesh1 = mesh(box(O - (0, 100), 200, 260), [
Colors.RGB(colorant"orange"),
Colors.RGB(colorant"darkorange"),
Colors.RGB(colorant"red"),
Colors.RGB(colorant"firebrick4")]))
View getvideostats.jl
using HTTP, JSON, DataFrames # Julia v1.1
function makedataframe()
return DataFrame(title=String[], url=String[], videoid=String[], favcount=Int64[], dislikecount=Int64[],likecount=Int64[],viewcount=Int64[])
end
function _getpage(apikey, channelurl;
nextpagetoken="")
if nextpagetoken != ""
page1 = HTTP.request("GET", "https://www.googleapis.com/youtube/v3/search?key=$(apikey)&channelId=$(channelurl)&pageToken=$(nextpagetoken)&part=snippet,id&order=date&maxResults=50")
@cormullion
cormullion / juliadebug.jl
Last active Apr 5, 2019
juliadebug icon
View juliadebug.jl
using Luxor, Colors
function scarab(pos, heading;
legposition=1,
colorant=colorant"blue",
scalefactor=0.5)
sethue(colorant)
@layer begin
translate(pos)
scale(scalefactor)
View DrWatson-logo.jl
using Luxor
function bowler()
move(Point(-5., 135.9))
curve(Point(38.5, 135.9), Point(81.3, 135.7), Point(125., 132.9))
curve(Point(142.5, 132.3), Point(159.2, 130.1), Point(176.7, 129.2))
curve(Point(183.5, 128.5), Point(191.4, 127.7), Point(198.5, 126.2))
curve(Point(201.6, 125.5), Point(203.8, 123.2), Point(206.6, 122.8))
curve(Point(208.6, 120.2), Point(209.5, 118.5), Point(210.2, 116.6))
curve(Point(210.2, 119.7), Point(214.7, 112.6), Point(216.5, 110.7))
View animated-lorenz.jl
# static lorenz drawing omitted
function frame(scene, framenumber, lorenzpoints)
background("white") # nontransparent PNG
eased_n = scene.easingfunction(framenumber, 0, 1, scene.framerange.stop)
uptoframe = convert(Int, floor(rescale(eased_n, 0, 1, 1, length(lorenzpoints))))
origin()
draw(lorenzpoints[1:uptoframe], 350, 50, 750)
end
View stacked-2019.jl
using Luxor, Colors
function main(fname)
weare = ["data scientists", "programmers", "physicists", "statisticians", "ecologists", "web developers", "mathematicians", "economists", "astrophysicists", "machine learning researchers", "HPC developers", "quants", "electrical engineers", "software developers", "bio-informaticists", "economic forecasters", "data engineers", "theoretical biologists", "psychologists", "educators", "insurers", "condensed matter theorists", "research software engineers", "space scientists", "energy forecasters", "geospatial analysts", "botanists", "chemists", "cryptographers", "cyber-security researchers", "algorithmists", "biologists", "natural language experts", "professors", "environmental economists", "flight dynamics engineers", "geophysicists", "materials scientists", "mechanical engineers", "computational mathematicians", "mathematical biologists", "computer vision experts", "quantum particle researchers", "machine learning developers", "whale conservationists", "signal proce
@cormullion
cormullion / splash.jl
Last active Jan 26, 2019
splash image
View splash.jl
using Luxor
Drawing(1920, 525, "/tmp/splash-img.png")
setblend(blend(boxtopcenter(BoundingBox()), boxbottomcenter(BoundingBox()),
setcolor(.3, .34, .5, 0.7),
setcolor(.1, .1, .15, 0.9)))
paint()
origin()
sethue("grey50")
setline(.25)
You can’t perform that action at this time.