Skip to content

Instantly share code, notes, and snippets.

View yjhjstz's full-sized avatar
🏠
Working from home

Jianghua.yjh yjhjstz

🏠
Working from home
View GitHub Profile
@yjhjstz
yjhjstz / C++ Predict with caffe
Created April 20, 2018 08:10 — forked from onauparc/C++ Predict with caffe
sample code for caffe C++ prediction
#include <cuda_runtime.h>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <string>
#include <iostream>
#include <stdio.h>
#include "caffe/caffe.hpp"
@yjhjstz
yjhjstz / gist:7b501d4b2327a01ec24c8c977b32dd10
Created July 11, 2018 07:29 — forked from vreid/gist:c5caedb9049fc6a4faa6
boost::interprocess::managed_mapped_file + boost::multi_index::multi_index_containe
#include <iostream>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/range/iterator_range.hpp>
@yjhjstz
yjhjstz / fluent_logging_glog.cpp
Created June 27, 2018 00:38 — forked from eiichiroi/fluent_logging_glog.cpp
Fluent Logger for glog
#include <iostream>
#include <sstream>
#include <string>
#include <ctime>
#include <glog/logging.h>
#include <msgpack.hpp>
#include <pficommon/text/json.h>
#include <pficommon/network/socket.h>
@yjhjstz
yjhjstz / geogres-knn-benchmark
Created April 29, 2019 07:13 — forked from spolakh/geogres-knn-benchmark
This script imports geonames into postgres for the purposes of knn-spgist vs knn-gist benchmarking. Based on the script from geonames forums: http://forum.geonames.org/gforum/posts/list/15/926.page
#!/bin/bash
#===============================================================================
#
# FILE: getgeo.sh
#
# USAGE: ./getgeo.sh
#
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your
# database
#
@yjhjstz
yjhjstz / gdblive.sh
Created May 10, 2019 03:27
Gdblive script
#!/bin/sh
# Usage: gdblive [ arguments to grep output of ps ]
cd $HOME
# tee /dev/tty is for user to see the set of procs considered
if [ $# -eq 0 ]
then
PROCS=`ps auxww | \
@yjhjstz
yjhjstz / client.cpp
Last active December 29, 2021 14:05
asio benchmark
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include <memory>
#include <atomic>
#include <chrono>
#include <sys/resource.h>
using namespace boost::asio;
using namespace boost::asio::ip;
using namespace std::chrono;
using boost::system::error_code;