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 |
|---|---|---|---|---|---|
701 | [
-0.004859932232648134,
0.01972300373017788,
0.029885483905673027,
-0.041806627064943314,
0.016276493668556213,
0.006739577744156122,
-0.04832194745540619,
0.03838372603058815,
-0.00858086347579956,
0.0074595678597688675,
0.014494223520159721,
-0.027265192940831184,
0.015639126300811768,
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": "req", "annotation": null, "type_comment": null}}], "kwarg": null,... | def index(self, req):
context = req.environ['nova.context']
authorize(context)
ret = {'security_group_default_rules': []}
try:
for rule in self.security_group_api.get_all_default_rules(context):
rule_fmt = self._format_security_group_default_rule(rule)
... | |
702 | [
0.017236948013305664,
-0.03345244750380516,
0.009762692265212536,
-0.00658048689365387,
0.016657471656799316,
-0.055276092141866684,
0.011363617144525051,
0.04478659853339195,
-0.016991406679153442,
0.02035040222108364,
-0.03372745215892792,
-0.042979419231414795,
0.025929084047675133,
-0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "BaiduProvider", "ctx": {"_type": "Load", "_fields": {}}}}}}... | class BaiduOAuth2Adapter(OAuth2Adapter):
provider_id = BaiduProvider.id
access_token_url = 'https://openapi.baidu.com/oauth/2.0/token'
authorize_url = 'https://openapi.baidu.com/oauth/2.0/authorize'
profile_url = 'https://openapi.baidu.com/rest/2.0/passport/users/getLoggedInUser'
def complete_login... | |
703 | [
0.02507316693663597,
0.018473496660590172,
0.0004495415196288377,
-0.034240152686834335,
0.020175738260149956,
0.00951580423861742,
-0.007262428291141987,
0.021473348140716553,
-0.0014763798099011183,
0.009941364638507366,
0.030835671350359917,
-0.07221965491771698,
0.037086520344018936,
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 _doit(self):
if self.request.get('edit'):
return self._edit()
program = self.request.get('program')
sofar = self.request.get('sofar')
interp_state = 0
if sofar:
state = SoFar.get_or_insert(sofar, input_so_far='', last_state=0)
if program:
program = program.replace("\r... | |
704 | [
0.009760888293385506,
0.015713317319750786,
0.00674699991941452,
-0.011329480446875095,
0.019343683496117592,
-0.004267391748726368,
-0.007986803539097309,
-0.013281657360494137,
0.009589644148945808,
0.032303404062986374,
0.03178282082080841,
-0.08953987807035446,
0.036166660487651825,
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 MainPage(webapp.RequestHandler):
def _doit(self):
if self.request.get('edit'):
return self._edit()
program = self.request.get('program')
sofar = self.request.get('sofar')
interp_state = 0
if sofar:
state = SoFar.get_or_insert(sofar, input_so_far='', last_state=0)
if prog... | |
705 | [
0.03295813500881195,
0.015305716544389725,
-0.02547476254403591,
-0.019216887652873993,
0.002974119735881686,
-0.00895658228546381,
0.00044367348891682923,
0.014627779833972454,
0.0008246052311733365,
0.02430140972137451,
0.03859022259712219,
-0.04547388479113579,
0.03188908100128174,
0.03... | 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 _edit(self):
sofar = self.request.get('sofar')
interp_state = 0
if sofar:
state = SoFar.get_or_insert(sofar, input_so_far='', last_state=0)
while state.input_so_far[-2:] == "\n\n":
state.input_so_far = state.input_so_far[:-1]
else:
state = SoFar()
state.input_so_far =... | |
706 | [
-0.003358282847329974,
0.029729271307587624,
0.015784887596964836,
-0.029064644128084183,
0.003971784375607967,
0.030317209661006927,
-0.018328363075852394,
0.0056013986468315125,
-0.03473953530192375,
0.009982184506952763,
0.011790735647082329,
-0.051789768040180206,
-0.0188907403498888,
... | 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": "project_set", "annotat... | class ProjectManager(models.Manager):
def migrate(self, project_set, course, user, object_map):
SherdNote = models.get_model('djangosherd', 'SherdNote')
Asset = models.get_model('assetmgr', 'Asset')
for project_json in project_set:
old_project = Project.objects.get(id=project_j... | |
707 | [
0.004700937308371067,
0.0018454851815477014,
-0.022500840947031975,
-0.016783814877271652,
-0.004388765897601843,
0.03168236091732979,
0.01229099277406931,
0.008936678059399128,
-0.047107309103012085,
-0.02813217230141163,
0.01306223962455988,
-0.03258826956152916,
-0.01090152282267809,
-0... | 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": "project_set", "annotation": null, "type_comment": null}}, {"_type... | def migrate(self, project_set, course, user, object_map):
SherdNote = models.get_model('djangosherd', 'SherdNote')
Asset = models.get_model('assetmgr', 'Asset')
for project_json in project_set:
old_project = Project.objects.get(id=project_json['id'])
project_body = old_p... | |
708 | [
0.03679706156253815,
-0.0020895954221487045,
0.04197690263390541,
-0.011492074467241764,
0.027334319427609444,
-0.010841790586709976,
0.018521860241889954,
0.02973363921046257,
-0.014272595755755901,
-0.021235110238194466,
0.006923274137079716,
-0.02311868965625763,
-0.02300657145678997,
-... | 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": "project", "annotation": null, "type_comment": null}}, {"_type": "... | def migrate_one(self, project, course, user):
x = Project(title=project.title,
course=course,
author=user)
x.save()
collaboration_context = Collaboration.objects.get(
content_type=ContentType.objects.get_for_model(Course),
object_p... | |
709 | [
0.04476245865225792,
0.06169633939862251,
-0.0020352061837911606,
-0.017646506428718567,
0.023866869509220123,
-0.009566073305904865,
-0.010484029538929462,
-0.015581103973090649,
-0.03744296357035637,
-0.02436208166182041,
-0.002270734403282404,
-0.06604455411434174,
0.02710387296974659,
... | 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": "request", "annotation": null, "type_comment": null}}, {"_type": "... | def subobjects(self, request, type):
col = self.collaboration()
if not col:
return []
children = col.children.filter(content_type=type)
viewable_children = []
for child in children:
if child.permission_to("read", request) and child.content_object:
... | |
710 | [
-0.031148167327046394,
0.024109428748488426,
0.014849163591861725,
-0.035848453640937805,
0.01667315512895584,
-0.018391916528344154,
-0.04564656317234039,
0.007494735065847635,
0.014007321558892727,
0.01634577289223671,
0.0019686834421008825,
-0.048733316361904144,
-0.022203592583537102,
... | 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": "request", "annotation": null, "type_comment": null}}, {"_type": "... | def unresponded_assignments(self, request, user):
course = request.course
a = list(Project.objects.filter(course.faculty_filter,
due_date__isnull=False).
order_by("due_date", "-modified", "title"))
a.extend(Project.objects.filter(course.f... | |
711 | [
0.02859601192176342,
0.010835401713848114,
0.014720729552209377,
0.015454279258847237,
0.06728766113519669,
0.02184486575424671,
-0.01193572673946619,
-0.03021230734884739,
-0.0007988233701325953,
-0.05480487644672394,
0.006788444705307484,
-0.023958483710885048,
0.018674438819289207,
0.00... | 7 | {"_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": "request", "annotation": null, "type_comment": null}}], "kwarg": n... | def is_assignment(self, request):
if hasattr(self, 'is_assignment_cached'):
return self.is_assignment_cached
col = self.collaboration()
if not col:
return False
self.is_assignment_cached = col.permission_to("add_child", request)
return self.is_assignment_c... | |
712 | [
0.04743161052465439,
0.00504547543823719,
0.024005696177482605,
-0.016647998243570328,
-0.0015719658695161343,
0.03227447718381882,
-0.045499008148908615,
-0.04961269348859787,
0.006491477135568857,
-0.0016073393635451794,
-0.025662213563919067,
-0.010967524722218513,
0.03611207753419876,
... | 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 visibility_short(self):
col = self.collaboration()
if col:
return SHORT_NAME.get(col._policy.policy_name,
col._policy.policy_name)
elif self.submitted:
return u"Submitted"
else:
return u"Private" | |
713 | [
0.0331856831908226,
0.0006655534962192178,
0.01746085286140442,
-0.023612406104803085,
0.031072266399860382,
0.0012281093513593078,
0.010975931771099567,
-0.023323070257902145,
-0.019549110904335976,
-0.01754891127347946,
0.019461050629615784,
-0.034418512135744095,
0.03519846126437187,
-0... | 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": "request", "annotation": null, "type_comment": null}}, {"_type": "... | def collaboration(self, request=None, sync_group=False):
col = None
policy = None
if request and request.method == "POST":
policy = request.POST.get('publish', 'PrivateEditorsAreOwners')
try:
col = Collaboration.get_associated_collab(self)
except Collabor... | |
714 | [
0.06616035103797913,
0.02125067263841629,
-0.04169502854347229,
-0.02873031422495842,
0.013357262127101421,
0.07952822744846344,
0.04388056695461273,
0.027266213670372963,
-0.015500364825129509,
-0.019192444160580635,
0.039933864027261734,
0.00951134692877531,
-0.0006441908190026879,
-0.03... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "sender", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, ... | def on_threaded_comment_save(sender, **kwargs):
instance = kwargs['instance']
while instance.parent is not None:
instance = instance.parent
an_object = instance.content_object._parent.content_object
if hasattr(an_object, 'modified'):
an_object.modified = datetime.now()
an_object... | |
715 | [
0.03357680141925812,
-0.05683739483356476,
0.021234195679426193,
-0.016837526112794876,
-0.010512707754969597,
-0.01715683750808239,
0.053349535912275314,
0.040356025099754333,
0.025962457060813904,
-0.030899500474333763,
0.04165783151984215,
-0.02800113707780838,
0.030924063175916672,
-0.... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "counter_factory", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "step_name", "annotation": null, "type_comment": null}}... | def create(counter_factory,
step_name, # type: str
output_index,
consumers, # type: List[Operation]
coder
):
# type: (...) -> ConsumerSet
if len(consumers) == 1:
return SingletonConsumerSet(
counter_factory, step_name, output_inde... | |
716 | [
0.03043431229889393,
-0.032129522413015366,
0.03366580605506897,
-0.008853497914969921,
-0.018554599955677986,
-0.00837009772658348,
0.024580540135502815,
0.03708271309733391,
-0.013449105434119701,
-0.026169799268245697,
0.021269584074616432,
-0.026686308905482292,
-0.008270769380033016,
... | 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 setUp(self):
super(TestStacks, self).setUp()
keypair_page = self.home_pg.\
go_to_compute_accessandsecurity_keypairspage()
keypair_page.create_keypair(self.KEYPAIR_NAME)
keypair_page = self.home_pg.\
go_to_compute_accessandsecurity_keypairspage()
self.a... | |
717 | [
0.034811560064554214,
0.048846855759620667,
0.025429541245102882,
-0.03098832443356514,
0.029227623715996742,
0.019606653600931168,
0.002842273097485304,
-0.028674259781837463,
0.02628473937511444,
-0.015657655894756317,
0.00914935301989317,
0.01244437787681818,
0.0012089093215763569,
-0.0... | 19 | {"_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 progress_metrics(self):
# type: () -> beam_fn_api_pb2.Metrics.PTransform
return beam_fn_api_pb2.Metrics.PTransform(
processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
total_time_spent=(
... | |
718 | [
0.048357415944337845,
-0.08423852175474167,
-0.0006298981024883687,
0.0002436778595438227,
-0.015384318307042122,
0.025234034284949303,
0.05745667591691017,
0.024624289944767952,
0.03703024238348007,
-0.02190389111638069,
0.06238153204321861,
-0.04200200363993645,
0.011333036236464977,
-0.... | 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": "counter_factory", "ann... | class SingletonConsumerSet(ConsumerSet):
def __init__(
self, counter_factory, step_name, output_index, consumers, coder):
assert len(consumers) == 1
super(SingletonConsumerSet, self).__init__(
counter_factory, step_name, output_index, consumers, coder)
self.consumer = consumers[0]
def rec... | |
719 | [
0.013903709128499031,
0.03282689303159714,
0.02295290306210518,
-0.045811545103788376,
-0.01648414321243763,
-0.021409355103969574,
0.04324289411306381,
-0.01383301243185997,
0.013632704503834248,
0.015883220359683037,
0.008212614804506302,
-0.01765064150094986,
0.012984651140868664,
-0.02... | 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": "transform_id", "annotation": null, "type_comment": null}}], "kwar... | def execution_time_monitoring_infos(self, transform_id):
# type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
total_time_spent_msecs = (
self.scoped_start_state.sampled_msecs_int()
+ self.scoped_process_state.sampled_msecs_int()
+ self.scoped_finish_state.sampled_msecs_int())
... | |
720 | [
0.032806020230054855,
0.04915297031402588,
-0.01891447603702545,
-0.0014218090800568461,
0.0032822838984429836,
0.025406166911125183,
0.01346549205482006,
0.001367851858958602,
-0.04099070653319359,
-0.02057383768260479,
0.013600035570561886,
0.01694118231534958,
-0.012052793055772781,
0.0... | 12 | {"_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 ReadOperation(Operation):
def start(self):
with self.scoped_start_state:
super(ReadOperation, self).start()
range_tracker = self.spec.source.source.get_range_tracker(
self.spec.source.start_position, self.spec.source.stop_position)
for value in self.spec.source.source.read(range... | |
721 | [
0.024856584146618843,
0.04993770644068718,
-0.00981801375746727,
-0.020332101732492447,
0.002086819149553776,
0.017862161621451378,
0.01492068637162447,
0.014348109252750874,
-0.035769231617450714,
-0.011844487860798836,
0.025126032531261444,
0.027304070070385933,
-0.021522164344787598,
0.... | 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 start(self):
with self.scoped_start_state:
super(ReadOperation, self).start()
range_tracker = self.spec.source.source.get_range_tracker(
self.spec.source.start_position, self.spec.source.stop_position)
for value in self.spec.source.source.read(range_tracker):
if isinstance(va... | |
722 | [
-0.006759422365576029,
0.014921953901648521,
-0.02895304560661316,
-0.011286119930446148,
-0.009381900541484356,
0.031848348677158356,
-0.0201669093221426,
0.0119041558355093,
0.002867465140298009,
-0.050601016730070114,
0.06142500042915344,
0.02803991176187992,
0.029019860550761223,
0.029... | 12 | {"_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": "name_context", "annota... | class ImpulseReadOperation(Operation):
def __init__(self, name_context, counter_factory, state_sampler,
consumers, source, output_coder):
super(ImpulseReadOperation, self).__init__(
name_context, None, counter_factory, state_sampler)
self.source = source
self.receivers = [
... | |
723 | [
0.021818922832608223,
-0.008404999040067196,
-0.03164368495345116,
-0.01583320088684559,
0.009881552308797836,
0.01017686352133751,
0.0037254588678479195,
0.01561739668250084,
0.007564499042928219,
-0.044501062482595444,
0.04329710081219673,
0.024601658806204796,
0.019615450873970985,
0.01... | 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": "name_context", "annotation": null, "type_comment": null}}, {"_typ... | def __init__(self, name_context, counter_factory, state_sampler,
consumers, source, output_coder):
super(ImpulseReadOperation, self).__init__(
name_context, None, counter_factory, state_sampler)
self.source = source
self.receivers = [
ConsumerSet.create(
self.count... | |
724 | [
-0.00043182095396332443,
0.043632689863443375,
-0.009550127200782299,
-0.042556267231702805,
-0.001148393377661705,
0.014569262973964214,
0.054522085934877396,
-0.009487544186413288,
0.030465280637145042,
0.01900012046098709,
0.03624792769551277,
0.0455852709710598,
0.017260320484638214,
0... | 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": "unused_impulse", "annotation": null, "type_comment": null}}], "kw... | def process(self, unused_impulse):
# type: (WindowedValue) -> None
with self.scoped_process_state:
range_tracker = self.source.get_range_tracker(None, None)
for value in self.source.read(range_tracker):
if isinstance(value, WindowedValue):
windowed_value = value
else:
... | |
725 | [
0.026339726522564888,
0.009611875750124454,
0.015412043780088425,
-0.011334815062582493,
-0.03655935078859329,
0.023885127156972885,
0.020097022876143456,
0.029384372755885124,
-0.033113472163677216,
-0.05796628072857857,
0.018881523981690407,
-0.01665114425122738,
0.000976528855971992,
-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 reset(self):
# type: () -> None
super(DoOperation, self).reset()
for side_input_map in self.side_input_maps:
side_input_map.reset()
if self.user_state_context:
self.user_state_context.reset()
self.dofn_receiver.bundle_finalizer_param.reset() | |
726 | [
0.03109402395784855,
0.03671503812074661,
0.012078489176928997,
-0.04157766327261925,
0.017186474055051804,
0.024313118308782578,
-0.00009506024798611179,
-0.010160206817090511,
-0.01846904680132866,
-0.0336814746260643,
-0.010360957123339176,
0.023064004257321358,
0.018190227448940277,
-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):
# type: () -> None
with self.scoped_start_state:
super(DoOperation, self).setup()
# See fn_data in dataflow_runner.py
fn, args, kwargs, tags_and_types, window_fn = (
pickler.loads(self.spec.serialized_fn))
state = common.DoFnState(self.counter_factory)
... | |
727 | [
0.024066589772701263,
0.009274031966924667,
-0.00447470648214221,
-0.027581430971622467,
-0.02266736887395382,
-0.00695692328736186,
0.02845454402267933,
-0.008675165474414825,
-0.020988304167985916,
-0.01381310261785984,
-0.013107895851135254,
-0.019152527675032616,
0.019208496436476707,
... | 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": "transform_id", "annotation": null, "type_comment": null}}], "kwar... | def monitoring_infos(self, transform_id):
# type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
infos = super(DoOperation, self).monitoring_infos(transform_id)
if self.tagged_receivers:
for tag, receiver in self.tagged_receivers.items():
mi = monitoring_infos.int64_counter(
... | |
728 | [
0.0678991824388504,
0.03599386662244797,
0.02000470645725727,
-0.03270842507481575,
0.028546860441565514,
0.04804049804806709,
-0.0038391025736927986,
-0.002827611519023776,
0.012028376571834087,
-0.062253087759017944,
-0.0007164094131439924,
-0.01048908568918705,
-0.003790429327636957,
-0... | 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 progress_metrics(self):
# type: () -> beam_fn_api_pb2.Metrics.PTransform
metrics = super(DoOperation, self).progress_metrics()
if self.tagged_receivers:
metrics.processed_elements.measured.output_element_counts.clear()
for tag, receiver in self.tagged_receivers.items():
metrics.proce... | |
729 | [
0.06353975832462311,
0.033226098865270615,
0.0250227227807045,
0.01251136139035225,
0.005918929819017649,
0.05441410839557648,
-0.007153683342039585,
-0.011971346102654934,
-0.0514531247317791,
-0.012790470384061337,
0.03116311877965927,
-0.013069579377770424,
-0.002616646233946085,
-0.025... | 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": {"_type": "arg", "_fields": {"arg": "kwargs", "an... | class SdfProcessSizedElements(DoOperation):
def __init__(self, *args, **kwargs):
super(SdfProcessSizedElements, self).__init__(*args, **kwargs)
self.lock = threading.RLock()
self.element_start_output_bytes = None
def process(self, o):
# type: (WindowedValue) -> None
with self.scoped_process_st... | |
730 | [
0.04678449407219887,
0.04524487629532814,
0.004367421846836805,
0.00158152193762362,
-0.02258518896996975,
0.03364808112382889,
0.044847555458545685,
-0.008616888895630836,
-0.020089520141482353,
-0.0015054723480716348,
0.04576635733246803,
0.02388889715075493,
-0.019369374960660934,
-0.02... | 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": "o", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def process(self, o):
# type: (WindowedValue) -> None
with self.scoped_process_state:
try:
with self.lock:
self.element_start_output_bytes = self._total_output_bytes()
for receiver in self.tagged_receivers.values():
receiver.opcounter.restart_sampling()
# Ac... | |
731 | [
0.10112131386995316,
-0.022538816556334496,
-0.02952742390334606,
-0.005331340245902538,
-0.03395428881049156,
0.02357250265777111,
0.008651490323245525,
-0.019078221172094345,
-0.0037442976608872414,
-0.0003356665838509798,
0.007556009106338024,
0.05249319598078728,
-0.035931773483753204,
... | 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 _total_output_bytes(self):
total = 0
for receiver in self.tagged_receivers.values():
elements = receiver.opcounter.element_counter.value()
if elements > 0:
mean = (receiver.opcounter.mean_byte_counter.value())[0]
total += elements * mean
return total | |
732 | [
0.06379527598619461,
0.041992444545030594,
0.032190948724746704,
-0.014641137793660164,
0.025347011163830757,
0.046587660908699036,
0.02094733715057373,
-0.00598844513297081,
0.006171765271574259,
-0.01912636123597622,
0.016193244606256485,
-0.005441541317850351,
-0.014824457466602325,
-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 progress_metrics(self):
# type: () -> beam_fn_api_pb2.Metrics.PTransform
with self.lock:
metrics = super(SdfProcessSizedElements, self).progress_metrics()
current_element_progress = self.current_element_progress()
if current_element_progress:
metrics.active_elements.measured.input_elem... | |
733 | [
0.010287022218108177,
0.04574742913246155,
0.003048291429877281,
-0.029834209010004997,
0.04235326498746872,
0.030842620879411697,
0.05297847464680672,
-0.001328919781371951,
0.004218109417706728,
0.017425835132598877,
0.07122825086116791,
0.022148149088025093,
-0.014904807321727276,
-0.01... | 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": "o", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def process(self, o):
# type: (WindowedValue) -> None
with self.scoped_process_state:
if self.debug_logging_enabled:
_LOGGER.debug('Processing [%s] in %s', o, self)
key, values = o.value
self.output(
o.with_value((key, self.phased_combine_fn.apply(values)))) | |
734 | [
0.03537682443857193,
-0.0037815049290657043,
-0.03576061874628067,
0.01912199705839157,
0.02510467730462551,
0.023276008665561676,
0.007574297953397036,
0.01188634242862463,
-0.004836939740926027,
0.004673262592405081,
-0.015317916870117188,
0.012868404388427734,
0.024878915399312973,
-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}}, {"_type": "arg", "_fields": {"arg": "name_context", "annotation": null, "type_comment": null}}, {"_typ... | def __init__(self, name_context, spec, counter_factory, state_sampler):
super(CombineOperation, self).__init__(
name_context, spec, counter_factory, state_sampler)
# Combiners do not accept deferred side-inputs (the ignored fourth argument)
# and therefore the code to handle the extra args/kwargs is... | |
735 | [
0.0227496400475502,
0.047796718776226044,
0.01839199848473072,
0.001076924498192966,
0.007260655984282494,
0.0225124042481184,
0.03995545953512192,
-0.01659400202333927,
-0.023611178621649742,
0.01069432869553566,
0.061731185764074326,
0.029616985470056534,
-0.011811832897365093,
0.0101012... | 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": "o", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def process(self, o):
# type: (WindowedValue) -> None
with self.scoped_process_state:
# TODO(robertwb): Structural (hashable) values.
key = o.value[0], tuple(o.windows)
self.table[key].append(o)
self.size += 1
if self.size > self.max_size:
self.flush(9 * self.max_size // 10... | |
736 | [
0.02879403531551361,
0.009382258169353008,
0.054200537502765656,
0.026277581229805946,
-0.03566588833928108,
-0.00027845072327181697,
0.00468810461461544,
0.002212482737377286,
-0.03706929460167885,
-0.03094753809273243,
0.044207312166690826,
0.03252032399177551,
0.025358108803629875,
-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}}, {"_type": "arg", "_fields": {"arg": "name_context", "annotation": null, "type_comment": null}}, {"_typ... | def __init__(self, name_context, spec, counter_factory, state_sampler):
super(PGBKOperation, self).__init__(
name_context, spec, counter_factory, state_sampler)
assert not self.spec.combine_fn
self.table = collections.defaultdict(list)
self.size = 0
# TODO(robertwb) Make this configurable.
... | |
737 | [
0.01129673607647419,
0.021766280755400658,
0.04214978963136673,
0.018457509577274323,
-0.01344496849924326,
0.0166549701243639,
0.0006315832724794745,
0.022050241008400917,
-0.019642740488052368,
-0.021692203357815742,
0.03180370852351189,
0.027408475056290627,
0.012198005802929401,
0.0210... | 12 | {"_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": "name_context", "annota... | class PGBKCVOperation(Operation):
def __init__(self, name_context, spec, counter_factory, state_sampler):
super(PGBKCVOperation, self).__init__(
name_context, spec, counter_factory, state_sampler)
# Combiners do not accept deferred side-inputs (the ignored fourth
# argument) and therefore the cod... | |
738 | [
0.015719104558229446,
0.01595255546271801,
0.0319569893181324,
-0.004623647313565016,
-0.01909118890762329,
0.022943146526813507,
0.011776357889175415,
0.03774141147732735,
-0.0280661229044199,
0.028688661754131317,
0.05530219152569771,
0.03421369194984436,
-0.024914519861340523,
-0.006530... | 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": "target", "annotation": null, "type_comment": null}}], "kwarg": nu... | def flush(self, target):
limit = self.size - target
for ix, (kw, vs) in enumerate(list(self.table.items())):
if ix >= limit:
break
del self.table[kw]
key, windows = kw
output_value = [v.value[1] for v in vs]
windowed_value = WindowedValue(
(key, output_value),
... | |
739 | [
-0.017527788877487183,
0.028166314586997032,
0.0020152272190898657,
-0.017621520906686783,
0.014598680660128593,
-0.0013744845055043697,
0.04002334922552109,
0.01793786510825157,
-0.01660219207406044,
0.00382834579795599,
0.043819475919008255,
0.03599289432168007,
-0.008476842194795609,
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": "wkv", "annotation": null, "type_comment": null}}], "kwarg": null,... | def process(self, wkv):
# type: (WindowedValue) -> None
with self.scoped_process_state:
key, value = wkv.value
# pylint: disable=unidiomatic-typecheck
# Optimization for the global window case.
if len(wkv.windows) == 1 and type(wkv.windows[0]) is _global_window_type:
wkey = 0, ke... | |
740 | [
0.02871149219572544,
0.007408243604004383,
0.02626228518784046,
0.02004227042198181,
-0.01119723916053772,
0.009851387701928616,
0.01337363850325346,
0.009936261922121048,
-0.026359282433986664,
-0.02018776722252369,
0.014258747920393944,
0.0277900081127882,
0.021085001528263092,
0.0013390... | 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": "name_context", "annotation": null, "type_comment": null}}, {"_typ... | def __init__(self, name_context, spec, counter_factory, state_sampler):
super(PGBKCVOperation, self).__init__(
name_context, spec, counter_factory, state_sampler)
# Combiners do not accept deferred side-inputs (the ignored fourth
# argument) and therefore the code to handle the extra args/kwargs is
... | |
741 | [
0.04144442081451416,
-0.004153672605752945,
0.02436821162700653,
0.006236277986317873,
-0.026468124240636826,
0.02473742701113224,
-0.0028167092241346836,
-0.0010160632664337754,
-0.01918765902519226,
-0.019441494718194008,
0.03918297588825226,
-0.0016989674186334014,
0.014907069504261017,
... | 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": "index", "annotation": null, "type_comment": null}}, {"_type": "ar... | def __setitem__(self, index, data):
# Expand data for record vars?
if self.isrec:
if isinstance(index, tuple):
rec_index = index[0]
else:
rec_index = index
if isinstance(rec_index, slice):
recs = (rec_index.start or 0) +... | |
742 | [
0.03126407787203789,
0.03905138373374939,
0.004186538048088551,
0.01859535090625286,
0.009630761109292507,
-0.02434968762099743,
0.08035396784543991,
0.005791665054857731,
0.004875680431723595,
-0.002946082502603531,
-0.0008657347643747926,
0.05733662098646164,
-0.021317461505532265,
0.001... | 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": "wkey", "annotation": null, "type_comment": null}}, {"_type": "arg... | def output_key(self, wkey, accumulator):
windows, key = wkey
if self.combine_fn_compact is None:
value = accumulator
else:
value = self.combine_fn_compact(accumulator)
if windows == 0:
self.output(_globally_windowed_value.with_value((key, value)))
else:
self.output(
... | |
743 | [
0.05547597259283066,
0.04574880003929138,
0.03577733784914017,
-0.0031008135993033648,
-0.019898507744073868,
-0.005896265152841806,
0.0050107152201235294,
0.008705596439540386,
-0.02126430906355381,
-0.03009204939007759,
0.006279355846345425,
-0.028470855206251144,
0.013924513012170792,
-... | 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class QuotaTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('quota_set', selector='quota_set')
root.set('id')
for resource in QUOTAS.resources:
elem = xmlutil.SubTemplateElement(root, resource)
elem.text = resource
retur... | |
744 | [
0.06413112580776215,
0.04161599278450012,
0.044337864965200424,
0.004044009372591972,
-0.01987682841718197,
-0.00722251133993268,
-0.002632336923852563,
-0.002665166510269046,
0.003999242093414068,
-0.032089438289403915,
0.01123369112610817,
-0.03789132460951805,
0.0007520962390117347,
-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 construct(self):
root = xmlutil.TemplateElement('quota_set', selector='quota_set')
root.set('id')
for resource in QUOTAS.resources:
elem = xmlutil.SubTemplateElement(root, resource)
elem.text = resource
return xmlutil.MasterTemplate(root, 1) | |
745 | [
0.012494279071688652,
0.02166472002863884,
0.012745359912514687,
0.01616484671831131,
0.010521497577428818,
-0.017133302986621857,
-0.03692089393734932,
0.024821169674396515,
-0.018316971138119698,
-0.004118927288800478,
0.06671585887670517,
0.011161156930029392,
-0.008465023711323738,
-0.... | 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": "req", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def show(self, req, id):
context = req.environ['nova.context']
authorize_show(context)
try:
sqlalchemy_api.authorize_project_context(context, id)
return self._format_quota_set(id, self._get_quotas(context, id))
except exception.NotAuthorized:
raise web... | |
746 | [
0.022414587438106537,
0.029644722118973732,
0.011364977806806564,
0.003726030932739377,
0.009396839886903763,
0.009034749120473862,
0.01955290138721466,
0.03321890905499458,
-0.021538561210036278,
0.006540994625538588,
0.04246974363923073,
0.024295123293995857,
-0.04475909098982811,
-0.002... | 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": "req", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def update(self, req, id, body):
context = req.environ['nova.context']
authorize_update(context)
project_id = id
for key in body['quota_set'].keys():
if key in QUOTAS:
value = int(body['quota_set'][key])
self._validate_quota_limit(value)
... | |
747 | [
-0.02252587489783764,
0.03867717832326889,
0.0766381174325943,
-0.014193570241332054,
-0.032780103385448456,
-0.008397961966693401,
-0.0020129443146288395,
0.026166783645749092,
0.030870119109749794,
-0.04264039546251297,
0.027074025943875313,
-0.05343180522322655,
0.010642193257808685,
-0... | 7 | {"_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 get_resources(self):
resources = []
res = extensions.ResourceExtension('os-quota-sets',
QuotaSetsController(),
member_actions={'defaults': 'GET'})
resources.append(res)
return resources | |
748 | [
0.01997237466275692,
0.03443741798400879,
0.007702524773776531,
0.010179718025028706,
-0.002162015065550804,
0.0091622993350029,
0.02822231501340866,
0.0509151816368103,
-0.05883335322141647,
0.0466243252158165,
-0.04370477795600891,
-0.006220631767064333,
0.013724096119403839,
0.007099814... | 12 | {"_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": "sender", "annotation":... | class WinDialog:
def __init__(self, sender, active_terminal):
win_pref_ui_file = os.path.join(TerraHandler.get_resources_path(), 'win_pref.ui')
if not os.path.exists(win_pref_ui_file):
msg = t('UI data file is missing: {}')
sys.exit(msg.format(win_pref_ui_file))
Conf... | |
749 | [
0.027692630887031555,
0.029191458597779274,
0.04839073121547699,
0.026384130120277405,
-0.005674134474247694,
-0.002935204654932022,
0.04501241818070412,
0.037232790142297745,
-0.041800644248723984,
0.03473474085330963,
-0.03866024315357208,
0.01435782015323639,
0.015809066593647003,
-0.01... | 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": "sender", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, sender, active_terminal):
win_pref_ui_file = os.path.join(TerraHandler.get_resources_path(), 'win_pref.ui')
if not os.path.exists(win_pref_ui_file):
msg = t('UI data file is missing: {}')
sys.exit(msg.format(win_pref_ui_file))
ConfigManager.disable_los... | |
750 | [
-0.001595864538103342,
0.01581626385450363,
0.017940128222107887,
0.0005209548398852348,
-0.03426659479737282,
0.03189355880022049,
0.03735153749585152,
0.009824356064200401,
-0.028144169598817825,
0.023398103192448616,
-0.018735093995928764,
-0.02282857522368431,
0.010939680971205235,
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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def update(self):
ConfigManager.set_conf(self.window.name, 'vertical-position', self.dialog.v_align.get_active() * 50)
ConfigManager.set_conf(self.window.name, 'horizontal-position', self.dialog.h_align.get_active() * 50)
ConfigManager.set_conf(self.window.name, 'hide-tab-bar', self.chk_hide_tab... | |
751 | [
0.0021236580796539783,
-0.0424547903239727,
0.10240104794502258,
0.005557951517403126,
-0.041425880044698715,
-0.009835890494287014,
-0.015764372423291206,
-0.05796193331480026,
0.04902021586894989,
0.0054844580590724945,
0.011562989093363285,
-0.04806479811668396,
-0.06389041244983673,
-0... | 8 | {"_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 AreaTestCase(unittest.TestCase):
def test_f_to_c(self):
text = (
"Total area is 100.50 square miles for this land. "
"Total area is 15.7 square mi for this land. "
"Total area is 1 Square Mile for this land. "
"Total area is 1-16 sq-mi for this land. "
... | |
752 | [
0.025277171283960342,
-0.024662841111421585,
0.074026919901371,
0.0194410253316164,
-0.024906013160943985,
-0.016049403697252274,
-0.019876176491379738,
-0.053088460117578506,
0.055904142558574677,
0.024509256705641747,
0.01597261242568493,
-0.01990177296102047,
-0.057900719344615936,
-0.0... | 7 | {"_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_f_to_c(self):
text = (
"Total area is 100.50 square miles for this land. "
"Total area is 15.7 square mi for this land. "
"Total area is 1 Square Mile for this land. "
"Total area is 1-16 sq-mi for this land. "
"Total area is 16.7-Square-mi fo... | |
753 | [
0.01681252382695675,
-0.004305094014853239,
0.05297531187534332,
-0.021106287837028503,
-0.03369302302598953,
-0.004129491280764341,
0.03888179361820221,
-0.0067408704198896885,
0.020777741447091103,
-0.001969863660633564,
0.03228820487856865,
-0.047174762934446335,
-0.03237883746623993,
-... | 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(RhsmRepositoryReleaseModuleTestCase, self).setUp()
# Mainly interested that the subscription-manager calls are right
# based on the module args, so patch out run_command in the module.
# returns (rc, out, err) structure
self.mock_run_command = patch('ansib... | |
754 | [
0.025676216930150986,
-0.0017084510764107108,
0.03210803121328354,
-0.06457339227199554,
-0.038003865629434586,
0.04119424894452095,
0.009016027674078941,
-0.02561241015791893,
0.03657457232475281,
0.028585847467184067,
0.03861641883850098,
-0.05035703256726265,
-0.04637543484568596,
0.030... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "rhsm_release", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Store", "_fields": {}}}}... | class RhsmRepositoryReleaseModuleTestCase(ModuleTestCase):
module = rhsm_release
def setUp(self):
super(RhsmRepositoryReleaseModuleTestCase, self).setUp()
# Mainly interested that the subscription-manager calls are right
# based on the module args, so patch out run_command in the modul... | |
755 | [
0.03698742389678955,
-0.01901678927242756,
0.026665352284908295,
-0.03787084296345711,
-0.04121854156255722,
0.05677139386534691,
0.02485201507806778,
0.011042756959795952,
0.034848615527153015,
-0.005425480660051107,
0.0243870560079813,
-0.03747563064098358,
-0.03361647576093674,
0.022503... | 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_release_set_idempotent(self):
# test that the module does not attempt to change the release when
# the current release matches the user-specified target release
set_module_args({'release': '7.5'})
self.module_main_command.side_effect = [
# first call, get_release: re... | |
756 | [
0.01935768499970436,
-0.015723751857876778,
0.027021557092666626,
-0.04887174814939499,
-0.05166708305478096,
0.04817291349172592,
0.030818551778793335,
0.012846887111663818,
0.040392570197582245,
0.0034242835827171803,
0.023026559501886368,
-0.030399251729249954,
-0.0432111993432045,
0.04... | 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_release_set(self):
# test that the module attempts to change the release when the current
# release is not the same as the user-specific target release
set_module_args({'release': '7.5'})
self.module_main_command.side_effect = [
# first call, get_release: returns dif... | |
757 | [
0.0427156463265419,
-0.020417841151356697,
0.03322063386440277,
-0.04090707004070282,
-0.040883272886276245,
0.04635658860206604,
0.02085808478295803,
0.020560622215270996,
0.03981240838766098,
-0.004152579233050346,
0.027913900092244148,
-0.028294652700424194,
-0.03640943393111229,
0.0273... | 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_release_unset_idempotent(self):
# test that the module attempts to change the release when the current
# release is not the same as the user-specific target release
set_module_args({'release': None})
self.module_main_command.side_effect = [
# first call, get_release:... | |
758 | [
0.02748868614435196,
-0.00945744477212429,
0.03804472088813782,
-0.0511561818420887,
-0.046666283160448074,
0.039525434374809265,
0.022927138954401016,
0.021924076601862907,
0.037710368633270264,
0.006376610603183508,
0.026796095073223114,
-0.025219853967428207,
-0.038546252995729446,
0.04... | 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_release_unset(self):
# test that the module attempts to change the release when the current
# release is not the same as the user-specific target release
set_module_args({'release': None})
self.module_main_command.side_effect = [
# first call, get_release: returns ve... | |
759 | [
0.05262289568781853,
0.0027085314504802227,
0.00946450512856245,
-0.061712753027677536,
-0.031863629817962646,
0.02297031134366989,
0.027294134721159935,
-0.006319906562566757,
0.0427468903362751,
-0.0018072230741381645,
0.03886527568101883,
-0.026213180273771286,
-0.051885880529880524,
0.... | 7 | {"_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_release_insane(self):
# test that insane values for release trigger fail_json
insane_value = 'this is an insane release value'
set_module_args({'release': insane_value})
result = self.module_main(AnsibleFailJson)
# also ensure that the fail msg includes the insane valu... | |
760 | [
0.0492539256811142,
0.027922863140702248,
0.044560566544532776,
-0.08200198411941528,
-0.020065438002347946,
0.013724126853048801,
-0.0032019666396081448,
-0.03129786625504494,
0.014818365685641766,
0.06391409039497375,
0.015398443676531315,
-0.0626484602689743,
-0.049543965607881546,
0.00... | 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_release_matcher(self):
# throw a few values at the release matcher -- only sane_values should match
sane_values = ['1Server', '10Server', '1.10', '10.0']
insane_values = [
'6server', # lowercase 's'
'100Server', # excessively long 'x' component
'1... | |
761 | [
0.0017644456820562482,
0.001251302077434957,
0.04245645925402641,
-0.04702261462807655,
-0.024060122668743134,
-0.02607976831495762,
-0.038570836186409,
0.000019723100194823928,
0.019823258742690086,
-0.032885096967220306,
-0.02337959036231041,
-0.016716957092285156,
0.045485928654670715,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "LPCXpresso"}}, "targets": [{"_type": "Name", "_fields": {"id": "NAME", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}... | class LPCXpresso(Exporter):
NAME = 'LPCXpresso'
TOOLCHAIN = 'GCC_ARM'
MBED_CONFIG_HEADER_SUPPORTED = True
TARGETS = [
'LPC1768',
'LPC4088',
'LPC4088_DM',
'LPC4330_M4',
'LPC1114',
'LPC11U35_401',
'LPC11U35_501',
'UBLOX_C027',
'ARCH... | |
762 | [
-0.027315372601151466,
0.013080926612019539,
0.047179002314805984,
-0.05287739634513855,
-0.033844299614429474,
-0.04496424272656441,
-0.02826126106083393,
-0.02117864228785038,
0.0029991541523486376,
-0.017106713727116585,
-0.005009164102375507,
-0.019609853625297546,
0.02826126106083393,
... | 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 generate(self):
libraries = []
for lib in self.resources.libraries:
l, _ = splitext(basename(lib))
libraries.append(l[3:])
ctx = {
'name': self.project_name,
'include_paths': self.resources.inc_dirs,
'linker_script': self.resources... | |
763 | [
-0.020317064598202705,
0.02796952612698078,
-0.01300023589283228,
-0.018515827134251595,
-0.01914234459400177,
0.0017564862500876188,
0.008586645126342773,
-0.01843751221895218,
0.017945248633623123,
-0.008497142232954502,
0.03231039643287659,
-0.03895595669746399,
-0.005834443494677544,
-... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def get_instance(module):
vapp_name = module.params['vapp_name']
inst = dict(vapp_name=vapp_name, state='absent')
try:
vapp = module.get_vapp(vapp_name)
if vapp:
status = module.vca.get_status(vapp.me.get_status())
inst['status'] = VAPP_STATUS.get(status, 'unknown')
... | |
764 | [
0.06003590300679207,
0.00014387596456799656,
0.0022896905429661274,
-0.0269942469894886,
-0.018996762111783028,
0.02127549797296524,
0.011338897980749607,
-0.0765567347407341,
-0.012007180601358414,
-0.008627422153949738,
-0.028944317251443863,
-0.028002148494124413,
0.010150231420993805,
... | 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": "topGroupName", "annota... | class BlockwiseObjectClassificationSerializer(AppletSerializer):
def __init__(self, topGroupName, operator):
serialSlots = [SerialDictSlot(operator.BlockShape3dDict, selfdepends=True),
SerialDictSlot(operator.HaloPadding3dDict, selfdepends=True)]
super(BlockwiseObjectClassifi... | |
765 | [
0.0015301716048270464,
0.026945507153868675,
-0.025476129725575447,
-0.0045581781305372715,
-0.03226424381136894,
0.022206244990229607,
-0.034023359417915344,
0.030732780694961548,
0.03694142401218414,
-0.013441710732877254,
-0.0027809543535113335,
-0.016949594020843506,
0.000692651665303856... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def do_operation(module):
vapp_name = module.params['vapp_name']
operation = module.params['operation']
vm_name = module.params.get('vm_name')
vm = None
if vm_name:
vm = module.get_vm(vapp_name, vm_name)
if operation == 'poweron':
operation = 'powerOn'
elif operation == 'po... | |
766 | [
0.00021877369727008045,
0.01038602739572525,
-0.02212197706103325,
0.008345447480678558,
-0.035035185515880585,
0.0205941591411829,
-0.02226847968995571,
-0.006686822976917028,
0.05069009214639664,
0.030744735151529312,
0.00018623560026753694,
-0.036353714764118195,
0.003330330830067396,
0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def set_state(module):
state = module.params['state']
vapp = module.get_vapp(module.params['vapp_name'])
if state == 'deployed':
action = module.params['operation'] == 'poweron'
if not vapp.deploy(action):
module.fail('unable to deploy vapp')
elif state == 'undeployed':
... | |
767 | [
0.0013273681979626417,
0.04445664584636688,
-0.0017787046963348985,
-0.010731779038906097,
-0.015408126637339592,
0.0651930496096611,
-0.0056981234811246395,
-0.009277472272515297,
0.03949194401502609,
0.04535932093858719,
0.03665855526924133,
-0.05335800349712372,
0.02171430177986622,
0.0... | 11 | {"_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():
argument_spec = dict(
vapp_name=dict(required=True),
vdc_name=dict(required=True),
template_name=dict(),
catalog_name=dict(default='Public Catalog'),
network_name=dict(),
network_mode=dict(default='pool', choices=['dhcp', 'static', 'pool']),
vm_na... | |
768 | [
-0.007227036170661449,
0.023988734930753708,
0.01965119130909443,
-0.0397784523665905,
-0.0208149217069149,
0.00374245410785079,
-0.002489459468051791,
0.022441500797867775,
-0.031764574348926544,
0.06490447372198105,
0.04522683098912239,
-0.05977347493171692,
0.011333156377077103,
-0.0073... | 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": "datafile", "annotation": null, "type_comment": null}}, {"_type": ... | def build(self, datafile, categorial_features, cutoff=0):
with open(datafile, 'r') as f:
for line in f:
features = line.rstrip('\n').split('\t')
for i in range(0, self.num_feature):
if features[categorial_features[i]] != '':
... | |
769 | [
0.03299769014120102,
0.007590410765260458,
0.053474146872758865,
-0.059687692672014236,
-0.00791403278708458,
-0.004960244987159967,
0.024948326870799065,
-0.0028978893533349037,
-0.0002881340333260596,
0.034127429127693176,
0.03405681997537613,
-0.022571174427866936,
-0.0033009459730237722,... | 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": "datafile", "annotation": null, "type_comment": null}}, {"_type": ... | def build(self, datafile, continous_features):
with open(datafile, 'r') as f:
for line in f:
features = line.rstrip('\n').split('\t')
for i in range(0, self.num_feature):
val = features[continous_features[i]]
if val != '':
... | |
770 | [
-0.051368605345487595,
-0.012100390158593655,
-0.0012650260468944907,
-0.052426423877477646,
0.005411634687334299,
-0.03421133756637573,
-0.02257535420358181,
-0.012081039138138294,
-0.02169813960790634,
0.022330250591039658,
0.03759118914604187,
-0.05732849985361099,
-0.0378233939409256,
... | 19 | {"_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 source:
def __init__(self):
self.priority = 1
self.language = ['en']
self.domains = ['rlslog.me']
self.base_link = 'http://www.rlslog.me'
self.search_link = '/?s=%s'
self.scraper = cfscrape.create_scraper()
def movie(self, imdb, title, localtitle, aliases, ... | |
771 | [
-0.0439298041164875,
-0.0007387761725112796,
-0.001082374481484294,
-0.03968918323516846,
-0.007389348931610584,
-0.04045097157359123,
-0.03209669142961502,
-0.0028900352772325277,
-0.03313780203461647,
0.026154739782214165,
0.024872396141290665,
-0.03471216559410095,
-0.007789287716150284,
... | 18 | {"_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 sources(self, url, hostDict, hostprDict):
try:
hostDict = hostDict + hostprDict
sources = []
query_bases = []
options = []
if url is None:
return sources
if not debrid.status():
return sources
... | |
772 | [
0.002958324272185564,
-0.007095877081155777,
-0.08166410773992538,
-0.055741600692272186,
-0.01683732680976391,
-0.0074393912218511105,
-0.001123471069149673,
0.020498059689998627,
-0.01284845918416977,
0.0415293388068676,
0.02776825800538063,
-0.04556947574019432,
0.0245074350386858,
-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": "url", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def episode(self, url, imdb, tvdb, title, premiered, season, episode):
if url == None: return
url = urlparse.parse_qs(url)
url = dict([(i, url[i][0]) if url[i] else (i, '') for i in url])
url['title'], url['premiered'], url['season'], url['episode'] = title, premiered, season, episode
... | |
773 | [
0.047458894550800323,
-0.047019053250551224,
-0.004321442451328039,
0.011177470907568932,
0.05533205717802048,
-0.0046843113377690315,
0.005327579565346241,
0.029535353183746338,
0.05594783276319504,
-0.018220432102680206,
0.0140309426933527,
-0.006064313929527998,
0.0003178541664965451,
0... | 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 test_cookies_should_allow_secure_to_be_set( self ):
name = 'foo'
value = 'bar'
secure = True
self.driver.add_cookie({ 'name': name,
'value': value,
'path': '/',
'secure': secure})
... | |
774 | [
0.016046764329075813,
-0.052247304469347,
0.03575388714671135,
-0.015491172671318054,
0.036799706518650055,
-0.055864088237285614,
0.023596258834004402,
0.014532506465911865,
0.03555779904127121,
0.006454655434936285,
0.0207965187728405,
0.009908032603561878,
0.018388958647847176,
-0.01898... | 12 | {"_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 CookieTest(base_test.WebDriverBaseTest):
def setUp(self):
self.driver.get(self.webserver.where_is("cookie/res/cookie_container.html"))
def test_can_create_a_well_formed_cookie( self ):
name = 'foo'
value = 'bar'
self.driver.add_cookie({ 'name': name, 'value': value })
... | |
775 | [
0.0035241832956671715,
-0.05022171884775162,
0.010991626419126987,
-0.016673071309924126,
0.03789129853248596,
-0.01711183600127697,
0.007723389659076929,
0.016740573570132256,
0.06925737112760544,
-0.02403082326054573,
-0.009039685130119324,
-0.018428131937980652,
0.013770471327006817,
0.... | 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 test_secure_defaults_to_false( self ):
name = 'foo'
value = 'bar'
self.driver.add_cookie({ 'name': name,
'value': value})
self.assertFalse(self.driver.get_cookie(name)[0]['secure']) | |
776 | [
-0.006758404430001974,
0.016121145337820053,
0.029192345216870308,
0.007411964237689972,
-0.015170513652265072,
0.055770453065633774,
0.03760940581560135,
-0.029033906757831573,
-0.014289197511970997,
0.031113415956497192,
-0.005302748177200556,
-0.02503332868218422,
0.0827842652797699,
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": "db", "annotation": null, "type_comment": null}}], "kwarg": null, ... | def register_type(self, db):
try:
self._register_oid(db)
ENUMTYPE = reg_type(self.type_name.upper(),
self._type_oid,
psycopg2.STRING)
reg_array_type(self.type_name.upper() + 'ARRAY',
se... | |
777 | [
0.010959931649267673,
-0.007253807503730059,
0.011724578216671944,
-0.016064463183283806,
-0.0013699914561584592,
0.01448005996644497,
-0.032652467489242554,
-0.018447954207658768,
-0.006754376459866762,
0.0484689362347126,
0.03380976989865303,
-0.06750932335853577,
-0.021244769915938377,
... | 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": "verbose", "annotation": null, "type_comment": null}}], "kwarg": n... | def __init__(self, verbose=False):
self.verbose = verbose
if verbose:
deck = Deck()
deck.cards.sort(key=self.undesirability)
self.say('Card undesirability: ')
for card in deck.cards:
self.say('{}: {}', card, self.undesirability(card)... | |
778 | [
0.04301789402961731,
-0.010440516285598278,
0.012090221047401428,
-0.010491890832781792,
0.01906578801572323,
-0.030071428045630455,
-0.022136863321065903,
-0.012329970486462116,
0.02993442676961422,
-0.01141663920134306,
0.0641615092754364,
-0.052059873938560486,
-0.02968326210975647,
0.0... | 7 | {"_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": "hand", "annotation": null, "type_comment": null}}, {"_type": "arg... | def play_card(self, hand, trick, trick_nr, are_hearts_broken):
# Play first card that is valid
for card in hand:
if is_card_valid(hand, trick, card, trick_nr, are_hearts_broken):
return card
raise AssertionError(
'Apparently there is no valid card th... | |
779 | [
0.03564443066716194,
-0.0306654442101717,
0.02552049234509468,
-0.019366975873708725,
0.028239784762263298,
-0.007672744337469339,
-0.046955663710832596,
-0.02111600525677204,
0.013507094234228134,
0.0070727127604186535,
0.04498960077762604,
-0.055509302765131,
-0.03143144026398659,
-0.006... | 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": "hand", "annotation": null, "type_comment": null}}, {"_type": "arg... | def play_card(self, hand, trick, trick_nr, are_hearts_broken):
# Lead with a low card
if not trick:
hand.sort(key=lambda card:
100 if not are_hearts_broken and card.suit == Suit.hearts else
card.rank.value)
return hand[0]
... | |
780 | [
0.012596712447702885,
0.015253736637532711,
-0.031063033267855644,
-0.04717426374554634,
-0.013876914978027344,
-0.01121385209262371,
-0.0013775767292827368,
-0.04002445191144943,
0.004359935875982046,
-0.0010869646212086082,
0.007077347487211227,
-0.029082342982292175,
0.024903567507863045,... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "end"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "error"}}], "values": [{"_type": ... | class Player (GObject.GObject):
__gsignals__ = {
'end': (GObject.SignalFlags.RUN_FIRST, None, ()),
'error': (GObject.SignalFlags.RUN_FIRST, None, (object,))
}
def __init__(self):
GObject.GObject.__init__(self)
self.player = Gst.ElementFact... | |
781 | [
-0.02029828354716301,
-0.0030940163414925337,
-0.020195895805954933,
-0.00793501641601324,
-0.004821802023798227,
-0.009022881276905537,
0.0037147393450140953,
0.01523011177778244,
0.03680823743343353,
0.019799144938588142,
0.0067831589840352535,
-0.01823773793876171,
-0.012715223245322704,
... | 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": "bus", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def onMessage(self, bus, message):
if message.type == Gst.MessageType.ERROR:
# Sound seams sometimes to work, even though errors are dropped.
# Therefore we really can't do anything to test.
# self.emit("error", message)
self.player.set_state(G... | |
782 | [
-0.018710186704993248,
0.01744038239121437,
0.0076123508624732494,
-0.0043244631960988045,
0.02721010521054268,
-0.07484074681997299,
0.011972445994615555,
0.0609506331384182,
-0.02023913525044918,
0.053383633494377136,
-0.05061079561710358,
-0.02684730291366577,
0.014654585160315037,
-0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "router_id", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs... | def wizard_form(router_id):
router_db = current_app.config['ROUTER_DB']
router = router_db_get_entry(router_db, router_id)
# add location type field dynamically (values are set in config)
prefix_defaults = current_app.config['PREFIX_DEFAULTS']
choices = [(k,k) for k in prefix_defaults.keys()]
s... | |
783 | [
0.014093250036239624,
-0.048031285405159,
-0.023896096274256706,
-0.001246940460987389,
0.01880871132016182,
-0.018795428797602654,
0.007551378570497036,
-0.020229991525411606,
0.012652046047151089,
0.021491874009370804,
-0.006751078646630049,
-0.059826578944921494,
-0.00343697308562696,
-... | 7 | {"_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": "identifier", "annotation": null, "type_comment": null}}, {"_type"... | def __init__(self, identifier, name=None):
if len(identifier)==18:
identifier = 'music://id.echonest.com/~/AR/' + identifier
self._identifier = identifier
self._name = name
self._audio = document.WebDocumentSet(identifier, 'get_audio')
self._blogs = document.WebDocume... | |
784 | [
-0.0286683551967144,
-0.05056218430399895,
-0.04084904119372368,
-0.0325939916074276,
-0.001683817245066166,
0.021254511550068855,
0.025931626558303833,
-0.0023091149050742388,
-0.03400721773505211,
-0.008698086254298687,
-0.014782821759581566,
-0.08470399677753448,
0.007385802920907736,
-... | 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}}, {"_type": "arg", "_fields": {"arg": "identifier", "annotati... | class SimilarDocumentSet(document.DocumentSet):
def __init__(self, identifier):
super(SimilarDocumentSet, self).__init__(identifier, 'get_similar', 'similar/artist')
def __len__(self):
if self._len is None:
self._len = 15
return self._len
def __getitem__(self, k):
... | |
785 | [
0.024557143449783325,
0.017277952283620834,
0.035805750638246536,
-0.003818971337750554,
-0.041152309626340866,
0.018678242340683937,
-0.007024592719972134,
0.011896674521267414,
-0.025390373542904854,
0.04177723079919815,
0.03353751078248024,
-0.0036569545045495033,
0.028700148686766624,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "command", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}, {"_type": ... | def make_corrected_commands(command, rules, settings):
for rule in rules:
new_commands = rule.get_new_command(command, settings)
if not isinstance(new_commands, list):
new_commands = [new_commands]
for n, new_command in enumerate(new_commands):
yield types.CorrectedCo... | |
786 | [
0.014698593877255917,
0.029397187754511833,
-0.011268514208495617,
-0.044193606823682785,
0.036073919385671616,
-0.013206723146140575,
-0.05038120225071907,
-0.004958635196089745,
-0.030130894854664803,
-0.0013321364531293511,
-0.025092773139476776,
-0.04402241110801697,
0.009049051441252232... | 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": "k", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def __getitem__(self, k):
if isinstance(k, (int, long)):
if k > 15:
raise util.EchoNestAPIError(5, 'Invalid parameter: "rows" must be less than or equal to 15')
return self._parse_element(self._cache[0].findall(self.element_path)[k])
elif not isinstance(k, slice):... | |
787 | [
0.0073613994754850864,
0.01720307022333145,
0.041541505604982376,
-0.005641703028231859,
-0.02320215292274952,
0.03315989673137665,
-0.026953106746077538,
0.0023443461395800114,
-0.028541458770632744,
0.06133481115102768,
0.030203118920326233,
0.00774626899510622,
0.025560244917869568,
-0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "command", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user_dir", "annotation": null, "type_comment": null}}, {"_type... | def get_corrected_commands(command, user_dir, settings):
rules = get_rules(user_dir, settings)
logs.debug(
u'Loaded rules: {}'.format(', '.join(rule.name for rule in rules)),
settings)
matched = get_matched_rules(command, rules, settings)
logs.debug(
u'Matched rules: {}'.format('... | |
788 | [
0.08259887248277664,
0.05152879282832146,
-0.04015340656042099,
-0.03244955465197563,
0.007030029781162739,
0.021965526044368744,
0.008558066561818123,
-0.07054435461759567,
-0.02351478673517704,
0.013391543179750443,
0.009475949220359325,
-0.012733638286590576,
0.006345596630126238,
-0.01... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "stream", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "Loader", "annotation": null, "type_comment": null}}, {"_type": ... | def ordered_load(stream, Loader=yaml.loader, object_pairs_hook=OrderedDict):
class OrderedLoader(Loader):
pass
def construct_mapping(loader, node):
loader.flatten_mapping(node)
return object_pairs_hook(loader.construct_pairs(node))
OrderedLoader.add_constructor(
yaml.resolve... | |
789 | [
0.010849380865693092,
-0.05204165726900101,
-0.060973189771175385,
-0.006831296253949404,
0.04213738068938255,
-0.043861787766218185,
-0.021422414109110832,
0.013994208537042141,
0.04899078607559204,
-0.00370857585221529,
-0.0074503133073449135,
-0.025446025654673576,
-0.005640240851789713,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "x", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},... | def to_number(x):
if is_string(x):
try:
n = float(x)
return n
except ValueError:
pass
l = x.find('(')
if l != -1:
y = x[0:l-1]
#print y
try:
n = float(y)
return n
exce... | |
790 | [
0.018983619287610054,
-0.0008036736981011927,
-0.03501197323203087,
-0.026958318427205086,
0.0505327470600605,
0.04333634302020073,
0.031222019344568253,
-0.046968381851911545,
0.04633672535419464,
-0.032710928469896317,
-0.0165246594697237,
-0.07489675283432007,
0.009407212026417255,
-0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "x", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "y", "annotation": null, "type_comment": null}}], "kwarg": null, "var... | def compare_object_attrs(x, y):
try:
if x == y:
return 0
x_num = to_number(x)
y_num = to_number(y)
if x_num is not None and y_num is not None:
if x_num - y_num<0:
return -1
else:
return 1
if '__len__' == x:
... | |
791 | [
0.010523706674575806,
0.0348832793533802,
-0.04928576573729515,
-0.04837917163968086,
0.005995885469019413,
0.03873630613088608,
0.006016490049660206,
-0.046483565121889114,
-0.011517869308590889,
-0.006155569572001696,
0.023983541876077652,
-0.0019471175037324429,
0.04640115052461624,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "code", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "frame", "annotation": null, "type_comment": null}}], "kwarg": nul... | def get_clsname_for_code(code, frame):
clsname = None
if len(code.co_varnames) > 0:
# We are checking the first argument of the function
# (`self` or `cls` for methods).
first_arg_name = code.co_varnames[0]
if first_arg_name in frame.f_locals:
first_arg_obj = frame.f_... | |
792 | [
0.029915468767285347,
0.027882378548383713,
-0.006952442228794098,
-0.019471678882837296,
0.03524022921919823,
0.03190015256404877,
-0.014909327030181885,
-0.03475615754723549,
-0.009390939958393574,
0.04649483412504196,
0.010480095632374287,
-0.07503070682287216,
0.012017014436423779,
0.0... | 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": "obj", "annotation": nu... | class K(object):
def __init__(self, obj, *args):
self.obj = obj
def __lt__(self, other):
return mycmp(self.obj, other.obj) < 0
def __gt__(self, other):
return mycmp(self.obj, other.obj) > 0
def __eq__(self, other):
return mycmp(self.obj, ot... | |
793 | [
0.001978151500225067,
-0.020405089482665062,
0.06807985156774521,
-0.011360615491867065,
0.019849635660648346,
-0.0005931179039180279,
0.004862846340984106,
-0.005769390147179365,
-0.034249529242515564,
-0.0029659171123057604,
-0.02399982325732708,
-0.052694808691740036,
0.004131847526878118... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "project_roots_cache", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "List", "_fields": {"ctx": {"_ty... | def _get_project_roots(project_roots_cache=[]):
# Note: the project_roots_cache is the same instance among the many calls to the method
if not project_roots_cache:
roots = os.getenv('IDE_PROJECT_ROOTS', '').split(os.pathsep)
pydev_log.debug("IDE_PROJECT_ROOTS %s\n" % roots)
new_roots = [... | |
794 | [
-0.02797147072851658,
-0.028590308502316475,
0.08581218123435974,
-0.02283511683344841,
0.016739564016461372,
0.0014581367140635848,
-0.007008338812738657,
-0.011510384269058704,
-0.05821201577782631,
-0.010283022187650204,
-0.022051256150007248,
-0.059697225689888,
0.00227551837451756,
-0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "library_roots_cache", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "List", "_fields": {"ctx": {"_ty... | def _get_library_roots(library_roots_cache=[]):
# Note: the project_roots_cache is the same instance among the many calls to the method
if not library_roots_cache:
roots = os.getenv('LIBRARY_ROOTS', '').split(os.pathsep)
pydev_log.debug("LIBRARY_ROOTS %s\n" % roots)
new_roots = []
... | |
795 | [
0.006601160392165184,
0.012297901324927807,
0.0432136133313179,
-0.04027976468205452,
-0.00689344247803092,
0.010020308196544647,
0.01434938982129097,
-0.046147461980581284,
-0.034588538110256195,
0.006325422786176205,
-0.0018005671445280313,
-0.0483974814414978,
0.01645602658390999,
0.026... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "filename_to_not_in_scope_cache", "annotation": null, "type_co... | def not_in_project_roots(filename, filename_to_not_in_scope_cache={}):
# Note: the filename_to_not_in_scope_cache is the same instance among the many calls to the method
try:
return filename_to_not_in_scope_cache[filename]
except:
project_roots = _get_project_roots()
original_filenam... | |
796 | [
-0.027618231251835823,
0.019781915470957756,
0.002072561765089631,
-0.042621906846761703,
-0.019949154928326607,
0.006211712956428528,
-0.0024742328096181154,
0.015899594873189926,
0.0034373467788100243,
0.0074540553614497185,
0.034212201833724976,
-0.049215879291296005,
-0.00041809605318121... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filters_cache", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "List", "_fields": {"ctx": {"_type": "... | def _get_stepping_filters(filters_cache=[]):
if not filters_cache:
filters = os.getenv('PYDEVD_FILTERS', '').split(';')
pydev_log.debug("PYDEVD_FILTERS %s\n" % filters)
new_filters = []
for new_filter in filters:
new_filters.append(new_filter)
filters_cache.append... | |
797 | [
0.03777628019452095,
-0.022496258839964867,
0.015171051025390625,
0.0017995191738009453,
0.036371778696775436,
0.04472614824771881,
0.010485339909791946,
0.040827441960573196,
0.0017980056582018733,
0.007700549438595772,
0.04261939227581024,
0.01759260706603527,
-0.029034461826086044,
0.01... | 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_force_update(self):
c = Counter.objects.create(name="one", value=1)
# The normal case
c.value = 2
c.save()
# Same thing, via an update
c.value = 3
c.save(force_update=True)
# Won't work because force_update and force_insert are mutually
... | |
798 | [
0.014108858071267605,
-0.023815283551812172,
0.02017391100525856,
-0.01631007343530655,
0.04636603966355324,
0.03976239264011383,
-0.018300535157322884,
0.02512664720416069,
0.0023680636659264565,
0.02337035723030567,
0.015268009155988693,
0.019693858921527863,
-0.02496272698044777,
-0.002... | 10 | {"_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 ForceTests(TestCase):
def test_force_update(self):
c = Counter.objects.create(name="one", value=1)
# The normal case
c.value = 2
c.save()
# Same thing, via an update
c.value = 3
c.save(force_update=True)
# Won't work because force_update and fo... | |
799 | [
0.04819555580615997,
-0.030827580019831657,
0.010904129594564438,
-0.027104219421744347,
-0.029116222634911537,
-0.012962385080754757,
0.029509371146559715,
0.008100044913589954,
-0.04990691691637039,
0.057538650929927826,
-0.028931209817528725,
-0.023334605619311333,
-0.01920653134584427,
... | 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": "input_images", "annotation": null, "type_comment": null}}, {"_typ... | def __init__(self, input_images, target_num_digits,
max_steps=3, max_digits=2, rnn_units=256, canvas_size=50, windows_size=28,
vae_latent_dimensions=50, vae_recognition_units=(512, 256), vae_generative_units=(256, 512),
scale_prior_mean=-1.0, scale_prior_variance=0.1, ... | |
800 | [
0.013676155358552933,
0.003872554749250412,
0.021627407521009445,
-0.0414171926677227,
-0.01368793472647667,
0.005321449600160122,
0.019071226939558983,
0.00533617427572608,
-0.04662379249930382,
0.06026460602879524,
-0.0030568151269108057,
0.0012140385806560516,
0.0005010025342926383,
-0.... | 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}}, {"_type": "arg", "_fields": {"arg": "input_images", "annota... | class AIRModel:
def __init__(self, input_images, target_num_digits,
max_steps=3, max_digits=2, rnn_units=256, canvas_size=50, windows_size=28,
vae_latent_dimensions=50, vae_recognition_units=(512, 256), vae_generative_units=(256, 512),
scale_prior_mean=-1.0, scale... |