Skip to content

Instantly share code, notes, and snippets.

(venv3) $ pip3 install transformers==3.0.0
Collecting transformers==3.0.0
Using cached transformers-3.0.0-py3-none-any.whl (754 kB)
Collecting numpy
Using cached numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting tokenizers==0.8.0-rc4
Using cached tokenizers-0.8.0rc4.tar.gz (96 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
@junaruga
junaruga / systemd-resoloved-debug.log
Created October 17, 2023 16:06
RubyCI Ubuntu jammy arm64
$ cat systemd-resoloved-debug.log
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Received dns UDP packet of size 64, ifindex=0, ttl=64, fragsize=0
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Got DNS stub UDP query packet for id 38089
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Looking up RR for rubyspecdoesntexist.fallingsnow.net IN A.
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Cache miss for rubyspecdoesntexist.fallingsnow.net IN A
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Firing regular transaction 63253 for <rubyspecdoesntexist.fallingsnow.net IN A> scope dns on */* (validate=yes).
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Using feature level UDP+EDNS0 for transaction 63253.
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Using DNS server 147.75.207.207 for transaction 63253.
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Announcing packet size 1472 in egress EDNS(0) packet.
Oct 17 15:28:58 ruby1 systemd-resolved[3712]: Emitting UDP, link MTU is 1500, socket MTU is 1500, minimal MTU is 40
$ cat card.rb
# Set your card number here. 16 digits.
card_no = '1234123412341234'
reverse_card_no = card_no.reverse
index = 1
total = 0
reverse_card_no.each_char do |c|
multi = (index % 2 == 1) ? 1 : 2
@junaruga
junaruga / para-callgraph.stp
Last active April 21, 2023 15:16
stap openssl/ruby fips
$ cat home/script/stap/para-callgraph.stp
#! /usr/bin/env stap
function trace(entry_p, extra) {
%( $# > 1 %? if (tid() in trace) %)
printf("%s%s%s %s\n",
thread_indent (entry_p),
(entry_p>0?"->":"<-"),
ppfunc (),
extra)
$ cat ltrace_ttt.log
[pid 691834] 1680200962.002912 openssl.so->OPENSSL_init_ssl(0, 0, 0x7f2e32d09580, 0 <unfinished ...>
[pid 691834] 1680200962.003789 libssl.so.3->OPENSSL_init_crypto(76, 0, 0, 0) = 1
[pid 691834] 1680200962.080976 libssl.so.3->CRYPTO_THREAD_run_once(0x7f2e20f18964, 0x7f2e20e822e9, 0x7f2e20ce8d08, 0x7601 <unfinished ...>
[pid 691834] 1680200962.081128 libssl.so.3->CRYPTO_THREAD_run_once(0x7f2e20f18958, 0x7f2e20e7c779, 0x7ffdf5534d90, 0x7601 <unfinished ...>
[pid 691834] 1680200962.081212 libssl.so.3->COMP_zlib(0x7ffdf5534ce8, 0x7f2e32d9a100, 0x7ffdf5534cd0, 0x7601) = 0x7f2e20ce5c80
[pid 691834] 1680200962.081337 libssl.so.3->OPENSSL_sk_new(0x7f2e20e7c755, 0x7f2e32d9a100, 0x7ffdf5534cd0, 0x7601) = 0x1f148a0
[pid 691834] 1680200962.081439 libssl.so.3->COMP_get_type(0x7f2e20ce5c80, 0, 0x7f2e20e7c755, 6) = 0
[pid 691834] 1680200962.081550 <... CRYPTO_THREAD_run_once resumed> ) = 1
[pid 691834] 1680200962.081592 libssl.so.3->OPENSSL_atexit(0x7f2e20e82365, 0x7f2e20f185e0, 8, 2) = 1
$ cat result.err/build.log
Mock Version: 3.4
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target x86_64 --nodeps /builddir/build/SPECS/bowtie.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f70ababb690>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.guk7ajsi:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/de
$ ls exampleFiles
.gitkeep MW539688.1.fasta NC_016067.1.fasta test.fa
ilDeiPorc1.reads.fa MW539688.1.gb NC_016067.1.gb
$ time docker run --rm -w /data/ -v /home/jaruga/tmp/mitohifi/exampleFiles/:/data/ -t docker.io/biocontainers/mitohifi:2.2_cv1 mitohifi.py -c /data/test.fa -f /data/NC_016067.1.fasta -g /data/NC_016067.1.gb -t 4 -o 2
2022-10-25 20:00:44 [INFO] Welcome to MitoHifi v2. Starting pipeline...
2022-10-25 20:00:44 [INFO] Length of related mitogenome is: 15659 bp
2022-10-25 20:00:44 [INFO] Number of genes on related mitogenome: 37
2022-10-25 20:00:44 [INFO] Running MitoHifi pipeline in contigs mode...
2022-10-25 20:00:44 [INFO] 1. Fixing potentially conflicting FASTA headers
$ wc -l ilDeiPorc1.reads.*
244682 ilDeiPorc1.reads.fa
20045 ilDeiPorc1.reads.small.fa
264727 total
$ time docker run --rm -w /data/ -v /home/jaruga/tmp/mitohifi/exampleFiles/:/data/ -t docker.io/biocontainers/mitohifi:2.2_cv1 mitohifi.py -r /data/ilDeiPorc1.reads.small.fa -f /data/MW539688.1.fasta -g /data/MW539688.1.gb -t 4 -o 2 /data/ -v /home/jaruga/tmp/mitohifi/exampleFiles/:/data/ -t docker.io/biocontainers/mitohifi:2.2_cv1 mitohifi.py -r /data/ilDeiPorc1.reads.small.fa -f /data/MW539688.1.fasta -g /dat2022-10-25 16:33:56 [INFO] Welcome to MitoHifi v2. Starting pipeline...
2022-10-25 16:33:56 [INFO] Length of related mitogenome is: 15354 bp
2022-10-25 16:33:56 [INFO] Number of genes on related mitogenome: 37
2022-10-25 16:33:56 [INFO] Running MitoHifi pipeline in reads mode...
2022-10-25 16:33:56 [INFO] 1. First we map your Pacbio HiFi reads to the close-related mitogenome
$ pwd
/home/jaruga/tmp/mitohifi
$ ls -lh exampleFiles
total 39M
-rw-r--r--. 1 jaruga jaruga 1 Oct 11 17:17 .gitkeep
-rw-r--r--. 1 jaruga jaruga 15M Oct 11 17:17 ilDeiPorc1.reads.fa
-rw-r--r--. 1 jaruga jaruga 16K Oct 11 17:17 MW539688.1.fasta
-rw-r--r--. 1 jaruga jaruga 33K Oct 11 17:17 MW539688.1.gb
-rw-r--r--. 1 jaruga jaruga 16K Oct 11 17:17 NC_016067.1.fasta
@junaruga
junaruga / test.sh
Created September 26, 2022 15:44
Check the compatibily of the variables in redhat-rpm-config macros
#!/bin/bash
set -eu
rpm -q redhat-rpm-config
var_names="
_general_options
__global_compiler_flags
optflags