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
| grpc/examples/python/helloworld$ python async_greeter_server.py | |
| DEBUG:asyncio:Using selector: EpollSelector | |
| DEBUG:grpc._cython.cygrpc:Using AsyncIOEngine.POLLER as I/O engine | |
| INFO:root:Starting server on [::]:50051 | |
| ^CDEBUG:grpc._cython.cygrpc:__dealloc__ called on running server <grpc._cython.cygrpc.AioServer object at 0x7f49685adc10> with status 4 | |
| Traceback (most recent call last): | |
| File "async_greeter_server.py", line 50, in <module> | |
| asyncio.run(serve()) | |
| File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run | |
| return loop.run_until_complete(main) |
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
| #!/usr/bin/env python | |
| from argparse import ArgumentParser | |
| import sys | |
| import json | |
| import boto3 | |
| parser = ArgumentParser() | |
| parser.add_argument('bucket', help='Bucket to make') |
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 swift.common.utils import Watchdog, WatchdogTimeout, GreenAsyncPile | |
| from eventlet.greenthread import spawn | |
| from eventlet import sleep, Timeout | |
| import random | |
| watchdog = Watchdog() | |
| watchdog.spawn() | |
| def range_iter(start=0): |
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
| #!/usr/bin/env python | |
| from argparse import ArgumentParser | |
| import json | |
| from swift.common.memcached import MemcacheRing | |
| from swift.proxy.controllers.base import get_cache_key | |
| import sys | |
| parser = ArgumentParser() | |
| parser.add_argument('container', help='Name of container to check') |
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 argparse import ArgumentParser | |
| import sys | |
| import time | |
| import boto3 | |
| parser = ArgumentParser() | |
| parser.add_argument('bucket', help='bucket to make the upload') | |
| parser.add_argument('key', nargs='?', help='key name for large object') |
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 sys | |
| import subprocess | |
| from swift.common.utils import get_logger | |
| from threading import Thread | |
| import time | |
| import socket | |
| import os | |
| import ssl | |
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 swiftclient import get_auth, client | |
| import time | |
| url, token = get_auth('http://saio:8080/auth/v1.0', 'test:tester', 'testing') | |
| TIMEOUT = 30.0 | |
| finish = time.time() + TIMEOUT | |
| while True: | |
| sc = client.head_account(url, token) | |
| print(sc) | |
| time.sleep(1.0) | |
| if time.time() > finish: |
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
| #!/usr/bin/env python | |
| import sys | |
| import argparse | |
| from swift.common.storage_policy import POLICIES | |
| from swift.common.bufferedhttp import http_connect | |
| from swift.common.utils import Timestamp | |
| SWIFT_DIR = '/etc/swift' |
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 json | |
| import sys | |
| def gen_ips(): | |
| i = 147 | |
| j = 153 | |
| while True: | |
| j += 1 | |
| if j > 254: |
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 ctypes | |
| import ctypes.util | |
| import struct | |
| import sys | |
| import textwrap | |
| import zlib | |
| lib_name = ctypes.util.find_library('erasurecode') | |
| if not lib_name: | |
| lib_name = 'liberasurecode.so.1' |