Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <fcntl.h>
#include <unistd.h>
#include <cstring>
#include <memory>
using namespace std;
int main(int argc, char* argv[]) {
@ael-code
ael-code / test_all.sh
Last active December 14, 2017 18:38 — forked from anonymous/test_all.sh
Libreant installation test script based on docker containers
#! /bin/bash
DIR=$(dirname "$(readlink -f "$0")")
LIBREANT_SRC=$(readlink -f ${DIR}/..)
CURL_RETRY_DELAY=3 # seconds
CURL_RETRIES=30 # seconds
DEBIAN="debian-stable"
UBUNTU="ubuntu-lts"
@ael-code
ael-code / rootsim_run.sh
Last active September 26, 2017 10:09
roortsim_run
#!/bin/bash
export RS_BUILD_DIR=/tmp/rsbuild
#export RS_BUILD_DIR=/nfs/site/home/macabral/devel/tmp/ROOT-Sim-install
echo "####### CONFIGURING #######"
echo "RS_BUILD_DIR=${RS_BUILD_DIR}"
autoreconf -if
@ael-code
ael-code / data.txt
Last active February 16, 2017 15:27
rootsim report
****************************
* ROOT-Sim Configuration *
****************************
Cores: 16 available, 4 used
Number of Logical Processes: 64
Output Statistics Directory: ~/rootsim/outputs/rootsim_TA-0.3_CC-1000_4_4_64__2739546_stats
Scheduler: 0
MPI multithread support: no
GVT Time Period: 1.00 seconds
Checkpointing Type: 2
@ael-code
ael-code / parser.py
Created January 19, 2017 18:21
stupid parser
import re
NUM_REGEXP = "[0-9]+\.?[0-9]*"
def parse_data(input_file):
with open(input_file, 'r') as fb:
num = parse_single_number(fb)
matrix = parse_matrix(fb, cast=float)
fb.readline()
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for mpicc... mpicc
checking for gcc... (cached) mpicc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
import json
import string
import sys
import re, os
import logging
from archivant import Archivant
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("elasticsearch").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
@ael-code
ael-code / 00base.sh
Last active May 27, 2016 22:42 — forked from boyska/00base.sh
test libreant upgrade
#!/bin/bash
basedir=$(readlink -f $(dirname $0))
source "$basedir/config"
source "$basedir/lib-run.sh"
set -e
set -u
run /bin/bash do-base.sh
[Unit]
Description=VBox Virtual Machine %i Service
Requires=systemd-modules-load.service
After=systemd-modules-load.service
[Service]
User=username
Group=vboxusers
ExecStart=/usr/bin/VBoxHeadless -s %i
ExecStop=/usr/bin/VBoxManage controlvm %i savestate
[Unit]
Description=Libreant
Wants=network-online.target
After=network-online.target
[Service]
Environment="LIBREANT_SETTINGS=/etc/libreant/libreant.cfg"
User=root
Group=root
ExecStart=/opt/libreant/ve/bin/libreant