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 sys | |
if sys.version_info[0] == 3: | |
from io import StringIO | |
else: | |
from cStringIO import StringIO | |
def replace_entities(text, grouped_entities, **replacers): | |
entities = [] |
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 requests | |
import base64 | |
import json | |
import sys | |
def log(msg): | |
sys.stderr.write(msg) | |
sys.stderr.write('\n') | |
client_key= '' |
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
// compile with: gcc openmp.c -o openmp -std=c11 -O3 -Wall -fopenmp | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef int num; | |
int main(int argc, char *argv[]) { | |
int n = 20000; | |
int m = 20000; |
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 <iostream> | |
// --- | |
#include <array> | |
#include <utility> | |
template <typename T> | |
using c_array = T[]; |
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 <type_traits> | |
#include <tuple> | |
#include <functional> | |
template <typename FType> | |
struct function_traits; | |
template <typename RType, typename... ArgTypes> | |
struct function_traits<RType(ArgTypes...)> { | |
using arity = std::integral_constant<size_t, sizeof...(ArgTypes)>; |
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 <type_traits> | |
#include <utility> | |
#include <tuple> | |
#include "function_traits.cpp" | |
// --- | |
template <typename Args, typename Params> | |
struct apply_args; |
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
struct meow { | |
static int defaults; | |
static int copies; | |
static int moves; | |
static int destroys; | |
static void report() { | |
std::cout << "defaults: " << defaults << std::endl; | |
std::cout << "copies: " << copies << std::endl; | |
std::cout << "moves: " << moves << std::endl; |
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 <type_traits> | |
#include <utility> | |
#include <tuple> | |
#include "function_traits.cpp" | |
template <typename Func, typename Env, typename Params, typename FuncParams> | |
struct closure; | |
template <typename Func, typename... Env, typename HeadFuncParams, typename... FuncParams> |
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
<input type="file" /> | |
<script src="zip.js/zip.js"></script> | |
<script> | |
'use strict'; | |
zip.workerScriptsPath = 'zip.js/'; | |
function getZipEntries(file) { |