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 |
|---|---|---|---|---|---|
19,901 | [
0.009557613171637058,
-0.01533177588135004,
0.011350353248417377,
-0.046809207648038864,
0.0077978684566915035,
0.0025461306795477867,
-0.01719050668179989,
0.026968088001012802,
0.0412440150976181,
0.012351208366453648,
-0.023228630423545837,
-0.05591588839888573,
0.009414633736014366,
0.... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestParameters(unittest.TestCase):
def test_module_parameters(self):
access = [{'name': 'Common', 'role': 'guest'}]
args = dict(
username_credential='someuser',
password_credential='testpass',
full_name='Fake Person',
partition_access=access,
... | |
19,902 | [
0.0059604523703455925,
0.013857328332960606,
0.04619109258055687,
0.000013620502613775898,
0.015362720936536789,
0.028023455291986465,
0.03353035822510719,
-0.008710687980055809,
0.02920718304812908,
0.01555571984499693,
0.015645785257220268,
-0.012120337225496769,
0.0018254489405080676,
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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestManager(unittest.TestCase):
def setUp(self):
self.spec = ArgumentSpec()
def test_create_user(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
... | |
19,903 | [
0.05274767801165581,
0.015220045112073421,
0.016140062361955643,
0.01324371062219143,
0.02319353073835373,
0.00089375174138695,
0.035096969455480576,
0.04054892435669899,
0.025374313816428185,
0.007076185196638107,
0.029463281854987144,
-0.010778971947729588,
0.032734453678131104,
0.015151... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
server='localhost',
password='password',
... | |
19,904 | [
0.055702343583106995,
0.020766224712133408,
0.016935022547841072,
0.010133251547813416,
-0.0030760664958506823,
0.0034925013314932585,
0.033581316471099854,
0.03948914259672165,
0.018778441473841667,
-0.00028681958792731166,
0.023831186816096306,
0.0019683493301272392,
0.03999996930360794,
... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_no_password(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
partition_access=access,
server='localhost',
password='password',
user='admin'
))
... | |
19,905 | [
0.04614344984292984,
0.01486053317785263,
0.03229352459311485,
0.01582520455121994,
0.01364320982247591,
0.018960386514663696,
0.03362568840384483,
0.03355678543448448,
0.02765391394495964,
-0.004237663932144642,
0.019511627033352852,
-0.011248758062720299,
0.020499268546700478,
0.00933089... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_raises(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
password='password',
server='localhost',
... | |
19,906 | [
0.03966544568538666,
0.02900535799562931,
0.04687734693288803,
0.031777430325746536,
0.012857464142143726,
0.016519756987690926,
0.024227473884820938,
0.03436920791864395,
0.024340160191059113,
-0.013860369101166725,
0.026954473927617073,
-0.019010115414857864,
0.02794610895216465,
0.02787... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_partition_access_raises(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin'
))
module = AnsibleModule(
argument_spec=self.spec.argument_spec,
... | |
19,907 | [
0.03522370383143425,
-0.0018183077918365598,
0.026672285050153732,
0.02465885505080223,
0.021321991458535194,
0.005177794024348259,
0.03572140634059906,
0.02459098771214485,
0.026559170335531235,
0.0039222282357513905,
0.014365480281412601,
-0.01784939132630825,
0.038096800446510315,
0.010... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_shell_bash(self, *args):
access = [{'name': 'all', 'role': 'admin'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
password='password',
server='localhost',
... | |
19,908 | [
0.041556648910045624,
0.01977144367992878,
0.039497122168540955,
0.026361925527453423,
0.006207181140780449,
0.026155972853302956,
0.007540151476860046,
0.004476607311517,
0.03510346636176109,
-0.013741611503064632,
0.0033410079777240753,
-0.028696054592728615,
0.029886003583669662,
0.0238... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_shell_not_permitted_raises(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
update_password='on_create',
... | |
19,909 | [
0.026342222467064857,
0.006796596571803093,
0.008690552785992622,
-0.01399362925440073,
-0.021699324250221252,
0.03489208221435547,
0.05935117229819298,
0.011158106848597527,
0.0014502292033284903,
0.025454768911004066,
0.0022064587101340294,
-0.02033567614853382,
-0.008322584442794323,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_password_no_pass(self, *args):
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
password='password',
server='localhost',
user='admin'
))
module = AnsibleModule(
argu... | |
19,910 | [
0.025686640292406082,
0.0004106875858269632,
0.020769057795405388,
-0.01494476106017828,
-0.015392784029245377,
0.0427328422665596,
0.06020573154091835,
0.017856908962130547,
0.002552130026742816,
0.027585403993725777,
-0.0027974757831543684,
-0.022635819390416145,
-0.015307446010410786,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_password_with_pass(self, *args):
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
password='password',
server='localhost',
user='admin'
))
module = AnsibleModule(
ar... | |
19,911 | [
0.020242903381586075,
0.0021380819380283356,
0.02323741652071476,
0.001546665676869452,
0.025776762515306473,
0.043264713138341904,
0.04568428173661232,
-0.007126939482986927,
0.043168891221284866,
-0.002082683378830552,
-0.019236747175455093,
-0.04836736246943474,
0.01972784660756588,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_none_shell_attribute_missing(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='none'
))
module = AnsibleModule(
a... | |
19,912 | [
0.011824830435216427,
-0.006784444209188223,
0.014443914406001568,
0.00028917795862071216,
0.010152692906558514,
0.016853230074048042,
0.04094639793038368,
0.010308519937098026,
0.05302894115447998,
0.020605051890015602,
-0.03586405888199806,
-0.04710753634572029,
0.0042672473937273026,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_none(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='none'
))
module = AnsibleModule(
argument_spec=self.spec.a... | |
19,913 | [
0.01088573969900608,
-0.01625828817486763,
-0.0003408826014492661,
0.011746472679078579,
0.0005115875974297523,
0.023245414718985558,
0.050496332347393036,
0.002634236589074135,
0.009147397242486477,
0.025765731930732727,
-0.030378809198737144,
-0.01838480494916439,
0.0014338516630232334,
... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_bash(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='bash'
))
module = AnsibleModule(
argument_spec=self.spec.a... | |
19,914 | [
0.0036639345344156027,
0.01130122784525156,
0.0343085378408432,
0.014713574200868607,
0.0026416764594614506,
0.03671453148126602,
0.046616118401288986,
-0.004462076351046562,
0.0005874006892554462,
0.03354509919881821,
-0.01209937036037445,
-0.027391308918595314,
0.0026922833640128374,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_bash_mutliple_roles(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='bash'
))
module = AnsibleModule(
argument_s... | |
19,915 | [
0.005681884940713644,
0.01663307659327984,
0.05520102381706238,
-0.0024819669779390097,
0.01934894733130932,
0.027886392548680305,
0.024442827329039574,
-0.007686300668865442,
0.025378437712788582,
0.016009336337447166,
0.008056646212935448,
-0.011396256275475025,
0.007491381838917732,
0.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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestLegacyManager(unittest.TestCase):
def setUp(self):
self.spec = ArgumentSpec()
def test_create_user(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
... | |
19,916 | [
0.05485718697309494,
0.020068587735295296,
0.010908580385148525,
0.019417159259319305,
0.019005728885531425,
-0.0029628595802932978,
0.034057170152664185,
0.03963431715965271,
0.031222881749272346,
0.010034293867647648,
0.024205733090639114,
-0.003385717049241066,
0.03051431104540825,
0.01... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
server='localhost',
password='password',
... | |
19,917 | [
0.057442255318164825,
0.02368936315178871,
0.014349431730806828,
0.015718694776296616,
-0.0029723027255386114,
0.0011236583814024925,
0.031593240797519684,
0.040320899337530136,
0.023110488429665565,
0.0034927339293062687,
0.017577774822711945,
0.009117287583649158,
0.03822804242372513,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_no_password(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
partition_access=access,
server='localhost',
password='password',
user='admin'
))
... | |
19,918 | [
0.04592349752783775,
0.016480330377817154,
0.028278356418013573,
0.021254898980259895,
0.009779790416359901,
0.014623555354773998,
0.032107237726449966,
0.03471364453434944,
0.03116155043244362,
-0.0012477018171921372,
0.015453914180397987,
-0.003540561068803072,
0.019963229075074196,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_raises(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
password='password',
server='localhost',
... | |
19,919 | [
0.03866202384233475,
0.034058865159749985,
0.044580377638339996,
0.03451237827539444,
0.010141695849597454,
0.013616742566227913,
0.021451188251376152,
0.03297043219208717,
0.029773160815238953,
-0.007318574003875256,
0.02308383770287037,
-0.011711985804140568,
0.026349134743213654,
0.0234... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_partition_access_raises(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin'
))
module = AnsibleModule(
argument_spec=self.spec.argument_spec,
... | |
19,920 | [
0.03490913286805153,
0.002974180970340967,
0.023001087829470634,
0.029407886788249016,
0.019446786493062973,
0.0025086693931370974,
0.035271354019641876,
0.023702893406152725,
0.02981538698077202,
0.006672805640846491,
0.00873294286429882,
-0.009893184527754784,
0.034252602607011795,
0.009... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_shell_bash(self, *args):
access = [{'name': 'all', 'role': 'admin'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
password='password',
server='localhost',
... | |
19,921 | [
0.021124625578522682,
-0.0077263894490897655,
0.013485664501786232,
-0.0015723257092759013,
-0.026446763426065445,
0.046380192041397095,
0.05827030912041664,
0.02808602713048458,
-0.001302530406974256,
0.024873072281479836,
-0.004977893084287643,
-0.012534892186522484,
-0.009851966053247452,... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_password(self, *args):
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
password='password',
server='localhost',
user='admin'
))
module = AnsibleModule(
argument_spe... | |
19,922 | [
0.03976252302527428,
0.0214176457375288,
0.033823370933532715,
0.03104870580136776,
0.004528891760855913,
0.02240368165075779,
0.008461575023829937,
0.0022859438322484493,
0.03719424083828926,
-0.008771144784986973,
-0.001268376363441348,
-0.020695315673947334,
0.030475428327918053,
0.0218... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_create_user_shell_not_permitted_raises(self, *args):
access = [{'name': 'Common', 'role': 'guest'}]
set_module_args(dict(
username_credential='someuser',
password_credential='testpass',
partition_access=access,
update_password='on_create',
... | |
19,923 | [
0.012407909147441387,
-0.004173895809799433,
0.010533547960221767,
0.0020540119148790836,
0.00833581481128931,
0.014779304154217243,
0.041295818984508514,
0.007796861696988344,
0.05696140229701996,
0.02256418950855732,
-0.039906516671180725,
-0.04340372607111931,
0.003988256212323904,
0.05... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_none(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='none'
))
module = AnsibleModule(
argument_spec=self.spec.a... | |
19,924 | [
0.01814080774784088,
0.00386676169000566,
0.020502828061580658,
0.0048499382100999355,
0.021282175555825233,
0.042324554175138474,
0.04395518824458122,
-0.008680730126798153,
0.04493836313486099,
0.002874592551961541,
-0.023500317707657814,
-0.043235789984464645,
0.01786503754556179,
0.047... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_none_shell_attribute_missing(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='none'
))
module = AnsibleModule(
a... | |
19,925 | [
0.0036639345344156027,
0.01130122784525156,
0.0343085378408432,
0.014713574200868607,
0.0026416764594614506,
0.03671453148126602,
0.046616118401288986,
-0.004462076351046562,
0.0005874006892554462,
0.03354509919881821,
-0.01209937036037445,
-0.027391308918595314,
0.0026922833640128374,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_bash_mutliple_roles(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='bash'
))
module = AnsibleModule(
argument_s... | |
19,926 | [
0.01088573969900608,
-0.01625828817486763,
-0.0003408826014492661,
0.011746472679078579,
0.0005115875974297523,
0.023245414718985558,
0.050496332347393036,
0.002634236589074135,
0.009147397242486477,
0.025765731930732727,
-0.030378809198737144,
-0.01838480494916439,
0.0014338516630232334,
... | 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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def test_update_user_shell_to_bash(self, *args):
set_module_args(dict(
username_credential='someuser',
password='password',
server='localhost',
user='admin',
shell='bash'
))
module = AnsibleModule(
argument_spec=self.spec.a... | |
19,927 | [
0.012313850224018097,
0.01367657445371151,
0.09599500149488449,
-0.06728529185056686,
-0.0022691520862281322,
0.003391395788639784,
0.01267765462398529,
-0.03788497671484947,
-0.018535520881414413,
0.022161230444908142,
-0.01484814751893282,
0.0009788802126422524,
0.03512252867221832,
0.01... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def test_layout_with_validation():
data_dir = join(get_test_data_path(), '7t_trt')
layout1 = BIDSLayout(data_dir, validate=True)
layout2 = BIDSLayout(data_dir, validate=False)
assert len(layout1.files) < len(layout2.files)
# Not a valid BIDS file
badfile = join(data_dir, 'test.bval')
assert(... | |
19,928 | [
-0.012503446079790592,
-0.00791502557694912,
0.05047262832522392,
-0.0000295240188279422,
-0.03907804936170578,
0.007755705621093512,
0.005815186072140932,
-0.00166808208450675,
-0.004836960230022669,
0.01539670117199421,
-0.00492617953568697,
-0.0008985657477751374,
0.05187464505434036,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "testvalidator", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonly... | def test_index_associated_false(testvalidator):
testvalidator = BIDSValidator(index_associated=False)
target_list = [
"/code/",
"/derivatives/",
"/sourcedata/",
"/stimuli/",
"/.git/"
]
for item in target_list:
result = testvalidator.is_associated_data(ite... | |
19,929 | [
0.09015364944934845,
-0.00896462146192789,
-0.03198932111263275,
0.009879055432975292,
0.010502773337066174,
-0.04182080551981926,
0.027464725077152252,
-0.051208287477493286,
0.014049507677555084,
0.012675214558839798,
0.010640203021466732,
0.011100062169134617,
-0.002094476018100977,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def append(self, parent, content):
if content.tag.startswith('_'):
attr = content.tag[1:]
value = tostr(content.value)
if value:
parent.set(attr, value)
else:
child = self.node(content)
child.setText(tostr(content.value))
... | |
19,930 | [
0.02391059696674347,
-0.021001020446419716,
0.06167846918106079,
-0.0019684918224811554,
-0.0035633808001875877,
-0.04485500976443291,
0.027737198397517204,
0.02140858769416809,
-0.026605067774653435,
-0.006866371724754572,
-0.0006056898273527622,
-0.011615659110248089,
0.03122415952384472,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "proot", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "source", "annotation": null, "type_comment": null}}, {"_type": "... | def gen_ipk_dir(proot, source, env, kw):
# make sure the packageroot is a Dir object.
if SCons.Util.is_String(proot): proot=env.Dir(proot)
# create the specfile builder
s_bld=SCons.Builder.Builder(
action = build_specfiles,
)
# create the specfile targets
spec_target=[]
c... | |
19,931 | [
0.08492809534072876,
0.013018006458878517,
-0.01840953528881073,
-0.0014126840978860855,
0.007505514658987522,
-0.04223363846540451,
0.0252065472304821,
-0.04446858912706375,
0.018421055749058723,
0.011036504991352558,
0.003934202715754509,
0.0018504578620195389,
0.01519535481929779,
-0.01... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def append(self, parent, content):
object = content.value
if self.optional(content) and footprint(object) == 0:
return
child = self.node(content)
parent.append(child)
for item in object:
cont = Content(tag=item[0], value=item[1])
Appender.appen... | |
19,932 | [
0.08469514548778534,
0.005060797557234764,
-0.01840389519929886,
0.0005292762070894241,
0.003837337950244546,
-0.05338333919644356,
0.021524127572774887,
-0.02712959609925747,
0.00854505691677332,
0.0007937432383187115,
0.01001758687198162,
0.0257063340395689,
-0.0253559909760952,
-0.01460... | 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": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def append(self, parent, content):
p = content.value
child = self.node(content)
child.setText(p.get())
parent.append(child)
for item in p.items():
cont = Content(tag=item[0], value=item[1])
Appender.append(self, child, cont) | |
19,933 | [
0.08692432194948196,
0.00925794243812561,
-0.013453659601509571,
0.001011874875985086,
0.0020850321743637323,
-0.03244840353727341,
0.01434296928346157,
-0.03983651474118233,
0.020784763619303703,
0.010626111179590225,
0.0032494007609784603,
0.003118284745141864,
-0.0069719599559903145,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def append(self, parent, content):
d = content.value
if self.optional(content) and len(d) == 0:
return
child = self.node(content)
parent.append(child)
for item in d.items():
cont = Content(tag=item[0], value=item[1])
Appender.append(self, child... | |
19,934 | [
0.07833839952945709,
0.01119544729590416,
-0.0010493873851373792,
0.0070514073595404625,
-0.013781755231320858,
-0.03170160576701164,
0.01981053128838539,
-0.03724284470081329,
0.014209833927452564,
-0.019679728895425797,
0.02211739867925644,
-0.018086325377225876,
-0.01001823041588068,
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": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def append(self, parent, content):
collection = content.value
if len(collection):
self.suspend(content)
for item in collection:
cont = Content(tag=content.tag, value=item)
Appender.append(self, parent, cont)
self.resume(content) | |
19,935 | [
0.0930238664150238,
-0.007108950521796942,
-0.03142007067799568,
0.012597870081663132,
0.009139318019151688,
-0.041118938475847244,
0.030503472313284874,
-0.05051937699317932,
0.014974625781178474,
0.014271191321313381,
0.014431063085794449,
0.01576332561671734,
-0.0028483762871474028,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def append(self, parent, content):
if content.tag.startswith('_'):
attr = content.tag[1:]
value = tostr(content.value)
if value:
parent.set(attr, value)
else:
child = self.node(content)
child.setText(content.value)
p... | |
19,936 | [
0.019612176343798637,
-0.015600326471030712,
-0.010547280311584473,
-0.004694215953350067,
-0.013235571794211864,
0.03150654211640358,
0.013741464354097843,
-0.00032133026979863644,
0.02385932393372059,
0.019871003925800323,
-0.01775331236422062,
-0.031718309968709946,
-0.06202482804656029,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "num", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "n", "annotation": null, "type_comment": null}}], "kwarg": null, "v... | def base10toN(num,n):
num_rep={10:'a',
11:'b',
12:'c',
13:'d',
14:'e',
15:'f',
16:'g',
17:'h',
18:'i',
19:'j',
20:'k',
21:'l',
22:'m',
23:'n',
24:'o',
25:'p',
26:'q',
... | |
19,937 | [
0.004972176626324654,
0.010105323046445847,
-0.028545303270220757,
-0.015369630418717861,
0.00008747140964260325,
0.0012475155526772141,
0.005016890820115805,
-0.05861683934926987,
0.037344980984926224,
-0.001758743543177843,
0.05503973364830017,
-0.03980126231908798,
-0.0059141479432582855,... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "html", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def decodeOpenLoad(html):
aastring = re.search(r"<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)</script", html, re.DOTALL | re.IGNORECASE).group(1)
aastring = aastring.replace("(゚Д゚)[゚ε゚]+(o゚ー゚o)+ ((c^_^o)-(c^_^o))+ (-~0)+ (゚Д゚) ['c']+ (-~-~1)+","")
aastring = aastring.replace("((゚ー゚)... | |
19,938 | [
-0.016951624304056168,
0.035896092653274536,
-0.06496669352054596,
-0.03278227522969246,
0.025259291753172874,
-0.0032010048162192106,
-0.027999451383948326,
-0.02593187615275383,
-0.005573734175413847,
0.0023602740839123726,
0.029867742210626602,
-0.03756510093808174,
-0.023764658719301224,... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}... | def resolve(url):
try:
control.log('[openload] - 1 %s' % url)
if check(url) == False: return
control.log('[openload] - 2 %s' % url)
id = re.compile('//.+?/(?:embed|f)/([0-9a-zA-Z-_]+)').findall(url)[0]
myurl = 'https://openload.co/embed/%s' % id
result = client.reques... | |
19,939 | [
-0.011141829192638397,
-0.044733770191669464,
0.012702309526503086,
0.0024759620428085327,
0.017581410706043243,
-0.0020520316902548075,
-0.005763373803347349,
-0.0276517104357481,
-0.023074302822351456,
0.04956085607409477,
0.004514989908784628,
-0.04161280766129494,
-0.005721761379390955,
... | 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": "n_components", "annotation": null, "type_comment": null}}, {"_typ... | def __init__(self, n_components=None, init=None, sparseness=None, beta=1,
eta=0.1, tol=1e-4, max_iter=200, nls_max_iter=2000,
random_state=None):
self.n_components = n_components
self.init = init
self.tol = tol
if sparseness not in (None, 'data', 'compon... | |
19,940 | [
-0.011769679374992847,
0.019968446344137192,
-0.07619538903236389,
0.004266583360731602,
0.01535850577056408,
0.00609682546928525,
-0.022882502526044846,
0.0021691203583031893,
-0.016337819397449493,
0.05173642933368683,
0.030884211882948875,
-0.048153575509786606,
0.01462999265640974,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}... | def check(url):
try:
ifstream = re.search('//.+?/(?:embed|f)/([0-9a-zA-Z-_]+)',(url)[0])
if ifstream: return True
id = re.compile('//.+?/(?:embed|f)/([0-9a-zA-Z-_]+)').findall(url)[0]
url = 'https://openload.co/embed/%s/' % id
result = client.request(url)
if result =... | |
19,941 | [
0.00826385710388422,
-0.017428435385227203,
0.03474834933876991,
-0.0014473957708105445,
0.020770875737071037,
-0.008616548962891102,
-0.006093441508710384,
-0.05165588855743408,
-0.030364111065864563,
0.05057067796587944,
-0.029322313144803047,
-0.0205538347363472,
-0.03587696701288223,
0... | 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": "X", "annotation": null, "type_comment": null}}, {"_type": "arg", ... | def _update_W(self, X, H, W, tolW):
n_samples, n_features = X.shape
if self.sparseness is None:
W, gradW, iterW = _nls_subproblem(X.T, H.T, W.T, tolW,
self.nls_max_iter)
elif self.sparseness == 'data':
W, gradW, iterW = _nls_... | |
19,942 | [
-0.0038428488187491894,
0.005444035865366459,
0.018534783273935318,
0.038495320826768875,
0.03700273483991623,
-0.04660428687930107,
0.01609540916979313,
0.0029489686712622643,
0.0019395247800275683,
0.07369358837604523,
-0.0086603332310915,
0.008560084737837315,
-0.02477245032787323,
0.02... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "X", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def _init(self, X):
n_samples, n_features = X.shape
init = self.init
if init is None:
if self.n_components_ < n_features:
init = 'nndsvd'
else:
init = 'random'
rng = check_random_state(self.random_state)
if init == 'nndsvd... | |
19,943 | [
0.01262736041098833,
0.004568161442875862,
-0.030505701899528503,
-0.011829134076833725,
0.011348274536430836,
-0.00843907706439495,
0.0009382763528265059,
0.005539496894925833,
0.016820451244711876,
0.051971253007650375,
-0.02233109623193741,
-0.008405417203903198,
0.036295246332883835,
-... | 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": "python_callable", "annotation": null, "type_comment": null}}, {"_... | def __init__(
self,
python_callable,
op_args=None,
op_kwargs=None,
provide_context=False,
templates_dict=None,
templates_exts=None,
*args, **kwargs):
super(PythonOperator, self).__init__(*args, **kwargs)
if n... | |
19,944 | [
0.006531957536935806,
-0.01955181173980236,
0.03394855558872223,
-0.0010016862070187926,
0.02522459253668785,
-0.0033210543915629387,
-0.006019755266606808,
-0.04639562591910362,
-0.02507038041949272,
0.03947813808917999,
-0.025048350915312767,
-0.032164108008146286,
-0.03604142740368843,
... | 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": "X", "annotation": null, "type_comment": null}}, {"_type": "arg", ... | def _update_H(self, X, H, W, tolH):
n_samples, n_features = X.shape
if self.sparseness is None:
H, gradH, iterH = _nls_subproblem(X, W, H, tolH,
self.nls_max_iter)
elif self.sparseness == 'data':
H, gradH, iterH = _nls_subpro... | |
19,945 | [
-0.011601708829402924,
0.010130518116056919,
0.023718055337667465,
-0.05119519680738449,
-0.03830689564347267,
0.04058919847011566,
0.03260113671422005,
0.04011931270360947,
0.008044000715017319,
0.047078102827072144,
0.010460557416081429,
0.007725149393081665,
-0.006002234295010567,
-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": "context", "annotation": null, "type_comment": null}}], "kwarg": n... | def execute(self, context):
branch = super(BranchPythonOperator, self).execute(context)
if isinstance(branch, str):
branch = [branch]
self.log.info("Following branch %s", branch)
self.log.info("Marking other directly downstream tasks as skipped")
downstream_tasks = c... | |
19,946 | [
-0.002222196664661169,
-0.027623284608125687,
-0.023604193702340126,
-0.04959006980061531,
-0.00938319880515337,
-0.02275359071791172,
-0.04780380800366402,
0.021743502467870712,
0.021041756495833397,
0.032599303871393204,
0.006767598446458578,
-0.0038277069106698036,
0.040807608515024185,
... | 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": "context", "annotation": null, "type_comment": null}}], "kwarg": n... | def execute(self, context):
# Export context to make it available for callables to use.
airflow_context_vars = context_to_airflow_vars(context, in_env_var_format=True)
self.log.info("Exporting the following env vars:\n" +
'\n'.join(["{}={}".format(k, v)
... | |
19,947 | [
-0.0036183546762913465,
-0.033358458429574966,
-0.03663768246769905,
-0.020501060411334038,
-0.009755107574164867,
0.06978381425142288,
0.004299560561776161,
0.02162165939807892,
0.022553525865077972,
0.012397361919283867,
-0.004491242114454508,
-0.05411902442574501,
0.003261532401666045,
... | 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": "context", "annotation": null, "type_comment": null}}], "kwarg": n... | def execute(self, context):
condition = super(ShortCircuitOperator, self).execute(context)
self.log.info("Condition result is %s", condition)
if condition:
self.log.info('Proceeding with downstream tasks...')
return
self.log.info('Skipping downstream tasks...')
... | |
19,948 | [
-0.008749549277126789,
0.010561173781752586,
0.001144085661508143,
-0.022615443915128708,
-0.018225738778710365,
0.007589910179376602,
-0.00337937637232244,
-0.008898858912289143,
0.008659963496029377,
0.09388594329357147,
-0.012970036827027798,
-0.008948628790676594,
0.0005773308803327382,
... | 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": "python_callable", "annotation": null, "type_comment": null}}, {"_... | def __init__(self, python_callable,
requirements=None,
python_version=None, use_dill=False,
system_site_packages=True,
op_args=None, op_kwargs=None, string_args=None,
templates_dict=None, templates_exts=None, *args, **kwargs):
... | |
19,949 | [
0.01887522079050541,
0.05365544930100441,
0.0072051603347063065,
0.035661712288856506,
0.008503430522978306,
0.01517682708799839,
0.05028282105922699,
0.03782709315419197,
0.02878231555223465,
0.06270022690296173,
0.05396205186843872,
0.03545092046260834,
-0.0044217840768396854,
0.06151213... | 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": "cmd", "annotation": null, "type_comment": null}}], "kwarg": null,... | def _execute_in_subprocess(self, cmd):
try:
self.log.info("Executing cmd\n{}".format(cmd))
output = subprocess.check_output(cmd,
stderr=subprocess.STDOUT,
close_fds=True)
if output:
... | |
19,950 | [
0.008612891659140587,
0.01602008193731308,
0.04097282886505127,
-0.04814412444829941,
-0.012633638456463814,
0.006715224590152502,
0.04608919098973274,
0.026693148538470268,
-0.019427495077252388,
0.0243656225502491,
0.00847659446299076,
-0.011490845121443272,
0.04449557140469551,
-0.02644... | 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 execute_callable(self):
with TemporaryDirectory(prefix='venv') as tmp_dir:
if self.templates_dict:
self.op_kwargs['templates_dict'] = self.templates_dict
# generate filenames
input_filename = os.path.join(tmp_dir, 'script.in')
output_filename =... | |
19,951 | [
0.06968609243631363,
0.012351008132100105,
-0.014828862622380257,
-0.07500534504652023,
0.038765519857406616,
0.004245359916239977,
0.005391009151935577,
-0.02386011928319931,
0.0023762057535350323,
0.027476448565721512,
0.027820860967040062,
-0.009978389367461205,
0.056981101632118225,
-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": "input_filename", "annotation": null, "type_comment": null}}], "kw... | def _write_args(self, input_filename):
# serialize args to file
if self._pass_op_args():
with open(input_filename, 'wb') as f:
arg_dict = ({'args': self.op_args, 'kwargs': self.op_kwargs})
if self.use_dill:
dill.dump(arg_dict, f)
... | |
19,952 | [
0.0879242867231369,
0.01047104224562645,
-0.0301089808344841,
-0.024394551292061806,
0.05060733109712601,
0.018366262316703796,
-0.01732727512717247,
-0.018074046820402145,
-0.02123429998755455,
-0.012175630778074265,
0.0010146358981728554,
-0.002984382212162018,
0.0006280596135184169,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "output_filename", "annotation": null, "type_comment": null}}], "k... | def _read_result(self, output_filename):
if os.stat(output_filename).st_size == 0:
return None
with open(output_filename, 'rb') as f:
try:
if self.use_dill:
return dill.load(f)
else:
return pickle.load(f)
... | |
19,953 | [
0.02951112389564514,
0.0428348146378994,
-0.020058343186974525,
-0.033539779484272,
0.01373626384884119,
-0.02169650048017502,
0.010065575130283833,
0.024147672578692436,
-0.011376101523637772,
-0.004128766246140003,
0.02521550841629505,
-0.06154622510075569,
0.022448839619755745,
-0.00632... | 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": "ifile", "annotation": null, "type_comment": null}}], "kwarg": nul... | def read_ermapper_header(self, ifile):
# function for reading an ERMapper header from file
header = {}
fid = open(ifile,'rt')
header_string = fid.readlines()
fid.close()
for line in header_string:
if line.find('=') > 0:
tmp_string = line.stri... | |
19,954 | [
0.018616817891597748,
-0.0035786645021289587,
-0.022364575415849686,
-0.02658911794424057,
0.01105477474629879,
-0.016388121992349625,
-0.021532971411943436,
-0.005815676413476467,
-0.00033229467226192355,
0.03936253860592842,
0.045416608452796936,
-0.04710198938846588,
0.036013949662446976,... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _generate_python_code(self):
if self.use_dill:
pickling_library = 'dill'
else:
pickling_library = 'pickle'
fn = self.python_callable
# dont try to read pickle if we didnt pass anything
if self._pass_op_args():
load_args_line = 'with open(sy... | |
19,955 | [
0.008904799818992615,
0.030714059248566628,
0.006741984281688929,
0.0072490558959543705,
0.03510178253054619,
-0.04590551182627678,
0.00453001307323575,
-0.0025664037093520164,
-0.015553648583590984,
0.006529842037707567,
0.03965507820248604,
-0.011269410140812397,
-0.009406697936356068,
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": "ifile", "annotation": null, "type_comment": null}}, {"_type": "ar... | def read_ermapper_data(self, ifile, data_format = numpy.float32, offset=0):
# open input file in a binary format and read the input string
fid = open(ifile,'rb')
if offset != 0:
fid.seek(offset)
input_string = fid.read()
fid.close()
# convert input string to ... | |
19,956 | [
0.04078154265880585,
-0.03423384204506874,
0.023098213598132133,
-0.0037383080925792456,
0.006355124060064554,
-0.0041291313245892525,
0.0028915246948599815,
0.018170442432165146,
0.02503533661365509,
0.02829786017537117,
0.01819309964776039,
0.02671191096305847,
0.010597537271678448,
-0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "worker_id", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs... | def test_port(worker_id):
m = re.search(r"[0-9]+", worker_id)
if m:
num_id = m.group(0)
else:
num_id = 0
port = PORT_BASE + int(num_id)
return port | |
19,957 | [
0.012773903086781502,
-0.027404140681028366,
0.003178973216563463,
0.030815156176686287,
-0.00004115117189940065,
-0.045758649706840515,
-0.01579044759273529,
-0.0043043759651482105,
0.022496456280350685,
0.014757861383259296,
0.0039041039999574423,
-0.0502602644264698,
-0.008272292092442513... | 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 app():
app = Sanic("Example")
@app.route("/")
async def index(request):
return text("OK")
return app | |
19,958 | [
-0.019492492079734802,
-0.08053003996610641,
0.061711255460977554,
-0.021210435777902603,
0.017235584557056427,
-0.013103536330163479,
0.019503720104694366,
-0.0061363172717392445,
0.04084889963269234,
-0.0027074464596807957,
0.03024929389357567,
-0.04379073902964592,
0.012867739424109459,
... | 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 AccountListViewTestCase(DataProvider, TestCase):
def setUp(self):
self.view_url = reverse("hordak:accounts_list")
self.login()
self.bank_account = self.account(is_bank_account=True, type=Account.TYPES.asset)
self.income_account = self.account(is_bank_account=False, type=Accoun... | |
19,959 | [
0.004628179129213095,
-0.005511539988219738,
0.013666852377355099,
0.0005907474551349878,
0.010272222571074963,
-0.005795476958155632,
0.002448171144351363,
0.004019291140139103,
0.040937457233667374,
0.02492339164018631,
0.04346134513616562,
-0.048711031675338745,
-0.0012927037896588445,
... | 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_post_no_code(self):
response = self.client.post(
self.view_url,
data=dict(
name="Test Account", code="", type="IN", is_bank_account="", currencies="EUR, GBP"
),
)
if response.context:
self.assertFalse(response.context["form... | |
19,960 | [
-0.017240207642316818,
-0.02301911637187004,
0.03725525736808777,
0.00440958421677351,
0.018193304538726807,
-0.01702304556965828,
0.00581208523362875,
0.039161451160907745,
0.039692290127277374,
0.021909179165959358,
0.04237061366438866,
-0.053276944905519485,
-0.01722814328968525,
-0.000... | 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_post(self):
response = self.client.post(
self.view_url,
data=dict(
name="Test Account", code="01", type="IN", is_bank_account="", currencies="EUR, GBP"
),
)
if response.context:
self.assertFalse(response.context["form"].err... | |
19,961 | [
-0.013362998142838478,
-0.03206620365381241,
0.05050738900899887,
0.01467309519648552,
0.008390864357352257,
-0.014099148102104664,
0.00593599071726203,
0.04851105064153671,
0.040001653134822845,
0.022121937945485115,
0.046190306544303894,
-0.04581599310040474,
-0.00790425669401884,
0.0030... | 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_post(self):
response = self.client.post(
self.view_url,
data=dict(
name="My Account",
code="04",
type="LI",
is_bank_account="yes",
currencies="EUR, GBP",
),
)
if response.... | |
19,962 | [
-0.00028124265372753143,
-0.05679953843355179,
0.06217184662818909,
-0.013660358265042305,
-0.007059765048325062,
0.002683284692466259,
0.041968293488025665,
0.001302899676375091,
0.029846159741282463,
0.01574958860874176,
0.0368485301733017,
-0.034621547907590866,
-0.018137281760573387,
-... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class AccountUpdateViewTestCase(DataProvider, TestCase):
def setUp(self):
self.account1 = self.account(
code="01", currencies=["USD"], type=Account.TYPES.expense, is_bank_account=False
)
self.view_url = reverse("hordak:accounts_update", args=[self.account1.uuid])
self.log... | |
19,963 | [
0.017888570204377174,
-0.010409625247120857,
0.02740376628935337,
0.00735841877758503,
0.017000485211610794,
-0.0038473112508654594,
0.008677859790623188,
0.012128704227507114,
0.03052475117146969,
0.030753115192055702,
0.04151163250207901,
-0.044886354357004166,
-0.004475314170122147,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_post_no_code(self):
response = self.client.post(
self.view_url,
data=dict(
name="My Account", code="", type="LI", is_bank_account="yes", currencies="EUR, GBP"
),
)
if response.context:
self.assertFalse(response.context["for... | |
19,964 | [
0.017295807600021362,
0.01817656122148037,
0.00017752699204720557,
-0.00366889126598835,
0.01648111082613468,
-0.0004861349589191377,
0.023472096771001816,
0.05214064195752144,
0.03925961256027222,
0.0238023791462183,
0.022084908559918404,
-0.0030716299079358578,
-0.024044586345553398,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": n... | def process_request(self, request):
# AuthenticationMiddleware is required so that request.user exists.
if not hasattr(request, 'user'):
raise ImproperlyConfigured(
"The Django remote user auth middleware requires the"
" authentication middleware to be install... | |
19,965 | [
0.04570643976330757,
0.011815113946795464,
0.007684394717216492,
0.009792604483664036,
0.010295375250279903,
-0.019539501518011093,
0.04513510689139366,
0.03981030732393265,
0.04652915522456169,
-0.007524422369897366,
0.024292971938848495,
0.005096267908811569,
0.035719580948352814,
-0.019... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "app_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a... | def test_should_render_new_password_template(
app_,
client,
api_user_active,
mock_login,
mock_send_verify_code,
mock_get_user_by_email_request_password_reset,
):
data = json.dumps({'email': api_user_active.email_address, 'created_at': str(datetime.utcnow())})
token = generate_token(data,... | |
19,966 | [
-0.01294957660138607,
-0.009021657519042492,
0.02518172562122345,
0.022909870371222496,
0.031447265297174454,
-0.020984770730137825,
0.0027934855315834284,
0.028410151600837708,
0.04005640000104904,
-0.01046249270439148,
0.03237992152571678,
-0.03166249021887779,
0.012022898532450199,
-0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "app_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a... | def test_should_return_404_when_email_address_does_not_exist(
app_,
client,
mock_get_user_by_email_not_found,
):
data = json.dumps({'email': 'no_user@d.gov.uk', 'created_at': str(datetime.utcnow())})
token = generate_token(data, app_.config['SECRET_KEY'], app_.config['DANGEROUS_SALT'])
response ... | |
19,967 | [
0.0036240010522305965,
-0.021137986332178116,
0.0047905901446938515,
0.004902703687548637,
-0.007799480576068163,
0.006714704446494579,
0.0469544492661953,
0.019707778468728065,
0.03687027096748352,
-0.013550613075494766,
0.0435122549533844,
0.0011703766649588943,
0.027125466614961624,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "app_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a... | def test_should_redirect_index_if_user_has_already_changed_password(
app_,
client,
mock_get_user_by_email_user_changed_password,
mock_login,
mock_send_verify_code,
mock_reset_failed_login_count
):
user = mock_get_user_by_email_user_changed_password.return_value
data = json.dumps({'email'... | |
19,968 | [
-0.014681755565106869,
-0.02396361157298088,
0.018178004771471024,
0.013997436501085758,
-0.013101601041853428,
-0.0037761973217129707,
0.04135775938630104,
0.033917345106601715,
0.04319920018315315,
0.006675221957266331,
0.020007003098726273,
-0.01948443241417408,
-0.014694198034703732,
0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "app_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a... | def test_should_redirect_to_two_factor_when_password_reset_is_successful(
app_,
client,
mock_get_user_by_email_request_password_reset,
mock_login,
mock_send_verify_code,
mock_reset_failed_login_count
):
user = mock_get_user_by_email_request_password_reset.return_value
data = json.dumps({... | |
19,969 | [
-0.006168878171592951,
-0.010699243284761906,
-0.03465332090854645,
-0.003815044416114688,
-0.011744712479412556,
0.02145962603390217,
0.03223223611712456,
0.023122593760490417,
0.025360263884067535,
0.020774872973561287,
0.02521353028714657,
-0.006135251838713884,
0.009519269689917564,
0.... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "app_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a... | def test_should_redirect_to_forgot_password_with_flash_message_when_token_is_expired(
app_,
client,
mock_login,
mocker
):
mocker.patch('app.main.views.new_password.check_token', side_effect=SignatureExpired('expired'))
token = generate_token('foo@bar.com', app_.config['SECRET_KEY'], app_.config[... | |
19,970 | [
0.022854318842291832,
0.0004972402821294963,
0.02045617438852787,
-0.0026994114741683006,
0.0010379470186308026,
-0.01749446615576744,
0.021103672683238983,
0.03717124089598656,
0.051224369555711746,
0.004217736888676882,
0.015875717625021935,
-0.0051979785785079,
0.015360116958618164,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "app_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "a... | def test_should_sign_in_when_password_reset_is_successful_for_email_auth(
app_,
client,
mock_get_user,
mock_get_user_by_email_request_password_reset,
mock_login,
mock_send_verify_code,
mock_reset_failed_login_count,
mock_update_user_password
):
user = mock_get_user_by_email_request_p... | |
19,971 | [
0.0007987018907442689,
0.0006701262318529189,
0.04416872560977936,
-0.036893557757139206,
-0.003007478779181838,
0.05776539072394371,
-0.018365034833550453,
0.026893604546785355,
0.05119866505265236,
-0.02309253253042698,
0.03811970725655556,
-0.01260893139988184,
-0.01060621626675129,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestL10nEsAeatVatProrrate(TestL10nEsAeatMod303Base,
common.TransactionCase):
def setUp(self):
super(TestL10nEsAeatVatProrrate, self).setUp()
self.model303.vat_prorrate_type = 'general'
self.model303.vat_prorrate_percent = 80
self.model303.button_... | |
19,972 | [
0.003675362328067422,
0.018749086186289787,
0.00290712364949286,
-0.012176753021776676,
-0.014268257655203342,
0.05967218428850174,
-0.0067753917537629604,
-0.012122604064643383,
0.038716524839401245,
0.031974975019693375,
0.06330016255378723,
-0.009834809228777885,
-0.011540502309799194,
... | 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_regularization_move(self):
analytic_journal = self.env['account.analytic.journal'].create({
'name': 'Test analytic journal',
'type': 'purchase',
})
journal = self.env['account.journal'].create({
'name': 'Test journal',
'code': 'TEST',
... | |
19,973 | [
0.0018659058259800076,
-0.0014030510792508721,
-0.02653990127146244,
-0.055258624255657196,
0.0007323100580833852,
-0.00494580902159214,
-0.025635922327637672,
-0.0016413596458733082,
0.023121006786823273,
0.027837922796607018,
0.03659956902265549,
-0.0037434010300785303,
0.00817058142274618... | 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": "pipe_string", "annotation": null, "type_comment": null}}], "kwarg... | def parse(self, pipe_string):
functions = []
for item in PipeTokenizer().tokenize(pipe_string):
if not item:
break
if item[0] == "function":
functions.append((self.pipes[item[1]], []))
elif item[0] == "argument":
functio... | |
19,974 | [
0.0008172402740456164,
-0.013152890838682652,
-0.059919945895671844,
-0.03918350487947464,
0.00886581838130951,
-0.04118670895695686,
-0.021385829895734787,
0.003442315151914954,
-0.014374623075127602,
0.037884727120399475,
0.013626174069941044,
-0.061152685433626175,
0.013417049311101437,
... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "pipes", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "... | class Pipeline(object):
pipes = {}
def __init__(self, pipe_string):
self.pipe_functions = self.parse(pipe_string)
def parse(self, pipe_string):
functions = []
for item in PipeTokenizer().tokenize(pipe_string):
if not item:
break
if item[0] ==... | |
19,975 | [
-0.005288804415613413,
0.04581557586789131,
-0.06815801560878754,
0.00037206782144494355,
-0.009803085587918758,
0.014992955140769482,
-0.02417416125535965,
0.0490267351269722,
0.003389244433492422,
0.06965053081512451,
0.008112703450024128,
-0.019685320556163788,
0.04047871753573418,
0.03... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class PipeTokenizer(object):
def __init__(self):
#This whole class can likely be replaced by some regexps
self.state = None
def tokenize(self, string):
self.string = string
self.state = self.func_name_state
self._index = 0
while self.state:
yield self... | |
19,976 | [
0.042644377797842026,
0.0015167857054620981,
-0.04081641882658005,
0.00863470509648323,
-0.003559711156412959,
-0.007486217189580202,
-0.03412993252277374,
-0.00876097846776247,
0.0588795468211174,
0.06051509082317352,
0.0009620841010473669,
0.00022699171677231789,
0.010600964538753033,
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 func_name_state(self):
rv = ""
while True:
char = self.get_char()
if char is None:
self.state = None
if rv:
return ("function", rv)
else:
return None
elif char == "(":
... | |
19,977 | [
0.0034895201679319143,
-0.00107899634167552,
-0.007986381649971008,
-0.027782591059803963,
-0.009644878096878529,
0.011086322367191315,
-0.0632232055068016,
-0.005793605465441942,
0.035240259021520615,
0.049420956522226334,
0.04147353395819664,
-0.03766678273677826,
0.014325398951768875,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg... | class pipe(object):
def __init__(self, *arg_converters):
self.arg_converters = arg_converters
self.max_args = len(self.arg_converters)
self.min_args = 0
opt_seen = False
for item in self.arg_converters:
if not opt_seen:
if isinstance(item, opt):
... | |
19,978 | [
0.06404238939285278,
-0.0012424581218510866,
-0.05132914334535599,
0.02343856170773506,
0.004169302526861429,
0.0061185481026768684,
-0.02306954562664032,
0.01945079304277897,
0.07447011023759842,
0.09337332844734192,
0.005460863467305899,
-0.016736729070544243,
0.03602086752653122,
0.0319... | 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 argument_state(self):
rv = ""
while True:
char = self.get_char()
if char is None:
self.state = None
return ("argument", rv)
elif char == "\\":
rv += self.get_escape()
if rv is None:
... | |
19,979 | [
-0.00031975595629774034,
-0.012492790818214417,
0.01136843953281641,
-0.028554949909448624,
0.0027736970223486423,
-0.0333854965865612,
-0.05106576904654503,
0.012159649282693863,
0.028198013082146645,
0.043094176799058914,
0.03476564958691597,
-0.03676449880003929,
-0.009161379188299179,
... | 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": "f", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def __call__(self, f):
def inner(request, response, *args):
if not (self.min_args <= len(args) <= self.max_args):
raise ValueError("Expected between %d and %d args, got %d" %
(self.min_args, self.max_args, len(args)))
arg_values = tuple(f(... | |
19,980 | [
0.03456514701247215,
-0.004118113312870264,
-0.006216325797140598,
-0.030179694294929504,
-0.0364014208316803,
-0.017196159809827805,
-0.019151251763105392,
-0.009073351509869099,
0.014225718565285206,
0.06826616823673248,
0.023677125573158264,
-0.03646622970700264,
0.0019415891729295254,
... | 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": {"_type": "arg", "_fields": {"arg": "arg_converters", "annotation": null, "t... | def __init__(self, *arg_converters):
self.arg_converters = arg_converters
self.max_args = len(self.arg_converters)
self.min_args = 0
opt_seen = False
for item in self.arg_converters:
if not opt_seen:
if isinstance(item, opt):
opt_se... | |
19,981 | [
0.06002835929393768,
-0.010232629254460335,
-0.013720111921429634,
-0.03860935941338539,
-0.025900445878505707,
-0.008365361019968987,
0.03594347462058067,
0.0037230453453958035,
-0.009267395362257957,
-0.002829629462212324,
-0.023108161985874176,
-0.0372074730694294,
-0.005432313773781061,
... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "delays", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "repeat", "annotation": null, "type_comment": null}}], "kwarg": ... | def add_content(delays, repeat=False):
for i, (item_type, value) in enumerate(delays):
if item_type == "bytes":
yield content[offset[0]:offset[0] + value]
offset[0] += value
elif item_type == "delay":
time.sleep(value)
elif item... | |
19,982 | [
0.028212344273924828,
-0.00974772684276104,
0.015999052673578262,
-0.06037924066185951,
-0.012339887209236622,
0.022750724107027054,
0.016408974304795265,
-0.007481093984097242,
0.01784370467066765,
0.006643163505941629,
-0.05468854680657387,
-0.027730083093047142,
-0.010254102759063244,
-... | 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 parse_delays():
parts = delays.split(":")
rv = []
for item in parts:
if item.startswith("d"):
item_type = "delay"
item = item[1:]
value = float(item)
elif item.startswith("r"):
item_type = "repeat"
... | |
19,983 | [
-0.012471836060285568,
-0.018701953813433647,
0.03617412596940994,
-0.029352322220802307,
0.04369203373789787,
-0.027751285582780838,
-0.028424184769392014,
0.0041824160143733025,
0.006270723417401314,
-0.004826310556381941,
-0.02563977614045143,
-0.02420116402208805,
0.015604297630488873,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlya... | class SubFunctions(object):
@staticmethod
def uuid(request):
return str(uuid.uuid4())
# Maintain a list of supported algorithms, restricted to those that are
# available on all platforms [1]. This ensures that test authors do not
# unknowingly introduce platform-specific tests.
#
# ... | |
19,984 | [
0.017427310347557068,
-0.0110519640147686,
-0.03964380547404289,
-0.012546026147902012,
0.011584095656871796,
-0.03550955280661583,
-0.0446581207215786,
0.012617658823728561,
0.011277096346020699,
-0.007951274514198303,
-0.0021860888227820396,
-0.018440406769514084,
0.04539491981267929,
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": "params", "annotation":... | class FirstWrapper(object):
def __init__(self, params):
self.params = params
def __getitem__(self, key):
try:
if isinstance(key, str):
key = key.encode('iso-8859-1')
return self.params.first(key)
except KeyError:
return "" | |
19,985 | [
-0.041455790400505066,
0.011247854679822922,
0.03736190125346184,
0.004106810782104731,
0.026155397295951843,
-0.011816450394690037,
-0.012064564973115921,
0.007128121331334114,
0.013718660920858383,
0.035252928733825684,
-0.001146883238106966,
0.017750520259141922,
0.005344798788428307,
-... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": n... | def fs_path(request, path):
if not path.startswith("/"):
subdir = request.request_path[len(request.url_base):]
if "/" in subdir:
subdir = subdir.rsplit("/", 1)[0]
root_rel_path = subdir + "/" + path
else:
root_rel_path = path[1:]
ro... | |
19,986 | [
-0.0009453008533455431,
0.03623352572321892,
0.022408660501241684,
-0.028165580704808235,
0.037739817053079605,
-0.039906397461891174,
-0.01620810478925705,
0.014175644144415855,
0.007443760521709919,
0.0004510490980464965,
-0.013339961878955364,
-0.020592857152223587,
-0.003507801331579685,... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "algorithm", "annotation": null, "type_comment": null}}, {"_typ... | def file_hash(request, algorithm, path):
assert isinstance(algorithm, str)
if algorithm not in SubFunctions.supported_algorithms:
raise ValueError("Unsupported encryption algorithm: '%s'" % algorithm)
hash_obj = getattr(hashlib, algorithm)()
absolute_path = os.path.join(requ... | |
19,987 | [
-0.04370113089680672,
-0.010885554365813732,
0.013527486473321915,
-0.01389166247099638,
0.07066339999437332,
-0.025015586987137794,
-0.04746207594871521,
0.04163525998592377,
0.032285865396261215,
-0.02181083709001541,
0.02632661908864975,
-0.04068177938461304,
-0.02181083709001541,
-0.03... | 17 | {"_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_fetch_request(self):
self.holodeck.mock(Response(500, ''))
with self.assertRaises(TwilioException):
self.client.taskrouter.v1.workspaces("WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.workers("WKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
... | |
19,988 | [
-0.02086697332561016,
-0.030071867629885674,
0.036794114857912064,
-0.030301034450531006,
0.05046777427196503,
-0.012954329140484333,
-0.03615753725171089,
0.030377423390746117,
0.04267608001828194,
-0.00334202591329813,
0.02285309135913849,
-0.04753952473402023,
-0.022802164778113365,
-0.... | 18 | {"_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 WorkersRealTimeStatisticsTestCase(IntegrationTestCase):
def test_fetch_request(self):
self.holodeck.mock(Response(500, ''))
with self.assertRaises(TwilioException):
self.client.taskrouter.v1.workspaces("WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.... | |
19,989 | [
-0.04798833280801773,
-0.029611529782414436,
0.013100494630634785,
-0.015220380388200283,
0.07238373905420303,
-0.024194786325097084,
-0.02620098926126957,
0.051278505474328995,
0.06013253703713417,
-0.0023422399535775185,
0.04017752408981323,
-0.04595538228750229,
0.003363730851560831,
-0... | 16 | {"_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_fetch_response(self):
self.holodeck.mock(Response(
200,
'''
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://taskrouter.twilio.com/v1/Workspac... | |
19,990 | [
-0.061242785304784775,
0.03537527844309807,
0.019785722717642784,
0.015802020207047462,
-0.017833707854151726,
-0.0020150896161794662,
-0.007847893983125687,
-0.003721442073583603,
-0.005789647810161114,
0.05277077853679657,
-0.0008913534111343324,
-0.07754940539598465,
0.013982796110212803,... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 40}}, "targets": [{"_type": "Name", "_fields": {"id": "_references_per_page", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment":... | class WebsiteCrmPartnerAssign(http.Controller):
_references_per_page = 40
def _get_current_country_code(self):
if not GeoIP:
return False
GI = GeoIP.open('/usr/share/GeoIP/GeoIP.dat', 0)
return GI.country_code_by_addr(request.httprequest.remote_addr)
@http.route([
... | |
19,991 | [
-0.057639800012111664,
0.03332628682255745,
0.02693350799381733,
0.01925693452358246,
-0.015602046623826027,
-0.007119825575500727,
-0.016689343377947807,
0.02986789681017399,
-0.01322440430521965,
0.06046939268708229,
-0.0013615766074508429,
-0.057639800012111664,
0.013532252982258797,
-0... | 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": "country", "annotation": null, "type_comment": null}}, {"_type": "... | def partners(self, country=None, grade=None, page=0, **post):
country_all = post.pop('country_all', False)
partner_obj = request.registry['res.partner']
country_obj = request.registry['res.country']
search = post.get('search', '')
base_partner_domain = [('is_company', '=', True)... | |
19,992 | [
-0.048030510544776917,
0.009034615941345692,
0.00034192841849289834,
0.02976864203810692,
-0.02095876820385456,
0.011082976125180721,
-0.002277917694300413,
0.023989571258425713,
0.005971707869321108,
0.06791051477193832,
-0.006154711823910475,
-0.06297904253005981,
0.01792796514928341,
-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": "partner_id", "annotation": null, "type_comment": null}}, {"_type"... | def partners_detail(self, partner_id, partner_name='', **post):
mo = re.search('-([-0-9]+)$', str(partner_id))
current_grade, current_country = None, None
grade_id = post.get('grade_id')
country_id = post.get('country_id')
if grade_id:
grade_ids = request.registry['re... | |
19,993 | [
-0.0011908835731446743,
-0.010209972970187664,
-0.06976814568042755,
-0.04822868853807449,
0.007769430987536907,
-0.030450796708464622,
-0.013646882958710194,
0.01300875935703516,
0.007192880846560001,
-0.009174421429634094,
0.03909344971179962,
-0.042563945055007935,
-0.007803016342222691,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "https?://(?:www\\.)?lovehomeporn\\.com/video/(?P<id>\\d+)(?:/(?P<display_id>[^/?#&]+))?"}}, "targets": [{"_type": "Name", "_fields": {"id... | class LoveHomePornIE(NuevoBaseIE):
_VALID_URL = r'https?://(?:www\.)?lovehomeporn\.com/video/(?P<id>\d+)(?:/(?P<display_id>[^/?#&]+))?'
_TEST = {
'url': 'http://lovehomeporn.com/video/48483/stunning-busty-brunette-girlfriend-sucking-and-riding-a-big-dick#menu',
'info_dict': {
'id': '... | |
19,994 | [
0.020528089255094528,
0.02564547397196293,
-0.0755077674984932,
-0.027683058753609657,
0.009731227532029152,
-0.0011790769640356302,
0.001908772625029087,
0.010223058983683586,
0.01036943681538105,
0.0035423540975898504,
0.05283670127391815,
-0.05232144892215729,
-0.009982998482882977,
-0.... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}], "kwarg": null,... | def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
display_id = mobj.group('display_id')
info = self._extract_nuevo(
'http://lovehomeporn.com/media/nuevo/config.php?key=%s' % video_id,
video_id)
info.update({
... | |
19,995 | [
-0.005553330294787884,
0.03617169335484505,
0.035596348345279694,
-0.00006708124419674277,
0.006641482934355736,
0.0774964764714241,
-0.004827895201742649,
-0.0009310271125286818,
0.03221932053565979,
0.011413094587624073,
0.030693406239151955,
-0.05653390288352966,
-0.02487741969525814,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "instance", "annotation... | class SystemCore(AgentCheck):
def check(self, instance):
cpu_times = psutil.cpu_times(percpu=True)
self.gauge("system.core.count", len(cpu_times))
for i, cpu in enumerate(cpu_times):
for key, value in cpu._asdict().iteritems():
self.rate(
"sy... | |
19,996 | [
0.015309733338654041,
0.0183936208486557,
0.04380826652050018,
-0.013140042312443256,
0.014261455275118351,
0.010562009178102016,
-0.02579251304268837,
0.024902695789933205,
0.04132165387272835,
0.02300116792321205,
0.04561227932572365,
-0.016809014603495598,
-0.01799137517809868,
-0.03539... | 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": "instance", "annotation": null, "type_comment": null}}], "kwarg": ... | def check(self, instance):
cpu_times = psutil.cpu_times(percpu=True)
self.gauge("system.core.count", len(cpu_times))
for i, cpu in enumerate(cpu_times):
for key, value in cpu._asdict().iteritems():
self.rate(
"system.core.{0}".format(key),
... | |
19,997 | [
-0.010950670577585697,
-0.01031485851854086,
-0.06944532692432404,
-0.029320891946554184,
0.01392479706555605,
-0.013945815153419971,
0.01811799965798855,
-0.02140740491449833,
0.01673077419400215,
0.02284717559814453,
0.05931437760591507,
-0.0724719986319542,
0.0312546007335186,
-0.087353... | 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": "url", "annotation": null, "type_comment": null}}], "kwarg": null,... | def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'<title>(.*?)</title>', webpage, 'title')
video_url = self._html_search_regex(r'"urls":\["(.*?)"\],', webpage, 'url')
... | |
19,998 | [
0.009389571845531464,
0.016805501654744148,
-0.08490205556154251,
-0.02767825871706009,
0.017372775822877884,
-0.019204599782824516,
-0.01753823086619377,
0.033114638179540634,
-0.017408231273293495,
0.027820076793432236,
0.05913834646344185,
-0.019665509462356567,
-0.004768649581819773,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "https?://(?:www\\.)?qianmo\\.com/(?P<user>[A-Za-z]+)/(?P<id>[0-9]+)"}}, "targets": [{"_type": "Name", "_fields": {"id": "_VALID_URL", "ct... | class QianmoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?qianmo\.com/(?P<user>[A-Za-z]+)/(?P<id>[0-9]+)'
_TEST = {
'url': 'http://qianmo.com/kawaei/281',
'info_dict': {
'id': '281',
'ext': 'mp4',
'title': '[中字] Google新logo宣传片 「Google, 进化」 - 阡陌视频社区',
... | |
19,999 | [
0.012013986706733704,
-0.02504557929933071,
0.015232945792376995,
-0.02355032041668892,
-0.00603814423084259,
0.013426174409687519,
0.04477468505501747,
-0.016915110871195793,
-0.04506542906165123,
0.03478552773594856,
-0.014298409223556519,
-0.022636551409959793,
0.04444240406155586,
-0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": {"_type": "Name", "_fields": {"id": "CLIPC... | def __init__(self, config: CLIPConfig):
super().__init__(config)
self.vision_model = CLIPVisionModel(config.vision_config)
self.visual_projection = nn.Linear(config.vision_config.hidden_size, config.projection_dim, bias=False)
self.concept_embeds = nn.Parameter(torch.ones(17, config.pr... | |
20,000 | [
0.05120670795440674,
0.0025481937918812037,
0.010616176761686802,
-0.006189137697219849,
-0.013847729191184044,
0.009395783767104149,
-0.025952039286494255,
0.000920743215829134,
-0.018916096538305283,
0.030833611264824867,
0.008411996997892857,
-0.03544121980667114,
-0.048741016536951065,
... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "CLIPConfig", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "config_class", "ctx": {"_type": "Store", "_fields": {... | class StableDiffusionSafetyChecker(PreTrainedModel):
config_class = CLIPConfig
_no_split_modules = ["CLIPEncoderLayer"]
def __init__(self, config: CLIPConfig):
super().__init__(config)
self.vision_model = CLIPVisionModel(config.vision_config)
self.visual_projection = nn.Linear(con... |