Skip to content

Instantly share code, notes, and snippets.

import logging
import time
from functools import wraps
logger = logging.getLogger(__name__)
# Misc logger setup so a debug log statement gets printed on stdout.
logger.setLevel("DEBUG")
handler = logging.StreamHandler()
package fr.tse.fise2.info4.lab11;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
package fr.tse.fise2.info4.lab11;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
/**
*
* Complete this class for question
git config --global http.proxy http://cache.univ-st-etienne.fr:3128
cd linux/tools/perf
make
cp perf /usr/bin
#include <iostream>
using namespace std;
const int NPAD = 15; // on my 64 bits system
struct l {
struct l *n;
long int pad[NPAD];
};
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@cgravier
cgravier / gist:8658389
Created January 27, 2014 22:11
Generates BSBM (http://wifo5-03.informatik.uni-mannheim.de/bizer/berlinsparqlbenchmark/) dataset of 100k, 200k, 500k, 1M, 5M, 10M, 25M, 50M triples in n-triples format.
#!/bin/bash
datasetssize=( 256 527 1369 2808 14212 28453 71431 143700 288114 )
for dim in "${datasetssize[@]}"
do
echo "Generating dataset for $dim products..."
java -cp .:lib/bsbm.jar:lib/jdom.jar:lib/log4j-1.2.12.jar:lib/ssj.jar -Xmx256M benchmark.generator.Generator -pc $dim -s nt -fn datasettmp
NB=`more datasettmp.nt | wc -l`
mv datasettmp.nt dataset_$NB.nt
echo "done."
done
Started by timer
Building in workspace /var/lib/jenkins/jobs/cook-chrome/workspace
Checkout:workspace / /var/lib/jenkins/jobs/cook-chrome/workspace - hudson.remoting.LocalChannel@399bb4a4
Using strategy: Default
Last Built Revision: Revision de1bebd34e9ee273edeec33dc40d3e44e7cde443 (origin/HEAD, origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen 2 remote branches
@cgravier
cgravier / gist:5494924
Created May 1, 2013 12:03
add this to your shell rc file and whenever you are in a subfolder of a git repo, you go back to the git project root directory. "gitroot" called outside a directory as no effect except printing to stdout that you are not currently in a git repo.
# @chgravier <christophe.gravier@telecom-st-etienne.fr>
function gitroot {
FROM=$( pwd )
LOOKFOR=".git"
GITPROJECT=0
while [ "$(pwd)" != "/" ]
do
if [ ! -e $LOOKFOR ];
then
PARENT=$(dirname $( pwd ))
Map<String, Object> contentSettings = new HashMap<String, Object>();
contentSettings.put("images", 2);
contentSettings.put("plugins", 2);
contentSettings.put("popups", 2);
contentSettings.put("audio", 2);
Map<String, Object> preferences = new HashMap<String, Object>();
preferences.put("profile.default_content_settings", contentSettings);