From Setting up IMAP for Amazon WorkMail:
Configuration | Value |
---|---|
Protocol | SMTPS (SMTP, encrypted with TLS) - not STARTTLS! |
Port | 465 |
Username | Amazon WorkMail account |
Password | Amazon WorkMail password |
def maximize_trades(prices, starting_cash=100_000, ticker="ABCD"): | |
cash = starting_cash | |
shares = 0 | |
log = [] | |
n = len(prices) | |
for day in range(n): | |
today = prices[day] | |
tomorrow = prices[day + 1] if day + 1 < n else None |
From Setting up IMAP for Amazon WorkMail:
Configuration | Value |
---|---|
Protocol | SMTPS (SMTP, encrypted with TLS) - not STARTTLS! |
Port | 465 |
Username | Amazon WorkMail account |
Password | Amazon WorkMail password |
#!/bin/bash | |
# https://gist.github.com/talarczykco/d4cfc9188a061f68880ee5b630a4aeb6 | |
# https://pve.proxmox.com/wiki/Cloud-Init_Support | |
set -ex | |
IMGURL=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img | |
IMGDIR=etc | |
IMGFILE=$(basename $IMGURL) |
# Created this after googling for: | |
# - python logging replace handler | |
# - python logging basicconfig not working | |
# - python logging getlogger | |
def get_logger(level='DEBUG'): | |
loghandler = logging.StreamHandler() | |
logfmt = logging.Formatter(fmt='%(asctime)s:%(name)s:%(levelname)s:%(message)s', | |
datefmt='%Y-%m-%d %H:%M:%S') | |
logger = logging.getLogger() # get root logger, not __name__ | |
loghandler.setFormatter(logfmt) |
This example uses istioctl
as the formula, but this may come in handy for kubernetes-cli
, kubernetes-helm
, etc.
istioctl
, and click on the link to GitHub:
brew info istioctl | grep Formula
...
in upper-right of next page, select "View File" from drop-down.From your iOS device, go to Photos, then:
If you use elasticsearch-curator on AWS (or possibly other hosted or self-hosted Elasticsearch installations that use SSL,) and you get this when curating:
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: Root certificates are missing for certificate validation. Either pass them in using the ca_certs parameter or install certifi to use it automatically.
Then make sure the client.use_ssl key is present and True. This is a non-obvious error that led me down a rathole of Googling. Don't bother specifying root certificates, or installing certifi (it's probably already installed, if you installed elasticsearch-curator with pip.)
---
# https://www.elastic.co/guide/en/elasticsearch/client/curator/current/configfile.html
client:
Create a new app password in Gmail for Postfix (Optional - this is required only if you have 2-Step Verification enabled.)
Edit /etc/postfix/sasl_passwd
with your username and app password:
smtp.gmail.com:587 yourname@gmail.com:CHANGEME