This file contains hidden or 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
| [ | |
| { | |
| "coords": { | |
| "lat": "52.65", | |
| "lon": "90.083333333333" | |
| }, | |
| "district": "Сибирский", | |
| "name": "Абаза", | |
| "population": 12272, | |
| "subject": "Хакасия" |
This file contains hidden or 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
| { | |
| "categories_virtual_taxonomy": [ | |
| { | |
| "id": "163870668944785", | |
| "name": "Antiques and collectibles", | |
| "navigational_name": "Antiques and collectibles", | |
| "subtitle": null, | |
| "virtual_category_ordered_children": [ | |
| { | |
| "id": "207642374125592", |
This file contains hidden or 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
| import asyncio | |
| import socket | |
| def set_keepalive_linux(sock, after_idle_sec=1, interval_sec=3, max_fails=5): | |
| """Set TCP keepalive on an open socket. | |
| It activates after 1 second (after_idle_sec) of idleness, | |
| then sends a keepalive ping once every 3 seconds (interval_sec), | |
| and closes the connection after 5 failed ping (max_fails), or 15 seconds | |
| """ |