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,801 | [
0.028957990929484367,
-0.0006477335118688643,
0.07032334804534912,
-0.02862205170094967,
0.005822952836751938,
0.018297508358955383,
-0.010761264711618423,
0.022687120363116264,
-0.02508348785340786,
-0.02481473609805107,
-0.0014144455781206489,
-0.03142154961824417,
0.01661781035363674,
-... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}, "targets": [{"_type": "Name", "_fields": {"id": "multi_db", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {... | class LoadDataWithNaturalKeysAndMultipleDatabasesTestCase(TestCase):
multi_db = True
def test_load_data_with_user_permissions(self):
# Create test contenttypes for both databases
default_objects = [
ContentType.objects.db_manager('default').create(
model='examplemode... | |
11,802 | [
0.04438053444027901,
0.01464089099317789,
0.04612679407000542,
-0.01860191859304905,
0.04727676883339882,
-0.0014427932910621166,
-0.010025017894804478,
0.029260486364364624,
0.003276897594332695,
-0.018303776159882545,
0.02470317669212818,
-0.019475048407912254,
-0.01648298092186451,
-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 NaturalKeysTestCase(TestCase):
def test_user_natural_key(self):
staff_user = User.objects.create_user(username='staff')
self.assertEqual(User.objects.get_by_natural_key('staff'), staff_user)
self.assertEqual(staff_user.natural_key(), ('staff',))
def test_group_natural_key(self):
... | |
11,803 | [
0.019841479137539864,
0.02745390124619007,
0.051822591572999954,
-0.02127230167388916,
0.0008767977706156671,
0.0045775133185088634,
-0.008081909269094467,
0.014297043904662132,
-0.0008083307184278965,
-0.007618010509759188,
0.016543881967663765,
-0.04113613814115524,
0.03051675483584404,
... | 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_load_data_with_user_permissions(self):
# Create test contenttypes for both databases
default_objects = [
ContentType.objects.db_manager('default').create(
model='examplemodela',
app_label='app_a',
),
ContentType.objects.db_mana... | |
11,804 | [
0.01799854263663292,
-0.030498776584863663,
0.0428643599152565,
-0.0026130988262593746,
0.03815152496099472,
-0.0349198654294014,
-0.00086051324615255,
0.01784144714474678,
0.03357334062457085,
0.03974490985274315,
0.0008542013820260763,
-0.004906398244202137,
-0.05426493287086487,
-0.0187... | 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 UserManagerTestCase(TestCase):
def test_create_user(self):
email_lowercase = 'normal@normal.com'
user = User.objects.create_user('user', email_lowercase)
self.assertEqual(user.email, email_lowercase)
self.assertEqual(user.username, 'user')
self.assertFalse(user.has_usa... | |
11,805 | [
0.024936582893133163,
-0.009693525731563568,
0.02769578993320465,
0.012478664517402649,
0.07539063692092896,
-0.029500683769583702,
0.0014988919720053673,
0.027841011062264442,
0.04393983632326126,
0.0205073319375515,
0.025227025151252747,
0.00315078510902822,
-0.023837050423026085,
0.0181... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_email_user(self):
# valid send_mail parameters
kwargs = {
"fail_silently": False,
"auth_user": None,
"auth_password": None,
"connection": None,
"html_message": None,
}
abstract_user = AbstractUser(email='foo@bar.com')
... | |
11,806 | [
0.004718270152807236,
0.006270589306950569,
-0.02024425007402897,
-0.00034453405532985926,
0.07165750861167908,
0.01363365538418293,
-0.0008834563777782023,
0.016877640038728714,
0.050030943006277084,
-0.03281887248158455,
0.026308607310056686,
0.001266659121029079,
0.01412415411323309,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_builtin_user_isactive(self):
user = User.objects.create(username='foo', email='foo@bar.com')
# is_active is true by default
self.assertEqual(user.is_active, True)
user.is_active = False
user.save()
user_fetched = User.objects.get(pk=user.pk)
# the is_acti... | |
11,807 | [
0.07030048221349716,
0.019829299300909042,
-0.03406523913145065,
-0.021157488226890564,
0.0357675664126873,
-0.013861803337931633,
0.0625932440161705,
-0.030754121020436287,
-0.0014030165039002895,
0.014712966047227383,
0.0076043494045734406,
-0.015517362393438816,
0.026339296251535416,
-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": "filename", "annotation": null, "type_comment": null}}, {"_type": ... | def __init__(self,
filename=None,
content=None,
content_type='yaml',
separator='.',
backup_ext=None,
backup=False):
self.content = content
self._separator = separator
self.filename = filename
... | |
11,808 | [
0.019648464396595955,
0.07239694893360138,
0.0048426678404212,
-0.00692343944683671,
0.01584484614431858,
-0.0016761026345193386,
-0.07855112105607986,
-0.03861313313245773,
0.0028794242534786463,
0.016122639179229736,
0.007591209374368191,
-0.0070623354986310005,
0.0019592370372265577,
0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "namespace", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs... | def _is_invalid_namespace(namespace):
# check if it uses a reserved name
name = namespace['metadata']['name']
if not any((name == 'kube',
name == 'kubernetes',
name == 'openshift',
name.startswith('kube-'),
... | |
11,809 | [
0.023567741736769676,
0.04692123085260391,
0.05403916537761688,
-0.03575631231069565,
-0.0008808145648799837,
-0.010897104628384113,
-0.007629758678376675,
-0.015140488743782043,
0.025995932519435883,
-0.0163307785987854,
0.007546438369899988,
-0.06737041473388672,
0.013878781348466873,
0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "account.cdr.report"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_commen... | class account_cdr_report(osv.osv_memory):
_name = 'account.cdr.report'
_description = 'Account CDR Report'
def _get_defaults(self, cr, uid, context=None):
fiscalyear_id = self.pool.get('account.fiscalyear').find(cr, uid)
return fiscalyear_id
_columns = {
'fiscalyear_id': fields... | |
11,810 | [
0.021097417920827866,
0.028614889830350876,
0.05210265517234802,
-0.011484062299132347,
0.042933881282806396,
-0.0098212119191885,
-0.0073615787550807,
0.04863838478922844,
-0.012771617621183395,
0.004826886113733053,
0.003562426660209894,
-0.04177912324666977,
0.002284976188093424,
0.0107... | 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": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg",... | def print_cdr_report(self, cr, uid, ids, context=None):
active_ids = context.get('active_ids', [])
data = {}
data['form'] = {}
data['ids'] = active_ids
data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
return self.pool['report'].get_action(
... | |
11,811 | [
0.011503572575747967,
0.027808833867311478,
-0.01778445392847061,
0.014496094547212124,
-0.03825421258807182,
0.0065312073566019535,
0.03502274677157402,
0.0018731707241386175,
-0.027262670919299126,
0.010672948323190212,
0.026397911831736565,
-0.016692128032445908,
0.013289982452988625,
-... | 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": "fill_color", "annotati... | class Sleepy(Eye):
def __init__(self, fill_color):
Eye.__init__(self, fill_color)
self._pixbuf = svg_str_to_pixbuf(eye_svg())
def draw(self, widget, cr):
bounds = self.get_allocation()
# background
cr.set_source_rgba(*self.fill_color.get_rgba())
cr.rectangle(0,... | |
11,812 | [
0.005524798762053251,
0.015370860695838928,
0.016987036913633347,
-0.042295657098293304,
0.000942769052926451,
0.02404777519404888,
-0.041607923805713654,
0.04465687647461891,
0.026615316048264503,
0.014923833310604095,
-0.001885538105852902,
-0.013513978570699692,
0.03165870159864426,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "params", "annotation": null, "type_comment": null}}], "kwarg": ... | def dispatch(method, params):
if method in ['login', 'about', 'timezone_get',
'version', 'authenticate']:
pass
elif method in ['set_loglevel']:
passwd = params[0]
params = params[1:]
security.check_super(passwd)
else:
raise Exception("Method not foun... | |
11,813 | [
-0.02952677011489868,
0.026816584169864655,
0.0846814438700676,
0.019113948568701744,
-0.02128922939300537,
-0.0017741024494171143,
-0.006008768919855356,
-0.006745749618858099,
-0.04300638288259506,
0.04455166310071945,
-0.0004409253888297826,
-0.00807112641632557,
-0.0032658937852829695,
... | 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": "widget", "annotation": null, "type_comment": null}}, {"_type": "a... | def draw(self, widget, cr):
bounds = self.get_allocation()
# background
cr.set_source_rgba(*self.fill_color.get_rgba())
cr.rectangle(0, 0, bounds.width, bounds.height)
cr.fill()
w = h = min(bounds.width, bounds.height)
x = int((bounds.width - w) // 2)
y ... | |
11,814 | [
0.006721144076436758,
0.03996151685714722,
-0.003914893139153719,
-0.023117711767554283,
0.006866023410111666,
-0.0020251618698239326,
-0.012950957752764225,
-0.044496871531009674,
0.008717959746718407,
0.024957049638032913,
0.04170006886124611,
-0.05082117021083832,
0.0007023501093499362,
... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "BinOp", "_fields": {"... | def eye_svg():
return \
'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + \
'<svg\n' + \
' xmlns:svg="http://www.w3.org/2000/svg"\n' + \
' xmlns="http://www.w3.org/2000/svg"\n' + \
' version="1.1"\n' + \
' width="300"\n' + \
' height="300"... | |
11,815 | [
0.01920044980943203,
0.028958851471543312,
-0.02473670057952404,
-0.03224410116672516,
-0.011790390126407146,
-0.00786634348332882,
-0.010214687325060368,
-0.01943163387477398,
-0.012033741921186447,
0.024128321558237076,
0.035334665328264236,
-0.0036076889373362064,
0.01651141233742237,
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}}, {"_type": "arg", "_fields": {"arg": "controller", "annotati... | class View:
def __init__(self, controller, master):
self.master = master
container = tk.Frame(master)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)
container.grid_columnconfigure(0, weight=1)
self.menu = Men... | |
11,816 | [
0.024303870275616646,
0.011549621820449829,
0.015068399719893932,
-0.014487219974398613,
-0.00020770562696270645,
-0.00689490232616663,
0.006350706797093153,
0.013293160125613213,
-0.015300871804356575,
0.018745681270956993,
0.019738970324397087,
0.017879195511341095,
0.0233951173722744,
-... | 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": "controller", "annotation": null, "type_comment": null}}, {"_type"... | def __init__(self, controller, master):
self.master = master
container = tk.Frame(master)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)
container.grid_columnconfigure(0, weight=1)
self.menu = Menu(controller, maste... | |
11,817 | [
0.0025982533115893602,
0.021604100242257118,
0.026477986946702003,
-0.05572129786014557,
0.007114950567483902,
-0.019172919914126396,
-0.015831485390663147,
0.02392006106674671,
0.019253574311733246,
0.02809109166264534,
0.020244482904672623,
-0.03687099739909172,
0.04175640642642975,
0.01... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "controller", "annotati... | class Menu:
def __init__(self, controller, master):
self.controller = controller
self.menubar = tk.Menu(master)
self.filemenu = tk.Menu(self.menubar, tearoff=0)
self.filemenu.add_command(label="Login...", command=lambda: self.pressed('login'))
self.filemenu.add_sepa... | |
11,818 | [
0.0018390630139037967,
0.025847764685750008,
0.025455141440033913,
-0.020318306982517242,
-0.0038308133371174335,
-0.016871938481926918,
-0.0026284013874828815,
0.04288329556584358,
0.010633574798703194,
0.048118285834789276,
-0.001971301157027483,
-0.008741343393921852,
0.03633955866098404,... | 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": "controller", "annotation": null, "type_comment": null}}, {"_type"... | def __init__(self, controller, master):
self.controller = controller
self.menubar = tk.Menu(master)
self.filemenu = tk.Menu(self.menubar, tearoff=0)
self.filemenu.add_command(label="Login...", command=lambda: self.pressed('login'))
self.filemenu.add_separator()
se... | |
11,819 | [
-0.008808822371065617,
0.020903605967760086,
-0.028907589614391327,
-0.008547943085432053,
0.01293292734771967,
0.012022626586258411,
-0.01311054639518261,
-0.025466211140155792,
-0.02950705587863922,
0.03781077265739441,
0.004396085161715746,
-0.0426953099668026,
0.046669550240039825,
-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": "url", "annotation": nu... | class MyUrl:
def __init__(self, url):
self.url = url
self.query = QUrlQuery()
@classmethod
def fromLocalFile(cls, filename):
return cls(QUrl.fromLocalFile(filename))
def addQueryItem(self, k, v):
self.query.addQueryItem(k, v)
de... | |
11,820 | [
0.021517081186175346,
-0.009068239480257034,
-0.0005735461600124836,
-0.008108878508210182,
-0.01298562716692686,
0.016491860151290894,
-0.04892737418413162,
-0.02985437959432602,
-0.010815645568072796,
0.020854664966464043,
0.004671170841902494,
0.015384027734398842,
-0.005473493132740259,
... | 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 tags(self):
extra_tags = force_text(self.extra_tags, strings_only=True)
if extra_tags and self.level_tag:
return ' '.join([extra_tags, self.level_tag])
elif extra_tags:
return extra_tags
elif self.level_tag:
return self.level_tag
return '' | |
11,821 | [
0.02511299028992653,
-0.028339922428131104,
-0.025376413017511368,
0.006530694663524628,
-0.0005954456864856184,
0.013588234782218933,
-0.02926190197467804,
-0.051016248762607574,
-0.019789651036262512,
0.016496863216161728,
-0.024673951789736748,
-0.0006280305678956211,
0.000746365112718194... | 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": "tag", "annotation": nu... | class MessageLogger(QObject):
def __init__(self, tag=None):
QObject.__init__(self)
self.log = []
self.tag = tag
def __enter__(self):
QgsApplication.messageLog().messageReceived.connect(self.logMessage)
return self
def __exit__(self, type, value, traceback):
... | |
11,822 | [
0.01620851643383503,
-0.015618746168911457,
-0.06515945494174957,
-0.02165880799293518,
-0.0187506303191185,
-0.05287596583366394,
-0.03955528885126114,
-0.004250414203852415,
-0.00025389360962435603,
0.040084049105644226,
0.0099854227155447,
-0.05401483178138733,
-0.008048332296311855,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "s", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},... | def normalize_query_items_order(s):
split_url = s.split('?')
urlstr = split_url[0]
if len(split_url) == 2:
items_list = split_url[1].split('&')
items_map = {}
for item in items_list:
split_item = item.split('=')
items_map[split_item[0]] = split_item[1]
... | |
11,823 | [
0.00046877344720996916,
0.013156839646399021,
0.010841106064617634,
-0.07458073645830154,
0.01992507465183735,
-0.01621556095778942,
-0.02642214484512806,
-0.009707643650472164,
-0.0378543883562088,
0.05896173417568207,
0.03319038078188896,
-0.022799404338002205,
-0.018829574808478355,
-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": "layer", "annotation": null, "type_comment": null}}, {"_type": "ar... | def layerData(self, layer, request={}, offset=0):
# Retrieve the data for a layer
first = True
data = {}
fields = []
fieldTypes = []
fr = QgsFeatureRequest()
if request:
if 'exact' in request and request['exact']:
fr.setFlags(QgsFeature... | |
11,824 | [
-0.042822666466236115,
0.041011106222867966,
0.04509257525205612,
-0.07302989065647125,
0.004689868073910475,
-0.03509625419974327,
-0.023113764822483063,
0.0021689615678042173,
-0.018704906105995178,
0.04120754078030586,
-0.0054756049066782,
0.020745640620589256,
0.015780217945575714,
-0.... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "testname", "annotation": null, "type_comment": null}}, {"_type": ... | def delimitedTextData(self, testname, filename, requests, verbose, **params):
# Retrieve the data for a delimited text url
# Create a layer for the specified file and query parameters
# and return the data for the layer (fields, data)
filepath = os.path.join(unitTestDataPath("delimitedt... | |
11,825 | [
0.04220615327358246,
-0.006519649643450975,
0.03444262221455574,
-0.02723669447004795,
0.02803020365536213,
0.03249101713299751,
0.058205027133226395,
-0.037423644214868546,
-0.013736301101744175,
0.03832438588142395,
0.0032249747309833765,
-0.039632607251405716,
-0.020877890288829803,
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": "record1", "annotation": null, "type_comment": null}}, {"_type": "... | def recordDifference(self, record1, record2):
# Compare a record defined as a dictionary
for k in list(record1.keys()):
if k not in record2:
return "Field {0} is missing".format(k)
r1k = record1[k]
r2k = record2[k]
if k == geomkey:
... | |
11,826 | [
0.008463931269943714,
-0.012350691482424736,
0.021760743111371994,
-0.06612606346607208,
0.007409136742353439,
-0.025673072785139084,
-0.05988679081201553,
-0.007262104656547308,
-0.005299546290189028,
0.046129707247018814,
0.022169874981045723,
0.012600007466971874,
0.0007035962771624327,
... | 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": "testname", "annotation": null, "type_comment": null}}, {"_type": ... | def printWanted(self, testname, result):
# Routine to export the result as a function definition
print()
print(("def {0}():".format(testname)))
data = result['data']
log = result['log']
fields = result['fields']
prefix = ' '
# Dump the data for a layer... | |
11,827 | [
-0.006212559062987566,
0.03683066740632057,
-0.0011877432698383927,
-0.08323521167039871,
-0.0008072239579632878,
-0.006670326925814152,
0.038714054971933365,
-0.006601661443710327,
0.0290878564119339,
0.03955111280083656,
0.05974519997835159,
-0.02252216264605522,
-0.0020942864939570427,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_029_file_watcher(self):
# Testing file watcher
(filehandle, filename) = tempfile.mkstemp()
if os.name == "nt":
filename = filename.replace("\\", "/")
with os.fdopen(filehandle, "w") as f:
f.write("id,name\n1,rabbit\n2,pooh\n")
def appendfile(laye... | |
11,828 | [
-0.00830555148422718,
0.03444560989737511,
0.043498799204826355,
-0.06437822431325912,
-0.011411637999117374,
-0.021382378414273262,
-0.021762993186712265,
-0.030748212710022926,
-0.0052096606232225895,
0.049072083085775375,
0.008557029068470001,
0.01678781770169735,
0.007924937643110752,
... | 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": "file", "annotation": null, "type_comment": null}}, {"_type": "arg... | def runTest(self, file, requests, **params):
testname = inspect.stack()[1][3]
verbose = not rebuildTests
if verbose:
print(("Running test:", testname))
result = self.delimitedTextData(testname, file, requests, verbose, **params)
if rebuildTests:
self.print... | |
11,829 | [
-0.056631118059158325,
0.018451154232025146,
0.08540709316730499,
-0.05999215319752693,
-0.04337114840745926,
-0.022537343204021454,
-0.007809799630194902,
0.025138691067695618,
-0.03816845268011093,
0.05985402688384056,
0.04548906162381172,
0.01020971592515707,
-0.0014776462921872735,
-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_032_filter_rect_wkt_create_spatial_index(self):
# Filter extents on WKT layer building spatial index
filename = 'testextw.txt'
params = {'delimiter': '|', 'type': 'csv', 'wktField': 'wkt'}
requests = [
{'extents': [10, 30, 30, 50]},
{},
lambda... | |
11,830 | [
-0.0074189999140799046,
-0.04741514101624489,
0.06553769111633301,
-0.051300372928380966,
-0.038877859711647034,
0.002228575525805354,
0.02552238292992115,
0.029036981984972954,
-0.01077384501695633,
0.030954036861658096,
0.00734231760725379,
-0.049971215426921844,
0.019170543178915977,
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_033_reset_subset_string(self):
# CSV file parsing
filename = 'test.csv'
params = {'geomType': 'none', 'type': 'csv'}
requests = [
{},
lambda layer: layer.dataProvider().setSubsetString("id % 2 = 1", True),
{},
lambda layer: layer.d... | |
11,831 | [
-0.050324343144893646,
0.03229289874434471,
0.07981455326080322,
-0.03990727663040161,
-0.0045636664144694805,
-0.024889342486858368,
0.008811100386083126,
-0.003163873217999935,
-0.022012248635292053,
0.029018964618444443,
0.018143054097890854,
0.0040521142072975636,
0.025645820423960686,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_045_Z(self):
# Create test layer
srcpath = os.path.join(TEST_DATA_DIR, 'provider')
basetestfile = os.path.join(srcpath, 'delimited_xyzm.csv')
url = MyUrl.fromLocalFile(basetestfile)
url.addQueryItem("crs", "epsg:4326")
url.addQueryItem("type", "csv")
url... | |
11,832 | [
-0.041825272142887115,
0.05928827077150345,
0.07561402767896652,
-0.03358657658100128,
-0.015213784761726856,
-0.020546190440654755,
0.014897883869707584,
0.0031479517929255962,
-0.0192573145031929,
0.03037702478468418,
0.01587085798382759,
0.0018306453712284565,
0.01549177709966898,
0.014... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_044_ZM(self):
# Create test layer
srcpath = os.path.join(TEST_DATA_DIR, 'provider')
basetestfile = os.path.join(srcpath, 'delimited_xyzm.csv')
url = MyUrl.fromLocalFile(basetestfile)
url.addQueryItem("crs", "epsg:4326")
url.addQueryItem("type", "csv")
ur... | |
11,833 | [
-0.0587516613304615,
0.022697245702147484,
0.09282862395048141,
-0.046986404806375504,
-0.008419744670391083,
-0.01636688970029354,
0.013344736769795418,
-0.0077668107114732265,
-0.016230084002017975,
0.03275865316390991,
0.015434126369655132,
-0.003939371090382338,
0.02156549133360386,
-0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_046_M(self):
# Create test layer
srcpath = os.path.join(TEST_DATA_DIR, 'provider')
basetestfile = os.path.join(srcpath, 'delimited_xyzm.csv')
url = MyUrl.fromLocalFile(basetestfile)
url.addQueryItem("crs", "epsg:4326")
url.addQueryItem("type", "csv")
url... | |
11,834 | [
-0.06238802149891853,
-0.007357976399362087,
0.08329515159130096,
-0.06495974212884903,
0.010459518060088158,
0.001359528978355229,
0.008578352630138397,
-0.018514001742005348,
-0.018287785351276398,
0.027622176334261894,
0.01621612347662449,
0.004625523928552866,
0.030003398656845093,
-0.... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_047_datetime(self):
# Create test layer
srcpath = os.path.join(TEST_DATA_DIR, 'provider')
basetestfile = os.path.join(srcpath, 'delimited_datetime.csv')
url = MyUrl.fromLocalFile(basetestfile)
url.addQueryItem("crs", "epsg:4326")
url.addQueryItem("type", "csv")
... | |
11,835 | [
-0.04011750966310501,
0.02429852820932865,
0.09562646597623825,
-0.04382285848259926,
-0.018621744588017464,
-0.002011516597121954,
0.014453229494392872,
-0.003283745376393199,
-0.010088758543133736,
0.0037973872385919094,
0.017944807186722755,
0.011905803345143795,
0.07063911855220795,
-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 testSpatialIndex(self):
srcpath = os.path.join(TEST_DATA_DIR, 'provider')
basetestfile = os.path.join(srcpath, 'delimited_xyzm.csv')
url = MyUrl.fromLocalFile(basetestfile)
url.addQueryItem("crs", "epsg:4326")
url.addQueryItem("type", "csv")
url.addQueryItem("xField"... | |
11,836 | [
-0.016824910417199135,
-0.013238374143838882,
0.025204461067914963,
-0.007896958850324154,
-0.0065588634461164474,
0.021080493927001953,
0.008878595195710659,
0.017592670395970345,
0.017461054027080536,
0.016693294048309326,
0.016835877671837807,
-0.01616683043539524,
0.023625068366527557,
... | 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 testEncodeDecodeUri(self):
registry = QgsProviderRegistry.instance()
# URI decoding
filename = '/home/to/path/test.csv'
parts = {'path': filename}
uri = registry.encodeUri('delimitedtext', parts)
self.assertEqual(uri, 'file://' + filename)
# URI encoding / d... | |
11,837 | [
0.00898535642772913,
0.040973227471113205,
0.07772932201623917,
-0.02954385243356228,
-0.033185917884111404,
0.006535349413752556,
0.03896050527691841,
-0.0026956070214509964,
0.015023516491055489,
0.05324123427271843,
0.029999110847711563,
0.01834210753440857,
0.026021592319011688,
0.0623... | 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 testCREndOfLineAndWorkingBuffer(self):
# Test CSV file with \r (CR) endings
# Test also that the logic to refill the buffer works properly
os.environ['QGIS_DELIMITED_TEXT_FILE_BUFFER_SIZE'] = '17'
try:
basetestfile = os.path.join(unitTestDataPath("delimitedtext"), 'test_c... | |
11,838 | [
-0.00769988726824522,
0.04010053351521492,
0.07701215893030167,
-0.02800925262272358,
-0.026906421408057213,
-0.004760111216455698,
0.02040901966392994,
-0.016197001561522484,
0.015705378726124763,
0.006616986822336912,
0.020422305911779404,
0.010390529409050941,
0.003311815205961466,
0.03... | 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 testSaturationOfWorkingBuffer(self):
# 10 bytes is sufficient to detect the header line, but not enough for the
# first record
os.environ['QGIS_DELIMITED_TEXT_FILE_BUFFER_SIZE'] = '10'
try:
basetestfile = os.path.join(unitTestDataPath("delimitedtext"), 'test_cr_end_of_lin... | |
11,839 | [
-0.006902727298438549,
0.004187739919871092,
0.0510212704539299,
-0.026688838377594948,
-0.029941700398921967,
-0.0064064739271998405,
-0.022885294631123543,
0.03419347107410431,
-0.029352599754929543,
0.028942789882421494,
-0.015047688968479633,
-0.03731827065348625,
0.02370491251349449,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_excludes_multi_orgs(self):
_, _, exclude_dictionary = LmsSearchFilterGenerator.generate_field_filters(user=self.user)
self.assertIn('org', exclude_dictionary)
exclude_orgs = exclude_dictionary['org']
self.assertEqual(4, len(exclude_orgs))
self.assertIn('TestSite1', exclu... | |
11,840 | [
0.016716819256544113,
0.07053602486848831,
-0.03825978934764862,
-0.06791549175977707,
-0.0005763126537203789,
0.02961202710866928,
0.031075159087777138,
0.0018466571345925331,
0.022045237943530083,
0.04904765263199806,
0.08023200184106827,
-0.004151907749474049,
-0.04891662299633026,
0.03... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "layer", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [... | def deletefile(layer):
try:
os.remove(filename)
except:
open(filename, "w").close()
assert os.path.getsize(filename) == 0, "removal and truncation of {} failed".format(filename)
# print "Deleted file - sleeping"
time.sleep(1... | |
11,841 | [
0.04213755950331688,
-0.023903796449303627,
0.057088036090135574,
0.044536419212818146,
-0.014235662296414375,
0.003973870072513819,
-0.005236906465142965,
0.03700060769915581,
-0.018112609162926674,
-0.015386630780994892,
0.08369357883930206,
-0.009189574047923088,
-0.02505476586520672,
-... | 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(QuotaEnforcementTestCase, self).setUp()
self.quota_behaviors = quota_behaviors.QuotaBehaviors(self.client)
self.secret_behaviors = secret_behaviors.SecretBehaviors(self.client)
self.container_behaviors = container_behaviors.ContainerBehaviors(
self.clie... | |
11,842 | [
0.0697569027543068,
0.004184081219136715,
0.04925157129764557,
0.013718695379793644,
-0.02862505242228508,
0.017257440835237503,
-0.0022813996765762568,
0.06893280893564224,
0.011476682499051094,
-0.0016845394857227802,
0.09491592645645142,
-0.017354393377900124,
-0.029037097468972206,
-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 tearDown(self):
self.quota_behaviors.delete_all_created_quotas()
self.consumer_behaviors.delete_all_created_consumers()
self.container_behaviors.delete_all_created_containers()
self.secret_behaviors.delete_all_created_secrets()
for secret_ref in self.order_secrets:
... | |
11,843 | [
0.015772860497236252,
0.023731643334031105,
0.008899366483092308,
-0.020393088459968567,
0.032186560332775116,
-0.06143767014145851,
0.04101357236504555,
-0.013809004798531532,
0.006465218961238861,
0.011803804896771908,
0.0035065156407654285,
-0.028961701318621635,
-0.026357008144259453,
... | 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": "a_file", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, a_file, node):
super(SiteResource, self).__init__()
self.node = node
self.file = a_file
self.source_file = self.file
self.prerendered = False
if self.node.target_folder:
self.target_file = File(
self.node.target_folde... | |
11,844 | [
-0.006067794747650623,
0.017181064933538437,
-0.0020001342054456472,
-0.034504540264606476,
0.059609852731227875,
-0.04361895099282265,
0.009673885069787502,
-0.023233599960803986,
0.00032233569072559476,
0.005406592972576618,
-0.011555766686797142,
-0.027261843904852867,
-0.0004421784542500... | 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": "a_file", "annotation":... | class SiteResource(object):
def __init__(self, a_file, node):
super(SiteResource, self).__init__()
self.node = node
self.file = a_file
self.source_file = self.file
self.prerendered = False
if self.node.target_folder:
self.target_file = File(
... | |
11,845 | [
0.03802010044455528,
0.03049798309803009,
0.025842459872364998,
-0.013718703761696815,
0.031187688931822777,
-0.028515074402093887,
0.025023432448506355,
-0.044572316110134125,
0.026014886796474457,
0.08116989582777023,
0.027502067387104034,
-0.02189819887280464,
-0.02034635655581951,
-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": "a_file", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, a_file, node):
if not node:
raise ValueError("Page cannot exist without a node")
super(Page, self).__init__(a_file, node)
listing_pages = self.node.site.settings.LISTING_PAGE_NAMES
self.listing = a_file.name_without_extension in listing_pages
self.e... | |
11,846 | [
0.006217372138053179,
0.023358553647994995,
0.026928745210170746,
-0.018216503784060478,
-0.007993328385055065,
-0.004161161370575428,
0.016461869701743126,
0.048301152884960175,
0.002420236123725772,
0.04081958904862404,
0.014999676495790482,
-0.020166095346212387,
0.02892707660794258,
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 get_context_text(self):
start = re.compile(r'.*?{%\s*hyde\s+(.*?)(%}|$)')
end = re.compile(r'(.*?)(%})')
fin = open(self.file.path, 'r')
started = False
text = ''
matcher = start
for line in fin:
match = matcher.match(line)
if match:
... | |
11,847 | [
-0.003429580479860306,
0.019875196740031242,
-0.030816061422228813,
-0.04410139471292496,
0.016780918464064598,
-0.03666667640209198,
0.011447776108980179,
-0.008860409259796143,
-0.020255381241440773,
0.056774210184812546,
0.002056692261248827,
-0.033625200390815735,
-0.029041865840554237,
... | 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": "folder", "annotation":... | class SiteNode(object):
def __init__(self, folder, parent=None):
super(SiteNode, self).__init__()
self.folder = folder
self.parent = parent
self.site = self
if self.parent:
self.site = self.parent.site
self.children = []
self.resources = []
de... | |
11,848 | [
0.007030787877738476,
-0.022723041474819183,
-0.04773000255227089,
-0.012455091811716557,
-0.006043671164661646,
0.0132776889950037,
0.024135973304510117,
-0.0021847218740731478,
0.03344583883881569,
0.08067260682582855,
0.013974477536976337,
-0.008027582429349422,
-0.037723347544670105,
-... | 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": "page_url", "annotation": null, "type_comment": null}}], "kwarg": ... | def _make_clean_url(self, page_url):
if self.node.listing_page == self:
page_url = self.node.url
else:
page_url = url.clean_url(page_url)
if self.node.site.settings.APPEND_SLASH or not page_url:
page_url += "/"
return page_url | |
11,849 | [
0.02836790680885315,
0.009961881674826145,
-0.01609722338616848,
-0.007823251187801361,
0.020880399271845818,
-0.036039385944604874,
0.040840957313776016,
-0.005739809945225716,
-0.02601311355829239,
0.07741384953260422,
0.0017488483572378755,
-0.01622600108385086,
-0.044741082936525345,
-... | 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": "folder", "annotation": null, "type_comment": null}}, {"_type": "a... | def __init__(self, folder, parent=None):
super(SiteNode, self).__init__()
self.folder = folder
self.parent = parent
self.site = self
if self.parent:
self.site = self.parent.site
self.children = []
self.resources = [] | |
11,850 | [
0.018807394430041313,
0.026292875409126282,
-0.03747671842575073,
-0.04481426253914833,
-0.016637690365314484,
-0.06907550990581512,
0.031598787754774094,
0.03268364071846008,
0.0051826355047523975,
0.05203346163034439,
-0.01154874637722969,
-0.024892428889870644,
0.01840304024517536,
-0.0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def simple_dict(self):
ress = []
for resource in self.walk_resources():
fragment = Folder(
resource.node.folder.get_fragment(
self.site.folder.path)).child(resource.file.name)
res = dict(name=resource.file.name, path=fragment)
ress.... | |
11,851 | [
0.03310178220272064,
-0.019173109903931618,
-0.05184616148471832,
-0.011834884062409401,
0.008958418853580952,
-0.03146663308143616,
0.0039059105329215527,
0.007727072108536959,
-0.021017637103796005,
0.039323318749666214,
-0.028096631169319153,
-0.007572530768811703,
-0.010105016641318798,
... | 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": "folder", "annotation": null, "type_comment": null}}], "kwarg": nu... | def add_child(self, folder):
if ContentNode.is_content(self.site, folder):
node = ContentNode(folder, parent=self)
elif LayoutNode.is_layout(self.site, folder):
node = LayoutNode(folder, parent=self)
elif MediaNode.is_media(self.site, folder):
node = MediaNode... | |
11,852 | [
0.03852413222193718,
-0.009416508488357067,
0.04078228771686554,
-0.026397837325930595,
-0.0031952899880707264,
0.008806806057691574,
-0.019431428983807564,
0.016834549605846405,
-0.049498770385980606,
0.06729303300380707,
-0.011663373559713364,
-0.021068591624498367,
-0.005382878240197897,
... | 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 ancestors(self):
node = self
ancestors = []
while not node.isroot:
ancestors.append(node)
node = node.parent
ancestors.reverse()
return ancestors | |
11,853 | [
0.009574925526976585,
0.05769225209951401,
0.026950787752866745,
-0.023044541478157043,
0.030140502378344536,
-0.022154657170176506,
0.0046401116997003555,
-0.03097260184586048,
0.017439424991607666,
-0.00892195850610733,
-0.0006356317899189889,
-0.04382392019033432,
-0.0029051261954009533,
... | 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": "a_file", "annotation": null, "type_comment": null}}], "kwarg": nu... | def _add_resource(self, a_file):
page = Page(a_file, self)
if page.listing and not self.listing_page:
self.listing_page = page
self.resources.append(page)
page.node.sort()
if not page.module == self.site:
page.module.flatten_and_sort()
return page | |
11,854 | [
0.04614447429776192,
0.04798511788249016,
0.008459463715553284,
-0.04301966354250908,
0.02745981514453888,
-0.025790395215153694,
-0.004818309098482132,
-0.012777482159435749,
-0.021659651771187782,
0.0014861581148579717,
-0.005725253839045763,
-0.026924744248390198,
-0.01202838309109211,
... | 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 sort(self):
self.resources.sort(key=operator.attrgetter("created"), reverse=True)
prev = None
for page in self.resources:
page.prev = None
page.next = None
if page.display_in_list:
if prev:
prev.next = page
... | |
11,855 | [
-0.01582430489361286,
0.003631192957982421,
-0.032028473913669586,
-0.010456237010657787,
0.014704707078635693,
0.01037626527249813,
-0.009706506505608559,
-0.027650048956274986,
-0.030169140547513962,
0.03944580256938934,
-0.0560598224401474,
-0.034087732434272766,
-0.008546924218535423,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "site", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "folder", "annotation":... | class LayoutNode(SiteNode):
@staticmethod
def is_layout(site, folder):
return (site.layout_folder.same_as(folder) or
site.layout_folder.is_ancestor_of(folder))
@property
def fragment(self):
return self.folder.get_fragment(self.site.layout_folder)
@property
def ... | |
11,856 | [
0.03662244603037834,
0.049900248646736145,
-0.018148504197597504,
-0.040375810116529465,
0.014362594112753868,
-0.022086285054683685,
0.010538715869188309,
-0.036166831851005554,
-0.021782543510198593,
0.054022446274757385,
0.0024339931551367044,
-0.022390024736523628,
0.002283478854224086,
... | 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 flatten_and_sort(self):
flattened_pages = []
prev_in_module = None
for page in self.walk_pages():
flattened_pages.append(page)
flattened_pages.sort(key=operator.attrgetter("created"), reverse=True)
for page in flattened_pages:
page.next_in_module = Non... | |
11,857 | [
-0.011276540346443653,
0.01634160429239273,
-0.04581485316157341,
-0.019926751032471657,
0.009129620157182217,
0.006888903211802244,
0.0164458230137825,
-0.018259240314364433,
-0.021469198167324066,
0.019270168617367744,
-0.022386329248547554,
-0.03879046440124512,
-0.027430549263954163,
-... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "site", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "folder", "annotation":... | class MediaNode(SiteNode):
@staticmethod
def is_media(site, folder):
return (site.media_folder.same_as(folder) or
site.media_folder.is_ancestor_of(folder))
@property
def fragment(self):
return self.folder.get_fragment(self.site.media_folder)
@property
def url(s... | |
11,858 | [
0.004450410138815641,
0.03233283385634422,
0.005320671014487743,
-0.06288178265094757,
-0.02097298391163349,
-0.014828505925834179,
0.037709251046180725,
0.006578058935701847,
-0.011985446326434612,
0.050146862864494324,
0.01969701237976551,
-0.015262087807059288,
-0.05723283067345619,
0.0... | 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": "settings", "annotation... | class SiteInfo(SiteNode):
def __init__(self, settings, site_path):
super(SiteInfo, self).__init__(Folder(site_path))
self.settings = settings
self.m = None
self._stop = Event()
self.nodemap = {site_path:self}
self.resourcemap = {}
@property
def name(self):
... | |
11,859 | [
0.025991924107074738,
0.050441425293684006,
-0.01742521859705448,
-0.0325784906744957,
-0.04256255552172661,
-0.024324437603354454,
0.009733944199979305,
0.013079335913062096,
0.015507611446082592,
0.06899219751358032,
0.04452185332775116,
-0.0083217928186059,
-0.006143640261143446,
-0.024... | 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": "node", "annotation": null, "type_comment": null}}], "kwarg": null... | def remove_node(self, node):
for node in node.walk():
if node.folder.path in self.nodemap:
del self.nodemap[node.folder.path]
for resource in node.walk_resources():
self.resource_removed(resource)
if node.parent and node in node.parent.children:
... | |
11,860 | [
0.038854461163282394,
0.05682578310370445,
-0.009122153744101524,
-0.028139909729361534,
0.017129629850387573,
0.04488281533122063,
0.03712557256221771,
0.05960110202431679,
0.021292608231306076,
-0.005058700684458017,
0.018085068091750145,
0.01905187964439392,
-0.05109316110610962,
0.0260... | 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": "queue", "annotation": null, "type_comment": null}}, {"_type": "ar... | def monitor(self, queue=None, waittime=1):
if self.m and self.m.isAlive():
raise "A monitor is currently running."
self._stop.clear()
self.m = Thread(target=self.__monitor_thread__,
kwargs={"waittime":waittime, "queue": queue})
self.m.start()
... | |
11,861 | [
0.008755951188504696,
0.01855720579624176,
-0.025652969256043434,
-0.016946207731962204,
-0.0164543017745018,
0.04537845402956009,
0.05027293041348457,
0.04461599886417389,
0.0351959727704525,
-0.0077229454182088375,
0.039327993988990784,
0.01711837574839592,
-0.05858616530895233,
0.026833... | 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": "queue", "annotation": null, "type_comment": null}}, {"_type": "ar... | def __monitor_thread__(self, queue, waittime):
while not self._stop.isSet():
try:
self.refresh(queue)
except:
if queue:
queue.put({"exception": True})
raise
if self._stop.isSet():
break
... | |
11,862 | [
0.01724284142255783,
0.02702433057129383,
-0.020960334688425064,
-0.011587505228817463,
-0.020775778219103813,
0.015094077214598656,
-0.011528183706104755,
0.03161187469959259,
-0.011501817964017391,
0.07013142853975296,
0.032060083001852036,
-0.013788999058306217,
-0.0446099191904068,
0.0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "queue", "annotation": null, "type_comment": null}}], "kwarg": nul... | def refresh(self, queue=None):
site = self
# Have to poll for changes since there is no reliable way
# to get notification in a platform independent manner
class Visitor(object):
def visit_folder(self, folder):
return folder.allow(**site.settings.FILTER)
... | |
11,863 | [
0.021056948229670525,
0.019033638760447502,
-0.033802580088377,
-0.041338495910167694,
-0.004616051446646452,
-0.028665557503700256,
-0.02585473284125328,
-0.01621069945394993,
0.018960945308208466,
0.012236776761710644,
0.04904403164982796,
-0.033124104142189026,
0.0021232625003904104,
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": "a_file", "annotation": null, "type_comment": null}}], "kwarg": nu... | def visit_file(self, a_file):
if not a_file.allow(**site.settings.FILTER):
return
resource = site.find_resource(a_file)
change = None
if not resource:
resource = site.find_and_add_resource(a_file)
ch... | |
11,864 | [
0.008788928389549255,
-0.0063273110426962376,
-0.07714658975601196,
-0.008101826533675194,
-0.02093569189310074,
-0.016860879957675934,
-0.04067642614245415,
-0.010581367649137974,
0.015964660793542862,
0.05128766596317291,
0.02521364763379097,
-0.044739287346601486,
0.0024586294312030077,
... | 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": "folder", "annotation":... | class Visitor(object):
def visit_folder(self, folder):
return folder.allow(**site.settings.FILTER)
def visit_file(self, a_file):
if not a_file.allow(**site.settings.FILTER):
return
resource = site.find_resource(a_file)
... | |
11,865 | [
0.009594001807272434,
0.04070035740733147,
0.018510067835450172,
-0.04263731837272644,
0.010683541186153889,
-0.0007199284736998379,
0.04120881110429764,
-0.008038381114602089,
0.02202080748975277,
0.013473973609507084,
-0.0007535982294939458,
-0.010719859041273594,
0.0564623661339283,
-0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _RecordWebServerTestTrace(args):
with common_util.TemporaryDirectory() as out_path:
sandwich_runner = SandwichRunner()
sandwich_runner.android_device = _GetAndroidDeviceFromArgs(args)
# Reuse the WPR's forwarding to access the webpage from Android.
sandwich_runner.wpr_record = True
sandwich_ru... | |
11,866 | [
0.012719850055873394,
0.039278313517570496,
0.04127263277769089,
-0.058272965252399445,
-0.023080570623278618,
-0.009959423914551735,
0.07675687968730927,
0.010920100845396519,
0.02382235787808895,
0.0163315087556839,
0.013157627545297146,
0.0029869151767343283,
0.022533347830176353,
-0.02... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _RunAllMain(args):
builder = sandwich_task_builder.SandwichTaskBuilder(
output_directory=args.output,
android_device=_GetAndroidDeviceFromArgs(args),
job_path=args.job)
if args.wpr_archive_path:
builder.OverridePathToWprArchive(args.wpr_archive_path)
else:
builder.PopulateWprRecordin... | |
11,867 | [
0.04654527083039284,
0.035285837948322296,
0.05888824537396431,
-0.0363929383456707,
-0.0055914390832185745,
0.006954702083021402,
0.017489809542894363,
-0.0216708742082119,
0.0025395555421710014,
0.04562661424279213,
0.04091555252671242,
0.003857180243358016,
0.030386336147785187,
0.00141... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "command_line_args", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "pos... | def main(command_line_args):
logging.basicConfig(level=logging.INFO)
devil_chromium.Initialize()
args = _ArgumentParser().parse_args(command_line_args)
OPTIONS.SetParsedArgs(args)
if args.subcommand == 'record-test-trace':
return _RecordWebServerTestTrace(args)
if args.subcommand == 'run':
return ... | |
11,868 | [
0.0441584587097168,
0.0015579626196995378,
-0.02859942801296711,
-0.03231852874159813,
0.04924280196428299,
0.0049578226171433926,
-0.006017060950398445,
-0.04032166302204132,
-0.007120433729141951,
-0.010215763002634048,
0.040886588394641876,
-0.018972130492329597,
0.0006840912392362952,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "data", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def loads(data):
if data:
dic = json.loads(data)
dic = dict(map(lambda k: (str(k), dic.get(k)), dic.keys()))
else:
dic = {
'VERSION': SERIALIZATION_VERSION,
'query': {
'type': 3, 'appName': '', 'classPath': 'spark.jobserver.WordCountExample', 'autoContext': Tr... | |
11,869 | [
0.017240073531866074,
0.021008722484111786,
0.026655714958906174,
-0.03455193340778351,
0.04192173480987549,
0.03591582551598549,
-0.040486060082912445,
0.013459460809826851,
0.025746453553438187,
-0.0011320902267470956,
0.05000937357544899,
-0.05039222165942192,
0.027014633640646935,
0.02... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "With", "_fields": {"body": [{"_type": "Expr", "_fields": {"val... | def test_check_elasticsearch():
with pytest.raises(OpenShiftCheckExceptionList) as excinfo:
canned_elasticsearch().check_elasticsearch([])
assert_error_in_list('NoRunningPods', excinfo.value)
# canned oc responses to match so all the checks pass
def exec_oc(cmd, args, **_):
if '_cat/mas... | |
11,870 | [
0.03806256502866745,
0.033810533583164215,
0.019145585596561432,
-0.028872685506939888,
0.01296184677630663,
0.030107147991657257,
-0.021191591396927834,
0.006406627129763365,
0.03579938784241676,
0.03045005351305008,
0.06414628028869629,
-0.014847829937934875,
0.040942978113889694,
-0.003... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cmd", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": {"_ty... | def exec_oc(cmd, args, **_):
if '_cat/master' in cmd:
return 'name logging-es'
elif '/_nodes' in cmd:
return json.dumps(es_node_list)
elif '_cluster/health' in cmd:
return '{"status": "green"}'
elif ' df ' in cmd:
return 'IUse% Use%\n 3% 4... | |
11,871 | [
0.00031334799132309854,
0.021752117201685905,
0.07711666822433472,
-0.0431351363658905,
-0.008987512439489365,
0.002199203008785844,
0.015034551732242107,
-0.04394714906811714,
0.017003068700432777,
0.045866455882787704,
0.013336705043911934,
-0.02415124699473381,
0.055118486285209656,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_no_mutable_default_args(self):
self.assertEqual(1, len(list(checks.no_mutable_default_args(
"def get_info_from_bdm(virt_type, bdm, mapping=[])"))))
self.assertEqual(0, len(list(checks.no_mutable_default_args(
"defined = []"))))
self.assertEqual(0, len(list(chec... | |
11,872 | [
0.05604051426053047,
0.07973359525203705,
0.01785256899893284,
-0.022806361317634583,
-0.02442609705030918,
0.05282468721270561,
0.05041281878948212,
-0.007773552555590868,
0.008636623620986938,
0.041049085557460785,
0.031496189534664154,
0.015417053364217281,
0.031141500920057297,
0.00407... | 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": "code", "annotation": null, "type_comment": null}}, {"_type": "arg... | def _run_check(self, code, checker, filename=None):
pycodestyle.register_check(checker)
lines = textwrap.dedent(code).strip().splitlines(True)
checker = pycodestyle.Checker(filename=filename, lines=lines)
checker.check_all()
checker.report._deferred_print.sort()
return ... | |
11,873 | [
0.03076889179646969,
-0.008798377588391304,
0.018067188560962677,
-0.03547322750091553,
-0.0021757548674941063,
-0.014125718735158443,
-0.0028400830924510956,
-0.018931768834590912,
-0.027946291491389275,
-0.02183065563440323,
0.024983830749988556,
-0.07969397306442261,
-0.014952155761420727... | 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": "orm", "annotation": nu... | class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Order.cart_pk'
db.add_column('shop_order', 'cart_pk',
self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True),
keep_default=False)
def backwards(self, ... | |
11,874 | [
0.003352693049237132,
0.0033856434747576714,
0.005865153390914202,
-0.002384777879342437,
0.050260189920663834,
-0.010703356005251408,
-0.003105565905570984,
0.03385094180703163,
0.044153403490781784,
-0.011488671414554119,
-0.0063264574855566025,
-0.049161847680807114,
0.016453184187412262,... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ObjDictWrapper", "value": {"_type": "Name", "_fields": {"id"... | class DummyBackend(object):
_user = utils.ObjDictWrapper(
id="1",
nam='test_user',
email='test@example.com',
password='password',
token=utils.ObjDictWrapper(
expires=datetime.datetime.now() + datetime.timedelta(30)),
project_id='1',
enabled=True,
... | |
11,875 | [
0.04562930390238762,
0.01991894654929638,
0.05300019308924675,
-0.025873320177197456,
-0.00433415686711669,
-0.02020726352930069,
0.019041460007429123,
-0.018352005630731583,
-0.039511967450380325,
-0.0012559026945382357,
0.0044125039130449295,
-0.06488386541604996,
-0.007032428402453661,
... | 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": "orm", "annotation": nu... | class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field sites on 'SocialApp'
db.create_table('socialaccount_socialapp_sites', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('socialapp', models.ForeignKey(o... | |
11,876 | [
0.061917804181575775,
0.023624775931239128,
0.06391801685094833,
0.008473138324916363,
-0.007561928126960993,
-0.03018103912472725,
0.045049313455820084,
-0.0022655227221548557,
-0.027580758556723595,
-0.00949547067284584,
-0.0053255753591656685,
-0.05147222802042961,
0.015423889271914959,
... | 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": "orm", "annotation": null, "type_comment": null}}], "kwarg": null,... | def forwards(self, orm):
# Adding M2M table for field sites on 'SocialApp'
db.create_table('socialaccount_socialapp_sites', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('socialapp', models.ForeignKey(orm['socialaccount.socialapp'], null=Fal... | |
11,877 | [
-0.021965714171528816,
0.0017926933942362666,
-0.0016510079149156809,
-0.00817897729575634,
0.0028650283347815275,
0.002062641317024827,
0.01351828034967184,
0.019221490249037743,
0.013852359727025032,
0.04705745354294777,
-0.003621181007474661,
-0.05975246801972389,
0.03419540077447891,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "route_table_name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "routes", "annotation": null, "type_comment": null}}, ... | def _routes_present(route_table_name, routes, tags=None, region=None, key=None, keyid=None, profile=None):
ret = {'name': route_table_name,
'result': True,
'comment': '',
'changes': {}
}
route_table = __salt__['boto_vpc.describe_route_table'](route_table_name=route_t... | |
11,878 | [
-0.018200471997261047,
0.014027046971023083,
-0.004810279700905085,
0.023631345480680466,
0.029875224456191063,
-0.015111053362488747,
0.025777678936719894,
0.01954464055597782,
0.026644885540008545,
0.02551751770079136,
0.02618960291147232,
-0.013246562331914902,
0.05155535787343979,
-0.0... | 10 | {"_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": "vpc_name", "annotation": null, "type_comment": null}}, {"_type": ... | def _route_table_present(name, vpc_name=None, vpc_id=None, tags=None, region=None,
key=None, keyid=None, profile=None):
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
}
r = __salt__['boto_vpc.get_resource_id'](resource='rou... | |
11,879 | [
-0.03336309269070625,
0.009402637369930744,
-0.004584284964948893,
-0.01025897916406393,
-0.001350879785604775,
0.005029582884162664,
0.013735728338360786,
0.04229188710451126,
0.02126012183725834,
0.04786381870508194,
0.0015813785139471292,
-0.03936890512704849,
0.06051484867930412,
0.031... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "route_table_name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "subnet_ids", "annotation": null, "type_comment": null... | def _subnets_present(route_table_name, subnet_ids=None, subnet_names=None, tags=None, region=None, key=None, keyid=None, profile=None):
ret = {'name': route_table_name,
'result': True,
'comment': '',
'changes': {}
}
if not subnet_ids:
subnet_ids = []
# L... | |
11,880 | [
0.0018569339299574494,
-0.0030027609318494797,
-0.010122165083885193,
-0.04231087118387222,
-0.04182198643684387,
-0.01396658830344677,
0.008911061100661755,
0.010177720338106155,
0.010994382202625275,
0.00833884160965681,
0.013999921269714832,
-0.05844411626458168,
-0.016599906608462334,
... | 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 TestArticleModel(TestCase):
def setUp(self):
self.post = Article.objects.create(title="Article 1",
abstract="Article 1 abstract",
authors=u'Letícia, Davi',
journal='Journal... | |
11,881 | [
0.0403190553188324,
0.01858375035226345,
0.05323782190680504,
-0.014468497596681118,
-0.005345921032130718,
-0.03552660718560219,
0.005678006447851658,
-0.009988603182137012,
-0.017229363322257996,
0.05589450150728226,
0.03969395160675049,
-0.012951323762536049,
0.0009376524249091744,
-0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def createFields(self):
yield Bytes(self, "signature", 2, "New executable signature (NE)")
yield UInt8(self, "link_ver", "Linker version number")
yield UInt8(self, "link_rev", "Linker revision number")
yield UInt16(self, "entry_table_ofst", "Offset to the entry table")
yield UInt... | |
11,882 | [
0.02829158306121826,
0.007420641370117664,
0.06443227827548981,
-0.03226581588387489,
0.005678808782249689,
-0.017821958288550377,
0.016517912968993187,
-0.012779648415744305,
-0.02534816600382328,
0.03643876314163208,
0.03497326374053955,
-0.024217993021011353,
0.0014445411507040262,
-0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Mult", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": 64}}, "right": {"_type": "Constant", "_fields": {"kind": nu... | class NE_Header(FieldSet):
static_size = 64*8
def createFields(self):
yield Bytes(self, "signature", 2, "New executable signature (NE)")
yield UInt8(self, "link_ver", "Linker version number")
yield UInt8(self, "link_rev", "Linker revision number")
yield UInt16(self, "entry_table_... | |
11,883 | [
0.020833978429436684,
-0.007892335765063763,
0.0009257994825020432,
-0.022029278799891472,
0.039701856672763824,
-0.006037943996489048,
0.013818569481372833,
-0.010958784259855747,
0.033535443246364594,
0.025514641776680946,
-0.006607666611671448,
-0.023906012997031212,
0.0210462287068367,
... | 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": "func", "annotation": n... | class Command:
def __init__(self, func, s):
self.name = func.__name__
self.requires_network = 'n' in s
self.requires_wallet = 'w' in s
self.requires_password = 'p' in s
self.description = func.__doc__
self.help = self.description.split('.')[0] if self.description els... | |
11,884 | [
0.028975414112210274,
0.005206151865422726,
-0.012261547148227692,
-0.015359325334429741,
0.02212025597691536,
-0.03345129266381264,
0.02408728562295437,
0.004193190019577742,
0.04989425092935562,
0.040589138865470886,
0.013993005268275738,
0.0007288023480214179,
0.02544182725250721,
-0.04... | 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": "func", "annotation": null, "type_comment": null}}, {"_type": "arg... | def __init__(self, func, s):
self.name = func.__name__
self.requires_network = 'n' in s
self.requires_wallet = 'w' in s
self.requires_password = 'p' in s
self.description = func.__doc__
self.help = self.description.split('.')[0] if self.description else None
varna... | |
11,885 | [
0.04686063900589943,
0.005172353703528643,
-0.010366811417043209,
-0.016887513920664787,
-0.005479047540575266,
0.019407378509640694,
-0.04131251573562622,
0.014666053466498852,
0.01783798821270466,
0.03521179035305977,
-0.007764056324958801,
0.007708796299993992,
0.034128692001104355,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "s", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},... | def command(s):
def decorator(func):
global known_commands
name = func.__name__
known_commands[name] = Command(func, s)
@wraps(func)
def func_wrapper(*args, **kwargs):
return func(*args, **kwargs)
return func_wrapper
return decorator | |
11,886 | [
0.053687840700149536,
0.011186815798282623,
-0.013577255420386791,
-0.01496382150799036,
-0.011186815798282623,
0.013089184649288654,
-0.025357522070407867,
0.01052126381546259,
0.004830796271562576,
0.007908972911536694,
-0.016583330929279327,
0.016461312770843506,
0.039799995720386505,
-... | 8 | {"_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):
global known_commands
name = func.__name__
known_commands[name] = Command(func, s)
@wraps(func)
def func_wrapper(*args, **kwargs):
return func(*args, **kwargs)
return func_wrapper | |
11,887 | [
0.02067791111767292,
-0.013915403746068478,
0.04543599486351013,
0.01160456519573927,
0.0062776729464530945,
-0.047627199441194534,
-0.0011081950506195426,
0.04163287207484245,
0.02684854343533516,
-0.017177022993564606,
0.03500888869166374,
0.04667012020945549,
-0.010206728242337704,
-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": "outputs", "annotation": null, "type_comment": null}}, {"_type": "... | def _mktx(self, outputs, fee, change_addr, domain, nocheck, unsigned, rbf):
self.nocheck = nocheck
change_addr = self._resolver(change_addr)
domain = None if domain is None else map(self._resolver, domain)
final_outputs = []
for address, amount in outputs:
address = s... | |
11,888 | [
0.03238906338810921,
0.009578892961144447,
0.0037528816610574722,
0.0033394042402505875,
-0.03326195850968361,
-0.004146259278059006,
-0.0009712411556392908,
0.0815928727388382,
0.024142485111951828,
0.0009583199862390757,
0.007017630152404308,
0.03011493571102619,
0.04006136581301689,
-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": "method", "annotation": null, "type_comment": null}}, {"_type": "a... | def _run(self, method, args, password_getter):
cmd = known_commands[method]
if cmd.requires_password and self.wallet.has_password():
self._password = apply(password_getter,())
if self._password is None:
return
f = getattr(self, method)
result = f(*... | |
11,889 | [
0.00333043304271996,
-0.03836165368556976,
-0.024793224409222603,
0.008227403275668621,
0.01120012253522873,
-0.03214484453201294,
-0.0554085373878479,
0.025977376848459244,
0.04008854553103447,
-0.013852134346961975,
0.0336250402033329,
-0.026939501985907555,
-0.014604565687477589,
-0.013... | 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": "out", "annotation": null, "type_comment": null}}], "kwarg": null,... | def _format_request(self, out):
pr_str = {
PR_UNKNOWN: 'Unknown',
PR_UNPAID: 'Pending',
PR_PAID: 'Paid',
PR_EXPIRED: 'Expired',
}
out['amount (ARG)'] = format_satoshis(out.get('amount'))
out['status'] = pr_str[out.get('status', PR_UNKNOWN)]... | |
11,890 | [
-0.007192154880613089,
-0.013979580253362656,
0.037957075983285904,
-0.008526668883860111,
-0.03233461454510689,
0.01147463172674179,
-0.04272632300853729,
0.009002499282360077,
-0.024436919018626213,
0.002377786673605442,
-0.03482862561941147,
0.010987862013280392,
-0.01704239845275879,
-... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "parser", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ... | def add_global_options(parser):
group = parser.add_argument_group('global options')
group.add_argument("-v", "--verbose", action="store_true", dest="verbose", default=False, help="Show debugging information")
group.add_argument("-D", "--dir", dest="electrum_path", help="electrum directory")
group.add_ar... | |
11,891 | [
-0.018986951559782028,
-0.001842426834627986,
-0.013596734963357449,
-0.03603481128811836,
-0.01760188490152359,
0.01775193400681019,
-0.03744296357035637,
0.04189825803041458,
-0.01958714798092842,
0.042406115680933,
0.006348221097141504,
-0.013539023697376251,
0.054109927266836166,
-0.00... | 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 get_parser():
# create main parser
parser = argparse.ArgumentParser(
epilog="Run 'electrum help <command>' to see the help for a command")
add_global_options(parser)
subparsers = parser.add_subparsers(dest='cmd', metavar='<command>')
# gui
parser_gui = subparsers.add_parser('gui', de... | |
11,892 | [
0.01945011131465435,
0.056316182017326355,
0.014170467853546143,
-0.03730032965540886,
-0.00850228127092123,
0.018478747457265854,
-0.013439089059829712,
-0.0343976691365242,
0.003988301381468773,
0.009062242694199085,
0.014970414340496063,
-0.054533448070287704,
-0.02525543048977852,
-0.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": {"_type": "arg", "_fields": {"arg": "kwargs", "an... | class BaseManager(object):
def __init__(self, *args, **kwargs):
self.module = kwargs.get('module', None)
self.client = kwargs.get('client', None)
self.kwargs = kwargs
# A list of modules currently provisioned on the device.
#
# This list is used by different fact man... | |
11,893 | [
-0.0012299109948799014,
-0.028889060020446777,
0.032266635447740555,
-0.050591785460710526,
-0.02364303730428219,
0.051549963653087616,
-0.026086390018463135,
-0.01977439410984516,
0.003374582389369607,
0.026301980018615723,
-0.01486373320221901,
-0.08479873090982437,
-0.00437168637290597,
... | 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 Parameters(AnsibleF5Parameters):
@property
def gather_subset(self):
if isinstance(self._values['gather_subset'], string_types):
self._values['gather_subset'] = [self._values['gather_subset']]
elif not isinstance(self._values['gather_subset'], list):
raise F5ModuleEr... | |
11,894 | [
0.012712119147181511,
-0.027875611558556557,
0.021175192669034004,
-0.02740868367254734,
-0.0022237454541027546,
0.02915966510772705,
-0.0007726202020421624,
0.013494224287569523,
-0.003198457881808281,
0.022424224764108658,
-0.01640085130929947,
-0.060093656182289124,
-0.006268510594964027,... | 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 gather_subset(self):
if isinstance(self._values['gather_subset'], string_types):
self._values['gather_subset'] = [self._values['gather_subset']]
elif not isinstance(self._values['gather_subset'], list):
raise F5ModuleError(
"The specified gather_subset must be... | |
11,895 | [
0.011972390115261078,
0.016304712742567062,
0.04439840093255043,
-0.03316598758101463,
0.00375995016656816,
0.005527664441615343,
-0.09856192022562027,
-0.00923385564237833,
0.029371250420808792,
0.018783940002322197,
0.010144592262804508,
-0.07422502338886261,
0.013977275229990482,
-0.015... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "api_map", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type":... | class AsmPolicyStatsParameters(BaseParameters):
api_map = {
}
returnables = [
'policies',
'policies_active',
'policies_attached',
'policies_inactive',
'policies_unattached',
]
@property
def policies(self):
if self._values['policies'] is None or ... | |
11,896 | [
0.010506006889045238,
0.04173312708735466,
-0.00489776860922575,
-0.011115781031548977,
0.008542424067854881,
0.013381453230977058,
-0.01935611478984356,
0.013056986965239048,
0.020598039031028748,
0.02363012544810772,
-0.02360774762928486,
-0.020530909299850464,
0.01850578933954239,
0.025... | 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 BaseParameters(Parameters):
@property
def enabled(self):
return flatten_boolean(self._values['enabled'])
@property
def disabled(self):
return flatten_boolean(self._values['disabled'])
def _remove_internal_keywords(self, resource):
resource.pop('kind', None)
re... | |
11,897 | [
0.01850663311779499,
0.010265943594276905,
0.0004612109041772783,
-0.0038526386488229036,
0.03719949722290039,
0.012349395081400871,
-0.06229402497410774,
-0.007210603449493647,
0.016818922013044357,
0.0023773459251970053,
0.022440748289227486,
-0.04781462252140045,
0.009887663647532463,
-... | 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 read_collection_from_device(self):
uri = "https://{0}:{1}/mgmt/tm/asm/policies".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ... | |
11,898 | [
0.006268355529755354,
0.04584178701043129,
-0.004982159938663244,
-0.045747168362140656,
0.00038770667742937803,
0.03460605442523956,
-0.05241764709353447,
-0.0299698356539011,
-0.0030232989229261875,
0.020650092512369156,
0.04756854102015495,
-0.07668682932853699,
-0.002301846630871296,
-... | 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": {"_type": "arg", "_fields": {"arg": "kwargs", "an... | class AsmPolicyStatsFactManager(BaseManager):
def __init__(self, *args, **kwargs):
self.client = kwargs.get('client', None)
self.module = kwargs.get('module', None)
super(AsmPolicyStatsFactManager, self).__init__(**kwargs)
self.want = AsmPolicyStatsParameters(params=self.module.param... | |
11,899 | [
0.01937098801136017,
-0.00010345614282414317,
0.010830609127879143,
-0.0227359626442194,
0.004564465023577213,
-0.02035617083311081,
-0.052125103771686554,
-0.010964952409267426,
0.020765597000718117,
0.0431944914162159,
0.03689955919981003,
-0.06351228058338165,
0.010248455218970776,
0.00... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "hasParent"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "protocolIndependent"}}, {"... | class AsmPolicyFactParameters(BaseParameters):
api_map = {
'hasParent': 'has_parent',
'protocolIndependent': 'protocol_independent',
'virtualServers': 'virtual_servers',
'allowedResponseCodes': 'allowed_response_codes',
'learningMode': 'learning_mode',
'enforcementMod... | |
11,900 | [
0.04776589944958687,
0.006139201112091541,
0.009259016253054142,
-0.0573812797665596,
-0.0143453199416399,
0.002398985903710127,
-0.011837804690003395,
-0.02147262543439865,
0.01217473205178976,
0.0394463911652565,
0.025230657309293747,
-0.005024749785661697,
-0.02401253767311573,
-0.01190... | 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 signature_staging(self):
if 'staging_settings' in self._values:
if self._values['staging_settings'] is None:
return None
if 'signatureStaging' in self._values['staging_settings']:
return flatten_boolean(self._values['staging_settings']['signatureStagin... |