Skip to content

Instantly share code, notes, and snippets.

View siscia's full-sized avatar

Simone Mosciatti siscia

View GitHub Profile
<configurations xmlns="http://mpower.necst.it/marc/configuration.xsd">
<job>
<name>HadoopAnalysis</name>
<owner>simone</owner>
</job>
<computation-unit>simone0020</computation-unit>
<dataset>custom_marc</dataset>
<phases>
<phase0>
<mappings>
<configurations xmlns="http://mpower.necst.it/marc/configuration.xsd">
<job>
<name>HadoopAnalysis</name>
<owner>Simone</owner>
</job>
<computation-unit>simone0001</computation-unit>
<dataset>marc_input.csv</dataset>
<phases>
<phase0>
<mappings>
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
;;(require 'auto-complete-config)
;;(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
@siscia
siscia / NumerinoBenchMark.lua
Created January 14, 2016 17:40
Numerino Bench Mark for wrk
cjson = require('cjson')
request_table = {}
priorities = {
{"1","2","3","4","5"},
{"1","2","3"},
{"critical", "urgent", "high", "medium", "low"},
{"high", "medium", "low"}
}
simo@simo:~/numerino$ iex -S mix
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]
Interactive Elixir (1.1.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> {:ok, conn} = :esqlite3.open('testGabri.sqlite')
{:ok, {:connection, #Reference<0.0.7.160>, ""}}
iex(2)> :esqlite3.exec('CREATE TABLE simple (message TEXT)', conn)
:ok
iex(3)> :esqlite3.exec('INSERT INTO simple (message) VALUES (\"test\")', conn)
:ok
defmodule Numerino.Supervisor do
use Supervisor
def start_link(_) do
{:ok, sup} = Supervisor.start_link(__MODULE__, [], name: :supervisor) end
def init(_) do
processes = [
worker(Numerino.QueueAddress, []),
#worker(Numerino.Restarted, []),
/mozjs-31.2.0/js/src/build_DBG.OBJ/dist/include/jspubtd.h:432:74: warning: invalid access to non-static data member ‘js::PerThreadDataFriendFields::RuntimeDummy::mainThread’ of NULL object [-Winvalid-offsetof]
static const size_t RuntimeMainThreadOffset = offsetof(RuntimeDummy, mainThread);
^
/mozjs-31.2.0/js/src/build_DBG.OBJ/dist/include/jspubtd.h:432:74: warning: (perhaps the ‘offsetof’ macro was used incorrectly) [-Winvalid-offsetof]
test3.cpp: In function ‘int main(int, const char**)’:
test3.cpp:77:82: error: no matching function for call to ‘JS::CompileOptions::originPrincipals(JSContext*&)’
script = JS_DecodeScript(cx, loadBuffer, saveLength, options.originPrincipals(cx));
^
test3.cpp:77:82: note: candidate is:
In file included from test3.cpp:2:0:
#include "jsapi.h"
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace JS;
// The class of the global object.
static JSClass globalClass = {
@siscia
siscia / test.cpp
Created June 6, 2015 13:42
Try to embed MonkeyScript
#include "jsapi.h"
#include <stdio.h>
using namespace JS;
// The class of the global object.
static JSClass globalClass = {
"global",
JSCLASS_GLOBAL_FLAGS,
JS_PropertyStub,
#include "jsapi.h"
#include <stdio.h>
using namespace JS;
// The class of the global object.
static JSClass globalClass = {
"global",
JSCLASS_GLOBAL_FLAGS,
JS_PropertyStub,