Skip to content

Instantly share code, notes, and snippets.

View tgamauf's full-sized avatar

Thomas Gamauf tgamauf

View GitHub Profile
3.6.8 is not installed; attempting download
Downloading archive: https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/16.04/x86_64/python-3.6.8.tar.bz2
0.57s$ curl -sSf -o python-3.6.8.tar.bz2 ${archive_url}
12.30s$ sudo tar xjf python-3.6.8.tar.bz2 --directory /
ssh_key
Installing SSH key from: default repository key
Key fingerprint: 5f:a6:70:60:44:83:4a:db:a7:5c:ed:95:c6:31:c1:06
Using /home/travis/.netrc to clone repository.
git.checkout
1.41s$ git clone --depth=50 https://github.com/mostly-ai/mostly-engine.git mostly-ai/mostly-engine
Setting environment variables from .travis.yml
$ export TESTFOLDER=tests/end_to_end
0.01s$ source ~/virtualenv/python3.6.8/bin/activate
$ python --version
Python 3.6.8
$ pip --version
pip 18.1 from /home/travis/virtualenv/python3.6.8/lib/python3.6/site-packages/pip (python 3.6)
before_install.1
2.41s$ sudo -H apt-get update
Hit:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
travis@travis-job-d41614e3-2c9f-46d4-8d17-620bfc4bee5a:~/build/mostly-ai/mostly-engine$ travis_run_before_install
$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Reading package lists... Done
$ sudo apt-get install -y openjdk-8-jre-headless
Reading package lists... Done
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tgamauf
tgamauf / write_tfrecord_with_example.ipynb
Last active October 28, 2019 17:51
Write movie ratings to TFRecord file, then read it back
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tgamauf
tgamauf / tf_tfrecordwriter.py
Last active March 4, 2018 12:20
Use of tf.python_io.TFRecordWriter
# "example" is of type tf.train.Example.
with tf.python_io.TFRecordWriter('movie_ratings.tfrecord') as writer:
writer.write(example.SerializeToString())
@tgamauf
tgamauf / tf_sequenceexample.py
Last active March 17, 2018 19:00
Use of tf.train.SequenceExample
# We can also add context features (short form)
customer = tf.train.Features(feature={
'Age': tf.train.Feature(int64_list=tf.train.Int64List(value=[19])),
})
example = tf.train.SequenceExample(
context=customer,
feature_lists=movies)
@tgamauf
tgamauf / tf_featurelists.py
Last active March 17, 2018 18:59
Use of tf.train.FeatureLists
movies_dict = {
'Movie Names': movie_names,
'Movie Ratings': movie_ratings,
'Movie Actors': movie_actors
}
movies = tf.train.FeatureLists(feature_list=movies_dict)
@tgamauf
tgamauf / tf_featurelist.py
Last active March 17, 2018 18:59
Use of tf.train.FeatureList
movie_1_actors = tf.train.Feature(
bytes_list=tf.train.BytesList(
value=[b'Tim Robbins', b'Morgan Freeman']))
movie_2_actors = tf.train.Feature(
bytes_list=tf.train.BytesList(
value=[b'Brad Pitt', b'Edward Norton', b'Helena Bonham Carter']))
movie_actors_list = [movie_1_actors, movie_2_actors]
movie_actors = tf.train.FeatureList(feature=movie_actors_list)
# Short form
@tgamauf
tgamauf / tf_example.py
Last active March 17, 2018 18:55
Use of tf.train.Example
example = tf.train.Example(features=movies)