wut-web-dev cruft inputish outputish

master
ml server 2020-01-23 22:43:46 -07:00
parent 4806b13411
commit 796b101586
1 changed files with 21 additions and 5 deletions

View File

@ -12,6 +12,7 @@
"#\n",
"# GPLv3+\n",
"\n",
"import json\n",
"import os\n",
"import random\n",
"import tempfile\n",
@ -203,11 +204,17 @@
"outputs": [],
"source": [
"def wutObs(datObs):\n",
" if int(datObs) > minobsid and int(datObs) < maxobsid:\n",
" if int(datObs) > ( minobsid - 1 ) and int(datObs) < maxobsid:\n",
" print('Observation URL: https://network.satnogs.org/observations/{}'.format(datObs));\n",
" !cat /srv/satnogs/download/$datObs/$datObs\\.json | jq\n",
" #!cat /srv/satnogs/download/$datObs/$datObs\\.json | jq\n",
" obsjsonfile=('/srv/satnogs/download/' + format(datObs) + '/' + format(datObs) + '.json')\n",
" print('observation json file: ', obsjsonfile )\n",
" print('Files:')\n",
" !ls /srv/satnogs/download/$datObs"
" !ls /srv/satnogs/download/$datObs\n",
" with open(obsjsonfile) as json_data:\n",
" d = json.load(json_data)\n",
" print(d)\n",
" #display(Image(filename=rfile, width=100))"
]
},
{
@ -221,10 +228,19 @@
},
"outputs": [],
"source": [
"print('Enter an Observation ID above', minobsid, 'and below', maxobsid)\n",
"wutObs_slide = wg.IntText(value='0');\n",
"print('Enter an Observation ID between', minobsid, 'and', maxobsid)\n",
"wutObs_slide = wg.IntText(value='1292461');\n",
"wg.interact(wutObs, datObs=wutObs_slide);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#display(Image(filename=rfile, width=300))"
]
}
],
"metadata": {