Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Fine.

Hiroki KUMAZAKI kumagi

:octocat:
Fine.
View GitHub Profile
View lld cmake error
lld/build$ cmake -G Ninja ..
CMake Error at CMakeLists.txt:6 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
-- LLD version:
CMake Error at CMakeLists.txt:10 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
View evfd_sample.cpp
#include <stdio.h>
#include <pthread.h>
#include <sys/eventfd.h>
#include <unistd.h>
struct workset {
int tid_;
int efd_;
};
View fwriteで試した.c
#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;
@kumagi
kumagi / jubatus_cluster.py
Created Jul 5, 2016
出力を見てあれこれする
View jubatus_cluster.py
import subprocess
import sys
import os
import signal
import time
import re
class JubatusCluster(object):
def __init__(self):
self.procs = {}
@kumagi
kumagi / kenasaku_ouen.rb
Last active Mar 11, 2016
検索は応援になる
View kenasaku_ouen.rb
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"
View parallel_radix_sort.cpp
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);
View log4cxx_segv.cpp
#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)));
@kumagi
kumagi / main.cc
Created Jan 14, 2016
ベタ書きすまぬ
View main.cc
#include <algorithm>
#include <iostream>
#include <sstream>
#include <random>
#include "radix_sort.hpp"
#include <chrono>
@kumagi
kumagi / radix_sort.cpp
Last active Jan 14, 2016
速くならん
View radix_sort.cpp
//
// 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>
View wfstack.c
#define _GNU_SOURCE 1
#include <sched.h> // sched_setaffinity
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <assert.h>
#include <sys/time.h>