Skip to content

Instantly share code, notes, and snippets.

View tupui's full-sized avatar
⚙️
Building Tansu

Pamphile Roy tupui

⚙️
Building Tansu
View GitHub Profile
@tupui
tupui / windows_bootable.sh
Created December 24, 2024 13:03
Windows madness ISO to bootable on macOS
brew install wimlib
diskutil eraseDisk MS-DOS "WINDOWS11" GPT disk5
rsync -avh --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_DE-DE_DV9/ /Volumes/WINDOWS11
wimlib-imagex split /Volumes/CCCOMA_X64FRE_DE-DE_DV9/sources/install.wim /Volumes/WINDOWS11/sources/install.swm 3800
@tupui
tupui / aes.py
Created December 13, 2024 00:20
Encrypt a file with AES 256 EAX
import binascii
import json
from base64 import b64encode, b64decode
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
data = b"..."
header = b"storachaProof"
@tupui
tupui / sampling_scipy.ipynb
Last active July 18, 2022 22:46
Improving random sampling in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tupui
tupui / timing_mc_qmc.py
Last active April 12, 2022 11:37
Timing MC vs QMC
"""Timing MC vs QMC.
Comparison of `numpy.random.Generator` (MC) vs `scipy.stats.qmc.Sobol` (QMC)
speed to sample points.
----------------
MIT License
Copyright (c) 2022 Pamphile Tupui ROY
@tupui
tupui / convergence_pi.py
Last active March 15, 2022 18:04
Convergence on the value of Pi using Monte Carlo vs QMC
"""Convergence of Pi using QMC.
---------------------------
MIT License
Copyright (c) 2022 Pamphile Tupui ROY
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@tupui
tupui / Brewfile
Last active August 31, 2022 11:03
What I need for my Mac
tap "hashicorp/tap"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/core"
tap "osx-cross/arm"
tap "osx-cross/avr"
tap "qmk/qmk"
tap "romkatv/powerlevel10k"
# Run your GitHub Actions locally 🚀
@tupui
tupui / poisson_disk_sampling.py
Last active January 28, 2022 10:44
Poisson disk sampling in n-dimensions
"""Poisson disk sampling in n-dimensions.
This is part of an effort to add Poisson disk sampling into SciPy:
https://github.com/scipy/scipy/pull/13918
---------------------------
MIT License
@tupui
tupui / mcm2021_scipy_pytorch_demo.ipynb
Last active August 16, 2021 17:18
MCM 2021 Scipy and Pytorch demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tupui
tupui / olhs_sampling.py
Last active August 9, 2021 15:50
Orthogonal Latin Hypercube Sampling
"""Orthogonal Latin Hypercube Sampling.
---------------------------
MIT License
Copyright (c) 2021 Pamphile Tupui ROY
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@tupui
tupui / lloyd_sampling.py
Last active August 9, 2021 05:40
Centroidal Voronoi Tessellation to generate sample: Lloyd's algorithm
"""Centroidal Voronoi Tessellation to generate sample: Lloyd's algorithm.
Based on the implementation of Stéfan van der Walt
https://github.com/stefanv/lloyd
which is:
Copyright (c) 2021-04-21 Stéfan van der Walt https://github.com/stefanv/lloyd
MIT License