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 |
|---|---|---|---|---|---|---|---|---|---|
952856247591d7a508f952c425a38d8bc34c07cc3e4604c9ac6799e63d4d4d5b | def to_ir(self):
'\n No need to implement for now.\n '
raise NotImplementedError() | No need to implement for now. | ecosystem_tools/mindconverter/mindconverter/graph_based_converter/third_party_graph/input_node.py | to_ir | mindspore-ai/mindinsight | 216 | python | def to_ir(self):
'\n \n '
raise NotImplementedError() | def to_ir(self):
'\n \n '
raise NotImplementedError()<|docstring|>No need to implement for now.<|endoftext|> |
9b0fb7d7ab2909c9c1c37f8048155a844d67bf4a662573f06190a3db48197680 | def fit(self, train_set, val_set=None):
'Fit the model to observations.\n\n Parameters\n ----------\n train_set: :obj:`cornac.data.Dataset`, required\n User-Item preference data as well as additional modalities.\n\n val_set: :obj:`cornac.data.Dataset`, optional, default: None\... | Fit the model to observations.
Parameters
----------
train_set: :obj:`cornac.data.Dataset`, required
User-Item preference data as well as additional modalities.
val_set: :obj:`cornac.data.Dataset`, optional, default: None
User-Item preference data for model selection purposes (e.g., early stopping).
Returns
... | cornac/models/bivaecf/recom_bivaecf.py | fit | xurong-liang/cornac | 597 | python | def fit(self, train_set, val_set=None):
'Fit the model to observations.\n\n Parameters\n ----------\n train_set: :obj:`cornac.data.Dataset`, required\n User-Item preference data as well as additional modalities.\n\n val_set: :obj:`cornac.data.Dataset`, optional, default: None\... | def fit(self, train_set, val_set=None):
'Fit the model to observations.\n\n Parameters\n ----------\n train_set: :obj:`cornac.data.Dataset`, required\n User-Item preference data as well as additional modalities.\n\n val_set: :obj:`cornac.data.Dataset`, optional, default: None\... |
c28f88cafc43feaff9b6e325f154430250b0493d668593e5bc5bc5ef71ae70b1 | def score(self, user_idx, item_idx=None):
'Predict the scores/ratings of a user for an item.\n\n Parameters\n ----------\n user_idx: int, required\n The index of the user for whom to perform score prediction.\n\n item_idx: int, optional, default: None\n The index of... | Predict the scores/ratings of a user for an item.
Parameters
----------
user_idx: int, required
The index of the user for whom to perform score prediction.
item_idx: int, optional, default: None
The index of the item for which to perform score prediction.
If None, scores for all known items will be return... | cornac/models/bivaecf/recom_bivaecf.py | score | xurong-liang/cornac | 597 | python | def score(self, user_idx, item_idx=None):
'Predict the scores/ratings of a user for an item.\n\n Parameters\n ----------\n user_idx: int, required\n The index of the user for whom to perform score prediction.\n\n item_idx: int, optional, default: None\n The index of... | def score(self, user_idx, item_idx=None):
'Predict the scores/ratings of a user for an item.\n\n Parameters\n ----------\n user_idx: int, required\n The index of the user for whom to perform score prediction.\n\n item_idx: int, optional, default: None\n The index of... |
d91c5d3a5c5ed19de8d56886df327e210b8cc58093c78de8c1a87d2d955f1c59 | def rain_outliers(rain_data: pd.DataFrame) -> pd.DataFrame:
'Generates an outlier index time series\n \n Finds the ratio between each value to the ninety-ninth percentile of non-zero values.\n\n Parameters\n ----------\n rain_data : pd.DataFrame\n A time series of rainfall amounts to be tested... | Generates an outlier index time series
Finds the ratio between each value to the ninety-ninth percentile of non-zero values.
Parameters
----------
rain_data : pd.DataFrame
A time series of rainfall amounts to be tested.
Returns
-------
rain_outliers : pd.DataFrame
A time series of outlier indices. | src/RainDataChecks.py | rain_outliers | RainfallNZ/RainCheckPy | 0 | python | def rain_outliers(rain_data: pd.DataFrame) -> pd.DataFrame:
'Generates an outlier index time series\n \n Finds the ratio between each value to the ninety-ninth percentile of non-zero values.\n\n Parameters\n ----------\n rain_data : pd.DataFrame\n A time series of rainfall amounts to be tested... | def rain_outliers(rain_data: pd.DataFrame) -> pd.DataFrame:
'Generates an outlier index time series\n \n Finds the ratio between each value to the ninety-ninth percentile of non-zero values.\n\n Parameters\n ----------\n rain_data : pd.DataFrame\n A time series of rainfall amounts to be tested... |
2fb0cd71838bf76431f1c1647190180cb33f19d0e65f23a5ae46b81bd2e28be3 | def impossibles(rain_data, minimum_precision=float('nan')):
'rainfall quality check for impossible values'
NotANumber = (~ np.array([isinstance(item, numbers.Number) for item in rain_data.values[(:, 0)]]))
Sub_zeros = (rain_data.apply(pd.to_numeric, errors='coerce') < 0)
if ((not math.isnan(minimum_prec... | rainfall quality check for impossible values | src/RainDataChecks.py | impossibles | RainfallNZ/RainCheckPy | 0 | python | def impossibles(rain_data, minimum_precision=float('nan')):
NotANumber = (~ np.array([isinstance(item, numbers.Number) for item in rain_data.values[(:, 0)]]))
Sub_zeros = (rain_data.apply(pd.to_numeric, errors='coerce') < 0)
if ((not math.isnan(minimum_precision)) and (minimum_precision > 0)):
... | def impossibles(rain_data, minimum_precision=float('nan')):
NotANumber = (~ np.array([isinstance(item, numbers.Number) for item in rain_data.values[(:, 0)]]))
Sub_zeros = (rain_data.apply(pd.to_numeric, errors='coerce') < 0)
if ((not math.isnan(minimum_precision)) and (minimum_precision > 0)):
... |
757a0cd6807c5a33a438c464c87abc51cb1511709529dec283aa9efcf4b5e69b | def DateTimeIssues(rain_data):
'rainfall quality check for duplicate date times'
DateTimeDuplicated = rain_data.index.duplicated(keep=False)
Output = pd.DataFrame(DateTimeDuplicated, columns=['DuplicateDateTimes'], index=rain_data.index)
return Output | rainfall quality check for duplicate date times | src/RainDataChecks.py | DateTimeIssues | RainfallNZ/RainCheckPy | 0 | python | def DateTimeIssues(rain_data):
DateTimeDuplicated = rain_data.index.duplicated(keep=False)
Output = pd.DataFrame(DateTimeDuplicated, columns=['DuplicateDateTimes'], index=rain_data.index)
return Output | def DateTimeIssues(rain_data):
DateTimeDuplicated = rain_data.index.duplicated(keep=False)
Output = pd.DataFrame(DateTimeDuplicated, columns=['DuplicateDateTimes'], index=rain_data.index)
return Output<|docstring|>rainfall quality check for duplicate date times<|endoftext|> |
82870295ce4668bfa927812346adce51dbc6d6c61b280cd1217c80a312bf5bda | def HighFrequencyTipping(rain_data):
'rainfall quality check for unlikely rapid tipping'
'from Blekinsop et al. (2017) lambda sub k statistic'
'This is only appropriate for raw tip-based data'
InterTipTimes = rain_data.index.to_series().diff().astype('timedelta64[s]')
HighFrequencyTips = np.zeros(le... | rainfall quality check for unlikely rapid tipping | src/RainDataChecks.py | HighFrequencyTipping | RainfallNZ/RainCheckPy | 0 | python | def HighFrequencyTipping(rain_data):
'from Blekinsop et al. (2017) lambda sub k statistic'
'This is only appropriate for raw tip-based data'
InterTipTimes = rain_data.index.to_series().diff().astype('timedelta64[s]')
HighFrequencyTips = np.zeros(len(InterTipTimes), dtype=bool)
LambdaSubK = np.l... | def HighFrequencyTipping(rain_data):
'from Blekinsop et al. (2017) lambda sub k statistic'
'This is only appropriate for raw tip-based data'
InterTipTimes = rain_data.index.to_series().diff().astype('timedelta64[s]')
HighFrequencyTips = np.zeros(len(InterTipTimes), dtype=bool)
LambdaSubK = np.l... |
8b2f0bf7c08dc56a38d9d8cb7dd33058d824ef279f9a69c61d08f679e8af6926 | def DrySpells(rain_data):
'rainfall quality check for dry spells'
'identify the length (in days) of a dry spell that a no-rain observation is within'
'Alternative method using runlength encoding'
DryObservations = pd.DataFrame((rain_data.values == 0), columns=['Dry'], index=rain_data.index)
RLE = [(... | rainfall quality check for dry spells | src/RainDataChecks.py | DrySpells | RainfallNZ/RainCheckPy | 0 | python | def DrySpells(rain_data):
'identify the length (in days) of a dry spell that a no-rain observation is within'
'Alternative method using runlength encoding'
DryObservations = pd.DataFrame((rain_data.values == 0), columns=['Dry'], index=rain_data.index)
RLE = [(k, sum((1 for i in g))) for (k, g) in i... | def DrySpells(rain_data):
'identify the length (in days) of a dry spell that a no-rain observation is within'
'Alternative method using runlength encoding'
DryObservations = pd.DataFrame((rain_data.values == 0), columns=['Dry'], index=rain_data.index)
RLE = [(k, sum((1 for i in g))) for (k, g) in i... |
5789f5e6bf219e7104de6f093c524158789b42233706c21359b56fd57aa1a944 | def RepeatedValues(rain_data):
'rainfall quality check for unlikely repeating values'
'identify the length (in consecutive time units) that a value is repeated'
'this check should not be applied to tip data'
WetObservations = pd.DataFrame(((rain_data.values > 0) * rain_data.values), columns=['Wet'], ind... | rainfall quality check for unlikely repeating values | src/RainDataChecks.py | RepeatedValues | RainfallNZ/RainCheckPy | 0 | python | def RepeatedValues(rain_data):
'identify the length (in consecutive time units) that a value is repeated'
'this check should not be applied to tip data'
WetObservations = pd.DataFrame(((rain_data.values > 0) * rain_data.values), columns=['Wet'], index=rain_data.index)
RLE = [(k, sum((1 for i in g))... | def RepeatedValues(rain_data):
'identify the length (in consecutive time units) that a value is repeated'
'this check should not be applied to tip data'
WetObservations = pd.DataFrame(((rain_data.values > 0) * rain_data.values), columns=['Wet'], index=rain_data.index)
RLE = [(k, sum((1 for i in g))... |
0b8eba1713d2d1bcdc25650c47f54c01f12949bfd6b17ee9940ccdaf0fa76bfe | def Homogeneity(rain_data):
'Applies the Pettitt non-parameteric test to annual series to determine if there are major inhomogeneities in the data\n If there is, the test is repeated on the most recent side of the inhomogeneity to test if there is another.\n The most recent section that is homogeneous i... | Applies the Pettitt non-parameteric test to annual series to determine if there are major inhomogeneities in the data
If there is, the test is repeated on the most recent side of the inhomogeneity to test if there is another.
The most recent section that is homogeneous is retained and the remainder flagged.
This uses t... | src/RainDataChecks.py | Homogeneity | RainfallNZ/RainCheckPy | 0 | python | def Homogeneity(rain_data):
'Applies the Pettitt non-parameteric test to annual series to determine if there are major inhomogeneities in the data\n If there is, the test is repeated on the most recent side of the inhomogeneity to test if there is another.\n The most recent section that is homogeneous i... | def Homogeneity(rain_data):
'Applies the Pettitt non-parameteric test to annual series to determine if there are major inhomogeneities in the data\n If there is, the test is repeated on the most recent side of the inhomogeneity to test if there is another.\n The most recent section that is homogeneous i... |
38cb4269d7a7175d24d9bac3c3bdb030d3fdcafb2370af533e67ad714449f327 | def SubFreezingRain(rain_data, temperature_data):
'"rainfall quality check for observations during freezing temperatures\n identify the observations when the maximum temperature was less than zero degrees C\n '
RainAndTemperature = pd.merge(left=rain_data, right=temperature_data, left_index=True, right_in... | "rainfall quality check for observations during freezing temperatures
identify the observations when the maximum temperature was less than zero degrees C | src/RainDataChecks.py | SubFreezingRain | RainfallNZ/RainCheckPy | 0 | python | def SubFreezingRain(rain_data, temperature_data):
'"rainfall quality check for observations during freezing temperatures\n identify the observations when the maximum temperature was less than zero degrees C\n '
RainAndTemperature = pd.merge(left=rain_data, right=temperature_data, left_index=True, right_in... | def SubFreezingRain(rain_data, temperature_data):
'"rainfall quality check for observations during freezing temperatures\n identify the observations when the maximum temperature was less than zero degrees C\n '
RainAndTemperature = pd.merge(left=rain_data, right=temperature_data, left_index=True, right_in... |
57b205985341d6e34c0dbd648078cef433b66ceaf071d77c69b4c1744e5ba94d | def RelatedFlowEvents(rain_data, Daily_streamflow_data):
'"rainfall quality check for observations compared to flow events\n for each time step allocate the relative magnitude of a peak flow event ocurring on the same day or the day after\n but only if rain events are associated with flow events\n used wit... | "rainfall quality check for observations compared to flow events
for each time step allocate the relative magnitude of a peak flow event ocurring on the same day or the day after
but only if rain events are associated with flow events
used with daily streamflow and hourly rainfall, possibly daily rainfall, but it hasn'... | src/RainDataChecks.py | RelatedFlowEvents | RainfallNZ/RainCheckPy | 0 | python | def RelatedFlowEvents(rain_data, Daily_streamflow_data):
'"rainfall quality check for observations compared to flow events\n for each time step allocate the relative magnitude of a peak flow event ocurring on the same day or the day after\n but only if rain events are associated with flow events\n used wit... | def RelatedFlowEvents(rain_data, Daily_streamflow_data):
'"rainfall quality check for observations compared to flow events\n for each time step allocate the relative magnitude of a peak flow event ocurring on the same day or the day after\n but only if rain events are associated with flow events\n used wit... |
d7ac035360831bf7c76989cddbe0167636082535b82f4606631a6b38f428d50f | def affinity(TestData, ReferenceData):
'Compare the data between two sites to see how similar they are'
'this uses an "affinity" index from Lewis et al. 2018, supplementary material'
result = TestData.join(ReferenceData, how='inner', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference'... | Compare the data between two sites to see how similar they are | src/RainDataChecks.py | affinity | RainfallNZ/RainCheckPy | 0 | python | def affinity(TestData, ReferenceData):
'this uses an "affinity" index from Lewis et al. 2018, supplementary material'
result = TestData.join(ReferenceData, how='inner', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
TestWetDry = (result.Test > 0)
ReferenceWetDry = (resu... | def affinity(TestData, ReferenceData):
'this uses an "affinity" index from Lewis et al. 2018, supplementary material'
result = TestData.join(ReferenceData, how='inner', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
TestWetDry = (result.Test > 0)
ReferenceWetDry = (resu... |
8459a18ad57f6196cda336a9e17a7fdbdc224566b4329e44f8e295f40300f136 | def spearman(TestData, ReferenceData):
'calculate the Spearman rank correlation coefficient between sites'
result = TestData.join(ReferenceData, how='inner', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
CorrelationMatrix = result.corr(method='spearman')
Spearman = Correlat... | calculate the Spearman rank correlation coefficient between sites | src/RainDataChecks.py | spearman | RainfallNZ/RainCheckPy | 0 | python | def spearman(TestData, ReferenceData):
result = TestData.join(ReferenceData, how='inner', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
CorrelationMatrix = result.corr(method='spearman')
Spearman = CorrelationMatrix.Test['Reference']
return Spearman | def spearman(TestData, ReferenceData):
result = TestData.join(ReferenceData, how='inner', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
CorrelationMatrix = result.corr(method='spearman')
Spearman = CorrelationMatrix.Test['Reference']
return Spearman<|docstring|>calcula... |
25c588cd8ebd6db589d16d9b9727abdc5ff2b82ef274b7f0345a76d8fbbb52b8 | def neighborhoodDivergence(TestData: pd.DataFrame, ReferenceData: pd.DataFrame) -> pd.DataFrame:
"Compares rainfall amounts to a another site\n \n Finds the ratio between the daily rainfall difference and the ninety-fifth percentile of\n the distribution of daily differences. This is analogous to the rain_... | Compares rainfall amounts to a another site
Finds the ratio between the daily rainfall difference and the ninety-fifth percentile of
the distribution of daily differences. This is analogous to the rain_outliers test
but is based on comparison to an alternative site.
This generates two values, the high divergence and t... | src/RainDataChecks.py | neighborhoodDivergence | RainfallNZ/RainCheckPy | 0 | python | def neighborhoodDivergence(TestData: pd.DataFrame, ReferenceData: pd.DataFrame) -> pd.DataFrame:
"Compares rainfall amounts to a another site\n \n Finds the ratio between the daily rainfall difference and the ninety-fifth percentile of\n the distribution of daily differences. This is analogous to the rain_... | def neighborhoodDivergence(TestData: pd.DataFrame, ReferenceData: pd.DataFrame) -> pd.DataFrame:
"Compares rainfall amounts to a another site\n \n Finds the ratio between the daily rainfall difference and the ninety-fifth percentile of\n the distribution of daily differences. This is analogous to the rain_... |
c3a218e276564c078681a5cc3b18d3203a1768b1b87de30e9d7448dce5688522 | def DrySpellDivergence(TestData, ReferenceData):
'find the ratio between the 15-day dry spell proportion difference and the ninety-fifth percentile of'
'the distribution of the 15-day dry-spell proportion differences'
result = TestData.join(ReferenceData, how='outer', lsuffix='_Test', rsuffix='_ref')
re... | find the ratio between the 15-day dry spell proportion difference and the ninety-fifth percentile of | src/RainDataChecks.py | DrySpellDivergence | RainfallNZ/RainCheckPy | 0 | python | def DrySpellDivergence(TestData, ReferenceData):
'the distribution of the 15-day dry-spell proportion differences'
result = TestData.join(ReferenceData, how='outer', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
first_idx = max(TestData.first_valid_index(), ReferenceData.f... | def DrySpellDivergence(TestData, ReferenceData):
'the distribution of the 15-day dry-spell proportion differences'
result = TestData.join(ReferenceData, how='outer', lsuffix='_Test', rsuffix='_ref')
result.columns = ['Test', 'Reference']
first_idx = max(TestData.first_valid_index(), ReferenceData.f... |
f06e8688ac728d9efabb3de664c3d160565395d7c5f9116687342fb80d8fcaf0 | def TimeStepAllignment(TestData, ReferenceData):
'This resamples the ReferenceData to match the observation times of the TestData'
'this helps for comparison to irregularly sampled data (e.g. storage gauges'
'or for manually recorded daily gauges that are read at non- 0:00 hours, e.g. at 8 or 9 am'
resu... | This resamples the ReferenceData to match the observation times of the TestData | src/RainDataChecks.py | TimeStepAllignment | RainfallNZ/RainCheckPy | 0 | python | def TimeStepAllignment(TestData, ReferenceData):
'this helps for comparison to irregularly sampled data (e.g. storage gauges'
'or for manually recorded daily gauges that are read at non- 0:00 hours, e.g. at 8 or 9 am'
result = TestData.join(ReferenceData, how='outer', lsuffix='_Test', rsuffix='_ref')
... | def TimeStepAllignment(TestData, ReferenceData):
'this helps for comparison to irregularly sampled data (e.g. storage gauges'
'or for manually recorded daily gauges that are read at non- 0:00 hours, e.g. at 8 or 9 am'
result = TestData.join(ReferenceData, how='outer', lsuffix='_Test', rsuffix='_ref')
... |
b83d38adceb84da81e6e3df565e4cf2485c62a5906007c048a970ba78a05252a | def main(unused_argv):
'Main entry point for SDK Fn Harness.'
if ('LOGGING_API_SERVICE_DESCRIPTOR' in os.environ):
try:
logging_service_descriptor = endpoints_pb2.ApiServiceDescriptor()
text_format.Merge(os.environ['LOGGING_API_SERVICE_DESCRIPTOR'], logging_service_descriptor)
... | Main entry point for SDK Fn Harness. | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | main | RyanSkraba/beam | 2 | python | def main(unused_argv):
if ('LOGGING_API_SERVICE_DESCRIPTOR' in os.environ):
try:
logging_service_descriptor = endpoints_pb2.ApiServiceDescriptor()
text_format.Merge(os.environ['LOGGING_API_SERVICE_DESCRIPTOR'], logging_service_descriptor)
fn_log_handler = FnApiLogRec... | def main(unused_argv):
if ('LOGGING_API_SERVICE_DESCRIPTOR' in os.environ):
try:
logging_service_descriptor = endpoints_pb2.ApiServiceDescriptor()
text_format.Merge(os.environ['LOGGING_API_SERVICE_DESCRIPTOR'], logging_service_descriptor)
fn_log_handler = FnApiLogRec... |
8ad5ba6d20c7ea9daa9c979b39aaa240fe3b6464cb08210fc001a9550f24282e | def _get_state_cache_size(pipeline_options):
'Defines the upper number of state items to cache.\n\n Note: state_cache_size is an experimental flag and might not be available in\n future releases.\n\n Returns:\n an int indicating the maximum number of items to cache.\n Default is 0 (disabled)\n '
exp... | Defines the upper number of state items to cache.
Note: state_cache_size is an experimental flag and might not be available in
future releases.
Returns:
an int indicating the maximum number of items to cache.
Default is 0 (disabled) | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | _get_state_cache_size | RyanSkraba/beam | 2 | python | def _get_state_cache_size(pipeline_options):
'Defines the upper number of state items to cache.\n\n Note: state_cache_size is an experimental flag and might not be available in\n future releases.\n\n Returns:\n an int indicating the maximum number of items to cache.\n Default is 0 (disabled)\n '
exp... | def _get_state_cache_size(pipeline_options):
'Defines the upper number of state items to cache.\n\n Note: state_cache_size is an experimental flag and might not be available in\n future releases.\n\n Returns:\n an int indicating the maximum number of items to cache.\n Default is 0 (disabled)\n '
exp... |
cdf0d0f12f21119ab943418855a04ddae4a63c620f438934bbfe17a54ced0863 | def _load_main_session(semi_persistent_directory):
'Loads a pickled main session from the path specified.'
if semi_persistent_directory:
session_file = os.path.join(semi_persistent_directory, 'staged', names.PICKLED_MAIN_SESSION_FILE)
if os.path.isfile(session_file):
pickler.load_ses... | Loads a pickled main session from the path specified. | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | _load_main_session | RyanSkraba/beam | 2 | python | def _load_main_session(semi_persistent_directory):
if semi_persistent_directory:
session_file = os.path.join(semi_persistent_directory, 'staged', names.PICKLED_MAIN_SESSION_FILE)
if os.path.isfile(session_file):
pickler.load_session(session_file)
else:
_LOGGER.wa... | def _load_main_session(semi_persistent_directory):
if semi_persistent_directory:
session_file = os.path.join(semi_persistent_directory, 'staged', names.PICKLED_MAIN_SESSION_FILE)
if os.path.isfile(session_file):
pickler.load_session(session_file)
else:
_LOGGER.wa... |
b2de4aa4ead16a315367867a5662c055383c2e2dec01ba0da999b8efd3956282 | def start(self, status_http_port=0):
'Executes the serving loop for the status server.\n\n Args:\n status_http_port(int): Binding port for the debug server.\n Default is 0 which means any free unsecured port\n '
class StatusHttpHandler(http.server.BaseHTTPRequestHandler):
'HTTP handle... | Executes the serving loop for the status server.
Args:
status_http_port(int): Binding port for the debug server.
Default is 0 which means any free unsecured port | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | start | RyanSkraba/beam | 2 | python | def start(self, status_http_port=0):
'Executes the serving loop for the status server.\n\n Args:\n status_http_port(int): Binding port for the debug server.\n Default is 0 which means any free unsecured port\n '
class StatusHttpHandler(http.server.BaseHTTPRequestHandler):
'HTTP handle... | def start(self, status_http_port=0):
'Executes the serving loop for the status server.\n\n Args:\n status_http_port(int): Binding port for the debug server.\n Default is 0 which means any free unsecured port\n '
class StatusHttpHandler(http.server.BaseHTTPRequestHandler):
'HTTP handle... |
9cc5f72b47c0cc9ff8b5caff2d428ec47ed9f5ede9015d19c794e7b1fde4d431 | def do_GET(self):
'Return all thread stacktraces information for GET request.'
self.send_response(200)
self.send_header('Content-Type', 'text/plain')
self.end_headers()
for line in StatusServer.get_thread_dump():
self.wfile.write(line.encode('utf-8')) | Return all thread stacktraces information for GET request. | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | do_GET | RyanSkraba/beam | 2 | python | def do_GET(self):
self.send_response(200)
self.send_header('Content-Type', 'text/plain')
self.end_headers()
for line in StatusServer.get_thread_dump():
self.wfile.write(line.encode('utf-8')) | def do_GET(self):
self.send_response(200)
self.send_header('Content-Type', 'text/plain')
self.end_headers()
for line in StatusServer.get_thread_dump():
self.wfile.write(line.encode('utf-8'))<|docstring|>Return all thread stacktraces information for GET request.<|endoftext|> |
d14f194a3d945540bc2602aa3145eb562288d83a7e22e95038580d56ed6e14e2 | def log_message(self, f, *args):
'Do not log any messages.'
pass | Do not log any messages. | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | log_message | RyanSkraba/beam | 2 | python | def log_message(self, f, *args):
pass | def log_message(self, f, *args):
pass<|docstring|>Do not log any messages.<|endoftext|> |
c61a3533ac3b5d6a5f7974f5957dc4a48e4a455a5c2ca4c3b68ec8a33ecb9dee | def __init__(self, num_clf=100, max_gene=NUM_GENE, dir_path=DIR_PATH):
'\n Parameters\n ----------\n num_clf: int\n number of classifiers in ensemble\n max_gene: int\n Maximum number of genes considerd\n dir_path: str\n Directory where files are saved and read\n '
self.num... | Parameters
----------
num_clf: int
number of classifiers in ensemble
max_gene: int
Maximum number of genes considerd
dir_path: str
Directory where files are saved and read | xstate/python/tools/cross_validation_data.py | __init__ | uwescience/new_xstate | 0 | python | def __init__(self, num_clf=100, max_gene=NUM_GENE, dir_path=DIR_PATH):
'\n Parameters\n ----------\n num_clf: int\n number of classifiers in ensemble\n max_gene: int\n Maximum number of genes considerd\n dir_path: str\n Directory where files are saved and read\n '
self.num... | def __init__(self, num_clf=100, max_gene=NUM_GENE, dir_path=DIR_PATH):
'\n Parameters\n ----------\n num_clf: int\n number of classifiers in ensemble\n max_gene: int\n Maximum number of genes considerd\n dir_path: str\n Directory where files are saved and read\n '
self.num... |
5c34327f271bc8afb8f2d805c301594b4650b9ea20759c48384561dee8e08965 | @property
def dataframe(self):
'\n Constructs the dataframe of cross validation data\n\n Parameters\n ----------\n base_name: str\n\n Returns\n -------\n pd.DataFrame\n '
if (self._dataframe is None):
files = self._getPaths()
dfs = []
for ffile in files:
... | Constructs the dataframe of cross validation data
Parameters
----------
base_name: str
Returns
-------
pd.DataFrame | xstate/python/tools/cross_validation_data.py | dataframe | uwescience/new_xstate | 0 | python | @property
def dataframe(self):
'\n Constructs the dataframe of cross validation data\n\n Parameters\n ----------\n base_name: str\n\n Returns\n -------\n pd.DataFrame\n '
if (self._dataframe is None):
files = self._getPaths()
dfs = []
for ffile in files:
... | @property
def dataframe(self):
'\n Constructs the dataframe of cross validation data\n\n Parameters\n ----------\n base_name: str\n\n Returns\n -------\n pd.DataFrame\n '
if (self._dataframe is None):
files = self._getPaths()
dfs = []
for ffile in files:
... |
b060cc3ec700c036efb2b6e7124cf6763a4c07c43193c9f9b3db510224f234f8 | def make(self, indices=None, num_iter=10):
'\n Creates the data needed for accuracy plots based on cross validations.\n\n Parameters\n ----------\n indices: list-int\n Indicies of keys to process\n num_iter: int\n Number of iterations of cross validation\n\n Returns\n -------\n ... | Creates the data needed for accuracy plots based on cross validations.
Parameters
----------
indices: list-int
Indicies of keys to process
num_iter: int
Number of iterations of cross validation
Returns
-------
pd.DataFrame
index: int
maximum importance rank of the gene used to construct the classi... | xstate/python/tools/cross_validation_data.py | make | uwescience/new_xstate | 0 | python | def make(self, indices=None, num_iter=10):
'\n Creates the data needed for accuracy plots based on cross validations.\n\n Parameters\n ----------\n indices: list-int\n Indicies of keys to process\n num_iter: int\n Number of iterations of cross validation\n\n Returns\n -------\n ... | def make(self, indices=None, num_iter=10):
'\n Creates the data needed for accuracy plots based on cross validations.\n\n Parameters\n ----------\n indices: list-int\n Indicies of keys to process\n num_iter: int\n Number of iterations of cross validation\n\n Returns\n -------\n ... |
fdc2546cefbfb9f41d2089d5b761566bcefffb923c787d4da50c9453252de68e | def _makePath(self, indices):
'\n Constructs the path for the indices.\n\n Parameters\n ----------\n indices: list-int\n\n Returns\n -------\n Path\n '
sfx = '_'.join([str(v) for v in indices])
filename = ('%s_%s.%s' % (CV_CALCULATION_FILENAME, sfx, CSV))
return Path(os.path.join... | Constructs the path for the indices.
Parameters
----------
indices: list-int
Returns
-------
Path | xstate/python/tools/cross_validation_data.py | _makePath | uwescience/new_xstate | 0 | python | def _makePath(self, indices):
'\n Constructs the path for the indices.\n\n Parameters\n ----------\n indices: list-int\n\n Returns\n -------\n Path\n '
sfx = '_'.join([str(v) for v in indices])
filename = ('%s_%s.%s' % (CV_CALCULATION_FILENAME, sfx, CSV))
return Path(os.path.join... | def _makePath(self, indices):
'\n Constructs the path for the indices.\n\n Parameters\n ----------\n indices: list-int\n\n Returns\n -------\n Path\n '
sfx = '_'.join([str(v) for v in indices])
filename = ('%s_%s.%s' % (CV_CALCULATION_FILENAME, sfx, CSV))
return Path(os.path.join... |
c4627305212b25d7c07ed3bfb18b7e9d7e791e3b0482106dfad3a1a407fdbfb3 | def _getPaths(self):
'\n Gets the cross validation files in the directory.\n\n Returns\n -------\n list-Path\n '
def check(ffile):
ffile = str(ffile)
return ((CV_CALCULATION_FILENAME in ffile) & (CSV in ffile))
paths = os.listdir(self.dir_path)
paths = [os.path.join(self.... | Gets the cross validation files in the directory.
Returns
-------
list-Path | xstate/python/tools/cross_validation_data.py | _getPaths | uwescience/new_xstate | 0 | python | def _getPaths(self):
'\n Gets the cross validation files in the directory.\n\n Returns\n -------\n list-Path\n '
def check(ffile):
ffile = str(ffile)
return ((CV_CALCULATION_FILENAME in ffile) & (CSV in ffile))
paths = os.listdir(self.dir_path)
paths = [os.path.join(self.... | def _getPaths(self):
'\n Gets the cross validation files in the directory.\n\n Returns\n -------\n list-Path\n '
def check(ffile):
ffile = str(ffile)
return ((CV_CALCULATION_FILENAME in ffile) & (CSV in ffile))
paths = os.listdir(self.dir_path)
paths = [os.path.join(self.... |
33c0004be926a2dc368570ad65c1d43762b2e9d43d716ba86387dddae9d9b6af | def clean(self):
'\n Removes all existing cross validation files.\n '
ffiles = self._getPaths()
for ffile in ffiles:
os.remove(ffile) | Removes all existing cross validation files. | xstate/python/tools/cross_validation_data.py | clean | uwescience/new_xstate | 0 | python | def clean(self):
'\n \n '
ffiles = self._getPaths()
for ffile in ffiles:
os.remove(ffile) | def clean(self):
'\n \n '
ffiles = self._getPaths()
for ffile in ffiles:
os.remove(ffile)<|docstring|>Removes all existing cross validation files.<|endoftext|> |
0ae9fe5279f90bf48959feeed18888bd1e4948ab6eeac658b7537d26c561ff26 | def __init__(self, data, *axes, uncertainty=None, labels=None, units=None):
' Creates a MeshData instance.\n\n Parameters\n ----------\n data : ndarray\n A at least two-dimensional array containing the data.\n *axes : ndarray\n Arrays specifying the coordinates of t... | Creates a MeshData instance.
Parameters
----------
data : ndarray
A at least two-dimensional array containing the data.
*axes : ndarray
Arrays specifying the coordinates of the data axes. Must be given
in indexing order.
uncertainty : ndarray
An ndarray of the same size as `data` that contains some mea... | pypret/mesh_data.py | __init__ | QF06/pypret | 36 | python | def __init__(self, data, *axes, uncertainty=None, labels=None, units=None):
' Creates a MeshData instance.\n\n Parameters\n ----------\n data : ndarray\n A at least two-dimensional array containing the data.\n *axes : ndarray\n Arrays specifying the coordinates of t... | def __init__(self, data, *axes, uncertainty=None, labels=None, units=None):
' Creates a MeshData instance.\n\n Parameters\n ----------\n data : ndarray\n A at least two-dimensional array containing the data.\n *axes : ndarray\n Arrays specifying the coordinates of t... |
07e0a574b0258915365f80e28087367f113d88dba243077988989e66d93d181c | @property
def shape(self):
' Returns the shape of the data as a tuple.\n '
return self.data.shape | Returns the shape of the data as a tuple. | pypret/mesh_data.py | shape | QF06/pypret | 36 | python | @property
def shape(self):
' \n '
return self.data.shape | @property
def shape(self):
' \n '
return self.data.shape<|docstring|>Returns the shape of the data as a tuple.<|endoftext|> |
f2024bfb58433861c93693c39a5aae93ef2e1a0af8c120a08060eab425856794 | @property
def ndim(self):
' Returns the dimension of the data as integer.\n '
return self.data.ndim | Returns the dimension of the data as integer. | pypret/mesh_data.py | ndim | QF06/pypret | 36 | python | @property
def ndim(self):
' \n '
return self.data.ndim | @property
def ndim(self):
' \n '
return self.data.ndim<|docstring|>Returns the dimension of the data as integer.<|endoftext|> |
32fc8e3be227329f6f12668864e82cc9be380516326f67e2df91bedd49b8491a | def copy(self):
' Creates a copy of the MeshData instance. '
return MeshData(self.data, *self.axes, uncertainty=self.uncertainty, labels=self.labels, units=self.units) | Creates a copy of the MeshData instance. | pypret/mesh_data.py | copy | QF06/pypret | 36 | python | def copy(self):
' '
return MeshData(self.data, *self.axes, uncertainty=self.uncertainty, labels=self.labels, units=self.units) | def copy(self):
' '
return MeshData(self.data, *self.axes, uncertainty=self.uncertainty, labels=self.labels, units=self.units)<|docstring|>Creates a copy of the MeshData instance.<|endoftext|> |
ca869e28cc0f9c13d074420c540992033cdadbe403386805ac3acc4c995129db | def marginals(self, normalize=False, axes=None):
' Calculates the marginals of the data.\n\n axes specifies the axes of the marginals, e.g., the axes on which the\n sum is projected.\n '
return lib.marginals(self.data, normalize=normalize, axes=axes) | Calculates the marginals of the data.
axes specifies the axes of the marginals, e.g., the axes on which the
sum is projected. | pypret/mesh_data.py | marginals | QF06/pypret | 36 | python | def marginals(self, normalize=False, axes=None):
' Calculates the marginals of the data.\n\n axes specifies the axes of the marginals, e.g., the axes on which the\n sum is projected.\n '
return lib.marginals(self.data, normalize=normalize, axes=axes) | def marginals(self, normalize=False, axes=None):
' Calculates the marginals of the data.\n\n axes specifies the axes of the marginals, e.g., the axes on which the\n sum is projected.\n '
return lib.marginals(self.data, normalize=normalize, axes=axes)<|docstring|>Calculates the marginals of ... |
aac99504d9374af8c5c829b51a18b16e7a5b5b882af7493e192f64deaf49331a | def normalize(self):
' Normalizes the maximum of the data to 1.\n '
self.scale((1.0 / self.data.max())) | Normalizes the maximum of the data to 1. | pypret/mesh_data.py | normalize | QF06/pypret | 36 | python | def normalize(self):
' \n '
self.scale((1.0 / self.data.max())) | def normalize(self):
' \n '
self.scale((1.0 / self.data.max()))<|docstring|>Normalizes the maximum of the data to 1.<|endoftext|> |
b642a4ec6fa5db6ab97c10542f0013a6a2fee50fb91f7160fde0e161a021a559 | def autolimit(self, *axes, threshold=0.01, padding=0.25):
' Limits the data based on the marginals.\n '
if (len(axes) == 0):
axes = list(range(self.ndim))
marginals = lib.marginals(self.data)
limits = []
for (i, j) in enumerate(axes):
limit = lib.limit(self.axes[j], marginals[... | Limits the data based on the marginals. | pypret/mesh_data.py | autolimit | QF06/pypret | 36 | python | def autolimit(self, *axes, threshold=0.01, padding=0.25):
' \n '
if (len(axes) == 0):
axes = list(range(self.ndim))
marginals = lib.marginals(self.data)
limits = []
for (i, j) in enumerate(axes):
limit = lib.limit(self.axes[j], marginals[j], threshold=threshold, padding=paddin... | def autolimit(self, *axes, threshold=0.01, padding=0.25):
' \n '
if (len(axes) == 0):
axes = list(range(self.ndim))
marginals = lib.marginals(self.data)
limits = []
for (i, j) in enumerate(axes):
limit = lib.limit(self.axes[j], marginals[j], threshold=threshold, padding=paddin... |
14f49b5385f4fae1c04b4ccdf5663562f57d3216bbec8f7f5fed5f2733132b19 | def limit(self, *limits, axes=None):
' Limits the data range of this instance.\n\n Parameters\n ----------\n *limits : tuples\n The data limits in the axes as tuples. Has to match the dimension\n of the data or the number of axes specified in the `axes`\n parame... | Limits the data range of this instance.
Parameters
----------
*limits : tuples
The data limits in the axes as tuples. Has to match the dimension
of the data or the number of axes specified in the `axes`
parameter.
axes : tuple or None
The axes in which the limit is applied. Default is `None` in which
... | pypret/mesh_data.py | limit | QF06/pypret | 36 | python | def limit(self, *limits, axes=None):
' Limits the data range of this instance.\n\n Parameters\n ----------\n *limits : tuples\n The data limits in the axes as tuples. Has to match the dimension\n of the data or the number of axes specified in the `axes`\n parame... | def limit(self, *limits, axes=None):
' Limits the data range of this instance.\n\n Parameters\n ----------\n *limits : tuples\n The data limits in the axes as tuples. Has to match the dimension\n of the data or the number of axes specified in the `axes`\n parame... |
407bbd981469c21d8272eae4fe7b6d81401170ac80a18930326c83cd87f1100a | def interpolate(self, axis1=None, axis2=None, degree=2, sorted=False):
' Interpolates the data on a new two-dimensional, equidistantly\n spaced grid.\n '
axes = [axis1, axis2]
for i in range(self.ndim):
if (axes[i] is None):
axes[i] = self.axes[i]
orig_axes = self.axes
... | Interpolates the data on a new two-dimensional, equidistantly
spaced grid. | pypret/mesh_data.py | interpolate | QF06/pypret | 36 | python | def interpolate(self, axis1=None, axis2=None, degree=2, sorted=False):
' Interpolates the data on a new two-dimensional, equidistantly\n spaced grid.\n '
axes = [axis1, axis2]
for i in range(self.ndim):
if (axes[i] is None):
axes[i] = self.axes[i]
orig_axes = self.axes
... | def interpolate(self, axis1=None, axis2=None, degree=2, sorted=False):
' Interpolates the data on a new two-dimensional, equidistantly\n spaced grid.\n '
axes = [axis1, axis2]
for i in range(self.ndim):
if (axes[i] is None):
axes[i] = self.axes[i]
orig_axes = self.axes
... |
b373add2efa1810024b8fd6f137b1f449e900cf2cb4b49185ad7a589dfc20cf5 | def flip(self, *axes):
' Flips the data on the specified axes.\n '
if (len(axes) == 0):
return
axes = lib.as_list(axes)
slices = [slice(None) for ax in self.axes]
for ax in axes:
self.axes[ax] = self.axes[ax][::(- 1)]
slices[ax] = slice(None, None, (- 1))
self.data... | Flips the data on the specified axes. | pypret/mesh_data.py | flip | QF06/pypret | 36 | python | def flip(self, *axes):
' \n '
if (len(axes) == 0):
return
axes = lib.as_list(axes)
slices = [slice(None) for ax in self.axes]
for ax in axes:
self.axes[ax] = self.axes[ax][::(- 1)]
slices[ax] = slice(None, None, (- 1))
self.data = self.data[slices]
if (self.unc... | def flip(self, *axes):
' \n '
if (len(axes) == 0):
return
axes = lib.as_list(axes)
slices = [slice(None) for ax in self.axes]
for ax in axes:
self.axes[ax] = self.axes[ax][::(- 1)]
slices[ax] = slice(None, None, (- 1))
self.data = self.data[slices]
if (self.unc... |
349aa2083e3d4e65027e840db747c82c823adc20bbc7ac6ab02d419e5dcc6dd8 | def parse(image, origin_anchors):
'\n :param image: input picture, shape like (H, W, 3)\n :param origin_anchors: text like ["201,162,207,229",\n "208,162,223,229",\n "224,162,239,229"]\n each line was a a... | :param image: input picture, shape like (H, W, 3)
:param origin_anchors: text like ["201,162,207,229",
"208,162,223,229",
"224,162,239,229"]
each line was a anchor box in image
:return: positive: 与ground truth的IOU大于0.7就是pos... | model/localization/ctpn/ctpn_anchor.py | parse | kokoyy/OCR.pytorch | 0 | python | def parse(image, origin_anchors):
'\n :param image: input picture, shape like (H, W, 3)\n :param origin_anchors: text like ["201,162,207,229",\n "208,162,223,229",\n "224,162,239,229"]\n each line was a a... | def parse(image, origin_anchors):
'\n :param image: input picture, shape like (H, W, 3)\n :param origin_anchors: text like ["201,162,207,229",\n "208,162,223,229",\n "224,162,239,229"]\n each line was a a... |
4031f2da0660b76cf7d3f71a133cebdf4d3ef9d51400e5c9a3647998d2660a5b | def _cal_iou(prepared_anchor, gt_center, gt_height, gt_width):
'\n calculate iou between prepared anchor and ground truth anchor\n :param prepared_anchor: shape like (j, i, k, center)\n :param gt_center:\n :param gt_height:\n :param gt_width:\n :return:\n '
prepared_anchor_height = ANCHOR_H... | calculate iou between prepared anchor and ground truth anchor
:param prepared_anchor: shape like (j, i, k, center)
:param gt_center:
:param gt_height:
:param gt_width:
:return: | model/localization/ctpn/ctpn_anchor.py | _cal_iou | kokoyy/OCR.pytorch | 0 | python | def _cal_iou(prepared_anchor, gt_center, gt_height, gt_width):
'\n calculate iou between prepared anchor and ground truth anchor\n :param prepared_anchor: shape like (j, i, k, center)\n :param gt_center:\n :param gt_height:\n :param gt_width:\n :return:\n '
prepared_anchor_height = ANCHOR_H... | def _cal_iou(prepared_anchor, gt_center, gt_height, gt_width):
'\n calculate iou between prepared anchor and ground truth anchor\n :param prepared_anchor: shape like (j, i, k, center)\n :param gt_center:\n :param gt_height:\n :param gt_width:\n :return:\n '
prepared_anchor_height = ANCHOR_H... |
a9b3c6cce6b89ae142962c2e8934814917cd9a0c294060f0df1d7635e6784030 | def _is_side_anchor(anchor_index, ground_truth_anchor, ground_truth_anchors):
'\n check if anchor is on the left or right side of Bbox\n :param anchor_index: index of ground_truth_anchor in ground_truth_anchors\n :param ground_truth_anchor:\n :param ground_truth_anchors:\n :return:\n '
if ((an... | check if anchor is on the left or right side of Bbox
:param anchor_index: index of ground_truth_anchor in ground_truth_anchors
:param ground_truth_anchor:
:param ground_truth_anchors:
:return: | model/localization/ctpn/ctpn_anchor.py | _is_side_anchor | kokoyy/OCR.pytorch | 0 | python | def _is_side_anchor(anchor_index, ground_truth_anchor, ground_truth_anchors):
'\n check if anchor is on the left or right side of Bbox\n :param anchor_index: index of ground_truth_anchor in ground_truth_anchors\n :param ground_truth_anchor:\n :param ground_truth_anchors:\n :return:\n '
if ((an... | def _is_side_anchor(anchor_index, ground_truth_anchor, ground_truth_anchors):
'\n check if anchor is on the left or right side of Bbox\n :param anchor_index: index of ground_truth_anchor in ground_truth_anchors\n :param ground_truth_anchor:\n :param ground_truth_anchors:\n :return:\n '
if ((an... |
1123983ae4092f9bfb2b4f1d7ea432decd9dcff6c686b454174d55038e147309 | def return_empty_mappings(n=DEFAULT_N):
" Return 'n' * empty mappings\n "
y = 0
mappings = []
while (y < n):
mappings.append({'in': '', 'out': '', 'context_before': '', 'context_after': ''})
y += 1
return mappings | Return 'n' * empty mappings | g2p/__init__.py | return_empty_mappings | joanise/g2p | 0 | python | def return_empty_mappings(n=DEFAULT_N):
" \n "
y = 0
mappings = []
while (y < n):
mappings.append({'in': , 'out': , 'context_before': , 'context_after': })
y += 1
return mappings | def return_empty_mappings(n=DEFAULT_N):
" \n "
y = 0
mappings = []
while (y < n):
mappings.append({'in': , 'out': , 'context_before': , 'context_after': })
y += 1
return mappings<|docstring|>Return 'n' * empty mappings<|endoftext|> |
5d760c2e314a6ecd4a170431b6b05fd7f3247c60e8270c1bb9fac305053b5394 | def hot_to_mappings(hot_data):
' Parse data from HandsOnTable to Mapping format\n '
return [{'context_before': str((x[2] or '')), 'in': str((x[0] or '')), 'context_after': str((x[3] or '')), 'out': str((x[1] or ''))} for x in hot_data if (x[0] or x[1])] | Parse data from HandsOnTable to Mapping format | g2p/__init__.py | hot_to_mappings | joanise/g2p | 0 | python | def hot_to_mappings(hot_data):
' \n '
return [{'context_before': str((x[2] or )), 'in': str((x[0] or )), 'context_after': str((x[3] or )), 'out': str((x[1] or ))} for x in hot_data if (x[0] or x[1])] | def hot_to_mappings(hot_data):
' \n '
return [{'context_before': str((x[2] or )), 'in': str((x[0] or )), 'context_after': str((x[3] or )), 'out': str((x[1] or ))} for x in hot_data if (x[0] or x[1])]<|docstring|>Parse data from HandsOnTable to Mapping format<|endoftext|> |
56122db959bff84bc9217971fbf7f6943e5eed699b784980c82ff472acfdec7c | @APP.route('/')
def home():
' Return homepage of g2p Studio\n '
return render_template('index.html', langs=LANGS) | Return homepage of g2p Studio | g2p/__init__.py | home | joanise/g2p | 0 | python | @APP.route('/')
def home():
' \n '
return render_template('index.html', langs=LANGS) | @APP.route('/')
def home():
' \n '
return render_template('index.html', langs=LANGS)<|docstring|>Return homepage of g2p Studio<|endoftext|> |
f1a5766fc5209c161c059b10095712bc24c62655f5767012f673f4f3b9903bb5 | @SOCKETIO.on('index conversion event', namespace='/convert')
def index_convert(message):
' Convert input text and return output with indices for echart\n '
mappings = Mapping(hot_to_mappings(message['data']['mappings']), abbreviations=flatten_abbreviations(message['data']['abbreviations']), **message['data']... | Convert input text and return output with indices for echart | g2p/__init__.py | index_convert | joanise/g2p | 0 | python | @SOCKETIO.on('index conversion event', namespace='/convert')
def index_convert(message):
' \n '
mappings = Mapping(hot_to_mappings(message['data']['mappings']), abbreviations=flatten_abbreviations(message['data']['abbreviations']), **message['data']['kwargs'])
transducer = Transducer(mappings)
(outpu... | @SOCKETIO.on('index conversion event', namespace='/convert')
def index_convert(message):
' \n '
mappings = Mapping(hot_to_mappings(message['data']['mappings']), abbreviations=flatten_abbreviations(message['data']['abbreviations']), **message['data']['kwargs'])
transducer = Transducer(mappings)
(outpu... |
3f7e3fdadc00562c093059fecedfba1d9342fd5f8e2ebcd225c85c8e52723733 | @SOCKETIO.on('conversion event', namespace='/convert')
def convert(message):
' Convert input text and return output\n '
mappings = Mapping(hot_to_mappings(message['data']['mappings']), abbreviations=flatten_abbreviations(message['data']['abbreviations']), **message['data']['kwargs'])
transducer = Transdu... | Convert input text and return output | g2p/__init__.py | convert | joanise/g2p | 0 | python | @SOCKETIO.on('conversion event', namespace='/convert')
def convert(message):
' \n '
mappings = Mapping(hot_to_mappings(message['data']['mappings']), abbreviations=flatten_abbreviations(message['data']['abbreviations']), **message['data']['kwargs'])
transducer = Transducer(mappings)
output_string = tr... | @SOCKETIO.on('conversion event', namespace='/convert')
def convert(message):
' \n '
mappings = Mapping(hot_to_mappings(message['data']['mappings']), abbreviations=flatten_abbreviations(message['data']['abbreviations']), **message['data']['kwargs'])
transducer = Transducer(mappings)
output_string = tr... |
1a77711de78864200190766f5793cc4c8a3e8c4045d2a5efa8b993a13a3cc0c1 | @SOCKETIO.on('table event', namespace='/table')
def change_table(message):
' Change the lookup table\n '
if ((message['in_lang'] == 'custom') or (message['out_lang'] == 'custom')):
mappings = Mapping(return_empty_mappings())
else:
mappings = Mapping(in_lang=message['in_lang'], out_lang=me... | Change the lookup table | g2p/__init__.py | change_table | joanise/g2p | 0 | python | @SOCKETIO.on('table event', namespace='/table')
def change_table(message):
' \n '
if ((message['in_lang'] == 'custom') or (message['out_lang'] == 'custom')):
mappings = Mapping(return_empty_mappings())
else:
mappings = Mapping(in_lang=message['in_lang'], out_lang=message['out_lang'])
... | @SOCKETIO.on('table event', namespace='/table')
def change_table(message):
' \n '
if ((message['in_lang'] == 'custom') or (message['out_lang'] == 'custom')):
mappings = Mapping(return_empty_mappings())
else:
mappings = Mapping(in_lang=message['in_lang'], out_lang=message['out_lang'])
... |
07790d49fd16aa21141253bfdc3ff95c78b9b7f3b50376d61739233eb2a00e1d | @SOCKETIO.on('connect', namespace='/connect')
def test_connect():
' Let client know disconnected\n '
emit('connection response', {'data': 'Connected'}) | Let client know disconnected | g2p/__init__.py | test_connect | joanise/g2p | 0 | python | @SOCKETIO.on('connect', namespace='/connect')
def test_connect():
' \n '
emit('connection response', {'data': 'Connected'}) | @SOCKETIO.on('connect', namespace='/connect')
def test_connect():
' \n '
emit('connection response', {'data': 'Connected'})<|docstring|>Let client know disconnected<|endoftext|> |
9295997e364b284644c3fe919f525a93c741ae2a70e6db7846e96c2028ede546 | @SOCKETIO.on('disconnect', namespace='/connect')
def test_disconnect():
' Let client know disconnected\n '
emit('connection response', {'data': 'Disconnected'}) | Let client know disconnected | g2p/__init__.py | test_disconnect | joanise/g2p | 0 | python | @SOCKETIO.on('disconnect', namespace='/connect')
def test_disconnect():
' \n '
emit('connection response', {'data': 'Disconnected'}) | @SOCKETIO.on('disconnect', namespace='/connect')
def test_disconnect():
' \n '
emit('connection response', {'data': 'Disconnected'})<|docstring|>Let client know disconnected<|endoftext|> |
de338d8a18b7c00e320a1113ce7e43bd6dbe7e1228f30cd4dc2f8761f9c93090 | def rect(t):
'Rectangle function.'
f = np.zeros_like(t)
I = (np.abs(t) < 0.5)
f[I] = 1
f[(np.abs(t) == 0.5)] = 0.5
return f | Rectangle function. | pyinverse/rect.py | rect | butala/pyinverse | 1 | python | def rect(t):
f = np.zeros_like(t)
I = (np.abs(t) < 0.5)
f[I] = 1
f[(np.abs(t) == 0.5)] = 0.5
return f | def rect(t):
f = np.zeros_like(t)
I = (np.abs(t) < 0.5)
f[I] = 1
f[(np.abs(t) == 0.5)] = 0.5
return f<|docstring|>Rectangle function.<|endoftext|> |
90e55aa9a1e9af7ba1de66d7f898e6f6014b3ba59e4381f5d7687368a7901eb6 | def srect(t, a):
'Scaled rectangle function.'
return rect((a * t)) | Scaled rectangle function. | pyinverse/rect.py | srect | butala/pyinverse | 1 | python | def srect(t, a):
return rect((a * t)) | def srect(t, a):
return rect((a * t))<|docstring|>Scaled rectangle function.<|endoftext|> |
a4436d533c80dae5dae64bc28246d822fef7a3833411250ddc164511d31d7f09 | def srect_conv_srect(t, a, b):
'Scaled rectangle convolved with scaled rectangle.'
assert ((a > 0) and (b > 0))
if (a < b):
return srect_conv_srect(t, b, a)
f = np.zeros_like(t)
I1 = (np.abs(t) < ((a + b) / ((2 * a) * b)))
I2 = (np.abs(t) > ((a - b) / ((2 * a) * b)))
I = (I1 & I2)
... | Scaled rectangle convolved with scaled rectangle. | pyinverse/rect.py | srect_conv_srect | butala/pyinverse | 1 | python | def srect_conv_srect(t, a, b):
assert ((a > 0) and (b > 0))
if (a < b):
return srect_conv_srect(t, b, a)
f = np.zeros_like(t)
I1 = (np.abs(t) < ((a + b) / ((2 * a) * b)))
I2 = (np.abs(t) > ((a - b) / ((2 * a) * b)))
I = (I1 & I2)
f[I] = (((a + b) / ((2 * a) * b)) - np.abs(t[I]))... | def srect_conv_srect(t, a, b):
assert ((a > 0) and (b > 0))
if (a < b):
return srect_conv_srect(t, b, a)
f = np.zeros_like(t)
I1 = (np.abs(t) < ((a + b) / ((2 * a) * b)))
I2 = (np.abs(t) > ((a - b) / ((2 * a) * b)))
I = (I1 & I2)
f[I] = (((a + b) / ((2 * a) * b)) - np.abs(t[I]))... |
c505ddb27007ac7ac3e1bee6618722f90ae042fceca31d962ccb068521d5799e | def srect_2D_proj(theta, t, a, b):
'Projection of the scaled rectangle function.'
theta = np.asarray(theta)
if (a < b):
return srect_2D_proj((theta - (np.pi / 2)), t, b, a)
P = np.empty((len(t), len(theta)))
for (k, theta_k) in enumerate((theta % (2 * np.pi))):
if (theta_k == 0):
... | Projection of the scaled rectangle function. | pyinverse/rect.py | srect_2D_proj | butala/pyinverse | 1 | python | def srect_2D_proj(theta, t, a, b):
theta = np.asarray(theta)
if (a < b):
return srect_2D_proj((theta - (np.pi / 2)), t, b, a)
P = np.empty((len(t), len(theta)))
for (k, theta_k) in enumerate((theta % (2 * np.pi))):
if (theta_k == 0):
p = (srect(t, a) / b)
elif (t... | def srect_2D_proj(theta, t, a, b):
theta = np.asarray(theta)
if (a < b):
return srect_2D_proj((theta - (np.pi / 2)), t, b, a)
P = np.empty((len(t), len(theta)))
for (k, theta_k) in enumerate((theta % (2 * np.pi))):
if (theta_k == 0):
p = (srect(t, a) / b)
elif (t... |
bfa3f660eaa47a51e498483274d50fcd93378ac6bd89a430d2a01da03fd003bd | def srect_2D_proj_ramp(theta, t, a, b):
'Ramp filtered projection of the scaled rectangle function.'
theta = np.asarray(theta)
a = (1 / a)
b = (1 / b)
P = np.empty((len(t), len(theta)))
for (k, theta_k) in enumerate((theta % (2 * np.pi))):
if ((theta_k == 0) or (theta_k == np.pi)):
... | Ramp filtered projection of the scaled rectangle function. | pyinverse/rect.py | srect_2D_proj_ramp | butala/pyinverse | 1 | python | def srect_2D_proj_ramp(theta, t, a, b):
theta = np.asarray(theta)
a = (1 / a)
b = (1 / b)
P = np.empty((len(t), len(theta)))
for (k, theta_k) in enumerate((theta % (2 * np.pi))):
if ((theta_k == 0) or (theta_k == np.pi)):
p = (((((- 2) * a) * b) / (np.pi ** 2)) / ((4 * (t **... | def srect_2D_proj_ramp(theta, t, a, b):
theta = np.asarray(theta)
a = (1 / a)
b = (1 / b)
P = np.empty((len(t), len(theta)))
for (k, theta_k) in enumerate((theta % (2 * np.pi))):
if ((theta_k == 0) or (theta_k == np.pi)):
p = (((((- 2) * a) * b) / (np.pi ** 2)) / ((4 * (t **... |
7b92a636e49c7e93e73bc20d12f8eedc910fe3cf18dd66e1626ea23d556a869c | def rect_conv_rect(x, a=1, b=1):
'Scaled rect convovled wtih scaled rect (CHECK IF THIS DUPLICATES srect_conv_srect).'
assert (a > 0)
assert (b > 0)
return (((step1(((x + (1 / (2 * a))) + (1 / (2 * b)))) - step1(((x - (1 / (2 * a))) + (1 / (2 * b))))) - step1(((x + (1 / (2 * a))) - (1 / (2 * b))))) + st... | Scaled rect convovled wtih scaled rect (CHECK IF THIS DUPLICATES srect_conv_srect). | pyinverse/rect.py | rect_conv_rect | butala/pyinverse | 1 | python | def rect_conv_rect(x, a=1, b=1):
assert (a > 0)
assert (b > 0)
return (((step1(((x + (1 / (2 * a))) + (1 / (2 * b)))) - step1(((x - (1 / (2 * a))) + (1 / (2 * b))))) - step1(((x + (1 / (2 * a))) - (1 / (2 * b))))) + step1(((x - (1 / (2 * a))) - (1 / (2 * b))))) | def rect_conv_rect(x, a=1, b=1):
assert (a > 0)
assert (b > 0)
return (((step1(((x + (1 / (2 * a))) + (1 / (2 * b)))) - step1(((x - (1 / (2 * a))) + (1 / (2 * b))))) - step1(((x + (1 / (2 * a))) - (1 / (2 * b))))) + step1(((x - (1 / (2 * a))) - (1 / (2 * b)))))<|docstring|>Scaled rect convovled wtih sc... |
bfaac975967a5f06523f7ad42a7431210265c4abafc429d600924f6db182c0d2 | def step(x):
'Heaviside step function u(x).'
y = np.zeros_like(x)
y[(x > 0)] = 1
return y | Heaviside step function u(x). | pyinverse/rect.py | step | butala/pyinverse | 1 | python | def step(x):
y = np.zeros_like(x)
y[(x > 0)] = 1
return y | def step(x):
y = np.zeros_like(x)
y[(x > 0)] = 1
return y<|docstring|>Heaviside step function u(x).<|endoftext|> |
1be88a74fc57578ee8d4ec9474416e600cd0f5df171bd07b150cbf44a3679a58 | def step1(x):
'Convolution of step functions.'
y = np.zeros_like(x)
y[(x > 0)] = x[(x > 0)]
return y | Convolution of step functions. | pyinverse/rect.py | step1 | butala/pyinverse | 1 | python | def step1(x):
y = np.zeros_like(x)
y[(x > 0)] = x[(x > 0)]
return y | def step1(x):
y = np.zeros_like(x)
y[(x > 0)] = x[(x > 0)]
return y<|docstring|>Convolution of step functions.<|endoftext|> |
8a824da643f6ea791e4d7a658f36bdf2dbe7f02929aae803bd7b753e8a4e99fa | def step2(x):
'Convolution of three step functions.'
y = np.zeros_like(x)
y[(x > 0)] = ((1 / 2) * (x[(x > 0)] ** 2))
return y | Convolution of three step functions. | pyinverse/rect.py | step2 | butala/pyinverse | 1 | python | def step2(x):
y = np.zeros_like(x)
y[(x > 0)] = ((1 / 2) * (x[(x > 0)] ** 2))
return y | def step2(x):
y = np.zeros_like(x)
y[(x > 0)] = ((1 / 2) * (x[(x > 0)] ** 2))
return y<|docstring|>Convolution of three step functions.<|endoftext|> |
17600e348a14c902c80ba15d140011fa1e51e080b8f15afbbb5d435ce72fc233 | def tri(x, b=1):
'Triangle function tri(bx) where tri(x) = rect(x) * rect(x).'
assert (b > 0)
return (((b * step1((x + (1 / b)))) - ((2 * b) * step1(x))) + (b * step1((x - (1 / b))))) | Triangle function tri(bx) where tri(x) = rect(x) * rect(x). | pyinverse/rect.py | tri | butala/pyinverse | 1 | python | def tri(x, b=1):
assert (b > 0)
return (((b * step1((x + (1 / b)))) - ((2 * b) * step1(x))) + (b * step1((x - (1 / b))))) | def tri(x, b=1):
assert (b > 0)
return (((b * step1((x + (1 / b)))) - ((2 * b) * step1(x))) + (b * step1((x - (1 / b)))))<|docstring|>Triangle function tri(bx) where tri(x) = rect(x) * rect(x).<|endoftext|> |
381f70b8582c9fd8e289865d68bb77a807112801170378f9493e101a95f4e5be | def rtri(x, a, b):
'Convolution of rect(ax) with tri(bx).'
assert (a > 0)
assert (b > 0)
return (b * (((((step2(((x + (1 / (2 * a))) + (1 / b))) - (2 * step2((x + (1 / (2 * a)))))) + step2(((x + (1 / (2 * a))) - (1 / b)))) - step2(((x - (1 / (2 * a))) + (1 / b)))) + (2 * step2((x - (1 / (2 * a)))))) - s... | Convolution of rect(ax) with tri(bx). | pyinverse/rect.py | rtri | butala/pyinverse | 1 | python | def rtri(x, a, b):
assert (a > 0)
assert (b > 0)
return (b * (((((step2(((x + (1 / (2 * a))) + (1 / b))) - (2 * step2((x + (1 / (2 * a)))))) + step2(((x + (1 / (2 * a))) - (1 / b)))) - step2(((x - (1 / (2 * a))) + (1 / b)))) + (2 * step2((x - (1 / (2 * a)))))) - step2(((x - (1 / (2 * a))) - (1 / b))))) | def rtri(x, a, b):
assert (a > 0)
assert (b > 0)
return (b * (((((step2(((x + (1 / (2 * a))) + (1 / b))) - (2 * step2((x + (1 / (2 * a)))))) + step2(((x + (1 / (2 * a))) - (1 / b)))) - step2(((x - (1 / (2 * a))) + (1 / b)))) + (2 * step2((x - (1 / (2 * a)))))) - step2(((x - (1 / (2 * a))) - (1 / b)))))... |
6cd9428c040be1a47abbccbfda4c8909c809789ea00b5d78bd9d874ba70b8ae6 | def square_proj_conv_rect(theta, r, a):
'Projection of square function convolved with rect(ax).'
assert (a > 0)
theta = (theta % (2 * np.pi))
if (theta in [(np.pi / 4), ((3 * np.pi) / 4), ((5 * np.pi) / 4), ((7 * np.pi) / 4)]):
return ((np.sqrt(2) * a) * rtri(r, a, (1 / (np.sqrt(2) / 2))))
e... | Projection of square function convolved with rect(ax). | pyinverse/rect.py | square_proj_conv_rect | butala/pyinverse | 1 | python | def square_proj_conv_rect(theta, r, a):
assert (a > 0)
theta = (theta % (2 * np.pi))
if (theta in [(np.pi / 4), ((3 * np.pi) / 4), ((5 * np.pi) / 4), ((7 * np.pi) / 4)]):
return ((np.sqrt(2) * a) * rtri(r, a, (1 / (np.sqrt(2) / 2))))
elif (np.abs(theta) in [0, (np.pi / 2), np.pi, ((3 * np.p... | def square_proj_conv_rect(theta, r, a):
assert (a > 0)
theta = (theta % (2 * np.pi))
if (theta in [(np.pi / 4), ((3 * np.pi) / 4), ((5 * np.pi) / 4), ((7 * np.pi) / 4)]):
return ((np.sqrt(2) * a) * rtri(r, a, (1 / (np.sqrt(2) / 2))))
elif (np.abs(theta) in [0, (np.pi / 2), np.pi, ((3 * np.p... |
d053bcb82965036baba056d98c2cf403ec92acafbdaabf2000d4a1e65a996304 | @pytest.fixture()
def c(app, db, location):
'A community fixture.'
_c = Community.create({})
db.session.commit()
return Community.get_record(_c.id) | A community fixture. | tests/records/test_mockrecords_api.py | c | ntarocco/invenio-communities | 3 | python | @pytest.fixture()
def c(app, db, location):
_c = Community.create({})
db.session.commit()
return Community.get_record(_c.id) | @pytest.fixture()
def c(app, db, location):
_c = Community.create({})
db.session.commit()
return Community.get_record(_c.id)<|docstring|>A community fixture.<|endoftext|> |
aaaecfaed6bc44008b9360e04ec6faf229fc12c86a7fdb8e9c71988fa5a2a770 | @pytest.fixture()
def c2(app, db, location):
'Another community fixture.'
_c = Community.create({})
db.session.commit()
return Community.get_record(_c.id) | Another community fixture. | tests/records/test_mockrecords_api.py | c2 | ntarocco/invenio-communities | 3 | python | @pytest.fixture()
def c2(app, db, location):
_c = Community.create({})
db.session.commit()
return Community.get_record(_c.id) | @pytest.fixture()
def c2(app, db, location):
_c = Community.create({})
db.session.commit()
return Community.get_record(_c.id)<|docstring|>Another community fixture.<|endoftext|> |
1de24d84d6a2ec3035f48730b9b60ad9cb8abfc300e4d18dde71e5466bb4861c | @pytest.fixture()
def record(app, db, c):
'A community fixture.'
r = MockRecord.create({})
r.communities.add(c, default=True)
r.commit()
db.session.commit()
return r | A community fixture. | tests/records/test_mockrecords_api.py | record | ntarocco/invenio-communities | 3 | python | @pytest.fixture()
def record(app, db, c):
r = MockRecord.create({})
r.communities.add(c, default=True)
r.commit()
db.session.commit()
return r | @pytest.fixture()
def record(app, db, c):
r = MockRecord.create({})
r.communities.add(c, default=True)
r.commit()
db.session.commit()
return r<|docstring|>A community fixture.<|endoftext|> |
6e66921deba021dc119117ec6384b11da8166fea5aaa8456853adb5477020c5d | def test_record_create_empty(app, db):
'Smoke test.'
record = MockRecord.create({})
db.session.commit()
assert record.schema
pytest.raises(ValidationError, MockRecord.create, {'metadata': {'title': 1}}) | Smoke test. | tests/records/test_mockrecords_api.py | test_record_create_empty | ntarocco/invenio-communities | 3 | python | def test_record_create_empty(app, db):
record = MockRecord.create({})
db.session.commit()
assert record.schema
pytest.raises(ValidationError, MockRecord.create, {'metadata': {'title': 1}}) | def test_record_create_empty(app, db):
record = MockRecord.create({})
db.session.commit()
assert record.schema
pytest.raises(ValidationError, MockRecord.create, {'metadata': {'title': 1}})<|docstring|>Smoke test.<|endoftext|> |
334d1a6643725a7942ce73c9b94b76caff6954bfc6ab78b3536af91d12a199b3 | def test_get(db, record, c):
'Loading a record should load communties and default.'
r = MockRecord.get_record(record.id)
assert (c in r.communities)
assert (r.communities.default == c) | Loading a record should load communties and default. | tests/records/test_mockrecords_api.py | test_get | ntarocco/invenio-communities | 3 | python | def test_get(db, record, c):
r = MockRecord.get_record(record.id)
assert (c in r.communities)
assert (r.communities.default == c) | def test_get(db, record, c):
r = MockRecord.get_record(record.id)
assert (c in r.communities)
assert (r.communities.default == c)<|docstring|>Loading a record should load communties and default.<|endoftext|> |
d6952b8a9b74f0a9d18f445cff9df970a64a1e0de72f6f9a59c514a78b26d5ad | def test_add(db, c):
'Test adding a record to a community.'
record = MockRecord.create({})
record.communities.add(c, default=True)
assert (record.communities.default == c)
record.commit()
assert (record['communities'] == {'default': str(c.id), 'ids': [str(c.id)]})
db.session.commit()
rec... | Test adding a record to a community. | tests/records/test_mockrecords_api.py | test_add | ntarocco/invenio-communities | 3 | python | def test_add(db, c):
record = MockRecord.create({})
record.communities.add(c, default=True)
assert (record.communities.default == c)
record.commit()
assert (record['communities'] == {'default': str(c.id), 'ids': [str(c.id)]})
db.session.commit()
record = MockRecord.create({})
record... | def test_add(db, c):
record = MockRecord.create({})
record.communities.add(c, default=True)
assert (record.communities.default == c)
record.commit()
assert (record['communities'] == {'default': str(c.id), 'ids': [str(c.id)]})
db.session.commit()
record = MockRecord.create({})
record... |
4adcafc659e7dfbaa19a7d48d774100918ab9d8020b7dda501dc6f0eba173409 | def test_add_existing(db, c):
'Test addding same community twice.'
record = MockRecord.create({})
record.communities.add(c)
record.communities.add(c)
pytest.raises(IntegrityError, record.commit)
db.session.rollback() | Test addding same community twice. | tests/records/test_mockrecords_api.py | test_add_existing | ntarocco/invenio-communities | 3 | python | def test_add_existing(db, c):
record = MockRecord.create({})
record.communities.add(c)
record.communities.add(c)
pytest.raises(IntegrityError, record.commit)
db.session.rollback() | def test_add_existing(db, c):
record = MockRecord.create({})
record.communities.add(c)
record.communities.add(c)
pytest.raises(IntegrityError, record.commit)
db.session.rollback()<|docstring|>Test addding same community twice.<|endoftext|> |
a4c2d3ba969d222f7fbb466b24af3131d91554839c12491ada6c4fd4ffd817cc | def test_remove(db, c, record):
'Test removal of community.'
record.communities.remove(c)
assert (len(record.communities) == 0)
record.commit()
assert (record['communities'] == {})
db.session.commit()
pytest.raises(ValueError, record.communities.remove, c2) | Test removal of community. | tests/records/test_mockrecords_api.py | test_remove | ntarocco/invenio-communities | 3 | python | def test_remove(db, c, record):
record.communities.remove(c)
assert (len(record.communities) == 0)
record.commit()
assert (record['communities'] == {})
db.session.commit()
pytest.raises(ValueError, record.communities.remove, c2) | def test_remove(db, c, record):
record.communities.remove(c)
assert (len(record.communities) == 0)
record.commit()
assert (record['communities'] == {})
db.session.commit()
pytest.raises(ValueError, record.communities.remove, c2)<|docstring|>Test removal of community.<|endoftext|> |
db4a186363730283be3acfb2d1420a072674832564e355eb1e05d07e6d05017e | def Plot_SNR(var_x, sample_x, var_y, sample_y, SNRMatrix, fig=None, ax=None, display=True, return_plt=False, dl_axis=False, lb_axis=False, smooth_contours=True, cfill=True, display_cbar=True, x_axis_label=True, y_axis_label=True, x_axis_line=None, y_axis_line=None, logLevels_min=(- 1.0), logLevels_max=0.0, hspace=0.15,... | Plots the SNR contours from calcSNR
Parameters
----------
var_x: str
x-axis variable
sample_x: array
samples at which ``SNRMatrix`` was calculated corresponding to the x-axis variable
var_y: str
y-axis variable
sample_y: array
samples at which ``SNRMatrix`` was calculated corresponding to the y-axis va... | gwent/snrplot.py | Plot_SNR | ark0015/GWDetectorDesignToolkit | 14 | python | def Plot_SNR(var_x, sample_x, var_y, sample_y, SNRMatrix, fig=None, ax=None, display=True, return_plt=False, dl_axis=False, lb_axis=False, smooth_contours=True, cfill=True, display_cbar=True, x_axis_label=True, y_axis_label=True, x_axis_line=None, y_axis_line=None, logLevels_min=(- 1.0), logLevels_max=0.0, hspace=0.15,... | def Plot_SNR(var_x, sample_x, var_y, sample_y, SNRMatrix, fig=None, ax=None, display=True, return_plt=False, dl_axis=False, lb_axis=False, smooth_contours=True, cfill=True, display_cbar=True, x_axis_label=True, y_axis_label=True, x_axis_line=None, y_axis_line=None, logLevels_min=(- 1.0), logLevels_max=0.0, hspace=0.15,... |
8f26edec765c4b0909752191d401d3e2b50d72dc62e52bf8fd43a118e6dd281c | def Get_Axes_Labels(ax, var_axis, var, var_scale, orig_labels, line_val, label_kwargs, tick_label_kwargs, line_kwargs):
"Gives paper plot labels for given axis\n\n Parameters\n ----------\n ax: object\n The current axes object\n var_axis: str\n The axis to change labels and ticks, can eith... | Gives paper plot labels for given axis
Parameters
----------
ax: object
The current axes object
var_axis: str
The axis to change labels and ticks, can either be ``'y'`` or ``'x'``
var: str
The variable to label
orig_labels: list,np.ndarray
The original labels for the particular axis, may be updated dep... | gwent/snrplot.py | Get_Axes_Labels | ark0015/GWDetectorDesignToolkit | 14 | python | def Get_Axes_Labels(ax, var_axis, var, var_scale, orig_labels, line_val, label_kwargs, tick_label_kwargs, line_kwargs):
"Gives paper plot labels for given axis\n\n Parameters\n ----------\n ax: object\n The current axes object\n var_axis: str\n The axis to change labels and ticks, can eith... | def Get_Axes_Labels(ax, var_axis, var, var_scale, orig_labels, line_val, label_kwargs, tick_label_kwargs, line_kwargs):
"Gives paper plot labels for given axis\n\n Parameters\n ----------\n ax: object\n The current axes object\n var_axis: str\n The axis to change labels and ticks, can eith... |
3066ab097993ede83d84f34b3877aa46b9660880d530c4ad765a276a58a6bfe7 | def ValidMatches(basename, cc, grep_lines):
"Filter out 'git grep' matches with header files already."
matches = []
for line in grep_lines:
(gnfile, linenr, contents) = line.split(':')
linenr = int(linenr)
new = re.sub(cc, basename, contents)
lines = open(gnfile).read().split... | Filter out 'git grep' matches with header files already. | src/build/fix_gn_headers.py | ValidMatches | tang88888888/naiveproxy | 14,668 | python | def ValidMatches(basename, cc, grep_lines):
matches = []
for line in grep_lines:
(gnfile, linenr, contents) = line.split(':')
linenr = int(linenr)
new = re.sub(cc, basename, contents)
lines = open(gnfile).read().splitlines()
assert (contents in lines[(linenr - 1)])
... | def ValidMatches(basename, cc, grep_lines):
matches = []
for line in grep_lines:
(gnfile, linenr, contents) = line.split(':')
linenr = int(linenr)
new = re.sub(cc, basename, contents)
lines = open(gnfile).read().splitlines()
assert (contents in lines[(linenr - 1)])
... |
ab500d4e237767da2f7fa5ed7484230cf75c1f2bcd0ec0c391395d01ffeca09d | def AddHeadersNextToCC(headers, skip_ambiguous=True):
'Add header files next to the corresponding .cc files in GN files.\n\n When skip_ambiguous is True, skip if multiple .cc files are found.\n Returns unhandled headers.\n\n Manual cleaning up is likely required, especially if not skip_ambiguous.\n '
edits ... | Add header files next to the corresponding .cc files in GN files.
When skip_ambiguous is True, skip if multiple .cc files are found.
Returns unhandled headers.
Manual cleaning up is likely required, especially if not skip_ambiguous. | src/build/fix_gn_headers.py | AddHeadersNextToCC | tang88888888/naiveproxy | 14,668 | python | def AddHeadersNextToCC(headers, skip_ambiguous=True):
'Add header files next to the corresponding .cc files in GN files.\n\n When skip_ambiguous is True, skip if multiple .cc files are found.\n Returns unhandled headers.\n\n Manual cleaning up is likely required, especially if not skip_ambiguous.\n '
edits ... | def AddHeadersNextToCC(headers, skip_ambiguous=True):
'Add header files next to the corresponding .cc files in GN files.\n\n When skip_ambiguous is True, skip if multiple .cc files are found.\n Returns unhandled headers.\n\n Manual cleaning up is likely required, especially if not skip_ambiguous.\n '
edits ... |
a731de11040ac4097c2c3e6d67595ad565f6f8e2ce975ef3f68158af52b57780 | def AddHeadersToSources(headers, skip_ambiguous=True):
'Add header files to the sources list in the first GN file.\n\n The target GN file is the first one up the parent directories.\n This usually does the wrong thing for _test files if the test and the main\n target are in the same .gn file.\n When skip_ambigu... | Add header files to the sources list in the first GN file.
The target GN file is the first one up the parent directories.
This usually does the wrong thing for _test files if the test and the main
target are in the same .gn file.
When skip_ambiguous is True, skip if multiple sources arrays are found.
"git cl format" ... | src/build/fix_gn_headers.py | AddHeadersToSources | tang88888888/naiveproxy | 14,668 | python | def AddHeadersToSources(headers, skip_ambiguous=True):
'Add header files to the sources list in the first GN file.\n\n The target GN file is the first one up the parent directories.\n This usually does the wrong thing for _test files if the test and the main\n target are in the same .gn file.\n When skip_ambigu... | def AddHeadersToSources(headers, skip_ambiguous=True):
'Add header files to the sources list in the first GN file.\n\n The target GN file is the first one up the parent directories.\n This usually does the wrong thing for _test files if the test and the main\n target are in the same .gn file.\n When skip_ambigu... |
401ed0eb0edefcd750b513b4c28073cba9542312400029156ebdd5d2e1e4e049 | def RemoveHeader(headers, skip_ambiguous=True):
'Remove non-existing headers in GN files.\n\n When skip_ambiguous is True, skip if multiple matches are found.\n '
edits = {}
unhandled = []
for filename in headers:
filename = filename.strip()
if (not (filename.endswith('.h') or filename... | Remove non-existing headers in GN files.
When skip_ambiguous is True, skip if multiple matches are found. | src/build/fix_gn_headers.py | RemoveHeader | tang88888888/naiveproxy | 14,668 | python | def RemoveHeader(headers, skip_ambiguous=True):
'Remove non-existing headers in GN files.\n\n When skip_ambiguous is True, skip if multiple matches are found.\n '
edits = {}
unhandled = []
for filename in headers:
filename = filename.strip()
if (not (filename.endswith('.h') or filename... | def RemoveHeader(headers, skip_ambiguous=True):
'Remove non-existing headers in GN files.\n\n When skip_ambiguous is True, skip if multiple matches are found.\n '
edits = {}
unhandled = []
for filename in headers:
filename = filename.strip()
if (not (filename.endswith('.h') or filename... |
0b50fa505a649afc7ed8f199ae46365ad0d344e34efa28d3bace3617a36d708e | def conv_block(m, num_kernels, kernel_size, strides, padding, activation, dropout, data_format, bn):
"\n Bulding block with convolutional layers for one level.\n\n :param m: model\n :param num_kernels: number of convolution filters on the particular level, positive integer\n :param kernel_size: size of ... | Bulding block with convolutional layers for one level.
:param m: model
:param num_kernels: number of convolution filters on the particular level, positive integer
:param kernel_size: size of the convolution kernel, tuple of two positive integers
:param strides: strides values, tuple of two positive integers
:param pad... | Unet/utils/unet.py | conv_block | prediction2020/unet-vessel-segmentation | 23 | python | def conv_block(m, num_kernels, kernel_size, strides, padding, activation, dropout, data_format, bn):
"\n Bulding block with convolutional layers for one level.\n\n :param m: model\n :param num_kernels: number of convolution filters on the particular level, positive integer\n :param kernel_size: size of ... | def conv_block(m, num_kernels, kernel_size, strides, padding, activation, dropout, data_format, bn):
"\n Bulding block with convolutional layers for one level.\n\n :param m: model\n :param num_kernels: number of convolution filters on the particular level, positive integer\n :param kernel_size: size of ... |
896dd0225f8110f4604c61c739ecc041861fce8f8a14797ef4f9e6be380ca4b5 | def up_concat_block(m, concat_channels, pool_size, concat_axis, data_format):
"\n Bulding block with up-sampling and concatenation for one level.\n\n :param m: model\n :param concat_channels: channels from left side onf Unet to be concatenated with the right part on one level\n :param pool_size: factors... | Bulding block with up-sampling and concatenation for one level.
:param m: model
:param concat_channels: channels from left side onf Unet to be concatenated with the right part on one level
:param pool_size: factors by which to downscale (vertical, horizontal), tuple of two positive integers
:param concat_axis: concate... | Unet/utils/unet.py | up_concat_block | prediction2020/unet-vessel-segmentation | 23 | python | def up_concat_block(m, concat_channels, pool_size, concat_axis, data_format):
"\n Bulding block with up-sampling and concatenation for one level.\n\n :param m: model\n :param concat_channels: channels from left side onf Unet to be concatenated with the right part on one level\n :param pool_size: factors... | def up_concat_block(m, concat_channels, pool_size, concat_axis, data_format):
"\n Bulding block with up-sampling and concatenation for one level.\n\n :param m: model\n :param concat_channels: channels from left side onf Unet to be concatenated with the right part on one level\n :param pool_size: factors... |
352ad15018741b28e05dcb3703dcc8298c6ce1e7587ed100822182528a704cb2 | def get_unet(patch_size, num_channels, activation, final_activation, optimizer, learning_rate, dropout, loss_function, metrics=None, kernel_size=(3, 3), pool_size=(2, 2), strides=(1, 1), num_kernels=None, concat_axis=3, data_format='channels_last', padding='same', bn=False):
"\n Defines the architecture of the u... | Defines the architecture of the u-net. Reconstruction of the u-net introduced in: https://arxiv.org/abs/1505.04597
:param patch_size: height of the patches, positive integer
:param num_channels: number of channels of the input images, positive integer
:param activation: activation_function after every convolution
:par... | Unet/utils/unet.py | get_unet | prediction2020/unet-vessel-segmentation | 23 | python | def get_unet(patch_size, num_channels, activation, final_activation, optimizer, learning_rate, dropout, loss_function, metrics=None, kernel_size=(3, 3), pool_size=(2, 2), strides=(1, 1), num_kernels=None, concat_axis=3, data_format='channels_last', padding='same', bn=False):
"\n Defines the architecture of the u... | def get_unet(patch_size, num_channels, activation, final_activation, optimizer, learning_rate, dropout, loss_function, metrics=None, kernel_size=(3, 3), pool_size=(2, 2), strides=(1, 1), num_kernels=None, concat_axis=3, data_format='channels_last', padding='same', bn=False):
"\n Defines the architecture of the u... |
2f12a58d24951b554fd1f9ccd332c4d8d29b1b78996ee28c07dc885580125b60 | def _cleanup(parts):
"\n Normalize up the parts matched by :obj:`parser.parser_re` to\n degrees, minutes, and seconds.\n\n >>> _cleanup({'latdir': 'south', 'longdir': 'west',\n ... 'latdeg':'60','latmin':'30',\n ... 'longdeg':'50','longmin':'40'})\n ['S', '60', '30', '00', 'W', '... | Normalize up the parts matched by :obj:`parser.parser_re` to
degrees, minutes, and seconds.
>>> _cleanup({'latdir': 'south', 'longdir': 'west',
... 'latdeg':'60','latmin':'30',
... 'longdeg':'50','longmin':'40'})
['S', '60', '30', '00', 'W', '50', '40', '00']
>>> _cleanup({'latdir': 'south', 'longdi... | geolucidate/functions.py | _cleanup | kurtraschke/geolucidate | 3 | python | def _cleanup(parts):
"\n Normalize up the parts matched by :obj:`parser.parser_re` to\n degrees, minutes, and seconds.\n\n >>> _cleanup({'latdir': 'south', 'longdir': 'west',\n ... 'latdeg':'60','latmin':'30',\n ... 'longdeg':'50','longmin':'40'})\n ['S', '60', '30', '00', 'W', '... | def _cleanup(parts):
"\n Normalize up the parts matched by :obj:`parser.parser_re` to\n degrees, minutes, and seconds.\n\n >>> _cleanup({'latdir': 'south', 'longdir': 'west',\n ... 'latdeg':'60','latmin':'30',\n ... 'longdeg':'50','longmin':'40'})\n ['S', '60', '30', '00', 'W', '... |
94e11cb530db18d434d376ebf357c1ea0d6576a94e3dc980e060b3050e727c36 | def _convert(latdir, latdeg, latmin, latsec, longdir, longdeg, longmin, longsec):
"\n Convert normalized degrees, minutes, and seconds to decimal degrees.\n Quantize the converted value based on the input precision and\n return a 2-tuple of strings.\n\n >>> _convert('S','50','30','30','W','50','30','30'... | Convert normalized degrees, minutes, and seconds to decimal degrees.
Quantize the converted value based on the input precision and
return a 2-tuple of strings.
>>> _convert('S','50','30','30','W','50','30','30')
('-50.508333', '-50.508333')
>>> _convert('N','50','27','55','W','127','27','65')
('50.459167', '-127.4608... | geolucidate/functions.py | _convert | kurtraschke/geolucidate | 3 | python | def _convert(latdir, latdeg, latmin, latsec, longdir, longdeg, longmin, longsec):
"\n Convert normalized degrees, minutes, and seconds to decimal degrees.\n Quantize the converted value based on the input precision and\n return a 2-tuple of strings.\n\n >>> _convert('S','50','30','30','W','50','30','30'... | def _convert(latdir, latdeg, latmin, latsec, longdir, longdeg, longmin, longsec):
"\n Convert normalized degrees, minutes, and seconds to decimal degrees.\n Quantize the converted value based on the input precision and\n return a 2-tuple of strings.\n\n >>> _convert('S','50','30','30','W','50','30','30'... |
f135c60dd2c1e9f4e5cb480ef5f2ed73ed6d2814d0fb775345555e1ec52ccaaf | def replace(string, sub_function=google_maps_link()):
'\n Replace detected coordinates with a map link, using the given substitution\n function.\n\n The substitution function will be passed a :class:`~.MapLink` instance, and\n should return a string which will be substituted by :func:`re.sub` in place\n... | Replace detected coordinates with a map link, using the given substitution
function.
The substitution function will be passed a :class:`~.MapLink` instance, and
should return a string which will be substituted by :func:`re.sub` in place
of the detected coordinates.
>>> replace("58147N/07720W")
'<a href="http://maps.g... | geolucidate/functions.py | replace | kurtraschke/geolucidate | 3 | python | def replace(string, sub_function=google_maps_link()):
'\n Replace detected coordinates with a map link, using the given substitution\n function.\n\n The substitution function will be passed a :class:`~.MapLink` instance, and\n should return a string which will be substituted by :func:`re.sub` in place\n... | def replace(string, sub_function=google_maps_link()):
'\n Replace detected coordinates with a map link, using the given substitution\n function.\n\n The substitution function will be passed a :class:`~.MapLink` instance, and\n should return a string which will be substituted by :func:`re.sub` in place\n... |
13494fdf928acc006e03962368b679f46da40873701076c9ae95047890ce8603 | def get_replacements(string, sub_function=google_maps_link()):
'\n Return a dict whose keys are instances of :class:`re.Match` and\n whose values are the corresponding replacements. Use\n :func:`get_replacements` when the replacement cannot be performed\n through ordinary string substitution by :func:`... | Return a dict whose keys are instances of :class:`re.Match` and
whose values are the corresponding replacements. Use
:func:`get_replacements` when the replacement cannot be performed
through ordinary string substitution by :func:`re.sub`, as in
:func:`replace`.
>>> get_replacements("4630 NORTH 5705 WEST 58147N/07720... | geolucidate/functions.py | get_replacements | kurtraschke/geolucidate | 3 | python | def get_replacements(string, sub_function=google_maps_link()):
'\n Return a dict whose keys are instances of :class:`re.Match` and\n whose values are the corresponding replacements. Use\n :func:`get_replacements` when the replacement cannot be performed\n through ordinary string substitution by :func:`... | def get_replacements(string, sub_function=google_maps_link()):
'\n Return a dict whose keys are instances of :class:`re.Match` and\n whose values are the corresponding replacements. Use\n :func:`get_replacements` when the replacement cannot be performed\n through ordinary string substitution by :func:`... |
3892b595c38fe6aaa4d3bfea2a63783355f571fa76551945da2ee5d50cebc58d | def pre_validate(self, form):
'\n 校验表单传值是否合法\n '
for (v, _) in self.choices:
if (text_type(self.data) == text_type(v)):
break
else:
raise ValueError(self.gettext('Not a valid choice')) | 校验表单传值是否合法 | app_backend/forms/__init__.py | pre_validate | zhanghe06/bearing_project | 1 | python | def pre_validate(self, form):
'\n \n '
for (v, _) in self.choices:
if (text_type(self.data) == text_type(v)):
break
else:
raise ValueError(self.gettext('Not a valid choice')) | def pre_validate(self, form):
'\n \n '
for (v, _) in self.choices:
if (text_type(self.data) == text_type(v)):
break
else:
raise ValueError(self.gettext('Not a valid choice'))<|docstring|>校验表单传值是否合法<|endoftext|> |
7a2afdd9fa63f5d7350568790e6b22ded751a99175e1fb57b30452a664617f13 | def save_file(filename: str) -> str:
'\n Saves the given file to a local directory,\n and returns the generated file name.\n '
return secure_filename(filename) | Saves the given file to a local directory,
and returns the generated file name. | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/uploads.py | save_file | aryaniyaps/flask-graphql-boilerplate | 4 | python | def save_file(filename: str) -> str:
'\n Saves the given file to a local directory,\n and returns the generated file name.\n '
return secure_filename(filename) | def save_file(filename: str) -> str:
'\n Saves the given file to a local directory,\n and returns the generated file name.\n '
return secure_filename(filename)<|docstring|>Saves the given file to a local directory,
and returns the generated file name.<|endoftext|> |
c10890e0bd9a6d99a449e5721fdb2599e41fc12d1f978e250cd34ed4bcaf48ad | def fold(H, columns=None):
'\n Fold a design to reduce confounding effects.\n \n Parameters\n ----------\n H : 2d-array\n The design matrix to be folded.\n columns : array\n Indices of of columns to fold (Default: None). If ``columns=None`` is\n used, then all columns will be ... | Fold a design to reduce confounding effects.
Parameters
----------
H : 2d-array
The design matrix to be folded.
columns : array
Indices of of columns to fold (Default: None). If ``columns=None`` is
used, then all columns will be folded.
Returns
-------
Hf : 2d-array
The folded design matrix.
Examples... | framework/contrib/pyDOE/doe_fold.py | fold | greenwoodms06/raven | 184 | python | def fold(H, columns=None):
'\n Fold a design to reduce confounding effects.\n \n Parameters\n ----------\n H : 2d-array\n The design matrix to be folded.\n columns : array\n Indices of of columns to fold (Default: None). If ``columns=None`` is\n used, then all columns will be ... | def fold(H, columns=None):
'\n Fold a design to reduce confounding effects.\n \n Parameters\n ----------\n H : 2d-array\n The design matrix to be folded.\n columns : array\n Indices of of columns to fold (Default: None). If ``columns=None`` is\n used, then all columns will be ... |
0069471df4890192e8436d7912aed0708a1be7a95ee8b1e2a1685b6ff27d935e | def isEnabled(self):
'\n Note: this may be misleading if enable(), disable() not used\n '
return self.fEnabled | Note: this may be misleading if enable(), disable() not used | dependencies/panda/direct/particles/ParticleEffect.py | isEnabled | SuperM0use24/Project-Altis | 0 | python | def isEnabled(self):
'\n \n '
return self.fEnabled | def isEnabled(self):
'\n \n '
return self.fEnabled<|docstring|>Note: this may be misleading if enable(), disable() not used<|endoftext|> |
4d47b413db60f2a8033e96a000f546294b604ec3d472560efed2fdb141560d94 | def __init__(self, concurrency_policy=None, failed_jobs_history_limit=None, schedule=None, starting_deadline_seconds=None, successful_jobs_history_limit=None, suspend=None, timezone=None, workflow_metadata=None, workflow_spec=None):
'V1alpha1CronWorkflowSpec - a model defined in Swagger'
self._concurrency_polic... | V1alpha1CronWorkflowSpec - a model defined in Swagger | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | __init__ | ButterflyNetwork/argo-client-python | 0 | python | def __init__(self, concurrency_policy=None, failed_jobs_history_limit=None, schedule=None, starting_deadline_seconds=None, successful_jobs_history_limit=None, suspend=None, timezone=None, workflow_metadata=None, workflow_spec=None):
self._concurrency_policy = None
self._failed_jobs_history_limit = None
... | def __init__(self, concurrency_policy=None, failed_jobs_history_limit=None, schedule=None, starting_deadline_seconds=None, successful_jobs_history_limit=None, suspend=None, timezone=None, workflow_metadata=None, workflow_spec=None):
self._concurrency_policy = None
self._failed_jobs_history_limit = None
... |
4fae84bc616a243c609d9972fc9478963fdb9b7b22dd50a184d231aa7e5cb571 | @property
def concurrency_policy(self):
'Gets the concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501\n\n :return: The concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501\n :r... | Gets the concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501
ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501
:return: The concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501
:rtype: str | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | concurrency_policy | ButterflyNetwork/argo-client-python | 0 | python | @property
def concurrency_policy(self):
'Gets the concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501\n\n :return: The concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501\n :r... | @property
def concurrency_policy(self):
'Gets the concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501\n\n :return: The concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501\n :r... |
ce573ec0686435ca826c40ccc4db12286936cdca38d97e3c3d3f149ab42d022d | @concurrency_policy.setter
def concurrency_policy(self, concurrency_policy):
'Sets the concurrency_policy of this V1alpha1CronWorkflowSpec.\n\n ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501\n\n :param concurrency_policy: The concurrency_policy of this V1alpha1Cr... | Sets the concurrency_policy of this V1alpha1CronWorkflowSpec.
ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501
:param concurrency_policy: The concurrency_policy of this V1alpha1CronWorkflowSpec. # noqa: E501
:type: str | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | concurrency_policy | ButterflyNetwork/argo-client-python | 0 | python | @concurrency_policy.setter
def concurrency_policy(self, concurrency_policy):
'Sets the concurrency_policy of this V1alpha1CronWorkflowSpec.\n\n ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501\n\n :param concurrency_policy: The concurrency_policy of this V1alpha1Cr... | @concurrency_policy.setter
def concurrency_policy(self, concurrency_policy):
'Sets the concurrency_policy of this V1alpha1CronWorkflowSpec.\n\n ConcurrencyPolicy is the K8s-style concurrency policy that will be used # noqa: E501\n\n :param concurrency_policy: The concurrency_policy of this V1alpha1Cr... |
0d4bfa221fccc85ca82c6136cae01b2a7244100b83d04560971a678670eb7e3a | @property
def failed_jobs_history_limit(self):
'Gets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :return: The failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.... | Gets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501
FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501
:return: The failed_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501
:rtype: int | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | failed_jobs_history_limit | ButterflyNetwork/argo-client-python | 0 | python | @property
def failed_jobs_history_limit(self):
'Gets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :return: The failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.... | @property
def failed_jobs_history_limit(self):
'Gets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :return: The failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.... |
4385157b4a5d0811122a8d779187f7e4b98ceb5b08591fd87181e9823931b524 | @failed_jobs_history_limit.setter
def failed_jobs_history_limit(self, failed_jobs_history_limit):
'Sets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.\n\n FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :param failed_jobs_history_limit: T... | Sets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.
FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501
:param failed_jobs_history_limit: The failed_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501
:type: int | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | failed_jobs_history_limit | ButterflyNetwork/argo-client-python | 0 | python | @failed_jobs_history_limit.setter
def failed_jobs_history_limit(self, failed_jobs_history_limit):
'Sets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.\n\n FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :param failed_jobs_history_limit: T... | @failed_jobs_history_limit.setter
def failed_jobs_history_limit(self, failed_jobs_history_limit):
'Sets the failed_jobs_history_limit of this V1alpha1CronWorkflowSpec.\n\n FailedJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :param failed_jobs_history_limit: T... |
b1c386b779a1128b1b9e71d716e39777633b71146ee1218ba52a0c8b6120dfe2 | @property
def schedule(self):
'Gets the schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n Schedule is a schedule to run the Workflow in Cron format # noqa: E501\n\n :return: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n :rtype: str\n '
return self._schedu... | Gets the schedule of this V1alpha1CronWorkflowSpec. # noqa: E501
Schedule is a schedule to run the Workflow in Cron format # noqa: E501
:return: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501
:rtype: str | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | schedule | ButterflyNetwork/argo-client-python | 0 | python | @property
def schedule(self):
'Gets the schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n Schedule is a schedule to run the Workflow in Cron format # noqa: E501\n\n :return: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n :rtype: str\n '
return self._schedu... | @property
def schedule(self):
'Gets the schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n Schedule is a schedule to run the Workflow in Cron format # noqa: E501\n\n :return: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n :rtype: str\n '
return self._schedu... |
c3d0bbdd14595925414aca92ba8cb9c013b1dab4eef752654fe4a05a901ef451 | @schedule.setter
def schedule(self, schedule):
'Sets the schedule of this V1alpha1CronWorkflowSpec.\n\n Schedule is a schedule to run the Workflow in Cron format # noqa: E501\n\n :param schedule: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n :type: str\n '
if (sched... | Sets the schedule of this V1alpha1CronWorkflowSpec.
Schedule is a schedule to run the Workflow in Cron format # noqa: E501
:param schedule: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501
:type: str | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | schedule | ButterflyNetwork/argo-client-python | 0 | python | @schedule.setter
def schedule(self, schedule):
'Sets the schedule of this V1alpha1CronWorkflowSpec.\n\n Schedule is a schedule to run the Workflow in Cron format # noqa: E501\n\n :param schedule: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n :type: str\n '
if (sched... | @schedule.setter
def schedule(self, schedule):
'Sets the schedule of this V1alpha1CronWorkflowSpec.\n\n Schedule is a schedule to run the Workflow in Cron format # noqa: E501\n\n :param schedule: The schedule of this V1alpha1CronWorkflowSpec. # noqa: E501\n :type: str\n '
if (sched... |
c00e250b2ebfa2f23c4b34d8028291081c14f09836e29a81c3cb26bd9db3f115 | @property
def starting_deadline_seconds(self):
'Gets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time if it is missed. # noqa: E501\n\n ... | Gets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec. # noqa: E501
StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time if it is missed. # noqa: E501
:return: The starting_deadline_seconds of this V1alpha1CronWorkflowS... | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | starting_deadline_seconds | ButterflyNetwork/argo-client-python | 0 | python | @property
def starting_deadline_seconds(self):
'Gets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time if it is missed. # noqa: E501\n\n ... | @property
def starting_deadline_seconds(self):
'Gets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time if it is missed. # noqa: E501\n\n ... |
077aaa520b0583fb049f9c27f8e2283b806c4bfeccc9185cb2141e501ba3390d | @starting_deadline_seconds.setter
def starting_deadline_seconds(self, starting_deadline_seconds):
'Sets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec.\n\n StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time i... | Sets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec.
StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time if it is missed. # noqa: E501
:param starting_deadline_seconds: The starting_deadline_seconds of this V1alpha1Cr... | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | starting_deadline_seconds | ButterflyNetwork/argo-client-python | 0 | python | @starting_deadline_seconds.setter
def starting_deadline_seconds(self, starting_deadline_seconds):
'Sets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec.\n\n StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time i... | @starting_deadline_seconds.setter
def starting_deadline_seconds(self, starting_deadline_seconds):
'Sets the starting_deadline_seconds of this V1alpha1CronWorkflowSpec.\n\n StartingDeadlineSeconds is the K8s-style deadline that will limit the time a CronWorkflow will be run after its original scheduled time i... |
947cb0b7d6a3df67a8f4125706a897056720ff949a53944ea2fc58cf559f831d | @property
def successful_jobs_history_limit(self):
'Gets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :return: The successful_jobs_history_limit of this V1alpha1C... | Gets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501
SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501
:return: The successful_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501
:rtype: int | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | successful_jobs_history_limit | ButterflyNetwork/argo-client-python | 0 | python | @property
def successful_jobs_history_limit(self):
'Gets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :return: The successful_jobs_history_limit of this V1alpha1C... | @property
def successful_jobs_history_limit(self):
'Gets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :return: The successful_jobs_history_limit of this V1alpha1C... |
a99781fd71fe059becd0ce3cacf02a5057f0833a65be390005bfade04d291962 | @successful_jobs_history_limit.setter
def successful_jobs_history_limit(self, successful_jobs_history_limit):
'Sets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec.\n\n SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :param successf... | Sets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec.
SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501
:param successful_jobs_history_limit: The successful_jobs_history_limit of this V1alpha1CronWorkflowSpec. # noqa: E501
:type: int | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | successful_jobs_history_limit | ButterflyNetwork/argo-client-python | 0 | python | @successful_jobs_history_limit.setter
def successful_jobs_history_limit(self, successful_jobs_history_limit):
'Sets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec.\n\n SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :param successf... | @successful_jobs_history_limit.setter
def successful_jobs_history_limit(self, successful_jobs_history_limit):
'Sets the successful_jobs_history_limit of this V1alpha1CronWorkflowSpec.\n\n SuccessfulJobsHistoryLimit is the number of successful jobs to be kept at a time # noqa: E501\n\n :param successf... |
a103f82d97355e7988d96ca76a178cce86f595c71165db93219f46943d4f4848 | @property
def suspend(self):
'Gets the suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501\n\n :return: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n :rtype: bool\n '
... | Gets the suspend of this V1alpha1CronWorkflowSpec. # noqa: E501
Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501
:return: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501
:rtype: bool | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | suspend | ButterflyNetwork/argo-client-python | 0 | python | @property
def suspend(self):
'Gets the suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501\n\n :return: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n :rtype: bool\n '
... | @property
def suspend(self):
'Gets the suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n\n Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501\n\n :return: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n :rtype: bool\n '
... |
6dd27552770a9637c42755afd1e6592b2710263b160640343bdef9e61f6482d9 | @suspend.setter
def suspend(self, suspend):
'Sets the suspend of this V1alpha1CronWorkflowSpec.\n\n Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501\n\n :param suspend: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n :type: bool\n ... | Sets the suspend of this V1alpha1CronWorkflowSpec.
Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501
:param suspend: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501
:type: bool | argo/workflows/client/models/v1alpha1_cron_workflow_spec.py | suspend | ButterflyNetwork/argo-client-python | 0 | python | @suspend.setter
def suspend(self, suspend):
'Sets the suspend of this V1alpha1CronWorkflowSpec.\n\n Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501\n\n :param suspend: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n :type: bool\n ... | @suspend.setter
def suspend(self, suspend):
'Sets the suspend of this V1alpha1CronWorkflowSpec.\n\n Suspend is a flag that will stop new CronWorkflows from running if set to true # noqa: E501\n\n :param suspend: The suspend of this V1alpha1CronWorkflowSpec. # noqa: E501\n :type: bool\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.