Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
14,501
[ 0.02474268712103367, 0.036983806639909744, 0.0190748143941164, -0.015738582238554955, -0.013146490789949894, 0.037132635712623596, 0.013096881099045277, 0.023986143991351128, 0.014944830909371376, 0.013630182482302189, 0.010641216300427914, -0.013121685944497585, 0.04075412079691887, 0.041...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testErrorDuringRun(self): wrapper = TestDebugWrapperSession(self._sess, self._dump_root, self._observer) # No matrix size mismatch. self.assertAllClose( np.array([[11.0], [-1.0]]), wrapper.run(self._q, feed_dict={self._ph: np.array([[1.0], [2.0]])}...
14,502
[ -0.014171323738992214, 0.003815356409177184, 0.04206645488739014, -0.03442426770925522, 0.0374765545129776, 0.0160417091101408, -0.0022461835760623217, 0.05484933406114578, 0.02604769729077816, -0.017430154606699944, 0.019839853048324585, 0.011618190445005894, 0.03825683891773224, 0.012117...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testUsingNonDirectSessionRaisesNotImplementedError(self): # TODO(cais): Remove this test once tfdbg is integrated with GrpcSession. fake_non_direct_session = session.Session() fake_non_direct_session._target = "foo" with self.assertRaisesRegexp( NotImplementedError, r"Non-DirectSess...
14,503
[ 0.010757028125226498, 0.039937328547239304, -0.035985540598630905, -0.03128313645720482, 0.018092118203639984, 0.0002652691910043359, -0.03410899639129639, 0.017816154286265373, 0.009564869105815887, 0.03126106038689613, 0.011833282187581062, -0.06287535279989243, 0.042277492582798004, -0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "error_class", "ctx": {"_type": "Store", "_fields": {}...
class IfParser(object): error_class = ValueError def __init__(self, tokens): # pre-pass necessary to turn 'not','in' into single token l = len(tokens) mapped_tokens = [] i = 0 while i < l: token = tokens[i] if token == "not" and i + 1 < l and tok...
14,504
[ 0.016774633899331093, 0.00151949527207762, 0.004294710233807564, -0.03847109526395798, 0.01499136257916689, -0.05126309022307396, 0.003617067588493228, 0.02484690584242344, -0.047411225736141205, 0.04722100868821144, -0.009819877333939075, -0.018189361318945885, -0.0211852565407753, -0.009...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "tokens", "annotation": null, "type_comment": null}}], "kwarg": nu...
def __init__(self, tokens): # pre-pass necessary to turn 'not','in' into single token l = len(tokens) mapped_tokens = [] i = 0 while i < l: token = tokens[i] if token == "not" and i + 1 < l and tokens[i+1] == "in": token = "not in" ...
14,505
[ 0.03246060758829117, -0.0214858315885067, 0.05080343037843704, -0.021163802593946457, -0.0075354985892772675, 0.012707297690212727, -0.0014265922363847494, 0.03941645473241806, -0.00018999760504812002, 0.034470073878765106, 0.007593464106321335, -0.012971362099051476, -0.023070218041539192, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "rbp", "annotation": null, "type_comment": null}}], "kwarg": null,...
def expression(self, rbp=0): t = self.current_token self.current_token = self.next() left = t.nud(self) while rbp < self.current_token.lbp: t = self.current_token self.current_token = self.next() left = t.led(left, self) return left
14,506
[ -0.0038505801931023598, -0.01705482229590416, 0.03146059811115265, -0.0182153582572937, -0.007089356891810894, -0.008193126879632473, -0.0033996114507317543, 0.0022769197821617126, 0.02881154976785183, -0.012406374327838421, 0.06044875085353851, -0.020385054871439934, -0.00299121649004519, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "application/json"}}, "targets": [{"_type": "Name", "_fields": {"id": "content_type", "ctx": {"_type": "Store", "_fields": {}}}}], "type_c...
class ExtendedAvailabilityZoneTest(test.TestCase): content_type = 'application/json' prefix = 'OS-EXT-AZ:' def setUp(self): super(ExtendedAvailabilityZoneTest, self).setUp() availability_zones.reset_cache() fakes.stub_out_nw_api(self.stubs) self.stubs.Set(compute.api.API, 'g...
14,507
[ 0.00414787232875824, -0.0119124511256814, -0.0021873312070965767, -0.05056226626038551, -0.003073603380471468, -0.04170551523566246, 0.013141891919076443, 0.0007609406020492315, 0.002600626554340124, -0.017236050218343735, 0.030079534277319908, -0.01619759015738964, -0.014168416149914265, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def fake_compute_get_all(*args, **kwargs): inst1 = fakes.stub_instance(1, uuid=UUID1, host="all-host", vm_state=vm_states.ACTIVE) inst2 = fakes.stub_instance(2, uuid=UUID2, host="all-host", vm_state=vm_states.ACTIVE) db_list = [inst1, inst2] ...
14,508
[ -0.010955652222037315, 0.001135838683694601, 0.008249775506556034, -0.0009502030443400145, 0.012541421689093113, -0.05009017139673233, -0.02076602727174759, 0.02070309966802597, 0.038033291697502136, -0.012812009081244469, 0.046918634325265884, -0.021747693419456482, 0.0067772758193314075, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_show_no_host_az(self): self.stubs.Set(compute.api.API, 'get', fake_compute_get_az) self.stubs.Set(availability_zones, 'get_host_availability_zone', fake_get_no_host_availability_zone) url = '/v2/fake/servers/%s' % UUID3 res = self._make_request(url) ...
14,509
[ 0.006632192060351372, -0.018031837418675423, 0.05952678993344307, -0.019323274493217468, -0.048109039664268494, 0.0049666003324091434, 0.02284756861627102, -0.00048768334090709686, 0.004287690855562687, -0.01486962754279375, 0.0555197149515152, 0.01513515692204237, -0.03760857135057449, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): super(ExtendedAvailabilityZoneTest, self).setUp() availability_zones.reset_cache() fakes.stub_out_nw_api(self.stubs) self.stubs.Set(compute.api.API, 'get', fake_compute_get) self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all) self.stubs.Set(a...
14,510
[ -0.008240705356001854, -0.007089247461408377, 0.02182168699800968, -0.010973083786666393, 0.022182684391736984, -0.05377620458602905, -0.01861005276441574, 0.02818271331489086, 0.04319523647427559, -0.008763529360294342, 0.041950419545173645, -0.032390203326940536, -0.009105854667723179, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_show_empty_host_az(self): self.stubs.Set(compute.api.API, 'get', fake_compute_get_empty) self.stubs.Set(availability_zones, 'get_host_availability_zone', fake_get_no_host_availability_zone) url = '/v2/fake/servers/%s' % UUID3 res = self._make_request(url)...
14,511
[ 0.004014029633253813, -0.02865879237651825, -0.029594101011753082, -0.00950896367430687, 0.047436896711587906, -0.035277895629405975, -0.030265603214502335, 0.022807123139500618, 0.019185801967978477, -0.032088253647089005, 0.02726782113313675, -0.04597397893667221, -0.003111697267740965, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_no_instance_passthrough_404(self): def fake_compute_get(*args, **kwargs): raise exception.InstanceNotFound(instance_id='fake') self.stubs.Set(compute.api.API, 'get', fake_compute_get) url = '/v2/fake/servers/70f6db34-de8d-4fbd-aafb-4065bdfa6115' res = self._make_re...
14,512
[ 0.06700562685728073, -0.030542390421032906, -0.0176582969725132, 0.025955820456147194, 0.012602644972503185, 0.039861466735601425, -0.008016074076294899, 0.015187802724540234, -0.025768186897039413, -0.002148651983588934, -0.018784090876579285, -0.04774203151464462, 0.041216589510440826, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "errcode", "annotation"...
class SelectorError(Exception): def __init__(self, errcode): super(SelectorError, self).__init__() self.errno = errcode def __repr__(self): return "<SelectorError errno={0}>".format(self.errno) def __str__(self): return self.__repr__()
14,513
[ 0.03607797250151634, 0.021799447014927864, 0.06407376378774643, -0.01075940765440464, 0.000999749405309558, 0.004515359178185463, 0.032957352697849274, -0.01956562139093876, 0.01961052231490612, -0.00917664635926485, 0.020946327596902847, -0.030375542119145393, 0.012841693125665188, 0.0022...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "application/xml"}}, "targets": [{"_type": "Name", "_fields": {"id": "content_type", "ctx": {"_type": "Store", "_fields": {}}}}], "type_co...
class ExtendedAvailabilityZoneXmlTest(ExtendedAvailabilityZoneTest): content_type = 'application/xml' prefix = '{%s}' % extended_availability_zone.\ Extended_availability_zone.namespace def _get_server(self, body): return etree.XML(body) def _get_servers(self, body): ...
14,514
[ 0.016603313386440277, 0.01903049275279045, 0.04683166369795799, -0.0109457578510046, 0.026358934119343758, -0.022114301100373268, 0.026382384821772575, 0.022161202505230904, -0.03573933616280556, 0.02149284817278385, 0.02842262201011181, -0.017822766676545143, 0.004438103176653385, 0.04225...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation": null, "type_comment": null}}], "kwarg": n...
def select(self, timeout=None): # Selecting on empty lists on Windows errors out. if not len(self._readers) and not len(self._writers): return [] timeout = None if timeout is None else max(timeout, 0.0) ready = [] r, w, _ = _syscall_wrapper(se...
14,515
[ 0.04467843100428581, 0.015308658592402935, 0.004876501392573118, -0.0014574122615158558, -0.008056575432419777, 0.02462443895637989, 0.028751829639077187, -0.0034161745570600033, -0.012102351523935795, -0.011023866944015026, 0.030384132638573647, 0.012545404955744743, 0.033019132912158966, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fileobj", "annotation": null, "type_comment": null}}, {"_type": "...
def register(self, fileobj, events, data=None): key = super(PollSelector, self).register(fileobj, events, data) event_mask = 0 if events & EVENT_READ: event_mask |= select.POLLIN if events & EVENT_WRITE: event_mask |= select.POLLOUT ...
14,516
[ 0.057811323553323746, 0.02293303981423378, 0.01786087080836296, -0.013233230449259281, 0.023263586685061455, 0.02086997777223587, 0.0050151776522397995, 0.023662520572543144, -0.010366600006818771, 0.0009082885808311403, 0.04773537442088127, -0.0036588001530617476, -0.004955337382853031, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation": null, "type_comment": null}}], "kwarg": n...
def select(self, timeout=None): ready = [] fd_events = _syscall_wrapper(self._wrap_poll, True, timeout=timeout) for fd, event_mask in fd_events: events = 0 if event_mask & ~select.POLLIN: events |= EVENT_WRITE if eve...
14,517
[ 0.04670824110507965, 0.004548214841634035, 0.006457414478063583, 0.006655924487859011, -0.00256749358959496, 0.02912258915603161, 0.03708634525537491, 0.005359770730137825, -0.024918846786022186, -0.008816180750727654, 0.042037416249513626, 0.002015752485021949, 0.0214390829205513, 0.01388...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fileobj", "annotation": null, "type_comment": null}}, {"_type": "...
def register(self, fileobj, events, data=None): key = super(EpollSelector, self).register(fileobj, events, data) events_mask = 0 if events & EVENT_READ: events_mask |= select.EPOLLIN if events & EVENT_WRITE: events_mask |= select.EPOLLOUT ...
14,518
[ 0.040185216814279556, 0.0025866965297609568, -0.021748095750808716, 0.006372486706823111, -0.007852219045162201, 0.04029860720038414, 0.02514977753162384, 0.03115941770374775, 0.0021203826181590557, -0.002782293362542987, 0.052340567111968994, -0.029957490041851997, 0.02014930360019207, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fileobj", "annotation": null, "type_comment": null}}], "kwarg": n...
def unregister(self, fileobj): key = super(EpollSelector, self).unregister(fileobj) try: _syscall_wrapper(self._epoll.unregister, False, key.fd) except SelectorError: # This can occur when the fd was closed since registry. pass ...
14,519
[ 0.06398395448923111, -0.0054045021533966064, 0.019052404910326004, -0.013988124206662178, 0.02672690898180008, 0.03868485987186432, 0.02648150362074375, 0.011232887394726276, -0.010881510563194752, 0.0009000532445497811, 0.04299061372876167, -0.035784609615802765, -0.01713377796113491, 0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation": null, "type_comment": null}}], "kwarg": n...
def select(self, timeout=None): if timeout is not None: if timeout <= 0: timeout = 0.0 else: # select.epoll.poll() has a resolution of 1 millisecond # but luckily takes seconds so we don't need a wrapper ...
14,520
[ 0.057811323553323746, 0.02293303981423378, 0.01786087080836296, -0.013233230449259281, 0.023263586685061455, 0.02086997777223587, 0.0050151776522397995, 0.023662520572543144, -0.010366600006818771, 0.0009082885808311403, 0.04773537442088127, -0.0036588001530617476, -0.004955337382853031, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation": null, "type_comment": null}}], "kwarg": n...
def select(self, timeout=None): ready = [] fd_events = _syscall_wrapper(self._wrap_poll, True, timeout=timeout) for fd, event_mask in fd_events: events = 0 if event_mask & ~select.POLLIN: events |= EVENT_WRITE if eve...
14,521
[ 0.0438009575009346, 0.009012890048325062, 0.01930130086839199, -0.016256894916296005, 0.002696947893127799, 0.027820829302072525, 0.016870589926838875, -0.006792758591473103, -0.010480944067239761, -0.009897331707179546, 0.03778434544801712, 0.007328237406909466, 0.005965474061667919, 0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fileobj", "annotation": null, "type_comment": null}}, {"_type": "...
def register(self, fileobj, events, data=None): key = super(DevpollSelector, self).register(fileobj, events, data) poll_events = 0 if events & EVENT_READ: poll_events |= select.POLLIN if events & EVENT_WRITE: poll_events |= select.POLLOUT ...
14,522
[ 0.022139236330986023, 0.023497752845287323, -0.018547222018241882, -0.01219212170690298, 0.004124483093619347, 0.0529131181538105, 0.02021658793091774, 0.02666379138827324, -0.038614142686128616, -0.02896636351943016, 0.03032488189637661, 0.011081130243837833, 0.02687102183699608, 0.040064...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fileobj", "annotation": null, "type_comment": null}}, {"_type": "...
def register(self, fileobj, events, data=None): key = super(KqueueSelector, self).register(fileobj, events, data) if events & EVENT_READ: kevent = select.kevent(key.fd, select.KQ_FILTER_READ, select.KQ_...
14,523
[ 0.021045172587037086, 0.019856851547956467, -0.054092392325401306, -0.006464468780905008, -0.011069214902818203, 0.052096012979745865, 0.006797198671847582, 0.03764602541923523, -0.0031460809987038374, -0.021805699914693832, 0.04477595165371895, -0.010445346124470234, 0.016470136120915413, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fileobj", "annotation": null, "type_comment": null}}], "kwarg": n...
def unregister(self, fileobj): key = super(KqueueSelector, self).unregister(fileobj) if key.events & EVENT_READ: kevent = select.kevent(key.fd, select.KQ_FILTER_READ, select.KQ_EV_DELETE) ...
14,524
[ 0.04240068048238754, 0.007440504152327776, 0.023623883724212646, -0.024326032027602196, 0.013952360488474369, 0.036828797310590744, -0.00845975149422884, 0.021506113931536674, -0.03261590749025345, 0.007808565627783537, 0.045979369431734085, -0.021993087604641914, -0.01624000445008278, 0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation": null, "type_comment": null}}], "kwarg": n...
def select(self, timeout=None): if timeout is not None: timeout = max(timeout, 0) max_events = len(self._fd_to_key) * 2 ready_fds = {} kevent_list = _syscall_wrapper(self._kqueue.control, True, None, max_events,...
14,525
[ 0.016568008810281754, 0.06142924726009369, -0.0384150929749012, -0.016764339059591293, 0.023166853934526443, 0.046464595943689346, -0.007160564884543419, -0.01495374646037817, -0.007182379253208637, 0.03745526075363159, -0.00714965770021081, -0.007198739796876907, 0.008774828165769577, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _doc(func): cls_docstring = getattr(cls, func.__name__).__doc__ func_docstring = func.__doc__ if func_docstring is None: func.__doc__ = cls_docstring else: new_docstring = func_docstring % dict(super=cls_docstring) func.__doc__ = new_docstring ...
14,526
[ 0.01729891635477543, 0.013871882110834122, 0.0231470949947834, 0.019883811473846436, -0.011684663593769073, -0.012058946304023266, -0.0181527491658926, 0.010093958117067814, -0.017252130433917046, 0.04996684938669205, 0.015053214505314827, -0.0009993077255785465, 0.04781471937894821, -0.00...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, *args, **kwargs): self._path_helper = False self._extmethods = False self.__prefix_limit = YANGDynClass( base=prefix_limit.prefix_limit, is_container="container", yang_name="prefix-limit", parent=self, path_helper=s...
14,527
[ 0.010214944370090961, 0.014246362261474133, 0.04425465688109398, -0.041126519441604614, -0.014488853514194489, 0.07861567288637161, 0.0024249127600342035, -0.027959244325757027, 0.01625904068350792, 0.03516123443841934, 0.019411426037549973, -0.08045860379934311, 0.021242234855890274, 0.01...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): module = AnsibleModule( argument_spec=dict( parameter=dict(required=True, aliases=['name']), value=dict(default=None), db=dict(default=None), cluster=dict(default='localhost'), port=dict(default='5433'), login_user=dict(def...
14,528
[ 0.006525530479848385, 0.01280458178371191, 0.044193677604198456, -0.018387330695986748, 0.008830108679831028, -0.017808105796575546, -0.013839793391525745, 0.005558100529015064, 0.005471833050251007, 0.02866550348699093, -0.007554579991847277, 0.001475792727433145, 0.011418137699365616, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _path(self): if hasattr(self, "_parent"): return self._parent._path() + [self._yang_name] else: return [ "network-instances", "network-instance", "protocols", "protocol", "bgp", "p...
14,529
[ 0.01729891635477543, 0.013871882110834122, 0.0231470949947834, 0.019883811473846436, -0.011684663593769073, -0.012058946304023266, -0.0181527491658926, 0.010093958117067814, -0.017252130433917046, 0.04996684938669205, 0.015053214505314827, -0.0009993077255785465, 0.04781471937894821, -0.00...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, *args, **kwargs): self._path_helper = False self._extmethods = False self.__prefix_limit = YANGDynClass( base=prefix_limit.prefix_limit, is_container="container", yang_name="prefix-limit", parent=self, path_helper=s...
14,530
[ -0.023927118629217148, 0.006247100420296192, 0.03094606101512909, -0.043633222579956055, -0.017559416592121124, -0.021792491897940636, 0.008013896644115448, -0.02655620686709881, -0.022805534303188324, 0.03323746845126152, 0.012843942269682884, -0.039243366569280624, 0.04500806704163551, -...
16
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestRegistrationFilesList(object): @pytest.fixture(autouse=True) def setUp(self): self.app = JSONAPITestApp() self.user = AuthUserFactory() self.node = ProjectFactory(creator=self.user) self.registration = RegistrationFactory( project=self.node, creator=self.us...
14,531
[ 0.006525530479848385, 0.01280458178371191, 0.044193677604198456, -0.018387330695986748, 0.008830108679831028, -0.017808105796575546, -0.013839793391525745, 0.005558100529015064, 0.005471833050251007, 0.02866550348699093, -0.007554579991847277, 0.001475792727433145, 0.011418137699365616, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _path(self): if hasattr(self, "_parent"): return self._parent._path() + [self._yang_name] else: return [ "network-instances", "network-instance", "protocols", "protocol", "bgp", "p...
14,532
[ -0.004303335212171078, 0.01310495100915432, 0.018656514585018158, -0.016805993393063545, -0.00266812602058053, -0.016340453177690506, 0.005423540715128183, -0.005793063435703516, -0.0013296985998749733, 0.009211872704327106, -0.0025750179775059223, -0.06261512637138367, 0.05488716438412666, ...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_registration_relationships_contains_guid_not_id(self): url = '/{}registrations/{}/files/{}/'.format( API_BASE, self.registration._id, self.file.provider) res = self.app.get(url, auth=self.user.auth) split_href = res.json['data'][0]['relationships']['files']['links']['relate...
14,533
[ 0.009915114380419254, -0.03384861350059509, 0.019009575247764587, -0.021404270082712173, -0.015229186043143272, -0.035543736070394516, 0.03984880447387695, -0.003270844230428338, 0.006077548023313284, 0.011119188740849495, 0.018014028668403625, 0.0018548797816038132, -0.023583712056279182, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): self.app = JSONAPITestApp() self.user = AuthUserFactory() self.node = ProjectFactory(creator=self.user) self.registration = RegistrationFactory( project=self.node, creator=self.user) # Note: folders/files added to node do not seem to get picked up by ...
14,534
[ 0.01423575822263956, -0.0031840242445468903, 0.011093084700405598, -0.018712690100073814, 0.03647706285119057, -0.028449462726712227, 0.012581720016896725, 0.04732755571603775, -0.007123392540961504, 0.015173046849668026, 0.034734807908535004, -0.005585136823356152, -0.031889863312244415, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "auth", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "node_addon", "annotation": null, "type_comment": null}}], "kwarg"...
def s3_authorize_node(auth, node_addon, **kwargs): try: access_key = request.json['access_key'] secret_key = request.json['secret_key'] except KeyError: raise HTTPError(httplib.BAD_REQUEST) if not (access_key and secret_key): return { 'message': 'All the fields a...
14,535
[ -0.010228966362774372, -0.02699325978755951, 0.025872277095913887, 0.009528351947665215, 0.016489652916789055, -0.023047402501106262, 0.032620593905448914, 0.03504191339015961, 0.019605984911322594, -0.004626855719834566, -0.002150885295122862, -0.044592685997486115, -0.012487745843827724, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "auth", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def s3_post_user_settings(auth, **kwargs): user_addon = auth.user.get_or_add_addon('s3') try: access_key = request.json['access_key'] secret_key = request.json['secret_key'] except KeyError: raise HTTPError(httplib.BAD_REQUEST) if not (access_key and secret_key): return ...
14,536
[ 0.001944510149769485, -0.017879322171211243, 0.030384141951799393, -0.02464563027024269, -0.014378401450812817, -0.015845147892832756, 0.044965960085392, -0.004084408283233643, 0.02370348572731018, 0.027985958382487297, 0.025844721123576164, 0.0001933804014697671, -0.050832949578762054, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "auth", "annotation": null, "type_comment": null}}, {"_type": "arg...
def s3_post_node_settings(node, auth, user_addon, node_addon, **kwargs): # Fail if user settings not authorized if not user_addon.has_auth: raise HTTPError(httplib.BAD_REQUEST) # If authorized, only owner can change settings if node_addon.has_auth and node_addon.user_settings.owner != auth.user...
14,537
[ -0.0012802832061424851, 0.05592742934823036, 0.013904180377721786, -0.04989081993699074, 0.024257414042949677, -0.012417221441864967, 0.0673348531126976, -0.028651710599660873, 0.022448649629950523, 0.007484732661396265, 0.009815041907131672, -0.037440307438373566, 0.023236515000462532, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "subs_file", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "location", "annotation": null, "type_comment": null}}, {"_ty...
def _upload_file(subs_file, location, filename): mime_type = subs_file.content_type content_location = StaticContent.compute_location( location.course_key, filename ) content = StaticContent(content_location, filename, mime_type, subs_file.read()) contentstore().save(content) del_cached_...
14,538
[ -0.01426174957305193, -0.03172130510210991, 0.027799908071756363, 0.03501247987151146, 0.020178858190774918, 0.021345941349864006, -0.023925194516777992, 0.01834653876721859, 0.07768101990222931, -0.0331684872508049, 0.013549829833209515, -0.05723373219370842, 0.01367820892482996, -0.00724...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_handle_ajax_wrong_dispatch(self): responses = { user.username: self.clients[user.username].post( self.get_url('whatever'), {}, HTTP_X_REQUESTED_WITH='XMLHttpRequest') for user in self.users } status_codes = {respon...
14,539
[ 0.013680890202522278, -0.015502461232244968, -0.010196976363658905, 0.001207746216095984, 0.023311013355851173, 0.00867475476115942, -0.0065188040025532246, 0.0019967220723628998, 0.08442918211221695, -0.0050316122360527515, 0.03546331450343132, -0.05197209492325783, -0.0102033456787467, -...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_handle_ajax(self): data = [ {u'speed': 2.0}, {u'saved_video_position': "00:00:10"}, {u'transcript_language': 'uk'}, {u'bumper_do_not_show_again': True}, {u'bumper_last_view_date': True}, {u'demoo�': 'sample'} ] for...
14,540
[ 0.009553151205182076, 0.01485517993569374, -0.020733129233121872, -0.05144096165895462, -0.001202307757921517, -0.03612266853451729, 0.022039340808987617, -0.007540399208664894, 0.02714543789625168, -0.032014042139053345, 0.017871340736746788, -0.0455036386847496, 0.01974753476679325, -0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_available_translation_en(self): good_sjson = _create_file(json.dumps(self.subs)) _upload_sjson_file(good_sjson, self.item_descriptor.location) self.item.sub = _get_subs_id(good_sjson.name) request = Request.blank('/available_translations') response = self.item.transcrip...
14,541
[ -0.008858321234583855, 0.017512865364551544, 0.004528052639216185, -0.04562215507030487, -0.01934686116874218, -0.027785642072558403, 0.02478891611099243, -0.01892732083797455, 0.014000702649354935, -0.03425857052206993, 0.014360309578478336, -0.05197521299123764, 0.01379692554473877, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_multiple_available_translations(self): good_sjson = _create_file(json.dumps(self.subs)) # Upload english transcript. _upload_sjson_file(good_sjson, self.item_descriptor.location) # Upload non-english transcript. _upload_file(self.srt_file, self.item_descriptor.location...
14,542
[ -0.0251581110060215, 0.015048637054860592, 0.001469736103899777, -0.06734782457351685, -0.03936733305454254, -0.042360030114650726, 0.021557142958045006, 0.00110401283018291, -0.01736006885766983, -0.011173947714269161, 0.004622863605618477, -0.025474410504102707, 0.011119203642010689, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_multiple_available_translations(self): en_translation = _create_srt_file() en_translation_filename = os.path.split(en_translation.name)[1] uk_translation_filename = os.path.split(self.srt_file.name)[1] # Upload english transcript. _upload_file(en_translation, self.item_d...
14,543
[ -0.01748764142394066, 0.021772535517811775, -0.03010226972401142, -0.07470355927944183, -0.018339820206165314, -0.04594556987285614, 0.010772244073450565, 0.008983870968222618, -0.009313940070569515, -0.0039248173125088215, 0.007861637510359287, -0.0288540106266737, 0.022396665066480637, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "lang", "annotation": null, "type_comment": null}}], "kwarg": null...
def test_available_translation_en_and_non_en(self, lang): filename = os.path.split(self.srt_file.name)[1] _upload_file(self.srt_file, self.item_descriptor.location, filename) self.item.video_bumper["transcripts"][lang] = filename request = Request.blank('/' + self.dispatch) resp...
14,544
[ 0.010256332345306873, 0.0170833021402359, -0.04094912111759186, -0.0324392206966877, 0.009183068759739399, -0.027841337025165558, 0.02939089946448803, 0.01463194377720356, 0.013501523993909359, -0.011920207180082798, 0.04658851400017738, -0.06431958824396133, 0.02649499475955963, -0.036529...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def test_translaton_en_youtube_success(self, url, dispatch, attach): subs = {"start": [10], "end": [100], "text": ["Hi, welcome to Edx."]} good_sjson = _create_file(json.dumps(subs)) _upload_sjson_file(good_sjson, self.item_descriptor.location) subs_id = _get_subs_id(good_sjson.name) ...
14,545
[ -0.0012949310475960374, 0.0070196655578911304, -0.024541622027754784, -0.06268724799156189, -0.016392823308706284, -0.04410417750477791, 0.03790075331926346, -0.009509198367595673, 0.02342609316110611, 0.01573983207345009, 0.01454267930239439, -0.06366673856973648, -0.004002978093922138, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_translation_non_en_youtube_success(self): subs = { u'end': [100], u'start': [12], u'text': [ u'\u041f\u0440\u0438\u0432\u0456\u0442, edX \u0432\u0456\u0442\u0430\u0454 \u0432\u0430\u0441.' ] } self.srt_file.seek(0) ...
14,546
[ 0.0038027598056942225, 0.02855554409325123, -0.026204196736216545, -0.053571946918964386, -0.006787396036088467, -0.04751177132129669, 0.037718530744314194, 0.005578391253948212, 0.02564666047692299, -0.011980965733528137, 0.025792105123400688, -0.0638984888792038, 0.002031673677265644, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_translaton_non_en_html5_success(self): subs = { u'end': [100], u'start': [12], u'text': [ u'\u041f\u0440\u0438\u0432\u0456\u0442, edX \u0432\u0456\u0442\u0430\u0454 \u0432\u0430\u0441.' ] } self.srt_file.seek(0) _up...
14,547
[ 0.0070330132730305195, 0.04858526587486267, -0.027184048667550087, -0.030952367931604385, 0.015464333817362785, -0.04036131873726845, 0.026828546077013016, -0.0009768897434696555, 0.028795655816793442, -0.04692625626921654, 0.029269659891724586, -0.0295303612947464, 0.018308348953723907, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def test_translaton_en_html5_success(self, url, dispatch, attach): good_sjson = _create_file(json.dumps(TRANSCRIPT)) _upload_sjson_file(good_sjson, self.item_descriptor.location) subs_id = _get_subs_id(good_sjson.name) attach(self.item, subs_id) request = Request.blank(url) ...
14,548
[ -0.04047323018312454, 0.012166289612650871, -0.00920951645821333, -0.07219134271144867, -0.02452457696199417, -0.06031304970383644, 0.002993572736158967, 0.021747002378106117, -0.005545549560338259, -0.010777502320706844, -0.002356778597459197, -0.04267481341958046, -0.009580712765455246, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_translation_fails(self): # No language request = Request.blank('') response = self.item_descriptor.studio_transcript(request=request, dispatch='translation') self.assertEqual(response.status, '400 Bad Request') # No filename in request.GET request = Request.blan...
14,549
[ -0.03838289901614189, 0.0239705927670002, -0.026403838768601418, -0.07701535522937775, -0.01091841235756874, -0.007680322974920273, 0.013339179567992687, -0.0014014561893418431, 0.0007986038690432906, -0.023870768025517464, 0.011105584912002087, -0.018068412318825722, 0.013039703480899334, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_studio_transcript_post(self): # Check for exceptons: # Language is passed, bad content or filename: # should be first, as other tests save transcrips to store. request = Request.blank('/translation/uk', POST={'file': ('filename.srt', SRT_content)}) with patch('xmodule....
14,550
[ 0.021565278992056847, 0.005193780176341534, -0.0018705509137362242, -0.012077285908162594, 0.0177360437810421, -0.03464546054601669, 0.012849210761487484, -0.029637064784765244, 0.03175226226449013, -0.010697545483708382, 0.02212446928024292, -0.0036408123560249805, 0.0334298312664032, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_good_txt_transcript(self): good_sjson = _create_file(content=textwrap.dedent("""\ { "start": [ 270, 2720 ], "end": [ 2720, 5430 ], ...
14,551
[ 0.016206730157136917, 0.027645321562886238, -0.006954564712941647, -0.036638081073760986, 0.02385304495692253, -0.02487831935286522, 0.03626750037074089, -0.007226324174553156, 0.01686142198741436, 0.014551469124853611, 0.018788442015647888, -0.044642623513936996, -0.0005018280353397131, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_en_with_empty_sub(self): transcripts = {"transcripts": {}, "sub": ""} # no self.sub, self.youttube_1_0 exist, but no file in assets with self.assertRaises(NotFoundError): self.item.get_transcript(transcripts) # no self.sub and no self.youtube_1_0, no non-en transcr...
14,552
[ 0.046580735594034195, 0.028437968343496323, -0.012913159094750881, -0.013739550486207008, 0.016578299924731255, -0.05460493639111519, 0.032374367117881775, -0.004974121227860451, 0.01738576777279377, -0.03726963326334953, 0.0538984015583992, -0.03176876902580261, 0.0013476177118718624, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_value_error(self): good_sjson = _create_file(content='bad content') _upload_sjson_file(good_sjson, self.item.location) self.item.sub = _get_subs_id(good_sjson.name) transcripts = self.item.get_transcripts_info() with self.assertRaises(ValueError): self.item...
14,553
[ -0.0017920798854902387, 0.028576653450727463, -0.012863117270171642, -0.024361416697502136, -0.00671539269387722, -0.03616166487336159, 0.016377829015254974, -0.00011794965394074097, 0.004121632780879736, -0.0033939306158572435, -0.027731189504265785, -0.012694024480879307, 0.013575722463428...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_non_en_with_non_ascii_filename(self): self.item.transcript_language = 'zh' self.srt_file.seek(0) _upload_file(self.srt_file, self.item_descriptor.location, u"塞.srt") transcripts = self.item.get_transcripts_info() text, filename, mime_type = self.item.get_transcript(tran...
14,554
[ 0.05507500097155571, 0.011872786097228527, 0.002362285740673542, -0.02986910752952099, 0.02770930342376232, -0.03170984983444214, 0.029230983927845955, 0.022690214216709137, 0.009884784929454327, -0.045159537345170975, 0.029010094702243805, -0.027537500485777855, 0.008988956920802593, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_key_error(self): good_sjson = _create_file(content=""" { "start": [ 270, 2720 ], "end": [ 2720, 5430 ] } ""...
14,555
[ 0.04944438114762306, 0.03202701359987259, 0.005573795177042484, -0.0056689721532166, 0.009374921210110188, -0.02222379855811596, 0.04449518397450447, 0.05786753445863724, -0.0025043413043022156, -0.027839234098792076, 0.002461214317008853, 0.010053056292235851, 0.03866560012102127, 0.00219...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "argv", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def main(argv): password = None home = str(Path.home()) password_file = os.path.join(home, '.amli') if os.path.exists(password_file): with open (password_file) as f: password = f.read().replace('\n', '') else: password = getpass.getpass("Password: ") for root, _, files in os.walk('content'):...
14,556
[ 0.00368402898311615, 0.008607849478721619, 0.03610620275139809, 0.002472785534337163, -0.039738573133945465, 0.002758263610303402, 0.03247383236885071, 0.02307751774787903, 0.013017808087170124, 0.0014559391420334578, 0.02884146012365818, 0.01936901919543743, -0.016954690217971802, -0.0246...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, client, group, topic, partitions=None, auto_commit=True, auto_commit_every_n=AUTO_COMMIT_MSG_COUNT, auto_commit_every_t=AUTO_COMMIT_INTERVAL): self.client = client self.topic = kafka_bytestring(topic) self.group = None if group is None else k...
14,557
[ 0.05065564811229706, -0.007800148334354162, -0.0003360830887686461, -0.027599595487117767, 0.023829422891139984, -0.02218601480126381, -0.022101426497101784, -0.016240742057561874, -0.04190691560506821, 0.05022063106298447, -0.01446441188454628, -0.02907382883131504, -0.036855850368738174, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "order", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __init__(self, order=None): self._str = str if not hasattr(self, "printmethod"): self.printmethod = None if not hasattr(self, "emptyPrinter"): self.emptyPrinter = str # _print_level is the number of times self._print() was recursively # called. See St...
14,558
[ 0.06136201322078705, -0.001663361443206668, 0.011892206035554409, -0.024580173194408417, -0.03607449680566788, 0.033156707882881165, 0.017108861356973648, 0.04301530122756958, 0.05172446370124817, 0.0006928370567038655, 0.05875368416309357, -0.003810258349403739, 0.01800409145653248, -0.00...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def stop(self): if self.commit_timer is not None: self.commit_timer.stop() self.commit() if hasattr(self, '_cleanup_func'): # Remove cleanup handler now that we've stopped # py3 supports unregistering if hasattr(atexit, 'unregister'): ...
14,559
[ 0.010622990317642689, -0.02168608270585537, 0.060734234750270844, 0.008290443569421768, -0.007404735777527094, 0.01842932030558586, -0.0207508634775877, 0.03846501559019089, 0.013280113227665424, -0.018000219017267227, 0.005765351466834545, -0.0032650153152644634, -0.0028661717660725117, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "partitions", "annotation": null, "type_comment": null}}], "kwarg"...
def fetch_last_known_offsets(self, partitions=None): if self.group is None: raise ValueError('KafkaClient.group must not be None') if partitions is None: partitions = self.client.get_partition_ids_for_topic(self.topic) responses = self.client.send_offset_fetch_request( ...
14,560
[ 0.047845177352428436, -0.030955852940678596, 0.042104706168174744, -0.019213978201150894, 0.012394201941788197, 0.017458627000451088, -0.008604778908193111, -0.044571686536073685, -0.02273654006421566, 0.014422344043850899, 0.03624562919139862, -0.021728400141000748, -0.026757244020700455, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vals", "annotation": null, "type_comment": null}}], "kwarg": null...
def write(self, vals): odoovals = sync_clean_up(vals) if 'manager_id' in odoovals: if odoovals['manager_id'] == 0: del odoovals['manager_id'] ret = super(weladee_department, self).write( odoovals ) # if don't need to sync when there is weladee-...
14,561
[ 0.05056621879339218, -0.028010649606585503, 0.04726945236325264, 0.010874583385884762, 0.004343310836702585, -0.013578405603766441, 0.011799574829638004, -0.037260569632053375, -0.019721299409866333, -0.01670914702117443, 0.04205155000090599, -0.012001175433397293, -0.011473456397652626, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vals", "annotation": null, "type_comment": null}}], "kwarg": null...
def create(self, vals) : odoovals = sync_clean_up(vals) pid = super(weladee_department,self).create( odoovals ) # only when user create from odoo, always send # record from sync will not send to weladee again if not "weladee_id" in vals: self._create_in_weladee(pid, ...
14,562
[ 0.00865569245070219, 0.0030053595546633005, 0.024132972583174706, -0.05668352544307709, 0.03318122774362564, 0.030555561184883118, 0.004311757627874613, 0.00835966132581234, 0.003928848076611757, 0.014273849315941334, 0.016732193529605865, 0.012632806785404682, -0.018212350085377693, -0.01...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class IdentifyGradientTest(test_util.TensorFlowTestCase): def setUp(self): rewriter_config = rewriter_config_pb2.RewriterConfig( disable_model_pruning=True, dependency_optimization=rewriter_config_pb2.RewriterConfig.OFF) graph_options = config_pb2.GraphOptions(rewrite_options=rewriter_config)...
14,563
[ 0.0836133286356926, 0.01908230595290661, 0.043371208012104034, -0.04906512051820755, -0.025738028809428215, 0.022416578605771065, 0.02294236794114113, 0.017799891531467438, -0.016632895916700363, -0.00643130112439394, 0.010419605299830437, -0.02508399821817875, -0.034291721880435944, 0.003...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): rewriter_config = rewriter_config_pb2.RewriterConfig( disable_model_pruning=True, dependency_optimization=rewriter_config_pb2.RewriterConfig.OFF) graph_options = config_pb2.GraphOptions(rewrite_options=rewriter_config) config = config_pb2.ConfigProto(graph_options=graph_opti...
14,564
[ -0.030985355377197266, 0.003436796134337783, -0.006360211875289679, -0.043420568108558655, 0.02208676189184189, 0.008550634607672691, 0.013861268758773804, 0.005826866719871759, -0.007489648647606373, -0.0036877819802612066, -0.0018552994588389993, 0.009640141390264034, 0.001357605797238648,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testIdentifyGradientGivesCorrectTensorObjectWithoutContextManager(self): grad_debugger = debug_gradients.GradientsDebugger() id_grad_w = grad_debugger.identify_gradient(self.w) y = math_ops.add(id_grad_w, -1.0, name="y") grads = gradients_impl.gradients(y, [self.u, self.v]) self.assertEqual(2, ...
14,565
[ -0.033836279064416885, -0.0035209788475185633, -0.0025780543219298124, -0.03409790247678757, 0.0298029612749815, 0.012775812298059464, 0.004115075804293156, 0.00963091291487217, -0.006093582604080439, -0.010802756063640118, -0.008159296587109566, 0.005455882288515568, -0.0017127981409430504,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testIdentifyGradientGivesCorrectTensorObjectWithTfGradients(self): grad_debugger = debug_gradients.GradientsDebugger() id_grad_w = grad_debugger.identify_gradient(self.w) y = math_ops.add(id_grad_w, -1.0, name="y") with grad_debugger: grads = gradients_impl.gradients(y, [self.u, self.v]) ...
14,566
[ 0.012510926462709904, 0.005828671157360077, 0.04162001609802246, -0.022529637441039085, 0.0009314658818766475, 0.0178068857640028, 0.01653585582971573, 0.007619951851665974, -0.013208746910095215, -0.009719643741846085, -0.01217447780072689, -0.0008995343814603984, -0.01622432842850685, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testIdentifyGradientWorksOnMultipleLosses(self): grad_debugger_1 = debug_gradients.GradientsDebugger() grad_debugger_2 = debug_gradients.GradientsDebugger() y = math_ops.add(self.w, -1.0, name="y") debug_y = grad_debugger_1.identify_gradient(y) z1 = math_ops.square(debug_y, name="z1") debu...
14,567
[ -0.03873748332262039, -0.01825919933617115, 0.0065366486087441444, -0.03545709699392319, 0.0011148181511089206, 0.014050176367163658, -0.0021014963276684284, 0.023264197632670403, -0.03552945703268051, -0.019525524228811264, -0.015509464778006077, 0.0321284718811512, 0.010070297867059708, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testIdentifyGradientRaisesLookupErrorForUnknownXTensor(self): grad_debugger_1 = debug_gradients.GradientsDebugger() grad_debugger_2 = debug_gradients.GradientsDebugger() id_grad_w = grad_debugger_1.identify_gradient(self.w) y = math_ops.add(id_grad_w, -1.0, name="y") # There are >1 gradient deb...
14,568
[ -0.01736692152917385, 0.0052777542732656, -0.010702870786190033, -0.03375142812728882, 0.04532209783792496, -0.005124934017658234, 0.0003491327224764973, 0.022617386654019356, -0.012815063819289207, -0.049994029104709625, -0.019637392833828926, 0.02377445437014103, -0.028402721509337425, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testIdentifyGradientTensorWorksWithGradientDescentOptimizer(self): grad_debugger = debug_gradients.GradientsDebugger() id_grad_w = grad_debugger.identify_gradient(self.w) y = math_ops.add(id_grad_w, -1.0, name="y") with grad_debugger: gradient_descent.GradientDescentOptimizer(0.1).minimize(y)...
14,569
[ -0.0008620313601568341, 0.03513269126415253, 0.004397202283143997, -0.04914982616901398, 0.03996231406927109, 0.014848279766738415, 0.014028367586433887, -0.008805636316537857, 0.022935088723897934, -0.02711327373981476, -0.007463450543582439, 0.0009343352867290378, -0.033380549401044846, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testWatchGradientsByXTensorNamesWorks(self): y = math_ops.add(self.w, -1.0, name="y") # The constructrion of the forward graph has completed. # But we can still get the gradient tensors by using # watch_gradients_by_tensor_names(). grad_debugger = debug_gradients.GradientsDebugger() with gr...
14,570
[ -0.008347543887794018, 0.04122385010123253, 0.0048275301232934, -0.04860075190663338, 0.03329882398247719, 0.0207375381141901, 0.022850118577480316, -0.018373733386397362, 0.010208898223936558, -0.018396571278572083, -0.0010848381789401174, 0.0025450873654335737, -0.03619933873414993, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testWatchGradientsByXTensorNamesWorksWithoutContextManager(self): y = math_ops.add(self.w, -1.0, name="y") # The constructrion of the forward graph has completed. # But we can still get the gradient tensors by using # watch_gradients_by_tensor_names(). grad_debugger = debug_gradients.GradientsD...
14,571
[ -0.02166019007563591, 0.04991822689771652, 0.0028146507684141397, -0.030876044183969498, 0.019089143723249435, 0.016365477815270424, 0.019406123086810112, 0.007548782043159008, -0.009233463555574417, -0.0031668490264564753, -0.0035395922604948282, -0.007184843998402357, -0.027518421411514282...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testWatchGradientsWorksOnRefTensor(self): y = math_ops.add(self.w, -1.0, name="y") grad_debugger = debug_gradients.GradientsDebugger() with grad_debugger.watch_gradients_by_tensor_names(self.sess.graph, "u:0$"): grads = gradients_impl.gradients(y, [self.u, self.v]) self.assertEqual(2, len(gra...
14,572
[ 0.003307448234409094, 0.029879050329327583, -0.00392059376463294, -0.04233061894774437, 0.04218912497162819, 0.005353231448680162, 0.021106353029608727, 0.018535859882831573, 0.02957247756421566, -0.030091293156147003, -0.01531684584915638, -0.011319608427584171, -0.03310985490679741, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testWatchGradientsByXTensorsWorks(self): y = math_ops.add(self.w, -1.0, name="foo/y") z = math_ops.square(y, name="foo/z") # The constructrion of the forward graph has completed. # But we can still get the gradient tensors by using # watch_gradients_by_x_tensors(). grad_debugger = debug_gra...
14,573
[ -0.011205430142581463, 0.03739841654896736, 0.010829566046595573, -0.03706953674554825, 0.024994920939207077, 0.018088430166244507, 0.02246958762407303, -0.012779357843101025, -0.021835317835211754, 0.0033592798281461, -0.006818398367613554, -0.0035031649749726057, -0.01969759538769722, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testWatchGradientsWorksOnMultipleTensors(self): y = math_ops.add(self.w, -1.0, name="y") grad_debugger = debug_gradients.GradientsDebugger() with grad_debugger.watch_gradients_by_tensor_names(self.sess.graph, "(u|w):0$"): grads = gradients_im...
14,574
[ 0.014518707059323788, 0.037432342767715454, 0.016456913203001022, -0.022128839045763016, 0.026183614507317543, 0.009708864614367485, 0.020333323627710342, 0.016956327483057976, -0.010565005242824554, -0.0029102812986820936, -0.022818507626652718, 0.006022706627845764, -0.02459024265408516, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testWatchGradientsByTensorCanWorkOnMultipleLosses(self): y = math_ops.add(self.w, -1.0, name="y") z1 = math_ops.square(y, name="z1") z2 = math_ops.sqrt(y, name="z2") grad_debugger_1 = debug_gradients.GradientsDebugger() with grad_debugger_1.watch_gradients_by_tensors(self.sess.graph, y): ...
14,575
[ 0.004606314469128847, 0.03249770402908325, 0.030148174613714218, -0.035861242562532425, 0.03469884395599365, 0.006621963810175657, 0.014072446152567863, 0.023124318569898605, -0.002612306037917733, -0.011852758936583996, 0.02042854204773903, 0.022901730611920357, -0.033412784337997437, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testGradientsValuesFromDumpWorks(self): y = math_ops.add(self.w, -1.0, name="y") z = math_ops.square(y, name="z") grad_debugger = debug_gradients.GradientsDebugger() with grad_debugger.watch_gradients_by_tensors(self.sess.graph, [self.w, self.u, y])...
14,576
[ 0.01162450946867466, 0.024827726185321808, 0.0027542193420231342, -0.03389109671115875, 0.0037309734616428614, 0.04043307527899742, -0.008058221079409122, 0.038570430129766464, -0.046429891139268875, 0.0023609623312950134, -0.033936526626348495, 0.00922237616032362, -0.014628595672547817, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "logits_y", "annotation": null, "type_comment": null}}, {"_type": ...
def guess_label(self, logits_y, p_data, p_model, T, use_dm, redux, **kwargs): del kwargs if redux == 'swap': p_model_y = tf.concat([tf.nn.softmax(x) for x in logits_y[1:] + logits_y[:1]], axis=0) elif redux == 'mean': p_model_y = sum(tf.nn.softmax(x) for x in logits_y) / ...
14,577
[ -0.032966699451208115, -0.00909102987498045, 0.009893523529171944, -0.03760593384504318, 0.013249941170215607, -0.00626765564084053, 0.03847286477684975, 0.02764797769486904, -0.049766357988119125, 0.04697813093662262, -0.019845623522996902, -0.028468044474720955, 0.0076500545255839825, 0....
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "x", "annotation": null...
class ReMixMatch(MixMatch): def classifier_rot(self, x): with tf.variable_scope('classify_rot', reuse=tf.AUTO_REUSE): return tf.layers.dense(x, 4, kernel_initializer=tf.glorot_normal_initializer()) def guess_label(self, logits_y, p_data, p_model, T, use_dm, redux, **kwargs): del kw...
14,578
[ -0.019664684310555458, -0.005409028381109238, 0.02210727147758007, -0.02515740506350994, -0.0027262121438980103, -0.029707808047533035, 0.0448840856552124, 0.02544258162379265, -0.038064680993556976, 0.04880214482545853, -0.011103231459856033, -0.004178435541689396, -0.009565765969455242, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "batch", "annotation": null, "type_comment": null}}, {"_type": "ar...
def model(self, batch, lr, wd, beta, w_kl, w_match, w_rot, K, use_xe, warmup_kimg=1024, T=0.5, mixmode='xxy.yxy', dbuf=128, ema=0.999, **kwargs): hwc = [self.dataset.height, self.dataset.width, self.dataset.colors] xt_in = tf.placeholder(tf.float32, [batch] + hwc, 'xt') # For training ...
14,579
[ 0.00047403815551660955, 0.009892702102661133, 0.01830427534878254, -0.06368850916624069, -0.03826247900724411, -0.0030517412815243006, -0.001714097335934639, 0.023981934413313866, -0.02022974193096161, 0.019871803000569344, -0.021525729447603226, -0.03646044060587883, 0.03080746717751026, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "argv", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def main(argv): utils.setup_main() del argv # Unused. dataset = data.MANY_DATASETS()[FLAGS.dataset]() log_width = utils.ilog2(dataset.width) model = ReMixMatch( os.path.join(FLAGS.train_dir, dataset.name), dataset, lr=FLAGS.lr, wd=FLAGS.wd, arch=FLAGS.arch, ...
14,580
[ 0.014108309522271156, 0.035633813589811325, 0.010919138789176941, -0.06411852687597275, -0.014934924431145191, 0.01150558888912201, 0.01986110396683216, -0.038761548697948456, 0.020330263301730156, 0.01831957884132862, 0.023100541904568672, 0.017303064465522766, 0.012667317874729633, -0.01...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def parse_args(): run_isolated.disable_buffering() parser = optparse.OptionParser( usage='%prog [options] test_name', description=sys.modules[__name__].__doc__) parser.add_option( '-u', '--url', default='http://localhost:8080', help='Specify the url of the Swarm server, defaults: %default'...
14,581
[ 0.010681353509426117, -0.000024728686184971593, 0.049309179186820984, -0.06077321991324425, -0.014445149339735508, 0.021167036145925522, -0.02486177161335945, -0.013386222533881664, 0.03158365562558174, 0.02343452163040638, 0.035819366574287415, -0.0039508347399532795, -0.019313912838697433,...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): parser, options, test_name = parse_args() try: test_keys = get_test_keys(options.url, test_name, options.timeout) except Failure as e: parser.error(e.args[0]) if not test_keys: parser.error('No test keys to get results with.') options.shards = len(test_keys) if options.shards == -1 el...
14,582
[ -0.03311217948794365, -0.030384546145796776, 0.04125278443098068, -0.015572872944176197, 0.02915816940367222, 0.0012191085843369365, 0.020911842584609985, 0.02799522690474987, 0.004387469496577978, 0.04127392917871475, -0.002340424107387662, -0.000023209317077999003, 0.05514467507600784, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class SparseMaskTest(tf.test.TestCase): def testBasic(self): values = np.random.rand(4, 4).astype(np.single) indices = np.array([0, 2, 3, 4], dtype=np.int32) mask_indices = np.array([0], dtype=np.int32) out_values = values[1:, :] out_indices = np.array([2, 3, 4], dtype=np.int32) with self.t...
14,583
[ 0.010373474098742008, -0.020150084048509598, 0.047367025166749954, -0.0019517410546541214, 0.014229207299649715, 0.02259722165763378, 0.06551165133714676, 0.007699528709053993, -0.017547763884067535, 0.0000740949108148925, -0.01513643842190504, -0.015506492927670479, 0.033066194504499435, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "WORDUP_SECRET"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "secret-key"}}], "func"...
class Config(object): SECRET_KEY = os_env.get('WORDUP_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) BCRYPT_LOG_ROUNDS = 13 ASSETS_DEBUG = False DEBUG_TB_ENABLED = F...
14,584
[ 0.014457006007432938, 0.013714817352592945, -0.025736188516020775, -0.004541987553238869, 0.007103062700480223, -0.032447248697280884, -0.004505401011556387, -0.02535986714065075, 0.05803709104657173, 0.006413140334188938, -0.005041135940700769, -0.024105463176965714, -0.0060315923765301704,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "json_data", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "head", "annotation": null, "type_comment": null}}], "kwarg":...
def token_block_description(json_data, head = ''): if 'description' in json_data: desc = head + '/**\n' desc += head + ' * {}\n'.format(json_data['description']) desc += head + ' */\n' return desc else: return ''
14,585
[ -0.024963518604636192, -0.04189387708902359, 0.05543816089630127, -0.014840333722531796, 0.022558240219950676, -0.026574822142720222, 0.0249868705868721, 0.03892814368009567, 0.018459927290678024, 0.05076771602034569, 0.02587425522506237, 0.0018988270312547684, 0.04320159927010536, 0.01582...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testBasic(self): values = np.random.rand(4, 4).astype(np.single) indices = np.array([0, 2, 3, 4], dtype=np.int32) mask_indices = np.array([0], dtype=np.int32) out_values = values[1:, :] out_indices = np.array([2, 3, 4], dtype=np.int32) with self.test_session() as sess: values_tensor ...
14,586
[ 0.027076423168182373, -0.010508345440030098, 0.0031260524410754442, -0.026835957542061806, -0.038330212235450745, -0.008121724240481853, -0.02897609956562519, -0.007298130076378584, 0.030683405697345734, 0.009961285628378391, -0.003525826381519437, -0.021160969510674477, 0.040277980268001556...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestInspectPossibilities(TestCase): def setUp(self): self.s = signature(Foo.__init__) def test_signature(self): self.assertIn('self', self.s.parameters) def test_params(self): args = [] kwargs = {} for name, param in self.s.parameters.items(): if...
14,587
[ 0.0031798940617591143, 0.013582413084805012, -0.044247061014175415, -0.0594097264111042, -0.000957967306021601, -0.01236086804419756, 0.018119579181075096, 0.0421917624771595, 0.02123160846531391, 0.01109084952622652, 0.02187146618962288, -0.0037324975710362196, 0.03051922656595707, -0.031...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "type", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def token_value(type, idx, v, delimiter): if 'value' in v: if type == 'string': return delimiter + v['value'] + delimiter else: return str(v['value']) elif type == 'enum': return str(idx)
14,588
[ 0.005721434019505978, -0.014763343147933483, 0.03389438986778259, -0.05787843465805054, 0.011410940438508987, 0.008256489410996437, -0.021174414083361626, 0.0034864989574998617, 0.020586945116519928, -0.02288573607802391, 0.018850082531571388, -0.05614157021045685, 0.017917795106768608, 0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestFeatures(TestCase): def setUp(self): self.injector = Injector() self.injector.bind('name').to_value('Luke') self.injector.bind('status').to_value('Alive') self.injector.bind('profession').to_value('Jedi') self.injector.bind('profession').annotated_with('dark').to_v...
14,589
[ 0.017919369041919708, 0.01650409586727619, 0.005014748778194189, -0.04747295379638672, 0.0124365771189332, -0.027904290705919266, -0.06396590173244476, 0.0063352989964187145, 0.0360393263399601, 0.014442476443946362, -0.004758439492434263, -0.025296621024608612, 0.03757718205451965, 0.0057...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_params(self): args = [] kwargs = {} for name, param in self.s.parameters.items(): if name in ('self', ): continue if param.kind in (Parameter.POSITIONAL_OR_KEYWORD, Parameter.POSITIONAL_ONLY): args.append('%s as positional' % name...
14,590
[ 0.018620045855641365, 0.00006273143662838265, -0.023365480825304985, -0.026765411719679832, -0.015046502463519573, -0.020819149911403656, -0.02113744243979454, 0.021151909604668617, -0.005157767329365015, -0.05656906217336655, -0.008810884319245815, -0.03567757084965706, 0.000818786502350121...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): self.injector = Injector() self.injector.bind('name').to_value('Luke') self.injector.bind('status').to_value('Alive') self.injector.bind('profession').to_value('Jedi') self.injector.bind('profession').annotated_with('dark').to_value('Sith') self.injector...
14,591
[ -0.0021958977449685335, 0.004825010430067778, 0.0662505030632019, -0.022954115644097328, -0.002423492493107915, 0.009191691875457764, -0.03252251818776131, -0.0009692400926724076, -0.012280703522264957, -0.014302372932434082, 0.009555843658745289, -0.039453957229852676, 0.035586412996053696,...
16
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestErrors(TestCase): def setUp(self): self.injector = Injector() def test_duplicate_bindings(self): self.injector.bind('name').to_value('Luke') with self.assertRaises(BindingAlreadyExists): self.injector.bind('name').to_value('foo') def test_invalid_provider_cha...
14,592
[ 0.00041225316817872226, 0.02343307062983513, -0.048219870775938034, -0.020346565172076225, -0.028753230348229408, 0.026736171916127205, -0.02206580340862274, 0.03254367411136627, 0.011587930843234062, -0.03392447903752327, -0.012813056819140911, -0.018234746530652046, 0.02913227491080761, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_annotation_not_found(self): self.injector.bind('profession').to_value('Jedi') def injectee(profession:'dark'): pass msg = None try: self.injector.inject_into(injectee) except InjectionFailed as e: msg = str(e) self.assertIn('An...
14,593
[ -0.02227839082479477, 0.00965916272252798, 0.00566372275352478, -0.00851018913090229, 0.015955794602632523, 0.0032602918799966574, -0.02503073215484619, 0.017370913177728653, 0.02465423382818699, -0.005326171405613422, -0.015267708338797092, -0.0396752692759037, 0.01944815181195736, -0.006...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestAlternativeDeclaration(TestCase): def setUp(self): self.injector = Injector(use_argument_names=False) self.injector.bind('name').to_value('Luke') self.injector.bind('status').to_value('Alive') self.injector.bind('profession').to_value('Jedi') self.injector.bind('pr...
14,594
[ 0.0081969378516078, -0.022370461374521255, -0.010895862244069576, -0.017874110490083694, 0.04950438439846039, -0.013522443361580372, -0.02657744474709034, 0.003249838249757886, -0.01883125491440296, -0.0222480371594429, -0.01218689326196909, -0.027534589171409607, 0.00760707026347518, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestInheritance(TestCase): def setUp(self): self.injector = Injector() self.injector.bind('value').to_value('Indeed a value.') self.injector.bind('another_value').to_value('Wow! There is even another value.') def test_foo(self): sub_foo = self.injector.inject_into(SubFoo)...
14,595
[ 0.02319265902042389, 0.005748364608734846, -0.03520162031054497, -0.02565421164035797, -0.01791383884847164, -0.018511440604925156, -0.023320715874433517, 0.029908569529652596, 0.00799648743122816, -0.0387018620967865, -0.013730622828006744, -0.02928251028060913, 0.005072504747658968, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): self.injector = Injector(use_argument_names=False) self.injector.bind('name').to_value('Luke') self.injector.bind('status').to_value('Alive') self.injector.bind('profession').to_value('Jedi') self.injector.bind('profession').annotated_with('dark').to_value('Sith'...
14,596
[ 0.006682115141302347, -0.009038499556481838, 0.001327600795775652, 0.04166361317038536, 0.04940439388155937, -0.015788916498422623, -0.015151439234614372, 0.007820464670658112, 0.03294385224580765, 0.022767001762986183, -0.028777489438652992, -0.02654632367193699, -0.0031816884875297546, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "msg", "annotation": null, "type_comment": null}}], "kwarg": null,...
def parse_error(self, msg=None): error_msg = "Unknown error" try: # Azure does give some meaningful errors, but is inconsistent # Some APIs respond with an XML error. Others just dump HTML body = self.parse_body() # pylint: disable=no-member ...
14,597
[ -0.01039811410009861, -0.005621179472655058, 0.025284621864557266, 0.00872565247118473, 0.06446189433336258, -0.011936991475522518, -0.04127185419201851, -0.004611290991306305, 0.029324177652597427, 0.045097678899765015, 0.007854689843952656, -0.060913924127817154, -0.009601958096027374, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "NOT_FOUND", "value": {"_type":...
class AzureResponse(XmlResponse): valid_response_codes = [ httplib.NOT_FOUND, httplib.CONFLICT, httplib.BAD_REQUEST, # added TEMPORARY_REDIRECT as this can sometimes be # sent by azure instead of a success or fail response httplib.TEMPORARY_REDIRECT, # Used by...
14,598
[ -0.004010760225355625, 0.010507139377295971, -0.02480083517730236, -0.03290539234876633, 0.05270177498459816, 0.018921708688139915, 0.008990302681922913, 0.08095701038837433, 0.03319326043128967, 0.004960167221724987, 0.006405036896467209, -0.04023492708802223, -0.004639084916561842, -0.02...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "action", "annotation": null, "type_comment": null}}, {"_type": "a...
def request( self, action, params=None, data=None, headers=None, method="GET", raw=False, stream=False, json=None, retry_failed=None, *kwargs, ): # Log in again if the token has expired or is going to expire soon ...
14,599
[ 0.01659165695309639, -0.003084346419200301, 0.036748796701431274, 0.0002771290310192853, 0.0527934767305851, -0.03312253579497337, 0.025951052084565163, 0.027186816558241844, -0.026032086461782455, 0.04193495586514473, -0.011030716821551323, 0.007009417749941349, 0.01616622880101204, -0.05...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "key", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def __init__( self, key, secret, secure=True, host=None, port=None, tenant_id=None, identity=None, cloud_environment="default", **kwargs, ): super().__init__(identity, secret, **kwargs) if isinstance(cloud_environment, b...
14,600
[ 0.0066688708029687405, -0.013442681171000004, 0.013998857699334621, -0.012026004493236542, 0.055995430797338486, -0.02277175523340702, 0.012550699524581432, 0.001791832735762, -0.0028936918824911118, -0.009748829528689384, -0.00563522195443511, -0.04974106699228287, 0.02046309784054756, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "params", "annotation": null, "type_comment": null}}, {"_type": "a...
def pre_connect_hook(self, params, headers): headers = copy.deepcopy(headers) # We have to add a date header in GMT headers["x-ms-date"] = time.strftime(AZURE_TIME_FORMAT, time.gmtime()) headers["x-ms-version"] = self.API_VERSION # Add the authorization header headers["...