Skip to content

Instantly share code, notes, and snippets.

View SCOTT-HAMILTON's full-sized avatar

SCOTT-HAMILTON SCOTT-HAMILTON

  • France
View GitHub Profile
@SCOTT-HAMILTON
SCOTT-HAMILTON / regex_findalliter.py
Last active June 8, 2019 16:08
A function that find all occurencies of a regex in a string (returns a list of indexes).
def regex_findall(regex, content, flags=0):
res = re.findall(regex, content, flags)
indexes = []
adder = 0
for str in res:
s = len(content)
str = ''.join(str)
index = content.find(str)
if index != -1:
print(index)
#!/opt/manim/manim.py -l --media_dir .
from manimlib.imports import *
from manimlib.mobject.types.vectorized_mobject import VMobject
# To watch one of these scenes, run the following:
# python -m manim example_scenes.py SquareToCircle -pl
#
# Use the flat -l for a faster rendering at a lower
from manimlib.imports import *
from manimlib.mobject.types.vectorized_mobject import VMobject
# To watch one of these scenes, run the following:
# python -m manim example_scenes.py SquareToCircle -pl
#
# Use the flat -l for a faster rendering at a lower
# quality.
# Use -s to skip to the end and just save the final frame
these derivations will be built:
/nix/store/bp3nkqdqp0ydk0226bfls2d1xr34vk1b-OTPGen-0.9.3.drv
building '/nix/store/bp3nkqdqp0ydk0226bfls2d1xr34vk1b-OTPGen-0.9.3.drv'...
unpacking sources
unpacking source archive /nix/store/v7ibzsdxbcrymr0i58bp2v3bfx4j9w3w-source
source root is source
patching sources
applying patch /nix/store/wq2500f91b0m29vban537db82b8drv0b-b25cbbddfdd4732560c4b91f0262eec123fc5b6c.patch
patching file Source/Core/CMakeLists.txt
Hunk #1 succeeded at 30 (offset -4 lines).
Creating initial Home Manager generation...
error: The option value `systemd.user.services.day-night-plasma-wallpapers.description' in `/nix/store/yvavw0jynviqf5z4jfm7mn6l1jg1n1ii-source/modules/day-night-plasma-wallpapers.nix' is not of type `attribute set of boolean or signed integer or string or list of boolean or signed integer or stringss'.
(use '--show-trace' to show detailed location information)
There are 111 unread and relevant news items.
Read them by running the command 'home-manager news'.
let
home-manager = builtins.fetchGit {
url = "https://github.com/rycee/home-manager.git";
rev = "dd94a849df69fe62fe2cb23a74c2b9330f1189ed"; # CHANGEME
ref = "release-18.09";
};
# nur-no-pkgs = import (builtins.fetchTarball {
# url = "https://github.com/nix-community/NUR/archive/master.tar.gz";
# sha256 = "1jfgd9mhrbdxkkdfnwwfsnnqfbxi2vj1561qif61kikw0nnj2i2r" ;
# }) {};
@SCOTT-HAMILTON
SCOTT-HAMILTON / Clean-Musics.sh
Created June 7, 2020 17:42
Shell script to clean musics downloaded from youtube-dl
#! /bin/sh
# If the music isn't downloaded with -o <output template>, then
# The filename of the downloaded music looks like this :
# %(title)-%(youtube-id-of-the-video).%(extension)
# This line transforms it to :
# %(title).ogg
find . -maxdepth 1 -type f | egrep "^.*-(\w{11})\.\w{2,}$" | awk '{n=split($0,a,"-");str = a[1];for (i = 2; i <= n-1; ++i)str = str a[i];print "\""$0"\" \""str".ogg\""}' | xargs -n2 -L1 -r mv
# Next we need to convert all those files to opus format (the best)
diff --git a/nixos/tests/gnome3.nix b/nixos/tests/gnome3.nix
index 7e301be49d1..e44331ac2cd 100644
--- a/nixos/tests/gnome3.nix
+++ b/nixos/tests/gnome3.nix
@@ -14,6 +14,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
services.xserver.displayManager = {
gdm.enable = true;
gdm.debug = true;
+ gdm.nvidiaWayland = true;
autoLogin = {
@SCOTT-HAMILTON
SCOTT-HAMILTON / TP - Physique-Chimie - Meilleur portée d'un projectile selon différents angles de lancer.py
Created January 16, 2021 17:20
TP - Physique-Chimie - Meilleur portée d'un projectile selon différents angles de lancer.py
import numpy as np
import matplotlib.pylab as plt
from pprint import pprint
print("")
print("*****************************")
print("* Mouvement d'un projectile *")
print("*****************************")
print("")
diff --git a/pkgs/development/interpreters/perl/no-sys-dirs-5.31.patch b/pkgs/development/interpreters/perl/no-sys-dirs-5.31.patch
index 62dce0e25b9..7a8de4f427f 100644
--- a/pkgs/development/interpreters/perl/no-sys-dirs-5.31.patch
+++ b/pkgs/development/interpreters/perl/no-sys-dirs-5.31.patch
@@ -1,7 +1,7 @@
-diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
---- perl-5.20.0-orig/Configure 2014-05-26 15:34:18.000000000 +0200
-+++ perl-5.20.0/Configure 2014-06-25 10:43:35.368285986 +0200
-@@ -106,15 +106,7 @@
+diff --color -ur a/Configure b/Configure