Skip to content

Instantly share code, notes, and snippets.

@arigesher
Created October 19, 2016 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arigesher/74ce9d29c2de9f38359d1bb32b478e2a to your computer and use it in GitHub Desktop.
Save arigesher/74ce9d29c2de9f38359d1bb32b478e2a to your computer and use it in GitHub Desktop.
Loading vecnav data from sparklage keys
Display the source blob
Display the rendered blob
Raw
{
"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