Skip to content

Instantly share code, notes, and snippets.

////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016 Aalekh Nigam
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////
// Sample Implementation of Map/Reduce over hpx.
#include <hpx/hpx.hpp>
@AALEKH
AALEKH / run.cpp
Created May 5, 2016 20:33
A minimalistic Map/Reduce Example
#include "iostream"
#include <set>
#include "vector"
#include "string"
#include <boost/algorithm/string.hpp>
#include "map"
#include <sstream>
using namespace std;
@AALEKH
AALEKH / structure.json
Last active May 7, 2016 13:02
Structure for potential resql plugin
{
"type" : "create",
"database-name" : "database",
"table-name" : "table",
"value" : "column-name", //This is key to retrieve
"key" : "key-name",
"key_value" : "compare_key_name"
}
#include <iostream>
#include <iterator>
#include <regex>
#include <queue>
#include <thread>
#include <assert.h>
#include <string.h>
#include "cpp-hiredis-cluster/include/hirediscommand.h"
@AALEKH
AALEKH / gist:3c143c12739c7379dcfc
Created March 6, 2016 21:02
Client to use in velocystream testing
#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
#include <velocypack/vpack.h>
#define PORT_NO 3033
#define BUFFER_SIZE 1024
using namespace arangodb::velocypack;
@AALEKH
AALEKH / Builder.cpp
Created February 28, 2016 08:26
Serialize and Deserialize and removing endianess issue using velocypack
#include <velocypack/vpack.h>
#include <iostream>
using namespace arangodb::velocypack;
using namespace std;
struct vparser{
int a;
string c;
};
#include <stdio.h>
#include <map>
#include <string>
#include "iostream"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/socket.h>
@AALEKH
AALEKH / p_queue_2.cpp
Created February 21, 2016 07:53
Priority Queue 2
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
class Boxer{
public:
int a;
int b;
};
struct Comp{
@AALEKH
AALEKH / p_queue.cpp
Created February 21, 2016 07:42
Priority Queue
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
class Boxer{
public:
string name;
int strength;
};
struct Comp{
@AALEKH
AALEKH / run.cpp
Created February 19, 2016 07:52
Simplest VelocyPack Example -- Builder
#include <iostream>
#include <string>
#include "velocypack/vpack.h"
#include <stdbool.h>
using namespace arangodb::velocypack;
using namespace std;
int main() {