body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
@Issue(4213)
@Skip(svntest.main.is_fs_type_fsx)
def recover_old_empty(sbox):
'recover empty --compatible-version=1.3'
sbox.build(create_wc=False, empty=True, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, [], 'recover', sbox.repo_dir) | -5,409,064,214,191,564,000 | recover empty --compatible-version=1.3 | subversion/tests/cmdline/svnadmin_tests.py | recover_old_empty | auycro/subversion | python | @Issue(4213)
@Skip(svntest.main.is_fs_type_fsx)
def recover_old_empty(sbox):
sbox.build(create_wc=False, empty=True, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, [], 'recover', sbox.repo_dir) |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_keep_going(sbox):
'svnadmin verify --keep-going test'
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False)
repo_url = sbox.repo_url
B_url = (sbox.repo_url + '/B')
C_url = (sbox.repo_u... | -444,823,730,030,649,400 | svnadmin verify --keep-going test | subversion/tests/cmdline/svnadmin_tests.py | verify_keep_going | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_keep_going(sbox):
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False)
repo_url = sbox.repo_url
B_url = (sbox.repo_url + '/B')
C_url = (sbox.repo_url + '/C')
svntest.actions.run_... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_keep_going_quiet(sbox):
'svnadmin verify --keep-going --quiet test'
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False)
repo_url = sbox.repo_url
B_url = (sbox.repo_url + '/B')
C_url ... | -1,586,240,796,637,758,200 | svnadmin verify --keep-going --quiet test | subversion/tests/cmdline/svnadmin_tests.py | verify_keep_going_quiet | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_keep_going_quiet(sbox):
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False)
repo_url = sbox.repo_url
B_url = (sbox.repo_url + '/B')
C_url = (sbox.repo_url + '/C')
svntest.action... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_invalid_path_changes(sbox):
'detect invalid changed path list entries'
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False)
repo_url = sbox.repo_url
for r in range(2, 20):
svntest... | 5,820,727,438,573,355,000 | detect invalid changed path list entries | subversion/tests/cmdline/svnadmin_tests.py | verify_invalid_path_changes | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_invalid_path_changes(sbox):
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False)
repo_url = sbox.repo_url
for r in range(2, 20):
svntest.actions.run_and_verify_svn(None, [], 'mkd... |
def verify_denormalized_names(sbox):
'detect denormalized names and name collisions'
sbox.build(create_wc=False, empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'normalization_check.dump')
load_dumpstream(sbox, svntest.actions.load_dumpfile(dumpfile_loca... | 8,407,033,995,025,627,000 | detect denormalized names and name collisions | subversion/tests/cmdline/svnadmin_tests.py | verify_denormalized_names | auycro/subversion | python | def verify_denormalized_names(sbox):
sbox.build(create_wc=False, empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'normalization_check.dump')
load_dumpstream(sbox, svntest.actions.load_dumpfile(dumpfile_location))
(exit_code, output, errput) = svntes... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_recover_old_non_empty(sbox):
'fsfs recover non-empty --compatible-version=1.3'
sbox.build(create_wc=False, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, [], 'recover', sbox.repo_dir) | 544,593,585,622,874,500 | fsfs recover non-empty --compatible-version=1.3 | subversion/tests/cmdline/svnadmin_tests.py | fsfs_recover_old_non_empty | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_recover_old_non_empty(sbox):
sbox.build(create_wc=False, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, [], 'recover', sbox.repo_dir) |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_old_non_empty(sbox):
'fsfs hotcopy non-empty --compatible-version=1.3'
sbox.build(create_wc=False, minor_version=3)
(backup_dir, backup_url) = sbox.add_repo_path('backup')
svntest.actions.run_and_verify_svnadmin(None, [], 'hotcopy', sbox.repo_di... | -2,298,455,371,426,589,700 | fsfs hotcopy non-empty --compatible-version=1.3 | subversion/tests/cmdline/svnadmin_tests.py | fsfs_hotcopy_old_non_empty | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_old_non_empty(sbox):
sbox.build(create_wc=False, minor_version=3)
(backup_dir, backup_url) = sbox.add_repo_path('backup')
svntest.actions.run_and_verify_svnadmin(None, [], 'hotcopy', sbox.repo_dir, backup_dir)
check_hotcopy_fsfs(sbox.repo_d... |
def load_ignore_dates(sbox):
'svnadmin load --ignore-dates'
start_time = time.localtime()
time.sleep(1)
sbox.build(create_wc=False, empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'skeleton_repos.dump')
dumpfile_skeleton = svntest.actions.load_du... | 7,302,272,163,203,743,000 | svnadmin load --ignore-dates | subversion/tests/cmdline/svnadmin_tests.py | load_ignore_dates | auycro/subversion | python | def load_ignore_dates(sbox):
start_time = time.localtime()
time.sleep(1)
sbox.build(create_wc=False, empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'skeleton_repos.dump')
dumpfile_skeleton = svntest.actions.load_dumpfile(dumpfile_location)
... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_old_with_id_changes(sbox):
'fsfs hotcopy old with node-id and copy-id changes'
sbox.build(create_wc=True, minor_version=3)
(inc_backup_dir, inc_backup_url) = sbox.add_repo_path('incremental-backup')
(backup_dir, backup_url) = sbox.add_repo_path(... | -3,939,098,385,355,646,000 | fsfs hotcopy old with node-id and copy-id changes | subversion/tests/cmdline/svnadmin_tests.py | fsfs_hotcopy_old_with_id_changes | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_old_with_id_changes(sbox):
sbox.build(create_wc=True, minor_version=3)
(inc_backup_dir, inc_backup_url) = sbox.add_repo_path('incremental-backup')
(backup_dir, backup_url) = sbox.add_repo_path('backup-after-r1')
svntest.actions.run_and_veri... |
@SkipUnless(svntest.main.fs_has_pack)
def verify_packed(sbox):
'verify packed with small shards'
sbox.build()
patch_format(sbox.repo_dir, shard_size=2)
sbox.simple_append('iota', 'Line.\n')
sbox.simple_append('A/D/gamma', 'Another line.\n')
sbox.simple_commit(message='r2')
sbox.simple_propse... | -3,766,254,840,301,204,000 | verify packed with small shards | subversion/tests/cmdline/svnadmin_tests.py | verify_packed | auycro/subversion | python | @SkipUnless(svntest.main.fs_has_pack)
def verify_packed(sbox):
sbox.build()
patch_format(sbox.repo_dir, shard_size=2)
sbox.simple_append('iota', 'Line.\n')
sbox.simple_append('A/D/gamma', 'Another line.\n')
sbox.simple_commit(message='r2')
sbox.simple_propset('foo', 'bar', 'iota')
sbox.... |
def freeze_freeze(sbox):
'svnadmin freeze svnadmin freeze (some-cmd)'
sbox.build(create_wc=False, read_only=True)
(second_repo_dir, _) = sbox.add_repo_path('backup')
svntest.actions.run_and_verify_svnadmin(None, [], 'hotcopy', sbox.repo_dir, second_repo_dir)
if (svntest.main.is_fs_type_fsx() or (svn... | -2,789,566,124,145,146,000 | svnadmin freeze svnadmin freeze (some-cmd) | subversion/tests/cmdline/svnadmin_tests.py | freeze_freeze | auycro/subversion | python | def freeze_freeze(sbox):
sbox.build(create_wc=False, read_only=True)
(second_repo_dir, _) = sbox.add_repo_path('backup')
svntest.actions.run_and_verify_svnadmin(None, [], 'hotcopy', sbox.repo_dir, second_repo_dir)
if (svntest.main.is_fs_type_fsx() or (svntest.main.is_fs_type_fsfs() and (svntest.mai... |
def verify_metadata_only(sbox):
'verify metadata only'
sbox.build(create_wc=False)
(exit_code, output, errput) = svntest.main.run_svnadmin('verify', sbox.repo_dir, '--metadata-only')
if errput:
raise SVNUnexpectedStderr(errput)
if svntest.main.is_fs_log_addressing():
svntest.verify.c... | 7,340,750,279,070,634,000 | verify metadata only | subversion/tests/cmdline/svnadmin_tests.py | verify_metadata_only | auycro/subversion | python | def verify_metadata_only(sbox):
sbox.build(create_wc=False)
(exit_code, output, errput) = svntest.main.run_svnadmin('verify', sbox.repo_dir, '--metadata-only')
if errput:
raise SVNUnexpectedStderr(errput)
if svntest.main.is_fs_log_addressing():
svntest.verify.compare_and_display_lin... |
@Skip(svntest.main.is_fs_type_bdb)
def verify_quickly(sbox):
'verify quickly using metadata'
sbox.build(create_wc=False)
rev_file = open(fsfs_file(sbox.repo_dir, 'revs', '1'), 'r+b')
rev_file.seek(8)
rev_file.write(b'#')
rev_file.close()
(exit_code, output, errput) = svntest.main.run_svnadmi... | -3,595,489,181,338,386,000 | verify quickly using metadata | subversion/tests/cmdline/svnadmin_tests.py | verify_quickly | auycro/subversion | python | @Skip(svntest.main.is_fs_type_bdb)
def verify_quickly(sbox):
sbox.build(create_wc=False)
rev_file = open(fsfs_file(sbox.repo_dir, 'revs', '1'), 'r+b')
rev_file.seek(8)
rev_file.write(b'#')
rev_file.close()
(exit_code, output, errput) = svntest.main.run_svnadmin('verify', sbox.repo_dir, '--m... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.fs_has_pack)
def fsfs_hotcopy_progress(sbox):
'hotcopy progress reporting'
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False, empty=True)
patch_format(sbox.repo_dir, shard_siz... | -1,912,052,797,931,870,700 | hotcopy progress reporting | subversion/tests/cmdline/svnadmin_tests.py | fsfs_hotcopy_progress | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.fs_has_pack)
def fsfs_hotcopy_progress(sbox):
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False, empty=True)
patch_format(sbox.repo_dir, shard_size=3)
(inc_backup_dir, in... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_progress_with_revprop_changes(sbox):
'incremental hotcopy progress with changed revprops'
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False, empty=True)
for i in range(6):
svn... | -8,229,865,375,370,251,000 | incremental hotcopy progress with changed revprops | subversion/tests/cmdline/svnadmin_tests.py | fsfs_hotcopy_progress_with_revprop_changes | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_progress_with_revprop_changes(sbox):
if svntest.main.options.fsfs_packing:
raise svntest.Skip('fsfs packing set')
sbox.build(create_wc=False, empty=True)
for i in range(6):
svntest.actions.run_and_verify_svn(None, [], 'mkdir', '... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_progress_old(sbox):
'hotcopy --compatible-version=1.3 progress'
sbox.build(create_wc=False, empty=True, minor_version=3)
(inc_backup_dir, inc_backup_url) = sbox.add_repo_path('incremental-backup')
expected_full = ['* Copied revision 0.\n']
e... | -878,062,420,884,698,800 | hotcopy --compatible-version=1.3 progress | subversion/tests/cmdline/svnadmin_tests.py | fsfs_hotcopy_progress_old | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def fsfs_hotcopy_progress_old(sbox):
sbox.build(create_wc=False, empty=True, minor_version=3)
(inc_backup_dir, inc_backup_url) = sbox.add_repo_path('incremental-backup')
expected_full = ['* Copied revision 0.\n']
expected_incremental = ['* Copied revision 0... |
@SkipUnless(svntest.main.fs_has_unique_freeze)
def freeze_same_uuid(sbox):
'freeze multiple repositories with same UUID'
sbox.build(create_wc=False)
(first_repo_dir, _) = sbox.add_repo_path('first')
(second_repo_dir, _) = sbox.add_repo_path('second')
svntest.main.create_repos(first_repo_dir)
svn... | -594,798,748,947,338,800 | freeze multiple repositories with same UUID | subversion/tests/cmdline/svnadmin_tests.py | freeze_same_uuid | auycro/subversion | python | @SkipUnless(svntest.main.fs_has_unique_freeze)
def freeze_same_uuid(sbox):
sbox.build(create_wc=False)
(first_repo_dir, _) = sbox.add_repo_path('first')
(second_repo_dir, _) = sbox.add_repo_path('second')
svntest.main.create_repos(first_repo_dir)
svntest.main.create_repos(second_repo_dir)
d... |
@Skip(svntest.main.is_fs_type_fsx)
def upgrade(sbox):
'upgrade --compatible-version=1.3'
sbox.build(create_wc=False, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, [], 'upgrade', sbox.repo_dir)
svntest.actions.run_and_verify_svn(['Committing transaction...\n', 'Committed revision 2.\n'],... | -4,504,573,146,459,374,000 | upgrade --compatible-version=1.3 | subversion/tests/cmdline/svnadmin_tests.py | upgrade | auycro/subversion | python | @Skip(svntest.main.is_fs_type_fsx)
def upgrade(sbox):
sbox.build(create_wc=False, minor_version=3)
svntest.actions.run_and_verify_svnadmin(None, [], 'upgrade', sbox.repo_dir)
svntest.actions.run_and_verify_svn(['Committing transaction...\n', 'Committed revision 2.\n'], [], 'mkdir', '-m', svntest.main.m... |
def load_txdelta(sbox):
'exercising svn_txdelta_target on BDB'
sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'load_txdelta.dump.gz')
dumpfile = gzip.open(dumpfile_location, 'rb').readlines()
load_dumpstream(sbox, dumpfile)
(exit_code... | -2,468,967,267,577,584,600 | exercising svn_txdelta_target on BDB | subversion/tests/cmdline/svnadmin_tests.py | load_txdelta | auycro/subversion | python | def load_txdelta(sbox):
sbox.build(empty=True)
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'load_txdelta.dump.gz')
dumpfile = gzip.open(dumpfile_location, 'rb').readlines()
load_dumpstream(sbox, dumpfile)
(exit_code, output, errput) = svntest.main.run_s... |
@Issues(4563)
def load_no_svndate_r0(sbox):
'load without svn:date on r0'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svnlook([' svn:date\n'], [], 'proplist', '--revprop', '-r0', sbox.repo_dir)
dump_old = [b'SVN-fs-dump-format-version: 2\n', b'\n', b'UUID: bf52886d-358d-4493-... | -9,160,021,234,037,082,000 | load without svn:date on r0 | subversion/tests/cmdline/svnadmin_tests.py | load_no_svndate_r0 | auycro/subversion | python | @Issues(4563)
def load_no_svndate_r0(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svnlook([' svn:date\n'], [], 'proplist', '--revprop', '-r0', sbox.repo_dir)
dump_old = [b'SVN-fs-dump-format-version: 2\n', b'\n', b'UUID: bf52886d-358d-4493-a414-944a6e5ad4f5\n', b'\n', ... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
def hotcopy_read_only(sbox):
"'svnadmin hotcopy' a read-only source repository"
sbox.build()
svntest.main.chmod_tree(sbox.repo_dir, 0, svntest.main.S_ALL_WRITE)
(backup_dir, backup_url) = sbox.add_repo_path('backup')
(exit_code, output, errput) = svntest.mai... | -8,641,223,759,628,086,000 | 'svnadmin hotcopy' a read-only source repository | subversion/tests/cmdline/svnadmin_tests.py | hotcopy_read_only | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
def hotcopy_read_only(sbox):
sbox.build()
svntest.main.chmod_tree(sbox.repo_dir, 0, svntest.main.S_ALL_WRITE)
(backup_dir, backup_url) = sbox.add_repo_path('backup')
(exit_code, output, errput) = svntest.main.run_svnadmin('hotcopy', sbox.repo_dir, backup_di... |
@SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.fs_has_pack)
def fsfs_pack_non_sharded(sbox):
"'svnadmin pack' on a non-sharded repository"
sbox.build(create_wc=False, minor_version=min(svntest.main.options.server_minor_version, 3))
if is_sharded(sbox.repo_dir):
raise svntest.Skip... | 3,323,902,558,173,068,000 | 'svnadmin pack' on a non-sharded repository | subversion/tests/cmdline/svnadmin_tests.py | fsfs_pack_non_sharded | auycro/subversion | python | @SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.fs_has_pack)
def fsfs_pack_non_sharded(sbox):
sbox.build(create_wc=False, minor_version=min(svntest.main.options.server_minor_version, 3))
if is_sharded(sbox.repo_dir):
raise svntest.Skip('sharded pre-cooked repository')
svntest... |
def load_revprops(sbox):
'svnadmin load-revprops'
sbox.build(create_wc=False, empty=True)
dump_path = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'skeleton_repos.dump')
dump_contents = open(dump_path, 'rb').readlines()
load_and_verify_dumpstream(sbox, None, [], None, False, dum... | 8,441,304,003,097,096,000 | svnadmin load-revprops | subversion/tests/cmdline/svnadmin_tests.py | load_revprops | auycro/subversion | python | def load_revprops(sbox):
sbox.build(create_wc=False, empty=True)
dump_path = os.path.join(os.path.dirname(sys.argv[0]), 'svnadmin_tests_data', 'skeleton_repos.dump')
dump_contents = open(dump_path, 'rb').readlines()
load_and_verify_dumpstream(sbox, None, [], None, False, dump_contents)
svntest.... |
def dump_revprops(sbox):
'svnadmin dump-revprops'
sbox.build(create_wc=False)
(exit_code, dump_contents, errput) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump-revprops', '-q', sbox.repo_dir)
for line in dump_contents:
if (line.find(b'Node-path: ') > (- 1)):
logger.warn('E... | 8,094,951,945,586,859,000 | svnadmin dump-revprops | subversion/tests/cmdline/svnadmin_tests.py | dump_revprops | auycro/subversion | python | def dump_revprops(sbox):
sbox.build(create_wc=False)
(exit_code, dump_contents, errput) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump-revprops', '-q', sbox.repo_dir)
for line in dump_contents:
if (line.find(b'Node-path: ') > (- 1)):
logger.warn('Error: path change found ... |
@XFail(svntest.main.is_fs_type_fsx)
@Issue(4598)
def dump_no_op_change(sbox):
'svnadmin dump with no-op changes'
sbox.build(create_wc=False, empty=True)
empty_file = sbox.get_tempname()
svntest.main.file_write(empty_file, '')
svntest.actions.run_and_verify_svnmucc(None, [], '-U', sbox.repo_url, '-m'... | 4,759,590,128,040,377,000 | svnadmin dump with no-op changes | subversion/tests/cmdline/svnadmin_tests.py | dump_no_op_change | auycro/subversion | python | @XFail(svntest.main.is_fs_type_fsx)
@Issue(4598)
def dump_no_op_change(sbox):
sbox.build(create_wc=False, empty=True)
empty_file = sbox.get_tempname()
svntest.main.file_write(empty_file, )
svntest.actions.run_and_verify_svnmucc(None, [], '-U', sbox.repo_url, '-m', svntest.main.make_log_msg(), 'put'... |
@XFail(svntest.main.is_fs_type_bdb)
@XFail(svntest.main.is_fs_type_fsx)
@Issue(4623)
def dump_no_op_prop_change(sbox):
'svnadmin dump with no-op property change'
sbox.build(create_wc=False, empty=True)
empty_file = sbox.get_tempname()
svntest.main.file_write(empty_file, '')
svntest.actions.run_and_v... | 881,411,580,517,528,000 | svnadmin dump with no-op property change | subversion/tests/cmdline/svnadmin_tests.py | dump_no_op_prop_change | auycro/subversion | python | @XFail(svntest.main.is_fs_type_bdb)
@XFail(svntest.main.is_fs_type_fsx)
@Issue(4623)
def dump_no_op_prop_change(sbox):
sbox.build(create_wc=False, empty=True)
empty_file = sbox.get_tempname()
svntest.main.file_write(empty_file, )
svntest.actions.run_and_verify_svnmucc(None, [], '-U', sbox.repo_url,... |
def load_no_flush_to_disk(sbox):
'svnadmin load --no-flush-to-disk'
sbox.build(empty=True)
dump = clean_dumpfile()
expected = [svntest.wc.State('', {'A': svntest.wc.StateItem(contents='text\n', props={'svn:keywords': 'Id'})})]
load_and_verify_dumpstream(sbox, [], [], expected, True, dump, '--no-flus... | -502,437,378,718,735,040 | svnadmin load --no-flush-to-disk | subversion/tests/cmdline/svnadmin_tests.py | load_no_flush_to_disk | auycro/subversion | python | def load_no_flush_to_disk(sbox):
sbox.build(empty=True)
dump = clean_dumpfile()
expected = [svntest.wc.State(, {'A': svntest.wc.StateItem(contents='text\n', props={'svn:keywords': 'Id'})})]
load_and_verify_dumpstream(sbox, [], [], expected, True, dump, '--no-flush-to-disk', '--ignore-uuid') |
def dump_to_file(sbox):
'svnadmin dump --file ARG'
sbox.build(create_wc=False, empty=False)
expected_dump = svntest.actions.run_and_verify_dump(sbox.repo_dir)
file = sbox.get_tempname()
svntest.actions.run_and_verify_svnadmin2([], ['* Dumped revision 0.\n', '* Dumped revision 1.\n'], 0, 'dump', '--f... | -7,564,124,315,480,732,000 | svnadmin dump --file ARG | subversion/tests/cmdline/svnadmin_tests.py | dump_to_file | auycro/subversion | python | def dump_to_file(sbox):
sbox.build(create_wc=False, empty=False)
expected_dump = svntest.actions.run_and_verify_dump(sbox.repo_dir)
file = sbox.get_tempname()
svntest.actions.run_and_verify_svnadmin2([], ['* Dumped revision 0.\n', '* Dumped revision 1.\n'], 0, 'dump', '--file', file, sbox.repo_dir)... |
def load_from_file(sbox):
'svnadmin load --file ARG'
sbox.build(empty=True)
file = sbox.get_tempname()
with open(file, 'wb') as f:
f.writelines(clean_dumpfile())
svntest.actions.run_and_verify_svnadmin2(None, [], 0, 'load', '--file', file, '--ignore-uuid', sbox.repo_dir)
expected_tree = ... | 8,242,333,286,280,110,000 | svnadmin load --file ARG | subversion/tests/cmdline/svnadmin_tests.py | load_from_file | auycro/subversion | python | def load_from_file(sbox):
sbox.build(empty=True)
file = sbox.get_tempname()
with open(file, 'wb') as f:
f.writelines(clean_dumpfile())
svntest.actions.run_and_verify_svnadmin2(None, [], 0, 'load', '--file', file, '--ignore-uuid', sbox.repo_dir)
expected_tree = svntest.wc.State(, {'A': s... |
def dump_exclude(sbox):
'svnadmin dump with excluded paths'
sbox.build(create_wc=False)
(_, dump, _) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump', '-q', '--exclude', '/A/D/H', '--exclude', '/A/B/E', sbox.repo_dir)
sbox2 = sbox.clone_dependent()
sbox2.build(create_wc=False, empty=True)
... | -6,663,219,952,791,313,000 | svnadmin dump with excluded paths | subversion/tests/cmdline/svnadmin_tests.py | dump_exclude | auycro/subversion | python | def dump_exclude(sbox):
sbox.build(create_wc=False)
(_, dump, _) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump', '-q', '--exclude', '/A/D/H', '--exclude', '/A/B/E', sbox.repo_dir)
sbox2 = sbox.clone_dependent()
sbox2.build(create_wc=False, empty=True)
load_and_verify_dumpstream(sbox... |
def dump_exclude_copysource(sbox):
'svnadmin dump with excluded copysource'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/trunk'), (sbox.repo_url + '/branches'), (sbox.repo_url + '/tags'), '-m', 'Create repository structu... | -7,391,016,316,495,740,000 | svnadmin dump with excluded copysource | subversion/tests/cmdline/svnadmin_tests.py | dump_exclude_copysource | auycro/subversion | python | def dump_exclude_copysource(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/trunk'), (sbox.repo_url + '/branches'), (sbox.repo_url + '/tags'), '-m', 'Create repository structure.')
svntest.actions.run_and_verify... |
def dump_include(sbox):
'svnadmin dump with included paths'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/A'), (sbox.repo_url + '/B'), (sbox.repo_url + '/C'), '-m', 'Create folder.')
(_, dump, _) = svntest.actions.run... | 8,657,263,414,146,474,000 | svnadmin dump with included paths | subversion/tests/cmdline/svnadmin_tests.py | dump_include | auycro/subversion | python | def dump_include(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/A'), (sbox.repo_url + '/B'), (sbox.repo_url + '/C'), '-m', 'Create folder.')
(_, dump, _) = svntest.actions.run_and_verify_svnadmin(None, [], 'dum... |
def dump_not_include_copysource(sbox):
'svnadmin dump with not included copysource'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/trunk'), (sbox.repo_url + '/branches'), (sbox.repo_url + '/tags'), '-m', 'Create repository... | 1,605,245,060,668,169,700 | svnadmin dump with not included copysource | subversion/tests/cmdline/svnadmin_tests.py | dump_not_include_copysource | auycro/subversion | python | def dump_not_include_copysource(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/trunk'), (sbox.repo_url + '/branches'), (sbox.repo_url + '/tags'), '-m', 'Create repository structure.')
svntest.actions.run_and_ve... |
def dump_exclude_by_pattern(sbox):
'svnadmin dump with paths excluded by pattern'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/aaa'), (sbox.repo_url + '/aab'), (sbox.repo_url + '/aac'), (sbox.repo_url + '/bbc'), '-m', 'C... | 2,939,393,347,528,312,300 | svnadmin dump with paths excluded by pattern | subversion/tests/cmdline/svnadmin_tests.py | dump_exclude_by_pattern | auycro/subversion | python | def dump_exclude_by_pattern(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/aaa'), (sbox.repo_url + '/aab'), (sbox.repo_url + '/aac'), (sbox.repo_url + '/bbc'), '-m', 'Create repository structure.')
(_, dump, _)... |
def dump_include_by_pattern(sbox):
'svnadmin dump with paths included by pattern'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/aaa'), (sbox.repo_url + '/aab'), (sbox.repo_url + '/aac'), (sbox.repo_url + '/bbc'), '-m', 'C... | 1,634,369,048,131,271,000 | svnadmin dump with paths included by pattern | subversion/tests/cmdline/svnadmin_tests.py | dump_include_by_pattern | auycro/subversion | python | def dump_include_by_pattern(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/aaa'), (sbox.repo_url + '/aab'), (sbox.repo_url + '/aac'), (sbox.repo_url + '/bbc'), '-m', 'Create repository structure.')
(_, dump, _)... |
def dump_exclude_all_rev_changes(sbox):
'svnadmin dump with all revision changes excluded'
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/r1a'), (sbox.repo_url + '/r1b'), (sbox.repo_url + '/r1c'), '-m', 'Revision 1.')
... | 880,426,043,000,715,300 | svnadmin dump with all revision changes excluded | subversion/tests/cmdline/svnadmin_tests.py | dump_exclude_all_rev_changes | auycro/subversion | python | def dump_exclude_all_rev_changes(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/r1a'), (sbox.repo_url + '/r1b'), (sbox.repo_url + '/r1c'), '-m', 'Revision 1.')
svntest.actions.run_and_verify_svn(svntest.verify.... |
def dump_invalid_filtering_option(sbox):
'dump with --include and --exclude simultaneously'
sbox.build(create_wc=False, empty=False)
expected_error = ".*: '--exclude' and '--include' options cannot be used simultaneously"
svntest.actions.run_and_verify_svnadmin(None, expected_error, 'dump', '-q', '--exc... | 326,157,909,571,971,500 | dump with --include and --exclude simultaneously | subversion/tests/cmdline/svnadmin_tests.py | dump_invalid_filtering_option | auycro/subversion | python | def dump_invalid_filtering_option(sbox):
sbox.build(create_wc=False, empty=False)
expected_error = ".*: '--exclude' and '--include' options cannot be used simultaneously"
svntest.actions.run_and_verify_svnadmin(None, expected_error, 'dump', '-q', '--exclude', '/A/D/H', '--include', '/A/B/E', sbox.repo_... |
@Issue(4725)
def load_issue4725(sbox):
'load that triggers issue 4725'
sbox.build(empty=True)
sbox.simple_mkdir('subversion')
sbox.simple_commit()
sbox.simple_mkdir('subversion/trunk')
sbox.simple_mkdir('subversion/branches')
sbox.simple_commit()
sbox.simple_mkdir('subversion/trunk/src')... | -1,960,894,554,059,477,200 | load that triggers issue 4725 | subversion/tests/cmdline/svnadmin_tests.py | load_issue4725 | auycro/subversion | python | @Issue(4725)
def load_issue4725(sbox):
sbox.build(empty=True)
sbox.simple_mkdir('subversion')
sbox.simple_commit()
sbox.simple_mkdir('subversion/trunk')
sbox.simple_mkdir('subversion/branches')
sbox.simple_commit()
sbox.simple_mkdir('subversion/trunk/src')
sbox.simple_commit()
(... |
@Issue(4767)
def dump_no_canonicalize_svndate(sbox):
"svnadmin dump shouldn't canonicalize svn:date"
sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(sbox.repo_dir)
propval = '2015-01-01T00:00:00.0Z'
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'prop... | 45,566,800,534,895,640 | svnadmin dump shouldn't canonicalize svn:date | subversion/tests/cmdline/svnadmin_tests.py | dump_no_canonicalize_svndate | auycro/subversion | python | @Issue(4767)
def dump_no_canonicalize_svndate(sbox):
sbox.build(create_wc=False, empty=True)
svntest.actions.enable_revprop_changes(sbox.repo_dir)
propval = '2015-01-01T00:00:00.0Z'
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'propset', '--revprop', '-r0', 'svn:date', propval, ... |
def check_recover_prunes_rep_cache(sbox, enable_rep_sharing):
"Check 'recover' prunes the rep-cache while enable-rep-sharing is\n true/false.\n "
rep_cache_r1 = read_rep_cache(sbox.repo_dir)
sbox.simple_append('iota', 'New line.\n')
sbox.simple_commit()
rep_cache_r2 = read_rep_cache(sbox.repo_d... | 1,701,348,569,688,906,800 | Check 'recover' prunes the rep-cache while enable-rep-sharing is
true/false. | subversion/tests/cmdline/svnadmin_tests.py | check_recover_prunes_rep_cache | auycro/subversion | python | def check_recover_prunes_rep_cache(sbox, enable_rep_sharing):
"Check 'recover' prunes the rep-cache while enable-rep-sharing is\n true/false.\n "
rep_cache_r1 = read_rep_cache(sbox.repo_dir)
sbox.simple_append('iota', 'New line.\n')
sbox.simple_commit()
rep_cache_r2 = read_rep_cache(sbox.repo_d... |
@Issue(4077)
@SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.python_sqlite_can_read_without_rowid)
def recover_prunes_rep_cache_when_enabled(sbox):
'recover prunes rep cache when enabled'
sbox.build()
check_recover_prunes_rep_cache(sbox, enable_rep_sharing=True) | -6,380,502,636,390,315,000 | recover prunes rep cache when enabled | subversion/tests/cmdline/svnadmin_tests.py | recover_prunes_rep_cache_when_enabled | auycro/subversion | python | @Issue(4077)
@SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.python_sqlite_can_read_without_rowid)
def recover_prunes_rep_cache_when_enabled(sbox):
sbox.build()
check_recover_prunes_rep_cache(sbox, enable_rep_sharing=True) |
@Issue(4077)
@SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.python_sqlite_can_read_without_rowid)
def recover_prunes_rep_cache_when_disabled(sbox):
'recover prunes rep cache when disabled'
sbox.build()
check_recover_prunes_rep_cache(sbox, enable_rep_sharing=False) | -6,677,523,881,005,802,000 | recover prunes rep cache when disabled | subversion/tests/cmdline/svnadmin_tests.py | recover_prunes_rep_cache_when_disabled | auycro/subversion | python | @Issue(4077)
@SkipUnless(svntest.main.is_fs_type_fsfs)
@SkipUnless(svntest.main.python_sqlite_can_read_without_rowid)
def recover_prunes_rep_cache_when_disabled(sbox):
sbox.build()
check_recover_prunes_rep_cache(sbox, enable_rep_sharing=False) |
@Issue(4760)
def dump_include_copied_directory(sbox):
'include copied directory with nested nodes'
sbox.build(create_wc=False)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'copy', (sbox.repo_url + '/A/D'), (sbox.repo_url + '/COPY'), '-m', 'Create branch.')
(_, dump, _) = svntest.acti... | 450,583,208,109,373,600 | include copied directory with nested nodes | subversion/tests/cmdline/svnadmin_tests.py | dump_include_copied_directory | auycro/subversion | python | @Issue(4760)
def dump_include_copied_directory(sbox):
sbox.build(create_wc=False)
svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'copy', (sbox.repo_url + '/A/D'), (sbox.repo_url + '/COPY'), '-m', 'Create branch.')
(_, dump, _) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump'... |
def load_normalize_node_props(sbox):
'svnadmin load --normalize node props'
dump_str = b'SVN-fs-dump-format-version: 2\n\nUUID: dc40867b-38f6-0310-9f5f-f81aa277e06f\n\nRevision-number: 0\nProp-content-length: 56\nContent-length: 56\n\nK 8\nsvn:date\nV 27\n2005-05-03T19:09:41.129900Z\nPROPS-END\n\nRevision-numbe... | -5,918,447,927,095,142,000 | svnadmin load --normalize node props | subversion/tests/cmdline/svnadmin_tests.py | load_normalize_node_props | auycro/subversion | python | def load_normalize_node_props(sbox):
dump_str = b'SVN-fs-dump-format-version: 2\n\nUUID: dc40867b-38f6-0310-9f5f-f81aa277e06f\n\nRevision-number: 0\nProp-content-length: 56\nContent-length: 56\n\nK 8\nsvn:date\nV 27\n2005-05-03T19:09:41.129900Z\nPROPS-END\n\nRevision-number: 1\nProp-content-length: 99\nContent... |
def _read(self):
' Read P2L index using svnfsfs. '
(exit_code, output, errput) = svntest.main.run_svnfsfs('dump-index', ('-r' + str(self.revision)), self.repo_dir)
svntest.verify.verify_outputs('Error while dumping index', [], errput, [], [])
svntest.verify.verify_exit_code(None, exit_code, 0)
self.... | 2,798,168,454,450,458,000 | Read P2L index using svnfsfs. | subversion/tests/cmdline/svnadmin_tests.py | _read | auycro/subversion | python | def _read(self):
' '
(exit_code, output, errput) = svntest.main.run_svnfsfs('dump-index', ('-r' + str(self.revision)), self.repo_dir)
svntest.verify.verify_outputs('Error while dumping index', [], errput, [], [])
svntest.verify.verify_exit_code(None, exit_code, 0)
self.by_item.clear()
for line ... |
def _write(self):
' Rewrite indexes using svnfsfs. '
by_offset = {}
for key in self.by_item:
values = self.by_item[key]
by_offset[int(values[0], 16)] = values
lines = []
for (offset, values) in sorted(by_offset.items()):
values = by_offset[offset]
line = (((((((((valu... | 463,800,620,164,410,800 | Rewrite indexes using svnfsfs. | subversion/tests/cmdline/svnadmin_tests.py | _write | auycro/subversion | python | def _write(self):
' '
by_offset = {}
for key in self.by_item:
values = self.by_item[key]
by_offset[int(values[0], 16)] = values
lines = []
for (offset, values) in sorted(by_offset.items()):
values = by_offset[offset]
line = (((((((((values[0] + ' ') + values[1]) + ' ... |
def get_item(self, item):
' Return offset, length and type of ITEM. '
values = self.by_item[item]
offset = int(values[0], 16)
len = int(values[1], 16)
type = values[2]
return (offset, len, type) | -2,074,339,648,030,979,800 | Return offset, length and type of ITEM. | subversion/tests/cmdline/svnadmin_tests.py | get_item | auycro/subversion | python | def get_item(self, item):
' '
values = self.by_item[item]
offset = int(values[0], 16)
len = int(values[1], 16)
type = values[2]
return (offset, len, type) |
def modify_item(self, item, offset, len):
' Modify offset and length of ITEM. '
values = self.by_item[item]
values[0] = ('%x' % offset)
values[1] = ('%x' % len)
self._write() | -2,660,641,024,189,489,700 | Modify offset and length of ITEM. | subversion/tests/cmdline/svnadmin_tests.py | modify_item | auycro/subversion | python | def modify_item(self, item, offset, len):
' '
values = self.by_item[item]
values[0] = ('%x' % offset)
values[1] = ('%x' % len)
self._write() |
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--enable_extended_memory_metrics=true')
def test_varz_hidden_variables(self):
'Tests that modified hidden variables show up in /varz'
response = requests.get('http://localhost:25000/varz?json')
assert (response.status_code == requ... | 7,393,242,295,967,590,000 | Tests that modified hidden variables show up in /varz | tests/custom_cluster/test_web_pages.py | test_varz_hidden_variables | AlexanderSaydakov/impala | python | @pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--enable_extended_memory_metrics=true')
def test_varz_hidden_variables(self):
response = requests.get('http://localhost:25000/varz?json')
assert (response.status_code == requests.codes.ok)
varz_json = json.loads(response.text... |
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--webserver_max_post_length_bytes=100')
def test_max_post_length(self):
'Tests that the maximum length of a POST request that will be accepted'
too_big_post_content = ('c' * 10000)
response = requests.post('http://localhost:25000/... | 5,251,090,867,718,838,000 | Tests that the maximum length of a POST request that will be accepted | tests/custom_cluster/test_web_pages.py | test_max_post_length | AlexanderSaydakov/impala | python | @pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--webserver_max_post_length_bytes=100')
def test_max_post_length(self):
too_big_post_content = ('c' * 10000)
response = requests.post('http://localhost:25000/', too_big_post_content)
assert (response.status_code == requests.c... |
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--query_stmt_size=0')
def test_query_stmt_without_truncate(self):
'Check if the full query string is displayed in the query list on the WebUI.'
query_select = ('x ' * 450)
query = 'select "{0}"'.format(query_select)
expected =... | 2,366,411,541,843,872,300 | Check if the full query string is displayed in the query list on the WebUI. | tests/custom_cluster/test_web_pages.py | test_query_stmt_without_truncate | AlexanderSaydakov/impala | python | @pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--query_stmt_size=0')
def test_query_stmt_without_truncate(self):
query_select = ('x ' * 450)
query = 'select "{0}"'.format(query_select)
expected = 'select \\"{0}\\"'.format(query_select)
self.execute_query(query)
re... |
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--query_stmt_size=10')
def test_query_stmt_with_custom_length(self):
'Check if the partial query with the correct length is displayed in the query list\n on the WebUI.'
query = 'select "{0}"'.format(('x ' * 450))
expected = 'se... | 573,251,272,263,913,500 | Check if the partial query with the correct length is displayed in the query list
on the WebUI. | tests/custom_cluster/test_web_pages.py | test_query_stmt_with_custom_length | AlexanderSaydakov/impala | python | @pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(impalad_args='--query_stmt_size=10')
def test_query_stmt_with_custom_length(self):
'Check if the partial query with the correct length is displayed in the query list\n on the WebUI.'
query = 'select "{0}"'.format(('x ' * 450))
expected = 'se... |
def goal_conditions_for_demo(demo: Demonstration, behaviors: Any) -> List[str]:
'\n Infer the goal conditions of a single demonstration.\n\n Args\n ----\n demo: the demonstration to infer the goal of.\n behavior: check the behavior to remove conflicting conditions.\n\n Returns\n -------... | -8,493,976,639,920,056,000 | Infer the goal conditions of a single demonstration.
Args
----
demo: the demonstration to infer the goal of.
behavior: check the behavior to remove conflicting conditions.
Returns
-------
goals: list of the goals inferred in the demonstration. | bt_learning/bt_learning/learning_from_demo/goal_identification.py | goal_conditions_for_demo | matiov/disambiguate-BT-execution | python | def goal_conditions_for_demo(demo: Demonstration, behaviors: Any) -> List[str]:
'\n Infer the goal conditions of a single demonstration.\n\n Args\n ----\n demo: the demonstration to infer the goal of.\n behavior: check the behavior to remove conflicting conditions.\n\n Returns\n -------... |
def goal_tree(goals: List[str], behaviors: Any, world_interface: Any) -> BehaviourTree:
'\n Construct a Behavior Tree strarting from the goals.\n\n Args\n ----\n goals: list of all goals inferred from the demonstration.\n behaviors: behavior in the demontration, as defined in robot_behaviors ... | 6,080,646,337,530,809,000 | Construct a Behavior Tree strarting from the goals.
Args
----
goals: list of all goals inferred from the demonstration.
behaviors: behavior in the demontration, as defined in robot_behaviors package.
world_interface: interface to the robot.
Returns
-------
tree: a Behavior Tree of goal conditions. | bt_learning/bt_learning/learning_from_demo/goal_identification.py | goal_tree | matiov/disambiguate-BT-execution | python | def goal_tree(goals: List[str], behaviors: Any, world_interface: Any) -> BehaviourTree:
'\n Construct a Behavior Tree strarting from the goals.\n\n Args\n ----\n goals: list of all goals inferred from the demonstration.\n behaviors: behavior in the demontration, as defined in robot_behaviors ... |
def get_minibatch(roidb, num_classes):
'Given a roidb, construct a minibatch sampled from it.'
num_images = len(roidb)
random_scale_inds = npr.randint(0, high=len(cfg.TRAIN.SCALES), size=num_images)
assert ((cfg.TRAIN.BATCH_SIZE % num_images) == 0), 'num_images ({}) must divide BATCH_SIZE ({})'.format(n... | -3,172,347,574,009,824,000 | Given a roidb, construct a minibatch sampled from it. | lib/roi_data_layer/minibatch.py | get_minibatch | wennieWN/endernewton_tf-faster-rcnn | python | def get_minibatch(roidb, num_classes):
num_images = len(roidb)
random_scale_inds = npr.randint(0, high=len(cfg.TRAIN.SCALES), size=num_images)
assert ((cfg.TRAIN.BATCH_SIZE % num_images) == 0), 'num_images ({}) must divide BATCH_SIZE ({})'.format(num_images, cfg.TRAIN.BATCH_SIZE)
(im_blob, im_scale... |
def _get_image_blob(roidb, scale_inds):
'Builds an input blob from the images in the roidb at the specified\n scales.\n '
num_images = len(roidb)
processed_ims = []
im_scales = []
for i in range(num_images):
im = cv2.imread(roidb[i]['image'])
if roidb[i]['flipped']:
im ... | 1,247,642,366,500,196,600 | Builds an input blob from the images in the roidb at the specified
scales. | lib/roi_data_layer/minibatch.py | _get_image_blob | wennieWN/endernewton_tf-faster-rcnn | python | def _get_image_blob(roidb, scale_inds):
'Builds an input blob from the images in the roidb at the specified\n scales.\n '
num_images = len(roidb)
processed_ims = []
im_scales = []
for i in range(num_images):
im = cv2.imread(roidb[i]['image'])
if roidb[i]['flipped']:
im ... |
def __init__(self, *args, **kwds):
'\n Constructor. Any message fields that are implicitly/explicitly\n set to None will be assigned a default value. The recommend\n use is keyword arguments as this is more robust to future message\n changes. You cannot mix in-order arguments and keyword arguments.\n\n... | -5,999,975,263,630,756,000 | Constructor. Any message fields that are implicitly/explicitly
set to None will be assigned a default value. The recommend
use is keyword arguments as this is more robust to future message
changes. You cannot mix in-order arguments and keyword arguments.
The available fields are:
header,sysid,compid,acc,gyro,mag
... | Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py | __init__ | jessecha/OPCAS | python | def __init__(self, *args, **kwds):
'\n Constructor. Any message fields that are implicitly/explicitly\n set to None will be assigned a default value. The recommend\n use is keyword arguments as this is more robust to future message\n changes. You cannot mix in-order arguments and keyword arguments.\n\n... |
def _get_types(self):
'\n internal API method\n '
return self._slot_types | 840,424,092,067,405,300 | internal API method | Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py | _get_types | jessecha/OPCAS | python | def _get_types(self):
'\n \n '
return self._slot_types |
def serialize(self, buff):
'\n serialize message into buffer\n :param buff: buffer, ``StringIO``\n '
try:
_x = self
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
_x = self.header.frame_id
length = len(_x)
if (python... | -2,631,236,140,840,951,000 | serialize message into buffer
:param buff: buffer, ``StringIO`` | Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py | serialize | jessecha/OPCAS | python | def serialize(self, buff):
'\n serialize message into buffer\n :param buff: buffer, ``StringIO``\n '
try:
_x = self
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
_x = self.header.frame_id
length = len(_x)
if (python... |
def deserialize(self, str):
'\n unpack serialized message in str into this message instance\n :param str: byte array of serialized message, ``str``\n '
try:
if (self.header is None):
self.header = std_msgs.msg.Header()
if (self.acc is None):
self.acc = geometry_m... | 11,232,664,134,381,544 | unpack serialized message in str into this message instance
:param str: byte array of serialized message, ``str`` | Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py | deserialize | jessecha/OPCAS | python | def deserialize(self, str):
'\n unpack serialized message in str into this message instance\n :param str: byte array of serialized message, ``str``\n '
try:
if (self.header is None):
self.header = std_msgs.msg.Header()
if (self.acc is None):
self.acc = geometry_m... |
def serialize_numpy(self, buff, numpy):
'\n serialize message with numpy array types into buffer\n :param buff: buffer, ``StringIO``\n :param numpy: numpy python module\n '
try:
_x = self
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
... | -8,567,815,062,247,637,000 | serialize message with numpy array types into buffer
:param buff: buffer, ``StringIO``
:param numpy: numpy python module | Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py | serialize_numpy | jessecha/OPCAS | python | def serialize_numpy(self, buff, numpy):
'\n serialize message with numpy array types into buffer\n :param buff: buffer, ``StringIO``\n :param numpy: numpy python module\n '
try:
_x = self
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
... |
def deserialize_numpy(self, str, numpy):
'\n unpack serialized message in str into this message instance using numpy for array types\n :param str: byte array of serialized message, ``str``\n :param numpy: numpy python module\n '
try:
if (self.header is None):
self.header = std_ms... | 6,518,810,983,754,949,000 | unpack serialized message in str into this message instance using numpy for array types
:param str: byte array of serialized message, ``str``
:param numpy: numpy python module | Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py | deserialize_numpy | jessecha/OPCAS | python | def deserialize_numpy(self, str, numpy):
'\n unpack serialized message in str into this message instance using numpy for array types\n :param str: byte array of serialized message, ``str``\n :param numpy: numpy python module\n '
try:
if (self.header is None):
self.header = std_ms... |
def test_events():
'Tests that expected events are created by MOTAccumulator.update().'
acc = mm.MOTAccumulator()
acc.update([], [1, 2], [], frameid=0)
acc.update([1, 2], [], [], frameid=1)
acc.update([1, 2], [1, 2], [[1, 0.5], [0.3, 1]], frameid=2)
acc.update([1, 2], [1, 2], [[0.2, np.nan], [np... | 2,827,419,784,747,043,300 | Tests that expected events are created by MOTAccumulator.update(). | motmetrics/tests/test_mot.py | test_events | Borda/py-motmetrics | python | def test_events():
acc = mm.MOTAccumulator()
acc.update([], [1, 2], [], frameid=0)
acc.update([1, 2], [], [], frameid=1)
acc.update([1, 2], [1, 2], [[1, 0.5], [0.3, 1]], frameid=2)
acc.update([1, 2], [1, 2], [[0.2, np.nan], [np.nan, 0.1]], frameid=3)
acc.update([1, 2], [1, 2], [[5, 1], [1, ... |
def test_max_switch_time():
'Tests max_switch_time option.'
acc = mm.MOTAccumulator(max_switch_time=1)
acc.update([1, 2], [1, 2], [[1, 0.5], [0.3, 1]], frameid=1)
frameid = acc.update([1, 2], [1, 2], [[0.5, np.nan], [np.nan, 0.5]], frameid=2)
df = acc.events.loc[frameid]
assert (((df.Type == 'SW... | -84,593,867,561,195,820 | Tests max_switch_time option. | motmetrics/tests/test_mot.py | test_max_switch_time | Borda/py-motmetrics | python | def test_max_switch_time():
acc = mm.MOTAccumulator(max_switch_time=1)
acc.update([1, 2], [1, 2], [[1, 0.5], [0.3, 1]], frameid=1)
frameid = acc.update([1, 2], [1, 2], [[0.5, np.nan], [np.nan, 0.5]], frameid=2)
df = acc.events.loc[frameid]
assert (((df.Type == 'SWITCH') | (df.Type == 'RAW')) | ... |
def test_auto_id():
'Tests auto_id option.'
acc = mm.MOTAccumulator(auto_id=True)
acc.update([1, 2, 3, 4], [], [])
acc.update([1, 2, 3, 4], [], [])
assert (acc.events.index.levels[0][(- 1)] == 1)
acc.update([1, 2, 3, 4], [], [])
assert (acc.events.index.levels[0][(- 1)] == 2)
with pytest... | -1,848,275,232,027,954,400 | Tests auto_id option. | motmetrics/tests/test_mot.py | test_auto_id | Borda/py-motmetrics | python | def test_auto_id():
acc = mm.MOTAccumulator(auto_id=True)
acc.update([1, 2, 3, 4], [], [])
acc.update([1, 2, 3, 4], [], [])
assert (acc.events.index.levels[0][(- 1)] == 1)
acc.update([1, 2, 3, 4], [], [])
assert (acc.events.index.levels[0][(- 1)] == 2)
with pytest.raises(AssertionError)... |
def test_merge_dataframes():
'Tests merge_event_dataframes().'
acc = mm.MOTAccumulator()
acc.update([], [1, 2], [], frameid=0)
acc.update([1, 2], [], [], frameid=1)
acc.update([1, 2], [1, 2], [[1, 0.5], [0.3, 1]], frameid=2)
acc.update([1, 2], [1, 2], [[0.2, np.nan], [np.nan, 0.1]], frameid=3)
... | 2,031,126,333,783,907,800 | Tests merge_event_dataframes(). | motmetrics/tests/test_mot.py | test_merge_dataframes | Borda/py-motmetrics | python | def test_merge_dataframes():
acc = mm.MOTAccumulator()
acc.update([], [1, 2], [], frameid=0)
acc.update([1, 2], [], [], frameid=1)
acc.update([1, 2], [1, 2], [[1, 0.5], [0.3, 1]], frameid=2)
acc.update([1, 2], [1, 2], [[0.2, np.nan], [np.nan, 0.1]], frameid=3)
(r, mappings) = mm.MOTAccumula... |
def cutadapt_to_json(filepath, savetofile=None):
'Convert cutadapt/trim_galore output to json\n\n Parameters\n ----------\n filepath: string\n Path to trim_galore/cutadapt output.txt\n\n Returns\n -------\n json_data: dict\n '
fh = open(filepath, 'r')
trim_info = {}
len... | 6,655,342,304,274,616,000 | Convert cutadapt/trim_galore output to json
Parameters
----------
filepath: string
Path to trim_galore/cutadapt output.txt
Returns
-------
json_data: dict | riboraptor/cutadapt_to_json.py | cutadapt_to_json | saketkc/riboraptor | python | def cutadapt_to_json(filepath, savetofile=None):
'Convert cutadapt/trim_galore output to json\n\n Parameters\n ----------\n filepath: string\n Path to trim_galore/cutadapt output.txt\n\n Returns\n -------\n json_data: dict\n '
fh = open(filepath, 'r')
trim_info = {}
len... |
def get_default_conda_env(include_cloudpickle=False, keras_module=None):
'\n :return: The default Conda environment for MLflow Models produced by calls to\n :func:`save_model()` and :func:`log_model()`.\n '
import tensorflow as tf
conda_deps = []
pip_deps = []
if (keras_module is N... | -5,623,015,681,642,164,000 | :return: The default Conda environment for MLflow Models produced by calls to
:func:`save_model()` and :func:`log_model()`. | mlflow/keras.py | get_default_conda_env | AnesBenmerzoug/mlflow | python | def get_default_conda_env(include_cloudpickle=False, keras_module=None):
'\n :return: The default Conda environment for MLflow Models produced by calls to\n :func:`save_model()` and :func:`log_model()`.\n '
import tensorflow as tf
conda_deps = []
pip_deps = []
if (keras_module is N... |
def save_model(keras_model, path, conda_env=None, mlflow_model=None, custom_objects=None, keras_module=None, signature: ModelSignature=None, input_example: ModelInputExample=None, **kwargs):
'\n Save a Keras model to a path on the local file system.\n\n :param keras_model: Keras model to be saved.\n :param... | 1,466,731,621,052,774,000 | Save a Keras model to a path on the local file system.
:param keras_model: Keras model to be saved.
:param path: Local path where the model is to be saved.
:param conda_env: Either a dictionary representation of a Conda environment or the path to a
Conda environment yaml file. If provided, this decsr... | mlflow/keras.py | save_model | AnesBenmerzoug/mlflow | python | def save_model(keras_model, path, conda_env=None, mlflow_model=None, custom_objects=None, keras_module=None, signature: ModelSignature=None, input_example: ModelInputExample=None, **kwargs):
'\n Save a Keras model to a path on the local file system.\n\n :param keras_model: Keras model to be saved.\n :param... |
def log_model(keras_model, artifact_path, conda_env=None, custom_objects=None, keras_module=None, registered_model_name=None, signature: ModelSignature=None, input_example: ModelInputExample=None, **kwargs):
'\n Log a Keras model as an MLflow artifact for the current run.\n\n :param keras_model: Keras model t... | -6,210,177,250,117,643,000 | Log a Keras model as an MLflow artifact for the current run.
:param keras_model: Keras model to be saved.
:param artifact_path: Run-relative artifact path.
:param conda_env: Either a dictionary representation of a Conda environment or
the path to a Conda environment yaml file.
If pr... | mlflow/keras.py | log_model | AnesBenmerzoug/mlflow | python | def log_model(keras_model, artifact_path, conda_env=None, custom_objects=None, keras_module=None, registered_model_name=None, signature: ModelSignature=None, input_example: ModelInputExample=None, **kwargs):
'\n Log a Keras model as an MLflow artifact for the current run.\n\n :param keras_model: Keras model t... |
def _save_custom_objects(path, custom_objects):
'\n Save custom objects dictionary to a cloudpickle file so a model can be easily loaded later.\n\n :param path: An absolute path that points to the data directory within /path/to/model.\n :param custom_objects: Keras ``custom_objects`` is a dictionary mappin... | -3,764,244,966,678,153,700 | Save custom objects dictionary to a cloudpickle file so a model can be easily loaded later.
:param path: An absolute path that points to the data directory within /path/to/model.
:param custom_objects: Keras ``custom_objects`` is a dictionary mapping
names (strings) to custom classes or function... | mlflow/keras.py | _save_custom_objects | AnesBenmerzoug/mlflow | python | def _save_custom_objects(path, custom_objects):
'\n Save custom objects dictionary to a cloudpickle file so a model can be easily loaded later.\n\n :param path: An absolute path that points to the data directory within /path/to/model.\n :param custom_objects: Keras ``custom_objects`` is a dictionary mappin... |
def _load_pyfunc(path):
'\n Load PyFunc implementation. Called by ``pyfunc.load_pyfunc``.\n\n :param path: Local filesystem path to the MLflow Model with the ``keras`` flavor.\n '
import tensorflow as tf
if os.path.isfile(os.path.join(path, _KERAS_MODULE_SPEC_PATH)):
with open(os.path.join(... | -1,494,293,613,030,853,000 | Load PyFunc implementation. Called by ``pyfunc.load_pyfunc``.
:param path: Local filesystem path to the MLflow Model with the ``keras`` flavor. | mlflow/keras.py | _load_pyfunc | AnesBenmerzoug/mlflow | python | def _load_pyfunc(path):
'\n Load PyFunc implementation. Called by ``pyfunc.load_pyfunc``.\n\n :param path: Local filesystem path to the MLflow Model with the ``keras`` flavor.\n '
import tensorflow as tf
if os.path.isfile(os.path.join(path, _KERAS_MODULE_SPEC_PATH)):
with open(os.path.join(... |
def load_model(model_uri, **kwargs):
'\n Load a Keras model from a local file or a run.\n\n Extra arguments are passed through to keras.load_model.\n\n :param model_uri: The location, in URI format, of the MLflow model. For example:\n\n - ``/Users/me/path/to/local/model``\n ... | 2,781,844,495,470,014,500 | Load a Keras model from a local file or a run.
Extra arguments are passed through to keras.load_model.
:param model_uri: The location, in URI format, of the MLflow model. For example:
- ``/Users/me/path/to/local/model``
- ``relative/path/to/local/model``
- ``s3:/... | mlflow/keras.py | load_model | AnesBenmerzoug/mlflow | python | def load_model(model_uri, **kwargs):
'\n Load a Keras model from a local file or a run.\n\n Extra arguments are passed through to keras.load_model.\n\n :param model_uri: The location, in URI format, of the MLflow model. For example:\n\n - ``/Users/me/path/to/local/model``\n ... |
@experimental
def autolog():
'\n Enables automatic logging from Keras to MLflow. Autologging captures the following information:\n\n **Metrics** and **Parameters**\n - Training loss; validation loss; user-specified metrics\n - Metrics associated with the ``EarlyStopping`` callbacks: ``stopped_epoch``,... | -6,303,646,048,311,755,000 | Enables automatic logging from Keras to MLflow. Autologging captures the following information:
**Metrics** and **Parameters**
- Training loss; validation loss; user-specified metrics
- Metrics associated with the ``EarlyStopping`` callbacks: ``stopped_epoch``,
``restored_epoch``, ``restore_best_weight``, ``last_... | mlflow/keras.py | autolog | AnesBenmerzoug/mlflow | python | @experimental
def autolog():
'\n Enables automatic logging from Keras to MLflow. Autologging captures the following information:\n\n **Metrics** and **Parameters**\n - Training loss; validation loss; user-specified metrics\n - Metrics associated with the ``EarlyStopping`` callbacks: ``stopped_epoch``,... |
def __init__(self, request_id=None, loadbalancer=None):
'UpdateLoadBalancerResponse - a model defined in huaweicloud sdk'
super(UpdateLoadBalancerResponse, self).__init__()
self._request_id = None
self._loadbalancer = None
self.discriminator = None
if (request_id is not None):
self.reque... | -8,088,897,903,473,774,000 | UpdateLoadBalancerResponse - a model defined in huaweicloud sdk | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | __init__ | JeffreyDin/huaweicloud-sdk-python-v3 | python | def __init__(self, request_id=None, loadbalancer=None):
super(UpdateLoadBalancerResponse, self).__init__()
self._request_id = None
self._loadbalancer = None
self.discriminator = None
if (request_id is not None):
self.request_id = request_id
if (loadbalancer is not None):
sel... |
@property
def request_id(self):
'Gets the request_id of this UpdateLoadBalancerResponse.\n\n 请求ID。 注:自动生成 。\n\n :return: The request_id of this UpdateLoadBalancerResponse.\n :rtype: str\n '
return self._request_id | -8,462,964,027,465,042,000 | Gets the request_id of this UpdateLoadBalancerResponse.
请求ID。 注:自动生成 。
:return: The request_id of this UpdateLoadBalancerResponse.
:rtype: str | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | request_id | JeffreyDin/huaweicloud-sdk-python-v3 | python | @property
def request_id(self):
'Gets the request_id of this UpdateLoadBalancerResponse.\n\n 请求ID。 注:自动生成 。\n\n :return: The request_id of this UpdateLoadBalancerResponse.\n :rtype: str\n '
return self._request_id |
@request_id.setter
def request_id(self, request_id):
'Sets the request_id of this UpdateLoadBalancerResponse.\n\n 请求ID。 注:自动生成 。\n\n :param request_id: The request_id of this UpdateLoadBalancerResponse.\n :type: str\n '
self._request_id = request_id | 72,391,224,966,096,530 | Sets the request_id of this UpdateLoadBalancerResponse.
请求ID。 注:自动生成 。
:param request_id: The request_id of this UpdateLoadBalancerResponse.
:type: str | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | request_id | JeffreyDin/huaweicloud-sdk-python-v3 | python | @request_id.setter
def request_id(self, request_id):
'Sets the request_id of this UpdateLoadBalancerResponse.\n\n 请求ID。 注:自动生成 。\n\n :param request_id: The request_id of this UpdateLoadBalancerResponse.\n :type: str\n '
self._request_id = request_id |
@property
def loadbalancer(self):
'Gets the loadbalancer of this UpdateLoadBalancerResponse.\n\n\n :return: The loadbalancer of this UpdateLoadBalancerResponse.\n :rtype: LoadBalancer\n '
return self._loadbalancer | 6,225,271,543,845,143,000 | Gets the loadbalancer of this UpdateLoadBalancerResponse.
:return: The loadbalancer of this UpdateLoadBalancerResponse.
:rtype: LoadBalancer | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | loadbalancer | JeffreyDin/huaweicloud-sdk-python-v3 | python | @property
def loadbalancer(self):
'Gets the loadbalancer of this UpdateLoadBalancerResponse.\n\n\n :return: The loadbalancer of this UpdateLoadBalancerResponse.\n :rtype: LoadBalancer\n '
return self._loadbalancer |
@loadbalancer.setter
def loadbalancer(self, loadbalancer):
'Sets the loadbalancer of this UpdateLoadBalancerResponse.\n\n\n :param loadbalancer: The loadbalancer of this UpdateLoadBalancerResponse.\n :type: LoadBalancer\n '
self._loadbalancer = loadbalancer | -8,328,612,680,979,810,000 | Sets the loadbalancer of this UpdateLoadBalancerResponse.
:param loadbalancer: The loadbalancer of this UpdateLoadBalancerResponse.
:type: LoadBalancer | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | loadbalancer | JeffreyDin/huaweicloud-sdk-python-v3 | python | @loadbalancer.setter
def loadbalancer(self, loadbalancer):
'Sets the loadbalancer of this UpdateLoadBalancerResponse.\n\n\n :param loadbalancer: The loadbalancer of this UpdateLoadBalancerResponse.\n :type: LoadBalancer\n '
self._loadbalancer = loadbalancer |
def to_dict(self):
'Returns the model properties as a dict'
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
e... | 2,594,216,033,120,720,000 | Returns the model properties as a dict | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | to_dict | JeffreyDin/huaweicloud-sdk-python-v3 | python | def to_dict(self):
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
elif hasattr(value, 'to_dict'):
... |
def to_str(self):
'Returns the string representation of the model'
return pprint.pformat(self.to_dict()) | 5,849,158,643,760,736,000 | Returns the string representation of the model | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | to_str | JeffreyDin/huaweicloud-sdk-python-v3 | python | def to_str(self):
return pprint.pformat(self.to_dict()) |
def __repr__(self):
'For `print` and `pprint`'
return self.to_str() | -8,960,031,694,814,905,000 | For `print` and `pprint` | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | __repr__ | JeffreyDin/huaweicloud-sdk-python-v3 | python | def __repr__(self):
return self.to_str() |
def __eq__(self, other):
'Returns true if both objects are equal'
if (not isinstance(other, UpdateLoadBalancerResponse)):
return False
return (self.__dict__ == other.__dict__) | -2,017,557,468,176,576,300 | Returns true if both objects are equal | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | __eq__ | JeffreyDin/huaweicloud-sdk-python-v3 | python | def __eq__(self, other):
if (not isinstance(other, UpdateLoadBalancerResponse)):
return False
return (self.__dict__ == other.__dict__) |
def __ne__(self, other):
'Returns true if both objects are not equal'
return (not (self == other)) | 7,764,124,047,908,058,000 | Returns true if both objects are not equal | huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py | __ne__ | JeffreyDin/huaweicloud-sdk-python-v3 | python | def __ne__(self, other):
return (not (self == other)) |
def get_regions():
'Return an array of the regions this account is active in. Ordered with us-east-1 in the front.'
ec2 = boto3.client('ec2')
response = ec2.describe_regions()
output = ['us-east-1']
for r in response['Regions']:
if (r['RegionName'] == 'us-east-1'):
continue
... | 605,186,307,391,275,400 | Return an array of the regions this account is active in. Ordered with us-east-1 in the front. | scripts/extract_findings_to_csv.py | get_regions | jchrisfarris/aws-macie-automations | python | def get_regions():
ec2 = boto3.client('ec2')
response = ec2.describe_regions()
output = ['us-east-1']
for r in response['Regions']:
if (r['RegionName'] == 'us-east-1'):
continue
output.append(r['RegionName'])
return output |
def _get_rc_timezone():
'\n Retrieve the preferred timeszone from the rcParams dictionary.\n '
s = matplotlib.rcParams['timezone']
if (s == 'UTC'):
return UTC
import pytz
return pytz.timezone(s) | 8,285,655,359,077,192,000 | Retrieve the preferred timeszone from the rcParams dictionary. | env/lib/python2.7/site-packages/matplotlib/dates.py | _get_rc_timezone | rbalda/neural_ocr | python | def _get_rc_timezone():
'\n \n '
s = matplotlib.rcParams['timezone']
if (s == 'UTC'):
return UTC
import pytz
return pytz.timezone(s) |
def _to_ordinalf(dt):
'\n Convert :mod:`datetime` or :mod:`date` to the Gregorian date as UTC float\n days, preserving hours, minutes, seconds and microseconds. Return value\n is a :func:`float`.\n '
if (hasattr(dt, 'tzinfo') and (dt.tzinfo is not None)):
delta = dt.tzinfo.utcoffset(dt)
... | -4,235,236,962,482,482,700 | Convert :mod:`datetime` or :mod:`date` to the Gregorian date as UTC float
days, preserving hours, minutes, seconds and microseconds. Return value
is a :func:`float`. | env/lib/python2.7/site-packages/matplotlib/dates.py | _to_ordinalf | rbalda/neural_ocr | python | def _to_ordinalf(dt):
'\n Convert :mod:`datetime` or :mod:`date` to the Gregorian date as UTC float\n days, preserving hours, minutes, seconds and microseconds. Return value\n is a :func:`float`.\n '
if (hasattr(dt, 'tzinfo') and (dt.tzinfo is not None)):
delta = dt.tzinfo.utcoffset(dt)
... |
def _from_ordinalf(x, tz=None):
"\n Convert Gregorian float of the date, preserving hours, minutes,\n seconds and microseconds. Return value is a :class:`datetime`.\n\n The input date `x` is a float in ordinal days at UTC, and the output will\n be the specified :class:`datetime` object corresponding to... | 6,921,709,850,315,226,000 | Convert Gregorian float of the date, preserving hours, minutes,
seconds and microseconds. Return value is a :class:`datetime`.
The input date `x` is a float in ordinal days at UTC, and the output will
be the specified :class:`datetime` object corresponding to that time in
timezone `tz`, or if `tz` is `None`, in the t... | env/lib/python2.7/site-packages/matplotlib/dates.py | _from_ordinalf | rbalda/neural_ocr | python | def _from_ordinalf(x, tz=None):
"\n Convert Gregorian float of the date, preserving hours, minutes,\n seconds and microseconds. Return value is a :class:`datetime`.\n\n The input date `x` is a float in ordinal days at UTC, and the output will\n be the specified :class:`datetime` object corresponding to... |
def datestr2num(d, default=None):
'\n Convert a date string to a datenum using\n :func:`dateutil.parser.parse`.\n\n Parameters\n ----------\n d : string or sequence of strings\n The dates to convert.\n\n default : datetime instance\n The default date to use when fields are missing in... | 3,791,047,595,217,189,000 | Convert a date string to a datenum using
:func:`dateutil.parser.parse`.
Parameters
----------
d : string or sequence of strings
The dates to convert.
default : datetime instance
The default date to use when fields are missing in `d`. | env/lib/python2.7/site-packages/matplotlib/dates.py | datestr2num | rbalda/neural_ocr | python | def datestr2num(d, default=None):
'\n Convert a date string to a datenum using\n :func:`dateutil.parser.parse`.\n\n Parameters\n ----------\n d : string or sequence of strings\n The dates to convert.\n\n default : datetime instance\n The default date to use when fields are missing in... |
def date2num(d):
'\n *d* is either a :class:`datetime` instance or a sequence of datetimes.\n\n Return value is a floating point number (or sequence of floats)\n which gives the number of days (fraction part represents hours,\n minutes, seconds) since 0001-01-01 00:00:00 UTC, *plus* *one*.\n The addi... | 2,110,665,873,702,849,000 | *d* is either a :class:`datetime` instance or a sequence of datetimes.
Return value is a floating point number (or sequence of floats)
which gives the number of days (fraction part represents hours,
minutes, seconds) since 0001-01-01 00:00:00 UTC, *plus* *one*.
The addition of one here is a historical artifact. Also,... | env/lib/python2.7/site-packages/matplotlib/dates.py | date2num | rbalda/neural_ocr | python | def date2num(d):
'\n *d* is either a :class:`datetime` instance or a sequence of datetimes.\n\n Return value is a floating point number (or sequence of floats)\n which gives the number of days (fraction part represents hours,\n minutes, seconds) since 0001-01-01 00:00:00 UTC, *plus* *one*.\n The addi... |
def julian2num(j):
'\n Convert a Julian date (or sequence) to a matplotlib date (or sequence).\n '
if cbook.iterable(j):
j = np.asarray(j)
return (j - JULIAN_OFFSET) | 6,728,965,020,165,259,000 | Convert a Julian date (or sequence) to a matplotlib date (or sequence). | env/lib/python2.7/site-packages/matplotlib/dates.py | julian2num | rbalda/neural_ocr | python | def julian2num(j):
'\n \n '
if cbook.iterable(j):
j = np.asarray(j)
return (j - JULIAN_OFFSET) |
def num2julian(n):
'\n Convert a matplotlib date (or sequence) to a Julian date (or sequence).\n '
if cbook.iterable(n):
n = np.asarray(n)
return (n + JULIAN_OFFSET) | -5,886,472,614,472,625,000 | Convert a matplotlib date (or sequence) to a Julian date (or sequence). | env/lib/python2.7/site-packages/matplotlib/dates.py | num2julian | rbalda/neural_ocr | python | def num2julian(n):
'\n \n '
if cbook.iterable(n):
n = np.asarray(n)
return (n + JULIAN_OFFSET) |
def num2date(x, tz=None):
'\n *x* is a float value which gives the number of days\n (fraction part represents hours, minutes, seconds) since\n 0001-01-01 00:00:00 UTC *plus* *one*.\n The addition of one here is a historical artifact. Also, note\n that the Gregorian calendar is assumed; this is not u... | -4,338,585,028,737,360,400 | *x* is a float value which gives the number of days
(fraction part represents hours, minutes, seconds) since
0001-01-01 00:00:00 UTC *plus* *one*.
The addition of one here is a historical artifact. Also, note
that the Gregorian calendar is assumed; this is not universal
practice. For details, see the module docstring... | env/lib/python2.7/site-packages/matplotlib/dates.py | num2date | rbalda/neural_ocr | python | def num2date(x, tz=None):
'\n *x* is a float value which gives the number of days\n (fraction part represents hours, minutes, seconds) since\n 0001-01-01 00:00:00 UTC *plus* *one*.\n The addition of one here is a historical artifact. Also, note\n that the Gregorian calendar is assumed; this is not u... |
def drange(dstart, dend, delta):
'\n Return a date range as float Gregorian ordinals. *dstart* and\n *dend* are :class:`datetime` instances. *delta* is a\n :class:`datetime.timedelta` instance.\n '
f1 = _to_ordinalf(dstart)
f2 = _to_ordinalf(dend)
step = (_total_seconds(delta) / SEC_PER_DA... | 2,959,573,575,103,759,400 | Return a date range as float Gregorian ordinals. *dstart* and
*dend* are :class:`datetime` instances. *delta* is a
:class:`datetime.timedelta` instance. | env/lib/python2.7/site-packages/matplotlib/dates.py | drange | rbalda/neural_ocr | python | def drange(dstart, dend, delta):
'\n Return a date range as float Gregorian ordinals. *dstart* and\n *dend* are :class:`datetime` instances. *delta* is a\n :class:`datetime.timedelta` instance.\n '
f1 = _to_ordinalf(dstart)
f2 = _to_ordinalf(dend)
step = (_total_seconds(delta) / SEC_PER_DA... |
def _close_to_dt(d1, d2, epsilon=5):
'\n Assert that datetimes *d1* and *d2* are within *epsilon* microseconds.\n '
delta = (d2 - d1)
mus = abs((_total_seconds(delta) * 1000000.0))
assert (mus < epsilon) | -2,725,794,435,686,897,000 | Assert that datetimes *d1* and *d2* are within *epsilon* microseconds. | env/lib/python2.7/site-packages/matplotlib/dates.py | _close_to_dt | rbalda/neural_ocr | python | def _close_to_dt(d1, d2, epsilon=5):
'\n \n '
delta = (d2 - d1)
mus = abs((_total_seconds(delta) * 1000000.0))
assert (mus < epsilon) |
def _close_to_num(o1, o2, epsilon=5):
'\n Assert that float ordinals *o1* and *o2* are within *epsilon*\n microseconds.\n '
delta = abs(((o2 - o1) * MUSECONDS_PER_DAY))
assert (delta < epsilon) | -7,665,723,005,057,277,000 | Assert that float ordinals *o1* and *o2* are within *epsilon*
microseconds. | env/lib/python2.7/site-packages/matplotlib/dates.py | _close_to_num | rbalda/neural_ocr | python | def _close_to_num(o1, o2, epsilon=5):
'\n Assert that float ordinals *o1* and *o2* are within *epsilon*\n microseconds.\n '
delta = abs(((o2 - o1) * MUSECONDS_PER_DAY))
assert (delta < epsilon) |
def epoch2num(e):
'\n Convert an epoch or sequence of epochs to the new date format,\n that is days since 0001.\n '
return (EPOCH_OFFSET + (np.asarray(e) / SEC_PER_DAY)) | -4,557,584,763,846,818,000 | Convert an epoch or sequence of epochs to the new date format,
that is days since 0001. | env/lib/python2.7/site-packages/matplotlib/dates.py | epoch2num | rbalda/neural_ocr | python | def epoch2num(e):
'\n Convert an epoch or sequence of epochs to the new date format,\n that is days since 0001.\n '
return (EPOCH_OFFSET + (np.asarray(e) / SEC_PER_DAY)) |
def num2epoch(d):
'\n Convert days since 0001 to epoch. *d* can be a number or sequence.\n '
return ((np.asarray(d) - EPOCH_OFFSET) * SEC_PER_DAY) | 3,946,712,163,784,859,600 | Convert days since 0001 to epoch. *d* can be a number or sequence. | env/lib/python2.7/site-packages/matplotlib/dates.py | num2epoch | rbalda/neural_ocr | python | def num2epoch(d):
'\n \n '
return ((np.asarray(d) - EPOCH_OFFSET) * SEC_PER_DAY) |
def mx2num(mxdates):
'\n Convert mx :class:`datetime` instance (or sequence of mx\n instances) to the new date format.\n '
scalar = False
if (not cbook.iterable(mxdates)):
scalar = True
mxdates = [mxdates]
ret = epoch2num([m.ticks() for m in mxdates])
if scalar:
retu... | -492,982,039,525,289,340 | Convert mx :class:`datetime` instance (or sequence of mx
instances) to the new date format. | env/lib/python2.7/site-packages/matplotlib/dates.py | mx2num | rbalda/neural_ocr | python | def mx2num(mxdates):
'\n Convert mx :class:`datetime` instance (or sequence of mx\n instances) to the new date format.\n '
scalar = False
if (not cbook.iterable(mxdates)):
scalar = True
mxdates = [mxdates]
ret = epoch2num([m.ticks() for m in mxdates])
if scalar:
retu... |
def date_ticker_factory(span, tz=None, numticks=5):
'\n Create a date locator with *numticks* (approx) and a date formatter\n for *span* in days. Return value is (locator, formatter).\n '
if (span == 0):
span = (1 / HOURS_PER_DAY)
mins = (span * MINUTES_PER_DAY)
hrs = (span * HOURS_PER... | -7,755,151,327,285,663,000 | Create a date locator with *numticks* (approx) and a date formatter
for *span* in days. Return value is (locator, formatter). | env/lib/python2.7/site-packages/matplotlib/dates.py | date_ticker_factory | rbalda/neural_ocr | python | def date_ticker_factory(span, tz=None, numticks=5):
'\n Create a date locator with *numticks* (approx) and a date formatter\n for *span* in days. Return value is (locator, formatter).\n '
if (span == 0):
span = (1 / HOURS_PER_DAY)
mins = (span * MINUTES_PER_DAY)
hrs = (span * HOURS_PER... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.