Skip to content

Instantly share code, notes, and snippets.

@giraldeau
giraldeau / engine_config.hpp
Created May 6, 2016 16:49
Fix engine_config.hpp include for external program
diff --git a/include/engine/engine_config.hpp b/include/engine/engine_config.hpp
index eb62719..1696876 100644
--- a/include/engine/engine_config.hpp
+++ b/include/engine/engine_config.hpp
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ENGINE_CONFIG_HPP
#define ENGINE_CONFIG_HPP
-#include "storage/storage_config.hpp"
+#include "../storage/storage_config.hpp"
<h3 id="astarev_header"><a href="#">A* EV</a></h3>
<div id="astarev_section" class="finder_section">
<header class="option_header">
<h3>Heuristic</h3>
</header>
<div id="astarev_heuristic" class="sub_options">
<input type="radio" name="astar_heuristic" value="manhattan" checked />
<label class="option_label">Manhattan</label> <br>
<input type="radio" name="astar_heuristic" value="euclidean"/>
<label class="option_label">Euclidean</label> <br>
#!/bin/sh
EVS="sched_switch
sched_waking
sched_migrate_task
sched_process_free
sched_process_exit
sched_wait_task
sched_process_wait
sched_process_fork
#!/usr/bin/python3
'''
Created on Nov 1, 2016
Generate data with two random gaussian samples with a tag.
Basic code to test the tag recovery from the concatenated
and shuffled samples.
@author: francis
'''
<?php
for($i=0;$i<10000000;$i++)
{
apcu_store($i,"test");
apcu_fetch($i);
}
?>
#!/usr/bin/env python
import argparse
import os
t = "/sys/kernel/debug/tracing"
def write_to(base, name, data):
with open(os.path.join(base, name), "w") as f:
f.write(data)
#include <map>
#include <iostream>
#include <cstring>
#include <stdio.h>
using std::map;
using std::cout;
using std::cin;
using std::endl;
@giraldeau
giraldeau / fabfile.py
Created December 22, 2016 15:38
fabfile for computree svn repos
from fabric.api import local
import json
import os
from contextlib import contextmanager
@contextmanager
def cd(newdir):
prevdir = os.getcwd()
os.chdir(os.path.expanduser(newdir))
try:
@giraldeau
giraldeau / CMakeLists.txt
Created November 3, 2017 21:48
The missing example to use cmake qt5_create_translation
cmake_minimum_required(VERSION 3.8)
project(tsProject)
# Managing translations require LinguistTools module
# The cmake function is defined in the Qt installation tree:
# i.e. Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake
# Reference: https://doc.qt.io/qt-5/cmake-manual.html#qt5linguisttools-macros
find_package(Qt5 COMPONENTS Widgets LinguistTools)
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@giraldeau
giraldeau / main.cpp
Created July 24, 2019 20:32
Minimal example to understand for mass and laplace matrices
/*
* Minimal example to understand for mass and laplace matrices
*/
// The program starts with the usual include files, all of which you should
// have seen before by now:
#include <deal.II/base/utilities.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/function.h>
#include <deal.II/base/logstream.h>