Skip to content

Instantly share code, notes, and snippets.

View briochemc's full-sized avatar

Benoît Pasquier briochemc

View GitHub Profile
### A Pluto.jl notebook ###
# v0.11.14
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
### A Pluto.jl notebook ###
# v0.11.12
using Markdown
using InteractiveUtils
# ╔═╡ a8657c36-f1b1-11ea-2d91-ffd1be275a14
begin
using WGLMakie
using AbstractPlotting
@briochemc
briochemc / Makie_Chord.jl
Last active September 8, 2020 01:54
Use Pluto (reactive notebook) with Makie (plotting) to showcase the Chord method for Optimization
### A Pluto.jl notebook ###
# v0.11.12
using Markdown
using InteractiveUtils
# ╔═╡ 6b2d70e0-f0c0-11ea-11b1-452aa45f043d
using WGLMakie, AbstractPlotting, JSServe, Colors
# ╔═╡ ce3effa2-f0c1-11ea-1dc5-6fb4da9951c0
### A Pluto.jl notebook ###
# v0.11.12
using Markdown
using InteractiveUtils
# ╔═╡ acb74b48-edc4-11ea-12eb-d9193f5ab64f
using Plots
# ╔═╡ b2c05e44-edc4-11ea-356f-c1042b919836
@briochemc
briochemc / Gradients_AllHands_Aug2020_AIBECS.jl
Created August 31, 2020 07:49
This is a proof-of-concept Pluto notebook using AIBECS to run tiny simulations of a tracer forward and backwards in time, around the Gradients cruises. The goal is to provide a tool to investigate the movement/supply of nutrients.
### A Pluto.jl notebook ###
# v0.11.10
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
# Here I store more data as I go,
# which I could use to plot figures comparing methods
# the convergence speed of different methods
# I use the Rosenbrock classic example and
# Optim.jl as an iterative process which will
# call f multiple times to find its minimum
# and I plot the convergence vs time
using Optim, Cassette
@briochemc
briochemc / nothing.jl
Created July 6, 2020 04:37
gifs for tuto
# Just trying stuff
@briochemc
briochemc / dancing_cubes.jl
Last active June 27, 2020 08:41 — forked from jkrumbiegel/dancing_cubes.jl
Dancing cubes
using AbstractPlotting
using MakieLayout
using GLMakie; GLMakie.activate!()
GLMakie.GLFW.WindowHint(GLMakie.GLFW.FLOATING, 1)
using LinearAlgebra
##
scene = Scene(center = false, raw = true, resolution = (800, 800))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NEIGHBORS_MAP = {
0: (0, 0, 0, 0, 1, 0, 1, 0, 0, 0),
1: (0, 0, 0, 0, 0, 0, 1, 0, 1, 0),
2: (0, 0, 0, 0, 0, 0, 0, 1, 0, 1),
3: (0, 0, 0, 0, 1, 0, 0, 0, 1, 0),
4: (1, 0, 0, 1, 0, 0, 0, 0, 0, 1),
5: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
6: (1, 1, 0, 0, 0, 0, 0, 1, 0, 0),
7: (0, 0, 1, 0, 0, 0, 1, 0, 0, 0),
8: (0, 1, 0, 1, 0, 0, 0, 0, 0 ,0),