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
16,201
[ 0.0031617882195860147, 0.016593240201473236, 0.060470227152109146, -0.04512311890721321, 0.03270551562309265, -0.04604132100939751, -0.01545641664415598, 0.007722742855548859, 0.008744790218770504, 0.00007728549826424569, 0.00011673953849822283, -0.037515152245759964, 0.03749328851699829, ...
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 _GetKsFile(self): if not hasattr(self, 'ks_file'): # Dummy pkcs12 keystore generated with the command # openssl req -new -passout pass:notasecret -batch \ # -x509 -keyout signed_url_test.key -out signed_url_test.pem \ # -subj '/CN=test.apps.googleusercontent.com' # && # op...
16,202
[ 0.019332248717546463, 0.025942549109458923, -0.0026131141930818558, -0.04482729360461235, 0.01181415282189846, 0.02084098383784294, -0.028384651988744736, -0.039303794503211975, 0.030532680451869965, 0.053649548441171646, 0.02373059280216694, -0.040710240602493286, -0.02692706137895584, -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 testSignUrlWithURLEncodeRequiredChars(self): objs = ['gs://example.org/test 1', 'gs://example.org/test/test 2', 'gs://example.org/Аудиоарi хив'] expected_partial_urls = [ ('https://storage.googleapis.com/example.org/test%201?GoogleAccessId=te' 'st@developer.gserviceaccount.com')...
16,203
[ 0.01584533043205738, 0.007138115353882313, 0.02487407997250557, -0.012835745699703693, -0.02041115052998066, -0.007253868505358696, -0.021298592910170555, 0.00008490579057252035, 0.010983694344758987, 0.04506658762693405, 0.033388372510671616, -0.02298344485461712, -0.00447257561609149, -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 testSignUrlWithWildcard(self): objs = ['test1', 'test2', 'test3'] bucket = self.CreateBucket() obj_urls = [] for obj_name in objs: obj_urls.append(self.CreateObject(bucket_uri=bucket, object_name=obj_name, contents='')) stdout = self.RunGsUtil(['si...
16,204
[ -0.03184259682893753, 0.0038214579690247774, 0.05291694030165672, -0.046469852328300476, -0.01356429886072874, -0.003362189745530486, -0.002889923518523574, -0.04025384783744812, 0.03447688743472099, 0.05573609471321106, 0.014477058313786983, -0.021270761266350746, -0.029716674238443375, -...
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 testDurationSpec(self): tests = [('1h', timedelta(hours=1)), ('2d', timedelta(days=2)), ('5D', timedelta(days=5)), ('35s', timedelta(seconds=35)), ('1h', timedelta(hours=1)), ('33', timedelta(hours=33)), ('22m', timedelta(minutes=22))...
16,205
[ 0.031005408614873886, 0.052485495805740356, -0.005442182999104261, -0.06364648044109344, -0.011654089204967022, 0.03887101635336876, 0.03172702342271805, -0.025352755561470985, 0.020385636016726494, 0.021407924592494965, 0.05051308125257492, -0.010228898376226425, 0.015647027641534805, 0.0...
15
{"_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": "filename", "annotation": null, "type_comment": null}}, {"_type"...
def do_ini(module, filename, section=None, option=None, value=None, state='present', backup=False): if not os.path.exists(filename): try: open(filename,'w').close() except: module.fail_json(msg="Destination file %s not writable" % filename) ini_file = open(filename, 'r') try: ...
16,206
[ 0.010651558637619019, 0.022625379264354706, 0.007831862196326256, -0.042583633214235306, -0.03880896791815758, 0.04959049075841904, 0.006040592212229967, 0.00656045600771904, 0.03062676265835762, 0.049183640629053116, 0.02059113048017025, -0.04868638142943382, 0.014488380402326584, 0.00811...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): module = AnsibleModule( argument_spec = dict( dest = dict(required=True), section = dict(required=True), option = dict(required=False), value = dict(required=False), backup = dict(default='no', type='bool'), state = dict(de...
16,207
[ -0.007104077376425266, -0.004382118582725525, -0.02874482236802578, -0.027524633333086967, 0.007825630716979504, 0.0027776884380728006, -0.0112046143040061, -0.03468150645494461, 0.017622334882616997, 0.018678268417716026, -0.012154953554272652, -0.018690001219511032, -0.027266517281532288, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class ToolsRussianTestCase(TestCase): def test_parse_ru_month(self): self.assertEqual(1, parse_ru_month(u'Январь')) self.assertEqual(1, parse_ru_month(u'Января')) self.assertEqual(1, parse_ru_month(u'январь')) self.assertEqual(1, parse_ru_month(u'января')) self.assertEqual(1,...
16,208
[ 0.0009848660556599498, 0.025101419538259506, 0.05974322929978371, -0.06914468854665756, -0.0173787958920002, 0.004793352447450161, -0.02595820277929306, -0.02092170901596546, 0.030381053686141968, 0.0169967170804739, 0.007589474320411682, -0.043834857642650604, -0.015642074868083, -0.04439...
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": "Constant", "_fields":...
def main(): passed = 0 skipped = 0 failed = 0 total = 0 print() print("================================== ALL BEGIN ==================================\n") for suite in SUITES: print(suite + ":") module = __import__(suite, None, None) try: result = harnes...
16,209
[ -0.023021601140499115, -0.007022238336503506, 0.03364059701561928, 0.017564455047249794, 0.016761237755417824, 0.05551643297076225, -0.035837627947330475, 0.05844581127166748, 0.006354860030114651, -0.02407287061214447, 0.033900462090969086, -0.025891918689012527, 0.001875156071037054, -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": "company", "annotation": null, "type_comment": null}}], "kwarg": n...
def _get_dua_fiscal_position_id(self, company): fp = self.env.ref( "l10n_es_dua.%i_fp_dua" % company.id, raise_if_not_found=False ) return ( fp and fp.id or self.env["account.fiscal.position"] .search( [ ...
16,210
[ 0.022759204730391502, 0.0014723357744514942, -0.027844678610563278, -0.02624834142625332, 0.013717095367610455, 0.0014751864364370704, -0.004586618393659592, -0.03993123024702072, 0.025039685890078545, 0.04472023993730545, -0.0355755090713501, -0.0022762054577469826, -0.03299856558442116, ...
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_slugify_lower(self): # by default lower option is True self.assertEqual('bi-n', slugify('####БИ.н')) self.assertEqual('BI-n', slugify('####БИ.н', lower=False)) # test also english letters self.assertEqual('bi-n', slugify('####bi.н')) self.assertEqual('BI-n', sl...
16,211
[ 0.0067756883800029755, 0.007470131851732731, 0.03611104562878609, -0.03372268006205559, -0.03182756528258324, -0.027725806459784508, 0.018795397132635117, -0.04060221090912819, -0.021677011623978615, 0.014330191537737846, 0.005889786873012781, -0.07632385194301605, -0.007320859003812075, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": ...
class Migration(SchemaMigration): cms_plugin_table_mapping = ( # (old_name, new_name), ('cmsplugin_filerteaser', 'cmsplugin_filer_teaser_filerteaser'), ) def forwards(self, orm): rename_tables_new_to_old(db, self.cms_plugin_table_mapping) # Adding field 'FilerTeaser.ext...
16,212
[ 0.05222465097904205, -0.058426596224308014, 0.0551331490278244, -0.02427312731742859, -0.024166198447346687, -0.0043734400533139706, 0.03594989329576492, 0.01327002327889204, -0.02538520097732544, 0.03577880561351776, -0.03642038628458977, -0.03689087927341461, 0.007912825793027878, -0.074...
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 terrains(self): result = [] for index in self.terrain_indices: try: result.append(self.tileset.terrains[index]) except (IndexError, KeyError): result.append(None) return tuple(result)
16,213
[ 0.010401895269751549, -0.05657726526260376, -0.002070485847070813, 0.0076657445169985294, -0.041471902281045914, -0.004036387428641319, -0.022578896954655647, 0.011566455475986004, 0.028311245143413544, 0.04671807587146759, 0.039595041424036026, -0.004737384617328644, -0.06874296069145203, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "block", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "seg", "annotation": null, "type_comment": null}}], "kwarg": null...
def block2list(block,seg): blockList=[] for i in range(seg): blockList.append(0) #init a 50-element list i=0 for bit in block: blockList[i%seg] += int(bit) #add together digits in the same decimal place only i+=1 return blockList
16,214
[ 0.032282013446092606, 0.02618405781686306, 0.012031990103423595, -0.02314600721001625, 0.0024861739948391914, -0.0033877536188811064, 0.0047865682281553745, -0.0028468058444559574, 0.031844884157180786, 0.030599065124988556, 0.00427020899951458, 0.02140841819345951, -0.000245031580561772, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "msg", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "color", "annotation": null, "type_comment": null}}], "kwarg": null...
def log(msg, color=None): warnings.simplefilter('always', DeprecationWarning) message = ( "Using logger.log is deprecated and will be removed soon. " "We recommend that you try to log as little as possible " "and use the event system to send important messages " "(they become log...
16,215
[ 0.0025360961444675922, 0.008783194236457348, 0.0616290420293808, -0.009968368336558342, -0.025416700169444084, 0.015125635080039501, -0.014515446498990059, 0.011840004473924637, -0.004042499233037233, 0.05332108959555626, -0.010050509124994278, 0.026425857096910477, -0.014808806590735912, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "core_distances_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "reachability_", "annotation": null, "type_comment": nu...
def _set_reach_dist( core_distances_, reachability_, predecessor_, point_index, processed, X, nbrs, metric, metric_params, p, max_eps, ): P = X[point_index : point_index + 1] # Assume that radius_neighbors is faster without distances # and we don't need all distan...
16,216
[ -0.03152518719434738, 0.004179139155894518, 0.021586211398243904, -0.0404658280313015, -0.0037187961861491203, 0.009001649916172028, -0.008252899162471294, 0.05222398787736893, 0.044858500361442566, -0.011242356151342392, 0.04332771897315979, -0.020854098722338676, 0.025490809231996536, 0....
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 = DevTestLabsClient( credential=DefaultAzureCredential(), subscription_id="{subscriptionId}", ) response = client.virtual_machine_schedules.begin_execute( resource_group_name="resourceGroupName", lab_name="{labName}", virtual_machine_name="{vmName}...
16,217
[ 0.04423704370856285, -0.04448774456977844, 0.0026950181927531958, 0.031314630061388016, -0.00807935744524002, 0.024181094020605087, 0.02828344702720642, -0.050686854869127274, 0.04052213579416275, 0.016033364459872246, 0.017104534432291985, -0.025457382202148438, -0.018289659172296524, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "pow_problem", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyar...
def generate_puzzle(pow_problem): size = 19 solution = ''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits) for x in range(size)) trial = pow_problem + solution return trial, solu...
16,218
[ 0.0008158428245224059, -0.030391069129109383, 0.009189511649310589, 0.013302010484039783, -0.0488055944442749, 0.003662786679342389, 0.03356272354722023, -0.03585861995816231, 0.02904193289577961, 0.018367188051342964, 0.055480267852544785, -0.0275744516402483, -0.00777528528124094, -0.026...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "pow_problem", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "num_of_matches", "annotation": null, "type_comment": null}...
def create_pow(pow_problem, num_of_matches): found = False start_time = time.time() while found == False: trial, solution = generate_puzzle(pow_problem) attempt_01 = trial.encode('utf-8') sha_hashing_256 = hashlib.sha256() sha_hashing_256.update(attempt_01) final_sol ...
16,219
[ 0.035885170102119446, -0.01641632430255413, 0.001106389332562685, 0.022869886830449104, -0.010287242941558361, 0.04213443025946617, -0.004626855719834566, -0.026246890425682068, 0.017594069242477417, 0.0024636504240334034, 0.06816499680280685, 0.029924338683485985, -0.05158042535185814, -0...
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 pow_result(): pow_problem = str(datetime.utcnow().replace(minute=0, second=0, microsecond=0)) match_num = 4 proof = create_pow(pow_problem, match_num) if verify_pow(pow_problem, match_num): print("Proof-of-Work Verified!") else: print("Could not verifiy Proof-of-Work!")
16,220
[ -0.007863498292863369, -0.025177041068673134, -0.0012548136292025447, 0.013580833561718464, -0.042461737990379333, 0.02325011044740677, 0.03544631972908974, -0.042692508548498154, 0.029838602989912033, 0.024023190140724182, 0.061015672981739044, -0.02208472043275833, -0.016777001321315765, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "pow_problem", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "num_of_matches", "annotation": null, "type_comment": null}...
def verify_pow(pow_problem, num_of_matches): found = False start_time = time.time() while found == False: trial, solution = generate_puzzle(pow_problem) attempt_01 = trial.encode('utf-8') sha_hashing_256 = hashlib.sha256() sha_hashing_256.update(attempt_01) final_sol ...
16,221
[ 0.06889127939939499, -0.004194439854472876, 0.023805581033229828, 0.008766664192080498, 0.0258549302816391, -0.014407551847398281, 0.016032541170716286, 0.010433054529130459, -0.002667777705937624, -0.022977560758590698, 0.0012523805489763618, -0.06106648966670036, 0.042560238391160965, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "products"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment"...
class Products(CommonColumns): __tablename__ = 'products' name = Column(String(80)) keywords = association_proxy( 'products_keywords_assoc', 'keyword', creator=lambda keyword_id: ProductsKeywords(keyword_id=keyword_id) )
16,222
[ 0.04198611527681351, -0.02115604840219021, 0.06902065873146057, -0.010605189017951488, 0.057937365025281906, -0.01733122579753399, -0.002827869262546301, -0.029620639979839325, -0.024578828364610672, -0.018580812960863113, -0.006209902931004763, -0.017374688759446144, 0.09562055766582489, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "people"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": ...
class People(CommonColumns): __tablename__ = 'people' firstname = Column(String(80), unique=True) lastname = Column(String(120)) fullname = column_property(firstname + " " + lastname) prog = Column(Integer) born = Column(DateTime) title = Column(String(20), default='Mr.') @classmethod ...
16,223
[ 0.019483547657728195, -0.01107607688754797, 0.02001454494893551, -0.015426176600158215, 0.012076803483068943, 0.01618863455951214, -0.04223477467894554, -0.03646187111735344, 0.011573036201298237, 0.03700648620724678, 0.03520926088094711, -0.0657348483800888, -0.02167561650276184, -0.01493...
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 Site(OpinionSite): def __init__(self): super(Site, self).__init__() self.court_id = self.__module__ self.url = 'http://www.5dca.org/opinions_archived.shtml' self.base_path = "//a" self.case_regex = '(5D.*-.*\d{1,3})([- ]+[A-Za-z].*)' def _download(self, req...
16,224
[ 0.02754492312669754, 0.0003018216521013528, 0.0017545003211125731, 0.009638771414756775, 0.01267925463616848, -0.002295003505423665, 0.0353340283036232, 0.06036067008972168, 0.0054953196085989475, -0.006032162345945835, 0.03148827701807022, -0.06371837854385376, -0.01250356063246727, -0.01...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "products_keywords"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type...
class ProductsKeywords(Base): __tablename__ = 'products_keywords' product_id = Column(Integer, ForeignKey('products._id'), primary_key=True) keyword_id = Column(Integer, ForeignKey('keywords._id'), primary_key=True) product = relationship( 'Products', backref=backref('products_keywords_...
16,225
[ 0.006317310966551304, 0.026547454297542572, 0.0974389910697937, -0.05688037723302841, -0.022405559197068214, -0.008511163294315338, -0.016334058716893196, -0.015055847354233265, 0.013015626929700375, 0.047490444034338, 0.010717305354773998, -0.023499412462115288, -0.006815075408667326, -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": "html_tree", "annotation": null, "type_comment": null}}], "kwarg":...
def _return_dates(self, html_tree): path = "//*[starts-with(., 'Opinions')]/text()" dates = [] text = html_tree.xpath(path)[0] text = re.search('.* Week of (.*)', text).group(1).strip() for date_fmt in ['%B %d, %Y', '%b. %d, %Y']: text = re.sub('Sept', 'Sep', te...
16,226
[ 0.015129683539271355, -0.028533250093460083, 0.010121326893568039, -0.03588232770562172, 0.03640539199113846, -0.016084279865026474, 0.013599715195596218, -0.011062845587730408, -0.02124955505132675, 0.029553228989243507, 0.04503598064184189, -0.0739615336060524, -0.0793491080403328, -0.01...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "request_dict", "annotation": null, "type_comment": null}}], "kwar...
def _download(self, request_dict={}): html_l = super(Site, self)._download(request_dict) s = requests.session() html_trees = [] # this path reads the link of the last 2 dates path = "(//a[contains(./@href, 'filings')])[position() < 3]/@href" # to get all the dates i...
16,227
[ 0.031226718798279762, -0.022079015150666237, 0.00738760968670249, 0.02035484090447426, -0.0140687869861722, 0.028544669970870018, 0.014332202263176441, -0.018211595714092255, -0.006902685388922691, -0.014320229180157185, -0.004322410095483065, -0.0017181879375129938, -0.008447258733212948, ...
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) : self.start_time = time.time() for event in XchatSoundHandler.EVENTS : xchat.hook_print(event, self.handle_message, event) xchat.hook_command("chatsounds", self.handle_prefs) xchat.hook_command("cs", self.handle_prefs) self.player = SoundPlayer()...
16,228
[ 0.027774015441536903, 0.0016852718545123935, 0.016573628410696983, -0.043525710701942444, 0.016917124390602112, 0.05206401273608208, 0.05441940575838089, 0.019100770354270935, 0.016426416113972664, 0.03739187493920326, 0.011562283150851727, -0.043427567929029465, -0.05181865766644478, 0.02...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null...
def play(self, path) : if self.current : if self.current.poll() is None : # Current process hasn't finished yet. Is this the same sound? if path == self.curpath : # A repeat of the currently playing sound. # Don't play it more t...
16,229
[ 0.003941813949495554, -0.0004858780012000352, -0.02069832757115364, -0.024959746748209, 0.031217947602272034, 0.029927344992756844, -0.002240289468318224, 0.01993127167224884, 0.04110444337129593, 0.03377480059862137, 0.006276463158428669, -0.013380859978497028, -0.04149405658245087, -0.00...
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 NodeCommentsListMixin(object): def setUp(self): super(NodeCommentsListMixin, self).setUp() self.user = AuthUserFactory() self.non_contributor = AuthUserFactory() def _set_up_private_project_with_comment(self): raise NotImplementedError def _set_up_public_project_with...
16,230
[ 0.030317826196551323, -0.007945442572236061, -0.028334418311715126, -0.002340540988370776, 0.05237144976854324, 0.03218317776918411, 0.0007976433844305575, 0.01938546448945999, 0.05931337922811508, 0.028499701991677284, 0.031144248321652412, -0.005188740324229002, -0.021581381559371948, -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_return_public_node_comments_logged_out_user(self): self._set_up_public_project_with_comment() res = self.app.get(self.public_url) assert_equal(res.status_code, 200) comment_json = res.json['data'] comment_ids = [comment['id'] for comment in comment_json] assert_e...
16,231
[ 0.043632328510284424, -0.010766188614070415, -0.019191129133105278, -0.0015002308646216989, 0.056473713368177414, 0.02840239927172661, 0.001931824255734682, 0.034243691712617874, 0.03698696941137314, 0.023578012362122536, 0.026936164125800133, 0.013172470033168793, -0.019616810604929924, -...
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_return_public_node_comments_logged_in_user(self): self._set_up_public_project_with_comment() res = self.app.get(self.public_url, auth=self.non_contributor) assert_equal(res.status_code, 200) comment_json = res.json['data'] comment_ids = [comment['id'] for comment in comm...
16,232
[ 0.06088472530245781, -0.0234733447432518, -0.002632511081174016, -0.007192685268819332, 0.058247800916433334, 0.02745227701961994, 0.01251362357288599, 0.04228498414158821, 0.04390951618552208, 0.012949187308549881, 0.04221435263752937, 0.004496899899095297, -0.007657678797841072, -0.03785...
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_return_private_node_comments_logged_in_contributor(self): self._set_up_private_project_with_comment() res = self.app.get(self.private_url, auth=self.user.auth) assert_equal(res.status_code, 200) comment_json = res.json['data'] comment_ids = [comment['id'] for comment in ...
16,233
[ 0.0624285526573658, -0.0045027355663478374, -0.027931030839681625, -0.026242505759000778, 0.04005558416247368, 0.06791625916957855, 0.02675844356417656, 0.06416398286819458, 0.0515938438475132, 0.017025968059897423, 0.04537913203239441, -0.036842696368694305, -0.028165549039840698, -0.0300...
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_return_both_deleted_and_undeleted_comments(self): self._set_up_private_project_with_comment() deleted_comment = CommentFactory(node=self.private_project, user=self.user, target=self.comment.target, is_deleted=True) res = self.app.get(self.private_url, auth=self.user.auth) assert...
16,234
[ 0.054705969989299774, -0.018016591668128967, -0.016761763021349907, -0.0031169280409812927, 0.04006245359778404, 0.05014713853597641, 0.051344409584999084, 0.04848938435316086, 0.05475201830267906, 0.0282279122620821, 0.04524294286966324, 0.003632098902016878, 0.02454400807619095, 0.007972...
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_return_registration_comments_logged_in_contributor(self): self._set_up_registration_with_comment() res = self.app.get(self.registration_url, auth=self.user.auth) assert_equal(res.status_code, 200) comment_json = res.json['data'] comment_ids = [comment['id'] for comment i...
16,235
[ 0.01724809966981411, -0.007633449509739876, 0.01629246212542057, -0.02913530357182026, 0.024730045348405838, 0.010512017644941807, -0.0034146576654165983, 0.009632131084799767, 0.04787512868642807, 0.008029690012335777, -0.010074988007545471, -0.014008253812789917, -0.015569905750453472, -...
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 TestNodeCommentsList(NodeCommentsListMixin, ApiTestCase): def _set_up_private_project_with_comment(self): self.private_project = ProjectFactory(is_public=False, creator=self.user) self.comment = CommentFactory(node=self.private_project, user=self.user) self.private_url = '/{}nodes/{}/...
16,236
[ 0.031406618654727936, 0.016029490157961845, 0.0032822012435644865, -0.04005042836070061, 0.014852907508611679, 0.007473051082342863, -0.012278403155505657, 0.01288416888564825, 0.05200264975428581, 0.013629726134240627, 0.0002075038501061499, -0.00950586050748825, -0.016868242993950844, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestNodeCommentsListFiles(NodeCommentsListMixin, ApiTestCase): def _set_up_private_project_with_comment(self): self.private_project = ProjectFactory(is_public=False, creator=self.user) self.file = test_utils.create_test_file(self.private_project, self.user) self.comment = CommentFacto...
16,237
[ 0.036217574030160904, 0.0006211969302967191, -0.003223042469471693, -0.029714038595557213, 0.018442006781697273, 0.019774887710809708, -0.010622826404869556, 0.014431876130402088, 0.031644415110349655, 0.01872926577925682, -0.006141590885818005, 0.0055699460208415985, -0.02762279473245144, ...
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 TestNodeCommentsListWiki(NodeCommentsListMixin, ApiTestCase): def _set_up_private_project_with_comment(self): self.private_project = ProjectFactory(is_public=False, creator=self.user) self.wiki = NodeWikiFactory(node=self.private_project, user=self.user) self.comment = CommentFactory(...
16,238
[ 0.060462139546871185, 0.02971629984676838, -0.014647562056779861, -0.029224928468465805, 0.020368535071611404, 0.04766307398676872, 0.004498392343521118, 0.04069027304649353, 0.06298919767141342, 0.002042995532974601, 0.038748182356357574, -0.029833292588591576, 0.008517112582921982, -0.02...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_comments_on_deleted_files_are_not_returned(self): self._set_up_private_project_with_comment() # Delete commented file osfstorage = self.private_project.get_addon('osfstorage') root_node = osfstorage.get_root() root_node.delete(self.file) res = self.app.get(self....
16,239
[ 0.0652020275592804, 0.01357815321534872, -0.02695465087890625, -0.01138794794678688, 0.02063610404729843, 0.036970220506191254, -0.010245231911540031, 0.024826062843203545, 0.03676856309175491, 0.012491453438997269, 0.028388647362589836, -0.021017009392380714, -0.004285184666514397, -0.019...
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_comments_on_deleted_wikis_are_not_returned(self): self._set_up_private_project_with_comment() # Delete wiki self.private_project.delete_node_wiki(self.wiki.page_name, core.Auth(self.user)) res = self.app.get(self.private_url, auth=self.user.auth) assert_equal(res.status_...
16,240
[ 0.05846644192934036, -0.002245479729026556, -0.004806571640074253, 0.01187165267765522, 0.027797041460871696, 0.012763475067913532, 0.006132722366601229, 0.01718783751130104, 0.04887646436691284, -0.0004292615922167897, 0.01736156828701496, -0.008993500843644142, -0.0024192112032324076, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_comment_no_relationships(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' } } } ...
16,241
[ 0.04674939811229706, -0.010946200229227543, 0.014218658208847046, 0.005324870347976685, 0.021025827154517174, 0.017434105277061462, -0.0018657000036910176, 0.022736171260476112, 0.050261303782463074, 0.0030586649663746357, 0.011396590620279312, -0.013591532595455647, -0.0039537446573376656, ...
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_create_comment_empty_relationships(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'relati...
16,242
[ 0.040546759963035583, -0.0032376288436353207, -0.007438185624778271, 0.00809551402926445, 0.034342505037784576, 0.00983685627579689, -0.007103755604475737, 0.021276669576764107, 0.04774277284741402, 0.019627584144473076, 0.008499136194586754, -0.008868162520229816, 0.003038700670003891, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_comment_relationship_is_a_list(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'rel...
16,243
[ 0.06401506066322327, 0.014963237568736076, 0.010229968465864658, 0.016003765165805817, 0.002681903075426817, 0.02062958851456642, 0.006882184185087681, 0.04110083356499672, 0.034518368542194366, -0.01987181231379509, 0.01371912844479084, 0.0015607911627739668, -0.008137603290379047, -0.023...
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_create_comment_target_no_data_in_relationships(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, ...
16,244
[ 0.07117810845375061, 0.004550573881715536, 0.00751538434997201, 0.015597112476825714, 0.016707146540284157, 0.01544986292719841, 0.004641188774257898, 0.04154699295759201, 0.034682903438806534, -0.007826874032616615, 0.003941753879189491, -0.0014894846826791763, -0.022540489211678505, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_comment_no_target_key_in_relationships(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, ...
16,245
[ 0.04963343217968941, 0.023475270718336105, 0.02441428229212761, -0.021373676136136055, 0.010373834520578384, 0.016633905470371246, 0.0018514723051339388, 0.0450725220143795, 0.044714801013469696, -0.0123189277946949, 0.00590794300660491, 0.01469999086111784, -0.0199651587754488, -0.0087920...
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_create_comment_invalid_target_type(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'relati...
16,246
[ 0.05555683374404907, 0.0022383080795407295, 0.0024123513139784336, 0.003883157856762409, 0.010779257863759995, 0.01427723839879036, 0.00803451333194971, 0.05363950505852699, 0.05354820564389229, -0.01550980657339096, 0.017404308542609215, 0.022026436403393745, -0.0205998532474041, -0.02624...
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_create_comment_blank_target_id(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'relationsh...
16,247
[ 0.04958632215857506, 0.010661286301910877, 0.0011561540886759758, 0.004156767390668392, 0.009793639183044434, 0.016729146242141724, 0.012906961143016815, 0.03565859794616699, 0.03028258867561817, -0.014562862925231457, -0.00666897464543581, 0.0031104867812246084, 0.001105115981772542, -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 test_create_comment_no_target_type_in_relationships(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, ...
16,248
[ 0.06765235960483551, 0.015340039506554604, -0.018229544162750244, -0.011039250530302525, 0.03541038930416107, -0.00891953520476818, 0.02623983472585678, 0.030144572257995605, 0.04837411642074585, 0.01482684537768364, 0.027667852118611336, 0.023428423330187798, 0.0072014513425529, -0.008434...
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_create_comment_no_type(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': '', 'attributes': { 'content': 'This is a comment' }, 'relationships': { ...
16,249
[ 0.03650921583175659, 0.000058325862482888624, -0.001070008729584515, -0.009345029480755329, 0.04003866761922836, -0.002429364016279578, 0.02240286022424698, 0.019515126943588257, 0.05729632079601288, 0.0029965974390506744, 0.027341803535819054, 0.002730169566348195, 0.009167411364614964, -...
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_create_comment_incorrect_type(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'cookies', 'attributes': { 'content': 'This is a comment' }, 'relationship...
16,250
[ 0.0841093435883522, 0.007102766539901495, -0.009159421548247337, 0.0011147240875288844, 0.04124549403786659, -0.01090701762586832, 0.024747297167778015, 0.0386381521821022, 0.047471653670072556, 0.016621822491288185, 0.0360083281993866, 0.024679865688085556, 0.008625590242445469, -0.015520...
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_create_comment_no_content(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': '' }, 'relationships': { ...
16,251
[ 0.06868281960487366, 0.012510741129517555, -0.009176456369459629, 0.012395964004099369, 0.03663695976138115, 0.00030577427241951227, 0.02908460423350334, 0.0518794059753418, 0.05408313125371933, 0.04067712649703026, 0.029933957383036613, 0.019684331491589546, -0.012740296311676502, -0.0090...
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_create_comment_trims_whitespace(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': ' ' }, 'relationships': { ...
16,252
[ 0.07329536974430084, -0.025398943573236465, -0.0056187910959124565, 0.0048069399781525135, 0.031335778534412384, 0.014697016216814518, 0.0015567454975098372, 0.03783059120178223, 0.05910053104162216, 0.013547591865062714, 0.0258676428347826, 0.01210802048444748, -0.019752254709601402, -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 test_create_comment_with_allowed_tags(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': '<em>Cool</em> <strong>Comment</strong>' }, ...
16,253
[ 0.07958872616291046, 0.0006121640326455235, 0.019352378323674202, -0.007763453759253025, -0.002632231218740344, 0.028542980551719666, 0.008231274783611298, 0.008959653787314892, 0.05637534707784653, 0.03574386611580849, 0.04280262812972069, -0.012258084490895271, -0.013371379114687443, -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 test_create_comment_exceeds_max_length(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': ('c' * (osf_settings.COMMENT_MAXLENGTH + 3)) },...
16,254
[ 0.056063227355480194, 0.027429021894931793, 0.0238357987254858, -0.030888337641954422, 0.0011884422274306417, 0.009423844516277313, 0.0021941543091088533, 0.04318564757704735, 0.04124396666884422, -0.01520982850342989, 0.011806308291852474, 0.017787575721740723, 0.007119494024664164, -0.00...
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 test_create_file_comment_invalid_target_type(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'r...
16,255
[ 0.04389990121126175, 0.0010474073933437467, 0.029856719076633453, -0.017344648018479347, 0.010006068274378777, 0.029282551258802414, -0.006907954812049866, 0.03456967696547508, 0.02645955979824066, 0.007972557097673416, -0.0013599101221188903, -0.01066396851092577, -0.02421073615550995, 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": "comment_id", "annotati...
class TestCommentRepliesCreate(NodeCommentsCreateMixin, ApiTestCase): def _set_up_payload(self, comment_id): return { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'relationship...
16,256
[ 0.05784209817647934, 0.021707432344555855, 0.020952777937054634, -0.015614702366292477, -0.001631386810913682, 0.0059706540778279305, -0.002893769647926092, 0.0329606719315052, 0.01562580093741417, 0.00391754787415266, 0.00826791301369667, 0.023283330723643303, -0.010642857290804386, 0.009...
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_create_wiki_comment_invalid_target_type(self): self._set_up_private_project_with_private_comment_level() payload = { 'data': { 'type': 'comments', 'attributes': { 'content': 'This is a comment' }, 'r...
16,257
[ 0.00874729547649622, 0.008950999937951565, 0.006096146069467068, -0.03522883355617523, 0.01695537380874157, 0.034030575305223465, -0.025067592039704323, 0.012204274535179138, 0.0072734360583126545, 0.04522231966257095, 0.03570813685655594, -0.011101875454187393, -0.049056749790906906, 0.02...
15
{"_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 TestCommentFiltering(ApiTestCase): def setUp(self): super(TestCommentFiltering, self).setUp() self.user = AuthUserFactory() self.project = ProjectFactory(creator=self.user) self.comment = CommentFactory(node=self.project, user=self.user, page='node') self.deleted_comme...
16,258
[ 0.014501799829304218, -0.005911505781114101, -0.014396289363503456, -0.0037544069346040487, 0.009982443414628506, 0.0026128445751965046, 0.029472533613443375, 0.04433775693178177, -0.001518175471574068, 0.03413843363523483, 0.03111380524933338, 0.009302488528192043, -0.0361548513174057, -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 setUp(self): super(TestCommentFiltering, self).setUp() self.user = AuthUserFactory() self.project = ProjectFactory(creator=self.user) self.comment = CommentFactory(node=self.project, user=self.user, page='node') self.deleted_comment = CommentFactory(node=self.project, user=se...
16,259
[ 0.07647232711315155, 0.005898535251617432, 0.02254467085003853, -0.032773856073617935, -0.0002562433073762804, -0.004988150671124458, 0.008307262323796749, -0.021368756890296936, -0.034973952919244766, -0.010608512908220291, 0.008079665713012218, 0.002527266275137663, -0.008762454614043236, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def writeMessageBegin(self, name, type, seqid): if self.strictWrite: self.writeI32(TBinaryProtocol.VERSION_1 | type) self.writeString(name) self.writeI32(seqid) else: self.writeString(name) self.writeByte(type) self.writeI32(seqid)
16,260
[ 0.00003546946027199738, 0.010132870636880398, 0.020548027008771896, -0.02860492281615734, -0.009150752797722816, -0.028440257534384727, -0.0031698301900178194, 0.040296245366334915, -0.024747023358941078, 0.019430646672844887, 0.02270045317709446, -0.0010644512949511409, 0.008115706034004688...
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 test_filtering_by_target_file(self): test_file = test_utils.create_test_file(self.project, self.user) target = test_file.get_guid() file_comment = CommentFactory(node=self.project, user=self.user, target=target) url = self.base_url + '?filter[target]=' + str(target._id) res =...
16,261
[ 0.05722486227750778, 0.03595175966620445, -0.0027549872174859047, 0.001929312595166266, 0.010631073266267776, -0.004033892881125212, 0.03628038614988327, 0.024844178929924965, -0.02506326325237751, 0.03906276077032089, 0.0022278151009231806, -0.026750212535262108, 0.011260941624641418, -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": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, *args, **kwargs): # Quasi-kwargs: can_archive = kwargs.pop('can_archive', False) can_edit_needs_change = kwargs.pop('can_edit_needs_change', False) initial_title = kwargs.pop('initial_title', '') super(DocumentForm, self).__init__(*args, **kwargs) tit...
16,262
[ 0.024165943264961243, 0.009913061745464802, -0.006018644664436579, -0.013453440740704536, 0.014526975341141224, -0.00027837659581564367, 0.0009393425425514579, -0.0035832063294947147, -0.033005472272634506, -0.0015232196310535073, -0.006224215030670166, -0.010238547809422016, -0.006612514611...
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 readMessageBegin(self): sz = self.readI32() if sz < 0: version = sz & TBinaryProtocol.VERSION_MASK if version != TBinaryProtocol.VERSION_1: raise TProtocolException(type=TProtocolException.BAD_VERSION, message='Bad version in readMessageBegin: %d' % (sz)) type = sz & TBinaryProtoco...
16,263
[ 0.04296703264117241, 0.061234455555677414, -0.006011174526065588, 0.005163294728845358, -0.003341815434396267, 0.0229804627597332, 0.017542337998747826, 0.00022786766930948943, 0.014279463328421116, 0.03333044424653053, -0.02629011869430542, -0.02926062047481537, -0.008262441493570805, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "StrippedCharField", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": ...
class ReviewForm(forms.Form): comment = StrippedCharField(max_length=2000, widget=forms.Textarea(), required=False, label=_lazy(u'Comment:'), error_messages={'max_length': COMMENT_LONG}) _widget = forms.RadioSelect(renderer=RadioFieldRendererWithH...
16,264
[ 0.051559124141931534, 0.020380960777401924, 0.010506224818527699, 0.003999423235654831, 0.0010726007167249918, 0.012778342701494694, 0.03729492798447609, 0.05611574277281761, -0.0023293853737413883, 0.057007256895303726, 0.011323443613946438, -0.053490735590457916, -0.03583383932709694, 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 clean(self): c = super(DocumentForm, self).clean() locale = c.get('locale') # Products are required for en-US products = c.get('products') if (locale == settings.WIKI_DEFAULT_LANGUAGE and (not products or len(products) < 1)): raise forms.Validatio...
16,265
[ -0.021261638030409813, -0.007166311144828796, 0.016411326825618744, -0.02069213055074215, 0.0022934568114578724, -0.000950366782490164, -0.027773015201091766, 0.036486491560935974, 0.014285163022577763, 0.01453195046633482, 0.03726482018828392, -0.04001744091510773, -0.040814753621816635, ...
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": "nums", "annotation": {...
class Solution: def maxProduct(self, nums: List[int]) -> int: dpMax = dpMin = maxP = nums[0] for num in nums[1:]: if num < 0: dpMax, dpMin = dpMin, dpMax dpMax = max(num, dpMax * num) dpMin = min(num, dpMin * num) maxP = max(maxP, dpMax...
16,266
[ -0.0104386480525136, -0.013210608623921871, 0.019939569756388664, -0.01814655400812626, 0.006105527281761169, -0.0012971024261787534, -0.015560077503323555, 0.05341949686408043, 0.031738437712192535, 0.021073084324598312, 0.03186209127306938, -0.03239793702960014, -0.05036931112408638, -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": "nums", "annotation": {"_type": "Subscript", "_fields": {"ctx": {"...
def maxProduct(self, nums: List[int]) -> int: dpMax = dpMin = maxP = nums[0] for num in nums[1:]: if num < 0: dpMax, dpMin = dpMin, dpMax dpMax = max(num, dpMax * num) dpMin = min(num, dpMin * num) maxP = max(maxP, dpMax) return ma...
16,267
[ 0.007473393343389034, -0.013474197126924992, 0.020553145557641983, -0.0038155855145305395, 0.017292411997914314, 0.01860722340643406, 0.022993437945842743, -0.0058272480964660645, 0.002216773573309183, 0.08658827841281891, -0.0318920873105526, -0.041253551840782166, 0.009708574041724205, -...
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 __init__(self): self.module_arg_spec = dict( name=dict(type='str'), resource_group=dict(type='str'), tags=dict(type='list'), ) self.results = dict( changed=False, ansible_facts=dict(azure_virtualnetworks=[]) ) sel...
16,268
[ -0.012004409916698933, -0.0007509608403779566, 0.019777128472924232, -0.030805837363004684, 0.008649753406643867, 0.001988401636481285, -0.032998424023389816, -0.010661451146006584, 0.009356861934065819, 0.0653829276561737, -0.02048971876502037, -0.05126266926527023, 0.004313913639634848, ...
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 AzureRMNetworkInterfaceFacts(AzureRMModuleBase): def __init__(self): self.module_arg_spec = dict( name=dict(type='str'), resource_group=dict(type='str'), tags=dict(type='list'), ) self.results = dict( changed=False, ansible...
16,269
[ 0.0027507576160132885, 0.02834601141512394, -0.006874022539705038, -0.03202134743332863, -0.0012217613402754068, -0.03484676033258438, -0.04075026512145996, -0.003540380159392953, 0.04957106336951256, 0.0014636729611083865, -0.00771245826035738, -0.017997650429606438, 0.024900386109948158, ...
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_item(self): self.log('Get properties for {0}'.format(self.name)) item = None results = [] try: item = self.network_client.virtual_networks.get(self.resource_group, self.name) except CloudError: pass if item and self.has_tags(item.tags, se...
16,270
[ 0.02407718449831009, 0.012785667553544044, 0.008564690127968788, -0.06860289722681046, -0.007604164071381092, 0.03244443237781525, -0.03481373190879822, 0.03186811879277229, 0.013383328914642334, 0.036179810762405396, -0.015058912336826324, -0.06659647077322006, -0.001507492153905332, -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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def exec_module(self, **kwargs): for key in self.module_arg_spec: setattr(self, key, kwargs[key]) if self.name is not None: self.results['ansible_facts']['azure_virtualnetworks'] = self.get_item() else: self.results['ansible_facts']['azure_virtualnetworks'] ...
16,271
[ -0.026290785521268845, 0.030902106314897537, 0.01439733523875475, -0.025226635858416557, 0.013948722742497921, -0.04310854151844978, -0.035909876227378845, -0.0016405659262090921, 0.04653051868081093, 0.0045852381736040115, -0.021929854527115822, -0.01313496008515358, 0.035367365926504135, ...
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 list_resource_group(self): self.log('List items for resource group') try: response = self.network_client.virtual_networks.list(self.resource_group) except AzureHttpError as exc: self.fail("Failed to list for resource group {0} - {1}".format(self.resource_group, str(ex...
16,272
[ 0.004160576965659857, 0.000878931547049433, -0.027279764413833618, -0.042756181210279465, 0.015497052110731602, -0.050143592059612274, -0.03883548825979233, 0.023482883349061012, 0.027651198208332062, 0.059800878167152405, 0.002044176682829857, -0.014485926367342472, 0.017498668283224106, ...
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 list_items(self): self.log('List all for items') try: response = self.network_client.virtual_networks.list_all() except AzureHttpError as exc: self.fail("Failed to list all items - {0}".format(str(exc))) results = [] for item in response: ...
16,273
[ -0.008332410827279091, -0.00041400425834581256, 0.03303549066185951, -0.020138071849942207, 0.022310269996523857, 0.0054870592430233955, -0.0011412517633289099, 0.026496272534132004, 0.007014384958893061, 0.04394172877073288, -0.00979185476899147, -0.043059270828962326, 0.029890330508351326,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}, "targets": [{"_type": "Name", "_fields": {"id": "_multiprocess_can_split_", "ctx": {"_type": "Store", "_fields": {}}}}], "type_com...
class TestURI(LinkrTestCase): _multiprocess_can_split_ = True def test_properties(self): uri_modules = [ uri.auth, uri.link, uri.main, uri.misc, uri.user, ] uri_classes = { uri_module: [ uri_class ...
16,274
[ -0.006267876364290714, -0.004705216269940138, 0.031712811440229416, -0.022049596533179283, 0.017844201996922493, 0.014098413288593292, -0.021739361807703972, -0.0009364471770823002, 0.0372510626912117, 0.05768055096268654, -0.0010499124182388186, -0.0604841448366642, 0.03506793454289436, -...
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_properties(self): uri_modules = [ uri.auth, uri.link, uri.main, uri.misc, uri.user, ] uri_classes = { uri_module: [ uri_class for uri_class in dir(uri_module) if len(...
16,275
[ 0.024654505774378777, 0.00986294075846672, 0.05700358375906944, -0.03535405918955803, 0.019486848264932632, -0.011234532110393047, 0.018997400999069214, 0.02690824121236801, -0.03644677996635437, 0.01318094041198492, -0.05131233111023903, 0.012907760217785835, -0.005469293333590031, 0.0039...
13
{"_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 = [ ('cases', '0020_auto_20170419_0926'), ] operations = [ migrations.AlterField( model_name='case', name='created', field=lily.utils.models.fields.CreatedDateTimeField(auto_now_add=True, verbose_name='...
16,276
[ 0.0835171490907669, -0.002373379422351718, 0.00467956205829978, 0.00869791116565466, 0.04455394670367241, -0.054359257221221924, 0.05104781687259674, 0.025265872478485107, 0.024491770192980766, 0.023524140939116478, 0.0199224092066288, 0.00198632781393826, -0.011944844387471676, 0.02926540...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testShouldEnterDataIntoFormFields(driver, pages): pages.load("xhtmlTest.html") element = driver.find_element_by_xpath("//form[@name='someForm']/input[@id='username']") originalValue = element.get_attribute("value") assert originalValue == "change" element.clear() element.send_keys("some tex...
16,277
[ 0.06237058341503143, -0.0055728028528392315, 0.005992863327264786, 0.025248438119888306, 0.025293244048953056, -0.013475541025400162, 0.031050873920321465, -0.0027597974985837936, 0.0147861298173666, 0.026189373806118965, 0.03347042202949524, -0.02221279963850975, 0.01433806587010622, 0.03...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testShouldBeAbleToSelectACheckBox(driver, pages): pages.load("formPage.html") checkbox = driver.find_element_by_id("checky") assert checkbox.is_selected() is False checkbox.click() assert checkbox.is_selected() is True checkbox.click() assert checkbox.is_selected() is False
16,278
[ 0.03368740528821945, -0.0020476048812270164, -0.01739688031375408, 0.02953292615711689, 0.00677360687404871, 0.0007514469907619059, 0.02811046876013279, -0.018390342593193054, 0.01710335724055767, 0.028087889775633812, 0.0503053180873394, 0.0003979493922088295, 0.023097999393939972, 0.0282...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testShouldToggleTheCheckedStateOfACheckbox(driver, pages): pages.load("formPage.html") checkbox = driver.find_element_by_id("checky") assert checkbox.is_selected() is False checkbox.click() assert checkbox.is_selected() is True checkbox.click() assert checkbox.is_selected() is False
16,279
[ 0.045838188380002975, 0.014928145334124565, 0.017869867384433746, -0.01785889081656933, 0.007936066016554832, -0.0074311429634690285, 0.040064506232738495, -0.0320296548306942, -0.002000481355935335, -0.009379485622048378, 0.018704088404774666, -0.040723104029893875, 0.02256784401834011, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testTogglingAnOptionShouldToggleOptionsInAMultiSelect(driver, pages): pages.load("formPage.html") select = driver.find_element_by_name("multi") option = select.find_elements_by_tag_name("option")[0] selected = option.is_selected() option.click() assert not selected == option.is_selected() ...
16,280
[ 0.021195635199546814, -0.001639220048673451, -0.0021421120036393404, 0.02577655017375946, 0.019011985510587692, 0.01792016252875328, 0.03474849835038185, -0.021100694313645363, 0.011072523891925812, 0.039970267564058304, 0.039044588804244995, -0.014098776504397392, 0.027438022196292877, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testTogglingACheckboxShouldReturnItsCurrentState(driver, pages): pages.load("formPage.html") checkbox = driver.find_element_by_id("checky") assert checkbox.is_selected() is False checkbox.click() assert checkbox.is_selected() is True checkbox.click() assert checkbox.is_selected() is Fals...
16,281
[ 0.07176898419857025, 0.01152681652456522, 0.011008691973984241, 0.010764183476567268, 0.035581767559051514, -0.03460373729467392, 0.04072808474302292, 0.008854690939188004, 0.04203213006258011, 0.04824962466955185, 0.04557167738676071, 0.0006771276821382344, -0.027035623788833618, 0.017895...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testShouldBeAbleToClearTextFromInputElements(driver, pages): pages.load("formPage.html") element = driver.find_element_by_id("working") element.send_keys("Some text") value = element.get_attribute("value") assert len(value) > 0 element.clear() value = element.get_attribute("value") ...
16,282
[ 0.06237639859318733, 0.006316667888313532, 0.01620628871023655, 0.011676096357405186, 0.028405526652932167, -0.04369909688830376, 0.05730080232024193, -0.011381132528185844, 0.03564047813415527, 0.015861235558986664, 0.007869399152696133, 0.01195436343550682, -0.01731935702264309, 0.026980...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testSendingKeyboardEventsShouldAppendTextInInputs(driver, pages): pages.load("formPage.html") element = driver.find_element_by_id("working") element.send_keys("Some") value = element.get_attribute("value") assert value == "Some" element.send_keys(" text") value = element.get_attribute("...
16,283
[ 0.09304160624742508, -0.01920349709689617, 0.011842763051390648, -0.028374046087265015, 0.007518636528402567, -0.03529750928282738, 0.03189650923013687, -0.008806157857179642, -0.009431698359549046, -0.006668386980891228, 0.021839270368218422, -0.04049617797136307, -0.01879051700234413, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testRadioShouldNotBeSelectedAfterSelectingSibling(driver, pages): pages.load("formPage.html") cheese = driver.find_element_by_id("cheese") peas = driver.find_element_by_id("peas") cheese.click() assert cheese.is_selected() is True assert peas.is_selected() is False peas.click() ass...
16,284
[ 0.06178958714008331, 0.006833392195403576, 0.0399366095662117, 0.0034340396523475647, 0.012660853564739227, -0.047960929572582245, 0.04708218574523926, 0.00833650678396225, 0.053418394178152084, 0.034109149128198624, 0.037554748356342316, 0.0020913532935082912, -0.029137305915355682, 0.020...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "driver", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pages", "annotation": null, "type_comment": null}}], "kwarg": n...
def testShouldBeAbleToClearTextFromTextAreas(driver, pages): pages.load("formPage.html") element = driver.find_element_by_id("withText") element.send_keys("Some text") value = element.get_attribute("value") assert len(value) > 0 element.clear() value = element.get_attribute("value") ass...
16,285
[ 0.017104730010032654, 0.04757460579276085, 0.005930230021476746, -0.03732946887612343, -0.05341632664203644, -0.009116622619330883, 0.015323448926210403, 0.005354909226298332, 0.022337937727570534, 0.014737064018845558, -0.0009106941288337111, 0.03774989768862724, 0.02132006175816059, -0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "text", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def run_command(text): logger.info('running command:' + text) if "-summary" not in text: logger.info('adding summary') text += ' -summary:"%s This edit was done by a droid"' % get_boop() os.chdir('../core/') os.system(text) os.chdir('../one-shot-bot/')
16,286
[ -0.00010548640420893207, -0.004002455621957779, 0.040613941848278046, -0.03313411772251129, -0.03643466904759407, -0.03396997228264809, 0.03896366432309151, -0.005963498260825872, 0.03268404304981232, 0.05636657774448395, 0.001679745502769947, 0.03253401815891266, -0.0050928168930113316, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "text", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def format_text(text): logger.info('formating text') replacements = [('<p>', ''), ('</p>', '\n\n'), ('<strong>', "'''"), ('</strong>', "'''"), ('<em>', "''"), ('</em>', "''"), ('<h2>', "== "),...
16,287
[ 0.0182017982006073, 0.062497831881046295, 0.004304479341953993, -0.009202496148645878, -0.0422854945063591, -0.0062829358503222466, 0.0064861285500228405, -0.008197225630283356, 0.011924210004508495, -0.002470396924763918, 0.0033473342191427946, 0.023313703015446663, 0.016565561294555664, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "text", "annotation": null, "type_comment": null}}, {"_type": "arg...
def add_text_command(page, text, exception): command = ('python pwb.py add_text ' '-page:"{0}" ' '-text:"{1}" ' '-except:"{2}" ' '-summary:"{3} This edit was done by a droid" -always') text = escape_quotes(text) command = command.format(page, text,...
16,288
[ 0.04744268208742142, 0.01650446653366089, -0.05920533090829849, -0.059548407793045044, -0.040752675384283066, 0.010923334397375584, 0.01470331009477377, -0.0036697012837976217, -0.0056822169572114944, 0.05307894945144653, 0.029014533385634422, -0.009244706481695175, 0.00045335208415053785, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "episode", "annotation": null, "type_comment": null}}, {"_type": "...
def update_episode_list(page, episode, title, link='', specifier=''): raw_link = ('python pwb.py replace ' '-page:"{0}" ' '-excepttext:"* [[{1}" ' '"<!--R2-D20-Marker{5}-->" ' '"* [[{1}|{2}]]{3}\n<!--R2-D20-Marker{5}-->" ' '-summary:"{4...
16,289
[ -0.008590512908995152, 0.02400893159210682, 0.011044108308851719, -0.014042297378182411, -0.019160298630595207, 0.0467764250934124, -0.017157603055238724, 0.005431288853287697, 0.02475847862660885, 0.01722787320613861, 0.0039497618563473225, -0.05209352448582649, -0.004400661680847406, 0.0...
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(): module = AnsibleModule( argument_spec=dict( data=dict(type='str', default='pong'), ), supports_check_mode=True ) if module.params['data'] == 'crash': raise Exception("boom") result = dict( ping=module.params['data'], ) module.exi...
16,290
[ 0.014674884267151356, -0.026009144261479378, 0.014045805670320988, -0.024534063413739204, 0.03895948454737663, -0.0032077583018690348, 0.013058803044259548, 0.0005077368696220219, -0.00047011420247144997, -0.024989603087306023, 0.007548942696303129, -0.009099946357309818, 0.04607458040118217...
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": "connection_file_path", "annotation": null, "type_comment": null}}...
def parse_json(self, connection_file_path): repos_creds = [] if not os.path.exists(connection_file_path): return repos_creds with open(connection_file_path) as connection_file: try: connections_infos = json.load(connection_file) except Exceptio...
16,291
[ -0.0025003748014569283, 0.0035289477091282606, -0.0030280284117907286, -0.006050428841263056, 0.009269819594919682, -0.045026447623968124, -0.004800945054739714, 0.03687665984034538, 0.04714268818497658, 0.016457166522741318, -0.01232599001377821, -0.07037633657455444, 0.0006437374977394938,...
7
{"_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 CustomerGateways(BaseResponse): def create_customer_gateway(self): raise NotImplementedError('CustomerGateways(AmazonVPC).create_customer_gateway is not yet implemented') def delete_customer_gateway(self): raise NotImplementedError('CustomerGateways(AmazonVPC).delete_customer_gateway is n...
16,292
[ 0.06582671403884888, 0.035318341106176376, -0.013925627805292606, -0.01885196380317211, -0.013983813114464283, 0.026066914200782776, 0.01257767342031002, 0.003030472667887807, 0.03941069170832634, 0.05783596634864807, -0.024263177067041397, -0.01802767626941204, 0.0420096255838871, -0.0251...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def normal_path(path): parts = path.split(os.path.sep) index = 0 while index < len(parts): if parts[index] == '..' and index > 0: del parts[index] del parts[index-1] index -= 1 else: index += 1 return os.path.sep.join(parts)
16,293
[ -0.014965956099331379, 0.04220524802803993, -0.017021948471665382, -0.055188264697790146, -0.024838894605636597, 0.03304199129343033, -0.03398127853870392, 0.02218802087008953, -0.023586513474583626, 0.02352389506995678, 0.02010071836411953, 0.013859685510396957, 0.03732096031308174, -0.01...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "archivo", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def _extraer_de_archivo(archivo): if not os.path.isfile(archivo): raise FileNotFoundError(_('El archivo siguiente no existe... :(\n\t{}').format(archivo)) if os.path.splitext(archivo)[1] != '.py': raise ValueError(_('El archivo siguiente no parece ser un archivo Python.').format(archivo)) ...
16,294
[ -0.003726630937308073, 0.019991571083664894, 0.0002986564068123698, -0.01569993607699871, -0.013223528861999512, 0.004402833990752697, 0.01731080189347267, -0.007591507863253355, -0.027625154703855515, 0.054865624755620956, 0.006251122802495956, 0.009989774785935879, 0.01233394630253315, 0...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "targets": [{"_type": "Name", "_fields": {"id": "filename", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {...
class MainWindowController(NSWindowController): filename = None vault = None removeButton = IBOutlet() titleLabel = IBOutlet() usernameLabel = IBOutlet() urlLabel = IBOutlet() notesLabel = IBOutlet() lastModifiedLabel = IBOutlet() infoView = IBOutlet() outlineView = IBO...
16,295
[ -0.004294100683182478, 0.01799219660460949, 0.0070068989880383015, -0.01335445698350668, -0.01399144809693098, 0.019500859081745148, 0.060301799327135086, -0.014449634589254856, 0.004411440808326006, 0.05851375311613083, -0.004481286276131868, -0.0003963731287512928, 0.03576089069247246, -...
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": "filename", "annotation": null, "type_comment": null}}, {"_type": ...
def initWithFilename_andVault_(self, filename, vault): self = super(MainWindowController, self).init() if self is None: return None self.filename = filename self.vault = vault self.vault.modified = False self.entryWindowController = EntryWindowController.alloc()....
16,296
[ 0.019401350989937782, 0.01326081808656454, 0.03513433039188385, 0.024835553020238876, -0.01173422858119011, 0.00036491459468379617, 0.05673442780971527, -0.007433576975017786, -0.0018256409093737602, 0.05605088174343109, 0.002838145475834608, -0.00023212128144223243, -0.000708112318534404, ...
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 init(self): self = super(MainWindowController, self).init() if self is None: return None self.vault = Vault('123456') self.vault.modified = False self.entryWindowController = EntryWindowController.alloc().initWithMainWindowController_(self) self = se...
16,297
[ 0.03813726827502251, 0.021638529375195503, -0.0018005338497459888, -0.0012423844309523702, -0.02942531742155552, 0.006440803408622742, 0.054995790123939514, -0.04445921257138252, -0.04754308983683586, 0.04039877653121948, 0.014211528934538364, 0.0248252023011446, -0.02360450103878975, 0.01...
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 updateInfo(self): record = None index = self.outlineView.selectedRow() if index != -1: item = self.outlineView.itemAtRow_(index) if isinstance(item, RecordNode): record = item.record if record: self.titleLabel.setStringValue_(record...
16,298
[ 0.006159582640975714, -0.018561214208602905, 0.03874637559056282, -0.016886519268155098, 0.014057297259569168, 0.003603133838623762, -0.01053662970662117, -0.013854303397238255, 0.04262862727046013, 0.037020932883024216, -0.009585097432136536, 0.0015882651787251234, 0.048464689403772354, 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 DISABLED_testFunctionsNoInline(self): @function.Defun(dtypes.float32, noinline=True) def TimesTwo(x): return x * 2 @function.Defun(dtypes.float32, dtypes.float32) def APlus2B(a, b): return a + TimesTwo(b) aval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32) bval = ...
16,299
[ -0.01833043061196804, -0.00850431527942419, 0.005898946896195412, 0.02394535392522812, -0.02468818426132202, -0.06611189991235733, 0.0017655874835327268, -0.05173594877123833, -0.024032745510339737, 0.02224121429026127, -0.041991762816905975, -0.03023756481707096, -0.011590338312089443, -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": "apps", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, apps, main_win): Gtk.Notebook.__init__(self) self._window = main_win self.connect("switch-page", self._switch_page) want_more_app = { "type": "app", "title": _("Want more apps?"), "tagline": _("Go to Kano World to install more"), ...
16,300
[ -0.020403491333127022, -0.0036280029453337193, 0.005900263320654631, 0.007490259595215321, -0.0024991934187710285, -0.053222425282001495, -0.025088563561439514, -0.05162949860095978, -0.011261743493378162, 0.00749611621722579, -0.013176766224205494, -0.05565866082906723, -0.01394980307668447...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "apps", "annotation": n...
class Apps(Gtk.Notebook): def __init__(self, apps, main_win): Gtk.Notebook.__init__(self) self._window = main_win self.connect("switch-page", self._switch_page) want_more_app = { "type": "app", "title": _("Want more apps?"), "tagline": _("Go to K...