- https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged
- https://developers.redhat.com/articles/2023/08/31/how-we-ensure-statically-linked-applications-stay-way#
- https://sourceware.org/pipermail/libc-alpha/2023-May/148682.html
- https://patchwork.sourceware.org/project/glibc/patch/20230629113408.724726-1-arjun@redhat.com/
- https://patchwork.ozlabs.org/project/glibc/list/?series=375732
- https://ffmpeg.org/pipermail/ffmpeg-user/2018-July/040460.html
- https://gitlab.com/packman.io/fully-static-ffmpeg-build
- https://sourceware.org/bugzilla/show_bug.cgi?id=27959
- https://stackoverflow.com/questions/31155824/dlopen-in-libc-and-libdl
- https://news.ycombinator.com/item?id=23816748
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
# cat all files not in .git directory | |
find -not -iwholename '*.git*' -type f -exec cat {} + | |
# cat all tsx files not in .git directory with file name section header | |
find -not -iwholename '*.git*' -type f -name '*.tsx' -exec tail --lines=+1 {} + | |
# unpack several downloaded tar files and then delete the original archives | |
find -name '*.tar.gz' -type f -exec tar -xf {} \; -delete | |
# search recursively in all CMakeLists.txt files a substring 1.78 |
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://dumps.wikimedia.org/wikidatawiki/entities/ https://dumps.wikimedia.org/ruwiktionary/ https://dumps.wikimedia.org/ruwiktionary/20231201/ | |
# | |
# wget -L https://dumps.wikimedia.org/wikidatawiki/entities/20231213/wikidata-20231213-lexemes.json.bz2 https://dumps.wikimedia.org/ruwiktionary/20231201/ruwiktionary-20231201-pages-meta-current.xml.bz2 | |
# bzcat wikidata-20231213-lexemes.json.bz2 | wc -l # 1198580 | |
# bzcat wikidata-20231213-lexemes.json.bz2 | head -n 2 | |
# bzcat ruwiktionary-20231201-pages-meta-current.xml.bz2 | wc -l # 196257893 | |
# bzcat ruwiktionary-20231201-pages-meta-current.xml.bz2 | head -n 100 | |
# bzgrep '<page>' ruwiktionary-20231201-pages-meta-current.xml.bz2 | wc -l # 2814450 | |
# time python3 readwiktionary.py ruwiktionary-20231201-pages-meta-current.xml.bz2 ruwiktionary-20231201-pages-meta-current.xml.bz2 # real 11m15.868s # user 9m36.938s # sys 0m5.656s |
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 |
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 |
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 |
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 |
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')) |
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); |