This file contains hidden or 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
#!/bin/python | |
# -*- coding: utf-8 -*- | |
# from pylab import * # Might be required by the loading script | |
from numpy import array, sqrt, diag, concatenate, mean, size, ndarray, iscomplex | |
from scipy.optimize import leastsq | |
This file contains hidden or 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
% Multiples citations avec commentaires séparées par des ; | |
% Utilisation: Mettres les réfs à la suite entre {<refkey>} et mettre un [<commentaire>] avant celles dont on veut un commentaire | |
% Exemple, la commande | |
% \cites[p.1]{ref1}{ref2}[chap.3]{ref3} | |
% donnera quelquechose du style: | |
% [<label1>, p.1 ; <label2> ; <label3>, chap.3] | |
\usepackage{xspace} | |
\makeatletter | |
\newcommand{\citecomment}[2][]{\citen{#2}#1\citevar} |
This file contains hidden or 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
\usepackage{xstring} | |
% Parenthèses communes via commandes avec taille ajustable en argument optionnel | |
% La taille par défaut est automatique | |
% | |
% Tester ainsi: | |
% \p{123} | |
% \p[]{123} | |
% \p[big]{123} | |
% \pc[Big]{123} |
This file contains hidden or 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
# SimpleHTTPAuthServer installed via: | |
# pip install git+git://github.com/tianhuil/SimpleHTTPAuthServer.git@master | |
function SpawnSimpleHttpAuthServer() | |
{ | |
name="${1:-username}-$(< /dev/urandom tr -dc A-Z-a-z-0-9 | head -c${2:-4};echo;)" | |
pass=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${3:-32};echo;) | |
echo "Username is: $name" | |
echo "Password is: $pass" | |
python -m SimpleHTTPAuthServer --https ${4:-8000} $name:$pass | |
} |
This file contains hidden or 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
const int GUILAY = 1; | |
typedef struct { | |
bool layer_toggle; | |
bool sticky; | |
} td_ta_state_t; | |
static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { | |
td_ta_state_t *td_ta = (td_ta_state_t *) user_data; |
This file contains hidden or 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
filename=article | |
.PHONY: all first last bibtex ps pdf clean readdvi readps readpdf | |
MK = latex | |
BK = bibtex | |
PS = dvips | |
PDF = dvipdf | |
RM = rm | |
JOURNAL = arXiv |
This file contains hidden or 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 os | |
from numpy import savez_compressed, load | |
def functionCache(fn, fct, *args, **kwargs): | |
""" | |
force_recalc = True -> self-descriptive | |
""" | |
force_recalc = kwargs.pop('force_recalc', False) | |
if os.path.isfile(fn) and not force_recalc: |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import zlib | |
import ctypes | |
import subprocess | |
DESCRIPTION = 'Protect files in directories recursively with par2.' |
NewerOlder