Skip to content

Instantly share code, notes, and snippets.

View arrufat's full-sized avatar

Adrià Arrufat arrufat

View GitHub Profile
from sys import argv, exit
import json
if len(argv) < 2:
exit()
with open("out.jsonl", "w") as out:
for arg in argv[1:]:
print(arg)
with open(arg, "r") as jsonl:
@arrufat
arrufat / valgrind.log
Created September 25, 2021 16:08
valgrind barlow twins log
==237901== Memcheck, a memory error detector
==237901== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==237901== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==237901== Command: build/dnn_self_supervised_learning_ex data/cifar/cifar-10-binary/cifar-10-batches-bin/
==237901==
loaded CIFAR-10 training images: 50000
1: 164.563
2: 153.736
@arrufat
arrufat / convert_dataset.cpp
Created July 10, 2021 15:23
convert imagelab dataset
#include <dlib/cmd_line_parser.h>
#include <dlib/data_io.h>
#include <dlib/image_io.h>
auto main(const int argc, const char** argv) -> int
try
{
dlib::command_line_parser parser;
parser.add_option("dataset", "path to the dataset XML file", 1);
parser.add_option("workers", "number of threads (default: 8)", 1);
hook -group tilix-hooks global KakBegin .* %sh{
if [ -n "$TILIX_ID" ] && [ -z "$TMUX" ]; then
echo "require-module tilix"
fi
}
provide-module tilix %{
declare-option -docstring %{window type that tilix creates on new and repl calls (window|session|right|down|quake)} str tilix_window_type session
@arrufat
arrufat / kak-lsp-ccls.log
Last active January 20, 2020 06:47
kak-lsp ccls error
Jan 20 15:46:35.303 INFO Starting main event loop, module: kak_lsp::session:29
Jan 20 15:46:36.365 DEBG From editor:
session = "377381"
client = "client0"
buffile = "/tmp/test/main.cpp"
filetype = "cpp"
version = 242
method = "textDocument/signatureHelp"
[params.position]
line = 13
@arrufat
arrufat / dcgan_ex.cpp
Created July 24, 2019 08:40
DCGAN WIP
#include <algorithm>
#include <iostream>
#include <dlib/data_io.h>
#include <dlib/dnn.h>
#include <dlib/gui_widgets.h>
#include <dlib/matrix.h>
using namespace std;
using namespace dlib;