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
import sendgrid | |
from sendgrid.helpers.mail import * | |
import os | |
import asyncio | |
sg = sendgrid.SendGridAPIClient( | |
apikey=os.getenv("SENDGRID_API_KEY") | |
) |
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 | |
set -e | |
latest_release_tag() { | |
curl -s https://api.github.com/repos/arunvelsriram/docker-time-sync-agent/releases/latest \ | |
| python -c "import sys, json; print(json.load(sys.stdin)['tag_name'])" | |
} | |
echo_me() { | |
echo |
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
''' | |
Pseudo-code example of sending an attachment via SendGrid's API lib. This assumes that | |
you're using one of our coding libraries with helper methods (though this is more or less a Python library example) | |
''' | |
import sendgrid | |
from sendgrid.helpers.mail import * | |
import datetime | |
import base64 | |
mail = Mail() |
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
import timeit | |
import matplotlib | |
from matplotlib import pyplot as plt | |
comp_setup = '''def comp_time(num): | |
return [i**2 for i in range(num)] | |
''' | |
loop_setup = '''def loop_time(num): | |
res = [] | |
for i in range(num): |