Create and initialize your a directory for your Express application.
$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
"""Download sentry data. | |
usage: | |
python download_sentry_data.py <org>/<project> <api_key> | |
""" | |
import requests | |
import csv | |
import sys | |
if __name__ == '__main__': |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.integrate import odeint | |
# Set random seed (for reproducibility) | |
np.random.seed(1000) | |
# Start and end time (in milliseconds) | |
tmin = 0.0 |
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
import simplejson as json | |
obj = None | |
with open('file.json') as f: | |
obj = json.load(f) | |
outfile = open('file.json', "w") | |
outfile.write(json.dumps(obj, indent=4, sort_keys=True)) | |
outfile.close() |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |