Instantly share code, notes, and snippets.
Created Oct 19, 2016
Loading vecnav data from sparklage keys
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"import boto3\n", | |
"import pickle\n", | |
"\n", | |
"Bucket='store.sparklage.kairos.ae'\n", | |
"Key='0000452fcbf07b5866465d370b81cb0c9b0912d4/vecnav'\n", | |
"s3 = boto3.client(\"s3\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 31, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"vecnav_data = s3.get_object(Bucket=Bucket, Key=Key)[\"Body\"].read()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'elevation': 800.50006103515625,\n", | |
" 'fraction': 0.28999999999999998,\n", | |
" 'lat': 31.227625366999998,\n", | |
" 'lon': -101.142014891,\n", | |
" 'quat1': array([ 0.0010261, -0.0145101, 0.6936559, 0.7201597]),\n", | |
" 'quat2': array([ 0.0008502, -0.0146836, 0.6935342, 0.7202736]),\n", | |
" 'theta': 87.858568959999999,\n", | |
" 'undulation': -25.134141176470578}" | |
] | |
}, | |
"execution_count": 32, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"pickle.loads(vecnav_data)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.1" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment