code
stringlengths
3
6.57k
api_client.sanitize_for_serialization(path_params)
api_client.parameters_to_tuples(path_params, collection_formats)
quote(str(v)
path.replace('//', '/')
query_params.append(('loadEncoding', self.load_encoding)
query_params.append(('password', self.password)
query_params.append(('destFileName', self.dest_file_name)
query_params.append(('revisionAuthor', self.revision_author)
query_params.append(('revisionDateTime', self.revision_date_time)
form_params.append(['document', self.document, 'file'])
form_params.append(['listInsert', self.list_insert.to_json()
get_response_type(self)
deserialize_response(self, api_client, response)
self.getparts(response)
self.deserialize(json.loads(multipart[0].text)
self.deserialize_file(multipart[1].content, multipart[1].headers, api_client)
test_simple_script_for_addition(xll_addin_path)
set_env_vars('basic_functions')
Excel()
excel.register_xll(xll_addin_path)
excel.new_workbook()
range('A1')
set(3.0)
range('A2')
set(4.0)
range('B1')
set_formula('=excelbind.execute_python("return arg0 + arg1", A1, A2)
calculate()
excel.range('B1')
print("done testing")
test_combination_str_n_float(xll_addin_path)
set_env_vars('basic_functions')
Excel()
excel.register_xll(xll_addin_path)
excel.new_workbook()
range('A1')
set("Hello times ")
range('A2')
set(3.0)
range('B1')
set_formula('=excelbind.execute_python("return arg0 + str(arg1)
calculate()
excel.range('B1')
print("done testing")
TestTenantNetworksClient(base.BaseServiceTest)
setUp(self)
super(TestTenantNetworksClient, self)
setUp()
fake_auth_provider.FakeAuthProvider()
_test_list_tenant_networks(self, bytes_body=False)
test_list_tenant_networks_with_str_body(self)
self._test_list_tenant_networks()
test_list_tenant_networks_with_bytes_body(self)
self._test_list_tenant_networks(bytes_body=True)
_test_show_tenant_network(self, bytes_body=False)
test_show_tenant_network_with_str_body(self)
self._test_show_tenant_network()
test_show_tenant_network_with_bytes_body(self)
self._test_show_tenant_network(bytes_body=True)
Migration(migrations.Migration)
models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')
model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')
model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')
models.CharField(blank=True, max_length=500, null=True, unique=True, verbose_name='FAQ Question')
models.TextField(blank=True, null=True, unique=True, verbose_name='FAQ Answer')
models.BooleanField(default=False, verbose_name='FAQ Active?')
logging.getLogger(__name__)
dropfile(cachedir, user=None)
os.path.join(cachedir, '.dfn')
mask (to avoid a race condition on file creation)
os.umask(191)
log.info('Rotating AES key')
os.path.isfile(dfn)
log.info('AES key rotation already requested')
os.path.isfile(dfn)
os.access(dfn, os.W_OK)
os.chmod(dfn, stat.S_IRUSR | stat.S_IWUSR)
salt.utils.fopen(dfn, 'wb+')
fp_.write('')
os.chmod(dfn, stat.S_IRUSR)
pwd.getpwnam(user)
os.chown(dfn, uid, -1)
except (KeyError, ImportError, OSError, IOError)
os.umask(mask)
gen_keys(keydir, keyname, keysize, user=None)
written. (i.e. 'master' or 'minion')
os.path.join(keydir, keyname)
format(base)
format(base)
salt.utils.reinit_crypto()
RSA.generate(bits=keysize, e=65537)
os.path.isfile(priv)
os.umask(191)
salt.utils.fopen(priv, 'wb+')
f.write(gen.exportKey('PEM')
os.umask(cumask)
salt.utils.fopen(pub, 'wb+')
f.write(gen.publickey()
exportKey('PEM')
os.chmod(priv, 256)