Skip to content

Instantly share code, notes, and snippets.

@veretennikovalexey
Created July 1, 2022 11:24
Show Gist options
  • Save veretennikovalexey/aaee9c4acd0dd9ad8d7e54f62e29f6cb to your computer and use it in GitHub Desktop.
Save veretennikovalexey/aaee9c4acd0dd9ad8d7e54f62e29f6cb to your computer and use it in GitHub Desktop.
iss.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "iss.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyPKfmLN74eVWDrSNTHfXubN",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/veretennikovalexey/aaee9c4acd0dd9ad8d7e54f62e29f6cb/iss.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "YFKA9t5cgFuu",
"outputId": "c682062c-754b-49c4-9214-9eaaa567ba94"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"200\n",
"b'{\"message\": \"success\", \"timestamp\": 1656674676, \"iss_position\": {\"latitude\": \"-38.1763\", \"longitude\": \"33.6777\"}}'\n"
]
}
],
"source": [
"import requests\n",
"issnow = \"http://api.open-notify.org/iss-now.json\"\n",
"response = requests.get( issnow )\n",
"status_code = response.status_code\n",
"print( status_code ) # 200\n",
"print( response.content )"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment