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 <stdio.h> | |
#include <pthread.h> | |
#include <sys/eventfd.h> | |
#include <unistd.h> | |
struct workset { | |
int tid_; | |
int efd_; | |
}; |
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 <stdio.h> | |
#include <stddef.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <sys/time.h> | |
#include <assert.h> | |
int main(void) { | |
size_t a = 2; | |
int b = 10; |
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
#ifndef MAP_HPP | |
#define MAP_HPP | |
//#include <cstdint> | |
#include <stdint.h> | |
#include <cstddef> | |
#include <map> | |
#include <functional> | |
#include <boost/functional/hash.hpp> | |
#include <memory> | |
#include <utility> |
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
import subprocess | |
import sys | |
import os | |
import signal | |
import time | |
import re | |
class JubatusCluster(object): | |
def __init__(self): | |
self.procs = {} |
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
from sys import path | |
from os.path import dirname | |
from time import time | |
path.append('../') | |
from ebf_client import HibariClient | |
begin = time() | |
client = HibariClient('localhost', 7580) | |
for i in range(100): | |
for i in range(10): |
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
void msd_first_parallel_radix_sort(const std::vector<uint64_t>::iterator& begin, | |
const std::vector<uint64_t>::iterator& end) { | |
const auto size = std::distance(begin, end); | |
const int nthreads = cpu_num(); // number of threads | |
constexpr size_t bytes = sizeof(uint64_t); | |
constexpr size_t nbuckets = 256; | |
constexpr int kOutBuff = 8; | |
std::vector<std::array<uint64_t, nbuckets> > offsets(nthreads); |
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
require 'selenium-webdriver' | |
class KensakuOuen | |
def initialize() | |
@driver = Selenium::WebDriver.for :firefox | |
end | |
def search(keyword) | |
begin | |
@driver.manage.delete_all_cookies | |
@driver.get "http://www.yahoo.co.jp" |
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 <string> | |
#include <iostream> | |
#include <log4cxx/logger.h> | |
#include <log4cxx/propertyconfigurator.h> | |
#include <log4cxx/helpers/exception.h> | |
#include <log4cxx/helpers/properties.h> | |
#include <assert.h> | |
log4cxx::LoggerPtr logger_ __attribute__((init_priority(10))); |
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
// | |
// Created by kumagi on 16/01/13. | |
// | |
#ifndef BETASORT_RADIX_SORT_HPP | |
#define BETASORT_RADIX_SORT_HPP | |
#define _GNU_SOURCE 1 | |
#include <sched.h> | |
#include <assert.h> |
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 <algorithm> | |
#include <iostream> | |
#include <sstream> | |
#include <random> | |
#include "radix_sort.hpp" | |
#include <chrono> | |