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
/** | |
* Binadable Class | |
*/ | |
#include <functional> | |
#include <boost/any.hpp> | |
#include <vector> | |
#include <iostream> | |
#include <memory> | |
#include <type_traits> | |
#include <typeinfo> |
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
# Emanuele Ruffaldi 2015 | |
# | |
# Touches JPG and MOV files using EXIF or MOV metadata, as happens when copied from iPhone | |
# or other device | |
# | |
# For JPG requires python myexif | |
# For MOV requires exiftool | |
# | |
# Last Updated: 2015/09/27 | |
# |
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 <mutex> | |
#include <condition_variable> | |
#include <functional> | |
#include <iostream> | |
#include <thread> | |
#include <chrono> | |
class OnceHard | |
{ | |
public: |
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 <map> | |
#include <unordered_map> | |
#include <iostream> | |
/// Used to iterate over the values of a map | |
template <class Mapclass> | |
struct map_keys | |
{ | |
using map_t = Mapclass; |
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
% quick and dirty file fixer for MATLAB Simulink Level 4 | |
% | |
% Limitations: only double, needs to support other types and complex data | |
% Limitations: cannot cut file when spurious, needs to append a dummy | |
% variable (dummy) | |
% | |
% Emanuele Ruffaldi | |
% | |
% See: http://it.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf | |
function fixlevel4(filename,dofix) |
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 <typeinfo> | |
#include <functional> | |
#include <iostream> | |
#include <map> | |
struct TypeSpec | |
{ | |
const char * name; // pure name | |
std::function<bool(std::ostream&,void*)> out; // conversion fx | |
const std::type_info & ti; // internal name (unique) |
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
/// 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 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
# OpenNI ONI fixer | |
# | |
# by Emanuele Ruffaldi PERCRO-SSSA 2013 | |
# | |
# USE AT YOUR OWN RISK - ALWAYS BACKUP THE FILE | |
# | |
# Possible future: | |
# - split/cut/extract | |
# - dump stats | |
# |
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
#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 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) | |
{ |
OlderNewer