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 |
|---|---|---|---|---|---|
1,001 | [
0.0075661540031433105,
0.04040338844060898,
-0.00929808896034956,
-0.031933341175317764,
-0.02128889597952366,
0.005186323542147875,
-0.03393075615167618,
-0.036813102662563324,
-0.041364170610904694,
0.041945695877075195,
0.019797155633568764,
-0.005663554184138775,
0.02616865374147892,
-... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "argument", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonly... | class Figure(Image):
def align(argument):
return directives.choice(argument, Figure.align_h_values)
def figwidth_value(argument):
if argument.lower() == 'image':
return 'image'
else:
return directives.length_or_percentage_or_unitless(argument, 'px')
option_... | |
1,002 | [
0.007114321459084749,
0.05230817571282387,
-0.012213344685733318,
-0.059576041996479034,
-0.043274521827697754,
-0.029915977269411087,
-0.009168005548417568,
-0.009929340332746506,
-0.06546199321746826,
0.01990986429154873,
0.008675377815961838,
0.02912265434861183,
0.0009580662008374929,
... | 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 run(self):
figwidth = self.options.pop('figwidth', None)
figclasses = self.options.pop('figclass', None)
align = self.options.pop('align', None)
(image_node,) = Image.run(self)
if isinstance(image_node, nodes.system_message):
return [image_node]
figure_nod... | |
1,003 | [
0.010097038000822067,
-0.009414587169885635,
-0.00679763313382864,
0.007050193380564451,
-0.05283346027135849,
0.03282208740711212,
-0.004691172856837511,
0.032241739332675934,
0.03265013173222542,
0.05274748429656029,
-0.022418754175305367,
-0.0062011610716581345,
0.0055348314344882965,
0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "topic", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [... | def is_exception(topic):
if (not topic):
return True
topic_word_list = re.split('\s+', topic.lower())
topic_new = ' '.join(topic_word_list)
for exception in exceptions:
if exception == topic_new:
return True
return False | |
1,004 | [
0.029309380799531937,
0.02941390685737133,
-0.029204852879047394,
-0.04239616543054581,
0.004661905579268932,
0.04962943494319916,
-0.006752446293830872,
-0.036124542355537415,
-0.02389487996697426,
0.032277949154376984,
0.019076183438301086,
-0.024877434596419334,
0.009208831936120987,
0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "sorted_y", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "val", "annotation": null, "type_comment": null}}], "kwarg": n... | def binarysearch(sorted_y, val):
ylen = len(sorted_y)
n = int(ylen / 2)
start = 0
end = ylen - 1
while start >= 0 and end < ylen and start < ylen and end >= 0 and start < end:
n = int((start + end + 1) / 2)
# print(start, end, n)
chk = sorted_y[n]
if (val == chk):
return True
elif (v... | |
1,005 | [
-0.0018111057579517365,
0.03338365629315376,
-0.03967789188027382,
-0.030502833425998688,
-0.03653077408671379,
-0.01764806918799877,
0.023821260780096054,
-0.0070931194350123405,
0.07940420508384705,
0.012243499048054218,
0.022513996809720993,
0.025733741000294685,
0.009199267253279686,
-... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "input", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mapper", "annotation": null, "type_comment": null}}], "kwarg": n... | def get_topic(input, mapper):
input_formatted, sure = analyze_topic(input)
if (is_exception(input_formatted)):
return (input_formatted, -1.0, "exception")
direct_match = mapper.origmap.get(input_formatted)
if (not direct_match and input_formatted.isupper()):
for k,v in mapper.origmap.items():
if k... | |
1,006 | [
-0.0010047779651358724,
0.006883436348289251,
-0.021239023655653,
-0.01417444460093975,
-0.02674124389886856,
-0.02409202791750431,
0.03296803683042526,
0.0021595649886876345,
0.045580122619867325,
0.009617564268410206,
0.006379632279276848,
0.006900418549776077,
0.024182599037885666,
-0.0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "input", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mapper", "annotation": null, "type_comment": null}}], "kwarg": n... | def get_topic_with_proba(input, mapper):
direct_match = mapper.origmap.get(input.strip())
if (direct_match):
print('Found directly from map')
return direct_match
elif binarysearch(mapper.sorted_y, input):
return (input, "actual")
else:
X_test_transformed = mapper.vectorizer.transform([input])
... | |
1,007 | [
0.041956931352615356,
0.04717203974723816,
0.043909914791584015,
-0.039553262293338776,
0.03970349207520485,
0.04255785048007965,
0.043459225445985794,
0.030002962797880173,
-0.014840520918369293,
-0.009169360622763634,
0.04152770712971687,
0.0138425687327981,
0.05176476761698723,
0.014046... | 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": "filename", "annotation": null, "type_comment": null}}, {"_type": ... | def _edit_file_helper(self, filename, existing_data=None, force_save=False):
# Create a tempfile
_, tmp_path = tempfile.mkstemp()
if existing_data:
self.write_data(existing_data, tmp_path, shred=False)
# drop the user into an editor on the tmp file
try:
... | |
1,008 | [
0.020303824916481972,
0.019788172096014023,
0.04804164543747902,
-0.012429378926753998,
-0.011301388964056969,
0.036912139505147934,
0.026298288255929947,
-0.002956945914775133,
-0.029843401163816452,
-0.01532992534339428,
-0.0274799931794405,
-0.0060266912914812565,
0.049631573259830475,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "executor", "annotation... | class DataDependenceCreator(OctopusPlugin):
def __init__(self, executor):
super().__init__(executor)
self._pluginname = 'datadependence.jar'
self._classname = 'bjoern.plugins.datadependence.DataDependencePlugin'
def __setattr__(self, key, value):
if key == "project":
... | |
1,009 | [
0.05558221787214279,
0.060635145753622055,
0.0214967280626297,
-0.0533171109855175,
0.008417918346822262,
0.06102718412876129,
0.02774754911661148,
0.043668631464242935,
-0.04046699032187462,
0.009283667430281639,
0.04687027260661125,
-0.0283791646361351,
0.02411031164228916,
0.04687027260... | 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": "filename", "annotation": null, "type_comment": null}}], "kwarg": ... | def edit_file(self, filename):
check_prereqs()
ciphertext = self.read_data(filename)
try:
plaintext = self.vault.decrypt(ciphertext)
except AnsibleError as e:
raise AnsibleError("%s for %s" % (to_bytes(e),to_bytes(filename)))
if self.vault.cipher_name n... | |
1,010 | [
0.053380101919174194,
0.03953609988093376,
0.01278234738856554,
-0.044334787875413895,
0.029238028451800346,
0.05643767490983009,
0.038219645619392395,
0.04078885540366173,
-0.0064070988446474075,
-0.030320918187499046,
0.04010939225554466,
-0.01278234738856554,
-0.01329194288700819,
0.012... | 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": "filename", "annotation": null, "type_comment": null}}, {"_type": ... | def decrypt_file(self, filename, output_file=None):
check_prereqs()
ciphertext = self.read_data(filename)
try:
plaintext = self.vault.decrypt(ciphertext)
except AnsibleError as e:
raise AnsibleError("%s for %s" % (to_bytes(e),to_bytes(filename)))
self.wr... | |
1,011 | [
0.03111168183386326,
0.028718475252389908,
0.014826483093202114,
-0.04020586609840393,
0.024365119636058807,
0.04613190144300461,
0.0415734127163887,
0.017185499891638756,
-0.027875155210494995,
-0.0005844124243594706,
0.03348209708929062,
-0.01894051767885685,
0.01026229653507471,
0.01266... | 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": "filename", "annotation": null, "type_comment": null}}], "kwarg": ... | def plaintext(self, filename):
check_prereqs()
ciphertext = self.read_data(filename)
try:
plaintext = self.vault.decrypt(ciphertext)
except AnsibleError as e:
raise AnsibleError("%s for %s" % (to_bytes(e),to_bytes(filename)))
return plaintext | |
1,012 | [
0.04810728505253792,
0.036782510578632355,
0.01966874487698078,
-0.02162526175379753,
-0.005432210396975279,
0.06150366738438606,
0.0612734891474247,
0.028703246265649796,
-0.034756939858198166,
-0.030475620180368423,
0.031833674758672714,
-0.015675149857997894,
0.03114313818514347,
0.0328... | 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": "filename", "annotation": null, "type_comment": null}}, {"_type": ... | def rekey_file(self, filename, new_password):
check_prereqs()
prev = os.stat(filename)
ciphertext = self.read_data(filename)
try:
plaintext = self.vault.decrypt(ciphertext)
except AnsibleError as e:
raise AnsibleError("%s for %s" % (to_bytes(e),to_bytes(... | |
1,013 | [
0.028813496232032776,
0.04146087169647217,
0.002933125477284193,
-0.06418191641569138,
0.05521414056420326,
0.007555248681455851,
-0.01642751321196556,
-0.006640375126153231,
-0.023103076964616776,
-0.0005592291709035635,
0.010958378203213215,
-0.04154130071401596,
0.0057405815459787846,
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": "filename", "annotation": null, "type_comment": null}}], "kwarg": ... | def read_data(self, filename):
try:
if filename == '-':
data = sys.stdin.read()
else:
with open(filename, "rb") as fh:
data = fh.read()
except Exception as e:
raise AnsibleError(str(e))
return data | |
1,014 | [
0.04121881350874901,
-0.024064289405941963,
-0.01737249828875065,
-0.011225641705095768,
-0.004512053914368153,
0.002666089916601777,
0.017176322638988495,
0.053795892745256424,
-0.033393558114767075,
-0.02450023591518402,
0.04934922978281975,
0.0349847674369812,
-0.012152030132710934,
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": "src", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def shuffle_files(self, src, dest):
prev = None
# overwrite dest with src
if os.path.isfile(dest):
prev = os.stat(dest)
# old file 'dest' was encrypted, no need to _shred_file
os.remove(dest)
shutil.move(src, dest)
# reset permissions if neede... | |
1,015 | [
-0.0012809131294488907,
0.041122518479824066,
-0.02392704039812088,
-0.04389956593513489,
0.01404075138270855,
0.04754305258393288,
0.02503785863518715,
0.00022424657072406262,
0.01597357727587223,
-0.019261600449681282,
0.005679061636328697,
-0.029547784477472305,
0.05256395414471626,
-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": "password", "annotation... | class VaultFile(object):
def __init__(self, password, filename):
self.password = password
self.filename = filename
if not os.path.isfile(self.filename):
raise AnsibleError("%s does not exist" % self.filename)
try:
self.filehandle = open(filename, "rb")
... | |
1,016 | [
0.022680504247546196,
-0.008282314985990524,
0.02131929062306881,
-0.03149963542819023,
0.00671979459002614,
0.008248763158917427,
0.04628126695752144,
-0.010678817518055439,
-0.009389499202370644,
0.014637840911746025,
0.0017302752239629626,
-0.020955022424459457,
0.061772264540195465,
-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": "password", "annotation": null, "type_comment": null}}, {"_type": ... | def __init__(self, password, filename):
self.password = password
self.filename = filename
if not os.path.isfile(self.filename):
raise AnsibleError("%s does not exist" % self.filename)
try:
self.filehandle = open(filename, "rb")
except Exception as e:
... | |
1,017 | [
0.0362052395939827,
-0.005654073785990477,
0.05201748013496399,
0.015840990468859673,
0.013780606910586357,
-0.02271212637424469,
0.044810932129621506,
0.04937252402305603,
-0.011288980953395367,
-0.009439428336918354,
0.003967435099184513,
-0.020565494894981384,
-0.029899509623646736,
-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": "password", "annotation": null, "type_comment": null}}, {"_type": ... | def create_key(self, password, salt, keylength, ivlength):
hash_function = SHA256
# make two keys and one iv
pbkdf2_prf = lambda p, s: HMAC.new(p, s, hash_function).digest()
derivedkey = PBKDF2(password, salt, dkLen=(2 * keylength) + ivlength,
count=10000, ... | |
1,018 | [
0.02502702735364437,
0.03202451020479202,
0.02028849348425865,
-0.03893793746829033,
0.01272364892065525,
0.06198969855904579,
0.01752522401511669,
0.04404420778155327,
-0.0130073307082057,
-0.0331382229924202,
0.024522705003619194,
-0.03341139853000641,
0.002994417678564787,
-0.0085367169... | 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 get_decrypted(self):
check_prereqs()
if self.is_encrypted():
tmpdata = self.filehandle.read()
this_vault = VaultLib(self.password)
dec_data = this_vault.decrypt(tmpdata)
if dec_data is None:
raise AnsibleError("Failed to decrypt: %s" %... | |
1,019 | [
-0.02657770738005638,
0.021997293457388878,
-0.04071478545665741,
-0.029178930446505547,
-0.00020115883671678603,
-0.01544711459428072,
-0.059639621526002884,
0.058584053069353104,
-0.04486166313290596,
0.024334624409675598,
0.002217165194451809,
-0.029348574578762054,
-0.014212476089596748,... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "request", "annotation"... | class SearchFilter(filters.BaseFilterBackend):
def filter_queryset(self, request, queryset, view):
query = request.QUERY_PARAMS.get('q', None)
if query:
query_fields = request.QUERY_PARAMS.get('q_fields')
if query_fields:
query_fields = query_fields.split(',')... | |
1,020 | [
0.03711666539311409,
-0.008065910078585148,
0.09009553492069244,
-0.004782814998179674,
0.008970235474407673,
0.02102978155016899,
0.04691258817911148,
0.06151660531759262,
-0.005847223103046417,
-0.005796670448035002,
-0.01194159034639597,
-0.015311747789382935,
-0.010790119878947735,
-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": "password", "annotation": null, "type_comment": null}}, {"_type": ... | def gen_key_initctr(self, password, salt):
# 16 for AES 128, 32 for AES256
keylength = 32
# match the size used for counter.new to avoid extra work
ivlength = 16
if HAS_PBKDF2HMAC:
backend = default_backend()
kdf = PBKDF2HMAC(
algorithm=c... | |
1,021 | [
-0.02234436385333538,
0.053709615021944046,
-0.03109504096210003,
-0.02993105538189411,
0.0024254026357084513,
-0.01985010877251625,
-0.018124915659427643,
0.018332771956920624,
-0.04847168177366257,
0.05578815937042236,
0.00021240136993583292,
-0.08688320219516754,
0.02970241568982601,
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 BasicFilter(object):
@property
def fields(self):
return self.Meta.fields
@property
def model(self):
return self.Meta.model
def __init__(self):
assert self.fields,\
'filter_class is declared but no filter_fields'
# Check that all fields specified... | |
1,022 | [
-0.011852484196424484,
0.0149129843339324,
-0.06992779672145844,
-0.04039860516786575,
0.008207705803215504,
-0.04191958159208298,
-0.05976323038339615,
0.030938878655433655,
-0.03587277606129646,
0.032515499740839005,
0.02919531986117363,
-0.012640794739127159,
0.014829516410827637,
0.024... | 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": "request", "annotation": null, "type_comment": null}}, {"_type": "... | def filter_queryset(self, request, queryset, view):
query = request.QUERY_PARAMS.get('q', None)
if query:
query_fields = request.QUERY_PARAMS.get('q_fields')
if query_fields:
query_fields = query_fields.split(',')
return queryset.search(query, query_fi... | |
1,023 | [
0.009134980849921703,
0.055305998772382736,
-0.043118834495544434,
-0.019121984019875526,
0.007625066675245762,
-0.0062607512809336185,
-0.005780814215540886,
-0.013977491296827793,
-0.046548496931791306,
0.08119024336338043,
0.030910100787878036,
-0.05897293612360954,
0.01075813826173544,
... | 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 __init__(self):
assert self.fields,\
'filter_class is declared but no filter_fields'
# Check that all fields specified in the dictionary
# have a filters.FilterField object
unknown_fields = set(self.fields) - set(dir(self))
assert len(unknown_fields) == 0,\
... | |
1,024 | [
-0.03139897808432579,
0.011869844049215317,
-0.04957950487732887,
-0.04369090870022774,
-0.01247723400592804,
-0.05917420983314514,
-0.02180427499115467,
0.0004967215936630964,
-0.030245967209339142,
0.052420854568481445,
0.005095900036394596,
-0.05938010290265083,
0.04344383254647255,
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": "params", "annotation": null, "type_comment": null}}], "kwarg": nu... | def lookup_parameters(self, params):
to_filter_fields = set(self.fields) & set(params.keys())
lookup_parameters = {}
for field in to_filter_fields:
filter_field = getattr(self, field, None)
if filter_field.lookup_type == 'in':
parameter_value = params[fi... | |
1,025 | [
-0.034426700323820114,
0.008117218501865864,
-0.022175757214426994,
-0.012347864918410778,
-0.0035521918907761574,
0.0019493440631777048,
-0.052415426820516586,
0.04706532880663872,
-0.02017916366457939,
0.009953890927135944,
-0.0008995574316941202,
-0.03828419744968414,
-0.00293673714622855... | 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": "request", "annotation"... | class BasicFilterBackend(filters.BaseFilterBackend):
def filter_queryset(self, request, queryset, view):
filter_class = getattr(view, 'filter_class', None)
if filter_class is None:
return queryset
filter_class = filter_class()
queryset = filter_class.filter_queryset(
... | |
1,026 | [
-0.02613704651594162,
0.007322628982365131,
-0.07572197914123535,
-0.0342818982899189,
0.014287348836660385,
0.0056249783374369144,
-0.07011151313781738,
0.03259875625371933,
-0.01912396028637886,
0.03350804001092911,
0.011317669413983822,
-0.03387562185525894,
0.024105669930577278,
0.0450... | 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": "request", "annotation": null, "type_comment": null}}, {"_type": "... | def filter_queryset(self, request, queryset, view):
filter_class = getattr(view, 'filter_class', None)
if filter_class is None:
return queryset
filter_class = filter_class()
queryset = filter_class.filter_queryset(
queryset=queryset,
params=request.Q... | |
1,027 | [
0.006447809748351574,
0.04292753338813782,
0.029907917603850365,
-0.02770078368484974,
-0.024774469435214996,
0.06626364588737488,
0.010397093370556831,
0.010694684460759163,
0.014495172537863255,
0.042629942297935486,
0.03581014275550842,
-0.037174105644226074,
0.056591931730508804,
0.020... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def main():
argument_spec = postgres_common_argument_spec()
argument_spec.update(
table=dict(type='str', required=True, aliases=['name']),
state=dict(type='str', default="present", choices=["absent", "present"]),
db=dict(type='str', default='', aliases=['login_db']),
tablespace=d... | |
1,028 | [
0.03544061258435249,
0.03618062287569046,
0.03748064860701561,
-0.0043500750325620174,
0.052240900695323944,
0.02006034553050995,
-0.02015034854412079,
0.006030104123055935,
-0.008520146831870079,
0.006250108126550913,
0.03162054717540741,
-0.06656114757061005,
0.02982051484286785,
0.02620... | 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": "query", "annotation": null, "type_comment": null}}, {"_type": "ar... | def __exec_sql(self, query, ddl=False):
try:
self.cursor.execute(query)
if not ddl:
res = self.cursor.fetchall()
return res
return True
except Exception as e:
self.module.fail_json(msg="Cannot execute SQL '%s': %s" % (query,... | |
1,029 | [
-0.006060640327632427,
0.0257024597376585,
0.010023959912359715,
-0.056709907948970795,
-0.051117051392793655,
0.01357089914381504,
-0.002531692385673523,
0.0059269871562719345,
-0.004559616558253765,
0.018546896055340767,
-0.023008842021226883,
-0.037546154111623764,
0.03633299842476845,
... | 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": "files", "annotation": ... | class MD5SumPropertiesModel(GObject.GObject, Nautilus.PropertiesModelProvider):
def get_models(
self,
files: List[Nautilus.FileInfo],
) -> List[Nautilus.PropertiesModel]:
if len(files) != 1:
return []
file = files[0]
if file.get_uri_scheme() != "file":
... | |
1,030 | [
-0.009566029533743858,
0.04335721954703331,
0.0019208894809708,
-0.05997566133737564,
-0.04658431559801102,
-0.03330273553729057,
-0.027331514284014702,
-0.026058237999677658,
-0.004352186806499958,
0.03980083018541336,
-0.028780413791537285,
-0.042654722929000854,
0.02485082298517227,
-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": "files", "annotation": {"_type": "Subscript", "_fields": {"ctx": {... | def get_models(
self,
files: List[Nautilus.FileInfo],
) -> List[Nautilus.PropertiesModel]:
if len(files) != 1:
return []
file = files[0]
if file.get_uri_scheme() != "file":
return []
if file.is_directory():
return []
file... | |
1,031 | [
0.03303312510251999,
-0.01436121016740799,
-0.0394991859793663,
-0.015649735927581787,
0.01238156482577324,
0.03790609911084175,
0.021424675360322,
0.025020835921168327,
0.018894478678703308,
-0.02635621652007103,
0.010724051855504513,
-0.016621988266706467,
0.001881541102193296,
0.0080181... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "method_name", "annotation": null, "type_comment": null}}], "kwarg"... | def __promise__(cls, method_name):
# Builds a wrapper around some magic method
def __wrapper__(self, *args, **kw):
# Automatically triggers the evaluation of a lazy value and
# applies the given magic method of the result type.
res = func(*self.__a... | |
1,032 | [
0.047577500343322754,
0.01646428555250168,
-0.04238355904817581,
-0.028138043358922005,
-0.009089395403862,
0.08088427037000656,
0.015115373767912388,
-0.012846176512539387,
-0.00850948877632618,
-0.003214695956557989,
0.011875464580953121,
-0.04160194844007492,
0.04132460057735443,
-0.024... | 10 | {"_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 __prepare_class__(cls):
for resultclass in resultclasses:
for type_ in resultclass.mro():
for method_name in type_.__dict__.keys():
# All __promise__ return the same wrapper method, they
# look up the correct implementat... | |
1,033 | [
0.04066251963376999,
-0.013584718108177185,
-0.04586274176836014,
-0.016093194484710693,
0.03042243793606758,
0.035714291036129,
-0.008968662470579147,
0.026527998968958855,
0.02460368722677231,
0.023687349632382393,
-0.010640980675816536,
-0.02207230217754841,
0.04164758324623108,
-0.0405... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def decorator(func):
lazy_func = lazy(func, *resultclasses)
@wraps(func)
def wrapper(*args, **kwargs):
for arg in list(args) + list(six.itervalues(kwargs)):
if isinstance(arg, Promise):
break
else:
return func(*args, **... | |
1,034 | [
0.05179711431264877,
0.013804623857140541,
-0.06305735558271408,
-0.012559500522911549,
0.029882950708270073,
0.012018143199384212,
0.0523168183863163,
-0.0061714788898825645,
0.004363343585282564,
-0.039778970181941986,
0.009847298264503479,
0.015894263982772827,
0.034387048333883286,
-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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg... | def __setattr__(self, name, value):
if name == "_wrapped":
# Assign to __dict__ to avoid infinite __setattr__ loops.
self.__dict__["_wrapped"] = value
else:
if self._wrapped is empty:
self._setup()
setattr(self._wrapped, name, value) | |
1,035 | [
0.017840735614299774,
-0.004131322260946035,
-0.05528983473777771,
0.006166152656078339,
0.06342915445566177,
0.00919270608574152,
0.027316056191921234,
0.01835458166897297,
0.011571813374757767,
-0.0009634613525122404,
-0.002759353257715702,
-0.015127628110349178,
0.008838152512907982,
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 __copy__(self):
if self._wrapped is empty:
# If uninitialized, copy the wrapper. Use type(self), not
# self.__class__, because the latter is proxied.
return type(self)()
else:
# If initialized, return a copy of the wrapped object.
return co... | |
1,036 | [
0.03938142955303192,
-0.025378208607435226,
-0.05037795379757881,
0.0004550126614049077,
0.035134207457304,
0.02649257890880108,
0.024095632135868073,
-0.005892496090382338,
-0.016316063702106476,
-0.01697837933897972,
0.004641457926481962,
-0.02508384734392166,
0.016463246196508408,
-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": "memo", "annotation": null, "type_comment": null}}], "kwarg": null... | def __deepcopy__(self, memo):
if self._wrapped is empty:
# We have to use type(self), not self.__class__, because the
# latter is proxied.
result = type(self)()
memo[id(self)] = result
return result
return copy.deepcopy(self._wrapped, memo) | |
1,037 | [
0.025040630251169205,
-0.015365357510745525,
-0.07531369477510452,
-0.018551377579569817,
0.06943181157112122,
0.006643758621066809,
0.04705507308244705,
0.02555209957063198,
0.022589845582842827,
-0.004211620893329382,
-0.006047045812010765,
-0.022547222673892975,
0.017752209678292274,
-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 __copy__(self):
if self._wrapped is empty:
# If uninitialized, copy the wrapper. Use SimpleLazyObject, not
# self.__class__, because the latter is proxied.
return SimpleLazyObject(self._setupfunc)
else:
# If initialized, return a copy of the wrapped ob... | |
1,038 | [
0.03982226550579071,
-0.03437426686286926,
-0.06736491620540619,
-0.017165515571832657,
0.054004352539777756,
0.027910174801945686,
0.041465312242507935,
0.009269162081182003,
-0.002834796207025647,
-0.025813128799200058,
-0.0036157837603241205,
-0.03095845878124237,
0.025272652506828308,
... | 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": "memo", "annotation": null, "type_comment": null}}], "kwarg": null... | def __deepcopy__(self, memo):
if self._wrapped is empty:
# We have to use SimpleLazyObject, not self.__class__, because the
# latter is proxied.
result = SimpleLazyObject(self._setupfunc)
memo[id(self)] = result
return result
return copy.deepco... | |
1,039 | [
0.031231556087732315,
0.05574455484747887,
-0.026216980069875717,
-0.032205261290073395,
-0.011629677377641201,
-0.023064613342285156,
-0.003724417882040143,
-0.07205409556627274,
0.02908940613269806,
0.004409053362905979,
0.02156754396855831,
-0.015761833637952805,
0.05374846234917641,
0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}], "kwarg": null,... | def checkcast(ins, vmap):
logger.debug('CheckCast: %s', ins.get_output())
cast_type = util.get_type(ins.get_translated_kind())
cast_var = get_variables(vmap, ins.AA)
cast_expr = CheckCastExpression(cast_var,
cast_type,
descriptor=in... | |
1,040 | [
-0.01993963122367859,
0.04335010424256325,
-0.0005924927536398172,
-0.028970902785658836,
-0.015040313825011253,
0.013186837546527386,
-0.016338927671313286,
0.0010012610582634807,
0.00040803049341775477,
-0.0036007030867040157,
0.037966758012771606,
-0.041248708963394165,
-0.001505949767306... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fget", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def __new__(cls, fget=None, fset=None, fdel=None, doc=None):
if fget is not None:
@wraps(fget)
def fget(instance, instance_type=None, name=fget.__name__):
return getattr(instance, name)()
if fset is not None:
@wraps(fset)
def fset(instance,... | |
1,041 | [
-0.00799801666289568,
0.005457993131130934,
0.006163863930851221,
-0.06669645756483078,
-0.0496666245162487,
-0.020209025591611862,
-0.02095380239188671,
-0.013617192395031452,
0.014406434260308743,
0.034459833055734634,
-0.004174086265265942,
-0.03288135305047035,
0.04115171357989311,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "param_type", "annotation": null, "type_comment": null}}, {"_type"... | def get_args(vmap, param_type, largs):
num_param = 0
args = []
if len(param_type) > len(largs):
logger.warning('len(param_type) > len(largs) !')
return args
for type_ in param_type:
param = largs[num_param]
args.append(param)
num_param += util.get_type_size(type_)... | |
1,042 | [
-0.02797907404601574,
0.07552459836006165,
-0.029916813597083092,
-0.04170867055654526,
-0.027955442667007446,
-0.016553498804569244,
-0.0007753913523629308,
0.0019953404553234577,
0.007739144377410412,
0.006279931403696537,
0.03310699760913849,
-0.01922379806637764,
0.06876613944768906,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokevirtual(ins, vmap, ret):
logger.debug('InvokeVirtual : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_type)
... | |
1,043 | [
-0.006712033413350582,
0.03511831909418106,
-0.01419115625321865,
-0.04300495609641075,
-0.014658601954579353,
-0.016336610540747643,
0.005531434901058674,
0.0016465457156300545,
-0.010367694310843945,
-0.014814416877925396,
0.04746366664767265,
-0.017079727724194527,
0.06318899989128113,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokedirect(ins, vmap, ret):
logger.debug('InvokeDirect : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_type)
la... | |
1,044 | [
-0.0171955693513155,
0.015224102884531021,
-0.012644159607589245,
-0.037117116153240204,
-0.023438546806573868,
-0.01217563170939684,
0.013435179367661476,
-0.011269000358879566,
0.00019338171114213765,
-0.008549106307327747,
0.0006385209271684289,
-0.02704073302447796,
0.011208152398467064,... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokesuper(ins, vmap, ret):
logger.debug('InvokeSuper : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_type)
larg... | |
1,045 | [
-0.013598610647022724,
0.028285110369324684,
-0.026416780427098274,
-0.047465063631534576,
-0.012818168848752975,
-0.022467270493507385,
-0.010778376832604408,
-0.04377570375800133,
0.03240016847848892,
0.01239247340708971,
0.008945520967245102,
-0.03027169033885002,
0.060637980699539185,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokestatic(ins, vmap, ret):
logger.debug('InvokeStatic : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_type)
la... | |
1,046 | [
-0.023729579523205757,
0.028049428015947342,
-0.030747853219509125,
-0.03543459251523018,
-0.02003699541091919,
-0.03328058496117592,
-0.004834679886698723,
-0.006515278480947018,
0.021409880369901657,
0.0008062730776146054,
0.03190770372748375,
-0.03806200623512268,
0.05534140393137932,
0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokeinterface(ins, vmap, ret):
logger.debug('InvokeInterface : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_type)
... | |
1,047 | [
-0.025550365447998047,
0.0553395040333271,
0.015047634951770306,
-0.04665002226829529,
-0.05387948080897331,
-0.005071806721389294,
-0.0014681158354505897,
-0.007800515275448561,
-0.011427018791437149,
0.0302601121366024,
0.021759022027254105,
-0.012951798737049103,
0.06447640806436539,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokevirtualrange(ins, vmap, ret):
logger.debug('InvokeVirtualRange : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_... | |
1,048 | [
-0.008513188920915127,
0.01772182062268257,
0.02757793478667736,
-0.044604312628507614,
-0.039280571043491364,
-0.0025914267171174288,
0.021055154502391815,
-0.010623499751091003,
0.0005875299102626741,
0.032374098896980286,
0.0016891484847292304,
-0.012026377953588963,
0.013752995990216732,... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokesuperrange(ins, vmap, ret):
logger.debug('InvokeSuperRange : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_type... | |
1,049 | [
-0.008489161729812622,
0.02196917124092579,
0.02423452027142048,
-0.07107534259557724,
-0.04700600355863571,
-0.014300018548965454,
-0.014547791332006454,
-0.04686442017555237,
0.014441602863371372,
0.036410775035619736,
-0.00005198800135985948,
-0.018712731078267097,
0.06928194314241409,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokestaticrange(ins, vmap, ret):
logger.debug('InvokeStaticRange : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_ty... | |
1,050 | [
-0.013502114452421665,
0.03117503970861435,
0.02533119171857834,
-0.05094515159726143,
-0.049484189599752426,
-0.01919279620051384,
0.0040235361084342,
-0.01846231520175934,
-0.026933537796139717,
0.025095554068684578,
0.04076554626226425,
-0.0161766167730093,
0.06206731125712395,
-0.01221... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokedirectrange(ins, vmap, ret):
logger.debug('InvokeDirectRange : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(param_ty... | |
1,051 | [
-0.005840567406266928,
0.02295874059200287,
-0.02091985195875168,
-0.03255850821733475,
-0.01621553860604763,
0.003836191026493907,
-0.0007406901568174362,
-0.04171227291226387,
-0.008644039742648602,
-0.0022194157354533672,
-0.013135967776179314,
-0.0012663411907851696,
-0.00906880851835012... | 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}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": n... | class SpatialOperator(Operator):
def __init__(self, node):
super(SpatialOperator, self).__init__(node)
self.type = 'SpatialOperator'
def getValueReference(self): return str(self.node.ValueReference)
def getLiteral(self): return str(self.node.Literal)
def createStatement(self, dataso... | |
1,052 | [
-0.0308836679905653,
0.02171657234430313,
0.023509355261921883,
-0.04718603566288948,
-0.04859635978937149,
-0.03537757694721222,
-0.005016803275793791,
-0.012836323119699955,
0.007720916997641325,
0.03755281865596771,
0.017987584695219994,
-0.03203104808926582,
0.045943040400743484,
0.013... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ins", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vmap", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def invokeinterfacerange(ins, vmap, ret):
logger.debug('InvokeInterfaceRange : %s', ins.get_output())
method = ins.cm.get_method_ref(ins.BBBB)
cls_name = util.get_type(method.get_class_name())
name = method.get_name()
param_type, ret_type = method.get_proto()
param_type = util.get_params_type(pa... | |
1,053 | [
0.028188498690724373,
-0.010387076996266842,
0.024388065561652184,
-0.025437263771891594,
-0.011249752715229988,
-0.031242836266756058,
0.009961568750441074,
-0.02704603783786297,
0.000549008313100785,
-0.04413633421063423,
0.0152716850861907,
-0.041455045342445374,
-0.006079529412090778,
... | 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": "datasource", "annotation": null, "type_comment": null}}], "kwarg"... | def createStatement(self, datasource):
xslt = etree.parse(os.path.dirname(os.path.abspath(__file__))+"/../../../../resources/filterencoding/spatial_operators.xsl")
transform = etree.XSLT(xslt_input=xslt)
result = transform(self.node, datasource="'"+datasource.type+"'", operationType="'"+str(self... | |
1,054 | [
0.04091494902968407,
0.025679783895611763,
0.02113596349954605,
-0.016324859112501144,
-0.021259324625134468,
0.006784890778362751,
-0.005890518892556429,
-0.02130044624209404,
-0.04490364342927933,
-0.03139553964138031,
-0.011051148176193237,
0.00536623178049922,
-0.0008326911483891308,
0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "oSheet", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def carregar_registros(oSheet):
lCursor = oSheet.createCursor()
lCursor.gotoStartOfUsedArea(False)
lCursor.gotoEndOfUsedArea(True)
nLinhas = lCursor.getRows().getCount()
nColunas = lCursor.getColumns().getCount()
# Le linha de títulos
nomes = []
chaves_primarias = []
for i in xrange(... | |
1,055 | [
0.00138835737016052,
0.06779130548238754,
0.012640395201742649,
-0.02640838921070099,
-0.029272492974996567,
0.01939471811056137,
0.004267965443432331,
-0.002465215278789401,
-0.04113484546542168,
-0.044179365038871765,
0.03448200598359108,
0.00227352324873209,
0.004423010628670454,
-0.016... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "variavel", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "valu... | def PRINCIPAL(variavel=None):
document = obter_documento()
alterar_diretorio(document)
nPlanilhas = document.getSheets().getCount()
for i in range(0, nPlanilhas):
oSheet = document.getSheets().getByIndex(i)
registros, chaves_primarias = carregar_registros(oSheet)
nome_planilha = ... | |
1,056 | [
0.012083243578672409,
0.058322370052337646,
0.027110960334539413,
-0.03607524186372757,
-0.03361060842871666,
0.0031789399217814207,
0.003252551658079028,
-0.03882341831922531,
-0.024384595453739166,
-0.035420916974544525,
-0.002682741731405258,
-0.0042258636094629765,
-0.0005176682607270777... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "registros", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "chaves_primarias", "annotation": null, "type_comment": null}... | def gerar_arquivos(registros, chaves_primarias, nome_pasta):
if not os.path.exists(nome_pasta):
os.makedirs(nome_pasta)
for registro in registros:
modelos = registro["Modelos"].split(',')
# Cria pasta para colocar arquivos
if len(modelos):
diretorio = ""
f... | |
1,057 | [
-0.0023652103263884783,
0.0159597247838974,
0.03236084058880806,
-0.02429966814815998,
-0.02727324143052101,
0.006429190281778574,
0.02341688796877861,
0.01706319861114025,
-0.005923915188759565,
0.06476814299821854,
0.05371016636490822,
-0.015588028356432915,
0.008578062057495117,
0.00384... | 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": "args", "annotation": null, "type_comment": null}}], "kwarg": null... | def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
config = get_config(parse_args=False)
# Setup the correct options so the agent will use the forwarder
opts, args = Values({
'aut... | |
1,058 | [
0.02748776227235794,
0.007791383657604456,
0.0525873601436615,
-0.03598962351679802,
-0.024395089596509933,
0.05244407057762146,
0.0051166401244699955,
-0.014985726214945316,
0.010406422428786755,
0.029589345678687096,
0.04441983997821808,
-0.033720869570970535,
0.00582413375377655,
-0.004... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "DatadogAgent"}}, "targets": [{"_type": "Name", "_fields": {"id": "_svc_name_", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment... | class AgentSvc(win32serviceutil.ServiceFramework):
_svc_name_ = "DatadogAgent"
_svc_display_name_ = "Datadog Agent"
_svc_description_ = "Sends metrics to Datadog"
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.hWaitStop = win32event.CreateEvent(Non... | |
1,059 | [
0.028012659400701523,
0.03216036781668663,
0.027158105745911598,
-0.009754408150911331,
-0.07049018889665604,
0.045437198132276535,
0.01959218643605709,
0.032827336341142654,
0.025490686297416687,
0.021019915118813515,
0.046646080911159515,
-0.01610102690756321,
-0.02578248456120491,
-0.03... | 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 SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
# Stop all services.
self.running = False
for proc in self.procs.values():
proc.terminate() | |
1,060 | [
0.020702699199318886,
0.04322798550128937,
0.055144887417554855,
-0.031077414751052856,
-0.01987318880856037,
0.040797870606184006,
0.03009602427482605,
0.012244034558534622,
0.025866691023111343,
0.035517048090696335,
0.03990994393825531,
-0.035143181681632996,
0.011169176548719406,
-0.05... | 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 SvcDoRun(self):
servicemanager.LogMsg(
servicemanager.EVENTLOG_INFORMATION_TYPE,
servicemanager.PYS_SERVICE_STARTED,
(self._svc_name_, ''))
self.start_ts = time.time()
# Start all services.
for proc in self.procs.values():
proc.start()... | |
1,061 | [
0.014737737365067005,
0.0023531094193458557,
0.009989445097744465,
-0.010872988030314445,
-0.020976632833480835,
0.034091535955667496,
-0.010566452518105507,
0.016216319054365158,
0.003999985288828611,
0.011552173644304276,
0.03538980334997177,
-0.02336880937218666,
-0.025460463017225266,
... | 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 _check_collector_blocked(self):
if self._collector_heartbeat.poll():
while self._collector_heartbeat.poll():
self._collector_heartbeat.recv()
self._collector_failed_heartbeats = 0
else:
self._collector_failed_heartbeats += 1
if self._co... | |
1,062 | [
0.06192871555685997,
0.051523227244615555,
0.05046892538666725,
-0.02171630598604679,
-0.029314149171113968,
0.02280498668551445,
-0.0025039645843207836,
0.07182997465133667,
0.013751750811934471,
0.01677713543176651,
0.020364049822092056,
-0.01534466166049242,
-0.04531201720237732,
0.0215... | 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 restart(self):
if not self._can_restart():
servicemanager.LogInfoMsg(
"{0} reached the limit of restarts ({1} tries during the last {2}s"
" (max authorized: {3})). Not restarting..."
.format(self._name, len(self._restarts),
... | |
1,063 | [
0.046912990510463715,
-0.0306970477104187,
0.007282717619091272,
-0.04727441817522049,
-0.010119905695319176,
-0.0023537816014140844,
-0.011168038472533226,
0.020107287913560867,
0.0017378528136759996,
0.014818433672189713,
-0.02787793055176735,
-0.026528609916567802,
0.009547648951411247,
... | 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 get_emitters(self):
emitters = [http_emitter]
custom = [s.strip() for s in
self.config.get('custom_emitters', '').split(',')]
for emitter_spec in custom:
if not emitter_spec:
continue
emitters.append(modules.load(emitter_spec, 'emitter'))
... | |
1,064 | [
-0.013260829262435436,
0.0032530641183257103,
0.05516159161925316,
-0.026456814259290695,
0.00983484461903572,
0.05758247897028923,
0.028099557384848595,
0.03776148334145546,
-0.019161736592650414,
-0.013909281231462955,
0.023819778114557266,
-0.011877466924488544,
-0.026651348918676376,
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": "agentConfig", "annotation": null, "type_comment": null}}, {"_type... | def __init__(self, agentConfig, hostname, **options):
multiprocessing.Process.__init__(self, name='jmxfetch')
self.config = agentConfig
self.hostname = hostname
self.options = options
try:
confd_path = get_confd_path()
self.jmx_daemon = JMXFetch(confd_pat... | |
1,065 | [
0.038015324622392654,
-0.0037735800724476576,
-0.004055899567902088,
-0.06265819817781448,
-0.011516407132148743,
-0.042264096438884735,
-0.027393395081162453,
-0.005610055755823851,
0.018314441666007042,
-0.01772185042500496,
-0.030501706525683403,
-0.0634632259607315,
0.008737933821976185,... | 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 ApiParameters(Parameters):
@property
def image_names(self):
result = []
result += self.read_image_from_device('image')
result += self.read_image_from_device('hotfix')
return result
def read_image_from_device(self, t):
uri = "https://{0}:{1}/mgmt/tm/sys/software... | |
1,066 | [
-0.011650911532342434,
0.013057460077106953,
-0.05780915170907974,
-0.018953243270516396,
0.03232717886567116,
-0.033897824585437775,
-0.012108040042221546,
0.016878584399819374,
-0.01943381503224373,
0.0016526947729289532,
0.004946363158524036,
-0.019340043887495995,
0.023184610530734062,
... | 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": "t", "annotation": null, "type_comment": null}}], "kwarg": null, "... | def read_image_from_device(self, t):
uri = "https://{0}:{1}/mgmt/tm/sys/software/{2}".format(
self.client.provider['server'],
self.client.provider['server_port'],
t,
)
resp = self.client.api.get(uri)
try:
response = resp.json()
exce... | |
1,067 | [
0.016577234491705894,
0.012444501742720604,
-0.02523629181087017,
-0.05732574313879013,
0.05422329902648926,
-0.03183476999402046,
-0.006505869794636965,
-0.012560264207422733,
0.009515702724456787,
-0.028361886739730835,
-0.0017335480079054832,
0.010100305080413818,
-0.01440089289098978,
... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def read_image(self):
image = self.read_image_from_device(type='image')
if image:
return image
image = self.read_image_from_device(type='hotfix')
if image:
return image
return None | |
1,068 | [
0.000049719063099473715,
0.03178095072507858,
-0.03909258916974068,
-0.08975819498300552,
-0.022865688428282738,
0.005831367336213589,
0.004611826501786709,
-0.01456720381975174,
-0.0074854567646980286,
0.024491742253303528,
0.015980189666152,
-0.042770836502313614,
-0.024693597108125687,
... | 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 ModuleParameters(Parameters):
@property
def version(self):
if self._values['version']:
return self._values['version']
self._values['version'] = self.image_info['version']
return self._values['version']
@property
def build(self):
# Return cached copy if... | |
1,069 | [
-0.02151883766055107,
0.040046218782663345,
-0.048081666231155396,
-0.03105001337826252,
0.02729431539773941,
-0.019859343767166138,
-0.004994859918951988,
0.01917152665555477,
-0.019564565271139145,
-0.004921164829283953,
-0.005693593993782997,
-0.019695578143000603,
0.013024847023189068,
... | 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": "type", "annotation": null, "type_comment": null}}], "kwarg": null... | def read_image_from_device(self, type):
uri = "https://{0}:{1}/mgmt/tm/sys/software/{2}/".format(
self.client.provider['server'],
self.client.provider['server_port'],
type,
)
resp = self.client.api.get(uri)
try:
response = resp.json()
... | |
1,070 | [
-0.011319017969071865,
0.04886658117175102,
-0.03990304097533226,
-0.02936069294810295,
-0.021886829286813736,
0.02369481697678566,
-0.0017268186202272773,
-0.0066080656833946705,
0.03590509667992592,
0.034020714461803436,
0.026075758039951324,
-0.03231458738446236,
-0.08963541686534882,
-... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "an... | class ModuleManager(object):
def __init__(self, *args, **kwargs):
self.module = kwargs.get('module', None)
self.client = F5RestClient(**self.module.params)
self.want = ModuleParameters(params=self.module.params, client=self.client)
self.have = ApiParameters(client=self.client)
... | |
1,071 | [
0.047937870025634766,
0.024783113971352577,
0.02220488153398037,
-0.021834800019860268,
-0.00047879276098683476,
0.05516679212450981,
-0.003642217256128788,
0.01042395830154419,
0.01789960078895092,
-0.0013299798592925072,
0.03197502717375755,
-0.05738728120923042,
0.0062759630382061005,
-... | 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):
result = dict()
changed = self.present()
reportable = ReportableChanges(params=self.changes.to_return())
changes = reportable.to_return()
result.update(**changes)
result.update(dict(changed=changed))
self._announce_deprecations(result)
... | |
1,072 | [
0.003059339476749301,
0.0030374201014637947,
0.0025755444075912237,
0.013314546085894108,
0.017986536026000977,
0.016946924850344658,
0.033317681401968,
-0.021856898441910744,
0.018487554043531418,
0.030737439170479774,
0.016896823421120644,
-0.05506185069680214,
-0.03990606218576431,
0.05... | 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 _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:
if isinstance... | |
1,073 | [
-0.03260630741715431,
0.014311538077890873,
-0.0299508199095726,
-0.006514239590615034,
-0.018869271501898766,
0.0010771953966468573,
0.007417487911880016,
0.000865745940245688,
-0.011649669148027897,
0.031176429241895676,
0.02824007347226143,
-0.012588026002049446,
-0.028725210577249527,
... | 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 exists(self):
uri = "https://{0}:{1}/mgmt/tm/sys/software/volume/".format(
self.client.provider['server'],
self.client.provider['server_port']
)
resp = self.client.api.get(uri)
try:
collection = resp.json()
except ValueError:
r... | |
1,074 | [
-0.006622291635721922,
0.012077562510967255,
-0.04513947665691376,
-0.0018275983165949583,
0.011207802221179008,
0.023714739829301834,
-0.009682968258857727,
0.011593138799071312,
0.021975219249725342,
0.008752654306590557,
0.0216229110956192,
-0.03743273764848709,
-0.010112343356013298,
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 volume_exists(self):
resp = self.client.api.get(self.volume_url)
try:
response = resp.json()
except ValueError:
return False
if resp.status == 404 or 'code' in response and response['code'] == 404:
return False
return True | |
1,075 | [
0.0015474590472877026,
0.0016952670412138104,
-0.040420956909656525,
0.00969499722123146,
0.004259283188730478,
-0.015444425866007805,
0.009882019832730293,
-0.0010263605508953333,
-0.005152164027094841,
0.020801711827516556,
-0.00942954607307911,
-0.008560797199606895,
-0.018810829147696495... | 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_on_device(self):
params = {
"command": "install",
"name": self.want.image,
}
params.update(self.want.api_params())
uri = "https://{0}:{1}/mgmt/tm/sys/software/{2}".format(
self.client.provider['server'],
self.client.provider['se... | |
1,076 | [
0.03018789552152157,
0.04739098995923996,
-0.05085517466068268,
-0.003184339962899685,
-0.006592555437237024,
0.02674727700650692,
0.035867273807525635,
0.01469332817941904,
0.009897670708596706,
0.029551615938544273,
-0.004615967161953449,
-0.010492709465324879,
-0.05236339196562767,
-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 update(self):
if self.module.check_mode:
return True
if self.want.image and self.want.image not in self.have.image_names:
raise F5ModuleError(
"The specified image was not found on the device."
)
options = list()
if not self.volum... | |
1,077 | [
0.007500436622649431,
0.03663371130824089,
-0.034693747758865356,
0.00011692997213685885,
-0.013568459078669548,
0.040987346321344376,
0.004982432816177607,
0.023956280201673508,
0.0312875360250473,
0.008492975495755672,
0.009197903797030449,
0.00403218949213624,
-0.06027418375015259,
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 wait_for_device_reboot(self):
while True:
time.sleep(5)
try:
self.client.reconnect()
volume = self.read_volume_from_device()
if volume is None:
continue
if 'active' in volume and volume['active'] is T... | |
1,078 | [
0.026358619332313538,
0.031172338873147964,
-0.03965476527810097,
-0.028251392766833305,
-0.021089231595396996,
-0.00489258486777544,
0.036149632185697556,
0.01364666037261486,
0.003995854407548904,
0.007238104939460754,
-0.0008331999415531754,
0.0040221428498625755,
-0.06958862394094467,
... | 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 wait_for_software_install_on_device(self):
# We need to delay this slightly in case the the volume needs to be
# created first
for dummy in range(10):
try:
if self.volume_exists():
break
except F5ModuleError:
pass
... | |
1,079 | [
-0.007595292758196592,
0.032600801438093185,
-0.03752560168504715,
0.0025953473523259163,
0.03169907629489899,
0.010676183737814426,
-0.04827692732214928,
0.014982495456933975,
0.02293616533279419,
-0.0010166073916479945,
0.034658581018447876,
-0.019733889028429985,
-0.06460045278072357,
-... | 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 read_volume_from_device(self):
try:
resp = self.client.api.get(self.volume_url)
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
except ssl.SSLError:
# Suggests BIG-IP is still in the middle of restarting itself or
... | |
1,080 | [
0.02846868522465229,
0.028694091364741325,
-0.034487005323171616,
0.0034487005323171616,
-0.03883732855319977,
0.00786664430052042,
-0.004147456958889961,
-0.015485341660678387,
0.04084343463182449,
0.03018176555633545,
0.002146985149011016,
-0.031624358147382736,
0.009106372483074665,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class ArgumentSpec(object):
def __init__(self):
self.supports_check_mode = True
argument_spec = dict(
image=dict(),
volume=dict(),
state=dict(
default='activated',
choices=['activated', 'installed']
),
)
... | |
1,081 | [
0.02415313757956028,
0.02909865975379944,
-0.018670599907636642,
0.01720942184329033,
-0.03204599395394325,
0.031646355986595154,
0.018608156591653824,
0.007393307983875275,
0.03736617788672447,
0.05520003288984299,
0.01657249964773655,
-0.018807975575327873,
0.020693767815828323,
-0.01603... | 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 __init__(self):
self.supports_check_mode = True
argument_spec = dict(
image=dict(),
volume=dict(),
state=dict(
default='activated',
choices=['activated', 'installed']
),
)
self.argument_spec = {}
... | |
1,082 | [
-0.028020931407809258,
0.042533330619335175,
0.0025969555135816336,
0.00795454066246748,
0.00009590254194336012,
-0.014970685355365276,
0.022674258798360825,
-0.041791342198848724,
-0.02372177131474018,
0.026777012273669243,
-0.006274157203733921,
0.03657560795545578,
-0.013050246983766556,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 20}}, "targets": [{"_type": "Name", "_fields": {"id": "ANNOTATE_WIDTH", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}... | class KeyValueLine(npyscreen.AnnotateTextboxBase):
ANNOTATE_WIDTH = 20
def getAnnotationAndColor(self):
if self.value:
return (self.value[0][0:self.ANNOTATE_WIDTH-2], self.annotation_color)
else:
return ('', self.annotation_color)
def display_value(self, vl):
... | |
1,083 | [
0.051381099969148636,
0.01599387265741825,
0.03414534777402878,
0.012330961413681507,
-0.02109936624765396,
-0.003153301542624831,
0.04149625822901726,
0.025678005069494247,
-0.01079429592937231,
0.03166159614920616,
0.02478736639022827,
-0.006943222135305405,
0.012274513021111488,
-0.0294... | 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 onStart(self):
mainform = self.addForm("MAIN", MyForm)
test_dict= {}
for i in range(10000):
test_dict[str(i)] = 'test %s' % i
# The following line is the one you want to replace, I suspect.
#mainform.set_value(globals().copy())
m... | |
1,084 | [
0.01907995715737343,
0.0038588677998632193,
0.043328892439603806,
-0.0032990938052535057,
-0.02192646823823452,
-0.029679933562874794,
0.032752733677625656,
0.009266046807169914,
-0.019437259063124657,
0.03654014319181442,
0.017460186034440994,
-0.01761501654982567,
0.00965907983481884,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class MyTestApp(npyscreen.NPSAppManaged):
def onStart(self):
mainform = self.addForm("MAIN", MyForm)
test_dict= {}
for i in range(10000):
test_dict[str(i)] = 'test %s' % i
# The following line is the one you want to replace, I suspect.
#... | |
1,085 | [
0.010003975592553616,
-0.017429819330573082,
0.0727362409234047,
-0.022407809272408485,
-0.023600880056619644,
0.012006142176687717,
0.0025901314802467823,
0.04105812683701515,
-0.010758216492831707,
0.01848575659096241,
0.015962477773427963,
-0.04525445029139519,
-0.0024632818531244993,
-... | 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 Cert_6_3_1_OrphanReattach(unittest.TestCase):
def setUp(self):
self.simulator = config.create_default_simulator()
self.nodes = {}
for i in range(1,4):
self.nodes[i] = node.Node(i, (i == ED), simulator=self.simulator)
self.nodes[LEADER].set_panid(0xface)
se... | |
1,086 | [
0.02209879457950592,
-0.034734293818473816,
0.05496708303689957,
-0.02401811070740223,
-0.022591952234506607,
-0.02344498038291931,
0.0103296535089612,
0.03633372113108635,
-0.011289311572909355,
0.0018176857847720385,
0.028789743781089783,
-0.03337477520108223,
-0.00021888036280870438,
-0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def setUp(self):
self.simulator = config.create_default_simulator()
self.nodes = {}
for i in range(1,4):
self.nodes[i] = node.Node(i, (i == ED), simulator=self.simulator)
self.nodes[LEADER].set_panid(0xface)
self.nodes[LEADER].set_mode('rsdn')
self.nodes[LEA... | |
1,087 | [
0.014488180167973042,
-0.025669274851679802,
0.04272963106632233,
-0.015131223946809769,
-0.00661088852211833,
0.02258528769016266,
-0.015275580808520317,
0.04073488339781761,
0.005019681993871927,
0.03430444002151489,
0.04566926509141922,
-0.024934368208050728,
-0.022808384150266647,
-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(self):
self.nodes[LEADER].start()
self.simulator.go(5)
self.assertEqual(self.nodes[LEADER].get_state(), 'leader')
self.nodes[ROUTER].start()
self.simulator.go(5)
self.assertEqual(self.nodes[ROUTER].get_state(), 'router')
self.nodes[ED].start()
s... | |
1,088 | [
0.056051596999168396,
0.032718490809202194,
0.040643926709890366,
-0.01800168678164482,
0.0028009505476802588,
-0.01476894412189722,
0.04953397065401077,
-0.004793715197592974,
0.01981358788907528,
0.025692487135529518,
0.016593879088759422,
-0.043772388249635696,
0.0601707361638546,
0.004... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def test_MRIMarchingCubes_inputs():
input_map = dict(args=dict(argstr='%s',
),
connectivity_value=dict(argstr='%d',
position=-1,
usedefault=True,
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_file=dict(argst... | |
1,089 | [
0.06281591206789017,
0.02454988844692707,
0.04594407230615616,
-0.0009488855139352381,
0.00651019299402833,
0.016436995938420296,
0.07071759551763535,
-0.00024071562802419066,
0.035135164856910706,
-0.010697091929614544,
0.018250903114676476,
-0.04542226344347,
0.02053692564368248,
-0.0010... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def test_MRIMarchingCubes_outputs():
output_map = dict(surface=dict(),
)
outputs = MRIMarchingCubes.output_spec()
for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value | |
1,090 | [
-0.04311400651931763,
0.003073927713558078,
-0.035654399544000626,
-0.049351420253515244,
0.02859516628086567,
0.020830007269978523,
0.012527505867183208,
0.018332935869693756,
-0.005584170110523701,
-0.045389819890260696,
0.014129004441201687,
-0.04648558050394058,
0.00490722106769681,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "backend_uri", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyar... | def get_cache(backend_uri):
scheme, host, params = parse_backend_uri(backend_uri)
if scheme in BACKENDS:
name = 'django.core.cache.backends.%s' % BACKENDS[scheme]
else:
name = scheme
module = importlib.import_module(name)
return getattr(module, 'CacheClass')(host, params) | |
1,091 | [
0.05151819810271263,
0.010621987283229828,
0.01141265407204628,
0.01491863839328289,
0.005555476061999798,
0.031189732253551483,
0.011641531251370907,
0.031730715185403824,
0.000027898484404431656,
0.0035892119631171227,
0.031189732253551483,
-0.0017009744187816978,
-0.005628300830721855,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields"... | async def sample_delete_cluster():
# Create a client
client = container_v1beta1.ClusterManagerAsyncClient()
# Initialize request argument(s)
request = container_v1beta1.DeleteClusterRequest(
project_id="project_id_value",
zone="zone_value",
cluster_id="cluster_id_value",
)
... | |
1,092 | [
-0.02974868007004261,
0.010235436260700226,
0.06188521161675453,
-0.024077527225017548,
-0.010577446781098843,
0.02818164974451065,
-0.029972540214657784,
-0.020980779081583023,
0.023617368191480637,
0.04370269924402237,
0.02083153836429119,
-0.039548829197883606,
-0.04327985271811485,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "nxos_bgp_af", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Store", "_fields": {}}}}]... | class TestNxosBgpAfModule(TestNxosModule):
module = nxos_bgp_af
def setUp(self):
super(TestNxosBgpAfModule, self).setUp()
self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp_af.load_config')
self.load_config = self.mock_load_config.start()
self.mock_get_confi... | |
1,093 | [
0.004935836885124445,
-0.024608952924609184,
0.03861021250486374,
-0.04094750061631203,
-0.013124775141477585,
0.003208153648301959,
0.008832254447042942,
-0.014068679884076118,
-0.011040317825973034,
0.004393653478473425,
0.018923049792647362,
-0.021788476034998894,
-0.04800431430339813,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def setUp(self):
super(TestNxosBgpAfModule, self).setUp()
self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp_af.load_config')
self.load_config = self.mock_load_config.start()
self.mock_get_config = patch('ansible.modules.network.nxos.nxos_bgp_af.get_config')
s... | |
1,094 | [
-0.005152197554707527,
0.0011192650999873877,
0.06088055670261383,
0.0011752672726288438,
-0.04507550597190857,
-0.0035156903322786093,
0.003095674328505993,
0.0003358184185344726,
0.015817495062947273,
0.04208872467279434,
0.015444147400557995,
-0.02732904814183712,
-0.02200262062251568,
... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_nxos_bgp_af_dampening_routemap(self):
set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
dampening_routemap='route-map-a'))
self.execute_module(
changed=True,
commands=['router bgp 65535', 'address-family ipv4 unicast',
... | |
1,095 | [
0.00016473456344101578,
0.012289479374885559,
0.0703209936618805,
-0.013804796151816845,
-0.0265822596848011,
0.009002011269330978,
-0.005415974650532007,
0.007242702413350344,
0.02577323466539383,
0.04990273341536522,
0.008462660945951939,
-0.01627039723098278,
-0.043533265590667725,
-0.0... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_nxos_bgp_af_dampening_manual(self):
set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
dampening_half_time=5, dampening_suppress_time=2000,
dampening_reuse_time=1900, dampening_max_suppress_time=10))
self.execute_module(
... | |
1,096 | [
-0.026305856183171272,
-0.004068287089467049,
0.07306115329265594,
-0.0027496940456330776,
-0.01830129139125347,
-0.014245005324482918,
-0.040634866803884506,
0.03081817552447319,
0.005784408189356327,
0.043443065136671066,
0.030242133885622025,
-0.03998682275414467,
0.005412382073700428,
... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_nxos_bgp_af_client(self):
set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
client_to_client=False))
self.execute_module(
changed=True,
commands=['router bgp 65535', 'address-family ipv4 unicast',
'no client-to... | |
1,097 | [
0.005485122557729483,
0.023788226768374443,
0.035781919956207275,
0.012635421007871628,
0.04930248111486435,
0.02065703272819519,
0.028014786541461945,
0.031688131392002106,
-0.03848160430788994,
0.03991996496915817,
0.01778031699359417,
0.013454178348183632,
0.020114881917834282,
-0.01851... | 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": "using", "annotation": null, "type_comment": null}}, {"_type": "ar... | def refresh_from_db(self, using=None, fields=None, **kwargs):
# Reloads all deferred fields if any of the fields is deferred.
if fields is not None:
fields = set(fields)
deferred_fields = self.get_deferred_fields()
if fields.intersection(deferred_fields):
... | |
1,098 | [
0.01561109907925129,
0.021200111135840416,
0.04714313521981239,
0.009110447019338608,
0.05152854323387146,
0.027837807312607765,
0.05343524366617203,
0.02102135680615902,
-0.03219938278198242,
0.006584070157259703,
0.016969621181488037,
-0.02105710841715336,
0.007996219210326672,
-0.024930... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}, "targets": [{"_type": "Name", "_fields": {"id": "proxy", "ctx": {"_type": "Store", "_fi... | class RefreshPrimaryProxy(Primary):
class Meta:
proxy = True
def refresh_from_db(self, using=None, fields=None, **kwargs):
# Reloads all deferred fields if any of the fields is deferred.
if fields is not None:
fields = set(fields)
deferred_fields = self.get_defer... | |
1,099 | [
0.0040291608311235905,
0.028302917256951332,
-0.03909006714820862,
-0.010466739535331726,
-0.019470270723104477,
0.012079471722245216,
0.009270540438592434,
0.0512656643986702,
-0.00916907750070095,
0.0050090826116502285,
0.015828274190425873,
0.03923959285020828,
-0.028409721329808235,
0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "queue", "annotation": ... | class TriggerHandler(RequestHandler):
def initialize(self, queue, wake_callback):
self.queue = queue
self.wake_callback = wake_callback
@asynchronous
def get(self):
logging.debug("queuing trigger")
self.queue.append(self.finish)
if self.get_argument("wake", "true") =... | |
1,100 | [
-0.026600245386362076,
-0.06713584065437317,
-0.00713640870526433,
-0.029180865734815598,
0.00043206787086091936,
-0.025369487702846527,
0.0107592036947608,
0.008322501555085182,
0.007066930644214153,
-0.028089065104722977,
0.013846023008227348,
-0.052327048033475876,
-0.0027667232789099216,... | 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 SimpleHTTPClientTestCase(SimpleHTTPClientTestMixin, AsyncHTTPTestCase):
def setUp(self):
super(SimpleHTTPClientTestCase, self).setUp()
self.http_client = self.create_client()
def create_client(self, **kwargs):
return SimpleAsyncHTTPClient(self.io_loop, force_instance=True,
... |