Skip to content

Instantly share code, notes, and snippets.

View dotnwat's full-sized avatar

Noah Watkins dotnwat

View GitHub Profile
// clang++ -std=c++17 -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR \
// -DNO_CONCEPTS -O0 -gsplit-dwarf -Wall -Werror -Wno-unused-variable
// -Wno-unused-function -Wno-unused-lambda-capture -std=c++17 -U_FORTIFY_SOURCE
// -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr -std=gnu++17 \
// main.cc -o main
#include <string>
#include <vector>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <sstream>
#include <seastar/core/app-template.hh>
#include <seastar/core/sharded.hh>
#include "kvstore.smf.fb.h"
namespace po = boost::program_options;
int main(int args, char **argv)
{
const std::string prefix(ZLOG_ENTRY_KEY_PREFIX);
std::string start_after;
while (true) {
std::set<std::string> keys;
ret = ioctx_->omap_get_keys(oid, start_after, 1, &keys);
if (ret < 0) {
return ret;
}
@dotnwat
dotnwat / results.log
Created August 24, 2018 05:50
iwyu-ceph-aug18
Cycle in include-mapping:
"auth/cephx/CephxKeyServer.h" ->
"auth/cephx/CephxKeyServer.h"
/home/nwatkins/src/include-what-you-use/iwyu_include_picker.cc:843: Assertion failed: Cycle in include-mapping
Cycle in include-mapping:
<boost/preprocessor/iteration/detail/iter/reverse1.hpp> ->
<boost/preprocessor/iteration/detail/iter/forward1.hpp> ->
<boost/mpl/aux_/numeric_op.hpp> ->
<boost/mpl/aux_/numeric_op.hpp>
/home/nwatkins/src/include-what-you-use/iwyu_include_picker.cc:843: Assertion failed: Cycle in include-mapping
nwatkins@location-sampler:~/ucsc-transit$ cat sample.py
import time
import datetime
import requests
from google.cloud import bigquery
bigquery_client = bigquery.Client()
dataset = bigquery_client.dataset('locations')
table = dataset.table('samples')
table.reload()
while True:
@dotnwat
dotnwat / things.py
Last active October 18, 2017 17:05
import sys
import time
import uuid
from google.cloud import bigquery
TABLE = "locations.samples"
QUERY = "SELECT {} FROM {} LIMIT {}"
# runtime params
limit = int(sys.argv[1])
@dotnwat
dotnwat / Dockerfile.zlog
Created May 24, 2017 19:47
ZLog KVStore Dockerfile
FROM ubuntu:xenial
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/noahdesu/zlog.git /src
RUN cd /src && ./install-deps.sh
RUN cd /src && \
git submodule update --init --recursive && \
cmake . && \
make -j4 && \
#!/usr/bin/env python
import sys
import time
import requests
def _get_forks(url):
req = requests.get(url)
json = req.json()
next_url = req.links.get('next', None)
if next_url: next_url = next_url['url']
#!/bin/bash
set -e
# settings
ceph_version=jewel
# context
host=`hostname`
shorthost=`hostname --short`
//
// gcc -Wall -DGASNET_PAR -I/usr/include/ibv-conduit -pthread -o gasnet_test gasnet_test.c -lgasnet-ibv-par -libverbs
//
#include <gasnet.h>
#include <stdio.h>
#define GASNET_SAFE(fncall) do { \
int _retval; \
if ((_retval = fncall) != GASNET_OK) { \
fprintf(stderr, "ERROR calling: %s\n" \