code stringlengths 3 6.57k |
|---|
mock.patch("esrally.utils.process.run_subprocess_with_logging") |
test_pull(self, run_subprocess_with_logging, run_subprocess) |
git.pull("/src", remote="my-origin", branch="feature-branch") |
mock.call("git -C /src fetch --prune --quiet my-origin") |
mock.call("git -C /src checkout --quiet feature-branch") |
mock.call("git -C /src rebase --quiet my-origin/feature-branch") |
run_subprocess.assert_has_calls(calls) |
mock.patch("esrally.utils.process.run_subprocess") |
mock.patch("esrally.utils.process.run_subprocess_with_logging") |
test_pull_ts(self, run_subprocess_with_logging, run_subprocess) |
git.pull_ts("/src", "20160101T110000Z") |
mock.patch("esrally.utils.process.run_subprocess") |
mock.patch("esrally.utils.process.run_subprocess_with_logging") |
test_pull_revision(self, run_subprocess_with_logging, run_subprocess) |
git.pull_revision("/src", "3694a07") |
run_subprocess.assert_called_with("git -C /src fetch --quiet origin && git -C /src checkout --quiet 3694a07") |
mock.patch("esrally.utils.process.run_subprocess_with_output") |
mock.patch("esrally.utils.process.run_subprocess_with_logging") |
test_head_revision(self, run_subprocess_with_logging, run_subprocess) |
self.assertEqual("3694a07", git.head_revision("/src") |
run_subprocess.assert_called_with("git -C /src rev-parse --short HEAD") |
mock.patch("esrally.utils.process.run_subprocess_with_output") |
mock.patch("esrally.utils.process.run_subprocess_with_logging") |
test_list_remote_branches(self, run_subprocess_with_logging, run_subprocess) |
self.assertEqual(["master", "5.0.0-alpha1", "5"], git.branches("/src", remote=True) |
run_subprocess.assert_called_with("git -C /src for-each-ref refs/remotes/ --format='%(refname:short) |
mock.patch("esrally.utils.process.run_subprocess_with_output") |
mock.patch("esrally.utils.process.run_subprocess_with_logging") |
test_list_local_branches(self, run_subprocess_with_logging, run_subprocess) |
self.assertEqual(["master", "5.0.0-alpha1", "5"], git.branches("/src", remote=False) |
run_subprocess.assert_called_with("git -C /src for-each-ref refs/heads/ --format='%(refname:short) |
ray.init(address="auto") |
argparse.ArgumentParser() |
nodes (includes head) |
parser.add_argument("max_time_s", type=int, help="Wait for this number of seconds") |
parser.parse_args() |
time.time() |
time.time() |
time.sleep(5) |
len(ray.nodes() |
time.time() |
Flag(object) |
__init__(self, opts: Options) |
Manager() |
dict() |
set(self, flag_range, value, iter) |
tuple([n for n in flag_range(o) |
list(itertools.product(*indices) |
self.flag.update(tmp_flag) |
get(self, i) |
self.flag.get(i, 0) |
os.path.join(os.path.dirname(os.path.realpath(__file__) |
open(requirements_path) |
requirements_file.readlines() |
find_packages(exclude=['tests*']) |
provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
EcommerceProductImage2(object) |
swagger_types (dict) |
attribute_map (dict) |
__init__(self, id=None, url=None, variant_ids=None) |
id(self) |
id(self, id) |
url(self) |
url(self, url) |
variant_ids(self) |
variant_ids(self, variant_ids) |
to_dict(self) |
six.iteritems(self.swagger_types) |
getattr(self, attr) |
isinstance(value, list) |
x.to_dict() |
hasattr(x, "to_dict") |
hasattr(value, "to_dict") |
value.to_dict() |
isinstance(value, dict) |
to_dict() |
hasattr(item[1], "to_dict") |
value.items() |
issubclass(EcommerceProductImage2, dict) |
self.items() |
to_str(self) |
pprint.pformat(self.to_dict() |
__repr__(self) |
self.to_str() |
__eq__(self, other) |
isinstance(other, EcommerceProductImage2) |
__ne__(self, other) |
main() |
OptionParser(usage=usage) |
parser.add_option("-a", "--a_descrip", action="store_true", help="This is a flat") |
parser.add_option("-b", "--b_descrip", help="This is an argument") |
parser.parse_args() |
open('transfected_sample_raw_metadata.json', 'r') |
json.load(f) |
open('genes.tsv', 'r') |
enumerate(f) |
l.split() |
len(toks) |
main() |
and (lambda x:x) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.