Content :
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 api_backends.conf; | |
include api_keys.conf; | |
limit_req_zone $binary_remote_addr zone=client_ip_10rs:1m rate=1r/s; | |
limit_req_zone $http_apikey zone=apikey_200rs:1m rate=200r/s; | |
server { | |
access_log /var/log/nginx/api_access.log main; # Each API may also log to a | |
# separate file |
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
# Method 1: Easiest and does not require any library | |
data(mtcars) | |
## 75% of the sample size | |
smp_size <- floor(0.75 * nrow(mtcars)) | |
## set the seed to make your partition reproducible | |
set.seed(123) | |
train_ind <- sample(seq_len(nrow(mtcars)), size = smp_size) |