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
db743d00a6a22a8836eb2a59d2da2506ebf8c51eda923a1e1f69441afc5849b3
def _build_aux_head(net, end_points, num_classes, hparams, scope): 'Auxiliary head used for all models across all datasets.' with tf.variable_scope(scope): aux_logits = tf.identity(net) with tf.variable_scope('aux_logits'): aux_logits = slim.avg_pool2d(aux_logits, [5, 5], stride=3, p...
Auxiliary head used for all models across all datasets.
utils/slim_nets/nasnet.py
_build_aux_head
SMH17/TensorBoxPy3
12
python
def _build_aux_head(net, end_points, num_classes, hparams, scope): with tf.variable_scope(scope): aux_logits = tf.identity(net) with tf.variable_scope('aux_logits'): aux_logits = slim.avg_pool2d(aux_logits, [5, 5], stride=3, padding='VALID') aux_logits = slim.conv2d(aux_...
def _build_aux_head(net, end_points, num_classes, hparams, scope): with tf.variable_scope(scope): aux_logits = tf.identity(net) with tf.variable_scope('aux_logits'): aux_logits = slim.avg_pool2d(aux_logits, [5, 5], stride=3, padding='VALID') aux_logits = slim.conv2d(aux_...
d33c452f1b9f76da8053ee6f3ef8206c06bd2ea6b0d14f8dd54af9f3838417d6
def _imagenet_stem(inputs, hparams, stem_cell): 'Stem used for models trained on ImageNet.' num_stem_cells = 2 num_stem_filters = int((32 * hparams.stem_multiplier)) net = slim.conv2d(inputs, num_stem_filters, [3, 3], stride=2, scope='conv0', padding='VALID') net = slim.batch_norm(net, scope='conv0_...
Stem used for models trained on ImageNet.
utils/slim_nets/nasnet.py
_imagenet_stem
SMH17/TensorBoxPy3
12
python
def _imagenet_stem(inputs, hparams, stem_cell): num_stem_cells = 2 num_stem_filters = int((32 * hparams.stem_multiplier)) net = slim.conv2d(inputs, num_stem_filters, [3, 3], stride=2, scope='conv0', padding='VALID') net = slim.batch_norm(net, scope='conv0_bn') cell_outputs = [None, net] fil...
def _imagenet_stem(inputs, hparams, stem_cell): num_stem_cells = 2 num_stem_filters = int((32 * hparams.stem_multiplier)) net = slim.conv2d(inputs, num_stem_filters, [3, 3], stride=2, scope='conv0', padding='VALID') net = slim.batch_norm(net, scope='conv0_bn') cell_outputs = [None, net] fil...
2e26db7c3dfe84fd10e6c60935da711ad7f1581b37b96fecfbfc45cf84d6bb87
def _cifar_stem(inputs, hparams): 'Stem used for models trained on Cifar.' num_stem_filters = int((hparams.num_conv_filters * hparams.stem_multiplier)) net = slim.conv2d(inputs, num_stem_filters, 3, scope='l1_stem_3x3') net = slim.batch_norm(net, scope='l1_stem_bn') return (net, [None, net])
Stem used for models trained on Cifar.
utils/slim_nets/nasnet.py
_cifar_stem
SMH17/TensorBoxPy3
12
python
def _cifar_stem(inputs, hparams): num_stem_filters = int((hparams.num_conv_filters * hparams.stem_multiplier)) net = slim.conv2d(inputs, num_stem_filters, 3, scope='l1_stem_3x3') net = slim.batch_norm(net, scope='l1_stem_bn') return (net, [None, net])
def _cifar_stem(inputs, hparams): num_stem_filters = int((hparams.num_conv_filters * hparams.stem_multiplier)) net = slim.conv2d(inputs, num_stem_filters, 3, scope='l1_stem_3x3') net = slim.batch_norm(net, scope='l1_stem_bn') return (net, [None, net])<|docstring|>Stem used for models trained on Cif...
b74101db19b6f5c0eae899874f673e633b59f64333c71f3b7e32d26c0cb11a8e
def build_nasnet_cifar(images, num_classes, is_training=True, config=None): 'Build NASNet model for the Cifar Dataset.' hparams = (cifar_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): ...
Build NASNet model for the Cifar Dataset.
utils/slim_nets/nasnet.py
build_nasnet_cifar
SMH17/TensorBoxPy3
12
python
def build_nasnet_cifar(images, num_classes, is_training=True, config=None): hparams = (cifar_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): tf.logging.info('A GPU is available on...
def build_nasnet_cifar(images, num_classes, is_training=True, config=None): hparams = (cifar_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): tf.logging.info('A GPU is available on...
f489f8df3d7053d64723ee3ccb6c83e89a6cb7e00ae9f456b713cc54dccceeba
def build_nasnet_mobile(images, num_classes, is_training=True, final_endpoint=None, config=None): 'Build NASNet Mobile model for the ImageNet Dataset.' hparams = (mobile_imagenet_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available()...
Build NASNet Mobile model for the ImageNet Dataset.
utils/slim_nets/nasnet.py
build_nasnet_mobile
SMH17/TensorBoxPy3
12
python
def build_nasnet_mobile(images, num_classes, is_training=True, final_endpoint=None, config=None): hparams = (mobile_imagenet_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): tf.log...
def build_nasnet_mobile(images, num_classes, is_training=True, final_endpoint=None, config=None): hparams = (mobile_imagenet_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): tf.log...
1f03af9472c900fafeb08e9169f007aec5a8f90f28f4f3e8d1973d1a0db55bf3
def build_nasnet_large(images, num_classes, is_training=True, final_endpoint=None, config=None): 'Build NASNet Large model for the ImageNet Dataset.' hparams = (large_imagenet_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() an...
Build NASNet Large model for the ImageNet Dataset.
utils/slim_nets/nasnet.py
build_nasnet_large
SMH17/TensorBoxPy3
12
python
def build_nasnet_large(images, num_classes, is_training=True, final_endpoint=None, config=None): hparams = (large_imagenet_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): tf.loggi...
def build_nasnet_large(images, num_classes, is_training=True, final_endpoint=None, config=None): hparams = (large_imagenet_config() if (config is None) else copy.deepcopy(config)) _update_hparams(hparams, is_training) if (tf.test.is_gpu_available() and (hparams.data_format == 'NHWC')): tf.loggi...
33397883ba8d688f052227b05f60402d5235b4c786d553b8110f31a36e4ce1e5
def _build_nasnet_base(images, normal_cell, reduction_cell, num_classes, hparams, is_training, stem_type, final_endpoint=None): 'Constructs a NASNet image model.' end_points = {} def add_and_check_endpoint(endpoint_name, net): end_points[endpoint_name] = net return (final_endpoint and (endp...
Constructs a NASNet image model.
utils/slim_nets/nasnet.py
_build_nasnet_base
SMH17/TensorBoxPy3
12
python
def _build_nasnet_base(images, normal_cell, reduction_cell, num_classes, hparams, is_training, stem_type, final_endpoint=None): end_points = {} def add_and_check_endpoint(endpoint_name, net): end_points[endpoint_name] = net return (final_endpoint and (endpoint_name == final_endpoint)) ...
def _build_nasnet_base(images, normal_cell, reduction_cell, num_classes, hparams, is_training, stem_type, final_endpoint=None): end_points = {} def add_and_check_endpoint(endpoint_name, net): end_points[endpoint_name] = net return (final_endpoint and (endpoint_name == final_endpoint)) ...
c67034b2a1b3233466d2bbefa4d67197b6eacfebc96e5a1e9575fc6ef43bf2d3
def find_anagrams(s): '\n :param s: str, the word you input\n :return: None\n ' global permutation_words lst = [] letter_list = [] permutation_words.clear() for letter in s: letter_list.append(letter) find_anagrams_helper(letter_list, lst)
:param s: str, the word you input :return: None
stanCode projects/boggle/anagram.py
find_anagrams
EricLiu750501/stanCode-projects
0
python
def find_anagrams(s): '\n :param s: str, the word you input\n :return: None\n ' global permutation_words lst = [] letter_list = [] permutation_words.clear() for letter in s: letter_list.append(letter) find_anagrams_helper(letter_list, lst)
def find_anagrams(s): '\n :param s: str, the word you input\n :return: None\n ' global permutation_words lst = [] letter_list = [] permutation_words.clear() for letter in s: letter_list.append(letter) find_anagrams_helper(letter_list, lst)<|docstring|>:param s: str, the word...
cae32dd5e57f844f8bc4695a8ba5bf3b2bb4717cb09d340ed035eaa14ac4677f
def isuccess(self, url, status_code): 'Increment Success number.' self.req_stats['success'] += 1 self.log.lstatus(status_code, url) if self.save_results: self.store_results(status_code, url) if self.check_vdom: self.check_vitual_dom()
Increment Success number.
logic/stats.py
isuccess
dieg0moraes/fuzzer
3
python
def isuccess(self, url, status_code): self.req_stats['success'] += 1 self.log.lstatus(status_code, url) if self.save_results: self.store_results(status_code, url) if self.check_vdom: self.check_vitual_dom()
def isuccess(self, url, status_code): self.req_stats['success'] += 1 self.log.lstatus(status_code, url) if self.save_results: self.store_results(status_code, url) if self.check_vdom: self.check_vitual_dom()<|docstring|>Increment Success number.<|endoftext|>
c8585c31ca4f7fd3e43ceeb4d10be600797806bfb2d8f95cad9b2826cd7c2be2
def ifail(self, url, status_code): 'Increment Fail number.' self.req_stats['fail'] += 1 self.log.lstatus(status_code, url) if self.save_results: self.store_results(status_code, url)
Increment Fail number.
logic/stats.py
ifail
dieg0moraes/fuzzer
3
python
def ifail(self, url, status_code): self.req_stats['fail'] += 1 self.log.lstatus(status_code, url) if self.save_results: self.store_results(status_code, url)
def ifail(self, url, status_code): self.req_stats['fail'] += 1 self.log.lstatus(status_code, url) if self.save_results: self.store_results(status_code, url)<|docstring|>Increment Fail number.<|endoftext|>
70c67d82f20ee1a4f9017d4d2d45df4414fcc9767a023b84da72667666626bec
def iexception(self): 'Increment Exception number.' self.req_stats['exception'] += 1
Increment Exception number.
logic/stats.py
iexception
dieg0moraes/fuzzer
3
python
def iexception(self): self.req_stats['exception'] += 1
def iexception(self): self.req_stats['exception'] += 1<|docstring|>Increment Exception number.<|endoftext|>
1fa2d9510dc5c1055fce51a4a5f806cec60ed175bc0d7dadf8a977e24606bb26
def itimeout(self): 'Increment Timeout number.' self.req_stats['timeout'] += 1
Increment Timeout number.
logic/stats.py
itimeout
dieg0moraes/fuzzer
3
python
def itimeout(self): self.req_stats['timeout'] += 1
def itimeout(self): self.req_stats['timeout'] += 1<|docstring|>Increment Timeout number.<|endoftext|>
f33b40e6571954ca142ce9363c65f48d5f55962e6891261a491ac105375ae0ed
def check_vitual_dom(self): 'Check virtual DOM redirects' total = (self.req_stats['success'] + self.req_stats['fail']) if (total > 100): percentage = VDOM_PERCENTAGE max_success = round(((total * percentage) / 100)) if (self.req_stats['success'] >= max_success): self.chec...
Check virtual DOM redirects
logic/stats.py
check_vitual_dom
dieg0moraes/fuzzer
3
python
def check_vitual_dom(self): total = (self.req_stats['success'] + self.req_stats['fail']) if (total > 100): percentage = VDOM_PERCENTAGE max_success = round(((total * percentage) / 100)) if (self.req_stats['success'] >= max_success): self.check_vdom = False se...
def check_vitual_dom(self): total = (self.req_stats['success'] + self.req_stats['fail']) if (total > 100): percentage = VDOM_PERCENTAGE max_success = round(((total * percentage) / 100)) if (self.req_stats['success'] >= max_success): self.check_vdom = False se...
0402648d54e9ad1fca5ab097b0c4d0386e44b9afd5e3a3a92a712363863436a6
def reset_stats(self): 'Reset all statistics' for key in self.req_stats: self.req_stats[key] = 0 self.start_time = None self.end_time = None self.save_list = [] self.check_vdom = True
Reset all statistics
logic/stats.py
reset_stats
dieg0moraes/fuzzer
3
python
def reset_stats(self): for key in self.req_stats: self.req_stats[key] = 0 self.start_time = None self.end_time = None self.save_list = [] self.check_vdom = True
def reset_stats(self): for key in self.req_stats: self.req_stats[key] = 0 self.start_time = None self.end_time = None self.save_list = [] self.check_vdom = True<|docstring|>Reset all statistics<|endoftext|>
cb02b6374a55e42fee8d99ed2f010bbfe6ebd58c06f8522f677cfc245f21e3d9
def __init__(self, version=__version__, uid=None, creation_time=None, priority=_default_priority, req_agent=None, resource_id=None, TTL=float('inf'), dependents=None, predecessors=None, **kwargs): ' Class constructor ' self.type = None self.version = version self.uid = uid self.creation_time = creat...
Class constructor
distributed_resource_allocator/src/pdra/core.py
__init__
nasa/MOSAIC
18
python
def __init__(self, version=__version__, uid=None, creation_time=None, priority=_default_priority, req_agent=None, resource_id=None, TTL=float('inf'), dependents=None, predecessors=None, **kwargs): ' ' self.type = None self.version = version self.uid = uid self.creation_time = creation_time self...
def __init__(self, version=__version__, uid=None, creation_time=None, priority=_default_priority, req_agent=None, resource_id=None, TTL=float('inf'), dependents=None, predecessors=None, **kwargs): ' ' self.type = None self.version = version self.uid = uid self.creation_time = creation_time self...
3e7bca0a2d22a44c5e13e132a4ab1596173b960976c10fb9c7eded1ade5352fa
@property def valid(self): ' Returns True if this dispatchable is valid ' return ((self.req_agent is not None) and (self.type is not None) and (self.resource_id is not None) and ((now() - self.creation_time) < self.TTL))
Returns True if this dispatchable is valid
distributed_resource_allocator/src/pdra/core.py
valid
nasa/MOSAIC
18
python
@property def valid(self): ' ' return ((self.req_agent is not None) and (self.type is not None) and (self.resource_id is not None) and ((now() - self.creation_time) < self.TTL))
@property def valid(self): ' ' return ((self.req_agent is not None) and (self.type is not None) and (self.resource_id is not None) and ((now() - self.creation_time) < self.TTL))<|docstring|>Returns True if this dispatchable is valid<|endoftext|>
36bd134891cf21ffcb86a6c62fe32b114606e66d545e8d0cd09a0b24d101bbb1
@staticmethod def _new_uid(): ' Generate a new unique identifier for this dispatchable based on\n the host ID, sequence number, and current time\n\n :return UUID: Unique identifier\n ' return str(uuid.uuid1())
Generate a new unique identifier for this dispatchable based on the host ID, sequence number, and current time :return UUID: Unique identifier
distributed_resource_allocator/src/pdra/core.py
_new_uid
nasa/MOSAIC
18
python
@staticmethod def _new_uid(): ' Generate a new unique identifier for this dispatchable based on\n the host ID, sequence number, and current time\n\n :return UUID: Unique identifier\n ' return str(uuid.uuid1())
@staticmethod def _new_uid(): ' Generate a new unique identifier for this dispatchable based on\n the host ID, sequence number, and current time\n\n :return UUID: Unique identifier\n ' return str(uuid.uuid1())<|docstring|>Generate a new unique identifier for this dispatchable based ...
1cd1d66d0e082ddcbf15f5baa43faebcd2aa30a0ff1fe0ab66faf5f670f633c7
def to_json(self, **kwargs): ' Serialize this dispatchable object to JSON. Only class slots\n will be serialized by default\n\n :param kwargs: Keyword arguments of ``json.dumps``\n :return: String, output of json.dumps\n ' d = {k: getattr(self, k) for k in self._serialize...
Serialize this dispatchable object to JSON. Only class slots will be serialized by default :param kwargs: Keyword arguments of ``json.dumps`` :return: String, output of json.dumps
distributed_resource_allocator/src/pdra/core.py
to_json
nasa/MOSAIC
18
python
def to_json(self, **kwargs): ' Serialize this dispatchable object to JSON. Only class slots\n will be serialized by default\n\n :param kwargs: Keyword arguments of ``json.dumps``\n :return: String, output of json.dumps\n ' d = {k: getattr(self, k) for k in self._serialize...
def to_json(self, **kwargs): ' Serialize this dispatchable object to JSON. Only class slots\n will be serialized by default\n\n :param kwargs: Keyword arguments of ``json.dumps``\n :return: String, output of json.dumps\n ' d = {k: getattr(self, k) for k in self._serialize...
2545e89db9bf4be35b4b7d66dd0e54ff9ac53fdc5491b3cabbd0099f0a4e8357
@classmethod def from_json(cls, str_json, **kwargs): ' Load a dispatchable from a JSON encoded string. Only class\n slots will be initialized by default.\n\n :param json: String JSON encoded\n :param kwargs: Keyword arguments of ``json.loads``\n :return: Dispatchable clas...
Load a dispatchable from a JSON encoded string. Only class slots will be initialized by default. :param json: String JSON encoded :param kwargs: Keyword arguments of ``json.loads`` :return: Dispatchable class instance
distributed_resource_allocator/src/pdra/core.py
from_json
nasa/MOSAIC
18
python
@classmethod def from_json(cls, str_json, **kwargs): ' Load a dispatchable from a JSON encoded string. Only class\n slots will be initialized by default.\n\n :param json: String JSON encoded\n :param kwargs: Keyword arguments of ``json.loads``\n :return: Dispatchable clas...
@classmethod def from_json(cls, str_json, **kwargs): ' Load a dispatchable from a JSON encoded string. Only class\n slots will be initialized by default.\n\n :param json: String JSON encoded\n :param kwargs: Keyword arguments of ``json.loads``\n :return: Dispatchable clas...
d8d46064c3101c42ae13ac0f09d7bf866ed22b5f8f5763cf29f609932f6427e7
def __str__(self): ' Generic string format.\n :return string: Class name\n ' return '<{}>'.format(self.__class__.__name__)
Generic string format. :return string: Class name
distributed_resource_allocator/src/pdra/core.py
__str__
nasa/MOSAIC
18
python
def __str__(self): ' Generic string format.\n :return string: Class name\n ' return '<{}>'.format(self.__class__.__name__)
def __str__(self): ' Generic string format.\n :return string: Class name\n ' return '<{}>'.format(self.__class__.__name__)<|docstring|>Generic string format. :return string: Class name<|endoftext|>
4cbc53d4cca51a3b591ac56c1febc76db49a9e9c3349d36c3611ce4511f0cb19
def __repr__(self): ' Generic class representation.\n :return string: Class name and UID\n ' return '<{} {}>'.format(self.__class__.__name__, self.uid)
Generic class representation. :return string: Class name and UID
distributed_resource_allocator/src/pdra/core.py
__repr__
nasa/MOSAIC
18
python
def __repr__(self): ' Generic class representation.\n :return string: Class name and UID\n ' return '<{} {}>'.format(self.__class__.__name__, self.uid)
def __repr__(self): ' Generic class representation.\n :return string: Class name and UID\n ' return '<{} {}>'.format(self.__class__.__name__, self.uid)<|docstring|>Generic class representation. :return string: Class name and UID<|endoftext|>
7e942098f3b8ff7ba2ae13268dfad42b5417f4f46d750af16881414febd04221
def __init__(self, loss, optim_method, sess=None, dataset=None, inputs=None, grads=None, variables=None, graph=None, val_outputs=None, val_labels=None, val_method=None, val_split=0.0, tensors_with_value=None, session_config=None, clip_norm=None, clip_value=None): '\n TFOptimizer is used for distributed train...
TFOptimizer is used for distributed training of TensorFlow on Spark/BigDL. :param loss: The loss tensor of the TensorFlow model, should be a scalar :param optim_method: the optimization method to be used, such as bigdl.optim.optimizer.Adam :param sess: the current TensorFlow Session, if you want to used a pre-trained ...
pyzoo/zoo/pipeline/api/net/tf_optimizer.py
__init__
Bob-Chou/analytics-zoo
1
python
def __init__(self, loss, optim_method, sess=None, dataset=None, inputs=None, grads=None, variables=None, graph=None, val_outputs=None, val_labels=None, val_method=None, val_split=0.0, tensors_with_value=None, session_config=None, clip_norm=None, clip_value=None): '\n TFOptimizer is used for distributed train...
def __init__(self, loss, optim_method, sess=None, dataset=None, inputs=None, grads=None, variables=None, graph=None, val_outputs=None, val_labels=None, val_method=None, val_split=0.0, tensors_with_value=None, session_config=None, clip_norm=None, clip_value=None): '\n TFOptimizer is used for distributed train...
3de58167e21fe941248ddf86230eb9b3e99895d7455a6f9999deadbb9c7b5c8a
def set_constant_gradient_clipping(self, min_value, max_value): '\n Configure constant clipping settings.\n\n\n :param min_value: the minimum value to clip by\n :param max_value: the maxmimum value to clip by\n ' self.optimizer.set_gradclip_const(min_value, max_value)
Configure constant clipping settings. :param min_value: the minimum value to clip by :param max_value: the maxmimum value to clip by
pyzoo/zoo/pipeline/api/net/tf_optimizer.py
set_constant_gradient_clipping
Bob-Chou/analytics-zoo
1
python
def set_constant_gradient_clipping(self, min_value, max_value): '\n Configure constant clipping settings.\n\n\n :param min_value: the minimum value to clip by\n :param max_value: the maxmimum value to clip by\n ' self.optimizer.set_gradclip_const(min_value, max_value)
def set_constant_gradient_clipping(self, min_value, max_value): '\n Configure constant clipping settings.\n\n\n :param min_value: the minimum value to clip by\n :param max_value: the maxmimum value to clip by\n ' self.optimizer.set_gradclip_const(min_value, max_value)<|docstring|>Con...
882c9b3be1cae1950f25390268b995a1cd5c37b797e72fa74571d1b0af86272c
def set_gradient_clipping_by_l2_norm(self, clip_norm): '\n Configure L2 norm clipping settings.\n\n\n :param clip_norm: gradient L2-Norm threshold\n ' self.optimizer.set_gradclip_l2norm(clip_norm)
Configure L2 norm clipping settings. :param clip_norm: gradient L2-Norm threshold
pyzoo/zoo/pipeline/api/net/tf_optimizer.py
set_gradient_clipping_by_l2_norm
Bob-Chou/analytics-zoo
1
python
def set_gradient_clipping_by_l2_norm(self, clip_norm): '\n Configure L2 norm clipping settings.\n\n\n :param clip_norm: gradient L2-Norm threshold\n ' self.optimizer.set_gradclip_l2norm(clip_norm)
def set_gradient_clipping_by_l2_norm(self, clip_norm): '\n Configure L2 norm clipping settings.\n\n\n :param clip_norm: gradient L2-Norm threshold\n ' self.optimizer.set_gradclip_l2norm(clip_norm)<|docstring|>Configure L2 norm clipping settings. :param clip_norm: gradient L2-Norm threshol...
75edb12954bf405eeb06dd47802fbe372af49737783745925429c0558a1ceccc
def small_config(): 'Small config.' return {'init_scale': 0.1, 'learning_rate': 1.0, 'max_grad_norm': 5, 'num_layers': 2, 'num_steps': 20, 'hidden_size': 200, 'max_epoch': 4, 'max_max_epoch': 13, 'keep_prob': 1.0, 'lr_decay': 0.5, 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}
Small config.
config.py
small_config
pltrdy/tf_ptb_lm
20
python
def small_config(): return {'init_scale': 0.1, 'learning_rate': 1.0, 'max_grad_norm': 5, 'num_layers': 2, 'num_steps': 20, 'hidden_size': 200, 'max_epoch': 4, 'max_max_epoch': 13, 'keep_prob': 1.0, 'lr_decay': 0.5, 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}
def small_config(): return {'init_scale': 0.1, 'learning_rate': 1.0, 'max_grad_norm': 5, 'num_layers': 2, 'num_steps': 20, 'hidden_size': 200, 'max_epoch': 4, 'max_max_epoch': 13, 'keep_prob': 1.0, 'lr_decay': 0.5, 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}<|docstring|>Small config.<|endoftext...
789a45538ac3dc1899a84baf1c87f6d8b9f6addf64de9974ea50cb9f1fe8ee2a
def medium_config(): 'Medium config.' return {'init_scale': 0.05, 'learning_rate': 1.0, 'max_grad_norm': 5, 'num_layers': 2, 'num_steps': 35, 'hidden_size': 650, 'max_epoch': 6, 'max_max_epoch': 39, 'keep_prob': 0.5, 'lr_decay': 0.8, 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}
Medium config.
config.py
medium_config
pltrdy/tf_ptb_lm
20
python
def medium_config(): return {'init_scale': 0.05, 'learning_rate': 1.0, 'max_grad_norm': 5, 'num_layers': 2, 'num_steps': 35, 'hidden_size': 650, 'max_epoch': 6, 'max_max_epoch': 39, 'keep_prob': 0.5, 'lr_decay': 0.8, 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}
def medium_config(): return {'init_scale': 0.05, 'learning_rate': 1.0, 'max_grad_norm': 5, 'num_layers': 2, 'num_steps': 35, 'hidden_size': 650, 'max_epoch': 6, 'max_max_epoch': 39, 'keep_prob': 0.5, 'lr_decay': 0.8, 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}<|docstring|>Medium config.<|endoft...
7de568106dc3e2561621fca9257d40c962bf61fa35d97e6826966c745bf97189
def large_config(): 'Large config.' return {'init_scale': 0.04, 'learning_rate': 1.0, 'max_grad_norm': 10, 'num_layers': 2, 'num_steps': 35, 'hidden_size': 1500, 'max_epoch': 14, 'max_max_epoch': 55, 'keep_prob': 0.35, 'lr_decay': (1 / 1.15), 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}
Large config.
config.py
large_config
pltrdy/tf_ptb_lm
20
python
def large_config(): return {'init_scale': 0.04, 'learning_rate': 1.0, 'max_grad_norm': 10, 'num_layers': 2, 'num_steps': 35, 'hidden_size': 1500, 'max_epoch': 14, 'max_max_epoch': 55, 'keep_prob': 0.35, 'lr_decay': (1 / 1.15), 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}
def large_config(): return {'init_scale': 0.04, 'learning_rate': 1.0, 'max_grad_norm': 10, 'num_layers': 2, 'num_steps': 35, 'hidden_size': 1500, 'max_epoch': 14, 'max_max_epoch': 55, 'keep_prob': 0.35, 'lr_decay': (1 / 1.15), 'batch_size': 20, 'vocab_size': 10000, 'num_samples': 1024}<|docstring|>Large config...
db3ec792941eeb3214aeef691607605c855f868107fed5dbda1bb36e771d8a34
def test_find_links_relative_path(script, data, with_wheel): 'Test find-links as a relative path.' result = script.pip('install', 'parent==0.1', '--no-index', '--find-links', 'packages/', cwd=data.root) dist_info_folder = (script.site_packages / 'parent-0.1.dist-info') initools_folder = (script.site_pac...
Test find-links as a relative path.
tests/functional/test_install_index.py
test_find_links_relative_path
MrMino/pip
2
python
def test_find_links_relative_path(script, data, with_wheel): result = script.pip('install', 'parent==0.1', '--no-index', '--find-links', 'packages/', cwd=data.root) dist_info_folder = (script.site_packages / 'parent-0.1.dist-info') initools_folder = (script.site_packages / 'parent') result.did_crea...
def test_find_links_relative_path(script, data, with_wheel): result = script.pip('install', 'parent==0.1', '--no-index', '--find-links', 'packages/', cwd=data.root) dist_info_folder = (script.site_packages / 'parent-0.1.dist-info') initools_folder = (script.site_packages / 'parent') result.did_crea...
4d14afbaa921621c9722c66bb737c697650d2a6b1a3e4f4f33de66a560df7153
def test_find_links_requirements_file_relative_path(script, data, with_wheel): 'Test find-links as a relative path to a reqs file.' script.scratch_path.joinpath('test-req.txt').write_text(textwrap.dedent('\n --no-index\n --find-links={}\n parent==0.1\n '.format(data.packages.replace(...
Test find-links as a relative path to a reqs file.
tests/functional/test_install_index.py
test_find_links_requirements_file_relative_path
MrMino/pip
2
python
def test_find_links_requirements_file_relative_path(script, data, with_wheel): script.scratch_path.joinpath('test-req.txt').write_text(textwrap.dedent('\n --no-index\n --find-links={}\n parent==0.1\n '.format(data.packages.replace(os.path.sep, '/')))) result = script.pip('instal...
def test_find_links_requirements_file_relative_path(script, data, with_wheel): script.scratch_path.joinpath('test-req.txt').write_text(textwrap.dedent('\n --no-index\n --find-links={}\n parent==0.1\n '.format(data.packages.replace(os.path.sep, '/')))) result = script.pip('instal...
501641cc999979dcb6903b2ecf57273f4284b8351030dc884976dd5f54186375
def test_install_from_file_index_hash_link(script, data, with_wheel): '\n Test that a pkg can be installed from a file:// index using a link with a\n hash\n ' result = script.pip('install', '-i', data.index_url(), 'simple==1.0') dist_info_folder = (script.site_packages / 'simple-1.0.dist-info') ...
Test that a pkg can be installed from a file:// index using a link with a hash
tests/functional/test_install_index.py
test_install_from_file_index_hash_link
MrMino/pip
2
python
def test_install_from_file_index_hash_link(script, data, with_wheel): '\n Test that a pkg can be installed from a file:// index using a link with a\n hash\n ' result = script.pip('install', '-i', data.index_url(), 'simple==1.0') dist_info_folder = (script.site_packages / 'simple-1.0.dist-info') ...
def test_install_from_file_index_hash_link(script, data, with_wheel): '\n Test that a pkg can be installed from a file:// index using a link with a\n hash\n ' result = script.pip('install', '-i', data.index_url(), 'simple==1.0') dist_info_folder = (script.site_packages / 'simple-1.0.dist-info') ...
81d1f65f6a6abe987e8977029eb728a8f3579f25e691d20d037d072aee0f70be
def test_file_index_url_quoting(script, data, with_wheel): '\n Test url quoting of file index url with a space\n ' index_url = data.index_url(urllib.parse.quote('in dex')) result = script.pip('install', '-vvv', '--index-url', index_url, 'simple') result.did_create((script.site_packages / 'simple')...
Test url quoting of file index url with a space
tests/functional/test_install_index.py
test_file_index_url_quoting
MrMino/pip
2
python
def test_file_index_url_quoting(script, data, with_wheel): '\n \n ' index_url = data.index_url(urllib.parse.quote('in dex')) result = script.pip('install', '-vvv', '--index-url', index_url, 'simple') result.did_create((script.site_packages / 'simple')) result.did_create((script.site_packages /...
def test_file_index_url_quoting(script, data, with_wheel): '\n \n ' index_url = data.index_url(urllib.parse.quote('in dex')) result = script.pip('install', '-vvv', '--index-url', index_url, 'simple') result.did_create((script.site_packages / 'simple')) result.did_create((script.site_packages /...
05a12204ac0812fe87a1ea24a011249338fdfe03b3b3ed276891a089f557b019
def my_argument_parser(epilog=None): '\n Create a parser with some common arguments used by detectron2 users.\n\n Args:\n epilog (str): epilog passed to ArgumentParser describing the usage.\n\n Returns:\n argparse.ArgumentParser:\n ' parser = argparse.ArgumentParser(epilog=(epilog or f...
Create a parser with some common arguments used by detectron2 users. Args: epilog (str): epilog passed to ArgumentParser describing the usage. Returns: argparse.ArgumentParser:
projects/ReppointV1/train_net.py
my_argument_parser
dashu233/SparseR-CNN
0
python
def my_argument_parser(epilog=None): '\n Create a parser with some common arguments used by detectron2 users.\n\n Args:\n epilog (str): epilog passed to ArgumentParser describing the usage.\n\n Returns:\n argparse.ArgumentParser:\n ' parser = argparse.ArgumentParser(epilog=(epilog or f...
def my_argument_parser(epilog=None): '\n Create a parser with some common arguments used by detectron2 users.\n\n Args:\n epilog (str): epilog passed to ArgumentParser describing the usage.\n\n Returns:\n argparse.ArgumentParser:\n ' parser = argparse.ArgumentParser(epilog=(epilog or f...
92e06dddd999a72d1a1933573db123777c9e27624b842db72dd273dae5524089
def setup(args): '\n Create configs and perform basic setups.\n ' cfg = get_cfg() add_reppoint_config(cfg) cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) cfg.freeze() default_setup(cfg, args) return cfg
Create configs and perform basic setups.
projects/ReppointV1/train_net.py
setup
dashu233/SparseR-CNN
0
python
def setup(args): '\n \n ' cfg = get_cfg() add_reppoint_config(cfg) cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) cfg.freeze() default_setup(cfg, args) return cfg
def setup(args): '\n \n ' cfg = get_cfg() add_reppoint_config(cfg) cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) cfg.freeze() default_setup(cfg, args) return cfg<|docstring|>Create configs and perform basic setups.<|endoftext|>
67a4eaf72a343bc50f5cc0627e057a334f430dec46720c935cbdcc1bcee47e7c
@classmethod def build_evaluator(cls, cfg, dataset_name, output_folder=None): '\n Create evaluator(s) for a given dataset.\n This uses the special metadata "evaluator_type" associated with each builtin dataset.\n For your own dataset, you can simply create an evaluator manually in your\n ...
Create evaluator(s) for a given dataset. This uses the special metadata "evaluator_type" associated with each builtin dataset. For your own dataset, you can simply create an evaluator manually in your script and do not have to worry about the hacky if-else logic here.
projects/ReppointV1/train_net.py
build_evaluator
dashu233/SparseR-CNN
0
python
@classmethod def build_evaluator(cls, cfg, dataset_name, output_folder=None): '\n Create evaluator(s) for a given dataset.\n This uses the special metadata "evaluator_type" associated with each builtin dataset.\n For your own dataset, you can simply create an evaluator manually in your\n ...
@classmethod def build_evaluator(cls, cfg, dataset_name, output_folder=None): '\n Create evaluator(s) for a given dataset.\n This uses the special metadata "evaluator_type" associated with each builtin dataset.\n For your own dataset, you can simply create an evaluator manually in your\n ...
e088cc898f3ba0b7b6745b2fd38e3720f498ca1b1409b1e7d045cc48b75a70aa
def test_streaming_response(self): '\n Test a request to an endpoint that returns a streaming response\n ' s = FastHttpSession(self.environment, ('http://127.0.0.1:%i' % self.port)) r = s.get('/streaming/30') self.assertGreater(self.runner.stats.get('/streaming/30', method='GET').avg_respo...
Test a request to an endpoint that returns a streaming response
locust/test/test_fasthttp.py
test_streaming_response
moabba/locust
0
python
def test_streaming_response(self): '\n \n ' s = FastHttpSession(self.environment, ('http://127.0.0.1:%i' % self.port)) r = s.get('/streaming/30') self.assertGreater(self.runner.stats.get('/streaming/30', method='GET').avg_response_time, 250) self.runner.stats.clear_all() r = s.get(...
def test_streaming_response(self): '\n \n ' s = FastHttpSession(self.environment, ('http://127.0.0.1:%i' % self.port)) r = s.get('/streaming/30') self.assertGreater(self.runner.stats.get('/streaming/30', method='GET').avg_response_time, 250) self.runner.stats.clear_all() r = s.get(...
d04e72cac9a49e4cc774b79e349ced4909cf9d455301bb874f8140ca72e82eb5
def __init__(self, obj_id: int=None, **kwargs): 'Init for field class.' self.obj_id = obj_id super().__init__(**kwargs)
Init for field class.
pyarcher/field.py
__init__
kylecribbs/pyarcher
3
python
def __init__(self, obj_id: int=None, **kwargs): self.obj_id = obj_id super().__init__(**kwargs)
def __init__(self, obj_id: int=None, **kwargs): self.obj_id = obj_id super().__init__(**kwargs)<|docstring|>Init for field class.<|endoftext|>
1f8d5ae04c165ac71bb9fc45de072f29cacd6167feff7ae517db735556e3748d
def refresh_metadata(self): 'Return dict of metadata.' return self.raw_metadata().json()['RequestedObject']
Return dict of metadata.
pyarcher/field.py
refresh_metadata
kylecribbs/pyarcher
3
python
def refresh_metadata(self): return self.raw_metadata().json()['RequestedObject']
def refresh_metadata(self): return self.raw_metadata().json()['RequestedObject']<|docstring|>Return dict of metadata.<|endoftext|>
c9cb260d8815bb5ae9f3aa713946055f5fccf942074fd3c22bf093865f2196e2
def raw_metadata(self): 'Return raw resp of metadata.' api_url = f'core/system/fielddefinition/{self.obj_id}' resp_data = self.request_helper(api_url, method='get') return resp_data
Return raw resp of metadata.
pyarcher/field.py
raw_metadata
kylecribbs/pyarcher
3
python
def raw_metadata(self): api_url = f'core/system/fielddefinition/{self.obj_id}' resp_data = self.request_helper(api_url, method='get') return resp_data
def raw_metadata(self): api_url = f'core/system/fielddefinition/{self.obj_id}' resp_data = self.request_helper(api_url, method='get') return resp_data<|docstring|>Return raw resp of metadata.<|endoftext|>
75bb9f306ec1dc909a1136b40443cc0059588e8e56e8a17319da225078232fbd
def _process_strings(line, lang_nlp, get_lemmas, get_pos, remove_stopwords, replace_stopwords, get_maps): ' Helper function for obtaining various word representations ' orig_line = line line = line.strip() line = re.sub('&apos;', "'", line.strip()) line = re.sub('&quot;', '"', line.strip()) line...
Helper function for obtaining various word representations
evaluation/evaluate_attack_success.py
_process_strings
demelin/wsd_biases_for_nmt
2
python
def _process_strings(line, lang_nlp, get_lemmas, get_pos, remove_stopwords, replace_stopwords, get_maps): ' ' orig_line = line line = line.strip() line = re.sub('&apos;', "'", line.strip()) line = re.sub('&quot;', '"', line.strip()) line_nlp = lang_nlp(line) spacy_tokens = [elem.text for el...
def _process_strings(line, lang_nlp, get_lemmas, get_pos, remove_stopwords, replace_stopwords, get_maps): ' ' orig_line = line line = line.strip() line = re.sub('&apos;', "'", line.strip()) line = re.sub('&quot;', '"', line.strip()) line_nlp = lang_nlp(line) spacy_tokens = [elem.text for el...
4c22ec161c0fb026b9c0bf9eacb3104a49b7bc7eb97b5911c73a6dca9a6ec151
def _get_nmt_label(translation, adv_src, true_src, true_tgt, ambiguous_token, ambiguous_token_loc_seed, ambiguous_token_loc_adv, attractor_tokens_loc, seed_cluster_id, adv_cluster_id, other_cluster_ids, sense_lemmas_to_cluster, cluster_to_sense_lemmas, sense_tokens_to_cluster, cluster_to_sense_tokens, alignments, is_ad...
Helper function for evaluating whether the translations of true and adversarially perturbed source samples perform lexical WSD correctly.
evaluation/evaluate_attack_success.py
_get_nmt_label
demelin/wsd_biases_for_nmt
2
python
def _get_nmt_label(translation, adv_src, true_src, true_tgt, ambiguous_token, ambiguous_token_loc_seed, ambiguous_token_loc_adv, attractor_tokens_loc, seed_cluster_id, adv_cluster_id, other_cluster_ids, sense_lemmas_to_cluster, cluster_to_sense_lemmas, sense_tokens_to_cluster, cluster_to_sense_tokens, alignments, is_ad...
def _get_nmt_label(translation, adv_src, true_src, true_tgt, ambiguous_token, ambiguous_token_loc_seed, ambiguous_token_loc_adv, attractor_tokens_loc, seed_cluster_id, adv_cluster_id, other_cluster_ids, sense_lemmas_to_cluster, cluster_to_sense_lemmas, sense_tokens_to_cluster, cluster_to_sense_tokens, alignments, is_ad...
43323bb6d94196b51478825bc2f94622330dd52c60f29269eb392229374f2112
def _build_cluster_lookup(sense_clusters_table): ' Post-processes the scraped target sense cluster table by constructing a sense-to-cluster_id lookup table ' logging.info('Constructing the cluster lookup table ...') sense_to_cluster_table = dict() for src_term in sense_clusters_table.keys(): log...
Post-processes the scraped target sense cluster table by constructing a sense-to-cluster_id lookup table
evaluation/evaluate_attack_success.py
_build_cluster_lookup
demelin/wsd_biases_for_nmt
2
python
def _build_cluster_lookup(sense_clusters_table): ' ' logging.info('Constructing the cluster lookup table ...') sense_to_cluster_table = dict() for src_term in sense_clusters_table.keys(): logging.info("Looking-up the term '{:s}'".format(src_term)) sense_to_cluster_table[src_term] = dict...
def _build_cluster_lookup(sense_clusters_table): ' ' logging.info('Constructing the cluster lookup table ...') sense_to_cluster_table = dict() for src_term in sense_clusters_table.keys(): logging.info("Looking-up the term '{:s}'".format(src_term)) sense_to_cluster_table[src_term] = dict...
eaacda675fd66045225b45faf2590a85e03426b499d026b6d62650c9187e785c
def evaluate_attack_success(adversarial_samples_path, true_translations_path, adversarial_translations_path, true_alignments_path, adversarial_alignments_path, attractors_path, sense_clusters_path, output_tables_dir): ' Detects successful attacks and computes correlation between attack success and various metrics. ...
Detects successful attacks and computes correlation between attack success and various metrics.
evaluation/evaluate_attack_success.py
evaluate_attack_success
demelin/wsd_biases_for_nmt
2
python
def evaluate_attack_success(adversarial_samples_path, true_translations_path, adversarial_translations_path, true_alignments_path, adversarial_alignments_path, attractors_path, sense_clusters_path, output_tables_dir): ' ' def _score_and_filter(adversarial_sample_table_entry, attractors_entry, ambiguous_term, ...
def evaluate_attack_success(adversarial_samples_path, true_translations_path, adversarial_translations_path, true_alignments_path, adversarial_alignments_path, attractors_path, sense_clusters_path, output_tables_dir): ' ' def _score_and_filter(adversarial_sample_table_entry, attractors_entry, ambiguous_term, ...
3c042b98b2894b53abc7a00c49c0d5252237204c4dc392fc827951c3c7fe3db7
def _score_and_filter(adversarial_sample_table_entry, attractors_entry, ambiguous_term, ambiguous_form): ' Helper function for filtering adversarial samples. ' sense_lemmas_to_cluster = sense_lemmas_to_cluster_table.get(ambiguous_term, None) sense_tokens_to_cluster = sense_tokens_to_cluster_table.get(ambigu...
Helper function for filtering adversarial samples.
evaluation/evaluate_attack_success.py
_score_and_filter
demelin/wsd_biases_for_nmt
2
python
def _score_and_filter(adversarial_sample_table_entry, attractors_entry, ambiguous_term, ambiguous_form): ' ' sense_lemmas_to_cluster = sense_lemmas_to_cluster_table.get(ambiguous_term, None) sense_tokens_to_cluster = sense_tokens_to_cluster_table.get(ambiguous_term, None) cluster_to_sense_lemmas = clus...
def _score_and_filter(adversarial_sample_table_entry, attractors_entry, ambiguous_term, ambiguous_form): ' ' sense_lemmas_to_cluster = sense_lemmas_to_cluster_table.get(ambiguous_term, None) sense_tokens_to_cluster = sense_tokens_to_cluster_table.get(ambiguous_term, None) cluster_to_sense_lemmas = clus...
250fa33293683d5ac6d95259657d440102f4bb05ba6002946a18f41b9ad1376d
def _show_stats(): ' Helper for reporting on the generation process. ' def _pc(enum, denom): ' Helper function for computing percentage of the evaluated sample type ' return (((enum / denom) * 100) if (denom > 0) else 0) logging.info(('-' * 20)) num_all_seed_samples = (((stat_dict['num_...
Helper for reporting on the generation process.
evaluation/evaluate_attack_success.py
_show_stats
demelin/wsd_biases_for_nmt
2
python
def _show_stats(): ' ' def _pc(enum, denom): ' Helper function for computing percentage of the evaluated sample type ' return (((enum / denom) * 100) if (denom > 0) else 0) logging.info(('-' * 20)) num_all_seed_samples = (((stat_dict['num_true_samples_good_translations'] + stat_dict['n...
def _show_stats(): ' ' def _pc(enum, denom): ' Helper function for computing percentage of the evaluated sample type ' return (((enum / denom) * 100) if (denom > 0) else 0) logging.info(('-' * 20)) num_all_seed_samples = (((stat_dict['num_true_samples_good_translations'] + stat_dict['n...
34ea18ff96c49fc47ec8137af2f1c1e807e4b564c3a2f1d3c87c673437ee70c8
def _pc(enum, denom): ' Helper function for computing percentage of the evaluated sample type ' return (((enum / denom) * 100) if (denom > 0) else 0)
Helper function for computing percentage of the evaluated sample type
evaluation/evaluate_attack_success.py
_pc
demelin/wsd_biases_for_nmt
2
python
def _pc(enum, denom): ' ' return (((enum / denom) * 100) if (denom > 0) else 0)
def _pc(enum, denom): ' ' return (((enum / denom) * 100) if (denom > 0) else 0)<|docstring|>Helper function for computing percentage of the evaluated sample type<|endoftext|>
6eb5ae5ff3fb7d761ce1c46ac8164a932821f359318ceb61c038ef335154c37d
def format_img_size(img, C): ' formats the image size based on config ' img_min_side = float(C.im_size) (height, width, _) = img.shape ratio = 1 return (img, ratio)
formats the image size based on config
test_frcnn.py
format_img_size
DevanshBheda/keras-frcnn
0
python
def format_img_size(img, C): ' ' img_min_side = float(C.im_size) (height, width, _) = img.shape ratio = 1 return (img, ratio)
def format_img_size(img, C): ' ' img_min_side = float(C.im_size) (height, width, _) = img.shape ratio = 1 return (img, ratio)<|docstring|>formats the image size based on config<|endoftext|>
bd518ec45cb366151197d5a760f47ebaf6c0e8c96d7a6dea1fe7902e986a4bf5
def format_img_channels(img, C): ' formats the image channels based on config ' img = img[(:, :, (2, 1, 0))] img = img.astype(np.float32) img[(:, :, 0)] -= C.img_channel_mean[0] img[(:, :, 1)] -= C.img_channel_mean[1] img[(:, :, 2)] -= C.img_channel_mean[2] img /= C.img_scaling_factor im...
formats the image channels based on config
test_frcnn.py
format_img_channels
DevanshBheda/keras-frcnn
0
python
def format_img_channels(img, C): ' ' img = img[(:, :, (2, 1, 0))] img = img.astype(np.float32) img[(:, :, 0)] -= C.img_channel_mean[0] img[(:, :, 1)] -= C.img_channel_mean[1] img[(:, :, 2)] -= C.img_channel_mean[2] img /= C.img_scaling_factor img = np.transpose(img, (2, 0, 1)) img =...
def format_img_channels(img, C): ' ' img = img[(:, :, (2, 1, 0))] img = img.astype(np.float32) img[(:, :, 0)] -= C.img_channel_mean[0] img[(:, :, 1)] -= C.img_channel_mean[1] img[(:, :, 2)] -= C.img_channel_mean[2] img /= C.img_scaling_factor img = np.transpose(img, (2, 0, 1)) img =...
159e807818cad89c2691082fa18a58a35e9370313caa0b2126ef9ce242e23b66
def format_img(img, C): ' formats an image for model prediction based on config ' (img, ratio) = format_img_size(img, C) img = format_img_channels(img, C) return (img, ratio)
formats an image for model prediction based on config
test_frcnn.py
format_img
DevanshBheda/keras-frcnn
0
python
def format_img(img, C): ' ' (img, ratio) = format_img_size(img, C) img = format_img_channels(img, C) return (img, ratio)
def format_img(img, C): ' ' (img, ratio) = format_img_size(img, C) img = format_img_channels(img, C) return (img, ratio)<|docstring|>formats an image for model prediction based on config<|endoftext|>
15785e36f1cc816f08991d5a032bf2b93578d86eec87b9a0af9315afb17a02f0
def load_processing_data(dataset_name='process_tmp'): 'Load the processed data from disk' dataset = backend.load_dataset(dataset_name) return dataset
Load the processed data from disk
automl/pro_test/get_test_data.py
load_processing_data
lugq1990/automl-engine
2
python
def load_processing_data(dataset_name='process_tmp'): dataset = backend.load_dataset(dataset_name) return dataset
def load_processing_data(dataset_name='process_tmp'): dataset = backend.load_dataset(dataset_name) return dataset<|docstring|>Load the processed data from disk<|endoftext|>
5cab88ebd7896cb782b9adef3a63e58218db39e4dff3e94dae0ae4bc9f8e2754
def main(global_config, **app_config): ' This function returns a Pyramid WSGI application.\n ' settings = {} settings.update(global_config) settings.update(app_config) clean_oai_settings(settings) setup_logging(settings['logging_config']) create_engine(settings) ensure_oai_dc_exists()...
This function returns a Pyramid WSGI application.
kuha/oai/__init__.py
main
JohnJiangLA/kuha
4
python
def main(global_config, **app_config): ' \n ' settings = {} settings.update(global_config) settings.update(app_config) clean_oai_settings(settings) setup_logging(settings['logging_config']) create_engine(settings) ensure_oai_dc_exists() config = Configurator(settings=settings) ...
def main(global_config, **app_config): ' \n ' settings = {} settings.update(global_config) settings.update(app_config) clean_oai_settings(settings) setup_logging(settings['logging_config']) create_engine(settings) ensure_oai_dc_exists() config = Configurator(settings=settings) ...
c31185cba51e99a0bf4cb52292a0b41a885252de7ce614ba6a353fe867935904
def __init__(self, configurations=None, databases=None, family=None, links=None, name=None, port=None, product=None, protocol=None, user_groups=None, users=None, vendor=None, version=None, web_applications=None): 'Service - a model defined in Swagger' self._configurations = None self._databases = None s...
Service - a model defined in Swagger
rapid7vmconsole/models/service.py
__init__
BeanBagKing/vm-console-client-python
61
python
def __init__(self, configurations=None, databases=None, family=None, links=None, name=None, port=None, product=None, protocol=None, user_groups=None, users=None, vendor=None, version=None, web_applications=None): self._configurations = None self._databases = None self._family = None self._links = N...
def __init__(self, configurations=None, databases=None, family=None, links=None, name=None, port=None, product=None, protocol=None, user_groups=None, users=None, vendor=None, version=None, web_applications=None): self._configurations = None self._databases = None self._family = None self._links = N...
bc465cde5f59505aed0c3d7b26b8c57300db2c75723e1fddccfbacb0a0b677bd
@property def configurations(self): 'Gets the configurations of this Service. # noqa: E501\n\n Configuration key-values pairs enumerated on the service. # noqa: E501\n\n :return: The configurations of this Service. # noqa: E501\n :rtype: list[Configuration]\n ' return self._config...
Gets the configurations of this Service. # noqa: E501 Configuration key-values pairs enumerated on the service. # noqa: E501 :return: The configurations of this Service. # noqa: E501 :rtype: list[Configuration]
rapid7vmconsole/models/service.py
configurations
BeanBagKing/vm-console-client-python
61
python
@property def configurations(self): 'Gets the configurations of this Service. # noqa: E501\n\n Configuration key-values pairs enumerated on the service. # noqa: E501\n\n :return: The configurations of this Service. # noqa: E501\n :rtype: list[Configuration]\n ' return self._config...
@property def configurations(self): 'Gets the configurations of this Service. # noqa: E501\n\n Configuration key-values pairs enumerated on the service. # noqa: E501\n\n :return: The configurations of this Service. # noqa: E501\n :rtype: list[Configuration]\n ' return self._config...
9353077e9afc60290b29e37c6e0a24bc7a9640536dde17dbe3d07429c2e25bd7
@configurations.setter def configurations(self, configurations): 'Sets the configurations of this Service.\n\n Configuration key-values pairs enumerated on the service. # noqa: E501\n\n :param configurations: The configurations of this Service. # noqa: E501\n :type: list[Configuration]\n ...
Sets the configurations of this Service. Configuration key-values pairs enumerated on the service. # noqa: E501 :param configurations: The configurations of this Service. # noqa: E501 :type: list[Configuration]
rapid7vmconsole/models/service.py
configurations
BeanBagKing/vm-console-client-python
61
python
@configurations.setter def configurations(self, configurations): 'Sets the configurations of this Service.\n\n Configuration key-values pairs enumerated on the service. # noqa: E501\n\n :param configurations: The configurations of this Service. # noqa: E501\n :type: list[Configuration]\n ...
@configurations.setter def configurations(self, configurations): 'Sets the configurations of this Service.\n\n Configuration key-values pairs enumerated on the service. # noqa: E501\n\n :param configurations: The configurations of this Service. # noqa: E501\n :type: list[Configuration]\n ...
cd4640444f4b168f17f0538755970b14beb38abb9edb07f149ed100519ac8c43
@property def databases(self): 'Gets the databases of this Service. # noqa: E501\n\n The databases enumerated on the service. # noqa: E501\n\n :return: The databases of this Service. # noqa: E501\n :rtype: list[Database]\n ' return self._databases
Gets the databases of this Service. # noqa: E501 The databases enumerated on the service. # noqa: E501 :return: The databases of this Service. # noqa: E501 :rtype: list[Database]
rapid7vmconsole/models/service.py
databases
BeanBagKing/vm-console-client-python
61
python
@property def databases(self): 'Gets the databases of this Service. # noqa: E501\n\n The databases enumerated on the service. # noqa: E501\n\n :return: The databases of this Service. # noqa: E501\n :rtype: list[Database]\n ' return self._databases
@property def databases(self): 'Gets the databases of this Service. # noqa: E501\n\n The databases enumerated on the service. # noqa: E501\n\n :return: The databases of this Service. # noqa: E501\n :rtype: list[Database]\n ' return self._databases<|docstring|>Gets the databases of...
3930b50bde61e0e243b6cb7d08510ec95a186b22e2d10a3de53092047d6ed1f2
@databases.setter def databases(self, databases): 'Sets the databases of this Service.\n\n The databases enumerated on the service. # noqa: E501\n\n :param databases: The databases of this Service. # noqa: E501\n :type: list[Database]\n ' self._databases = databases
Sets the databases of this Service. The databases enumerated on the service. # noqa: E501 :param databases: The databases of this Service. # noqa: E501 :type: list[Database]
rapid7vmconsole/models/service.py
databases
BeanBagKing/vm-console-client-python
61
python
@databases.setter def databases(self, databases): 'Sets the databases of this Service.\n\n The databases enumerated on the service. # noqa: E501\n\n :param databases: The databases of this Service. # noqa: E501\n :type: list[Database]\n ' self._databases = databases
@databases.setter def databases(self, databases): 'Sets the databases of this Service.\n\n The databases enumerated on the service. # noqa: E501\n\n :param databases: The databases of this Service. # noqa: E501\n :type: list[Database]\n ' self._databases = databases<|docstring|>Set...
80b9f408637add96bf10116a55f6575cdf8b5e8aa19d2e66c58e415f2c073c56
@property def family(self): 'Gets the family of this Service. # noqa: E501\n\n The family of the service. # noqa: E501\n\n :return: The family of this Service. # noqa: E501\n :rtype: str\n ' return self._family
Gets the family of this Service. # noqa: E501 The family of the service. # noqa: E501 :return: The family of this Service. # noqa: E501 :rtype: str
rapid7vmconsole/models/service.py
family
BeanBagKing/vm-console-client-python
61
python
@property def family(self): 'Gets the family of this Service. # noqa: E501\n\n The family of the service. # noqa: E501\n\n :return: The family of this Service. # noqa: E501\n :rtype: str\n ' return self._family
@property def family(self): 'Gets the family of this Service. # noqa: E501\n\n The family of the service. # noqa: E501\n\n :return: The family of this Service. # noqa: E501\n :rtype: str\n ' return self._family<|docstring|>Gets the family of this Service. # noqa: E501 The family...
39ba36d51a91387825e8a3ea86d61e1b62d085734687477e2965fda51e31945d
@family.setter def family(self, family): 'Sets the family of this Service.\n\n The family of the service. # noqa: E501\n\n :param family: The family of this Service. # noqa: E501\n :type: str\n ' self._family = family
Sets the family of this Service. The family of the service. # noqa: E501 :param family: The family of this Service. # noqa: E501 :type: str
rapid7vmconsole/models/service.py
family
BeanBagKing/vm-console-client-python
61
python
@family.setter def family(self, family): 'Sets the family of this Service.\n\n The family of the service. # noqa: E501\n\n :param family: The family of this Service. # noqa: E501\n :type: str\n ' self._family = family
@family.setter def family(self, family): 'Sets the family of this Service.\n\n The family of the service. # noqa: E501\n\n :param family: The family of this Service. # noqa: E501\n :type: str\n ' self._family = family<|docstring|>Sets the family of this Service. The family of the ...
e1e400f66e35a2ee0a6e5c15cd749a5e28968418a0c6dc10d4450c6efefdde63
@property def links(self): 'Gets the links of this Service. # noqa: E501\n\n Hypermedia links to corresponding or related resources. # noqa: E501\n\n :return: The links of this Service. # noqa: E501\n :rtype: list[Link]\n ' return self._links
Gets the links of this Service. # noqa: E501 Hypermedia links to corresponding or related resources. # noqa: E501 :return: The links of this Service. # noqa: E501 :rtype: list[Link]
rapid7vmconsole/models/service.py
links
BeanBagKing/vm-console-client-python
61
python
@property def links(self): 'Gets the links of this Service. # noqa: E501\n\n Hypermedia links to corresponding or related resources. # noqa: E501\n\n :return: The links of this Service. # noqa: E501\n :rtype: list[Link]\n ' return self._links
@property def links(self): 'Gets the links of this Service. # noqa: E501\n\n Hypermedia links to corresponding or related resources. # noqa: E501\n\n :return: The links of this Service. # noqa: E501\n :rtype: list[Link]\n ' return self._links<|docstring|>Gets the links of this Ser...
eb243f3dd4cff07147a9e404a257e05729019ef656f77e9f1c6ee7ca60afa05c
@links.setter def links(self, links): 'Sets the links of this Service.\n\n Hypermedia links to corresponding or related resources. # noqa: E501\n\n :param links: The links of this Service. # noqa: E501\n :type: list[Link]\n ' self._links = links
Sets the links of this Service. Hypermedia links to corresponding or related resources. # noqa: E501 :param links: The links of this Service. # noqa: E501 :type: list[Link]
rapid7vmconsole/models/service.py
links
BeanBagKing/vm-console-client-python
61
python
@links.setter def links(self, links): 'Sets the links of this Service.\n\n Hypermedia links to corresponding or related resources. # noqa: E501\n\n :param links: The links of this Service. # noqa: E501\n :type: list[Link]\n ' self._links = links
@links.setter def links(self, links): 'Sets the links of this Service.\n\n Hypermedia links to corresponding or related resources. # noqa: E501\n\n :param links: The links of this Service. # noqa: E501\n :type: list[Link]\n ' self._links = links<|docstring|>Sets the links of this S...
0d2529c8abdc7444689bd80c9ff7e8482b81f3224115666e9a67627e71229dee
@property def name(self): 'Gets the name of this Service. # noqa: E501\n\n The name of the service. # noqa: E501\n\n :return: The name of this Service. # noqa: E501\n :rtype: str\n ' return self._name
Gets the name of this Service. # noqa: E501 The name of the service. # noqa: E501 :return: The name of this Service. # noqa: E501 :rtype: str
rapid7vmconsole/models/service.py
name
BeanBagKing/vm-console-client-python
61
python
@property def name(self): 'Gets the name of this Service. # noqa: E501\n\n The name of the service. # noqa: E501\n\n :return: The name of this Service. # noqa: E501\n :rtype: str\n ' return self._name
@property def name(self): 'Gets the name of this Service. # noqa: E501\n\n The name of the service. # noqa: E501\n\n :return: The name of this Service. # noqa: E501\n :rtype: str\n ' return self._name<|docstring|>Gets the name of this Service. # noqa: E501 The name of the servic...
2603b10ed5e3389d68f349582f29c0e80eb86eb68c8d5919d5fc9a6d1a546b53
@name.setter def name(self, name): 'Sets the name of this Service.\n\n The name of the service. # noqa: E501\n\n :param name: The name of this Service. # noqa: E501\n :type: str\n ' self._name = name
Sets the name of this Service. The name of the service. # noqa: E501 :param name: The name of this Service. # noqa: E501 :type: str
rapid7vmconsole/models/service.py
name
BeanBagKing/vm-console-client-python
61
python
@name.setter def name(self, name): 'Sets the name of this Service.\n\n The name of the service. # noqa: E501\n\n :param name: The name of this Service. # noqa: E501\n :type: str\n ' self._name = name
@name.setter def name(self, name): 'Sets the name of this Service.\n\n The name of the service. # noqa: E501\n\n :param name: The name of this Service. # noqa: E501\n :type: str\n ' self._name = name<|docstring|>Sets the name of this Service. The name of the service. # noqa: E501...
b883a7b875b2568c22c634b2b0f014a1ec21f8b2ec92570e32a667cba28ca336
@property def port(self): 'Gets the port of this Service. # noqa: E501\n\n The port of the service. # noqa: E501\n\n :return: The port of this Service. # noqa: E501\n :rtype: int\n ' return self._port
Gets the port of this Service. # noqa: E501 The port of the service. # noqa: E501 :return: The port of this Service. # noqa: E501 :rtype: int
rapid7vmconsole/models/service.py
port
BeanBagKing/vm-console-client-python
61
python
@property def port(self): 'Gets the port of this Service. # noqa: E501\n\n The port of the service. # noqa: E501\n\n :return: The port of this Service. # noqa: E501\n :rtype: int\n ' return self._port
@property def port(self): 'Gets the port of this Service. # noqa: E501\n\n The port of the service. # noqa: E501\n\n :return: The port of this Service. # noqa: E501\n :rtype: int\n ' return self._port<|docstring|>Gets the port of this Service. # noqa: E501 The port of the servic...
78ea3eb422524608643014197733cf4ea5eb45c98e1e7b9fdb25b3a60132ce45
@port.setter def port(self, port): 'Sets the port of this Service.\n\n The port of the service. # noqa: E501\n\n :param port: The port of this Service. # noqa: E501\n :type: int\n ' if (port is None): raise ValueError('Invalid value for `port`, must not be `None`') self...
Sets the port of this Service. The port of the service. # noqa: E501 :param port: The port of this Service. # noqa: E501 :type: int
rapid7vmconsole/models/service.py
port
BeanBagKing/vm-console-client-python
61
python
@port.setter def port(self, port): 'Sets the port of this Service.\n\n The port of the service. # noqa: E501\n\n :param port: The port of this Service. # noqa: E501\n :type: int\n ' if (port is None): raise ValueError('Invalid value for `port`, must not be `None`') self...
@port.setter def port(self, port): 'Sets the port of this Service.\n\n The port of the service. # noqa: E501\n\n :param port: The port of this Service. # noqa: E501\n :type: int\n ' if (port is None): raise ValueError('Invalid value for `port`, must not be `None`') self...
a7108840136357eac1a29aeab75be7fbb0c41bd519458694e4fe0829d7465784
@property def product(self): 'Gets the product of this Service. # noqa: E501\n\n The product running the service. # noqa: E501\n\n :return: The product of this Service. # noqa: E501\n :rtype: str\n ' return self._product
Gets the product of this Service. # noqa: E501 The product running the service. # noqa: E501 :return: The product of this Service. # noqa: E501 :rtype: str
rapid7vmconsole/models/service.py
product
BeanBagKing/vm-console-client-python
61
python
@property def product(self): 'Gets the product of this Service. # noqa: E501\n\n The product running the service. # noqa: E501\n\n :return: The product of this Service. # noqa: E501\n :rtype: str\n ' return self._product
@property def product(self): 'Gets the product of this Service. # noqa: E501\n\n The product running the service. # noqa: E501\n\n :return: The product of this Service. # noqa: E501\n :rtype: str\n ' return self._product<|docstring|>Gets the product of this Service. # noqa: E501 ...
a7aa9265e7097566530b83a48a2c30d205540daca4a7355507d8fb64ce0c9b05
@product.setter def product(self, product): 'Sets the product of this Service.\n\n The product running the service. # noqa: E501\n\n :param product: The product of this Service. # noqa: E501\n :type: str\n ' self._product = product
Sets the product of this Service. The product running the service. # noqa: E501 :param product: The product of this Service. # noqa: E501 :type: str
rapid7vmconsole/models/service.py
product
BeanBagKing/vm-console-client-python
61
python
@product.setter def product(self, product): 'Sets the product of this Service.\n\n The product running the service. # noqa: E501\n\n :param product: The product of this Service. # noqa: E501\n :type: str\n ' self._product = product
@product.setter def product(self, product): 'Sets the product of this Service.\n\n The product running the service. # noqa: E501\n\n :param product: The product of this Service. # noqa: E501\n :type: str\n ' self._product = product<|docstring|>Sets the product of this Service. The...
af823dfa4846aeb43985eeb3cd2e91ce6f7484f38b953d63579a7bff413fba30
@property def protocol(self): 'Gets the protocol of this Service. # noqa: E501\n\n The protocol of the service. # noqa: E501\n\n :return: The protocol of this Service. # noqa: E501\n :rtype: str\n ' return self._protocol
Gets the protocol of this Service. # noqa: E501 The protocol of the service. # noqa: E501 :return: The protocol of this Service. # noqa: E501 :rtype: str
rapid7vmconsole/models/service.py
protocol
BeanBagKing/vm-console-client-python
61
python
@property def protocol(self): 'Gets the protocol of this Service. # noqa: E501\n\n The protocol of the service. # noqa: E501\n\n :return: The protocol of this Service. # noqa: E501\n :rtype: str\n ' return self._protocol
@property def protocol(self): 'Gets the protocol of this Service. # noqa: E501\n\n The protocol of the service. # noqa: E501\n\n :return: The protocol of this Service. # noqa: E501\n :rtype: str\n ' return self._protocol<|docstring|>Gets the protocol of this Service. # noqa: E501...
4ab54f8b4cc101567124e75e3c732d4d40a1a4ec0367fa7e274774ac7c9b882a
@protocol.setter def protocol(self, protocol): 'Sets the protocol of this Service.\n\n The protocol of the service. # noqa: E501\n\n :param protocol: The protocol of this Service. # noqa: E501\n :type: str\n ' if (protocol is None): raise ValueError('Invalid value for `prot...
Sets the protocol of this Service. The protocol of the service. # noqa: E501 :param protocol: The protocol of this Service. # noqa: E501 :type: str
rapid7vmconsole/models/service.py
protocol
BeanBagKing/vm-console-client-python
61
python
@protocol.setter def protocol(self, protocol): 'Sets the protocol of this Service.\n\n The protocol of the service. # noqa: E501\n\n :param protocol: The protocol of this Service. # noqa: E501\n :type: str\n ' if (protocol is None): raise ValueError('Invalid value for `prot...
@protocol.setter def protocol(self, protocol): 'Sets the protocol of this Service.\n\n The protocol of the service. # noqa: E501\n\n :param protocol: The protocol of this Service. # noqa: E501\n :type: str\n ' if (protocol is None): raise ValueError('Invalid value for `prot...
16eaaa8517e30ba3dc412354e23d060fdf5913d1bfa760b66954317c0a1f759f
@property def user_groups(self): 'Gets the user_groups of this Service. # noqa: E501\n\n The group accounts enumerated on the service. # noqa: E501\n\n :return: The user_groups of this Service. # noqa: E501\n :rtype: list[GroupAccount]\n ' return self._user_groups
Gets the user_groups of this Service. # noqa: E501 The group accounts enumerated on the service. # noqa: E501 :return: The user_groups of this Service. # noqa: E501 :rtype: list[GroupAccount]
rapid7vmconsole/models/service.py
user_groups
BeanBagKing/vm-console-client-python
61
python
@property def user_groups(self): 'Gets the user_groups of this Service. # noqa: E501\n\n The group accounts enumerated on the service. # noqa: E501\n\n :return: The user_groups of this Service. # noqa: E501\n :rtype: list[GroupAccount]\n ' return self._user_groups
@property def user_groups(self): 'Gets the user_groups of this Service. # noqa: E501\n\n The group accounts enumerated on the service. # noqa: E501\n\n :return: The user_groups of this Service. # noqa: E501\n :rtype: list[GroupAccount]\n ' return self._user_groups<|docstring|>Gets...
5816dd0f1ab256a48c8957309649ee674bb6e2dc405f92af003c6e172f58f17e
@user_groups.setter def user_groups(self, user_groups): 'Sets the user_groups of this Service.\n\n The group accounts enumerated on the service. # noqa: E501\n\n :param user_groups: The user_groups of this Service. # noqa: E501\n :type: list[GroupAccount]\n ' self._user_groups = us...
Sets the user_groups of this Service. The group accounts enumerated on the service. # noqa: E501 :param user_groups: The user_groups of this Service. # noqa: E501 :type: list[GroupAccount]
rapid7vmconsole/models/service.py
user_groups
BeanBagKing/vm-console-client-python
61
python
@user_groups.setter def user_groups(self, user_groups): 'Sets the user_groups of this Service.\n\n The group accounts enumerated on the service. # noqa: E501\n\n :param user_groups: The user_groups of this Service. # noqa: E501\n :type: list[GroupAccount]\n ' self._user_groups = us...
@user_groups.setter def user_groups(self, user_groups): 'Sets the user_groups of this Service.\n\n The group accounts enumerated on the service. # noqa: E501\n\n :param user_groups: The user_groups of this Service. # noqa: E501\n :type: list[GroupAccount]\n ' self._user_groups = us...
d33dc732d7cfb5024d76aec284c36cc2e0977f537a78698f6379c3b3bafc51aa
@property def users(self): 'Gets the users of this Service. # noqa: E501\n\n The user accounts enumerated on the service. # noqa: E501\n\n :return: The users of this Service. # noqa: E501\n :rtype: list[UserAccount]\n ' return self._users
Gets the users of this Service. # noqa: E501 The user accounts enumerated on the service. # noqa: E501 :return: The users of this Service. # noqa: E501 :rtype: list[UserAccount]
rapid7vmconsole/models/service.py
users
BeanBagKing/vm-console-client-python
61
python
@property def users(self): 'Gets the users of this Service. # noqa: E501\n\n The user accounts enumerated on the service. # noqa: E501\n\n :return: The users of this Service. # noqa: E501\n :rtype: list[UserAccount]\n ' return self._users
@property def users(self): 'Gets the users of this Service. # noqa: E501\n\n The user accounts enumerated on the service. # noqa: E501\n\n :return: The users of this Service. # noqa: E501\n :rtype: list[UserAccount]\n ' return self._users<|docstring|>Gets the users of this Service...
03b67905ea7e8f1a7a3a5259e60c66f58714352e0deda64644f345deadff688f
@users.setter def users(self, users): 'Sets the users of this Service.\n\n The user accounts enumerated on the service. # noqa: E501\n\n :param users: The users of this Service. # noqa: E501\n :type: list[UserAccount]\n ' self._users = users
Sets the users of this Service. The user accounts enumerated on the service. # noqa: E501 :param users: The users of this Service. # noqa: E501 :type: list[UserAccount]
rapid7vmconsole/models/service.py
users
BeanBagKing/vm-console-client-python
61
python
@users.setter def users(self, users): 'Sets the users of this Service.\n\n The user accounts enumerated on the service. # noqa: E501\n\n :param users: The users of this Service. # noqa: E501\n :type: list[UserAccount]\n ' self._users = users
@users.setter def users(self, users): 'Sets the users of this Service.\n\n The user accounts enumerated on the service. # noqa: E501\n\n :param users: The users of this Service. # noqa: E501\n :type: list[UserAccount]\n ' self._users = users<|docstring|>Sets the users of this Servi...
64c569a1e14cddadacb0f90827edbd87e034d4c507c3ed29e48dcd678fad851d
@property def vendor(self): 'Gets the vendor of this Service. # noqa: E501\n\n The vendor of the service. # noqa: E501\n\n :return: The vendor of this Service. # noqa: E501\n :rtype: str\n ' return self._vendor
Gets the vendor of this Service. # noqa: E501 The vendor of the service. # noqa: E501 :return: The vendor of this Service. # noqa: E501 :rtype: str
rapid7vmconsole/models/service.py
vendor
BeanBagKing/vm-console-client-python
61
python
@property def vendor(self): 'Gets the vendor of this Service. # noqa: E501\n\n The vendor of the service. # noqa: E501\n\n :return: The vendor of this Service. # noqa: E501\n :rtype: str\n ' return self._vendor
@property def vendor(self): 'Gets the vendor of this Service. # noqa: E501\n\n The vendor of the service. # noqa: E501\n\n :return: The vendor of this Service. # noqa: E501\n :rtype: str\n ' return self._vendor<|docstring|>Gets the vendor of this Service. # noqa: E501 The vendor...
3568bb08556b40f4b998d724f02803581fd7ae14ab22e71a51068295cf179a52
@vendor.setter def vendor(self, vendor): 'Sets the vendor of this Service.\n\n The vendor of the service. # noqa: E501\n\n :param vendor: The vendor of this Service. # noqa: E501\n :type: str\n ' self._vendor = vendor
Sets the vendor of this Service. The vendor of the service. # noqa: E501 :param vendor: The vendor of this Service. # noqa: E501 :type: str
rapid7vmconsole/models/service.py
vendor
BeanBagKing/vm-console-client-python
61
python
@vendor.setter def vendor(self, vendor): 'Sets the vendor of this Service.\n\n The vendor of the service. # noqa: E501\n\n :param vendor: The vendor of this Service. # noqa: E501\n :type: str\n ' self._vendor = vendor
@vendor.setter def vendor(self, vendor): 'Sets the vendor of this Service.\n\n The vendor of the service. # noqa: E501\n\n :param vendor: The vendor of this Service. # noqa: E501\n :type: str\n ' self._vendor = vendor<|docstring|>Sets the vendor of this Service. The vendor of the ...
9746d26c2d12de699e27a66f398bdce0d6dc4ddd17e7410ebba779211d600cbe
@property def version(self): 'Gets the version of this Service. # noqa: E501\n\n The version of the service. # noqa: E501\n\n :return: The version of this Service. # noqa: E501\n :rtype: str\n ' return self._version
Gets the version of this Service. # noqa: E501 The version of the service. # noqa: E501 :return: The version of this Service. # noqa: E501 :rtype: str
rapid7vmconsole/models/service.py
version
BeanBagKing/vm-console-client-python
61
python
@property def version(self): 'Gets the version of this Service. # noqa: E501\n\n The version of the service. # noqa: E501\n\n :return: The version of this Service. # noqa: E501\n :rtype: str\n ' return self._version
@property def version(self): 'Gets the version of this Service. # noqa: E501\n\n The version of the service. # noqa: E501\n\n :return: The version of this Service. # noqa: E501\n :rtype: str\n ' return self._version<|docstring|>Gets the version of this Service. # noqa: E501 The ...
41a5f90dcf69b973a9ae618c11d309e900022104e21623ac16bb35afe47b80c6
@version.setter def version(self, version): 'Sets the version of this Service.\n\n The version of the service. # noqa: E501\n\n :param version: The version of this Service. # noqa: E501\n :type: str\n ' self._version = version
Sets the version of this Service. The version of the service. # noqa: E501 :param version: The version of this Service. # noqa: E501 :type: str
rapid7vmconsole/models/service.py
version
BeanBagKing/vm-console-client-python
61
python
@version.setter def version(self, version): 'Sets the version of this Service.\n\n The version of the service. # noqa: E501\n\n :param version: The version of this Service. # noqa: E501\n :type: str\n ' self._version = version
@version.setter def version(self, version): 'Sets the version of this Service.\n\n The version of the service. # noqa: E501\n\n :param version: The version of this Service. # noqa: E501\n :type: str\n ' self._version = version<|docstring|>Sets the version of this Service. The vers...
f1c8515c281879b6a53979202c4910b66fdfe8d79af8854976995ca92260d9af
@property def web_applications(self): 'Gets the web_applications of this Service. # noqa: E501\n\n The web applications found on the service. # noqa: E501\n\n :return: The web_applications of this Service. # noqa: E501\n :rtype: list[WebApplication]\n ' return self._web_applicatio...
Gets the web_applications of this Service. # noqa: E501 The web applications found on the service. # noqa: E501 :return: The web_applications of this Service. # noqa: E501 :rtype: list[WebApplication]
rapid7vmconsole/models/service.py
web_applications
BeanBagKing/vm-console-client-python
61
python
@property def web_applications(self): 'Gets the web_applications of this Service. # noqa: E501\n\n The web applications found on the service. # noqa: E501\n\n :return: The web_applications of this Service. # noqa: E501\n :rtype: list[WebApplication]\n ' return self._web_applicatio...
@property def web_applications(self): 'Gets the web_applications of this Service. # noqa: E501\n\n The web applications found on the service. # noqa: E501\n\n :return: The web_applications of this Service. # noqa: E501\n :rtype: list[WebApplication]\n ' return self._web_applicatio...
29583b304d281e219de61f6ef595d2c41a4495f844bc27be4d2160d249d6c1e7
@web_applications.setter def web_applications(self, web_applications): 'Sets the web_applications of this Service.\n\n The web applications found on the service. # noqa: E501\n\n :param web_applications: The web_applications of this Service. # noqa: E501\n :type: list[WebApplication]\n ...
Sets the web_applications of this Service. The web applications found on the service. # noqa: E501 :param web_applications: The web_applications of this Service. # noqa: E501 :type: list[WebApplication]
rapid7vmconsole/models/service.py
web_applications
BeanBagKing/vm-console-client-python
61
python
@web_applications.setter def web_applications(self, web_applications): 'Sets the web_applications of this Service.\n\n The web applications found on the service. # noqa: E501\n\n :param web_applications: The web_applications of this Service. # noqa: E501\n :type: list[WebApplication]\n ...
@web_applications.setter def web_applications(self, web_applications): 'Sets the web_applications of this Service.\n\n The web applications found on the service. # noqa: E501\n\n :param web_applications: The web_applications of this Service. # noqa: E501\n :type: list[WebApplication]\n ...
9e54631e050c5c4dbb8e9c0ffa3124212aa3146f5cf1c7cb6aac3be1c0d38912
def to_dict(self): 'Returns the model properties as a dict' result = {} for (attr, _) in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) e...
Returns the model properties as a dict
rapid7vmconsole/models/service.py
to_dict
BeanBagKing/vm-console-client-python
61
python
def to_dict(self): result = {} for (attr, _) in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) elif hasattr(value, 'to_dict'): ...
def to_dict(self): result = {} for (attr, _) in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) elif hasattr(value, 'to_dict'): ...
cbb19eaa2fc8a113d9e32f924ef280a7e97563f8915f94f65dab438997af2e99
def to_str(self): 'Returns the string representation of the model' return pprint.pformat(self.to_dict())
Returns the string representation of the model
rapid7vmconsole/models/service.py
to_str
BeanBagKing/vm-console-client-python
61
python
def to_str(self): return pprint.pformat(self.to_dict())
def to_str(self): return pprint.pformat(self.to_dict())<|docstring|>Returns the string representation of the model<|endoftext|>
772243a2c2b3261a9b954d07aaf295e3c1242a579a495e2d6a5679c677861703
def __repr__(self): 'For `print` and `pprint`' return self.to_str()
For `print` and `pprint`
rapid7vmconsole/models/service.py
__repr__
BeanBagKing/vm-console-client-python
61
python
def __repr__(self): return self.to_str()
def __repr__(self): return self.to_str()<|docstring|>For `print` and `pprint`<|endoftext|>
8679008398c5d2bd75ae5eed7cec6a04818ecf9eb1fbe85c31bfc2079ddafea5
def __eq__(self, other): 'Returns true if both objects are equal' if (not isinstance(other, Service)): return False return (self.__dict__ == other.__dict__)
Returns true if both objects are equal
rapid7vmconsole/models/service.py
__eq__
BeanBagKing/vm-console-client-python
61
python
def __eq__(self, other): if (not isinstance(other, Service)): return False return (self.__dict__ == other.__dict__)
def __eq__(self, other): if (not isinstance(other, Service)): return False return (self.__dict__ == other.__dict__)<|docstring|>Returns true if both objects are equal<|endoftext|>
43dc6740163eb9fc1161d09cb2208a64c7ad0cc8d9c8637ac3264522d3ec7e42
def __ne__(self, other): 'Returns true if both objects are not equal' return (not (self == other))
Returns true if both objects are not equal
rapid7vmconsole/models/service.py
__ne__
BeanBagKing/vm-console-client-python
61
python
def __ne__(self, other): return (not (self == other))
def __ne__(self, other): return (not (self == other))<|docstring|>Returns true if both objects are not equal<|endoftext|>
ad1474fb406f611686ff91b6baf8e9a8be439e9ac723644474554e07173d03f8
def __init__(__self__, *, scope: pulumi.Input[str], workspace_id: pulumi.Input[str], workspace_setting_name: Optional[pulumi.Input[str]]=None): '\n The set of arguments for constructing a WorkspaceSetting resource.\n :param pulumi.Input[str] scope: All the VMs in this scope will send their security da...
The set of arguments for constructing a WorkspaceSetting resource. :param pulumi.Input[str] scope: All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope :param pulumi.Input[str] workspace_id: The full Azure ID of the workspace to save ...
sdk/python/pulumi_azure_native/security/workspace_setting.py
__init__
sebtelko/pulumi-azure-native
0
python
def __init__(__self__, *, scope: pulumi.Input[str], workspace_id: pulumi.Input[str], workspace_setting_name: Optional[pulumi.Input[str]]=None): '\n The set of arguments for constructing a WorkspaceSetting resource.\n :param pulumi.Input[str] scope: All the VMs in this scope will send their security da...
def __init__(__self__, *, scope: pulumi.Input[str], workspace_id: pulumi.Input[str], workspace_setting_name: Optional[pulumi.Input[str]]=None): '\n The set of arguments for constructing a WorkspaceSetting resource.\n :param pulumi.Input[str] scope: All the VMs in this scope will send their security da...
7fbc716065fa9fb8fe9b77acff80d2036b8137872de8e350bbc84d1dc5496a7b
@property @pulumi.getter def scope(self) -> pulumi.Input[str]: '\n All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope\n ' return pulumi.get(self, 'scope')
All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope
sdk/python/pulumi_azure_native/security/workspace_setting.py
scope
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter def scope(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'scope')
@property @pulumi.getter def scope(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'scope')<|docstring|>All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope<|endoftext|>
3674edf5208397ca13be2090eb3e6cda238ee5ca6b4edeb397f50c1169e1225d
@property @pulumi.getter(name='workspaceId') def workspace_id(self) -> pulumi.Input[str]: '\n The full Azure ID of the workspace to save the data in\n ' return pulumi.get(self, 'workspace_id')
The full Azure ID of the workspace to save the data in
sdk/python/pulumi_azure_native/security/workspace_setting.py
workspace_id
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter(name='workspaceId') def workspace_id(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'workspace_id')
@property @pulumi.getter(name='workspaceId') def workspace_id(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'workspace_id')<|docstring|>The full Azure ID of the workspace to save the data in<|endoftext|>
11232330005be4f769c257034f118d21ada56e9a5a4126053ae0d078175dcc92
@property @pulumi.getter(name='workspaceSettingName') def workspace_setting_name(self) -> Optional[pulumi.Input[str]]: '\n Name of the security setting\n ' return pulumi.get(self, 'workspace_setting_name')
Name of the security setting
sdk/python/pulumi_azure_native/security/workspace_setting.py
workspace_setting_name
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter(name='workspaceSettingName') def workspace_setting_name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'workspace_setting_name')
@property @pulumi.getter(name='workspaceSettingName') def workspace_setting_name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'workspace_setting_name')<|docstring|>Name of the security setting<|endoftext|>
30db805f3eb730b0e1aa676e90d324d2e0b8338ba7594a8885895c215edfba96
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, scope: Optional[pulumi.Input[str]]=None, workspace_id: Optional[pulumi.Input[str]]=None, workspace_setting_name: Optional[pulumi.Input[str]]=None, __props__=None): '\n Configures where to store the OMS agent dat...
Configures where to store the OMS agent data for workspaces under a scope API Version: 2017-08-01-preview. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] scope: All the VMs in this scope will send their security data to the men...
sdk/python/pulumi_azure_native/security/workspace_setting.py
__init__
sebtelko/pulumi-azure-native
0
python
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, scope: Optional[pulumi.Input[str]]=None, workspace_id: Optional[pulumi.Input[str]]=None, workspace_setting_name: Optional[pulumi.Input[str]]=None, __props__=None): '\n Configures where to store the OMS agent dat...
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, scope: Optional[pulumi.Input[str]]=None, workspace_id: Optional[pulumi.Input[str]]=None, workspace_setting_name: Optional[pulumi.Input[str]]=None, __props__=None): '\n Configures where to store the OMS agent dat...
487a4dfe185d741ccddca87949243b4119fb539bd1fb7d5f3138a9090bd8d0f4
@overload def __init__(__self__, resource_name: str, args: WorkspaceSettingArgs, opts: Optional[pulumi.ResourceOptions]=None): "\n Configures where to store the OMS agent data for workspaces under a scope\n API Version: 2017-08-01-preview.\n\n :param str resource_name: The name of the resource....
Configures where to store the OMS agent data for workspaces under a scope API Version: 2017-08-01-preview. :param str resource_name: The name of the resource. :param WorkspaceSettingArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource.
sdk/python/pulumi_azure_native/security/workspace_setting.py
__init__
sebtelko/pulumi-azure-native
0
python
@overload def __init__(__self__, resource_name: str, args: WorkspaceSettingArgs, opts: Optional[pulumi.ResourceOptions]=None): "\n Configures where to store the OMS agent data for workspaces under a scope\n API Version: 2017-08-01-preview.\n\n :param str resource_name: The name of the resource....
@overload def __init__(__self__, resource_name: str, args: WorkspaceSettingArgs, opts: Optional[pulumi.ResourceOptions]=None): "\n Configures where to store the OMS agent data for workspaces under a scope\n API Version: 2017-08-01-preview.\n\n :param str resource_name: The name of the resource....
94c69ff73ea41efa463b73b05ec9888acbc45367c407f7da363a2a9dd1d67181
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'WorkspaceSetting': "\n Get an existing WorkspaceSetting resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource...
Get an existing WorkspaceSetting resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Op...
sdk/python/pulumi_azure_native/security/workspace_setting.py
get
sebtelko/pulumi-azure-native
0
python
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'WorkspaceSetting': "\n Get an existing WorkspaceSetting resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource...
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'WorkspaceSetting': "\n Get an existing WorkspaceSetting resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource...
963faa3a3dc9a20e5ecedee003b9543318412dc328f151b72a20a660cea52c73
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n Resource name\n ' return pulumi.get(self, 'name')
Resource name
sdk/python/pulumi_azure_native/security/workspace_setting.py
name
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Resource name<|endoftext|>
491393ec2c917b0a794e3abe717a0ded9cac9500d1a0188e8ee1e59238f2278d
@property @pulumi.getter def scope(self) -> pulumi.Output[str]: '\n All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope\n ' return pulumi.get(self, 'scope')
All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope
sdk/python/pulumi_azure_native/security/workspace_setting.py
scope
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter def scope(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'scope')
@property @pulumi.getter def scope(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'scope')<|docstring|>All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope<|endoftext|>
c469ece8cfb7cc97571266590e78a67b25a5bb57b30308347a24479b26e7c70b
@property @pulumi.getter def type(self) -> pulumi.Output[str]: '\n Resource type\n ' return pulumi.get(self, 'type')
Resource type
sdk/python/pulumi_azure_native/security/workspace_setting.py
type
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter def type(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'type')
@property @pulumi.getter def type(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'type')<|docstring|>Resource type<|endoftext|>
286f0e765eacda37417b29916e9260dc7147a2d9d815bfdaf21ffa1e4976f795
@property @pulumi.getter(name='workspaceId') def workspace_id(self) -> pulumi.Output[str]: '\n The full Azure ID of the workspace to save the data in\n ' return pulumi.get(self, 'workspace_id')
The full Azure ID of the workspace to save the data in
sdk/python/pulumi_azure_native/security/workspace_setting.py
workspace_id
sebtelko/pulumi-azure-native
0
python
@property @pulumi.getter(name='workspaceId') def workspace_id(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'workspace_id')
@property @pulumi.getter(name='workspaceId') def workspace_id(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'workspace_id')<|docstring|>The full Azure ID of the workspace to save the data in<|endoftext|>
ecac85d3ab5735201fbc6d90ab5f668818036fd5ea6c727d847d1ce7c6151340
def post(self): 'Run the job in an ephemeral mapset\n\n :return:\n ' try: ActiniaInterface.PROCESS_LOCATION = {} process_graph = request.get_json() (result_name, process_list) = analyse_process_graph(process_graph) if ((len(ActiniaInterface.PROCESS_LOCATION) == 0) o...
Run the job in an ephemeral mapset :return:
src/openeo_grass_gis_driver/process_graph_validation.py
post
mmacata/openeo-grassgis-driver
0
python
def post(self): 'Run the job in an ephemeral mapset\n\n :return:\n ' try: ActiniaInterface.PROCESS_LOCATION = {} process_graph = request.get_json() (result_name, process_list) = analyse_process_graph(process_graph) if ((len(ActiniaInterface.PROCESS_LOCATION) == 0) o...
def post(self): 'Run the job in an ephemeral mapset\n\n :return:\n ' try: ActiniaInterface.PROCESS_LOCATION = {} process_graph = request.get_json() (result_name, process_list) = analyse_process_graph(process_graph) if ((len(ActiniaInterface.PROCESS_LOCATION) == 0) o...
c36570457f7009d7b2eaf9718e87f9fd1e164d37a3292fd8809d768ebdceecf4
def strStr(self, haystack, needle): '\n\n RUNTIME: 59, 65, 49, 65, 38\n\n :type haystack: str\n :type needle: str\n :rtype: int\n ' if (len(needle) > len(haystack)): return (- 1) if (not needle): return 0 if (not haystack): return (- 1) for ...
RUNTIME: 59, 65, 49, 65, 38 :type haystack: str :type needle: str :rtype: int
easy/28.py
strStr
pisskidney/leetcode
0
python
def strStr(self, haystack, needle): '\n\n RUNTIME: 59, 65, 49, 65, 38\n\n :type haystack: str\n :type needle: str\n :rtype: int\n ' if (len(needle) > len(haystack)): return (- 1) if (not needle): return 0 if (not haystack): return (- 1) for ...
def strStr(self, haystack, needle): '\n\n RUNTIME: 59, 65, 49, 65, 38\n\n :type haystack: str\n :type needle: str\n :rtype: int\n ' if (len(needle) > len(haystack)): return (- 1) if (not needle): return 0 if (not haystack): return (- 1) for ...
33dd1fd9f399d23bf084c05be2a24c262f1935ea123205a48a23bc209e0750e5
def default_select(identifier, all_entry_points): '\n Raise an exception when we have ambiguous entry points.\n ' if (len(all_entry_points) == 0): raise PluginMissingError(identifier) if (len(all_entry_points) == 1): return all_entry_points[0] elif (len(all_entry_points) > 1): ...
Raise an exception when we have ambiguous entry points.
xblock/plugin.py
default_select
d3vel0per/XBlock
126
python
def default_select(identifier, all_entry_points): '\n \n ' if (len(all_entry_points) == 0): raise PluginMissingError(identifier) if (len(all_entry_points) == 1): return all_entry_points[0] elif (len(all_entry_points) > 1): raise AmbiguousPluginError(all_entry_points)
def default_select(identifier, all_entry_points): '\n \n ' if (len(all_entry_points) == 0): raise PluginMissingError(identifier) if (len(all_entry_points) == 1): return all_entry_points[0] elif (len(all_entry_points) > 1): raise AmbiguousPluginError(all_entry_points)<|docst...
9979c97bb9bff3ee4d46c42f9eab30da239664d0f35bff36c9ba7d6f664be73e
@class_lazy def extra_entry_points(cls): "\n Temporary entry points, for register_temp_plugin. A list of pairs,\n (identifier, entry_point):\n\n [('test1', test1_entrypoint), ('test2', test2_entrypoint), ...]\n " return []
Temporary entry points, for register_temp_plugin. A list of pairs, (identifier, entry_point): [('test1', test1_entrypoint), ('test2', test2_entrypoint), ...]
xblock/plugin.py
extra_entry_points
d3vel0per/XBlock
126
python
@class_lazy def extra_entry_points(cls): "\n Temporary entry points, for register_temp_plugin. A list of pairs,\n (identifier, entry_point):\n\n [('test1', test1_entrypoint), ('test2', test2_entrypoint), ...]\n " return []
@class_lazy def extra_entry_points(cls): "\n Temporary entry points, for register_temp_plugin. A list of pairs,\n (identifier, entry_point):\n\n [('test1', test1_entrypoint), ('test2', test2_entrypoint), ...]\n " return []<|docstring|>Temporary entry points, for register_temp_plugin...
492df74e9412d1346d74e19d7cc40542ebbdf7a7cf0d3bc5f72930c12f79d4e1
@classmethod def _load_class_entry_point(cls, entry_point): '\n Load `entry_point`, and set the `entry_point.name` as the\n attribute `plugin_name` on the loaded object\n ' class_ = entry_point.load() class_.plugin_name = entry_point.name return class_
Load `entry_point`, and set the `entry_point.name` as the attribute `plugin_name` on the loaded object
xblock/plugin.py
_load_class_entry_point
d3vel0per/XBlock
126
python
@classmethod def _load_class_entry_point(cls, entry_point): '\n Load `entry_point`, and set the `entry_point.name` as the\n attribute `plugin_name` on the loaded object\n ' class_ = entry_point.load() class_.plugin_name = entry_point.name return class_
@classmethod def _load_class_entry_point(cls, entry_point): '\n Load `entry_point`, and set the `entry_point.name` as the\n attribute `plugin_name` on the loaded object\n ' class_ = entry_point.load() class_.plugin_name = entry_point.name return class_<|docstring|>Load `entry_point`...
17b02df1827f2a5411b49efbac79efb952cc8ffaab3d49ce0ca08df132bfa9b7
@classmethod def load_class(cls, identifier, default=None, select=None): 'Load a single class specified by identifier.\n\n If `identifier` specifies more than a single class, and `select` is not None,\n then call `select` on the list of entry_points. Otherwise, choose\n the first one and log a ...
Load a single class specified by identifier. If `identifier` specifies more than a single class, and `select` is not None, then call `select` on the list of entry_points. Otherwise, choose the first one and log a warning. If `default` is provided, return it if no entry_point matching `identifier` is found. Otherwise,...
xblock/plugin.py
load_class
d3vel0per/XBlock
126
python
@classmethod def load_class(cls, identifier, default=None, select=None): 'Load a single class specified by identifier.\n\n If `identifier` specifies more than a single class, and `select` is not None,\n then call `select` on the list of entry_points. Otherwise, choose\n the first one and log a ...
@classmethod def load_class(cls, identifier, default=None, select=None): 'Load a single class specified by identifier.\n\n If `identifier` specifies more than a single class, and `select` is not None,\n then call `select` on the list of entry_points. Otherwise, choose\n the first one and log a ...
3419f99d46190a2f4b0d424e3e911abc1b3ec6b8a7255a5e4c1afe438f6a4ca6
@classmethod def load_classes(cls, fail_silently=True): 'Load all the classes for a plugin.\n\n Produces a sequence containing the identifiers and their corresponding\n classes for all of the available instances of this plugin.\n\n fail_silently causes the code to simply log warnings if a\n ...
Load all the classes for a plugin. Produces a sequence containing the identifiers and their corresponding classes for all of the available instances of this plugin. fail_silently causes the code to simply log warnings if a plugin cannot import. The goal is to be able to use part of libraries from an XBlock (and thus ...
xblock/plugin.py
load_classes
d3vel0per/XBlock
126
python
@classmethod def load_classes(cls, fail_silently=True): 'Load all the classes for a plugin.\n\n Produces a sequence containing the identifiers and their corresponding\n classes for all of the available instances of this plugin.\n\n fail_silently causes the code to simply log warnings if a\n ...
@classmethod def load_classes(cls, fail_silently=True): 'Load all the classes for a plugin.\n\n Produces a sequence containing the identifiers and their corresponding\n classes for all of the available instances of this plugin.\n\n fail_silently causes the code to simply log warnings if a\n ...