This file contains hidden or 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
/// Emanuele Ruffaldi | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
template <class VT, class IT> | |
class counter_class { | |
public: | |
using value_t = std::pair<int,VT>; |
This file contains hidden or 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
# Edit Header for C/C++ | |
# Scan Files and Verify license for C/C++ | |
# | |
# Emanuele Ruffaldi 2015-2016 | |
# | |
# Usage: | |
# - select files using a combination of find/grep e.g. | |
# find . | grep -v buildosx | grep -v buildwin | grep -E ".*\.(cpp|hpp|h)$" | |
# - verify used headers or per-file | |
# python editheader.py --filelist FILELIST --all --listlicenses |
This file contains hidden or 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
# | |
# Extract files from Bare git-annex repositories without git-annex | |
# Supports version v6 | |
# | |
# See internals: http://git-annex.branchable.com/internals/ | |
# | |
# Modified: added non-bare repos, added tar file (of symlinks) output for use with archivemount | |
# | |
# TODO: improve output | |
# TODO: use cat-files instead of archive |
This file contains hidden or 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
#Emanuele Ruffaldi 2016 Scuola Superiore Sant'Anna | |
import csv,os,sys | |
from pyexcel_xls import get_data,save_data | |
all = [] | |
#Year TopicId Topic Filename Titolo Rivista Codice identificativo SCOPUS valore SJR classe A classe B classe C classe D classe E IR in alto IR in basso | |
#4 + 3 + nclassi + | |
total = 4 + 3 + 5 + 2 +1 | |
key2pos = { | |
"Titolo Rivista": 4, |
This file contains hidden or 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
// Example program | |
#include <iostream> | |
#include <string> | |
/// boost splitter is too complex | |
class split_iterator | |
{ | |
public: | |
split_iterator(const std::string & ain, char ac): in(ain),c(ac),ip(0) | |
{ |
This file contains hidden or 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
#sudo pip install --upgrade git+https://github.com/dav1dde/glad.git#egg=glad | |
#python main.py --api gl=3.3 --generator=c --out-path=GL | |
find_package(CUDA) | |
find_package(GLFW) | |
include_directories(${GLFW_INCLUDE_DIRS}) | |
include_directories(GL/include) | |
cuda_add_executable(main main.c assert_cuda.c interop.c GL/src/glad.c kernel.cu) | |
target_link_libraries(main ${GLFW_LIBRARY}) |
This file contains hidden or 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 | |
function _xcdall() | |
{ | |
#enter below space separated your commands | |
eval "$1='pd1 xxx u14'" | |
} | |
function xcd() { | |
local arrIN sep before after what | |
what=$1 |
This file contains hidden or 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
( | |
list | |
(defun makefactor (n) | |
(define q dict) | |
(set! q.vars dict) | |
(set! q.uS dict) | |
(set! q.Jhg (gaussianc n)) | |
q | |
) | |
(define f1 (makefactor 2)) |
This file contains hidden or 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
#Emanuele Ruffaldi 2014-2016 | |
# | |
#TODO: add frontiersSCNS.cls frontiersinSCNS_ENG_HUMS.bst in replicable | |
#TODO: add logo1 | |
#TODO: don't merge | |
import os,sys,re,argparse | |
def checkpaths(f,paths): | |
if os.path.isfile(f): | |
return f |
This file contains hidden or 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 <memory> | |
#include <vector> | |
#include <iostream> | |
#include <list> | |
template <class T> | |
class VectorPool | |
{ | |
public: | |
~VectorPool() |