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
# Script to compare matrix inversion speeds of base R, Matrix and torch packages | |
# Also shows double -vs- single precision torch speeds (see output.txt for results on M1 Mac) | |
library("Matrix") | |
library("torch") | |
base <- microbenchmark::microbenchmark( | |
b <- solve(a), | |
setup = { | |
a <- matrix(rnorm(1600*1600), 1600) |
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
--- | |
title: "" | |
format: html | |
--- | |
[https://fosstodon.org/@coolbutuseless/112329375557579427](https://fosstodon.org/@coolbutuseless/112329375557579427) | |
```{r} | |
# Quick script to do a simple test of uniform byte generator in package | |
# coolbutuseless/cryptorng which uses OS level cryptographic RNGs |
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/sh | |
PROXY_INTERFACE="Wi-Fi" | |
PROXY_HOST=127.0.0.1 | |
PROXY_PORT=1080 | |
# A host where ssh can login without interaction, with a key-based | |
# authentication. | |
SOCKS_PROC_USER="username" | |
SOCKS_PROC_HOST="example.com" |
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 | |
# 0. Ensure AWS CLI tool installed: pip install awscli | |
# 1. Make shell script executable: chmod u+x ec2-spot-prices.sh | |
# 2. Run script and provide instance type to check: ./ec2-spot-prices.sh c4.8xlarge | |
# 3. Script runs and outputs full stops while querying the Amazon API, | |
# returning three columns: Region+AZ, Instance Type, Current Spot Price in $ | |
allSpot="" | |
for Reg in eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 ca-central-1 us-east-1 us-east-2 us-west-1 us-west-2 sa-east-1 ap-southeast-1 ap-northeast-1 ap-east-1 ap-northeast-2 ap-southeast-2 ap-south-1 |