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
#!/usr/bin/env python3 | |
import argparse | |
import re | |
import sys | |
from contextlib import ExitStack | |
from pathlib import Path | |
from subprocess import run, PIPE | |
from typing import Set, Tuple |
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 java.nio.file.Files | |
import java.nio.file.Paths | |
import java.nio.file.Path | |
class BuildRust extends DefaultTask { | |
String variant | |
static String OUT_LIB_NAME = "libhello.so" | |
enum TargetType { | |
ARM64("arm64", "aarch64-linux-android", "arm64-v8a"), |
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
// To Compile: g++ -O3 -std=c++17 -I${RAPIDJSON_INCLUDE} rapidjson-ostream-wrapper-benchmark.cpp -lbenchmark | |
#include <sstream> | |
#include <cstdlib> | |
#include <memory> | |
#include <random> | |
#include <string> | |
#include <string_view> |
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
function(preinclude_header headers) | |
foreach(header ${ARGV}) | |
message(STATUS "header: ${header}") | |
if(MSVC) | |
add_definitions(/FI${header}) | |
else() | |
add_definitions(-include ${header}) | |
endif() | |
endforeach(header) | |
endfunction() |
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
To give gist a name. |
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 "CsvReader.h" | |
#include <stdexcept> | |
using namespace std; | |
CsvReader::CsvReader(const char *filePath, size_t bufSize) : | |
mBufSize(bufSize), | |
mBuf(new char[bufSize]) { | |
mFile = fopen(filePath, "rt"); |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import asyncio | |
import signal | |
def my_handler(): | |
print('Stopping') | |
for task in asyncio.Task.all_tasks(): | |
task.cancel() |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import asyncio | |
import signal | |
def my_handler(): | |
print('Stopping') | |
for task in asyncio.Task.all_tasks(): | |
task.cancel() |
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 <sigslot/sigslot.h> | |
#include <functional> | |
template <class arg1, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY> | |
class Slot1 : public sigslot::has_slots<mt_policy> { | |
public: | |
template<class Functor> | |
Slot1(const Functor &fun) : mFun(fun) {} | |
Slot1(std::function<void(arg1)> &&fun) : mFun(fun) {} |
NewerOlder