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 |
|---|---|---|---|---|---|
11,301 | [
-0.009538514539599419,
-0.03157801926136017,
0.044578179717063904,
-0.037806808948516846,
-0.009446276351809502,
-0.008003019727766514,
-0.009896616451442242,
-0.011274763382971287,
0.010818998329341412,
0.007992168888449669,
-0.0010071597062051296,
-0.023678088560700417,
0.02513219602406025... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "\n%%pre\n%%include %s\n%%end\n"}}, "targets": [{"_type": "Name", "_fields": {"id": "ks", "ctx": {"_type": "Store", "_fields": {}}}}], "ty... | class Include_Pre_TestCase(Base_Include):
ks = """
%%pre
%%include %s
%%end
"""
includeKS = """
ls /tmp
"""
def runTest(self):
self.parser.readKickstartFromString(self.ks % self._path)
self.assertEqual(len(self.handler.scripts), 1)
# Verify the script defaults.
script = se... | |
11,302 | [
0.019661521539092064,
0.02415391616523266,
0.01532081700861454,
-0.05586905777454376,
0.011417684145271778,
0.0008868104196153581,
-0.010064131580293179,
0.014445675536990166,
0.03969643637537956,
0.024340612813830376,
-0.0038418727926909924,
-0.03932304307818413,
0.006598569918423891,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def runTest(self):
self.parser.readKickstartFromString(self.ks % self._path)
self.assertEqual(len(self.handler.scripts), 1)
# Verify the script defaults.
script = self.handler.scripts[0]
self.assertEqual(script.interp, "/bin/sh")
self.assertFalse(script.inChroot)
... | |
11,303 | [
-0.03621535375714302,
-0.07355470955371857,
0.027583016082644463,
-0.0134205874055624,
-0.012926026247441769,
-0.0018026187317445874,
0.03713703528046608,
0.017444515600800514,
0.009778819978237152,
0.013488027267158031,
0.02280600741505623,
-0.02472805045545101,
-0.0016283983131870627,
-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 setUp(self):
super(Include_URL_TestCase, self).setUp()
server = six.moves.BaseHTTPServer.HTTPServer(('127.0.0.1', 0), six.moves.SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd_port = server.server_port
self._httpd_pid = os.fork()
if self._httpd_pid == 0:
os.chdi... | |
11,304 | [
-0.014750250615179539,
-0.00034930737456306815,
-0.0494745634496212,
-0.054282717406749725,
0.042801566421985626,
0.022434310987591743,
0.02752331644296646,
0.002691948786377907,
0.03644311800599098,
0.01976061798632145,
0.046733465045690536,
-0.03882472589612007,
-0.01098124124109745,
-0.... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page_url", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"... | def test_video_exists( page_url ):
logger.info("[firedrive.py] test_video_exists(page_url='%s')" % page_url)
data = scrapertools.cache_page(page_url)
if '<div class="sad_face_image">' in data and '404:' in data:
return False,"El video ha sido borrado de Firedrive"
return True,"" | |
11,305 | [
-0.006799211259931326,
-0.011157980188727379,
-0.016461247578263283,
-0.04829258471727371,
-0.009750033728778362,
-0.0030153533443808556,
-0.006799211259931326,
-0.018995553255081177,
0.011187313124537468,
0.0172121524810791,
0.00021962507162243128,
-0.02928529866039753,
0.010037489235401154... | 9 | {"_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 find_videos(text):
encontrados = set()
devuelve = []
# http://www.peliculasaudiolatino.com/show/firedrive.php?url=CEE0B3A7DDFED758
patronvideos = '(?:firedrive|putlocker).php\?url=([A-Z0-9]+)'
logger.info("[firedrive.py] find_videos #"+patronvideos+"#")
matches = re.compile(patronvideos,re... | |
11,306 | [
-0.004892036784440279,
-0.0161645095795393,
-0.049846116453409195,
-0.049668725579977036,
0.007971387356519699,
0.015543650835752487,
0.021452898159623146,
0.03809414058923721,
0.024723496288061142,
0.005008447915315628,
0.045943573117256165,
-0.033548563718795776,
-0.0013352627865970135,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page_url", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "premium", "annotation": null, "type_comment": null}}, {"_type... | def get_video_url( page_url , premium = False , user="" , password="", video_password="" ):
logger.info("[firedrive.py] url="+page_url)
video_urls = []
headers = []
headers.append( [ "User-Agent" , "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.131... | |
11,307 | [
0.0025751194916665554,
-0.010674134828150272,
0.05054333433508873,
-0.024960286915302277,
-0.028123915195465088,
0.011751512065529823,
-0.021746836602687836,
0.01118479948490858,
0.021597374230623245,
-0.011913429945707321,
-0.00037463006447069347,
-0.02660437673330307,
-0.010661679320037365... | 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 TestLimitInvocation(unittest.TestCase):
def test_not_too_often(self):
self.count = 0
now = time.time()
end = now + 1.1 # a bit more than 1 s
while time.time() < end:
self.count_max_1s()
time.sleep(0.01)
self.assertLessEqual(
self.cou... | |
11,308 | [
0.027774838730692863,
-0.04523409530520439,
0.018838346004486084,
-0.024506399407982826,
0.00043742958223447204,
0.04200702905654907,
0.024051301181316376,
-0.007550508715212345,
0.026147514581680298,
0.03425655514001846,
0.01780403032898903,
-0.042972393333911896,
-0.009557082317769527,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_not_too_often(self):
self.count = 0
now = time.time()
end = now + 1.1 # a bit more than 1 s
while time.time() < end:
self.count_max_1s()
time.sleep(0.01)
self.assertLessEqual(
self.count,
2,
"method was called ... | |
11,309 | [
-0.029049567878246307,
0.015334841795265675,
0.006092308554798365,
-0.03123222291469574,
0.009973835200071335,
-0.010316984727978706,
-0.0014281484764069319,
-0.005510079674422741,
-0.057559095323085785,
0.03217729181051254,
0.01765250600874424,
-0.040817905217409134,
-0.013928491622209549,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_filters(self, *args, **kwargs):
project = Project.objects.get(pk=kwargs['pid'])
self.project_layers = ProjectLayer.objects.filter(project=project)
in_current_project_filter = TableFilter(
"in_current_project",
"Filter by project layers"
)
crite... | |
11,310 | [
-0.023804374039173126,
-0.04466243088245392,
0.03117016702890396,
-0.04445197805762291,
0.004244099836796522,
0.009137091226875782,
-0.017128393054008484,
0.0030807724688202143,
-0.04045340418815613,
0.021933695301413536,
-0.017502527683973312,
-0.061545297503471375,
-0.00855250470340252,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_queryset(self, *args, **kwargs):
prj = Project.objects.get(pk = kwargs['pid'])
compatible_layers = prj.get_all_compatible_layer_versions()
self.static_context_extra['current_layers'] = \
prj.get_project_layer_versions(pk=True)
self.queryset = compatible_layers... | |
11,311 | [
-0.026734469458460808,
0.030979469418525696,
0.008619834668934345,
-0.025424841791391373,
0.0034123705700039864,
-0.0018684774404391646,
-0.006474754307419062,
0.00671748723834753,
-0.04954005405306816,
0.018538005650043488,
0.03167944401502609,
-0.041140373796224594,
-0.00640136981382966,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_filters(self, *args, **kwargs):
project = Project.objects.get(pk=kwargs['pid'])
in_current_project_filter = TableFilter(
"in_current_project",
"Filter by project machines"
)
in_project_action = TableFilterActionToggle(
"in_project",
... | |
11,312 | [
-0.003423301735892892,
0.012906376272439957,
0.008044465444982052,
-0.06383899599313736,
0.01083360519260168,
-0.016288574784994125,
-0.008884143084287643,
-0.05900057777762413,
-0.03772091120481491,
0.050404153764247894,
0.01458573155105114,
-0.02130315452814102,
0.009424355812370777,
-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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
layer_link_template = '''
<a href="{% url 'layerdetails' extra.pid data.id %}">
{{data.layer.name}}
</a>
'''
self.add_column(title="Layer",
hideable=False,
orderable=True,
... | |
11,313 | [
0.0275579784065485,
0.03699833154678345,
0.0015711209271103144,
-0.06470892578363419,
0.014378550462424755,
-0.009358594194054604,
-0.014618374407291412,
-0.05816826596856117,
-0.024265846237540245,
0.041882023215293884,
0.026533275842666626,
-0.018728088587522507,
0.019142329692840576,
-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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
self.add_column(title="Machine",
hideable=False,
orderable=True,
field_name="name")
self.add_column(title="Description",
field_name="description")
layer_li... | |
11,314 | [
-0.021246453747153282,
-0.012692841701209545,
0.028854981064796448,
-0.04280394688248634,
0.001589596038684249,
0.0003854359092656523,
-0.03105618990957737,
0.024093668907880783,
-0.03919109329581261,
0.02318447455763817,
0.0036906141322106123,
-0.0704386904835701,
-0.016772257164120674,
0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_queryset(self, *args, **kwargs):
prj = Project.objects.get(pk = kwargs['pid'])
self.queryset = prj.get_all_compatible_machines()
self.queryset = self.queryset.order_by(self.default_orderby)
self.static_context_extra['current_layers'] = \
self.project_layers = \... | |
11,315 | [
0.02132595144212246,
0.03230664134025574,
0.014592614024877548,
-0.04383357986807823,
0.016420871019363403,
-0.013923739083111286,
-0.00862848199903965,
-0.02764681726694107,
-0.024681473150849342,
0.01586347632110119,
0.015395263209939003,
-0.023901117965579033,
0.021259063854813576,
0.00... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
self.add_column(title="Machine",
hideable=False,
orderable=True,
field_name="name")
self.add_column(title="Description",
field_name="description")
select_bt... | |
11,316 | [
-0.020634306594729424,
-0.02639136090874672,
0.0016231854679062963,
-0.024429524317383766,
0.02980121783912182,
-0.0005853393231518567,
0.009581465274095535,
0.01617346704006195,
-0.05203535407781601,
-0.010889355093240738,
0.018765892833471298,
-0.03458902984857559,
0.0012443935265764594,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def get_context_data(self, **kwargs):
project = Project.objects.get(pk=kwargs['pid'])
context = super(RecipesTable, self).get_context_data(**kwargs)
context['project'] = project
context['projectlayers'] = [player.layercommit.id for player in ProjectLayer.objects.filter(project=context['... | |
11,317 | [
-0.05398986116051674,
-0.026001110672950745,
0.011446266435086727,
-0.03644777834415436,
0.02424459159374237,
-0.008227907121181488,
-0.018547458574175835,
0.058843400329351425,
-0.040538620203733444,
-0.0021162014454603195,
0.022950313985347748,
-0.07261820882558823,
-0.0020786442328244448,... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_queryset(self, *args, **kwargs):
prj = Project.objects.get(pk = kwargs['pid'])
# Project layers used by the filters
self.project_layers = prj.get_project_layer_versions(pk=True)
# Project layers used to switch the button states
self.static_context_extra['current_layer... | |
11,318 | [
-0.04527943208813667,
0.03122871369123459,
-0.0072400844655931,
-0.027242537587881088,
-0.00030144077027216554,
0.006182976998388767,
-0.01069770660251379,
-0.003928365185856819,
-0.05162207782268524,
0.028343690559267998,
0.013643291778862476,
-0.04642463102936745,
0.013907568529248238,
0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_filters(self, *args, **kwargs):
table_filter = TableFilter(
'in_current_project',
'Filter by project recipes'
)
in_project_action = TableFilterActionToggle(
'in_project',
'Recipes provided by layers added to this project',
Pr... | |
11,319 | [
0.03611200675368309,
0.00003217057019355707,
0.008686776272952557,
-0.07092851400375366,
0.016841473057866096,
-0.02813081257045269,
-0.005462490487843752,
-0.05640042945742607,
-0.05963917449116707,
0.02683531492948532,
0.033150866627693176,
-0.024198051542043686,
0.02223167009651661,
0.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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
self.add_column(title="Version",
hidden=False,
field_name="version")
self.add_column(title="Description",
field_name="get_description_or_summary")
recipe_file_template = '''
... | |
11,320 | [
0.03217395767569542,
-0.018615737557411194,
0.012169658206403255,
-0.05996774137020111,
0.0032004620879888535,
-0.034115683287382126,
0.004219303838908672,
-0.03842812404036522,
-0.051794424653053284,
0.006987957749515772,
0.01910117082297802,
-0.031315986067056656,
0.04075367748737335,
-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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
self.add_column(title="Recipe",
help_text="Information about a single piece of software, including where to download the source, configuration options, how to compile the source files and how to package the compiled output",
... | |
11,321 | [
0.02859838306903839,
-0.021030273288488388,
-0.00655088946223259,
-0.03715464472770691,
-0.0022901955526322126,
-0.04594341665506363,
-0.006446261424571276,
-0.05017504841089249,
-0.057336267083883286,
-0.011648609302937984,
0.02497127093374729,
-0.04226980358362198,
0.03145822137594223,
-... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
name_link_template = '''
<a href="{% url 'customrecipe' extra.pid data.id %}">
{{data.name}}
</a>
'''
self.add_column(title="Custom image",
hideable=False,
orderable=True,
... | |
11,322 | [
0.02947731502354145,
-0.028115777298808098,
-0.005630530416965485,
0.027162699028849602,
-0.0005123498849570751,
-0.024144621565937996,
0.010812886990606785,
0.023146159946918488,
-0.045452702790498734,
0.0009934979025274515,
-0.019106928259134293,
-0.014205388724803925,
0.010756156407296658... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def get_context_data(self, **kwargs):
context = super(CustomImagesTable, self).get_context_data(**kwargs)
empty_state_template = '''
You have not created any custom images yet.
<a href="{% url 'newcustomimage' data.pid %}">
Create your first custom image</a>
'''
... | |
11,323 | [
0.03233440965414047,
-0.00871939118951559,
-0.004944728221744299,
-0.03265497460961342,
-0.01354924961924553,
-0.020826095715165138,
0.0018031828803941607,
-0.03333884850144386,
-0.05552200600504875,
-0.014201067388057709,
0.03182150423526764,
-0.01869967393577099,
0.022610578685998917,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
name_link_template = '''
<a href="{% url 'recipedetails' extra.pid data.pk %}">{{data.name}}</a>
'''
self.add_column(title="Image recipe",
help_text="When you build an image recipe, you get an "
... | |
11,324 | [
0.00252263224683702,
-0.03808850049972534,
-0.008325769565999508,
-0.016597405076026917,
-0.011259818449616432,
-0.012645642273128033,
0.006642209831625223,
0.015438943170011044,
-0.06309828907251358,
-0.01912003755569458,
-0.0033238118048757315,
-0.0651337206363678,
0.023212548345327377,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_queryset(self, *args, **kwargs):
super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
custom_image_recipes = CustomImageRecipe.objects.filter(
project=kwargs['pid'])
self.queryset = self.queryset.filter(
Q(is_image=True) & ~Q(pk__in=custom_ima... | |
11,325 | [
0.02925778366625309,
0.002332122530788183,
-0.00005219528611632995,
-0.030578823760151863,
-0.00784502737224102,
-0.020833447575569153,
-0.0021588713862001896,
-0.03469353914260864,
-0.059511762112379074,
-0.009783274494111538,
0.024125218391418457,
-0.013686838559806347,
0.03027563355863094... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
name_link_template = '''
<a href="{% url 'recipedetails' extra.pid data.pk %}">{{data.name}}</a>
'''
self.add_column(title="Image recipe",
help_text="When you build an image recipe, you get an "
... | |
11,326 | [
0.03176308423280716,
-0.008017705753445625,
0.01478247344493866,
-0.046336736530065536,
0.013573498465120792,
-0.028905505314469337,
0.008045182563364506,
-0.025410467758774757,
-0.05389832705259323,
0.020508620887994766,
0.0228826105594635,
-0.03211478516459465,
0.021058155223727226,
0.00... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
self.add_column(title="Software recipe",
help_text="Information about a single piece of "
"software, including where to download the source, "
"configuration options, how to compile the source "
... | |
11,327 | [
0.02499476447701454,
-0.007621830329298973,
0.019514305517077446,
-0.04604553431272507,
-0.004721300210803747,
-0.006877794396132231,
-0.0187884159386158,
-0.06479765474796295,
-0.04193216562271118,
0.03474586829543114,
0.01986515149474144,
-0.016489768400788307,
0.04473893344402313,
-0.01... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
self.add_column(title="Package",
hideable=False,
orderable=True,
field_name="name")
self.add_column(title="Package Version",
field_name="version",
... | |
11,328 | [
-0.0016915476880967617,
-0.03741016983985901,
0.029173068702220917,
-0.052168309688568115,
-0.01429235190153122,
-0.0002907347516156733,
-0.017675448209047318,
0.02479710802435875,
-0.06746578216552734,
-0.002157336100935936,
0.0218675434589386,
-0.06986827403306961,
0.012447584420442581,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_queryset(self, *args, **kwargs):
self.cust_recipe =\
CustomImageRecipe.objects.get(pk=kwargs['custrecipeid'])
prj = Project.objects.get(pk = kwargs['pid'])
current_packages = self.cust_recipe.get_all_packages()
current_recipes = prj.get_available_recipes()
... | |
11,329 | [
0.015376008115708828,
0.00009501828026259318,
0.007388337515294552,
-0.008623171597719193,
-0.012999340891838074,
-0.011025672778487206,
0.013795007951557636,
-0.014084341004490852,
-0.04464002326130867,
0.014342674054205418,
0.026081347838044167,
-0.030318016186356544,
0.04137469083070755,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
super(SelectPackagesTable, self).setup_columns(*args, **kwargs)
add_remove_template = '{% include "pkg_add_rm_btn.html" %}'
self.add_column(title="Add | Remove",
hideable=False,
help_text="Use the add and... | |
11,330 | [
0.01982612907886505,
-0.07974132150411606,
0.014329656027257442,
-0.029945462942123413,
-0.00696462532505393,
-0.003791716881096363,
0.028101172298192978,
0.014827129431068897,
-0.07449965178966522,
-0.03489592671394348,
0.015130466781556606,
-0.058774642646312714,
0.02652381733059883,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def get_context_data(self, **kwargs):
# to reuse the Super class map the custrecipeid to the recipe_id
kwargs['recipe_id'] = kwargs['custrecipeid']
context = super(SelectPackagesTable, self).get_context_data(**kwargs)
custom_recipe = \
CustomImageRecipe.objects.get(pk=kwargs[... | |
11,331 | [
-0.026007073000073433,
0.015616011805832386,
-0.03963430970907211,
-0.036762937903404236,
-0.019146382808685303,
-0.006619447376579046,
0.010491088964045048,
0.01685164123773575,
-0.05224950611591339,
0.014804026111960411,
0.03217345476150513,
-0.05069614201784134,
0.01123246643692255,
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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_filters(self, *args, **kwargs):
in_current_image_filter = TableFilter(
'in_current_image_filter',
'Filter by added packages'
)
in_image_action = TableFilterActionToggle(
'in_image',
'Packages in %s' % self.cust_recipe.name,
Q... | |
11,332 | [
-0.0037613266613334417,
-0.011760164983570576,
0.03937889635562897,
-0.029641179367899895,
-0.02559628337621689,
-0.0112144248560071,
-0.026666361838579178,
-0.012166794389486313,
-0.05521606281399727,
0.007383543066680431,
-0.0016492587747052312,
-0.04674103856086731,
0.009261530824005604,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_queryset(self, *args, **kwargs):
queryset = Project.objects.all()
# annotate each project with its number of builds
queryset = queryset.annotate(num_builds=Count('build'))
# exclude the command line builds project if it has no builds
q_default_with_builds = Q(is_defau... | |
11,333 | [
0.012717166915535927,
-0.010254379361867905,
0.0490572489798069,
-0.06069500744342804,
0.006222106516361237,
-0.019900815561413765,
-0.01243800949305296,
-0.06124091520905495,
-0.04697287455201149,
0.03401997312903404,
0.008101765997707844,
-0.016513707116246223,
0.001597400289028883,
-0.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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
name_template = '''
{% load project_url_tag %}
<span data-project-field="name">
<a href="{% project_url data %}">
{{data.name}}
</a>
</span>
'''
last_activity_on_template = '''
{% load proj... | |
11,334 | [
0.023057052865624428,
-0.013007850386202335,
0.02513575740158558,
-0.05442892760038376,
-0.011853721924126148,
-0.01836402341723442,
-0.005340232513844967,
-0.06514127552509308,
-0.035044677555561066,
0.021960312500596046,
0.026270756497979164,
-0.03489164635539055,
-0.02451086975634098,
-... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_columns(self, *args, **kwargs):
outcome_template = '''
{% if data.outcome == data.SUCCEEDED %}
<span class="glyphicon glyphicon-ok-circle"></span>
{% elif data.outcome == data.FAILED %}
<span class="glyphicon glyphicon-minus-sign"></span>
{% endif %}
... | |
11,335 | [
-0.024412835016846657,
-0.032094355672597885,
0.016191206872463226,
-0.04599310830235481,
-0.008365657180547714,
0.005602109711617231,
-0.009961972944438457,
0.03725538030266762,
0.019515864551067352,
-0.005758140701800585,
0.021904338151216507,
-0.04436078667640686,
-0.035166963934898376,
... | 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 TestCurrencyFilter(TestCase):
def setUp(self):
self.template = template.Template(
"{% load currency_filters %}"
"{{ price|currency }}"
)
def test_renders_price_correctly(self):
out = self.template.render(template.Context({
'price': D('10.23'),
... | |
11,336 | [
-0.007932310923933983,
0.01848020777106285,
0.009557885117828846,
-0.01937243901193142,
-0.03109368123114109,
-0.009142324328422546,
-0.0035597621463239193,
-0.028355872258543968,
-0.03544484078884125,
0.049916114658117294,
0.02742697298526764,
-0.035933736711740494,
-0.003118229331448674,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def setup_filters(self, *args, **kwargs):
# outcomes
outcome_filter = TableFilter(
'outcome_filter',
'Filter builds by outcome'
)
successful_builds_action = TableFilterActionToggle(
'successful_builds',
'Successful builds',
Q(o... | |
11,337 | [
-0.009354212321341038,
-0.04954506829380989,
0.05728648602962494,
-0.05794333294034004,
-0.006492233835160732,
-0.0012323221890255809,
0.026226982474327087,
0.009829253889620304,
0.03490675240755081,
0.01005797740072012,
0.017887365072965622,
-0.022461839020252228,
-0.04159252345561981,
-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_formatting_settings(self):
template1 = template.Template(
"{% load currency_filters %}"
"{{ price|currency:'AUD' }}"
)
out1 = template1.render(template.Context({
'price': D('10.23'),
}))
self.assertEqual(out1, 'A$10.23')
templa... | |
11,338 | [
0.040307607501745224,
-0.0005962742143310606,
-0.05719982832670212,
-0.0009083554032258689,
0.04343107342720032,
-0.013163184747099876,
0.014469942077994347,
0.01697721518576145,
0.038140300661325455,
-0.04559837654232979,
0.029088620096445084,
-0.032297078520059586,
0.025412702932953835,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "targets": [{"_type": "Name", "_fields": {"id": "_json_field", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}... | class HttpJsonStream(HttpStream):
_json_field = None
def next(self):
# Python 2.x Version
while '}' not in self.buffer and not self.response_done:
self._read()
if '}' in self.buffer:
idx = self.buffer.index('}') + 1
chunk = self.buffer[:idx]
... | |
11,339 | [
0.019194701686501503,
0.0008724865037947893,
0.02265172451734543,
0.009191288612782955,
-0.0038109549786895514,
-0.02486860752105713,
0.02484665811061859,
0.023156559094786644,
0.030882729217410088,
0.03781872242689133,
0.007698732893913984,
-0.045040056109428406,
0.003366480814293027,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "response", "annotation": null, "type_comment": null}}], "kwarg": ... | def __init__(self, response):
super(HttpMultipartStream, self).__init__(response)
ctypehdr = response.getheader('content-type')
_, params = parse_header(ctypehdr)
self.boundary_re = re.compile('\r?\n--%s(?:--)?\r?\n' %
re.escape(params['boundary']))
... | |
11,340 | [
0.032417792826890945,
-0.014790017157793045,
-0.04778498411178589,
-0.03345189243555069,
0.04934815689921379,
0.012914210557937622,
0.016593677923083305,
0.053340256214141846,
0.019130827859044075,
0.0006831364589743316,
0.04542819783091545,
-0.0467027872800827,
0.006793788634240627,
0.028... | 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 next(self):
# Python 2.x Version
while '}' not in self.buffer and not self.response_done:
self._read()
if '}' in self.buffer:
idx = self.buffer.index('}') + 1
chunk = self.buffer[:idx]
self.buffer = self.buffer[idx:]
jsdict = json.... | |
11,341 | [
0.07133638113737106,
-0.046537622809410095,
-0.013643881306052208,
-0.01269623078405857,
0.04000682756304741,
-0.01084659993648529,
-0.01127475593239069,
0.017034871503710747,
0.05640232190489769,
-0.04407145082950592,
-0.00012229185085743666,
-0.052748728543519974,
0.025552306324243546,
-... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def next(self):
message = super(HttpIndexStream, self).next()
payload = json.loads(message.get_payload())
if u'error' in payload:
raise RiakError(payload[u'error'])
elif u'keys' in payload:
return payload[u'keys']
elif u'results' in payload:
st... | |
11,342 | [
0.059746090322732925,
0.022440863773226738,
0.014708025380969048,
0.04911494255065918,
0.016560057178139687,
0.029391998425126076,
0.06624022871255875,
0.0390610508620739,
-0.000507354736328125,
0.030787035822868347,
0.0009711144957691431,
-0.03362521529197693,
-0.019566604867577553,
-0.00... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def next(self):
# multipart/mixed starts with a boundary, then the first part.
if not self.seen_first:
self.read_until_boundary()
self.advance_buffer()
self.seen_first = True
self.read_until_boundary()
if self.next_boundary:
part = self.a... | |
11,343 | [
0.033350832760334015,
0.010399551130831242,
0.003034309484064579,
-0.027930526062846184,
-0.0009000633144751191,
0.006042048800736666,
-0.030077392235398293,
0.011212596669793129,
0.05382046476006508,
0.011361389420926571,
0.007625628728419542,
-0.05675381049513817,
0.01973629556596279,
0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def openstack_argument_spec():
# DEPRECATED: This argument spec is only used for the deprecated old
# OpenStack modules. It turns out that modern OpenStack auth is WAY
# more complex than this.
# Consume standard OpenStack environment variables.
# This is mainly only useful for ad-hoc command line o... | |
11,344 | [
-0.03412408009171486,
-0.0433620922267437,
0.041602469980716705,
-0.05316569283604622,
-0.029096590355038643,
-0.014852039515972137,
-0.012034551240503788,
-0.019575783982872963,
0.031086638569831848,
-0.0006840788992121816,
-0.006923270877450705,
-0.02962028793990612,
0.01734483614563942,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "addresses", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ext_tag", "annotation": null, "type_comment": null}}, {"_typ... | def openstack_find_nova_addresses(addresses, ext_tag, key_name=None):
ret = []
for (k, v) in addresses.iteritems():
if key_name and k == key_name:
ret.extend([addrs['addr'] for addrs in v])
else:
for interface_spec in v:
if 'OS-EXT-IPS:type' in interface_... | |
11,345 | [
0.025846421718597412,
-0.0038670941721647978,
0.009765127673745155,
-0.005344849079847336,
-0.005661696195602417,
-0.02351941354572773,
-0.04753747209906578,
0.011416887864470482,
0.02617885172367096,
0.03502979874610901,
-0.0034359742421656847,
-0.044545602053403854,
-0.015925468876957893,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def openstack_full_argument_spec(**kwargs):
spec = dict(
cloud=dict(default=None),
auth_type=dict(default=None),
auth=dict(default=None),
region_name=dict(default=None),
availability_zone=dict(default=None),
verify=dict(default=True, aliases=['validate_certs']),
... | |
11,346 | [
0.03059525415301323,
0.004501364193856716,
0.011942505836486816,
-0.03592460975050926,
0.014682700857520103,
0.01933240331709385,
-0.021792106330394745,
0.018080973997712135,
-0.006607754621654749,
0.025611117482185364,
0.004536426160484552,
-0.07767483592033386,
-0.012028810568153858,
-0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def openstack_module_kwargs(**kwargs):
ret = {}
for key in ('mutually_exclusive', 'required_together', 'required_one_of'):
if key in kwargs:
if key in ret:
ret[key].extend(kwargs[key])
else:
ret[key] = kwargs[key]
return ret | |
11,347 | [
0.03671205788850784,
0.02774621918797493,
0.027506839483976364,
-0.008900552056729794,
-0.0019041523337364197,
0.016353948041796684,
0.0013886711094528437,
0.004806624259799719,
-0.001103728311136365,
-0.04154316335916519,
0.059888310730457306,
-0.016343066468834877,
0.002907912479713559,
... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "input_fasta", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "chunk_size", "annotation": null, "type_comment": null}}, {... | def cut_up_fasta(input_fasta, chunk_size, overlap, merge_last, output_fasta, output_bed, gzipped):
if gzipped:
_open = partial(gzip.open, mode='rt')
else:
_open = open
fasta_fh = open(output_fasta, 'w')
if output_bed is not None:
bed_fh = open(output_bed, 'w')
with _open(i... | |
11,348 | [
0.040825117379426956,
-0.018395153805613518,
0.0034410166554152966,
-0.002983870916068554,
0.022658536210656166,
0.014519351534545422,
0.049530766904354095,
0.008452230133116245,
-0.052750661969184875,
0.04563508555293083,
0.04913324862718582,
-0.022777792066335678,
-0.03416668623685837,
-... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "seq", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "chunk_size", "annotation": null, "type_comment": null}}, {"_type":... | def chunks(seq, chunk_size, overlap_size, merge_last):
# Yield successive chunk_size-sized chunks from seq
# with given overlap overlap_size between the chunks.
assert chunk_size > overlap_size
if merge_last:
for i in range(0, len(seq) - chunk_size + 1, chunk_size - overlap_size):
yi... | |
11,349 | [
0.004206924233585596,
0.018600862473249435,
0.00529052596539259,
-0.0032276264391839504,
0.025821011513471603,
-0.0013465344673022628,
-0.0036129713989794254,
-0.053728099912405014,
-0.059939976781606674,
0.01178054604679346,
-0.009497449733316898,
-0.03995998576283455,
-0.017859145998954773... | 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": "props", "annotation": ... | class PrinterState(gof.utils.scratchpad):
def __init__(self, props=None, **more_props):
if props is None:
props = {}
if isinstance(props, gof.utils.scratchpad):
self.__update__(props)
else:
self.__dict__.update(props)
self.__dict__.update(more_pro... | |
11,350 | [
0.03429623693227768,
0.05678796023130417,
-0.036822304129600525,
-0.02601364627480507,
0.035292088985443115,
0.009806731715798378,
-0.03201305866241455,
-0.02237027883529663,
-0.0058142077177762985,
-0.05387326702475548,
-0.007013482972979546,
0.013286148197948933,
-0.016346577554941177,
0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "op", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "xin", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def _print_fn(op, xin):
for attr in op.attrs:
temp = getattr(xin, attr)
if callable(temp):
pmsg = temp()
else:
pmsg = temp
print(op.message, attr, '=', pmsg) | |
11,351 | [
0.023226184770464897,
0.02633408084511757,
-0.005845098290592432,
0.0055277845822274685,
0.002654166892170906,
0.007224078755825758,
0.01928793452680111,
-0.058646708726882935,
-0.04230060055851936,
0.027449127286672592,
0.012704414315521717,
-0.03008253499865532,
0.0007428701501339674,
-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": "props", "annotation": null, "type_comment": null}}], "kwarg": {"_... | def __init__(self, props=None, **more_props):
if props is None:
props = {}
if isinstance(props, gof.utils.scratchpad):
self.__update__(props)
else:
self.__dict__.update(props)
self.__dict__.update(more_props) | |
11,352 | [
0.022781988605856895,
0.006355230696499348,
-0.013666772283613682,
-0.03725980967283249,
0.007390225306153297,
0.02493671514093876,
-0.03716296702623367,
0.007668645121157169,
-0.018048854544758797,
0.010477052070200443,
-0.01599097065627575,
-0.012153621762990952,
-0.0012006846955046058,
... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "operator", "annotation... | class OperatorPrinter:
def __init__(self, operator, precedence, assoc='left'):
self.operator = operator
self.precedence = precedence
self.assoc = assoc
assert self.assoc in VALID_ASSOC
def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.o... | |
11,353 | [
0.022201212123036385,
0.020162593573331833,
-0.026278449222445488,
-0.02112271822988987,
0.016545690596103668,
-0.0072206552140414715,
-0.0045342822559177876,
0.00952889770269394,
0.00783224031329155,
0.022543175145983696,
-0.003511684713885188,
0.004353436641395092,
-0.0060040601529181,
-... | 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": "output", "annotation": null, "type_comment": null}}, {"_type": "a... | def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("operator %s cannot represent a variable that is "
"not the result of an operation" % self.operator)
# Precedence seems to be buggy,... | |
11,354 | [
0.010738201439380646,
-0.0115418191999197,
0.042300593107938766,
-0.03731583058834076,
0.01369644794613123,
-0.005561270285397768,
-0.030164794996380806,
0.01857638917863369,
-0.04369819164276123,
0.038969654589891434,
-0.004227729979902506,
-0.03198166936635971,
-0.016177181154489517,
-0.... | 14 | {"_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 PatternPrinter:
def __init__(self, *patterns):
self.patterns = []
for pattern in patterns:
if isinstance(pattern, string_types):
self.patterns.append((pattern, ()))
else:
self.patterns.append((pattern[0], pattern[1:]))
def process(s... | |
11,355 | [
0.01014996599406004,
-0.002324017696082592,
0.011003861203789711,
-0.06767403334379196,
0.024318931624293327,
-0.026892002671957016,
-0.030421435832977295,
0.0016067458782345057,
-0.032174766063690186,
-0.010571220889687538,
0.00009428424527868629,
-0.022406207397580147,
-0.02343088015913963... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg... | class FunctionPrinter:
def __init__(self, *names):
self.names = names
def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("function %s cannot represent a variable that is "
"n... | |
11,356 | [
0.02002919837832451,
0.01753673329949379,
0.020157016813755035,
-0.029679514467716217,
-0.0015466068871319294,
-0.01148451492190361,
0.014954794198274612,
0.009036785922944546,
-0.0008428049040958285,
0.027838924899697304,
-0.0007908785482868552,
0.0018981085158884525,
-0.00807175412774086,
... | 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": "output", "annotation": null, "type_comment": null}}, {"_type": "a... | def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("Patterns %s cannot represent a variable that is "
"not the result of an operation" % self.patterns)
idx = node.outputs.index(output)... | |
11,357 | [
0.01865403912961483,
-0.013669697567820549,
0.021701933816075325,
-0.06902452558279037,
0.018356123939156532,
-0.008708273060619831,
-0.04136429727077484,
-0.012134291231632233,
-0.040241390466690063,
-0.015422810800373554,
0.0027184707578271627,
-0.025368575006723404,
-0.024933161213994026,... | 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": {"_type": "arg", "_fields": {"arg... | class MemberPrinter:
def __init__(self, *names):
self.names = names
def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("function %s cannot represent a variable that is"
" not... | |
11,358 | [
0.020595423877239227,
0.015250805765390396,
-0.025057557970285416,
-0.04399988055229187,
0.0011139799607917666,
-0.03336036205291748,
-0.007693764287978411,
0.0025619985535740852,
0.009054777212440968,
0.004104791209101677,
0.00795478094369173,
0.012000531889498234,
-0.03181912377476692,
-... | 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": "output", "annotation": null, "type_comment": null}}, {"_type": "a... | def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("function %s cannot represent a variable that is "
"not the result of an operation" % self.names)
idx = node.outputs.index(output)
... | |
11,359 | [
0.018086209893226624,
0.00943385623395443,
-0.02805967442691326,
-0.04686536267399788,
0.004986732732504606,
-0.03818199783563614,
-0.0076351589523255825,
0.004388200584799051,
0.013694907538592815,
-0.0007516538025811315,
0.006872263271361589,
0.0054457103833556175,
-0.02813410386443138,
... | 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": "output", "annotation": null, "type_comment": null}}, {"_type": "a... | def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("function %s cannot represent a variable that is"
" not the result of an operation" % self.function)
idx = node.outputs.index(output)... | |
11,360 | [
0.018266845494508743,
0.00635570241138339,
-0.02151428535580635,
-0.05478893965482712,
0.0159472469240427,
-0.023868678137660027,
-0.014381516724824905,
0.032056864351034164,
-0.015100592747330666,
0.009324789978563786,
0.002863255562260747,
0.017141839489340782,
-0.052608516067266464,
-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": "output", "annotation":... | class IgnorePrinter:
def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("function %s cannot represent a variable that is"
" not the result of an operation" % self.function)
input ... | |
11,361 | [
-0.007911888882517815,
0.007911888882517815,
0.02777877077460289,
-0.020288623869419098,
0.041342008858919144,
-0.027688799425959587,
-0.006174309644848108,
0.018061824142932892,
-0.01918647065758705,
0.004239917732775211,
-0.031827498227357864,
0.013034653849899769,
-0.04017237573862076,
... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class DefaultPrinter:
def __init__(self):
pass
def process(self, r, pstate):
pprinter = pstate.pprinter
node = r.owner
if node is None:
return LeafPrinter().process(r, pstate)
return "%s(%s)" % (str(node.op), ", ".join(
[pprinter.process(input, p... | |
11,362 | [
0.023978769779205322,
0.014594736509025097,
-0.03290969878435135,
-0.048386797308921814,
0.014976298436522484,
-0.040469393134117126,
-0.005374654661864042,
0.014845136553049088,
0.021832484751939774,
0.012066889554262161,
0.008227424696087837,
0.011935727670788765,
-0.03956318274140358,
-... | 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": "output", "annotation": null, "type_comment": null}}, {"_type": "a... | def process(self, output, pstate):
pprinter = pstate.pprinter
node = output.owner
if node is None:
raise TypeError("function %s cannot represent a variable that is"
" not the result of an operation" % self.function)
input = node.inputs[0]
r... | |
11,363 | [
0.011711953207850456,
0.020114006474614143,
0.030868150293827057,
-0.06367617100477219,
0.019022831693291664,
-0.017495185136795044,
-0.029340503737330437,
0.004976973868906498,
-0.022138744592666626,
0.012463652528822422,
-0.009953947737812996,
-0.01656162366271019,
-0.020380739122629166,
... | 16 | {"_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 PPrinter:
def __init__(self):
self.printers = []
def assign(self, condition, printer):
if isinstance(condition, gof.Op):
op = condition
condition = (lambda pstate, r: r.owner is not None and
r.owner.op == op)
self.printers.insert(0,... | |
11,364 | [
0.016076209023594856,
0.025324830785393715,
0.02504301816225052,
-0.015269195660948753,
0.02882188744843006,
-0.03522675111889839,
-0.0037724648136645555,
0.03235737234354019,
0.017972048372030258,
0.030410293489694595,
-0.0008758651092648506,
0.015948111191391945,
-0.028002064675092697,
-... | 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": "r", "annotation": null, "type_comment": null}}, {"_type": "arg", ... | def process(self, r, pstate):
pprinter = pstate.pprinter
node = r.owner
if node is None:
return LeafPrinter().process(r, pstate)
return "%s(%s)" % (str(node.op), ", ".join(
[pprinter.process(input, pstate.clone(precedence=-1000))
for input in node.inp... | |
11,365 | [
0.007308617699891329,
0.012967865914106369,
0.007171170320361853,
-0.02672456204891205,
0.027298254892230034,
-0.009884263388812542,
-0.01411525346338749,
0.04833368957042694,
-0.025959637016057968,
0.01600366085767746,
-0.0072608101181685925,
-0.0073205698281526566,
-0.0053455098532140255,
... | 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": "r", "annotation": null, "type_comment": null}}, {"_type": "arg", ... | def process(self, r, pstate=None):
if pstate is None:
pstate = PrinterState(pprinter=self)
elif isinstance(pstate, dict):
pstate = PrinterState(pprinter=self, **pstate)
for condition, printer in self.printers:
if condition(pstate, r):
return pr... | |
11,366 | [
0.012187732383608818,
0.02767682634294033,
0.023767320439219475,
-0.08062271773815155,
-0.03256681188941002,
0.026435714215040207,
-0.02011844702064991,
-0.019001444801688194,
0.000039439284591935575,
0.04445667937397957,
0.012045004405081272,
-0.0023736292496323586,
-0.043910589069128036,
... | 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": "inputs", "annotation": null, "type_comment": null}}, {"_type": "a... | def process_graph(self, inputs, outputs, updates=None,
display_inputs=False):
if updates is None:
updates = {}
if not isinstance(inputs, (list, tuple)):
inputs = [inputs]
if not isinstance(outputs, (list, tuple)):
outputs = [outputs]
... | |
11,367 | [
0.0003039463481400162,
0.020090172067284584,
-0.05516967177391052,
-0.05499069392681122,
-0.02012372948229313,
-0.0011276950826868415,
-0.03619810566306114,
-0.10792315006256104,
0.005028136074542999,
0.017539748921990395,
0.02982204779982567,
-0.011823670007288456,
0.018110238015651703,
-... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "var", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}... | def var_name(var):
if var in var_str:
return var_str[var], var_id[var]
if var.name is not None:
if var_with_name_simple:
varstr = var.name
else:
varstr = 'name=' + var.name + " " + str(var.type)
elif isinstance(var, gof.Constan... | |
11,368 | [
0.011810223571956158,
-0.027754563838243484,
0.032879143953323364,
-0.05115969106554985,
0.023728106170892715,
-0.04939407855272293,
-0.04698251187801361,
-0.0017844527028501034,
-0.03912338241934776,
0.05417415127158165,
-0.011422649957239628,
-0.03649649769067764,
0.010453716851770878,
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen... | def __call__(self, *args):
if len(args) == 1:
return self.process(*args)
elif len(args) == 2 and isinstance(args[1], (PrinterState, dict)):
return self.process(*args)
elif len(args) > 2:
return self.process_graph(*args)
else:
raise TypeErro... | |
11,369 | [
0.020409749820828438,
0.027898218482732773,
-0.006154738366603851,
-0.06269757449626923,
-0.026968277990818024,
-0.028632381930947304,
-0.009837793186306953,
-0.03739340230822563,
-0.04705988988280296,
0.04245913028717041,
0.02250211499631405,
-0.024667898193001747,
0.0013383191544562578,
... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def apply_name(node):
if node in apply_name_cache:
return apply_name_cache[node], apply_name_id[node]
prof_str = ''
if mode:
time = mode.profile_stats[fct].apply_time.get(node, 0)
# second, % total time in profiler, %fct time in profiler
if mode.lo... | |
11,370 | [
0.04298644885420799,
0.019214509055018425,
0.04266582801938057,
-0.04463537037372589,
-0.00442288676276803,
-0.0179892685264349,
-0.009481295011937618,
-0.021126799285411835,
-0.008101468905806541,
0.016374699771404266,
0.013924220576882362,
-0.06641487032175064,
-0.005304601043462753,
-0.... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "x", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ls", "annotation": null, "type_comment": null}}], "kwarg": null, "va... | def recursive_pass(x, ls):
if not x.owner:
return ls
else:
ls += [x.owner]
for inp in x.inputs:
ls += recursive_pass(inp, ls)
return ls | |
11,371 | [
0.006006208248436451,
0.03115212731063366,
-0.05922803655266762,
-0.047226451337337494,
-0.030372241511940956,
0.001693815691396594,
-0.05077926814556122,
-0.11395006626844406,
0.0007629617466591299,
0.015987670049071312,
0.01838148944079876,
-0.01020892895758152,
0.015164457261562347,
-0.... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "var", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}... | def var_name(var):
if var in var_str:
return var_str[var]
if var.name is not None:
if var_with_name_simple:
varstr = var.name
else:
varstr = 'name=' + var.name + " " + str(var.type)
elif isinstance(var, gof.Constant):
... | |
11,372 | [
-0.01881793886423111,
0.011204101145267487,
0.012118862010538578,
-0.01833648420870304,
-0.04145998880267143,
-0.04740249738097191,
-0.017855031415820122,
-0.051556747406721115,
-0.0003024127217940986,
0.020661216229200363,
0.016672031953930855,
-0.03169336915016174,
-0.030042672529816628,
... | 12 | {"_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": "d", "annotation": null, "type_comment": null}}], "kwarg": null, "v... | def plot_apply(app, d):
if d == 0:
return
if app in my_list:
return
astr = apply_name(app) + '_' + str(len(my_list.keys()))
if len(astr) > max_label_size:
astr = astr[:max_label_size - 3] + '...'
my_list[app] = astr
use_color = None
... | |
11,373 | [
-0.0495619922876358,
-0.03139248117804527,
0.02114950679242611,
-0.010285199619829655,
0.009380343370139599,
-0.029872320592403412,
-0.05564262717962265,
0.027362853288650513,
0.0009787528542801738,
0.03880023583769798,
0.0127765703946352,
-0.08093034476041794,
-0.013295354321599007,
-0.00... | 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 TestAttractingComponents(object):
def setUp(self):
self.G1 = nx.DiGraph()
self.G1.add_edges_from([(5, 11), (11, 2), (11, 9), (11, 10),
(7, 11), (7, 8), (8, 9), (3, 8), (3, 10)])
self.G2 = nx.DiGraph()
self.G2.add_edges_from([(0, 1), (0, 2), (1, 1... | |
11,374 | [
0.02230123057961464,
0.013424359261989594,
-0.018735215067863464,
-0.03664163127541542,
-0.010768931359052658,
0.02237756736576557,
-0.026608802378177643,
-0.05548589676618576,
0.02558371052145958,
-0.016881322488188744,
-0.012846381403505802,
-0.019302288070321083,
0.015223724767565727,
-... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}... | def position_independent_str(obj):
if isinstance(obj, theano.gof.graph.Variable):
rval = 'theano_var'
rval += '{type=' + str(obj.type) + '}'
else:
raise NotImplementedError()
return rval | |
11,375 | [
-0.02188277244567871,
-0.04030534625053406,
0.08080160617828369,
-0.04018602892756462,
-0.025891831144690514,
-0.03178609907627106,
-0.016573157161474228,
0.01224194373935461,
-0.02295662835240364,
0.02880316972732544,
0.023433895781636238,
-0.0421905592083931,
-0.033504266291856766,
-0.05... | 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 setUp(self):
self.G1 = nx.DiGraph()
self.G1.add_edges_from([(5, 11), (11, 2), (11, 9), (11, 10),
(7, 11), (7, 8), (8, 9), (3, 8), (3, 10)])
self.G2 = nx.DiGraph()
self.G2.add_edges_from([(0, 1), (0, 2), (1, 1), (1, 2), (2, 1)])
self.G3 = nx.Di... | |
11,376 | [
-0.04167277365922928,
-0.009741269052028656,
0.05301932245492935,
-0.007110932841897011,
0.002054949989542365,
-0.020565617829561234,
-0.0632312148809433,
0.006472689565271139,
-0.004902868997305632,
0.0534319244325161,
0.002662570448592305,
-0.07117379456758499,
-0.015524139627814293,
0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_attracting_components(self):
ac = list(nx.attracting_components(self.G1))
assert_true({2} in ac)
assert_true({9} in ac)
assert_true({10} in ac)
ac = list(nx.attracting_components(self.G2))
ac = [tuple(sorted(x)) for x in ac]
assert_true(ac == [(1, 2)])
... | |
11,377 | [
0.0005095139495097101,
0.006249163765460253,
-0.026506520807743073,
-0.03952910751104355,
-0.0013984601246193051,
-0.022836709395051003,
0.003059049602597952,
0.003313315100967884,
-0.016367357224225998,
-0.03218948468565941,
-0.03462204709649086,
-0.03728527948260307,
0.0396549291908741,
... | 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": "internal_type", "annot... | class StringType(object):
def __init__(self, internal_type):
self.internal_type = internal_type
def __mod__(self, field):
indexes = get_model_indexes(field['model'])
if field['name'] in indexes['indexed']:
return 'text'
elif field['name'] in indexes['unindexed']:
... | |
11,378 | [
0.026103241369128227,
0.023884465917944908,
0.07291505485773087,
-0.0008614975959062576,
0.025015605613589287,
0.03961892053484917,
0.013044369406998158,
0.008802592754364014,
-0.01194948423653841,
0.021187130361795425,
0.029061608016490936,
-0.04715985804796219,
-0.019577430561184883,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_DECFI_Scrolls(self):
strings = [ "abcde",
"fghij",
"klmno",
"pqrst",
"uvwxy" ]
y = 3
for s in strings:
esccmd.CUP(Point(2, y))
escio.Write(s)
y += 1
esccmd.DECSET(esccmd.DECLRMM)
esccmd.DECSLRM(3, 5)
escc... | |
11,379 | [
0.024545008316636086,
0.03842427209019661,
0.04400357976555824,
-0.054610177874565125,
0.02180464193224907,
-0.04163779690861702,
0.004504846874624491,
0.013366678729653358,
-0.04664537310600281,
0.020483745262026787,
-0.00546594662591815,
-0.004384093452244997,
0.04506818205118179,
-0.019... | 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": "Tuple", "_fields": {"... | def get_data_types():
# TODO: Add GAEKeyField and a corresponding db_type
string_types = ('text', 'longtext')
data_types = NonrelDatabaseCreation.data_types.copy()
for name, field_type in data_types.items():
if field_type in string_types:
data_types[name] = StringType(field_type)
... | |
11,380 | [
0.03536581993103027,
0.030235785990953445,
0.05925711616873741,
-0.04418110102415085,
0.01317057479172945,
-0.045604947954416275,
0.02521044760942459,
-0.022781534120440483,
-0.06084847450256348,
0.008564013987779617,
0.0005722211790271103,
-0.029188841581344604,
0.04640062525868416,
-0.01... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "get_data_types", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", ... | class DatabaseCreation(NonrelDatabaseCreation):
# This dictionary maps Field objects to their associated GAE column
# types, as strings. Column-type strings can contain format strings; they'll
# be interpolated against the values of Field.__dict__ before being output.
# If a column type is set to None, ... | |
11,381 | [
0.05385420471429825,
0.010066680610179901,
0.014026880264282227,
-0.01692238822579384,
-0.03377717733383179,
-0.013790281489491463,
-0.0389823317527771,
0.01935596764087677,
-0.0257553793489933,
0.06967247277498245,
0.03621075674891472,
-0.007835899479687214,
-0.017947645857930183,
-0.0188... | 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 split(self):
buf = []
node = self
while node is not None:
buf.append(node)
node = node.parent
buf.reverse()
return buf | |
11,382 | [
-0.00130275113042444,
0.012408170849084854,
0.007501497399061918,
-0.05108493193984032,
-0.022445762529969215,
-0.026781147345900536,
-0.021997272968292236,
0.011030672118067741,
0.02438921108841896,
0.05625322088599205,
0.010325904935598373,
0.0001775265409378335,
0.01832394301891327,
0.0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "targets": [{"_type": "Name", "_fields": {"id": "parent", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_... | class _TokenType(tuple):
parent = None
def split(self):
buf = []
node = self
while node is not None:
buf.append(node)
node = node.parent
buf.reverse()
return buf
def __init__(self, *args):
# no need to call super.__init__
self... | |
11,383 | [
-0.0025448387023061514,
0.051086727529764175,
-0.011531387455761433,
-0.03133140504360199,
-0.003254376584663987,
-0.009346905164420605,
-0.030728019773960114,
0.014470103196799755,
0.01845915988087654,
-0.0040477183647453785,
0.019732974469661713,
-0.005589705891907215,
0.004989112727344036... | 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": "val", "annotation": null, "type_comment": null}}], "kwarg": null,... | def __getattr__(self, val):
if not val or not val[0].isupper():
return tuple.__getattribute__(self, val)
new = _TokenType(self + (val,))
setattr(self, val, new)
self.subtypes.add(new)
new.parent = self
return new | |
11,384 | [
0.0022820329759269953,
-0.008389572612941265,
0.0330505296587944,
-0.021291282027959824,
0.009555111639201641,
0.007974132895469666,
0.015578986145555973,
0.010916830971837044,
0.029473135247826576,
0.053037792444229126,
0.010939911007881165,
-0.038289688527584076,
-0.030327094718813896,
-... | 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 RoundTests(TestCase):
def test_null(self):
IntegerModel.objects.create()
obj = IntegerModel.objects.annotate(null_round=Round('normal')).first()
self.assertIsNone(obj.null_round)
def test_decimal(self):
DecimalModel.objects.create(n1=Decimal('-12.9'), n2=Decimal('0.6'))
... | |
11,385 | [
-0.006192836910486221,
-0.0388621985912323,
0.04274841770529747,
-0.041294392198324203,
0.002575942547991872,
-0.02730928547680378,
0.002542896429076791,
0.04058059677481651,
0.0021116449497640133,
0.013258090242743492,
0.0019265868468210101,
0.029477110132575035,
-0.014302346855401993,
-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 WalletBackupTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 4
self.setup_clean_chain = True
# nodes 1, 2,3 are spenders, let's give them a keypool=100
# whitelist all peers to speed up tx relay / mempool sync
self.extra_args = [
["-wh... | |
11,386 | [
0.013100259937345982,
0.008106366731226444,
0.016084982082247734,
-0.016700508072972298,
-0.01584109477698803,
-0.005740073975175619,
0.01778058335185051,
0.005667488090693951,
0.03472498059272766,
0.026014700531959534,
0.0052116503939032555,
-0.049474384635686874,
-0.02826775796711445,
-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_integer(self):
IntegerModel.objects.create(small=-20, normal=15, big=-1)
obj = IntegerModel.objects.annotate(
small_round=Round('small'),
normal_round=Round('normal'),
big_round=Round('big'),
).first()
self.assertIsInstance(obj.small_round, in... | |
11,387 | [
-0.0025339731946587563,
-0.07051286846399307,
0.06668700277805328,
0.0025040835607796907,
-0.015569156035780907,
-0.04463512450456619,
0.010115966200828552,
0.0256784800440073,
0.025798039510846138,
-0.011265055276453495,
0.04009190574288368,
0.008681265637278557,
-0.05914153903722763,
-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 do_one_round(self):
a0 = self.nodes[0].getnewaddress()
a1 = self.nodes[1].getnewaddress()
a2 = self.nodes[2].getnewaddress()
self.one_send(0, a1)
self.one_send(0, a2)
self.one_send(1, a0)
self.one_send(1, a2)
self.one_send(2, a0)
self.one_send... | |
11,388 | [
-0.005402788985520601,
-0.030757984146475792,
0.04151616990566254,
-0.051373887807130814,
-0.017902662977576256,
-0.01640978641808033,
0.020141975954174995,
0.03305653855204582,
0.0019668047316372395,
0.03528400510549545,
-0.004893315490335226,
-0.0029901950620114803,
0.0250945333391428,
-... | 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": "args", "annotation": null, "type_comment": null}}], "kwarg": null... | def start_three(self, args=()):
self.start_node(0, self.extra_args[0] + list(args))
self.start_node(1, self.extra_args[1] + list(args))
self.start_node(2, self.extra_args[2] + list(args))
self.connect_nodes(0, 3)
self.connect_nodes(1, 3)
self.connect_nodes(2, 3)
s... | |
11,389 | [
0.027375981211662292,
-0.02929801493883133,
0.06540106236934662,
-0.02624613791704178,
-0.009837431833148003,
-0.01931123621761799,
0.0039252326823771,
0.017700884491205215,
0.01814243197441101,
0.025882510468363762,
0.011811411939561367,
0.04028477147221565,
-0.03173951432108879,
-0.06908... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def run_test(self):
self.log.info("Generating initial blockchain")
self.nodes[0].generate(1)
self.sync_blocks()
self.nodes[1].generate(1)
self.sync_blocks()
self.nodes[2].generate(1)
self.sync_blocks()
self.nodes[3].generate(100)
self.sync_blocks()... | |
11,390 | [
0.025988714769482613,
-0.019648531451821327,
0.05695296451449394,
-0.012813209556043148,
0.0009608397376723588,
0.0013110594591125846,
0.05212234705686569,
-0.005319715943187475,
-0.020638806745409966,
0.04108439013361931,
0.01241468358784914,
-0.044731505215168,
0.018416723236441612,
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}}, {"_type": "arg", "_fields": {"arg": "play", "annotation": null, "type_comment": null}}, {"_type": "arg... | def __init__(self, play=None, options=None, passwords=None):
if passwords is None:
passwords = {}
# connection
self.connection = None
self.remote_addr = None
self.remote_user = None
self.password = passwords.get('conn_pass','')
... | |
11,391 | [
-0.020429318770766258,
0.005950991529971361,
0.05065600201487541,
-0.06778324395418167,
0.017659446224570274,
0.05859065800905228,
-0.0013199227396398783,
-0.03154509514570236,
0.022207358852028847,
0.015445968136191368,
0.034593161195516586,
-0.016135413199663162,
-0.009392164647579193,
0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "pn_port_config", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Store", "_fields": {}}... | class TestPortConfigModule(TestNvosModule):
module = pn_port_config
def setUp(self):
self.mock_run_nvos_commands = patch('ansible.modules.network.netvisor.pn_port_config.run_cli')
self.run_nvos_commands = self.mock_run_nvos_commands.start()
def tearDown(self):
self.mock_run_nvos_c... | |
11,392 | [
0.021663203835487366,
0.005492295138537884,
0.004843622911721468,
-0.02029242366552353,
0.009203801862895489,
0.022838156670331955,
-0.021320508792996407,
-0.00262528657913208,
-0.006780460476875305,
0.013805702328681946,
0.004972133785486221,
-0.05115943029522896,
0.005617746151983738,
-0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _load(self):
self.logger.info("reload AYS repos")
# search repo on the filesystem
for dir_path in self.FSDIRS:
self.logger.debug("search ays repo in {}".format(dir_path))
for path in self._searchAysRepos(dir_path):
self.logger.debug("AYS repo found {}"... | |
11,393 | [
-0.011484301649034023,
0.0179152749478817,
0.015159981325268745,
-0.004634170327335596,
-0.012615730985999107,
-0.03357941657304764,
0.0013160926755517721,
-0.02961648255586624,
-0.013846819289028645,
-0.0034382555168122053,
0.0026102017145603895,
-0.034587737172842026,
0.016860056668519974,... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg... | def create(self, path, git_url=''):
path = j.sal.fs.pathNormalize(path)
if j.sal.fs.exists(path):
raise j.exceptions.Input(
"Directory %s already exists. Can't create AYS repo at the same location." % path)
j.sal.fs.createDir(path)
j.tools.executorLocal.exec... | |
11,394 | [
-0.013996097259223461,
0.015980442985892296,
0.015757350251078606,
-0.014630148187279701,
-0.00023868658172432333,
0.009551865980029106,
-0.007708420976996422,
-0.040156587958335876,
0.021757354959845543,
0.009234840981662273,
0.011371828615665436,
-0.06467323750257492,
0.01776517927646637,
... | 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": "path", "annotation": null, "type_comment": null}}], "kwarg": null... | def loadRepo(self, path):
ayspath = j.sal.fs.joinPaths(path, ".ays")
if j.sal.fs.exists(path) and not j.sal.fs.exists(ayspath):
j.sal.fs.touch(ayspath)
if path not in self._repos:
self.logger.debug("Loading AYS repo {}".format(path))
try:
repo ... | |
11,395 | [
0.002245524898171425,
0.026657329872250557,
0.023502759635448456,
-0.04924502223730087,
0.011504552327096462,
0.016555478796362877,
0.011751379817724228,
-0.009596156887710094,
0.023912131786346436,
0.012618284672498703,
0.01806052215397358,
-0.027620557695627213,
0.02234688587486744,
-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": "path", "annotation": null, "type_comment": null}}, {"_type": "arg... | def __init__(self, path, loop=None):
self.logger = j.logger.get('j.atyourservice.server')
self.path = j.sal.fs.pathNormalize(path).rstrip("/")
self.name = j.sal.fs.getBaseName(self.path)
self.git = j.clients.git.get(self.path, check_path=False)
self._db = None
self.no_exe... | |
11,396 | [
0.03880568966269493,
0.03307567909359932,
0.031142381951212883,
-0.036406539380550385,
-0.033122263848781586,
0.03799044340848923,
0.012659600004553795,
0.0625176876783371,
-0.0015344086568802595,
0.0027383517008274794,
0.02948859892785549,
-0.094382144510746,
-0.010382735170423985,
-0.040... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_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... | async def delete(self):
await self.stop()
# removing related actors, services , runs, jobs and the model itslef.
self.db.actors.destroy()
for run in self.runsList():
run.delete()
for job in self.jobsList():
job.delete()
self.db.services.destroy... | |
11,397 | [
0.02012690156698227,
0.031123168766498566,
-0.007802740670740604,
-0.02074146270751953,
-0.02730410546064377,
-0.013674001209437847,
-0.022255918011069298,
0.011292573995888233,
-0.02971845492720604,
0.018140548840165138,
-0.0206646416336298,
-0.08990161865949631,
0.03327413648366928,
0.00... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg... | def actorGet(self, name, die=False, context=None):
actor_models = self.db.actors.find(name=name)
if len(actor_models) == 1:
obj = actor_models[0].objectGet(self)
elif len(actor_models) > 1:
raise j.exceptions.Input(message="More than one actor found with name:%s" %
... | |
11,398 | [
0.022875728085637093,
0.014829178340733051,
0.04918031394481659,
-0.04657738655805588,
0.0023370033595710993,
-0.023226123303174973,
0.007414589170366526,
-0.004733448848128319,
-0.024903008714318275,
-0.016643719747662544,
0.0018520830199122429,
-0.0478287935256958,
0.0218620877712965,
-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 templates(self):
templates = {}
# need to link to templates of factory and then overrule with the local ones
for template in j.atyourservice.server.actorTemplates:
templates[template.name] = template
# load local templates
templateRepo = j.atyourservice.server.te... | |
11,399 | [
0.04759130999445915,
0.049779415130615234,
0.01678377017378807,
-0.06116751581430435,
-0.024007005617022514,
0.000029187052859924734,
0.009628910571336746,
-0.011531070806086063,
-0.009889991953969002,
-0.021159982308745384,
0.07747885584831238,
0.00957296509295702,
0.0078883720561862,
-0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type":... | async def blueprintExecute(self, path="", content="", role="", instance="", context=None,
message=""):
curr_time = j.data.time.epoch
if path == "" and content == "":
for bp in self.blueprints:
if not bp.is_valid:
self.logger.... | |
11,400 | [
0.051527559757232666,
0.014468013308942318,
-0.003059716895222664,
-0.03225830942392349,
-0.007544800639152527,
-0.009227377362549305,
-0.044325705617666245,
0.00787167064845562,
-0.041989389806985855,
0.051527559757232666,
-0.031765326857566833,
-0.06498817354440689,
0.04243950545787811,
... | 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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg... | def actorTemplatesFind(self, name="", domain="", role=''):
res = []
for template in self.templates.values():
if not(name == "" or template.name == name):
# no match continue
continue
if not(domain == "" or template.domain == domain):
... |