This file contains hidden or 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
# Check for open appointments in the current month at Las Vegas DMV | |
# Currently, the script looks for appointments of type "Multiple Services - DL/Vehicle" | |
import datetime | |
import time | |
import boto3 | |
import requests | |
# List of Nevada DMV locations in the Las Vegas metro area | |
las_dmv = { # site_id, servicetype_id |
This file contains hidden or 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 pickle | |
import time | |
from argparse import ArgumentParser | |
import numpy as np | |
from cuml import ForestInference | |
from cuml.experimental import ForestInference as ForestInferenceNG | |
from hummingbird.ml import convert, load |
This file contains hidden or 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
// Solution for https://www.acmicpc.net/problem/1271 | |
#include <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <stdexcept> | |
#include <utility> | |
#include <sstream> |
This file contains hidden or 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 numpy as np | |
import treelite | |
import xgboost as xgb | |
from sklearn.datasets import make_classification | |
from cuml.experimental import ForestInference | |
X, y = make_classification( | |
n_samples=100, | |
n_features=5, |
This file contains hidden or 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 | |
sudo yum groupinstall -y "Development tools" | |
sudo yum install -y kernel-devel-$(uname -r) | |
aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ . | |
chmod +x NVIDIA-Linux-x86_64*.run | |
sudo CC=/usr/bin/gcc10-cc ./NVIDIA-Linux-x86_64*.run --silent | |
sudo amazon-linux-extras install docker | |
sudo systemctl --now enable docker |
This file contains hidden or 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 numpy as np | |
import scipy.optimize as opt | |
import xgboost as xgb | |
import time | |
import argparse | |
import sys | |
from sksurv.util import Surv | |
from sksurv.metrics import concordance_index_ipcw | |
from sklearn.model_selection import KFold | |
import optuna |
This file contains hidden or 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 xgboost as xgb | |
import numpy as np | |
from sklearn.model_selection import KFold | |
from sklearn.datasets import load_boston | |
nfold = 5 # number of cross-validation (CV) folds | |
nround = 10000 # number of boosting rounds | |
# Validation metric needs to improve at least once in every early_stopping_rounds rounds to | |
# continue training. | |
early_stopping_rounds = 100 |
This file contains hidden or 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
/** | |
* Benchmark script to measure round-trip serialization performance of Treelite using Protobuf. | |
* Author: Hyunsu Cho ([email protected]) | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <dlfcn.h> | |
#include <time.h> |
This file contains hidden or 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 <string> | |
class Foo { | |
public: | |
Foo() : bar("foobar") {} | |
std::string bar; | |
}; | |
extern "C" void CreateFoo(void** handle) { | |
*handle = static_cast<void*>(new Foo()); |
This file contains hidden or 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 | |
# Compile HDFS native library from source | |
cd | |
wget http://mirrors.advancedhosters.com/apache/hadoop/common/hadoop-3.1.1/hadoop-3.1.1-src.tar.gz | |
tar xvf hadoop-3.1.1-src.tar.gz | |
cd hadoop-3.1.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client | |
CC=gcc-8 CXX=g++-8 mvn compile -Pnative # Use Homebrew GCC | |
# Create HDFS home under the home directory |