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
#!/usr/bin/env python | |
import sys | |
import os | |
import errno | |
from argparse import ArgumentParser | |
from collections import defaultdict | |
import pickle | |
import logging | |
try: | |
import thread |
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
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 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
vagrant@saio:~$ /vagrant/.scratch/priority-object-updater --help | |
Usage: priority-object-updater CONFIG [options] | |
Options: | |
-h, --help show this help message and exit | |
--container=FILTER_CONTAINERS | |
Only process specific AUTH_acct/container(s) | |
--skip=SKIP_CONTAINERS | |
Do not process skipped AUTH_acct/container(s) | |
-v, --verbose log to console |
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
#!/usr/bin/env python3.7 | |
# pretty-print columns of text | |
import sys | |
def table_print(lines_to_print, padding=3): | |
"""Given a list of tuples/lists, print a nicely formatted .rst table""" |
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
/*.json |
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
#!/usr/bin/env python | |
from collections import defaultdict | |
import sys | |
import time | |
from argparse import ArgumentParser | |
from swift.common.internal_client import InternalClient | |
from swift.common.utils import Timestamp | |
from swift.common.wsgi import ConfigString | |
from swift.container.sync import ic_conf_body |
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 sys | |
import os | |
import errno | |
from argparse import ArgumentParser | |
from collections import defaultdict | |
from itertools import islice | |
from swift.common.storage_policy import split_policy_string | |
from swift.obj.diskfile import get_data_dir | |
from swift.common.ring import Ring |
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
#!/usr/bin/env python | |
import sys | |
from argparse import ArgumentParser | |
from swift.common.direct_client import direct_get_suffix_hashes | |
from swift.common.storage_policy import POLICIES | |
parser = ArgumentParser() | |
parser.add_argument('--policy-index', default=0, help='policy index') | |
parser.add_argument('part', help='the part') |
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 os | |
import sqlite3 | |
import simplejson | |
import time | |
class LocalCache(object): | |
def __init__(self, path='/run/shm/cache.db'): | |
self.db = sqlite3.Connection(path) |
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
#!/usr/bin/env python | |
""" | |
This script is about telling want you need *today* - not what you want to hear | |
""" # noqa | |
import sys | |
import math | |
from argparse import ArgumentParser | |
parser = ArgumentParser(description=__doc__.lstrip()) |
NewerOlder