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
9,801
[ -0.008555670268833637, 0.005022536963224411, -0.00243147904984653, -0.02698843739926815, 0.04221842810511589, 0.03319241851568222, 0.01787284016609192, -0.04259917512536049, -0.02577899768948555, -0.00042974326061084867, -0.0024748733267188072, -0.0781208872795105, -0.016405833885073662, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"...
class AdRecord(models.Model): STATUS_NEW = 0 STATUS_DONE = 1 STATUS_ERROR = 2 STATUS_NO_MEDIA = 3 STATUS_HAS_MEDIA = 4 STATUS_NO_THUMB = 5 STATUS_NO_DOWNLOAD = 6 STATUS_CHOICES = ( (STATUS_NEW, 'new'), (STATUS_DONE, 'done'), (STATUS_ERROR, 'error'), (STATU...
9,802
[ -0.02384546585381031, 0.00041703545139171183, 0.04149249941110611, -0.01668720133602619, 0.010685359127819538, 0.004484034609049559, 0.025973286479711533, -0.021879544481635094, -0.009170443750917912, 0.011737705208361149, -0.007325947284698486, -0.03760691359639168, -0.023937979713082314, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AUTH_USER_MODEL", "value": {"_type": "Name", "_fields": {"id": "setting...
class AdHourlyActivity(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL) date = models.DateField() hour = models.PositiveIntegerField(default=0) adtotal = models.PositiveIntegerField(default=0) fbadtotal = models.PositiveIntegerField(default=0) fbsptotal = models.PositiveIntegerF...
9,803
[ 0.00830351933836937, 0.015015671961009502, 0.031258970499038696, -0.02987220697104931, 0.02375681698322296, -0.018573511391878128, -0.01420862227678299, -0.026393936946988106, -0.03444170206785202, 0.005944887641817331, 0.021892644464969635, -0.03946587070822716, 0.03794270381331444, -0.05...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}, {"_type": "arg...
def detail_data(self, anon=True, domain=True): data = {'id': self.id, 'date': date_to_timestamp(self.date), 'type': self.ad_type} if domain: data['domain'] = self.domain.ref_name(anon=anon) if self.ref_domain: data['ref'] = self.ref_domain....
9,804
[ 0.0244958084076643, -0.02043137326836586, -0.010561466217041016, 0.005392960272729397, -0.04421135410666466, 0.016609588637948036, 0.014073867350816727, 0.03850901126861572, 0.023585859686136246, 0.014437845908105373, 0.03164193406701088, -0.01973981224000454, -0.010870848782360554, 0.0029...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "instance", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}...
def post_saved(instance, **kwargs): notify_topic_subscribers(instance) if util.get_pybb_profile(instance.user).autosubscribe: instance.topic.subscribers.add(instance.user) if kwargs['created']: profile = util.get_pybb_profile(instance.user) profile.post_count = instance.user.posts....
9,805
[ 0.020481815561652184, 0.015982376411557198, 0.0287542175501585, -0.05553993210196495, -0.019895950332283974, -0.024957817047834396, 0.013146794401109219, -0.02418447658419609, -0.034565992653369904, 0.042486876249313354, 0.003963371738791466, -0.015091863460838795, 0.0406121127307415, -0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, config=None, args=None): # Store the arg/config self.args = args self.config = config # Init the static server list (if defined) self.static_server = GlancesStaticServer(config=self.config) # Start the autodiscover mode (Zeroconf listener) if ...
9,806
[ 0.01785518229007721, 0.010879061184823513, 0.03505475074052811, -0.008420515805482864, -0.014351755380630493, -0.012856140732765198, -0.03730841726064682, 0.029871320351958275, -0.008384662680327892, -0.013542484492063522, 0.008487101644277573, 0.016134200617671013, 0.00531660346314311, 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": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"val...
def get_current_cpu(): if utils.get_gdbserver_type() == utils.GDBSERVER_QEMU: return gdb.selected_thread().num - 1 elif utils.get_gdbserver_type() == utils.GDBSERVER_KGDB: tid = gdb.selected_thread().ptid[2] if tid > (0x100000000 - MAX_CPUS - 2): return 0x100000000 - tid - 2 ...
9,807
[ 0.010717745870351791, -0.006666344124823809, -0.008607029914855957, 0.025633471086621284, -0.02383936196565628, 0.008958816528320312, -0.026337042450904846, 0.04125276952981949, 0.0016577914357185364, -0.019840728491544724, 0.013778284192085266, -0.008548399433493614, 0.004476476460695267, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "instance", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "created", "annotation": null, "type_comment": null}}], "kwarg...
def user_saved(instance, created, **kwargs): if not created: return try: add_post_permission = Permission.objects.get_by_natural_key('add_post', 'pybb', 'post') add_topic_permission = Permission.objects.get_by_natural_key('add_topic', 'pybb', 'topic') except (Permission.DoesNotExist...
9,808
[ 0.00321720982901752, 0.039225637912750244, 0.0551900751888752, 0.004391878377646208, -0.01954648457467556, -0.010895396582782269, -0.06567088514566422, -0.0133442347869277, 0.017125286161899567, -0.008540531620383263, 0.014228691346943378, 0.01134315226227045, 0.0484682060778141, 0.0000329...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "var_ptr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cpu", "annotation": null, "type_comment": null}}], "kwarg": nu...
def per_cpu(var_ptr, cpu): if cpu == -1: cpu = get_current_cpu() if utils.is_target_arch("sparc:v9"): offset = gdb.parse_and_eval( "trap_block[{0}].__per_cpu_base".format(str(cpu))) else: try: offset = gdb.parse_and_eval( "__per_cpu_offset[{0}]...
9,809
[ 0.013928728178143501, 0.017249561846256256, 0.030720649287104607, 0.000018357912267674692, -0.03792556747794151, -0.042196888476610184, -0.013165992684662342, 0.04956609010696411, -0.004693758208304644, 0.017789345234632492, 0.031377773731946945, 0.0121568338945508, 0.07153287529945374, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "mask_name", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def cpu_list(mask_name): global cpu_mask mask = None if mask_name in cpu_mask: mask = cpu_mask[mask_name] if mask is None: mask = gdb.parse_and_eval(mask_name + ".bits") if hasattr(gdb, 'events'): cpu_mask[mask_name] = mask gdb.events.stop.connect(cpu_mask...
9,810
[ 0.04206594079732895, 0.05276384577155113, 0.03382597863674164, -0.06545151770114899, -0.058522455394268036, -0.009164616465568542, 0.008702289313077927, 0.025281701236963272, -0.021688422188162804, 0.051452942192554474, 0.06727741658687592, -0.004687648732215166, 0.031742580235004425, -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 analyze_manifest(self): self.manifest_files = mf = {} if not self.distribution.include_package_data: return src_dirs = {} for package in self.packages or (): # Locate package source directory src_dirs[assert_relative(self.get_package_dir(package))]...
9,811
[ -0.033020585775375366, -0.008516868576407433, 0.054699890315532684, -0.0011818382190540433, -0.043947480618953705, -0.02940010093152523, -0.0027889746706932783, -0.01976000890135765, -0.01976000890135765, 0.002544973511248827, -0.010997775010764599, 0.012966142036020756, 0.02647753804922104,...
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 TestBug549(unittest.TestCase): def testBug(self): app = QApplication([]) w = QGraphicsWidget() w.setContentsMargins(1, 2, 3, 4) self.assertEquals(w.getContentsMargins(), (1, 2, 3, 4)) w.setWindowFrameMargins(5, 6, 7, 8) self.assertEquals(w.getWindowFrameMargins(...
9,812
[ -0.013217572122812271, -0.0182531476020813, 0.047502484172582626, -0.039502888917922974, -0.005960610695183277, 0.05227097123861313, -0.045808758586645126, 0.002185557270422578, 0.04447983577847481, 0.013002599589526653, 0.0033239361364394426, -0.03259769827127457, 0.006800958886742592, -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_list_agent(self): body = self.admin_client.list_agents() agents = body['agents'] # Hearthbeats must be excluded from comparison self.agent.pop('heartbeat_timestamp', None) self.agent.pop('configurations', None) for agent in agents: agent.pop('heartbea...
9,813
[ -0.010374851524829865, 0.00807785801589489, -0.011319629848003387, -0.018576711416244507, -0.042892951518297195, 0.016132095828652382, 0.026382945477962494, -0.017289450392127037, 0.0403420515358448, 0.016994206234812737, -0.0025405690539628267, -0.04964812099933624, -0.039964139461517334, ...
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_update_agent_description(self): self.useFixture(fixtures.LockFixture('agent_description')) description = 'description for update agent.' agent_description = {'description': description} body = self.admin_client.update_agent(agent_id=self.agent['id'], ...
9,814
[ 0.032293569296598434, -0.015182111412286758, 0.05558352172374725, -0.07896535098552704, -0.016514278948307037, -0.011168383993208408, -0.020487811416387558, 0.01543476339429617, 0.055261965841054916, 0.017352623865008354, -0.011828725226223469, -0.022359736263751984, 0.020568201318383217, ...
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 loadEndpoints(self): # Load the configuration values from file f = open('config.txt') lines = f.readlines() f.close() for line in lines: if line.startswith('Maestro_api_gateway '): self.maestroAPIGateway = line.split(' ')[1].strip() logging.info('JobRunner GET endpoint set to ' + self.maestroAP...
9,815
[ -0.015360543504357338, -0.013697870075702667, 0.02957000583410263, 0.013454864732921124, -0.014836162328720093, 0.0028665128629654646, -0.01741970144212246, 0.04299928992986679, 0.01976023241877556, -0.0020607556216418743, -0.025247056037187576, -0.011063172481954098, -0.03251165896654129, ...
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 getRegion(self): # lazy load region value if self.region == None: r = requests.get('http://169.254.169.254/latest/dynamic/instance-identity/document') if r.status_code == 200: j = json.loads(r.text) self.region = str(j['region']) return self.region
9,816
[ -0.04448067024350166, -0.013720626942813396, -0.003274240531027317, -0.031561896204948425, 0.009867269545793533, 0.004958692472428083, -0.016538256779313087, 0.031740088015794754, 0.019244516268372536, -0.02325379103422165, -0.02241852506995201, -0.04185236990451813, -0.021460754796862602, ...
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": "jobGroup", "annotation": null, "type_comment": null}}, {"_type": ...
def getJob(self, jobGroup=None, jobCategory=None): logging.info("Requesting a new job from " + str(self.maestroAPIGateway)) if jobGroup != None and jobCategory != None: logging.info("Job group set to " + str(jobGroup)) logging.info("Job category set to " + str(jobCategory)) p = {"jobGroup": jobGroup, "jobC...
9,817
[ 0.0129446005448699, 0.002619037637487054, 0.01310995128005743, 0.0033276835456490517, -0.01692482829093933, -0.024495530873537064, 0.035763002932071686, -0.0017804730450734496, 0.018318498507142067, 0.011320619843900204, 0.011822577565908432, -0.030448157340288162, 0.0047626919113099575, -...
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 getJobSupportFiles(self): result = ResultCode.success # download job-specific script(s) to the parent folder url = self.myriadJobsFolderOnAWS + "/" + self.jobGroup + "/jobConfig.py" logging.info("Retrieving job config from " + url) r = requests.get(url) # Check for web errors (404, 500, etc.) if "<ht...
9,818
[ 0.011371004395186901, -0.00556146539747715, 0.03470723703503609, -0.012219070456922054, -0.013257518410682678, 0.018288221210241318, -0.025730431079864502, -0.00009879677963908762, 0.019511282444000244, -0.0005707857781089842, 0.030253449454903603, -0.029307307675480843, -0.02131125889718532...
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 getSystemSpecs(self): self.cpus = psutil.cpu_count() cpus = self.readTag('cpus') logging.info('Number of cores set to ' + str(self.cpus)) if cpus != None: logging.info('Overriding number of cores to: ' + str(self.cpus)) self.cpus = int(cpus) os.environ["OMP_NUM_THREADS"] = str(self.cpus) os.enviro...
9,819
[ -0.01846870593726635, 0.019157638773322105, 0.024947326630353928, -0.013646174222230911, -0.0488082580268383, 0.022681796923279762, 0.005478342529386282, 0.06576661020517349, 0.05021262168884277, 0.007459025364369154, 0.011109045706689358, -0.0373348705470562, -0.034791119396686554, 0.0354...
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 shutdownMyriad(self): if os.path.isfile('../shutdown.myriad'): logging.info('shutdownMyriad() found shutdown file. Returning True') return True r = requests.get('http://169.254.169.254/latest/meta-data/spot/termination-time') if r.status_code == 200: if re.search('.*T.*Z', r.text): logging.info('...
9,820
[ -0.00877187680453062, 0.027683719992637634, -0.017664466053247452, 0.012480475939810276, -0.012071389704942703, 0.0031922119669616222, 0.028005624189972878, 0.025095077231526375, 0.028220226988196373, 0.0013488101540133357, 0.04884888976812363, 0.028703082352876663, -0.02037382312119007, -...
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 runPsi4(self): self.jobStarted = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") result = ResultCode.success myoutput = open('psi4.out', 'w') myerror = open('psi4.err', 'w') exitcode = 0 try: self.postJobStatus(True, "Started") p = subprocess.Popen("psi4", stdout=myoutput, stderr=myerror) ...
9,821
[ 0.02832685224711895, 0.007242380175739527, 0.004473961889743805, -0.046024955809116364, 0.014460042119026184, 0.030378447845578194, -0.031861528754234314, 0.00034064523060806096, 0.030650347471237183, 0.015028556808829308, 0.022740580141544342, -0.021072113886475563, -0.025459561496973038, ...
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 uploadResults(self): logging.info("Extracting results from output.dat") f = open("output.dat", "r") lines = f.readlines() energy = None for line in reversed(lines): if "CURRENT ENERGY" in line: energy = line.split(">") energy = energy[1].strip() break f.close() logging.info("Energy = " ...
9,822
[ -0.0004089744761586189, -0.005102660972625017, -0.009480287320911884, -0.007969290018081665, -0.010101745836436749, 0.02474866807460785, 0.017230238765478134, 0.004203983582556248, 0.0429903008043766, 0.006610611453652382, 0.018668124452233315, -0.015487718395888805, -0.023347340524196625, ...
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": "status", "annotation": null, "type_comment": null}}, {"_type": "a...
def postJobStatus(self, status, message=None): n = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") logging.info("Posting job status to " + str(self.maestroAPIGateway)) if status == True: statusStr = "Success" else: statusStr = "Failure" if message == None: j = { "ExecutionID" : self.executionID...
9,823
[ 0.04486382380127907, 0.01031514722853899, 0.019770698621869087, -0.01894642785191536, 0.02137213759124279, 0.024845844134688377, -0.010309259407222271, 0.03193456307053566, 0.004200831986963749, 0.043003328144550323, 0.05247065797448158, -0.03165195882320404, -0.06193798407912254, -0.01551...
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 clearScratch(self): logging.info("Clearing the scratch folder. Some errors are normal.") folder = os.environ['PSI_SCRATCH'] for the_file in os.listdir(folder): file_path = os.path.join(folder, the_file) try: if os.path.isfile(file_path): os.unlink(file_path) elif os.path.isdir(file_path): ...
9,824
[ 0.029467100277543068, -0.01087929867208004, -0.019853878766298294, -0.011400294490158558, 0.03874419629573822, 0.027181439101696014, -0.017657851800322533, 0.035181254148483276, 0.06363997608423233, -0.020044350996613503, 0.03336616978049278, -0.011030555702745914, -0.008840130642056465, -...
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": "key", "annotation": null, "type_comment": null}}], "kwarg": null,...
def readTag(self, key): # aws ec2 describe-tags --filters "Name=resource-id,Values=i-1234567890abcdef8" "Name=key,Values=threads" # 'Key="ExecutionID",Value="3bd99202-5d7f-49c2-a350-f1fdf2235ad3"' command = 'aws ec2 describe-tags --region '+self.region+' --filters "Name=resource-id,Values=' + str(self.ami) + '" "...
9,825
[ -0.00843235943466425, 0.007102442439645529, -0.047601841390132904, 0.001873061410151422, 0.00714830169454217, -0.026506613940000534, 0.015534801408648491, 0.030863236635923386, 0.0388198047876358, 0.008816429413855076, 0.021886300295591354, 0.025818726047873497, -0.030725659802556038, 0.00...
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 zipJobFolder(self): # Get IP address f = open('ip.txt') self.ip = f.readline().strip() f.close() if self.ip == None: self.ip = "" try: logging.info("Compressing job folder...") myZipFile = zipfile.ZipFile("ip_" + self.ip + "_" + self.jobFolder + ".zip", "w" ) listing = os.listdir(self.job...
9,826
[ 0.038169004023075104, -0.015027077868580818, -0.02674977295100689, -0.015611526556313038, -0.0018446665490046144, 0.03234699368476868, 0.004481710959225893, 0.05071217566728592, 0.048509251326322556, -0.005133596248924732, 0.05134158208966255, -0.014172883704304695, -0.006945949513465166, ...
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": "action", "annotation": null, "type_comment": null}}, {"_type": "a...
def doModifyTag(self, action, key, value): # aws ec2 delete-tags --resources ami-78a54011 --region us-east-1 --tags Key=Stack # aws ec2 create-tags --resources ami-78a54011 --region us-east-1 --tags Key=Stack,Value=foo # 'Key="ExecutionID",Value="3bd99202-5d7f-49c2-a350-f1fdf2235ad3"' command = "aws ec2 " + act...
9,827
[ 0.030545974150300026, 0.014175166375935078, -0.025020675733685493, -0.011931267566978931, -0.020979246124625206, 0.015007579699158669, 0.005449899006634951, 0.023705702275037766, 0.009361641481518745, -0.005121155641973019, 0.01729973405599594, 0.021884042769670486, 0.012594785541296005, 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": "command", "annotation": null, "type_comment": null}}], "kwarg": n...
def runCommand(self, command): logging.info("Invoking " + str(command)) process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) out, err = process.communicate() if out: logging.info("doModifyTag() subprocess.Popen stdout...") logging.info(out) if err: logging.w...
9,828
[ -0.014465061016380787, 0.014642966911196709, 0.023921407759189606, -0.0078004589304327965, -0.025768883526325226, -0.010380084626376629, 0.045844800770282745, 0.046364832669496536, 0.018447401002049446, 0.014574541710317135, 0.019049542024731636, -0.017393654212355614, 0.03229663521051407, ...
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": "jobGroup", "annotation": null, "type_comment": null}}, {"_type": ...
def runOnce(self, jobGroup=None, jobCategory=None, error=None): logging.info("Myriad.runOnce invoked...") logging.info("Job group = " + str(jobGroup)) logging.info("Job sub group = " + str(jobCategory)) logging.info("Error = " + str(error)) self.jobGroup = jobGroup self.jobCategory = jobCategory # if we ...
9,829
[ 0.02573489397764206, -0.025777151808142662, 0.04041941836476326, -0.03708106651902199, 0.04316616430878639, -0.02279799059033394, 0.01333228126168251, 0.05962551012635231, 0.02237541414797306, -0.015318389981985092, 0.014515494927763939, -0.036447204649448395, -0.015085972845554352, -0.055...
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 downloadCredentials(self): logging.info("Retrieving credentials...") r = requests.get("http://169.254.169.254/latest/meta-data/iam/security-credentials/S3FullAccess") if r.status_code == 200: j = json.loads(r.text) os.environ["AWS_ACCESS_KEY_ID"] = str(j['AccessKeyId']) os.environ["AWS_SECRET_ACCESS_...
9,830
[ 0.043974339962005615, 0.011022932827472687, 0.050289928913116455, -0.04019438102841377, -0.01575375534594059, 0.043833471834659576, 0.03369096666574478, -0.03139011934399605, 0.03350314125418663, -0.003322140546515584, 0.014110293239355087, 0.027070162817835808, -0.0001509563735453412, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "unused_argv", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyar...
def main(unused_argv): assert not FLAGS.train_shards % FLAGS.num_threads, ( 'Please make the FLAGS.num_threads commensurate with FLAGS.train_shards') assert not FLAGS.validation_shards % FLAGS.num_threads, ( 'Please make the FLAGS.num_threads commensurate with ' 'FLAGS.validation_shards') print(...
9,831
[ 0.027776608243584633, -0.0066945962607860565, 0.007394436746835709, -0.029621148481965065, 0.009716387838125229, -0.014680370688438416, 0.07543084770441055, 0.028861630707979202, 0.012304169125854969, -0.01231501903384924, 0.07621206343173981, 0.008224479854106903, 0.010150397196412086, -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 __init__(self): # Create a single Session to run all image coding calls. self._sess = tf.Session() # Initializes function that converts PNG to JPEG data. self._png_data = tf.placeholder(dtype=tf.string) image = tf.image.decode_png(self._png_data, channels=3) self._png_to_jpeg = tf.image.enc...
9,832
[ -0.02700742706656456, -0.007955345325171947, 0.03439893200993538, -0.023975012823939323, -0.007448364049196243, -0.006922429893165827, 0.017445849254727364, -0.03697648271918297, 0.04491761326789856, 0.055000387132167816, 0.014896728098392487, -0.006912953685969114, -0.022837858647108078, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "total_seconds", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonly...
def format_duration(total_seconds): hours = total_seconds // 3600 minutes = (total_seconds % 3600) // 60 seconds = total_seconds % 60 out = [] if hours > 0: out.extend([str(hours), 'h']) if hours or minutes: out.extend([str(minutes), 'm']) out.extend([str(seconds), 's']) ...
9,833
[ 0.009201770648360252, -0.01046464592218399, 0.026061158627271652, -0.022869527339935303, 0.022318454459309578, -0.03671523556113243, 0.04068755358457565, 0.017175106331706047, -0.012387661263346672, -0.014362338930368423, 0.05469398945569992, -0.03602639585733414, -0.01103868056088686, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): super().setUp() self.course_staff_user = StaffFactory( username="coursestaff", course_key=self.course.id ) self.course_instructor_user = InstructorFactory( username='courseinstructor', course_key=self.course.id )
9,834
[ 0.03139164298772812, 0.02350371889770031, -0.028213609009981155, 0.008916781283915043, 0.025652892887592316, 0.04442385956645012, 0.03891374543309212, 0.03374658524990082, -0.010362899862229824, 0.02092013880610466, 0.021491728723049164, 0.016027342528104782, 0.009591255336999893, 0.003829...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def get_thread(cls): with cls.life_lock: if cls.the_thread is None: in_queue = Queue() out_queue = Queue() thread = cls(in_queue, out_queue) thread.daemon = True thread.in_queue = in_queue thread.out_queu...
9,835
[ 0.023882940411567688, -0.0009099236922338605, -0.023926563560962677, 0.03140770271420479, -0.03454847261309624, -0.003636968322098255, -0.012475837953388691, -0.03570445254445076, -0.01597648859024048, 0.029706452041864395, -0.04654446989297867, -0.028659528121352196, 0.00719214603304863, ...
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 __str__(self): exception_msg = "Message: %s\n" % self.msg if self.screen is not None: exception_msg += "Screenshot: available via screen\n" if self.stacktrace is not None: stacktrace = "\n".join(self.stacktrace) exception_msg += "Stacktrace:\n%s" % stacktr...
9,836
[ -0.0046934508718550205, 0.04515892267227173, 0.015858832746744156, 0.013082669116556644, 0.018218571320176125, 0.05390383303165436, 0.0002940636477433145, -0.03509533032774925, 0.04969331994652748, 0.030098235234618187, 0.03211095556616783, -0.05959497019648552, 0.021654073148965836, 0.035...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_connectivity_policy_props(ucs, module, dn): props_match = False child_dn = dn + '/conn-def' mo_1 = ucs.login_handle.query_dn(child_dn) if mo_1: kwargs = dict(lan_conn_policy_name=module.params['lan_connectivity_policy']) kwargs['san_conn_policy_name'] = module.params['san_conn...
9,837
[ 0.0027452760841697454, 0.049219608306884766, -0.008753392845392227, 0.004697440192103386, 0.016608702018857002, 0.04210492596030235, 0.026709219440817833, -0.03583000972867012, 0.02675587311387062, 0.007499575149267912, 0.02169395051896572, -0.059530068188905716, 0.03750954195857048, 0.022...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_storage_profile_props(ucs, module, dn): props_match = False child_dn = dn + '/profile-binding' mo_1 = ucs.login_handle.query_dn(child_dn) if mo_1: kwargs = dict(storage_profile_name=module.params['storage_profile']) if mo_1.check_prop_match(**kwargs): props_match =...
9,838
[ -0.014104684814810753, 0.03735705837607384, 0.010105563327670097, 0.019265227019786835, 0.03656681254506111, 0.002352776238694787, -0.006118415854871273, -0.00790245458483696, 0.039799634367227554, 0.026964133605360985, 0.03678233548998833, -0.05129411444067955, -0.04090119153261185, 0.025...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_iqn_pool_props(ucs, module, dn): props_match = False child_dn = dn + '/iscsi-node' mo_1 = ucs.login_handle.query_dn(child_dn) if mo_1: kwargs = dict(iqn_ident_pool_name=module.params['iqn_pool']) if mo_1.check_prop_match(**kwargs): props_match = True elif not m...
9,839
[ -0.015500226058065891, 0.060321077704429626, 0.012547802180051804, 0.01334953773766756, 0.003318295581266284, 0.034487366676330566, 0.009741726331412792, -0.03265482559800148, 0.03779611736536026, 0.02403934858739376, 0.042861051857471466, -0.06271355599164963, 0.027615344151854515, 0.0282...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_inband_management_props(ucs, module, dn): props_match = False child_dn = dn + '/iface-in-band' mo_1 = ucs.login_handle.query_dn(child_dn) if mo_1: kwargs = dict(mode=module.params['mgmt_interface_mode']) if mo_1.check_prop_match(**kwargs): child_dn = child_dn + '/n...
9,840
[ -0.010475055314600468, 0.07493600249290466, -0.013357209041714668, 0.021010659635066986, 0.015173692256212234, 0.0783752053976059, -0.022257978096604347, -0.013514637015759945, 0.06195419654250145, 0.016542110592126846, 0.030105186626315117, -0.05212096497416496, 0.003887274768203497, 0.02...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_power_props(ucs, module, dn): props_match = False child_dn = dn + '/power' mo_1 = ucs.login_handle.query_dn(child_dn) if mo_1: kwargs = dict(state=module.params['power_state']) if mo_1.check_prop_match(**kwargs): props_match = True elif not module.params['power...
9,841
[ -0.020466158166527748, 0.062121618539094925, 0.023622743785381317, 0.01147849578410387, 0.03365495055913925, 0.02584957145154476, -0.00042183473124168813, 0.022119062021374702, 0.02798457257449627, 0.027181077748537064, 0.015289356000721455, -0.08328796178102493, -0.006806747987866402, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_server_pool(ucs, module, dn): props_match = False child_dn = dn + '/pn-req' mo_1 = ucs.login_handle.query_dn(child_dn) if mo_1: kwargs = dict(name=module.params['server_pool']) kwargs['qualifier'] = module.params['server_pool_qualification'] if mo_1.check_prop_match(**...
9,842
[ 0.02410506270825863, 0.04584950953722, -0.01109124906361103, -0.019627191126346588, -0.013311932794749737, 0.05728754773736, -0.009509392082691193, -0.04847782477736473, 0.026721211150288582, 0.0360906682908535, 0.021282056346535683, -0.05972117558121681, 0.043391548097133636, 0.0217687822...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ucs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "ar...
def check_serivce_profile_templates_props(ucs, module, mo, dn): props_match = False # check top-level mo props kwargs = dict(bios_profile_name=module.params['bios_policy']) kwargs['boot_policy_name'] = module.params['boot_policy'] kwargs['descr'] = module.params['description'] kwargs['ext_ip_po...
9,843
[ -0.00684863468632102, 0.04981296509504318, 0.02120031602680683, -0.008099142462015152, -0.021925998851656914, 0.05769181251525879, -0.0033336069900542498, -0.013133569620549679, 0.05857299640774727, 0.08407557755708694, 0.0164056234061718, -0.06785137206315994, 0.032888997346162796, 0.0254...
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": "Name", "_fields": {"i...
def main(): argument_spec = ucs_argument_spec argument_spec.update( org_dn=dict(type='str', default='org-root'), name=dict(type='str', required=True), bios_policy=dict(type='str', default=''), boot_policy=dict(type='str', default='default'), description=dict(type='str', a...
9,844
[ 0.007208339404314756, -0.004355038516223431, -0.015870992094278336, 0.0023948759771883488, -0.0015425741439685225, -0.00963219627737999, -0.01725153811275959, 0.03349137678742409, 0.007540302351117134, 0.021192939952015877, 0.04607435688376427, -0.058973491191864014, -0.0016229301691055298, ...
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": "fetcher", "annotation"...
class BuilderReadyStep(object): def __init__(self, fetcher, handler, filters=None): self._fetcher = fetcher self._handler = handler self._filters = filters or list() def with_filter(self, filter): self._filters.append(filter) builder = BuilderReadyStep(fetcher=self._fet...
9,845
[ -0.019063474610447884, -0.017943372949957848, 0.007106663193553686, -0.037800706923007965, 0.006889167707413435, 0.00367295416072011, 0.0026085858698934317, 0.025033725425601006, -0.012614735402166843, 0.00906412210315466, 0.004825680050998926, -0.012299367226660252, 0.006524863187223673, ...
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": "port", "annotation": n...
class RestServer: def __init__(self, port, external_access, open_page, root_folder, index_file): root_folder = pathlib.Path(root_folder) static_folder = str(root_folder / 'static') index_file = pathlib.Path(index_file) if not index_file.is_absolute(): in...
9,846
[ -0.01862824708223343, -0.016868790611624718, 0.0406874343752861, -0.011480454355478287, 0.005734729114919901, -0.0034529336262494326, 0.02815130725502968, 0.013393864035606384, -0.008197968825697899, 0.030966436490416527, 0.01266808807849884, -0.016208995133638382, 0.03032863512635231, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "port", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, port, external_access, open_page, root_folder, index_file): root_folder = pathlib.Path(root_folder) static_folder = str(root_folder / 'static') index_file = pathlib.Path(index_file) if not index_file.is_absolute(): index_file = root_folder...
9,847
[ 0.005366562865674496, -0.015097972005605698, 0.04273153096437454, -0.003055392298847437, 0.01997152715921402, 0.05823144316673279, -0.031100314110517502, 0.00695863226428628, 0.055568575859069824, 0.026176515966653824, 0.05059453472495079, 0.007636910770088434, -0.04509294405579567, -0.027...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "intdump", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def energies_from_fcidump(intdump): energies = {} energies['NUCLEAR REPULSION ENERGY'] = intdump['enuc'] epsilon = intdump['epsilon'] Hcore = intdump['hcore'] eri = intdump['eri'] # Compute SCF energy energies['ONE-ELECTRON ENERGY'], energies['TWO-ELECTRON ENERGY'] = _scf_energy(Hcore, eri,...
9,848
[ -0.0022044472862035036, -0.02522384561598301, 0.04985155910253525, 0.003288041800260544, 0.00136536022182554, 0.04120764136314392, -0.007606895640492439, 0.029384352266788483, 0.030030161142349243, 0.009947956539690495, 0.03410373255610466, -0.022677864879369736, -0.006886569317430258, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "Hcore", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ERI", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _scf_energy(Hcore, ERI, occ_sl, unrestricted): scf_1el_e = np.einsum('ii->', Hcore[np.ix_(occ_sl, occ_sl)]) if not unrestricted: scf_1el_e *= 2 coulomb = np.einsum('iijj->', ERI[np.ix_(occ_sl, occ_sl, occ_sl, occ_sl)]) exchange = np.einsum('ijij->', ERI[np.ix_(occ_sl, occ_sl, occ_sl, occ_sl)...
9,849
[ 0.0412382110953331, 0.00789167732000351, -0.0033178627490997314, -0.008966288529336452, -0.03675170987844467, 0.05262909457087517, 0.029148833826184273, 0.04373668506741524, 0.03573082759976387, 0.03712782263755798, 0.05937227979302406, -0.007844663225114346, 0.016105737537145615, 0.039653...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ERI", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "epsilon", "annotation": null, "type_comment": null}}, {"_type": "a...
def _mp2_energy(ERI, epsilon, unrestricted): # Occupied and virtual slices occ_sl = np.where(epsilon < 0)[0] vir_sl = np.where(epsilon > 0)[0] eocc = epsilon[occ_sl] evir = epsilon[vir_sl] denom = 1 / (eocc.reshape(-1, 1, 1, 1) - evir.reshape(-1, 1, 1) + eocc.reshape(-1, 1) - evir) MO = ERI[...
9,850
[ -0.014063139446079731, 0.008742956444621086, 0.06547916680574417, -0.03784894198179245, -0.008277906104922295, -0.023996626958251, -0.006653327960520983, 0.029093584045767784, 0.00610766839236021, 0.03564149886369705, -0.009728864766657352, -0.022744089365005493, 0.03268997743725777, -0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Try", "_fields": {"body": [{"_type": "Expr", "_fields": {"valu...
def main(): try: base_conf(project='ryu', version='ryu %s' % version) except cfg.RequiredOptError as e: base_conf.print_help() raise SystemExit(1) subcmd_name = base_conf.subcommand try: subcmd_mod_name = subcommands[subcmd_name] except KeyError: base_conf.pri...
9,851
[ 0.020312290638685226, 0.037085168063640594, 0.009059910662472248, -0.05120348930358887, 0.002036390593275428, 0.02855125442147255, 0.02200334146618843, 0.010893522761762142, -0.010972175747156143, 0.015602906234562397, -0.017962513491511345, -0.03513849154114723, 0.06893987208604813, -0.01...
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": "name", "annotation": n...
class SubCommand(object): def __init__(self, name, entry): self.name = name self.entry = entry def run(self, args): prog = '%s %s' % (os.path.basename(sys.argv[0]), self.name,) self.entry(args=args, prog=prog)
9,852
[ -0.006795033812522888, 0.017099924385547638, 0.046126075088977814, -0.05912104249000549, 0.024058913812041283, 0.009576200507581234, 0.007511578965932131, -0.0345156155526638, 0.007499434053897858, 0.019662484526634216, 0.011155028827488422, -0.02803027257323265, 0.03196519985795021, 0.033...
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 TextFileTestCase(support.TempdirManager, unittest.TestCase): def test_class(self): # old tests moved from text_file.__main__ # so they are really called by the buildbots # result 1: no fancy options result1 = ['# test file\n', '\n', 'line 3 \\\n', '# interv...
9,853
[ -0.010305003263056278, 0.033617548644542694, 0.026318170130252838, -0.05890016630291939, 0.026318170130252838, 0.003791761351749301, 0.0058691794984042645, -0.039300452917814255, 0.002438914030790329, 0.05089358240365982, 0.03475412726402283, 0.011245840229094028, 0.034324754029512405, 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_class(self): # old tests moved from text_file.__main__ # so they are really called by the buildbots # result 1: no fancy options result1 = ['# test file\n', '\n', 'line 3 \\\n', '# intervening comment\n', ' continues on next line\n'] ...
9,854
[ 0.02851315774023533, 0.012656000442802906, -0.010506652295589447, 0.0265010017901659, -0.016303032636642456, -0.01656598411500454, 0.009980748407542706, -0.04502197727560997, -0.015594204887747765, 0.0038699693977832794, -0.009935017675161362, 0.015960050746798515, 0.017400572076439857, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificSizer(field_number, is_repeated, is_packed): tag_size = _TagSize(field_number) if is_packed: local_VarintSize = _VarintSize def PackedFieldSize(value): result = 0 for element in value: result += compute_value_size(element) return result + local_VarintSiz...
9,855
[ 0.030536334961652756, 0.016475364565849304, -0.011755798943340778, 0.026834262534976006, -0.015843022614717484, -0.012738802470266819, 0.010376145131886005, -0.04566653445363045, -0.016095958650112152, 0.005601968616247177, -0.007202941924333572, 0.015118704177439213, 0.01730315573513508, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificSizer(field_number, is_repeated, is_packed): tag_size = _TagSize(field_number) if is_packed: local_VarintSize = _VarintSize def PackedFieldSize(value): result = 0 for element in value: result += compute_value_size(modify_value(element)) return result + l...
9,856
[ 0.05257522314786911, 0.006443588994443417, -0.04300189018249512, -0.04552353546023369, 0.001318704104050994, -0.027805062010884285, 0.026533080264925957, -0.021210843697190285, -0.010505001991987228, -0.013244224712252617, 0.04771045222878456, 0.04936179518699646, -0.03717755526304245, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": nu...
def EncodeVarint(write, value): bits = value & 0x7f value >>= 7 while value: write(local_chr(0x80|bits)) bits = value & 0x7f value >>= 7 return write(local_chr(bits))
9,857
[ 0.03274756669998169, 0.010477874428033829, -0.011758129112422466, 0.02773885242640972, -0.02353871800005436, -0.009871437214314938, 0.011657056398689747, -0.0534113273024559, -0.02205631695687771, 0.00432085944339633, -0.012128728441894054, 0.009495222009718418, 0.023875627666711807, 0.024...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificSizer(field_number, is_repeated, is_packed): tag_size = _TagSize(field_number) if is_packed: local_VarintSize = _VarintSize def PackedFieldSize(value): result = len(value) * value_size return result + local_VarintSize(result) + tag_size return PackedFieldSize el...
9,858
[ 0.07543130218982697, -0.02811131626367569, -0.056047212332487106, -0.01614975370466709, -0.013310115784406662, 0.006446744780987501, 0.04569733515381813, -0.04047854244709015, -0.004286866169422865, -0.013989875093102455, 0.03701396286487579, 0.03422914445400238, 0.04107058793306351, 0.024...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificEncoder(field_number, is_repeated, is_packed): if is_packed: tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local_EncodeVarint = _EncodeVarint def EncodePackedField(write, value): write(tag_bytes) size = 0 for element in value: ...
9,859
[ 0.09007921814918518, 0.00508438004180789, -0.043417178094387054, -0.04835302755236626, -0.008563467301428318, -0.02650732919573784, 0.006409746594727039, -0.05351738631725311, -0.009643184021115303, -0.017903873696923256, 0.04698195680975914, 0.045016758143901825, -0.04944987967610359, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": nu...
def EncodeSignedVarint(write, value): if value < 0: value += (1 << 64) bits = value & 0x7f value >>= 7 while value: write(local_chr(0x80|bits)) bits = value & 0x7f value >>= 7 return write(local_chr(bits))
9,860
[ 0.07672594487667084, -0.025854745879769325, -0.05656277388334274, -0.016423940658569336, -0.011063272133469582, 0.009441835805773735, 0.046194400638341904, -0.03909096494317055, -0.003623414784669876, -0.013280338607728481, 0.038561515510082245, 0.03260521963238716, 0.04259856417775154, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificEncoder(field_number, is_repeated, is_packed): if is_packed: tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local_EncodeVarint = _EncodeVarint def EncodePackedField(write, value): write(tag_bytes) size = 0 for element in value: ...
9,861
[ 0.09111578017473221, 0.006244795862585306, -0.06078699231147766, -0.009070592932403088, 0.022843657061457634, -0.02461247704923153, 0.03280944377183914, -0.04711099714040756, -0.016350794583559036, -0.01802254468202591, 0.047973837703466415, 0.05146833509206772, -0.0051716398447752, -0.013...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": nu...
def EncodePackedField(write, value): write(tag_bytes) size = 0 for element in value: size += compute_value_size(element) local_EncodeVarint(write, size) for element in value: encode_value(write, element)
9,862
[ 0.09561566263437271, 0.014597062952816486, -0.05930260941386223, -0.008860558271408081, 0.026015644893050194, -0.013388805091381073, 0.031218774616718292, -0.041407328099012375, -0.01348677184432745, -0.014803881756961346, 0.052161913365125656, 0.04641452431678772, -0.008942198008298874, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": nu...
def EncodePackedField(write, value): write(tag_bytes) size = 0 for element in value: size += compute_value_size(modify_value(element)) local_EncodeVarint(write, size) for element in value: encode_value(write, modify_value(element))
9,863
[ 0.06892640143632889, -0.02698385715484619, -0.04498802497982979, -0.018418442457914352, -0.008929305709898472, 0.008111951872706413, 0.05289284139871597, -0.041158780455589294, -0.0011868418660014868, -0.005074868444353342, 0.031283359974622726, 0.029715832322835922, 0.049399495124816895, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificEncoder(field_number, is_repeated, is_packed): local_struct_pack = struct.pack if is_packed: tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local_EncodeVarint = _EncodeVarint def EncodePackedField(write, value): write(tag_bytes) local_Enco...
9,864
[ 0.06993648409843445, -0.020558126270771027, -0.049138378351926804, -0.01611281745135784, -0.003508251626044512, 0.012078898958861828, 0.04932121932506561, -0.04296751320362091, -0.0037539436016231775, -0.0061822934076189995, 0.03501395136117935, 0.023883536458015442, 0.04726426303386688, 0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "field_number", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "is_repeated", "annotation": null, "type_comment": null}},...
def SpecificEncoder(field_number, is_repeated, is_packed): local_struct_pack = struct.pack if is_packed: tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local_EncodeVarint = _EncodeVarint def EncodePackedField(write, value): write(tag_bytes) local_Enco...
9,865
[ 0.08317049592733383, 0.002065119566395879, -0.06146581098437309, -0.009201399981975555, 0.02851625718176365, -0.028192995116114616, 0.03352680429816246, -0.05089055001735687, -0.009264897555112839, -0.006534494459629059, 0.05694015324115753, 0.030617455020546913, -0.0031315931119024754, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": nu...
def EncodePackedField(write, value): write(tag_bytes) local_EncodeVarint(write, len(value) * value_size) for element in value: # This try/except block is going to be faster than any code that # we could write to check whether element is finite. try: writ...
9,866
[ 0.08720598369836807, 0.007852377369999886, -0.06453513354063034, -0.00757576571777463, 0.02831597626209259, -0.021304724738001823, 0.03849979117512703, -0.05870936065912247, -0.007846731692552567, -0.02058214694261551, 0.050986822694540024, 0.049677152186632156, 0.011120907962322235, -0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": nu...
def EncodePackedField(write, value): write(tag_bytes) local_EncodeVarint(write, len(value)) for element in value: if element: write(true_byte) else: write(false_byte)
9,867
[ 0.040999818593263626, 0.020867150276899338, 0.017811181023716927, -0.005534844007343054, -0.04063257575035095, -0.021050769835710526, -0.017076699063181877, -0.04215400293469429, 0.0029985869769006968, 0.04002925381064415, 0.0243559367954731, -0.03155647963285446, 0.02951042540371418, 0.00...
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": "argsPre", "annotation": null, "type_comment": null}}, {"_type": "...
def __init__(self, argsPre, nativeMethodName, static, descriptor, method): CGThing.__init__(self) methodName = '\\"%s.%s\\"' % (descriptor.interface.identifier.name, method.identifier.name) def requiredArgCount(signature): arguments = signature[1] if len(arguments) == 0...
9,868
[ 0.045451171696186066, 0.006983623374253511, 0.004033445846289396, -0.02980140410363674, -0.02063971944153309, 0.0021060348954051733, -0.02595234289765358, -0.028234120458364487, -0.015442335978150368, 0.06582583487033844, 0.005030283238738775, -0.011794948019087315, 0.015834156423807144, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "signature", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def requiredArgCount(signature): arguments = signature[1] if len(arguments) == 0: return 0 requiredArgs = len(arguments) while requiredArgs and arguments[requiredArgs - 1].optional: requiredArgs -= 1 return requiredArgs
9,869
[ 0.08408322930335999, 0.013623378239572048, -0.023021535947918892, 0.018348783254623413, -0.043884389102458954, 0.007081524468958378, -0.042752400040626526, -0.013017894700169563, 0.005502002313733101, 0.053361523896455765, 0.019125381484627724, -0.06165401637554169, 0.005814616102725267, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "condition", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "filterLambda", "annotation": null, "type_comment": null}}], ...
def pickFirstSignature(condition, filterLambda): sigs = filter(filterLambda, possibleSignatures) assert len(sigs) < 2 if len(sigs) > 0: call = getPerSignatureCall(sigs[0], distinguishingIndex) if condition is None: ...
9,870
[ 0.03586222603917122, 0.03358558937907219, 0.006062324158847332, 0.0025977659970521927, 0.04666057601571083, -0.035068534314632416, 0.01489211805164814, 0.03408686816692352, 0.04077056795358658, 0.03183111920952797, -0.00661581801250577, -0.023100536316633224, 0.007905563339591026, -0.01768...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "nullValue", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def handleDefaultNull(nullValue): if defaultValue is None: return None if not isinstance(defaultValue, IDLNullValue): raise TypeError("Can't handle non-null default value here") assert type.nullable() or type.isDictionary() return nullValue
9,871
[ -0.004076649434864521, -0.0029301769100129604, -0.027101414278149605, -0.03246069699525833, 0.014977670274674892, 0.03535819426178932, 0.03110998310148716, 0.0032950874883681536, 0.006448567844927311, -0.04219890758395195, 0.04002033546566963, -0.06940925121307373, 0.057296399027109146, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "type", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def typeIsSequenceOrHasSequenceMember(type): if type.nullable(): type = type.inner if type.isSequence(): return True if type.isArray(): elementType = type.inner return typeIsSequenceOrHasSequenceMember(elementType) if type.isDictionary(): return dictionaryHasSeque...
9,872
[ 0.051092587411403656, 0.04181106016039848, 0.021270161494612694, 0.012485860846936703, 0.007756703067570925, -0.016253719106316566, 0.015977483242750168, -0.025281107053160667, 0.030606934800744057, 0.02908211201429367, 0.004613139200955629, -0.016949832439422607, 0.049589864909648895, -0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "templateBody", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "nullValue", "annotation": null, "type_comment": null}}, {...
def wrapObjectTemplate(templateBody, nullValue, isDefinitelyObject, type, failureCode=None): if not isDefinitelyObject: # Handle the non-object cases by wrapping up the whole # thing in an if cascade. templateBody = ( "if ${val}.get(...
9,873
[ -0.0017481911927461624, -0.0012361012632027268, -0.05528252199292183, 0.003509265137836337, 0.030259039252996445, -0.051242485642433167, 0.0015124366618692875, -0.008930332958698273, 0.08583013713359833, 0.009863045066595078, 0.020942222326993942, 0.020086808130145073, 0.04262649267911911, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def convertConstIDLValueToJSVal(value): if isinstance(value, IDLNullValue): return "NullVal" tag = value.type.tag() if tag in [IDLType.Tags.int8, IDLType.Tags.uint8, IDLType.Tags.int16, IDLType.Tags.uint16, IDLType.Tags.int32]: return "IntVal(%s)" % (value.value) if tag ==...
9,874
[ 0.016183070838451385, 0.01712825335562229, -0.00871101301163435, 0.001399414031766355, -0.025277266278862953, -0.008845127187669277, 0.009873333387076855, -0.011648745276033878, 0.02364235371351242, 0.03765405714511871, 0.027384769171476364, -0.012830223888158798, 0.06662264466285706, -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}}, {"_type": "arg", "_fields": {"arg": "argument", "annotation": null, "type_comment": null}}, {"_type": ...
def __init__(self, argument, index, args, argc, descriptorProvider, invalidEnumValueFatal=True): CGThing.__init__(self) assert not argument.defaultValue or argument.optional replacer = { "index": index, "argc": argc, "args": args } ...
9,875
[ -0.022161467000842094, 0.009171763435006142, -0.01144760474562645, -0.0092401634901762, 0.0035008154809474945, 0.022658919915556908, 0.007312538102269173, 0.0035225790925323963, 0.007996533997356892, 0.0013089195126667619, -0.006696941796690226, -0.0714837908744812, 0.08158206194639206, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "type", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "retVal", "annotation": null, "type_comment": null}}], "kwarg": nu...
def typeNeedsCx(type, retVal=False): if type is None: return False if type.nullable(): type = type.inner if type.isSequence() or type.isArray(): type = type.inner if type.isUnion(): return any(typeNeedsCx(t) for t in type.unroll().flatMemberTypes) if retVal and type.i...
9,876
[ 0.0023562810383737087, -0.006226579658687115, -0.00778469443321228, -0.0389234721660614, -0.01384076289832592, 0.0048419153317809105, 0.03196193277835846, 0.006197181064635515, 0.04764891415834427, 0.014028912410140038, -0.005294650327414274, -0.024318350479006767, 0.055739350616931915, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "type", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "isEnforceRange", "annotation": null, "type_comment": null}}, {"_t...
def getConversionConfigForType(type, isEnforceRange, isClamp, treatNullAs): if type.isSequence(): return getConversionConfigForType(type.unroll(), isEnforceRange, isClamp, treatNullAs) if type.isDOMString(): assert not isEnforceRange and not isClamp treatAs = { "Default": "S...
9,877
[ 0.0007547358400188386, 0.05423589423298836, 0.0056715901009738445, -0.008659007959067822, -0.009667824022471905, 0.014399654231965542, 0.01591287925839424, 0.01184758823364973, 0.023322874680161476, 0.01763026788830757, -0.006197015289217234, -0.04779868572950363, 0.05106532946228981, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "returnType", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "descriptorProvider", "annotation": null, "type_comment": nu...
def getRetvalDeclarationForType(returnType, descriptorProvider): if returnType is None or returnType.isVoid(): # Nothing to declare return CGGeneric("()") if returnType.isPrimitive() and returnType.tag() in builtinNames: result = CGGeneric(builtinNames[returnType.tag()]) if retur...
9,878
[ 0.020604118704795837, 0.024582434445619583, -0.015497622080147266, -0.008876990526914597, 0.018656523898243904, 0.02976018376648426, -0.048784852027893066, -0.03802558034658432, 0.03272907808423042, 0.04032944142818451, 0.04251454770565033, -0.02667253464460373, 0.06341555714607239, -0.077...
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": "descriptor", "annotation": null, "type_comment": null}}, {"_type"...
def __init__(self, descriptor, name, static, unforgeable): assert not (static and unforgeable) PropertyDefiner.__init__(self, descriptor, name) # FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=772822 # We should be able to check for special operations without an # ...
9,879
[ 0.018982423469424248, -0.0015800108667463064, 0.0009787986055016518, -0.027955325320363045, -0.02909226529300213, -0.0024201753549277782, -0.020955348387360573, -0.025057245045900345, 0.008226088248193264, -0.013609829358756542, 0.000716160167939961, 0.002030049217864871, 0.01937255077064037...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "member", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}], "kwarg": nu...
def getStringAttr(member, name): attr = member.getExtendedAttribute(name) if attr is None: return None # It's a list of strings assert len(attr) == 1 assert attr[0] is not None return attr[0]
9,880
[ 0.01045483723282814, -0.006517538335174322, -0.016321230679750443, 0.013254153542220592, -0.008111931383609772, 0.0024478803388774395, -0.05428239330649376, -0.07253880053758621, 0.040164101868867874, 0.03846016898751259, 0.009402051568031311, -0.03923911228775978, 0.06835199892520905, 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": "array", "annotation": null, "type_comment": null}}, {"_type": "ar...
def generateArray(self, array, name): if len(array) == 0: return "" def condition(m, d): return m["condition"] flags = "JSPROP_ENUMERATE" if self.unforgeable: flags += " | JSPROP_PERMANENT | JSPROP_READONLY" def specData(m): # TO...
9,881
[ 0.05046302080154419, 0.053290579468011856, 0.00402799854055047, -0.012361019849777222, 0.004890913609415293, 0.0011399395298212767, -0.06577260047197342, -0.04274454712867737, 0.02538435161113739, -0.0018086191266775131, 0.01766587793827057, 0.012042601592838764, 0.0171818807721138, -0.002...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "m", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},...
def specData(m): # TODO: Use something like JS_FNSPEC # https://github.com/servo/servo/issues/6391 if "selfHostedName" in m: selfHostedName = '%s as *const u8 as *const libc::c_char' % str_to_const_array(m["selfHostedName"]) assert not m.get("methodInf...
9,882
[ 0.04264356195926666, 0.032955020666122437, 0.0009323185076937079, -0.010585199110209942, 0.012005874887108803, 0.019085964187979698, -0.03712388873100281, -0.05384594202041626, 0.018166018649935722, 0.03253580257296562, 0.039103519171476364, -0.02086763083934784, 0.040826961398124695, -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": "descriptor", "annotation": null, "type_comment": null}}, {"_type"...
def __init__(self, descriptor, name, static, unforgeable): assert not (static and unforgeable) PropertyDefiner.__init__(self, descriptor, name) self.name = name self.descriptor = descriptor self.regular = [ m for m in descriptor.interface.members if ...
9,883
[ 0.023667726665735245, 0.017209574580192566, 0.015786591917276382, -0.0003865312901325524, 0.012989276088774204, -0.017623091116547585, -0.058670662343502045, -0.0801248624920845, 0.025589359924197197, 0.04991384595632553, 0.0147163150832057, -0.02838667668402195, 0.0720977783203125, -0.045...
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": "descriptor", "annotati...
class AttrDefiner(PropertyDefiner): def __init__(self, descriptor, name, static, unforgeable): assert not (static and unforgeable) PropertyDefiner.__init__(self, descriptor, name) self.name = name self.descriptor = descriptor self.regular = [ m for m i...
9,884
[ 0.008128433488309383, -0.0056688301265239716, -0.0008467118605040014, 0.02239835076034069, -0.005015544593334198, -0.018472617492079735, -0.04698836803436279, -0.09455475956201553, 0.044965293258428574, 0.04132857173681259, 0.0023587511386722326, -0.020435484126210213, 0.08260896801948547, ...
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": "array", "annotation": null, "type_comment": null}}, {"_type": "ar...
def generateArray(self, array, name): if len(array) == 0: return "" flags = "JSPROP_ENUMERATE | JSPROP_SHARED" if self.unforgeable: flags += " | JSPROP_PERMANENT" def getter(attr): if self.static: accessor = 'get_' + self.descriptor.i...
9,885
[ 0.0377436988055706, 0.013442471623420715, -0.01740734651684761, -0.00345884682610631, 0.01849083974957466, -0.024908458814024925, -0.010495605878531933, -0.029933014884591103, 0.03252863883972168, -0.006816488225013018, -0.0426015630364418, -0.011995828710496426, 0.053722258657217026, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "attr", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def getter(attr): if self.static: accessor = 'get_' + self.descriptor.internalNameFor(attr.identifier.name) jitinfo = "0 as *const JSJitInfo" else: if attr.hasLenientThis(): accessor = "generic_lenient_getter" el...
9,886
[ 0.029989145696163177, -0.0006804690347053111, 0.02042754553258419, 0.015684474259614944, -0.01966218650341034, -0.016568409278988838, -0.05558016896247864, -0.07437998056411743, 0.05424348637461662, 0.01652529090642929, 0.0012666155816987157, -0.010838995687663555, 0.06510943174362183, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "array", "annotation": null, "type_comment": null}}, {"_type": "ar...
def generateArray(self, array, name): if len(array) == 0: return "" def specData(const): return (str_to_const_array(const.identifier.name), convertConstIDLValueToJSVal(const.value)) return self.generateGuardedArray( array, name, ...
9,887
[ 0.05980405956506729, -0.008782830089330673, -0.029521718621253967, -0.008319324813783169, 0.02533828653395176, 0.004323077853769064, 0.017565660178661346, -0.032920755445957184, 0.029711874201893806, -0.008628328330814838, 0.0036486180033534765, 0.0013608038425445557, 0.039956528693437576, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "attr", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setter(attr): if attr.readonly and not attr.getExtendedAttribute("PutForwards"): return "JSNativeWrapper { op: None, info: 0 as *const JSJitInfo }" if self.static: accessor = 'set_' + self.descriptor.internalNameFor(attr.identifier.name) jitin...
9,888
[ 0.015924789011478424, 0.03416162356734276, 0.013105511665344238, -0.00849911943078041, 0.017493676394224167, 0.027673745527863503, -0.03748813271522522, -0.006122196558862925, -0.028287144377827644, -0.006694309413433075, 0.0183429978787899, -0.005284670740365982, 0.035647936165332794, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "desc", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def DOMClassTypeId(desc): protochain = desc.prototypeChain inner = "" if desc.hasDescendants(): if desc.interface.getExtendedAttribute("Abstract"): return "::dom::bindings::codegen::InheritTypes::TopTypeId::Abstract" name = desc.interface.identifier.name inner = "(::dom::...
9,889
[ 0.023477673530578613, 0.015162930823862553, 0.042083825916051865, 0.01412996370345354, 0.015456241555511951, -0.0008974694646894932, 0.01633617654442787, -0.023936770856380463, -0.017177853733301163, 0.08503483235836029, 0.013696372509002686, 0.027647798880934715, 0.0009397127432748675, -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 define(self): defn = self.child.define() if self.reindent: # We don't use lineStartDetector because we don't want to # insert whitespace at the beginning of our _first_ line. defn = stripTrailingWhitespace( defn.replace("\n", "\n" + (" " * len(self...
9,890
[ 0.03035818599164486, 0.024332545697689056, 0.012292765080928802, -0.017950426787137985, 0.038016729056835175, 0.034359946846961975, -0.015581568703055382, -0.0035935351625084877, -0.013994663953781128, 0.02345859818160534, 0.014362641610205173, -0.05786454305052757, 0.047101184725761414, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "descriptor", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyarg...
def DOMClass(descriptor): protoList = ['PrototypeList::ID::' + proto for proto in descriptor.prototypeChain] # Pad out the list to the right length with ID::Last so we # guarantee that all the lists are the same length. ID::Last # is never the ID of any prototype, so it's safe to use as # padding. ...
9,891
[ -0.005476044025272131, 0.05189133435487747, -0.0029884057585150003, -0.01954762078821659, 0.05372944474220276, 0.039378028362989426, -0.030776603147387505, -0.04442105442285538, 0.02761881984770298, 0.029574761167168617, 0.023153148591518402, -0.03907167539000511, 0.060469191521406174, -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 define(self): args = { "domClass": DOMClass(self.descriptor), "enumerateHook": "None", "finalizeHook": FINALIZE_HOOK_NAME, "flags": "0", "name": str_to_const_array(self.descriptor.interface.identifier.name), "resolveHook": "None", ...
9,892
[ -0.0049109379760921, 0.03587598353624344, -0.01976480707526207, 0.017145639285445213, 0.013833163306117058, -0.006333321798592806, -0.009596276096999645, -0.0337190218269825, 0.038979366421699524, 0.0007063772063702345, 0.012512574903666973, -0.03992578759789467, 0.05343981087207794, -0.02...
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": "descriptor", "annotati...
class CGPrototypeJSClass(CGThing): def __init__(self, descriptor): CGThing.__init__(self) self.descriptor = descriptor def define(self): name = str_to_const_array(self.descriptor.interface.identifier.name + "Prototype") slotCount = 0 if self.descriptor.hasUnforgeableMemb...
9,893
[ 0.004813132807612419, 0.005407383199781179, -0.030510766431689262, -0.0032639424316585064, 0.011465189047157764, 0.0032816813327372074, -0.05666961148381233, -0.0381266325712204, 0.03779551014304161, -0.0171238724142313, 0.016296060755848885, -0.01995025761425495, 0.06603571027517319, -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 define(self): name = str_to_const_array(self.descriptor.interface.identifier.name + "Prototype") slotCount = 0 if self.descriptor.hasUnforgeableMembers: slotCount += 1 return """\ static PrototypeClass: JSClass = JSClass { name: %(name)s as *const u8 as *const libc::c...
9,894
[ -0.0068513075821101665, 0.029250027611851692, -0.033495280891656876, 0.005150983110070229, 0.012457933276891708, -0.006040041800588369, -0.0013530360301956534, -0.01250238623470068, 0.032539546489715576, -0.008323810994625092, 0.012280121445655823, -0.07356959581375122, 0.07050234824419022, ...
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": "descriptor", "annotati...
class CGInterfaceObjectJSClass(CGThing): def __init__(self, descriptor): assert descriptor.interface.hasInterfaceObject() and not descriptor.interface.isCallback() CGThing.__init__(self) self.descriptor = descriptor def define(self): if self.descriptor.interface.ctor(): ...
9,895
[ 0.00896517839282751, 0.01440578792244196, -0.017800254747271538, -0.004600862972438335, -0.013849899172782898, -0.00108960026409477, -0.040709950029850006, -0.022767767310142517, 0.03586071357131004, 0.014559543691575527, 0.000006063858563720714, -0.02909543365240097, 0.07086984813213348, ...
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 define(self): if self.descriptor.interface.ctor(): constructorBehavior = "InterfaceConstructorBehavior::call(%s)" % CONSTRUCT_HOOK_NAME else: constructorBehavior = "InterfaceConstructorBehavior::throw()" name = self.descriptor.interface.identifier.name args = ...
9,896
[ 0.04815833270549774, 0.05019009858369827, 0.04272198677062988, 0.021937575191259384, -0.03563826531171799, -0.019150761887431145, -0.003534997347742319, -0.027456289157271385, 0.007914275862276554, 0.026838522404432297, 0.03160218894481659, 0.0000921287210076116, 0.016267850995063782, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def define(self): body = self.definition_body() # Method will already be marked `unsafe` if `self.extern == True` if self.unsafe and not self.extern: body = CGWrapper(CGIndenter(body), pre="unsafe {\n", post="\n}") if self.catchPanic: body = CGWrapper(CGIndenter...
9,897
[ 0.039643291383981705, 0.005804197397083044, 0.018049180507659912, -0.022455377504229546, 0.0005769091076217592, 0.015465376898646355, -0.03427596762776375, -0.02661193162202835, -0.01837371662259102, 0.045484934002161026, -0.007919920608401299, -0.026661861687898636, 0.061212439090013504, ...
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 _decorators(self): decorators = [] if self.alwaysInline: decorators.append('#[inline]') if self.pub: decorators.append('pub') if self.unsafe_fn: decorators.append('unsafe') if self.extern: decorators.append('extern') ...
9,898
[ 0.02545991539955139, 0.04113798215985298, 0.0009121065959334373, 0.0033942789305001497, 0.014684068970382214, -0.03282454237341881, 0.011159892193973064, -0.007217784412205219, 0.007839033380150795, -0.031062453985214233, 0.03646167367696762, -0.0018552755936980247, 0.04479770362377167, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "descriptor", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parent", "annotation": null, "type_comment": null}}], "kwar...
def CreateBindingJSObject(descriptor, parent=None): create = "let raw = Box::into_raw(object);\nlet _rt = RootedTraceable::new(&*raw);\n" if descriptor.proxy: assert not descriptor.isGlobal() create += """ let handler = RegisterBindings::proxy_handlers[PrototypeList::Proxies::%s as usize]; roote...
9,899
[ 0.030167197808623314, 0.007788493763655424, 0.03329669311642647, 0.009698613546788692, -0.015436019748449326, 0.007696864660829306, -0.019947001710534096, -0.000588542316108942, 0.0304209403693676, 0.02192055806517601, -0.008704787120223045, -0.06354846805334091, 0.02524740807712078, -0.02...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def definition_body(self): conditions = [] iface = self.descriptor.interface bits = " | ".join(sorted( "InterfaceObjectMap::" + camel_to_upper_snake(i) for i in iface.exposureSet )) conditions.append("is_exposed_in(aObj, %s)" % bits) pref = iface.getExtended...
9,900
[ -0.010028363205492496, 0.02914082258939743, 0.0030150830280035734, 0.03855959698557854, 0.017809608951210976, -0.008438646793365479, 0.034376129508018494, 0.02170620672404766, 0.03898989409208298, 0.048289138823747635, 0.012418914586305618, -0.06507081538438797, 0.047691501677036285, 0.010...
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": "descriptor", "annotation": null, "type_comment": null}}], "kwarg"...
def __init__(self, descriptor): assert not descriptor.interface.isCallback() if not descriptor.isGlobal(): args = [Argument('*mut JSContext', 'cx'), Argument('GlobalRef', 'scope'), Argument("Box<%s>" % descriptor.concreteType, 'object')] else: args = [...