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,401
[ 0.026079287752509117, -0.027575045824050903, 0.07638022303581238, -0.035922348499298096, 0.002849783282727003, 0.003624803852289915, -0.013763397932052612, -0.011230257339775562, 0.027454420924186707, 0.012424452230334282, 0.01726154424250126, -0.03652547672390938, -0.02839530073106289, -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 UtilsTestCase(test.NoDBTestCase): def test_validate_num_values(self): f = utils.validate_num_values self.assertEqual("x", f(set(), default="x")) self.assertEqual(1, f(set(["1"]), cast_to=int)) self.assertEqual(1.0, f(set(["1"]), cast_to=float)) self.assertEqual(1, f(se...
1,402
[ 0.04053554683923721, 0.04515782371163368, 0.050255924463272095, -0.03428187966346741, -0.017469484359025955, -0.004307893104851246, 0.019712647423148155, -0.0036876245867460966, -0.04490858316421509, 0.05632832646369934, 0.026487454771995544, -0.0006422188016586006, 0.004710076842457056, -...
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": "formdata", "annotation": null, "type_comment": null}}, {"_type": ...
def _add_entry(self, formdata=None, data=_unset_value, index=None): assert not self.max_entries or len(self.entries) < self.max_entries, \ 'You cannot have more than max_entries entries in this FieldList' new_index = self.last_index = index or (self.last_index + 1) name = '%s-%d' % (...
1,403
[ 0.019965680316090584, 0.009243812412023544, 0.04059886932373047, -0.025794466957449913, -0.009065015241503716, -0.025079278275370598, -0.01194364856928587, -0.028392985463142395, -0.0401935949921608, -0.0011457916116341949, 0.004586146678775549, -0.009208052419126034, -0.009291491471230984, ...
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_aggregate_metadata_get_by_host_no_key(self): host_state = fakes.FakeHostState( 'fake', 'node', {'aggregates': _AGGREGATE_FIXTURES}) metadata = utils.aggregate_metadata_get_by_host(host_state) self.assertIn('k1', metadata) self.assertEqual(set(['1', '3', '7', '6']),...
1,404
[ 0.014711888507008553, -0.006568016950041056, 0.05292046070098877, -0.046546485275030136, 0.0046775806695222855, -0.01709918864071369, -0.016275981441140175, 0.007990989834070206, 0.06303414702415466, 0.0354449488222599, 0.03718544542789459, -0.02636615000665188, -0.07168958336114883, -0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_validate_num_values(self): f = utils.validate_num_values self.assertEqual("x", f(set(), default="x")) self.assertEqual(1, f(set(["1"]), cast_to=int)) self.assertEqual(1.0, f(set(["1"]), cast_to=float)) self.assertEqual(1, f(set([1, 2]), based_on=min)) self.asser...
1,405
[ -0.004298416897654533, -0.00342000275850296, 0.028057586401700974, -0.02440183237195015, 0.0008622669847682118, -0.006788333877921104, -0.0021928062196820974, 0.006704368162900209, 0.03242382034659386, 0.03529158607125282, 0.010457005351781845, 0.009817571379244328, -0.012155704200267792, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.0}}, {"_type": "C...
class TestTransformation: rvp = np.array([0.0, 128.0, 255.0]) dbz = np.array([-32.5, 31.5, 95.0]) lin = np.array([1e-4, 1.0, 1e4]) dec = np.array([-40.0, 0.0, 40.0]) r = np.array([5.0, 10.0, 20.0]) kdp = np.array([0.0, 1.0, 2.0, 5.0]) # speed in m/s speedsi = np.array([0.0, 1.0, 50.0]) ...
1,406
[ 0.014311887323856354, 0.008372743614017963, 0.05349285155534744, -0.02470683678984642, 0.00031198610668070614, -0.019121143966913223, -0.01383675541728735, -0.018321532756090164, -0.037825100123882294, -0.0025972886942327023, 0.0018831429770216346, -0.007851257920265198, -0.00896376091986894...
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_aggregate_metadata_get_by_host_with_key(self): host_state = fakes.FakeHostState( 'fake', 'node', {'aggregates': _AGGREGATE_FIXTURES}) metadata = utils.aggregate_metadata_get_by_host(host_state, 'k1') self.assertIn('k1', metadata) self.assertEqual(set(['1', '3', '7'...
1,407
[ 0.003880159230902791, 0.0081887012347579, 0.04811067879199982, -0.0279217679053545, -0.01096220500767231, 0.025175726041197777, 0.021803583949804306, -0.00842486135661602, 0.015597525984048843, -0.007694413419812918, 0.029415616765618324, -0.01893671415746212, -0.023220542818307877, 0.0021...
8
{"_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": "val", "annotation": nu...
class WorkersSetting(Setting): def set_gui_val(self, val): val = val//2 Setting.set_gui_val(self, val) def get_gui_val(self): val = Setting.get_gui_val(self) return val * 2
1,408
[ -0.007358170114457607, 0.04838108643889427, 0.01548348180949688, -0.002873585792258382, 0.029841821640729904, 0.005750368349254131, -0.00514304731041193, 0.0213776882737875, -0.029944106936454773, -0.06014392897486687, 0.05109165236353874, 0.005354011431336403, 0.0035288529470562935, 0.027...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def execute(): frappe.reload_doc("core", "doctype", "docperm") frappe.reload_doc("core", "doctype", "docshare") # default share to all writes frappe.db.sql("""update tabDocPerm set `share`=1 where ifnull(`write`,0)=1 and ifnull(`permlevel`,0)=0""") # every user must have access to his / her own detail for user ...
1,409
[ 0.017656967043876648, 0.04542643949389458, 0.05950411409139633, -0.003133546095341444, -0.013798248022794724, -0.006499946117401123, 0.012833568267524242, 0.028527911752462387, -0.018308958038687706, 0.001682368339970708, -0.00538224820047617, 0.025853419676423073, -0.0023218845017254353, ...
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": "gui", "annotation": null, "type_comment": null}}], "kwarg": null,...
def genesis(self, gui): self.gui = gui r = self.register r('worker_limit', config, restart_required=True, setting=WorkersSetting) r('enforce_cpu_limit', config, restart_required=True) r('worker_max_time', gprefs) self.opt_worker_limit.setToolTip(textwrap.fill( ...
1,410
[ 0.035093117505311966, 0.0041959164664149284, 0.039169151335954666, 0.010228226892650127, 0.03116966411471367, -0.03886399418115616, 0.00709491316229105, 0.012217200361192226, -0.003923454321920872, 0.041479628533124924, 0.002174247521907091, -0.005337532609701157, 0.03365451842546463, 0.03...
9
{"_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": "CharField", "value": {"_type": "Name", "_fields": {"id": "fi...
class TestForm(Form): text = fields.CharField() email = fields.EmailField() value = fields.IntegerField() single = fields.ChoiceField(choices=TestChoices) multi = fields.MultipleChoiceField(choices=TestChoices) def clean(self): cleaned_data = self.cleaned_data if cleaned_data.ge...
1,411
[ 0.06629664450883865, -0.02416338212788105, 0.042983777821063995, -0.022167939692735672, 0.010309782810509205, -0.02169906534254551, 0.00039561267476528883, -0.0014693211996927857, 0.0190602857619524, 0.028808508068323135, -0.004871385637670755, 0.013335657306015491, -0.0007919069030322134, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def mass_mail_sending_view(request): m1 = mail.EmailMessage( 'First Test message', 'This is the first test email', 'from@example.com', ['first@example.com', 'second@example.com']) m2 = mail.EmailMessage( 'Second Test message', 'This is the second test email', ...
1,412
[ 0.01280592754483223, 0.011929559521377087, -0.00044297665590420365, -0.03266661614179611, 0.008024244569242, -0.02133956179022789, -0.02493266947567463, -0.014164297841489315, -0.008298109285533428, 0.013342702761292458, -0.003921746741980314, -0.0012050060322508216, 0.02775895595550537, -...
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 _ViewManager(object): @method_decorator(login_required) def login_protected_view(self, request): t = Template('This is a login protected test using a method. ' 'Username is {{ user.username }}.', name='Login Method Template') c = Context({'user': r...
1,413
[ -0.013589544221758842, -0.009335476905107498, 0.0950094535946846, -0.027484208345413208, 0.005225168075412512, 0.028423037379980087, 0.021956853568553925, 0.02652190811932087, 0.02743726596236229, -0.012932363897562027, 0.028188329190015793, -0.04508724436163902, 0.002511366503313184, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_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"...
class EndPointGroupsTest(base.BaseIdentityV3AdminTest): @classmethod def setup_clients(cls): super(EndPointGroupsTest, cls).setup_clients() cls.client = cls.endpoint_groups_client @classmethod def resource_setup(cls): super(EndPointGroupsTest, cls).resource_setup() cls....
1,414
[ -0.01844119466841221, -0.005250454880297184, 0.09810245782136917, -0.027790997177362442, -0.00064933265093714, -0.020285313948988914, 0.026146559044718742, 0.006548386067152023, 0.01819452829658985, -0.02612306736409664, 0.0396779328584671, -0.037446197122335434, 0.03728175163269043, -0.03...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def resource_setup(cls): super(EndPointGroupsTest, cls).resource_setup() cls.service_ids = list() cls.endpoint_groups = list() # Create endpoint group so as to use it for LIST test service_id = cls._create_service() name = data_utils.rand_name('service_group') d...
1,415
[ -0.006884275935590267, -0.0023490642197430134, 0.06024298444390297, -0.04001346230506897, -0.020797641947865486, -0.0011780132772400975, -0.008861555717885494, 0.04763295128941536, 0.03845391795039177, 0.01307789608836174, 0.05587625876069069, -0.03600320219993591, 0.02085334062576294, -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_create_list_show_check_delete_endpoint_group(self): service_id = self._create_service() name = data_utils.rand_name('service_group') description = data_utils.rand_name('description') filters = {'service_id': service_id} endpoint_group = self.client.create_endpoint_group...
1,416
[ 0.0058992160484194756, 0.01050714123994112, 0.035877522081136703, -0.048136744648218155, 0.034977369010448456, -0.02826908603310585, 0.012687868438661098, -0.0045623816549777985, -0.009655211120843887, -0.0018887135665863752, 0.020424896851181984, -0.039285242557525635, 0.05203740671277046, ...
8
{"_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 _create_service(cls): s_name = data_utils.rand_name('service') s_type = data_utils.rand_name('type') s_description = data_utils.rand_name('description') service_data = ( cls.services_client.create_service(name=s_name, type=s_...
1,417
[ 0.015698816627264023, -0.0269301850348711, 0.046506647020578384, -0.06339762359857559, 0.0006203919183462858, 0.007523134350776672, -0.026127047836780548, -0.015347445383667946, 0.030368614941835403, 0.025926264002919197, 0.015523131005465984, -0.022098815068602562, 0.011796073988080025, -...
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 C_Test(unittest.TestCase): def test_ints(self): for i in range(512): for name in "ABCDEFGHI": b = BITS() setattr(b, name, i) self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) def test_shorts(self): for i i...
1,418
[ 0.005142198409885168, -0.03772423043847084, 0.0856442004442215, -0.04783131182193756, 0.0006057182908989489, 0.01353151723742485, 0.013908316381275654, 0.03770206496119499, 0.020701780915260315, 0.010583619587123394, 0.024735746905207634, -0.03721444308757782, -0.022175731137394905, -0.017...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_endpoint_group(self): # Creating an endpoint group so as to check update endpoint group # with new values service1_id = self._create_service() name = data_utils.rand_name('service_group') description = data_utils.rand_name('description') filters = {'servic...
1,419
[ -0.01231125183403492, -0.024156253784894943, 0.012877414003014565, -0.029573647305369377, 0.031216628849506378, 0.04720238596200943, 0.021047912538051605, -0.04067486897110939, -0.03334806114435196, -0.02484452910721302, -0.005878095515072346, -0.019082995131611824, 0.031483057886362076, 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": "other", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __eq__(self, other): if self.sparse != other.sparse: return False if not self.sparse: return True # If map_ops are not the same, the data source is not the same. if (self.map_op is not None) != (other.map_op is not None): return False if self.map_op != other.map_op: retur...
1,420
[ 0.019581781700253487, 0.005333477631211281, 0.031005656346678734, -0.028734898194670677, 0.0077514140866696835, -0.01778760366141796, 0.0014726635999977589, -0.04300422966480255, -0.034397777169942856, 0.009924053214490414, 0.0031485739164054394, -0.06638462841510773, 0.0003473593678791076, ...
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): # Removing unique constraint on 'BestOf', fields ['comment'] db.delete_unique('canvas_bestof', ['comment_id']) # Adding field 'BestOf.category' db.add_column('canvas_bestof', 'category', self.gf('django.db.models.f...
1,421
[ -0.022661922499537468, -0.02911214902997017, -0.009235115721821785, -0.02903558686375618, 0.009885881096124649, -0.012450658716261387, -0.01861378364264965, 0.0033734492026269436, -0.0003576813032850623, 0.027025872841477394, -0.005368808284401894, 0.002804029965773225, 0.04980263486504555, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "tensors_list", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlya...
def _as_tensor_list_list(tensors_list): if not tensors_list: raise ValueError("Expected at least one set of tensors") if isinstance(tensors_list[0], dict): expected_keys = set(tensors_list[0].keys()) for tensors in tensors_list[1:]: if set(tensors.keys()) != expected_keys: raise ValueError...
1,422
[ -0.01112914178520441, -0.04002697020769119, -0.042788177728652954, -0.06399256736040115, 0.04129164665937424, -0.019528692588210106, -0.01932845264673233, -0.012488667853176594, -0.0635710060596466, 0.038129955530166626, -0.01455430407077074, 0.021583789959549904, 0.06706994026899338, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "original_tensors", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "tensor_list", "annotation": null, "type_comment": nul...
def _as_original_type(original_tensors, tensor_list): if isinstance(original_tensors, dict): if len(original_tensors) == 1: # tensor_list is bogusly returned as a single tensor if only one tensor # was enqueued. Make it a list again. See b/28117485. tensor_list = [tensor_list] return {k: t...
1,423
[ -0.008563868701457977, -0.01663217879831791, -0.00012509945372585207, -0.03258296474814415, 0.002743638353422284, -0.005936376750469208, -0.017447786405682564, -0.028742387890815735, -0.029733505100011826, 0.047036752104759216, -0.0013292321236804128, 0.030765917152166367, 0.0688413232564926...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "tensor_list_list", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "poso...
def _dtypes(tensor_list_list): all_types = [[t.dtype for t in tl] for tl in tensor_list_list] types = all_types[0] for other_types in all_types[1:]: if other_types != types: raise TypeError("Expected types to be consistent: %s vs. %s." % (", ".join(x.name for x in types), ...
1,424
[ 0.01101412158459425, 0.020832577720284462, 0.003430804470553994, -0.06032183766365051, 0.003864367725327611, 0.021565057337284088, 0.04567224904894829, -0.032530706375837326, -0.04730955511331558, -0.0263908039778471, 0.009856157936155796, 0.04256998375058174, 0.03793812915682793, -0.00658...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "t", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "storing_op", "annotation": null, "type_comment": null}}, {"_type": "...
def _sparse_meta_data(t, storing_op, map_op): if not isinstance(t, sparse_tensor.SparseTensor): return _SparseMetaData(False, None, None) rank = t.dense_shape.shape.with_rank(1)[0] if enqueue_many: rank -= 1 # If a shared map_op was provided, use that. Otherwise use the name of # the ope...
1,425
[ 0.04002726823091507, 0.049518268555402756, 0.053140439093112946, -0.06762911379337311, -0.003149338997900486, 0.0017322796629741788, -0.013812387362122536, -0.023016825318336487, 0.019268566742539406, 0.04928901791572571, -0.010792002081871033, 0.03711577504873276, -0.005845906678587198, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): all_metrics = discover.DiscoverMetrics( ['/tracing/metrics/all_metrics.html']) parser = argparse.ArgumentParser( description='Runs metrics on a local trace') parser.add_argument('--local-trace-path', type=str, help='The local path to the trace file') parser.add_arg...
1,426
[ -0.00028605174156837165, -0.050896622240543365, 0.004715361166745424, -0.017104946076869965, 0.04272054135799408, 0.0005440047243610024, 0.01777408830821514, 0.03178425133228302, -0.052736762911081314, 0.041089508682489395, -0.01066445279866457, 0.02126617357134819, 0.025092830881476402, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "shape_list", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "enqueue_many", "annotation": null, "type_comment": null}}],...
def _merge_shapes(shape_list, enqueue_many): shape_list = [tensor_shape.as_shape(s) for s in shape_list] if enqueue_many: # We want the shapes without the leading batch dimension. shape_list = [s.with_rank_at_least(1)[1:] for s in shape_list] merged_shape = shape_list[0] for s in shape_list[1:]: mer...
1,427
[ -0.03978186473250389, 0.008746755309402943, 0.022047515958547592, -0.04013217240571976, -0.02375526912510395, 0.007312681991606951, -0.025835223495960236, 0.000059952632000204176, 0.019682936370372772, 0.01610322669148445, -0.013880958780646324, -0.0673467367887497, 0.01189952902495861, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "client", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": ...
def get_nat_gateways(client, module, nat_gateway_id=None): params = dict() params['Filter'] = ansible_dict_to_boto3_filter_list(module.params.get('filters')) params['NatGatewayIds'] = module.params.get('nat_gateway_ids') try: result = json.loads(json.dumps(client.describe_nat_gateways(**params...
1,428
[ 0.03263385221362114, -0.022652026265859604, -0.007243669591844082, -0.03176262229681015, -0.003103763097897172, 0.018818605691194534, -0.028153231367468834, 0.01386503130197525, 0.014188631437718868, 0.05496227741241455, 0.02546485885977745, -0.007984216324985027, 0.00660891504958272, 0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "call_class", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "call_init_kwargs", "annotation": null, "type_comment": null...
def test_platform_info_decorator(call_class, call_init_kwargs, call_kwargs, exp): call_class = fuzzinator.call.PlatformInfoDecorator()(call_class) call = call_class(**call_init_kwargs) with call: out = call(**call_kwargs) if out is not None: assert out['platform'] is not None d...
1,429
[ 0.0005150943179614842, -0.006735849194228649, 0.03373781964182854, -0.009171780198812485, 0.004599671810865402, 0.028666120022535324, -0.011569811031222343, -0.013423461467027664, 0.027797866612672806, 0.041565872728824615, 0.057607874274253845, -0.01823330670595169, -0.009102871641516685, ...
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 FishgramTest(TestCase): def setUp(self): self.space = AtomSpace() self.fishgram = fishgram.Fishgram(self.space) add_fishgram_data(self.space) tempfd, self.tempfn = tempfile.mkstemp() # close the temp file as Logger will want to manually # open it ...
1,430
[ 0.03690261021256447, 0.010934988968074322, 0.04385907202959061, -0.01866571605205536, -0.002960070502012968, 0.047027599066495895, 0.00020380264322739094, 0.030899086967110634, 0.03864172473549843, 0.0735669806599617, 0.02944585308432579, -0.08709873259067535, -0.0016572225140407681, 0.004...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): argument_spec = ec2_argument_spec() argument_spec.update( dict( filters=dict(default={}, type='dict'), nat_gateway_ids=dict(default=[], type='list'), ) ) module = AnsibleModule(argument_spec=argument_spec, supports_check_mod...
1,431
[ 0.04110601171851158, 0.009043322876095772, 0.03695626184344292, -0.005536262411624193, 0.004847899544984102, 0.011039900593459606, 0.016142265871167183, -0.019535142928361893, 0.01487646158784628, -0.005754841957241297, 0.04729148745536804, -0.01372810360044241, -0.019913580268621445, -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 setUp(self): self.space = AtomSpace() self.fishgram = fishgram.Fishgram(self.space) add_fishgram_data(self.space) tempfd, self.tempfn = tempfile.mkstemp() # close the temp file as Logger will want to manually # open it os.close(tempfd) self.l...
1,432
[ 0.04868876934051514, -0.006677945610135794, -0.04935918375849724, 0.011449403129518032, 0.001214469550177455, 0.022626450285315514, 0.0015673531452193856, -0.07588241249322891, 0.020877091214060783, 0.006494629196822643, -0.03299690783023834, 0.023632070049643517, -0.003797263139858842, -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": "vera_device", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, vera_device, extra_data=None): self.vera_device = vera_device self.extra_data = extra_data if self.extra_data and self.extra_data.get('name'): self._name = self.extra_data.get('name') else: self._name = self.vera_device.name self.current...
1,433
[ 0.04684137925505638, 0.0014201529556885362, -0.03995363786816597, 0.0030917914118617773, 0.002574027283117175, 0.012165977619588375, -0.011964788660407066, -0.0874340832233429, 0.018781524151563644, 0.016544781625270844, 0.006520869210362434, -0.0023994669318199158, 0.024568647146224976, -...
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 state_attributes(self): attr = super().state_attributes if self.vera_device.has_battery: attr[ATTR_BATTERY_LEVEL] = self.vera_device.battery_level + '%' if self.vera_device.is_armable: armed = self.vera_device.refresh_value('Armed') attr[ATTR_ARMED] = 'Tr...
1,434
[ 0.028520287945866585, -0.015417587012052536, -0.05672593414783478, -0.017429064959287643, 0.006798571441322565, 0.04553357511758804, 0.0028472531121224165, -0.05344463884830475, 0.02809327095746994, -0.0030874505173414946, -0.041106075048446655, 0.00620861304923892, -0.03708311915397644, -...
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 update(self): if self.vera_device.category == "Temperature Sensor": self.vera_device.refresh_value('CurrentTemperature') current_temp = self.vera_device.get_value('CurrentTemperature') vera_temp_units = self.vera_device.veraController.temperature_units if ver...
1,435
[ 0.02051779255270958, 0.0041100140661001205, -0.02917894907295704, -0.037226829677820206, 0.006369445938616991, 0.039507780224084854, 0.021991804242134094, 0.014750862494111061, -0.011103494092822075, -0.02332594431936741, 0.005333872977644205, -0.014826176688075066, 0.02433730848133564, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}, "targets": [{"_type": "Name", "_fields": {"id": "recurse", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {...
class RecursiveJSONEncoder(json.JSONEncoder): recurse = False def default(self, o): if o is JSONTestObject: if self.recurse: return [JSONTestObject] else: return 'JSONTestObject' return json.JSONEncoder.default(o)
1,436
[ 0.02998350001871586, -0.006446564104408026, 0.011587071232497692, -0.03907008841633797, 0.034783538430929184, 0.05192972719669342, -0.018954573199152946, 0.024223454296588898, 0.01947922818362713, -0.014054068364202976, 0.00028622327954508364, -0.05483207479119301, 0.03181421384215355, 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": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestRecursion(TestCase): def test_listrecursion(self): x = [] x.append(x) try: json.dumps(x) except ValueError: pass else: self.fail("didn't raise ValueError on list recursion") x = [] y = [x] x.append(y) ...
1,437
[ 0.03622816503047943, -0.010889074765145779, 0.03586418554186821, -0.03998929262161255, 0.018053418025374413, 0.039916496723890305, 0.005717522464692593, 0.0026828374247998, 0.03253982961177826, 0.00726747140288353, 0.03479650989174843, -0.04064445570111275, 0.011750495061278343, -0.0286573...
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_listrecursion(self): x = [] x.append(x) try: json.dumps(x) except ValueError: pass else: self.fail("didn't raise ValueError on list recursion") x = [] y = [x] x.append(y) try: json.dumps(x) ...
1,438
[ 0.0758867859840393, -0.01654883101582527, 0.0011190467048436403, -0.041122011840343475, 0.03718763589859009, 0.028563126921653748, 0.010525012388825417, 0.044100578874349594, 0.025917982682585716, -0.006762904115021229, 0.03589840605854988, -0.02840753085911274, 0.010908447206020355, -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 test_dictrecursion(self): x = {} x["test"] = x try: json.dumps(x) except ValueError: pass else: self.fail("didn't raise ValueError on dict recursion") x = {} {"a": x, "b": x} # ensure that the marker is cleared ...
1,439
[ 0.06186208501458168, 0.02965097688138485, 0.05739349499344826, 0.006347962189465761, 0.010804918594658375, -0.0011833334574475884, 0.03032592125236988, 0.005309363827109337, 0.01957336813211441, -0.013382505625486374, -0.006877444218844175, -0.0029848807025700808, 0.007948044687509537, 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": "timeout", "annotation": null, "type_comment": null}}], "kwarg": n...
def _login(self, timeout=None): common = self._init_common() # If replication is enabled and we cannot login, we do not want to # raise an exception so a failover can still be executed. try: common.do_setup(None, timeout=timeout, stats=self._stats) common.client_l...
1,440
[ 0.032455094158649445, 0.0033047827892005444, 0.004660806152969599, -0.027064550668001175, 0.03419974818825722, 0.03480366989970207, -0.003271231660619378, 0.016272280365228653, 0.01893400214612484, -0.02294894866645336, 0.009673899039626122, -0.03314848244190216, 0.02093588374555111, 0.029...
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_defaultrecursion(self): enc = RecursiveJSONEncoder() self.assertEquals(enc.encode(JSONTestObject), '"JSONTestObject"') enc.recurse = True try: enc.encode(JSONTestObject) except ValueError: pass else: self.fail("didn't raise Val...
1,441
[ 0.018238874152302742, 0.019334930926561356, 0.02163788117468357, -0.025763487443327904, -0.006853432394564152, -0.010825098492205143, 0.00036252994323149323, 0.0014362651854753494, -0.009162540547549725, 0.020898966118693352, 0.009999976493418217, 0.019445767626166344, -0.013485190458595753,...
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": "refresh", "annotation": null, "type_comment": null}}], "kwarg": n...
def get_volume_stats(self, refresh=False): common = self._login() try: self._stats = common.get_volume_stats( refresh, self.get_filter_function(), self.get_goodness_function()) self._stats['storage_protocol'] = self.protocol ...
1,442
[ 0.013057646341621876, 0.010851802304387093, 0.03922024741768837, -0.020982123911380768, -0.003814393887296319, -0.02260250225663185, 0.06495705991983414, 0.008882511407136917, -0.0030958685092628, -0.031106529757380486, 0.010715785436332226, 0.029900116845965385, 0.03957507759332657, 0.001...
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": "context", "annotation": null, "type_comment": null}}, {"_type": "...
def create_group_from_src(self, context, group, volumes, group_snapshot=None, snapshots=None, source_group=None, source_vols=None): common = self._login() try: return common.create_group_from_src( context, group, vol...
1,443
[ 0.016257846727967262, 0.02630234695971012, 0.034185681492090225, 0.022201046347618103, 0.004156556446105242, 0.02878277376294136, 0.04651413857936859, 0.03624861314892769, -0.0050682974979281425, -0.00026131971389986575, -0.0059186420403420925, -0.0027152691036462784, -0.019597826525568962, ...
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": "context", "annotation": null, "type_comment": null}}, {"_type": "...
def update_group(self, context, group, add_volumes=None, remove_volumes=None): common = self._login() try: return common.update_group(context, group, add_volumes, remove_volumes) finally: self._logout(common)
1,444
[ 0.003938095178455114, 0.04569307342171669, 0.005647395737469196, -0.024555837735533714, 0.00779798673465848, -0.022254426032304764, -0.042207442224025726, 0.024220680817961693, 0.0028069401159882545, -0.021695831790566444, 0.031638823449611664, 0.04381619393825531, -0.004172705113887787, 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": "context", "annotation": null, "type_comment": null}}, {"_type": "...
def migrate_volume(self, context, volume, host): if volume['status'] == 'in-use': protocol = host['capabilities']['storage_protocol'] if protocol != self.protocol: LOG.debug("3PAR %(protocol)s driver cannot migrate in-use " "volume to a host with...
1,445
[ 0.002439963398501277, 0.0025956053286790848, 0.009124708361923695, -0.03798293322324753, -0.0223747156560421, -0.004839051049202681, 0.0354926623404026, 0.004820185247808695, 0.006153361406177282, 0.02877647429704666, 0.028751321136951447, -0.02631135657429695, 0.001638171263039112, 0.0250...
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 Test_MultiPiecewiseLinFunction(unittest.TestCase): def setUp(self): self.mplf = mp.MultiPiecewiseLinFunction() self.mplf.setXData([0., 1., 2., 3.], mp.U.m) self.mplf.addYData([(5.,), (6.,), (7.,), (8.,)], mp.U.s, mp.DataID.PID_Time, mp.ValueType.Scalar) self.mplf.addYData([(15....
1,446
[ 0.025477487593889236, -0.004885490518063307, 0.03478318452835083, 0.0242325346916914, 0.0236037727445364, -0.03910907357931137, -0.025552937760949135, 0.05251430720090866, 0.018812596797943115, -0.016511322930455208, 0.010273991152644157, -0.010223690420389175, -0.011883625760674477, 0.028...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "volume", "annotation": null, "type_comment": null}}], "kwarg": nu...
def get_pool(self, volume): common = self._login() try: return common.get_cpg(volume) except hpeexceptions.HTTPNotFound: reason = (_("Volume %s doesn't exist on array.") % volume) LOG.error(reason) raise exception.InvalidVolume(reason) fina...
1,447
[ 0.011146007105708122, -0.022188235074281693, 0.013408418744802475, 0.025903569534420967, 0.04516519978642464, -0.019614482298493385, 0.010170471854507923, -0.008821328170597553, 0.002066525863483548, 0.02878866344690323, -0.0050048064440488815, -0.017300181090831757, 0.057328253984451294, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Integer", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_...
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True) password = db.Column(db.String(120)) display_name = db.Column(db.String(120)) facebook = db.Column(db.String(120)) github = db.Column(db.String(120)) google = db.Column(db.String...
1,448
[ -0.0015243350062519312, 0.0015730258310213685, 0.0012086303904652596, -0.0473211407661438, -0.023937007412314415, 0.00004871530472883023, 0.03375055268406868, 0.001694752718321979, 0.027291957288980484, 0.02286895178258419, 0.024125488474965096, -0.0374196358025074, -0.012496248818933964, ...
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 Test_MultiPiecewiseLinFunction(unittest.TestCase): def setUp(self): self.m2=mp.MultiPiecewiseLinFunction2(x=mp.Quantity(value=[0.,1.,2.,3.],unit=mp.U.m)) self.m2.addY(mp.Property(value=[5.,6.,7.,8.],unit=mp.U.s,propID=mp.DataID.PID_Time,valueType=mp.ValueType.Scalar)) self.m2.addY(mp.P...
1,449
[ -0.003192364238202572, -0.016163095831871033, -0.02101406268775463, -0.013207674957811832, 0.0015095577109605074, -0.0366676039993763, 0.026598788797855377, 0.04496316611766815, 0.02971726842224598, 0.004619119223207235, 0.01041531190276146, 0.023602604866027832, 0.008178363554179668, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def create_token(user): payload = { 'sub': user.id, 'iat': datetime.utcnow(), 'exp': datetime.utcnow() + timedelta(days=14) } token = jwt.encode(payload, app.config['TOKEN_SECRET']) return token.decode('unicode_escape')
1,450
[ 0.03319801390171051, -0.016641030088067055, 0.011051997542381287, 0.024940533563494682, 0.03263070806860924, -0.034290608018636703, 0.053284917026758194, -0.009071672335267067, -0.0007124178227968514, 0.05416739359498024, 0.015107197687029839, -0.0024071186780929565, 0.01877368800342083, -...
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": "email", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __init__(self, email=None, password=None, display_name=None, facebook=None, github=None, google=None, linkedin=None, twitter=None): if email: self.email = email.lower() if password: self.set_password(password) if display_name: ...
1,451
[ 0.012218262068927288, -0.0033240860793739557, -0.04584094509482384, -0.024795886129140854, 0.03164619952440262, -0.007821709848940372, -0.02356058359146118, 0.04195535555481911, 0.035419486463069916, 0.0005071056075394154, 0.004264600574970245, -0.019854675978422165, -0.011173870414495468, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def decorated_function(*args, **kwargs): if not request.headers.get('Authorization'): response = jsonify(message='Missing authorization header') response.status_code = 401 return response try: payload = parse_token(request) except DecodeError: ...
1,452
[ -0.0016420433530583978, 0.023767732083797455, -0.03292907029390335, -0.02653142251074314, 0.02775450237095356, -0.0024241087958216667, -0.03358765318989754, 0.018463799729943275, 0.057578831911087036, 0.04059683904051781, 0.012136714532971382, 0.0005431826575659215, -0.025872841477394104, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "f", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},...
def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if not request.headers.get('Authorization'): response = jsonify(message='Missing authorization header') response.status_code = 401 return response try: payload = parse_token...
1,453
[ 0.00463879993185401, -0.012519171461462975, -0.025166088715195656, 0.02037559077143669, 0.059742849320173264, -0.023505382239818573, -0.005583593156188726, 0.0720491111278534, 0.006877027917653322, 0.012540462426841259, 0.018768111243844032, 0.012795955874025822, 0.0045855725184082985, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def login(): user = User.query.filter_by(email=request.json['email']).first() if not user or not user.check_password(request.json['password']): response = jsonify(message='Wrong Email or Password') response.status_code = 401 return response token = create_token(user) return jsoni...
1,454
[ -0.001924426294863224, -0.02430972270667553, -0.03698038309812546, 0.00660444051027298, 0.0850391760468483, 0.00040156455361284316, 0.042990535497665405, 0.027987578883767128, -0.003546102438122034, 0.014442307874560356, 0.03357163816690445, -0.03933510556817055, 0.004028260242193937, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields":...
def facebook(): access_token_url = 'https://graph.facebook.com/v2.3/oauth/access_token' graph_api_url = 'https://graph.facebook.com/v2.3/me' params = { 'client_id': request.json['clientId'], 'redirect_uri': request.json['redirectUri'], 'client_secret': app.config['FACEBOOK_SECRET'],...
1,455
[ -0.00795185100287199, -0.009146359749138355, -0.01820039004087448, -0.011777741834521294, 0.07377102226018906, -0.059598490595817566, 0.0011981154093518853, 0.03926298767328262, -0.015234315767884254, 0.0020644229371100664, 0.022124381735920906, -0.01532664429396391, -0.008603925816714764, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields":...
def github(): access_token_url = 'https://github.com/login/oauth/access_token' users_api_url = 'https://api.github.com/user' params = { 'client_id': request.json['clientId'], 'redirect_uri': request.json['redirectUri'], 'client_secret': app.config['GITHUB_SECRET'], 'code': r...
1,456
[ 0.009072355926036835, -0.00017548272444400936, 0.00006648225826211274, 0.012713199481368065, 0.02791494131088257, -0.041958969086408615, 0.010468102991580963, 0.059248920530080795, 0.018371926620602608, -0.03661401569843292, 0.015190920792520046, -0.00891546905040741, -0.005707415286451578, ...
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": "Constant", "_fields":...
def google(): access_token_url = 'https://accounts.google.com/o/oauth2/token' people_api_url = 'https://www.googleapis.com/plus/v1/people/me/openIdConnect' payload = dict(client_id=request.json['clientId'], redirect_uri=request.json['redirectUri'], client_secret=app.co...
1,457
[ -0.002786029363051057, -0.03823374584317207, -0.016189463436603546, -0.026878945529460907, 0.024528145790100098, -0.02428419515490532, 0.0025379201397299767, 0.037169232964515686, -0.010218213312327862, 0.032645054161548615, -0.0034818435087800026, -0.017120912671089172, 0.0243507269769907, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields":...
def twitter(): request_token_url = 'https://api.twitter.com/oauth/request_token' access_token_url = 'https://api.twitter.com/oauth/access_token' authenticate_url = 'https://api.twitter.com/oauth/authenticate' if request.args.get('oauth_token') and request.args.get('oauth_verifier'): auth = OAut...
1,458
[ -0.026045439764857292, -0.04640253633260727, -0.00030093343229964375, -0.0270308218896389, 0.03816115856170654, -0.020222727209329605, -0.01996518485248089, 0.09620912373065948, 0.0042018708772957325, 0.01388492900878191, 0.034018076956272125, 0.009165173396468163, 0.004182274919003248, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields":...
def linkedin(): access_token_url = 'https://www.linkedin.com/uas/oauth2/accessToken' people_api_url = 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address)' payload = dict(client_id=request.json['clientId'], redirect_uri=request.json['redirectUri'], ...
1,459
[ 0.02423466555774212, 0.009738183580338955, -0.0028543956577777863, -0.05565342679619789, -0.00753980316221714, -0.005571756977587938, -0.016292504966259003, -0.02488776482641697, -0.032538361847400665, 0.058685675263404846, 0.0068167285062372684, 0.008676895871758461, -0.0004118318611290306,...
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": "formatstr", "annotatio...
class Formatter(object): def format(self, formatstr): pieces = [] for i, piece in enumerate(re_formatchars.split(force_text(formatstr))): if i % 2: if type(self.data) is datetime.date and hasattr(TimeFormat, piece): raise TypeError( ...
1,460
[ 0.03301115706562996, 0.029519110918045044, 0.022509891539812088, -0.06039484217762947, 0.003510889830067754, -0.00910067930817604, -0.015488112345337868, -0.00491147767752409, -0.020701061934232712, 0.0648164302110672, 0.009471237659454346, 0.00692756986245513, 0.024054935202002525, 0.0106...
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": "formatstr", "annotation": null, "type_comment": null}}], "kwarg":...
def format(self, formatstr): pieces = [] for i, piece in enumerate(re_formatchars.split(force_text(formatstr))): if i % 2: if type(self.data) is datetime.date and hasattr(TimeFormat, piece): raise TypeError( "The format for date obj...
1,461
[ 0.026972321793437004, 0.022405682131648064, 0.004610362462699413, -0.01169836986809969, 0.015730615705251694, 0.032568883150815964, 0.025339990854263306, -0.008317113853991032, -0.0014610817888751626, 0.0005501828854903579, -0.0034808481577783823, -0.008054775185883045, 0.004248432349413633,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def __init__(self, obj): self.data = obj self.timezone = None # We only support timezone when formatting datetime objects, # not date objects (timezone information not appropriate), # or time objects (against established django policy). if isinstance(obj, datetime.dateti...
1,462
[ 0.034091249108314514, 0.01512166392058134, 0.05751632899045944, -0.0090009905397892, -0.02040974609553814, -0.0021335158962756395, -0.0009788577444851398, -0.016460560262203217, 0.005372466053813696, 0.04833531752228737, 0.022614987567067146, -0.04057196527719498, -0.030468352138996124, 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 BaseModelValidationTests(ValidationTestCase): def test_missing_required_field_raises_error(self): mtv = ModelToValidate(f_with_custom_validator=42) self.assertFailsValidation(mtv.full_clean, ['name', 'number']) def test_with_correct_value_model_validates(self): mtv = ModelToValid...
1,463
[ 0.043104417622089386, 0.016754405573010445, 0.036866191774606705, -0.02705397829413414, 0.0020550410263240337, -0.008025219663977623, 0.04349430650472641, 0.01997099258005619, 0.013104609213769436, 0.01838977448642254, 0.014869941398501396, -0.03612973541021347, -0.028266968205571175, 0.03...
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 ModelFormsTests(TestCase): def setUp(self): self.author = Author.objects.create(name='Joseph Kocherhans') def test_partial_validation(self): # Make sure the "commit=False and set field values later" idiom still # works with model validation. data = { 'title': '...
1,464
[ 0.07786444574594498, 0.014254138804972172, 0.018532805144786835, -0.0339626669883728, 0.0048786490224301815, 0.0165692251175642, 0.0380837619304657, 0.04007158428430557, 0.03793831169605255, 0.03408387675881386, 0.056337788701057434, -0.008854293264448643, -0.0007526300614699721, 0.0315142...
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_partial_validation(self): # Make sure the "commit=False and set field values later" idiom still # works with model validation. data = { 'title': 'The state of model validation', 'pub_date': '2010-1-10 14:49:00' } form = ArticleForm(data) s...
1,465
[ 0.047699324786663055, 0.016513850539922714, 0.0323658213019371, -0.04092610999941826, 0.0184774212539196, -0.012156488373875618, 0.04072754457592964, 0.019679831340909004, 0.04419137164950371, 0.03157157078385353, 0.03686659038066864, -0.02793124131858349, -0.012344020418822765, 0.00568111...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_validation_with_empty_blank_field(self): # Since a value for pub_date wasn't provided and the field is # blank=True, model-validation should pass. # Also, Article.clean() should be run, so pub_date will be filled after # validation, so the form should save cleanly even though pu...
1,466
[ 0.048940397799015045, 0.0234293844550848, 0.035077642649412155, -0.018280677497386932, 0.01526896096765995, -0.023672979325056076, 0.05638111010193825, 0.014892496168613434, 0.036760661751031876, 0.018557490780949593, 0.025289563462138176, -0.02175743877887726, 0.00012067281932104379, 0.02...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_validation_with_invalid_blank_field(self): # Even though pub_date is set to blank=True, an invalid value was # provided, so it should fail validation. data = { 'title': 'The state of model validation', 'pub_date': 'never' } article = Article(autho...
1,467
[ -0.00412240345031023, -0.0362120121717453, 0.029119184240698814, 0.006447474937886, 0.0007116950582712889, -0.0051989927887916565, 0.027792295441031456, -0.013811709359288216, 0.03917941823601723, -0.004616971127688885, 0.01627248525619507, 0.01461990550160408, 0.01033767219632864, -0.0362...
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_v4_unpack_uniqueness_detection(self): # These two are different, because we are not doing IPv4 unpacking giptm = GenericIPAddressTestModel(generic_ip="::ffff:10.10.10.10") giptm.save() giptm = GenericIPAddressTestModel(generic_ip="10.10.10.10") self.assertIsNone(giptm.fu...
1,468
[ -0.011028141714632511, -0.020154453814029694, 0.06970082223415375, 0.005301041528582573, -0.006884870119392872, -0.033566057682037354, 0.006952792871743441, -0.019845714792609215, 0.030083486810326576, 0.02245146967470646, 0.005464672576636076, -0.017709244042634964, -0.016350794583559036, ...
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 GenericIPAddressFieldTests(ValidationTestCase): def test_correct_generic_ip_passes(self): giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4") self.assertIsNone(giptm.full_clean()) giptm = GenericIPAddressTestModel(generic_ip="2001::2") self.assertIsNone(giptm.full_clean())...
1,469
[ 0.02771509625017643, -0.0010666146408766508, 0.016457948833703995, -0.041538871824741364, 0.007266488391906023, -0.01406017690896988, -0.023324808105826378, -0.025463666766881943, -0.04104355722665787, 0.019069606438279152, 0.03444686904549599, 0.06835339963436127, -0.011335947550833225, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "data_format", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ndim", "annotation": null, "type_comment": null}}], "kwarg...
def convert_data_format(data_format, ndim): if data_format == 'channels_last': if ndim == 3: return 'NWC' elif ndim == 4: return 'NHWC' elif ndim == 5: return 'NDHWC' else: raise ValueError('Input rank not supported:', ndim) elif data_format == 'channels_first': if ndim =...
1,470
[ 0.043581753969192505, -0.012565458193421364, 0.07610682398080826, -0.03844500333070755, 0.002977241761982441, 0.022597093135118484, -0.003213348099961877, -0.02304627001285553, -0.002289078664034605, -0.03588814660906792, 0.015030176378786564, -0.0027958431746810675, -0.04120917245745659, ...
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 setUp(self): self.maxDiff = None filename = 'chart_axis18.xlsx' test_dir = 'xlsxwriter/test/comparison/' self.got_filename = test_dir + '_test_' + filename self.exp_filename = test_dir + 'xlsx_files/' + filename self.ignore_files = [] self.ignore_elements =...
1,471
[ -0.023397240787744522, 0.013575369492173195, -0.006212235428392887, -0.0720880851149559, -0.016518007963895798, -0.002900133142247796, 0.0027546361088752747, -0.011790169402956963, 0.029661789536476135, 0.055766258388757706, 0.06298553198575974, -0.025908291339874268, 0.018152806907892227, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "line", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def filterLine( line ): m = filenameParser.match( line ) if m: line = m.group(1) + m.group(2) m = filelineParser.match( line ) if m: line = m.group(1) + "<line number>" + m.group(3) else: m = lineNumberParser.match( line ) if m: line = m.group(1) + m.group(2) m = versionParser.match( line ) if m: ...
1,472
[ 0.003348167520016432, -0.020335320383310318, -0.019877059385180473, -0.00766441086307168, 0.023336928337812424, -0.08184536546468735, 0.06589788943529129, 0.010677474550902843, 0.023852471262216568, 0.006845269817858934, 0.02201942726969719, -0.025593861937522888, -0.023944122716784477, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "title", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def baomihua_download_by_id(id, title=None, output_dir='.', merge=True, info_only=False, **kwargs): html = get_html('http://play.baomihua.com/getvideourl.aspx?flvid=%s&devicetype=phone_app' % id) host = r1(r'host=([^&]*)', html) assert host type = r1(r'videofiletype=([^&]*)', html) assert type v...
1,473
[ 0.006399705074727535, 0.029661431908607483, 0.01638149842619896, 0.03579903393983841, 0.016665443778038025, 0.05285763368010521, -0.012591911479830742, 0.004960863385349512, 0.00981797743588686, 0.011090273968875408, 0.00617036409676075, -0.051896583288908005, 0.05076080188155174, -0.01508...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_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"...
class TestAlwaysDenyPredicate(TestCase): @classmethod def setUpClass(cls) -> None: cls.user = UserFactory.build() def setUp(self): self.predicate_context_mock = mock.patch( "rules.Predicate.context", new_callable=mock.PropertyMock, return_value={ ...
1,474
[ 0.009148170240223408, 0.04543735831975937, 0.047642335295677185, -0.01239369623363018, -0.037212058901786804, -0.011068233288824558, -0.013328952714800835, 0.0012294596526771784, -0.003936128690838814, 0.0707574114203453, 0.07199616730213165, -0.0010753900278359652, -0.04746890813112259, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "baseName", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": ...
def approve( baseName, args ): global overallResult args[0:0] = [cmdPath] baselinesPath = os.path.join( rootPath, '{0}.approved.txt'.format( baseName ) ) rawResultsPath = os.path.join( rootPath, '_{0}.tmp'.format( baseName ) ) filteredResultsPath = os.path.join( rootPath, '{0}.unapproved.txt'.format( baseName ) ) ...
1,475
[ 0.008532180450856686, 0.02932289056479931, 0.03322610259056091, 0.027322493493556976, -0.03315291926264763, 0.044252678751945496, 0.0017671188106760383, 0.039422452449798584, -0.007660055998712778, -0.006141462363302708, 0.033323682844638824, -0.04359401389956474, 0.0031408669892698526, -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 setUp(self): self.predicate_context_mock = mock.patch( "rules.Predicate.context", new_callable=mock.PropertyMock, return_value={ 'perm_name': 'dummy-perm' } ) self.predicate_context_mock.start() self.addCleanup(self.pred...
1,476
[ 0.0494159460067749, 0.015875285491347313, 0.019373029470443726, 0.09421534091234207, 0.025084834545850754, 0.04048904404044151, -0.023082759231328964, 0.026238972321152687, 0.023259412497282028, -0.021045353263616562, 0.009898499585688114, -0.04143119603395462, 0.04088946059346199, -0.0036...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_message_on_always_deny_predicate(self): permission_message = "Dummy message" self.assertFalse(predicates.always_deny(message=permission_message)(self.user)) self.assertEqual( errors.get_permission_error(self.user, 'dummy-perm'), permission_message )
1,477
[ 0.044255778193473816, -0.01318204216659069, 0.03471188247203827, -0.006207894999533892, -0.007463179063051939, 0.0011517155217006803, -0.05051039904356003, -0.04064255580306053, 0.03745294734835625, 0.012565302662551403, -0.010596717707812786, -0.09439239650964737, 0.02152983844280243, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ax_client", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def get_parameters_and_results(ax_client): trial_by_arm_name = defaultdict(dict) for _, row in ax_client.experiment.fetch_data().df.iterrows(): trial_by_arm_name[row["arm_name"]][row["metric_name"]] = row["mean"] trials = [] arms_by_name = ax_client.experiment.arms_by_name for arm_name, met...
1,478
[ 0.010835466906428337, -0.01837586611509323, -0.002255332190543413, -0.024990683421492577, 0.023892328143119812, 0.006392678711563349, -0.02966795302927494, 0.03008754923939705, 0.027446558699011803, 0.0622977651655674, 0.025200482457876205, -0.038158614188432693, -0.0004778311413247138, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "trials", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "metrics", "annotation": null, "type_comment": null}}], "kwarg":...
def filter_to_pareto(trials, metrics): scores = np.empty((len(trials), len(metrics)), dtype=np.float) for i, trial in enumerate(trials): for j, metric in enumerate(metrics): scores[i, j] = trial[metric] filtered = [] for i in range(len(trials)): s = scores[i] on_fron...
1,479
[ 0.03579297289252281, -0.059018123894929886, 0.01518036425113678, -0.05667028948664665, -0.011376640759408474, 0.049995072185993195, 0.02031337469816208, -0.0512380450963974, 0.013626649975776672, -0.005990431644022465, 0.011969354003667831, -0.0884351134300232, 0.026815958321094513, 0.0059...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "url_safe_serializer", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "p...
def test_serialize_test_dag_collection_schema(url_safe_serializer): dag_model_a = DagModel(dag_id="test_dag_id_a", fileloc="/tmp/a.py") dag_model_b = DagModel(dag_id="test_dag_id_b", fileloc="/tmp/a.py") schema = DAGCollectionSchema() instance = DAGCollection(dags=[dag_model_a, dag_model_b], total_entri...
1,480
[ 0.03879981115460396, -0.042742785066366196, -0.020963096991181374, -0.05342848226428032, -0.00326928636059165, 0.046895742416381836, -0.012622186914086342, -0.044189319014549255, 0.04428264498710632, 0.005896964576095343, 0.006427749525755644, -0.0392664335668087, 0.029490655288100243, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "url_safe_serializer", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "p...
def test_serialize_test_dag_schema(url_safe_serializer): dag_model = DagModel( dag_id="test_dag_id", root_dag_id="test_root_dag_id", is_paused=True, is_active=True, is_subdag=False, fileloc="/root/airflow/dags/my_dag.py", owners="airflow1,airflow2", de...
1,481
[ 0.033664267510175705, -0.029003756120800972, -0.02222791686654091, -0.04092651605606079, -0.013133135624229908, 0.03006707690656185, -0.013393309898674488, -0.025180328637361526, 0.01955830492079258, 0.011368476785719395, 0.017329856753349304, -0.03594927489757538, 0.02375502698123455, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "url_safe_serializer", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "p...
def test_serialize_test_dag_detail_schema(url_safe_serializer): dag = DAG( dag_id="test_dag", start_date=datetime(2020, 6, 19), doc_md="docs", orientation="LR", default_view="duration", params={"foo": 1}, tags=['example1', 'example2'], ) schema = DAGDe...
1,482
[ 0.013048619031906128, -0.010763559490442276, 0.04847220703959465, -0.005671289283782244, 0.05748836696147919, -0.018187416717410088, -0.005697138607501984, -0.01564386673271656, -0.011228842660784721, 0.016284924000501633, 0.0013260580599308014, -0.014144619926810265, 0.036685023456811905, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "history"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment":...
class History(Base): __tablename__ = 'history' id = Column(Integer, primary_key=True) task = Column('feed', String) filename = Column(String) url = Column(String) title = Column(Unicode) time = Column(DateTime) details = Column(String) def __init__(self): self.time = datet...
1,483
[ 0.010077739134430885, 0.011941085569560528, 0.011107335798442364, -0.04995783045887947, -0.03547632694244385, -0.008169627748429775, -0.01199704222381115, -0.03290233388543129, -0.04357880726456642, -0.009926657192409039, 0.015768500044941902, -0.05738883465528488, 0.019674252718687057, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "apps", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schema_editor", "annotation": null, "type_comment": null}}], "kwa...
def forward(apps, schema_editor): with schema_editor.connection.cursor() as cursor: for lang in settings.MODELTRANSLATION_LANGUAGES: for model, old, new in FIELDS: cursor.execute( "SELECT 1 FROM information_schema.columns WHERE table_name='tourism_{}' AND colu...
1,484
[ 0.0052278125658631325, 0.0041816215962171555, 0.05074496939778328, -0.04255137965083122, 0.020458843559026718, 0.0093685919418931, -0.02432943508028984, 0.01006605289876461, -0.020534245297312737, 0.03878132253885269, 0.032598428428173065, -0.04478827863931656, 0.016914989799261093, -0.039...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "manager", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "options", "annotation": null, "type_comment": null}}], "kwarg"...
def do_cli(manager, options): session = Session() try: console('-- History: ' + '-' * 67) query = session.query(History) if options.search: search_term = options.search.replace(' ', '%').replace('.', '%') query = query.filter(History.title.like('%' + search_term +...
1,485
[ 0.01618412882089615, 0.04777941480278969, -0.011516095139086246, -0.028527546674013138, -0.04408363625407219, -0.0330929197371006, -0.025773828849196434, -0.026305248960852623, -0.025169944390654564, 0.03758582845330238, 0.04251353442668915, 0.016836324706673622, 0.03799647092819214, -0.03...
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 create_finfos(): fields = defaultdict(list) for el in moose.wildcardFind('/test/#'): print(el) mobj = moose.element(el) for f in moose.getFieldNames(mobj.className, 'lookup'): fields[mobj].append(getattr(mobj, f)) for f in moose.getFieldNames(mobj.className, 'elem...
1,486
[ 0.010743471793830395, 0.05312012508511543, -0.018413545563817024, -0.041551265865564346, 0.0016918786568567157, 0.013904105871915817, 0.023446401581168175, -0.026157433167099953, -0.009877820499241352, 0.011763463728129864, 0.03567288815975189, 0.010401236824691296, 0.0536838062107563, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "m", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "n", "annotation": null, "type_comment": null}}], "kwarg": null, "var...
def check_vector_field(m, n): test = moose.Neutral('/test') tabs = [] for ii in range(m): comp = moose.Compartment('/test/comp_%d' % (ii), n=n) for jj in range(n): tab = moose.Table('/test/data_%d_%d' % (ii, jj)) moose.connect(tab, 'requestOut', comp.vec[jj], 'getVm')...
1,487
[ -0.005247421097010374, 0.004750263411551714, -0.03712967410683632, 0.005529678426682949, -0.02051497995853424, -0.006206454709172249, 0.00066474819323048, 0.0043525369837880135, -0.02701972983777523, 0.02078440599143505, -0.03040681779384613, -0.026583513244986534, 0.03330637142062187, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "Dialog", "annotation":...
class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(651, 532) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("icons:collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEna...
1,488
[ -0.015894757583737373, 0.0019821326714009047, -0.021976228803396225, 0.02373533323407173, -0.01186138391494751, -0.01976478472352028, -0.000816726649645716, 0.0040804920718073845, -0.030156061053276062, 0.032744456082582474, -0.02824617736041546, -0.010271907784044743, 0.0337999165058136, ...
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": "Dialog", "annotation": null, "type_comment": null}}], "kwarg": nu...
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(651, 532) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("icons:collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.set...
1,489
[ 0.022691810503602028, -0.0003313454217277467, -0.04758896306157112, 0.033056918531656265, -0.012999911792576313, -0.01644721068441868, 0.0021777753718197346, -0.0038622505962848663, -0.05845317617058754, 0.003934794571250677, -0.03953365981578827, -0.023214127868413925, 0.06072815880179405, ...
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": "Dialog", "annotation": null, "type_comment": null}}], "kwarg": nu...
def retranslateUi(self, Dialog): _translate = QtCore.QCoreApplication.translate Dialog.setWindowTitle(_translate("Dialog", "Profile collections")) self.preview_box.setTitle(_translate("Dialog", "Preview")) self.common_label.setText(_translate("Dialog", "Common:")) self.common_loa...
1,490
[ -0.016047267243266106, -0.007597763556987047, -0.0752493366599083, -0.00105387344956398, -0.0012374911457300186, -0.006381874438375235, -0.007647139951586723, 0.02693472057580948, -0.00673368014395237, -0.039525654166936874, 0.0615721270442009, -0.0011665128404274583, 0.010905969887971878, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "view", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def get_cart(view): request = view.request if request.user.is_authenticated(): cart = request.user.cart else: # May update try-catch later, as I think it is an ugly implementation. # Settin modified to True will make sure that session_key is not None try: reques...
1,491
[ 0.021069075912237167, -0.0004672474751714617, -0.010544716380536556, -0.04771585762500763, 0.010066336020827293, -0.008666819892823696, -0.012163065373897552, 0.043115269392728806, 0.0024873213842511177, 0.026239650323987007, 0.04372596740722656, -0.027786752209067345, 0.005257090553641319, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def _plugin_execute(self, *cmd, **kwargs): # Prepare arguments for plugin call args = {} args.update(map(lambda x: (x, str(kwargs[x])), kwargs)) args['cmd_args'] = jsonutils.dumps(cmd) ret = self._session.call_plugin('xenhost', 'iptables_config', args) json_ret = jsonutil...
1,492
[ 0.019011322408914566, -0.02215101756155491, -0.007883869111537933, -0.003491757670417428, -0.011935463175177574, -0.014417207799851894, -0.005272265523672104, 0.0005151064251549542, -0.003234925912693143, 0.04520238935947418, -0.003783218562602997, 0.020812030881643295, -0.057853519916534424...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "variable", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "lowered_value", "annotation": null, "type_comment": null}}, {...
def recover_value_for_variable(variable, lowered_value, project: bool = True): if variable.attributes['diag']: return sp.diags(lowered_value.flatten()) elif attributes_present([variable], SYMMETRIC_ATTRIBUTES): n = variable.shape[0] value = np.zeros(variable.shape) idxs = np.triu...
1,493
[ 0.038571976125240326, 0.015454725362360477, -0.032842766493558884, -0.011163711547851562, -0.004146605264395475, 0.001721121254377067, -0.01121675968170166, -0.014712050557136536, -0.003126900177448988, -0.0057321591302752495, 0.053897030651569366, 0.00036912746145389974, 0.00376053201034665...
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": "solution", "annotation": null, "type_comment": null}}, {"_type": ...
def invert(self, solution, inverse_data): if not inverse_data: return solution id2new_var, id2old_var, cons_id_map = inverse_data pvars = {} for id, var in id2old_var.items(): new_var = id2new_var[id] if new_var.id in solution.primal_vars: ...
1,494
[ 0.011922581121325493, 0.0009614985319785774, 0.023414932191371918, 0.017443863674998283, -0.020103467628359795, 0.001117945765145123, 0.018734553828835487, -0.057311829179525375, 0.00632959371432662, 0.034522686153650284, 0.0178349819034338, -0.016883261501789093, 0.02466651052236557, 0.01...
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": "problem", "annotation": null, "type_comment": null}}], "kwarg": n...
def apply(self, problem): if not attributes_present(problem.variables(), CONVEX_ATTRIBUTES): return problem, () # For each unique variable, add constraints. id2new_var = {} id2new_obj = {} id2old_var = {} constr = [] for var in problem.variables(): ...
1,495
[ 0.02775656059384346, -0.0018446017056703568, -0.008778966963291168, -0.022307107225060463, -0.02011713944375515, 0.041532982140779495, -0.008963586762547493, -0.006327986251562834, 0.03277311101555824, -0.0037655974738299847, -0.03875732421875, -0.032696716487407684, -0.00569773418828845, ...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class AstronomyPicSkill(MycroftSkill): def __init__(self): super(AstronomyPicSkill, self).__init__(name="AstronomyPicSkill") try: self.key = self.config_core.get("APIS").get("NASA") except: try: self.key = self.config["NASAAPI"] except: ...
1,496
[ 0.05140945687890053, -0.024662325158715248, 0.01833682879805565, -0.015944039449095726, 0.013563093729317188, 0.029447905719280243, -0.003447039518505335, -0.019971508532762527, 0.006248499732464552, 0.00956523884087801, -0.032077606767416, -0.027102496474981308, -0.015754511579871178, -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 __init__(self): super(AstronomyPicSkill, self).__init__(name="AstronomyPicSkill") try: self.key = self.config_core.get("APIS").get("NASA") except: try: self.key = self.config["NASAAPI"] except: self.key = "DEMO_KEY" ...
1,497
[ 0.02688179910182953, 0.003115793690085411, 0.05569656938314438, 0.02832029014825821, -0.03097250685095787, -0.018543045967817307, 0.011710215359926224, 0.020498495548963547, -0.0603267140686512, -0.024724062532186508, 0.007737507577985525, -0.06644029915332794, 0.05452779680490494, -0.0083...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "reimbursement"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_com...
class Reimbursement(Base): __tablename__ = 'reimbursement' id = Column(mysql.VARBINARY(50), primary_key = True, nullable = False) max_amount = Column(mysql.INTEGER(10), nullable = False, default = 0) details = Column(mysql.VARBINARY(1000), nullable = False, default = "") name = Column(mysql.VAR...
1,498
[ 0.010106267407536507, -0.008898444473743439, -0.0068155680783092976, -0.016293274238705635, -0.02499452419579029, -0.021999618038535118, 0.016712315380573273, 0.017513420432806015, 0.044590823352336884, -0.00016060644702520221, -0.037787578999996185, -0.02307186834514141, -0.0225172564387321...
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": "message", "annotation": null, "type_comment": null}}], "kwarg": n...
def handle_apod_intent(self, message): apod_url = "https://api.nasa.gov/planetary/apod?api_key=" + self.key response = unirest.get(apod_url) title = response.body["title"] url = response.body["url"] summary = response.body["explanation"] apod = urllib2.Request(url) ...
1,499
[ 0.03846845030784607, 0.05640828236937523, 0.0195294376462698, 0.012137772515416145, 0.007658491842448711, -0.046779815107584, 0.01904120109975338, -0.0344490185379982, -0.0001289780338993296, 0.006789885926991701, 0.014385929331183434, -0.03535736724734306, 0.02438908815383911, -0.00625055...
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": {"_type": "arg", "_fields": {"arg...
class BaseRawCell(object): def __init__(self, *args): assert len(args)==len(RAW_ATTRIBUTES) for attr, val in zip(RAW_ATTRIBUTES, args): setattr(self, attr, val) def _replace(self, **kwargs): self.__dict__.update(kwargs) ret...
1,500
[ 0.005315197631716728, 0.03644028306007385, 0.013789820484817028, -0.04746263846755028, -0.005493361037224531, 0.0034088531974703074, 0.012708964757621288, -0.08043467998504639, -0.010778864845633507, -0.011503394693136215, -0.01671169511973858, -0.05173855274915695, 0.01598716527223587, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "workbook_name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "sheet_name", "annotation": null, "type_comment": null}},...
def iter_rows(workbook_name, sheet_name, xml_source, range_string = '', row_offset = 0, column_offset = 0): archive = get_archive_file(workbook_name) source = xml_source if range_string: min_col, min_row, max_col, max_row = get_range_boundaries(range_string, row_offset, column_offset) ...