Attendees should do the following before the event to get the most out of it. There will be a 20 minute lecture-overview at the beginning. You can do the prerequisites during the overview if you have not done so by then.
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 re | |
import pprint | |
pp = pprint.PrettyPrinter(indent=2) | |
def Input(): | |
filename = './input.txt' | |
return open(filename) | |
lines = Input().read().split('\n') |
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
var wkx = require('wkx') | |
var pg = require('pg') | |
var pgUtil = require('pg/lib/utils') | |
const geoParser = { | |
init(knex){ | |
// 1. Convert postgis data coming out of the db into geoJSON | |
// Every postgres installation will have different oids for postgis geo types. | |
knex | |
.raw('SELECT oid, typname AS name FROM pg_type WHERE typname IN (\'geography\', \'geometry\');') |
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
const getInvite = fetch( | |
`${apiHost}/invite/?event=${event_id}&user=${userId}` | |
); | |
const getHost = fetch(`${apiHost}/user/${event.fields.host}/`); | |
Promise.all([getInvite, getHost, delayPromise(1000)()]) | |
.then(values => { | |
values.pop(); // drop delayPromise's return value (undefined) | |
return values.map(v => v.json()); | |
}) |
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 tensorflow as tf | |
from keras import backend as K | |
from tensorflow.python.saved_model import builder as saved_model_builder | |
from tensorflow.python.saved_model import tag_constants, signature_constants | |
from tensorflow.python.saved_model.signature_def_utils_impl import predict_signature_def | |
builder = saved_model_builder.SavedModelBuilder('vgg16_no_augmentation_export') | |
signature = predict_signature_def(inputs={'input': parallel_model.inputs[0]}, | |
outputs={'income': parallel_model.outputs[0]}) |
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
--------------------------------------------------------------------------- | |
MemoryError Traceback (most recent call last) | |
<ipython-input-22-567222df1eb0> in <module>() | |
----> 1 x_train = vectorize_sequences(train_data) | |
2 x_test = vectorize_sequences(test_data) | |
<ipython-input-21-5d7c33381575> in vectorize_sequences(sequences, dimension) | |
2 # are a 1 in the tensor, 0 otherwise | |
3 def vectorize_sequences(sequences, dimension=10000): | |
----> 4 results = np.zeros((len(sequences), dimension)) |
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
/Users/harrymoreno/.local/share/virtualenvs/litt-api-HgI9cQzm/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>. | |
""") | |
Traceback (most recent call last): | |
File "/Users/harrymoreno/.local/share/virtualenvs/litt-api-HgI9cQzm/lib/python3.6/site-packages/django/db/backends/utils.py", line 83, in _execute | |
return self.cursor.execute(sql) | |
psycopg2.ProgrammingError: permission denied to create extension "postgis" | |
HINT: Must be superuser to create this extension. | |
The above exception was the direct cause of the following exception: |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
$ docker build -t gcr.io/foo/polls . | |
Sending build context to Docker daemon 1.12MB | |
Step 1/7 : FROM gcr.io/google_appengine/python | |
latest: Pulling from google_appengine/python | |
1d47b358304c: Pull complete | |
c6cf9be4ad08: Pull complete | |
3c2cba919283: Pull complete | |
b5267a7c948d: Pull complete | |
327bc3d676fa: Pull complete | |
7084178c9da9: Pull complete |