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 array | |
| import heapq | |
| import sys | |
| import tempfile | |
| class ExternalMergeSort: | |
| MAX_INTS_PARTION = 10000 # reads/writes up to N integers at a time |
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 aiohttp | |
| import unittest | |
| from unittest import mock | |
| async def get_my_ip(timeout=3, loop=None): | |
| try: | |
| with aiohttp.Timeout(timeout, loop=loop): | |
| with aiohttp.ClientSession(loop=loop) as session: | |
| async with session.get('http://httpbin.org/get?show_env') as resp: |