Created
July 1, 2022 11:24
-
-
Save veretennikovalexey/aaee9c4acd0dd9ad8d7e54f62e29f6cb to your computer and use it in GitHub Desktop.
iss.ipynb
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
{ | |
"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