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 |
|---|---|---|---|---|---|
14,201 | [
0.02508281171321869,
0.04266935959458351,
0.0420977957546711,
0.026577668264508247,
0.01709192618727684,
0.018333975225687027,
0.06871943175792694,
0.005473812576383352,
-0.008128282614052296,
0.03229329735040665,
-0.009002113714814186,
-0.006166283041238785,
0.024994879961013794,
0.036887... | 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 do_activate(self):
# We only allow a single window and raise any existing ones
if not self.window:
# Windows are associated with the application
# when the last one is closed the application shuts down
self.window = AppWindow(application=self, title="Main Window")... | |
14,202 | [
0.03664952516555786,
0.01625508815050125,
0.022033898159861565,
-0.025836054235696793,
0.021219981834292412,
0.00625553447753191,
-0.030231207609176636,
0.0016830642707645893,
0.023743124678730965,
0.036951836198568344,
-0.01642949879169464,
0.015499306842684746,
0.04402128979563713,
0.015... | 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": "command_line", "annotation": null, "type_comment": null}}], "kwar... | def do_command_line(self, command_line):
options = command_line.get_options_dict()
if options.contains("test"):
# This is printed on the main instance
print("Test argument recieved")
self.activate()
return 0 | |
14,203 | [
-0.017541242763400078,
-0.025381488725543022,
0.005252964794635773,
-0.019370634108781815,
-0.018168462440371513,
-0.0006066390196792781,
0.011634924449026585,
-0.0247124545276165,
0.004040339961647987,
0.024545196443796158,
0.031214632093906403,
0.005681565031409264,
0.06681980192661285,
... | 10 | {"_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 _external_ids_to_dict(text):
if not text:
return None
else:
d = {}
for l in text.splitlines():
if l:
k, v = l.split('=')
d[k] = v
return d | |
14,204 | [
0.01985958032310009,
0.021653899922966957,
0.032639533281326294,
-0.0482635423541069,
-0.058590035885572433,
0.028049979358911514,
-0.016588304191827774,
-0.062056612223386765,
0.05776000767946243,
0.01010678056627512,
0.04521197825670242,
-0.023973088711500168,
0.06361901015043259,
-0.010... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def map_config_to_obj(module):
templatized_command = "%(ovs-vsctl)s -t %(timeout)s list-br"
command = templatized_command % module.params
rc, out, err = module.run_command(command, check_rc=True)
if rc != 0:
module.fail_json(msg=err)
obj = {}
if module.params['bridge'] in out.splitline... | |
14,205 | [
-0.024025054648518562,
0.01774950511753559,
0.03533509373664856,
-0.04563823714852333,
-0.03556925803422928,
-0.007019015494734049,
-0.022760577499866486,
-0.0317758284509182,
0.02779506891965866,
0.017854876816272736,
0.04573190212249756,
-0.03074551373720169,
0.03554584085941315,
-0.0067... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "want", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "have", "annotation": null, "type_comment": null}}, {"_type": "arg... | def map_obj_to_commands(want, have, module):
commands = list()
if module.params['state'] == 'absent':
if have:
templatized_command = ("%(ovs-vsctl)s -t %(timeout)s del-br"
" %(bridge)s")
command = templatized_command % module.params
... | |
14,206 | [
-0.019263627007603645,
-0.06014261022210121,
0.10311630368232727,
-0.030251218006014824,
0.01594807207584381,
0.0033669581171125174,
0.03217886760830879,
-0.015896668657660484,
0.003145278664305806,
0.03444064036011696,
0.006811021827161312,
-0.01955919899046421,
-0.0014425230911001563,
0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestCase(unittest.TestCase):
def test1(self):
dists = [1, 2, 1, 4, 3, 2, 6, 5, 4, 2, 7, 6, 5, 3, 1]
nPts = 6
cs = Butina.ClusterData(dists, nPts, 1.1, isDistData=1)
self.assertTrue(len(cs) == 3)
self.assertTrue(cs[0] == (1, 0, 2))
self.assertTrue(cs[1] == (5, 4))
self.assertTrue(cs... | |
14,207 | [
-0.041034966707229614,
-0.057920508086681366,
0.06701821833848953,
-0.018338318914175034,
0.0031943207141011953,
-0.019898267462849617,
0.024816270917654037,
0.01148526556789875,
0.009687157347798347,
0.02836485393345356,
-0.005680115427821875,
-0.009056033566594124,
-0.0016194878844544291,
... | 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 test1(self):
dists = [1, 2, 1, 4, 3, 2, 6, 5, 4, 2, 7, 6, 5, 3, 1]
nPts = 6
cs = Butina.ClusterData(dists, nPts, 1.1, isDistData=1)
self.assertTrue(len(cs) == 3)
self.assertTrue(cs[0] == (1, 0, 2))
self.assertTrue(cs[1] == (5, 4))
self.assertTrue(cs[2] == (3, )) | |
14,208 | [
-0.03284253552556038,
-0.04844210669398308,
0.06426922231912613,
-0.03430894389748573,
0.005982575006783009,
0.0007790304953232408,
0.02582651935517788,
0.0109159080311656,
0.005350501276552677,
0.050565872341394424,
0.001157484482973814,
-0.005957291927188635,
-0.022767284885048866,
-0.01... | 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 test2(self):
dists = [.5,
1,
.5,
2,
1.5,
1,
3,
2.5,
2,
1,
5,
4.5,
4,
3,
2,
8,
7.5,
7,
... | |
14,209 | [
-0.001255290349945426,
-0.05911906063556671,
0.08989264816045761,
-0.02942756935954094,
0.01181061565876007,
-0.0033749330323189497,
0.03378232195973396,
0.0001761901512509212,
0.010774713009595871,
0.011652261018753052,
0.024069903418421745,
-0.029955416917800903,
0.046846576035022736,
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 test3_singletons(self):
# " edge case: everything a singleton "
dists = [1,
2,
1, ]
nPts = 3
cs = Butina.ClusterData(dists, nPts, 0.9, isDistData=1)
self.assertTrue(len(cs) == 3)
self.assertTrue(cs[0] == (2, ))
self.assertTrue(cs[1] == (1, ))
self.assertTru... | |
14,210 | [
0.00831094104796648,
-0.029656507074832916,
0.10329117625951767,
-0.03179243206977844,
0.013157850131392479,
0.02014068327844143,
-0.0041280873119831085,
0.007633195724338293,
0.0036522960290312767,
0.03546184301376343,
0.02954697236418724,
-0.041787467896938324,
-0.023125503212213516,
-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 test4b_middle_leaves(self):
# " edge case: one in the middle leaves the edges lonely "
dists = [1.5,
2.5,
1,
3.5,
2,
1,
5,
3.5,
2.5,
1.5, ]
nPts = 5
cs = Butina.ClusterData(dists, nPt... | |
14,211 | [
-0.013500736095011234,
-0.05680050328373909,
0.0677909255027771,
-0.0019826474599540234,
0.023816745728254318,
-0.009360593743622303,
0.026801645755767822,
0.005685670766979456,
-0.004099552519619465,
0.02802557870745659,
0.03357074782252312,
-0.007449758239090443,
0.01908337138593197,
0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test4_one_cluster(self):
# " edge case: everything in one cluster "
dists = [1,
2,
1,
3,
2,
1, ]
nPts = 4
cs = Butina.ClusterData(dists, nPts, 2, isDistData=1)
self.assertTrue(len(cs) == 1)
self.assertEqual(cs[0], (2, 0, 1, 3)) | |
14,212 | [
0.005767828784883022,
-0.03488531336188316,
0.06472338736057281,
-0.04690961167216301,
-0.007725488394498825,
0.027413422241806984,
0.020708514377474785,
-0.013224255293607712,
-0.026052648201584816,
0.014745848253369331,
0.0032998784445226192,
0.007638893555849791,
0.0034143072552978992,
... | 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 test7_reordering_nochanges(self):
# " reordering: no changes "
dists = [1, 2, 1, 4, 3, 2, 6, 5, 4, 2, 7, 6, 5, 3, 1]
nPts = 6
cs = Butina.ClusterData(dists, nPts, 1.1, isDistData=1, reordering=True)
self.assertTrue(len(cs) == 3)
self.assertTrue(cs[0] == (1, 0, 2))
self.assertTrue(cs[1] ... | |
14,213 | [
-0.03070218674838543,
-0.06649258732795715,
0.07637261599302292,
-0.018278051167726517,
-0.0027556016575545073,
-0.03919901326298714,
0.015770994126796722,
0.016129145398736,
0.024835919961333275,
0.05046224221587181,
-0.01496824249625206,
-0.019068453460931778,
-0.0016796047566458583,
-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 test6_zero_distances(self):
# " edge case: zero distances: "
dists = [1,
2,
0,
2,
0,
0,
4,
2,
2,
2, ]
nPts = 5
cs = Butina.ClusterData(dists, nPts, 0.9, isDistData=1)
self.assertT... | |
14,214 | [
0.008437382988631725,
-0.04019944369792938,
0.08314884454011917,
-0.03592450171709061,
-0.00871237926185131,
0.02318717911839485,
0.004940556362271309,
-0.01527478825300932,
-0.018174748867750168,
0.020074721425771713,
0.010449854657053947,
0.005106179043650627,
-0.006768655963242054,
0.04... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test8_reordering_changes(self):
# " reordering: changes"
dists = [2,
3.5,
1.5,
5,
3,
1.5,
7,
5,
3.5,
2,
8,
6,
4.5,
3,
1,
... | |
14,215 | [
0.049044299870729446,
0.03327319025993347,
0.04475807398557663,
-0.025332685559988022,
-0.01847747340798378,
-0.02840997464954853,
-0.008757910691201687,
-0.02108767442405224,
0.014617124572396278,
0.030525611713528633,
0.004767050966620445,
0.01908194087445736,
0.028327547013759613,
-0.06... | 23 | {"_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 Grenade(Faller) :
def __init__(self) :
super(Grenade,self).__init__()
self.fallen = False;
def onBirth(self):
super(Grenade,self).onBirth()
self.costumeFeatures.update(self)
self.addTag("hittable")
self.addTag( "roundedNE" )
s... | |
14,216 | [
0.03402481600642204,
0.01537943072617054,
0.04743663966655731,
0.015018033795058727,
-0.004838698077946901,
0.004353489726781845,
-0.04213615879416466,
-0.028965262696146965,
0.009550238028168678,
0.01689194142818451,
0.021911337971687317,
-0.008164884522557259,
0.01519203931093216,
0.0182... | 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": "hitter", "annotation": null, "type_comment": null}}, {"_type": "a... | def onHit( self, hitter, dx, dy ) :
if dy == -1 :
south = self.lookSouth()
if south.isEmpty() or south.hasTag("squashS") :
return # Don't explode as we are falling, so not really hit.
if hitter.hasTag("explosionTrigger") :
hitter.onExplode()
... | |
14,217 | [
0.0735090896487236,
0.03000759705901146,
0.05957990512251854,
0.03242887929081917,
-0.04769112914800644,
-0.028429681435227394,
0.02576354891061783,
0.01422844361513853,
0.0019978992640972137,
0.02011842094361782,
0.008787356317043304,
0.015479893423616886,
0.030633321031928062,
-0.0601784... | 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 onBirth(self):
super(Grenade,self).onBirth()
self.costumeFeatures.update(self)
self.addTag("hittable")
self.addTag( "roundedNE" )
self.addTag( "roundedSE" )
self.addTag( "roundedSW" )
self.addTag( "roundedNW" ) | |
14,218 | [
0.021071907132864,
0.014462524093687534,
-0.007159309461712837,
-0.017782634124159813,
-0.029192302376031876,
-0.032810501754283905,
0.023086588829755783,
-0.009533753618597984,
-0.059001341462135315,
0.020146800205111504,
-0.008104975335299969,
-0.017885424196720123,
0.025923585519194603,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "an... | class MyImageField(ImageField):
def __init__(self, *args, **kwargs):
for fb_arg in ("format", "extensions"):
kwargs.pop(fb_arg, None)
super(MyImageField, self).__init__(*args, **kwargs)
def formfield(self, **kwargs):
defaults = {'form_class': MyFormImageField}
defaul... | |
14,219 | [
0.01958657056093216,
0.03519313037395477,
0.026892349123954773,
-0.002985009690746665,
-0.05457524582743645,
0.012158121913671494,
-0.015783749520778656,
-0.020963219925761223,
0.035138607025146484,
0.03658340871334076,
0.010106779634952545,
-0.013848264701664448,
0.009268523193895817,
-0.... | 22 | {"_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 onExplode( self ) :
if self.fallen :
a = self.lookNorth()
b = self.lookSouth()
ExplosionBuilder(self.actor) \
.costume("explosion").eventName("default") \
.projectiles(10).projectilesPerTick(1) \
.vy(-3, 3).vx( -0.5... | |
14,220 | [
0.011414766311645508,
-0.010178979486227036,
-0.01639043353497982,
-0.04852088913321495,
0.01528473012149334,
0.022374242544174194,
0.005063473246991634,
0.024403534829616547,
0.015635954216122627,
0.04844283685088158,
0.05304776877164841,
-0.021138455718755722,
-0.06837152689695358,
0.028... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Global", "_fields": {"names": ["f"]}}, {"_type": "Assign", "_f... | def test_update():
global f
f = Feed('nerv', '#pyfibot', url=r'./tests/static/test_rss_init.xml')
f.update_feed_info({'url': r'./tests/static/test_rss_check.xml'})
eq_(
None,
command_rss(bot, ADMIN_USER, '#pyfibot', 'update 1')
) | |
14,221 | [
0.047091126441955566,
0.007760086562484503,
-0.02595539018511772,
-0.049611493945121765,
0.07242747396230698,
0.024253034964203835,
0.020759889855980873,
0.03506409749388695,
-0.00694759888574481,
-0.016128158196806908,
0.04748907685279846,
-0.010545758530497551,
0.003791609313338995,
-0.0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def load(self):
try:
data = self._cache.get(self.cache_key, None)
except Exception:
# Some backends (e.g. memcache) raise an exception on invalid
# cache keys. If this happens, reset the session. See #17810.
data = None
if data is None:
... | |
14,222 | [
-0.024393277242779732,
-0.005240369122475386,
0.03151993826031685,
-0.02071036957204342,
-0.0018474319949746132,
0.043931812047958374,
0.04828433692455292,
-0.00998450256884098,
0.006600533612072468,
0.022934462875127792,
0.028147928416728973,
-0.02616298571228981,
0.0015574628487229347,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "n", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},... | def within_ndays_before(n):
now = datetime.datetime.now()
maxsec = n * 24 * 60 * 60
def predicate(ev):
date = ev.date.start
if isinstance(date, datetime.date):
date = datetime.datetime(*date.timetuple()[:3])
return 0 <= total_seconds(now - date) <= maxsec
return pred... | |
14,223 | [
0.005350520368665457,
-0.01951037161052227,
0.01742837019264698,
0.006934409029781818,
0.005943778902292252,
0.007768329232931137,
-0.00864702370017767,
-0.02919279783964157,
0.001886114478111267,
0.03505822271108627,
0.01699182018637657,
-0.005140641238540411,
-0.0025899093598127365,
-0.0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ax", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orgnodes", "annotation": null, "type_comment": null}}, {"_type": "a... | def plot_clocked_per_day(ax, orgnodes, days,
ylabel='Clocked Time Per Day [h]'):
events = nodes_to_events(
orgnodes, filters=[within_ndays_before(days)], eventclass=['clock'])
clocked = numpy.array(
[(date2num(e.date.start), total_seconds(e.date.duration) / 60 / 60)
... | |
14,224 | [
-0.0024287558626383543,
-0.01691133715212345,
0.01929076388478279,
-0.009587347507476807,
-0.007532915566116571,
0.021182699128985405,
-0.03549407795071602,
-0.04721710458397865,
-0.021588942036032677,
0.03338161110877991,
0.010933754034340382,
-0.019232729449868202,
0.005298576317727566,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ax", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orgnodes", "annotation": null, "type_comment": null}}, {"_type": "a... | def plot_tags_dist(ax, orgnodes, days=180, num=10):
event_tags = (e.tags for e in nodes_to_events(
orgnodes,
filters=[within_ndays_before(days)],
eventclass=['closed']))
counter = {}
for tags in event_tags:
for t in tags:
if t in counter:
counter[... | |
14,225 | [
0.021390920504927635,
-0.0004675650561694056,
0.023090632632374763,
-0.020257780328392982,
0.013690189458429813,
-0.005402653012424707,
0.013308621942996979,
-0.029161028563976288,
0.013852066360414028,
0.03716238960623741,
0.01353987492620945,
-0.011065465398132801,
0.0018702602246776223,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ax", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orgnodes", "annotation": null, "type_comment": null}}, {"_type": "a... | def plot_done_par_day(ax, orgnodes, done, days,
ylabel='Tasks done per day [1/day]'):
today = int(date2num(datetime.datetime.now())) + 1 # end of today
start = today - days
time_array = time_array_closed(orgnodes, done, start)
ax.hist(time_array, bins=days, range=(start, today),
... | |
14,226 | [
-0.028572743758559227,
0.018105601891875267,
0.02055644430220127,
-0.07250410318374634,
-0.009236614219844341,
0.02481478452682495,
-0.01600196212530136,
-0.06396699696779251,
-0.0018483439926058054,
0.047709740698337555,
-0.008006086573004723,
-0.04272636026144028,
0.01903487928211689,
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 parse(self):
# create parser for CLI options
parser = CLI.base_parser(
usage = "%prog playbook.yml",
connect_opts=True,
meta_opts=True,
runas_opts=True,
subset_opts=True,
check_opts=True,
inventory_opts=True,
... | |
14,227 | [
-0.007965147495269775,
0.0013313217787072062,
0.03766888752579689,
-0.00501543004065752,
-0.001339675742201507,
0.010936128906905651,
-0.021993769332766533,
-0.0413142628967762,
0.0065009212121367455,
0.045275572687387466,
0.02138620801270008,
-0.04184892028570175,
-0.006999122444540262,
-... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ax", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orgnodes", "annotation": null, "type_comment": null}}, {"_type": "a... | def plot_clocked_and_closed(ax, orgnodes, days=30):
events = list(nodes_to_events(
orgnodes,
filters=[within_ndays_before(days)],
eventclass=['closed', 'clock']))
closed = numpy.array(
[date2num(e.date.start)
for e in events if e.eventclass == 'closed'])
clock = nump... | |
14,228 | [
0.00028071110136806965,
0.004275716375559568,
0.04505755007266998,
-0.06426076591014862,
-0.011089358478784561,
0.02150360308587551,
0.020328406244516373,
-0.027104541659355164,
-0.031005196273326874,
0.029229898005723953,
0.02937992289662361,
-0.0323554202914238,
0.016277728602290154,
-0.... | 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 run(self):
super(PlaybookCLI, self).run()
# Note: slightly wrong, this is written so that implicit localhost
# Manage passwords
sshpass = None
becomepass = None
vault_pass = None
passwords = {}
# initial error check, to make sure all specified... | |
14,229 | [
0.0291499774903059,
0.00748461065813899,
-0.022563984617590904,
0.01101530622690916,
-0.03726651892066002,
-0.0273179579526186,
0.025856981053948402,
-0.0058902897872030735,
0.03601425141096115,
0.03165451064705849,
0.02497575618326664,
0.01702154614031315,
-0.03165451064705849,
-0.0062033... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "b", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},... | def _process_block(b):
taskmsg = ''
for task in b.block:
if isinstance(task, Block):
taskmsg += _process_block(task)
else:
if ta... | |
14,230 | [
-0.004089374095201492,
-0.004556466359645128,
0.0016332750674337149,
-0.018906395882368088,
0.016110030934214592,
0.020552044734358788,
-0.007504404056817293,
-0.014588115736842155,
0.010059489868581295,
-0.012274309061467648,
0.024932190775871277,
-0.013783851638436317,
0.033407896757125854... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "source", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def isD(source):
if not source:
return 0
for s in source:
if s.sources:
ext = os.path.splitext(str(s.sources[0]))[1]
if ext == '.d':
return 1
return 0 | |
14,231 | [
-0.02397024817764759,
-0.007631723769009113,
0.034614842385053635,
-0.0012318597873672843,
0.003250118810683489,
0.020267203450202942,
-0.0215944591909647,
-0.05739056318998337,
0.03177451714873314,
0.021302463486790657,
0.024713512510061264,
-0.024421514943242073,
0.04199438914656639,
-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 elementProperties(self):
js = super(Task, self).elementProperties()
js.extend([
("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
("businessStatus", "businessStatus", codeab... | |
14,232 | [
-0.0026821154169738293,
0.0034265678841620684,
0.02436515875160694,
-0.003276981646195054,
-0.003930986393243074,
0.021526498720049858,
-0.004710226319730282,
-0.05529819428920746,
0.049982666969299316,
0.011716426350176334,
0.03645728901028633,
-0.01216866448521614,
0.013775845989584923,
... | 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 elementProperties(self):
js = super(TaskOutput, self).elementProperties()
js.extend([
("type", "type", codeableconcept.CodeableConcept, False, None, True),
("valueAddress", "valueAddress", address.Address, False, "value", True),
("valueAge", "valueAge", age.Age, F... | |
14,233 | [
-0.006416106130927801,
0.014914999715983868,
0.01819993369281292,
0.007988681085407734,
-0.0013192156329751015,
0.017319291830062866,
-0.0040502543561160564,
-0.05292239040136337,
0.05236325412988663,
0.022225726395845413,
0.03161923959851265,
-0.01677413284778595,
0.022924648597836494,
-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 elementProperties(self):
js = super(TaskInput, self).elementProperties()
js.extend([
("type", "type", codeableconcept.CodeableConcept, False, None, True),
("valueAddress", "valueAddress", address.Address, False, "value", True),
("valueAge", "valueAge", age.Age, Fa... | |
14,234 | [
-0.014505323022603989,
0.008277850225567818,
0.006511035840958357,
0.013949103653430939,
-0.01920592039823532,
-0.04728953540325165,
-0.017439106479287148,
0.021201765164732933,
-0.01665385626256466,
0.017253700643777847,
0.007568943314254284,
0.07224304974079132,
-0.03985146805644035,
-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 initUI(self):
QtGui.QToolTip.setFont(QtGui.QFont('SansSerif',12))
self.setToolTip('This is a <b>QWidget</b> widget')
btn = QtGui.QPushButton('Button',self)
btn.setToolTip('This is a <b>QPushButton</b> widget')
btn.resize(btn.sizeHint())
btn.move(50,50)
# set window
self.setGeometry(300,300,250,150)... | |
14,235 | [
-0.0015446426114067435,
0.01582738384604454,
0.06464128941297531,
0.010756474919617176,
-0.033268239349126816,
0.027275346219539642,
-0.013855364173650742,
-0.045561354607343674,
0.014444408938288689,
0.003777571488171816,
0.006690783426165581,
-0.022895924746990204,
0.06663892418146133,
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 elementProperties(self):
js = super(TaskRestriction, self).elementProperties()
js.extend([
("period", "period", period.Period, False, None, False),
("recipient", "recipient", fhirreference.FHIRReference, True, None, False),
("repetitions", "repetitions", int, Fals... | |
14,236 | [
-0.019850797951221466,
0.04577156901359558,
0.045401450246572495,
0.04155219718813896,
0.020344290882349014,
-0.030029110610485077,
-0.025760388001799583,
0.012553254142403603,
0.03454458341002464,
0.04268723353743553,
-0.009592290036380291,
-0.022281255573034286,
-0.012250988744199276,
-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 defineCharacteristics(self):
self.addParameter(ParameterVector(ConcaveHull.INPUT,
self.tr('Input point layer'), [dataobjects.TYPE_VECTOR_POINT]))
self.addParameter(ParameterNumber(self.ALPHA,
self.tr('Threshold (0-1,... | |
14,237 | [
-0.00959340762346983,
0.03919336199760437,
0.11127840727567673,
0.0015249868156388402,
0.012199894525110722,
-0.016087209805846214,
-0.0009622226352803409,
-0.002119771670550108,
0.00015910295769572258,
0.048056699335575104,
0.02869056537747383,
-0.03494101017713547,
-0.030688658356666565,
... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "INPUT"}}, "targets": [{"_type": "Name", "_fields": {"id": "INPUT", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {... | class ConcaveHull(GeoAlgorithm):
INPUT = 'INPUT'
ALPHA = 'ALPHA'
HOLES = 'HOLES'
NO_MULTIGEOMETRY = 'NO_MULTIGEOMETRY'
OUTPUT = 'OUTPUT'
def icon(self):
return QgsApplication.getThemeIcon("/providerQgis.svg")
def svgIconPath(self):
return QgsApplication.iconPath("providerQ... | |
14,238 | [
0.01665380224585533,
-0.046854596585035324,
0.012547986581921577,
0.02364686131477356,
0.015599902719259262,
0.006691161543130875,
-0.005543948616832495,
0.03152914717793465,
0.0214951504021883,
0.0037901944015175104,
-0.001735914614982903,
-0.01691727712750435,
0.00511305732652545,
0.0042... | 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 UserModelTestCase(unittest.TestCase):
def test_password_setter(self):
u = User(password='cat')
self.assertTrue(u.password_hash is not None)
def test_no_password_getter(self):
u = User(password='cat')
with self.assertRaises(AttributeError):
u.password
def ... | |
14,239 | [
-0.009565941989421844,
0.03430544584989548,
0.09888040274381638,
-0.02920878492295742,
-0.006335253827273846,
-0.017165658995509148,
0.0036899051629006863,
0.00030580777092836797,
-0.009565941989421844,
0.037099555134773254,
0.04266190156340599,
-0.010536118410527706,
-0.02324543334543705,
... | 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}}, {"_type": "... | def processAlgorithm(self, context, feedback):
layer = QgsProcessingUtils.mapLayerFromString(self.getParameterValue(ConcaveHull.INPUT), context)
alpha = self.getParameterValue(self.ALPHA)
holes = self.getParameterValue(self.HOLES)
no_multigeom = self.getParameterValue(self.NO_MULTIGEOMET... | |
14,240 | [
0.009984024800360203,
0.027273433282971382,
0.00443193269893527,
-0.01814982108771801,
-0.030650144442915916,
-0.022533049806952477,
0.0038826761301606894,
-0.07381143420934677,
0.015357539989054203,
0.036840781569480896,
0.021894505247473717,
-0.008961270563304424,
0.01799830049276352,
-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 __init__(self, parent, setup, options, name, tab_list=None):
super(AnalysisWidget, self).__init__(parent)
self.setup = setup
self.options = options
self.option_widgets = {}
self.splitter_size = [parent.width() / 2, parent.width() / 2]
self._setup()
# Multi-thr... | |
14,241 | [
-0.04317169263958931,
-0.01971784047782421,
-0.007757413666695356,
0.04454156383872032,
0.006491320673376322,
-0.04732281714677811,
0.013376997783780098,
-0.004895732272416353,
-0.01803663559257984,
0.026774751022458076,
0.0055158063769340515,
0.027210619300603867,
0.012889240868389606,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "link", "annotation": n... | class LinkBox(Gtk.Box):
def __init__(self, link, button):
Gtk.Box.__init__(self)
self.set_spacing(6)
self.pack_start(link, False, True, 0)
if button:
self.pack_start(button, False, True, 0)
self.show() | |
14,242 | [
0.004898355808109045,
0.014245311729609966,
0.02210226282477379,
-0.020792771130800247,
-0.021147679537534714,
-0.024195000529289246,
-0.0018648018594831228,
-0.02434186078608036,
-0.0052869198843836784,
0.010604435577988625,
0.013547731563448906,
0.015261085703969002,
0.009080774150788784,
... | 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 _setup(self):
# Plot area
self.left_widget = QtWidgets.QWidget()
self.plt = QtWidgets.QVBoxLayout()
self.left_widget.setLayout(self.plt)
# Options
self.opt_needed = QtWidgets.QVBoxLayout()
self.opt_optional = QtWidgets.QVBoxLayout()
self.opt_fixed = Qt... | |
14,243 | [
0.006870507262647152,
0.044051747769117355,
0.003345808479934931,
-0.04246409609913826,
-0.025782570242881775,
-0.0018937219865620136,
0.01381927914917469,
-0.018347440287470818,
-0.001374520710669458,
0.017095208168029785,
0.00922403298318386,
-0.022283028811216354,
0.027414945885539055,
... | 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": "dtype", "annotation": null, "type_comment": null}}, {"_type": "ar... | def _select_widget(self, dtype, name, default_value, optional, tooltip, func):
# Create widget according to data type
if ('scalar' in dtype and ('tuple' in dtype or 'iterable' in dtype) or
'int' in dtype and ('tuple' in dtype or 'iterable' in dtype) or
('iterable'... | |
14,244 | [
0.05788704380393028,
-0.0014707776717841625,
-0.05406475067138672,
-0.0020665721967816353,
0.02753894403576851,
-0.0057996418327093124,
-0.043150484561920166,
0.011121496558189392,
0.05033455789089203,
0.009221862070262432,
-0.013044157065451145,
-0.0011217917781323195,
0.018006233498454094,... | 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": "func", "annotation": null, "type_comment": null}}, {"_type": "arg... | def _set_argument(self, func, name, value):
# Workaround for https://www.riverbankcomputing.com/pipermail/pyqt/2016-June/037662.html
# Cannot transmit None for signals with string (likely also float)
if type(value) == str and 'None' in value:
value = None
if type(value) == fl... | |
14,245 | [
0.0033356095664203167,
0.009165724739432335,
0.007575693540275097,
-0.014448546804487705,
-0.03484242781996727,
-0.009033222682774067,
0.00559391500428319,
-0.06387778371572495,
0.007978962734341621,
0.0062564280815422535,
0.02068193070590496,
-0.0009001537109725177,
0.040004272013902664,
... | 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": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, parent, setup, options, name, tab_list=None):
super(ParallelAnalysisWidget, self).__init__(parent)
# Make main layout
self.main_layout = QtWidgets.QVBoxLayout()
self.setLayout(self.main_layout)
# Add sub-layout and rerun / ok button and progressbar
s... | |
14,246 | [
-0.006044416688382626,
-0.0026829042471945286,
0.01904907077550888,
-0.013247871771454811,
0.013608194887638092,
-0.017823971807956696,
-0.030483316630125046,
-0.003501137485727668,
-0.01638268120586872,
0.023745277896523476,
0.015145571902394295,
-0.027072260156273842,
0.006365704350173473,... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "admin-widgets-users.xml"}}]}}, "targets": [{"_type": "Nam... | class AdminForeignKeyRawIdWidget(DjangoTestCase):
fixtures = ["admin-widgets-users.xml"]
admin_root = '/widget_admin'
def setUp(self):
self.client.login(username="super", password="secret")
def tearDown(self):
self.client.logout()
def test_nonexistent_target_id(self):
band... | |
14,247 | [
-0.0035093429032713175,
-0.009614486247301102,
0.0475488118827343,
-0.026448192074894905,
-0.00857839360833168,
-0.0015680636279284954,
-0.00860624574124813,
-0.02288314513862133,
-0.003640247043222189,
0.036452602595090866,
-0.008110481314361095,
-0.0056678676046431065,
0.008929328061640263... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "admin-widgets-users.xml"}}]}}, "targets": [{"_type": "Nam... | class AdminForeignKeyWidgetChangeList(DjangoTestCase):
fixtures = ["admin-widgets-users.xml"]
admin_root = '/widget_admin'
def setUp(self):
self.client.login(username="super", password="secret")
def tearDown(self):
self.client.logout()
def test_changelist_foreignkey(self):
... | |
14,248 | [
-0.016959140077233315,
-0.013489039614796638,
0.01865505427122116,
-0.02558221109211445,
-0.0022209950257092714,
-0.0009661818039603531,
-0.016763458028435707,
0.03444010019302368,
-0.002628666814416647,
-0.04122375696897507,
0.008186046965420246,
-0.05964399129152298,
0.003346168901771307,
... | 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_nonexistent_target_id(self):
band = models.Band.objects.create(name='Bogey Blues')
pk = band.pk
band.delete()
post_data = {
"band": '%s' % pk,
}
# Try posting with a non-existent pk in a raw id field: this
# should result in an error message, ... | |
14,249 | [
-0.021993836387991905,
-0.028984125703573227,
0.04605984315276146,
-0.004216468892991543,
0.01353466883301735,
-0.013331386260688305,
-0.024839790537953377,
0.005882072728127241,
0.011993657797574997,
0.0014828135026618838,
-0.03433504328131676,
-0.02203318104147911,
-0.027672627940773964,
... | 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_invalid_target_id(self):
for test_str in ('Iñtërnâtiônàlizætiøn', "1234'", -1234):
# This should result in an error message, not a server exception.
response = self.client.post('%s/admin_widgets/event/add/' % self.admin_root,
{"band": test_str})
sel... | |
14,250 | [
-0.025810247287154198,
-0.010367077775299549,
0.028690960258245468,
-0.036357369273900986,
0.016784792765975,
-0.026089025661349297,
0.0026513002812862396,
-0.017853442579507828,
0.0053142160177230835,
0.023173468187451363,
-0.017911521717905998,
-0.018724625930190086,
-0.04906502738595009,
... | 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 AdminSplitDateTimeWidgetTest(DjangoTestCase):
def test_render(self):
w = widgets.AdminSplitDateTime()
self.assertHTMLEqual(
conditional_escape(w.render('test', datetime(2007, 12, 1, 9, 30))),
'<p class="datetime">Date: <input value="2007-12-01" type="text" class="vDateF... | |
14,251 | [
-0.020994722843170166,
-0.025206901133060455,
0.025008421391248703,
-0.033212240785360336,
-0.0047607519663870335,
-7.187775850070466e-7,
-0.02414834313094616,
0.026971163228154182,
-0.002916546305641532,
0.025890551507472992,
-0.003065406112000346,
-0.04644421115517616,
-0.03402821347117424... | 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 FilteredSelectMultipleWidgetTest(DjangoTestCase):
def test_render(self):
w = widgets.FilteredSelectMultiple('test', False)
self.assertHTMLEqual(
conditional_escape(w.render('test', 'test')),
'<select multiple="multiple" name="test" class="selectfilter">\n</select><scrip... | |
14,252 | [
-0.029495714232325554,
0.006209788843989372,
0.04769519716501236,
-0.015011435374617577,
0.0273117758333683,
-0.022943899035453796,
0.007913636974990368,
-0.021111400797963142,
0.003765410277992487,
0.004195294342935085,
-0.01660545915365219,
0.01980605721473694,
-0.03793023154139519,
-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_localization(self):
w = widgets.AdminSplitDateTime()
with self.settings(USE_L10N=True):
with translation.override('de-at'):
w.is_localized = True
self.assertHTMLEqual(
conditional_escape(w.render('test', datetime(2007, 12, 1, 9, 3... | |
14,253 | [
-0.017092131078243256,
-0.030401969328522682,
-0.018588291481137276,
-0.02000066637992859,
0.0278644822537899,
-0.012902882881462574,
-0.008079263381659985,
-0.0005958456895314157,
0.02356751076877117,
0.04088705778121948,
0.016373973339796066,
-0.02371114306151867,
-0.04131795093417168,
-... | 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 AdminURLWidgetTest(DjangoTestCase):
def test_render(self):
w = widgets.AdminURLFieldWidget()
self.assertHTMLEqual(
conditional_escape(w.render('test', '')),
'<input class="vURLField" name="test" type="text" />'
)
self.assertHTMLEqual(
conditi... | |
14,254 | [
-0.02887210063636303,
-0.006055549718439579,
0.008137330412864685,
-0.0016206454019993544,
0.03741274029016495,
-0.03451841324567795,
0.004863418638706207,
0.025527017191052437,
0.037744875997304916,
0.03577578440308571,
0.013807364739477634,
0.016428865492343903,
-0.02714024856686592,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_render(self):
w = widgets.AdminURLFieldWidget()
self.assertHTMLEqual(
conditional_escape(w.render('test', '')),
'<input class="vURLField" name="test" type="text" />'
)
self.assertHTMLEqual(
conditional_escape(w.render('test', 'http://example.c... | |
14,255 | [
-0.020058082416653633,
0.0040084426291286945,
0.011063681915402412,
-0.011831728741526604,
0.01809035800397396,
-0.01896631345152855,
-0.008810321800410748,
0.016046464443206787,
0.02500912733376026,
0.01442150678485632,
0.03219449147582054,
0.01263786107301712,
-0.03158513084053993,
-0.00... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_render_quoting(self):
w = widgets.AdminURLFieldWidget()
self.assertHTMLEqual(
conditional_escape(w.render('test', 'http://example.com/<sometag>some text</sometag>')),
'<p class="url">Currently:<a href="http://example.com/%3Csometag%3Esome%20text%3C/sometag%3E">http://exa... | |
14,256 | [
-0.014533947221934795,
-0.025485947728157043,
0.00443555973470211,
-0.008993524126708508,
0.007788804359734058,
-0.041334133595228195,
-0.005788453854620457,
0.009592663496732712,
-0.004319597501307726,
-0.005198978818953037,
0.03842218965291977,
-0.03097483143210411,
-0.030614059418439865,
... | 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_render(self):
band = models.Band.objects.create(name='Linkin Park')
band.album_set.create(
name='Hybrid Theory', cover_art=r'albums\hybrid_theory.jpg'
)
rel = models.Album._meta.get_field('band').rel
w = widgets.ForeignKeyRawIdWidget(rel, widget_admin_site)
... | |
14,257 | [
-0.005047683138400316,
-0.004583491012454033,
0.02679978869855404,
0.001759385340847075,
0.010906890965998173,
-0.00030635055736638606,
-0.022592846304178238,
-0.019944028928875923,
-0.014490583911538124,
0.020060889422893524,
0.022527923807501793,
-0.023203112185001373,
-0.03186370432376861... | 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 ForeignKeyRawIdWidgetTest(DjangoTestCase):
def test_render(self):
band = models.Band.objects.create(name='Linkin Park')
band.album_set.create(
name='Hybrid Theory', cover_art=r'albums\hybrid_theory.jpg'
)
rel = models.Album._meta.get_field('band').rel
w = w... | |
14,258 | [
0.022865280508995056,
0.0323992557823658,
0.03611529618501663,
0.0003293271001894027,
0.03511660918593407,
-0.022609801962971687,
-0.002756549511104822,
-0.016269301995635033,
-0.01647832989692688,
0.015317066572606564,
0.016489943489432335,
-0.0057569644413888454,
-0.028567085042595863,
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_relations_to_non_primary_key(self):
# Check that ForeignKeyRawIdWidget works with fields which aren't
# related to the model's primary key.
apple = models.Inventory.objects.create(barcode=86, name='Apple')
models.Inventory.objects.create(barcode=22, name='Pear')
core = m... | |
14,259 | [
-0.011891305446624756,
0.02194446325302124,
0.03306147828698158,
0.006981184706091881,
0.005445198155939579,
0.019816743209958076,
-0.009675456210970879,
0.0028343356680125,
-0.008032454177737236,
0.02478981576859951,
0.0020584736485034227,
-0.03953276574611664,
-0.013521716929972172,
-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_fk_related_model_not_in_admin(self):
# FK to a model not registered with admin site. Raw ID widget should
# have no magnifying glass link. See #16542
big_honeycomb = models.Honeycomb.objects.create(location='Old tree')
big_honeycomb.bee_set.create()
rel = models.Bee._met... | |
14,260 | [
-0.036381009966135025,
0.018793165683746338,
0.008886165916919708,
-0.014709833078086376,
-0.010116085410118103,
0.0010000780457630754,
0.002861099550500512,
-0.021351397037506104,
-0.03148593008518219,
0.002624340122565627,
0.022003253921866417,
-0.01495581679046154,
-0.007674695458263159,
... | 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_proper_manager_for_label_lookup(self):
# see #9258
rel = models.Inventory._meta.get_field('parent').rel
w = widgets.ForeignKeyRawIdWidget(rel, widget_admin_site)
hidden = models.Inventory.objects.create(
barcode=93, name='Hidden', hidden=True
)
child... | |
14,261 | [
0.005766816902905703,
0.01493161078542471,
0.026867154985666275,
-0.0004373067931737751,
0.0023931986652314663,
-0.014602773822844028,
-0.030252952128648758,
0.0002922990533988923,
0.005352726671844721,
0.012641934677958488,
0.01633221097290516,
-0.03877834230661392,
0.006613266188651323,
... | 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_fk_to_self_model_not_in_admin(self):
# FK to self, not registered with admin site. Raw ID widget should have
# no magnifying glass link. See #16542
subject1 = models.Individual.objects.create(name='Subject #1')
models.Individual.objects.create(name='Child', parent=subject1)
... | |
14,262 | [
0.014013036154210567,
-0.0225247573107481,
0.01025003008544445,
0.003942831419408321,
0.0032368514221161604,
-0.021912019699811935,
-0.007452750578522682,
0.016197577118873596,
-0.006979877129197121,
-0.0004545578558463603,
0.02335062064230442,
-0.025974733754992485,
-0.014399327337741852,
... | 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_render(self):
band = models.Band.objects.create(name='Linkin Park')
m1 = models.Member.objects.create(name='Chester')
m2 = models.Member.objects.create(name='Mike')
band.members.add(m1, m2)
rel = models.Band._meta.get_field('members').rel
w = widgets.ManyToMany... | |
14,263 | [
0.025890056043863297,
-0.021964307874441147,
0.03480995073914528,
-0.005385479424148798,
-0.015479370951652527,
0.01100700069218874,
-0.007832859642803669,
-0.00218028062954545,
0.007031560409814119,
0.018212486058473587,
0.015479370951652527,
-0.044997017830610275,
-0.01996416412293911,
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 ManyToManyRawIdWidgetTest(DjangoTestCase):
def test_render(self):
band = models.Band.objects.create(name='Linkin Park')
m1 = models.Member.objects.create(name='Chester')
m2 = models.Member.objects.create(name='Mike')
band.members.add(m1, m2)
rel = models.Band._meta.get... | |
14,264 | [
0.021279482170939445,
0.012026150710880756,
0.03792911767959595,
-0.00828666053712368,
-0.03172207251191139,
0.03787824138998985,
0.008655521087348461,
-0.005097281653434038,
0.015110594220459461,
0.025922046974301338,
0.01216606330126524,
-0.05291251838207245,
-0.00747898081317544,
0.0074... | 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_m2m_related_model_not_in_admin(self):
# M2M relationship with model not registered with admin site. Raw ID
# widget should have no magnifying glass link. See #16542
consultor1 = models.Advisor.objects.create(name='Rockstar Techie')
c1 = models.Company.objects.create(name='Doodl... | |
14,265 | [
-0.013114625588059425,
-0.053720872849226,
-0.000913173018489033,
-0.015113378874957561,
0.023061636835336685,
-0.030483907088637352,
0.026743551716208458,
0.007030701730400324,
-0.026392892003059387,
0.00819956324994564,
0.021074572578072548,
-0.025714952498674393,
-0.029221536591649055,
... | 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):
self.lisa = models.Student.objects.create(name='Lisa')
self.john = models.Student.objects.create(name='John')
self.bob = models.Student.objects.create(name='Bob')
self.peter = models.Student.objects.create(name='Peter')
self.jenny = models.Student.objects.create(... | |
14,266 | [
0.029948052018880844,
0.007766466122120619,
-0.015463069081306458,
0.0004985035047866404,
0.02071445807814598,
-0.0045382012613117695,
0.014974026009440422,
0.006130501162260771,
-0.022810354828834534,
0.03632889688014984,
0.05095360800623894,
-0.018828149884939194,
0.011154834181070328,
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": "mode", "annotation": null, "type_comment": null}}, {"_type": "arg... | def assertActiveButtons(self, mode, field_name, choose, remove,
choose_all=None, remove_all=None):
choose_link = '#id_%s_add_link' % field_name
choose_all_link = '#id_%s_add_all_link' % field_name
remove_link = '#id_%s_remove_link' % field_name
remove_all_lin... | |
14,267 | [
-0.00992531143128872,
-0.0014526922022923827,
0.04599567502737045,
-0.024850744754076004,
0.010225045494735241,
-0.044905733317136765,
0.022452866658568382,
-0.0065873549319803715,
-0.030927186831831932,
0.02348831295967102,
0.03607717901468277,
-0.03182639181613922,
0.005316887516528368,
... | 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": "mode", "annotation": null, "type_comment": null}}, {"_type": "arg... | def execute_basic_operations(self, mode, field_name):
from_box = '#id_%s_from' % field_name
to_box = '#id_%s_to' % field_name
choose_link = 'id_%s_add_link' % field_name
choose_all_link = 'id_%s_add_all_link' % field_name
remove_link = 'id_%s_remove_link' % field_name
rem... | |
14,268 | [
0.0167702529579401,
0.014321224763989449,
0.06409742683172226,
-0.005469912197440863,
-0.0001952152670128271,
-0.01223892904818058,
-0.011157377623021603,
0.030755825340747833,
0.02744901366531849,
0.058329153805971146,
0.01392341312021017,
-0.02033812925219536,
-0.014942806214094162,
0.01... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def powers_(self):
check_is_fitted(self)
combinations = self._combinations(self.n_input_features_, self.degree,
self.interaction_only,
self.include_bias)
return np.vstack([np.bincount(c, minlength=self.n_input_f... | |
14,269 | [
-0.002467118902131915,
-0.026518365368247032,
0.03403358906507492,
-0.030845312401652336,
0.030364541336894035,
0.0011861148523166776,
0.017042098566889763,
0.025379694998264313,
-0.02225467748939991,
0.017788559198379517,
0.0063164569437503815,
-0.055820148438215256,
-0.000810511817689985,
... | 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_basic(self):
self.school.students = [self.lisa, self.peter]
self.school.alumni = [self.lisa, self.peter]
self.school.save()
self.admin_login(username='super', password='secret', login_url='/')
self.selenium.get(
'%s%s' % (self.live_server_url, '/admin_widget... | |
14,270 | [
0.022093024104833603,
0.016936810687184334,
0.06685459613800049,
0.003256401279941201,
-0.02663847804069519,
-0.002196382498368621,
0.0023490721359848976,
0.02185811661183834,
0.02663847804069519,
0.04681700840592384,
0.04803852364420891,
-0.03981677070260048,
-0.007164670154452324,
0.0126... | 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_resubmit_error_certificate_in_a_course(self):
# Create a certificate with status 'error'
# in three courses.
for idx in range(3):
self._create_cert(self.courses[idx].id, self.user, CertificateStatuses.error)
# Re-submit certificates for two of the courses
se... | |
14,271 | [
0.03827749192714691,
0.03010236844420433,
0.04905073717236519,
0.009530177339911461,
-0.038322288542985916,
0.049364302307367325,
0.02651875466108322,
0.041189178824424744,
0.021703271195292473,
0.04320496320724487,
0.047706879675388336,
-0.019799474626779556,
0.011058812960982323,
0.02136... | 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": "mode", "annotation": null, "type_comment": null}}], "kwarg": null... | def test_resubmit_error_certificate(self, mode):
# Create a certificate with status 'error'
self._create_cert(self.courses[0].id, self.user, CertificateStatuses.error, mode)
# Re-submit all certificates with status 'error'
with check_mongo_calls(1):
self._run_command()
... | |
14,272 | [
0.031208651140332222,
0.021291034296154976,
0.06082502752542496,
0.00909873191267252,
-0.038783345371484756,
0.04083056002855301,
-0.00328123033978045,
0.012647237628698349,
0.034620676189661026,
0.03719106689095497,
0.0331876277923584,
-0.052135735750198364,
-0.0010115231852978468,
0.0171... | 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": "other_status", "annotation": null, "type_comment": null}}], "kwar... | def test_resubmit_error_certificate_skips_non_error_certificates(self, other_status):
# Create certificates with an error status and some other status
self._create_cert(self.courses[0].id, self.user, CertificateStatuses.error)
self._create_cert(self.courses[1].id, self.user, other_status)
... | |
14,273 | [
0.02237410470843315,
-0.03137575089931488,
0.05264786630868912,
-0.019142426550388336,
-0.01596027798950672,
0.010821785777807236,
0.02637346088886261,
0.018634768202900887,
0.005921646486967802,
0.0057668727822601795,
0.05319267138838768,
-0.0561148002743721,
-0.01149659976363182,
-0.0139... | 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_course_caching(self):
# Create multiple certificates for the same course
self._create_cert(self.courses[0].id, UserFactory.create(), CertificateStatuses.error)
self._create_cert(self.courses[0].id, UserFactory.create(), CertificateStatuses.error)
self._create_cert(self.courses[0... | |
14,274 | [
0.013157024048268795,
0.025129247456789017,
0.00022976422042120248,
-0.004299681168049574,
-0.004223242402076721,
-0.02971557527780533,
-0.0008282858179882169,
0.02986845187842846,
0.006177208852022886,
0.06608132272958755,
-0.003489907830953598,
0.02224368415772915,
0.004992407746613026,
... | 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": "option", "annotation": null, "type_comment": null}}], "kwarg": nu... | def get(self, option):
try:
stdout, stderr = subprocess.Popen(
[self.cmd, option],
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
except OSError:
# e.g., [Errno 2] No such file or directory
raise OSError("Could not find s... | |
14,275 | [
-0.030245132744312286,
0.028574129566550255,
0.021424628794193268,
-0.014096093364059925,
0.007525475695729256,
0.004810098093003035,
-0.01178653072565794,
0.0074120862409472466,
0.017545519396662712,
0.029863188043236732,
0.006851107347756624,
-0.03652332350611687,
0.01835714839398861,
-0... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_course_does_not_exist(self):
phantom_course = CourseLocator(org='phantom', course='phantom', run='phantom')
self._create_cert(phantom_course, self.user, 'error')
self._run_command()
# Expect that the certificate was NOT resubmitted
# since the course doesn't actually ex... | |
14,276 | [
-0.015458216890692711,
-0.005874122492969036,
0.013559064827859402,
-0.018450485542416573,
-0.017291119322180748,
-0.017004039138555527,
-0.033455997705459595,
-0.013018026947975159,
-0.0047368393279612064,
0.007756712380796671,
-0.02290024422109127,
-0.02707396261394024,
0.00070804153801873... | 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 get_libs(self):
self.libs = []
self.lib_dirs = []
self.extra_link_args = []
for item in self.get('--libs').split():
if item.startswith("-L"):
self.lib_dirs.extend(item[2:].split(":"))
elif item.startswith("-l"):
self.libs.append... | |
14,277 | [
-0.0357573963701725,
0.03179483488202095,
0.03872931748628616,
0.010366342030465603,
-0.06052340194582939,
-0.012070479802787304,
0.006150224711745977,
-0.013031636364758015,
0.0035527425352483988,
-0.0082022650167346,
0.056183453649282455,
-0.0024515397381037474,
-0.05198502540588379,
-0.... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class gippy_build_ext(build_ext):
def finalize_options(self):
build_ext.finalize_options(self)
mock = gippy_install(self.distribution)
mock.finalize_options()
install_dir = os.path.join(mock.install_lib, "gippy")
# Workaround for OSX because rpath doesn't work there, is to b... | |
14,278 | [
-0.026582876220345497,
0.0375315360724926,
0.04238191246986389,
0.008117313496768475,
-0.06164213642477989,
-0.01705871894955635,
0.010206976905465126,
-0.015751942992210388,
-0.012455572374165058,
-0.010142226703464985,
0.055379029363393784,
0.0024752214085310698,
-0.05589703097939491,
-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 finalize_options(self):
build_ext.finalize_options(self)
mock = gippy_install(self.distribution)
mock.finalize_options()
install_dir = os.path.join(mock.install_lib, "gippy")
# Workaround for OSX because rpath doesn't work there, is to build
# in final module directo... | |
14,279 | [
-0.025971734896302223,
-0.024090060964226723,
0.010407278314232826,
-0.03226720914244652,
-0.00736988615244627,
-0.03721531108021736,
0.018514733761548996,
0.033335812389850616,
0.039189908653497696,
0.04615906625986099,
0.018143044784665108,
0.021976083517074585,
-0.025460664182901382,
-0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "f", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "t3", "annotation": null, "type_comment": null}}], "kwarg": null, "va... | def _integrate_exact(f, t3):
#
# Note that
#
# \int_T f(x) dx = \int_T0 |J(xi)| f(P(xi)) dxi
#
# with
#
# P(xi) = x0 * (1-xi[0]-xi[1]) + x1 * xi[0] + x2 * xi[1].
#
# and T0 being the reference t3 [(0.0, 0.0), (1.0, 0.0), (0.0,
# 1.0)].
# The determinant of the tra... | |
14,280 | [
0.012356558814644814,
0.03565375506877899,
0.03063877671957016,
-0.055788520723581314,
0.021008020266890526,
0.01828845590353012,
0.022567404434084892,
0.00960580538958311,
0.04802902787923813,
0.03680146113038063,
0.02634735219180584,
-0.014708109200000763,
-0.010223321616649628,
0.001398... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "scheme", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def test_scheme(scheme):
print(scheme)
scheme = scheme()
assert scheme.points.dtype in [np.float64, np.int64], scheme.name
assert scheme.weights.dtype in [np.float64, np.int64], scheme.name
print(scheme)
# Test integration until we get to a polynomial degree `d` that can no
# longer be in... | |
14,281 | [
-0.028648853302001953,
0.005858307238668203,
0.03413638100028038,
-0.02526240609586239,
-0.003272124333307147,
0.0009385342127643526,
0.015004187822341919,
-0.019020959734916687,
0.01021496020257473,
0.01394128892570734,
0.02408827282488346,
-0.019255787134170532,
0.028203919529914856,
-0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "scheme", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def test_show(scheme):
tet = np.array(
[
[np.cos(0.5 * np.pi), np.sin(0.5 * np.pi), -0.5],
[np.cos(7.0 / 6.0 * np.pi), np.sin(7.0 / 6.0 * np.pi), -0.5],
[np.cos(11.0 / 6.0 * np.pi), np.sin(11.0 / 6.0 * np.pi), -0.5],
[0.0, 0.0, 1.0],
]
)
scheme... | |
14,282 | [
0.0399068146944046,
0.0021555759012699127,
-0.013607989065349102,
0.0018583009950816631,
0.011549727991223335,
-0.028431739658117294,
-0.0036792762111872435,
0.049910180270671844,
0.026362814009189606,
0.024059265851974487,
0.012146943248808384,
-0.01884429156780243,
0.01105915755033493,
0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"k... | def login():
uri_params = {'oauth_consumer_key': mwoauth_mw.mwoauth.consumer_key}
try:
redirector = mwoauth_mw.mwoauth.authorize(**uri_params)
except:
return render_template('loginerror.html')
if 'next' in request.args:
oauth_token = session[mwoauth_mw.mwoauth.name + '_oauthto... | |
14,283 | [
-0.011484730988740921,
-0.013006891123950481,
0.0430244579911232,
-0.02546551637351513,
0.04215877503156662,
0.025018246844410896,
0.018597763031721115,
0.011643439531326294,
-0.018453482538461685,
0.030616331845521927,
0.03858061879873276,
-0.028538690879940987,
-0.051883284002542496,
0.0... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"va... | def test_get_good_scheme():
for degree in range(51):
best = None
for scheme in quadpy.t3.schemes.values():
scheme = scheme() # initialize
# filter schemes for eligibility
if scheme.degree < degree:
continue
# allow only positive weig... | |
14,284 | [
0.040026452392339706,
0.02655031532049179,
-0.020224781706929207,
-0.03306625038385391,
0.00006152486457722262,
0.011349995620548725,
0.019145844504237175,
0.037635866552591324,
0.062155239284038544,
0.02578871324658394,
0.051915913820266724,
-0.041761212050914764,
-0.020848872140049934,
0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields"... | def logout():
username = session['username']
session['mwo_token'] = None
session['username'] = None
if 'next' in request.args:
return redirect(request.args['next'])
return render_template('logout.html',
username=username
) | |
14,285 | [
0.012998769991099834,
0.027096319943666458,
-0.049673132598400116,
0.0022675287909805775,
-0.021830471232533455,
0.003926063887774944,
-0.012366454117000103,
0.017404254525899887,
-0.0026795710436999798,
0.038270700722932816,
0.028464611619710922,
-0.022245105355978012,
-0.02556217461824417,... | 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 oauth_authorized():
resp = mwoauth_mw.mwoauth.authorized_response()
next_url_key = request.args['oauth_token'] + '_target'
default_url = url_for(mwoauth_mw.default_return_to)
next_url = session.pop(next_url_key, default_url)
if resp is None:
flash(u'You denied the request to sign in.')... | |
14,286 | [
-0.003577340627089143,
0.03996330499649048,
0.02494337409734726,
-0.00926800724118948,
-0.044202208518981934,
-0.046333909034729004,
0.00961103942245245,
-0.02550692856311798,
0.007436458021402359,
0.06052076071500778,
0.033935729414224625,
-0.04520680382847786,
0.04209500551223755,
-0.009... | 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 show_map():
parameters, optional, error = validate_parameters(request.args)
if error:
return render_template('missingparameters.html',
parameters=parameters,
optional=optional
)
title = parameters['tit... | |
14,287 | [
-0.025372421368956566,
0.009922114200890064,
0.02268541045486927,
-0.0503043495118618,
-0.0529913604259491,
-0.031032761558890343,
-0.0030283923260867596,
-0.032464366406202316,
-0.004107601009309292,
0.03129705786705017,
0.01634230650961399,
-0.04224332049489021,
0.017091145738959312,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def validate_parameters(args):
try:
lat = float(args.get('lat', ''))
except ValueError:
lat = None
try:
lon = float(args.get('lon', ''))
except ValueError:
lon = None
osm_id = args.get('osm_id', '')
osm_ids = osm_id.split(',')
osm_ids_num = []
try:
... | |
14,288 | [
0.005745023488998413,
0.03351210057735443,
0.00047138449735939503,
-0.019713757559657097,
-0.0018807156011462212,
-0.021398363634943962,
-0.012827444821596146,
0.020999716594815254,
-0.009991904720664024,
0.05822824314236641,
0.0328691229224205,
-0.03510669246315956,
0.037215664982795715,
... | 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 anon_edit():
parameters, optional, error = validate_parameters(request.args)
if error:
return render_template('missingparameters.html',
parameters=parameters,
optional=optional
)
title = parameters['ti... | |
14,289 | [
0.00821757409721613,
0.024665173143148422,
-0.010857158340513706,
-0.024403706192970276,
-0.028487591072916985,
-0.03294500336050987,
0.031077371910214424,
0.026321139186620712,
-0.007514100056141615,
0.06379825621843338,
0.011199557222425938,
-0.06574059277772903,
0.01825297623872757,
0.0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def preview():
parameters, optional, error = validate_parameters(request.args)
if error:
return render_template('missingparameters.html',
parameters=parameters,
optional=optional)
next_url = 'preview?'\
'lat={lat}'\
... | |
14,290 | [
0.026586946099996567,
0.0257516298443079,
-0.01042952947318554,
-0.027398396283388138,
-0.005757720675319433,
0.004988035652786493,
0.03217163681983948,
0.07369882613420486,
-0.005590657237917185,
-0.005134216044098139,
0.015345966443419456,
-0.015369832515716553,
0.018699167296290398,
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 test_edit():
csrf_token = session.pop('_csrf_token', None)
if not csrf_token or csrf_token != request.form.get('_csrf_token'):
abort(403)
if mwoauth_mw.get_current_user(False) is None:
return 'Something went wrong, you are not logged in'
else:
edit_token = request.form['edi... | |
14,291 | [
-0.014131560921669006,
-0.038734786212444305,
-0.030709967017173767,
-0.009165297262370586,
0.012109803967177868,
-0.007703411392867565,
-0.023473113775253296,
0.02146172523498535,
0.027454419061541557,
0.029818320646882057,
0.012503787875175476,
-0.0317467637360096,
-0.004639672581106424,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def hello():
oauth_verifier = request.args.get('oauth_verifier')
oauth_token = request.args.get('oauth_token')
if oauth_verifier and oauth_token:
return redirect('/app/oauth-callback'
'?oauth_verifier={oauth_verifier}'
'&oauth_t... | |
14,292 | [
0.030856678262352943,
-0.0037771309725940228,
0.03639279678463936,
-0.04649455100297928,
-0.01548347994685173,
0.007008370012044907,
0.032378558069467545,
-0.03114341013133526,
-0.01890219748020172,
0.0036144661717116833,
0.020611556246876717,
-0.11381019651889801,
0.02357812039554119,
-0.... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "mo... | class OidStoreAssociation(models.Model):
server_url = models.TextField()
handle = models.CharField(max_length = 255)
secret = models.TextField()
issued = models.IntegerField()
lifetime = models.IntegerField()
assoc_type = models.CharField(max_length = 64)
class M... | |
14,293 | [
-0.01486677024513483,
-0.03222144767642021,
-0.04583415016531944,
-0.028216524049639702,
-0.018800901249051094,
-0.007190662436187267,
-0.01577698066830635,
0.008839154615998268,
0.030805565416812897,
0.03468913212418556,
0.0028444076888263226,
-0.03303052484989166,
-0.00009971229155780748,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def app_index():
oauth_verifier = request.args.get('oauth_verifier')
oauth_token = request.args.get('oauth_token')
if oauth_verifier and oauth_token:
return redirect('/app/oauth-callback'
'?oauth_verifier={oauth_verifier}'
'&oau... | |
14,294 | [
0.0013581322273239493,
-0.016027720645070076,
0.047989293932914734,
-0.021284248679876328,
0.00010486657993169501,
0.006758394185453653,
-0.026047978550195694,
-0.015265054069459438,
0.017541319131851196,
0.019770650193095207,
0.003077064175158739,
0.006811194121837616,
0.025531712919473648,... | 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": "x", "annotation": null... | class BitcastTest(tf.test.TestCase):
def _testBitcast(self, x, datatype, shape):
with self.test_session():
tf_ans = tf.bitcast(x, datatype)
out = tf_ans.eval()
buff_after = memoryview(out).tobytes()
buff_before = memoryview(x).tobytes()
self.assertEqual(buff_before, buff_after)
... | |
14,295 | [
0.01315365545451641,
-0.015696853399276733,
0.010823376476764679,
-0.017506664618849754,
-0.00680749025195837,
0.028176266700029373,
-0.004243591800332069,
-0.021753212437033653,
0.044334445148706436,
-0.0065117692574858665,
0.03165394067764282,
0.014218250289559364,
0.021398348733782768,
... | 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": "x", "annotation": null, "type_comment": null}}, {"_type": "arg", ... | def _testBitcast(self, x, datatype, shape):
with self.test_session():
tf_ans = tf.bitcast(x, datatype)
out = tf_ans.eval()
buff_after = memoryview(out).tobytes()
buff_before = memoryview(x).tobytes()
self.assertEqual(buff_before, buff_after)
self.assertEqual(tf_ans.get_shape(), s... | |
14,296 | [
0.011400513350963593,
0.026335401460528374,
0.0030602512415498495,
0.005242296494543552,
-0.009347775019705296,
-0.006885565351694822,
-0.06232568249106407,
0.013221578672528267,
-0.021755801513791084,
0.0029147816821932793,
-0.010597736574709415,
-0.04999847337603569,
-0.008534221909940243,... | 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": "request", "annotation": null, "type_comment": null}}], "kwarg": n... | def queryset(self, request):
qs = super(GuardedModelAdmin, self).queryset(request)
if request.user.is_superuser:
return qs
if self.user_can_access_owned_objects_only:
filters = {self.user_owned_objects_field: request.user}
qs = qs.filter(**filters)
if... | |
14,297 | [
-0.025020282715559006,
0.01493187714368105,
-0.009117121808230877,
0.004079394042491913,
-0.01665428839623928,
0.0018891479121521115,
0.012808002531528473,
0.02173086628317833,
-0.01332601998001337,
0.02549945004284382,
-0.04219258949160576,
0.008890489116311073,
0.0014609734062105417,
0.0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "TerminalDialog", "anno... | class Ui_TerminalDialog(object):
def setupUi(self, TerminalDialog):
TerminalDialog.setObjectName("TerminalDialog")
TerminalDialog.resize(1196, 394)
TerminalDialog.setModal(False)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(TerminalDialog)
self.horizontalLayout_3.setObject... | |
14,298 | [
-0.004118748474866152,
0.010641857981681824,
-0.026466047391295433,
0.020415976643562317,
-0.004404982086271048,
-0.009316145442426205,
-0.0017249330412596464,
0.026948124170303345,
-0.04136223718523979,
0.020319560542702675,
-0.04950934648513794,
0.007267316337674856,
0.0075143808498978615,... | 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": "TerminalDialog", "annotation": null, "type_comment": null}}], "kw... | def retranslateUi(self, TerminalDialog):
_translate = QtCore.QCoreApplication.translate
TerminalDialog.setWindowTitle(_translate("TerminalDialog", "Terminal"))
self.autoscrollCheckBox.setText(_translate("TerminalDialog", "Autoscroll"))
self.clearButton.setText(_translate("TerminalDialog"... | |
14,299 | [
-0.021937811747193336,
-0.002698801225051284,
-0.004802514798939228,
0.009064625948667526,
-0.0028515937738120556,
0.01071800384670496,
0.007816551253199577,
0.010261233896017075,
-0.022902818396687508,
0.028384054079651833,
-0.02969646267592907,
0.01711277849972248,
0.007025246042758226,
... | 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": "TerminalDialog", "annotation": null, "type_comment": null}}], "kw... | def setupUi(self, TerminalDialog):
TerminalDialog.setObjectName("TerminalDialog")
TerminalDialog.resize(1196, 394)
TerminalDialog.setModal(False)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(TerminalDialog)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
se... | |
14,300 | [
0.002228416735306382,
-0.015500497072935104,
0.012033744715154171,
-0.005508610978722572,
-0.019484324380755424,
-0.024326026439666748,
-0.01628786139190197,
-0.0003995579027105123,
0.03732341155409813,
-0.02038920484483242,
-0.0016217350494116545,
-0.015206703916192055,
0.01558275893330574,... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "status", "annotation": null, "type_comment": null}}], "kwarg":... | def generate_identity_headers(context, status='Confirmed'):
return {
'X-Auth-Token': getattr(context, 'auth_token', None),
'X-User-Id': getattr(context, 'user', None),
'X-Tenant-Id': getattr(context, 'tenant', None),
'X-Roles': ','.join(context.roles),
'X-Identity-Status': st... |