Skip to content

Instantly share code, notes, and snippets.

View SergeStinckwich's full-sized avatar
🎯
Focusing

Serge Stinckwich SergeStinckwich

🎯
Focusing
View GitHub Profile
@SergeStinckwich
SergeStinckwich / gist:9d60c627ef820eb4825072f4eee12bd3
Created May 7, 2017 16:25
mcz to git migration for PolyMath
migration := GitMigration on: 'PolyMath/PolyMath'.
migration cacheAllVersions.
migration authors: {
'DanielUber' -> #('djuber' '<djuber@gmail.com>').
'GuillermoPolito' -> #('guillep' '<guillermopolito@gmail.com>').
'HwaJong' -> #('daliot' '<daliot.oh@gmail.com>').
'MobiusEng' -> #('mobius-eng' '<mobius@noemail.org>').
'NataliaMoskovchuk' -> #('runadrag' '<natalia.tymchuk@unikernel.net>').
'NataliaTymchuk' -> #('runadrag' '<natalia.tymchuk@unikernel.net>').
@SergeStinckwich
SergeStinckwich / lorentz.st
Last active February 2, 2017 15:03
Lorentz attractor with Polymath + Roassal viz
sigma := 10.0.
r := 28.0.
b := 8.0/3.0.
dt := 0.005.
system := ExplicitSystem
block:[:v :t | |dx dy dz x y z|
x := v at: 1. y := v at: 2. z := v at: 3.
dx := sigma * (y - x).
dy := r * x - y - (x * z).
dz := (-1 * b * z + (x * y)).
@SergeStinckwich
SergeStinckwich / travis-upload.bash
Created June 7, 2012 06:55
Send a file to dl.free.fr from travis-ci
#!/bin/bash
if [ -z "$1" ]; then
echo "usage: $0 <file>"
exit 1
fi
name=test$RANDOM@test$RANDOM.fr
pass=$RANDOM
file="$1"
out=$(mktemp)
@SergeStinckwich
SergeStinckwich / gist:d26af371b4fe0c7ff08d
Last active January 11, 2017 09:08
ESRI shapefiles rendering with Pharo
| shpE legend url response zipArchive fileRef |
Gofer new
url: 'http://smalltalkhub.com/mc/hernan/Shapes/main';
package: 'ConfigurationOfShapes';
load.
((Smalltalk at: #ConfigurationOfShapes) project version: '1.2') load.
" Download zip file containing shp resources "
url := 'http://dl.dropboxusercontent.com/u/103833630/ne_110m_admin_0_countries.zip' asZnUrl.
@SergeStinckwich
SergeStinckwich / fingerprintCSV.st
Created January 10, 2017 10:52
CSV fingerprint with Roassal
|tab b shape elements v lb|
tab := RTTabTable new input: (ZnEasy get:
'https://raw.githubusercontent.com/setosa/csv-fingerprint/master/example2.csv')
entity contents asString usingDelimiter:$,.
v := RTView new.
elements := #().
tab values do:[:row|elements := elements, row.].
shape := RTBox new height:1; width:20; color: [:e | e isEmpty ifTrue:
[Color black] ifFalse:[
@SergeStinckwich
SergeStinckwich / hubble.st
Last active November 30, 2016 10:51
Hubble constant approximation with PolyMath and Roassal
x := #(0.028 0.076 0.108 0.136 0.153 0.226 0.283 0.359 0.363 0.408 0.438 0.472 0.476 0.476 0.493 0.556 0.639).
y := #(2.7 4.2 10.5 14.1 10.5 13.2 19.8 28.2 20.7 29.4 31.8 44.4 32.1 37.2 33 34.5 46.5).
lr := DhbLinearRegression new.
points := (1 to: x size) collect: [:i|( (x at: i)@(y at: i))].
points do: [:i|lr add:i].
p := lr asEstimatedPolynomial.
b := RTGrapher new.
lb := RTLegendBuilder new.
@SergeStinckwich
SergeStinckwich / gist:416054d84bab84b5022c
Created January 28, 2016 07:03
Geany configuration fix
cp /Infos/lmd/2015/licence/ue/1I002-2016fev/filetypes.c ~/.config/geany/filedefs/
@SergeStinckwich
SergeStinckwich / gist:8161788
Created December 28, 2013 17:25
Prime Spiral in EyeSee - Pharo
|diag|
diag := ESDiagramRenderer new.
(diag scatterplot)
models: ((0 to: 5e4) select:#isPrime);
y: [ :p |(p* (p cos))];
x: [ :p |(p* (p sin))];
preferredAxisMinX:(-50000);
preferredAxisMinY:(-50000);
smallObjects.
diag open.
@SergeStinckwich
SergeStinckwich / gist:5337643
Created April 8, 2013 15:24
docpad on Ubuntu 12.04
#Install npm
sudo apt-get install npm
#Ensure the lastest version of npm is installed
sudo npm install -g npm
#Install docpad 6.30
npm install -g docpad@6.30
@SergeStinckwich
SergeStinckwich / gist:5337581
Created April 8, 2013 15:17
ZeroConf Pharo scripts
# Download Pharo 2.0 + VM
```bash
wget -O - get.pharo.org/20+vm | bash
```
# Download Pharo 3.0 + VM
```bash
wget -O - get.pharo.org/30+vm | bash