Skip to content

Instantly share code, notes, and snippets.

View pchampio's full-sized avatar
🎓

Pierre Champion pchampio

🎓
  • PhD in Anonymizing speech - INRIA
  • /usr/bin/nvim
View GitHub Profile
@pchampio
pchampio / commandt_score.c
Last active October 14, 2025 14:05
Modification of Commant-T scoring: Boosts scores for consecutive characters, after a delimiter or start-of-string, and gives extra emphasis to slashes in paths.
/**
* SPDX-FileCopyrightText: Copyright 2010-present Greg Hurrell
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "score.h"
// #define DEBUG_SCORING 1
#include <stddef.h>
import inspect
def my_decorator(compute="cpu"):
def wrapper(func):
def inside(hisself, egs, in_decorator=False, ask_compute="cpu"):
if not in_decorator:
return func(hisself, egs)
print("Before function call")
if ask_compute == compute:
#!/bin/bash
f_job=0 # failed job
pids=() # initialize pids
ngpu=1 # Sync all jobs
nvidia-smi >/dev/null 2>&1 || error_code=$?; if [[ "${error_code}" -eq 0 ]]; then ngpu=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l); fi
for suff in dev test; do
for dset in libri_${suff}_{enrolls,trials_f,trials_m} \
vctk_${suff}_{enrolls,trials_f_all,trials_m_all}; do
i_GPU=${#pids[@]}
(
" UTF-8
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8
set fileformat=unix
" key bindings for quickly moving between windows
" h left, l right, k up, j down
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l

Keybase proof

I hereby claim:

  • I am drakirus on github.

  • I am prrchampion (https://keybase.io/prrchampion) on keybase.

  • I have a public key ASCy9lyr56Ofpmc1SR1Vm3E7n4PPvEU21QPfpjV90MDx7Qo

@pchampio
pchampio / getopt.bash
Created January 22, 2017 23:07
Command Line Options: How To Parse In Bash Using “getopt”
#!/bin/bash
# option short :
# The option string f:gh::i: means that the are four options. f has a required
# argument, g has no argument, h has an optional argument and i has a required
# argument.
# option long :
AVATAR THE LAST AIRBENDER
Accel World
Akame ga Kill
Akatsuki no yona
Amagami SS ~ (720p) ~ [Requiem]
Amagami SS+ Pack Integral
Bokura wa Minna Kawaisou
Bungou Stray Dogs S01 VOSTFR HD [720p]
Charlotte
Code Geass
@pchampio
pchampio / jacoboni2pdf.py
Last active September 18, 2016 17:18
Ne pas passer 3 heures à récupérer les diapos de Jacoboni
# -*- coding: utf-8 -*-
import urllib
import urllib2
import cookielib
import re
import os
import sys
from time import sleep
#FIXME : Corriger l'erreur dans le nommage du dossier lors du téléchargement des diapos sur la POO (via les regexp)
@pchampio
pchampio / .vimrc
Last active May 7, 2016 20:32
Simple effective vimrc
" Leader Mappings
let mapleader = ","
set nocompatible
" Add bundles
call plug#begin('~/.vim/autoload')
" -------------------
" A Vim plugin which shows a git diff in the numberline
" -------------------
@pchampio
pchampio / makefile
Last active April 7, 2016 08:48
C makefile générique avec couleurs
cc = gcc
CFLAGS = -Wall
SRC= $(wildcard ./*.c)
OBJ= $(SRC:.c=.o)
EXE= $(SRC:.c=)
NO_COLOR=\033[0m