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 python | |
import argparse | |
import pandas as pd | |
TO_MS = { | |
" s" : 1000, | |
" ms" : 1, | |
" us" : 0.001, | |
" ns" : 0.000001, |
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
#!/bin/bash | |
DEB_URL=$(curl -s https://api.github.com/repos/BurntSushi/ripgrep/releases/latest | grep browser_download_url | grep deb | sed -e 's/.*": "//' -e 's/"//') | |
echo "Downloading latest ripgrep debian package: $DEB_URL" | |
curl -Lo ripgrep.deb $DEB_URL | |
sudo apt install -y ./ripgrep.deb | |
rm -f ripgrep.deb |
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 python | |
import argparse | |
import subprocess | |
def runcmd(cmd): | |
out = "CMD:\n" + cmd | |
out += "OUTPUT:\n" | |
try: |
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 python | |
import requests | |
import json | |
import os | |
import sys | |
import argparse | |
ENTRYPOINT = "https://api.github.com/graphql" |
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
// Compilation and running: | |
// g++ -std=c++11 covid-pooled-testing.cpp && ./a.out | |
#include <cstdio> | |
#include <stdint.h> | |
#include <cmath> | |
#include <cstdlib> | |
#include <algorithm> | |
/** |
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 python | |
import sys | |
import json | |
def getTimeInSecs(run): | |
unit = run["time_unit"] | |
if unit == "us": | |
return run["real_time"] * 1000000 | |
if unit == "ms": | |
return run["real_time"] * 1000 |
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
#!/bin/bash | |
if [ -z $Root ]; then | |
Root=$HOME | |
fi | |
if [ -z $CudaVersion ]; then | |
CudaVersion=10.1 | |
fi | |
CondaFile="Miniconda3-latest-Linux-x86_64.sh" |
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 python | |
import json | |
import sys | |
Width = 80 | |
HeaderDemarc = "%s" % ("*" * Width) | |
CellDemarc = "%s" % ("-" * (Width // 2)) | |
CellDemarc2 = CellDemarc * 2 | |
OutputDemarc = "%s" % ("." * Width) |
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
// Compiling and running this program: | |
// nvcc -std=c++11 cuda-runtime-api-perf.cu && ./a.out | |
#include <chrono> | |
#include <stdio.h> | |
#include <stdlib.h> | |
using namespace std; | |
#define __CUDA(call) \ | |
do { \ | |
cudaError_t status = call; \ |
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
// | |
// Compilation: g++ -std=c++11 -o a.exe sudoku-3x3.cpp | |
// Run: ./a.exe "7 1 8 19 5 812 5 372 7 4 652 3 938 5 14 2 5 7" | |
// In order to solve the following board: | |
// | |
// 7 0 1 0 0 0 0 0 8 | |
// 0 0 0 1 9 0 0 0 5 | |
// 0 0 0 0 0 8 1 2 0 | |
// | |
// 0 0 0 0 5 0 3 7 2 |
NewerOlder