This file contains 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/bash | |
set -ex | |
wait_ready() { s="${s:-0.5}";t="${t:-800}";start=$(date +%s);until ("$@";);do | |
d=$(date +%s);dt=$((${d}-${start}));if [ ${dt} -gt ${t} ];then log " no more retries: $@";return 1;fi | |
if [ $(( ${dt} % ${CI_OPEN_MSG_DELAY:-240} )) -eq 0 ];then log " CI keeps open";fi | |
(cat /dev/zero|read -t ${s}||exit 0);done; } | |
t=300 wait_ready docker version | |
curl -fsSL https://get.docker.com > docker.sh | |
chmod +x docker.sh |
This file contains 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
--- | |
version: '3.6' | |
x-image: &image_template | |
image: "corpusops/debian" | |
environment: | |
- a=1 | |
command: > | |
sh -c 'if [ "x$DOCKER_SKIP_START" != x ]; | |
then while true;do echo sleeping;sleep 65535;done | |
else exec /app_entry_point; |
This file contains 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
for cipher in $(ssh -Q cipher) ; do | |
for i in 1 2 3 ; do | |
echo | |
echo "Cipher: $cipher (try $i)" | |
if dd if=/dev/zero bs=1M count=128 2>/tmp/dd.txt \ | |
| pv \ | |
| time -p ssh -c "$cipher" -F .vagrant/cops-sshconfig-corpusops* vagrant 'cat > /dev/null';then | |
grep -v records /tmp/dd.txt | |
break | |
fi |
This file contains 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
*.tar | |
docker/ | |
dtest/ | |
s/ | |
This file contains 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 subprocess | |
class ProcessError(IOError): | |
pass | |
def cmdrun(cli, | |
debug=False, | |
shell=True, |
This file contains 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
#include <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define CANARY "in_the_coal_mine" | |
struct { | |
char buffer[1024]; |
This file contains 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 | |
''' | |
calculate from 1 minion to NB_MINIONS the time | |
to parse the output states dictionnary results | |
python -m cProfile -o outfile.stat ./saltperf.py;pyprof2calltree -i outfile.stat -o outfile.pstat | |
''' | |
from __future__ import (absolute_import, division, |
This file contains 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
from collections import OrderedDict | |
import itertools | |
from random import shuffle, randint | |
import re | |
from sets import Set | |
def f1(seq): # Raymond Hettinger | |
# not order preserving | |
set = {} | |
map(set.__setitem__, seq, []) |
This file contains 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 bash | |
cd ecws || exit -1 | |
out=../out | |
warp() { | |
echo gdalwarp $WRAP_OPTS -s_srs EPSG:2154 -of "$1" "$2" "$3" | |
gdalwarp $WRAP_OPTS -s_srs EPSG:2154 -of "$1" "$2" "$3" | |
if [[ $? != 0 ]];then exit -1;fi | |
} | |
translate() { | |
echo gdal_translate $TRANSLATE_OPTS -of "$1" "$2" "$3" |
This file contains 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 -*- | |
__docformat__ = 'restructuredtext en' | |
import spynner | |
import os | |
import sys | |
class CSCCAuthenticationError(Exception):pass | |
timeout=60 |
NewerOlder