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
docker pull rapidsai/staging:docker-raft-ann-bench-589-23.10a-cuda11.8-py3.9-amd64 | |
export DATA_FOLDER=/home/rapids/benchmarks | |
docker run --gpus all --rm -it \ | |
-v $DATA_FOLDER \ | |
rapidsai/staging:docker-raft-ann-bench-589-23.10a-cuda11.8-py3.9-amd64 \ | |
"--dataset sift-128-euclidean" \ | |
"--normalize" \ | |
"--algorithms raft_cagra" \ |
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
# Integers that describe their own digits | |
# Nathan Stephens | |
# 3/28/2023 | |
################### | |
# Background | |
################### | |
# We seek numbers whose digits describe how many digits are in that same number | |
# For example, consider 42,101,000, which has 8 digits. | |
# We index those digits 0-7, and consider how many of each index are in the number. |
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
# Palendromic numbers | |
x<-196 | |
i<-0 | |
# Add elements together | |
g<-function(v){ | |
v<-c(v%/%10,0)+c(0,v%%10) | |
if(v[1]==0) v[-1] else v | |
} |
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
# Palindromic Numbers | |
# Nathan Stephens | |
# 1/18/2023 | |
library(magrittr) | |
library(ggplot2) | |
# Reverse digits of an integer | |
f<-function(x){ x %>% | |
as.character %>% |
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
g <- function(){ | |
deck = rep(1:13, each=4) | |
deal <- sample(length(deck)) | |
p1 <- deck[deal[1:26]] | |
p2 <- deck[deal[27:52]] | |
hands <- 1 | |
wins <- matrix(NA, 0, 4) | |
while(length(p1) > 0 & length(p2) > 0){ | |
hands <- hands + 1 | |
wins <- rbind(wins, c(p1[1], p2[1], length(p1), length(p2))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Create docker network | |
sudo docker network create tritonnet | |
# Create shared volume for model_repository | |
sudo docker volume create volume1 | |
# Pull and run Triton container | |
sudo docker pull nvcr.io/nvidia/tritonserver:22.03-py3 | |
sudo docker run --gpus=all -d -p 8000:8000 -p 8001:8001 -p 8002:8002 --network=tritonnet \ | |
-v /var/lib/docker/volumes/volume1/_data/model_repository:/models \ |
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 | |
METADATA=$(curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document) | |
REGION=$(echo "$METADATA" | grep 'region' | cut -d : -f2 | awk -F\" '{print $2}') | |
ACCOUNTID=$(echo "$METADATA" | grep 'accountId' | cut -d : -f2 | awk -F\" '{print $2}') | |
METRICS=$(sqlite3 /var/lib/rstudio-server/rstudio.sqlite <<EOF | |
select \ | |
total(CASE WHEN locked=0 and last_sign_in >= datetime('now', '-1 days') then 1 else 0 end) as DAU0, | |
total(CASE WHEN locked=0 and last_sign_in >= datetime('now', '-7 days') then 1 else 0 end) as WAU0, |
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
# | |
# This is a Shiny web application. You can run the application by clicking | |
# the 'Run App' button above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
# Set the keyring backend to file and initialize the system keyring: |
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
library(keyring) | |
options("keyring_backend" = "file") # set this in .Rprofile for convenience | |
### Store secrets encrypted at rest | |
keyring_create("kr") | |
key_set("foobar", keyring = "kr") | |
key_get("foobar", keyring = "kr") | |
### Store multiple secrets |
NewerOlder