Skip to content

Instantly share code, notes, and snippets.

View gcalmettes's full-sized avatar

Guillaume Calmettes gcalmettes

View GitHub Profile
@gcalmettes
gcalmettes / .block
Last active March 7, 2023 22:01
Orthographic projections of the Rossler attractor
license: gpl-3.0
xxxxxxxxx.xxxxxx.xxxxxxxxxxxxx.xxxxxx.xxxxxx.xxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxx.xxxxxxxx.xxxxxxxxxx...
xxxxxxxxxx.xxxxxx...xxxxxxxx..xxxxxxxx.xxxx.x.xxxxxxxxxxxx.xxxx.xxxxxxxxxxxxxx.xxxxx....xxxxxxxx.xxx
.xxxxxxx..xxxxxxxxx..xxxxxx.x.xxxxxxx.xx.xx.xxxxxxxxxxxx..xxxxxx.xxxxxxx.x....xxxxxxx.x...xxxxx.x.xx
xxxxxxxxx.xxxxxxx..xx.xxxxxxxx.x.xxx.xx.x..x.xxxxxxxxxxx.xxxxxxx..x.xxx.x.xxx.xxxxxxxxxx.x.xxx.xxxxx
xxxxxxxx.xxxxxxxx..xxx.x..xx..x.x.x.x.x.xxxxx.xxxxxxxx...xxxxxx.xx.x.x.xxx.xxx.xxxxx.x..xxx.x.xxxxxx
x..x.xxxx....xxxx.x...x.....xxxxxx.xxx.xxxxx..xxxx..x.xxx.xx.x.xxxxxx.xxxxxxxxx.xxxxxx.xxxxx...xxxx.
....xxxx..xxx.xx.xx.xxxxx.xxxxxxxxx.x.x.xxxxxx..x..x.xxxx.xxx.xxxxxxxx.xxxxxxx.x.x.xxx..xxxxx.x.x.xx
x.xx......xxxx..xx.xxxxx.xxxxxxxx....xxxxxxxxxx..xxxx.xxxx.x..xx.xxxxx.xxxxxx.xxx.x.x.xx.xxx..xx..x.
x..xxxxx..xxxx.xxxx.xxxxx.xxxx.x.x.xx.xxxxxxxxxx.xxxxxxx..x.xx..xxxxxx.xxxxxx.xx.xxx.xxx.x..xxxxxx.x
.xxxxxx..x.xxxx.xx.xxx..x.xxxxx.xxx.xxxxxxxxxxxx.x.xxxxxxxxx.xx..xxxx..xxxx..xxxxxx.xxxxx.x..xx.xxxx
@gcalmettes
gcalmettes / README.md
Created September 6, 2017 12:11 — forked from robert-moore/README.md
A New Pattern for Updatable D3.js Charts

Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.

@gcalmettes
gcalmettes / README.md
Last active May 2, 2021 20:51
Visual exploration of the DeQuan Li attractor

Real-time orthographic projection of the Dequan Li attractor.

The attractor shape can be explored while the attractor is live-rendered by selecting different sets of angles to rotate the scene along the X and Z axes. Initials values of x,y,z (initial data point) can be chosen as well.

The rendering of the attractor is done by canvas, while the axis are rendered by svg.

Visualization of other attractors:

@gcalmettes
gcalmettes / peakdetect.py
Created February 9, 2012 23:52 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0):
"""
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html
Algorithm for detecting local maximas and minmias in a signal.
Discovers peaks by searching for values which are surrounded by lower
or larger values for maximas and minimas respectively
@gcalmettes
gcalmettes / introrx.md
Created September 15, 2018 06:49 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@gcalmettes
gcalmettes / .block
Last active May 25, 2018 16:49
fresh block
license: mit
@gcalmettes
gcalmettes / .block
Last active May 24, 2018 20:44
Radial Force-offset
license: gpl-3.0
@gcalmettes
gcalmettes / .block
Created May 24, 2018 20:43
Radial Force
license: gpl-3.0
@gcalmettes
gcalmettes / README.md
Last active October 28, 2017 23:15
Spatial SIR model of Zombie outbreak

Spatial SIR model of a zombie outbreak in France

This simple SIR model simulates a zombie outbreak in France, inspired by the scenario described in When zombies attack!: Mathematical modeling of an outbreak of zombie infection.

Here the model is extended spatially to allow neighboring grid cells to interact with one another (each cell can interact with its 8 adjacent cells) so infection can spread from cell to cell, and the global zombie outbreak can be visually appreciated (who doesn't want to see a nice zombie wave!).

The patient zero (there must be one ...) is placed somewhere between Lyon and Nimes. You can also add more foci infection by clicking on the map.

The two line charts on the right show the current state of the population for each iteration of the model: