For a system-wide installation for a package named PACKAGE
export PATH=$PATH:/usr/local/PACKAGE/bin
| from termcolor import colored | |
| def print_bold(text): | |
| """Prints text in bold | |
| Parameters | |
| ---------- | |
| text : str | |
| text to print in bold | 
| def vig(odds_arr): | |
| """Calculate vig based on odds offered | |
| Parameters | |
| ---------- | |
| odds_arr : list | |
| Odds being offered by a sportsbook | |
| Returns | |
| ------- | |
| float | |
| Vig collected by the sportsbook | 
For a system-wide installation for a package named PACKAGE
export PATH=$PATH:/usr/local/PACKAGE/bin
Run the command
http-server C:\path\to\directory
from the terminal. Copy and paste http://localhost:8080/index.html in your browser
| def check_mps_availability(): | |
| import torch | |
| # Note: Your Mac must have an M1 Chip and have installed MacOS 12.1+ | |
| if torch.backends.mps.is_available(): | |
| mps_device = torch.device("mps") | |
| x = torch.ones(20, device=mps_device) | |
| print(x) | |
| print(torch.backends.mps.is_built()) | |
| else: | |
| print("mps not avail") | 
This gist will walk you through getting a GitHub repo cloned in an EC2 instance for MacOS or Linux. The below steps assumes you have an EC2 instance launched. If you do not, follow the AWS docs here.
Follow the steps outlined under Generating a new SSH key. Once complete, return here.
Copy the public key from the file you just saved your newly generated public key to the clipboard by pasting the below in terminal. The default name would be id_ed25519.pub which we assume throughout the rest of the guide. If you saved the public key to a different file name during generation of the new SSH key, substitute that file name in for id_ed25519.pub.