body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
4e93b4f7d2aba8e291cf41e1f9fcee83a37b1bfbf5e8167408cb6328caf3210c
def vm_disk_snapshot_delete(name, kwargs=None, call=None): '\n Deletes a disk snapshot based on the given VM and the disk_id.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the snapshot to delete.\n\n disk_id\n The ID of the disk to save.\n\n snapshot_id\n T...
Deletes a disk snapshot based on the given VM and the disk_id. .. versionadded:: Boron name The name of the VM containing the snapshot to delete. disk_id The ID of the disk to save. snapshot_id The ID of the snapshot to be deleted. CLI Example: .. code-block:: bash salt-cloud -a vm_disk_snapshot_...
salt/cloud/clouds/opennebula.py
vm_disk_snapshot_delete
seblu/salt
2
python
def vm_disk_snapshot_delete(name, kwargs=None, call=None): '\n Deletes a disk snapshot based on the given VM and the disk_id.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the snapshot to delete.\n\n disk_id\n The ID of the disk to save.\n\n snapshot_id\n T...
def vm_disk_snapshot_delete(name, kwargs=None, call=None): '\n Deletes a disk snapshot based on the given VM and the disk_id.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the snapshot to delete.\n\n disk_id\n The ID of the disk to save.\n\n snapshot_id\n T...
296c83ce0ae9715f48b37f11f8a0ff08dcf553b9b8410d1b62990f3eab0709de
def vm_disk_snapshot_revert(name, kwargs=None, call=None): '\n Reverts a disk state to a previously taken snapshot.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the snapshot.\n\n disk_id\n The ID of the disk to revert its state.\n\n snapshot_id\n The ID of...
Reverts a disk state to a previously taken snapshot. .. versionadded:: Boron name The name of the VM containing the snapshot. disk_id The ID of the disk to revert its state. snapshot_id The ID of the snapshot to which the snapshot should be reverted. CLI Example: .. code-block:: bash salt-cloud -...
salt/cloud/clouds/opennebula.py
vm_disk_snapshot_revert
seblu/salt
2
python
def vm_disk_snapshot_revert(name, kwargs=None, call=None): '\n Reverts a disk state to a previously taken snapshot.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the snapshot.\n\n disk_id\n The ID of the disk to revert its state.\n\n snapshot_id\n The ID of...
def vm_disk_snapshot_revert(name, kwargs=None, call=None): '\n Reverts a disk state to a previously taken snapshot.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the snapshot.\n\n disk_id\n The ID of the disk to revert its state.\n\n snapshot_id\n The ID of...
b0bee907e5d93aab78ad6083873f53e991f63f86995fd09657e695c02b9e14ae
def vm_info(name, call=None): '\n Retrieves information for a given virtual machine. A VM name must be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to gather information.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a vm_info my-vm\n ' ...
Retrieves information for a given virtual machine. A VM name must be supplied. .. versionadded:: Boron name The name of the VM for which to gather information. CLI Example: .. code-block:: bash salt-cloud -a vm_info my-vm
salt/cloud/clouds/opennebula.py
vm_info
seblu/salt
2
python
def vm_info(name, call=None): '\n Retrieves information for a given virtual machine. A VM name must be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to gather information.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a vm_info my-vm\n ' ...
def vm_info(name, call=None): '\n Retrieves information for a given virtual machine. A VM name must be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to gather information.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a vm_info my-vm\n ' ...
d71a59d46f83bc95d0b342fc48adedb00e650a9f7ae9d888e000d1d28f9e10da
def vm_migrate(name, kwargs=None, call=None): '\n Migrates the specified virtual machine to the specified target host.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to migrate.\n\n host_id\n The ID of the host to which the VM will be migrated.\n\n live_migration\n If ...
Migrates the specified virtual machine to the specified target host. .. versionadded:: Boron name The name of the VM to migrate. host_id The ID of the host to which the VM will be migrated. live_migration If set to ``True``, a live-migration will be performed. Default is ``False``. capacity_maintained ...
salt/cloud/clouds/opennebula.py
vm_migrate
seblu/salt
2
python
def vm_migrate(name, kwargs=None, call=None): '\n Migrates the specified virtual machine to the specified target host.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to migrate.\n\n host_id\n The ID of the host to which the VM will be migrated.\n\n live_migration\n If ...
def vm_migrate(name, kwargs=None, call=None): '\n Migrates the specified virtual machine to the specified target host.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to migrate.\n\n host_id\n The ID of the host to which the VM will be migrated.\n\n live_migration\n If ...
acdac0f6fcb1898b0ee10c19446357be20675da7b07b31d2a1deb4062d76ff34
def vm_monitoring(name, call=None): '\n Returns the monitoring records for a given virtual machine. A VM name must be\n supplied.\n\n The monitoring information returned is a list of VM elements. Each VM element\n contains the complete dictionary of the VM with the updated information returned\n by t...
Returns the monitoring records for a given virtual machine. A VM name must be supplied. The monitoring information returned is a list of VM elements. Each VM element contains the complete dictionary of the VM with the updated information returned by the poll action. .. versionadded:: Boron name The name of the V...
salt/cloud/clouds/opennebula.py
vm_monitoring
seblu/salt
2
python
def vm_monitoring(name, call=None): '\n Returns the monitoring records for a given virtual machine. A VM name must be\n supplied.\n\n The monitoring information returned is a list of VM elements. Each VM element\n contains the complete dictionary of the VM with the updated information returned\n by t...
def vm_monitoring(name, call=None): '\n Returns the monitoring records for a given virtual machine. A VM name must be\n supplied.\n\n The monitoring information returned is a list of VM elements. Each VM element\n contains the complete dictionary of the VM with the updated information returned\n by t...
38fbfe7313495cb2cc5d52ec315fa86a6dcf30fdac28309a93b11735f0b81602
def vm_resize(name, kwargs=None, call=None): '\n Changes the capacity of the virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to resize.\n\n path\n The path to a file containing new capacity elements CPU, VCPU, MEMORY. If one\n of them is not present, or it...
Changes the capacity of the virtual machine. .. versionadded:: Boron name The name of the VM to resize. path The path to a file containing new capacity elements CPU, VCPU, MEMORY. If one of them is not present, or its value is 0, it will not be resized. Syntax within the file can be the usual attribu...
salt/cloud/clouds/opennebula.py
vm_resize
seblu/salt
2
python
def vm_resize(name, kwargs=None, call=None): '\n Changes the capacity of the virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to resize.\n\n path\n The path to a file containing new capacity elements CPU, VCPU, MEMORY. If one\n of them is not present, or it...
def vm_resize(name, kwargs=None, call=None): '\n Changes the capacity of the virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to resize.\n\n path\n The path to a file containing new capacity elements CPU, VCPU, MEMORY. If one\n of them is not present, or it...
05300c21bce4330ca11c9c26d869ac3e2cfe8213fe29cfdb06a4e9de259ff14c
def vm_snapshot_create(vm_name, kwargs=None, call=None): '\n Creates a new virtual machine snapshot from the provided VM.\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM from which to create the snapshot.\n\n snapshot_name\n The name of the snapshot to be created.\n\n CLI E...
Creates a new virtual machine snapshot from the provided VM. .. versionadded:: Boron vm_name The name of the VM from which to create the snapshot. snapshot_name The name of the snapshot to be created. CLI Exmampe: .. code-block:: bash salt-cloud -a vm_snapshot_create my-vm snapshot_name=my-new-snapsho...
salt/cloud/clouds/opennebula.py
vm_snapshot_create
seblu/salt
2
python
def vm_snapshot_create(vm_name, kwargs=None, call=None): '\n Creates a new virtual machine snapshot from the provided VM.\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM from which to create the snapshot.\n\n snapshot_name\n The name of the snapshot to be created.\n\n CLI E...
def vm_snapshot_create(vm_name, kwargs=None, call=None): '\n Creates a new virtual machine snapshot from the provided VM.\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM from which to create the snapshot.\n\n snapshot_name\n The name of the snapshot to be created.\n\n CLI E...
5cc389242e7a07141e3b7805c8787d8d1f94d8e150bf846c8e3b37fd5d521dd9
def vm_snapshot_delete(vm_name, kwargs=None, call=None): '\n Deletes a virtual machine snapshot from the provided VM.\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM from which to delete the snapshot.\n\n snapshot_id\n The ID of the snapshot to be deleted.\n\n CLI Exmampe:\...
Deletes a virtual machine snapshot from the provided VM. .. versionadded:: Boron vm_name The name of the VM from which to delete the snapshot. snapshot_id The ID of the snapshot to be deleted. CLI Exmampe: .. code-block:: bash salt-cloud -a vm_snapshot_delete my-vm snapshot_id=8
salt/cloud/clouds/opennebula.py
vm_snapshot_delete
seblu/salt
2
python
def vm_snapshot_delete(vm_name, kwargs=None, call=None): '\n Deletes a virtual machine snapshot from the provided VM.\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM from which to delete the snapshot.\n\n snapshot_id\n The ID of the snapshot to be deleted.\n\n CLI Exmampe:\...
def vm_snapshot_delete(vm_name, kwargs=None, call=None): '\n Deletes a virtual machine snapshot from the provided VM.\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM from which to delete the snapshot.\n\n snapshot_id\n The ID of the snapshot to be deleted.\n\n CLI Exmampe:\...
4cc0f2b6b6ae51e44c44b3783713c7e74d775158c5412ba506b4e70164957b5b
def vm_snapshot_revert(vm_name, kwargs=None, call=None): '\n Reverts a virtual machine to a snapshot\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM to revert.\n\n snapshot_id\n The snapshot ID.\n\n CLI Exmampe:\n\n .. code-block:: bash\n\n salt-cloud -a vm_snapsh...
Reverts a virtual machine to a snapshot .. versionadded:: Boron vm_name The name of the VM to revert. snapshot_id The snapshot ID. CLI Exmampe: .. code-block:: bash salt-cloud -a vm_snapshot_create my-vm snapshot_name=my-new-snapshot
salt/cloud/clouds/opennebula.py
vm_snapshot_revert
seblu/salt
2
python
def vm_snapshot_revert(vm_name, kwargs=None, call=None): '\n Reverts a virtual machine to a snapshot\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM to revert.\n\n snapshot_id\n The snapshot ID.\n\n CLI Exmampe:\n\n .. code-block:: bash\n\n salt-cloud -a vm_snapsh...
def vm_snapshot_revert(vm_name, kwargs=None, call=None): '\n Reverts a virtual machine to a snapshot\n\n .. versionadded:: Boron\n\n vm_name\n The name of the VM to revert.\n\n snapshot_id\n The snapshot ID.\n\n CLI Exmampe:\n\n .. code-block:: bash\n\n salt-cloud -a vm_snapsh...
1a3760a7a368b40b36fdf40eca318ce695d0ff8f214b69990b16c0d7223843a1
def vm_update(name, kwargs=None, call=None): "\n Replaces the user template contents.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to update.\n\n path\n The path to a file containing new user template contents. Syntax within the\n file can be the usual attribute=value o...
Replaces the user template contents. .. versionadded:: Boron name The name of the VM to update. path The path to a file containing new user template contents. Syntax within the file can be the usual attribute=value or XML. update_type There are two ways to update a VM: ``replace`` the whole template...
salt/cloud/clouds/opennebula.py
vm_update
seblu/salt
2
python
def vm_update(name, kwargs=None, call=None): "\n Replaces the user template contents.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to update.\n\n path\n The path to a file containing new user template contents. Syntax within the\n file can be the usual attribute=value o...
def vm_update(name, kwargs=None, call=None): "\n Replaces the user template contents.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to update.\n\n path\n The path to a file containing new user template contents. Syntax within the\n file can be the usual attribute=value o...
614129ea7dd17f9c021163ce2ed7ce1ccb40041dce281fa60627d27f6a810c6a
def vn_add_ar(call=None, kwargs=None): '\n Adds address ranges to a given virtual network.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network to add the address range.\n\n path\n The path to a file containing the template of the address range to add.\n Syntax with...
Adds address ranges to a given virtual network. .. versionadded:: Boron vn_id The ID of the virtual network to add the address range. path The path to a file containing the template of the address range to add. Syntax within the file can be the usual attribute=value or XML. CLI Example: .. code-block::...
salt/cloud/clouds/opennebula.py
vn_add_ar
seblu/salt
2
python
def vn_add_ar(call=None, kwargs=None): '\n Adds address ranges to a given virtual network.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network to add the address range.\n\n path\n The path to a file containing the template of the address range to add.\n Syntax with...
def vn_add_ar(call=None, kwargs=None): '\n Adds address ranges to a given virtual network.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network to add the address range.\n\n path\n The path to a file containing the template of the address range to add.\n Syntax with...
34e6399d4c327103ca02544d97cd541f3db98862c103c17cf33ef5e52d079fb1
def vn_allocate(call=None, kwargs=None): '\n Allocates a new virtual network in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the virtual network to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n cluster_id...
Allocates a new virtual network in OpenNebula. .. versionadded:: Boron path The path to a file containing the template of the virtual network to allocate. Syntax within the file can be the usual attribute=value or XML. cluster_id The ID of the cluster for which to add the new virtual network. If not prov...
salt/cloud/clouds/opennebula.py
vn_allocate
seblu/salt
2
python
def vn_allocate(call=None, kwargs=None): '\n Allocates a new virtual network in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the virtual network to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n cluster_id...
def vn_allocate(call=None, kwargs=None): '\n Allocates a new virtual network in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the virtual network to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n cluster_id...
a3e564a8d3e89a49eac71b9b2075f190f7ecae19f29c18317c319834586939c6
def vn_delete(call=None, kwargs=None): '\n Deletes the given virtual network from OpenNebula. Either a name or a vn_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the virtual network to delete.\n\n vn_id\n The ID of the virtual network to delete.\n\n CLI Ex...
Deletes the given virtual network from OpenNebula. Either a name or a vn_id must be supplied. .. versionadded:: Boron name The name of the virtual network to delete. vn_id The ID of the virtual network to delete. CLI Example: .. code-block:: bash salt-cloud -f vn_delete opennebula name=my-virtual-netw...
salt/cloud/clouds/opennebula.py
vn_delete
seblu/salt
2
python
def vn_delete(call=None, kwargs=None): '\n Deletes the given virtual network from OpenNebula. Either a name or a vn_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the virtual network to delete.\n\n vn_id\n The ID of the virtual network to delete.\n\n CLI Ex...
def vn_delete(call=None, kwargs=None): '\n Deletes the given virtual network from OpenNebula. Either a name or a vn_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the virtual network to delete.\n\n vn_id\n The ID of the virtual network to delete.\n\n CLI Ex...
48944f8f0ab8eebad568bcbd32e860b2631ff7e868207c299ddf53d64dc6771f
def vn_free_ar(call=None, kwargs=None): '\n Frees a reserved address range from a virtual network.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to free an address range.\n\n ar_id\n The ID of the address range to free.\n\n CLI Example:\n\n .. code-...
Frees a reserved address range from a virtual network. .. versionadded:: Boron vn_id The ID of the virtual network from which to free an address range. ar_id The ID of the address range to free. CLI Example: .. code-block:: bash salt-cloud -f vn_free_ar opennebula vn_id=3 ar_id=1
salt/cloud/clouds/opennebula.py
vn_free_ar
seblu/salt
2
python
def vn_free_ar(call=None, kwargs=None): '\n Frees a reserved address range from a virtual network.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to free an address range.\n\n ar_id\n The ID of the address range to free.\n\n CLI Example:\n\n .. code-...
def vn_free_ar(call=None, kwargs=None): '\n Frees a reserved address range from a virtual network.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to free an address range.\n\n ar_id\n The ID of the address range to free.\n\n CLI Example:\n\n .. code-...
3438ad7eec1f7b0576eaf79fc22654062fb5215ac352128e2c5bf026d1698416
def vn_hold(call=None, kwargs=None): '\n Holds a virtual network lease as used.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to hold the lease.\n\n path\n The path to a file defining the template of the lease to hold.\n Syntax within the file can ...
Holds a virtual network lease as used. .. versionadded:: Boron vn_id The ID of the virtual network from which to hold the lease. path The path to a file defining the template of the lease to hold. Syntax within the file can be the usual attribute=value or XML. CLI Example: .. code-block:: bash sal...
salt/cloud/clouds/opennebula.py
vn_hold
seblu/salt
2
python
def vn_hold(call=None, kwargs=None): '\n Holds a virtual network lease as used.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to hold the lease.\n\n path\n The path to a file defining the template of the lease to hold.\n Syntax within the file can ...
def vn_hold(call=None, kwargs=None): '\n Holds a virtual network lease as used.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to hold the lease.\n\n path\n The path to a file defining the template of the lease to hold.\n Syntax within the file can ...
5f1f5f165b878bab70461f8af37e278810ad8819e7285233faf2a455075fe0b6
def vn_info(call=None, kwargs=None): '\n Retrieves information for the virtual network.\n\n .. versionadded:: Boron\n\n name\n The name of the virtual network for which to gather information.\n\n vn_id\n The ID of the virtual network for which to gather information.\n\n CLI Example:\n\n...
Retrieves information for the virtual network. .. versionadded:: Boron name The name of the virtual network for which to gather information. vn_id The ID of the virtual network for which to gather information. CLI Example: .. code-block:: bash salt-cloud -f vn_info opennebula vn_id=3 salt-cloud --...
salt/cloud/clouds/opennebula.py
vn_info
seblu/salt
2
python
def vn_info(call=None, kwargs=None): '\n Retrieves information for the virtual network.\n\n .. versionadded:: Boron\n\n name\n The name of the virtual network for which to gather information.\n\n vn_id\n The ID of the virtual network for which to gather information.\n\n CLI Example:\n\n...
def vn_info(call=None, kwargs=None): '\n Retrieves information for the virtual network.\n\n .. versionadded:: Boron\n\n name\n The name of the virtual network for which to gather information.\n\n vn_id\n The ID of the virtual network for which to gather information.\n\n CLI Example:\n\n...
edfb1f2fe890f9ff0da4739d81399b428a0d0f7a1c5587298938ed1fc04599e0
def vn_release(call=None, kwargs=None): '\n Releases a virtual network lease that was previously on hold.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to release the lease.\n\n path\n The path to a file defining the template of the lease to release.\n ...
Releases a virtual network lease that was previously on hold. .. versionadded:: Boron vn_id The ID of the virtual network from which to release the lease. path The path to a file defining the template of the lease to release. Syntax within the file can be the usual attribute=value or XML. CLI Example: ...
salt/cloud/clouds/opennebula.py
vn_release
seblu/salt
2
python
def vn_release(call=None, kwargs=None): '\n Releases a virtual network lease that was previously on hold.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to release the lease.\n\n path\n The path to a file defining the template of the lease to release.\n ...
def vn_release(call=None, kwargs=None): '\n Releases a virtual network lease that was previously on hold.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to release the lease.\n\n path\n The path to a file defining the template of the lease to release.\n ...
f2725fce22eb19bc3e758e5148dcd9bd2b447206ec85501c250d9d7127c67501
def vn_reserve(call=None, kwargs=None): '\n Reserve network addresses.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to reserve addresses.\n\n path\n The path to a file defining the template of the address reservation.\n Syntax within the file can ...
Reserve network addresses. .. versionadded:: Boron vn_id The ID of the virtual network from which to reserve addresses. path The path to a file defining the template of the address reservation. Syntax within the file can be the usual attribute=value or XML. CLI Example: .. code-block:: bash salt-c...
salt/cloud/clouds/opennebula.py
vn_reserve
seblu/salt
2
python
def vn_reserve(call=None, kwargs=None): '\n Reserve network addresses.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to reserve addresses.\n\n path\n The path to a file defining the template of the address reservation.\n Syntax within the file can ...
def vn_reserve(call=None, kwargs=None): '\n Reserve network addresses.\n\n .. versionadded:: Boron\n\n vn_id\n The ID of the virtual network from which to reserve addresses.\n\n path\n The path to a file defining the template of the address reservation.\n Syntax within the file can ...
9a00148748d8d758dd8e49ad265b87ab428803bbe1182b3fe80919bb77d06f8c
def template_update(call=None, kwargs=None): '\n Replaces the template contents.\n\n .. versionadded:: Boron\n\n template_id\n The ID of the template to update.\n\n path\n The path to a file containing the elements of the template to be updated.\n Syntax within the file can be the u...
Replaces the template contents. .. versionadded:: Boron template_id The ID of the template to update. path The path to a file containing the elements of the template to be updated. Syntax within the file can be the usual attribute=value or XML. update_type There are two ways to update a template: ``...
salt/cloud/clouds/opennebula.py
template_update
seblu/salt
2
python
def template_update(call=None, kwargs=None): '\n Replaces the template contents.\n\n .. versionadded:: Boron\n\n template_id\n The ID of the template to update.\n\n path\n The path to a file containing the elements of the template to be updated.\n Syntax within the file can be the u...
def template_update(call=None, kwargs=None): '\n Replaces the template contents.\n\n .. versionadded:: Boron\n\n template_id\n The ID of the template to update.\n\n path\n The path to a file containing the elements of the template to be updated.\n Syntax within the file can be the u...
96f57b42b8dae1231a029f0e14226a91ec0b4d68ecd2d2b696a270661f3ccea1
def _get_node(name): '\n Helper function that returns all information about a named node.\n\n name\n The name of the node for which to get information.\n ' attempts = 10 while (attempts >= 0): try: return list_nodes_full()[name] except KeyError: attemp...
Helper function that returns all information about a named node. name The name of the node for which to get information.
salt/cloud/clouds/opennebula.py
_get_node
seblu/salt
2
python
def _get_node(name): '\n Helper function that returns all information about a named node.\n\n name\n The name of the node for which to get information.\n ' attempts = 10 while (attempts >= 0): try: return list_nodes_full()[name] except KeyError: attemp...
def _get_node(name): '\n Helper function that returns all information about a named node.\n\n name\n The name of the node for which to get information.\n ' attempts = 10 while (attempts >= 0): try: return list_nodes_full()[name] except KeyError: attemp...
a8dd9bd1ce211130493ea11b435632331feedb3e264147472bb70aa38da786a5
def _get_xml_rpc(): '\n Uses the OpenNebula cloud provider configurations to connect to the\n OpenNebula API.\n\n Returns the server connection created as well as the user and password\n values from the cloud provider config file used to make the connection.\n ' vm_ = get_configured_provider() ...
Uses the OpenNebula cloud provider configurations to connect to the OpenNebula API. Returns the server connection created as well as the user and password values from the cloud provider config file used to make the connection.
salt/cloud/clouds/opennebula.py
_get_xml_rpc
seblu/salt
2
python
def _get_xml_rpc(): '\n Uses the OpenNebula cloud provider configurations to connect to the\n OpenNebula API.\n\n Returns the server connection created as well as the user and password\n values from the cloud provider config file used to make the connection.\n ' vm_ = get_configured_provider() ...
def _get_xml_rpc(): '\n Uses the OpenNebula cloud provider configurations to connect to the\n OpenNebula API.\n\n Returns the server connection created as well as the user and password\n values from the cloud provider config file used to make the connection.\n ' vm_ = get_configured_provider() ...
ed078df652868f0fcc42e45e88beadb54e329fdcdb03921e94ee66631fc295f1
def _list_nodes(full=False): '\n Helper function for the list_* query functions - Constructs the\n appropriate dictionaries to return from the API query.\n\n full\n If performing a full query, such as in list_nodes_full, change\n this parameter to ``True``.\n ' (server, user, password)...
Helper function for the list_* query functions - Constructs the appropriate dictionaries to return from the API query. full If performing a full query, such as in list_nodes_full, change this parameter to ``True``.
salt/cloud/clouds/opennebula.py
_list_nodes
seblu/salt
2
python
def _list_nodes(full=False): '\n Helper function for the list_* query functions - Constructs the\n appropriate dictionaries to return from the API query.\n\n full\n If performing a full query, such as in list_nodes_full, change\n this parameter to ``True``.\n ' (server, user, password)...
def _list_nodes(full=False): '\n Helper function for the list_* query functions - Constructs the\n appropriate dictionaries to return from the API query.\n\n full\n If performing a full query, such as in list_nodes_full, change\n this parameter to ``True``.\n ' (server, user, password)...
3b435c9b0a56afea087fe4d7bc5de8c5f182d6c1ee6646bcef66673c03961edb
def _xml_to_dict(xml): '\n Helper function to covert xml into a data dictionary.\n\n xml\n The xml data to convert.\n ' dicts = {} for item in xml: key = item.tag.lower() idx = 1 while (key in dicts): key += str(idx) idx += 1 if (item.t...
Helper function to covert xml into a data dictionary. xml The xml data to convert.
salt/cloud/clouds/opennebula.py
_xml_to_dict
seblu/salt
2
python
def _xml_to_dict(xml): '\n Helper function to covert xml into a data dictionary.\n\n xml\n The xml data to convert.\n ' dicts = {} for item in xml: key = item.tag.lower() idx = 1 while (key in dicts): key += str(idx) idx += 1 if (item.t...
def _xml_to_dict(xml): '\n Helper function to covert xml into a data dictionary.\n\n xml\n The xml data to convert.\n ' dicts = {} for item in xml: key = item.tag.lower() idx = 1 while (key in dicts): key += str(idx) idx += 1 if (item.t...
8f5ee6cbfd59615861c5237a7a6dd8d8e4967979afdbc2e824b0cf461c2dcc18
def _check_pwm_list(pwm_list): 'Check the input validity\n ' for pwm in pwm_list: if (not isinstance(pwm, PWM)): raise TypeError('element {0} of pwm_list is not of type PWM'.format(pwm)) return True
Check the input validity
concise/initializers.py
_check_pwm_list
gagneurlab/concise
29
python
def _check_pwm_list(pwm_list): '\n ' for pwm in pwm_list: if (not isinstance(pwm, PWM)): raise TypeError('element {0} of pwm_list is not of type PWM'.format(pwm)) return True
def _check_pwm_list(pwm_list): '\n ' for pwm in pwm_list: if (not isinstance(pwm, PWM)): raise TypeError('element {0} of pwm_list is not of type PWM'.format(pwm)) return True<|docstring|>Check the input validity<|endoftext|>
f4b33ab33074b6f8446ec503b46d0f736c65109cbccf3e979d7af5cc5463789a
def _truncated_normal(mean, stddev, seed=None, normalize=True, alpha=0.01): ' Add noise with truncnorm from numpy.\n Bounded (0.001,0.999)\n ' if (seed is not None): np.random.seed(seed) if (stddev == 0): X = mean else: gen_X = truncnorm(((alpha - mean) / stddev), (((1 - al...
Add noise with truncnorm from numpy. Bounded (0.001,0.999)
concise/initializers.py
_truncated_normal
gagneurlab/concise
29
python
def _truncated_normal(mean, stddev, seed=None, normalize=True, alpha=0.01): ' Add noise with truncnorm from numpy.\n Bounded (0.001,0.999)\n ' if (seed is not None): np.random.seed(seed) if (stddev == 0): X = mean else: gen_X = truncnorm(((alpha - mean) / stddev), (((1 - al...
def _truncated_normal(mean, stddev, seed=None, normalize=True, alpha=0.01): ' Add noise with truncnorm from numpy.\n Bounded (0.001,0.999)\n ' if (seed is not None): np.random.seed(seed) if (stddev == 0): X = mean else: gen_X = truncnorm(((alpha - mean) / stddev), (((1 - al...
65f7b5cc31b4cd0aaee182ba2b1b4d2cfca76b73fca44a1511dce6b1a1161d04
def analyse_input(inputs: List[str]) -> None: '\n Analyze whether list of input strings matches to application commands.\n\n Parameters\n ----------\n inputs: List[str]\n List of input strings\n\n Returns\n -------\n None\n\n Raises\n ------\n SyntaxError\n If number of co...
Analyze whether list of input strings matches to application commands. Parameters ---------- inputs: List[str] List of input strings Returns ------- None Raises ------ SyntaxError If number of command parameters was wrong TypeError If command parameter has wrong type
project/console_app.py
analyse_input
kznts9v-1lya/formal-lang-course
0
python
def analyse_input(inputs: List[str]) -> None: '\n Analyze whether list of input strings matches to application commands.\n\n Parameters\n ----------\n inputs: List[str]\n List of input strings\n\n Returns\n -------\n None\n\n Raises\n ------\n SyntaxError\n If number of co...
def analyse_input(inputs: List[str]) -> None: '\n Analyze whether list of input strings matches to application commands.\n\n Parameters\n ----------\n inputs: List[str]\n List of input strings\n\n Returns\n -------\n None\n\n Raises\n ------\n SyntaxError\n If number of co...
0f124953c6c4fb89ac5f571401d5d3640e25e94791ccbcaafe8a44052561967c
def repl() -> None: '\n Runs a console application.\n\n Returns\n -------\n None\n ' print(f''' {description} ''') while True: inputs = input('>>> ').strip().split(' ') inputs = list(filter(None, inputs)) for _ in inputs: i = inputs.pop(0) i = i...
Runs a console application. Returns ------- None
project/console_app.py
repl
kznts9v-1lya/formal-lang-course
0
python
def repl() -> None: '\n Runs a console application.\n\n Returns\n -------\n None\n ' print(f' {description} ') while True: inputs = input('>>> ').strip().split(' ') inputs = list(filter(None, inputs)) for _ in inputs: i = inputs.pop(0) i = i.str...
def repl() -> None: '\n Runs a console application.\n\n Returns\n -------\n None\n ' print(f' {description} ') while True: inputs = input('>>> ').strip().split(' ') inputs = list(filter(None, inputs)) for _ in inputs: i = inputs.pop(0) i = i.str...
14300afbb7750bd820ea77094600a7342a7d8792e8f1941039bee005a2f7ebe9
def create_by_one2one(send_id, rec_ids, content, message_type, group): '\n 创建一条私密消息,用于少量用户的流程通知\n :param send_id: 发送者\n :param rec_ids: 接收者\n :param content: 内容\n :param message_type: 类型\n :param group: 用户组\n :return: code\n ' rec_ids = list(set(rec_ids)) if (not message_type): ...
创建一条私密消息,用于少量用户的流程通知 :param send_id: 发送者 :param rec_ids: 接收者 :param content: 内容 :param message_type: 类型 :param group: 用户组 :return: code
apps/message/daos/message.py
create_by_one2one
ShaoNianyr/TcloudServer
349
python
def create_by_one2one(send_id, rec_ids, content, message_type, group): '\n 创建一条私密消息,用于少量用户的流程通知\n :param send_id: 发送者\n :param rec_ids: 接收者\n :param content: 内容\n :param message_type: 类型\n :param group: 用户组\n :return: code\n ' rec_ids = list(set(rec_ids)) if (not message_type): ...
def create_by_one2one(send_id, rec_ids, content, message_type, group): '\n 创建一条私密消息,用于少量用户的流程通知\n :param send_id: 发送者\n :param rec_ids: 接收者\n :param content: 内容\n :param message_type: 类型\n :param group: 用户组\n :return: code\n ' rec_ids = list(set(rec_ids)) if (not message_type): ...
48978c4c028691c3f9a55a50ecdf24533abf8090baabb782effff44f8c90323c
def get_5_message_by_user_id(user_id): "\n 获取一个用户10最近10信息,不论已读或者未读\n :param user_id: 用户\n :return: ['id', 'content', 'status', 'create_time']\n " messages = _get_message_query_by_user_id(user_id).filter((Message.status == Message.UNREAD)).limit(5).all() data = row2list(messages) if (len(data...
获取一个用户10最近10信息,不论已读或者未读 :param user_id: 用户 :return: ['id', 'content', 'status', 'create_time']
apps/message/daos/message.py
get_5_message_by_user_id
ShaoNianyr/TcloudServer
349
python
def get_5_message_by_user_id(user_id): "\n 获取一个用户10最近10信息,不论已读或者未读\n :param user_id: 用户\n :return: ['id', 'content', 'status', 'create_time']\n " messages = _get_message_query_by_user_id(user_id).filter((Message.status == Message.UNREAD)).limit(5).all() data = row2list(messages) if (len(data...
def get_5_message_by_user_id(user_id): "\n 获取一个用户10最近10信息,不论已读或者未读\n :param user_id: 用户\n :return: ['id', 'content', 'status', 'create_time']\n " messages = _get_message_query_by_user_id(user_id).filter((Message.status == Message.UNREAD)).limit(5).all() data = row2list(messages) if (len(data...
196db26a7344a22a9f2214f8ff8bd6a706334423c75a6f258e1ab34154718881
def delete_status(user, message_ids=None, isall=None): '\n 修改通知的状态,已读改为1,删除改为2\n :return: 修改成功\n ' if message_ids: with db.auto_commit(): query = f'UPDATE message SET status={Message.DISABLE} WHERE rec_id={user} and id in ({message_ids})' db.engine.execute(query) ...
修改通知的状态,已读改为1,删除改为2 :return: 修改成功
apps/message/daos/message.py
delete_status
ShaoNianyr/TcloudServer
349
python
def delete_status(user, message_ids=None, isall=None): '\n 修改通知的状态,已读改为1,删除改为2\n :return: 修改成功\n ' if message_ids: with db.auto_commit(): query = f'UPDATE message SET status={Message.DISABLE} WHERE rec_id={user} and id in ({message_ids})' db.engine.execute(query) ...
def delete_status(user, message_ids=None, isall=None): '\n 修改通知的状态,已读改为1,删除改为2\n :return: 修改成功\n ' if message_ids: with db.auto_commit(): query = f'UPDATE message SET status={Message.DISABLE} WHERE rec_id={user} and id in ({message_ids})' db.engine.execute(query) ...
a9b62ff2d9ddb2e4d21e704ad72ff5875711206e0aae2e467cc6acfaff697c42
def run_prediction(question_texts, context_text): 'Setup function to compute predictions' examples = [] for (i, question_text) in enumerate(question_texts): example = SquadExample(qas_id=str(i), question_text=question_text, context_text=context_text, answer_text=None, start_position_character=None, ...
Setup function to compute predictions
bert_squad.py
run_prediction
minhhn2910/conga2022
0
python
def run_prediction(question_texts, context_text): examples = [] for (i, question_text) in enumerate(question_texts): example = SquadExample(qas_id=str(i), question_text=question_text, context_text=context_text, answer_text=None, start_position_character=None, title='Predict', is_impossible=False, a...
def run_prediction(question_texts, context_text): examples = [] for (i, question_text) in enumerate(question_texts): example = SquadExample(qas_id=str(i), question_text=question_text, context_text=context_text, answer_text=None, start_position_character=None, title='Predict', is_impossible=False, a...
4637f08160ed8afa33c940a6d99d18548117d230410f7d7aaf8d359ef1b47f02
@staticmethod def is_enabled(profiling_config: AttrDict): '\n Returns whether or not the profiler hook should be instantiated:\n it should be enabled if any of the profiling options is on\n ' return profiling_config.MEMORY_PROFILING.TRACK_BY_LAYER_MEMORY
Returns whether or not the profiler hook should be instantiated: it should be enabled if any of the profiling options is on
vissl/hooks/profiling_hook.py
is_enabled
pcanas/vissl
0
python
@staticmethod def is_enabled(profiling_config: AttrDict): '\n Returns whether or not the profiler hook should be instantiated:\n it should be enabled if any of the profiling options is on\n ' return profiling_config.MEMORY_PROFILING.TRACK_BY_LAYER_MEMORY
@staticmethod def is_enabled(profiling_config: AttrDict): '\n Returns whether or not the profiler hook should be instantiated:\n it should be enabled if any of the profiling options is on\n ' return profiling_config.MEMORY_PROFILING.TRACK_BY_LAYER_MEMORY<|docstring|>Returns whether or not t...
1ff880c314e5ee53ffe140c1e420f3fafac2e5bea2e1b2f9b7b3e3f967fe25d0
def on_start(self, task: 'tasks.ClassyTask') -> None: '\n Called at the start of training.\n ' if self.profile_memory: assert (task.use_gpu is True), 'Profiling memory usage requires training on GPU' if (self.profile_memory and (self.start_iteration == 0)): self.layer_memory_tr...
Called at the start of training.
vissl/hooks/profiling_hook.py
on_start
pcanas/vissl
0
python
def on_start(self, task: 'tasks.ClassyTask') -> None: '\n \n ' if self.profile_memory: assert (task.use_gpu is True), 'Profiling memory usage requires training on GPU' if (self.profile_memory and (self.start_iteration == 0)): self.layer_memory_tracker.monitor(task.base_model)
def on_start(self, task: 'tasks.ClassyTask') -> None: '\n \n ' if self.profile_memory: assert (task.use_gpu is True), 'Profiling memory usage requires training on GPU' if (self.profile_memory and (self.start_iteration == 0)): self.layer_memory_tracker.monitor(task.base_model)<|...
feda8987e1f6d0fb957c390fd94a9c844a5501380c8531e3dca1d766e616be0d
def on_end(self, task: 'tasks.ClassyTask') -> None: '\n Called at the end of training.\n ' if self.profile_memory: self.layer_memory_tracker.stop()
Called at the end of training.
vissl/hooks/profiling_hook.py
on_end
pcanas/vissl
0
python
def on_end(self, task: 'tasks.ClassyTask') -> None: '\n \n ' if self.profile_memory: self.layer_memory_tracker.stop()
def on_end(self, task: 'tasks.ClassyTask') -> None: '\n \n ' if self.profile_memory: self.layer_memory_tracker.stop()<|docstring|>Called at the end of training.<|endoftext|>
17e4822a2257237655f8fea531aabe0b63a083c026214b9898d7943f220f0e81
def on_update(self, task: 'tasks.ClassyTask') -> None: '\n Called after parameter update.\n ' if self.profile_memory: iteration = task.local_iteration_num self._memory_tracking(iteration, task)
Called after parameter update.
vissl/hooks/profiling_hook.py
on_update
pcanas/vissl
0
python
def on_update(self, task: 'tasks.ClassyTask') -> None: '\n \n ' if self.profile_memory: iteration = task.local_iteration_num self._memory_tracking(iteration, task)
def on_update(self, task: 'tasks.ClassyTask') -> None: '\n \n ' if self.profile_memory: iteration = task.local_iteration_num self._memory_tracking(iteration, task)<|docstring|>Called after parameter update.<|endoftext|>
70751bc60ba17f011d0c7eb73126ae3fe3000adb7c728afc822a355e40954a26
def _memory_tracking(self, iteration: int, task: 'tasks.ClassyTask'): '\n Handle the memory tracking logic:\n - enabling / disabling the tracker depending on the iteration\n - dumping the statistics collected in previous iteration\n - preparing the tracker for the next iteration\n ...
Handle the memory tracking logic: - enabling / disabling the tracker depending on the iteration - dumping the statistics collected in previous iteration - preparing the tracker for the next iteration
vissl/hooks/profiling_hook.py
_memory_tracking
pcanas/vissl
0
python
def _memory_tracking(self, iteration: int, task: 'tasks.ClassyTask'): '\n Handle the memory tracking logic:\n - enabling / disabling the tracker depending on the iteration\n - dumping the statistics collected in previous iteration\n - preparing the tracker for the next iteration\n ...
def _memory_tracking(self, iteration: int, task: 'tasks.ClassyTask'): '\n Handle the memory tracking logic:\n - enabling / disabling the tracker depending on the iteration\n - dumping the statistics collected in previous iteration\n - preparing the tracker for the next iteration\n ...
ee17638c4b24dd67d54fc3badbc8bb1491eba91b6a0c155bd43a8af4f91bc756
def ingest_line(self, line): '\n Ingests a single line from the output of tangerine-tailleferre.\n ' if (self._prior_value_error is not None): raise _self.prior_value_error try: self._process_line(line) except ValueError as e: self._prior_value_error = e
Ingests a single line from the output of tangerine-tailleferre.
tangerine-tailleferre/plot-expenditures.py
ingest_line
j39m/katowice
1
python
def ingest_line(self, line): '\n \n ' if (self._prior_value_error is not None): raise _self.prior_value_error try: self._process_line(line) except ValueError as e: self._prior_value_error = e
def ingest_line(self, line): '\n \n ' if (self._prior_value_error is not None): raise _self.prior_value_error try: self._process_line(line) except ValueError as e: self._prior_value_error = e<|docstring|>Ingests a single line from the output of tangerine-tailleferre...
68f32bfe64da4ef2a869759debd8eb932475da966d22e84d45bbec4fd6a92844
def setUp(self): 'Set up test class.' self.loop = asyncio.new_event_loop() asyncio.set_event_loop(self.loop)
Set up test class.
test/io_tests/tunnelling_test.py
setUp
recMartin/xknxReM
1
python
def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(self.loop)
def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(self.loop)<|docstring|>Set up test class.<|endoftext|>
e9417bcb3dc8c34e18cfe9d6f67a4f8522677a4de5525f0a876e91af19bca9b9
def tearDown(self): 'Tear down test class.' self.loop.close()
Tear down test class.
test/io_tests/tunnelling_test.py
tearDown
recMartin/xknxReM
1
python
def tearDown(self): self.loop.close()
def tearDown(self): self.loop.close()<|docstring|>Tear down test class.<|endoftext|>
eed236e228e179b86311df4ee57d6860cdf3cf4b9f050f2a3c42f1b7bcc6808f
def test_tunnelling(self): 'Test tunnelling from KNX bus.' xknx = XKNX(loop=self.loop) communication_channel_id = 23 udp_client = UDPClient(xknx, ('192.168.1.1', 0), ('192.168.1.2', 1234)) telegram = Telegram(GroupAddress('1/2/3'), payload=DPTArray((1, 2, 3))) sequence_counter = 42 src_addre...
Test tunnelling from KNX bus.
test/io_tests/tunnelling_test.py
test_tunnelling
recMartin/xknxReM
1
python
def test_tunnelling(self): xknx = XKNX(loop=self.loop) communication_channel_id = 23 udp_client = UDPClient(xknx, ('192.168.1.1', 0), ('192.168.1.2', 1234)) telegram = Telegram(GroupAddress('1/2/3'), payload=DPTArray((1, 2, 3))) sequence_counter = 42 src_address = PhysicalAddress('2.2.2') ...
def test_tunnelling(self): xknx = XKNX(loop=self.loop) communication_channel_id = 23 udp_client = UDPClient(xknx, ('192.168.1.1', 0), ('192.168.1.2', 1234)) telegram = Telegram(GroupAddress('1/2/3'), payload=DPTArray((1, 2, 3))) sequence_counter = 42 src_address = PhysicalAddress('2.2.2') ...
032b4a7486ba7fff9f7c82fdcce99609a8197dce5e8c296608ce8d34bd5dc3d5
def backup_bashhist(basedir, histfile): '\n Backup bash history\n ' subprocess.call(['mkdir', '-p', basedir]) subprocess.call(['/bin/cp', histfile, base]) print(('Done backing up %s to %s' % (histfile, basedir)))
Backup bash history
attic/rojo_scripts/backups/backup_bashhist.py
backup_bashhist
charlesreid1/debian-dotfiles
2
python
def backup_bashhist(basedir, histfile): '\n \n ' subprocess.call(['mkdir', '-p', basedir]) subprocess.call(['/bin/cp', histfile, base]) print(('Done backing up %s to %s' % (histfile, basedir)))
def backup_bashhist(basedir, histfile): '\n \n ' subprocess.call(['mkdir', '-p', basedir]) subprocess.call(['/bin/cp', histfile, base]) print(('Done backing up %s to %s' % (histfile, basedir)))<|docstring|>Backup bash history<|endoftext|>
c830ae2b199e5f947b03f94740de2d37aa6081cd702a475be1f4598e8437d478
def __init__(self, num_days: int, init_timings: DayTiming): '\n Pass in simplest values on initialisation, set individual timings via method if required\n ' self.num_days = num_days self.timings = ([init_timings] * num_days)
Pass in simplest values on initialisation, set individual timings via method if required
tournament.py
__init__
maxwilliams94/ultimatePy
1
python
def __init__(self, num_days: int, init_timings: DayTiming): '\n \n ' self.num_days = num_days self.timings = ([init_timings] * num_days)
def __init__(self, num_days: int, init_timings: DayTiming): '\n \n ' self.num_days = num_days self.timings = ([init_timings] * num_days)<|docstring|>Pass in simplest values on initialisation, set individual timings via method if required<|endoftext|>
4a9d7839731a1f80dca03561bc412be0e14b1526f33a404a60618611fa68435c
async def get_client_config(opts=None): '\n Use this data source to access the configuration of the AzureRM provider.\n\n > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/client_config.html.markdown.\n ' __args__ = dict() __...
Use this data source to access the configuration of the AzureRM provider. > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/client_config.html.markdown.
sdk/python/kulado_azure/core/get_client_config.py
get_client_config
kulado/kulado-azure
0
python
async def get_client_config(opts=None): '\n Use this data source to access the configuration of the AzureRM provider.\n\n > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/client_config.html.markdown.\n ' __args__ = dict() __...
async def get_client_config(opts=None): '\n Use this data source to access the configuration of the AzureRM provider.\n\n > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/client_config.html.markdown.\n ' __args__ = dict() __...
d09704509a2a3840d0c21c9948bdddccc111904e2acee791d39e68f97e10e083
def OneHotOptionsStart(builder): 'This method is deprecated. Please switch to Start.' return Start(builder)
This method is deprecated. Please switch to Start.
tf2onnx/tflite/OneHotOptions.py
OneHotOptionsStart
guschmue/tensorflow-onnx
1,473
python
def OneHotOptionsStart(builder): return Start(builder)
def OneHotOptionsStart(builder): return Start(builder)<|docstring|>This method is deprecated. Please switch to Start.<|endoftext|>
6449216336939ebc4a9748fc1926bff8fc4d933ccc467dd6a62a7c504f09f9e4
def OneHotOptionsAddAxis(builder, axis): 'This method is deprecated. Please switch to AddAxis.' return AddAxis(builder, axis)
This method is deprecated. Please switch to AddAxis.
tf2onnx/tflite/OneHotOptions.py
OneHotOptionsAddAxis
guschmue/tensorflow-onnx
1,473
python
def OneHotOptionsAddAxis(builder, axis): return AddAxis(builder, axis)
def OneHotOptionsAddAxis(builder, axis): return AddAxis(builder, axis)<|docstring|>This method is deprecated. Please switch to AddAxis.<|endoftext|>
0561b725c4670876b7bdc7208d0a5316595aab4cff5d32e44e171e7a148f35d4
def OneHotOptionsEnd(builder): 'This method is deprecated. Please switch to End.' return End(builder)
This method is deprecated. Please switch to End.
tf2onnx/tflite/OneHotOptions.py
OneHotOptionsEnd
guschmue/tensorflow-onnx
1,473
python
def OneHotOptionsEnd(builder): return End(builder)
def OneHotOptionsEnd(builder): return End(builder)<|docstring|>This method is deprecated. Please switch to End.<|endoftext|>
c450b7edab95974ab30057f29c85726f91cb52d449734eb46e9a32f9840e4b0d
@classmethod def GetRootAsOneHotOptions(cls, buf, offset=0): 'This method is deprecated. Please switch to GetRootAs.' return cls.GetRootAs(buf, offset)
This method is deprecated. Please switch to GetRootAs.
tf2onnx/tflite/OneHotOptions.py
GetRootAsOneHotOptions
guschmue/tensorflow-onnx
1,473
python
@classmethod def GetRootAsOneHotOptions(cls, buf, offset=0): return cls.GetRootAs(buf, offset)
@classmethod def GetRootAsOneHotOptions(cls, buf, offset=0): return cls.GetRootAs(buf, offset)<|docstring|>This method is deprecated. Please switch to GetRootAs.<|endoftext|>
ddf9e420c2617fdd3145f79b4e18ef21dc9a002bcc831cd0044e00aaab9c6db4
def __init__(self, config, **kwargs): '\n Creates a new service client\n\n :param dict config:\n Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.\n The :py:meth:`~oci.config.from_file` method c...
Creates a new service client :param dict config: Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__. The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be pa...
src/oci/ons/notification_data_plane_client.py
__init__
CentroidChef/oci-python-sdk
249
python
def __init__(self, config, **kwargs): '\n Creates a new service client\n\n :param dict config:\n Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.\n The :py:meth:`~oci.config.from_file` method c...
def __init__(self, config, **kwargs): '\n Creates a new service client\n\n :param dict config:\n Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.\n The :py:meth:`~oci.config.from_file` method c...
ca9bd06919ae4ca23e052f996ff44042de8c5d6cc9a571c0dbc8693e8aff046d
def change_subscription_compartment(self, subscription_id, change_subscription_compartment_details, **kwargs): "\n Moves a subscription into a different compartment within the same tenancy. For information about moving\n resources between compartments, see\n `Moving Resources to a Different Com...
Moves a subscription into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. __ https://docs.cloud.oracle.com/iaas/Content/Identity/Ta...
src/oci/ons/notification_data_plane_client.py
change_subscription_compartment
CentroidChef/oci-python-sdk
249
python
def change_subscription_compartment(self, subscription_id, change_subscription_compartment_details, **kwargs): "\n Moves a subscription into a different compartment within the same tenancy. For information about moving\n resources between compartments, see\n `Moving Resources to a Different Com...
def change_subscription_compartment(self, subscription_id, change_subscription_compartment_details, **kwargs): "\n Moves a subscription into a different compartment within the same tenancy. For information about moving\n resources between compartments, see\n `Moving Resources to a Different Com...
ef80b32107cb0c26c70aa9e082116a651bfe3a72ada2eb85abfeec64d89373d0
def create_subscription(self, create_subscription_details, **kwargs): '\n Creates a subscription for the specified topic and sends a subscription confirmation URL to the endpoint. The subscription remains in "Pending" status until it has been confirmed.\n For information about confirming subscriptions...
Creates a subscription for the specified topic and sends a subscription confirmation URL to the endpoint. The subscription remains in "Pending" status until it has been confirmed. For information about confirming subscriptions, see `To confirm a subscription`__. Transactions Per Minute (TPM) per-tenancy limit for this...
src/oci/ons/notification_data_plane_client.py
create_subscription
CentroidChef/oci-python-sdk
249
python
def create_subscription(self, create_subscription_details, **kwargs): '\n Creates a subscription for the specified topic and sends a subscription confirmation URL to the endpoint. The subscription remains in "Pending" status until it has been confirmed.\n For information about confirming subscriptions...
def create_subscription(self, create_subscription_details, **kwargs): '\n Creates a subscription for the specified topic and sends a subscription confirmation URL to the endpoint. The subscription remains in "Pending" status until it has been confirmed.\n For information about confirming subscriptions...
1ee4ad5ad5cd9b94dbb068744dd6138a498e45d649bacbba6e85b1812be6f77e
def delete_subscription(self, subscription_id, **kwargs): "\n Deletes the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of the subscription to delete.\n\n __ h...
Deletes the specified subscription. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str subscription_id: (required) The `OCID`__ of the subscription to delete. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str opc_request_id: (optional)...
src/oci/ons/notification_data_plane_client.py
delete_subscription
CentroidChef/oci-python-sdk
249
python
def delete_subscription(self, subscription_id, **kwargs): "\n Deletes the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of the subscription to delete.\n\n __ h...
def delete_subscription(self, subscription_id, **kwargs): "\n Deletes the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of the subscription to delete.\n\n __ h...
aaf59eda3961f3dca3424f78f81e0cbeaa8dbee0ac8818f8f52c2f552058dde1
def get_confirm_subscription(self, id, token, protocol, **kwargs): '\n Gets the confirmation details for the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to get t...
Gets the confirmation details for the specified subscription. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str id: (required) The `OCID`__ of the subscription to get the confirmation details for. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm...
src/oci/ons/notification_data_plane_client.py
get_confirm_subscription
CentroidChef/oci-python-sdk
249
python
def get_confirm_subscription(self, id, token, protocol, **kwargs): '\n Gets the confirmation details for the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to get t...
def get_confirm_subscription(self, id, token, protocol, **kwargs): '\n Gets the confirmation details for the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to get t...
8a5c57f7e872a72a665d16036308585d690fb25edd628292e2c5c6612b7def32
def get_subscription(self, subscription_id, **kwargs): "\n Gets the specified subscription's configuration information.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of the subscription to retri...
Gets the specified subscription's configuration information. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str subscription_id: (required) The `OCID`__ of the subscription to retrieve. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str...
src/oci/ons/notification_data_plane_client.py
get_subscription
CentroidChef/oci-python-sdk
249
python
def get_subscription(self, subscription_id, **kwargs): "\n Gets the specified subscription's configuration information.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of the subscription to retri...
def get_subscription(self, subscription_id, **kwargs): "\n Gets the specified subscription's configuration information.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of the subscription to retri...
e0fc0e8849d72f16999a1e26288b93e7d5df258f4f509a4ac9226566342e8b8d
def get_unsubscription(self, id, token, protocol, **kwargs): '\n Unsubscribes the subscription from the topic.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to unsubscribe from.\n\n ...
Unsubscribes the subscription from the topic. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str id: (required) The `OCID`__ of the subscription to unsubscribe from. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str token: (required) ...
src/oci/ons/notification_data_plane_client.py
get_unsubscription
CentroidChef/oci-python-sdk
249
python
def get_unsubscription(self, id, token, protocol, **kwargs): '\n Unsubscribes the subscription from the topic.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to unsubscribe from.\n\n ...
def get_unsubscription(self, id, token, protocol, **kwargs): '\n Unsubscribes the subscription from the topic.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to unsubscribe from.\n\n ...
2e3cfa4965b9c290470293407ca91d3ccd942053fc351f6d9926d62846363368
def list_subscriptions(self, compartment_id, **kwargs): '\n Lists the subscriptions in the specified compartment or topic.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str compartment_id: (required)\n The `OCID`__ of the compartment.\n\n ...
Lists the subscriptions in the specified compartment or topic. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str compartment_id: (required) The `OCID`__ of the compartment. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str topic_id: (...
src/oci/ons/notification_data_plane_client.py
list_subscriptions
CentroidChef/oci-python-sdk
249
python
def list_subscriptions(self, compartment_id, **kwargs): '\n Lists the subscriptions in the specified compartment or topic.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str compartment_id: (required)\n The `OCID`__ of the compartment.\n\n ...
def list_subscriptions(self, compartment_id, **kwargs): '\n Lists the subscriptions in the specified compartment or topic.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str compartment_id: (required)\n The `OCID`__ of the compartment.\n\n ...
71ae686967b622b1e3a4987e4b5e6fc1b3ce819ef4c5f130aaa73aab6034d37b
def publish_message(self, topic_id, message_details, **kwargs): '\n Publishes a message to the specified topic.\n\n The topic endpoint is required for this operation.\n To get the topic endpoint, use :func:`get_topic`\n and review the `apiEndpoint` value in the response (:class:`Notifica...
Publishes a message to the specified topic. The topic endpoint is required for this operation. To get the topic endpoint, use :func:`get_topic` and review the `apiEndpoint` value in the response (:class:`NotificationTopic`). Limits information follows. Message size limit per request: 64KB. Message delivery rate lim...
src/oci/ons/notification_data_plane_client.py
publish_message
CentroidChef/oci-python-sdk
249
python
def publish_message(self, topic_id, message_details, **kwargs): '\n Publishes a message to the specified topic.\n\n The topic endpoint is required for this operation.\n To get the topic endpoint, use :func:`get_topic`\n and review the `apiEndpoint` value in the response (:class:`Notifica...
def publish_message(self, topic_id, message_details, **kwargs): '\n Publishes a message to the specified topic.\n\n The topic endpoint is required for this operation.\n To get the topic endpoint, use :func:`get_topic`\n and review the `apiEndpoint` value in the response (:class:`Notifica...
bca3ddd812bb7c16559fa9a897ef3b70d6eda974193af2904d5d452d70b77640
def resend_subscription_confirmation(self, id, **kwargs): '\n Resends the confirmation details for the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to resend the ...
Resends the confirmation details for the specified subscription. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str id: (required) The `OCID`__ of the subscription to resend the confirmation for. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm ...
src/oci/ons/notification_data_plane_client.py
resend_subscription_confirmation
CentroidChef/oci-python-sdk
249
python
def resend_subscription_confirmation(self, id, **kwargs): '\n Resends the confirmation details for the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to resend the ...
def resend_subscription_confirmation(self, id, **kwargs): '\n Resends the confirmation details for the specified subscription.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str id: (required)\n The `OCID`__ of the subscription to resend the ...
39ba285b0450ea63a86e4daacbbc9fbd38325761109815632d52b74e220fbd65
def update_subscription(self, subscription_id, update_subscription_details, **kwargs): "\n Updates the specified subscription's configuration.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of th...
Updates the specified subscription's configuration. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. :param str subscription_id: (required) The `OCID`__ of the subscription to update. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param oci.ons.models...
src/oci/ons/notification_data_plane_client.py
update_subscription
CentroidChef/oci-python-sdk
249
python
def update_subscription(self, subscription_id, update_subscription_details, **kwargs): "\n Updates the specified subscription's configuration.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of th...
def update_subscription(self, subscription_id, update_subscription_details, **kwargs): "\n Updates the specified subscription's configuration.\n\n Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.\n\n\n :param str subscription_id: (required)\n The `OCID`__ of th...
121e161b78af73ae508a312f95d2495f2f733822ec5af46f249753ac05da90ed
def __init__(self, gamestate): 'Initialize Border_Text class attributes.\n \n Parameters:\n gamestate (object) : Gamestate object where text will be \n displayed in.\n ' self.gamestate = gamestate self.settings = gamestate.settings self.screen = gamestate.s...
Initialize Border_Text class attributes. Parameters: gamestate (object) : Gamestate object where text will be displayed in.
zuckbot/gamestates/objects/border_text.py
__init__
FrancisLangit/zuckbot
5
python
def __init__(self, gamestate): 'Initialize Border_Text class attributes.\n \n Parameters:\n gamestate (object) : Gamestate object where text will be \n displayed in.\n ' self.gamestate = gamestate self.settings = gamestate.settings self.screen = gamestate.s...
def __init__(self, gamestate): 'Initialize Border_Text class attributes.\n \n Parameters:\n gamestate (object) : Gamestate object where text will be \n displayed in.\n ' self.gamestate = gamestate self.settings = gamestate.settings self.screen = gamestate.s...
bb6c9bcfe7e2959b3547a6fb150e1157e3d13fd0dd2d8e9360c76ad76b65b3a9
def blitme(self): 'Blits the object onto the screen.' self.esc_text.blitme() self.stanford_text.blitme() self.copyright_text.blitme()
Blits the object onto the screen.
zuckbot/gamestates/objects/border_text.py
blitme
FrancisLangit/zuckbot
5
python
def blitme(self): self.esc_text.blitme() self.stanford_text.blitme() self.copyright_text.blitme()
def blitme(self): self.esc_text.blitme() self.stanford_text.blitme() self.copyright_text.blitme()<|docstring|>Blits the object onto the screen.<|endoftext|>
39b0ac968c844d3f0d0cd06051a5603a00a89b414ca01e18f9269d825f4b1b88
def __init__(self, evalFunction, parameterSpace, weightList=None, model=None, filename='evolution.hdf', ncores=None, POP_INIT_SIZE=100, POP_SIZE=20, NGEN=10, matingFunction=None, CXP=0.5, selectionFunction=None, RANKP=1.5): 'Initialize evolutionary optimization.\n :param evalFunction: Evaluation function of ...
Initialize evolutionary optimization. :param evalFunction: Evaluation function of a run that provides a fitness vector and simulation outputs :type evalFunction: function :param parameterSpace: Parameter space to run evolution in. :type parameterSpace: `neurolib.utils.parameterSpace.ParameterSpace` :param weightList: L...
neurolib/optimize/evolution/evolution.py
__init__
ChristophMetzner/neurolib
1
python
def __init__(self, evalFunction, parameterSpace, weightList=None, model=None, filename='evolution.hdf', ncores=None, POP_INIT_SIZE=100, POP_SIZE=20, NGEN=10, matingFunction=None, CXP=0.5, selectionFunction=None, RANKP=1.5): 'Initialize evolutionary optimization.\n :param evalFunction: Evaluation function of ...
def __init__(self, evalFunction, parameterSpace, weightList=None, model=None, filename='evolution.hdf', ncores=None, POP_INIT_SIZE=100, POP_SIZE=20, NGEN=10, matingFunction=None, CXP=0.5, selectionFunction=None, RANKP=1.5): 'Initialize evolutionary optimization.\n :param evalFunction: Evaluation function of ...
8a756d34a2d22dc37d849c36028039a24a70edbdd42853e0109b3e5c30a85ff0
def getIndividualFromTraj(self, traj): 'Get individual from pypet trajectory\n \n :param traj: Pypet trajectory\n :type traj: `pypet.trajectory.Trajectory`\n :return: Individual (`DEAP` type)\n :rtype: `deap.creator.Individual`\n ' if (type(traj).__name__ == 'Individual...
Get individual from pypet trajectory :param traj: Pypet trajectory :type traj: `pypet.trajectory.Trajectory` :return: Individual (`DEAP` type) :rtype: `deap.creator.Individual`
neurolib/optimize/evolution/evolution.py
getIndividualFromTraj
ChristophMetzner/neurolib
1
python
def getIndividualFromTraj(self, traj): 'Get individual from pypet trajectory\n \n :param traj: Pypet trajectory\n :type traj: `pypet.trajectory.Trajectory`\n :return: Individual (`DEAP` type)\n :rtype: `deap.creator.Individual`\n ' if (type(traj).__name__ == 'Individual...
def getIndividualFromTraj(self, traj): 'Get individual from pypet trajectory\n \n :param traj: Pypet trajectory\n :type traj: `pypet.trajectory.Trajectory`\n :return: Individual (`DEAP` type)\n :rtype: `deap.creator.Individual`\n ' if (type(traj).__name__ == 'Individual...
e03693b8ec9d42af02f73cb7185f116c643a841c0cdd7bee64424ad08978509c
def getModelFromTraj(self, traj): 'Return the appropriate model with parameters for this individual\n :params traj: Pypet trajectory with individual (traj.individual) or directly a deap.Individual\n\n :returns model: Model with the parameters of this individual.\n \n :param traj: Pypet t...
Return the appropriate model with parameters for this individual :params traj: Pypet trajectory with individual (traj.individual) or directly a deap.Individual :returns model: Model with the parameters of this individual. :param traj: Pypet trajectory with individual (traj.individual) or directly a deap.Individual :t...
neurolib/optimize/evolution/evolution.py
getModelFromTraj
ChristophMetzner/neurolib
1
python
def getModelFromTraj(self, traj): 'Return the appropriate model with parameters for this individual\n :params traj: Pypet trajectory with individual (traj.individual) or directly a deap.Individual\n\n :returns model: Model with the parameters of this individual.\n \n :param traj: Pypet t...
def getModelFromTraj(self, traj): 'Return the appropriate model with parameters for this individual\n :params traj: Pypet trajectory with individual (traj.individual) or directly a deap.Individual\n\n :returns model: Model with the parameters of this individual.\n \n :param traj: Pypet t...
4596fdeeab5bdc39e18fed8427420db9da37101257a7e665198c0a1003363330
def individualToDict(self, individual): 'Convert an individual to a parameter dictionary.\n \n :param individual: Individual (`DEAP` type)\n :type individual: `deap.creator.Individual`\n :return: Parameter dictionary of this individual\n :rtype: dict\n ' return self.Par...
Convert an individual to a parameter dictionary. :param individual: Individual (`DEAP` type) :type individual: `deap.creator.Individual` :return: Parameter dictionary of this individual :rtype: dict
neurolib/optimize/evolution/evolution.py
individualToDict
ChristophMetzner/neurolib
1
python
def individualToDict(self, individual): 'Convert an individual to a parameter dictionary.\n \n :param individual: Individual (`DEAP` type)\n :type individual: `deap.creator.Individual`\n :return: Parameter dictionary of this individual\n :rtype: dict\n ' return self.Par...
def individualToDict(self, individual): 'Convert an individual to a parameter dictionary.\n \n :param individual: Individual (`DEAP` type)\n :type individual: `deap.creator.Individual`\n :return: Parameter dictionary of this individual\n :rtype: dict\n ' return self.Par...
3243850be67ca6c981618677778c220340ffa551151b7e83fa2b9d4c8729a9d5
def initPypetTrajectory(self, traj, paramInterval, POP_SIZE, CXP, NGEN, model): 'Initializes pypet trajectory and store all simulation parameters for later analysis.\n \n :param traj: Pypet trajectory (must be already initialized!)\n :type traj: `pypet.trajectory.Trajectory`\n :param par...
Initializes pypet trajectory and store all simulation parameters for later analysis. :param traj: Pypet trajectory (must be already initialized!) :type traj: `pypet.trajectory.Trajectory` :param paramInterval: Parameter space, from ParameterSpace class :type paramInterval: parameterSpace.named_tuple :param POP_SIZE: P...
neurolib/optimize/evolution/evolution.py
initPypetTrajectory
ChristophMetzner/neurolib
1
python
def initPypetTrajectory(self, traj, paramInterval, POP_SIZE, CXP, NGEN, model): 'Initializes pypet trajectory and store all simulation parameters for later analysis.\n \n :param traj: Pypet trajectory (must be already initialized!)\n :type traj: `pypet.trajectory.Trajectory`\n :param par...
def initPypetTrajectory(self, traj, paramInterval, POP_SIZE, CXP, NGEN, model): 'Initializes pypet trajectory and store all simulation parameters for later analysis.\n \n :param traj: Pypet trajectory (must be already initialized!)\n :type traj: `pypet.trajectory.Trajectory`\n :param par...
35a18f77affee139899c444a0c02cf72f90e2299927f545507d64f85ae0fb473
def initDEAP(self, toolbox, pypetEnvironment, paramInterval, evalFunction, weights_list, matingFunction, selectionFunction): 'Initializes DEAP and registers all methods to the deap.toolbox\n \n :param toolbox: Deap toolbox\n :type toolbox: deap.base.Toolbox\n :param pypetEnvironment: Pyp...
Initializes DEAP and registers all methods to the deap.toolbox :param toolbox: Deap toolbox :type toolbox: deap.base.Toolbox :param pypetEnvironment: Pypet environment (must be initialized first!) :type pypetEnvironment: [type] :param paramInterval: Parameter space, from ParameterSpace class :type paramInterval: param...
neurolib/optimize/evolution/evolution.py
initDEAP
ChristophMetzner/neurolib
1
python
def initDEAP(self, toolbox, pypetEnvironment, paramInterval, evalFunction, weights_list, matingFunction, selectionFunction): 'Initializes DEAP and registers all methods to the deap.toolbox\n \n :param toolbox: Deap toolbox\n :type toolbox: deap.base.Toolbox\n :param pypetEnvironment: Pyp...
def initDEAP(self, toolbox, pypetEnvironment, paramInterval, evalFunction, weights_list, matingFunction, selectionFunction): 'Initializes DEAP and registers all methods to the deap.toolbox\n \n :param toolbox: Deap toolbox\n :type toolbox: deap.base.Toolbox\n :param pypetEnvironment: Pyp...
284c26176aaaf769ed987840bd66aa4d12789cda799ba44ca2926509137750c4
def evalPopulationUsingPypet(self, traj, toolbox, pop, gIdx): 'Evaluate the fitness of the popoulation of the current generation using pypet\n :param traj: Pypet trajectory\n :type traj: `pypet.trajectory.Trajectory`\n :param toolbox: `deap` toolbox\n :type toolbox: deap.base.Toolbox\n ...
Evaluate the fitness of the popoulation of the current generation using pypet :param traj: Pypet trajectory :type traj: `pypet.trajectory.Trajectory` :param toolbox: `deap` toolbox :type toolbox: deap.base.Toolbox :param pop: Population :type pop: list :param gIdx: Index of the current generation :type gIdx: int :retur...
neurolib/optimize/evolution/evolution.py
evalPopulationUsingPypet
ChristophMetzner/neurolib
1
python
def evalPopulationUsingPypet(self, traj, toolbox, pop, gIdx): 'Evaluate the fitness of the popoulation of the current generation using pypet\n :param traj: Pypet trajectory\n :type traj: `pypet.trajectory.Trajectory`\n :param toolbox: `deap` toolbox\n :type toolbox: deap.base.Toolbox\n ...
def evalPopulationUsingPypet(self, traj, toolbox, pop, gIdx): 'Evaluate the fitness of the popoulation of the current generation using pypet\n :param traj: Pypet trajectory\n :type traj: `pypet.trajectory.Trajectory`\n :param toolbox: `deap` toolbox\n :type toolbox: deap.base.Toolbox\n ...
ef937204d0e88f64d963af1e8b8400a4e1db1e6d8463b77989e35955d67cf21f
def tagPopulation(self, pop): "Take a fresh population and add id's and attributes such as parameters that we can use later\n\n :param pop: Fresh population\n :type pop: list\n :return: Population with tags\n :rtype: list\n " for (i, ind) in enumerate(pop): assert (not...
Take a fresh population and add id's and attributes such as parameters that we can use later :param pop: Fresh population :type pop: list :return: Population with tags :rtype: list
neurolib/optimize/evolution/evolution.py
tagPopulation
ChristophMetzner/neurolib
1
python
def tagPopulation(self, pop): "Take a fresh population and add id's and attributes such as parameters that we can use later\n\n :param pop: Fresh population\n :type pop: list\n :return: Population with tags\n :rtype: list\n " for (i, ind) in enumerate(pop): assert (not...
def tagPopulation(self, pop): "Take a fresh population and add id's and attributes such as parameters that we can use later\n\n :param pop: Fresh population\n :type pop: list\n :return: Population with tags\n :rtype: list\n " for (i, ind) in enumerate(pop): assert (not...
f24b8504dd0a3902308d656781f2af0df7b104f377a3ce93cdd6d46d1f7baef1
def runInitial(self): 'Run the first round of evolution with the initial population of size `POP_INIT_SIZE`\n and select the best `POP_SIZE` for the following evolution. This needs to be run before `runEvolution()`\n ' self._t_start_initial_population = datetime.datetime.now() self.pop = self....
Run the first round of evolution with the initial population of size `POP_INIT_SIZE` and select the best `POP_SIZE` for the following evolution. This needs to be run before `runEvolution()`
neurolib/optimize/evolution/evolution.py
runInitial
ChristophMetzner/neurolib
1
python
def runInitial(self): 'Run the first round of evolution with the initial population of size `POP_INIT_SIZE`\n and select the best `POP_SIZE` for the following evolution. This needs to be run before `runEvolution()`\n ' self._t_start_initial_population = datetime.datetime.now() self.pop = self....
def runInitial(self): 'Run the first round of evolution with the initial population of size `POP_INIT_SIZE`\n and select the best `POP_SIZE` for the following evolution. This needs to be run before `runEvolution()`\n ' self._t_start_initial_population = datetime.datetime.now() self.pop = self....
f80ac9c647aae278f3fb33eade05d5b7ca43a00b731d55e4262ad00dfa3504cb
def runEvolution(self): 'Run the evolutionary optimization process for `NGEN` generations.\n ' logging.info('Start of evolution') self._t_start_evolution = datetime.datetime.now() for self.gIdx in range((self.gIdx + 1), (self.gIdx + self.traj.NGEN)): validpop = self.getValidPopulation(sel...
Run the evolutionary optimization process for `NGEN` generations.
neurolib/optimize/evolution/evolution.py
runEvolution
ChristophMetzner/neurolib
1
python
def runEvolution(self): '\n ' logging.info('Start of evolution') self._t_start_evolution = datetime.datetime.now() for self.gIdx in range((self.gIdx + 1), (self.gIdx + self.traj.NGEN)): validpop = self.getValidPopulation(self.pop) invalidpop = self.getInvalidPopulation(self.pop) ...
def runEvolution(self): '\n ' logging.info('Start of evolution') self._t_start_evolution = datetime.datetime.now() for self.gIdx in range((self.gIdx + 1), (self.gIdx + self.traj.NGEN)): validpop = self.getValidPopulation(self.pop) invalidpop = self.getInvalidPopulation(self.pop) ...
2e38ef3a45c070ab0ea5c6a851081ea992aa3dec42f548b9b54a887e1076548c
def run(self, verbose=False): 'Run the evolution or continue previous evolution. If evolution was not initialized first\n using `runInitial()`, this will be done.\n \n :param verbose: Print and plot state of evolution during run, defaults to False\n :type verbose: bool, optional\n ...
Run the evolution or continue previous evolution. If evolution was not initialized first using `runInitial()`, this will be done. :param verbose: Print and plot state of evolution during run, defaults to False :type verbose: bool, optional
neurolib/optimize/evolution/evolution.py
run
ChristophMetzner/neurolib
1
python
def run(self, verbose=False): 'Run the evolution or continue previous evolution. If evolution was not initialized first\n using `runInitial()`, this will be done.\n \n :param verbose: Print and plot state of evolution during run, defaults to False\n :type verbose: bool, optional\n ...
def run(self, verbose=False): 'Run the evolution or continue previous evolution. If evolution was not initialized first\n using `runInitial()`, this will be done.\n \n :param verbose: Print and plot state of evolution during run, defaults to False\n :type verbose: bool, optional\n ...
6683b26fd8b71f62b6c68756ed3a948e4a53ab6c9fc96ab34c7e9f727bba6f5f
def info(self, plot=True, bestN=5): 'Print and plot information about the evolution and the current population\n \n :param plot: plot a plot using `matplotlib`, defaults to True\n :type plot: bool, optional\n :param bestN: Print summary of `bestN` best individuals, defaults to 5\n ...
Print and plot information about the evolution and the current population :param plot: plot a plot using `matplotlib`, defaults to True :type plot: bool, optional :param bestN: Print summary of `bestN` best individuals, defaults to 5 :type bestN: int, optional
neurolib/optimize/evolution/evolution.py
info
ChristophMetzner/neurolib
1
python
def info(self, plot=True, bestN=5): 'Print and plot information about the evolution and the current population\n \n :param plot: plot a plot using `matplotlib`, defaults to True\n :type plot: bool, optional\n :param bestN: Print summary of `bestN` best individuals, defaults to 5\n ...
def info(self, plot=True, bestN=5): 'Print and plot information about the evolution and the current population\n \n :param plot: plot a plot using `matplotlib`, defaults to True\n :type plot: bool, optional\n :param bestN: Print summary of `bestN` best individuals, defaults to 5\n ...
c9850d0a7124f16fb0b67c1bbd94c0f195a7e4364afe91197128866691766c17
def plotProgress(self): 'Plots progress of fitnesses of current evolution run\n ' eu.plotProgress(self)
Plots progress of fitnesses of current evolution run
neurolib/optimize/evolution/evolution.py
plotProgress
ChristophMetzner/neurolib
1
python
def plotProgress(self): '\n ' eu.plotProgress(self)
def plotProgress(self): '\n ' eu.plotProgress(self)<|docstring|>Plots progress of fitnesses of current evolution run<|endoftext|>
661fba2ee57dd08466659b91fa82256fb8627c64f59accc3e6ac41265b2ef116
@property def dfPop(self): "Returns a `pandas` dataframe of the current generation's population parameters \n for post processing. This object can be further used to easily analyse the population.\n :return: Pandas dataframe with all individuals and their parameters\n :rtype: `pandas.core.frame...
Returns a `pandas` dataframe of the current generation's population parameters for post processing. This object can be further used to easily analyse the population. :return: Pandas dataframe with all individuals and their parameters :rtype: `pandas.core.frame.DataFrame`
neurolib/optimize/evolution/evolution.py
dfPop
ChristophMetzner/neurolib
1
python
@property def dfPop(self): "Returns a `pandas` dataframe of the current generation's population parameters \n for post processing. This object can be further used to easily analyse the population.\n :return: Pandas dataframe with all individuals and their parameters\n :rtype: `pandas.core.frame...
@property def dfPop(self): "Returns a `pandas` dataframe of the current generation's population parameters \n for post processing. This object can be further used to easily analyse the population.\n :return: Pandas dataframe with all individuals and their parameters\n :rtype: `pandas.core.frame...
e03aa9f2f9108024d5a1d16fc80fc4b209b8cff52244e3b001fa1949e0779e29
def loadResults(self, filename=None, trajectoryName=None): 'Load results from a hdf file of a previous evolution and store the\n pypet trajectory in `self.traj`\n \n :param filename: hdf filename of the previous run, defaults to None\n :type filename: str, optional\n :param trajec...
Load results from a hdf file of a previous evolution and store the pypet trajectory in `self.traj` :param filename: hdf filename of the previous run, defaults to None :type filename: str, optional :param trajectoryName: Name of the trajectory in the hdf file to load. If not given, the last one will be loaded, defaults...
neurolib/optimize/evolution/evolution.py
loadResults
ChristophMetzner/neurolib
1
python
def loadResults(self, filename=None, trajectoryName=None): 'Load results from a hdf file of a previous evolution and store the\n pypet trajectory in `self.traj`\n \n :param filename: hdf filename of the previous run, defaults to None\n :type filename: str, optional\n :param trajec...
def loadResults(self, filename=None, trajectoryName=None): 'Load results from a hdf file of a previous evolution and store the\n pypet trajectory in `self.traj`\n \n :param filename: hdf filename of the previous run, defaults to None\n :type filename: str, optional\n :param trajec...
cddd94bf45cbff026fd7e9f46ba2a60983b9564e63c468747a201a0517b1da71
def getScoresDuringEvolution(self, traj=None, drop_first=True, reverse=False): "Get the scores of each generation's population.\n \n :param traj: Pypet trajectory. If not given, the current trajectory is used, defaults to None\n :type traj: `pypet.trajectory.Trajectory`, optional\n :para...
Get the scores of each generation's population. :param traj: Pypet trajectory. If not given, the current trajectory is used, defaults to None :type traj: `pypet.trajectory.Trajectory`, optional :param drop_first: Drop the first (initial) generation. This can be usefull because it can have a different size (`POP_INIT_S...
neurolib/optimize/evolution/evolution.py
getScoresDuringEvolution
ChristophMetzner/neurolib
1
python
def getScoresDuringEvolution(self, traj=None, drop_first=True, reverse=False): "Get the scores of each generation's population.\n \n :param traj: Pypet trajectory. If not given, the current trajectory is used, defaults to None\n :type traj: `pypet.trajectory.Trajectory`, optional\n :para...
def getScoresDuringEvolution(self, traj=None, drop_first=True, reverse=False): "Get the scores of each generation's population.\n \n :param traj: Pypet trajectory. If not given, the current trajectory is used, defaults to None\n :type traj: `pypet.trajectory.Trajectory`, optional\n :para...
992a5e438ac54d366150cbea5e0b49f6608de3abe4435847da2f4cc0a12ef3e4
def check_is_fitted(model, parameters, error_msg=None): "\n Checks if the model is fitted by asserting the presence of the fitted parameters in the model.\n\n :param model: The model instance\n :param parameters: The name of the parameter or list of names of parameters that are fitted by the model\n :pa...
Checks if the model is fitted by asserting the presence of the fitted parameters in the model. :param model: The model instance :param parameters: The name of the parameter or list of names of parameters that are fitted by the model :param error_msg: (string) Custom error message to be printed if the model is not fitt...
art/classifiers/utils.py
check_is_fitted
alonhare/adversarial-robustness-toolbox
2
python
def check_is_fitted(model, parameters, error_msg=None): "\n Checks if the model is fitted by asserting the presence of the fitted parameters in the model.\n\n :param model: The model instance\n :param parameters: The name of the parameter or list of names of parameters that are fitted by the model\n :pa...
def check_is_fitted(model, parameters, error_msg=None): "\n Checks if the model is fitted by asserting the presence of the fitted parameters in the model.\n\n :param model: The model instance\n :param parameters: The name of the parameter or list of names of parameters that are fitted by the model\n :pa...
3e9f8cb4e315b477774af140d3474cb2c45133f48a18149adc046b5cd8a0e2bf
def get_page_models(): '\n Returns a list of all non-abstract Page model classes defined in this project.\n ' return PAGE_MODEL_CLASSES
Returns a list of all non-abstract Page model classes defined in this project.
tuiuiu/tuiuiucore/models.py
get_page_models
caputomarcos/tuiuiu.io
3
python
def get_page_models(): '\n \n ' return PAGE_MODEL_CLASSES
def get_page_models(): '\n \n ' return PAGE_MODEL_CLASSES<|docstring|>Returns a list of all non-abstract Page model classes defined in this project.<|endoftext|>
3d82584c29bed5090a7d37ac363302ef46497605b862785d277b1f920a08c6d1
def get_default_page_content_type(): '\n Returns the content type to use as a default for pages whose content type\n has been deleted.\n ' return ContentType.objects.get_for_model(Page)
Returns the content type to use as a default for pages whose content type has been deleted.
tuiuiu/tuiuiucore/models.py
get_default_page_content_type
caputomarcos/tuiuiu.io
3
python
def get_default_page_content_type(): '\n Returns the content type to use as a default for pages whose content type\n has been deleted.\n ' return ContentType.objects.get_for_model(Page)
def get_default_page_content_type(): '\n Returns the content type to use as a default for pages whose content type\n has been deleted.\n ' return ContentType.objects.get_for_model(Page)<|docstring|>Returns the content type to use as a default for pages whose content type has been deleted.<|endoftext|>
8f25167673a6d5f2caebbaaf13447065c77d0978de02a3ac2509ec4f4ee225bc
@staticmethod def find_for_request(request): '\n Find the site object responsible for responding to this HTTP\n request object. Try:\n\n * unique hostname first\n * then hostname and port\n * if there is no matching hostname at all, or no matching\n hostname:port combinat...
Find the site object responsible for responding to this HTTP request object. Try: * unique hostname first * then hostname and port * if there is no matching hostname at all, or no matching hostname:port combination, fall back to the unique default site, or raise an exception NB this means that high-numbered ports...
tuiuiu/tuiuiucore/models.py
find_for_request
caputomarcos/tuiuiu.io
3
python
@staticmethod def find_for_request(request): '\n Find the site object responsible for responding to this HTTP\n request object. Try:\n\n * unique hostname first\n * then hostname and port\n * if there is no matching hostname at all, or no matching\n hostname:port combinat...
@staticmethod def find_for_request(request): '\n Find the site object responsible for responding to this HTTP\n request object. Try:\n\n * unique hostname first\n * then hostname and port\n * if there is no matching hostname at all, or no matching\n hostname:port combinat...
2a79a477a31cb87f3cfe1d2e84a751477ed25645c3fe9a54da0f9b09d5073faf
@staticmethod def get_site_root_paths(): '\n Return a list of (root_path, root_url) tuples, most specific path first -\n used to translate url_paths into actual URLs with hostnames\n ' result = cache.get('tuiuiu_site_root_paths') if (result is None): result = [(site.id, site.roo...
Return a list of (root_path, root_url) tuples, most specific path first - used to translate url_paths into actual URLs with hostnames
tuiuiu/tuiuiucore/models.py
get_site_root_paths
caputomarcos/tuiuiu.io
3
python
@staticmethod def get_site_root_paths(): '\n Return a list of (root_path, root_url) tuples, most specific path first -\n used to translate url_paths into actual URLs with hostnames\n ' result = cache.get('tuiuiu_site_root_paths') if (result is None): result = [(site.id, site.roo...
@staticmethod def get_site_root_paths(): '\n Return a list of (root_path, root_url) tuples, most specific path first -\n used to translate url_paths into actual URLs with hostnames\n ' result = cache.get('tuiuiu_site_root_paths') if (result is None): result = [(site.id, site.roo...
a4414acab43e7481a378063ffd7a147a66b897a8acea314936d0949369ca9b6f
def set_url_path(self, parent): "\n Populate the url_path field based on this page's slug and the specified parent page.\n (We pass a parent in here, rather than retrieving it via get_parent, so that we can give\n new unsaved pages a meaningful URL when previewing them; at that point the page h...
Populate the url_path field based on this page's slug and the specified parent page. (We pass a parent in here, rather than retrieving it via get_parent, so that we can give new unsaved pages a meaningful URL when previewing them; at that point the page has not been assigned a position in the tree, as far as treebeard ...
tuiuiu/tuiuiucore/models.py
set_url_path
caputomarcos/tuiuiu.io
3
python
def set_url_path(self, parent): "\n Populate the url_path field based on this page's slug and the specified parent page.\n (We pass a parent in here, rather than retrieving it via get_parent, so that we can give\n new unsaved pages a meaningful URL when previewing them; at that point the page h...
def set_url_path(self, parent): "\n Populate the url_path field based on this page's slug and the specified parent page.\n (We pass a parent in here, rather than retrieving it via get_parent, so that we can give\n new unsaved pages a meaningful URL when previewing them; at that point the page h...
f8dea7e3c61d487ed734ca7efcc07d9ec433747f3623d3117065b7b12c2dba62
@staticmethod def _slug_is_available(slug, parent_page, page=None): "\n Determine whether the given slug is available for use on a child page of\n parent_page. If 'page' is passed, the slug is intended for use on that page\n (and so it will be excluded from the duplicate check).\n " ...
Determine whether the given slug is available for use on a child page of parent_page. If 'page' is passed, the slug is intended for use on that page (and so it will be excluded from the duplicate check).
tuiuiu/tuiuiucore/models.py
_slug_is_available
caputomarcos/tuiuiu.io
3
python
@staticmethod def _slug_is_available(slug, parent_page, page=None): "\n Determine whether the given slug is available for use on a child page of\n parent_page. If 'page' is passed, the slug is intended for use on that page\n (and so it will be excluded from the duplicate check).\n " ...
@staticmethod def _slug_is_available(slug, parent_page, page=None): "\n Determine whether the given slug is available for use on a child page of\n parent_page. If 'page' is passed, the slug is intended for use on that page\n (and so it will be excluded from the duplicate check).\n " ...
968708424e19b5af2a11708b1a24b9656c55fae09726c27b2ef3ee5e0d0c5e78
@cached_property def specific(self): '\n Return this page in its most specific subclassed form.\n ' content_type = ContentType.objects.get_for_id(self.content_type_id) model_class = content_type.model_class() if (model_class is None): return self elif isinstance(self, model_cla...
Return this page in its most specific subclassed form.
tuiuiu/tuiuiucore/models.py
specific
caputomarcos/tuiuiu.io
3
python
@cached_property def specific(self): '\n \n ' content_type = ContentType.objects.get_for_id(self.content_type_id) model_class = content_type.model_class() if (model_class is None): return self elif isinstance(self, model_class): return self else: return cont...
@cached_property def specific(self): '\n \n ' content_type = ContentType.objects.get_for_id(self.content_type_id) model_class = content_type.model_class() if (model_class is None): return self elif isinstance(self, model_class): return self else: return cont...
3564a93edbe2121c903c3ef7b9f8b83482f3317af9354b4b0e2d048a61123ac8
@cached_property def specific_class(self): '\n Return the class that this page would be if instantiated in its\n most specific form\n ' content_type = ContentType.objects.get_for_id(self.content_type_id) return content_type.model_class()
Return the class that this page would be if instantiated in its most specific form
tuiuiu/tuiuiucore/models.py
specific_class
caputomarcos/tuiuiu.io
3
python
@cached_property def specific_class(self): '\n Return the class that this page would be if instantiated in its\n most specific form\n ' content_type = ContentType.objects.get_for_id(self.content_type_id) return content_type.model_class()
@cached_property def specific_class(self): '\n Return the class that this page would be if instantiated in its\n most specific form\n ' content_type = ContentType.objects.get_for_id(self.content_type_id) return content_type.model_class()<|docstring|>Return the class that this page would...
ac289048102376c2352506c5f35f00b142c5567722f6cec1971558ca77ad3138
def get_admin_display_title(self): '\n Return the title for this page as it should appear in the admin backend.\n ' return self.title
Return the title for this page as it should appear in the admin backend.
tuiuiu/tuiuiucore/models.py
get_admin_display_title
caputomarcos/tuiuiu.io
3
python
def get_admin_display_title(self): '\n \n ' return self.title
def get_admin_display_title(self): '\n \n ' return self.title<|docstring|>Return the title for this page as it should appear in the admin backend.<|endoftext|>
f6ad9be084a229e0915b7bd699192951ec782b028d1dc6dac5109da97aa37c74
def is_navigable(self): "\n Return true if it's meaningful to browse subpages of this page -\n i.e. it currently has subpages,\n or it's at the top level (this rule necessary for empty out-of-the-box sites to have working navigation)\n " return ((not self.is_leaf()) or (self.depth ==...
Return true if it's meaningful to browse subpages of this page - i.e. it currently has subpages, or it's at the top level (this rule necessary for empty out-of-the-box sites to have working navigation)
tuiuiu/tuiuiucore/models.py
is_navigable
caputomarcos/tuiuiu.io
3
python
def is_navigable(self): "\n Return true if it's meaningful to browse subpages of this page -\n i.e. it currently has subpages,\n or it's at the top level (this rule necessary for empty out-of-the-box sites to have working navigation)\n " return ((not self.is_leaf()) or (self.depth ==...
def is_navigable(self): "\n Return true if it's meaningful to browse subpages of this page -\n i.e. it currently has subpages,\n or it's at the top level (this rule necessary for empty out-of-the-box sites to have working navigation)\n " return ((not self.is_leaf()) or (self.depth ==...
90acf90c76cfd465fcb5d3f0c1e5826493538dc2b0eda341062566e83ea3f4b0
def _get_site_root_paths(self, request=None): '\n Return ``Site.get_site_root_paths()``, using the cached copy on the\n request object if available.\n ' cache_object = (request if request else self) try: return cache_object._tuiuiu_cached_site_root_paths except AttributeErro...
Return ``Site.get_site_root_paths()``, using the cached copy on the request object if available.
tuiuiu/tuiuiucore/models.py
_get_site_root_paths
caputomarcos/tuiuiu.io
3
python
def _get_site_root_paths(self, request=None): '\n Return ``Site.get_site_root_paths()``, using the cached copy on the\n request object if available.\n ' cache_object = (request if request else self) try: return cache_object._tuiuiu_cached_site_root_paths except AttributeErro...
def _get_site_root_paths(self, request=None): '\n Return ``Site.get_site_root_paths()``, using the cached copy on the\n request object if available.\n ' cache_object = (request if request else self) try: return cache_object._tuiuiu_cached_site_root_paths except AttributeErro...
64e94e2436972ab26220f4ea904c0c3c211015dcd9b1ea83c8920cc5a998db0b
def _safe_get_url_parts(self, request=None): '\n Backwards-compatibility method to safely call get_url_parts without\n the new ``request`` kwarg (added in Tuiuiu 1.11), if needed.\n ' if accepts_kwarg(self.get_url_parts, 'request'): return self.get_url_parts(request=request) els...
Backwards-compatibility method to safely call get_url_parts without the new ``request`` kwarg (added in Tuiuiu 1.11), if needed.
tuiuiu/tuiuiucore/models.py
_safe_get_url_parts
caputomarcos/tuiuiu.io
3
python
def _safe_get_url_parts(self, request=None): '\n Backwards-compatibility method to safely call get_url_parts without\n the new ``request`` kwarg (added in Tuiuiu 1.11), if needed.\n ' if accepts_kwarg(self.get_url_parts, 'request'): return self.get_url_parts(request=request) els...
def _safe_get_url_parts(self, request=None): '\n Backwards-compatibility method to safely call get_url_parts without\n the new ``request`` kwarg (added in Tuiuiu 1.11), if needed.\n ' if accepts_kwarg(self.get_url_parts, 'request'): return self.get_url_parts(request=request) els...
10422674b38da65e2fab1c7df92fe0dc08372db5e685f4261bb456e0f7b9f054
def get_url_parts(self, request=None): '\n Determine the URL for this page and return it as a tuple of\n ``(site_id, site_root_url, page_url_relative_to_site_root)``.\n Return None if the page is not routable.\n\n This is used internally by the ``full_url``, ``url``, ``relative_url``\n ...
Determine the URL for this page and return it as a tuple of ``(site_id, site_root_url, page_url_relative_to_site_root)``. Return None if the page is not routable. This is used internally by the ``full_url``, ``url``, ``relative_url`` and ``get_site`` properties and methods; pages with custom URL routing should overrid...
tuiuiu/tuiuiucore/models.py
get_url_parts
caputomarcos/tuiuiu.io
3
python
def get_url_parts(self, request=None): '\n Determine the URL for this page and return it as a tuple of\n ``(site_id, site_root_url, page_url_relative_to_site_root)``.\n Return None if the page is not routable.\n\n This is used internally by the ``full_url``, ``url``, ``relative_url``\n ...
def get_url_parts(self, request=None): '\n Determine the URL for this page and return it as a tuple of\n ``(site_id, site_root_url, page_url_relative_to_site_root)``.\n Return None if the page is not routable.\n\n This is used internally by the ``full_url``, ``url``, ``relative_url``\n ...
fc22def65f93deac7486244d5ed7b500576ef208dcd435e00c856ae885495b62
def get_full_url(self, request=None): 'Return the full URL (including protocol / domain) to this page, or None if it is not routable' url_parts = self._safe_get_url_parts(request=request) if (url_parts is None): return (site_id, root_url, page_path) = url_parts return (root_url + page_path)
Return the full URL (including protocol / domain) to this page, or None if it is not routable
tuiuiu/tuiuiucore/models.py
get_full_url
caputomarcos/tuiuiu.io
3
python
def get_full_url(self, request=None): url_parts = self._safe_get_url_parts(request=request) if (url_parts is None): return (site_id, root_url, page_path) = url_parts return (root_url + page_path)
def get_full_url(self, request=None): url_parts = self._safe_get_url_parts(request=request) if (url_parts is None): return (site_id, root_url, page_path) = url_parts return (root_url + page_path)<|docstring|>Return the full URL (including protocol / domain) to this page, or None if it is no...
1f68a463d24d424806dcb3f98f403e58ea78a478b8bf898a9a6b84079cad1d49
def get_url(self, request=None, current_site=None): "\n Return the 'most appropriate' URL for referring to this page from the pages we serve,\n within the Tuiuiu backend and actual website templates;\n this is the local URL (starting with '/') if we're only running a single site\n (i.e. ...
Return the 'most appropriate' URL for referring to this page from the pages we serve, within the Tuiuiu backend and actual website templates; this is the local URL (starting with '/') if we're only running a single site (i.e. we know that whatever the current page is being served from, this link will be on the same dom...
tuiuiu/tuiuiucore/models.py
get_url
caputomarcos/tuiuiu.io
3
python
def get_url(self, request=None, current_site=None): "\n Return the 'most appropriate' URL for referring to this page from the pages we serve,\n within the Tuiuiu backend and actual website templates;\n this is the local URL (starting with '/') if we're only running a single site\n (i.e. ...
def get_url(self, request=None, current_site=None): "\n Return the 'most appropriate' URL for referring to this page from the pages we serve,\n within the Tuiuiu backend and actual website templates;\n this is the local URL (starting with '/') if we're only running a single site\n (i.e. ...
e10b56176c6fa62bf86d7592c943cd57e416515fd1f21c5d9076e65afd7318b4
def relative_url(self, current_site, request=None): "\n Return the 'most appropriate' URL for this page taking into account the site we're currently on;\n a local URL if the site matches, or a fully qualified one otherwise.\n Return None if the page is not routable.\n\n Accepts an option...
Return the 'most appropriate' URL for this page taking into account the site we're currently on; a local URL if the site matches, or a fully qualified one otherwise. Return None if the page is not routable. Accepts an optional but recommended ``request`` keyword argument that, if provided, will be used to cache site-l...
tuiuiu/tuiuiucore/models.py
relative_url
caputomarcos/tuiuiu.io
3
python
def relative_url(self, current_site, request=None): "\n Return the 'most appropriate' URL for this page taking into account the site we're currently on;\n a local URL if the site matches, or a fully qualified one otherwise.\n Return None if the page is not routable.\n\n Accepts an option...
def relative_url(self, current_site, request=None): "\n Return the 'most appropriate' URL for this page taking into account the site we're currently on;\n a local URL if the site matches, or a fully qualified one otherwise.\n Return None if the page is not routable.\n\n Accepts an option...
f6a6a7612c9ee726474581092dad9a947a9284da8458a640bad60de892940108
def get_site(self): '\n Return the Site object that this page belongs to.\n ' url_parts = self.get_url_parts() if (url_parts is None): return (site_id, root_url, page_path) = url_parts return Site.objects.get(id=site_id)
Return the Site object that this page belongs to.
tuiuiu/tuiuiucore/models.py
get_site
caputomarcos/tuiuiu.io
3
python
def get_site(self): '\n \n ' url_parts = self.get_url_parts() if (url_parts is None): return (site_id, root_url, page_path) = url_parts return Site.objects.get(id=site_id)
def get_site(self): '\n \n ' url_parts = self.get_url_parts() if (url_parts is None): return (site_id, root_url, page_path) = url_parts return Site.objects.get(id=site_id)<|docstring|>Return the Site object that this page belongs to.<|endoftext|>
3a3f499813ed32e355cd65204d8c91004425f9a4a31efd7c14e358448c2ed1a7
@classmethod def clean_subpage_models(cls): '\n Returns the list of subpage types, normalised as model classes.\n Throws ValueError if any entry in subpage_types cannot be recognised as a model name,\n or LookupError if a model does not exist (or is not a Page subclass).\n ' if (cls....
Returns the list of subpage types, normalised as model classes. Throws ValueError if any entry in subpage_types cannot be recognised as a model name, or LookupError if a model does not exist (or is not a Page subclass).
tuiuiu/tuiuiucore/models.py
clean_subpage_models
caputomarcos/tuiuiu.io
3
python
@classmethod def clean_subpage_models(cls): '\n Returns the list of subpage types, normalised as model classes.\n Throws ValueError if any entry in subpage_types cannot be recognised as a model name,\n or LookupError if a model does not exist (or is not a Page subclass).\n ' if (cls....
@classmethod def clean_subpage_models(cls): '\n Returns the list of subpage types, normalised as model classes.\n Throws ValueError if any entry in subpage_types cannot be recognised as a model name,\n or LookupError if a model does not exist (or is not a Page subclass).\n ' if (cls....
50ef4e43fdf8b24772f40ca2565b79121ff19a36ff88be13df6f99b5411edac0
@classmethod def clean_parent_page_models(cls): '\n Returns the list of parent page types, normalised as model classes.\n Throws ValueError if any entry in parent_page_types cannot be recognised as a model name,\n or LookupError if a model does not exist (or is not a Page subclass).\n ' ...
Returns the list of parent page types, normalised as model classes. Throws ValueError if any entry in parent_page_types cannot be recognised as a model name, or LookupError if a model does not exist (or is not a Page subclass).
tuiuiu/tuiuiucore/models.py
clean_parent_page_models
caputomarcos/tuiuiu.io
3
python
@classmethod def clean_parent_page_models(cls): '\n Returns the list of parent page types, normalised as model classes.\n Throws ValueError if any entry in parent_page_types cannot be recognised as a model name,\n or LookupError if a model does not exist (or is not a Page subclass).\n ' ...
@classmethod def clean_parent_page_models(cls): '\n Returns the list of parent page types, normalised as model classes.\n Throws ValueError if any entry in parent_page_types cannot be recognised as a model name,\n or LookupError if a model does not exist (or is not a Page subclass).\n ' ...
b4049d6aa01020416030badc2512276146b60a0b1135ed15aa3e4fd3f0fbf707
@classmethod def allowed_parent_page_models(cls): '\n Returns the list of page types that this page type can be a subpage of,\n as a list of model classes\n ' return [parent_model for parent_model in cls.clean_parent_page_models() if (cls in parent_model.clean_subpage_models())]
Returns the list of page types that this page type can be a subpage of, as a list of model classes
tuiuiu/tuiuiucore/models.py
allowed_parent_page_models
caputomarcos/tuiuiu.io
3
python
@classmethod def allowed_parent_page_models(cls): '\n Returns the list of page types that this page type can be a subpage of,\n as a list of model classes\n ' return [parent_model for parent_model in cls.clean_parent_page_models() if (cls in parent_model.clean_subpage_models())]
@classmethod def allowed_parent_page_models(cls): '\n Returns the list of page types that this page type can be a subpage of,\n as a list of model classes\n ' return [parent_model for parent_model in cls.clean_parent_page_models() if (cls in parent_model.clean_subpage_models())]<|docstring|...
45250b547f6439c5403cb9af83d3301202573ec5dd69c8013379824c337d4f97
@classmethod def allowed_subpage_models(cls): '\n Returns the list of page types that this page type can have as subpages,\n as a list of model classes\n ' return [subpage_model for subpage_model in cls.clean_subpage_models() if (cls in subpage_model.clean_parent_page_models())]
Returns the list of page types that this page type can have as subpages, as a list of model classes
tuiuiu/tuiuiucore/models.py
allowed_subpage_models
caputomarcos/tuiuiu.io
3
python
@classmethod def allowed_subpage_models(cls): '\n Returns the list of page types that this page type can have as subpages,\n as a list of model classes\n ' return [subpage_model for subpage_model in cls.clean_subpage_models() if (cls in subpage_model.clean_parent_page_models())]
@classmethod def allowed_subpage_models(cls): '\n Returns the list of page types that this page type can have as subpages,\n as a list of model classes\n ' return [subpage_model for subpage_model in cls.clean_subpage_models() if (cls in subpage_model.clean_parent_page_models())]<|docstring|...
b04e8484bc851c08b79f76c003cd10a8a6adbdea5508bd41d7f1da44f7aea821
@classmethod def creatable_subpage_models(cls): '\n Returns the list of page types that may be created under this page type,\n as a list of model classes\n ' return [page_model for page_model in cls.allowed_subpage_models() if page_model.is_creatable]
Returns the list of page types that may be created under this page type, as a list of model classes
tuiuiu/tuiuiucore/models.py
creatable_subpage_models
caputomarcos/tuiuiu.io
3
python
@classmethod def creatable_subpage_models(cls): '\n Returns the list of page types that may be created under this page type,\n as a list of model classes\n ' return [page_model for page_model in cls.allowed_subpage_models() if page_model.is_creatable]
@classmethod def creatable_subpage_models(cls): '\n Returns the list of page types that may be created under this page type,\n as a list of model classes\n ' return [page_model for page_model in cls.allowed_subpage_models() if page_model.is_creatable]<|docstring|>Returns the list of page ty...
abe872c5fdc815ee572e92743a1794e8422765a4b4e21b9bffee21cca51d54fb
@classmethod def can_exist_under(cls, parent): '\n Checks if this page type can exist as a subpage under a parent page\n instance.\n\n See also: :func:`Page.can_create_at` and :func:`Page.can_move_to`\n ' return (cls in parent.specific_class.allowed_subpage_models())
Checks if this page type can exist as a subpage under a parent page instance. See also: :func:`Page.can_create_at` and :func:`Page.can_move_to`
tuiuiu/tuiuiucore/models.py
can_exist_under
caputomarcos/tuiuiu.io
3
python
@classmethod def can_exist_under(cls, parent): '\n Checks if this page type can exist as a subpage under a parent page\n instance.\n\n See also: :func:`Page.can_create_at` and :func:`Page.can_move_to`\n ' return (cls in parent.specific_class.allowed_subpage_models())
@classmethod def can_exist_under(cls, parent): '\n Checks if this page type can exist as a subpage under a parent page\n instance.\n\n See also: :func:`Page.can_create_at` and :func:`Page.can_move_to`\n ' return (cls in parent.specific_class.allowed_subpage_models())<|docstring|>Chec...