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,601 | [
0.003195972414687276,
0.021369926631450653,
0.005826239008456469,
-0.0030928764026612043,
-0.025990735739469528,
0.033984631299972534,
-0.04855551943182945,
0.011948548257350922,
0.027365349233150482,
0.020037610083818436,
0.021158447489142418,
-0.0778241753578186,
0.025927292183041573,
-0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "connection", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_typ... | def get_attached_policy_list(connection, module, name):
try:
return connection.list_attached_role_policies(RoleName=name)['AttachedPolicies']
except ClientError as e:
if e.response['Error']['Code'] == 'NoSuchEntity':
return None
else:
module.fail_json(msg=e.messa... | |
11,602 | [
0.03367434814572334,
0.03876372054219246,
-0.022932352498173714,
0.013638714328408241,
0.015529627911746502,
0.02496407739818096,
-0.024903729557991028,
0.047675151377916336,
0.01909017749130726,
-0.028786135837435722,
0.025064658373594284,
-0.053186964243650436,
0.01599229872226715,
-0.00... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "connection", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_typ... | def get_role(connection, module, name):
try:
return connection.get_role(RoleName=name)['Role']
except ClientError as e:
if e.response['Error']['Code'] == 'NoSuchEntity':
return None
else:
module.fail_json(msg=e.message, exception=traceback.format_exc(), **camel_di... | |
11,603 | [
0.03892144560813904,
0.029547808691859245,
0.029986854642629623,
0.008649210445582867,
-0.002291272394359112,
0.049612220376729965,
0.010361489839851856,
0.03288456052541733,
0.03529931232333183,
0.07292557507753372,
0.03567250445485115,
-0.06559350341558456,
0.02952585741877556,
-0.001035... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def main():
argument_spec = ec2_argument_spec()
argument_spec.update(
dict(
name=dict(required=True, type='str'),
path=dict(default="/", type='str'),
assume_role_policy_document=dict(type='json'),
managed_policy=dict(type='list', aliases=['managed_policie... | |
11,604 | [
0.03910907730460167,
0.020296957343816757,
0.01874920353293419,
0.014672196470201015,
-0.010513396002352238,
0.02340504713356495,
0.028866223990917206,
-0.023304380476474762,
0.012199565768241882,
0.055618446320295334,
-0.01747828535735607,
-0.013300609774887562,
0.00866993423551321,
-0.04... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "gravity", "annotation": null, "type_comment": null}}, {"_type": "... | def __init__(self, gravity = 64.348, standableGround=0.707,
hardLandingForce=16.0, legacyLifter=False):
assert self.notify.debugStateCall(self)
DirectObject.DirectObject.__init__(self)
self.__gravity=gravity
self.__standableGround=standableGround
self.__hardLandingFor... | |
11,605 | [
0.02824511006474495,
0.03383556753396988,
0.0656479224562645,
0.006914861034601927,
-0.012159240432083607,
0.03112020157277584,
-0.0009708424913696945,
0.003943267744034529,
0.004239428788423538,
0.06500901281833649,
0.011280740611255169,
-0.040331143885850906,
-0.00792646687477827,
-0.002... | 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 deleteCollisions(self):
assert self.notify.debugStateCall(self)
del self.cTrav
self.cWallSphereNodePath.removeNode()
del self.cWallSphereNodePath
if self.wantFloorSphere:
self.cFloorSphereNodePath.removeNode()
del self.cFloorSphereNodePath
de... | |
11,606 | [
0.03640163689851761,
0.034398358315229416,
0.03476738557219505,
0.013508934527635574,
-0.014497392810881138,
-0.009759381413459778,
-0.01763410121202469,
-0.024579670280218124,
0.012368911877274513,
0.05514281243085861,
-0.023459417745471,
-0.020480861887335777,
0.010497430339455605,
-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}}, {"_type": "arg", "_fields": {"arg": "bitmask", "annotation": null, "type_comment": null}}, {"_type": "... | def setupRay(self, bitmask, floorOffset, reach):
assert self.notify.debugStateCall(self)
# This is a ray cast from your head down to detect floor polygons.
# This ray start is arbitrarily high in the air. Feel free to use
# a higher or lower value depending on whether you want an avatar... | |
11,607 | [
0.011809183284640312,
0.029311466962099075,
0.007859451696276665,
-0.029883064329624176,
-0.013341061770915985,
0.03863992169499397,
0.028602687641978264,
0.018714068457484245,
0.034570153802633286,
0.018051017075777054,
-0.030568979680538177,
0.005155800376087427,
0.003909720107913017,
-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": "delay", "annotation": null, "type_comment": null}}], "kwarg": nul... | def startJumpDelay(self, delay):
assert self.notify.debugStateCall(self)
if self.jumpDelayTask:
self.jumpDelayTask.remove()
self.mayJump = 0
self.jumpDelayTask=taskMgr.doMethodLater(
delay,
self.setMayJump,
"jumpDelay-%s"%id(self)) | |
11,608 | [
0.017701564356684685,
0.02739686146378517,
0.038408804684877396,
0.014669290743768215,
0.028992796316742897,
0.05468732863664627,
0.016012534499168396,
-0.026066917926073074,
-0.0009384422446601093,
0.057613205164670944,
-0.019762979820370674,
0.008072764612734318,
0.0005111974896863103,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "active", "annotation": null, "type_comment": null}}], "kwarg": nu... | def setCollisionsActive(self, active = 1):
assert self.notify.debugStateCall(self)
if self.collisionsActive != active:
self.collisionsActive = active
# Each time we change the collision geometry, make one
# more pass to ensure we aren't standing in a wall.
... | |
11,609 | [
0.029156245291233063,
0.022412890568375587,
0.00454104645177722,
0.006717370357364416,
-0.050516705960035324,
-0.018372073769569397,
0.03042955882847309,
-0.016449112445116043,
0.008062143810093403,
0.04828191176056862,
0.003592558903619647,
0.018579959869384766,
-0.007081173826009035,
-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 setPriorParentVector(self):
assert self.notify.debugStateCall(self)
if __debug__:
onScreenDebug.add("__oldDt", "% 10.4f"%self.__oldDt)
onScreenDebug.add("self.__oldPosDelta",
self.__oldPosDelta.pPrintValues())
# avoid divide by zero crash... | |
11,610 | [
0.060770273208618164,
0.018541086465120316,
-0.004664851818233728,
0.012423829175531864,
0.004209311679005623,
-0.017239540815353394,
-0.0015722059179097414,
0.013962017372250557,
-0.0048097968101501465,
0.039850909262895584,
0.004073241259902716,
-0.014210494235157967,
-0.026409510523080826... | 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 __init__(self, **kwargs):
self.ERROR_MSG = ""
self.required=[]
self.b_key = "reload"
self.a10_url="/axapi/v3/vcs/reload"
self.DeviceProxy = ""
self.disable_merge = ""
for keys, value in kwargs.items():
setattr(self,keys, value) | |
11,611 | [
0.00660224724560976,
0.0005897788796573877,
-0.0420708954334259,
-0.03870696946978569,
0.008480802178382874,
0.00009556602890370414,
0.00015410021296702325,
0.003284740960225463,
0.011751891113817692,
0.02498915046453476,
-0.010359357111155987,
-0.02846229262650013,
0.03663182258605957,
-0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": n... | class ThisDirHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def translate_path(self, path):
path = path.split('?', 1)[0].split('#', 1)[0]
return os.path.join(HERE, *filter(None, path.split('/')))
def log_message(self, s, *args):
# output via logging so nose can catch it
log... | |
11,612 | [
-0.029491372406482697,
-0.006714210845530033,
0.029005391523241997,
-0.042817484587430954,
-0.03974812850356102,
0.006726999767124653,
-0.05806193873286247,
-0.028059007599949837,
0.048419054597616196,
0.030079664662480354,
-0.012213469482958317,
-0.08266792446374893,
-0.012955229729413986,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timeUntilUp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "defaultsFrom"}}, {"_type... | class Parameters(AnsibleF5Parameters):
api_map = {
'timeUntilUp': 'time_until_up',
'defaultsFrom': 'parent',
'recv': 'receive'
}
api_attributes = [
'timeUntilUp', 'defaultsFrom', 'interval', 'timeout', 'destination'
]
returnables = [
'parent', 'ip', 'port', ... | |
11,613 | [
0.018255118280649185,
0.026759209111332893,
-0.04853068292140961,
-0.010443074628710747,
-0.01238205749541521,
0.007762166205793619,
-0.032569922506809235,
0.06119953468441963,
0.00032907375134527683,
0.03336796164512634,
-0.015399638563394547,
-0.06274573504924774,
0.03005111590027809,
-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 to_return(self):
result = {}
try:
for returnable in self.returnables:
result[returnable] = getattr(self, returnable)
result = self._filter_params(result)
return result
except Exception:
return result | |
11,614 | [
-0.02076628804206848,
0.007913708686828613,
0.024502430111169815,
-0.002010414842516184,
0.02202019840478897,
-0.00665340106934309,
-0.028251364827156067,
0.02953086607158184,
0.04465455934405327,
0.07318741083145142,
-0.004500641953200102,
-0.03416265547275543,
-0.050463490188121796,
-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 interval(self):
if self._values['interval'] is None:
return None
# Per BZ617284, the BIG-IP UI does not raise a warning about this.
# So I raise the error instead.
if 1 > int(self._values['interval']) > 86400:
raise F5ModuleError(
"Interval va... | |
11,615 | [
0.0011606017360463738,
-0.0011701987823471427,
0.0013487037504091859,
-0.0045553939417004585,
0.02655436471104622,
-0.029543520882725716,
-0.049177780747413635,
0.009709643200039864,
0.02278720773756504,
0.043117571622133255,
-0.02528499625623226,
-0.014863892458379269,
-0.024547943845391273... | 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 ip(self):
if self._values['ip'] is None:
return None
try:
if self._values['ip'] in ['*', '0.0.0.0']:
return '*'
result = str(netaddr.IPAddress(self._values['ip']))
return result
except netaddr.core.AddrFormatError:
r... | |
11,616 | [
0.051697637885808945,
-0.0077857282012701035,
0.0171356201171875,
-0.021777980029582977,
0.0138468649238348,
-0.019792694598436356,
0.02805469185113907,
-0.012753955088555813,
0.04728589206933975,
0.041670940816402435,
0.00955042615532875,
0.020795363932847977,
0.01802799664437771,
-0.0431... | 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 parent(self):
if self._values['parent'] is None:
return None
if self._values['parent'].startswith('/'):
parent = os.path.basename(self._values['parent'])
result = '/{0}/{1}'.format(self.partition, parent)
else:
result = '/{0}/{1}'.format(self.p... | |
11,617 | [
-0.0002493198262527585,
-0.030355092138051987,
0.036265742033720016,
0.009971361607313156,
0.005294959060847759,
-0.012382586486637592,
-0.02312714420258999,
0.009730811230838299,
0.03386024758219719,
0.038717061281204224,
-0.022050397470593452,
0.0028550969436764717,
-0.028201598674058914,
... | 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 destination(self):
if self.want.ip is None and self.want.port is None:
return None
if self.want.port is None:
self.want.update({'port': self.have.port})
if self.want.ip is None:
self.want.update({'ip': self.have.ip})
if self.want.port in [None, '*... | |
11,618 | [
0.011121323332190514,
-0.011132771149277687,
-0.009055035188794136,
-0.022139618173241615,
0.05105620622634888,
-0.018339022994041443,
-0.0057237897999584675,
-0.05256728455424309,
0.019415095448493958,
0.00010454859875608236,
-0.00594129366800189,
-0.057283688336610794,
-0.01678215153515339... | 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": "want", "annotation": n... | class Difference(object):
def __init__(self, want, have=None):
self.want = want
self.have = have
def compare(self, param):
try:
result = getattr(self, param)
return result
except AttributeError:
result = self.__default(param)
retur... | |
11,619 | [
-0.01036846823990345,
-0.0002477102098055184,
0.024846209213137627,
-0.035685159265995026,
0.011946666985750198,
0.031611621379852295,
0.023000014945864677,
0.011994310654699802,
0.04561888054013252,
0.0583159364759922,
-0.014090635813772678,
-0.042450569570064545,
-0.03073021024465561,
-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 interval(self):
if self.want.timeout is not None and self.want.interval is not None:
if self.want.interval >= self.want.timeout:
raise F5ModuleError(
"Parameter 'interval' must be less than 'timeout'."
)
elif self.want.timeout is not No... | |
11,620 | [
0.0362018421292305,
-0.006801899056881666,
-0.015649989247322083,
-0.03067038021981716,
0.0337059386074543,
-0.029591070488095284,
-0.008915547281503677,
-0.010495161637663841,
0.007847480475902557,
-0.006824384443461895,
-0.03262662887573242,
-0.02159743383526802,
-0.0007392146508209407,
... | 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": "param", "annotation": null, "type_comment": null}}], "kwarg": nul... | def __default(self, param):
attr1 = getattr(self.want, param)
try:
attr2 = getattr(self.have, param)
if attr1 != attr2:
return attr1
except AttributeError:
return attr1 | |
11,621 | [
-0.004022400360554457,
0.06215855851769447,
-0.003083947114646435,
-0.042590122669935226,
-0.00035651642247103155,
0.041132085025310516,
-0.0018849007319658995,
-0.01539895124733448,
0.027574867010116577,
0.04269244149327278,
0.040569331496953964,
-0.03701375797390938,
-0.05566132813692093,
... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "an... | class ModuleManager(object):
def __init__(self, *args, **kwargs):
self.module = kwargs.get('module', None)
self.client = kwargs.get('client', None)
self.have = None
self.want = Parameters(params=self.module.params)
self.changes = Changes()
def _set_changed_options(self):... | |
11,622 | [
-0.00308197527192533,
0.005363909527659416,
0.0039941431023180485,
0.004397193901240826,
0.01666751503944397,
0.02329815737903118,
0.03944443538784981,
-0.01837669312953949,
0.012449119240045547,
0.03634124621748924,
0.01671600341796875,
-0.0560513399541378,
-0.029868189245462418,
0.052317... | 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 _update_changed_options(self):
diff = Difference(self.want, self.have)
updatables = Parameters.updatables
changed = dict()
for k in updatables:
change = diff.compare(k)
if change is None:
continue
else:
changed[k] = ... | |
11,623 | [
0.025666143745183945,
0.02295597642660141,
0.033685266971588135,
0.004544788505882025,
-0.030418215319514275,
0.01235662680119276,
-0.024119244888424873,
0.008990575559437275,
-0.003132469719275832,
0.043387413024902344,
-0.0026699472218751907,
-0.020295310765504837,
-0.0519757941365242,
-... | 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 _announce_deprecations(self):
warnings = []
if self.want:
warnings += self.want._values.get('__warnings', [])
if self.have:
warnings += self.have._values.get('__warnings', [])
for warning in warnings:
self.module.deprecate(
msg=warn... | |
11,624 | [
0.0040487307123839855,
0.017071416601538658,
-0.011704573407769203,
-0.009317811578512192,
-0.001877721049822867,
0.06224459782242775,
-0.013073253445327282,
0.00661079166457057,
0.0373251847922802,
0.031176237389445305,
0.042853839695453644,
-0.04954217001795769,
0.004665648099035025,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def exec_module(self):
changed = False
result = dict()
state = self.want.state
try:
if state == "present":
changed = self.present()
elif state == "absent":
changed = self.absent()
except iControlUnexpectedHTTPError as e:
... | |
11,625 | [
0.04285417124629021,
0.007545730099081993,
0.00916131492704153,
-0.006633399985730648,
-0.0003781576524488628,
0.002546921605244279,
0.046427465975284576,
-0.014685980044305325,
0.025836681947112083,
0.04176444560289383,
0.007913196459412575,
0.018043862655758858,
0.003147222101688385,
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 create(self):
self._set_changed_options()
if self.want.timeout is None:
self.want.update({'timeout': 16})
if self.want.interval is None:
self.want.update({'interval': 5})
if self.want.time_until_up is None:
self.want.update({'time_until_up': 0})
... | |
11,626 | [
0.04488178715109825,
0.015050110407173634,
-0.01556384563446045,
-0.0063224476762115955,
0.059499893337488174,
0.05819220468401909,
0.03652191162109375,
0.0071455915458500385,
0.015178544446825981,
0.00023898910149000585,
-0.0009143613278865814,
-0.010455681942403316,
-0.05730484426021576,
... | 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 update(self):
self.have = self.read_current_from_device()
if not self.should_update():
return False
if self.module.check_mode:
return True
self.update_on_device()
return True | |
11,627 | [
0.027723025530576706,
0.01129105594009161,
0.0029356745071709156,
0.009478910826146603,
-0.02932886593043804,
0.010488135740160942,
-0.02032947540283203,
-0.014831707812845707,
0.058211665600538254,
0.0395214818418026,
0.019905712455511093,
-0.029685718938708305,
0.018879760056734085,
-0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class ArgumentSpec(object):
def __init__(self):
self.supports_check_mode = True
argument_spec = dict(
name=dict(required=True),
parent=dict(default='/Common/tcp_half_open'),
ip=dict(),
port=dict(type='int'),
interval=dict(type='int'),
... | |
11,628 | [
0.015111817046999931,
0.01232490036636591,
0.018283136188983917,
0.015340056270360947,
-0.013946597464382648,
0.03423583507537842,
0.003922105301171541,
0.015328044071793556,
0.057900603860616684,
0.06717430800199509,
0.03349105641245842,
-0.00923766940832138,
0.032433949410915375,
-0.0164... | 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 __init__(self):
self.supports_check_mode = True
argument_spec = dict(
name=dict(required=True),
parent=dict(default='/Common/tcp_half_open'),
ip=dict(),
port=dict(type='int'),
interval=dict(type='int'),
timeout=dict(type='int'),... | |
11,629 | [
0.04365583136677742,
0.003942601848393679,
0.03703434765338898,
-0.009723343886435032,
-0.001973911887034774,
-0.05677346512675285,
0.03279409185051918,
-0.014141147024929523,
-0.011530152522027493,
0.030496416613459587,
-0.0035927286371588707,
-0.10995420813560486,
-0.010318650864064693,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "apps", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schema_editor", "annotation": null, "type_comment": null}}], "kwa... | def create_homepage(apps, schema_editor):
# Get models
ContentType = apps.get_model('contenttypes.ContentType')
Page = apps.get_model('wagtailcore.Page')
Site = apps.get_model('wagtailcore.Site')
HomePage = apps.get_model('home.HomePage')
# Delete the default homepage
Page.objects.get(id=2)... | |
11,630 | [
0.018050294369459152,
0.03816017135977745,
0.003404678776860237,
-0.017078354954719543,
-0.022724857553839684,
0.033254195004701614,
-0.032189689576625824,
0.004243554547429085,
0.06026021018624306,
0.03841472789645195,
0.01757589541375637,
-0.07576494663953781,
-0.006271319929510355,
-0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def main():
spec = ArgumentSpec()
module = AnsibleModule(
argument_spec=spec.argument_spec,
supports_check_mode=spec.supports_check_mode
)
if not HAS_F5SDK:
module.fail_json(msg="The python f5-sdk module is required")
if not HAS_NETADDR:
module.fail_json(msg="The pyt... | |
11,631 | [
0.005028653424233198,
0.009572351351380348,
0.04212496057152748,
0.004281932953745127,
-0.014581717550754547,
-0.014284131117165089,
-0.003945770673453808,
-0.03401298448443413,
-0.01782209798693657,
0.009407025761902332,
0.007009805180132389,
-0.020092571154236794,
-0.02161356620490551,
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": "s", "annotation": null, "type_comment": null}}, {"_type": "arg", ... | def __init__(self, s, label=None, fontsize=12, color='black'):
self.s = s
self.label = label
self.fontsize = fontsize
self.color = color
if HAS_MATPLOTLIB:
self.parser = mathtext.MathTextParser("Pdf")
else:
log.error('Math support not available, so... | |
11,632 | [
-0.01208882313221693,
0.033171262592077255,
0.07549966871738434,
-0.0063889725133776665,
-0.004777129273861647,
-0.017531713470816612,
-0.019634118303656578,
0.0030630859546363354,
0.007685455027967691,
0.01454162783920765,
-0.005495450459420681,
-0.01296482514590025,
-0.0026820250786840916,... | 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": "aW", "annotation": null, "type_comment": null}}, {"_type": "arg",... | def wrap(self, aW, aH):
if HAS_MATPLOTLIB:
try:
width, height, descent, glyphs, rects, used_characters = \
self.parser.parse(enclose(self.s), 72,
prop=FontProperties(size=self.fontsize))
return width, height
... | |
11,633 | [
0.0246522668749094,
0.021397076547145844,
0.07975893467664719,
-0.036147575825452805,
0.018877370283007622,
-0.034104570746421814,
0.01032398734241724,
-0.0024158540181815624,
-0.018577730283141136,
0.020661596208810806,
-0.002996408147737384,
-0.07196827232837677,
0.0007567632710561156,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": nu... | class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'HaikuModel', fields ['lines', 'object_id']
db.delete_unique('django_haikus_haikumodel', ['lines', 'object_id'])
# Adding model 'HaikuLine'
db.create_table('django_haikus_haikuline',... | |
11,634 | [
0.036914899945259094,
0.014471878297626972,
0.09193899482488632,
-0.030543144792318344,
0.01966988854110241,
-0.03129124641418457,
0.030181992799043655,
0.024816304445266724,
0.004946493078023195,
0.014755641110241413,
0.008893369697034359,
-0.05871300399303436,
0.014329997822642326,
0.010... | 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": "orm", "annotation": null, "type_comment": null}}], "kwarg": null,... | def forwards(self, orm):
# Removing unique constraint on 'HaikuModel', fields ['lines', 'object_id']
db.delete_unique('django_haikus_haikumodel', ['lines', 'object_id'])
# Adding model 'HaikuLine'
db.create_table('django_haikus_haikuline', (
('id', self.gf('django.d... | |
11,635 | [
0.0077291084453463554,
-0.007840698584914207,
0.011147300712764263,
-0.037095021456480026,
-0.04961664602160454,
-0.009367725811898708,
0.02195395715534687,
0.021437115967273712,
0.0008127016481012106,
0.023962585255503654,
0.022764455527067184,
0.032325997948646545,
-0.08739295601844788,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "version", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Name", "_fields": {"id": "NEXT_VERSION", "c... | def add_milestone_and_version(version=NEXT_VERSION):
auth = 'Basic ' + ':'.join(get_mercurial_creds()).encode('base64').strip()
headers = {
'Authorization': auth,
}
base = 'https://api.bitbucket.org'
for type in 'milestones', 'versions':
url = (base + '/1.0/repositories/{repo}/issues/{type}'
.format(repo =... | |
11,636 | [
0.04316975176334381,
0.03403236344456673,
0.08895737677812576,
-0.0364236906170845,
0.008250079117715359,
0.008231200277805328,
0.02726113237440586,
0.0357188805937767,
0.007218032609671354,
0.024102061986923218,
0.019747329875826836,
-0.07924103736877441,
0.004298096057027578,
0.018048228... | 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": "orm", "annotation": null, "type_comment": null}}], "kwarg": null,... | def backwards(self, orm):
# Deleting model 'HaikuLine'
db.delete_table('django_haikus_haikuline')
# Adding field 'HaikuModel.lines'
db.add_column('django_haikus_haikumodel', 'lines', self.gf('picklefield.fields.PickledObjectField')(default=''), keep_default=False)
# De... | |
11,637 | [
0.04827510192990303,
0.04074662923812866,
0.038228992372751236,
-0.045268602669239044,
-0.02512749470770359,
0.007797345519065857,
0.04639298468828201,
0.005313316360116005,
-0.023465365171432495,
0.02412532828748226,
0.029502809047698975,
0.0017599024577066302,
-0.050206106156110764,
0.01... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assert", "_fields": {"msg": {"_type": "Constant", "_fields": {... | def do_release():
assert all(map(os.path.exists, files_with_versions)), (
"Expected file(s) missing")
assert has_sphinx(), "You must have Sphinx installed to release"
res = raw_input('Have you read through the SCM changelog and '
'confirmed the changelog is current for releasing {VERSION}? '
.format(**global... | |
11,638 | [
-0.014211639761924744,
0.03483903408050537,
0.05276832729578018,
0.00212770514190197,
-0.005688386037945747,
0.0031192870810627937,
0.039091333746910095,
0.04652664437890053,
-0.02059009298682213,
0.006204381585121155,
0.056498415768146515,
-0.033396732062101364,
-0.013229383155703545,
-0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"va... | def has_sphinx():
try:
devnull = open(os.path.devnull, 'wb')
subprocess.Popen(['sphinx-build', '--version'], stdout=devnull,
stderr=subprocess.STDOUT).wait()
except Exception:
return False
return True | |
11,639 | [
-0.008400187827646732,
0.05222442373633385,
0.0257866233587265,
0.005160580389201641,
-0.01801590621471405,
-0.027718449011445045,
0.00289231282658875,
0.01999114453792572,
-0.022291971370577812,
-0.004986933432519436,
0.017408141866326332,
-0.021933823823928833,
-0.0034756590612232685,
-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": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"val... | def build_docs():
if not os.path.isdir('docs'):
return
if os.path.isdir('docs/build'):
shutil.rmtree('docs/build')
subprocess.check_call([
'sphinx-build',
'-b', 'html',
'-d', 'build/doctrees',
'.',
'build/html',
],
cwd='docs')
return True | |
11,640 | [
0.006111289374530315,
-0.02120417356491089,
0.0037428776267915964,
-0.037002332508563995,
-0.025836024433374405,
0.025258684530854225,
0.025416139513254166,
-0.02136163040995598,
0.006416361778974533,
0.02517995610833168,
0.051698293536901474,
0.005645480006933212,
-0.015378274023532867,
-... | 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": "input", "annotation": null, "type_comment": null}}, {"_type": "ar... | def __init__(self, input, output):
mp.Process.__init__(self)
self.input = input
self.output = output
# parent data transfer block
sz = int(input["nr_rois"])
self.nrROIs = sz
self.first_snr_vol = config.FIRST_SNR_VOLUME
if input["is_auto_rtqa"]:
... | |
11,641 | [
0.02274269051849842,
0.02807670831680298,
0.043619170784950256,
-0.056515518575906754,
-0.022199539467692375,
0.02029155008494854,
0.011587212793529034,
0.027617119252681732,
0.015570317395031452,
0.026976479217410088,
0.024929219856858253,
-0.0065352157689630985,
-0.031224196776747704,
-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 run(self):
np.seterr(divide='ignore', invalid='ignore')
while not self.input["is_stopped"]:
if self.input["data_ready"]:
self.calculate_rtqa()
self.output["rSNR"] = self.rSNR
self.output["rCNR"] = self.rCNR
self.output["... | |
11,642 | [
0.017185799777507782,
-0.004696497693657875,
0.020060939714312553,
-0.02277996577322483,
-0.051752541214227676,
0.013087746687233448,
0.021648121997714043,
0.0009871101938188076,
0.008989695459604263,
0.010680954903364182,
0.00934746116399765,
0.023833749815821648,
-0.03710363432765007,
-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 calculate_rtqa(self):
iteration = self.input["iteration"]
for i in range(self.nrROIs):
self.linTrendCoeff[i][iteration] = self.input["beta_coeff"][i][-1]
volume = np.memmap(self.input["volume"], dtype=np.float64, order="F")
if self.input["is_new_dcm_block"]:
... | |
11,643 | [
0.017913006246089935,
-0.007811324205249548,
0.01675577275454998,
-0.05771700665354729,
-0.0546792708337307,
-0.002918698824942112,
0.013175582513213158,
-0.009052938781678677,
-0.014417197555303574,
0.005433571524918079,
0.016044557094573975,
0.027026217430830002,
-0.030232718214392662,
-... | 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": "volume", "annotation": null, "type_comment": null}}, {"_type": "a... | def calculate_rtqa_volume(self, volume, index_volume):
output_vol, self.volume_data["mean_vol"], \
self.volume_data["m2_vol"], self.volume_data["var_vol"] = self.snr(self.volume_data["mean_vol"],
self.volume_data["m2_vol"],
... | |
11,644 | [
-0.007098167669028044,
-0.01891625113785267,
0.039808280766010284,
-0.05400461703538895,
-0.0555657260119915,
0.00446379603818059,
-0.013159661553800106,
-0.013330407440662384,
-0.0075433277525007725,
0.001317947986535728,
0.012135183438658714,
0.02136768028140068,
-0.01045211311429739,
-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": "index_volume", "annotation": null, "type_comment": null}}], "kwar... | def calculate_rtqa_ts(self, index_volume):
for roi in range(self.nrROIs):
data = self.input["raw_ts"][roi]
# AR(1) was not applied.
self.rSNR[roi, index_volume], \
self.rMean[roi, index_volume], \
self.m2[roi, index_volume], \
self.rVar[... | |
11,645 | [
0.06370715796947479,
-0.008395766839385033,
0.034176770597696304,
0.024057969450950623,
-0.02651022933423519,
0.04790943115949631,
0.01662374660372734,
0.015268550254404545,
-0.011693412438035011,
0.002115075010806322,
-0.010254322551190853,
-0.006211318541318178,
0.004133350215852261,
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 micro_displacement(self):
n = len(self.mc_params) - 1
sqDispl = 0
if not self.input["is_new_dcm_block"]:
for i in range(3):
sqDispl += self.mc_params[n, i] ** 2
self.rsqDispl = np.append(self.rsqDispl, np.sqrt(sqDispl))
self.MD = np.ap... | |
11,646 | [
0.04807068035006523,
-0.01697610132396221,
0.024805203080177307,
-0.02436155453324318,
-0.003575289621949196,
0.040137194097042084,
-0.004893188364803791,
0.014301158487796783,
0.022143308073282242,
0.038362596184015274,
0.03802333399653435,
-0.00515415845438838,
-0.007803004235029221,
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 all_fd(self):
i = len(self.mc_params) - 1
if not self.input["is_new_dcm_block"]:
self.FD = np.append(self.FD, self._ij_FD(i - 1, i))
self.meanFD = self.meanFD + (self.FD[-1] - self.meanFD) / (self.blockIter + 1)
else:
self.FD = np.append(self.FD, 0)
... | |
11,647 | [
0.03946342691779137,
0.021422632038593292,
-0.019653670489788055,
-0.005147544667124748,
-0.020967384800314903,
0.0315031036734581,
0.017065266147255898,
-0.02364683896303177,
0.012265659868717194,
0.03194534406065941,
0.008344030007719994,
-0.013163146562874317,
-0.012994054704904556,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "volume", "annotation": null, "type_comment": null}}, {"_type": "a... | def calculateDVARS(self, volume, index_volume, isNewDCMBlock):
if self.prevVol.size == 0:
dvars_diff = (volume / self.input["dvars_scale"]) ** 2
else:
dvars_diff = ((self.prevVol - volume) / self.input["dvars_scale"]) ** 2
dvars_value = 100 * (np.mean(dvars_diff, axis=No... | |
11,648 | [
0.028614088892936707,
0.0011711518745869398,
0.044997554272413254,
-0.004425054881721735,
-0.04198421165347099,
0.027854423969984055,
0.029702944681048393,
-0.010850563645362854,
0.027905067428946495,
-0.026638956740498543,
0.03930005803704262,
0.01609225943684578,
-0.011027819477021694,
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 calc_mc(self):
if self.input["iteration"] == 0:
self.output["mc_offset"] = self.input["offset_mc"]
self.mc_params = self.output["mc_offset"]
else:
self.mc_params = np.vstack((self.mc_params, self.input["mc_ts"]))
self.micro_displacement()
self.all... | |
11,649 | [
0.08800210803747177,
0.02308649942278862,
0.0248879361897707,
-0.013184985145926476,
0.016660097986459732,
0.011255786754190922,
0.004861324559897184,
-0.005816341377794743,
-0.03628426045179367,
0.01529304962605238,
0.020429061725735664,
0.033217985183000565,
-0.0060782525688409805,
0.063... | 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": "m", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def write(self, m):
# This manage the case when console is called from another thread
if QThread.currentThread() != QCoreApplication.instance().thread():
QMetaObject.invokeMethod(self, "write", Qt.QueuedConnection, Q_ARG(str, m))
return
if self.style == "_traceback":
... | |
11,650 | [
0.05117291212081909,
-0.011825673282146454,
0.03492754325270653,
0.013533825986087322,
-0.002350203227251768,
0.004763118457049131,
0.03239517658948898,
-0.02132204733788967,
-0.023734962567687035,
-0.009108157828450203,
-0.01850299723446369,
0.011019377037882805,
-0.02164456620812416,
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": "parent", "annotation": null, "type_comment": null}}], "kwarg": nu... | def __init__(self, parent=None):
super(ShellOutputScintilla, self).__init__(parent)
self.parent = parent
self.shell = self.parent.shell
self.settings = QgsSettings()
# Creates layout for message bar
self.layout = QGridLayout(self)
self.layout.setContentsMargins(... | |
11,651 | [
0.023276710882782936,
0.04245179891586304,
0.04849030077457428,
-0.005135573912411928,
-0.019744757562875748,
-0.030944466590881348,
0.006932882126420736,
-0.0019041214836761355,
-0.012760604731738567,
0.021886715665459633,
-0.018947219476103783,
0.04944734275341034,
-0.018104108050465584,
... | 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 insertInitText(self):
txtInit = QCoreApplication.translate("PythonConsole",
"Python Console\n"
"Use iface to access QGIS API interface or Type help(iface) for more info\n"
"... | |
11,652 | [
0.026771465316414833,
-0.016202595084905624,
0.06066396087408066,
-0.0032422093208879232,
0.01385896559804678,
0.023053206503391266,
0.05530065298080444,
0.028844676911830902,
0.02215181104838848,
0.018647633492946625,
-0.010044933296740055,
0.002197153167799115,
-0.007521023973822594,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def refreshSettingsOutput(self):
# Set Python lexer
self.setLexers()
self.setSelectionForegroundColor(QColor(self.settings.value("pythonConsole/selectionForegroundColor", QColor(self.SELECTION_FOREGROUND_COLOR))))
self.setSelectionBackgroundColor(QColor(self.settings.value("pythonConsole... | |
11,653 | [
-0.0016088177217170596,
-0.0017894302727654576,
0.01301624532788992,
-0.02129710279405117,
0.014145453460514545,
0.005245352629572153,
-0.005773530807346106,
0.003114428138360381,
-0.01368405669927597,
0.015371797606348991,
-0.00645955465734005,
-0.02275414578616619,
-0.01460685022175312,
... | 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 setLexers(self):
self.lexer = QsciLexerPython()
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
loadFont = self.settings.value("pythonConsole/fontfamilytext")
if loadFont:
font.setFamily(loadFont)
fontSize = self.settings.value("pythonConsole/fontsize",... | |
11,654 | [
-0.011875714175403118,
0.03779441490769386,
0.003519604913890362,
-0.009584427811205387,
-0.017680699005723,
-0.01214145589619875,
0.0023488637525588274,
0.025652959942817688,
0.004045183304697275,
0.032243359833955765,
0.021164871752262115,
-0.004925084766000509,
0.043321847915649414,
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": "e", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def contextMenuEvent(self, e):
menu = QMenu(self)
iconRun = QgsApplication.getThemeIcon("console/mIconRunConsole.svg")
iconClear = QgsApplication.getThemeIcon("console/iconClearConsole.svg")
iconHideTool = QgsApplication.getThemeIcon("console/iconHideToolConsole.svg")
iconSetting... | |
11,655 | [
0.06420473754405975,
-0.005629310850054026,
0.007743676658719778,
0.01017894595861435,
0.0010721783619374037,
0.015271417796611786,
0.017838647589087486,
0.07519344240427017,
-0.018978305160999298,
-0.000902729167137295,
-0.0038388483226299286,
0.03390182927250862,
-0.026656001806259155,
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": "e", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def keyPressEvent(self, e):
# empty text indicates possible shortcut key sequence so stay in output
txt = e.text()
if len(txt) and txt >= " ":
self.shell.append(txt)
self.shell.move_cursor_to_end()
self.shell.setFocus()
e.ignore()
else:
... | |
11,656 | [
0.017043638974428177,
-0.0048829843290150166,
0.04520006850361824,
0.023783788084983826,
-0.007609846070408821,
-0.025076253339648247,
0.007815190590918064,
0.026622381061315536,
-0.025486944243311882,
0.02203231491148472,
0.008950628340244293,
0.0026634461246430874,
-0.00722935376688838,
... | 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": "parent", "annotation":... | class FrmAreaChooser(wx.Frame):
def __init__(self, parent, id, title, callback=None):
flag = wx.BORDER_NONE
if CrossPlatform.get().is_linux():
flag = wx.RESIZE_BORDER
wx.Frame.__init__(self, parent, id, title,
style=flag | wx.STAY_ON_TOP |
... | |
11,657 | [
0.01190995890647173,
0.029455246403813362,
0.017521610483527184,
0.045603539794683456,
-0.008482590317726135,
-0.005534697789698839,
-0.009654643945395947,
0.01044785138219595,
-0.0030026475433260202,
0.05876842513680458,
0.014040965586900711,
0.02210327424108982,
0.04205186292529106,
0.02... | 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": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, parent, id, title, callback=None):
flag = wx.BORDER_NONE
if CrossPlatform.get().is_linux():
flag = wx.RESIZE_BORDER
wx.Frame.__init__(self, parent, id, title,
style=flag | wx.STAY_ON_TOP |
wx.FRAME_NO_TASKBAR | wx... | |
11,658 | [
-0.0000508310658915434,
0.004188513848930597,
0.01662316359579563,
0.04035807400941849,
-0.018455639481544495,
0.0025510122068226337,
0.04650995507836342,
0.00639184657484293,
-0.020462635904550552,
0.05309813842177391,
-0.02231692522764206,
-0.01495430339127779,
-0.00944051705300808,
0.00... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "event", "annotation": null, "type_comment": null}}], "kwarg": nul... | def update_border_color(self, event):
if self.step >= 1:
self.background_colour = (self.background_colour + 8) % 512
if self.background_colour >= 256:
colour = 511 - self.background_colour
else:
colour = self.background_colour
self.... | |
11,659 | [
-0.008895732462406158,
0.019692037254571915,
0.023989440873265266,
0.010648481547832489,
-0.024010557681322098,
-0.008103827014565468,
0.008140782825648785,
0.010822701267898083,
-0.016049273312091827,
0.023123623803257942,
0.005458864849060774,
-0.0028112626168876886,
-0.020916849374771118,... | 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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul... | def update_window_position_step_2_3(self, event):
pos = wx.GetMousePosition()
if self.mouse_end_pos is not None:
if pos.x == self.mouse_end_pos.x and \
pos.y == self.mouse_end_pos.y:
return
start = self.mouse_start_pos
x = pos.x if pos.x < start... | |
11,660 | [
-0.03364569693803787,
0.0033613734412938356,
0.017291629686951637,
0.017440786585211754,
-0.02912835031747818,
-0.005353692919015884,
0.015991827473044395,
0.004727763589471579,
-0.0247388556599617,
0.021947477012872696,
0.01072336733341217,
-0.0017898913938552141,
-0.011612985283136368,
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul... | def update_window_position(self, event):
if self.step == 0:
pos = wx.GetMousePosition()
self.SetPosition((pos.x, pos.y))
self.SetSize((1, 1))
self.mouse_start_pos = pos
elif self.step == 1:
pos = wx.GetMousePosition()
start = self.m... | |
11,661 | [
0.033712245523929596,
0.03413748741149902,
0.03238927200436592,
0.030144937336444855,
-0.05471447855234146,
-0.006662125699222088,
0.019372139126062393,
0.026199636980891228,
-0.02449866756796837,
0.02114398032426834,
0.05050930753350258,
-0.012213896960020065,
-0.011682344600558281,
-0.01... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "event", "annotation": null, "type_comment": null}}], "kwarg": nul... | def OnClose(self, event):
if self.step >= 7:
pos = self.mouse_end_pos
start = self.mouse_start_pos
x = pos.x if pos.x < start.x else start.x
y = pos.y if pos.y < start.y else start.y
w = pos.x if pos.x > start.x else start.x
h = pos.y if po... | |
11,662 | [
0.00261771772056818,
0.028491660952568054,
0.025743985548615456,
0.03153638169169426,
-0.030967043712735176,
0.0047620185650885105,
0.036313872784376144,
0.0014790415298193693,
-0.01659744419157505,
0.053666308522224426,
0.008044995367527008,
0.010607017204165459,
-0.011064963415265083,
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul... | def OnTimer(self, event):
self.update_border_color(event)
self.update_window_position(event)
is_left_down = wx.GetMouseState().LeftDown()
# start point
if self.step == 0 and is_left_down:
self.txt.SetLabel('')
self.dialog.Close(True)
# end point
... | |
11,663 | [
-0.0029261952731758356,
0.01817837543785572,
-0.001384766073897481,
0.02831380069255829,
-0.030384479090571404,
-0.0151486461982131,
-0.01258754450827837,
0.015235832892358303,
-0.04904237762093544,
0.042830344289541245,
0.01451654452830553,
0.008397145196795464,
0.09049953520298004,
0.027... | 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": "parent", "annotation":... | class HintDialog(wx.Dialog):
def __init__(self, parent, id, title=""):
wx.Dialog.__init__(self, parent, id, title,
style=wx.STAY_ON_TOP | wx.BORDER_STATIC |
wx.FRAME_NO_TASKBAR | wx.CLIP_CHILDREN)
self.rootPanel = wx.Panel(self)
self.roo... | |
11,664 | [
-0.0006570509285666049,
0.04198789596557617,
-0.0017833767924457788,
0.020909465849399567,
0.004997679032385349,
-0.016558608040213585,
-0.0027404073625802994,
-0.004459102172404528,
-0.03848186507821083,
0.05373099073767662,
0.029167648404836655,
-0.010692340321838856,
0.07075425237417221,
... | 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": "parent", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, parent, id, title=""):
wx.Dialog.__init__(self, parent, id, title,
style=wx.STAY_ON_TOP | wx.BORDER_STATIC |
wx.FRAME_NO_TASKBAR | wx.CLIP_CHILDREN)
self.rootPanel = wx.Panel(self)
self.rootPanel.SetBackgroundColour(wx.Col... | |
11,665 | [
0.02915268950164318,
0.004740485921502113,
0.005960952024906874,
0.0018985025817528367,
-0.014980281703174114,
0.030583780258893967,
-0.036469716578722,
-0.02357836440205574,
0.018234858289361,
-0.010029171593487263,
0.017311573028564453,
-0.027213793247938156,
-0.02509024180471897,
-0.023... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "event", "annotation": null, "type_comment": null}}], "kwarg": nul... | def add(self, event):
# get tempo in microseconds per beat
tempo = event.mpqn
# convert into milliseconds per beat
tempo = tempo / 1000.0
# generate ms per tick
event.mpt = tempo / self.resolution
self.append(event) | |
11,666 | [
0.00010829908569576219,
-0.010450288653373718,
0.03266490623354912,
-0.023212838917970657,
-0.03889109194278717,
0.010574361309409142,
-0.036003585904836655,
-0.027679448947310448,
-0.00929979793727398,
-0.008267740719020367,
0.0007000227342359722,
-0.019411707296967506,
0.005715794861316681... | 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": "resolution", "annotati... | class TempoMap(list):
def __init__(self, resolution):
self.resolution = resolution
def add_and_update(self, event):
self.add(event)
self.update()
def add(self, event):
# get tempo in microseconds per beat
tempo = event.mpqn
# convert into milliseconds per be... | |
11,667 | [
0.03422657027840614,
-0.034882597625255585,
0.003150066128000617,
-0.04241561144590378,
-0.013686103746294975,
0.020008858293294907,
-0.024589743465185165,
-0.0080250333994627,
-0.011520080268383026,
-0.009749935008585453,
-0.007159755099564791,
-0.018561070784926414,
-0.014048050157725811,
... | 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": "offset", "annotation": null, "type_comment": null}}], "kwarg": nu... | def get_tempo(self, offset=0):
try:
last = self[0]
for tm in self[1:]:
if tm.tick > offset:
return last
last = tm
return last
except IndexError:
# no tempo changes specified in midi track
last... | |
11,668 | [
0.028837615624070168,
0.009507045149803162,
0.011393263936042786,
-0.04463627561926842,
-0.0020444579422473907,
0.04205380007624626,
0.010640041902661324,
-0.015444201417267323,
-0.002603044267743826,
0.019976189360022545,
-0.0035382413771003485,
-0.013228844851255417,
-0.029470575973391533,... | 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 update(self):
self.sort()
# adjust running time
last = None
for event in self:
if last:
event.msdelay = last.msdelay + \
int(last.mpt * (event.tick - last.tick))
last = event | |
11,669 | [
0.05091287940740585,
-0.019030651077628136,
0.0012742237886413932,
-0.03815101459622383,
-0.02615172602236271,
0.0012798309326171875,
0.042277876287698746,
-0.03337372839450836,
0.006212716922163963,
0.04221059009432793,
0.04844573512673378,
0.010362003929913044,
0.01030032616108656,
0.013... | 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": "stream", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, stream, window):
self.stream = stream
self.trackpool = stream.trackpool
self.window_length = window
self.window_edge = 0
self.leftover = None
self.events = self.stream.iterevents()
# First, need to look ahead to see when the
# tempo mark... | |
11,670 | [
0.038809023797512054,
-0.009362109936773777,
-0.049283355474472046,
-0.0537322498857975,
-0.011975293979048729,
0.04101187363266945,
0.006630145013332367,
-0.031293418258428574,
-0.0005162928136996925,
0.010555320419371128,
0.030775101855397224,
-0.045914292335510254,
0.02654217556118965,
... | 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": "stream", "annotation":... | class EventStreamIterator(object):
def __init__(self, stream, window):
self.stream = stream
self.trackpool = stream.trackpool
self.window_length = window
self.window_edge = 0
self.leftover = None
self.events = self.stream.iterevents()
# First, need to look ahe... | |
11,671 | [
0.045507676899433136,
-0.019234707579016685,
0.02545344829559326,
-0.03849351778626442,
-0.02967158518731594,
0.02326001599431038,
0.03164808452129364,
0.015631211921572685,
0.005025609862059355,
0.046929795295000076,
0.046037957072257996,
0.007791502866894007,
-0.012118106707930565,
-0.00... | 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_edge(self):
if self.endoftrack:
raise StopIteration
lastedge = self.window_edge
self.window_edge += int(self.window_length / self.tempo.mpt)
if self.window_edge > self.ttp:
# We're past the tempo-marker.
oldttp = self.ttp
try:
... | |
11,672 | [
0.03218826651573181,
-0.02261602319777012,
0.0038416606839746237,
-0.020867493003606796,
-0.04553835839033127,
0.017230039462447166,
-0.019680533558130264,
0.009585007093846798,
-0.019118962809443474,
0.03435797616839409,
0.0390547551214695,
-0.0419902466237545,
0.005363647360354662,
-0.04... | 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 next(self):
ret = []
self.__next_edge()
if self.leftover:
if self.leftover.tick > self.window_edge:
return ret
ret.append(self.leftover)
self.leftover = None
for event in self.events:
if event.tick > self.window_edge:
... | |
11,673 | [
0.01890992373228073,
0.029588613659143448,
0.045125678181648254,
-0.024803293868899345,
-0.03672397509217262,
0.021807903423905373,
0.009412344545125961,
-0.04948482662439346,
-0.042885225266218185,
-0.010611718520522118,
0.048023659735918045,
-0.03314411640167236,
0.05079987272620201,
-0.... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "metadata", "annotation": null, "type_comment": null}}, {"_type": ... | def view(name, metadata, selectable):
t = sa.sql.table(name)
for c in selectable.c:
c._make_proxy(t)
# TODO: convert to event.listen
warnings.simplefilter('ignore', DeprecationWarning)
CreateView(name, selectable).execute_at('after-create', metadata)
DropView(name).execute_at(... | |
11,674 | [
0.07147593796253204,
0.009437479078769684,
-0.04476061463356018,
0.011314604431390762,
0.030158448964357376,
0.012299835681915283,
0.005014308728277683,
0.018947554752230644,
0.052932851016521454,
0.023935936391353607,
0.007187003269791603,
-0.01704968698322773,
-0.008452247828245163,
-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": "value", "annotation": null, "type_comment": null}}, {"_type": "ar... | def process_result_value(self, value, dialect):
if value is None:
logging.info("Value is None")
return None
try:
return Decimal(value)
except decimal.InvalidOperation:
logging.error("decimal.InvalidOperation on value `%s`", value)
... | |
11,675 | [
-0.008255983702838421,
0.034341126680374146,
0.02028713747859001,
-0.00034289673203602433,
-0.0013179288944229484,
-0.03429408371448517,
-0.0007739984430372715,
-0.053910866379737854,
-0.0069623105227947235,
0.011801822111010551,
0.03960990160703659,
-0.02973094768822193,
0.00515704927965998... | 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": "log_executive", "annot... | class MockHost(MockSystemHost):
def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True, web=None):
MockSystemHost.__init__(self, log_executive, executive_throws_when_run)
add_unit_tests_to_mock_filesystem(self.filesystem)
self.web = web or Mock... | |
11,676 | [
-0.0003081861650571227,
0.027583297342061996,
0.018272774294018745,
-0.004713307600468397,
-0.010999652557075024,
-0.03227338567376137,
0.017123470082879066,
-0.05191603675484657,
-0.0023247285280376673,
0.01696094125509262,
0.03211085870862007,
-0.023821938782930374,
-0.00961236096918583,
... | 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": "log_executive", "annotation": null, "type_comment": null}}, {"_ty... | def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True, web=None):
MockSystemHost.__init__(self, log_executive, executive_throws_when_run)
add_unit_tests_to_mock_filesystem(self.filesystem)
self.web = web or MockWeb()
self._checkout = Mock... | |
11,677 | [
0.05170110985636711,
0.034487683326005936,
0.07035405933856964,
0.02096429467201233,
0.004564397037029266,
-0.016716692596673965,
0.009306199848651886,
-0.023518936708569527,
-0.027776675298810005,
0.06386607885360718,
0.0331292599439621,
-0.04054989293217659,
-0.0063916766084730625,
0.012... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def __init__(self, *args, **kwargs):
if kwargs.pop("validate_certificate", False):
warnings.warn("Certificate validation cannot be specified on the "
"InsecureAppEngineAdapter, but was present. This "
"will be ignored and certificate validation wil... | |
11,678 | [
-0.017835192382335663,
0.026588084176182747,
0.032117463648319244,
-0.0293880682438612,
-0.012564633972942829,
0.0032999811228364706,
-0.013835215009748936,
0.027764547616243362,
0.005561733152717352,
-0.0007691132486797869,
0.027293961495161057,
-0.04823501780629158,
-0.006082318257540464,
... | 9 | {"_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": "Raise", "_fields": {"exc"... | def _check_version():
if gaecontrib is None:
raise exc.VersionMismatchError(
"The toolbelt requires at least Requests 2.10.0 to be "
"installed. Version {0} was found instead.".format(
requests.__version__
)
) | |
11,679 | [
0.002631938084959984,
-0.009838334284722805,
-0.054520536214113235,
-0.0006791756604798138,
0.03392840921878815,
-0.01793617196381092,
-0.052350565791130066,
-0.03322768956422806,
0.03738680109381676,
-0.006769859232008457,
0.028571292757987976,
-0.0513559952378273,
-0.010448639281094074,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}},... | def parse_json_into_request(request, *args, **kwargs):
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
# e.g. 'charset', so we can't do a direct string compare
if "application/json" in request.META.get('CONTENT_TYPE', '') and request.body:
... | |
11,680 | [
0.004315115511417389,
0.05007797107100487,
0.04740968719124794,
-0.025062810629606247,
-0.011227043345570564,
0.016521919518709183,
0.026039592921733856,
-0.01443732250481844,
-0.0085825826972723,
0.07356840372085571,
0.03730832785367966,
0.02395499497652054,
-0.0011941761476919055,
-0.039... | 16 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def main():
parser = argparse.ArgumentParser(
description="Timeline Windows Registry key timestamps")
parser.add_argument("--bodyfile", action="store_true",
help="Output in the Bodyfile 3 format")
parser.add_argument("registry_hives", type=str, nargs="+",
... | |
11,681 | [
0.03358224034309387,
-0.004293239675462246,
-0.08036239445209503,
0.003284793347120285,
0.010466301813721657,
-0.024731410667300224,
0.03718523308634758,
-0.008312338963150978,
0.03743979334831238,
0.0019703865982592106,
0.005600303411483765,
-0.05533726513385773,
0.02210749126970768,
-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": "object", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, object=None, status=None, encoder=DjangoJSONEncoder,
*args, **kwargs):
if object in (None, ""):
content = ""
status = status or 204
elif isinstance(object, QuerySet):
content = serialize('json', object)
else:
con... | |
11,682 | [
0.03770165517926216,
0.010061515495181084,
-0.057794395834207535,
0.014186081476509571,
-0.018335888162255287,
-0.0012936595594510436,
0.02647395431995392,
-0.015417897142469883,
0.023424703627824783,
0.0017492801416665316,
0.00591170834377408,
-0.05004001408815384,
0.0097838519141078,
-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": "obj", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def __init__(self, obj=None, status=400, encoder=DjangoJSONEncoder, *args, **kwargs):
if obj in (None, ""):
content = ""
else:
content = json.dumps(obj, cls=encoder, indent=2, ensure_ascii=False)
kwargs.setdefault("content_type", "application/json")
kwargs["status... | |
11,683 | [
0.004333589691668749,
0.022037480026483536,
0.02121901512145996,
-0.03320281207561493,
-0.023136910051107407,
-0.01971646025776863,
0.011684506200253963,
0.004309157840907574,
0.0023515603970736265,
0.032616447657346725,
0.032518722116947174,
-0.0580010823905468,
-0.004440478980541229,
-0.... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "initial_vars", "annota... | class InstlClientUninstall(InstlClientRemove):
def __init__(self, initial_vars) -> None:
super().__init__(initial_vars)
# noinspection PyUnresolvedReferences
self.read_defaults_file(super().__thisclass__.__name__)
self.calc_user_cache_dir_var()
def do_uninstall(self):
se... | |
11,684 | [
0.04048555716872215,
0.02357225865125656,
0.020901737734675407,
-0.03220809996128082,
-0.020728327333927155,
-0.02434682473540306,
0.01854335516691208,
0.0037687867879867554,
-0.014531794935464859,
0.05146821588277817,
0.048462435603141785,
-0.024323703721165657,
-0.004479769617319107,
-0.... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def calculate_all_uninstall_items_option_1(self):
# option 1: remove instruction will be created only for items that were present in require.yaml file
# force_uninstall_of_main_items: if true all main install items will be uninstalled regardless if they are indeed installed
# and regardless if ... | |
11,685 | [
0.005978928413242102,
0.0019670401234179735,
0.024898551404476166,
-0.022539740428328514,
-0.04931660369038582,
-0.017057690769433975,
0.007120111957192421,
0.050452325493097305,
-0.02548825368285179,
0.03448667749762535,
-0.012405593879520893,
-0.03972847759723663,
0.01350855641067028,
-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 create_uninstall_instructions(self):
if len(config_vars["__FULL_LIST_OF_INSTALL_TARGETS__"]) > 0:
self.create_remove_instructions()
self.create_require_file_instructions()
# uninstall might be done with index.yaml that is pre-python-batch.
# And in any case ... | |
11,686 | [
0.0431431420147419,
0.02374163083732128,
0.014345857314765453,
-0.04119595140218735,
-0.02871517464518547,
-0.010310717858374119,
0.01859213598072529,
0.005633358843624592,
-0.005891419947147369,
0.057758789509534836,
0.04509032890200615,
-0.026204941794276237,
-0.009325393475592136,
-0.02... | 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 calculate_all_uninstall_items_option_2(self):
# option 2: remove instructions will be created for items that are not in require.yaml
# force_uninstall_of_main_items: if true all main install items will be uninstalled regardless if they are indeed installed
# and regardless if some other ite... | |
11,687 | [
0.037828635424375534,
0.023232655599713326,
-0.006600887048989534,
-0.016286300495266914,
-0.033929795026779175,
-0.013559579849243164,
0.029734836891293526,
-0.007483061868697405,
-0.017248673364520073,
0.03578051179647446,
-0.001048739068210125,
-0.012097514234483242,
0.02632952108979225,
... | 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": "args", "annotation": null, "type_comment": null}}], "kwarg": null... | def __init__(self, args):
self.donothing = args.N
self.verbose = args.V or self.donothing
self.imgfiles = args.picture[0]
if self.donothing:
self.tmpfile = '<tmpfile>'
else:
self.tmpfile = tempfile.TemporaryFile()
self.run() | |
11,688 | [
-0.002652050694450736,
0.03244347870349884,
0.012384730391204357,
-0.062324099242687225,
-0.012544909492135048,
-0.010848470963537693,
-0.010761100798845291,
0.0100330151617527,
-0.029807811602950096,
-0.0099747683852911,
0.038705013692379,
-0.022250287234783173,
0.017969144508242607,
0.00... | 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": "args", "annotation": n... | class Phisto(ProcMixin):
def __init__(self, args):
self.donothing = args.N
self.verbose = args.V or self.donothing
self.imgfiles = args.picture[0]
if self.donothing:
self.tmpfile = '<tmpfile>'
else:
self.tmpfile = tempfile.TemporaryFile()
self.run()
def run(self):
pf_cmd = ['pfilt', '-1', '-x', '... | |
11,689 | [
0.021732689812779427,
0.04603760316967964,
0.008805938996374607,
-0.0530456081032753,
-0.028766941279172897,
-0.028924424201250076,
-0.00690301600843668,
0.03149665147066116,
-0.014002885669469833,
0.025394175201654434,
0.06866269558668137,
0.0017355966847389936,
0.011483154259622097,
-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 run(self):
pf_cmd = ['pfilt', '-1', '-x', '128', '-y', '128', '-p', '1']
pv_cmd = ['pvalue', '-o', '-h', '-H', '-df', '-b']
if not self.imgfiles:
self.call_two(pf_cmd, pv_cmd,
'extract image values', 'filter image values',
out=self.tmpfile)
else:
for fname in self.imgfiles: # check first
... | |
11,690 | [
0.01652982272207737,
0.016631590202450752,
0.07396987080574036,
-0.06803832203149796,
-0.00003770820330828428,
-0.017881866544485092,
-0.01575930416584015,
0.005317311268299818,
0.005887931678444147,
0.012553651817142963,
0.021443702280521393,
0.0012611803831532598,
-0.017140423879027367,
... | 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 run_calcprocs(self):
lmin_t_cmd = ['total', '-if', '-l']
lmin_rc_cmd = ['rcalc', '-e', 'L=$1*179;$1=if(L-1e-7,log10(L)-.01,-7)']
if not self.donothing: self.tmpfile.seek(0)
lmin_proc = self.call_two(lmin_t_cmd, lmin_rc_cmd,
'extract lower limit', 'compute minimum',
_in=self.tmpfile, out=PIPE, universa... | |
11,691 | [
0.010191970504820347,
-0.006211288273334503,
0.09544146060943604,
-0.00019354659889359027,
0.015187104232609272,
-0.014000611379742622,
0.02700456976890564,
-0.04126621037721634,
0.01740584522485733,
0.041123829782009125,
0.015020995400846004,
-0.004965471103787422,
0.001957712695002556,
-... | 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_default_colors(self):
# # without specifying values -> uniform color
# GeoSeries
ax = self.points.plot()
_check_colors(self.N, ax.collections[0].get_facecolors(),
[MPL_DFT_COLOR] * self.N)
# GeoDataFrame
ax = self.df.plot()
_check... | |
11,692 | [
-0.011839475482702255,
-0.008741294965147972,
0.052767422050237656,
-0.027367260307073593,
-0.003301037475466728,
0.023420769721269608,
-0.00007040446507744491,
-0.036637213081121445,
0.001953267492353916,
0.011864064261317253,
0.023433063179254532,
-0.008243373595178127,
-0.0079913390800356... | 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": null, "defaults": [], "kwonlyargs... | class TestPointPlotting:
def setup_method(self):
self.N = 10
self.points = GeoSeries(Point(i, i) for i in range(self.N))
values = np.arange(self.N)
self.df = GeoDataFrame({'geometry': self.points, 'values': values})
def test_figsize(self):
ax = self.points.plot(figsize... | |
11,693 | [
0.022645795717835426,
-0.03679633140563965,
0.08979292213916779,
0.003738285042345524,
-0.00526014668866992,
-0.022238319739699364,
-0.0033338957000523806,
-0.011230289936065674,
0.006038055755198002,
0.03563564270734787,
0.028449242934584618,
-0.002909441478550434,
-0.005105799529701471,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_single_color(self):
ax = self.points.plot(color='green')
_check_colors(self.N, ax.collections[0].get_facecolors(), ['green']*self.N)
ax = self.df.plot(color='green')
_check_colors(self.N, ax.collections[0].get_facecolors(), ['green']*self.N)
with warnings.catch_warnin... | |
11,694 | [
0.02605394273996353,
-0.002359203528612852,
0.09559463709592819,
-0.0061562564224004745,
0.010794286616146564,
-0.013812877237796783,
0.00017080038378480822,
-0.04170059785246849,
0.022160140797495842,
0.029435716569423676,
0.0434391163289547,
-0.017647141590714455,
-0.012622111476957798,
... | 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_colormap(self):
# without specifying values but cmap specified -> no uniform color
# but different colors for all points
# GeoSeries
ax = self.points.plot(cmap='RdYlGn')
cmap = plt.get_cmap('RdYlGn')
exp_colors = cmap(np.arange(self.N) / (self.N - 1))
_... | |
11,695 | [
0.017761802300810814,
-0.0319272056221962,
0.06414799392223358,
-0.03838604316115379,
-0.015792345628142357,
0.02764577977359295,
-0.01614709384739399,
-0.019694561138749123,
0.0005363250966183841,
0.02439189702272415,
0.019657863304018974,
-0.01221429742872715,
0.005030675791203976,
0.007... | 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_style_kwargs(self):
ax = self.points.plot(markersize=10)
assert ax.collections[0].get_sizes() == [10]
ax = self.df.plot(markersize=10)
assert ax.collections[0].get_sizes() == [10]
ax = self.df.plot(column='values', markersize=10)
assert ax.collections[0].get_s... | |
11,696 | [
0.017584776505827904,
-0.013767831027507782,
0.05277871713042259,
-0.013926362618803978,
-0.0005396160413511097,
0.027852725237607956,
-0.024389425292611122,
-0.021523667499423027,
-0.017450634390115738,
0.05487620830535889,
0.012042279355227947,
-0.008963113650679588,
0.0046492344699800014,... | 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 test_legend(self):
with warnings.catch_warnings(record=True) as _: # don't print warning
# legend ignored if color is given.
ax = self.df.plot(column='values', color='green', legend=True)
assert len(ax.get_figure().axes) == 1 # no separate legend axis
# legend ... | |
11,697 | [
-0.007647350430488586,
-0.019204996526241302,
0.06518809497356415,
-0.04873020201921463,
0.012361979112029076,
0.02375875785946846,
0.012541406787931919,
-0.038682229816913605,
-0.004569230135530233,
0.037593286484479904,
0.02093740552663803,
-0.0028259928803890944,
-0.004748657811433077,
... | 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 TestLineStringPlotting:
def setup_method(self):
self.N = 10
values = np.arange(self.N)
self.lines = GeoSeries([LineString([(0, i), (4, i+0.5), (9, i)])
for i in range(self.N)],
index=list('ABCDEFGHIJ'))
self.df = G... | |
11,698 | [
0.009527197107672691,
0.020799653604626656,
0.0596734881401062,
-0.017093967646360397,
-0.005041525233536959,
0.012348299846053123,
-0.005920131225138903,
0.0068913791328668594,
-0.01717764511704445,
-0.02854572981595993,
0.007327693980187178,
-0.00044341213651932776,
-0.029167329892516136,
... | 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 TestPointZPlotting:
def setup_method(self):
self.N = 10
self.points = GeoSeries(Point(i, i, i) for i in range(self.N))
values = np.arange(self.N)
self.df = GeoDataFrame({'geometry': self.points, 'values': values})
def test_plot(self):
# basic test that points with... | |
11,699 | [
0.010356479324400425,
-0.026352932676672935,
0.05260670185089111,
-0.04598747938871384,
0.023192068561911583,
0.0368395671248436,
-0.0024481206201016903,
-0.02580752782523632,
0.006389904301613569,
0.05652369558811188,
0.01430446095764637,
0.01596546359360218,
0.02340279333293438,
0.012519... | 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_style_kwargs(self):
# linestyle (style patterns depend on linewidth, therefore pin to 1)
linestyle = 'dashed'
linewidth = 1
ax = self.lines.plot(linestyle=linestyle, linewidth=linewidth)
exp_ls = _style_to_linestring_onoffseq(linestyle, linewidth)
for ls in ax.c... | |
11,700 | [
0.0209811981767416,
-0.03628847002983093,
0.0928550586104393,
-0.008134685456752777,
0.01739182136952877,
-0.008449218235909939,
0.002648860914632678,
-0.023226100951433182,
0.0026704464107751846,
0.05170674994587898,
0.031403958797454834,
-0.004295533522963524,
-0.0018810303881764412,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_single_color(self):
ax = self.lines.plot(color='green')
_check_colors(self.N, ax.collections[0].get_colors(), ['green']*self.N)
ax = self.df.plot(color='green')
_check_colors(self.N, ax.collections[0].get_colors(), ['green']*self.N)
with warnings.catch_warnings(record... |