Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Datseris's full-sized avatar
🐻
I am a bear.

George Datseris Datseris

🐻
I am a bear.
View GitHub Profile
*.css
@Datseris
Datseris / agents_logo.jl
Created October 11, 2019 14:16
WIP code to generate the logo of Agents.jl
using Luxor, DSP;
cd(@__DIR__);
const AGENTSTEXT = "Agents.jl"
# const FONT = "Montserrat SemiBold"
const FONT = "Tamil MN Bold"
const FONTSIZE = 200
using Random
Random.seed!(9)
@Datseris
Datseris / forward.jl
Created April 21, 2019 17:16
Method forwarding macro from Lazy
"""
@forward T.x functions...
Define methods for `functions` on type `T`, which call the relevant function
on the field `x`.
# Example
```julia
struct Wrapper
x
end
@Datseris
Datseris / color_palletes.jl
Created March 15, 2019 12:12
Color palletes for plotting
# Based on Fresh:
["#65ADC2", "#233B43", "#E84646",
"#C29365", "#168E7F", "#985CC9",
"#B74305", "#56727A"]
@Datseris
Datseris / simple.jl
Last active December 22, 2018 15:23
simple select rectangle
using Makie, AbstractPlotting
using AbstractPlotting: RefValue, absrect
scene = scatter(rand(10), rand(10))
const key = Mouse.left
# Create an initially hidden rectangle
function select_rectangle(scene)
@Datseris
Datseris / helpful_figure_stuff.jl
Last active November 28, 2018 14:50
Various pieces of code that help me make nice figures.
# && Exporting to movie:
framerate = 5
anim = `ffmpeg -y -framerate $(framerate) -start_number 1 -i $(savename)_%d.png
-c:v libx264 -pix_fmt yuv420p -preset veryslow -profile:v baseline -level 3.0 $(savename).mp4`
run(anim)
# To reduce movie size, you can add the option:
`-b:v 2048k`
# lower number = lower size = lower quality
@Datseris
Datseris / error.jl
Created November 24, 2018 23:00
Exception: EXCEPTION_ACCESS_VIOLATION at 0x43a2e5a91
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (i
n their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x43a2e5a91 -- jl_gc_pool_alloc at /home/Administrator/buil
dbot/worker/package_win64/build/src\gc.c:964 [inlined]
jl_gc_alloc_ at /home/Administrator/buildbot/worker/package_win64/build/src\julia_internal.h:274 [in
lined]
jl_gc_alloc at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2668
in expression starting at C:\Users\datseris\SimpleDiffEq.jl\src\tsit5_integrator.jl:224
jl_gc_pool_alloc at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:963 [inlined]
@Datseris
Datseris / error.jl
Created November 23, 2018 19:31
EXCEPTION_ACCESS_VIOLATION at 0x43a2e5a91
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (i
n their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x43a2e5a91 -- jl_gc_pool_alloc at/home/Administrator/buil
dbot/worker/package_win64/build/src\gc.c:964 [inlined]
jl_gc_alloc_ at /home/Administrator/buildbot/worker/package_win64/build/src\julia_internal.h:274 [in
lined]
jl_gc_alloc at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:2668
in expression starting at C:\Users\datseris\.julia\dev\DynamicalSystemsBase\src\minimal_ode.jl:169
jl_gc_pool_alloc at /home/Administrator/buildbot/worker/package_win64/build/src\gc.c:963 [inlined]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Datseris
Datseris / debug_logger.jl
Created September 30, 2018 15:32
using debug logger
julia> foo() = @debug "Hello, World!";
julia> foo()
julia> withenv("JULIA_DEBUG" => "all") do