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
#!/usr/bin/env bash | |
# ---------------------------- INSTALL NOTES ---------------------------- | |
# To properly setup the AWS CLI, make sure that this shell script is run with the two required positional args: | |
# $1 :: (string) AWS Access Key ID | |
# $2 :: (string) AWS Secret Key | |
# | |
# Also make sure to give the script permission to run!: | |
# chmod 755 /home/ec2-user/install.sh | |
# |
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
""" | |
Assuming our CSV file (employee_birthday.csv) has the contents of | |
name,department,birthday month | |
John Smith,Accounting,November | |
Erica Meyers,IT,March | |
""" | |
# Reading CSV Files with csv |
If you are on a Mac, substitute command
for control
. Don't type the + (it means press both keys at once).
-
Shift
+Enter
run selected cell or cells - if no cells below, insert a code cell below -
Ctrl
+B
toggle hide/show left sidebar -
Ctrl
+S
save and checkpoint -
Ctrl
+Shift
+S
save as
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 torch | |
from collections import Counter | |
from iou import intersection_over_union | |
def mean_average_precision( | |
pred_boxes, true_boxes, iou_threshold=0.5, box_format="midpoint", num_classes=20 | |
): | |
""" | |
Calculates mean average precision |
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 requests | |
import time | |
import os | |
import sys | |
import openai | |
import tiktoken | |
from termcolor import colored | |
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip() |
OlderNewer