View buildopusenczoo.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash buildopusenczoo.sh cc &> buildopusenczoo.sh.cc.txt | |
# bash buildopusenczoo.sh muslc &> buildopusenczoo.sh.muslc.txt # need to yum/apt install musl-tools | |
# cp /proc/cpuinfo cpuinfo.txt | |
if [ "$1" = "cc" ]; then | |
export SUFFIX=cc | |
else | |
export CFLAGS="-U_FORTIFY_SOURCE" | |
export LDFLAGS="--static -static -static-libgcc -lm -lc" | |
export CC=musl-gcc |
View find_untar_delete.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -name '*.tar.gz' -type f -exec tar -xf {} \; -delete |
View csvsubset.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Usage: | |
# python csvsubset.py mycsv.csv --ignorecase --grep "donat" --key "First Name" "Last Name" "Email" "Mailing Postal Code" "Mailing City" --output-encoding=utf-16le > mycsvsubset.csv | |
import sys | |
import csv | |
import argparse | |
import re |
View postproczoom.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unanswered so far :( | |
# https://video.stackexchange.com/questions/36992/concat-a-video-and-an-audio-using-ffmpeg-freezing-the-last-video-frame-without | |
# https://superuser.com/questions/1816897/freeze-a-frame-using-ffmpeg | |
# here are two different approaches: | |
# 1: boxoverlay # | |
# - drawtext on video top for the whole video | |
# - two different box overlays at different video intervals | |
ffmpeg -i video.mp4 -ss 00:03:10 -vf "drawtext=fontsize=30:fontcolor=pink:x=w*0.4:y=h*0.01:text='https\://exil-solidaire.fr',drawbox=x=0.83*in_w:y=0.48*in_h:w=0.17*in_w:h=0.35*in_h:color=lightblue:t=fill:enable='gt(t,189)',drawbox=y=0.045*in_h:w=in_w:h=in_h:color=lightblue:t=fill:enable='gt(t,1570)'" intro_and_qa_boxoverlay.mp4 |
View csvsetdiff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Usage: | |
# python csvsetdiff.py mycsv1.csv - mycsv2.csv --key1 "Email" --key2 "Email acheteur" > mycsvsetdiff.csv | |
# python3 csvsetdiff.py Contacts.csv - adherez.csv --delimiter1="," --delimiter2=";" --key1 "Email" "Email Home" --key2 "Email payeur" "Champ complémentaire 2 Email" --encoding=utf-16 --delimiter=$'\t' --ignorecase --translate .= > test3.csv | |
import sys | |
import csv | |
import argparse |
View torch_global_isfinite_hook.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
class Good(torch.nn.Module): | |
def forward(self, x): | |
return x + torch.ones_like(x) | |
class Bad(torch.nn.Module): | |
def forward(self, x): | |
return x + torch.full_like(x, float('nan')) |
View libarpack.ltrace.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; https://github.com/gnu-octave/octave/blob/default/liboctave/numeric/lo-arpack-proto.h | |
; https://docs.octave.org/latest/Standalone-Programs.html | |
; nm -D /lib/x86_64-linux-gnu/libarpack.so.2.1.0 | grep dsaupd | |
; ltrace -x '*' echo hi | |
; the following line fails :( | |
; LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/octave/6.4.0 ltrace --config libarpack.ltrace.conf -x '*@libarpack*' ./standalonebuiltin | |
typedef complex64 = struct(double, double); |
View findgrep.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name CMakeLists.txt -exec grep -H '1.78' {} \; |
View barcode.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
speaker_colors = ['gray', 'violet', 'lightblue'] | |
ref_missing = '' | |
speaker_name_missing = '' | |
speaker_missing = 0 | |
speaker_phrase_separator = ';' | |
speaker_separator = ', ' | |
channel_missing = -1 | |
time_missing = -1 | |
_er_missing = -1.0 |
NewerOlder