Skip to content

Instantly share code, notes, and snippets.

@mpoquet
mpoquet / analysis.R
Last active December 6, 2022 17:28
printf message loss experiment
#!/usr/bin/env Rscript
library(tidyverse)
library(GGally)
data_file = read_csv('buffer-expe-file.csv') %>% mutate(context='file')
data_pipe = read_csv('buffer-expe-pipe.csv') %>% mutate(context='pipe')
data_term = read_csv('buffer-expe-term.csv') %>% mutate(context='term')
data_termerr = read_csv('buffer-expe-termerr.csv') %>% mutate(context='termerr')
data = bind_rows(data_file, data_pipe, data_term, data_termerr) %>% mutate(
@mpoquet
mpoquet / default.nix
Created January 30, 2022 13:59
Path of Exile 3.17: Atlas passive points per map tier
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz") {}
}:
let
jobs = rec {
inherit pkgs;
r-shell = pkgs.mkShell rec {
name = "r-shell";
buildInputs = [
@mpoquet
mpoquet / analysis.R
Created October 8, 2021 17:02
SimGrid Nix package closure size evolution
library(tidyverse)
sg327 = read_delim('./sg327.dat', ' ', col_names=c('bytes', 'package')) %>% mutate(name = "SimGrid-3.27")
sg328 = read_delim('./sg328.dat', ' ', col_names=c('bytes', 'package')) %>% mutate(name = "SimGrid-3.28")
sg329 = read_delim('./sg329.dat', ' ', col_names=c('bytes', 'package')) %>% mutate(name = "SimGrid-3.29")
sg327light = read_delim('./sg327light.dat', ' ', col_names=c('bytes', 'package')) %>% mutate(name = "SimGrid-3.27-light")
sg328light = read_delim('./sg328light.dat', ' ', col_names=c('bytes', 'package')) %>% mutate(name = "SimGrid-3.28-light")
sg329light = read_delim('./sg329light.dat', ' ', col_names=c('bytes', 'package')) %>% mutate(name = "SimGrid-3.29-light")
# full packages
@mpoquet
mpoquet / data.csv
Created April 4, 2021 20:32
Data about prophecy farming in Path of Exile 3.13
item level 1 no blocking level 1 blocking level 30 no blocking tier seal_cost
The Hardened Armour 128 0 51 crap 3
The Sharpened Blade 126 0 38 crap 3
Overflowing Riches 124 174 37 good 3
Golden Touch 123 0 43 crap 3
Lasting Impressions 110 0 39 meh 3
Path of Betrayal 100 0 0 crap 3
Visions of the Drowned 99 125 0 crap 2
Hidden Reinforcements 88 132 24 good 1
Erased from Memory 85 0 27 meh 3
@mpoquet
mpoquet / exilence-next-0.4.4-export.csv
Last active April 3, 2021 18:31
exilence-next-0.4.4 missing prophecies?
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 30. in line 1.
Data from 2021-04-03 19:04
uuid,itemId,name,typeLine,frameType,calculated,inventoryId,elder,shaper,icon,ilvl,tier,corrupted,links,sockets,quality,level,stackSize,totalStacksize,variant,tab,total,max,mean,mode,min,median,detailsUrl,baseType,count
"af052de5-3fef-44fc-adc9-d328e8c1f4d1","4dcdbb83362e555ebfbd97734067793e54b19d8e38b5457add161e2ed0398ce0","The Plaguemaw I","The Plaguemaw I",8,1,"Stash26",FALSE,FALSE,"https://web.poecdn.com/image/Art/2DItems/Currency/ProphecyOrbRed.png?v=dc9105d2b038a79c7c316fc2ba30cef0&w=1&h=1&scale=1",0,0,FALSE,0,0,0,0,58,0,"",[object Object],[object Object],[object Object],58,0,0,0,0,0,"https://poe.ninja/challenge/prophecies/the-plaguemaw-i",null,99
"01c43d41-0683-4ab9-84c7-276a67e23da0","2d19236766e10be51b04f0561613d64f16fa53e7232a96861e5194127f76b535","Lightning Falls","Lightning Falls",8,1,"Stash26",FALSE,FALSE,"https://web.poecdn.com/image/Art/2DItems/Currency/ProphecyOrbRed.png?v=dc9105d2b038a79c7c316fc2ba30cef0&w=1&h=1&scale=1",0,0,FALSE,0,0,0,0,10,0,"",[object Object],[ob
@mpoquet
mpoquet / analyzed-data.csv
Created January 10, 2021 11:21
Data and scripts about prophecy farming in Path of Exile 3.12, character level 1
item count seal_cost tier total_sc_cost probability
Overflowing Riches 121 3 good 484 0.07002314814814815
Golden Touch 117 3 meh 468 0.06770833333333333
Lasting Impressions 113 3 meh 452 0.06539351851851852
Path of Betrayal 111 3 poop? 444 0.0642361111111111
The Hardened Armour 104 3 meh 416 0.06018518518518518
Rebirth 99 2 good? 297 0.057291666666666664
The Sharpened Blade 93 3 meh 372 0.05381944444444445
Erased from Memory 91 3 meh 364 0.052662037037037035
The God of Misfortune 86 3 meh 344 0.04976851851851852
@mpoquet
mpoquet / simu.R
Created December 31, 2020 00:17
Simulation of Path of Exile hit damage for Dance with Death (cf. https://www.reddit.com/r/pathofexile/comments/kn3x1w/dance_with_death_keystone_on_wander/)
library(tidyverse)
# parameters
dmg_min = 1505
dmg_max = 12830
crit_chance = 0.9
crit_multi = 3.3
sample_size = 1000000
# roll base damage and crit
@mpoquet
mpoquet / default.nix
Created December 9, 2020 02:40
PathOfBuilding-SimpleGraphic naive Linux build attempt
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz") {}
}:
let
self = rec {
inherit pkgs;
SimpleGraphic = pkgs.stdenv.mkDerivation rec {
pname = "SimpleGraphic";
version = "git";
src = ./.;
@mpoquet
mpoquet / beamerthemegreenish.sty
Created August 6, 2020 15:38
slides : markdown -> beamer (via pandoc)
% Theme done by Millian Poquet in 2020.
% This is free and unencumbered software released into the public domain.
% For more information, please refer to <http://unlicense.org/>
% Main options (based on Frankfurt)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\useoutertheme[subsection=true]{smoothbars}
\setbeamertemplate{sections/subsections in toc}[square]
\setbeamertemplate{items}[square]
@mpoquet
mpoquet / get-tp.bash
Last active March 17, 2020 09:40
Programmation Concurrente et Répartie, TP 05, supports
#!/usr/bin/env bash
rsync -r USERNAME@transit.iut2.univ-grenoble-alpes.fr:/users/info/pub/s4/M4102C/tp05 ./