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
f70b659426173060fff3c726832b8330c87eac5c44428b67318809f76a6e330e
def __getitem__(self, item): 'A shorthand for get_rule.\n\n Parameters\n ----------\n item : str\n\n Returns\n -------\n BoltzmannSamplerBase\n ' return self._rules[item]
A shorthand for get_rule. Parameters ---------- item : str Returns ------- BoltzmannSamplerBase
pyboltzmann/decomposition_grammar.py
__getitem__
towink/boltzmann-planar-graph
0
python
def __getitem__(self, item): 'A shorthand for get_rule.\n\n Parameters\n ----------\n item : str\n\n Returns\n -------\n BoltzmannSamplerBase\n ' return self._rules[item]
def __getitem__(self, item): 'A shorthand for get_rule.\n\n Parameters\n ----------\n item : str\n\n Returns\n -------\n BoltzmannSamplerBase\n ' return self._rules[item]<|docstring|>A shorthand for get_rule. Parameters ---------- item : str Returns ------- Bol...
f2bd2623798b1119f3b53d7c98605588727bac6a275b55f42d12cc7335d94650
@property def rules(self): 'Gets the rules in the grammar.\n\n Returns\n -------\n rules : dict\n ' return self._rules
Gets the rules in the grammar. Returns ------- rules : dict
pyboltzmann/decomposition_grammar.py
rules
towink/boltzmann-planar-graph
0
python
@property def rules(self): 'Gets the rules in the grammar.\n\n Returns\n -------\n rules : dict\n ' return self._rules
@property def rules(self): 'Gets the rules in the grammar.\n\n Returns\n -------\n rules : dict\n ' return self._rules<|docstring|>Gets the rules in the grammar. Returns ------- rules : dict<|endoftext|>
53d4054f5d984e91c689516501e96c8bd15cb00e232d10363941f59b4791f3d2
@rules.setter def rules(self, rules): 'Adds the given set of rules.\n\n Parameters\n ----------\n rules : dict\n The rules to be added.\n ' for alias in rules: self[alias] = rules[alias]
Adds the given set of rules. Parameters ---------- rules : dict The rules to be added.
pyboltzmann/decomposition_grammar.py
rules
towink/boltzmann-planar-graph
0
python
@rules.setter def rules(self, rules): 'Adds the given set of rules.\n\n Parameters\n ----------\n rules : dict\n The rules to be added.\n ' for alias in rules: self[alias] = rules[alias]
@rules.setter def rules(self, rules): 'Adds the given set of rules.\n\n Parameters\n ----------\n rules : dict\n The rules to be added.\n ' for alias in rules: self[alias] = rules[alias]<|docstring|>Adds the given set of rules. Parameters ---------- rules : dict ...
b3b66fa77870ba9a3f2d31857c4fbca50191ac5ca35698c23e037325cd90f808
def add_rules(self, rules): 'Adds the given set of rules.\n\n Parameters\n ----------\n rules : dict\n The rules to be added.\n ' for alias in rules: self[alias] = rules[alias]
Adds the given set of rules. Parameters ---------- rules : dict The rules to be added.
pyboltzmann/decomposition_grammar.py
add_rules
towink/boltzmann-planar-graph
0
python
def add_rules(self, rules): 'Adds the given set of rules.\n\n Parameters\n ----------\n rules : dict\n The rules to be added.\n ' for alias in rules: self[alias] = rules[alias]
def add_rules(self, rules): 'Adds the given set of rules.\n\n Parameters\n ----------\n rules : dict\n The rules to be added.\n ' for alias in rules: self[alias] = rules[alias]<|docstring|>Adds the given set of rules. Parameters ---------- rules : dict The rul...
c3b597ab85f9024cd2c66a51d88aec99d4872666e45491c92c56e17e1ce81ae0
@property @_only_if_initialized def recursive_rules(self): 'Gets the recursive rules in this grammar.\n\n May only be called after initialization.\n\n Returns\n -------\n rules : set of str\n The aliases of all recursive rules in this grammar.\n ' return sorted(self...
Gets the recursive rules in this grammar. May only be called after initialization. Returns ------- rules : set of str The aliases of all recursive rules in this grammar.
pyboltzmann/decomposition_grammar.py
recursive_rules
towink/boltzmann-planar-graph
0
python
@property @_only_if_initialized def recursive_rules(self): 'Gets the recursive rules in this grammar.\n\n May only be called after initialization.\n\n Returns\n -------\n rules : set of str\n The aliases of all recursive rules in this grammar.\n ' return sorted(self...
@property @_only_if_initialized def recursive_rules(self): 'Gets the recursive rules in this grammar.\n\n May only be called after initialization.\n\n Returns\n -------\n rules : set of str\n The aliases of all recursive rules in this grammar.\n ' return sorted(self...
b632126fffabeaa5d65284ecb8cffda6c015481620b0d662d52ab02d8df5cf36
@_only_if_initialized def is_recursive_rule(self, alias): 'Checks if the rule corresponding to the given alias is recursive.\n\n Parameters\n ----------\n alias: str\n\n Returns\n -------\n is_recursive : bool\n ' return (alias in self._recursive_rules)
Checks if the rule corresponding to the given alias is recursive. Parameters ---------- alias: str Returns ------- is_recursive : bool
pyboltzmann/decomposition_grammar.py
is_recursive_rule
towink/boltzmann-planar-graph
0
python
@_only_if_initialized def is_recursive_rule(self, alias): 'Checks if the rule corresponding to the given alias is recursive.\n\n Parameters\n ----------\n alias: str\n\n Returns\n -------\n is_recursive : bool\n ' return (alias in self._recursive_rules)
@_only_if_initialized def is_recursive_rule(self, alias): 'Checks if the rule corresponding to the given alias is recursive.\n\n Parameters\n ----------\n alias: str\n\n Returns\n -------\n is_recursive : bool\n ' return (alias in self._recursive_rules)<|docstrin...
a297f3b5ed79ab39fd04a3f60172f069107c2ccbfbb3aceb8a877db6519e0637
@_only_if_initialized def dummy_sampling_mode(self, delete_transformations=False): 'Changes the state of the grammar to the dummy sampling mode.\n\n A dummy object only records its size but otherwise has no internal\n structure which is useful for testing sizes. This will overwrite\n existing b...
Changes the state of the grammar to the dummy sampling mode. A dummy object only records its size but otherwise has no internal structure which is useful for testing sizes. This will overwrite existing builder information. After this operation, dummies can be sampled with sample(...).
pyboltzmann/decomposition_grammar.py
dummy_sampling_mode
towink/boltzmann-planar-graph
0
python
@_only_if_initialized def dummy_sampling_mode(self, delete_transformations=False): 'Changes the state of the grammar to the dummy sampling mode.\n\n A dummy object only records its size but otherwise has no internal\n structure which is useful for testing sizes. This will overwrite\n existing b...
@_only_if_initialized def dummy_sampling_mode(self, delete_transformations=False): 'Changes the state of the grammar to the dummy sampling mode.\n\n A dummy object only records its size but otherwise has no internal\n structure which is useful for testing sizes. This will overwrite\n existing b...
8165fd146cd86e00c0a567c2e62adb779c7fbfcea5bca0aba88ef30138bacc02
@_only_if_initialized def sample_iterative(self, alias): 'Samples from the rule identified by `alias` in an iterative manner.\n\n Parameters\n ----------\n alias : str\n The rule to be sampled from\n\n Traverses the decomposition tree in post-order.\n The tree may be ar...
Samples from the rule identified by `alias` in an iterative manner. Parameters ---------- alias : str The rule to be sampled from Traverses the decomposition tree in post-order. The tree may be arbitrarily large and is expanded on the fly.
pyboltzmann/decomposition_grammar.py
sample_iterative
towink/boltzmann-planar-graph
0
python
@_only_if_initialized def sample_iterative(self, alias): 'Samples from the rule identified by `alias` in an iterative manner.\n\n Parameters\n ----------\n alias : str\n The rule to be sampled from\n\n Traverses the decomposition tree in post-order.\n The tree may be ar...
@_only_if_initialized def sample_iterative(self, alias): 'Samples from the rule identified by `alias` in an iterative manner.\n\n Parameters\n ----------\n alias : str\n The rule to be sampled from\n\n Traverses the decomposition tree in post-order.\n The tree may be ar...
6d957453bdd5bace12b0e43cc7d13585fd229a252844e2f9c755ff4d8cbaf2e2
@objc_method def application_didChangeStatusBarOrientation_(self, application, oldStatusBarOrientation: int) -> None: ' This callback is invoked when rotating the device from landscape to portrait and vice versa. ' App.app.interface.main_window.content.refresh()
This callback is invoked when rotating the device from landscape to portrait and vice versa.
src/iOS/toga_iOS/app.py
application_didChangeStatusBarOrientation_
SamSchott/toga
1,261
python
@objc_method def application_didChangeStatusBarOrientation_(self, application, oldStatusBarOrientation: int) -> None: ' ' App.app.interface.main_window.content.refresh()
@objc_method def application_didChangeStatusBarOrientation_(self, application, oldStatusBarOrientation: int) -> None: ' ' App.app.interface.main_window.content.refresh()<|docstring|>This callback is invoked when rotating the device from landscape to portrait and vice versa.<|endoftext|>
fec8e71879e40c5dea48e76a880cf092305986a2f52306d78005e2e2f636246e
def create(self): ' Calls the startup method on the interface ' self.interface.startup()
Calls the startup method on the interface
src/iOS/toga_iOS/app.py
create
SamSchott/toga
1,261
python
def create(self): ' ' self.interface.startup()
def create(self): ' ' self.interface.startup()<|docstring|>Calls the startup method on the interface<|endoftext|>
4cb8999ff2dc43be03de4d4a676306b32c2e70bb26e0b9495ee871672e53ae6e
def open_document(self, fileURL): ' Add a new document to this app.' pass
Add a new document to this app.
src/iOS/toga_iOS/app.py
open_document
SamSchott/toga
1,261
python
def open_document(self, fileURL): ' ' pass
def open_document(self, fileURL): ' ' pass<|docstring|>Add a new document to this app.<|endoftext|>
bd8d14fe5391d1c5eaf57963baeb6acb8033c21b2eea6a6845d3f7e0f957b495
def preprocess(self, seg): ' Applies the MosesTokenizer to seg.src\n ' seg.src = ' '.join(self._mtk.tokenize(seg.src, escape=False))
Applies the MosesTokenizer to seg.src
pangeamt_nlp/processors/moses_tokenizer_processor.py
preprocess
Pangeamt/pangeamt-nlp-deprecated
1
python
def preprocess(self, seg): ' \n ' seg.src = ' '.join(self._mtk.tokenize(seg.src, escape=False))
def preprocess(self, seg): ' \n ' seg.src = ' '.join(self._mtk.tokenize(seg.src, escape=False))<|docstring|>Applies the MosesTokenizer to seg.src<|endoftext|>
a6093f0bcb365f619c7222f504765dd3f32c9734b370e856a59a5a42385cf631
def postprocess(self, seg): ' Applies the MosesDetokenizer to seg.tgt\n ' seg.tgt = self._mdk.detokenize(seg.tgt.split(' '))
Applies the MosesDetokenizer to seg.tgt
pangeamt_nlp/processors/moses_tokenizer_processor.py
postprocess
Pangeamt/pangeamt-nlp-deprecated
1
python
def postprocess(self, seg): ' \n ' seg.tgt = self._mdk.detokenize(seg.tgt.split(' '))
def postprocess(self, seg): ' \n ' seg.tgt = self._mdk.detokenize(seg.tgt.split(' '))<|docstring|>Applies the MosesDetokenizer to seg.tgt<|endoftext|>
918f11ae10c0bde463bb6cee5e15ca221ed58660815b2d4baf0cb8cc376aabee
def build_model(input_shape: tuple, target_shape: tuple) -> keras.Model: "\n Do NOT change it here if you want to use a different build function.\n Create your own build function that matches this function's signature and pass it to the network's\n constructor.\n\n :param input_shape: shape of one input...
Do NOT change it here if you want to use a different build function. Create your own build function that matches this function's signature and pass it to the network's constructor. :param input_shape: shape of one input sample, e.g. (lookback, num_features) :param target_shape: shape of one target vector, e.g. 1 for a...
datamodels/neuralnetwork.py
build_model
aleksapand/timeseriesmodeling
0
python
def build_model(input_shape: tuple, target_shape: tuple) -> keras.Model: "\n Do NOT change it here if you want to use a different build function.\n Create your own build function that matches this function's signature and pass it to the network's\n constructor.\n\n :param input_shape: shape of one input...
def build_model(input_shape: tuple, target_shape: tuple) -> keras.Model: "\n Do NOT change it here if you want to use a different build function.\n Create your own build function that matches this function's signature and pass it to the network's\n constructor.\n\n :param input_shape: shape of one input...
255bfe158ab18275c57faa1a8ed4224f1f82784259c5198b95491f12143934cb
def compile_model(model: keras.Model): "\n Do NOT change it here if you want to use a different build function.\n Create your own compile function that matches this function's signature and pass it to the network's\n constructor.\n\n :param model: a keras model\n " optimizer = keras.optimizers.RM...
Do NOT change it here if you want to use a different build function. Create your own compile function that matches this function's signature and pass it to the network's constructor. :param model: a keras model
datamodels/neuralnetwork.py
compile_model
aleksapand/timeseriesmodeling
0
python
def compile_model(model: keras.Model): "\n Do NOT change it here if you want to use a different build function.\n Create your own compile function that matches this function's signature and pass it to the network's\n constructor.\n\n :param model: a keras model\n " optimizer = keras.optimizers.RM...
def compile_model(model: keras.Model): "\n Do NOT change it here if you want to use a different build function.\n Create your own compile function that matches this function's signature and pass it to the network's\n constructor.\n\n :param model: a keras model\n " optimizer = keras.optimizers.RM...
8695f8b92fb0c2aef912a9302d55d2c0904f978c8f35dc621669ecfd9175207e
def train_model(model, x_train, y_train) -> keras.callbacks.History: "\n Do NOT change it here if you want to use a different build function.\n Create your own train function that matches this function's signature and pass it to the network's\n constructor.\n\n :param x_train, y_train: feature and targe...
Do NOT change it here if you want to use a different build function. Create your own train function that matches this function's signature and pass it to the network's constructor. :param x_train, y_train: feature and target vectors
datamodels/neuralnetwork.py
train_model
aleksapand/timeseriesmodeling
0
python
def train_model(model, x_train, y_train) -> keras.callbacks.History: "\n Do NOT change it here if you want to use a different build function.\n Create your own train function that matches this function's signature and pass it to the network's\n constructor.\n\n :param x_train, y_train: feature and targe...
def train_model(model, x_train, y_train) -> keras.callbacks.History: "\n Do NOT change it here if you want to use a different build function.\n Create your own train function that matches this function's signature and pass it to the network's\n constructor.\n\n :param x_train, y_train: feature and targe...
df80476868cb129d9859378cca60b188797354f40eb2d1731cf7d7ac1f436275
def create_round_thumbnail(image): '\n Create a circle thumbnail 80px wide, given a thumbnail image\n \n :param image: QImage to process\n :returns: QPixmap object\n ' CANVAS_SIZE = 80 base_image = QtGui.QPixmap(CANVAS_SIZE, CANVAS_SIZE) base_image.fill(QtCore.Qt.transparent) thumb = ...
Create a circle thumbnail 80px wide, given a thumbnail image :param image: QImage to process :returns: QPixmap object
install/app_store/tk-framework-qtwidgets/v2.6.5/python/activity_stream/utils.py
create_round_thumbnail
JoanAzpeitia/lp_sg
0
python
def create_round_thumbnail(image): '\n Create a circle thumbnail 80px wide, given a thumbnail image\n \n :param image: QImage to process\n :returns: QPixmap object\n ' CANVAS_SIZE = 80 base_image = QtGui.QPixmap(CANVAS_SIZE, CANVAS_SIZE) base_image.fill(QtCore.Qt.transparent) thumb = ...
def create_round_thumbnail(image): '\n Create a circle thumbnail 80px wide, given a thumbnail image\n \n :param image: QImage to process\n :returns: QPixmap object\n ' CANVAS_SIZE = 80 base_image = QtGui.QPixmap(CANVAS_SIZE, CANVAS_SIZE) base_image.fill(QtCore.Qt.transparent) thumb = ...
4eabe374905d712610f5677925a7a47c8621cb30c83ac5beeb002df9bd87e0bd
def create_square_48_thumbnail(image): '\n Given a thumbnail image, create a 48px square image\n \n :param image: QImage with thumbnail\n :returns: QPixmap object\n ' return __create_rounded_rect_thumbnail(image, 48, 48, 4)
Given a thumbnail image, create a 48px square image :param image: QImage with thumbnail :returns: QPixmap object
install/app_store/tk-framework-qtwidgets/v2.6.5/python/activity_stream/utils.py
create_square_48_thumbnail
JoanAzpeitia/lp_sg
0
python
def create_square_48_thumbnail(image): '\n Given a thumbnail image, create a 48px square image\n \n :param image: QImage with thumbnail\n :returns: QPixmap object\n ' return __create_rounded_rect_thumbnail(image, 48, 48, 4)
def create_square_48_thumbnail(image): '\n Given a thumbnail image, create a 48px square image\n \n :param image: QImage with thumbnail\n :returns: QPixmap object\n ' return __create_rounded_rect_thumbnail(image, 48, 48, 4)<|docstring|>Given a thumbnail image, create a 48px square image :param i...
3eb9bb9c46a180ed5a464434d2a14e48f6f46be03987d21627722cb28b83cf9d
def create_rectangular_256x144_thumbnail(image): '\n Given a thumbnail image, create a 256x144px image\n \n :param image: QImage with thumbnail\n :returns: QPixmap object\n ' return __create_rounded_rect_thumbnail(image, 256, 144, 5)
Given a thumbnail image, create a 256x144px image :param image: QImage with thumbnail :returns: QPixmap object
install/app_store/tk-framework-qtwidgets/v2.6.5/python/activity_stream/utils.py
create_rectangular_256x144_thumbnail
JoanAzpeitia/lp_sg
0
python
def create_rectangular_256x144_thumbnail(image): '\n Given a thumbnail image, create a 256x144px image\n \n :param image: QImage with thumbnail\n :returns: QPixmap object\n ' return __create_rounded_rect_thumbnail(image, 256, 144, 5)
def create_rectangular_256x144_thumbnail(image): '\n Given a thumbnail image, create a 256x144px image\n \n :param image: QImage with thumbnail\n :returns: QPixmap object\n ' return __create_rounded_rect_thumbnail(image, 256, 144, 5)<|docstring|>Given a thumbnail image, create a 256x144px image ...
419db4d71f7b4ba60c4fab066cce1216bf7e04a6a8db500eb64341144a82fdef
def __create_rounded_rect_thumbnail(image, canvas_width, canvas_height, radius): '\n Given a qimage shotgun thumbnail, create a publish icon\n with the thumbnail composited onto a centered otherwise empty canvas.\n The thumbnail will be taking up all the space in the image.\n \n :param image: QImage ...
Given a qimage shotgun thumbnail, create a publish icon with the thumbnail composited onto a centered otherwise empty canvas. The thumbnail will be taking up all the space in the image. :param image: QImage to load thumbnail from :param canvas_width: Width of image to generate, in pixels :param canvas_height: Heiht of...
install/app_store/tk-framework-qtwidgets/v2.6.5/python/activity_stream/utils.py
__create_rounded_rect_thumbnail
JoanAzpeitia/lp_sg
0
python
def __create_rounded_rect_thumbnail(image, canvas_width, canvas_height, radius): '\n Given a qimage shotgun thumbnail, create a publish icon\n with the thumbnail composited onto a centered otherwise empty canvas.\n The thumbnail will be taking up all the space in the image.\n \n :param image: QImage ...
def __create_rounded_rect_thumbnail(image, canvas_width, canvas_height, radius): '\n Given a qimage shotgun thumbnail, create a publish icon\n with the thumbnail composited onto a centered otherwise empty canvas.\n The thumbnail will be taking up all the space in the image.\n \n :param image: QImage ...
61812685ecbf2ef3d820bb8c0711d104dc89a35a79eb9e429d84ed92c5de31a1
def decode_raw_1(mac, rssi, data): 'RuuviTag RAW 1 decoder' humidity = (data[3] / 2) temperature = (data[4] + (data[5] / 100)) if (temperature > 128): temperature -= 128 temperature = round((0 - temperature), 2) pressure = (ustruct.unpack('!H', data[6:8])[0] + 50000) acceleration...
RuuviTag RAW 1 decoder
ruuvitag/decoder.py
decode_raw_1
rroemhild/micropython-ruuvitag
13
python
def decode_raw_1(mac, rssi, data): humidity = (data[3] / 2) temperature = (data[4] + (data[5] / 100)) if (temperature > 128): temperature -= 128 temperature = round((0 - temperature), 2) pressure = (ustruct.unpack('!H', data[6:8])[0] + 50000) acceleration_x = ustruct.unpack('!h'...
def decode_raw_1(mac, rssi, data): humidity = (data[3] / 2) temperature = (data[4] + (data[5] / 100)) if (temperature > 128): temperature -= 128 temperature = round((0 - temperature), 2) pressure = (ustruct.unpack('!H', data[6:8])[0] + 50000) acceleration_x = ustruct.unpack('!h'...
9fee41540ffc41e7dc1d95eb15aed88d7d01f515cf1f827989cbc4b8e0513277
def decode_raw_2(mac, rssi, data): 'RuuviTag RAW 2 decoder' temperature = (ustruct.unpack('!h', data[3:5])[0] * 0.005) humidity = (ustruct.unpack('!H', data[5:7])[0] * 0.0025) pressure = (ustruct.unpack('!H', data[7:9])[0] + 50000) acceleration_x = ustruct.unpack('!h', data[9:11])[0] acceleratio...
RuuviTag RAW 2 decoder
ruuvitag/decoder.py
decode_raw_2
rroemhild/micropython-ruuvitag
13
python
def decode_raw_2(mac, rssi, data): temperature = (ustruct.unpack('!h', data[3:5])[0] * 0.005) humidity = (ustruct.unpack('!H', data[5:7])[0] * 0.0025) pressure = (ustruct.unpack('!H', data[7:9])[0] + 50000) acceleration_x = ustruct.unpack('!h', data[9:11])[0] acceleration_y = ustruct.unpack('!h...
def decode_raw_2(mac, rssi, data): temperature = (ustruct.unpack('!h', data[3:5])[0] * 0.005) humidity = (ustruct.unpack('!H', data[5:7])[0] * 0.0025) pressure = (ustruct.unpack('!H', data[7:9])[0] + 50000) acceleration_x = ustruct.unpack('!h', data[9:11])[0] acceleration_y = ustruct.unpack('!h...
6d3c37851e781304f7f7513a5fc4886d87dd439428a7e2e14c865d9a0a2f2ccf
def get_all_files_in_folder(file_path, file_extensions=None): '\n\tThis function returns all files in a given directory.\n\tIf file_extension is specified, only files with that file extension will be returned.\n\t' if (not file_extensions): return [file for file in os.listdir(file_path) if os.path.isfil...
This function returns all files in a given directory. If file_extension is specified, only files with that file extension will be returned.
app/helpers/filesystem_helper.py
get_all_files_in_folder
ZelphirKaltstahl/MarkdownBlog
0
python
def get_all_files_in_folder(file_path, file_extensions=None): '\n\tThis function returns all files in a given directory.\n\tIf file_extension is specified, only files with that file extension will be returned.\n\t' if (not file_extensions): return [file for file in os.listdir(file_path) if os.path.isfil...
def get_all_files_in_folder(file_path, file_extensions=None): '\n\tThis function returns all files in a given directory.\n\tIf file_extension is specified, only files with that file extension will be returned.\n\t' if (not file_extensions): return [file for file in os.listdir(file_path) if os.path.isfil...
fdf021a50fe74db8a71c71c26df0c111af436e772c8f0079498cf96a9e8fe55d
def _tagList(self): ' returns a list of the tags ' fernet = FernetFactory(self.pw, self.salt) obj = Factory(self.fileName, self.tableName) cleanRows = [] for row in obj.tbl.all(): cleanRows.append({'ident': row.doc_id, 'tag': fernet.decrypt(row['tag'])}) obj.close() return cleanRows
returns a list of the tags
tinydb_base/getSetSercure.py
_tagList
MechaCoder/tinydb-baseClass
4
python
def _tagList(self): ' ' fernet = FernetFactory(self.pw, self.salt) obj = Factory(self.fileName, self.tableName) cleanRows = [] for row in obj.tbl.all(): cleanRows.append({'ident': row.doc_id, 'tag': fernet.decrypt(row['tag'])}) obj.close() return cleanRows
def _tagList(self): ' ' fernet = FernetFactory(self.pw, self.salt) obj = Factory(self.fileName, self.tableName) cleanRows = [] for row in obj.tbl.all(): cleanRows.append({'ident': row.doc_id, 'tag': fernet.decrypt(row['tag'])}) obj.close() return cleanRows<|docstring|>returns a list...
55969d6513778a05708f666cfcd8543451cafc721219a6b41ef26146adcfb6f6
def set(self, tag: str, value: str) -> bool: ' sets data by tag' fernet = FernetFactory(self.pw, self.salt) tagFound = False for row in self._tagList(): if (row['tag'] is tag): tagFound = True self._updateValueById(row['ident'], tag, value) if tagFound: return...
sets data by tag
tinydb_base/getSetSercure.py
set
MechaCoder/tinydb-baseClass
4
python
def set(self, tag: str, value: str) -> bool: ' ' fernet = FernetFactory(self.pw, self.salt) tagFound = False for row in self._tagList(): if (row['tag'] is tag): tagFound = True self._updateValueById(row['ident'], tag, value) if tagFound: return True obj = ...
def set(self, tag: str, value: str) -> bool: ' ' fernet = FernetFactory(self.pw, self.salt) tagFound = False for row in self._tagList(): if (row['tag'] is tag): tagFound = True self._updateValueById(row['ident'], tag, value) if tagFound: return True obj = ...
615ec1762d17d520b9252f04a470b1f1d50c2f7be4b0b6d4f904cbb42bfd1921
def get(self, tag: str) -> str: ' get the row by Tag ' obj = Factory(self.fileName, self.tableName) fernet = FernetFactory(self.pw, self.salt) stag = fernet.encrypt(tag) returnVal = '' for row in obj.tbl.all(): if (fernet.decrypt(row['tag']) == tag): returnVal = fernet.decryp...
get the row by Tag
tinydb_base/getSetSercure.py
get
MechaCoder/tinydb-baseClass
4
python
def get(self, tag: str) -> str: ' ' obj = Factory(self.fileName, self.tableName) fernet = FernetFactory(self.pw, self.salt) stag = fernet.encrypt(tag) returnVal = for row in obj.tbl.all(): if (fernet.decrypt(row['tag']) == tag): returnVal = fernet.decrypt(row['val']) ...
def get(self, tag: str) -> str: ' ' obj = Factory(self.fileName, self.tableName) fernet = FernetFactory(self.pw, self.salt) stag = fernet.encrypt(tag) returnVal = for row in obj.tbl.all(): if (fernet.decrypt(row['tag']) == tag): returnVal = fernet.decrypt(row['val']) ...
af325ef0a59d5a5b6939d2ee6297ce6f8f94e212ef0a70205c70ae9df119ae98
@retry(stop=stop_after_attempt(max_tries), wait=wait_fixed(wait_seconds), before=before_log(logger, logging.INFO), after=after_log(logger, logging.WARN)) def init() -> None: 'Try to create session to check if DB is awake.' try: db = SessionLocal() db.execute('SELECT 1') except Exception as e...
Try to create session to check if DB is awake.
api/backend_pre_start.py
init
p0lygun/astounding-arapaimas
0
python
@retry(stop=stop_after_attempt(max_tries), wait=wait_fixed(wait_seconds), before=before_log(logger, logging.INFO), after=after_log(logger, logging.WARN)) def init() -> None: try: db = SessionLocal() db.execute('SELECT 1') except Exception as e: logger.error(e) raise e
@retry(stop=stop_after_attempt(max_tries), wait=wait_fixed(wait_seconds), before=before_log(logger, logging.INFO), after=after_log(logger, logging.WARN)) def init() -> None: try: db = SessionLocal() db.execute('SELECT 1') except Exception as e: logger.error(e) raise e<|docst...
d8fd95e185546752aa8c6e4e64153022234915d466736a545ef36bcd99614349
def main() -> None: 'Initialize the voting application.' logger.info('Initializing service') init() logger.info('Service finished initializing')
Initialize the voting application.
api/backend_pre_start.py
main
p0lygun/astounding-arapaimas
0
python
def main() -> None: logger.info('Initializing service') init() logger.info('Service finished initializing')
def main() -> None: logger.info('Initializing service') init() logger.info('Service finished initializing')<|docstring|>Initialize the voting application.<|endoftext|>
3d35dda0fe0030aa77666ec7bdcc6d52c6cc472cfe6b7a0440c4d4757b939734
def mergeTwoLists(self, l1, l2): '\n :type l1: ListNode\n :type l2: ListNode\n :rtype: ListNode\n ' if ((not l1) and (not l2)): return None elif (not l1): return l2 elif (not l2): return l1 else: head = (l1 if (l1.val < l2.val) else l2) ...
:type l1: ListNode :type l2: ListNode :rtype: ListNode
src/21-MergeTwoSortedLists.py
mergeTwoLists
zhuxiang/LeetCode-Python
0
python
def mergeTwoLists(self, l1, l2): '\n :type l1: ListNode\n :type l2: ListNode\n :rtype: ListNode\n ' if ((not l1) and (not l2)): return None elif (not l1): return l2 elif (not l2): return l1 else: head = (l1 if (l1.val < l2.val) else l2) ...
def mergeTwoLists(self, l1, l2): '\n :type l1: ListNode\n :type l2: ListNode\n :rtype: ListNode\n ' if ((not l1) and (not l2)): return None elif (not l1): return l2 elif (not l2): return l1 else: head = (l1 if (l1.val < l2.val) else l2) ...
db7d7f37938db1ecec5b1ace425e2339afa64fcde92ff4c6146da29b3bef4287
def is_proposer(state: BeaconState, validator_index: ValidatorIndex, config: Eth2Config) -> bool: '\n Return if the validator is proposer of `state.slot`.\n ' return (get_beacon_proposer_index(state, CommitteeConfig(config)) == validator_index)
Return if the validator is proposer of `state.slot`.
eth2/beacon/tools/builder/proposer.py
is_proposer
onyb/trinity
0
python
def is_proposer(state: BeaconState, validator_index: ValidatorIndex, config: Eth2Config) -> bool: '\n \n ' return (get_beacon_proposer_index(state, CommitteeConfig(config)) == validator_index)
def is_proposer(state: BeaconState, validator_index: ValidatorIndex, config: Eth2Config) -> bool: '\n \n ' return (get_beacon_proposer_index(state, CommitteeConfig(config)) == validator_index)<|docstring|>Return if the validator is proposer of `state.slot`.<|endoftext|>
4e9b29ac1f15799fe13dee06d035157b455ab4ccac692b675040f5296ec51cc6
def _generate_randao_reveal(privkey: int, slot: Slot, state: BeaconState, config: Eth2Config) -> BLSSignature: '\n Return the RANDAO reveal for the validator represented by ``privkey``.\n The current implementation requires a validator to provide the BLS signature\n over the SSZ-serialized epoch in which t...
Return the RANDAO reveal for the validator represented by ``privkey``. The current implementation requires a validator to provide the BLS signature over the SSZ-serialized epoch in which they are proposing a block.
eth2/beacon/tools/builder/proposer.py
_generate_randao_reveal
onyb/trinity
0
python
def _generate_randao_reveal(privkey: int, slot: Slot, state: BeaconState, config: Eth2Config) -> BLSSignature: '\n Return the RANDAO reveal for the validator represented by ``privkey``.\n The current implementation requires a validator to provide the BLS signature\n over the SSZ-serialized epoch in which t...
def _generate_randao_reveal(privkey: int, slot: Slot, state: BeaconState, config: Eth2Config) -> BLSSignature: '\n Return the RANDAO reveal for the validator represented by ``privkey``.\n The current implementation requires a validator to provide the BLS signature\n over the SSZ-serialized epoch in which t...
26ac6406eaa837478a22e2200452910a99639d05cc9465302311aa8148ec7f18
def create_unsigned_block_on_state(*, state: BeaconState, config: Eth2Config, block_class: Type[BaseBeaconBlock], parent_block: BaseBeaconBlock, slot: Slot, attestations: Sequence[Attestation], eth1_data: Eth1Data=None, deposits: Sequence[Deposit]=None, check_proposer_index: bool=True) -> BeaconBlock: '\n Create...
Create a beacon block with the given parameters.
eth2/beacon/tools/builder/proposer.py
create_unsigned_block_on_state
onyb/trinity
0
python
def create_unsigned_block_on_state(*, state: BeaconState, config: Eth2Config, block_class: Type[BaseBeaconBlock], parent_block: BaseBeaconBlock, slot: Slot, attestations: Sequence[Attestation], eth1_data: Eth1Data=None, deposits: Sequence[Deposit]=None, check_proposer_index: bool=True) -> BeaconBlock: '\n \n ...
def create_unsigned_block_on_state(*, state: BeaconState, config: Eth2Config, block_class: Type[BaseBeaconBlock], parent_block: BaseBeaconBlock, slot: Slot, attestations: Sequence[Attestation], eth1_data: Eth1Data=None, deposits: Sequence[Deposit]=None, check_proposer_index: bool=True) -> BeaconBlock: '\n \n ...
aeffd78f37723d1e14e67d54f9492be13af8d4f2b1109d30d7586faf244c8d40
def create_block_on_state(*, state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, signed_block_class: Type[BaseSignedBeaconBlock], parent_block: BaseBeaconBlock, slot: Slot, validator_index: ValidatorIndex, privkey: int, attestations: Sequence[Attestation], eth1_data: Eth1Data=None, deposits: ...
Create a beacon block with the given parameters.
eth2/beacon/tools/builder/proposer.py
create_block_on_state
onyb/trinity
0
python
def create_block_on_state(*, state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, signed_block_class: Type[BaseSignedBeaconBlock], parent_block: BaseBeaconBlock, slot: Slot, validator_index: ValidatorIndex, privkey: int, attestations: Sequence[Attestation], eth1_data: Eth1Data=None, deposits: ...
def create_block_on_state(*, state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, signed_block_class: Type[BaseSignedBeaconBlock], parent_block: BaseBeaconBlock, slot: Slot, validator_index: ValidatorIndex, privkey: int, attestations: Sequence[Attestation], eth1_data: Eth1Data=None, deposits: ...
1b1264016d81594f46f2616243d5fb3cdadfb0df31d065e198286d01e6a916e1
def create_mock_block(*, state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, signed_block_class: Type[BaseSignedBeaconBlock], parent_block: BaseSignedBeaconBlock, keymap: Dict[(BLSPubkey, int)], slot: Slot=None, attestations: Sequence[Attestation]=()) -> BaseSignedBeaconBlock: "\n Crea...
Create a mocking block at ``slot`` with the given block parameters and ``keymap``. Note that it doesn't return the correct ``state_root``.
eth2/beacon/tools/builder/proposer.py
create_mock_block
onyb/trinity
0
python
def create_mock_block(*, state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, signed_block_class: Type[BaseSignedBeaconBlock], parent_block: BaseSignedBeaconBlock, keymap: Dict[(BLSPubkey, int)], slot: Slot=None, attestations: Sequence[Attestation]=()) -> BaseSignedBeaconBlock: "\n Crea...
def create_mock_block(*, state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, signed_block_class: Type[BaseSignedBeaconBlock], parent_block: BaseSignedBeaconBlock, keymap: Dict[(BLSPubkey, int)], slot: Slot=None, attestations: Sequence[Attestation]=()) -> BaseSignedBeaconBlock: "\n Crea...
f58ee86ef91e57ed6378f310b4fd36f937aeadc9593516da7b1099c751cc94eb
@abc.abstractmethod def __getitem__(self, idx: int) -> Dict[(str, Any)]: 'Gets the ith Example from the given dataset/version/partition' pass
Gets the ith Example from the given dataset/version/partition
wicker/core/datasets.py
__getitem__
woven-planet/wicker
11
python
@abc.abstractmethod def __getitem__(self, idx: int) -> Dict[(str, Any)]: pass
@abc.abstractmethod def __getitem__(self, idx: int) -> Dict[(str, Any)]: pass<|docstring|>Gets the ith Example from the given dataset/version/partition<|endoftext|>
170ce8bfc1436a59c3492c1034bde50f0caba4d2a7d4930c068ab111a948acc0
@abc.abstractmethod def __len__(self) -> int: 'Returns the length of the dataset/version/partition' pass
Returns the length of the dataset/version/partition
wicker/core/datasets.py
__len__
woven-planet/wicker
11
python
@abc.abstractmethod def __len__(self) -> int: pass
@abc.abstractmethod def __len__(self) -> int: pass<|docstring|>Returns the length of the dataset/version/partition<|endoftext|>
64a529a88757159dcf38dc60762cab0ecd3be9d8c85c7313773085f5b2bc1514
@abc.abstractmethod def schema(self) -> DatasetSchema: 'Return the schema of the dataset.' pass
Return the schema of the dataset.
wicker/core/datasets.py
schema
woven-planet/wicker
11
python
@abc.abstractmethod def schema(self) -> DatasetSchema: pass
@abc.abstractmethod def schema(self) -> DatasetSchema: pass<|docstring|>Return the schema of the dataset.<|endoftext|>
c5ae546dda5e05cc3187466fd92b94352bcd71ec11aa5a3864d07352e60e1292
@abc.abstractmethod def arrow_table(self) -> pyarrow.Table: 'Return the pyarrow table with all the metadata fields and pointers of the dataset.' pass
Return the pyarrow table with all the metadata fields and pointers of the dataset.
wicker/core/datasets.py
arrow_table
woven-planet/wicker
11
python
@abc.abstractmethod def arrow_table(self) -> pyarrow.Table: pass
@abc.abstractmethod def arrow_table(self) -> pyarrow.Table: pass<|docstring|>Return the pyarrow table with all the metadata fields and pointers of the dataset.<|endoftext|>
baffff5357d41a6929e80e0a532cdaa54fa1231afef8b225510a46ce73ea669a
def __init__(self, dataset_name: str, dataset_version: str, dataset_partition_name: str, local_cache_path_prefix: str=os.getenv('TMPDIR', '/tmp'), columns_to_load: Optional[List[str]]=None, storage: Optional[S3DataStorage]=None, s3_path_factory: Optional[S3PathFactory]=None, pa_filesystem: Optional[pafs.FileSystem]=Non...
Initializes an S3Dataset :param dataset_name: name of the dataset :param dataset_version: version of the dataset :param dataset_partition_name: partition name :param columns_to_load: list of columns to load, defaults to None which loads all columns :param data_service: S3DataService instance to use, defaults to None w...
wicker/core/datasets.py
__init__
woven-planet/wicker
11
python
def __init__(self, dataset_name: str, dataset_version: str, dataset_partition_name: str, local_cache_path_prefix: str=os.getenv('TMPDIR', '/tmp'), columns_to_load: Optional[List[str]]=None, storage: Optional[S3DataStorage]=None, s3_path_factory: Optional[S3PathFactory]=None, pa_filesystem: Optional[pafs.FileSystem]=Non...
def __init__(self, dataset_name: str, dataset_version: str, dataset_partition_name: str, local_cache_path_prefix: str=os.getenv('TMPDIR', '/tmp'), columns_to_load: Optional[List[str]]=None, storage: Optional[S3DataStorage]=None, s3_path_factory: Optional[S3PathFactory]=None, pa_filesystem: Optional[pafs.FileSystem]=Non...
c95875569dcc5ffc8950d2c4ece5616d06ab78164eb865331804a7f284b936a2
def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): '3x3 convolution with padding' return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, groups=groups, bias=False, dilation=dilation)
3x3 convolution with padding
trackers/ReidModels/resnet_fc.py
conv3x3
jiangyuefeng/AlphaPose
6,306
python
def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, groups=groups, bias=False, dilation=dilation)
def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, groups=groups, bias=False, dilation=dilation)<|docstring|>3x3 convolution with padding<|endoftext|>
7447c07b06cc8d16674f31fc29f40a376c8d7a0321f9f661635b233109ed88c5
def conv1x1(in_planes, out_planes, stride=1): '1x1 convolution' return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)
1x1 convolution
trackers/ReidModels/resnet_fc.py
conv1x1
jiangyuefeng/AlphaPose
6,306
python
def conv1x1(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)
def conv1x1(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)<|docstring|>1x1 convolution<|endoftext|>
36d0c1eaa888e011965922b1b28f3f4a0beea8fd9a448fdfb6b41d4a15b6efb8
def init_pretrained_weights(model, model_url): "Initializes model with pretrained weights.\n \n Layers that don't match with pretrained layers in name or size are kept unchanged.\n " pretrain_dict = model_zoo.load_url(model_url) model_dict = model.state_dict() pretrain_dict = {k: v for (k, v) i...
Initializes model with pretrained weights. Layers that don't match with pretrained layers in name or size are kept unchanged.
trackers/ReidModels/resnet_fc.py
init_pretrained_weights
jiangyuefeng/AlphaPose
6,306
python
def init_pretrained_weights(model, model_url): "Initializes model with pretrained weights.\n \n Layers that don't match with pretrained layers in name or size are kept unchanged.\n " pretrain_dict = model_zoo.load_url(model_url) model_dict = model.state_dict() pretrain_dict = {k: v for (k, v) i...
def init_pretrained_weights(model, model_url): "Initializes model with pretrained weights.\n \n Layers that don't match with pretrained layers in name or size are kept unchanged.\n " pretrain_dict = model_zoo.load_url(model_url) model_dict = model.state_dict() pretrain_dict = {k: v for (k, v) i...
8706ed9ad3f499721ce198ee2f767f7af9c1514f8826e3b59e06a83f6a5e5945
def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): 'Constructs fully connected layer\n\n Args:\n fc_dims (list or tuple): dimensions of fc layers, if None, no fc layers are constructed\n input_dim (int): input dimension\n dropout_p (float): dropout probability...
Constructs fully connected layer Args: fc_dims (list or tuple): dimensions of fc layers, if None, no fc layers are constructed input_dim (int): input dimension dropout_p (float): dropout probability, if None, dropout is unused
trackers/ReidModels/resnet_fc.py
_construct_fc_layer
jiangyuefeng/AlphaPose
6,306
python
def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): 'Constructs fully connected layer\n\n Args:\n fc_dims (list or tuple): dimensions of fc layers, if None, no fc layers are constructed\n input_dim (int): input dimension\n dropout_p (float): dropout probability...
def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): 'Constructs fully connected layer\n\n Args:\n fc_dims (list or tuple): dimensions of fc layers, if None, no fc layers are constructed\n input_dim (int): input dimension\n dropout_p (float): dropout probability...
5f8ebb22670b564a3b8e725385f6d6ee012e5478aa648c3c7cf59fc310699889
async def async_setup_entry(hass, config_entry, async_add_entities): 'Set up WeMo binary sensors.' async def _discovered_wemo(device): 'Handle a discovered Wemo device.' async_add_entities([WemoBinarySensor(device)]) async_dispatcher_connect(hass, f'{WEMO_DOMAIN}.binary_sensor', _discovered...
Set up WeMo binary sensors.
homeassistant/components/wemo/binary_sensor.py
async_setup_entry
rangulvers/core
11
python
async def async_setup_entry(hass, config_entry, async_add_entities): async def _discovered_wemo(device): 'Handle a discovered Wemo device.' async_add_entities([WemoBinarySensor(device)]) async_dispatcher_connect(hass, f'{WEMO_DOMAIN}.binary_sensor', _discovered_wemo) (await asyncio.gat...
async def async_setup_entry(hass, config_entry, async_add_entities): async def _discovered_wemo(device): 'Handle a discovered Wemo device.' async_add_entities([WemoBinarySensor(device)]) async_dispatcher_connect(hass, f'{WEMO_DOMAIN}.binary_sensor', _discovered_wemo) (await asyncio.gat...
171cb5651281a1c797ce951b4e385d87eb78c8925862d26f62669e451b71bad9
async def _discovered_wemo(device): 'Handle a discovered Wemo device.' async_add_entities([WemoBinarySensor(device)])
Handle a discovered Wemo device.
homeassistant/components/wemo/binary_sensor.py
_discovered_wemo
rangulvers/core
11
python
async def _discovered_wemo(device): async_add_entities([WemoBinarySensor(device)])
async def _discovered_wemo(device): async_add_entities([WemoBinarySensor(device)])<|docstring|>Handle a discovered Wemo device.<|endoftext|>
c38ae69d1530fabc7cad4c3787ee2f6b363b4d96a118196238800548035f779f
def _update(self, force_update=True): 'Update the sensor state.' with self._wemo_exception_handler('update status'): self._state = self.wemo.get_state(force_update)
Update the sensor state.
homeassistant/components/wemo/binary_sensor.py
_update
rangulvers/core
11
python
def _update(self, force_update=True): with self._wemo_exception_handler('update status'): self._state = self.wemo.get_state(force_update)
def _update(self, force_update=True): with self._wemo_exception_handler('update status'): self._state = self.wemo.get_state(force_update)<|docstring|>Update the sensor state.<|endoftext|>
8a3ee048dea0f874dabee63b4650dc9fbe7f523c46e4f6227a00d698e6d5ddb4
def forward(self, box_corners): '\n Args: \n box_corners: (Nbox, 8, 3)\n\n Return:\n cge_features: (Nbox, C, 1)\n ' box_corners_trans = box_corners.transpose(1, 2).unsqueeze(dim=3).contiguous() corners_up_features = self.corners_up_layer(box_corners_trans).squeeze(...
Args: box_corners: (Nbox, 8, 3) Return: cge_features: (Nbox, C, 1)
pcdet/models/roi_heads/feature_adaptor/nn_modules.py
forward
jialeli1/From-Voxel-to-Point
26
python
def forward(self, box_corners): '\n Args: \n box_corners: (Nbox, 8, 3)\n\n Return:\n cge_features: (Nbox, C, 1)\n ' box_corners_trans = box_corners.transpose(1, 2).unsqueeze(dim=3).contiguous() corners_up_features = self.corners_up_layer(box_corners_trans).squeeze(...
def forward(self, box_corners): '\n Args: \n box_corners: (Nbox, 8, 3)\n\n Return:\n cge_features: (Nbox, C, 1)\n ' box_corners_trans = box_corners.transpose(1, 2).unsqueeze(dim=3).contiguous() corners_up_features = self.corners_up_layer(box_corners_trans).squeeze(...
634be7ca86e5ebdac3597d2a28abf03dcc0cbefa1efd76eccf699ebd62100998
def str_size_limit(text: str, limit_ahead: int=3, limit_after: int=7, padding: bool=False, shrink_str: str='...') -> str: '\n 字符串长度限制缩减\n :param text: 需要处理的文本\n :param limit_ahead: 前端长度限制\n :param limit_after: 后端长度限制\n :param padding: 对于长度不足的是否留空格\n :param shrink_str: 缩减表示省略使用的字符串\n :return: 处理...
字符串长度限制缩减 :param text: 需要处理的文本 :param limit_ahead: 前端长度限制 :param limit_after: 后端长度限制 :param padding: 对于长度不足的是否留空格 :param shrink_str: 缩减表示省略使用的字符串 :return: 处理后的文本
lofka-console-py/console_util.py
str_size_limit
zigeertech/lofka
73
python
def str_size_limit(text: str, limit_ahead: int=3, limit_after: int=7, padding: bool=False, shrink_str: str='...') -> str: '\n 字符串长度限制缩减\n :param text: 需要处理的文本\n :param limit_ahead: 前端长度限制\n :param limit_after: 后端长度限制\n :param padding: 对于长度不足的是否留空格\n :param shrink_str: 缩减表示省略使用的字符串\n :return: 处理...
def str_size_limit(text: str, limit_ahead: int=3, limit_after: int=7, padding: bool=False, shrink_str: str='...') -> str: '\n 字符串长度限制缩减\n :param text: 需要处理的文本\n :param limit_ahead: 前端长度限制\n :param limit_after: 后端长度限制\n :param padding: 对于长度不足的是否留空格\n :param shrink_str: 缩减表示省略使用的字符串\n :return: 处理...
830cbbadb8c419e56d04a4c9b4d3c436c3d5dab31d59e894574f2a210ad051f0
def get_linked_key_in_dict(x: dict, k: str): '\n 从字典中链式取值的算法\n :param x: 字典\n :param k: 键值\n :return:\n ' if (k.find('.') < 0): return x[k] else: splitted_key = k.split('.', 1) return get_linked_key_in_dict(x[splitted_key[0]], splitted_key[1])
从字典中链式取值的算法 :param x: 字典 :param k: 键值 :return:
lofka-console-py/console_util.py
get_linked_key_in_dict
zigeertech/lofka
73
python
def get_linked_key_in_dict(x: dict, k: str): '\n 从字典中链式取值的算法\n :param x: 字典\n :param k: 键值\n :return:\n ' if (k.find('.') < 0): return x[k] else: splitted_key = k.split('.', 1) return get_linked_key_in_dict(x[splitted_key[0]], splitted_key[1])
def get_linked_key_in_dict(x: dict, k: str): '\n 从字典中链式取值的算法\n :param x: 字典\n :param k: 键值\n :return:\n ' if (k.find('.') < 0): return x[k] else: splitted_key = k.split('.', 1) return get_linked_key_in_dict(x[splitted_key[0]], splitted_key[1])<|docstring|>从字典中链式取值的算法 :...
575d1f1d3edcdcda67838df227131c329b548d4ea5a9260328d03b8a49e9d088
def host_info_format(host_info: dict): '\n 格式化机器信息,如果主机名和IP一样就只显示IP,否则在括号中显示主机名称\n :param host_info:\n :return:\n ' if (host_info['name'] == host_info['ip']): return host_info['ip'] else: return ('%s(%s)' % (host_info['ip'], host_info['name']))
格式化机器信息,如果主机名和IP一样就只显示IP,否则在括号中显示主机名称 :param host_info: :return:
lofka-console-py/console_util.py
host_info_format
zigeertech/lofka
73
python
def host_info_format(host_info: dict): '\n 格式化机器信息,如果主机名和IP一样就只显示IP,否则在括号中显示主机名称\n :param host_info:\n :return:\n ' if (host_info['name'] == host_info['ip']): return host_info['ip'] else: return ('%s(%s)' % (host_info['ip'], host_info['name']))
def host_info_format(host_info: dict): '\n 格式化机器信息,如果主机名和IP一样就只显示IP,否则在括号中显示主机名称\n :param host_info:\n :return:\n ' if (host_info['name'] == host_info['ip']): return host_info['ip'] else: return ('%s(%s)' % (host_info['ip'], host_info['name']))<|docstring|>格式化机器信息,如果主机名和IP一样就只显示I...
35ebfd9b7b1a5f754f997ce5b1beb34f87fdf10b19a18b3ad685a675f2c35cb1
def message_formatter_raw(log_data: dict) -> str: '\n 消息日志直接输出,当格式化出错的时候就这样输出\n :param log_data:\n :return:\n ' return json.dumps(log_data, indent=2, default=json_util.default)
消息日志直接输出,当格式化出错的时候就这样输出 :param log_data: :return:
lofka-console-py/console_util.py
message_formatter_raw
zigeertech/lofka
73
python
def message_formatter_raw(log_data: dict) -> str: '\n 消息日志直接输出,当格式化出错的时候就这样输出\n :param log_data:\n :return:\n ' return json.dumps(log_data, indent=2, default=json_util.default)
def message_formatter_raw(log_data: dict) -> str: '\n 消息日志直接输出,当格式化出错的时候就这样输出\n :param log_data:\n :return:\n ' return json.dumps(log_data, indent=2, default=json_util.default)<|docstring|>消息日志直接输出,当格式化出错的时候就这样输出 :param log_data: :return:<|endoftext|>
3dec06085a76f255b80b5478e98d7616b8a79b418667525fdee0f73fe661a6ea
def throwable_info_formatter(throwable: dict) -> str: '\n 格式化可抛对象\n :param throwable:\n :return:\n ' stack_info = '\n'.join((' at {0} of {1}\t({2}#{3})'.format(LofkaColors.red(get_or_default(stack, 'method', 'NO METHOD')), LofkaColors.red(get_or_default(stack, 'class', 'NO CLASS')), LofkaColors.c...
格式化可抛对象 :param throwable: :return:
lofka-console-py/console_util.py
throwable_info_formatter
zigeertech/lofka
73
python
def throwable_info_formatter(throwable: dict) -> str: '\n 格式化可抛对象\n :param throwable:\n :return:\n ' stack_info = '\n'.join((' at {0} of {1}\t({2}#{3})'.format(LofkaColors.red(get_or_default(stack, 'method', 'NO METHOD')), LofkaColors.red(get_or_default(stack, 'class', 'NO CLASS')), LofkaColors.c...
def throwable_info_formatter(throwable: dict) -> str: '\n 格式化可抛对象\n :param throwable:\n :return:\n ' stack_info = '\n'.join((' at {0} of {1}\t({2}#{3})'.format(LofkaColors.red(get_or_default(stack, 'method', 'NO METHOD')), LofkaColors.red(get_or_default(stack, 'class', 'NO CLASS')), LofkaColors.c...
c612239774c55110e9101b66523b0882dcc40504cf41128bbd2d91c1fbaef4b5
def message_filter(log_data: dict, filter_map: Dict[(str, set)]) -> bool: '\n 消息过滤器,可以对来源、等级、IP等进行复杂过滤\n :param filter_map: 过滤器\n :param log_data: 日志数据\n :return: True则显示,False则不显示\n ' try: for (k, s) in filter_map.items(): if (get_linked_key_in_dict(log_data, k) not in s): ...
消息过滤器,可以对来源、等级、IP等进行复杂过滤 :param filter_map: 过滤器 :param log_data: 日志数据 :return: True则显示,False则不显示
lofka-console-py/console_util.py
message_filter
zigeertech/lofka
73
python
def message_filter(log_data: dict, filter_map: Dict[(str, set)]) -> bool: '\n 消息过滤器,可以对来源、等级、IP等进行复杂过滤\n :param filter_map: 过滤器\n :param log_data: 日志数据\n :return: True则显示,False则不显示\n ' try: for (k, s) in filter_map.items(): if (get_linked_key_in_dict(log_data, k) not in s): ...
def message_filter(log_data: dict, filter_map: Dict[(str, set)]) -> bool: '\n 消息过滤器,可以对来源、等级、IP等进行复杂过滤\n :param filter_map: 过滤器\n :param log_data: 日志数据\n :return: True则显示,False则不显示\n ' try: for (k, s) in filter_map.items(): if (get_linked_key_in_dict(log_data, k) not in s): ...
322401b87d4155807644bb29b61a2af07ea4165460785db73273a74532e69f89
def __init__(self, args: List[str]): '\n 初始化参数解析\n :param args: sys.argv\n ' self.__data = dict() for i in range((len(args) - 1)): if args[i].startswith('--'): if args[(i + 1)].startswith('--'): key = args[i][2:] self.__data[key] = Tru...
初始化参数解析 :param args: sys.argv
lofka-console-py/console_util.py
__init__
zigeertech/lofka
73
python
def __init__(self, args: List[str]): '\n 初始化参数解析\n :param args: sys.argv\n ' self.__data = dict() for i in range((len(args) - 1)): if args[i].startswith('--'): if args[(i + 1)].startswith('--'): key = args[i][2:] self.__data[key] = Tru...
def __init__(self, args: List[str]): '\n 初始化参数解析\n :param args: sys.argv\n ' self.__data = dict() for i in range((len(args) - 1)): if args[i].startswith('--'): if args[(i + 1)].startswith('--'): key = args[i][2:] self.__data[key] = Tru...
b39847f1c68242fafb72b828e5e5ad29cc12db5c97bb0f0f3625e8fbf3a83b61
def countSmaller(self, nums): '\n :type nums: List[int]\n :rtype: List[int]\n ' pairs = [(num, i) for (i, num) in enumerate(nums)] s = [] d = {} for pair in pairs: i = bisect.bisect_right(s, pair) s.insert(i, pair) d[pair[1]] = i newpairs = [((j - d[p...
:type nums: List[int] :rtype: List[int]
Leetcode/315_count_of_smaller_numbers/count_of_smaller_numbers.py
countSmaller
side-projects-42/INTERVIEW-PREP-COMPLETE
13
python
def countSmaller(self, nums): '\n :type nums: List[int]\n :rtype: List[int]\n ' pairs = [(num, i) for (i, num) in enumerate(nums)] s = [] d = {} for pair in pairs: i = bisect.bisect_right(s, pair) s.insert(i, pair) d[pair[1]] = i newpairs = [((j - d[p...
def countSmaller(self, nums): '\n :type nums: List[int]\n :rtype: List[int]\n ' pairs = [(num, i) for (i, num) in enumerate(nums)] s = [] d = {} for pair in pairs: i = bisect.bisect_right(s, pair) s.insert(i, pair) d[pair[1]] = i newpairs = [((j - d[p...
ac39436e937a883a0d506b8ebafd194aa3a168fb8e90dadc4f6718d338971f38
def testResultTopDirs(self): 'Test ResultTopDirs' pass
Test ResultTopDirs
isi_sdk_8_0/test/test_result_top_dirs.py
testResultTopDirs
mohitjain97/isilon_sdk_python
24
python
def testResultTopDirs(self): pass
def testResultTopDirs(self): pass<|docstring|>Test ResultTopDirs<|endoftext|>
be042fa07aea98c30016c845895dcc2b5b23fc1c56918a80cf2d7e8a06b5c461
def sqlalchemy_call(call, with_name=False, base_call=Call): "\n Convert ``mock.call()`` into call with all parameters wrapped with ``ExpressionMatcher``\n\n For example::\n\n >>> args, kwargs = sqlalchemy_call(mock.call(5, foo='bar'))\n >>> isinstance(args[0], ExpressionMatcher)\n True\n ...
Convert ``mock.call()`` into call with all parameters wrapped with ``ExpressionMatcher`` For example:: >>> args, kwargs = sqlalchemy_call(mock.call(5, foo='bar')) >>> isinstance(args[0], ExpressionMatcher) True >>> isinstance(kwargs['foo'], ExpressionMatcher) True
alchemy_mock/mocking.py
sqlalchemy_call
cool-RR/alchemy-mock
80
python
def sqlalchemy_call(call, with_name=False, base_call=Call): "\n Convert ``mock.call()`` into call with all parameters wrapped with ``ExpressionMatcher``\n\n For example::\n\n >>> args, kwargs = sqlalchemy_call(mock.call(5, foo='bar'))\n >>> isinstance(args[0], ExpressionMatcher)\n True\n ...
def sqlalchemy_call(call, with_name=False, base_call=Call): "\n Convert ``mock.call()`` into call with all parameters wrapped with ``ExpressionMatcher``\n\n For example::\n\n >>> args, kwargs = sqlalchemy_call(mock.call(5, foo='bar'))\n >>> isinstance(args[0], ExpressionMatcher)\n True\n ...
778f252767ee207e11076693c52e89617fad45260f09b2ce2e22bc1902359a9b
def sleep(n): 'Sleep n number of seconds.\n Pauses the execution of the program.\n ' gevent.sleep(n)
Sleep n number of seconds. Pauses the execution of the program.
chatServer.py
sleep
ArtezGDA/heroku-chatbot
0
python
def sleep(n): 'Sleep n number of seconds.\n Pauses the execution of the program.\n ' gevent.sleep(n)
def sleep(n): 'Sleep n number of seconds.\n Pauses the execution of the program.\n ' gevent.sleep(n)<|docstring|>Sleep n number of seconds. Pauses the execution of the program.<|endoftext|>
86a0f973058ec8e85c2c6cbc954316beadd71423054410101a97775b69a47c65
def output(s): 'Outputs string s as chat message.\n Send the given string to the chat client.\n ' sessionID = sessionFromIntrospection() storeChat(sessionID, 1, s) data = {} data['handle'] = 'bot' data['text'] = s data['session'] = sessionID message = json.dumps(data) redis.pub...
Outputs string s as chat message. Send the given string to the chat client.
chatServer.py
output
ArtezGDA/heroku-chatbot
0
python
def output(s): 'Outputs string s as chat message.\n Send the given string to the chat client.\n ' sessionID = sessionFromIntrospection() storeChat(sessionID, 1, s) data = {} data['handle'] = 'bot' data['text'] = s data['session'] = sessionID message = json.dumps(data) redis.pub...
def output(s): 'Outputs string s as chat message.\n Send the given string to the chat client.\n ' sessionID = sessionFromIntrospection() storeChat(sessionID, 1, s) data = {} data['handle'] = 'bot' data['text'] = s data['session'] = sessionID message = json.dumps(data) redis.pub...
e9306b086b6e305f97f4e7b82b8da9e4da5437f9d6f0f374fec78c2f67e130eb
def bot_setup(session): 'Runs the setup function in the bot' bot.setup() sessionVars.storeGlobals(bot, session)
Runs the setup function in the bot
chatServer.py
bot_setup
ArtezGDA/heroku-chatbot
0
python
def bot_setup(session): bot.setup() sessionVars.storeGlobals(bot, session)
def bot_setup(session): bot.setup() sessionVars.storeGlobals(bot, session)<|docstring|>Runs the setup function in the bot<|endoftext|>
7168ddc422f71f43a49c2fb6bb67daa27cf34752543981ef01dafe668d2bc0bb
def bot_response(session, message): 'Lets the bot create a response for the given message' sessionVars.injectGlobals(bot, session) bot.response(message) sessionVars.storeGlobals(bot, session)
Lets the bot create a response for the given message
chatServer.py
bot_response
ArtezGDA/heroku-chatbot
0
python
def bot_response(session, message): sessionVars.injectGlobals(bot, session) bot.response(message) sessionVars.storeGlobals(bot, session)
def bot_response(session, message): sessionVars.injectGlobals(bot, session) bot.response(message) sessionVars.storeGlobals(bot, session)<|docstring|>Lets the bot create a response for the given message<|endoftext|>
783a533f583318ad506ce0b1d634c3f76c7c3d9706d3337df2685f6aaba88d3f
@property def labels(self) -> List[str]: '\n Model classification labels.\n\n This is `None` if the model does not have any classification labels.\n ' return self.__predictor['labels'].copy()
Model classification labels. This is `None` if the model does not have any classification labels.
natml/predictor.py
labels
natsuite/NatML-Py
2
python
@property def labels(self) -> List[str]: '\n Model classification labels.\n\n This is `None` if the model does not have any classification labels.\n ' return self.__predictor['labels'].copy()
@property def labels(self) -> List[str]: '\n Model classification labels.\n\n This is `None` if the model does not have any classification labels.\n ' return self.__predictor['labels'].copy()<|docstring|>Model classification labels. This is `None` if the model does not have any classificat...
d0f6af493302c9f4013553e316fe47949927b68a2c69db4b40ef717f8d9718c4
@property def normalization(self) -> Normalization: '\n Expected feature normalization for predictions with this model.\n\n This is `None` if the model does not use normalization.\n ' normalization = self.__predictor['normalization'] (mean, std) = (normalization['mean'], normalization['...
Expected feature normalization for predictions with this model. This is `None` if the model does not use normalization.
natml/predictor.py
normalization
natsuite/NatML-Py
2
python
@property def normalization(self) -> Normalization: '\n Expected feature normalization for predictions with this model.\n\n This is `None` if the model does not use normalization.\n ' normalization = self.__predictor['normalization'] (mean, std) = (normalization['mean'], normalization['...
@property def normalization(self) -> Normalization: '\n Expected feature normalization for predictions with this model.\n\n This is `None` if the model does not use normalization.\n ' normalization = self.__predictor['normalization'] (mean, std) = (normalization['mean'], normalization['...
5c4a04ff375cbca040ca699f1d85581129e701a02271a189bc72d4ccbda29a7a
@property def audio_format(self) -> AudioFormat: '\n Expected audio format for predictions with this model.\n\n This is `None` if the model does not use audio features.\n ' format = self.__predictor['audioFormat'] (sample_rate, channel_count) = (format['sampleRate'], format['channelCoun...
Expected audio format for predictions with this model. This is `None` if the model does not use audio features.
natml/predictor.py
audio_format
natsuite/NatML-Py
2
python
@property def audio_format(self) -> AudioFormat: '\n Expected audio format for predictions with this model.\n\n This is `None` if the model does not use audio features.\n ' format = self.__predictor['audioFormat'] (sample_rate, channel_count) = (format['sampleRate'], format['channelCoun...
@property def audio_format(self) -> AudioFormat: '\n Expected audio format for predictions with this model.\n\n This is `None` if the model does not use audio features.\n ' format = self.__predictor['audioFormat'] (sample_rate, channel_count) = (format['sampleRate'], format['channelCoun...
5320803292a81a97420883ea3984db8eff5d8e036559ba0a51f9eb9821b00ac5
def deserialize(self) -> MLModel: '\n Deserialize the model data to create an ML model that can be used for prediction.\n\n Returns:\n MLModel: ML model.\n ' assert self.__predictor['session'], 'Cannot deserialize model data because session is invalid' assert (self.__predicto...
Deserialize the model data to create an ML model that can be used for prediction. Returns: MLModel: ML model.
natml/predictor.py
deserialize
natsuite/NatML-Py
2
python
def deserialize(self) -> MLModel: '\n Deserialize the model data to create an ML model that can be used for prediction.\n\n Returns:\n MLModel: ML model.\n ' assert self.__predictor['session'], 'Cannot deserialize model data because session is invalid' assert (self.__predicto...
def deserialize(self) -> MLModel: '\n Deserialize the model data to create an ML model that can be used for prediction.\n\n Returns:\n MLModel: ML model.\n ' assert self.__predictor['session'], 'Cannot deserialize model data because session is invalid' assert (self.__predicto...
b96fab7a85a1cc6c2e9f8b9a09e0d13072461b8cdd154b2948f7fa495986da6c
@staticmethod def from_hub(tag: str, access_key: str) -> MLModelData: '\n Fetch ML model data from NatML Hub.\n\n Parameters:\n tag (str): Model tag.\n access_key (str): Hub access key.\n \n Returns:\n MLModelData: ML model data.\n ' pass
Fetch ML model data from NatML Hub. Parameters: tag (str): Model tag. access_key (str): Hub access key. Returns: MLModelData: ML model data.
natml/predictor.py
from_hub
natsuite/NatML-Py
2
python
@staticmethod def from_hub(tag: str, access_key: str) -> MLModelData: '\n Fetch ML model data from NatML Hub.\n\n Parameters:\n tag (str): Model tag.\n access_key (str): Hub access key.\n \n Returns:\n MLModelData: ML model data.\n ' pass
@staticmethod def from_hub(tag: str, access_key: str) -> MLModelData: '\n Fetch ML model data from NatML Hub.\n\n Parameters:\n tag (str): Model tag.\n access_key (str): Hub access key.\n \n Returns:\n MLModelData: ML model data.\n ' pass<|docs...
5c9231348bae3b7d432b03d0feb2caa85b6eecd088b3085ef93a1d293e300b9a
def transition_probs(one_hot_labels, log_probs): '\n :return: blank_probs with shape batch_size x input_max_len x target_max_len\n truth_probs with shape batch_size x input_max_len x (target_max_len-1)\n ' blank_probs = log_probs[(:, :, :, 0)] truth_probs = tf.reduce_sum(tf.multiply(log_pr...
:return: blank_probs with shape batch_size x input_max_len x target_max_len truth_probs with shape batch_size x input_max_len x (target_max_len-1)
asr/losses/rnnt_losses.py
transition_probs
Z-yq/audioSamples.github.io
1
python
def transition_probs(one_hot_labels, log_probs): '\n :return: blank_probs with shape batch_size x input_max_len x target_max_len\n truth_probs with shape batch_size x input_max_len x (target_max_len-1)\n ' blank_probs = log_probs[(:, :, :, 0)] truth_probs = tf.reduce_sum(tf.multiply(log_pr...
def transition_probs(one_hot_labels, log_probs): '\n :return: blank_probs with shape batch_size x input_max_len x target_max_len\n truth_probs with shape batch_size x input_max_len x (target_max_len-1)\n ' blank_probs = log_probs[(:, :, :, 0)] truth_probs = tf.reduce_sum(tf.multiply(log_pr...
836c8af6c9e43849540f902dc83af1c75e3ed57148a3abfc8c7e49abdd90e0a8
def forward_dp(bp_diags, tp_diags, batch_size, input_max_len, target_max_len): '\n :return: forward variable alpha with shape batch_size x input_max_len x target_max_len\n ' def next_state(x, trans_probs): blank_probs = trans_probs[0] truth_probs = trans_probs[1] x_b = tf.concat([...
:return: forward variable alpha with shape batch_size x input_max_len x target_max_len
asr/losses/rnnt_losses.py
forward_dp
Z-yq/audioSamples.github.io
1
python
def forward_dp(bp_diags, tp_diags, batch_size, input_max_len, target_max_len): '\n \n ' def next_state(x, trans_probs): blank_probs = trans_probs[0] truth_probs = trans_probs[1] x_b = tf.concat([(LOG_0 * tf.ones(shape=[batch_size, 1])), (x[(:, :(- 1))] + blank_probs)], axis=1) ...
def forward_dp(bp_diags, tp_diags, batch_size, input_max_len, target_max_len): '\n \n ' def next_state(x, trans_probs): blank_probs = trans_probs[0] truth_probs = trans_probs[1] x_b = tf.concat([(LOG_0 * tf.ones(shape=[batch_size, 1])), (x[(:, :(- 1))] + blank_probs)], axis=1) ...
3ea4eb02373985a456b989aec7b117831709c493b1565f3103805c693667d4de
def backward_dp(bp_diags, tp_diags, batch_size, input_max_len, target_max_len, label_length, logit_length, blank_sl): '\n :return: backward variable beta with shape batch_size x input_max_len x target_max_len\n ' def next_state(x, mask_and_trans_probs): (mask_s, blank_probs_s, truth_probs) = ...
:return: backward variable beta with shape batch_size x input_max_len x target_max_len
asr/losses/rnnt_losses.py
backward_dp
Z-yq/audioSamples.github.io
1
python
def backward_dp(bp_diags, tp_diags, batch_size, input_max_len, target_max_len, label_length, logit_length, blank_sl): '\n \n ' def next_state(x, mask_and_trans_probs): (mask_s, blank_probs_s, truth_probs) = mask_and_trans_probs beta_b = tf.concat([(x[(:, 1:)] + blank_probs_s), (LOG_0 ...
def backward_dp(bp_diags, tp_diags, batch_size, input_max_len, target_max_len, label_length, logit_length, blank_sl): '\n \n ' def next_state(x, mask_and_trans_probs): (mask_s, blank_probs_s, truth_probs) = mask_and_trans_probs beta_b = tf.concat([(x[(:, 1:)] + blank_probs_s), (LOG_0 ...
84fd4bad8082c35a8908c2682f820e2455facf0f3d2e45ec9c5de3b2fdfe8d38
@tf.custom_gradient def compute_rnnt_loss_and_grad(logits_t, labels_t, label_length_t, logit_length_t): 'Compute RNN-T loss and gradients.' logits_t.set_shape(logits.shape) labels_t.set_shape(labels.shape) label_length_t.set_shape(label_length.shape) logit_length_t.set_shape(logit_length.shape) ...
Compute RNN-T loss and gradients.
asr/losses/rnnt_losses.py
compute_rnnt_loss_and_grad
Z-yq/audioSamples.github.io
1
python
@tf.custom_gradient def compute_rnnt_loss_and_grad(logits_t, labels_t, label_length_t, logit_length_t): logits_t.set_shape(logits.shape) labels_t.set_shape(labels.shape) label_length_t.set_shape(label_length.shape) logit_length_t.set_shape(logit_length.shape) kwargs = dict(logits=logits_t, labe...
@tf.custom_gradient def compute_rnnt_loss_and_grad(logits_t, labels_t, label_length_t, logit_length_t): logits_t.set_shape(logits.shape) labels_t.set_shape(labels.shape) label_length_t.set_shape(label_length.shape) logit_length_t.set_shape(logit_length.shape) kwargs = dict(logits=logits_t, labe...
da2118ba4fd2fe66a14c1cbb7828ba0723a08a969a58f0f74c5c6398254f813b
def BPRLoss(vocab_size: int): 'BPR Loss with biases.' return deepr.layers.DAG(deepr.layers.Select(inputs=('userEmbeddings', 'targetPositives', 'targetNegatives', 'targetMask')), deepr.layers.DenseIndex(inputs=('userEmbeddings', 'targetPositives'), outputs='targetPositiveLogits', units=vocab_size, kernel_name='e...
BPR Loss with biases.
deepr/examples/movielens/layers/bpr.py
BPRLoss
Jasputtar/deepr
50
python
def BPRLoss(vocab_size: int): return deepr.layers.DAG(deepr.layers.Select(inputs=('userEmbeddings', 'targetPositives', 'targetNegatives', 'targetMask')), deepr.layers.DenseIndex(inputs=('userEmbeddings', 'targetPositives'), outputs='targetPositiveLogits', units=vocab_size, kernel_name='embeddings', bias_name='...
def BPRLoss(vocab_size: int): return deepr.layers.DAG(deepr.layers.Select(inputs=('userEmbeddings', 'targetPositives', 'targetNegatives', 'targetMask')), deepr.layers.DenseIndex(inputs=('userEmbeddings', 'targetPositives'), outputs='targetPositiveLogits', units=vocab_size, kernel_name='embeddings', bias_name='...
072c36e5305193b7278919d8a74ca57c28577eafc682f7ed4a6fe77fd9b70d58
@property def CorrectionFactorMode(self): '\n Returns\n -------\n - str: Correction Factor mode\n ' return self._get_attribute(self._SDM_ATT_MAP['CorrectionFactorMode'])
Returns ------- - str: Correction Factor mode
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
CorrectionFactorMode
OpenIxia/ixnetwork_restpy
20
python
@property def CorrectionFactorMode(self): '\n Returns\n -------\n - str: Correction Factor mode\n ' return self._get_attribute(self._SDM_ATT_MAP['CorrectionFactorMode'])
@property def CorrectionFactorMode(self): '\n Returns\n -------\n - str: Correction Factor mode\n ' return self._get_attribute(self._SDM_ATT_MAP['CorrectionFactorMode'])<|docstring|>Returns ------- - str: Correction Factor mode<|endoftext|>
1c02082e0341e274f5acf9c07d71272224503bb353f0023fa1c8225429ab8212
@property def CorrectionFactorScale(self): '\n Returns\n -------\n - str: Correction Factor Scale\n ' return self._get_attribute(self._SDM_ATT_MAP['CorrectionFactorScale'])
Returns ------- - str: Correction Factor Scale
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
CorrectionFactorScale
OpenIxia/ixnetwork_restpy
20
python
@property def CorrectionFactorScale(self): '\n Returns\n -------\n - str: Correction Factor Scale\n ' return self._get_attribute(self._SDM_ATT_MAP['CorrectionFactorScale'])
@property def CorrectionFactorScale(self): '\n Returns\n -------\n - str: Correction Factor Scale\n ' return self._get_attribute(self._SDM_ATT_MAP['CorrectionFactorScale'])<|docstring|>Returns ------- - str: Correction Factor Scale<|endoftext|>
e9974fcbcec21f5acea712caf24bbbc452c92000032020a9b44bc4fc8b638556
@property def Duration(self): '\n Returns\n -------\n - number: The wait time in hours, minutes, and seconds, that is required for the PTP protocol to negotiate\n ' return self._get_attribute(self._SDM_ATT_MAP['Duration'])
Returns ------- - number: The wait time in hours, minutes, and seconds, that is required for the PTP protocol to negotiate
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Duration
OpenIxia/ixnetwork_restpy
20
python
@property def Duration(self): '\n Returns\n -------\n - number: The wait time in hours, minutes, and seconds, that is required for the PTP protocol to negotiate\n ' return self._get_attribute(self._SDM_ATT_MAP['Duration'])
@property def Duration(self): '\n Returns\n -------\n - number: The wait time in hours, minutes, and seconds, that is required for the PTP protocol to negotiate\n ' return self._get_attribute(self._SDM_ATT_MAP['Duration'])<|docstring|>Returns ------- - number: The wait time in hours,...
b69839c71991183977b0f4ad22693fcc052e71b457d6d637cbb228c02660cbf4
@property def EnableCorrectionFactorPassFail(self): '\n Returns\n -------\n - str: If selected, a Pass/Fail criteria is applied to the Correction Factor Error test\n ' return self._get_attribute(self._SDM_ATT_MAP['EnableCorrectionFactorPassFail'])
Returns ------- - str: If selected, a Pass/Fail criteria is applied to the Correction Factor Error test
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
EnableCorrectionFactorPassFail
OpenIxia/ixnetwork_restpy
20
python
@property def EnableCorrectionFactorPassFail(self): '\n Returns\n -------\n - str: If selected, a Pass/Fail criteria is applied to the Correction Factor Error test\n ' return self._get_attribute(self._SDM_ATT_MAP['EnableCorrectionFactorPassFail'])
@property def EnableCorrectionFactorPassFail(self): '\n Returns\n -------\n - str: If selected, a Pass/Fail criteria is applied to the Correction Factor Error test\n ' return self._get_attribute(self._SDM_ATT_MAP['EnableCorrectionFactorPassFail'])<|docstring|>Returns ------- - str: I...
98380a947a7a889c9fcb4c71d8f4740f25cfc3fe99de0a7bc95e874c88275d4f
@property def MaxOutstanding(self): '\n Returns\n -------\n - number: Maximum number of connection requests or tear down requests that can be pending at any one time\n ' return self._get_attribute(self._SDM_ATT_MAP['MaxOutstanding'])
Returns ------- - number: Maximum number of connection requests or tear down requests that can be pending at any one time
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
MaxOutstanding
OpenIxia/ixnetwork_restpy
20
python
@property def MaxOutstanding(self): '\n Returns\n -------\n - number: Maximum number of connection requests or tear down requests that can be pending at any one time\n ' return self._get_attribute(self._SDM_ATT_MAP['MaxOutstanding'])
@property def MaxOutstanding(self): '\n Returns\n -------\n - number: Maximum number of connection requests or tear down requests that can be pending at any one time\n ' return self._get_attribute(self._SDM_ATT_MAP['MaxOutstanding'])<|docstring|>Returns ------- - number: Maximum numb...
fc01bda78967b92406dec35e4ea78673b9f888e58d55eef8805fa806656bffba
@property def MeasuredResidenceTime(self): '\n Returns\n -------\n - str: The measured time taken by a packet to move from the ingress port to the egress port\n ' return self._get_attribute(self._SDM_ATT_MAP['MeasuredResidenceTime'])
Returns ------- - str: The measured time taken by a packet to move from the ingress port to the egress port
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
MeasuredResidenceTime
OpenIxia/ixnetwork_restpy
20
python
@property def MeasuredResidenceTime(self): '\n Returns\n -------\n - str: The measured time taken by a packet to move from the ingress port to the egress port\n ' return self._get_attribute(self._SDM_ATT_MAP['MeasuredResidenceTime'])
@property def MeasuredResidenceTime(self): '\n Returns\n -------\n - str: The measured time taken by a packet to move from the ingress port to the egress port\n ' return self._get_attribute(self._SDM_ATT_MAP['MeasuredResidenceTime'])<|docstring|>Returns ------- - str: The measured ti...
2a88d447d73352167848bb12061caab702d399f2e1704cde80d9c4e9a5fa4b83
@property def NumberCorrectionFactorPassFail(self): '\n Returns\n -------\n - number: Number of criteria used for Pass/Fail\n ' return self._get_attribute(self._SDM_ATT_MAP['NumberCorrectionFactorPassFail'])
Returns ------- - number: Number of criteria used for Pass/Fail
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
NumberCorrectionFactorPassFail
OpenIxia/ixnetwork_restpy
20
python
@property def NumberCorrectionFactorPassFail(self): '\n Returns\n -------\n - number: Number of criteria used for Pass/Fail\n ' return self._get_attribute(self._SDM_ATT_MAP['NumberCorrectionFactorPassFail'])
@property def NumberCorrectionFactorPassFail(self): '\n Returns\n -------\n - number: Number of criteria used for Pass/Fail\n ' return self._get_attribute(self._SDM_ATT_MAP['NumberCorrectionFactorPassFail'])<|docstring|>Returns ------- - number: Number of criteria used for Pass/Fail<...
11e87c0e967109b6f427b1790550b8d2af60ab42c6a32182d61fa143a3783887
@property def Numtrials(self): '\n Returns\n -------\n - number: The number of trials that can be run\n ' return self._get_attribute(self._SDM_ATT_MAP['Numtrials'])
Returns ------- - number: The number of trials that can be run
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Numtrials
OpenIxia/ixnetwork_restpy
20
python
@property def Numtrials(self): '\n Returns\n -------\n - number: The number of trials that can be run\n ' return self._get_attribute(self._SDM_ATT_MAP['Numtrials'])
@property def Numtrials(self): '\n Returns\n -------\n - number: The number of trials that can be run\n ' return self._get_attribute(self._SDM_ATT_MAP['Numtrials'])<|docstring|>Returns ------- - number: The number of trials that can be run<|endoftext|>
c42a7fe4bef7d4614bfe1f08c3bfe1650f6b225ddf8e38d601212562a6b054cf
@property def OffsetGraph(self): '\n Returns\n -------\n - str: Offset graphing\n ' return self._get_attribute(self._SDM_ATT_MAP['OffsetGraph'])
Returns ------- - str: Offset graphing
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
OffsetGraph
OpenIxia/ixnetwork_restpy
20
python
@property def OffsetGraph(self): '\n Returns\n -------\n - str: Offset graphing\n ' return self._get_attribute(self._SDM_ATT_MAP['OffsetGraph'])
@property def OffsetGraph(self): '\n Returns\n -------\n - str: Offset graphing\n ' return self._get_attribute(self._SDM_ATT_MAP['OffsetGraph'])<|docstring|>Returns ------- - str: Offset graphing<|endoftext|>
4635642c8f006e258031ee8ff68c09d9c82d5c7a6b827be0806fa85050e6ece9
@property def PathDelayGraphing(self): '\n Returns\n -------\n - str: Graphing of path delay\n ' return self._get_attribute(self._SDM_ATT_MAP['PathDelayGraphing'])
Returns ------- - str: Graphing of path delay
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
PathDelayGraphing
OpenIxia/ixnetwork_restpy
20
python
@property def PathDelayGraphing(self): '\n Returns\n -------\n - str: Graphing of path delay\n ' return self._get_attribute(self._SDM_ATT_MAP['PathDelayGraphing'])
@property def PathDelayGraphing(self): '\n Returns\n -------\n - str: Graphing of path delay\n ' return self._get_attribute(self._SDM_ATT_MAP['PathDelayGraphing'])<|docstring|>Returns ------- - str: Graphing of path delay<|endoftext|>
3e60b598644ac18f890449523397f9b3c2466e7dd124ae339335c1084d63bc00
@property def ProtocolItem(self): '\n Returns\n -------\n - list(str[None | /api/v1/sessions/1/ixnetwork/vport | /api/v1/sessions/1/ixnetwork/vport/.../lan]): Protocol Items\n ' return self._get_attribute(self._SDM_ATT_MAP['ProtocolItem'])
Returns ------- - list(str[None | /api/v1/sessions/1/ixnetwork/vport | /api/v1/sessions/1/ixnetwork/vport/.../lan]): Protocol Items
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
ProtocolItem
OpenIxia/ixnetwork_restpy
20
python
@property def ProtocolItem(self): '\n Returns\n -------\n - list(str[None | /api/v1/sessions/1/ixnetwork/vport | /api/v1/sessions/1/ixnetwork/vport/.../lan]): Protocol Items\n ' return self._get_attribute(self._SDM_ATT_MAP['ProtocolItem'])
@property def ProtocolItem(self): '\n Returns\n -------\n - list(str[None | /api/v1/sessions/1/ixnetwork/vport | /api/v1/sessions/1/ixnetwork/vport/.../lan]): Protocol Items\n ' return self._get_attribute(self._SDM_ATT_MAP['ProtocolItem'])<|docstring|>Returns ------- - list(str[None ...
9f049fbdbc27b9503c4195a888263b4b01b051d7a4f58b73ce54e5b239b167ae
@property def ResidenceTime(self): '\n Returns\n -------\n - number: The time taken by a packet to move from the ingress port to the egress port\n ' return self._get_attribute(self._SDM_ATT_MAP['ResidenceTime'])
Returns ------- - number: The time taken by a packet to move from the ingress port to the egress port
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
ResidenceTime
OpenIxia/ixnetwork_restpy
20
python
@property def ResidenceTime(self): '\n Returns\n -------\n - number: The time taken by a packet to move from the ingress port to the egress port\n ' return self._get_attribute(self._SDM_ATT_MAP['ResidenceTime'])
@property def ResidenceTime(self): '\n Returns\n -------\n - number: The time taken by a packet to move from the ingress port to the egress port\n ' return self._get_attribute(self._SDM_ATT_MAP['ResidenceTime'])<|docstring|>Returns ------- - number: The time taken by a packet to move...
aa55540bf3e2885e87796399e97ad114866605f5dd120962cd4e9216d0b70c0f
@property def Runmode(self): '\n Returns\n -------\n - str(duration | noframes): Running mode used\n ' return self._get_attribute(self._SDM_ATT_MAP['Runmode'])
Returns ------- - str(duration | noframes): Running mode used
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Runmode
OpenIxia/ixnetwork_restpy
20
python
@property def Runmode(self): '\n Returns\n -------\n - str(duration | noframes): Running mode used\n ' return self._get_attribute(self._SDM_ATT_MAP['Runmode'])
@property def Runmode(self): '\n Returns\n -------\n - str(duration | noframes): Running mode used\n ' return self._get_attribute(self._SDM_ATT_MAP['Runmode'])<|docstring|>Returns ------- - str(duration | noframes): Running mode used<|endoftext|>
0e883cf2b665bc624a9c7f014c8d7435860535891d77849f2f71f39fecbbe1e6
@property def SetupRate(self): '\n Returns\n -------\n - number: The number of PTP connections to be initiated per second\n ' return self._get_attribute(self._SDM_ATT_MAP['SetupRate'])
Returns ------- - number: The number of PTP connections to be initiated per second
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
SetupRate
OpenIxia/ixnetwork_restpy
20
python
@property def SetupRate(self): '\n Returns\n -------\n - number: The number of PTP connections to be initiated per second\n ' return self._get_attribute(self._SDM_ATT_MAP['SetupRate'])
@property def SetupRate(self): '\n Returns\n -------\n - number: The number of PTP connections to be initiated per second\n ' return self._get_attribute(self._SDM_ATT_MAP['SetupRate'])<|docstring|>Returns ------- - number: The number of PTP connections to be initiated per second<|end...
0f546bd9bac6122080502d791e65716b045c24aef1c1a0a769187df10e8e801e
@property def StartTraffic(self): '\n Returns\n -------\n - str: All traffic configured in IxNetwork is initiated on running this test\n ' return self._get_attribute(self._SDM_ATT_MAP['StartTraffic'])
Returns ------- - str: All traffic configured in IxNetwork is initiated on running this test
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
StartTraffic
OpenIxia/ixnetwork_restpy
20
python
@property def StartTraffic(self): '\n Returns\n -------\n - str: All traffic configured in IxNetwork is initiated on running this test\n ' return self._get_attribute(self._SDM_ATT_MAP['StartTraffic'])
@property def StartTraffic(self): '\n Returns\n -------\n - str: All traffic configured in IxNetwork is initiated on running this test\n ' return self._get_attribute(self._SDM_ATT_MAP['StartTraffic'])<|docstring|>Returns ------- - str: All traffic configured in IxNetwork is initiated...
b1a240d205dcb7f5fa507558759d0985abc65ddea52e7f67ec81270088afa81a
@property def TeardownRate(self): '\n Returns\n -------\n - number: The number of PTP connections to tear down per second\n ' return self._get_attribute(self._SDM_ATT_MAP['TeardownRate'])
Returns ------- - number: The number of PTP connections to tear down per second
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
TeardownRate
OpenIxia/ixnetwork_restpy
20
python
@property def TeardownRate(self): '\n Returns\n -------\n - number: The number of PTP connections to tear down per second\n ' return self._get_attribute(self._SDM_ATT_MAP['TeardownRate'])
@property def TeardownRate(self): '\n Returns\n -------\n - number: The number of PTP connections to tear down per second\n ' return self._get_attribute(self._SDM_ATT_MAP['TeardownRate'])<|docstring|>Returns ------- - number: The number of PTP connections to tear down per second<|end...
eaba840451842da9ff4b1e027914a6bd298f50122a49b336a9727e57f1d05985
@property def TestConfiguration(self): '\n Returns\n -------\n - str: Test configuration\n ' return self._get_attribute(self._SDM_ATT_MAP['TestConfiguration'])
Returns ------- - str: Test configuration
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
TestConfiguration
OpenIxia/ixnetwork_restpy
20
python
@property def TestConfiguration(self): '\n Returns\n -------\n - str: Test configuration\n ' return self._get_attribute(self._SDM_ATT_MAP['TestConfiguration'])
@property def TestConfiguration(self): '\n Returns\n -------\n - str: Test configuration\n ' return self._get_attribute(self._SDM_ATT_MAP['TestConfiguration'])<|docstring|>Returns ------- - str: Test configuration<|endoftext|>
ae91a8b8603ad7488541c73aa94ef84b9b76b38a3eb6cd06aa15aa767ff3bb19
@property def UseExistingSetupRate(self): '\n Returns\n -------\n - bool: The current setup rate value is used\n ' return self._get_attribute(self._SDM_ATT_MAP['UseExistingSetupRate'])
Returns ------- - bool: The current setup rate value is used
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
UseExistingSetupRate
OpenIxia/ixnetwork_restpy
20
python
@property def UseExistingSetupRate(self): '\n Returns\n -------\n - bool: The current setup rate value is used\n ' return self._get_attribute(self._SDM_ATT_MAP['UseExistingSetupRate'])
@property def UseExistingSetupRate(self): '\n Returns\n -------\n - bool: The current setup rate value is used\n ' return self._get_attribute(self._SDM_ATT_MAP['UseExistingSetupRate'])<|docstring|>Returns ------- - bool: The current setup rate value is used<|endoftext|>
eb78cf6841794e788cc03239f10c026a5d656d66fd40aa0ea41403c7264f7077
def update(self, CorrectionFactorMode=None, CorrectionFactorScale=None, Duration=None, EnableCorrectionFactorPassFail=None, MaxOutstanding=None, MeasuredResidenceTime=None, NumberCorrectionFactorPassFail=None, Numtrials=None, OffsetGraph=None, PathDelayGraphing=None, ProtocolItem=None, ResidenceTime=None, Runmode=None,...
Updates testConfig resource on the server. Args ---- - CorrectionFactorMode (str): Correction Factor mode - CorrectionFactorScale (str): Correction Factor Scale - Duration (number): The wait time in hours, minutes, and seconds, that is required for the PTP protocol to negotiate - EnableCorrectionFactorPassFail (str): ...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
update
OpenIxia/ixnetwork_restpy
20
python
def update(self, CorrectionFactorMode=None, CorrectionFactorScale=None, Duration=None, EnableCorrectionFactorPassFail=None, MaxOutstanding=None, MeasuredResidenceTime=None, NumberCorrectionFactorPassFail=None, Numtrials=None, OffsetGraph=None, PathDelayGraphing=None, ProtocolItem=None, ResidenceTime=None, Runmode=None,...
def update(self, CorrectionFactorMode=None, CorrectionFactorScale=None, Duration=None, EnableCorrectionFactorPassFail=None, MaxOutstanding=None, MeasuredResidenceTime=None, NumberCorrectionFactorPassFail=None, Numtrials=None, OffsetGraph=None, PathDelayGraphing=None, ProtocolItem=None, ResidenceTime=None, Runmode=None,...
2fbbc02c3249aa09e583b19011e83fbf53c110ab917de18ac19cdb12151bca99
def Apply(self, *args, **kwargs): 'Executes the apply operation on the server.\n\n Applies the specified Quick Test.\n\n apply(async_operation=bool)\n ---------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls...
Executes the apply operation on the server. Applies the specified Quick Test. apply(async_operation=bool) --------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Apply
OpenIxia/ixnetwork_restpy
20
python
def Apply(self, *args, **kwargs): 'Executes the apply operation on the server.\n\n Applies the specified Quick Test.\n\n apply(async_operation=bool)\n ---------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls...
def Apply(self, *args, **kwargs): 'Executes the apply operation on the server.\n\n Applies the specified Quick Test.\n\n apply(async_operation=bool)\n ---------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls...
886f8f440da267cc9e714248ad593ca1e0b04bc24fe3ec2a6cc27b1d811c03b1
def ApplyAsync(self, *args, **kwargs): 'Executes the applyAsync operation on the server.\n\n applyAsync(async_operation=bool)\n --------------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connect...
Executes the applyAsync operation on the server. applyAsync(async_operation=bool) -------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - N...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
ApplyAsync
OpenIxia/ixnetwork_restpy
20
python
def ApplyAsync(self, *args, **kwargs): 'Executes the applyAsync operation on the server.\n\n applyAsync(async_operation=bool)\n --------------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connect...
def ApplyAsync(self, *args, **kwargs): 'Executes the applyAsync operation on the server.\n\n applyAsync(async_operation=bool)\n --------------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connect...
6194626434da046ba089e0c43cf098ce5d96ba4d9e748a63d92f3d1c34e2de48
def ApplyAsyncResult(self, *args, **kwargs): 'Executes the applyAsyncResult operation on the server.\n\n applyAsyncResult(async_operation=bool)bool\n ------------------------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest ap...
Executes the applyAsyncResult operation on the server. applyAsyncResult(async_operation=bool)bool ------------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is co...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
ApplyAsyncResult
OpenIxia/ixnetwork_restpy
20
python
def ApplyAsyncResult(self, *args, **kwargs): 'Executes the applyAsyncResult operation on the server.\n\n applyAsyncResult(async_operation=bool)bool\n ------------------------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest ap...
def ApplyAsyncResult(self, *args, **kwargs): 'Executes the applyAsyncResult operation on the server.\n\n applyAsyncResult(async_operation=bool)bool\n ------------------------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest ap...
08b391b3b39a11e8ccb00610b994444b77256e160d796750f359277908fb9896
def ApplyITWizardConfiguration(self, *args, **kwargs): 'Executes the applyITWizardConfiguration operation on the server.\n\n Applies the specified Quick Test.\n\n applyITWizardConfiguration(async_operation=bool)\n ------------------------------------------------\n - async_operation (bool...
Executes the applyITWizardConfiguration operation on the server. Applies the specified Quick Test. applyITWizardConfiguration(async_operation=bool) ------------------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through ...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
ApplyITWizardConfiguration
OpenIxia/ixnetwork_restpy
20
python
def ApplyITWizardConfiguration(self, *args, **kwargs): 'Executes the applyITWizardConfiguration operation on the server.\n\n Applies the specified Quick Test.\n\n applyITWizardConfiguration(async_operation=bool)\n ------------------------------------------------\n - async_operation (bool...
def ApplyITWizardConfiguration(self, *args, **kwargs): 'Executes the applyITWizardConfiguration operation on the server.\n\n Applies the specified Quick Test.\n\n applyITWizardConfiguration(async_operation=bool)\n ------------------------------------------------\n - async_operation (bool...
c7329f8ce7e105f822b472dcdcda0fd3b590f9e85d7e65f4c315415b6610e756
def GenerateReport(self, *args, **kwargs): 'Executes the generateReport operation on the server.\n\n Generate a PDF report for the last succesfull test run.\n\n generateReport(async_operation=bool)string\n ------------------------------------------\n - async_operation (bool=False): True ...
Executes the generateReport operation on the server. Generate a PDF report for the last succesfull test run. generateReport(async_operation=bool)string ------------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through th...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
GenerateReport
OpenIxia/ixnetwork_restpy
20
python
def GenerateReport(self, *args, **kwargs): 'Executes the generateReport operation on the server.\n\n Generate a PDF report for the last succesfull test run.\n\n generateReport(async_operation=bool)string\n ------------------------------------------\n - async_operation (bool=False): True ...
def GenerateReport(self, *args, **kwargs): 'Executes the generateReport operation on the server.\n\n Generate a PDF report for the last succesfull test run.\n\n generateReport(async_operation=bool)string\n ------------------------------------------\n - async_operation (bool=False): True ...
4a2c9ce96b385b12068e0b14cbebba48c41651737ec0a93029825a1ab4c72af2
def Run(self, *args, **kwargs): 'Executes the run operation on the server.\n\n Starts the specified Quick Test and waits for its execution to finish.\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n run(async_operation=bool)list\n ...
Executes the run operation on the server. Starts the specified Quick Test and waits for its execution to finish. The IxNetwork model allows for multiple method Signatures with the same name while python does not. run(async_operation=bool)list ----------------------------- - async_operation (bool=False): True to exec...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Run
OpenIxia/ixnetwork_restpy
20
python
def Run(self, *args, **kwargs): 'Executes the run operation on the server.\n\n Starts the specified Quick Test and waits for its execution to finish.\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n run(async_operation=bool)list\n ...
def Run(self, *args, **kwargs): 'Executes the run operation on the server.\n\n Starts the specified Quick Test and waits for its execution to finish.\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n run(async_operation=bool)list\n ...
ab97b61420f144fd7b2d6c26e9085740c3545b3821351bb0ad63f5349522b8d9
def Start(self, *args, **kwargs): 'Executes the start operation on the server.\n\n Starts the specified Quick Test.\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n start(async_operation=bool)\n ---------------------------\n ...
Executes the start operation on the server. Starts the specified Quick Test. The IxNetwork model allows for multiple method Signatures with the same name while python does not. start(async_operation=bool) --------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any su...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Start
OpenIxia/ixnetwork_restpy
20
python
def Start(self, *args, **kwargs): 'Executes the start operation on the server.\n\n Starts the specified Quick Test.\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n start(async_operation=bool)\n ---------------------------\n ...
def Start(self, *args, **kwargs): 'Executes the start operation on the server.\n\n Starts the specified Quick Test.\n\n The IxNetwork model allows for multiple method Signatures with the same name while python does not.\n\n start(async_operation=bool)\n ---------------------------\n ...
deabc69c9ea4b41bc0345136dc5ea99eff666f20a33ea4b74a81738489675719
def Stop(self, *args, **kwargs): 'Executes the stop operation on the server.\n\n Stops the currently running Quick Test.\n\n stop(async_operation=bool)\n --------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api cal...
Executes the stop operation on the server. Stops the currently running Quick Test. stop(async_operation=bool) -------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is compl...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
Stop
OpenIxia/ixnetwork_restpy
20
python
def Stop(self, *args, **kwargs): 'Executes the stop operation on the server.\n\n Stops the currently running Quick Test.\n\n stop(async_operation=bool)\n --------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api cal...
def Stop(self, *args, **kwargs): 'Executes the stop operation on the server.\n\n Stops the currently running Quick Test.\n\n stop(async_operation=bool)\n --------------------------\n - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api cal...
54ab4517425c53be099a1400229f394d21fac09747c1c72764fef631feb7340f
def WaitForTest(self, *args, **kwargs): 'Executes the waitForTest operation on the server.\n\n Waits for the execution of the specified Quick Test to be completed.\n\n waitForTest(async_operation=bool)list\n -------------------------------------\n - async_operation (bool=False): True to ...
Executes the waitForTest operation on the server. Waits for the execution of the specified Quick Test to be completed. waitForTest(async_operation=bool)list ------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through th...
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_fcb75e51b768dc4f6f583b33d7ce0561.py
WaitForTest
OpenIxia/ixnetwork_restpy
20
python
def WaitForTest(self, *args, **kwargs): 'Executes the waitForTest operation on the server.\n\n Waits for the execution of the specified Quick Test to be completed.\n\n waitForTest(async_operation=bool)list\n -------------------------------------\n - async_operation (bool=False): True to ...
def WaitForTest(self, *args, **kwargs): 'Executes the waitForTest operation on the server.\n\n Waits for the execution of the specified Quick Test to be completed.\n\n waitForTest(async_operation=bool)list\n -------------------------------------\n - async_operation (bool=False): True to ...
91bdea0d791017435eea4249579d74b61b7c5f91c5a59784761c4731f2738ee1
def check_if_person(text): '\n Using spacy, check if the title of the Wikipedia passage is a person.\n ' doc = NLP(text) is_person = False ents = [ent for ent in doc.ents] for ent in ents: if (ent.label_ == 'PERSON'): is_person = True return is_person
Using spacy, check if the title of the Wikipedia passage is a person.
parlai/tasks/md_gender/wikipedia.py
check_if_person
justinbuzzni/ParlAI
9,228
python
def check_if_person(text): '\n \n ' doc = NLP(text) is_person = False ents = [ent for ent in doc.ents] for ent in ents: if (ent.label_ == 'PERSON'): is_person = True return is_person
def check_if_person(text): '\n \n ' doc = NLP(text) is_person = False ents = [ent for ent in doc.ents] for ent in ents: if (ent.label_ == 'PERSON'): is_person = True return is_person<|docstring|>Using spacy, check if the title of the Wikipedia passage is a person.<|endo...