Skip to content

Instantly share code, notes, and snippets.

@clemsos
clemsos / citations2tex.py
Last active August 29, 2015 14:02
Convert scientific citations in plain text to Latex
#!/usr/bin/python
# convert citations into latex format
#
# (Nivre et al., 2007)
# (Sagae and Tsujii 2007)
# Nivre (2007)
# (Chen et al., 2007; Dredze et al., 2007).
#
# \cite{Nivre2007}
@clemsos
clemsos / odt_to_tex.sh
Created July 29, 2014 10:12
Couvert Word (.odt) files to Latex
#!/bin/bash
w2l -config ./w2l-config.xml chapitre-xxx.odt chapters/chapitre-xxx.tex
@clemsos
clemsos / run_tests.sh
Last active August 29, 2015 14:04
Bash script to run test with colored output using Python nosetest (all files or a single file)
#!/bin/bash
# USAGE :
#
# chmod +x run_tests.sh
# ./run_tests.sh # run all tests
# ./run_tests.sh xxx.py # run a single test
#
test_dir=`pwd`/tests
@clemsos
clemsos / multiple_pages_pdf_to_svg_inkscape.sh
Created September 4, 2014 14:49
PDF Multiple pages to clean SVG using Inkscape
#!/bin/bash
PDF_IN="LS58_Presentation_FR_EN.pdf"
BASENAME_OUT="junkware"
PAGE_START=2
PAGE_END=2
for ((i=$PAGE_START; i<=$PAGE_END; i++));
do
@clemsos
clemsos / index.html
Created September 25, 2015 12:01 — forked from anonymous/index.html
JS Bin // source https://jsbin.com/bedalu/1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
div {
width : 17px;
height: 19px;
color : white;
@clemsos
clemsos / _.md
Last active April 5, 2016 08:33
D3 simple color selector
@clemsos
clemsos / d3colorpicker.js
Last active April 5, 2016 09:14
D3 simple color selector
//data (pass your color
var c20 = d3.scale.category20c();
var colors = d3.range(20).map(function(i){ return c20(i) });
var selectedColor = "black";
var h = 100,
w = 400,
colorOpened = false,
paddingX = 10
radius = 10;
@clemsos
clemsos / .block
Created May 24, 2017 15:30
fresh block
license: mit
@clemsos
clemsos / .block
Last active May 24, 2017 15:50
test
license: mit
@clemsos
clemsos / index.html
Last active July 3, 2017 17:54
v0 Test Carto Univ
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.1/dist/leaflet.css" />
<style>
input[type=range] {
width: 100%