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
10,601
[ 0.053563881665468216, -0.024289140477776527, 0.0063823191449046135, 0.015595657750964165, -0.0448453463613987, -0.00587812252342701, 0.008323946967720985, -0.046148113906383514, -0.0016472521238029003, -0.028535669669508934, 0.020781682804226875, -0.07295510917901993, 0.03226860612630844, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "feature", "annotation": null, "type_comment": null}}], "kwarg":...
def anticodon(record, feature): raw_anti = embl.qualifier_string(feature, "anticodon") if raw_anti: match = re.search("seq:([ACGUT]{3})", raw_anti) if match: return match.group(1).upper() gene = embl.gene(feature) if gene: match = re.search(r"tRNA-\w+ \(([ACGU]{3})\)...
10,602
[ 0.07024917751550674, -0.016986103728413582, 0.03473277762532234, 0.015603245235979557, -0.04720154404640198, 0.036691825836896896, -0.002938572783023119, -0.010302290320396423, -0.0067875268869102, 0.01498095877468586, 0.014439339749515057, -0.05098135769367218, 0.036461349576711655, -0.02...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def species(record): # try: # return embl.species(record) # except UnknownTaxonId: org = organism(record) # Strip out the common name if present if re.search(r"\([^()]+\)\s*$", org): return re.sub(r"\s*\(.+$", "", org) # Add a closing quote if needed match = re.search(r"([\"...
10,603
[ 0.08952704817056656, 0.0014141482533887029, 0.02205153927206993, -0.03720509260892868, -0.013869354501366615, 0.02162347361445427, 0.005170431453734636, -0.023372430354356766, -0.025977520272135735, 0.03341364860534668, 0.041583601385354996, -0.028252387419342995, -0.009637610986828804, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def organelle(record): values = source_qualifier_value(record, "organelle", max_allowed=None) if not values: return None if len(values) == 1: return values.pop() if len(values) == 2: # Seems strange but there are cases where the value is # ['plastid', 'plastid:chloroplast...
10,604
[ 0.03738999366760254, 0.018071439117193222, 0.034872230142354965, 0.014459503814578056, -0.02616593800485134, 0.03411925211548805, 0.019647983834147453, -0.04211962968111038, -0.0058473339304327965, 0.018412631005048752, -0.0072415173053741455, -0.015612499788403511, 0.03169560804963112, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def lineage(record) -> ty.Optional[str]: # try: # return embl.lineage(record) # except UnknownTaxonId: taxonomy = record.annotations.get("taxonomy", []) if taxonomy: taxonomy.append(species(record)) return "; ".join(taxonomy) return None
10,605
[ 0.07614460587501526, -0.01618649810552597, 0.031103920191526413, 0.02535846270620823, -0.04229487106204033, 0.0384414903819561, -0.00674918107688427, -0.018897708505392075, -0.02085900865495205, -0.013325306586921215, -0.008773935958743095, -0.033180590718984604, 0.04693276807665825, -0.04...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def common_name(record): # try: # return embl.common_name(record) # except UnknownTaxonId: org = organism(record) if org: match = re.search(r"\(([^()]+)\)$", org) if match: return match.group(1) return None
10,606
[ 0.049653586000204086, 0.01431258860975504, 0.04699929431080818, -0.030364196747541428, -0.04111865907907486, 0.02629123069345951, 0.029105696827173233, 0.0023625497706234455, -0.012287545949220657, -0.010411235503852367, 0.02340811863541603, -0.0506146214902401, 0.015182098373770714, -0.01...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "feature", "annotation": null, "type_comment": null}}, {"_type":...
def xref_data(record, feature, refs): xrefs = {} xrefs.update(embl.xref_data(feature)) comment = record.annotations.get("comment", "") if comment: xrefs.update(comment_xrefs(comment.split("\n"))) ena_refs = {} for ref in refs: if ref.database != "MD5": ena_refs[ref.d...
10,607
[ -0.008087166585028172, 0.039482761174440384, 0.031925078481435776, -0.005735144019126892, 0.016742831096053123, 0.04053058102726936, 0.009469397366046906, -0.00975922029465437, 0.0074852267280220985, 0.025838803499937057, -0.02146916836500168, -0.022873694077134132, 0.004762566182762384, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "comments", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def comment_xrefs(comments): xrefs = coll.defaultdict(list) for line in comments: match = re.match(r"^\s*(.+?)\s*;\s*(.+?)\s*\.?$", line) if match: db_name = match.group(1).lower() if db_name not in KNOWN_DBS: continue rest = match.group(2) ...
10,608
[ 0.03725718334317207, 0.025737691670656204, 0.002637800993397832, -0.01251901313662529, 0.0015617531025782228, 0.05992134287953377, 0.019028401002287865, -0.009514200501143932, 0.0037044784985482693, 0.01990298181772232, 0.01186307705938816, -0.05647299438714981, -0.0015266137197613716, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "entry", "annotation": {"_type": "Name", "_fields": {"id": "Entry", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}, {"_type": "arg", "_...
def is_skippable_sequence( entry: Entry, status: ty.Optional[ribovore.RibovoreResult] ) -> bool: if entry.rna_type != "SO:0000252" or "metagenome" not in entry.lineage: return False if not status or status.status == "FAIL": return True model_coverage = status.model_coverage if mode...
10,609
[ 0.036621373146772385, -0.002013691933825612, 0.04491802677512169, 0.006180159281939268, -0.018407441675662994, 0.00663974042981863, 0.03025980107486248, 0.008314793929457664, -0.028300533071160316, 0.01906052976846695, 0.024793202057480812, -0.06700211763381958, 0.024720637127757072, -0.01...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ctx", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}, {"_type": "ar...
def as_entry(ctx, record, feature) -> Entry: prod = product(feature) if prod: prod = prod[0:500] record_refs = ctx.dr[record.id] return Entry( primary_id=primary_id(feature), accession=accession(record), ncbi_tax_id=taxid(record), database="ENA", sequence...
10,610
[ 0.024373142048716545, 0.03989476338028908, 0.07383257895708084, -0.002347907517105341, -0.011032937094569206, 0.025862378999590874, 0.01325630396604538, 0.05961141735315323, 0.01562649756669998, -0.0031620061490684748, 0.026932111009955406, -0.05541638657450676, 0.01999981887638569, -0.022...
10
{"_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(): client = CosmosDBManagementClient( credential=DefaultAzureCredential(), subscription_id="subid", ) response = client.gremlin_resources.begin_delete_gremlin_database( resource_group_name="rg1", account_name="ddb1", database_name="databaseName", ).resul...
10,611
[ -0.009562904946506023, 0.058196041733026505, 0.03190115466713905, -0.056360360234975815, 0.015851352363824844, 0.002607783069834113, -0.02289639599621296, -0.0020015742629766464, -0.005910147912800312, 0.006952020805329084, 0.030784862115979195, -0.0418485589325428, 0.011274552904069424, -...
16
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IntegerField", "value": {"_type": "Name", "_fields": {"id": ...
class LayerIndex(indexes.SearchIndex, indexes.Indexable): id = indexes.IntegerField(model_attr='resourcebase_ptr_id') abstract = indexes.CharField(model_attr="abstract", boost=1.5) category__gn_description = indexes.CharField(model_attr="category__gn_description", null=True) csw_type = indexes.CharField...
10,612
[ 0.0591590590775013, 0.050763122737407684, -0.009951337240636349, -0.000058108893426833674, -0.0007628999883309007, -0.0012829367769882083, 0.029816338792443275, 0.01713632047176361, 0.007825443521142006, 0.021140536293387413, 0.004698495380580425, -0.04124772921204567, -0.02342250943183899, ...
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": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def prepare_rating(self, obj): ct = ContentType.objects.get_for_model(obj) try: rating = OverallRating.objects.filter( object_id=obj.pk, content_type=ct ).aggregate(r=Avg("rating"))["r"] return float(str(rating or "0")) except O...
10,613
[ -0.0010485055390745401, 0.041967976838350296, -0.001748665701597929, -0.059066042304039, -0.004152387380599976, -0.0022399574518203735, -0.006705994252115488, -0.032663967460393906, 0.013689554296433926, -0.016132134944200516, 0.00359170394949615, -0.02431477978825569, 0.05449175462126732, ...
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": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def prepare_subtype(self, obj): if obj.storeType == "dataStore": if obj.has_time: return "vectorTimeSeries" else: return "vector" elif obj.storeType == "coverageStore": return "raster" elif obj.storeType == "remoteStore": ...
10,614
[ 0.05846046656370163, 0.042468566447496414, -0.026222486048936844, -0.01857602596282959, -0.009346261620521545, 0.023659544065594673, 0.013937314972281456, 0.043146368116140366, 0.042553290724754333, 0.0026331038679927588, 0.034800924360752106, -0.03598707914352417, -0.004360706079751253, 0...
15
{"_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": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def prepare_num_comments(self, obj): try: return Comment.objects.filter( object_id=obj.pk, content_type=ContentType.objects.get_for_model(obj) ).all().count() except BaseException: return 0
10,615
[ 0.06880897283554077, 0.05089608207345009, -0.002422414254397154, -0.00728134298697114, -0.012520977295935154, 0.01882658712565899, 0.010778192430734634, 0.023395052179694176, -0.001541151781566441, 0.03111068159341812, 0.022718241438269615, -0.04800835996866226, -0.007484386209398508, -0.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": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def prepare_num_ratings(self, obj): ct = ContentType.objects.get_for_model(obj) try: return OverallRating.objects.filter( object_id=obj.pk, content_type=ct ).all().count() except OverallRating.DoesNotExist: return 0
10,616
[ 0.01723717339336872, 0.010430793277919292, -0.04783254861831665, -0.047444652765989304, -0.01912817172706127, 0.03367430716753006, 0.009394380263984203, -0.003254698356613517, 0.012424825690686703, 0.0024304171092808247, 0.027904340997338295, 0.008333724923431873, 0.004606276750564575, -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": "context", "annotation": null, "type_comment": null}}], "kwarg": n...
def render(self, context): try: expire_time = self.expire_time_var.resolve(context) except VariableDoesNotExist: raise TemplateSyntaxError('"cache" tag got an unknown variable: %r' % self.expire_time_var.var) try: expire_time = int(expire_time) except ...
10,617
[ -0.001735566882416606, 0.008224524557590485, -0.04939233884215355, -0.05047689378261566, 0.00004223295036354102, 0.021747542545199394, 0.04699728637933731, -0.010952852666378021, -0.01858426257967949, 0.012946848757565022, 0.04410514608025551, 0.017194680869579315, -0.014731841161847115, -...
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": "nodelist", "annotation...
class CacheNode(Node): def __init__(self, nodelist, expire_time_var, fragment_name, vary_on): self.nodelist = nodelist self.expire_time_var = Variable(expire_time_var) self.fragment_name = fragment_name self.vary_on = vary_on def render(self, context): try: e...
10,618
[ 0.010113907046616077, -0.020763887092471123, 0.07114282250404358, -0.010346204973757267, 0.014140409417450428, 0.026136528700590134, -0.010602328926324844, 0.016356177628040314, 0.020382679998874664, -0.025040557608008385, 0.032450273633003235, -0.03194994106888771, 0.0359526164829731, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestLineClientP: def setUp(self): self.lineclient = LineClientP(Config['line_account'], Config['line_password']) def testFindContactById(self): contact = self.lineclient.findContactById(Config['admin_id']) assert_equal(contact.id, Config['adm...
10,619
[ 0.01959949918091297, -0.010847918689250946, 0.026343142613768578, -0.036370206624269485, 0.00400956254452467, 0.029550792649388313, -0.03260689973831177, -0.017806246876716614, -0.0032360642217099667, -0.00558181619271636, 0.034526437520980835, -0.03907271474599838, -0.006137472111731768, ...
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 TestLineEngine: def setUp(self): self.line_engine = LineEngine() def testLongPoll(self): test_str = 'testing longPoll correctness' # first sends a message to myself.. me = self.line_engine._client.getProfile() me.sendMessage(test_str) result = self.line_en...
10,620
[ 0.026094717904925346, -0.03514913469552994, 0.023802993819117546, -0.007978853769600391, -0.00626357551664114, 0.027655338868498802, -0.03573963791131973, -0.025701045989990234, 0.01547967828810215, 0.022523565217852592, 0.03287146985530853, -0.015043829567730427, -0.005124743562191725, -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 testLongPoll(self): test_str = 'testing longPoll correctness' # first sends a message to myself.. me = self.line_engine._client.getProfile() me.sendMessage(test_str) result = self.line_engine.longPoll() assert_equal(len(result), 1, 'Got unexpected operations') ...
10,621
[ 0.09058443456888199, -0.014848905615508556, 0.11908455938100815, -0.03800830990076065, -0.044436726719141006, 0.02098400890827179, 0.012893494218587875, 0.025322578847408295, -0.034024160355329514, -0.01275905966758728, 0.015716619789600372, -0.0330953374505043, 0.03028443455696106, 0.0071...
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 _select(self): population_size = len(self._cur_config_list) logger.info( LOGGING_PREFIX + "Generate the %sth generation, population=%s", self._cur_generation, population_size, ) return self._cur_config_list, self._cur_encoding_list
10,622
[ 0.038518667221069336, 0.008482975885272026, 0.04959278181195259, -0.02529054507613182, -0.02302250638604164, -0.010782692581415176, -0.014469841495156288, 0.03405861184000969, 0.01998155750334263, 0.048477768898010254, 0.00904048327356577, -0.05945052206516266, -0.01477393601089716, -0.006...
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": "trials", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _feedback(self, trials): self._cur_generation += 1 if self._cur_generation > self._max_generation: return AutoMLSearcher.TERMINATE sorted_trials = sorted( trials, key=lambda t: t.best_result[self.reward_attr], reverse=True ) self._cur_encoding_list = ...
10,623
[ 0.001541898469440639, 0.033756986260414124, 0.028389764949679375, -0.02088036574423313, -0.004766938276588917, 0.029425544664263725, 0.03874755650758743, -0.07033882290124893, -0.03806488588452339, 0.05371927469968796, -0.022292792797088623, -0.06468911468982697, 0.009386749006807804, 0.00...
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": "clamodel", "annotation": null, "type_comment": null}}, {"_type": ...
def __init__(self, clamodel, anomalyParams={}): if anomalyParams is None: anomalyParams = {} self.clamodel = clamodel self._version = CLAModelClassifierHelper.__VERSION__ self._classificationMaxDist = 0.1 if 'autoDetectWaitRecords' not in anomalyParams or \ anomalyParams['autoDetect...
10,624
[ -0.015565726906061172, 0.035408686846494675, -0.002162919146940112, -0.005124781746417284, -0.022066636011004448, 0.02563909813761711, 0.0330999530851841, -0.05050051584839821, -0.05278494954109192, 0.09249517321586609, -0.003915734123438597, -0.02047482505440712, -0.0267570111900568, 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}}, {"_type": "arg", "_fields": {"arg": "state", "annotation": null, "type_comment": null}}], "kwarg": nul...
def _updateState(self, state): # Record is before wait period do not classifiy if state.ROWID < self._autoDetectWaitRecords: if not state.setByUser: state.anomalyLabel = [] self._deleteRecordsFromKNN([state]) return label = CLAModelClassifierHelper.AUTO_THRESHOLD_CLASSIFIED_LAB...
10,625
[ 0.02280772663652897, 0.04489884898066521, 0.03627490997314453, -0.02435212768614292, -0.0271814726293087, 0.01713668368756771, -0.01155212614685297, -0.029874909669160843, -0.04880309849977493, 0.04309498891234398, -0.010798458009958267, -0.048481862992048264, 0.02824402041733265, 0.001446...
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": "start", "annotation": null, "type_comment": null}}, {"_type": "ar...
def getLabels(self, start=None, end=None): if len(self.saved_states) == 0: return { 'isProcessing': False, 'recordLabels': [] } if start is None: start = 0 if end is None: end = self.saved_states[-1].ROWID if end <= start: raise CLAModelInvalidRangeError(...
10,626
[ 0.029374560341238976, -0.013032202608883381, -0.0026297341100871563, -0.02320786379277706, -0.02211673930287361, 0.03545543551445007, 0.024752601981163025, -0.04916192963719368, -0.015324790962040424, 0.08282743394374847, 0.0038281327579170465, -0.02547593228518963, 0.007723694667220116, 0...
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": "state", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __setstate__(self, state): version = 1 if "_version" in state: version = state["_version"] # Migrate from version 1 to version 2 if version == 1: self._vectorType = str(Configuration.get( 'nupic.model.temporalAnomaly.anomaly_vector')) self._autoDetectWaitRecords = state['_...
10,627
[ 0.040647607296705246, -0.002290277276188135, -0.008292287588119507, 0.00848474819213152, -0.0435510091483593, 0.006736109498888254, -0.008055836893618107, 0.0015822983114048839, -0.027912236750125885, -0.004715276416391134, -0.000044721236918121576, -0.059783656150102615, -0.0029171477071940...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "mo...
class PlaceholderReference(CMSPlugin): name = models.CharField(max_length=255) placeholder_ref = PlaceholderField(slotname='clipboard') class Meta: app_label = 'cms' def __str__(self): return self.name def copy_to(self, placeholder, language): copy_plugins_to(self.placehol...
10,628
[ -0.006726277992129326, -0.02296374924480915, 0.024309005588293076, -0.041230905801057816, 0.03719513863325119, 0.024922629818320274, -0.007304502185434103, 0.008443249389529228, 0.03500024601817131, -0.030586864799261093, 0.021878104656934738, -0.010779745876789093, -0.05069489777088165, -...
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 BaseTest(TestCase): @classmethod def setUpClass(self): self.session1 = shopify.Session('shop1.myshopify.com', 'token1') self.session2 = shopify.Session('shop2.myshopify.com', 'token2') def setUp(self): super(BaseTest, self).setUp() def tearDown(self): shopify.Sho...
10,629
[ 0.027604755014181137, 0.00372073776088655, -0.008566608652472496, -0.016030365601181984, 0.045228131115436554, 0.008911946788430214, 0.01163009088486433, -0.0010596861829981208, 0.025644127279520035, -0.0345560759305954, 0.01862596906721592, -0.014682432636618614, -0.055432312190532684, -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_activate_session_should_set_site_and_headers_for_given_session(self): shopify.ShopifyResource.activate_session(self.session1) self.assertIsNone(ActiveResource.site) self.assertEqual('https://shop1.myshopify.com/admin', shopify.ShopifyResource.site) self.assertEqual('https://sho...
10,630
[ 0.022654809057712555, 0.012484504841268063, 0.012496684677898884, -0.018428348004817963, 0.038854215294122696, 0.02501773089170456, 0.005767232272773981, 0.0033921313006430864, 0.04107097536325455, -0.027599891647696495, 0.05417666211724281, -0.02196054905653, -0.06109490618109703, -0.0143...
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_clear_session_should_clear_site_and_headers_from_Base(self): shopify.ShopifyResource.activate_session(self.session1) shopify.ShopifyResource.clear_session() self.assertIsNone(ActiveResource.site) self.assertIsNone(shopify.ShopifyResource.site) self.assertIsNone(shopify....
10,631
[ 0.02480105310678482, -0.0005741124041378498, 0.002573893405497074, -0.03797359764575958, 0.056695014238357544, 0.03032580204308033, 0.0014535636873915792, 0.02205074205994606, 0.04272633045911789, -0.02180948667228222, 0.053896453231573105, -0.017527204006910324, -0.04788919538259506, -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_activate_session_with_one_session_then_clearing_and_activating_with_another_session_shoul_request_to_correct_shop(self): shopify.ShopifyResource.activate_session(self.session1) shopify.ShopifyResource.clear_session() shopify.ShopifyResource.activate_session(self.session2) self....
10,632
[ 0.05060847848653793, -0.0002443534613121301, -0.0011582823935896158, -0.0033193002454936504, 0.038523562252521515, 0.038176294416189194, 0.0035479182843118906, 0.005287150386720896, 0.04352421686053276, -0.03535185009241104, 0.036740921437740326, 0.016935087740421295, -0.04551521688699722, ...
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_headers_is_thread_safe(self): def testFunc(): shopify.ShopifyResource.headers['X-Custom'] = 'abc' self.assertTrue('X-Custom' in shopify.ShopifyResource.headers) t1 = threading.Thread(target=testFunc) t1.start() t1.join() t2 = threading.Thread(ta...
10,633
[ 0.055241942405700684, 0.022382117807865143, 0.0043913922272622585, -0.001443823566660285, 0.05140696465969086, 0.02597741037607193, -0.006511473096907139, 0.035245273262262344, 0.04492402821779251, -0.04419355466961861, 0.029355842620134354, -0.0392400398850441, -0.06044655665755272, 0.009...
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_delete_should_send_custom_headers_with_request(self): shopify.ShopifyResource.activate_session(self.session1) org_headers=shopify.ShopifyResource.headers shopify.ShopifyResource.set_headers({'X-Custom': 'abc'}) with patch('shopify.ShopifyResource.connection.delete') as mock: ...
10,634
[ 0.0286219771951437, 0.03557945042848587, 0.0492803230881691, -0.018260693177580833, 0.0003863405145239085, -0.01652667671442032, 0.009194569662213326, -0.002423074096441269, -0.008814584463834763, 0.02133268490433693, 0.03189734369516373, -0.027915526181459427, 0.032539572566747665, -0.026...
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 deconstruct(self): name, path, args, kwargs = super(BaseSpatialField, self).deconstruct() # Always include SRID for less fragility; include spatial index if it's # not the default value. kwargs['srid'] = self.srid if self.spatial_index is not True: kwargs['spatial...
10,635
[ 0.02619554102420807, 0.03321298211812973, 0.029137635603547096, -0.013816948980093002, 0.007387927267700434, -0.0040535531006753445, -0.009768844582140446, -0.021302945911884308, -0.021183082833886147, 0.027328792959451675, 0.03319118916988373, -0.024778977036476135, 0.014971993863582611, ...
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 deconstruct(self): name, path, args, kwargs = super(GeometryField, self).deconstruct() # Include kwargs if they're not the default values. if self.dim != 2: kwargs['dim'] = self.dim if self.geography is not False: kwargs['geography'] = self.geography r...
10,636
[ -0.0053619579412043095, -0.008913226425647736, 0.047651007771492004, 0.0015569187235087156, 0.033311810344457626, 0.003225100226700306, 0.05311356112360954, -0.023593833670020103, 0.02363041415810585, 0.024837540462613106, 0.016790030524134636, -0.02775171399116516, 0.057795748114585876, 0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "session", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "closed_window", "annotation": null, "type_comment": null}}], "...
def test_no_top_browsing_context(session, closed_window): original_handle, element = closed_window response = get_shadow_root(session, element.id) assert_error(response, "no such window") response = get_shadow_root(session, "foo") assert_error(response, "no such window") session.window_handle =...
10,637
[ 0.00316443364135921, 0.04743599519133568, 0.0792079046368599, 0.010871673934161663, -0.0012182098580524325, -0.018870119005441666, 0.025847958400845528, -0.03026318922638893, -0.025004848837852478, 0.015686271712183952, -0.04894471913576126, -0.026757629588246346, 0.010871673934161663, 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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def formfield(self, **kwargs): defaults = {'form_class': self.form_class, 'geom_type': self.geom_type, 'srid': self.srid, } defaults.update(kwargs) if (self.dim > 2 and 'widget' not in kwargs and not getattr(defaults['fo...
10,638
[ 0.01461461465805769, -0.005784709006547928, 0.016943637281656265, 0.00990416668355465, 0.04590502753853798, 0.058598197996616364, 0.03027728945016861, 0.013345297425985336, 0.00017149245832115412, -0.002238772576674819, 0.037683580070734024, -0.0029796927701681852, 0.03386398404836655, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "session", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "checkbox_dom", "annotation": null, "type_comment": null}}], "k...
def test_get_shadow_root(session, checkbox_dom): session.url = checkbox_dom expected = session.execute_script( "return document.querySelector('custom-checkbox-element').shadowRoot.host") custom_element = session.find.css("custom-checkbox-element", all=False) response = get_shadow_root(session, c...
10,639
[ 0.010373430326581001, -0.021960772573947906, 0.0601658970117569, -0.04851233959197998, 0.023439539596438408, 0.042155854403972626, 0.0015877417754381895, 0.00892777182161808, 0.023792676627635956, -0.024631379172205925, -0.03723399341106415, -0.018263859674334526, -0.03048022836446762, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TypeCompatibilityTest(UnitTest): def test_string_plus_number(self): try: add("string", 1) except TypeError: pass else: self.fail('adding "string" and 1 should fail') try: add(1, "string") except TypeError: pa...
10,640
[ 0.020959852263331413, -0.032385461032390594, 0.042937278747558594, -0.032982733100652695, 0.01095553208142519, 0.021800458431243896, 0.013062577694654465, 0.03638939931988716, 0.029465459287166595, 0.016325457021594048, -0.02313879132270813, -0.02058379165828228, -0.05689576640725136, -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_string_plus_number(self): try: add("string", 1) except TypeError: pass else: self.fail('adding "string" and 1 should fail') try: add(1, "string") except TypeError: pass else: self.fail('addi...
10,641
[ 0.03623746335506439, 0.03611084818840027, -0.013446605764329433, 0.028361955657601357, -0.006862580310553312, 0.016244815662503242, -0.002013192279264331, -0.007185450755059719, 0.0006053821416571736, -0.009926684200763702, 0.02042314037680626, -0.031071534380316734, 0.022689564153552055, ...
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": "url", "annotation": nu...
class ToughPinchZoomCasesPage(page_module.Page): def __init__(self, url, page_set, name=''): super(ToughPinchZoomCasesPage, self).__init__(url=url, page_set=page_set, name=name) self.credentials_path = 'data/credentials.json' self.user_agent_type = 'deskt...
10,642
[ 0.028295069932937622, -0.040308061987161636, 0.00824740994721651, 0.04657694697380066, -0.00016731498180888593, 0.004797397181391716, -0.026664024218916893, -0.01992710307240486, 0.0010681565618142486, 0.01456593256443739, 0.007424796465784311, -0.042889367789030075, 0.005432086065411568, ...
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 __init__(self): super(ToughPinchZoomCasesPageSet, self).__init__( credentials_path='data/credentials.json', user_agent_type='desktop', archive_data_file='data/tough_pinch_zoom_cases.json', bucket=page_set_module.PARTNER_BUCKET) self.AddPage(GoogleSearchPage(self)) self.AddPage(G...
10,643
[ 0.014745320193469524, 0.00720453355461359, 0.012192287482321262, -0.04480883479118347, 0.03305243328213692, 0.022267425432801247, -0.01889244094491005, -0.00282857334241271, -0.01132052019238472, 0.008418780751526356, -0.004396197386085987, -0.039478600025177, -0.02861887216567993, 0.03790...
10
{"_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 test_PythonCodePrinter(): prntr = PythonCodePrinter() assert not prntr.module_imports assert prntr.doprint(x**y) == 'x**y' assert prntr.doprint(Mod(x, 2)) == 'x % 2' assert prntr.doprint(And(x, y)) == 'x and y' assert prntr.doprint(Or(x, y)) == 'x or y' assert not prntr.module_imports ...
10,644
[ 0.019675595685839653, -0.018829332664608955, -0.024081137031316757, -0.013005058281123638, 0.011573879048228264, 0.02065875194966793, -0.05500704050064087, 0.008761302568018436, 0.02381979115307331, 0.015817634761333466, -0.011623659171164036, -0.008325725793838501, -0.04017256200313568, 0...
9
{"_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 test_NumPyPrinter(): p = NumPyPrinter() assert p.doprint(sign(x)) == 'numpy.sign(x)' A = MatrixSymbol("A", 2, 2) assert p.doprint(A**(-1)) == "numpy.linalg.inv(A)" assert p.doprint(A**5) == "numpy.linalg.matrix_power(A, 5)" assert p.doprint(Identity(3)) == "numpy.eye(3)" u = MatrixSymbo...
10,645
[ 0.04999532178044319, 0.009825964458286762, 0.021739309653639793, -0.04673697054386139, 0.003376084379851818, 0.024373991414904594, -0.03584185987710953, 0.006274871062487364, 0.021955683827400208, -0.018290039151906967, 0.019944671541452408, -0.028128731995821, -0.058599404990673065, 0.058...
8
{"_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 test_MpmathPrinter(): p = MpmathPrinter() assert p.doprint(sign(x)) == 'mpmath.sign(x)' assert p.doprint(Rational(1, 2)) == 'mpmath.mpf(1)/mpmath.mpf(2)' assert p.doprint(S.Exp1) == 'mpmath.e' assert p.doprint(S.Pi) == 'mpmath.pi' assert p.doprint(S.GoldenRatio) == 'mpmath.phi' assert p...
10,646
[ 0.0015943117905408144, -0.009624405764043331, 0.022231021896004677, -0.026199087500572205, 0.03250855579972267, 0.011503690853714943, -0.026987770572304726, 0.0097722839564085, 0.01477549597620964, -0.00009160553599940613, -0.016833467409014702, -0.03127623721957207, -0.01088137086480856, ...
10
{"_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 test_SciPyPrinter(): p = SciPyPrinter() expr = acos(x) assert 'numpy' not in p.module_imports assert p.doprint(expr) == 'numpy.arccos(x)' assert 'numpy' in p.module_imports assert not any(m.startswith('scipy') for m in p.module_imports) smat = SparseMatrix(2, 5, {(0, 1): 3}) assert p...
10,647
[ 0.02177320420742035, -0.016196077689528465, 0.016918115317821503, -0.01675627939403057, 0.027561964467167854, 0.01559852808713913, -0.047554969787597656, -0.00022485906083602458, 0.027835840359330177, 0.03515582159161568, -0.006168452091515064, -0.028781959787011147, -0.038093771785497665, ...
9
{"_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 test_sqrt(): prntr = PythonCodePrinter() assert prntr._print_Pow(sqrt(x), rational=False) == 'math.sqrt(x)' assert prntr._print_Pow(1/sqrt(x), rational=False) == '1/math.sqrt(x)' prntr = PythonCodePrinter({'standard' : 'python2'}) assert prntr._print_Pow(sqrt(x), rational=True) == 'x**(1./2.)' ...
10,648
[ 0.028761999681591988, -0.0014742029597982764, 0.014934578910470009, -0.002873191377148032, 0.051940079778432846, -0.003270323621109128, -0.0061465236358344555, 0.028545383363962173, 0.03261297941207886, -0.00038773042615503073, 0.0579572357237339, -0.05983458831906319, -0.026258863508701324,...
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 MyRequestHandler(webapp2.RequestHandler): def get(self): acct = Account.get_by_id(users.get_current_user().user_id()) acct.view_counter += 1 acct.put() # ...read something else from Datastore... self.response.out.write('Content of the page')
10,649
[ 0.06489096581935883, -0.008039163425564766, 0.020134011283516884, 0.01305762305855751, 0.07326710224151611, 0.014164812862873077, 0.03607995808124542, 0.04310820624232292, -0.005328352563083172, -0.02237246185541153, 0.06590188294649124, -0.02828148752450943, -0.042819373309612274, -0.0302...
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 get(self): acct = Account.get_by_id(users.get_current_user().user_id()) acct.view_counter += 1 acct.put() # ...read something else from Datastore... self.response.out.write('Content of the page')
10,650
[ 0.025834236294031143, 0.0054816813208162785, 0.027642855420708656, -0.025811906903982162, -0.025834236294031143, -0.03259981423616409, -0.001216213102452457, -0.018644414842128754, -0.03233186900615692, 0.041129354387521744, -0.013296704739332199, -0.008161118254065514, 0.002724094083532691,...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "device", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def blacklisting_install(device): try: if args.splits: device.InstallSplitApk(apk, splits, reinstall=args.keep_data, allow_downgrade=args.downgrade) else: device.Install(apk, reinstall=args.keep_data, allow_downgrade=args.downgrade, ...
10,651
[ -0.0019564467947930098, 0.010456212796270847, 0.06898044049739838, -0.040449608117341995, -0.03418461233377457, -0.0024830775801092386, -0.001092827063985169, -0.020432181656360626, -0.012650053016841412, 0.03636753559112549, -0.005498243495821953, -0.018063707277178764, -0.01568431966006756...
12
{"_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 = argparse.ArgumentParser() apk_group = parser.add_mutually_exclusive_group(required=True) apk_group.add_argument('--apk', dest='apk_name', help='DEPRECATED The name of the apk containing the' ' application (with the .apk extension).') a...
10,652
[ 0.03992238640785217, 0.052014853805303574, 0.07836707681417465, -0.024812957271933556, -0.038075268268585205, 0.00047101519885472953, 0.0023427619598805904, 0.023852456361055374, -0.07812079787254333, 0.013299252837896347, -0.0018240294884890318, -0.018089447170495987, -0.03630203381180763, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {...
class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0015_fill_filter_spec_field'), ] operations = [ migrations.AlterField( model_name='rendition', name='filter_spec', field=models.CharField(db_index=True, max_length=255), )...
10,653
[ -0.015175526961684227, 0.001487652538344264, -0.0018344447016716003, -0.012842338532209396, -0.046742189675569534, -0.020920267328619957, -0.011862006969749928, 0.009004342369735241, 0.009979771450161934, 0.07454438507556915, -0.03478214889764786, -0.03913482278585434, 0.059564922004938126, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kw_args", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment...
def wrap_tuples(*args, **kw_args): newargs = [] for arg in args: if type(arg) is tuple: newargs.append(Tuple(*arg)) else: newargs.append(arg) return method(*newargs, **kw_args)
10,654
[ 0.023679418489336967, 0.005537261720746756, -0.027133097872138023, -0.004513565916568041, 0.022748786956071854, -0.016027554869651794, 0.01266693789511919, -0.0011206362396478653, -0.026574719697237015, 0.058650508522987366, -0.024403244256973267, -0.0594363771378994, 0.07064532488584518, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment...
def __new__(cls, *args): if len(args) == 1 and isinstance(args[0], (dict, Dict)): items = [Tuple(k, v) for k, v in args[0].items()] elif iterable(args) and all(len(arg) == 2 for arg in args): items = [Tuple(k, v) for k, v in args] else: raise TypeError('Pass D...
10,655
[ -0.0324237123131752, 0.007060888689011335, 0.05563458055257797, -0.041746560484170914, 0.026909755542874336, 0.029976120218634605, -0.03781391307711601, 0.027294769883155823, 0.022523341700434685, 0.01615685410797596, 0.019511979073286057, -0.011962947435677052, 0.018095675855875015, -0.00...
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_index(self): hypervisors = self.hypervisors.list() services = self.services.list() stats = self.hypervisors.stats api.nova.extension_supported('AdminActions', IsA(http.HttpRequest)) \ .MultipleTimes().AndReturn(True) api.n...
10,656
[ -0.01172823179513216, 0.004184473771601915, 0.03183711692690849, -0.03375670686364174, -0.008128998801112175, 0.005261317361146212, -0.005998721346259117, 0.012781665660440922, 0.015333316288888454, 0.0010329505894333124, 0.022590305656194687, -0.0108269602060318, 0.007573019713163376, -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 HypervisorDetailViewTest(test.BaseAdminViewTests): @test.create_stubs({api.nova: ('hypervisor_search',)}) def test_index(self): hypervisor = self.hypervisors.list().pop().hypervisor_hostname api.nova.hypervisor_search( IsA(http.HttpRequest), hypervisor).AndReturn([]) se...
10,657
[ -0.018997032195329666, 0.014081805944442749, 0.023695223033428192, -0.03074250929057598, 0.03076804243028164, 0.01258808746933937, -0.01806505396962166, 0.04008782282471657, 0.029312625527381897, 0.00550250057131052, 0.017771417275071144, -0.0022645152639597654, 0.008898475207388401, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_index(self): hypervisor = self.hypervisors.list().pop().hypervisor_hostname api.nova.hypervisor_search( IsA(http.HttpRequest), hypervisor).AndReturn([]) self.mox.ReplayAll() url = reverse('horizon:admin:hypervisors:detail', args=[hypervisor]) res = self.clie...
10,658
[ 0.013366150669753551, 0.03206460550427437, -0.03574530780315399, 0.00829338375478983, 0.03968555107712746, 0.04657507687807083, -0.028077173978090286, 0.000250689045060426, 0.007497077342122793, 0.006535611115396023, 0.03963836282491684, -0.006830539088696241, 0.02354707568883896, 0.034400...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "reply", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def _encode_exception(reply): if isinstance(reply, InstrumentException): # InstrumentExceptions have corresponding IonException error code built-in return reply.get_triple() else: # all others are wrapped to capture stack and appropriate code ex = UnexpectedError("%s('%s')" % (re...
10,659
[ 0.035305701196193695, -0.015014158561825752, 0.01795629970729351, 0.027310462668538094, 0.04359119385480881, 0.037680525332689285, 0.006322965957224369, -0.021069956943392754, 0.023735035210847855, 0.02637372724711895, 0.0028662793338298798, -0.006296579260379076, 0.013655231334269047, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}, "targets": [{"_type": "Name", "_fields": {"id": "loggedOut", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}},...
class ConchTestAvatar(avatar.ConchUser): loggedOut = False def __init__(self): avatar.ConchUser.__init__(self) self.listeners = {} self.channelLookup.update({'session': session.SSHSession, 'direct-tcpip':forwarding.openConnectForwardingClient}) self.subsy...
10,660
[ 0.028840960934758186, 0.006097680889070034, 0.0313442200422287, 0.024112582206726074, -0.004206864628940821, -0.006659309379756451, -0.0446307435631752, 0.0026289562229067087, -0.011360942386090755, -0.008451171219348907, 0.03416840732097626, 0.05348842591047287, 0.001464245724491775, 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": "data", "annotation": null, "type_comment": null}}], "kwarg": null...
def global_cancel_tcpip_forward(self, data): host, port = forwarding.unpackGlobal_tcpip_forward(data) listener = self.listeners.get((host, port), None) if not listener: return 0 del self.listeners[(host, port)] listener.stopListening() return 1
10,661
[ 0.037709902971982956, -0.003848880995064974, 0.054964061826467514, 0.030962945893406868, 0.04718572273850441, -0.0019096680916845798, -0.015954189002513885, -0.02000451274216175, -0.04200732707977295, 0.010668356902897358, 0.009395244531333447, 0.0824246034026146, 0.018865695223212242, 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": "data", "annotation": null, "type_comment": null}}], "kwarg": null...
def global_tcpip_forward(self, data): host, port = forwarding.unpackGlobal_tcpip_forward(data) try: listener = reactor.listenTCP(port, forwarding.SSHListenForwardingFactory(self.conn, (host, port), forwarding.SSHListenServerForwardingChannel), ...
10,662
[ 0.008519002236425877, -0.005187774542719126, 0.023619741201400757, -0.02779231406748295, 0.004790386650711298, 0.046295687556266785, -0.01634257659316063, 0.029953110963106155, 0.003259822493419051, 0.035342682152986526, 0.03998715430498123, -0.015249759890139103, 0.02821453846991062, 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": "proto", "annotation": null, "type_comment": null}}, {"_type": "ar...
def execCommand(self, proto, cmd): self.cmd = cmd unittest.assert_(cmd.split()[0] in ['false', 'echo', 'secho', 'eecho','jumboliah'], 'invalid command: %s' % cmd.split()[0]) if cmd == 'jumboliah': raise error.ConchError('bad exec') self.proto = proto f...
10,663
[ 0.030767852440476418, -0.010995724238455296, 0.04420987144112587, 0.004101329483091831, 0.03785454481840134, 0.013605947606265545, 0.03803108260035515, -0.00022677892411593348, 0.01764107495546341, 0.033441122621297836, -0.0053560021333396435, -0.023592889308929443, 0.022861521691083908, 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}}, {"_type": "arg", "_fields": {"arg": "avatar", "annotation":...
class ConchSessionForTestAvatar: def __init__(self, avatar): unittest.assert_(isinstance(avatar, ConchTestAvatar)) self.avatar = avatar self.cmd = None self.proto = None self.ptyReq = False self.eof = 0 def getPty(self, term, windowSize, attrs): log.msg(...
10,664
[ 0.02372356317937374, -0.027102988213300705, 0.006798276677727699, -0.02338561974465847, 0.03566419705748558, 0.06524542719125748, -0.01877833716571331, 0.05019572377204895, -0.0024514910764992237, -0.00171365006826818, 0.010487481951713562, 0.010949336923658848, 0.01690838858485222, 0.0002...
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": "p", "annotation": null...
class ErrEchoTransport: def __init__(self, p): self.proto = p p.makeConnection(self) self.closed = 0 def write(self, data): self.proto.errReceived(data) self.proto.errReceived('\r\n') def loseConnection(self): if self.closed: return self.closed = 1 ...
10,665
[ 0.01362660527229309, -0.048022884875535965, 0.010949351824820042, -0.028818201273679733, 0.04361854866147041, 0.04847002401947975, -0.012240469455718994, 0.028840558603405952, -0.004337262362241745, -0.004060594365000725, -0.0025067811366170645, -0.00321661657653749, -0.011692722328007221, ...
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": "p", "annotation": null...
class SuperEchoTransport: def __init__(self, p): self.proto = p p.makeConnection(self) self.closed = 0 def write(self, data): self.proto.outReceived(data) self.proto.outReceived('\r\n') self.proto.errReceived(data) self.proto.errReceived('\r\n') def...
10,666
[ 0.06487714499235153, -0.03651528060436249, 0.00781577080488205, 0.016081729903817177, 0.023372279480099678, 0.032513607293367386, 0.04291795939207077, 0.0035858754999935627, -0.0065277316607534885, 0.02023346722126007, 0.01079826895147562, -0.03814096003770828, 0.011567340232431889, 0.0232...
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}}, {"_type": "arg", "_fields": {"arg": "avatarId", "annotation...
class ConchTestSSHChecker(checkers.SSHProtocolChecker): def areDone(self, avatarId): unittest.assertEquals(avatarId, 'testuser') if len(self.successfulCredentials[avatarId]) < 2: return 0 else: return 1
10,667
[ 0.026909349486231804, -0.047517143189907074, 0.0649619922041893, -0.021167390048503876, 0.06170172616839409, 0.012517957016825676, -0.0052796825766563416, 0.012554451823234558, -0.03077787160873413, -0.00835746992379427, 0.010480291210114956, -0.010966897942125797, 0.009014388546347618, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "noisy", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type...
class ConchTestServerFactory(factory.SSHFactory): noisy = 0 services = { 'ssh-userauth':userauth.SSHUserAuthServer, 'ssh-connection':connection.SSHConnection } def buildProtocol(self, addr): proto = ConchTestServer() proto.supportedPublic...
10,668
[ 0.006065909285098314, -0.04485210403800011, 0.041551947593688965, -0.012713096104562283, 0.035626668483018875, 0.03185149282217026, -0.021063487976789474, 0.012044314295053482, -0.01850086636841297, -0.0019750925712287426, -0.01466318778693676, -0.01715080440044403, 0.018163351342082024, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "done", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type"...
class ConchTestBase: done = 0 def connectionLost(self, reason): if self.done: return if not hasattr(self,'expectedLoseConnection'): unittest.fail('unexpectedly lost connection %s\n%s' % (self, reason)) self.done = 1 def recei...
10,669
[ 0.032745759934186935, -0.03368673101067543, 0.058904729783535004, -0.00034220435190945864, 0.034980565309524536, 0.012185563333332539, -0.003793285693973303, 0.04323757812380791, 0.022359801456332207, -0.009980164468288422, 0.0002153939421987161, -0.01692570000886917, -0.0016687517054378986,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "hasTriedNone", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class ConchTestClientAuth(userauth.SSHUserAuthClient): hasTriedNone = 0 # have we tried the 'none' auth yet? canSucceedPublicKey = 0 # can we succed with this yet? canSucceedPassword = 0 def ssh_USERAUTH_SUCCESS(self, packet): if not self.canSucceedPassword and self.canSucc...
10,670
[ 0.028090104460716248, -0.011558916419744492, 0.03835752233862877, -0.042662519961595535, 0.06582340598106384, 0.036420274525880814, 0.002044873544946313, 0.019167998805642128, 0.019361723214387894, 0.0165204256772995, 0.03282560035586357, -0.007458406966179609, 0.011849503964185715, 0.0510...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "session"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class SSHTestFailExecChannel(channel.SSHChannel): name = 'session' def openFailed(self, reason): unittest.fail('fail exec open failed: %s' % reason) def channelOpen(self, ignore): d = self.conn.sendRequest(self, 'exec', common.NS('jumboliah'), 1) d.addCallb...
10,671
[ 0.03906959667801857, -0.04143131524324417, 0.03279416635632515, -0.01374296098947525, 0.0696370005607605, 0.024606872349977493, 0.008361613377928734, 0.0328841395676136, -0.0026513116899877787, 0.033513929694890976, 0.040981464087963104, 0.012888242490589619, 0.01465390995144844, 0.0494386...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "session"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class SSHTestErrChannel(channel.SSHChannel): name = 'session' testBuf = '' eofCalled = 0 def openFailed(self, reason): unittest.fail('err open failed: %s' % reason) def channelOpen(self, ignore): d = self.conn.sendRequest(self, 'exec', common.NS('eecho ...
10,672
[ 0.03990806266665459, -0.04200384020805359, 0.03108372539281845, -0.03159112483263016, 0.07050644606351852, 0.04149644076824188, -0.0013526052935048938, 0.038650594651699066, -0.008625788614153862, 0.014460881240665913, 0.03759167343378067, 0.02080337330698967, 0.006960195489227772, 0.03644...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "session"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class SSHTestEchoChannel(channel.SSHChannel): name = 'session' testBuf = '' eofCalled = 0 def openFailed(self, reason): unittest.fail('echo open failed: %s' % reason) def channelOpen(self, ignore): d = self.conn.sendRequest(self, 'exec', common.NS('echo...
10,673
[ 0.019776413217186928, -0.008502291515469551, 0.03743177279829979, -0.014690705575048923, 0.06098029017448425, 0.016016364097595215, 0.018860504031181335, -0.0013994735199958086, 0.004841666202992201, 0.013208379037678242, 0.023632874712347984, 0.0020547707099467516, -0.004329479765146971, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "session"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class SSHTestSubsystemChannel(channel.SSHChannel): name = 'session' def openFailed(self, reason): unittest.fail('subsystem open failed: %s' % reason) def channelOpen(self, ignore): d = self.conn.sendRequest(self, 'subsystem', common.NS('not-crazy'), 1) d.ad...
10,674
[ 0.03272009640932083, -0.025157000869512558, 0.04802908003330231, 0.016839882358908653, 0.010699152015149593, -0.0006344231078401208, -0.01746823638677597, 0.034091051667928696, -0.033634066581726074, 0.009550977498292923, -0.006763371638953686, 0.013949454762041569, 0.009933702647686005, -...
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": "addr", "annotation": null, "type_comment": null}}], "kwarg": null...
def buildProtocol(self, addr): proto = ConchTestServer() proto.supportedPublicKeys = self.privateKeys.keys() proto.factory = self if hasattr(self, 'expectedLoseConnection'): proto.expectedLoseConnection = self.expectedLoseConnection self.prot...
10,675
[ 0.01653381809592247, -0.024113312363624573, 0.026277173310518265, -0.030772268772125244, 0.055853936821222305, 0.01978558860719204, 0.028548631817102432, 0.01866181381046772, 0.018733544275164604, 0.04126879200339317, 0.03392839804291725, 0.025679422542452812, -0.0010281333234161139, 0.022...
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 serviceStarted(self): self.openChannel(SSHTestFailExecChannel(conn = self)) self.openChannel(SSHTestFalseChannel(conn = self)) self.openChannel(SSHTestEchoChannel(localWindow=4, localMaxPacket=5, conn = self)) self.openChannel(SSHTestErrChannel(localWindow=4, localMax...
10,676
[ 0.015483923256397247, -0.00615801103413105, -0.017628181725740433, 0.01888887770473957, 0.05245354026556015, 0.02545095793902874, 0.014061599969863892, 0.02719653584063053, -0.009800019674003124, 0.04113961011171341, 0.0009414806845597923, -0.009983197785913944, 0.017929887399077415, 0.058...
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": "reasonCode", "annotation": null, "type_comment": null}}, {"_type"...
def receiveError(self, reasonCode, desc): self.expectedLoseConnection = 1 # Some versions of OpenSSH (for example, OpenSSH_5.3p1) will # send a DISCONNECT_BY_APPLICATION error before closing the # connection. Other, older versions (for example, # OpenSSH_5.1p...
10,677
[ 0.0058110556565225124, -0.0038584412541240454, 0.0582914724946022, -0.019900448620319366, 0.004048712085932493, -0.005664453841745853, 0.01896469108760357, 0.03134164586663246, 0.03341279178857803, 0.06497902423143387, 0.010143614374101162, 0.00874621607363224, -0.00526519725099206, 0.0456...
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 closed(self): if self.status != 0: unittest.fail('err exit status was not 0: %i' % self.status) if self.testBuf != "hello\r\n": unittest.fail('err did not return hello: %s' % repr(self.testBuf)) unittest.assertEquals(self.localWindowLeft, 4) ...
10,678
[ 0.01886776089668274, -0.02189372293651104, 0.039464645087718964, -0.0281490720808506, 0.019160186871886253, 0.015040810219943523, 0.010126800276339054, 0.03481127321720123, 0.04307545721530914, 0.05670499801635742, 0.005740427412092686, 0.0034614205360412598, -0.01687164418399334, 0.036336...
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 closed(self): if self.status != 0: unittest.fail('echo exit status was not 0: %i' % self.status) if self.testBuf != "hello\r\n": unittest.fail('echo did not return hello: %s' % repr(self.testBuf)) unittest.assertEquals(self.localWindowLeft, 4) ...
10,679
[ 0.017705462872982025, -0.026298798620700836, 0.038417261093854904, -0.00418027164414525, 0.013575075194239616, 0.004023968707770109, -0.0056767892092466354, -0.007715378422290087, 0.03067527897655964, -0.004948483780026436, 0.009291709400713444, 0.014366566203534603, -0.025700191035866737, ...
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": "ignored", "annotation": null, "type_comment": null}}], "kwarg": n...
def _cbRealRequestWorked(self, ignored): d1 = self.conn.sendGlobalRequest('foo', 'bar', 1) d1.addErrback(self._ebFirstGlobal) d2 = self.conn.sendGlobalRequest('foo-2', 'bar2', 1) d2.addCallback(lambda x: unittest.assertEquals(x, 'data')) d2.addErrback(self._e...
10,680
[ 0.00897791888564825, -0.06461470574140549, 0.08161026984453201, -0.036779869347810745, 0.038595184683799744, 0.019337056204676628, -0.02077089250087738, 0.03638523817062378, 0.01944229193031788, -0.007202066946774721, 0.047434981912374496, -0.025559116154909134, -0.03259675204753876, -0.02...
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_multipleFactories(self): f1 = self.makeSSHFactory(primes=None) f2 = self.makeSSHFactory(primes={1:(2,3)}) p1 = f1.buildProtocol(None) p2 = f2.buildProtocol(None) self.failIf('diffie-hellman-group-exchange-sha1' in p1.supportedKeyExchanges, p1.supportedKey...
10,681
[ 0.014137146063148975, -0.016884900629520416, 0.005510831251740456, -0.007747850846499205, 0.046456459909677505, -0.02286050096154213, 0.007124754134565592, -0.02175731398165226, 0.008549705147743225, 0.002013572957366705, -0.001091696205548942, 0.025720616802573204, -0.0031461280304938555, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "msg", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def parse(msg): sender, conn_id, path, rest = msg.split(' ', 3) headers, rest = parse_netstring(rest) body, _ = parse_netstring(rest) headers = json.loads(headers) return uuid, id, path, headers, body
10,682
[ 0.01594056375324726, -0.030787581577897072, 0.023132745176553726, -0.011282471008598804, 0.017707064747810364, -0.010535914450883865, -0.008417164906859398, -0.06632789224386215, -0.04378397762775421, 0.028200918808579445, -0.0004429394903127104, -0.024289382621645927, 0.015004740096628666, ...
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": {"_type": "arg", "_fields": {"arg": "options", "a...
class proxy_info(object): def __init__(self, **options): self.host = options.get("http_proxy_host", None) if self.host: self.port = options.get("http_proxy_port", 0) self.auth = options.get("http_proxy_auth", None) self.no_proxy = options.get("http_no_proxy", Non...
10,683
[ 0.00785943865776062, -0.04073508456349373, 0.02374838851392269, -0.008704650215804577, 0.01420368067920208, -0.0315820574760437, 0.0021310674492269754, -0.052526816725730896, -0.028799043968319893, 0.043827321380376816, 0.012946169823408127, -0.004138445481657982, -0.006442162673920393, -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": {"_type": "arg", "_fields": {"arg": "options", "annotation": null, "type_comment": null}}, "...
def __init__(self, **options): self.host = options.get("http_proxy_host", None) if self.host: self.port = options.get("http_proxy_port", 0) self.auth = options.get("http_proxy_auth", None) self.no_proxy = options.get("http_no_proxy", None) else: se...
10,684
[ -0.039722926914691925, -0.00922526977956295, -0.009782732464373112, 0.006729020271450281, 0.05458202585577965, -0.015717491507530212, -0.010705259628593922, -0.04617568477988243, 0.006314623169600964, 0.025475557893514633, 0.0033102440647780895, 0.013092976994812489, 0.037473343312740326, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "options", "annotation": null, "type_comment": null}}, {"_type": "a...
def connect(url, options, proxy, socket): hostname, port, resource, is_secure = parse_url(url) if socket: return socket, (hostname, port, resource) addrinfo_list, need_tunnel, auth = _get_addrinfo_list( hostname, port, is_secure, proxy) if not addrinfo_list: raise WebSocketExce...
10,685
[ 0.004713172558695078, 0.028040392324328423, -0.0012646764516830444, 0.01763959415256977, 0.024759070947766304, -0.02557442896068096, 0.01787823624908924, -0.020324314013123512, -0.006796315312385559, 0.01541227288544178, 0.025554543361067772, 0.005073620937764645, 0.031460922211408615, 0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "addrinfo_list", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "sockopt", "annotation": null, "type_comment": null}}, {"...
def _open_socket(addrinfo_list, sockopt, timeout): err = None for addrinfo in addrinfo_list: family = addrinfo[0] sock = socket.socket(family) sock.settimeout(timeout) for opts in DEFAULT_SOCKET_OPTION: sock.setsockopt(*opts) for opts in sockopt: s...
10,686
[ -0.0020459117367863655, 0.0014357748441398144, 0.04728090018033981, 0.023360298946499825, 0.03400604426860809, -0.019696783274412155, -0.007089979946613312, -0.0035422963555902243, -0.02411455288529396, 0.029502075165510178, 0.0006411152426153421, 0.013598107732832432, 0.023532699793577194, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "hostname", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "port", "annotation": null, "type_comment": null}}, {"_type": ...
def _get_addrinfo_list(hostname, port, is_secure, proxy): phost, pport, pauth = get_proxy_info( hostname, is_secure, proxy.host, proxy.port, proxy.auth, proxy.no_proxy) if not phost: addrinfo_list = socket.getaddrinfo( hostname, port, 0, 0, socket.SOL_TCP) return addrinfo_lis...
10,687
[ 0.01600857451558113, -0.015977226197719574, -0.012079576961696148, -0.02672971971333027, 0.022445442155003548, -0.0037173957098275423, 0.0028318038675934076, -0.03914368152618408, -0.030491527169942856, 0.005804675631225109, -0.006954116281121969, 0.03517288342118263, 0.03262321650981903, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "sock", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "sslopt", "annotation": null, "type_comment": null}}, {"_type": "a...
def _wrap_sni_socket(sock, sslopt, hostname, check_hostname): context = ssl.SSLContext(sslopt.get('ssl_version', ssl.PROTOCOL_SSLv23)) if sslopt.get('cert_reqs', ssl.CERT_NONE) != ssl.CERT_NONE: context.load_verify_locations(cafile=sslopt.get('ca_certs', None), capath=sslopt.get('ca_cert_path', None)) ...
10,688
[ 0.03495025262236595, 0.0009909140644595027, 0.02601560205221176, 0.0041552698239684105, 0.009848919697105885, -0.010965751484036446, 0.0034736739471554756, -0.025205351412296295, -0.033088866621255875, 0.006783108226954937, 0.03057052195072174, 0.007965635508298874, 0.016730571165680885, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "sock", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user_sslopt", "annotation": null, "type_comment": null}}, {"_type...
def _ssl_socket(sock, user_sslopt, hostname): sslopt = dict(cert_reqs=ssl.CERT_REQUIRED) sslopt.update(user_sslopt) if os.environ.get('WEBSOCKET_CLIENT_CA_BUNDLE'): certPath = os.environ.get('WEBSOCKET_CLIENT_CA_BUNDLE') else: certPath = os.path.join( os.path.dirname(__file_...
10,689
[ 0.014464687556028366, -0.0008082813583314419, -0.02040056698024273, -0.03818677365779877, 0.044958390295505524, 0.0045054820366203785, -0.028436504304409027, -0.005370684899389744, 0.04440123215317726, -0.015954013913869858, 0.037008170038461685, -0.028393644839525223, -0.030665136873722076,...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "sock", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def read_headers(sock): status = None headers = {} trace("--- response header ---") while True: line = recv_line(sock) line = line.decode('utf-8').strip() if not line: break trace(line) if not status: status_info = line.split(" ", 2) ...
10,690
[ -0.006688816472887993, -0.027071772143244743, 0.023991117253899574, -0.013145528733730316, 0.03960539028048515, -0.003088566241785884, 0.003951043821871281, 0.007385128643363714, 0.0028116239700466394, 0.012670771218836308, -0.009110083803534508, 0.0042860121466219425, -0.0013207511510699987...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "sock", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "host", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _tunnel(sock, host, port, auth): debug("Connecting proxy...") connect_header = "CONNECT %s:%d HTTP/1.0\r\n" % (host, port) # TODO: support digest auth. if auth and auth[0]: auth_str = auth[0] if auth[1]: auth_str += ":" + auth[1] encoded_str = base64encode(auth_st...
10,691
[ -0.04055558145046234, 0.03973833844065666, 0.03174469992518425, 0.009008804336190224, 0.016089430078864098, 0.03406872972846031, -0.030774228274822235, -0.01841345988214016, 0.061701688915491104, -0.012041534297168255, 0.01303116139024496, -0.020188404247164726, 0.0038148551248013973, -0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "data", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fos", "annotation": null, "type_comment": null}}], "kwarg": null,...
def fortios_system(data, fos): if data['system_external_resource']: resp = system_external_resource(data, fos) return not is_successful_status(resp), \ resp['status'] == "success", \ resp
10,692
[ -0.025356700643897057, 0.06337309628725052, 0.025468623265624046, -0.0020348161924630404, -0.0031120716594159603, 0.02932373620569706, -0.019710823893547058, -0.0274334866553545, 0.02720964141190052, 0.023839525878429413, 0.054767485707998276, -0.033004749566316605, 0.02025800198316574, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "data", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fos", "annotation": null, "type_comment": null}}], "kwarg": null,...
def system_external_resource(data, fos): vdom = data['vdom'] state = data['state'] system_external_resource_data = data['system_external_resource'] filtered_data = underscore_to_hyphen(filter_system_external_resource_data(system_external_resource_data)) if state == "present": return fos.set...
10,693
[ -0.013219299726188183, 0.01626889407634735, -0.013700122013688087, -0.050374291837215424, -0.016466492787003517, 0.013390551321208477, -0.0428655743598938, -0.02094537764787674, 0.029586993157863617, 0.038729190826416016, 0.0179287176579237, -0.0843084380030632, 0.015992257744073868, -0.03...
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 RunAnalytics(webapp2.RequestHandler): def get(self): now = datetime.datetime.now() a_day_ago = now - datetime.timedelta(days=1) context = {} context['start_time'] = str(stripMilSecs(a_day_ago)) context['end_time'] = str(stripMilSecs(now)) fsm.startStateMachine('CountAwardedBadges', [con...
10,694
[ 0.005652956664562225, 0.01300391461700201, 0.03226807713508606, -0.01678665168583393, -0.008562522009015083, -0.01671413891017437, 0.04432933032512665, -0.02255139872431755, 0.005326650105416775, -0.0028853947296738625, 0.06134560704231262, -0.06279585510492325, 0.01267760805785656, -0.011...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "stock.count.line"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment"...
class StockCountLine(Model): _name = "stock.count.line" _fields = { "count_id": fields.Many2One("stock.count", "Stock Count", required=True, on_delete="cascade"), "product_id": fields.Many2One("product", "Product", condition=[["type", "=", "stock"]], required=True), "lot_id": fields.Many...
10,695
[ -0.009744616225361824, -0.025625979527831078, -0.016724323853850365, -0.015078865922987461, -0.007087606471031904, 0.03312494978308678, 0.0022439591120928526, 0.004555354826152325, -0.003587637096643448, 0.0431055948138237, 0.028916895389556885, -0.04307861998677254, -0.010088543407619, -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 get(self): now = datetime.datetime.now() a_day_ago = now - datetime.timedelta(days=1) context = {} context['start_time'] = str(stripMilSecs(a_day_ago)) context['end_time'] = str(stripMilSecs(now)) fsm.startStateMachine('CountAwardedBadges', [context]) fsm.startStateMachine('CountAwarded...
10,696
[ 0.022237703204154968, 0.00020938886154908687, 0.043948251754045486, -0.045058052986860275, 0.016660936176776886, -0.02288971282541752, -0.04480834677815437, -0.005524744745343924, 0.05698845162987709, -0.0003617701877374202, 0.04070207104086876, -0.08212551474571228, -0.0313519723713398, -...
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 GetAnalytics(webapp2.RequestHandler): @account_login_required def get(self): current_session = Session().get_current_session(self) acc = current_session.get_account_entity() a_type = self.request.get("type") if a_type not in VALID_ANALYTICS: return json.dumps({'success':'false'}) va...
10,697
[ 0.042664408683776855, 0.009199907071888447, 0.010225614532828331, -0.05577836558222771, 0.04155689850449562, 0.002246488817036152, -0.007255466654896736, -0.004408026579767466, 0.05784236639738083, 0.0014095616061240435, 0.02233903482556343, -0.08688940852880478, -0.021168595179915428, -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 get(self): current_session = Session().get_current_session(self) acc = current_session.get_account_entity() a_type = self.request.get("type") if a_type not in VALID_ANALYTICS: return json.dumps({'success':'false'}) values = getattr(self, a_type + "_values")(acc) self.response.out.writ...
10,698
[ 0.029416680335998535, 0.0036324369721114635, 0.016188103705644608, -0.0480157770216465, 0.038422826677560806, -0.0036898416001349688, -0.014300129376351833, -0.0023185089230537415, 0.05959875509142876, 0.007162821479141712, 0.02396961860358715, -0.09715413302183151, -0.026380613446235657, ...
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 post(self): current_session = Session().get_current_session(self) acc = current_session.get_account_entity() a_type = self.request.get("type") if a_type not in VALID_ANALYTICS: return json.dumps({'success':'false'}) values = getattr(self, a_type + "_values")(acc) self.response.out.wri...
10,699
[ 0.04599121958017349, -0.03572791442275047, 0.030184762552380562, 0.00571259343996644, 0.011649091728031635, 0.001086996402591467, -0.009416096843779087, 0.008381294086575508, 0.016193749383091927, 0.023044021800160408, 0.040617506951093674, -0.04921060428023338, -0.042336128652095795, -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}}, {"_type": "arg", "_fields": {"arg": "acc", "annotation": null, "type_comment": null}}], "kwarg": null,...
def badges_values(self, acc): q = BadgeBatch.all().filter("account_key =", acc.key().name()) values = {"success": "true"} res = q.fetch(1000) values['total'] = q.count() or 1 values['entry'] = [] values['badges'] = [] values['numbadges'] = 0 badges = set() for ii in res: ent =...
10,700
[ 0.03140637278556824, -0.028370900079607964, 0.036473456770181656, 0.007941222749650478, 0.0041409083642065525, -0.019216684624552727, -0.017161168158054352, 0.015045898966491222, 0.024594487622380257, 0.010432938113808632, 0.05282197892665863, -0.03370090201497078, -0.057411037385463715, -...
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": "acc", "annotation": null, "type_comment": null}}], "kwarg": null,...
def badgepoints_values(self, acc): q = BadgePointsBatch.all().filter("account_key =", acc.key().name()) values = {"success": "true"} res = q.fetch(1000) values['total'] = q.count() or 1 values['entry'] = [] values['badges'] = [] values['numbadges'] = 0 badges = set() for ii in res: ...