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
| from http.client import HTTPSConnection | |
| from ssl import create_default_context, CERT_NONE | |
| from email.utils import parsedate_to_datetime | |
| from time import sleep, clock_settime, CLOCK_REALTIME | |
| from contextlib import suppress | |
| from socket import gethostname | |
| HOSTS = [ | |
| ('time.overforge.com', {'user-agent': gethostname()}), | |
| ('223.5.5.5', {}), |
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
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| mQGNBGB1UiEBDADg0/zFosrkEyF4axR2DBiMCFFURVC200F0xO7Ho8CFX8DSxcIO | |
| Htp+zhhgWW5EKvkLeXg8e+5y6QDr0fp7Vb+ZGo4qVLTLxFSzb9mTkjypkpZY1AJZ | |
| 1cxORYloBwfPPhBJKCsWfVrWFSj+jP6B07uX7WmsD5/sikBjM+T7YG3/GfHugoLg | |
| 5tm00mwtVAW9xSTmTdmpTH8EjvLD3I4iR0mwhjkUHUaoycxjT2FZmOtQrUrjPX9s | |
| gFFr7QNsbsCpj+TZGc1jjvqiXRWaZPIFI8IKTj4Wbm13udBLEb2wr+FwgSWofk/t | |
| IjnmIwXlAwGOp+QE2FS2YE6wcMnqZdJa2vhI6NgLYHbTZ9NvdN4tk31Uc15FJCUV | |
| ymKIbZ6yL0iE5JWnEMD/o2/kwA/GNdUPy+TPd3OrcArH7OuBU+pbESJnB27BiSIP | |
| AUKDtkoCcTR1WTsEs77N2qMGI6dzoT9iqdQufhXLEAYYOIgZvf0BnYBnti+3w7Zg |
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
| # -*- coding: utf-8 -*- | |
| import socket | |
| import os | |
| print("Connecting...") | |
| if os.path.exists("/tmp/python_unix_sockets_example"): | |
| client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) | |
| client.connect("/tmp/python_unix_sockets_example") | |
| print("Ready.") | |
| print("Ctrl-C to quit.") |