Skip to content

Instantly share code, notes, and snippets.

View SolarLiner's full-sized avatar
🪒
yak shaving

Nathan Graule SolarLiner

🪒
yak shaving
View GitHub Profile
@SolarLiner
SolarLiner / README.md
Created March 6, 2018 19:15
My NVIM configuration

Configuration uses Vundle and XDG_DESKTOP compliant paths - macOS users, change the RTP and bundle paths.

@SolarLiner
SolarLiner / android-udev-rules.sh
Last active May 14, 2018 10:13
Ubuntu: Add udev rules for Android from upstream
DIR=`mktemp -d`
# Clone the repository
git clone https://github.com/M0Rf30/android-udev-rules.git $DIR
cd $DIR
echo "Copying files"
sudo cp 51-android.rules /etc/udev/rules.d/51-android.rules
# Change file permissions
sudo chmod a+r /etc/udev/rules.d/51-android.rules
@SolarLiner
SolarLiner / index.html
Created October 12, 2018 21:40
Alternate template with p5 IntelliSense for VS Code
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.js"></script>
<script src="sketch.js"></script>
</head>
<body>
</body>
@SolarLiner
SolarLiner / mandelbrot.pde
Last active March 14, 2019 17:58 — forked from shiffman/mandelbrot.pde
PI Day
import java.math.BigDecimal;
import java.math.MathContext;
int digits = 11;
MathContext mc = new MathContext(digits*digits + 1);
BigDecimal c = new BigDecimal(0.25);
BigDecimal hundred = new BigDecimal(100);
BigDecimal e = BigDecimal.ONE.divide(hundred.pow(digits-1), mc);
BigDecimal z = BigDecimal.ZERO;
int iterations = 0;
@SolarLiner
SolarLiner / mandelbrodt.pde
Created March 14, 2019 20:57
Mandelbrodt, but with bigger ints
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
int digits = 11;
MathContext mc = new MathContext(digits*digits + 1);
BigDecimal c = new BigDecimal(0.25);
BigDecimal hundred = new BigDecimal(100);
BigDecimal e = BigDecimal.ONE.divide(hundred.pow(digits-1), mc);
BigDecimal z = BigDecimal.ZERO;
class stack:
def __init__(self, *data):
self.data = [*data]
def push(self, data):
self.data.append(data)
def pop(self):
@SolarLiner
SolarLiner / README.md
Last active February 9, 2020 21:16
Homemade OCaml parser combinator

I made this learning OCaml, so this will not be the most idiomatic nor the best looking code you'll ever see. However it works and I'm stoked about it!

The filename is nacc.ml as as (cheeky) play on yacc and means "Not a(nother) compiler compiler".

@SolarLiner
SolarLiner / COVID-19.ipynb
Last active April 8, 2020 11:48
A modelization of the COVID-19 outbreak
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2020-05-04 21:39:49.074629795 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 1.4 x86_64 ghc-8.8.3
2020-05-04 21:39:49.078630933 [ThreadId 4] - Current directory:/home/solarliner/Documents/Projets/tesths
2020-05-04 21:39:49.078735906 [ThreadId 4] - Operating system:linux
2020-05-04 21:39:49.078806305 [ThreadId 4] - args:[]
2020-05-04 21:39:49.082580882 [ThreadId 4] - Cabal-Helper decided to use: ProjLocV2Dir {plProjectDirV2 = "/home/solarliner/Documents/Projets/tesths"}
2020-05-04 21:39:49.082679186 [ThreadId 4] - Module "/home/solarliner/Documents/Projets/tesths/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/solarliner/Documents/Projets/tesths", cradleOptsProg = CradleAction: Other CabalV2}
2020-05-04 21:39:49.083086483 [ThreadId 4] - Cradle directory:/home/solarliner/Documents/Projets/tesths
2020-05-04 21:39:49.08338416 [ThreadId 4] - Executing GHC on path with args: --numeric-version
2020-05-04 21:39:49.297107921 [ThreadId 4] - Project GHC version:8.8.3
2020-05-04 21:39:49.298
@SolarLiner
SolarLiner / TP Python.ipynb
Last active March 22, 2021 15:51
TP Traitement du Signal (Python + numpy, complet)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.