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
<?php | |
/** | |
* Copyright © EcomDev B.V. All rights reserved. | |
* See LICENSE.txt for license details. | |
*/ | |
declare(strict_types=1); | |
$port = $argv[1]; | |
$serverName = $argv[2]; |
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
import asyncio | |
from functools import wraps | |
def dec(fn): | |
@wraps(fn) | |
async def wrapper(*args, **kwargs): | |
print(fn, args, kwargs) # <function foo at 0x10952d598> () {} | |
await asyncio.sleep(5) |
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
import socket | |
import struct | |
import sys | |
import time | |
import datetime | |
import win32api | |
# List of servers in order of attempt of fetching | |
server_list = ['ntp.iitb.ac.in', 'time.nist.gov', 'time.windows.com', 'pool.ntp.org'] |