hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
d5ce5054e60df982aaf1577b3ec0cb69ba97506a
1,305
py
Python
razorpay/resources/customer.py
captn3m0/razorpay
0352f2d81696984c96e51c55a81178c663be320f
[ "MIT" ]
3
2015-11-18T10:28:07.000Z
2015-11-21T01:17:35.000Z
razorpay/resources/customer.py
captn3m0/razorpay
0352f2d81696984c96e51c55a81178c663be320f
[ "MIT" ]
null
null
null
razorpay/resources/customer.py
captn3m0/razorpay
0352f2d81696984c96e51c55a81178c663be320f
[ "MIT" ]
null
null
null
from .base import Resource from ..constants.url import URL class Customer(Resource): def __init__(self, client=None): super(Customer, self).__init__(client) self.base_url = URL.CUSTOMER_URL def fetch(self, customer_id, data={}, **kwargs): """" Fetch Customer for given Id Args: customer_id : Id for which customer object has to be retrieved Returns: Order dict for given customer Id """ return super(Customer, self).fetch(customer_id, data, **kwargs) def create(self, data={}, **kwargs): """" Create Customer from given dict Returns: Customer Dict which was created """ url = self.base_url return self.post_url(url, data, **kwargs) def edit(self, customer_id, data={}, **kwargs): """" Edit Customer information from given dict Returns: Customer Dict which was edited """ url = '{}/{}'.format(self.base_url, customer_id) return self.put_url(url, data, **kwargs) def all(self, data={}, **kwargs): """" Fetch all customer Returns: Dictionary of Customers data """ return super(Customer, self).all(data, **kwargs)
26.1
74
0.568582
148
1,305
4.885135
0.297297
0.11065
0.070539
0.082988
0.229599
0.11065
0.11065
0.11065
0
0
0
0
0.320307
1,305
50
75
26.1
0.815107
0.293487
0
0
0
0
0.006631
0
0
0
0
0
0
1
0.3125
false
0
0.125
0
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
d5d44f7d4d799c3a7e7d2224c5ee33ef0d9990a9
252
py
Python
python/intersection_of_2_array.py
anishLearnsToCode/leetcode-algorithms
d5a84e9179a4c3427890313a933fe1950fbcdabc
[ "MIT" ]
17
2020-06-13T15:05:55.000Z
2022-03-16T18:28:53.000Z
python/intersection_of_2_array.py
anishLearnsToCode/leetcode-algorithms
d5a84e9179a4c3427890313a933fe1950fbcdabc
[ "MIT" ]
null
null
null
python/intersection_of_2_array.py
anishLearnsToCode/leetcode-algorithms
d5a84e9179a4c3427890313a933fe1950fbcdabc
[ "MIT" ]
9
2020-12-27T19:17:58.000Z
2022-03-22T07:02:19.000Z
from typing import List class Solution: def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: nums_1_unique = set(nums1) nums_2_unique = set(nums2) return list(nums_1_unique.intersection(nums_2_unique))
28
76
0.686508
36
252
4.583333
0.5
0.127273
0.133333
0
0
0
0
0
0
0
0
0.04
0.206349
252
8
77
31.5
0.785
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
d5d651c01006dd2d3c18278c397360a56ba313d4
3,617
py
Python
models/flows/order.py
fromjupiter/ReverbNN
19c078e0d37c4f6bf85e749a31c40f36f3562145
[ "MIT" ]
93
2019-07-04T06:33:35.000Z
2022-02-07T07:21:26.000Z
code/models/flows/order.py
DBraun/flow_synthesizer
7df51b574765c7834ebdda8a8936b2c0d363a93a
[ "MIT" ]
4
2020-02-06T12:53:05.000Z
2022-01-17T19:10:05.000Z
code/models/flows/order.py
DBraun/flow_synthesizer
7df51b574765c7834ebdda8a8936b2c0d363a93a
[ "MIT" ]
17
2019-07-02T09:30:08.000Z
2022-01-16T13:36:44.000Z
# -*- coding: utf-8 -*- import torch # Internal imports from .flow import Flow from .layers import Conv2dZeros, GaussianDiag class ReverseFlow(Flow): """ Reverse flow layer as defined in Density estimation using Real NVP - Dinh et al. (2016) (https://arxiv.org/pdf/1605.08803). """ def __init__(self, dim, amortized='none', **kwargs): super(ReverseFlow, self).__init__() self.permute = torch.arange(dim - 1, -1, -1) self.inverse = torch.argsort(self.permute) def _call(self, z): return z[:, self.permute] def _inverse(self, z): return z[:, self.inverse] def log_abs_det_jacobian(self, z): return torch.zeros(z.shape[0], 1).to(z.device) class ShuffleFlow(ReverseFlow): """ Shuffle flow layer """ def __init__(self, dim, amortized='none', **kwargs): super(ShuffleFlow, self).__init__(dim, **kwargs) self.permute = torch.randperm(dim) self.inverse = torch.argsort(self.permute) class SplitFlow(Flow): """ An implementation of the split layer defined in Glow: Generative Flow with Invertible 1x1 Convolutions (https://arxiv.org/abs/1807.03039). This flow simply splits the input across the channel dimension. """ def __init__(self, num_channels, amortized='none'): super().__init__() self.conv = Conv2dZeros(num_channels // 2, num_channels) self.eps_std = None def split(self, tensor, type_s="split"): """ type = ["split", "cross"] """ C = tensor.size(1) if type_s == "split": return tensor[:, :C//2, ...], tensor[:, C//2:, ...] elif type_s == "cross": return tensor[:, 0::2, ...], tensor[:, 1::2, ...] def prior(self, z): h = self.conv(z) return self.split(h, "cross") def _call(self, z): z1, z2 = self.split(z, "split") return z1 def log_abs_det_jacobian(self, z): z1, z2 = self.split(z, "split") mean, logs = self.prior(z1) log_det = GaussianDiag.logp(mean, logs, z2) return log_det def _inverse(self, z): mean, logs = self.prior(z) z2 = GaussianDiag.sample(mean, logs, self.eps_std) z = torch.cat((z, z2), dim=1) return z class SqueezeFlow(Flow): """ An implementation of the squeeze layer defined in Glow: Generative Flow with Invertible 1x1 Convolutions (https://arxiv.org/abs/1807.03039). This flow simply splits the input across the channel dimension. """ def __init__(self, dim, factor=2, amortized='none'): super().__init__() self.factor = factor def squeeze(self, z, factor=2): if factor == 1: return z B, C, H, W = z.size() assert H % factor == 0 and W % factor == 0, "{}".format((H, W)) x = z.view(B, C, H // factor, factor, W // factor, factor) x = x.permute(0, 1, 3, 5, 2, 4).contiguous() x = x.view(B, C * factor * factor, H // factor, W // factor) return x def unsqueeze(self, z, factor=2): factor2 = factor ** 2 if factor == 1: return z B, C, H, W = z.size() x = z.view(B, C // factor2, factor, factor, H, W) x = x.permute(0, 1, 4, 2, 5, 3).contiguous() x = x.view(B, C // (factor2), H * factor, W * factor) return x def _call(self, z): return self.squeeze(z, self.factor) def _inverse(self, z): return self.unsqueeze(z, self.factor) def log_abs_det_jacobian(self, z): return torch.zeros(z.shape[0])
28.03876
71
0.573956
492
3,617
4.103659
0.247967
0.029718
0.032689
0.020802
0.485884
0.374443
0.322932
0.289252
0.227836
0.227836
0
0.032605
0.279237
3,617
128
72
28.257813
0.741849
0.171136
0
0.351351
0
0
0.016569
0
0
0
0
0
0.013514
1
0.22973
false
0
0.040541
0.081081
0.540541
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
d5d76d6deef6cd5fe9569d7b77b2dc18bfdf431c
10,552
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/tunnelheadtrafficendpoint_399e6e14fa13954b413c4572ebd3725e.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/tunnelheadtrafficendpoint_399e6e14fa13954b413c4572ebd3725e.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/tunnelheadtrafficendpoint_399e6e14fa13954b413c4572ebd3725e.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class TunnelHeadTrafficEndPoint(Base): """The tunnelHeadTrafficEndPoint helps to configure the IP addresses to be used in the Source IP field in traffic to be sent over the LSPs originating from this Head Range. The TunnelHeadTrafficEndPoint class encapsulates a list of tunnelHeadTrafficEndPoint resources that are managed by the user. A list of resources can be retrieved from the server using the TunnelHeadTrafficEndPoint.find() method. The list can be managed by using the TunnelHeadTrafficEndPoint.add() and TunnelHeadTrafficEndPoint.remove() methods. """ __slots__ = () _SDM_NAME = 'tunnelHeadTrafficEndPoint' _SDM_ATT_MAP = { 'EndPointType': 'endPointType', 'InsertExplicitTrafficItem': 'insertExplicitTrafficItem', 'InsertIpv6ExplicitNull': 'insertIpv6ExplicitNull', 'IpCount': 'ipCount', 'IpStart': 'ipStart', } def __init__(self, parent): super(TunnelHeadTrafficEndPoint, self).__init__(parent) @property def EndPointType(self): """ Returns ------- - str(ipv4 | ipv6 | 17 | 18): IPv4/IPv6 address. It has the same values as of IP Type for traffic item in parent Tail Range. """ return self._get_attribute(self._SDM_ATT_MAP['EndPointType']) @EndPointType.setter def EndPointType(self, value): self._set_attribute(self._SDM_ATT_MAP['EndPointType'], value) @property def InsertExplicitTrafficItem(self): """DEPRECATED Returns ------- - bool: NOT DEFINED """ return self._get_attribute(self._SDM_ATT_MAP['InsertExplicitTrafficItem']) @InsertExplicitTrafficItem.setter def InsertExplicitTrafficItem(self, value): self._set_attribute(self._SDM_ATT_MAP['InsertExplicitTrafficItem'], value) @property def InsertIpv6ExplicitNull(self): """ Returns ------- - bool: This causes an IPv6 Explicit NULL to be inserted as the innermost label in addition to learned label when trying to generate IPv6 traffic over the IPv4 LSP. The purpose of this is to route the traffic to the IPv6 Protocol Stack at the egress for routing towards the IPv6 destination. """ return self._get_attribute(self._SDM_ATT_MAP['InsertIpv6ExplicitNull']) @InsertIpv6ExplicitNull.setter def InsertIpv6ExplicitNull(self, value): self._set_attribute(self._SDM_ATT_MAP['InsertIpv6ExplicitNull'], value) @property def IpCount(self): """ Returns ------- - number: Allows value greater than or equal to Tunnel Head IP Count (1 by default). This can be used to simulate traffic from multiple source endpoints to be sent over the LSPs originated from the Head Range. """ return self._get_attribute(self._SDM_ATT_MAP['IpCount']) @IpCount.setter def IpCount(self, value): self._set_attribute(self._SDM_ATT_MAP['IpCount'], value) @property def IpStart(self): """ Returns ------- - str: The Source IP address, one of IPv4 or IPv6, to be used for traffic to be sent over LSPs from the Head End Point. """ return self._get_attribute(self._SDM_ATT_MAP['IpStart']) @IpStart.setter def IpStart(self, value): self._set_attribute(self._SDM_ATT_MAP['IpStart'], value) def update(self, EndPointType=None, InsertExplicitTrafficItem=None, InsertIpv6ExplicitNull=None, IpCount=None, IpStart=None): """Updates tunnelHeadTrafficEndPoint resource on the server. Args ---- - EndPointType (str(ipv4 | ipv6 | 17 | 18)): IPv4/IPv6 address. It has the same values as of IP Type for traffic item in parent Tail Range. - InsertExplicitTrafficItem (bool): NOT DEFINED - InsertIpv6ExplicitNull (bool): This causes an IPv6 Explicit NULL to be inserted as the innermost label in addition to learned label when trying to generate IPv6 traffic over the IPv4 LSP. The purpose of this is to route the traffic to the IPv6 Protocol Stack at the egress for routing towards the IPv6 destination. - IpCount (number): Allows value greater than or equal to Tunnel Head IP Count (1 by default). This can be used to simulate traffic from multiple source endpoints to be sent over the LSPs originated from the Head Range. - IpStart (str): The Source IP address, one of IPv4 or IPv6, to be used for traffic to be sent over LSPs from the Head End Point. Raises ------ - ServerError: The server has encountered an uncategorized error condition """ return self._update(self._map_locals(self._SDM_ATT_MAP, locals())) def add(self, EndPointType=None, InsertExplicitTrafficItem=None, InsertIpv6ExplicitNull=None, IpCount=None, IpStart=None): """Adds a new tunnelHeadTrafficEndPoint resource on the server and adds it to the container. Args ---- - EndPointType (str(ipv4 | ipv6 | 17 | 18)): IPv4/IPv6 address. It has the same values as of IP Type for traffic item in parent Tail Range. - InsertExplicitTrafficItem (bool): NOT DEFINED - InsertIpv6ExplicitNull (bool): This causes an IPv6 Explicit NULL to be inserted as the innermost label in addition to learned label when trying to generate IPv6 traffic over the IPv4 LSP. The purpose of this is to route the traffic to the IPv6 Protocol Stack at the egress for routing towards the IPv6 destination. - IpCount (number): Allows value greater than or equal to Tunnel Head IP Count (1 by default). This can be used to simulate traffic from multiple source endpoints to be sent over the LSPs originated from the Head Range. - IpStart (str): The Source IP address, one of IPv4 or IPv6, to be used for traffic to be sent over LSPs from the Head End Point. Returns ------- - self: This instance with all currently retrieved tunnelHeadTrafficEndPoint resources using find and the newly added tunnelHeadTrafficEndPoint resources available through an iterator or index Raises ------ - ServerError: The server has encountered an uncategorized error condition """ return self._create(self._map_locals(self._SDM_ATT_MAP, locals())) def remove(self): """Deletes all the contained tunnelHeadTrafficEndPoint resources in this instance from the server. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ self._delete() def find(self, EndPointType=None, InsertExplicitTrafficItem=None, InsertIpv6ExplicitNull=None, IpCount=None, IpStart=None): """Finds and retrieves tunnelHeadTrafficEndPoint resources from the server. All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve tunnelHeadTrafficEndPoint resources from the server. To retrieve an exact match ensure the parameter value starts with ^ and ends with $ By default the find method takes no parameters and will retrieve all tunnelHeadTrafficEndPoint resources from the server. Args ---- - EndPointType (str(ipv4 | ipv6 | 17 | 18)): IPv4/IPv6 address. It has the same values as of IP Type for traffic item in parent Tail Range. - InsertExplicitTrafficItem (bool): NOT DEFINED - InsertIpv6ExplicitNull (bool): This causes an IPv6 Explicit NULL to be inserted as the innermost label in addition to learned label when trying to generate IPv6 traffic over the IPv4 LSP. The purpose of this is to route the traffic to the IPv6 Protocol Stack at the egress for routing towards the IPv6 destination. - IpCount (number): Allows value greater than or equal to Tunnel Head IP Count (1 by default). This can be used to simulate traffic from multiple source endpoints to be sent over the LSPs originated from the Head Range. - IpStart (str): The Source IP address, one of IPv4 or IPv6, to be used for traffic to be sent over LSPs from the Head End Point. Returns ------- - self: This instance with matching tunnelHeadTrafficEndPoint resources retrieved from the server available through an iterator or index Raises ------ - ServerError: The server has encountered an uncategorized error condition """ return self._select(self._map_locals(self._SDM_ATT_MAP, locals())) def read(self, href): """Retrieves a single instance of tunnelHeadTrafficEndPoint data from the server. Args ---- - href (str): An href to the instance to be retrieved Returns ------- - self: This instance with the tunnelHeadTrafficEndPoint resources from the server available through an iterator or index Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ return self._read(href)
53.836735
325
0.696077
1,343
10,552
5.402829
0.19583
0.010474
0.017365
0.023291
0.624724
0.580072
0.557332
0.557332
0.542861
0.492558
0
0.010593
0.239575
10,552
195
326
54.112821
0.893694
0.661107
0
0.092593
0
0
0.119668
0.080408
0
0
0
0
0
1
0.296296
false
0
0.037037
0
0.574074
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
d5d89941345252b869e0343b51748b8b7a925b50
547
py
Python
tests/fixtures.py
junteudjio/runtimedocs
5ef9ad072d4b03616bee24019da4d0ae7de49b8a
[ "MIT" ]
2
2018-09-03T07:47:15.000Z
2018-09-13T05:00:30.000Z
tests/fixtures.py
junteudjio/runtimedocs
5ef9ad072d4b03616bee24019da4d0ae7de49b8a
[ "MIT" ]
null
null
null
tests/fixtures.py
junteudjio/runtimedocs
5ef9ad072d4b03616bee24019da4d0ae7de49b8a
[ "MIT" ]
1
2019-10-06T00:31:31.000Z
2019-10-06T00:31:31.000Z
import pytest from .context import mock, builtin_str @pytest.fixture(scope='function') def func(): def dummy(*agrs, **kwargs): pass f = mock.create_autospec(spec=dummy, name='fixture_function_to_decorate') return f @pytest.fixture(scope='function', autouse=True) @mock.patch('{builtin}.open'.format(builtin=builtin_str)) def mocked_open(mock_open): # mock_file = mock.Mock() # mock_file.write.return_value = None # mock_file.read.return_value = None # mock_open.return_value = mock_file return mock_open
27.35
77
0.716636
76
547
4.934211
0.460526
0.085333
0.096
0.138667
0
0
0
0
0
0
0
0
0.157221
547
19
78
28.789474
0.813449
0.235832
0
0
0
0
0.140436
0.067797
0
0
0
0
0
1
0.25
false
0.083333
0.166667
0.083333
0.583333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
d5f04747f2054204449c75f47e24e5e7cbfc19d6
409
py
Python
accelerator/models/judging_round.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
6
2017-06-14T19:34:01.000Z
2020-03-08T07:16:59.000Z
accelerator/models/judging_round.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
160
2017-06-20T17:12:13.000Z
2022-03-30T13:53:12.000Z
accelerator/models/judging_round.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from accelerator_abstract.models.base_judging_round import BaseJudgingRound class JudgingRound(BaseJudgingRound): class Meta(BaseJudgingRound.Meta): swappable = swapper.swappable_setting(BaseJudgingRound.Meta.app_label, "JudgingRound")
27.266667
78
0.721271
39
409
7.307692
0.692308
0.147368
0
0
0
0
0
0
0
0
0
0.012539
0.220049
409
14
79
29.214286
0.880878
0.122249
0
0
0
0
0.033708
0
0
0
0
0
0
1
0
false
0
0.428571
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
d5f1d14a19b051aa011f71eefdc1fa3db9f45630
134
py
Python
bakpdlbot/__init__.py
rasher/BakpdlBot
86941df1a92f870f2701d674d41c60ab79f4e673
[ "MIT" ]
null
null
null
bakpdlbot/__init__.py
rasher/BakpdlBot
86941df1a92f870f2701d674d41c60ab79f4e673
[ "MIT" ]
null
null
null
bakpdlbot/__init__.py
rasher/BakpdlBot
86941df1a92f870f2701d674d41c60ab79f4e673
[ "MIT" ]
2
2021-12-21T16:21:46.000Z
2022-01-22T21:45:53.000Z
"""Top-level package for BakpdlBot.""" __author__ = """Mick Boekhoff""" __email__ = 'mickboekhoff@hotmail.com' __version__ = '0.1.0'
22.333333
38
0.701493
16
134
5.125
0.9375
0
0
0
0
0
0
0
0
0
0
0.02521
0.11194
134
5
39
26.8
0.663866
0.238806
0
0
0
0
0.4375
0.25
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
910def4e47add096e31b3e2350c1440aeb04eedb
6,101
py
Python
venv/Lib/site-packages/traits/examples/introduction/2_initialization.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
1
2022-01-18T17:56:51.000Z
2022-01-18T17:56:51.000Z
venv/Lib/site-packages/traits/examples/introduction/2_initialization.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
null
null
null
venv/Lib/site-packages/traits/examples/introduction/2_initialization.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
null
null
null
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at http://www.enthought.com/licenses/BSD.txt # # Thanks for using Enthought open source! """ Initialization ============== If you have done any significant amount of object-oriented Python programming, you may have noticed that your ``__init__`` methods often have a lot of boilerplate. In our original example, the code copies all of the ``__init__`` arguments to corresponding attributes before doing any real work:: def __init__(self, filename, sample_id, date_aquired, operator, scan_size=(1e-5, 1e-5)): # initialize the primary attributes self.filename = filename self.sample_id = sample_id self.operator = operator self.scan_size = scan_size Traits lets you avoid this boilerplate by defining a default ``__init__`` method that accepts keyword arguments that correspond to the declared traits. The Traits version of the ``Image`` class could potentially skip the ``__init__`` method entirely:: class Image(HasTraits): filename = File(exists=True) sample_id = Str() date_acquired = Date() operator = Str() scan_size = Tuple(Float, Float) # this works! image = Image( filename=filename, operator="Hannes", sample_id="0001", date_acquired=datetime.datetime.today(), scan_size=(1e-5, 1e-5), ) Default Values -------------- There are a couple of complications in the example that we need to take into account. The first is what happens if a user forgets to provide an initial value:: >>> image = Image( ... filename=filename, ... sample_id="0001", ... date_acquired=datetime.datetime.today(), ... scan_size=(1e-5, 1e-5), ... ) >>> image.operator "" As this example shows, the operator gets given a default value of the empty string ``""``. In fact every trait type comes with an default value. For numeric trait types, like ``Int`` and ``Float``, the default is 0. For ``Str`` trait types it is the empty string, for ``Bool`` traits it is ``False``, and so on. However, that might not be what you want as your default value. For example, you might want to instead flag that the operator has not been provided with the string ``"N/A"`` for "not available". Most trait types allow you to specify a default value as part of the declaration. So we could say:: operator = Str("N/A") and now if we omit ``operator`` from the arguments, we get:: >>> image.operator "N/A" Dynamic Defaults ---------------- The second complication comes from more complex initial values. For example, we could declare some arbitrary fixed date as the default value for ``date_acquired``:: date_acquired = Date(datetime.date(2020, 1, 1)) But it would be better if we could set it to a dynamic value. For example, a reasonable default would be today's date. You can provide this sort of dynamically declared default by using a specially-named method which has the pattern ``_<trait-name>_default`` and which returns the default value. So we could write:: def _date_acquired_default(self): return datetime.datetime.today() Dynamic defaults are best used for values which don't depend on other traits. For example, it might be tempting to have the ``image`` trait have a dynamic default which loads in the data. As we will see, this is almost always better handled by Traits observation and/or properties, which are discussed in subsequent sections of the tutorial. The ``traits_init`` Method -------------------------- Although you aren't required to write an ``__init__`` method in a ``HasTraits`` subclass, you can always choose to do so. If you do, you **must** call ``super()`` to ensure that Traits has a chance to set up its machinery. In our example the ``__init__`` method is also used to set up some auxilliary values. This doesn't have to change:: def __init__(self, **traits): super().__init__(**traits) # useful secondary attributes self.scan_width, self.scan_height = self.scan_size However Traits offers a slightlty more convenient way of doing this sort of post-initialization setup of state: you can define a ``traits_init`` method which the ``HasTraits`` class ensures is called as part of the main initialization process. When it has been called, all initial values will have been set:: def traits_init(self): # useful secondary attributes self.scan_width, self.scan_height = self.scan_size Exercise -------- In our original example, the ``scan_size`` atribute had a default value of ``(1e-5, 1e-5)``. Modify the code in the example so that the trait is initialized to this default using a dynamic default method. """ import datetime import os from traits.api import Array, Date, HasTraits, File, Float, Str, Tuple class Image(HasTraits): """ An SEM image stored in a file. """ filename = File(exists=True) sample_id = Str() date_acquired = Date() operator = Str("N/A") scan_size = Tuple(Float, Float) image = Array(shape=(None, None), dtype='uint8') def traits_init(self): # useful secondary attributes self.scan_width, self.scan_height = self.scan_size def _date_acquired_default(self): return datetime.datetime.today() # --------------------------------------------------------------------------- # Demo code # --------------------------------------------------------------------------- this_dir = os.path.dirname(__file__) image_dir = os.path.join(this_dir, "images") filename = os.path.join(image_dir, "sample_0001.png") # load the image image = Image( filename=filename, sample_id="0001", scan_size=(1e-5, 1e-5), ) # show all the defined traits image.print_traits()
31.611399
77
0.680708
874
6,101
4.647597
0.338673
0.023634
0.006155
0.007386
0.185623
0.162974
0.156081
0.140325
0.140325
0.114229
0
0.010638
0.19882
6,101
192
78
31.776042
0.820376
0.867727
0
0
0
0
0.042416
0
0
0
0
0
0
1
0.086957
false
0
0.130435
0.043478
0.565217
0.043478
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
911ccc1dd9e51c6e0ff1c95e2993fbc7c533e4d3
333
py
Python
auth/forms.py
amalshaji/amalytics
008034eb8e613da14a522ae5762c50922b2a4b6f
[ "MIT" ]
4
2021-06-18T03:33:07.000Z
2021-07-21T22:17:10.000Z
auth/forms.py
amalshaji/amalytics
008034eb8e613da14a522ae5762c50922b2a4b6f
[ "MIT" ]
6
2021-07-11T03:29:37.000Z
2021-07-11T03:29:43.000Z
auth/forms.py
amalshaji/amalytics
008034eb8e613da14a522ae5762c50922b2a4b6f
[ "MIT" ]
1
2021-07-10T07:00:56.000Z
2021-07-10T07:00:56.000Z
from flask_wtf import FlaskForm from wtforms import PasswordField from wtforms import StringField from wtforms.validators import DataRequired class LoginForm(FlaskForm): username = StringField("Username", validators=[DataRequired()]) password = PasswordField( "Password", validators=[DataRequired()], )
25.615385
67
0.744745
31
333
7.967742
0.451613
0.133603
0.137652
0
0
0
0
0
0
0
0
0
0.174174
333
12
68
27.75
0.898182
0
0
0
0
0
0.048048
0
0
0
0
0
0
1
0
false
0.3
0.4
0
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
2
911f8991cb8801a5a110797225e2af9bedc3d54f
147
py
Python
Test/test.py
Rainstyd/rainsty
9a0d5f46c20faf909c4194f315fb9960652cffc6
[ "Apache-2.0" ]
1
2020-03-25T01:13:35.000Z
2020-03-25T01:13:35.000Z
Test/test.py
Rainstyed/rainsty
f74e0ccaf16d1871c9d1870bd8a7c8a63243fcf5
[ "Apache-2.0" ]
1
2022-01-06T23:49:21.000Z
2022-01-06T23:49:21.000Z
Test/test.py
rainstyd/rainsty
9a0d5f46c20faf909c4194f315fb9960652cffc6
[ "Apache-2.0" ]
1
2020-03-20T08:48:36.000Z
2020-03-20T08:48:36.000Z
# test.py from datetime import datetime def main(): print(datetime.now()) print('Hello World!') if __name__ == '__main__': main()
11.307692
29
0.62585
18
147
4.666667
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.22449
147
12
30
12.25
0.736842
0.047619
0
0
0
0
0.144928
0
0
0
0
0
0
1
0.166667
true
0
0.166667
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
9124698f93c5a6edfa885d7a843914b4c72f884b
229
py
Python
moto/sns/__init__.py
Lilja/moto
3fca2c3b3126d18d07d743cb47feaccf264ab43e
[ "Apache-2.0" ]
null
null
null
moto/sns/__init__.py
Lilja/moto
3fca2c3b3126d18d07d743cb47feaccf264ab43e
[ "Apache-2.0" ]
null
null
null
moto/sns/__init__.py
Lilja/moto
3fca2c3b3126d18d07d743cb47feaccf264ab43e
[ "Apache-2.0" ]
null
null
null
import os from .models import sns_backends from ..core.models import base_decorator region_name = os.environ.get("AWS_DEFAULT_REGION", "us-east-1") sns_backend = sns_backends[region_name] mock_sns = base_decorator(sns_backends)
28.625
63
0.812227
36
229
4.861111
0.555556
0.188571
0
0
0
0
0
0
0
0
0
0.004808
0.091703
229
7
64
32.714286
0.836538
0
0
0
0
0
0.117904
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
9127dbbe7b52b6b231a5b4bac50b1f48ba1a7aff
1,394
py
Python
tests/conftest.py
ichigozero/traininfojp
cb6f4888369681cca3acac7d8e781dda4df4c935
[ "MIT" ]
null
null
null
tests/conftest.py
ichigozero/traininfojp
cb6f4888369681cca3acac7d8e781dda4df4c935
[ "MIT" ]
null
null
null
tests/conftest.py
ichigozero/traininfojp
cb6f4888369681cca3acac7d8e781dda4df4c935
[ "MIT" ]
null
null
null
import os import pytest from bs4 import BeautifulSoup from traininfojp import ( RailDetails, RailList, RailSummary, ) def test_file(filename): path = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'test_files', ) with open(os.path.join(path, filename), 'r') as f: return f.read() @pytest.fixture(scope='module') def rail_list_html(): return test_file('rail_list.html') @pytest.fixture def rail_list(): return RailList() @pytest.fixture def rail_list_init(rail_list_html): rail_list = RailList() rail_list._parsed_html = BeautifulSoup(rail_list_html, 'html.parser') return rail_list @pytest.fixture(scope='module') def rail_summary_html(): return test_file('rail_summary.html') @pytest.fixture def rail_summary(): return RailSummary() @pytest.fixture def rail_summary_init(rail_summary_html): rail_summary = RailSummary() rail_summary._parsed_html = BeautifulSoup(rail_summary_html, 'html.parser') return rail_summary @pytest.fixture(scope='module') def rail_details_html(): return test_file('rail_details.html') @pytest.fixture def rail_details(): return RailDetails() @pytest.fixture def rail_details_init(rail_details_html): rail_details = RailDetails() rail_details._parsed_html = BeautifulSoup(rail_details_html, 'html.parser') return rail_details
19.633803
79
0.726686
182
1,394
5.269231
0.203297
0.122002
0.100104
0.12513
0.416058
0.096976
0
0
0
0
0
0.000858
0.163558
1,394
70
80
19.914286
0.821612
0
0
0.1875
0
0
0.07891
0
0
0
0
0
0
1
0.208333
false
0
0.083333
0.125
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
9135035a53c1e47333733c6a01dbbe11faff27e5
5,059
py
Python
alipay/aop/api/response/AlipayPcreditLoanCollateralCarQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayPcreditLoanCollateralCarQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayPcreditLoanCollateralCarQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayPcreditLoanCollateralCarQueryResponse(AlipayResponse): def __init__(self): super(AlipayPcreditLoanCollateralCarQueryResponse, self).__init__() self._address = None self._apply_no = None self._car_brand_id = None self._car_color = None self._car_engine_no = None self._car_mileage = None self._car_model_id = None self._car_reg_date = None self._car_series_id = None self._car_vin = None self._cert_no = None self._cert_type = None self._created_time = None self._lic_plate_address = None self._lic_plate_no = None self._name = None @property def address(self): return self._address @address.setter def address(self, value): self._address = value @property def apply_no(self): return self._apply_no @apply_no.setter def apply_no(self, value): self._apply_no = value @property def car_brand_id(self): return self._car_brand_id @car_brand_id.setter def car_brand_id(self, value): self._car_brand_id = value @property def car_color(self): return self._car_color @car_color.setter def car_color(self, value): self._car_color = value @property def car_engine_no(self): return self._car_engine_no @car_engine_no.setter def car_engine_no(self, value): self._car_engine_no = value @property def car_mileage(self): return self._car_mileage @car_mileage.setter def car_mileage(self, value): self._car_mileage = value @property def car_model_id(self): return self._car_model_id @car_model_id.setter def car_model_id(self, value): self._car_model_id = value @property def car_reg_date(self): return self._car_reg_date @car_reg_date.setter def car_reg_date(self, value): self._car_reg_date = value @property def car_series_id(self): return self._car_series_id @car_series_id.setter def car_series_id(self, value): self._car_series_id = value @property def car_vin(self): return self._car_vin @car_vin.setter def car_vin(self, value): self._car_vin = value @property def cert_no(self): return self._cert_no @cert_no.setter def cert_no(self, value): self._cert_no = value @property def cert_type(self): return self._cert_type @cert_type.setter def cert_type(self, value): self._cert_type = value @property def created_time(self): return self._created_time @created_time.setter def created_time(self, value): self._created_time = value @property def lic_plate_address(self): return self._lic_plate_address @lic_plate_address.setter def lic_plate_address(self, value): self._lic_plate_address = value @property def lic_plate_no(self): return self._lic_plate_no @lic_plate_no.setter def lic_plate_no(self, value): self._lic_plate_no = value @property def name(self): return self._name @name.setter def name(self, value): self._name = value def parse_response_content(self, response_content): response = super(AlipayPcreditLoanCollateralCarQueryResponse, self).parse_response_content(response_content) if 'address' in response: self.address = response['address'] if 'apply_no' in response: self.apply_no = response['apply_no'] if 'car_brand_id' in response: self.car_brand_id = response['car_brand_id'] if 'car_color' in response: self.car_color = response['car_color'] if 'car_engine_no' in response: self.car_engine_no = response['car_engine_no'] if 'car_mileage' in response: self.car_mileage = response['car_mileage'] if 'car_model_id' in response: self.car_model_id = response['car_model_id'] if 'car_reg_date' in response: self.car_reg_date = response['car_reg_date'] if 'car_series_id' in response: self.car_series_id = response['car_series_id'] if 'car_vin' in response: self.car_vin = response['car_vin'] if 'cert_no' in response: self.cert_no = response['cert_no'] if 'cert_type' in response: self.cert_type = response['cert_type'] if 'created_time' in response: self.created_time = response['created_time'] if 'lic_plate_address' in response: self.lic_plate_address = response['lic_plate_address'] if 'lic_plate_no' in response: self.lic_plate_no = response['lic_plate_no'] if 'name' in response: self.name = response['name']
28.744318
116
0.642419
664
5,059
4.516566
0.076807
0.074692
0.074692
0.050684
0.205735
0
0
0
0
0
0
0.000272
0.273572
5,059
175
117
28.908571
0.815782
0.008302
0
0.10596
0
0
0.065803
0
0
0
0
0
0
1
0.225166
false
0
0.013245
0.10596
0.350993
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
913ca167b3590f16d00b9a08e3e41ef38ec4857e
826
py
Python
testcases/elichika_tests/node/Unpooling2D.py
vermashresth/chainer-compiler
5f5ad365d14398d6ae0214fa012eb10360db8e7e
[ "MIT" ]
116
2019-01-25T03:54:44.000Z
2022-03-08T00:11:14.000Z
testcases/elichika_tests/node/Unpooling2D.py
vermashresth/chainer-compiler
5f5ad365d14398d6ae0214fa012eb10360db8e7e
[ "MIT" ]
431
2019-01-25T10:18:44.000Z
2020-06-17T05:28:55.000Z
testcases/elichika_tests/node/Unpooling2D.py
vermashresth/chainer-compiler
5f5ad365d14398d6ae0214fa012eb10360db8e7e
[ "MIT" ]
26
2019-01-25T07:21:09.000Z
2021-11-26T04:24:35.000Z
# coding: utf-8 import chainer import chainer.functions as F class Unpooling2D(chainer.Chain): def forward(self, x): y = F.unpooling_2d(x, 2, cover_all=False) return y class Unpooling2D_3x4(chainer.Chain): def forward(self, x): y = F.unpooling_2d(x, (3, 4), cover_all=False) return y # ====================================== import numpy as np from chainer_compiler.elichika import testtools def main(): x = np.random.rand(2, 3, 11, 7).astype(np.float32) testtools.generate_testcase(Unpooling2D, [x]) testtools.generate_testcase(Unpooling2D_3x4, [x], subname='3x4') # The largest input in FPN. x = np.random.rand(1, 256, 100, 100).astype(np.float32) testtools.generate_testcase(Unpooling2D, [x], subname='large') if __name__ == '__main__': main()
23.6
68
0.642857
113
826
4.539823
0.469027
0.099415
0.146199
0.210526
0.440546
0.362573
0.362573
0.362573
0.159844
0.159844
0
0.053731
0.188862
826
34
69
24.294118
0.71194
0.094431
0
0.2
0
0
0.021505
0
0
0
0
0
0
1
0.15
false
0
0.2
0
0.55
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
914abafe66d928a67735cf891c101bb439281767
832
py
Python
cert_manager/tests/common.py
anshumgargdd/integrations-extras
a16b0c5324cc8b69e289cdf46c064d1c5574a415
[ "BSD-3-Clause" ]
null
null
null
cert_manager/tests/common.py
anshumgargdd/integrations-extras
a16b0c5324cc8b69e289cdf46c064d1c5574a415
[ "BSD-3-Clause" ]
null
null
null
cert_manager/tests/common.py
anshumgargdd/integrations-extras
a16b0c5324cc8b69e289cdf46c064d1c5574a415
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2019 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from datadog_checks.base.stubs import aggregator EXPECTED_METRICS = { 'cert_manager.certificate.ready_status': aggregator.GAUGE, 'cert_manager.certificate.expiration_timestamp': aggregator.GAUGE, 'cert_manager.http_acme_client.request.count': aggregator.MONOTONIC_COUNT, 'cert_manager.http_acme_client.request.duration.sum': aggregator.GAUGE, 'cert_manager.http_acme_client.request.duration.count': aggregator.GAUGE, 'cert_manager.http_acme_client.request.duration.quantile': aggregator.GAUGE, 'cert_manager.controller.sync_call.count': aggregator.MONOTONIC_COUNT, 'cert_manager.prometheus.health': aggregator.GAUGE, } MOCK_INSTANCE = { 'prometheus_url': 'http://fake.tld/prometheus', }
41.6
80
0.783654
103
832
6.087379
0.495146
0.140351
0.151515
0.207337
0.424242
0.424242
0.314195
0.250399
0.175439
0
0
0.006711
0.104567
832
19
81
43.789474
0.834899
0.120192
0
0
0
0
0.537088
0.482143
0
0
0
0
0
1
0
false
0
0.071429
0
0.071429
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
91526f193ee126de03d683619d2f19f5b3546618
857
py
Python
multi-pose/CustomRenderers.py
shbe-aau/multi-pose-estimation
0425ed9dcc7969f0281cb435615abc33c640e157
[ "MIT" ]
4
2021-12-28T09:25:06.000Z
2022-01-13T12:55:44.000Z
multi-pose/CustomRenderers.py
shbe-aau/multi-view-pose-estimation
22cea6cd09684fe655fb2214bc14856f589048e1
[ "MIT" ]
null
null
null
multi-pose/CustomRenderers.py
shbe-aau/multi-view-pose-estimation
22cea6cd09684fe655fb2214bc14856f589048e1
[ "MIT" ]
1
2022-01-13T13:00:15.000Z
2022-01-13T13:00:15.000Z
import torch import torch.nn as nn from pytorch3d.renderer.blending import softmax_rgb_blend from pytorch3d.renderer.blending import sigmoid_alpha_blend class HardDepthShader(nn.Module): def __init__(self): super().__init__() def forward(self, fragments, meshes, **kwargs) -> torch.Tensor: image = fragments.zbuf[..., 0] return image class SoftDepthShader(nn.Module): def __init__(self, blend_params=None): super().__init__() self.blend_params = blend_params if blend_params is not None else BlendParams() def forward(self, fragments, meshes, **kwargs) -> torch.Tensor: colors = torch.stack([fragments.zbuf,fragments.zbuf,fragments.zbuf]).permute(1,2,3,4,0) images = softmax_rgb_blend(colors, fragments, self.blend_params) print(images.shape) return images[...,2]
34.28
95
0.700117
109
857
5.256881
0.431193
0.095986
0.078534
0.101222
0.34904
0.160558
0.160558
0.160558
0
0
0
0.012894
0.185531
857
24
96
35.708333
0.808023
0
0
0.210526
0
0
0
0
0
0
0
0
0
1
0.210526
false
0
0.210526
0
0.631579
0.052632
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
e670c4c8354f4067eb21c9b1fce708147c162967
1,779
py
Python
tensorflow/contrib/data/python/ops/random_ops.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/contrib/data/python/ops/random_ops.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/contrib/data/python/ops/random_ops.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
26
2017-04-12T16:25:44.000Z
2018-10-30T10:10:15.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Datasets for random number generators.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.data.ops import dataset_ops from tensorflow.python.data.util import random_seed from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.python.ops import gen_dataset_ops class RandomDataset(dataset_ops.Dataset): """A `Dataset` of pseudorandom values.""" def __init__(self, seed=None): """A `Dataset` of pseudorandom values.""" super(RandomDataset, self).__init__() self._seed, self._seed2 = random_seed.get_seed(seed) def _as_variant_tensor(self): return gen_dataset_ops.random_dataset( seed=self._seed, seed2=self._seed2, **dataset_ops.flat_structure(self)) @property def output_classes(self): return ops.Tensor @property def output_shapes(self): return tensor_shape.scalar() @property def output_types(self): return dtypes.int64
33.566038
80
0.730185
236
1,779
5.309322
0.466102
0.047885
0.09577
0.069433
0.128492
0
0
0
0
0
0
0.008598
0.150084
1,779
52
81
34.211538
0.820106
0.433952
0
0.111111
0
0
0
0
0
0
0
0
0
1
0.185185
false
0
0.333333
0.148148
0.703704
0.037037
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
0
0
0
2
e67825e4bae70e874b5303cdf700fe1e985924c8
1,990
py
Python
src/abaqus/DisplayGroup/LeafFromNodeLabels.py
Haiiliin/PyAbaqus
f20db6ebea19b73059fe875a53be370253381078
[ "MIT" ]
7
2022-01-21T09:15:45.000Z
2022-02-15T09:31:58.000Z
src/abaqus/DisplayGroup/LeafFromNodeLabels.py
Haiiliin/PyAbaqus
f20db6ebea19b73059fe875a53be370253381078
[ "MIT" ]
null
null
null
src/abaqus/DisplayGroup/LeafFromNodeLabels.py
Haiiliin/PyAbaqus
f20db6ebea19b73059fe875a53be370253381078
[ "MIT" ]
null
null
null
from abaqusConstants import * from .Leaf import Leaf class LeafFromNodeLabels(Leaf): """The LeafFromNodeLabels object can be used whenever a Leaf object is expected as an argument. Leaf objects are used to specify the items in a display group. Leaf objects are constructed as temporary objects, which are then used as arguments to DisplayGroup commands. The LeafFromNodeLabels object is derived from the Leaf object. Attributes ---------- leafType: SymbolicConstant A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. Notes ----- This object can be accessed by: .. code-block:: python import displayGroupOdbToolset """ # A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, # DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. leafType: SymbolicConstant = None def __init__(self, partInstanceName: str, nodeLabels: tuple): """This method creates a Leaf object from a sequence of node labels that belong to a single part instance. Notes ----- This function can be accessed by: .. code-block:: python LeafFromNodeLabels Parameters ---------- partInstanceName A String specifying the name of the part instance to which *nodeLabels* refers. nodeLabels A sequence of Strings specifying expressions that denote node labels. The expression can be any of the following:An Int specifying a single node label; for example, `1`.A String specifying a single node label; for example, `'7'`.A String specifying a sequence of node labels; for example, `'3:5'` and `'3:15:3'`. Returns ------- A LeafFromNodeLabels object. """ super().__init__(DEFAULT_MODEL) pass
33.166667
101
0.654271
236
1,990
5.436441
0.419492
0.015588
0.025721
0.046765
0.305534
0.272798
0.272798
0.169914
0.169914
0.169914
0
0.005575
0.278894
1,990
59
102
33.728814
0.888502
0.745729
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0.142857
0.285714
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
e683ebd373b7cb16aaaeaf19e4cbc5b01566dbf5
2,884
py
Python
i18n_model/admin.py
anndro/django-i18n-model
9e260a993327751598b6941c57d0235b6f338cab
[ "BSD-2-Clause" ]
null
null
null
i18n_model/admin.py
anndro/django-i18n-model
9e260a993327751598b6941c57d0235b6f338cab
[ "BSD-2-Clause" ]
null
null
null
i18n_model/admin.py
anndro/django-i18n-model
9e260a993327751598b6941c57d0235b6f338cab
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from django.contrib.auth import get_permission_codename from django.forms.models import BaseInlineFormSet def i18n_formset_factory(languages=[]): # Create an ad-hoc form set class I18nFormSet(BaseInlineFormSet): def __init__(self, *args, **kwargs): kwargs['initial'] = [{'i18n_language': l} for l in languages] super(I18nFormSet, self).__init__(*args, **kwargs) return I18nFormSet class I18nInlineMixin(object): max_num = len(settings.LANGUAGES) - 1 def get_existing_translation(self, obj=None): if not obj or not obj.pk: return [] return obj.translations.get_available_languages() def get_untranslated_languages(self, obj=None): if not obj or not obj.pk: return [lang[0] for lang in settings.LANGUAGES if lang[0] != settings.LANGUAGE_CODE] else: translated = obj.translations.get_available_languages() return [lang[0] for lang in settings.LANGUAGES if lang[0] not in translated and lang[0] != settings.LANGUAGE_CODE] def get_extra(self, request, obj=None, **kwargs): existing_translations = self.get_existing_translation(obj) return len(settings.LANGUAGES) - 1 - len(existing_translations) def get_formset(self, request, obj=None, **kwargs): untranslated = self.get_untranslated_languages(obj) # Override the argument passed to superclass' get_formset method so # that our ad-hoc form set is used instead. kwargs['formset'] = i18n_formset_factory(untranslated) kwargs['extra'] = self.get_extra(request, obj) return super(I18nInlineMixin, self).get_formset(request, obj, **kwargs) # For inline forms to show up, Django checks whether the user # has permissions for the related model. In the most basic case, # `I18nModel`s wouldn't have their own permissions - so below we # make sure to inherit the permissions of the source model. def get_source_meta(self): source_field = self.model._meta.get_field_by_name('i18n_source')[0] return source_field.rel.to._meta def has_add_permission(self, request): opts = self.get_source_meta() codename = get_permission_codename('add', opts) return request.user.has_perm("%s.%s" % (opts.app_label, codename)) def has_change_permission(self, request, obj=None): opts = self.get_source_meta() codename = get_permission_codename('change', opts) return request.user.has_perm("%s.%s" % (opts.app_label, codename)) def has_delete_permission(self, request, obj=None): opts = self.get_source_meta() codename = get_permission_codename('delete', opts) return request.user.has_perm("%s.%s" % (opts.app_label, codename))
41.797101
79
0.674757
372
2,884
5.040323
0.306452
0.026133
0.0448
0.0384
0.365333
0.277333
0.277333
0.277333
0.277333
0.250667
0
0.012567
0.227462
2,884
68
80
42.411765
0.828995
0.130721
0
0.212766
0
0
0.029212
0
0
0
0
0
0
1
0.212766
false
0
0.06383
0
0.574468
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
e68622d4f95881f4a4d4cad57f0d45928bdfdc84
294
py
Python
badbrowser/urls.py
hzlf/django-easy-badbrowser
a9d905fc10b6f8ba4c441eca8001b60462657be5
[ "MIT" ]
null
null
null
badbrowser/urls.py
hzlf/django-easy-badbrowser
a9d905fc10b6f8ba4c441eca8001b60462657be5
[ "MIT" ]
null
null
null
badbrowser/urls.py
hzlf/django-easy-badbrowser
a9d905fc10b6f8ba4c441eca8001b60462657be5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import ignore, UnsupportedBrowser urlpatterns = patterns("", #url(r"^$", UnsupportedBrowser.as_view(), name="django-badbrowser-unsupported"), url(r"^ignore/$", ignore, name="django-badbrowser-ignore"), )
26.727273
84
0.697279
34
294
6
0.588235
0.107843
0.196078
0
0
0
0
0
0
0
0
0.003876
0.122449
294
10
85
29.4
0.786822
0.340136
0
0
0
0
0.172775
0.125654
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
e6882a307c060b0b56c64ed9935260128932c7c5
3,011
py
Python
demom2m100.py
AK391/m2m100
f81abbe033ff56dff6271638d6502ac9462ef7bb
[ "MIT" ]
null
null
null
demom2m100.py
AK391/m2m100
f81abbe033ff56dff6271638d6502ac9462ef7bb
[ "MIT" ]
1
2021-06-13T01:02:01.000Z
2021-06-13T01:02:01.000Z
demom2m100.py
AK391/m2m100
f81abbe033ff56dff6271638d6502ac9462ef7bb
[ "MIT" ]
1
2021-05-06T08:33:54.000Z
2021-05-06T08:33:54.000Z
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer import gradio as gr model = M2M100ForConditionalGeneration.from_pretrained("facebook/m2m100_418M") tokenizer = M2M100Tokenizer.from_pretrained("facebook/m2m100_418M") def translate(text, inlang, outlang): tokenizer.src_lang = inlang encoded_hi = tokenizer(text, return_tensors="pt") generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.get_lang_id(outlang)) return tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0] inputs = [ gr.inputs.Textbox(lines=5, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Language", placeholder="en"), gr.inputs.Textbox(lines=1, label="Output Language", placeholder="fr") ] outputs = gr.outputs.Textbox(label="Output Text") title = "m2m100" description = "demo for Facebook AI m2m100. To use it, simply add your text, or click one of the examples to load them. Read more at the links below." article = """<p style='text-align: center'><a href='https://arxiv.org/abs/2010.11125'>Beyond English-Centric Multilingual Machine Translation</a> | <a href='https://github.com/pytorch/fairseq'>Github Repo</a> | Available Languages Afrikaans (af), Amharic (am), Arabic (ar), Asturian (ast), Azerbaijani (az), Bashkir (ba), Belarusian (be), Bulgarian (bg), Bengali (bn), Breton (br), Bosnian (bs), Catalan; Valencian (ca), Cebuano (ceb), Czech (cs), Welsh (cy), Danish (da), German (de), Greeek (el), English (en), Spanish (es), Estonian (et), Persian (fa), Fulah (ff), Finnish (fi), French (fr), Western Frisian (fy), Irish (ga), Gaelic; Scottish Gaelic (gd), Galician (gl), Gujarati (gu), Hausa (ha), Hebrew (he), Hindi (hi), Croatian (hr), Haitian; Haitian Creole (ht), Hungarian (hu), Armenian (hy), Indonesian (id), Igbo (ig), Iloko (ilo), Icelandic (is), Italian (it), Japanese (ja), Javanese (jv), Georgian (ka), Kazakh (kk), Central Khmer (km), Kannada (kn), Korean (ko), Luxembourgish; Letzeburgesch (lb), Ganda (lg), Lingala (ln), Lao (lo), Lithuanian (lt), Latvian (lv), Malagasy (mg), Macedonian (mk), Malayalam (ml), Mongolian (mn), Marathi (mr), Malay (ms), Burmese (my), Nepali (ne), Dutch; Flemish (nl), Norwegian (no), Northern Sotho (ns), Occitan (post 1500) (oc), Oriya (or), Panjabi; Punjabi (pa), Polish (pl), Pushto; Pashto (ps), Portuguese (pt), Romanian; Moldavian; Moldovan (ro), Russian (ru), Sindhi (sd), Sinhala; Sinhalese (si), Slovak (sk), Slovenian (sl), Somali (so), Albanian (sq), Serbian (sr), Swati (ss), Sundanese (su), Swedish (sv), Swahili (sw), Tamil (ta), Thai (th), Tagalog (tl), Tswana (tn), Turkish (tr), Ukrainian (uk), Urdu (ur), Uzbek (uz), Vietnamese (vi), Wolof (wo), Xhosa (xh), Yiddish (yi), Yoruba (yo), Chinese (zh), Zulu (zu)</p>""" examples = [ ["Life is like a box of chocolate.", "en", "fr"], ["How many miles is it from Earth to Neptune?", "en", "fr"] ] gr.Interface(translate, inputs, outputs, title=title, description=description, article=article, examples=examples).launch()
77.205128
230
0.706742
417
3,011
5.059952
0.769784
0.011374
0.021327
0.028436
0.054976
0.024645
0
0
0
0
0
0.020865
0.124543
3,011
39
231
77.205128
0.77959
0
0
0
0
0.3125
0.692563
0
0
0
0
0
0
1
0.03125
false
0
0.0625
0
0.125
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e69a7cc868d278888616c2fd97398aeed1c42ec7
9,643
py
Python
importer/views_api.py
brand-fabian/varfish-server
6a084d891d676ff29355e72a29d4f7b207220283
[ "MIT" ]
null
null
null
importer/views_api.py
brand-fabian/varfish-server
6a084d891d676ff29355e72a29d4f7b207220283
[ "MIT" ]
null
null
null
importer/views_api.py
brand-fabian/varfish-server
6a084d891d676ff29355e72a29d4f7b207220283
[ "MIT" ]
null
null
null
"""API views for the importer models.""" import logging from bgjobs.models import BackgroundJob from django.contrib.auth import get_user_model from django.db import transaction from projectroles.views import ProjectPermissionMixin from projectroles.views_api import SODARAPIBaseProjectMixin, SODARAPIGenericProjectMixin from rest_framework.generics import ( ListCreateAPIView, RetrieveUpdateDestroyAPIView, RetrieveDestroyAPIView, ) from . import tasks from .models import CaseImportInfo, VariantSetImportInfo, CaseImportState, ImportCaseBgJob from .serializers import ( CaseImportInfoSerializer, VariantSetImportInfoSerializer, BamQcFileSerializer, DatabaseInfoFileSerializer, EffectFileSerializer, GenotypeFileSerializer, ) #: Logger to use in this module. LOGGER = logging.getLogger(__name__) #: The User model to use. User = get_user_model() class CaseImportInfoListCreateView(SODARAPIGenericProjectMixin, ListCreateAPIView): """DRF list-create API view the ``CaseImportInfo`` model.""" serializer_class = CaseImportInfoSerializer def get_queryset(self): qs = CaseImportInfo.objects.filter(project=self.get_project()) # All users with project access can see the cases, or limit case list to a given owner if "owner" in self.request.query_params: try: qs = qs.filter(owner=User.objects.get(username=self.request.query_params["owner"])) except User.DoesNotExist: qs = qs.none() return qs def get_permission_required(self): if self.request.method == "POST": return "importer.add_import" else: return "importer.view_import" class CaseImportInfoRetrieveUpdateDestroyView( SODARAPIGenericProjectMixin, RetrieveUpdateDestroyAPIView ): """DRF retrieve-update-destroy API view for the ``CaseImportInfo`` model.""" lookup_field = "sodar_uuid" lookup_url_kwarg = "caseimportinfo" serializer_class = CaseImportInfoSerializer def perform_update(self, serializer): old_state = self.get_object().state new_state = serializer.validated_data.get("state", old_state) # React on change to submitted. job = None with transaction.atomic(): new_obj = serializer.save() if ( old_state != CaseImportState.SUBMITTED.value and new_state == CaseImportState.SUBMITTED.value ): LOGGER.info("Submitting background job for case %s", new_obj.name) base_job = BackgroundJob.objects.create( name="Import of case %s" % new_obj.name, project=new_obj.project, job_type=ImportCaseBgJob.spec_name, user=self.request.user, ) job = ImportCaseBgJob.objects.create( project=new_obj.project, import_info=new_obj, bg_job=base_job ) if job: tasks.run_import_case_bg_job.delay(pk=job.id) def get_queryset(self): return CaseImportInfo.objects.filter(project=self.get_project()) def get_permission_required(self): if self.request.method == "GET": return "importer.view_import" elif self.request.method == "DELETE": return "importer.delete_import" else: return "importer.update_import" class RelatedMixin: """Helper mixin for setting up serializer context and queryset.""" related_class = None related_lookup_field = None related_lookup_url_kwarg = None def get_serializer_context(self): result = super().get_serializer_context() result[self.related_lookup_field] = self.related_class.objects.get( sodar_uuid=self.kwargs[self.related_lookup_url_kwarg] ) return result def get_queryset(self): obj = self.related_class.objects.get(sodar_uuid=self.kwargs[self.related_lookup_url_kwarg]) return self.serializer_class.Meta.model.objects.filter(**{self.related_lookup_field: obj}) class VariantSetImportBaseMixin(SODARAPIBaseProjectMixin, RelatedMixin): serializer_class = VariantSetImportInfoSerializer related_class = CaseImportInfo related_lookup_field = "case_import_info" related_lookup_url_kwarg = "caseimportinfo" class VariantSetImportInfoListCreateView(VariantSetImportBaseMixin, ListCreateAPIView): """DRF list-create API view the ``VariantSetImportInfo`` model.""" def get_permission_required(self): if self.request.method == "POST": return "importer.add_import" else: return "importer.view_import" class VariantSetImportInfoRetrieveUpdateDestroyView( VariantSetImportBaseMixin, RetrieveUpdateDestroyAPIView ): """DRF retrieve-update-destroy API view for the ``VariantSetImportInfo`` model.""" lookup_field = "sodar_uuid" lookup_url_kwarg = "variantsetimportinfo" def get_permission_required(self): if self.request.method == "GET": return "importer.view_import" elif self.request.method == "DELETE": return "importer.delete_import" else: return "importer.update_import" class BamQcFileBaseMixin(SODARAPIBaseProjectMixin, RelatedMixin): serializer_class = BamQcFileSerializer related_class = CaseImportInfo related_lookup_field = "case_import_info" related_lookup_url_kwarg = "caseimportinfo" class BamQcFileListCreateView(BamQcFileBaseMixin, ListCreateAPIView): """DRF list-create API view the ``BamQcFile`` model.""" def get_permission_required(self): if self.request.method == "POST": return "importer.add_import" else: return "importer.view_import" class BamQcFileRetrieveDestroyView(BamQcFileBaseMixin, RetrieveDestroyAPIView): """DRF retrieve-update-destroy API view for the ``BamQcFile`` model.""" lookup_field = "sodar_uuid" lookup_url_kwarg = "bamqcfile" def get_permission_required(self): if self.request.method == "GET": return "importer.view_import" elif self.request.method == "DELETE": return "importer.delete_import" else: return "importer.update_import" class GenotypeFileBaseMixin(SODARAPIBaseProjectMixin, RelatedMixin): serializer_class = GenotypeFileSerializer related_class = VariantSetImportInfo related_lookup_field = "variant_set_import_info" related_lookup_url_kwarg = "variantsetimportinfo" class GenotypeFileListCreateView(GenotypeFileBaseMixin, ListCreateAPIView): """DRF list-create API view the ``GenotypeFile`` model.""" def get_permission_required(self): if self.request.method == "POST": return "importer.add_import" else: return "importer.view_import" class GenotypeFileRetrieveDestroyView(GenotypeFileBaseMixin, RetrieveDestroyAPIView): """DRF retrieve-update-destroy API view for the ``GenotypeFile`` model.""" lookup_field = "sodar_uuid" lookup_url_kwarg = "genotypefile" def get_permission_required(self): if self.request.method == "GET": return "importer.view_import" elif self.request.method == "DELETE": return "importer.delete_import" else: return "importer.update_import" class EffectsFileBaseMixin(SODARAPIBaseProjectMixin, RelatedMixin): serializer_class = EffectFileSerializer related_class = VariantSetImportInfo related_lookup_field = "variant_set_import_info" related_lookup_url_kwarg = "variantsetimportinfo" class EffectsFileListCreateView(EffectsFileBaseMixin, ListCreateAPIView): """DRF list-create API view the ``EffectsFile`` model.""" def get_permission_required(self): if self.request.method == "POST": return "importer.add_import" else: return "importer.view_import" class EffectsFileRetrieveDestroyView(EffectsFileBaseMixin, RetrieveDestroyAPIView): """DRF retrieve-update-destroy API view for the ``EffectsFile`` model.""" lookup_field = "sodar_uuid" lookup_url_kwarg = "effectsfile" def get_permission_required(self): if self.request.method == "GET": return "importer.view_import" elif self.request.method == "DELETE": return "importer.delete_import" else: return "importer.update_import" class DatabaseInfoFileBaseMixin(SODARAPIBaseProjectMixin, RelatedMixin): serializer_class = DatabaseInfoFileSerializer related_class = VariantSetImportInfo related_lookup_field = "variant_set_import_info" related_lookup_url_kwarg = "variantsetimportinfo" class DatabaseInfoFileListCreateView(DatabaseInfoFileBaseMixin, ListCreateAPIView): """DRF list-create API view the ``DatabaseInfoFile`` model.""" def get_permission_required(self): if self.request.method == "POST": return "importer.add_import" else: return "importer.view_import" class DatabaseInfoFileRetrieveDestroyView(DatabaseInfoFileBaseMixin, RetrieveDestroyAPIView): """DRF retrieve-update-destroy API view for the ``DatabaseInfoFile`` model.""" lookup_field = "sodar_uuid" lookup_url_kwarg = "databaseinfofile" def get_permission_required(self): if self.request.method == "GET": return "importer.view_import" elif self.request.method == "DELETE": return "importer.delete_import" else: return "importer.update_import"
33.023973
99
0.69916
951
9,643
6.885384
0.174553
0.064142
0.046732
0.043983
0.50336
0.498778
0.498778
0.447465
0.411729
0.355834
0
0
0.217049
9,643
291
100
33.137457
0.867285
0.105569
0
0.517949
0
0
0.128172
0.038943
0
0
0
0
0
1
0.087179
false
0
0.394872
0.005128
0.938462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
e6a3b7cb7ce1e3d16f61a93cf370e1331cd06ca1
351
py
Python
nipy/algorithms/statistics/classification.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
1
2015-08-22T16:14:45.000Z
2015-08-22T16:14:45.000Z
nipy/algorithms/statistics/classification.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
nipy/algorithms/statistics/classification.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
""" TODO """ __docformat__ = 'restructuredtext' from nipy.fixes.scipy.stats.models.model import Model class Classifier(Model): """ TODO """ def learn(self, **keywords): """ :Parameters: keywords : ``dict`` TODO :Returns: ``None`` """ self.fit(**keywords)
15.954545
53
0.495726
29
351
5.862069
0.758621
0
0
0
0
0
0
0
0
0
0
0
0.353276
351
21
54
16.714286
0.748899
0.225071
0
0
0
0
0.079208
0
0
0
0
0.142857
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
2
e6a99d5a20da069b77e35ffdd0c1321d9c0307c8
21,873
py
Python
ocpp/v201/datatypes.py
mdwcrft/ocpp
2945d49ad93e52f9ac2ba6467fc2b7b7e06df9c5
[ "MIT" ]
null
null
null
ocpp/v201/datatypes.py
mdwcrft/ocpp
2945d49ad93e52f9ac2ba6467fc2b7b7e06df9c5
[ "MIT" ]
null
null
null
ocpp/v201/datatypes.py
mdwcrft/ocpp
2945d49ad93e52f9ac2ba6467fc2b7b7e06df9c5
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import Optional from ocpp.v201 import enums @dataclass class ACChargingParametersType: """ EV AC charging parameters. ACChargingParametersType is used by: ChargingNeedsType """ energy_amount: int ev_min_current: int ev_max_current: int ev_max_voltage: int @dataclass class AdditionalInfoType: """ Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. AdditionalInfoType is used by: IdTokenType """ additional_id_token: str type: str @dataclass class APNType: """ Collection of configuration data needed to make a data-connection over a cellular network. APNType is used by: SetNetworkProfileRequest.NetworkConnectionProfileType """ apn: str apn_authentication: enums.APNAuthenticationType apn_user_name: Optional[str] = None apn_password: Optional[str] = None sim_pin: Optional[int] = None preferred_network: Optional[str] = None use_only_preferred_network: Optional[bool] = None @dataclass class CertificateHashDataType: """ CertificateHashDataType is used by: CertificateHashDataChainType, DeleteCertificateRequest, CustomerInformationRequest """ hash_algorithm: enums.HashAlgorithmType issuer_name_hash: str issuer_key_hash: str serial_number: str @dataclass class CertificateHashDataChainType: """ CertificateHashDataChainType is used by: GetInstalledCertificateIdsResponse """ certificate_type: enums.GetCertificateIdUseType certificate_hash_data: CertificateHashDataType child_certificate_hash_data: CertificateHashDataType @dataclass class ChargingLimitType: """ChargingLimitType is used by: NotifyChargingLimitRequest""" charging_limit_source: enums.ChargingLimitSourceType is_grid_critical: Optional[bool] = None @dataclass class DCChargingParametersType: """ EV DC charging parameters DCChargingParametersType is used by: ChargingNeedsType """ ev_max_current: int ev_max_voltage: int energy_amount: Optional[int] = None ev_max_power: Optional[int] = None state_of_charge: Optional[int] = None ev_energy_capacity: Optional[int] = None full_soc: Optional[int] = None bulk_soc: Optional[int] = None @dataclass class ChargingNeedsType: """ ChargingNeedsType is used by: NotifyEVChargingNeedsRequest """ request_energy_transfer: enums.EnergyTransferModeType departure_time: Optional[str] = None ac_charging_parameters: Optional[ACChargingParametersType] = None dc_charging_parameters: Optional[DCChargingParametersType] = None @dataclass class ChargingProfileCriterionType: """ A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. ChargingProfileCriterionType is used by: GetChargingProfilesRequest """ charging_profile_purpose: Optional[enums.ChargingProfilePurposeType] = None stack_level: Optional[int] = None charging_profile_id: Optional[int] = None charging_limit_source: Optional[enums.ChargingLimitSourceType] = None @dataclass class ChargingSchedulePeriodType: """ Charging schedule period structure defines a time period in a charging schedule. ChargingSchedulePeriodType is used by: ChargingScheduleType, CompositeScheduleType """ start_period: int limit: float number_phases: Optional[int] = None phase_to_use: Optional[int] = None @dataclass class RelativeTimeIntervalType: """RelativeTimeIntervalType is used by: SalesTariffEntryType""" start: int duration: Optional[int] = None @dataclass class CostType: """ CostType is used by: ConsumptionCostType """ cost_kind: enums.CostKindType amount: int amount_multiplier: Optional[int] = None @dataclass class ConsumptionCostType: """ ConsumptionCostType is used by: SalesTariffEntryType """ start_value: float cost: CostType @dataclass class SalesTariffEntryType: """SalesTariffEntryType is used by: SalesTariffType""" relative_time_interval: RelativeTimeIntervalType consumption_cost: Optional[ConsumptionCostType] = None e_price_level: Optional[int] = None @dataclass class SalesTariffType: """ This dataType is based on dataTypes from ISO 15118-2. SalesTariffType is used by: ChargingScheduleType """ id: int sales_tariff_entry: SalesTariffEntryType sales_tariff_description: Optional[str] = None num_e_price_levels: Optional[int] = None @dataclass class ChargingScheduleType: """ Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. ChargingScheduleType is used by: ChargingProfileType, NotifyChargingLimitRequest, NotifyEVChargingScheduleRequest """ id: int charging_rate_unit: enums.ChargingRateUnitType charging_schedule_period: ChargingSchedulePeriodType start_schedule: Optional[str] = None duration: Optional[int] = None min_charging_rate: Optional[float] = None sales_tariff: Optional[SalesTariffType] = None @dataclass class ChargingProfileType: """ A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. ChargingProfileType is used by: RequestStartTransactionRequest, SetChargingProfileRequest, ReportChargingProfilesRequest """ id: int stack_level: int charging_profile_purpose: enums.ChargingProfilePurposeType charging_profile_kind: enums.ChargingProfileKindType charging_schedule: ChargingScheduleType valid_from: Optional[str] = None valid_to: Optional[str] = None transaction_id: Optional[str] = None recurrency_kind: Optional[enums.RecurrencyKindType] = None @dataclass class ClearChargingProfileType: """ A ChargingProfile consists of a ChargingSchedule, describing the amount of power or current that can be delivered per time interval. ClearChargingProfileType is used by: ClearChargingProfileRequest """ evse_id: Optional[int] = None charging_profile_purpose: Optional[enums.ChargingProfilePurposeType] = None stack_level: Optional[int] = None @dataclass class StatusInfoType: """ Element providing more information about the status. StatusInfoType is used by: ClearMonitoringResultType, BootNotificationResponse, CancelReservationResponse, TriggerMessageResponse, UnlockConnectorResponse, UpdateFirmwareResponse, ClearDisplayMessageResponse, Get15118EVCertificateResponse, GetCompositeScheduleResponse, ChangeAvailabilityResponse, GetLogResponse, ClearChargingProfileResponse, NotifyEVChargingNeedsResponse, ClearCacheResponse, NotifyEVChargingScheduleResponse, RequestStartTransactionResponse, RequestStopTransactionResponse, SetChargingProfileResponse, SetDisplayMessageResponse, SetNetworkProfileResponse, SignCertificateResponse, DataTransferResponse, CertificateSignedResponse, DeleteCertificateResponse, GetChargingProfilesResponse, GetInstalledCertificateIdsResponse, InstallCertificateResponse, GetBaseReportResponse, GetMonitoringReportResponse, GetReportResponse, GetVariablesResponse.GetVariableResultType, ReserveNowResponse, SetMonitoringBaseResponse, SetMonitoringLevelResponse, SetVariableMonitoringResponse.SetMonitoringResultType, SetVariablesResponse.SetVariableResultType, PublishFirmwareResponse, GetCertificateStatusResponse, ResetResponse, GetDisplayMessagesResponse, CustomerInformationResponse, SendLocalListResponse """ reason_code: str additional_info: Optional[str] = None @dataclass class ClearMonitoringResultType: """ ClearMonitoringResultType is used by: ClearVariableMonitoringResponse """ status: enums.ClearMonitoringStatusType id: int status_info: Optional[StatusInfoType] = None @dataclass class EVSEType: """ Electric Vehicle Supply Equipment EVSEType is used by: ComponentType, TriggerMessageRequest, ChangeAvailabilityRequest, TransactionEventRequest """ id: int connector_id: Optional[int] = None @dataclass class ComponentType: """ A physical or logical component. ComponentType is used by: ComponentVariableType, MessageInfoType, GetVariablesRequest.GetVariableDataType, GetVariablesResponse.GetVariableResultType, NotifyMonitoringReportRequest.MonitoringDataType, NotifyReportRequest.ReportDataType, SetVariableMonitoringRequest.SetMonitoringDataType, SetVariableMonitoringResponse.SetMonitoringResultType, SetVariablesRequest.SetVariableDataType, SetVariablesResponse.SetVariableResultType, NotifyEventRequest.EventDataType """ name: str instance: Optional[str] = None evse: Optional[EVSEType] = None @dataclass class VariableType: """ Reference key to a component-variable. VariableType is used by: ComponentVariableType, GetVariablesRequest.GetVariableDataType, GetVariablesResponse.GetVariableResultType, NotifyMonitoringReportRequest.MonitoringDataType, NotifyReportRequest.ReportDataType, SetVariableMonitoringRequest.SetMonitoringDataType, SetVariableMonitoringResponse.SetMonitoringResultType, SetVariablesRequest.SetVariableDataType, SetVariablesResponse.SetVariableResultType, NotifyEventRequest.EventDataType """ name: str instance: Optional[str] = None @dataclass class ComponentVariableType: """ Class to report components, variables and variable attributes and characteristics. ComponentVariableType is used by: GetMonitoringReportRequest, GetReportRequest """ component: ComponentType variable: Optional[VariableType] = None @dataclass class CompositeScheduleType: """ CompositeScheduleType is used by: GetCompositeScheduleResponse """ evse_id: int duration: int schedule_start: str charging_rate_unit: enums.ChargingRateUnitType charging_schedule_period: ChargingSchedulePeriodType @dataclass class CostType: """ CostType is used by: ConsumptionCostType """ cost_kind: enums.CostKindType amount: int amount_multiplier: Optional[int] = None @dataclass class ConsumptionCostType: """ ConsumptionCostType is used by: SalesTariffEntryType """ start_value: float cost: CostType @dataclass class EventDataType: """ Class to report an event notification for a component-variable. EventDataType is used by: NotifyEventRequest """ event_id: int timestamp: str trigger: enums.EventTriggerType actual_value: str event_notification_type: enums.EventNotificationType component: ComponentType variable: VariableType cause: Optional[int] = None tech_code: Optional[str] = None cleared: Optional[bool] = None transaction_id: Optional[str] = None variable_monitoring_id: Optional[int] = None @dataclass class FirmwareType: """ Represents a copy of the firmware that can be loaded/updated on the Charging Station. FirmwareType is used by: UpdateFirmwareRequest """ location: str retrieval_date_time: str install_date_time: Optional[str] = None signing_certificate: Optional[str] = None signature: Optional[str] = None @dataclass class GetVariableDataType: """ Class to hold parameters for GetVariables request. GetVariableDataType is used by: GetVariablesRequest """ component: ComponentType variable: VariableType attribute_type: Optional[enums.AttributeType] = None @dataclass class GetVariableResultType: """ Class to hold results of GetVariables request. GetVariableResultType is used by: GetVariablesResponse """ attribute_status: enums.GetVariableStatusType component: ComponentType variable: VariableType attribute_type: Optional[enums.AttributeType] = None attribute_value: Optional[str] = None attribute_status_info: Optional[StatusInfoType] = None @dataclass class IdTokenType: """ Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. IdTokenType is used by: AuthorizationData, Common:IdTokenInfoType, RequestStartTransactionRequest, AuthorizeRequest, TransactionEventRequest, ReserveNowRequest, CustomerInformationRequest """ id_token: str type: enums.IdTokenType additional_info: Optional[AdditionalInfoType] = None @dataclass class MessageContentType: """ Contains message details, for a message to be displayed on a Charging Station. MessageContentType is used by: IdTokenInfoType, MessageInfoType, TransactionEventResponse """ format: enums.MessageFormatType content: str language: Optional[str] = None @dataclass class IdTokenInfoType: """ Contains status information about an identifier. It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date. IdTokenInfoType is used by: AuthorizationData, AuthorizeResponse, TransactionEventResponse """ status: enums.AuthorizationStatusType cache_expiry_date_time: Optional[str] = None charging_priority: Optional[int] = None language_1: Optional[str] = None evse_id: Optional[int] = None language_2: Optional[str] = None group_id_token: Optional[IdTokenType] = None personal_message: Optional[MessageContentType] = None @dataclass class AuthorizationData: """ Contains the identifier to use for authorization. AuthorizationData is used by: SendLocalListRequest """ id_token: IdTokenType id_token_info: Optional[IdTokenInfoType] = None @dataclass class LogParametersType: """ Generic class for the configuration of logging entries. LogParametersType is used by: GetLogRequest """ remote_location: str oldest_timestamp: Optional[str] = None latest_timestamp: Optional[str] = None @dataclass class MessageInfoType: """ Contains message details, for a message to be displayed on a Charging Station. MessageInfoType is used by: SetDisplayMessageRequest, NotifyDisplayMessagesRequest """ id: int priority: enums.MessagePriorityType message: MessageContentType state: Optional[enums.MessageStateType] = None start_date_time: Optional[str] = None end_data_time: Optional[str] = None transaction_id: Optional[str] = None display: Optional[ComponentType] = None @dataclass class SignedMeterValueType: """ Represent a signed version of the meter value. SignedMeterValueType is used by: SampledValueType """ signed_meter_data: str signing_method: str encoding_method: str public_key: str @dataclass class UnitOfMeasureType: """ Represents a UnitOfMeasure with a multiplier UnitOfMeasureType is used by: SampledValueType """ unit: Optional[str] = None multiplier: Optional[int] = None @dataclass class SampledValueType: """ Single sampled value in MeterValues. Each value can be accompanied by optional fields. To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units. SampledValueType is used by: MeterValueType """ value: float context: Optional[enums.ReadingContextType] = None phase: Optional[enums.PhaseType] = None location: Optional[enums.LocationType] = None signed_meter_value: Optional[SignedMeterValueType] = None unit_of_measure: Optional[UnitOfMeasureType] = None @dataclass class MeterValueType: """ Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time. MeterValueType is used by: MeterValuesRequest, TransactionEventRequest """ timestamp: str sampled_value: SampledValueType @dataclass class ModemType: """ Defines parameters required for initiating and maintaining wireless communication with other devices. ModemType is used by: BootNotificationRequest.ChargingStationType """ iccid: Optional[str] = None imsi: Optional[str] = None @dataclass class VariableMonitoringType: """ A monitoring setting for a variable. VariableMonitoringType is used by: NotifyMonitoringReportRequest.MonitoringDataType """ id: int transaction: bool value: float type: enums.MonitorType severity: int @dataclass class MonitoringDataType: """ Class to hold parameters of SetVariableMonitoring request. MonitoringDataType is used by: NotifyMonitoringReportRequest """ component: ComponentType variable: VariableType variable_monitoring: VariableMonitoringType @dataclass class VPNType: """ VPN Configuration settings VPNType is used by: SetNetworkProfileRequest.NetworkConnectionProfileType """ server: str user: str password: str key: str type: enums.VPNType group: Optional[str] = None @dataclass class NetworkConnectionProfileType: """ The NetworkConnectionProfile defines the functional and technical parameters of a communication link. NetworkConnectionProfileType is used by: SetNetworkProfileRequest """ ocpp_version: enums.OCPPVersionType ocpp_transport: enums.OCPPTransportType ocpp_csms_url: str message_timeout: int security_profile: int ocpp_interface: enums.OCPPInterfaceType vpn: Optional[VPNType] = None apn: Optional[APNType] = None @dataclass class ChargingStationType: """ The physical system where an Electrical Vehicle (EV) can be charged. ChargingStationType is used by: BootNotificationRequest """ vendor_name: str model: str modem: Optional[ModemType] = None serial_number: Optional[str] = None firmware_version: Optional[str] = None @dataclass class OCSPRequestDataType: """ OCSPRequestDataType is used by: AuthorizeRequest, GetCertificateStatusRequest """ hash_algorithm: enums.HashAlgorithmType issuer_name_hash: str issuer_key_hash: str serial_number: str responder_url: str @dataclass class VariableAttributeType: """ Attribute data of a variable. VariableAttributeType is used by: NotifyReportRequest.ReportDataType """ type: Optional[enums.AttributeType] = None value: Optional[str] = None mutability: Optional[enums.MutabilityType] = None persistent: Optional[bool] = None constant: Optional[bool] = None @dataclass class VariableCharacteristicsType: """ Fixed read-only parameters of a variable. VariableCharacteristicsType is used by: NotifyReportRequest.ReportDataType """ data_type: enums.DataType supports_monitoring: bool unit: Optional[str] = None min_limit: Optional[float] = None max_limit: Optional[float] = None values_list: Optional[str] = None @dataclass class ReportDataType: """ Class to report components, variables and variable attributes and characteristics ReportDataType is used by: NotifyReportRequest """ component: ComponentType variable: VariableType variable_attribute: VariableAttributeType variable_characteristics: Optional[VariableCharacteristicsType] = None @dataclass class SalesTariffType: """ This dataType is based on dataTypes from ISO 15118-2. SalesTariffType is used by: ChargingScheduleType """ id: int sales_tariff_entry: SalesTariffEntryType sales_tariff_description: Optional[str] = None num_e_price_levels: Optional[int] = None @dataclass class SetMonitoringDataType: """ Class to hold parameters of SetVariableMonitoring request. SetMonitoringDataType is used by: SetVariableMonitoringRequest """ value: float type: enums.MonitorType severity: int component: ComponentType variable: VariableType id: Optional[int] = None transaction: Optional[bool] = None @dataclass class SetMonitoringResultType: """ Class to hold result of SetVariableMonitoring request. SetMonitoringResultType is used by: SetVariableMonitoringResponse """ status: enums.SetMonitoringStatusType type: enums.MonitorType severity: int component: ComponentType variable: VariableType id: Optional[int] = None status_info: Optional[StatusInfoType] = None @dataclass class SetVariableDataType: """SetVariableDataType is used by: SetVariablesRequest""" attribute_value: str component: ComponentType variable: VariableType attribute_type: Optional[enums.AttributeType] = None @dataclass class SetVariableResultType: """SetVariableResultType is used by: SetVariablesResponse""" attribute_status: enums.SetVariableStatusType component: ComponentType variable: VariableType attribute_type: Optional[enums.AttributeType] = None attribute_status_info: Optional[StatusInfoType] = None @dataclass class TransactionType: """TransactionType is used by: TransactionEventRequest""" transaction_id: str charging_state: Optional[enums.ChargingStateType] = None time_spent_charging: Optional[int] = None stopped_reason: Optional[enums.ReasonType] = None remote_start_id: Optional[int] = None
26.970407
79
0.751017
2,059
21,873
7.874696
0.231666
0.049217
0.028124
0.017762
0.327001
0.267855
0.257802
0.242198
0.233194
0.215246
0
0.001239
0.18836
21,873
810
80
27.003704
0.912071
0.415078
0
0.43956
0
0
0
0
0
0
0
0
0
1
0
true
0.005495
0.008242
0
0.843407
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
2
e6aff5b793e1f0e2da00b2e86c513ebf0d5a198e
2,212
py
Python
wiki_core/api/v1/apps/blog/admin.py
lubchenko05/WikiApi
7e5a094a1c378d8ba2fd1a3078146bd523e765f6
[ "MIT" ]
null
null
null
wiki_core/api/v1/apps/blog/admin.py
lubchenko05/WikiApi
7e5a094a1c378d8ba2fd1a3078146bd523e765f6
[ "MIT" ]
null
null
null
wiki_core/api/v1/apps/blog/admin.py
lubchenko05/WikiApi
7e5a094a1c378d8ba2fd1a3078146bd523e765f6
[ "MIT" ]
null
null
null
from django.contrib import admin from django.utils.safestring import mark_safe from api.v1.apps.blog.models import Post, PostContent class PostContentAdmin(admin.ModelAdmin): actions = None list_display = ('id', 'post', 'author', 'created', 'text', 'is_published') fieldsets = [ (None, {'fields': ()}), ] list_filter = ('is_published', 'post', 'author') search_fields = ['author__email', 'author__username', 'post__title', ] def get_readonly_fields(self, request, obj=None): if obj: return ['text', "post"] else: return [] def get_list_display_links(self, request, list_display): return (None,) def has_change_permission(self, request, obj=None): return False def has_add_permission(self, request, obj=None): return False def has_delete_permission(self, request, obj=None): return False class ContentInline(admin.TabularInline): model = PostContent ordering = ("-is_published",) fields = ('author', 'text', 'created', 'action') readonly_fields = ('author', 'text', 'created', 'action') class Media: js = ("admin/js/set_publish.js",) def action(self, obj): if not obj.is_published: return mark_safe( '<input type="submit" ' 'onclick="publish(%s)" ' % obj.id + 'name="_continue" ' 'value="Publish" ' '">') else: return mark_safe( '<span class="publish-status">Published</span>' ) def has_change_permission(self, request, obj=None): return False def has_add_permission(self, request, obj=None): return False def has_delete_permission(self, request, obj=None): return False class PostAdmin(admin.ModelAdmin): actions = None list_display = ('title', 'editions_count', 'updated') search_fields = ['title', ] inlines = (ContentInline,) class Media: css = { 'all': ('admin/css/custom_admin.css', ) # Include extra css } admin.site.register(Post, PostAdmin) admin.site.register(PostContent, PostContentAdmin)
27.65
78
0.601266
240
2,212
5.370833
0.35
0.06827
0.076028
0.09775
0.342901
0.297905
0.240497
0.240497
0.240497
0.240497
0
0.000619
0.269439
2,212
80
79
27.65
0.79703
0.007685
0
0.333333
0
0
0.171376
0.049681
0
0
0
0
0
1
0.15
false
0
0.05
0.116667
0.683333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
e6bf78445cb97c1b8b27b48a37454778d4a40a30
1,023
py
Python
tests/acceptance/test_shortcuts.py
sunnycloudy/python-inquirer_plus
aa962dc5a0f661a3efc05e1eb25188b287e2b665
[ "MIT" ]
1
2019-12-15T09:30:01.000Z
2019-12-15T09:30:01.000Z
tests/acceptance/test_shortcuts.py
worldofpeace/python-inquirer
c1b3bc776cec72b5039068ecbac509ce90d2e123
[ "MIT" ]
null
null
null
tests/acceptance/test_shortcuts.py
worldofpeace/python-inquirer
c1b3bc776cec72b5039068ecbac509ce90d2e123
[ "MIT" ]
1
2019-12-15T10:12:48.000Z
2019-12-15T10:12:48.000Z
import unittest import pexpect from readchar import key class ShortcutsTest(unittest.TestCase): def setUp(self): self.sut = pexpect.spawn('python examples/shortcuts.py') def set_username(self, name='foo'): self.sut.expect("Enter your username", timeout=1) self.sut.sendline(name) def set_password(self, password='secret'): self.sut.expect("Please enter your password", timeout=1) self.sut.sendline(password) def set_checkbox(self): self.sut.expect('Please define your type of project', timeout=1) self.sut.send(key.ENTER) def set_list(self): self.sut.expect('Public or private?', timeout=1) self.sut.send(key.ENTER) def set_confirm(self): self.sut.expect('This will delete', timeout=1) self.sut.send('y') self.sut.send(key.ENTER) def test_shortcuts(self): self.set_username() self.set_password() self.set_checkbox() self.set_list() self.set_confirm()
27.648649
72
0.644184
137
1,023
4.729927
0.343066
0.12963
0.100309
0.115741
0.236111
0.135802
0.101852
0.101852
0.101852
0
0
0.006361
0.231672
1,023
36
73
28.416667
0.818066
0
0
0.107143
0
0
0.147605
0.020528
0
0
0
0
0
1
0.25
false
0.142857
0.107143
0
0.392857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
e6c269a0cdef73a2afde6cc634a655fc302b3f52
157
py
Python
imageio/gray.py
dineshkumar2509/learning-python
e8af11ff0b396da4c3f2cfe21d14131bae4b2adb
[ "MIT" ]
86
2015-06-13T16:53:55.000Z
2022-03-24T20:56:42.000Z
imageio/gray.py
pei-zheng-yi/learning-python
55e350dfe44cf04f7d4408e76e72d2f467bd42ce
[ "MIT" ]
9
2015-05-27T07:52:44.000Z
2022-03-29T21:52:40.000Z
imageio/gray.py
pei-zheng-yi/learning-python
55e350dfe44cf04f7d4408e76e72d2f467bd42ce
[ "MIT" ]
124
2015-12-10T01:17:18.000Z
2021-11-08T04:03:38.000Z
#!/usr/bin/env python import imageio im = imageio.imread('akhead.png') print(im.shape) # im is a numpy array imageio.imwrite('akhead-gray.jpg', im[:,:,0])
19.625
45
0.694268
26
157
4.192308
0.769231
0
0
0
0
0
0
0
0
0
0
0.007194
0.11465
157
7
46
22.428571
0.776978
0.254777
0
0
0
0
0.217391
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e6ce7863e841a66c7131992da7a4e9b14d83310f
649
py
Python
var/spack/repos/builtin/packages/perl-extutils-pkgconfig/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/perl-extutils-pkgconfig/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2019-07-30T10:12:28.000Z
2019-12-17T09:02:27.000Z
var/spack/repos/builtin/packages/perl-extutils-pkgconfig/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlExtutilsPkgconfig(PerlPackage): """simplistic interface to pkg-config""" homepage = "http://search.cpan.org/~xaoc/ExtUtils-PkgConfig-1.16/lib/ExtUtils/PkgConfig.pm" url = "http://search.cpan.org/CPAN/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-1.16.tar.gz" version('1.16', sha256='bbeaced995d7d8d10cfc51a3a5a66da41ceb2bc04fedcab50e10e6300e801c6e') depends_on('pkgconfig', type=('build', 'run'))
36.055556
96
0.744222
82
649
5.878049
0.792683
0.105809
0.058091
0.070539
0.099585
0
0
0
0
0
0
0.091228
0.121726
649
17
97
38.176471
0.754386
0.345146
0
0
0
0.333333
0.581731
0.153846
0
0
0
0
0
1
0
false
0
0.166667
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
e6d32f316b39bb1ee733298bf972e87d4e1dec36
2,000
py
Python
src/screens/ScreenBase.py
Taffer/skelly
e29725d198306a57610c52774093e5b04bc14608
[ "MIT" ]
null
null
null
src/screens/ScreenBase.py
Taffer/skelly
e29725d198306a57610c52774093e5b04bc14608
[ "MIT" ]
6
2021-04-15T11:59:09.000Z
2021-04-18T13:06:50.000Z
src/screens/ScreenBase.py
Taffer/skelly
e29725d198306a57610c52774093e5b04bc14608
[ "MIT" ]
null
null
null
''' Skelly screen base class. By Chris Herborth (https://github.com/Taffer) MIT license, see LICENSE.md for details. ''' import pygame from ..ui import ImageButton from ..ui import Label WHITE = pygame.Color('white') class ScreenBase: def __init__(self, game) -> None: ''' Initialize. @param game Game global state. ''' self.game = game self.can_exit = False # Time for this screen to exit? self.next_screen = None # Next screen to display. self.has_title = False self.title_ui = [] # For Title elements. def draw(self) -> None: ''' Draw the screen's contents. ''' pass def update(self, dt: float) -> None: ''' Update the screen's contents. ''' pass def keypressed(self, event: pygame.event.Event) -> None: pass def keyreleased(self, event: pygame.event.Event) -> None: pass def mousemoved(self, event: pygame.event.Event) -> None: pass def mousedown(self, event: pygame.event.Event) -> None: pass def mouseup(self, event: pygame.event.Event) -> None: pass def userevent(self, event: pygame.event.Event) -> None: pass def add_title(self) -> None: title_text = self.game.text.get_text('title') skelly_text = self.game.text.get_text('skelly_title') subtitle_text = title_text['subtitle_text'] self.title_ui = [ ImageButton(0, 0, self.game.resources['images']['skelly_title']), Label(self.game.screen_width / 2, 40, skelly_text, self.game.resources['fonts']['skelly_title'], WHITE, 'centre'), Label(self.game.screen_width / 2, 220, subtitle_text, self.game.resources['fonts']['germania'], WHITE, 'centre'), ] self.has_title = True def draw_title(self) -> None: if self.has_title: for item in self.title_ui: item.draw()
26.315789
108
0.5885
246
2,000
4.670732
0.321138
0.062663
0.078329
0.104439
0.360313
0.315057
0.18799
0.18799
0
0
0
0.006316
0.2875
2,000
75
109
26.666667
0.8
0.154
0
0.232558
0
0
0.057681
0
0
0
0
0
0
1
0.255814
false
0.186047
0.069767
0
0.348837
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
e6d48bdfb377bfceba6b7236f619c397134b49c9
5,605
py
Python
housemonitor/inputs/computermonitor/test/computermonitor_test.py
gary-pickens/HouseMonitor
4b169bdbeed9013e1824d4bb929970ae0c27a6c9
[ "MIT" ]
1
2021-06-28T06:52:03.000Z
2021-06-28T06:52:03.000Z
housemonitor/inputs/computermonitor/test/computermonitor_test.py
gary-pickens/HouseMonitor
4b169bdbeed9013e1824d4bb929970ae0c27a6c9
[ "MIT" ]
null
null
null
housemonitor/inputs/computermonitor/test/computermonitor_test.py
gary-pickens/HouseMonitor
4b169bdbeed9013e1824d4bb929970ae0c27a6c9
[ "MIT" ]
null
null
null
''' Created on Apr 12, 2013 @author: Gary ''' from housemonitor.inputs import dataenvelope from housemonitor.inputs.computermonitor.computermonitor import ComputerMonitor from housemonitor.inputs.dataenvelope import DataEnvelope from housemonitor.lib.common import Common from housemonitor.lib.constants import Constants from housemonitor.lib.getdatetime import GetDateTime from mock import * from datetime import datetime import logging.config import pprint import unittest import copy class Test( unittest.TestCase ): logger = logging.getLogger( 'UnitTest' ) def setUp( self ): logging.config.fileConfig( "unittest_logging.conf" ) def tearDown( self ): pass # def test_thread( self ): # queue = MagicMock() # cmp = ComputerMonitor( queue ) # cmp.forever = False # cmp.start() # def test_logger_name( self ): # queue = MagicMock() # cmp = ComputerMonitor( queue ) # self.assertEqual( cmp.logger_name, Constants.LogKeys.ComputerMonitor ) # def test_extractData( self ): # queue = MagicMock() # cmp = ComputerMonitor( queue ) # # counts = cmp.extractData( data ) # self.assertIsNotNone( counts ) # self.assertEqual( counts['tx'], '1188940' ) # self.assertEqual( counts['rx'], '1427150' ) # # def test_send( self ): # queue = MagicMock() # dt = GetDateTime( year=2000, month=1, day=2, hour=3, minute=4, second=5 ) # key = 'tx' # value = 12345 # # listeners = [Constants.TopicNames.CurrentValueStep] # data = {Constants.DataPacket.device: 'OMAP UART1', # Constants.DataPacket.port: key, # Constants.DataPacket.arrival_time: dt, # Constants.DataPacket.current_value: value, # Constants.DataPacket.listeners: copy.copy( listeners )} # # env = DataEnvelope( type=Constants.EnvelopeTypes.STATUS, data=data, arrival_time=dt ) # # cm = ComputerMonitor( queue ) # cm.send( dt, key, value ) # def test_process_data( self ): # queue = MagicMock() # dt = GetDateTime( year=2013, month=1, day=2, hour=3, minute=4, second=5 ) # packet = None # data = {Constants.DataPacket.device: 'OMAP UART1', # Constants.DataPacket.port: '1188940', # Constants.DataPacket.current_value: 1, # Constants.DataPacket.arrival_time: GetDateTime( dt )} # envelope = DataEnvelope(type=Constants.EnvelopeTypes.COMPUTER, data=data, arrival_time=dt) # # file_contents = {'tx': '1188940', 'rx': '1427150'} # # cmp = ComputerMonitor( queue ) # cmp.process_data( file_contents, dt ) # # self.assertEqual( cmp.start_count['tx'], 1188940 ) # self.assertEqual( cmp.start_count['rx'], 1427150 ) # self.assertEqual( cmp.previous_count['tx'], 1188940 ) # self.assertEqual( cmp.previous_count['rx'], 1427150 ) # # queue.reset_mock() # dt = GetDateTime( datetime( 2013, 1, 2, 3, 4, 10 ) ) # file_contents = {'tx': '1188960', 'rx': '1427170'} # cmp.process_data( file_contents, dt ) # self.assertEqual( queue.transmit.call_count, 4 ) # calls = queue.transmit.call_args_list # # print calls # self.assertEqual( cmp.start_count['tx'], 1188940 ) # self.assertEqual( cmp.start_count['rx'], 1427150 ) # self.assertEqual( cmp.previous_count['tx'], 20 ) # self.assertEqual( cmp.previous_count['rx'], 20 ) # # # I'm not sure that this works. I've spent hours trying to get it to work. # self.assertNotIn( call( priority=10, packet=DataEnvelope( type='status', packet=None, arrival_time='2013/01/02 03:04:10', data={'device': 'OMAP UART1', 'current_value': 20, 'port': 'rx', 'at': '2013/01/02 03:04:10'} ) ), calls ) # self.assertNotIn( call( priority=10, packet=DataEnvelope( type='status', packet=None, arrival_time='2013/01/02 03:04:10', data={'device': 'OMAP UART1', 'current_value': 4.0, 'port': 'rx rate', 'at': '2013/01/02 03:04:10'} ) ), calls ) # self.assertNotIn( call( priority=10, packet=DataEnvelope( type='status', packet=None, arrival_time='2013/01/02 03:04:10', data={'device': 'OMAP UART1', 'current_value': 20, 'port': 'tx', 'at': '2013/01/02 03:04:10'} ) ), calls ) # self.assertNotIn( call( priority=10, packet=DataEnvelope( type='status', packet=None, arrival_time='2013/01/02 03:04:10', data={'device': 'OMAP UART1', 'current_value': 4.0, 'port': 'tx rate', 'at': '2013/01/02 03:04:10'} ) ), calls ) if __name__ == "__main__": # import sys;sys.argv = ['', 'Test.test_logger_name'] unittest.main() data = ''' serinfo:1.0 driver revision: 0: uart:OMAP UART0 mmio:0x44E09000 irq:72 tx:85 rx:0 CTS|DSR 1: uart:OMAP UART1 mmio:0x48022000 irq:73 tx:1188940 rx:1427150 RTS|CTS|DTR|DSR|CD|RI 2: uart:OMAP UART2 mmio:0x48024000 irq:74 tx:0 rx:0 CTS|DSR 3: uart:OMAP UART3 mmio:0x481A6000 irq:44 tx:0 rx:0 CTS|DSR 4: uart:OMAP UART4 mmio:0x481A8000 irq:45 tx:0 rx:0 CTS|DSR 5: uart:OMAP UART5 mmio:0x481AA000 irq:46 tx:0 rx:0 CTS|DSR ''' data1 = ''' serinfo:1.0 driver revision: 0: uart:OMAP UART0 mmio:0x44E09000 irq:72 tx:85 rx:0 CTS|DSR 1: uart:OMAP UART1 mmio:0x48022000 irq:73 tx:1188940 rx:1427150 RTS|CTS|DTR|DSR|CD|RI 2: uart:OMAP UART2 mmio:0x48024000 irq:74 tx:0 rx:0 CTS|DSR 3: uart:OMAP UART3 mmio:0x481A6000 irq:44 tx:0 rx:0 CTS|DSR 4: uart:OMAP UART4 mmio:0x481A8000 irq:45 tx:0 rx:0 CTS|DSR 5: uart:OMAP UART5 mmio:0x481AA000 irq:46 tx:0 rx:0 CTS|DSR '''
42.142857
244
0.645495
742
5,605
4.807278
0.22372
0.050463
0.016821
0.025231
0.56434
0.552565
0.477993
0.477993
0.458088
0.415756
0
0.106658
0.212132
5,605
132
245
42.462121
0.701087
0.691704
0
0.421053
0
0.315789
0.529162
0.038275
0
0
0.072904
0
0
1
0.052632
false
0.026316
0.315789
0
0.421053
0.026316
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
e6ec1c9e6628b20534300f921bca3ea6e0076393
293
py
Python
nes/processors/cpu/instructions/increment/increment_register.py
Hexadorsimal/pynes
dbb3d40c1240fa27f70fa798bcec09188755eec2
[ "MIT" ]
1
2017-05-13T18:57:09.000Z
2017-05-13T18:57:09.000Z
nes/processors/cpu/instructions/increment/increment_register.py
Hexadorsimal/py6502
dbb3d40c1240fa27f70fa798bcec09188755eec2
[ "MIT" ]
7
2020-10-24T17:16:56.000Z
2020-11-01T14:10:23.000Z
nes/processors/cpu/instructions/increment/increment_register.py
Hexadorsimal/pynes
dbb3d40c1240fa27f70fa798bcec09188755eec2
[ "MIT" ]
null
null
null
from .increment import IncrementInstruction class IncrementRegisterInstruction(IncrementInstruction): register_name = None def increment(self, processor): register = processor.registers[self.register_name] register.value += self.amount return register.value
26.636364
58
0.74744
27
293
8.037037
0.592593
0.110599
0
0
0
0
0
0
0
0
0
0
0.187713
293
10
59
29.3
0.911765
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
e6fc7ba38caee7abeb69791d440892dd0211d504
218
py
Python
test/test.py
lioramilbaum/dpline
58b44392db84c05f4e238d4c3b982909e1dc002d
[ "Apache-2.0" ]
1
2019-02-28T09:51:53.000Z
2019-02-28T09:51:53.000Z
test/test.py
lioramilbaum/dpline
58b44392db84c05f4e238d4c3b982909e1dc002d
[ "Apache-2.0" ]
27
2019-01-15T12:39:26.000Z
2019-01-26T19:19:47.000Z
test/test.py
devopsloft/dpline
2b136bca959ff40a4db2d568f3971279c81a9527
[ "Apache-2.0" ]
1
2019-02-22T15:43:01.000Z
2019-02-22T15:43:01.000Z
#!/usr/bin/env python3 import requests def main(): requests.post( "http://localhost:5601/api/sample_data/flights", headers={"kbn-xsrf": "reporting"} ) if __name__ == "__main__": main()
14.533333
56
0.605505
25
218
4.92
0.88
0
0
0
0
0
0
0
0
0
0
0.029586
0.224771
218
14
57
15.571429
0.698225
0.09633
0
0
0
0
0.357143
0
0
0
0
0
0
1
0.125
true
0
0.125
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
fc00777469e6698b0f8d583eebe63f8768c1df39
1,125
py
Python
dev/Tickets/SF-89.py
jfeng08/CoolProp
ac96aa48c8ced6fa3c7330b54b9409e0e021d618
[ "MIT" ]
12
2015-04-21T07:43:09.000Z
2021-11-09T08:35:58.000Z
dev/Tickets/SF-89.py
jfeng08/CoolProp
ac96aa48c8ced6fa3c7330b54b9409e0e021d618
[ "MIT" ]
32
2015-01-04T05:05:05.000Z
2017-12-13T18:03:29.000Z
dev/Tickets/SF-89.py
jfeng08/CoolProp
ac96aa48c8ced6fa3c7330b54b9409e0e021d618
[ "MIT" ]
8
2015-01-01T21:15:37.000Z
2020-08-05T13:31:50.000Z
''' Created on 20 Sep 2013 @author: jowr ''' # New example with R407F mixture from pyrp.refpropClasses import RefpropSI import CoolProp.CoolProp as cp p = 30000 T = 273.15 ref = False if ref: xkg=[0.473194694453358,0.205109095413331,0.321696210133311] names="R32|R125|R134a" RP = RefpropSI() RP.SETUPFLEX(xkg=xkg, FluidNames=names) T_A,p_A,D_A,Dl_A,Dv_A,q_A,e_A,h_A,s_A,cv_A,cp_A,w_A = RP.PQFLSH(p, 0) T_B,p_B,D_B,Dl_B,Dv_B,q_B,e_B,h_B,s_B,cv_B,cp_B,w_B = RP.PQFLSH(p, 1) T_C,p_C,D_C,Dl_C,Dv_C,q_C,e_C,h_C,s_C,cv_C,cp_C,w_C = RP.TQFLSH(T, 0) hlb = h_A/1000. hrb = h_B/1000. h200 = h_C/1000. print "Refprop: ", hlb, hrb, h200 else: R407F='REFPROP-MIX:R32[0.473194694453358]&R125[0.205109095413331]&R134a[0.321696210133311]' #R407F='REFPROP-MIX:R32[0.651669604033581]&R125[0.122438378639971]&R134a[0.225892017326446]' hlb=cp.Props('H','P',30,'Q',0,R407F) # 30 kPa saturated liquid hrb=cp.Props('H','P',30,'Q',1,R407F) # 30 kPa saturated vapour h200=cp.Props('H','T',273.15,'Q',0,R407F) # saturated liquid at 0C IIR print "CoolProp: ", hlb, hrb, h200
33.088235
96
0.677333
222
1,125
3.256757
0.337838
0.029046
0.033195
0.049793
0.085754
0.033195
0
0
0
0
0
0.258403
0.153778
1,125
34
97
33.088235
0.50105
0.174222
0
0
0
0.043478
0.142207
0.094425
0
0
0
0
0
0
null
null
0
0.086957
null
null
0.086957
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
fc0d7bb54b642ae3399dd5609caf57a42d11d466
6,047
py
Python
python_samples/Python_Examples/ibm_db_dbi/ibm_db_dbi_tools.py
adrianmahjour/db2-samples
ff984aec81c5c08ce28443d896c0818cfae4f789
[ "Apache-2.0" ]
54
2019-08-02T13:15:07.000Z
2022-03-21T17:36:48.000Z
python_samples/Python_Examples/ibm_db_dbi/ibm_db_dbi_tools.py
junsulee75/db2-samples
d9ee03101cad1f9167eebc1609b4151559124017
[ "Apache-2.0" ]
13
2019-07-26T13:51:16.000Z
2022-03-25T21:43:52.000Z
python_samples/Python_Examples/ibm_db_dbi/ibm_db_dbi_tools.py
junsulee75/db2-samples
d9ee03101cad1f9167eebc1609b4151559124017
[ "Apache-2.0" ]
75
2019-07-20T04:53:24.000Z
2022-03-23T20:56:55.000Z
#-------------------------------------------------------------------------------------------------# # NAME: ibm_db_tools.py # # # # PURPOSE: This file contains classes and functions that are used by some of the ibm_db_dbi # # sample programs. # # # # Cursor functions used: # # execute() # # fetchone() # # # # USAGE: Add the following line of code at the beginning of an ibm_db_dbi sample program: # # # # from ibm_db_dbi_tools import get_row_count # # # #-------------------------------------------------------------------------------------------------# # DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY # # # # (C) COPYRIGHT International Business Machines Corp. 2018, 2019 All Rights Reserved # # Licensed Materials - Property of IBM # # # # US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP # # Schedule Contract with IBM Corp. # # # # The following source code ("Sample") is owned by International Business Machines Corporation # # or one of its subsidiaries ("IBM") and is copyrighted and licensed, not sold. You may use, # # copy, modify, and distribute the Sample in any form without payment to IBM, for the purpose of # # assisting you in the creation of Python applications using the ibm_db_dbi library. # # # # The Sample code is provided to you on an "AS IS" basis, without warranty of any kind. IBM # # HEREBY EXPRESSLY DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT # # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # Some jurisdictions do not allow for the exclusion or limitation of implied warranties, so the # # above limitations or exclusions may not apply to you. IBM shall not be liable for any damages # # you suffer as a result of using, copying, modifying or distributing the Sample, even if IBM # # has been advised of the possibility of such damages. # #-------------------------------------------------------------------------------------------------# # Load The Appropriate Python Modules import sys # Provides Information About Python Interpreter Constants, Functions, & Methods import ibm_db_dbi # Contains The APIs Needed To Work With Db2 Databases #-------------------------------------------------------------------------------------------------# # FUNCTION NAME: get_row_count() # # PURPOSE: This function queries the Db2 table specified and displays the number of rows # # (records) found in it. # # PARAMETERS: dbCursor - A cursor object associated with a valid Db2 database connection # # tableName - Name of the table to be queried # # RETURNS: True - A row count was obtained for the table specified # # False - A row count could not be obtained for the table specified # #-------------------------------------------------------------------------------------------------# def get_row_count(dbCursor, tableName): # Define And Initialize The Appropriate Local Variables resultSet = False # Create The SQL Statement To Be Executed sqlStatement = "SELECT COUNT(*) FROM " + tableName + " WITH UR" # Execute The SQL Statement Just Defined try: resultSet = dbCursor.execute(sqlStatement) except Exception: pass # If The SQL Statement Could Not Be Executed, Display An Error Message And Exit if resultSet is False: print("\nERROR: Unable to execute the statement specified:") print(" " + sqlStatement + "\n") return False # Retrieve The Data Produced By The SQL Statement And Store It In A Python Tuple resultSet = None try: resultSet = dbCursor.fetchone() except: pass # If The Data Could Not Be Retrieved Or There Was No Data To Retrieve, Display An Error # Message And Return The Value "False" if resultSet is None: print("\nERROR: Unable to retrieve the data produced by the SQL statement.") return False # Otherwise, Display The Data Retrieved else: print("Number of records found in the " + tableName + " table: ", end="") print("{}\n" .format(resultSet[0])) # Return The Value "True" To The Calling Function return True
66.450549
99
0.435423
518
6,047
5.046332
0.436293
0.011477
0.015302
0.008416
0.07039
0.030604
0.030604
0.030604
0
0
0
0.00356
0.442533
6,047
90
100
67.188889
0.771878
0.832148
0
0.24
0
0
0.212486
0
0
0
0
0
0
1
0.04
false
0.08
0.08
0
0.24
0.2
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
fc12386ec6262395fe470b57aee5ca81e53aa465
15,606
py
Python
sdk/python/pulumi_azure_native/apimanagement/v20180601preview/logger.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20180601preview/logger.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20180601preview/logger.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from ._enums import * __all__ = ['LoggerArgs', 'Logger'] @pulumi.input_type class LoggerArgs: def __init__(__self__, *, credentials: pulumi.Input[Mapping[str, pulumi.Input[str]]], logger_type: pulumi.Input[Union[str, 'LoggerType']], resource_group_name: pulumi.Input[str], service_name: pulumi.Input[str], description: Optional[pulumi.Input[str]] = None, is_buffered: Optional[pulumi.Input[bool]] = None, logger_id: Optional[pulumi.Input[str]] = None, resource_id: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Logger resource. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] credentials: The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger. :param pulumi.Input[Union[str, 'LoggerType']] logger_type: Logger type. :param pulumi.Input[str] resource_group_name: The name of the resource group. :param pulumi.Input[str] service_name: The name of the API Management service. :param pulumi.Input[str] description: Logger description. :param pulumi.Input[bool] is_buffered: Whether records are buffered in the logger before publishing. Default is assumed to be true. :param pulumi.Input[str] logger_id: Logger identifier. Must be unique in the API Management service instance. :param pulumi.Input[str] resource_id: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). """ pulumi.set(__self__, "credentials", credentials) pulumi.set(__self__, "logger_type", logger_type) pulumi.set(__self__, "resource_group_name", resource_group_name) pulumi.set(__self__, "service_name", service_name) if description is not None: pulumi.set(__self__, "description", description) if is_buffered is not None: pulumi.set(__self__, "is_buffered", is_buffered) if logger_id is not None: pulumi.set(__self__, "logger_id", logger_id) if resource_id is not None: pulumi.set(__self__, "resource_id", resource_id) @property @pulumi.getter def credentials(self) -> pulumi.Input[Mapping[str, pulumi.Input[str]]]: """ The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger. """ return pulumi.get(self, "credentials") @credentials.setter def credentials(self, value: pulumi.Input[Mapping[str, pulumi.Input[str]]]): pulumi.set(self, "credentials", value) @property @pulumi.getter(name="loggerType") def logger_type(self) -> pulumi.Input[Union[str, 'LoggerType']]: """ Logger type. """ return pulumi.get(self, "logger_type") @logger_type.setter def logger_type(self, value: pulumi.Input[Union[str, 'LoggerType']]): pulumi.set(self, "logger_type", value) @property @pulumi.getter(name="resourceGroupName") def resource_group_name(self) -> pulumi.Input[str]: """ The name of the resource group. """ return pulumi.get(self, "resource_group_name") @resource_group_name.setter def resource_group_name(self, value: pulumi.Input[str]): pulumi.set(self, "resource_group_name", value) @property @pulumi.getter(name="serviceName") def service_name(self) -> pulumi.Input[str]: """ The name of the API Management service. """ return pulumi.get(self, "service_name") @service_name.setter def service_name(self, value: pulumi.Input[str]): pulumi.set(self, "service_name", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ Logger description. """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="isBuffered") def is_buffered(self) -> Optional[pulumi.Input[bool]]: """ Whether records are buffered in the logger before publishing. Default is assumed to be true. """ return pulumi.get(self, "is_buffered") @is_buffered.setter def is_buffered(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "is_buffered", value) @property @pulumi.getter(name="loggerId") def logger_id(self) -> Optional[pulumi.Input[str]]: """ Logger identifier. Must be unique in the API Management service instance. """ return pulumi.get(self, "logger_id") @logger_id.setter def logger_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "logger_id", value) @property @pulumi.getter(name="resourceId") def resource_id(self) -> Optional[pulumi.Input[str]]: """ Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). """ return pulumi.get(self, "resource_id") @resource_id.setter def resource_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "resource_id", value) class Logger(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, credentials: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, is_buffered: Optional[pulumi.Input[bool]] = None, logger_id: Optional[pulumi.Input[str]] = None, logger_type: Optional[pulumi.Input[Union[str, 'LoggerType']]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, resource_id: Optional[pulumi.Input[str]] = None, service_name: Optional[pulumi.Input[str]] = None, __props__=None): """ Logger details. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] credentials: The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger. :param pulumi.Input[str] description: Logger description. :param pulumi.Input[bool] is_buffered: Whether records are buffered in the logger before publishing. Default is assumed to be true. :param pulumi.Input[str] logger_id: Logger identifier. Must be unique in the API Management service instance. :param pulumi.Input[Union[str, 'LoggerType']] logger_type: Logger type. :param pulumi.Input[str] resource_group_name: The name of the resource group. :param pulumi.Input[str] resource_id: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). :param pulumi.Input[str] service_name: The name of the API Management service. """ ... @overload def __init__(__self__, resource_name: str, args: LoggerArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Logger details. :param str resource_name: The name of the resource. :param LoggerArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(LoggerArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, credentials: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, is_buffered: Optional[pulumi.Input[bool]] = None, logger_id: Optional[pulumi.Input[str]] = None, logger_type: Optional[pulumi.Input[Union[str, 'LoggerType']]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, resource_id: Optional[pulumi.Input[str]] = None, service_name: Optional[pulumi.Input[str]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = LoggerArgs.__new__(LoggerArgs) if credentials is None and not opts.urn: raise TypeError("Missing required property 'credentials'") __props__.__dict__["credentials"] = credentials __props__.__dict__["description"] = description __props__.__dict__["is_buffered"] = is_buffered __props__.__dict__["logger_id"] = logger_id if logger_type is None and not opts.urn: raise TypeError("Missing required property 'logger_type'") __props__.__dict__["logger_type"] = logger_type if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["resource_id"] = resource_id if service_name is None and not opts.urn: raise TypeError("Missing required property 'service_name'") __props__.__dict__["service_name"] = service_name __props__.__dict__["name"] = None __props__.__dict__["type"] = None alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-nextgen:apimanagement/v20180601preview:Logger"), pulumi.Alias(type_="azure-native:apimanagement:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20160707:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20160707:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20161010:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20161010:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20170301:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20170301:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20180101:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20180101:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20190101:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20190101:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20191201:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20191201:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20191201preview:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20191201preview:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20200601preview:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20200601preview:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20201201:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20201201:Logger"), pulumi.Alias(type_="azure-native:apimanagement/v20210101preview:Logger"), pulumi.Alias(type_="azure-nextgen:apimanagement/v20210101preview:Logger")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(Logger, __self__).__init__( 'azure-native:apimanagement/v20180601preview:Logger', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None) -> 'Logger': """ Get an existing Logger resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = LoggerArgs.__new__(LoggerArgs) __props__.__dict__["credentials"] = None __props__.__dict__["description"] = None __props__.__dict__["is_buffered"] = None __props__.__dict__["logger_type"] = None __props__.__dict__["name"] = None __props__.__dict__["resource_id"] = None __props__.__dict__["type"] = None return Logger(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def credentials(self) -> pulumi.Output[Mapping[str, str]]: """ The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger. """ return pulumi.get(self, "credentials") @property @pulumi.getter def description(self) -> pulumi.Output[Optional[str]]: """ Logger description. """ return pulumi.get(self, "description") @property @pulumi.getter(name="isBuffered") def is_buffered(self) -> pulumi.Output[Optional[bool]]: """ Whether records are buffered in the logger before publishing. Default is assumed to be true. """ return pulumi.get(self, "is_buffered") @property @pulumi.getter(name="loggerType") def logger_type(self) -> pulumi.Output[str]: """ Logger type. """ return pulumi.get(self, "logger_type") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ Resource name. """ return pulumi.get(self, "name") @property @pulumi.getter(name="resourceId") def resource_id(self) -> pulumi.Output[Optional[str]]: """ Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). """ return pulumi.get(self, "resource_id") @property @pulumi.getter def type(self) -> pulumi.Output[str]: """ Resource type for API Management resource. """ return pulumi.get(self, "type")
47.43465
1,635
0.659746
1,785
15,606
5.518768
0.096359
0.073698
0.062532
0.046696
0.760836
0.670084
0.618211
0.452035
0.419754
0.379555
0
0.014775
0.232347
15,606
328
1,636
47.579268
0.807513
0.231193
0
0.371287
1
0
0.184018
0.097219
0
0
0
0
0
1
0.143564
false
0.004951
0.029703
0
0.262376
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc1c43d606d327fb35d6fd9f01dd55b613fdaf94
1,786
py
Python
atlas/aws_utils/src/integration/config.py
DeepLearnI/atlas
8aca652d7e647b4e88530b93e265b536de7055ed
[ "Apache-2.0" ]
296
2020-03-16T19:55:00.000Z
2022-01-10T19:46:05.000Z
atlas/aws_utils/src/integration/config.py
DeepLearnI/atlas
8aca652d7e647b4e88530b93e265b536de7055ed
[ "Apache-2.0" ]
57
2020-03-17T11:15:57.000Z
2021-07-10T14:42:27.000Z
atlas/aws_utils/src/integration/config.py
DeepLearnI/atlas
8aca652d7e647b4e88530b93e265b536de7055ed
[ "Apache-2.0" ]
38
2020-03-17T21:06:05.000Z
2022-02-08T03:19:34.000Z
from uuid import uuid4 # separates test runs TEST_UUID = str(uuid4()) def _code_bucket(): return 'foundations-code-test' def make_code_bucket(): from foundations import PrefixedBucket from foundations_aws import AWSBucket return PrefixedBucket(TEST_UUID, AWSBucket, _code_bucket()) def _result_bucket(): return 'foundations-results-test' def make_result_bucket(): from foundations import PrefixedBucket from foundations_aws import AWSBucket return PrefixedBucket(TEST_UUID, AWSBucket, _result_bucket()) def _config(): from foundations import config_manager from foundations import PrefixedBucket, BucketPipelineArchive, BucketPipelineListing from foundations_aws import AWSBucket # archive implementations archive_implementation = { 'archive_type': BucketPipelineArchive, 'constructor_arguments': [PrefixedBucket, TEST_UUID, AWSBucket, _result_bucket()], } config_manager['archive_listing_implementation'] = { 'archive_listing_type': BucketPipelineListing, 'constructor_arguments': [PrefixedBucket, TEST_UUID, AWSBucket, _result_bucket()], } config_manager['stage_log_archive_implementation'] = archive_implementation config_manager['persisted_data_archive_implementation'] = archive_implementation config_manager['provenance_archive_implementation'] = archive_implementation config_manager['job_source_archive_implementation'] = archive_implementation config_manager['artifact_archive_implementation'] = archive_implementation config_manager['miscellaneous_archive_implementation'] = archive_implementation config_manager['run_script_environment'] = {'enable_stages': True} # quiet logs config_manager['log_level'] = 'ERROR' _config()
31.333333
90
0.775476
176
1,786
7.477273
0.278409
0.207447
0.148936
0.191489
0.569149
0.544073
0.284195
0.284195
0.284195
0.284195
0
0.001317
0.149496
1,786
56
91
31.892857
0.865043
0.030235
0
0.2
0
0
0.231616
0.197452
0
0
0
0
0
1
0.142857
false
0
0.228571
0.057143
0.485714
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc202756d04cc8d7e369fd822ac0592a77be8896
3,992
py
Python
nephos/fabric/utils.py
nicolapaoli/nephos
0871c355a6efbdaa0beb1c076543d285d177b5a4
[ "Apache-2.0" ]
null
null
null
nephos/fabric/utils.py
nicolapaoli/nephos
0871c355a6efbdaa0beb1c076543d285d177b5a4
[ "Apache-2.0" ]
174
2019-06-24T10:56:43.000Z
2021-08-02T05:38:57.000Z
nephos/fabric/utils.py
nicolapaoli/nephos
0871c355a6efbdaa0beb1c076543d285d177b5a4
[ "Apache-2.0" ]
1
2019-05-02T11:43:54.000Z
2019-05-02T11:43:54.000Z
# Copyright [2018] [Alejandro Vicente Grabovetsky via AID:Tech] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at# # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from glob import glob from os import path from kubernetes.client.rest import ApiException from nephos.helpers.k8s import Executer, secret_create, secret_from_file, secret_read from nephos.helpers.misc import execute, rand_string def credentials_secret(secret_name, namespace, username, password=None): """Create a CA credentials secret. Args: secret_name (str): Name of secret. namespace (str): Namespace for secret to be located. username (str): Username for credentials secret. password (str): Password for credentials secret. Returns: dict: Secret data including "CA_USERNAME" and "CA_PASSWORD" """ try: secret_data = secret_read(secret_name, namespace) # Check that the ID stored is the same as Orderer name # TODO: Remove asserts here, instead raise error assert username == secret_data["CA_USERNAME"] if password: assert password == secret_data["CA_PASSWORD"] except ApiException: # Get relevant variables if not password: password = rand_string(24) secret_data = {"CA_USERNAME": username, "CA_PASSWORD": password} secret_create(secret_data, secret_name, namespace) return secret_data def crypto_secret(secret_name, namespace, file_path, key): """Create a crypto-material secret. Args: secret_name (str): Name of secret. namespace (str): Namespace for secret to be located. file_path (str): Path to file we want to store as a secret. key (str): Key (file) name of secret we want to store as a secret. """ secret_files = glob(path.join(file_path, "*")) if len(secret_files) != 1: raise Exception("We should only find one file in this directory") secret_from_file( secret=secret_name, namespace=namespace, key=key, filename=secret_files[0], ) # TODO: Move this to K8S helpers def get_pod(namespace, identifier, item=0): """Get a pod object from K8S. Args: namespace (str): Namespace where pod is located. identifier (str): Name of pod, or a label descriptor. Returns: Executer: A pod object able to execute commands and return logs. """ node_pod, _ = execute( ( f"kubectl get pods -n {namespace} {identifier} " + f'-o jsonpath="{{.items[{item}].metadata.name}}"' ) ) if not node_pod: raise ValueError('"node_pod" should contain a value') pod_ex = Executer(node_pod, namespace=namespace) return pod_ex # TODO: Move this to Helm helpers def get_helm_pod(namespace, release, app, item=0): """Get a pod object from K8S. Args: namespace (str): Namespace where pod is located. release (str): Release name of pod. app (str): App type of pod. Returns: Executer: A pod object able to execute commands and return logs. """ identifier = f'-l "app={app},release={release}"' return get_pod(namespace, identifier, item=item) # No real purpose in asking the msp for now, but will needed to support multi-org def get_orderers(opts, msp=""): return opts["orderers"]["names"] # No real purpose in asking the msp for now, but will needed to support multi-org def get_peers(opts, msp=""): return opts["peers"]["names"]
33.546218
85
0.670842
547
3,992
4.804388
0.338208
0.026636
0.036149
0.028539
0.243531
0.222983
0.222983
0.20624
0.20624
0.20624
0
0.005939
0.240731
3,992
118
86
33.830508
0.861102
0.500501
0
0
0
0
0.146659
0.039109
0
0
0
0.025424
0.044444
1
0.133333
false
0.133333
0.111111
0.044444
0.355556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
1
0
0
0
0
0
2
fc255b829a24741bc3ec38d5913aab404cbe99fd
279
py
Python
examples/f16/components/fileops.py
ZikangXiong/csaf
2f03550d3c5e4b70ba3dd036bd49eb93684dcb78
[ "BSD-3-Clause" ]
null
null
null
examples/f16/components/fileops.py
ZikangXiong/csaf
2f03550d3c5e4b70ba3dd036bd49eb93684dcb78
[ "BSD-3-Clause" ]
null
null
null
examples/f16/components/fileops.py
ZikangXiong/csaf
2f03550d3c5e4b70ba3dd036bd49eb93684dcb78
[ "BSD-3-Clause" ]
null
null
null
import os import inspect def construct_path(path): assert(len(path) >= 1) return os.path.join(path[0], *path[1:]) def prepend_curr_path(path): callers_path = inspect.stack()[1].filename return os.path.join(os.path.dirname(callers_path), construct_path(path))
21.461538
76
0.709677
43
279
4.465116
0.418605
0.125
0.177083
0.166667
0
0
0
0
0
0
0
0.016736
0.143369
279
12
77
23.25
0.786611
0
0
0
0
0
0
0
0
0
0
0
0.125
1
0.25
false
0
0.25
0
0.75
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
fc287957c100fef079e15ce9ded6898601310754
3,605
py
Python
pyvmc_vmc.py
maulepilot117/python-client-for-vmware-cloud-on-aws
b56e927e2d767c61917c06b64bbd0cb37b0d636f
[ "BSD-2-Clause" ]
1
2021-11-30T23:07:09.000Z
2021-11-30T23:07:09.000Z
pyvmc_vmc.py
maulepilot117/python-client-for-vmware-cloud-on-aws
b56e927e2d767c61917c06b64bbd0cb37b0d636f
[ "BSD-2-Clause" ]
null
null
null
pyvmc_vmc.py
maulepilot117/python-client-for-vmware-cloud-on-aws
b56e927e2d767c61917c06b64bbd0cb37b0d636f
[ "BSD-2-Clause" ]
null
null
null
# VMC on AWS Python library for PyVMC ################################################################################ ### Copyright (C) 2019-2022 VMware, Inc. All rights reserved. ### SPDX-License-Identifier: BSD-2-Clause ################################################################################ import json import requests # ============================ # AWS Account and VPC # ============================ def get_compatible_subnets_json(strProdURL, orgID, sessiontoken, linkedAWSID, region): """Returns all compatible subnets for linking in selected AWS Account and AWS Region""" myHeader = {'csp-auth-token': sessiontoken} myURL = f"{strProdURL}/vmc/api/orgs/{orgID}/account-link/compatible-subnets" params = {'org': orgID, 'linkedAccountId': linkedAWSID,'region': region} response = requests.get(myURL, headers=myHeader, params=params) json_response = response.json() if response.status_code == 200: return json_response else: print("There was an error. Check the syntax.") print(f'API call failed with status code {response.status_code}. URL: {myURL}.') print(json_response['error_message']) def get_connected_accounts_json(strProdURL, orgID, sessiontoken): """ Returns all connected AWS accounts in json format """ myHeader = {'csp-auth-token': sessiontoken} myURL = f"{strProdURL}/vmc/api/orgs/{orgID}/account-link/connected-accounts" response = requests.get(myURL, headers=myHeader) json_response = response.json() if response.status_code == 200: return json_response else: print("There was an error. Check the syntax.") print(f'API call failed with status code {response.status_code}. URL: {myURL}.') print(json_response['error_message']) # ============================ # SDDC # ============================ def get_sddcs_json(strProdURL, orgID, sessiontoken): """Returns list of all SDDCs in an Org via json""" myHeader = {'csp-auth-token': sessiontoken} myURL = f"{strProdURL}/vmc/api/orgs/{orgID}/sddcs" response = requests.get(myURL, headers=myHeader) json_response = response.json() if response.status_code == 200: return json_response else: print("There was an error. Check the syntax.") print(f'API call failed with status code {response.status_code}. URL: {myURL}.') print(json_response['error_message']) def get_sddc_info_json (strProdURL, orgID, sessiontoken, sddcID): """Returns SDDC info in JSON format""" myHeader = {'csp-auth-token': sessiontoken} myURL = f"{strProdURL}/vmc/api/orgs/{orgID}/sddcs/{sddcID}" response = requests.get(myURL, headers=myHeader) json_response = response.json() if response.status_code == 200: return json_response else: print("There was an error. Check the syntax.") print(f'API call failed with status code {response.status_code}. URL: {myURL}.') print(json_response['error_message']) # ============================ # TKG # ============================ # ============================ # VTC - AWS Operations # ============================ # ============================ # VTC - DXGW Operations # ============================ # ============================ # VTC - SDDC Operations # ============================ # ============================ # VTC - SDDC Group Operations # ============================ # ============================ # VTC - TGW Operations # ============================ # ============================ # VTC - VPC Operations # ============================
32.477477
91
0.551734
370
3,605
5.281081
0.243243
0.073695
0.073695
0.06346
0.67349
0.634596
0.614637
0.614637
0.614637
0.614637
0
0.006972
0.164494
3,605
111
92
32.477477
0.641766
0.285714
0
0.744681
0
0
0.329098
0.130877
0
0
0
0
0
1
0.085106
false
0
0.042553
0
0.212766
0.255319
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc2af967190aec6e791e484ece2f930f7a3b2611
210
py
Python
Exercicios/ex051.py
Dobravoski/Exercicios-Python
e7169e1ee6954a7bc9216063845611107a13759f
[ "MIT" ]
null
null
null
Exercicios/ex051.py
Dobravoski/Exercicios-Python
e7169e1ee6954a7bc9216063845611107a13759f
[ "MIT" ]
null
null
null
Exercicios/ex051.py
Dobravoski/Exercicios-Python
e7169e1ee6954a7bc9216063845611107a13759f
[ "MIT" ]
null
null
null
p = int(input('Digite o primeiro termo de uma PA: ')) r = int(input('Digite uma razão de uma PA: ')) d = p + 9 * r print('OS 10 PRIMEIROS TERMOS DESSA PA É:') for c in range(p, d + r, r): print(c, end=' ')
30
53
0.6
42
210
3
0.619048
0.126984
0.222222
0
0
0
0
0
0
0
0
0.018519
0.228571
210
6
54
35
0.759259
0
0
0
0
0
0.466667
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc2b6d14ea4df16867279e438ff5212d839e5ff0
340
py
Python
src/modifiers/to_raw_selection.py
cursorless-dev/cursorless-talon
344fc3fb1e544f5653452fcb0416a1471e5f63e2
[ "MIT" ]
26
2022-01-27T10:47:13.000Z
2022-03-22T21:36:58.000Z
cursorless-talon/src/modifiers/to_raw_selection.py
cursorless-dev/cursorless
33d0a8fe266a9100ab8d29f4c3d2547cf692a9e2
[ "MIT" ]
11
2022-03-23T04:00:30.000Z
2022-03-31T20:01:21.000Z
cursorless-talon/src/modifiers/to_raw_selection.py
cursorless-dev/cursorless
33d0a8fe266a9100ab8d29f4c3d2547cf692a9e2
[ "MIT" ]
3
2022-02-27T10:28:39.000Z
2022-03-22T17:33:43.000Z
from typing import Any from talon import Module mod = Module() mod.list( "cursorless_to_raw_selection", desc="Cursorless modifier that converts its input to a raw selection.", ) @mod.capture(rule="{user.cursorless_to_raw_selection}") def cursorless_to_raw_selection(m) -> dict[str, Any]: return {"type": "toRawSelection"}
20
75
0.735294
47
340
5.12766
0.617021
0.19917
0.186722
0.298755
0
0
0
0
0
0
0
0
0.15
340
16
76
21.25
0.83391
0
0
0
0
0
0.417647
0.179412
0
0
0
0
0
1
0.1
false
0
0.2
0.1
0.4
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc2cbd547dbb5be0967a55730f6b37f6bbdd8e85
294
py
Python
src/repobee_plug/types.py
sakehl/repobee
6e30d680d7cc5aa0c0e95c47f37197c2fb8c7df9
[ "MIT" ]
null
null
null
src/repobee_plug/types.py
sakehl/repobee
6e30d680d7cc5aa0c0e95c47f37197c2fb8c7df9
[ "MIT" ]
11
2021-07-26T02:09:47.000Z
2022-03-29T02:15:24.000Z
src/repobee_plug/types.py
sakehl/repobee
6e30d680d7cc5aa0c0e95c47f37197c2fb8c7df9
[ "MIT" ]
null
null
null
"""Custom type definitions for use in type hints.""" from typing import TypeVar, Iterator from typing_extensions import Protocol T = TypeVar("T", covariant=True) class SizedIterable(Protocol[T]): def __len__(self) -> int: ... def __iter__(self) -> Iterator[T]: ...
19.6
52
0.659864
36
294
5.138889
0.666667
0.108108
0
0
0
0
0
0
0
0
0
0
0.210884
294
14
53
21
0.797414
0.156463
0
0.25
0
0
0.004132
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
fc488c451eaf4ae06547f98e11d8da95dacc178f
949
py
Python
src/testdata/y_attributes_8/lstm_online.py
suraj-jayakumar/lstm-rnn-ad
381c1679e3cf876208dbb7a7c0fdd7a0b0036982
[ "Apache-2.0" ]
8
2017-03-22T08:22:14.000Z
2020-08-05T11:13:10.000Z
src/testdata/y_attributes_8/lstm_online.py
suraj-jayakumar/lstm-rnn-ad
381c1679e3cf876208dbb7a7c0fdd7a0b0036982
[ "Apache-2.0" ]
null
null
null
src/testdata/y_attributes_8/lstm_online.py
suraj-jayakumar/lstm-rnn-ad
381c1679e3cf876208dbb7a7c0fdd7a0b0036982
[ "Apache-2.0" ]
2
2017-07-22T12:43:20.000Z
2019-07-05T07:11:50.000Z
# -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers.core import Dense from keras.layers.recurrent import LSTM from keras.models import Graph from keras.models import model_from_json from pandas import DataFrame import pandas as pd import pickle import os #os.system('python lstm_ad_random.py') # CONSTANTS tsteps = 12 batch_size = 1 epochs = 10 attsize = 3 k = 0 online_inps = pickle.load(open('online_x_att.p')) online_outs = pickle.load(open('online_y_att.p')) model = model_from_json(open('lstm_y_8.json').read()) model.load_weights('lstm_y_8_weights.h5') print "Training" for j in range(epochs): for i in range(len(online_inps)): model.fit(np.array([online_inps[i]]), np.array([online_outs[i]]),verbose=1,nb_epoch=j) print "Finished Training" open('lstm_y_8_online.json','w').write(model.to_json()) model.save_weights('lstm_y_8_online_weights.h5')
24.333333
94
0.75764
162
949
4.240741
0.45679
0.065502
0.034935
0.091703
0
0
0
0
0
0
0
0.0179
0.116965
949
38
95
24.973684
0.801909
0.071654
0
0
0
0
0.150513
0.029647
0
0
0
0
0
0
null
null
0
0.407407
null
null
0.074074
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
fc48a3112aa79dd6900e1e62f487bc6eb3042578
328
py
Python
Notebooks/Naive.py
m-RezaFahlevi/Mathematica-Works
325b59f7dc0a721f3af9b058991b9f1946dd4fa1
[ "MIT" ]
1
2020-11-24T09:16:35.000Z
2020-11-24T09:16:35.000Z
Notebooks/Naive.py
m-RezaFahlevi/Mathematica-Works
325b59f7dc0a721f3af9b058991b9f1946dd4fa1
[ "MIT" ]
null
null
null
Notebooks/Naive.py
m-RezaFahlevi/Mathematica-Works
325b59f7dc0a721f3af9b058991b9f1946dd4fa1
[ "MIT" ]
null
null
null
# %% def Naive(N): is_prime = True if N <= 1 : is_prime = False else: for i in range(2, N, 1): if N % i == 0: is_prime = False return(is_prime) def main(): N = 139 print(f"{N} prime ? : {Naive(N)}") if __name__=="__main__": main() # %%
17.263158
39
0.42378
44
328
2.886364
0.5
0.220472
0.188976
0
0
0
0
0
0
0
0
0.037037
0.42378
328
18
40
18.222222
0.634921
0.015244
0
0.142857
0
0
0.10596
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
0.071429
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc4a186680025c51d051373f56f1499cdcf95965
1,803
py
Python
conditional/blueprints/cache_management.py
adamhb123/conditional
7193443106f83e8260b61535b6d6a253f01133f8
[ "MIT" ]
9
2016-08-21T19:27:24.000Z
2019-09-12T06:56:49.000Z
conditional/blueprints/cache_management.py
adamhb123/conditional
7193443106f83e8260b61535b6d6a253f01133f8
[ "MIT" ]
237
2016-08-21T18:08:58.000Z
2022-03-28T17:01:36.000Z
conditional/blueprints/cache_management.py
adamhb123/conditional
7193443106f83e8260b61535b6d6a253f01133f8
[ "MIT" ]
31
2016-08-22T23:46:48.000Z
2022-03-26T22:37:39.000Z
import os import signal import structlog from flask import Blueprint, request, redirect from conditional import auth from conditional.util.auth import get_user from conditional.util.cache import clear_all_cached_functions from conditional.util.ldap import _ldap_is_member_of_directorship from conditional.util.ldap import ldap_get_active_members from conditional.util.ldap import ldap_get_current_students from conditional.util.ldap import ldap_get_intro_members from conditional.util.ldap import ldap_get_member from conditional.util.ldap import ldap_get_onfloor_members from conditional.util.ldap import ldap_is_eval_director from conditional.util.ldap import ldap_is_rtp logger = structlog.get_logger() cache_bp = Blueprint('cache_bp', __name__) @cache_bp.route('/restart') @auth.oidc_auth @get_user def restart_app(user_dict=None): if not ldap_is_rtp(user_dict['account']): return redirect("/dashboard") log = logger.new(request=request, auth_dict=user_dict) log.info('Restart Conditional') os.kill(os.getpid(), signal.SIGINT) return "application restarted", 200 @cache_bp.route('/clearcache') @auth.oidc_auth @get_user def clear_cache(user_dict=None): if not ldap_is_eval_director(user_dict['account']) and not ldap_is_rtp(user_dict['account']): return redirect("/dashboard") log = logger.new(request=request, auth_dict=user_dict) log.info('Purge All Caches') clear_all_cached_functions() return "cache cleared", 200 def clear_members_cache(): ldap_get_member.cache_clear() ldap_get_active_members.cache_clear() ldap_get_current_students.cache_clear() ldap_get_intro_members.cache_clear() ldap_get_onfloor_members.cache_clear() def clear_committee_cache(): _ldap_is_member_of_directorship.clear_cache()
29.557377
97
0.795341
263
1,803
5.106464
0.239544
0.122859
0.141474
0.137007
0.505585
0.435592
0.402829
0.211467
0.147431
0.147431
0
0.003778
0.119246
1,803
60
98
30.05
0.84194
0
0
0.177778
0
0
0.075984
0
0
0
0
0
0
1
0.088889
false
0
0.333333
0
0.511111
0.044444
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
fc4c4adafd16d1a302751e1b31c8b74d9096f6d0
2,771
py
Python
packages/python/yap_kernel/yap_kernel/inprocess/manager.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
90
2015-03-09T01:24:15.000Z
2022-02-24T13:56:25.000Z
packages/python/yap_kernel/yap_kernel/inprocess/manager.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
52
2016-02-14T08:59:37.000Z
2022-03-14T16:39:35.000Z
packages/python/yap_kernel/yap_kernel/inprocess/manager.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
27
2015-11-19T02:45:49.000Z
2021-11-25T19:47:58.000Z
"""A kernel manager for in-process kernels.""" # Copyright (c) yap_ipython Development Team. # Distributed under the terms of the Modified BSD License. from traitlets import Instance, DottedObjectName, default from jupyter_client.managerabc import KernelManagerABC from jupyter_client.manager import KernelManager from jupyter_client.session import Session from .constants import INPROCESS_KEY class InProcessKernelManager(KernelManager): """A manager for an in-process kernel. This class implements the interface of `jupyter_client.kernelmanagerabc.KernelManagerABC` and allows (asynchronous) frontends to be used seamlessly with an in-process kernel. See `jupyter_client.kernelmanager.KernelManager` for docstrings. """ # The kernel process with which the KernelManager is communicating. kernel = Instance('yap_kernel.inprocess.ipkernel.InProcessKernel', allow_none=True) # the client class for KM.client() shortcut client_class = DottedObjectName('yap_kernel.inprocess.BlockingInProcessKernelClient') @default('blocking_class') def _default_blocking_class(self): from .blocking import BlockingInProcessKernelClient return BlockingInProcessKernelClient @default('session') def _default_session(self): # don't sign in-process messages return Session(key=INPROCESS_KEY, parent=self) #-------------------------------------------------------------------------- # Kernel management methods #-------------------------------------------------------------------------- def start_kernel(self, **kwds): from yap_kernel.inprocess.ipkernel import InProcessKernel self.kernel = InProcessKernel(parent=self, session=self.session) def shutdown_kernel(self): self.kernel.iopub_thread.stop() self._kill_kernel() def restart_kernel(self, now=False, **kwds): self.shutdown_kernel() self.start_kernel(**kwds) @property def has_kernel(self): return self.kernel is not None def _kill_kernel(self): self.kernel = None def interrupt_kernel(self): raise NotImplementedError("Cannot interrupt in-process kernel.") def signal_kernel(self, signum): raise NotImplementedError("Cannot signal in-process kernel.") def is_alive(self): return self.kernel is not None def client(self, **kwargs): kwargs['kernel'] = self.kernel return super(InProcessKernelManager, self).client(**kwargs) #----------------------------------------------------------------------------- # ABC Registration #----------------------------------------------------------------------------- KernelManagerABC.register(InProcessKernelManager)
33.792683
89
0.644533
276
2,771
6.351449
0.362319
0.051341
0.034227
0.019395
0.036509
0.036509
0.036509
0.036509
0
0
0
0
0.175388
2,771
81
90
34.209877
0.767177
0.326236
0
0.05
0
0
0.103562
0.052055
0
0
0
0
0
1
0.275
false
0
0.175
0.075
0.65
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
fc68af2ae257b6e1d429f6c17f50f81258055208
1,809
py
Python
test/data_client/controller/ping_core_data_client_test.py
trcox/py-core-data-client
a6d35a792c99ccf5196d5618d5dc9df6413e16f7
[ "Apache-2.0" ]
null
null
null
test/data_client/controller/ping_core_data_client_test.py
trcox/py-core-data-client
a6d35a792c99ccf5196d5618d5dc9df6413e16f7
[ "Apache-2.0" ]
null
null
null
test/data_client/controller/ping_core_data_client_test.py
trcox/py-core-data-client
a6d35a792c99ccf5196d5618d5dc9df6413e16f7
[ "Apache-2.0" ]
null
null
null
# ******************************************************************************* # Copyright 2017 Dell Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under the License # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # or implied. See the License for the specific language governing permissions and limitations under # the License. # # @microservice: py-core-data-client library # @author: Tyler Cox, Dell # @version: 1.0.0 # ******************************************************************************* import static org.junit.Assert.self.assertEqual import java.lang.reflect.Field from controller import PingCoreDataClient from controller.impl import PingCoreDataClientImpl from test.category import RequiresCoreDataRunning import org.junit.Before import org.junit.Test import org.junit.experimental.categories.Category @Category({RequiresCoreDataRunning.class}) class PingCoreDataClientTest { private static final String ENDPT = "http://localhost:48080/api/v1/ping" private PingCoreDataClient client # setup tests the add function @Before def setUp() throws Exception { client = new PingCoreDataClientImpl() setURL() private void setURL() throws Exception { Class<?> clientClass = client.getClass() Field temp = clientClass.getDeclaredField("url") temp.setAccessible(true) temp.set(client, ENDPT) def testPing(): self.assertEqual("pong", client.ping(), "Ping Core Data Micro Service failed") }
33.5
99
0.678275
211
1,809
5.815166
0.606635
0.0489
0.03423
0.02608
0
0
0
0
0
0
0
0.01117
0.158651
1,809
53
100
34.132075
0.795007
0
0
0
0
0
0.077949
0
0
0
0
0
0.083333
0
null
null
0
0.333333
null
null
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
fc768223a1f97b1431ad62194917ce15b42c5089
457
py
Python
PyCharm/Exercicios/Aula10/ex034.py
fabiodarice/Python
15ec1c7428f138be875111ac98ba38cf2eec1a93
[ "MIT" ]
null
null
null
PyCharm/Exercicios/Aula10/ex034.py
fabiodarice/Python
15ec1c7428f138be875111ac98ba38cf2eec1a93
[ "MIT" ]
null
null
null
PyCharm/Exercicios/Aula10/ex034.py
fabiodarice/Python
15ec1c7428f138be875111ac98ba38cf2eec1a93
[ "MIT" ]
null
null
null
print('Vamos calcular o aumento do seu salário') salario = float(input('Digite o valor do seu salário R$')) if salario > 1250: aumento = salario * 0.10 print('Seu \033[4;31maumento\033[m será de \033[1;34mR${:.2f}\033[m, salário total R${:.2f}'.format(aumento, salario + aumento)) else: aumento = salario * 0.15 print('Seu \033[4;33maumento\033[m será de \033[1;36mR${:.2f}\033[m, salário toral R${:.2f}'.format(aumento, salario + aumento))
50.777778
132
0.671772
76
457
4.039474
0.447368
0.18241
0.078176
0.078176
0.286645
0.286645
0
0
0
0
0
0.128866
0.150985
457
8
133
57.125
0.662371
0
0
0
0
0.25
0.522976
0.210066
0
0
0
0
0
1
0
false
0
0
0
0
0.375
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc7722ecffcb1c5189aca05fd62856447ffe6549
673
py
Python
pyDownload/main.py
Dhruv-Jauhar/pyDownload
4c64427037533dccf9d4dd958a46cded2422985a
[ "MIT" ]
null
null
null
pyDownload/main.py
Dhruv-Jauhar/pyDownload
4c64427037533dccf9d4dd958a46cded2422985a
[ "MIT" ]
null
null
null
pyDownload/main.py
Dhruv-Jauhar/pyDownload
4c64427037533dccf9d4dd958a46cded2422985a
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- """ Usage: pyd <url> [--hash <value>] [--auth <u> <p] [--version] Examples: pyd https://www.python.org/static/img/python-logo.png : Download's the python logo from their homepage pyd https://www.example.com/... --auth username password : When authentication is required pyd https://www.example.com/... --auth username : Takes password after the command without being displayed on screen (like in terminals) Options: -h,--help """ from docopt import docopt import getpass import pyDownload def start(): arguments = docopt(__doc__) pyDownload.main(arguments[0], arguments[1]) if __name__ == '__main__': start()
28.041667
140
0.677563
89
673
4.988764
0.696629
0.054054
0.074324
0.081081
0.148649
0.148649
0.148649
0
0
0
0
0.005396
0.173848
673
23
141
29.26087
0.793165
0.710253
0
0
0
0
0.041237
0
0
0
0
0
0
1
0.125
false
0.125
0.375
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
2
fc8bacfd78f8d843f26729e205d90d23f1b7e70a
23,032
py
Python
tests/test_acceptance/test_scenario_5183.py
nextflow/ucloud-sdk-python3
d5296e1030d8af6b43a5d6f61f9884060db0a324
[ "Apache-2.0" ]
null
null
null
tests/test_acceptance/test_scenario_5183.py
nextflow/ucloud-sdk-python3
d5296e1030d8af6b43a5d6f61f9884060db0a324
[ "Apache-2.0" ]
null
null
null
tests/test_acceptance/test_scenario_5183.py
nextflow/ucloud-sdk-python3
d5296e1030d8af6b43a5d6f61f9884060db0a324
[ "Apache-2.0" ]
null
null
null
""" Code is generated by ucloud-model, DO NOT EDIT IT. """ import pytest from ucloud.core import exc from ucloud.testing import funcs, op, env, utest from ucloud.testing.driver import spec scenario = spec.scenario(5183, "UCloudStack_02", owners=["lisa.wang@ucloud.cn"]) @pytest.mark.skipif(env.is_ut(), reason=env.get_skip_reason()) def test_scenario_5183(ustack_client, variables): scenario.store.update(variables) scenario.store["Region"] = "cn" scenario.store["Zone"] = "zone-01" scenario.store["BeginTime"] = funcs.get_timestamp(10,) - 3600 scenario.store["EndTime"] = funcs.get_timestamp(10,) # 查询VPC信息 describe_vpc_00(ustack_client) # 查询安全组信息 describe_security_group_01(ustack_client) # 查询存储类型 describe_storage_type_02(ustack_client) # 查询主机机型 describe_vm_type_03(ustack_client) # 获取镜像信息,包括默认镜像和自制镜像。 describe_image_04(ustack_client) # 获取镜像信息,包括默认镜像和自制镜像。 describe_image_05(ustack_client) # 创建虚拟机 create_vm_instance_06(ustack_client) # 查询虚拟机 describe_vm_instance_07(ustack_client) # 申请外网IP allocate_eip_08(ustack_client) # 创建负载均衡 create_lb_09(ustack_client) # 获取负载均衡信息 describe_lb_10(ustack_client) # 创建负载均衡VServer create_vs_11(ustack_client) # 修改负载均衡VServer update_vs_12(ustack_client) # 添加服务节点 create_rs_13(ustack_client) # 修改服务节点 update_rs_14(ustack_client) # 获取服务节点信息 describe_rs_15(ustack_client) # 禁用服务节点 disable_rs_16(ustack_client) # 获取服务节点信息 describe_rs_17(ustack_client) # 启用服务节点 enable_rs_18(ustack_client) # 获取服务节点信息 describe_rs_19(ustack_client) # 创建内容转发规则 create_vs_policy_20(ustack_client) # 获取内容转发规则信息 describe_vs_policy_21(ustack_client) # 更新内容转发规则 update_vs_policy_22(ustack_client) # 删除内容转发规则 delete_vs_policy_23(ustack_client) # 移除服务节点 delete_rs_24(ustack_client) # 断电虚拟机 poweroff_vm_instance_25(ustack_client) # 删除虚拟机 delete_vm_instance_26(ustack_client) # 删除负载均衡 delete_lb_27(ustack_client) @scenario.api( title="查询VPC信息", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeVPCResponse"), ], action="DescribeVPC", ) def describe_vpc_00(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().describe_vpc(d) except exc.RetCodeException as e: resp = e.json() variables["VPCID"] = utest.value_at_path(resp, "Infos.0.VPCID") variables["SubnetID"] = utest.value_at_path( resp, "Infos.0.SubnetInfos.0.SubnetID" ) return resp @scenario.api( title="查询安全组信息", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeSecurityGroupResponse"), ], action="DescribeSecurityGroup", ) def describe_security_group_01(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().describe_security_group(d) except exc.RetCodeException as e: resp = e.json() variables["SGID"] = utest.value_at_path(resp, "Infos.0.SGID") return resp @scenario.api( title="查询存储类型", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeStorageTypeResponse"), ], action="DescribeStorageType", ) def describe_storage_type_02(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().describe_storage_type(d) except exc.RetCodeException as e: resp = e.json() variables["StorageType"] = utest.value_at_path(resp, "Infos.0.StorageType") return resp @scenario.api( title="查询主机机型", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeVMTypeResponse"), ], action="DescribeVMType", ) def describe_vm_type_03(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().describe_vm_type(d) except exc.RetCodeException as e: resp = e.json() variables["VMType"] = "ComputeSetBBBB" return resp @scenario.api( title="获取镜像信息,包括默认镜像和自制镜像。", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeImageResponse"), ], action="DescribeImage", ) def describe_image_04(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().describe_image(d) except exc.RetCodeException as e: resp = e.json() variables["Infos"] = utest.value_at_path(resp, "Infos") return resp @scenario.api( title="获取镜像信息,包括默认镜像和自制镜像。", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeImageResponse"), ], action="DescribeImage", ) def describe_image_05(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), "ImageIDs": [ funcs.search_value( variables.get("Infos"), "OSName", "CentOS 6.5 x86_64", "ImageID", ), ], } try: resp = client.ucloudstack().describe_image(d) except exc.RetCodeException as e: resp = e.json() variables["ImageID"] = utest.value_at_path(resp, "Infos.0.ImageID") return resp @scenario.api( title="创建虚拟机", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "CreateVMInstanceResponse"), ], action="CreateVMInstance", ) def create_vm_instance_06(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "WANSGID": variables.get("SGID"), "VPCID": variables.get("VPCID"), "VMType": variables.get("VMType"), "SubnetID": variables.get("SubnetID"), "Region": variables.get("Region"), "Quantity": 1, "Password": "Zhongshang_2018", "Name": "host_test", "Memory": 2048, "ImageID": variables.get("ImageID"), "DataDiskSpace": 10, "DataDiskSetType": "StorageSetBBBB", "ChargeType": "Month", "CPU": 1, "BootDiskSetType": "StorageSetBBBB", } try: resp = client.ucloudstack().create_vm_instance(d) except exc.RetCodeException as e: resp = e.json() variables["VMID"] = utest.value_at_path(resp, "VMID") return resp @scenario.api( title="查询虚拟机", max_retries=3, retry_interval=1, startup_delay=90, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeVMInstanceResponse"), ("str_eq", "Infos.0.State", "Running"), ], action="DescribeVMInstance", ) def describe_vm_instance_07(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VMIDs": [variables.get("VMID"),], "Region": variables.get("Region"), } try: resp = client.ucloudstack().describe_vm_instance(d) except exc.RetCodeException as e: resp = e.json() variables["InterfaceID"] = utest.value_at_path( resp, "Infos.0.IPInfos.0.InterfaceID" ) variables["DiskID"] = utest.value_at_path( resp, "Infos.0.DiskInfos.0.DiskID" ) return resp @scenario.api( title="申请外网IP", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "AllocateEIPResponse"), ], action="AllocateEIP", ) def allocate_eip_08(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), "OperatorName": "Bgp", "Name": "test_eip", "ChargeType": "Month", "Bandwidth": 2, } try: resp = client.ucloudstack().allocate_eip(d) except exc.RetCodeException as e: resp = e.json() variables["EIPID"] = utest.value_at_path(resp, "EIPID") return resp @scenario.api( title="创建负载均衡", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "CreateLBResponse"), ], action="CreateLB", ) def create_lb_09(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VPCID": variables.get("VPCID"), "VMType": variables.get("VMType"), "SubnetID": variables.get("SubnetID"), "SGID": variables.get("SGID"), "Region": variables.get("Region"), "Name": "lb_test1", "LBType": "WAN", "EIPID": variables.get("EIPID"), "ChargeType": "Month", } try: resp = client.ucloudstack().create_lb(d) except exc.RetCodeException as e: resp = e.json() variables["LBID"] = utest.value_at_path(resp, "LBID") return resp @scenario.api( title="获取负载均衡信息", max_retries=3, retry_interval=1, startup_delay=60, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeLBResponse"), ("str_eq", "Infos.0.LBStatus", "Running"), ], action="DescribeLB", ) def describe_lb_10(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), "LBIDs": [variables.get("LBID"),], } try: resp = client.ucloudstack().describe_lb(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="创建负载均衡VServer", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "CreateVSResponse"), ], action="CreateVS", ) def create_vs_11(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Scheduler": "wrr", "Region": variables.get("Region"), "Protocol": "HTTP", "Port": 123, "LBID": variables.get("LBID"), "HealthcheckType": "Port", } try: resp = client.ucloudstack().create_vs(d) except exc.RetCodeException as e: resp = e.json() variables["VSID"] = utest.value_at_path(resp, "VSID") return resp @scenario.api( title="修改负载均衡VServer", max_retries=3, retry_interval=1, startup_delay=10, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "UpdateVSResponse"), ], action="UpdateVS", ) def update_vs_12(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Scheduler": "ip_hash", "Region": variables.get("Region"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().update_vs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="添加服务节点", max_retries=3, retry_interval=1, startup_delay=10, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "CreateRSResponse"), ], action="CreateRS", ) def create_rs_13(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Weight": 1, "VSID": variables.get("VSID"), "Region": variables.get("Region"), "Port": 112, "LBID": variables.get("LBID"), "BindResourceID": variables.get("VMID"), } try: resp = client.ucloudstack().create_rs(d) except exc.RetCodeException as e: resp = e.json() variables["RSID"] = utest.value_at_path(resp, "RSID") return resp @scenario.api( title="修改服务节点", max_retries=3, retry_interval=1, startup_delay=10, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "UpdateRSResponse"), ], action="UpdateRS", ) def update_rs_14(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Weight": 55, "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSID": variables.get("RSID"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().update_rs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="获取服务节点信息", max_retries=3, retry_interval=1, startup_delay=30, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeRSResponse"), ], action="DescribeRS", ) def describe_rs_15(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().describe_rs(d) except exc.RetCodeException as e: resp = e.json() variables["RSID_1"] = utest.value_at_path(resp, "Infos.0.RSID") return resp @scenario.api( title="禁用服务节点", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DisableRSResponse"), ], action="DisableRS", ) def disable_rs_16(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSID": variables.get("RSID"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().disable_rs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="获取服务节点信息", max_retries=3, retry_interval=1, startup_delay=30, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeRSResponse"), ("str_eq", "Infos.0.RSMode", "Disable"), ], action="DescribeRS", ) def describe_rs_17(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSIDs": [variables.get("RSID"),], "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().describe_rs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="启用服务节点", max_retries=3, retry_interval=1, startup_delay=10, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "EnableRSResponse"), ], action="EnableRS", ) def enable_rs_18(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSID": variables.get("RSID"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().enable_rs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="获取服务节点信息", max_retries=3, retry_interval=1, startup_delay=30, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeRSResponse"), ("str_eq", "Infos.0.RSMode", "Enable"), ], action="DescribeRS", ) def describe_rs_19(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSIDs": [variables.get("RSID"),], "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().describe_rs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="创建内容转发规则", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "CreateVSPolicyResponse"), ], action="CreateVSPolicy", ) def create_vs_policy_20(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSIDs": [variables.get("RSID"),], "Path": "/test12321", "LBID": variables.get("LBID"), "Domain": "test.com11", } try: resp = client.ucloudstack().create_vs_policy(d) except exc.RetCodeException as e: resp = e.json() variables["PolicyID"] = utest.value_at_path(resp, "PolicyID") return resp @scenario.api( title="获取内容转发规则信息", max_retries=3, retry_interval=1, startup_delay=20, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DescribeVSPolicyResponse"), ], action="DescribeVSPolicy", ) def describe_vs_policy_21(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "PolicyIDs": [variables.get("PolicyID"),], "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().describe_vs_policy(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="更新内容转发规则", max_retries=3, retry_interval=1, startup_delay=10, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "UpdateVSPolicyResponse"), ], action="UpdateVSPolicy", ) def update_vs_policy_22(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "PolicyID": variables.get("PolicyID"), "Path": "/testnew", "LBID": variables.get("LBID"), "Domain": "test.comnew", } try: resp = client.ucloudstack().update_vs_policy(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="删除内容转发规则", max_retries=3, retry_interval=1, startup_delay=10, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DeleteVSPolicyResponse"), ], action="DeleteVSPolicy", ) def delete_vs_policy_23(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "PolicyID": variables.get("PolicyID"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().delete_vs_policy(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="移除服务节点", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DeleteRSResponse"), ], action="DeleteRS", ) def delete_rs_24(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VSID": variables.get("VSID"), "Region": variables.get("Region"), "RSID": variables.get("RSID"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().delete_rs(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="断电虚拟机", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "PoweroffVMInstanceResponse"), ], action="PoweroffVMInstance", ) def poweroff_vm_instance_25(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VMID": variables.get("VMID"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().poweroff_vm_instance(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="删除虚拟机", max_retries=3, retry_interval=1, startup_delay=60, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DeleteVMInstanceResponse"), ], action="DeleteVMInstance", ) def delete_vm_instance_26(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "VMID": variables.get("VMID"), "Region": variables.get("Region"), } try: resp = client.ucloudstack().delete_vm_instance(d) except exc.RetCodeException as e: resp = e.json() return resp @scenario.api( title="删除负载均衡", max_retries=3, retry_interval=1, startup_delay=0, fast_fail=False, validators=lambda variables: [ ("str_eq", "RetCode", 0), ("str_eq", "Action", "DeleteLBResponse"), ], action="DeleteLB", ) def delete_lb_27(step, client): variables = step.store d = { "Zone": variables.get("Zone"), "Region": variables.get("Region"), "LBID": variables.get("LBID"), } try: resp = client.ucloudstack().delete_lb(d) except exc.RetCodeException as e: resp = e.json() return resp
22.917413
80
0.592784
2,544
23,032
5.201651
0.111635
0.099751
0.033855
0.033855
0.7176
0.668254
0.644147
0.628429
0.615885
0.613013
0
0.018002
0.254733
23,032
1,004
81
22.940239
0.752927
0.013199
0
0.644556
1
0
0.166476
0.018331
0
0
0
0
0
1
0.036295
false
0.001252
0.005006
0
0.076345
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fc955c29258b5c2e9e4d5b239fd157ec48ead4c9
446
py
Python
taobao_wechat_bot/top/api/rest/ProductImgUploadRequest.py
zyphs21/myPythonPractise
7da984c98ee93e650ab2f9da4a2502340f1220b4
[ "MIT" ]
null
null
null
taobao_wechat_bot/top/api/rest/ProductImgUploadRequest.py
zyphs21/myPythonPractise
7da984c98ee93e650ab2f9da4a2502340f1220b4
[ "MIT" ]
null
null
null
taobao_wechat_bot/top/api/rest/ProductImgUploadRequest.py
zyphs21/myPythonPractise
7da984c98ee93e650ab2f9da4a2502340f1220b4
[ "MIT" ]
null
null
null
''' Created by auto_sdk on 2012.10.15 ''' from top.api.base import RestApi class ProductImgUploadRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.id = None self.image = None self.is_major = None self.position = None self.product_id = None def getapiname(self): return 'taobao.product.img.upload' def getMultipartParas(self): return ['image']
23.473684
56
0.699552
62
446
4.854839
0.596774
0.106312
0.093023
0
0
0
0
0
0
0
0
0.027248
0.17713
446
18
57
24.777778
0.792916
0.073991
0
0
0
0
0.121447
0.064599
0
0
0
0
0
1
0.230769
false
0
0.076923
0.153846
0.538462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
5d76a7c2423e1aeb9af6d1330ad8803cd4e3b2da
336
py
Python
Numpy/Mathemtical_Functions.py
Magdyedwar1996/python-level-one-codes
066086672f43488bc8b32c620b5e2f94cedfe3da
[ "MIT" ]
1
2021-11-16T14:14:38.000Z
2021-11-16T14:14:38.000Z
Numpy/Mathemtical_Functions.py
Magdyedwar1996/python-level-one-codes
066086672f43488bc8b32c620b5e2f94cedfe3da
[ "MIT" ]
null
null
null
Numpy/Mathemtical_Functions.py
Magdyedwar1996/python-level-one-codes
066086672f43488bc8b32c620b5e2f94cedfe3da
[ "MIT" ]
null
null
null
import numpy as np # We create a rank 1 ndarray x = np.array([1,2,3,4]) # We print x print() print('x = ', x) # We apply different mathematical functions to all elements of x print() print('EXP(x) =', np.exp(x)) print() print('SQRT(x) =',np.sqrt(x)) print() print('POW(x,2) =',np.power(x,2)) # We raise all elements to the power of 2
22.4
75
0.64881
66
336
3.30303
0.454545
0.110092
0.201835
0
0
0
0
0
0
0
0
0.028571
0.166667
336
15
75
22.4
0.75
0.416667
0
0.4
0
0
0.161458
0
0
0
0
0
0
1
0
false
0
0.1
0
0.1
0.8
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
5d77003718ac6248ba055b4f22e76650348a68a5
506
py
Python
python_code/hash_chapter1_reimpl_js.py
possnfiffer/inside_python_dict
4a16f41062c98974618b25711d3e56bf71a71294
[ "MIT" ]
124
2018-12-24T21:17:34.000Z
2022-02-17T06:32:22.000Z
python_code/hash_chapter1_reimpl_js.py
possnfiffer/inside_python_dict
4a16f41062c98974618b25711d3e56bf71a71294
[ "MIT" ]
1
2021-06-18T21:21:38.000Z
2021-07-05T00:32:59.000Z
python_code/hash_chapter1_reimpl_js.py
possnfiffer/inside_python_dict
4a16f41062c98974618b25711d3e56bf71a71294
[ "MIT" ]
8
2018-12-25T11:59:56.000Z
2020-07-10T16:49:14.000Z
from js_reimpl_common import run_op_chapter1_chapter2 def run_op(keys, op, **kwargs): return run_op_chapter1_chapter2("chapter1", None, keys, op, **kwargs) def create_new(numbers): return run_op(None, "create_new", array=numbers) def create_new_broken(numbers): return run_op(None, "create_new_broken", array=numbers) def has_key(keys, key): return run_op(keys, "has_key", key=key) def linear_search(numbers, key): return run_op(None, "linear_search", key=key, array=numbers)
23
73
0.73913
79
506
4.443038
0.291139
0.099715
0.156695
0.128205
0.176638
0.176638
0.176638
0
0
0
0
0.011494
0.140316
506
21
74
24.095238
0.795402
0
0
0
0
0
0.108696
0
0
0
0
0
0
1
0.454545
false
0
0.090909
0.454545
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
5d7bcc2f7fe0a8890f77f95c082936e0541a67bd
1,105
py
Python
scripts/hermann5_distribution.py
mmsbrggr/polar
34348baf6992232e47cee7a4d56b5a96567c50b8
[ "MIT" ]
2
2021-10-06T13:29:24.000Z
2021-11-11T19:42:43.000Z
scripts/hermann5_distribution.py
mmsbrggr/polar
34348baf6992232e47cee7a4d56b5a96567c50b8
[ "MIT" ]
1
2022-01-26T15:58:28.000Z
2022-01-28T13:47:28.000Z
scripts/hermann5_distribution.py
mmsbrggr/polar
34348baf6992232e47cee7a4d56b5a96567c50b8
[ "MIT" ]
2
2021-10-01T15:08:52.000Z
2022-03-15T14:10:06.000Z
from sympy import * from sympy.solvers.solveset import linsolve p0 = Symbol("p0", real=True) p1 = Symbol("p1", real=True) p2 = Symbol("p2", real=True) p3 = Symbol("p3", real=True) p4 = Symbol("p4", real=True) p5 = Symbol("p5", real=True) m = { 1: sympify("1 - 2 * 9 ** (-n) + (162 / 43) * (11 / 81) ** n + (96 / 43) * (2 / 3) ** n"), 2: sympify("1 - 8 * 9 ** (-n) + (992 / 43) * (11 / 81) ** n + (384 / 43) * (2 / 3) ** n"), 3: sympify("1 - 26 * 9 ** (-n) + (5202 / 43) * (11 / 81) ** n + (1248 / 43) * (2 / 3) ** n"), 4: sympify("1 - 80 * 9 ** (-n) + (26432 / 43) * (11 / 81) ** n + (3840 / 43) * (2 / 3) ** n"), 5: sympify("1 - 242 * 9 ** (-n) + (133122 / 43) * (11 / 81) ** n + (11616 / 43) * (2 / 3) ** n") } equations = [(0**p)*p0 + (1**p)*p1 + (2**p)*p2 + (3**p)*p3 + (4**p)*p4 + (5**p)*p5 - m[p] for p in (1, 2, 3, 4, 5)] equations.append(p0 + p1 + p2 + p3 + p4 + p5 - 1) solution = linsolve(equations, (p0, p1, p2, p3, p4, p5)) solution = list(solution)[0] print([s for s in solution]) print([N(s) for s in solution]) print([limit(s, Symbol("n"), oo) for s in solution])
38.103448
115
0.481448
194
1,105
2.742268
0.273196
0.090226
0.056391
0.065789
0.120301
0.120301
0
0
0
0
0
0.186158
0.241629
1,105
28
116
39.464286
0.448687
0
0
0
0
0.227273
0.362896
0
0
0
0
0
0
1
0
false
0
0.090909
0
0.090909
0.136364
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d8809f54804ad8f8227da44f8a07e96ec2cf55f
260
py
Python
src/atc/etl/types.py
atc-net/atc-dataplatform
4614efbbc9a5b2b4e063cc12211aa5c697cad115
[ "MIT" ]
6
2021-09-10T09:50:20.000Z
2022-02-12T09:30:47.000Z
src/atc/etl/types.py
atc-net/atc-dataplatform
4614efbbc9a5b2b4e063cc12211aa5c697cad115
[ "MIT" ]
40
2021-09-10T11:20:42.000Z
2022-03-25T08:26:57.000Z
src/atc/etl/types.py
atc-net/atc-dataplatform
4614efbbc9a5b2b4e063cc12211aa5c697cad115
[ "MIT" ]
2
2021-09-10T10:07:04.000Z
2022-02-16T17:49:08.000Z
from abc import abstractmethod from typing import Dict from pyspark.sql import DataFrame dataset_group = Dict[str, DataFrame] class EtlBase: @abstractmethod def etl(self, inputs: dataset_group) -> dataset_group: raise NotImplementedError()
20
58
0.757692
31
260
6.258065
0.645161
0.185567
0
0
0
0
0
0
0
0
0
0
0.180769
260
12
59
21.666667
0.910798
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0.375
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
5d8d358ac99c16be18f5f791f5545f5d6f88e1f9
1,183
py
Python
examples/concaves.py
nightimer-AU/collision
0a140ee70f479fcdab7e2284f533c256d5a2f06a
[ "MIT" ]
37
2018-10-16T04:41:42.000Z
2022-03-06T17:44:23.000Z
examples/concaves.py
nightimer-AU/collision
0a140ee70f479fcdab7e2284f533c256d5a2f06a
[ "MIT" ]
9
2019-12-28T07:30:33.000Z
2021-11-11T11:18:33.000Z
examples/concaves.py
nightimer-AU/collision
0a140ee70f479fcdab7e2284f533c256d5a2f06a
[ "MIT" ]
10
2019-03-18T14:40:30.000Z
2022-02-22T12:02:14.000Z
import pygame as pg import sys from collision import * SCREENSIZE = (500,500) screen = pg.display.set_mode(SCREENSIZE, pg.DOUBLEBUF|pg.HWACCEL) v = Vector p0 = Concave_Poly(v(0,0), [v(-80,0), v(-20,20), v(0,80), v(20,20), v(80,0), v(20,-20), v(0,-80), v(-20,-20)]) p1 = Concave_Poly(v(500,500), [v(-80,0), v(-20,20), v(0,80), v(20,20), v(80,0), v(20,-20), v(0,-80), v(-20,-20)]) clock = pg.time.Clock() while 1: for event in pg.event.get(): if event.type == pg.QUIT: sys.exit() screen.fill((0,0,0)) p0.pos.x += 1 p0.pos.y += 0.75 p0.angle += 0.005 p1.pos.x -= 0.6 p1.pos.y -= 0.5 p0c, p1c, p2c = (0,255,255),(0,255,255),(0,255,255) p0bc = (255,255,255) p1bc = (255,255,255) if collide(p0,p1): p1c = (255,0,0); p0c = (255,0,0); if test_aabb(p0.aabb,p1.aabb): p1bc = (255,0,0); p0bc = (255,0,0); pg.draw.polygon(screen, p0c, p0.points, 3) pg.draw.polygon(screen, p1c, p1.points, 3) pg.draw.polygon(screen, p0bc, (p0.aabb[0],p0.aabb[1],p0.aabb[3],p0.aabb[2]), 3) pg.draw.polygon(screen, p1bc, (p1.aabb[0],p1.aabb[1],p1.aabb[3],p1.aabb[2]), 3) pg.display.flip() clock.tick(100)
25.717391
114
0.565511
236
1,183
2.817797
0.262712
0.03609
0.06015
0.054135
0.24812
0.218045
0.108271
0.108271
0.108271
0.108271
0
0.202717
0.19104
1,183
45
115
26.288889
0.492163
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.1
0
0.1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5da4a4d47946320aaf5f546f3936855cf77c2fbc
222
py
Python
pyof/__init__.py
hdiogenes/python-openflow
ee5bb5d1bdb54f3b688e3e6d07a8399c756f8397
[ "MIT" ]
null
null
null
pyof/__init__.py
hdiogenes/python-openflow
ee5bb5d1bdb54f3b688e3e6d07a8399c756f8397
[ "MIT" ]
null
null
null
pyof/__init__.py
hdiogenes/python-openflow
ee5bb5d1bdb54f3b688e3e6d07a8399c756f8397
[ "MIT" ]
null
null
null
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '2020.2b3'
31.714286
68
0.788288
32
222
5.34375
0.8125
0.187135
0
0
0
0
0
0
0
0
0
0.031915
0.153153
222
6
69
37
0.87766
0.851351
0
0
0
0
0.307692
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5da88d7edcf8808521a94930d601ba32e64420f1
427
py
Python
api/v2/views/provider_type.py
simpsonw/atmosphere
3a5203ef0b563de3a0e8c8c8715df88186532d7a
[ "BSD-3-Clause" ]
197
2016-12-08T02:33:32.000Z
2022-03-23T14:27:47.000Z
api/v2/views/provider_type.py
simpsonw/atmosphere
3a5203ef0b563de3a0e8c8c8715df88186532d7a
[ "BSD-3-Clause" ]
385
2017-01-03T22:51:46.000Z
2020-12-16T16:20:42.000Z
api/v2/views/provider_type.py
benlazarine/atmosphere
38fad8e4002e510e8b4294f2bb5bc75e8e1817fa
[ "BSD-3-Clause" ]
50
2016-12-08T08:32:25.000Z
2021-12-10T00:21:39.000Z
from core.models import ProviderType from api.v2.serializers.details import ProviderTypeSerializer from api.v2.views.base import AuthModelViewSet class ProviderTypeViewSet(AuthModelViewSet): """ API endpoint that allows instance actions to be viewed or edited. """ queryset = ProviderType.objects.all() serializer_class = ProviderTypeSerializer http_method_names = ['get', 'head', 'options', 'trace']
32.846154
69
0.761124
47
427
6.851064
0.765957
0.043478
0.055901
0
0
0
0
0
0
0
0
0.005525
0.152225
427
12
70
35.583333
0.883978
0.152225
0
0
0
0
0.054913
0
0
0
0
0
0
1
0
false
0
0.428571
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
5da93b15b4be45c40797cc48c6436c9aed0c6f75
1,854
py
Python
docs/demos/theme_explorer/form.py
glsdown/dash-bootstrap-components
0ebea4f7de43975f6e3a2958359c4480ae1d4927
[ "Apache-2.0" ]
776
2019-02-07T19:36:59.000Z
2022-03-31T05:53:04.000Z
docs/demos/theme_explorer/form.py
glsdown/dash-bootstrap-components
0ebea4f7de43975f6e3a2958359c4480ae1d4927
[ "Apache-2.0" ]
350
2019-02-05T10:42:19.000Z
2022-03-31T19:23:35.000Z
docs/demos/theme_explorer/form.py
glsdown/dash-bootstrap-components
0ebea4f7de43975f6e3a2958359c4480ae1d4927
[ "Apache-2.0" ]
219
2019-02-10T13:46:25.000Z
2022-03-23T17:03:39.000Z
import dash_bootstrap_components as dbc from dash import html from .util import make_subheading form = html.Div( [ make_subheading("Form", "form"), dbc.Form( [ html.Div( [ dbc.Label("Username"), dbc.Input( placeholder="Enter your username", type="text", ), dbc.FormText( [ "Can't remember your username? ", html.A( "Click here.", href="#", className="text-muted", style={"textDecoration": "underline"}, ), ] ), ] ), html.Div( [ dbc.Label("Username"), dbc.Input( placeholder="Enter your password", type="password", ), dbc.FormText( [ "Can't remember your password? ", html.A( "Click here.", href="#", className="text-muted", style={"textDecoration": "underline"}, ), ] ), ] ), ] ), ], className="mb-4", )
33.107143
74
0.254585
89
1,854
5.258427
0.41573
0.044872
0.076923
0.064103
0.606838
0.606838
0.491453
0.491453
0.491453
0.491453
0
0.001605
0.66397
1,854
55
75
33.709091
0.749599
0
0
0.509434
0
0
0.122977
0
0
0
0
0
0
1
0
false
0.056604
0.056604
0
0.056604
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
5daf0802268130bb3487539d79cfd8bc00ee9e76
76
py
Python
python/testData/resolve/DunderSizeOfInDeclarationWithClassAttrNewStyleClass.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/resolve/DunderSizeOfInDeclarationWithClassAttrNewStyleClass.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/resolve/DunderSizeOfInDeclarationWithClassAttrNewStyleClass.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class A(object): __sizeof__ = 17 print(__sizeof__) # <ref>
19
21
0.552632
8
76
4.25
0.875
0
0
0
0
0
0
0
0
0
0
0.039216
0.328947
76
4
22
19
0.627451
0.065789
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5dc97e70c371e60693b059eaf24a4375c45f792c
1,255
py
Python
vkbotkit/objects/decorators.py
kensoi/vkbotkit
2dd62d801431a5ad43008d43069b757491be9bee
[ "Apache-2.0" ]
null
null
null
vkbotkit/objects/decorators.py
kensoi/vkbotkit
2dd62d801431a5ad43008d43069b757491be9bee
[ "Apache-2.0" ]
null
null
null
vkbotkit/objects/decorators.py
kensoi/vkbotkit
2dd62d801431a5ad43008d43069b757491be9bee
[ "Apache-2.0" ]
null
null
null
""" Copyright 2022 kensoi """ import asyncio class Handler(): """ docstring patch """ def __init__(self, callback_function, library_callback, library_module): """ docstring patch """ self.callback_function = callback_function self.library_module = library_module self.library_callback = library_callback def __repr__(self): """ docstring patch """ return "<vkbotkit.objects.decorators.Handler>" def run(self): """ docstring patch """ loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop.run_forever() @property def loop(self): """ docstring patch """ return asyncio.get_event_loop() async def create_task(self, package): """ docstring patch """ if await self.callback_function.check(package): return await self.library_callback(self.library_module, package) def callback(callback_filter): """ docstring patch """ def decorator(function): def wrap(self): return Handler(callback_filter, function, self) return wrap return decorator
18.455882
76
0.583267
120
1,255
5.85
0.325
0.139601
0.08547
0.068376
0
0
0
0
0
0
0
0.004695
0.321116
1,255
68
77
18.455882
0.819249
0.093227
0
0
0
0
0.038144
0.038144
0
0
0
0
0
1
0.291667
false
0
0.041667
0.041667
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
5dcb366b56b4227ea9348a034fba2ef3d6d01d82
3,846
py
Python
src/api/task.py
ablil/meistertask-cli
6c90802ac5dc7e5ac016e5c61c0e68db043e5784
[ "MIT" ]
3
2020-11-03T22:27:18.000Z
2021-12-11T23:13:55.000Z
src/api/task.py
ablil/meistertask-cli
6c90802ac5dc7e5ac016e5c61c0e68db043e5784
[ "MIT" ]
1
2021-09-12T13:28:13.000Z
2021-09-12T13:28:13.000Z
src/api/task.py
ablil/meistertask-cli
6c90802ac5dc7e5ac016e5c61c0e68db043e5784
[ "MIT" ]
null
null
null
import requests from typing import Set, Optional, List from .base import API from ..core import decorators from ..core.models import Task class APITask(API): def __init__(self, token: str): super().__init__(token) @decorators.handle_http_errors def fetch_all(self, project_id: int, task_status="open") -> Set[Task]: r = requests.get( "{}/projects/{}/tasks".format(self.base_url, project_id), headers=self.headers, params={"status": task_status}, ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return set(map(lambda task: Task.from_json(task), r.json())) @decorators.handle_http_errors def fetch_all_by_section(self, section_id: int, task_status="open"): r = requests.get( "{}/sections/{}/tasks".format(self.base_url, section_id), headers=self.headers, params={"status": task_status}, ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return set(map(lambda task: Task.from_json(task), r.json())) @decorators.handle_http_errors def fetch_by_id(self, task_id: int) -> Optional[Task]: r = requests.get( "{}/tasks/{}".format(self.base_url, task_id), headers=self.headers ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return Task.from_json(r.json()) @decorators.handle_http_errors def fetch_by_name(self, task_name: str, project_id: int) -> Optional[Task]: tasks: Set[Task] = self.fetch_all(project_id) for task in tasks: if task.name == task_name: return task return None @decorators.handle_http_errors def create(self, task: Task) -> Task: r = requests.post( "{}/sections/{}/tasks".format(self.base_url, task.section_id), headers=self.headers, data={"name": task.name, "notes": task.description}, ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return Task.from_json(r.json()) @decorators.handle_http_errors def update(self, task: Task) -> Task: r = requests.put( "{}/tasks/{}".format(self.base_url, task.id), headers=self.headers, data={"name": task.name, "notes": task.description}, ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return Task.from_json(r.json()) @decorators.handle_http_errors def move(self, task_id: int, section_id: int) -> Task: r = requests.put( "{}/tasks/{}".format(self.base_url, task_id), headers=self.headers, data={"section_id": section_id}, ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return Task.from_json(r.json()) @decorators.handle_http_errors def complete(self, task_id: int): r = requests.put( "{}/tasks/{}".format(self.base_url, task_id), headers=self.headers, data={"status": 2}, ) if r.status_code != 200: raise Exception( "Failed to connect to meistertask (code: {})".format(r.status_code) ) return Task.from_json(r.json())
31.016129
83
0.566563
456
3,846
4.596491
0.151316
0.046756
0.073473
0.099237
0.76479
0.715649
0.667462
0.648378
0.648378
0.644084
0
0.008221
0.304212
3,846
123
84
31.268293
0.775037
0
0
0.556701
0
0
0.119345
0
0
0
0
0
0
1
0.092784
false
0
0.051546
0
0.247423
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5dcc3e61763b82ef7ea1e6c2cbe5a6edb0e9d1de
1,745
py
Python
app/app.py
jprusik/dreamhost-flask-project-template
b0ca102da5e23bac74cd5c9e9a4ad705baef83e8
[ "MIT" ]
6
2017-05-04T18:02:48.000Z
2021-11-25T05:58:56.000Z
app/app.py
jprusik/dreamhost-flask-project-template
b0ca102da5e23bac74cd5c9e9a4ad705baef83e8
[ "MIT" ]
null
null
null
app/app.py
jprusik/dreamhost-flask-project-template
b0ca102da5e23bac74cd5c9e9a4ad705baef83e8
[ "MIT" ]
null
null
null
from flask import Flask, url_for, redirect, request, Markup, render_template, session, flash import json, datetime import config app = Flask(__name__) app.config.from_object('config') # DISABLE DEBUG FOR PRODUCTION! app.debug = False def clear_session(): session['last_action'] = None # using session.clear() nulls everything, including the session itself, so you have to check for session AND session['key'] or pop(None) individual session keys # session.clear() # Check credentials, modify session, etc. @app.before_request def before_request(): if 'session_start' not in session: session['session_start'] = datetime.datetime.now() session['last_action'] = datetime.datetime.now() @app.route('/index') @app.route('/') def index(): return render_template('home.html') @app.route('/search', methods=['GET']) def search(): searchword = request.args.get('query', '') if searchword == '': flash('No query value was provided.') return render_template('search.html', query_return=searchword) @app.route('/logout') def logout(): clear_session() return redirect(url_for('index')) @app.errorhandler(404) def not_found(error): return render_template('error.html', error_info='404: Page not found') @app.errorhandler(413) def not_found(error): return render_template('error.html', error_info='413: Upload size exceeded') @app.errorhandler(500) def internal_server_error(error): # This may pass system errors you do not wish users to see return render_template('error.html', error_info=error.args) # What version of python is active? # import sys # @app.route('/pyversion') # def pyversion(): # return sys.version if __name__ == '__main__': app.run()
24.928571
164
0.708883
234
1,745
5.128205
0.431624
0.07
0.083333
0.0625
0.121667
0.121667
0.121667
0.09
0.09
0.09
0
0.010204
0.157593
1,745
69
165
25.289855
0.806122
0.23553
0
0.052632
0
0
0.164777
0
0
0
0
0
0
1
0.210526
false
0
0.078947
0.105263
0.447368
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
5dce97e064924ea53a91a3bbb0f7fc604434c8d2
230
py
Python
backend/src/crawling/models/url_model.py
nokia-wroclaw/innovativeproject-noticrawl
2569dfe39492695cc33d0bbcbc675465b14756c0
[ "MIT" ]
5
2020-03-08T14:38:47.000Z
2021-02-24T12:17:57.000Z
backend/src/crawling/models/url_model.py
nokia-wroclaw/innovativeproject-noticrawl
2569dfe39492695cc33d0bbcbc675465b14756c0
[ "MIT" ]
35
2020-03-13T14:18:00.000Z
2020-06-16T22:17:39.000Z
backend/src/crawling/models/url_model.py
nokia-wroclaw/innovativeproject-noticrawl
2569dfe39492695cc33d0bbcbc675465b14756c0
[ "MIT" ]
2
2020-03-03T20:56:19.000Z
2020-03-08T14:38:53.000Z
from pydantic import BaseModel, validator # from src.helpers.validation.validation import validate_url class Url(BaseModel): url: str # @validator("url") # def url_is_valid(cls, v): # return validate_url(v)
20.909091
60
0.7
30
230
5.233333
0.6
0.140127
0
0
0
0
0
0
0
0
0
0
0.2
230
10
61
23
0.853261
0.56087
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
5de475f926b3c81560d4d7e4ef3dea4a3580b171
2,331
py
Python
config/sites/community/ver_settings.py
w940853815/bk-sops
f76fe91b632c20a2bf55abea934149a0a23603f6
[ "Apache-2.0" ]
1
2019-12-23T07:23:35.000Z
2019-12-23T07:23:35.000Z
config/sites/community/ver_settings.py
w940853815/bk-sops
f76fe91b632c20a2bf55abea934149a0a23603f6
[ "Apache-2.0" ]
5
2020-02-12T02:55:56.000Z
2021-06-10T22:57:10.000Z
config/sites/community/ver_settings.py
kellyyk/work-sops
b114db1b21c14b8454c34dff0453cb4fd8885c2e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ REMOTE_ANALYSIS_URL = '' REMOTE_API_URL = '' ESB_SDK_NAME = 'packages.blueking.component' ESB_AUTH_COMPONENT_SYSTEM = 'bk_login' ESB_AUTH_GET_USER_INFO = 'get_user' CALLBACK_KEY = b'jbSH1_3PFsM8WRZZpUXJPhlJuvuA44A7Ov0nPhFk5ZY=' RSA_PRIV_KEY = """ -----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQDA2XZvbf++4M6YLSgS93kYJS34e2TZvq/s6r0yFDz0je38ekW0 2aH5efPTNijbJgHIbqfXzm8lBpmBbk9VlUHaJVyZitqI6xYBqb3WBRu9WYEd8skF y1mwOEbxOgsXoOPd9tLkt4etSMzm7kdBqmZKIeiAOtbmirDqkuz6M64b5wIDAQAB AoGAdHxmX5RP4FomMCFGjX5R9NWwWOEf366g0ThRI4i58PYyBElPBZhXkDurna6f KxBgD1NXqrEUzYaY/mdFIGrRpQfBPXDTSsJC+r68nxglcGVhuHCFvkY94J5bgYus f7z2QkWdHi/LdENxP1eo+4ExcJ/XAHgOC18ThYTnZDo7G2ECQQDuzN9uSccn3sRE Namwg54mcekkaTvBPLpX7+zNyLrNG6vGl/3NPQqi9D2ACXYkeWk8aQ65LoqLYnJJ 4bWmKaRPAkEAzr1S9q1rx/bV6iJOoEeeNGddWizWatTjLCT9XcXkETfIDc3YTpVD bESXAcagtf6PbkNP1TG1MeXlTVhYp4tw6QJAa+frtnxkH+ILsf7FtNtkpV6nySo8 NC9qzL2/taVUs8YjMtQPfaRtoADZoXelCQpLwV5/prIfLKjJmBUD7he3BQJAVKYs XBhx8zRcLjvR2cq5OlfAX3XQbXmxcpfKriSi13HxlcVc9gAj1SbYdb+wehQ7AjjJ bU+nE0FAfETaN+/eUQJAMN4sJTjEMkeSeE+SBzqsmzc4ajMHRrhtu989JgZZvDyr LOah9mmRwLJdcfa3Js+jw2lOCmxzqauYZHVHg/hH7g== -----END RSA PRIVATE KEY----- """ # PUB_KEY for frontend, which can not use three quotes RSA_PUB_KEY = "-----BEGIN PUBLIC KEY-----\\n" + \ "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA2XZvbf++4M6YLSgS93kYJS34\\n" + \ "e2TZvq/s6r0yFDz0je38ekW02aH5efPTNijbJgHIbqfXzm8lBpmBbk9VlUHaJVyZ\\n" + \ "itqI6xYBqb3WBRu9WYEd8skFy1mwOEbxOgsXoOPd9tLkt4etSMzm7kdBqmZKIeiA\\n" + \ "OtbmirDqkuz6M64b5wIDAQAB\\n" + \ "-----END PUBLIC KEY-----"
50.673913
115
0.814243
217
2,331
8.645161
0.714286
0.031983
0.013859
0.017058
0
0
0
0
0
0
0
0.077257
0.11154
2,331
45
116
51.8
0.828585
0.332475
0
0
0
0
0.811894
0.718164
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5def2526a89f2618c46cd1f27f810b5245219fba
679
py
Python
switchdb/bkup_files/test2.py
smallfount/scriptsonly
cabdfc301da4e1653705d713b306f3fbf7f6934d
[ "Apache-2.0" ]
32
2016-05-24T23:32:02.000Z
2021-11-17T07:53:50.000Z
switchdb/bkup_files/test2.py
posai8701/scriptsonly
cabdfc301da4e1653705d713b306f3fbf7f6934d
[ "Apache-2.0" ]
5
2016-09-25T15:55:02.000Z
2018-09-06T10:54:45.000Z
switchdb/bkup_files/test2.py
posai8701/scriptsonly
cabdfc301da4e1653705d713b306f3fbf7f6934d
[ "Apache-2.0" ]
34
2016-03-02T17:37:07.000Z
2021-11-17T07:54:04.000Z
from flask import Flask, request, render_template, redirect, url_for, flash, session, make_response from flask.ext.bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy from models import db, Switches from settings import APP_STATIC import os from flask import Flask, request, redirect, url_for from werkzeug.utils import secure_filename UPLOAD_FOLDER = APP_STATIC ALLOWED_EXTENSIONS = set(['csv']) app = Flask(__name__) app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER bootstrap = Bootstrap(app)# Generate Ansible file switch = Switches.query.all() lenx = (len(switch) -1) line = switch[0].rolex.strip() line = ' "rolex": ' + '"'+ line +'",' print line print lenx
29.521739
99
0.768778
94
679
5.382979
0.521277
0.071146
0.059289
0.079051
0.106719
0
0
0
0
0
0
0.003384
0.129602
679
22
100
30.863636
0.852792
0.030928
0
0
0
0
0.04878
0
0.052632
0
0
0
0
0
null
null
0
0.421053
null
null
0.105263
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
5df3d73af9cc798e2129147f5c3dd5e6243d1007
4,108
py
Python
ctapipe/visualization/tests/test_bokeh.py
chaimain/ctapipe
ff80cff2daaf56e1d05ea6501c68fd83a9cf79d5
[ "BSD-3-Clause" ]
53
2015-06-23T15:24:20.000Z
2021-09-23T22:30:58.000Z
ctapipe/visualization/tests/test_bokeh.py
chaimain/ctapipe
ff80cff2daaf56e1d05ea6501c68fd83a9cf79d5
[ "BSD-3-Clause" ]
1,537
2015-06-24T11:27:16.000Z
2022-03-31T16:17:08.000Z
ctapipe/visualization/tests/test_bokeh.py
chaimain/ctapipe
ff80cff2daaf56e1d05ea6501c68fd83a9cf79d5
[ "BSD-3-Clause" ]
275
2015-07-09T14:09:28.000Z
2022-03-17T22:25:51.000Z
import numpy as np import pytest def test_camera_display_create(): from ctapipe.visualization.bokeh import CameraDisplay CameraDisplay() def test_camera_geom(example_event, example_subarray): from ctapipe.visualization.bokeh import CameraDisplay t = list(example_event.r0.tel.keys())[0] geom = example_subarray.tel[t].camera.geometry c_display = CameraDisplay(geom) assert (c_display.cdsource.data["x"] == geom.pix_x.value).all() assert (c_display.cdsource.data["y"] == geom.pix_y.value).all() t = list(example_event.r0.tel.keys())[1] geom = example_subarray.tel[t].camera.geometry c_display.geom = geom assert (c_display.cdsource.data["x"] == geom.pix_x.value).all() assert (c_display.cdsource.data["y"] == geom.pix_y.value).all() def test_camera_image(example_event, example_subarray): from ctapipe.visualization.bokeh import CameraDisplay, intensity_to_hex t = list(example_event.r0.tel.keys())[0] geom = example_subarray.tel[t].camera.geometry n_pixels = geom.pix_x.value.size image = np.ones(n_pixels) colors = intensity_to_hex(image) with pytest.raises(ValueError): CameraDisplay(None, image) c_display = CameraDisplay(geom, image) assert (c_display.cdsource.data["image"] == colors).all() assert c_display.image_min == 0 assert c_display.image_max == 2 image[5] = 5 colors = intensity_to_hex(image) c_display.image = image assert (c_display.cdsource.data["image"] == colors).all() assert c_display.image_min == image.min() assert c_display.image_max == image.max() def test_camera_enable_pixel_picker(example_event, example_subarray): from ctapipe.visualization.bokeh import CameraDisplay t = list(example_event.r0.tel.keys())[0] geom = example_subarray.tel[t].camera.geometry n_pixels = geom.pix_x.value.size image = np.ones(n_pixels) c_display = CameraDisplay(geom, image) c_display.enable_pixel_picker(2) assert len(c_display.active_pixels) == 2 c_display.enable_pixel_picker(3) assert len(c_display.active_pixels) == 3 def test_fast_camera_display_create(example_event, example_subarray): from ctapipe.visualization.bokeh import FastCameraDisplay t = list(example_event.r0.tel.keys())[0] geom = example_subarray.tel[t].camera.geometry x = geom.pix_x.value y = geom.pix_y.value area = geom.pix_area.value size = np.sqrt(area) FastCameraDisplay(x, y, size) def test_fast_camera_image(example_event, example_subarray): from ctapipe.visualization.bokeh import FastCameraDisplay, intensity_to_hex t = list(example_event.r0.tel.keys())[0] geom = example_subarray.tel[t].camera.geometry x = geom.pix_x.value y = geom.pix_y.value area = geom.pix_area.value size = np.sqrt(area) c_display = FastCameraDisplay(x, y, size) image = np.ones(x.size) colors = intensity_to_hex(image) c_display.image = colors assert (c_display.cdsource.data["image"] == colors).all() def test_waveform_display_create(): from ctapipe.visualization.bokeh import WaveformDisplay WaveformDisplay() def test_waveform_values(): from ctapipe.visualization.bokeh import WaveformDisplay wf = np.ones(30) w_display = WaveformDisplay(wf) assert (w_display.cdsource.data["samples"] == wf).all() assert (w_display.cdsource.data["t"] == np.arange(wf.size)).all() wf[5] = 5 w_display.waveform = wf assert (w_display.cdsource.data["samples"] == wf).all() assert (w_display.cdsource.data["t"] == np.arange(wf.size)).all() def test_span(): from ctapipe.visualization.bokeh import WaveformDisplay wf = np.ones(30) w_display = WaveformDisplay(wf) w_display.enable_time_picker() w_display.active_time = 4 assert w_display.span.location == 4 w_display.active_time = -3 assert w_display.active_time == 0 assert w_display.span.location == 0 w_display.active_time = wf.size + 10 assert w_display.active_time == wf.size - 1 assert w_display.span.location == wf.size - 1
29.134752
79
0.711052
585
4,108
4.776068
0.129915
0.062992
0.055118
0.093414
0.829635
0.728704
0.680744
0.637079
0.595562
0.576593
0
0.010261
0.169669
4,108
140
80
29.342857
0.808854
0
0
0.515789
0
0
0.00852
0
0
0
0
0
0.231579
1
0.094737
false
0
0.115789
0
0.210526
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5dfa99fc55bf991441211c2136bc0e15cef7ffff
5,834
py
Python
test_paolo/BiDAQ/fpga/block/TxMac.py
giachero/biDAQz
a6efb778bae4f327607c6699a91075e9988d1bef
[ "MIT" ]
null
null
null
test_paolo/BiDAQ/fpga/block/TxMac.py
giachero/biDAQz
a6efb778bae4f327607c6699a91075e9988d1bef
[ "MIT" ]
null
null
null
test_paolo/BiDAQ/fpga/block/TxMac.py
giachero/biDAQz
a6efb778bae4f327607c6699a91075e9988d1bef
[ "MIT" ]
null
null
null
#!/usr/bin/python import netifaces from ..register import FpgaReg class TxMac: # Class constructor def __init__(self): # Initialize register management class self.FpgaReg = FpgaReg.FpgaReg() def SetTxEnable(self, Enable): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_ENA", Enable) def GetTxEnable(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_ENA") def SetReset(self, Reset): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "SW_RESET", Reset) def GetReset(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "SW_RESET") def SetMac(self, MAC): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "MAC_1", MAC & 0xFFFF) self.FpgaReg.FpgaMem.WriteBits("eth_mac", "MAC_0", (MAC >> 16) & 0xFFFFFFFF) def GetMac(self): MAC_LSB = self.FpgaReg.FpgaMem.ReadBits("eth_mac", "MAC_1") MAC_MSB = self.FpgaReg.FpgaMem.ReadBits("eth_mac", "MAC_0") return MAC_LSB | (MAC_MSB << 16) def SetPauseQuanta(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "PAUSE_QUANTA", Value) def GetPauseQuanta(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "PAUSE_QUANTA") def SetRxSectionEmpty(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "RX_SECTION_EMPTY", Value) def GetRxSectionEmpty(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "RX_SECTION_EMPTY") def SetRxSectionFull(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "RX_SECTION_FULL", Value) def GetRxSectionFull(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "RX_SECTION_FULL") def SetTxSectionEmpty(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_SECTION_EMPTY", Value) def GetTxSectionEmpty(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_SECTION_EMPTY") def SetTxSectionFull(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_SECTION_FULL", Value) def GetTxSectionFull(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_SECTION_FULL") def SetRxAlmostEmpty(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "RX_ALMOST_EMPTY", Value) def GetRxAlmostEmpty(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "RX_ALMOST_EMPTY") def SetRxAlmostFull(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "RX_ALMOST_FULL", Value) def GetRxAlmostFull(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "RX_ALMOST_FULL") def SetTxAlmostEmpty(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_ALMOST_EMPTY", Value) def GetTxAlmostEmpty(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_ALMOST_EMPTY") def SetTxAlmostFull(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_ALMOST_FULL", Value) def GetTxAlmostFull(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_ALMOST_FULL") def SetTxIpgLength(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_Ipg_LENGTH", Value) def GetTxIpgLength(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_Ipg_LENGTH") def SetTxShift16(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "TX_SHIFT16", Value) def GetTxShift16(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "TX_SHIFT16") def SetRxShift16(self, Value): self.FpgaReg.FpgaMem.WriteBits("eth_mac", "RX_SHIFT16", Value) def GetRxShift16(self): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", "RX_SHIFT16") def GetStatisticsCounter(self, Name): return self.FpgaReg.FpgaMem.ReadBits("eth_mac", Name) def Reset(self): self.SetReset(1) if not self.GetReset(): raise Exception("MAC reset can't be set") self.SetReset(0) def Configure(self, FifoSize=2048): SectionThr = 0x10 AlmostThr = 0x8 TxAlmostFullThr = 0x3 Interface = 'eth0' MacStr = netifaces.ifaddresses(Interface)[netifaces.AF_LINK][0]['addr'] Mac = int(MacStr.replace(':', ''), 16) self.SetMac(Mac) self.SetPauseQuanta(0x2000) self.SetRxSectionEmpty(FifoSize - SectionThr) self.SetRxSectionFull(SectionThr) self.SetTxSectionEmpty(FifoSize - SectionThr) self.SetTxSectionFull(SectionThr) self.SetRxAlmostEmpty(AlmostThr) self.SetRxAlmostFull(AlmostThr) self.SetTxAlmostEmpty(AlmostThr) self.SetTxAlmostFull(TxAlmostFullThr) self.SetTxIpgLength(0xc) self.SetTxShift16(1) self.SetRxShift16(1) def StartTx(self): self.SetTxEnable(1) if not self.GetTxEnable(): raise Exception("MAC TX enable can't be set") def Initialize(self): # noinspection PyBroadException try: self.Reset() self.Configure() self.Reset() self.StartTx() except: return -1 return 0 def GetMonitorRegisters(self): RetDict = dict() RetDict["TxMac"] = dict() RetDict["TxMac"]["PacketsSent"] = self.GetStatisticsCounter("aFramesTransmittedOK") RetDict["TxMac"]["BytesSent"] = self.GetStatisticsCounter("aOctetsTransmittedOK") RetDict["TxMac"]["PauseFrameSent"] = self.GetStatisticsCounter("aTxPAUSEMACCtrlFrames") RetDict["TxMac"]["ErrorPackets"] = self.GetStatisticsCounter("ifOutErrors") RetDict["TxMac"]["UnicastPackets"] = self.GetStatisticsCounter("ifOutUcastPkts") RetDict["TxMac"]["MulticastPackets"] = self.GetStatisticsCounter("ifOutMulticastPkts") RetDict["TxMac"]["BroadcastPackets"] = self.GetStatisticsCounter("ifOutBroadcastPkts") return RetDict
33.918605
95
0.669866
637
5,834
5.990581
0.199372
0.098008
0.15566
0.115828
0.416143
0.390461
0.381813
0.325472
0.292453
0.21174
0
0.012519
0.205862
5,834
171
96
34.116959
0.811137
0.017312
0
0.016807
0
0
0.160586
0.003666
0
0
0.006109
0
0
1
0.310924
false
0
0.016807
0.12605
0.495798
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
b902d3528d44ab0f44a70b75656199f8d3e7a458
9,135
py
Python
tests/test_models.py
uezo/chatdollkit-server-python
4d0d8445accdddc2a427fb249826e2186b0cbc88
[ "Apache-2.0" ]
null
null
null
tests/test_models.py
uezo/chatdollkit-server-python
4d0d8445accdddc2a427fb249826e2186b0cbc88
[ "Apache-2.0" ]
null
null
null
tests/test_models.py
uezo/chatdollkit-server-python
4d0d8445accdddc2a427fb249826e2186b0cbc88
[ "Apache-2.0" ]
null
null
null
import sys import os sys.path.append(os.pardir) from uuid import uuid4 from chatdollkit.models import ( AnimatedVoiceRequest, ChatdollKitException, Response, TTSConfiguration, VoiceSource, ApiResponseBase ) def test_add_voice(): req = AnimatedVoiceRequest() req.AddVoice("voice_01") req.AddVoice("voice_02", PreGap=1.0, PostGap=2.0, AsNewFrame=True) assert req.AnimatedVoices[0].Voices[0].Name == "voice_01" assert req.AnimatedVoices[0].Voices[0].PreGap == 0.0 assert req.AnimatedVoices[0].Voices[0].PostGap == 0.0 assert req.AnimatedVoices[0].Voices[0].Text is None assert req.AnimatedVoices[0].Voices[0].Url is None assert req.AnimatedVoices[0].Voices[0].TTSConfig is None assert req.AnimatedVoices[0].Voices[0].Source == 0 assert req.AnimatedVoices[0].Voices[0].UseCache is False assert req.AnimatedVoices[1].Voices[0].Name == "voice_02" assert req.AnimatedVoices[1].Voices[0].PreGap == 1.0 assert req.AnimatedVoices[1].Voices[0].PostGap == 2.0 assert req.AnimatedVoices[1].Voices[0].Text is None assert req.AnimatedVoices[1].Voices[0].Url is None assert req.AnimatedVoices[1].Voices[0].TTSConfig is None assert req.AnimatedVoices[1].Voices[0].Source == 0 assert req.AnimatedVoices[1].Voices[0].UseCache is False def test_add_voice_web(): req = AnimatedVoiceRequest() req.AddVoiceWeb("https://voice_01") req.AddVoiceWeb("https://voice_02", PreGap=1.0, PostGap=2.0, Name="voice_02", UseCache=False, AsNewFrame=True) assert req.AnimatedVoices[0].Voices[0].Name == "" assert req.AnimatedVoices[0].Voices[0].PreGap == 0.0 assert req.AnimatedVoices[0].Voices[0].PostGap == 0.0 assert req.AnimatedVoices[0].Voices[0].Text is None assert req.AnimatedVoices[0].Voices[0].Url == "https://voice_01" assert req.AnimatedVoices[0].Voices[0].TTSConfig is None assert req.AnimatedVoices[0].Voices[0].Source == 1 assert req.AnimatedVoices[0].Voices[0].UseCache is True assert req.AnimatedVoices[1].Voices[0].Name == "voice_02" assert req.AnimatedVoices[1].Voices[0].PreGap == 1.0 assert req.AnimatedVoices[1].Voices[0].PostGap == 2.0 assert req.AnimatedVoices[1].Voices[0].Text is None assert req.AnimatedVoices[1].Voices[0].Url == "https://voice_02" assert req.AnimatedVoices[1].Voices[0].TTSConfig is None assert req.AnimatedVoices[1].Voices[0].Source == 1 assert req.AnimatedVoices[1].Voices[0].UseCache is False def test_add_voice_tts(): req = AnimatedVoiceRequest() req.AddVoiceTTS("テスト01") tts_config = TTSConfiguration(Name="AwesomeTTS", Params={"param01": "value01", "param02": "value02"}) req.AddVoiceTTS("テスト02", PreGap=1.0, PostGap=2.0, Name="voice_02", TTSConfig=tts_config, UseCache=False, AsNewFrame=True) assert req.AnimatedVoices[0].Voices[0].Name == "" assert req.AnimatedVoices[0].Voices[0].PreGap == 0.0 assert req.AnimatedVoices[0].Voices[0].PostGap == 0.0 assert req.AnimatedVoices[0].Voices[0].Text == "テスト01" assert req.AnimatedVoices[0].Voices[0].Url is None assert req.AnimatedVoices[0].Voices[0].TTSConfig is None assert req.AnimatedVoices[0].Voices[0].Source == 2 assert req.AnimatedVoices[0].Voices[0].UseCache is True assert req.AnimatedVoices[1].Voices[0].Name == "voice_02" assert req.AnimatedVoices[1].Voices[0].PreGap == 1.0 assert req.AnimatedVoices[1].Voices[0].PostGap == 2.0 assert req.AnimatedVoices[1].Voices[0].Text == "テスト02" assert req.AnimatedVoices[1].Voices[0].Url is None assert req.AnimatedVoices[1].Voices[0].TTSConfig == tts_config assert req.AnimatedVoices[1].Voices[0].Source == 2 assert req.AnimatedVoices[1].Voices[0].UseCache is False def test_add_animation(): req = AnimatedVoiceRequest() req.AddAnimation("anim_01") req.AddAnimation("anim_02", LayerName="Upper Body", Duration=1.0, FadeLength=2.0, Weight=0.5, PreGap=3.0, Description="test animation") req.AddAnimation("anim_03", AsNewFrame=True) anim_01 = req.AnimatedVoices[0].Animations["Base Layer"][0] assert anim_01.Name == "anim_01" assert anim_01.LayerName == "Base Layer" assert anim_01.Duration == 0.0 assert anim_01.FadeLength == -1.0 assert anim_01.Weight == 1.0 assert anim_01.PreGap == 0.0 assert anim_01.Description is None anim_02 = req.AnimatedVoices[0].Animations["Upper Body"][0] assert anim_02.Name == "anim_02" assert anim_02.LayerName == "Upper Body" assert anim_02.Duration == 1.0 assert anim_02.FadeLength == 2.0 assert anim_02.Weight == 0.5 assert anim_02.PreGap == 3.0 assert anim_02.Description == "test animation" anim_03 = req.AnimatedVoices[1].Animations["Base Layer"][0] assert anim_03.Name == "anim_03" assert anim_03.LayerName == "Base Layer" def test_add_face(): req = AnimatedVoiceRequest() req.AddFace("face_01") req.AddFace("face_02", Duration=1.0, Description="test face") assert req.AnimatedVoices[0].Faces[0].Name == "face_01" assert req.AnimatedVoices[0].Faces[0].Duration == 0.0 assert req.AnimatedVoices[0].Faces[0].Description is None assert req.AnimatedVoices[0].Faces[1].Name == "face_02" assert req.AnimatedVoices[0].Faces[1].Duration == 1.0 assert req.AnimatedVoices[0].Faces[1].Description == "test face" def test_add_voice_animation_face(): req = AnimatedVoiceRequest() # Frame 1 req.AddVoice("voice_01") req.AddVoice("voice_02") req.AddAnimation("anim_01") req.AddAnimation("anim_02") req.AddAnimation("anim_03", LayerName="Upper Body") req.AddAnimation("anim_04", LayerName="Upper Body") req.AddFace("face_01") req.AddFace("face_02") # Frame 2 req.AddVoice("voice_11", AsNewFrame=True) req.AddVoice("voice_12") req.AddAnimation("anim_11") req.AddAnimation("anim_12") req.AddAnimation("anim_13", LayerName="Upper Body") req.AddAnimation("anim_14", LayerName="Upper Body") req.AddFace("face_11") req.AddFace("face_12") assert req.AnimatedVoices[0].Voices[0].Name == "voice_01" assert req.AnimatedVoices[0].Voices[1].Name == "voice_02" assert req.AnimatedVoices[0].Animations["Base Layer"][0].Name == "anim_01" assert req.AnimatedVoices[0].Animations["Base Layer"][1].Name == "anim_02" assert req.AnimatedVoices[0].Animations["Upper Body"][0].Name == "anim_03" assert req.AnimatedVoices[0].Animations["Upper Body"][1].Name == "anim_04" assert req.AnimatedVoices[0].Faces[0].Name == "face_01" assert req.AnimatedVoices[0].Faces[1].Name == "face_02" assert req.AnimatedVoices[1].Voices[0].Name == "voice_11" assert req.AnimatedVoices[1].Voices[1].Name == "voice_12" assert req.AnimatedVoices[1].Animations["Base Layer"][0].Name == "anim_11" assert req.AnimatedVoices[1].Animations["Base Layer"][1].Name == "anim_12" assert req.AnimatedVoices[1].Animations["Upper Body"][0].Name == "anim_13" assert req.AnimatedVoices[1].Animations["Upper Body"][1].Name == "anim_14" assert req.AnimatedVoices[1].Faces[0].Name == "face_11" assert req.AnimatedVoices[1].Faces[1].Name == "face_12" def test_tesponse(): resp = Response(Id="_") resp.AddVoice("local_voice") resp.AddVoiceTTS("tts_voice") resp.AddVoiceWeb("http://web_voice") resp.AddAnimation("walk") resp.AddFace("smile") avreq = resp.AnimatedVoiceRequest assert avreq.AnimatedVoices[0].Voices[0].Name == "local_voice" assert avreq.AnimatedVoices[0].Voices[0].Source == VoiceSource.Local assert avreq.AnimatedVoices[0].Voices[1].Text == "tts_voice" assert avreq.AnimatedVoices[0].Voices[1].Source == VoiceSource.TTS assert avreq.AnimatedVoices[0].Voices[2].Url == "http://web_voice" assert avreq.AnimatedVoices[0].Voices[2].Source == VoiceSource.Web assert avreq.AnimatedVoices[0].Animations["Base Layer"][0].Name == "walk" assert avreq.AnimatedVoices[0].Faces[0].Name == "smile" def test_chatdollkit_exception(): cex1 = ChatdollKitException() assert cex1.error_code == "0000" assert cex1.message == "Error" cex2 = ChatdollKitException( error_code="1234", message="error_message" ) assert cex2.error_code == "1234" assert cex2.message == "error_message" assert str(cex2) == "error_message" def test_api_response_base(): ex = Exception("default exception") api_response1 = ApiResponseBase.from_exception(ex) assert api_response1.Error.Code == "E9999" assert api_response1.Error.Message == "Unexpected error" api_response2 = ApiResponseBase.from_exception(ex, True) assert api_response2.Error.Code == "E9999" assert api_response2.Error.Message == "Unexpected error" assert api_response2.Error.Detail.startswith("default exception\n") cex = ChatdollKitException(error_code="CE1234", message="cdk exception") api_response3 = ApiResponseBase.from_exception(cex, True) assert api_response3.Error.Code == "CE1234" assert api_response3.Error.Message == "cdk exception" assert api_response3.Error.Detail.startswith("cdk exception\n")
40.420354
139
0.703558
1,254
9,135
5.024721
0.090909
0.196953
0.255515
0.144739
0.634502
0.588319
0.506428
0.419616
0.369465
0.358356
0
0.057169
0.147893
9,135
225
140
40.6
0.752312
0.001642
0
0.291209
0
0
0.111001
0
0
0
0
0
0.587912
1
0.049451
false
0
0.021978
0
0.071429
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
2
f8d9aafda0c88fd52a345e7a1934b15cd332a8e4
411
py
Python
okta_admin_utils/tasks/get_users.py
mdorn/okta_admin_utils
7ccb3b23dbbfe630409fcd1862fab75c3e9fdbf0
[ "MIT" ]
2
2019-08-20T15:03:35.000Z
2019-09-25T16:37:10.000Z
okta_admin_utils/tasks/get_users.py
mdorn/okta_admin_utils
7ccb3b23dbbfe630409fcd1862fab75c3e9fdbf0
[ "MIT" ]
null
null
null
okta_admin_utils/tasks/get_users.py
mdorn/okta_admin_utils
7ccb3b23dbbfe630409fcd1862fab75c3e9fdbf0
[ "MIT" ]
null
null
null
import logging import click from okta_admin_utils.logs import format_json_output from okta_admin_utils.api import OktaAPIClient class Client(OktaAPIClient): def run(self): self.api.add_resource(resource_name='users') limit = click.prompt('How many users?', type=int) response = self.api.users.list(params={'limit': limit}) logging.info(format_json_output(response.body))
27.4
63
0.73236
56
411
5.196429
0.589286
0.054983
0.089347
0.123711
0
0
0
0
0
0
0
0
0.16545
411
14
64
29.357143
0.848397
0
0
0
0
0
0.060827
0
0
0
0
0
0
1
0.1
false
0
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
f8d9dd946849dd1537f96af5833006c9a2f2c1eb
3,076
py
Python
pysnmp/ADTRAN-AOS.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/ADTRAN-AOS.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/ADTRAN-AOS.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ADTRAN-AOS (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTRAN-AOS # Produced by pysmi-0.3.4 at Mon Apr 29 16:58:35 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # adShared, adIdentityShared = mibBuilder.importSymbols("ADTRAN-MIB", "adShared", "adIdentityShared") OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Integer32, ModuleIdentity, Counter32, Bits, Counter64, Gauge32, MibIdentifier, iso, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Unsigned32, TimeTicks, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "ModuleIdentity", "Counter32", "Bits", "Counter64", "Gauge32", "MibIdentifier", "iso", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Unsigned32", "TimeTicks", "ObjectIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") adGenAOSMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 664, 6, 10000, 53)) adGenAOSMib.setRevisions(('2014-09-10 00:00', '2012-04-27 00:00', '2010-07-05 00:00', '2004-10-20 00:00',)) if mibBuilder.loadTexts: adGenAOSMib.setLastUpdated('201409100000Z') if mibBuilder.loadTexts: adGenAOSMib.setOrganization('ADTRAN, Inc.') adGenAOS = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53)) adGenAOSCommon = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 1)) adGenAOSRouter = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 2)) adGenAOSSecurity = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 3)) adGenAOSSwitch = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 4)) adGenAOSVoice = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 5)) adGenAOSWan = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 6)) adGenAOSPower = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 7)) adGenAOSConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99)) adGenAOSApplications = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 8)) adGenAOSMef = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 9)) mibBuilder.exportSymbols("ADTRAN-AOS", adGenAOSSwitch=adGenAOSSwitch, adGenAOSPower=adGenAOSPower, adGenAOSMef=adGenAOSMef, adGenAOSWan=adGenAOSWan, adGenAOSVoice=adGenAOSVoice, adGenAOSConformance=adGenAOSConformance, adGenAOS=adGenAOS, PYSNMP_MODULE_ID=adGenAOSMib, adGenAOSSecurity=adGenAOSSecurity, adGenAOSMib=adGenAOSMib, adGenAOSRouter=adGenAOSRouter, adGenAOSApplications=adGenAOSApplications, adGenAOSCommon=adGenAOSCommon)
99.225806
477
0.755202
364
3,076
6.376374
0.354396
0.01034
0.015511
0.020681
0.352434
0.267126
0.267126
0.263249
0.263249
0.263249
0
0.103882
0.095579
3,076
30
478
102.533333
0.73041
0.102081
0
0
0
0
0.208137
0.015983
0
0
0
0
0
1
0
false
0
0.304348
0
0.304348
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
f8df6752e36385a18e071046706232a98b038c7e
2,939
py
Python
python/batchImport.py
LiquidAnalytics/ld-api-examples
82a3c6c3c0948fc7e134f65a3db86ee2014ec3c2
[ "Apache-2.0" ]
null
null
null
python/batchImport.py
LiquidAnalytics/ld-api-examples
82a3c6c3c0948fc7e134f65a3db86ee2014ec3c2
[ "Apache-2.0" ]
null
null
null
python/batchImport.py
LiquidAnalytics/ld-api-examples
82a3c6c3c0948fc7e134f65a3db86ee2014ec3c2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import json import requests from optparse import OptionParser parser = OptionParser() parser.add_option("-u", "--userId", dest="userId", type="string", action="store", help="UserId") parser.add_option("-p", "--password", dest="password", type="string", action="store", help="Password") parser.add_option("-c", "--community", dest="community", type="string", action="store", help="Community the userId has access to") parser.add_option("-i", "--clientId", dest="clientId", type="string", action="store", help="OAuth2 client_id issued by Liquid Decisions to this application") parser.add_option("-s", "--clientSecret", dest="clientSecret", type="string", action="store", help="OAuth2 client_secret issued by Liquid Decisions") parser.add_option("-d", "--hostUrl", dest="hostUrl", type="string", action="store", help="LD Host URL") parser.add_option("-E", "--notificationEmail", dest="notificationEmail", type="string", action="store", help="The email that is to be notified of job progress") parser.add_option("-J", "--jobName", dest="jobName", type="string", action="store", help="The name to ") parser.add_option("-C", "--contentType", dest="contentType", type="string", action="store", help="The type of file being uploaded") parser.add_option("-I", "--itemType", dest="itemType", type="string", action="store", help="The item type thats being imported") parser.add_option("-F", "--file", dest="file", type="string",action="store",help="The location of the file being uploaded") parser.add_option("-T", "--template", dest="template", type="string",action="store",help="The location of the teamplate being uploaded") parser.add_option("-M", "--merge", dest="merge", type="string",action="store",help="Merge files") parser.add_option("-H", "--headers", dest="header", type="string",action="store",help="CSV file contains a header row") (options, args) = parser.parse_args() resp = requests.post(options.hostUrl + '/ls/api/oauth2/token', data={ "grant_type":"password", "client_id":options.clientId, "client_secret":options.clientSecret, "username": options.userId, "password":options.password, "scope":"community=" + options.community}) accessInfo = json.loads(resp.text) accessToken = accessInfo['access_token'] print accessToken files = {'file': (options.file, open(options.file, 'rb'), options.contentType, {'Expires': '0'}), 'template': (options.template, open(options.template, 'rb'), 'application/json', {'Expires': '0'})} parameters = { 'notificationEmail': options.notificationEmail, 'jobName': options.jobName, 'contentType':options.contentType, 'itemType':options.itemType, 'merge':options.merge, 'headerRow':options.header} resp = requests.post(options.hostUrl + '/ls/api/batch/import'.format(options.community), headers={'Authorization':'Bearer ' + accessToken}, files=files, data=parameters) print resp.text
57.627451
169
0.700238
369
2,939
5.520325
0.300813
0.061856
0.103093
0.14433
0.284732
0.197349
0.110947
0.040255
0.040255
0
0
0.001904
0.106499
2,939
50
170
58.78
0.7738
0.006805
0
0
0
0
0.380185
0
0
0
0
0
0
0
null
null
0.075
0.125
null
null
0.05
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
f8ee77d2dd1e27a1cdeec3a16d65a47db298ecdd
712
py
Python
notify/serializers.py
mister-rao/drf-notify-x
7cc8ba80bc4db8f6220f2646e2d248535dc436e2
[ "MIT" ]
null
null
null
notify/serializers.py
mister-rao/drf-notify-x
7cc8ba80bc4db8f6220f2646e2d248535dc436e2
[ "MIT" ]
null
null
null
notify/serializers.py
mister-rao/drf-notify-x
7cc8ba80bc4db8f6220f2646e2d248535dc436e2
[ "MIT" ]
null
null
null
from notify.models import Notification from rest_framework import serializers from core.serializers import DynamicModelSerializer from users.models.custom_user import CustomUser from users.serializers.user_serializers import AuthorStampSerializer class NotificationSerializer(DynamicModelSerializer): class Meta: model = Notification fields = '__all__' read_only_fields = 'actor_dp', def to_representation(self, instance): actor = CustomUser.objects.get(pk=instance.actor_object_id) representation = super().to_representation(instance) author = AuthorStampSerializer(actor) representation['actor'] = author.data return representation
30.956522
68
0.758427
71
712
7.408451
0.549296
0.064639
0
0
0
0
0
0
0
0
0
0
0.179775
712
22
69
32.363636
0.900685
0
0
0
0
0
0.02809
0
0
0
0
0
0
1
0.0625
false
0
0.3125
0
0.5625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
f8f4ebae7db05ff7d51d0f3f1e884d5deb471ce9
640
py
Python
pytorch_toolkit/ote/ote/modules/evaluators/__init__.py
abhatikar/training_extensions
1c96e0f5f39688f8b79735e8dfa90646afc3d5e6
[ "Apache-2.0" ]
null
null
null
pytorch_toolkit/ote/ote/modules/evaluators/__init__.py
abhatikar/training_extensions
1c96e0f5f39688f8b79735e8dfa90646afc3d5e6
[ "Apache-2.0" ]
null
null
null
pytorch_toolkit/ote/ote/modules/evaluators/__init__.py
abhatikar/training_extensions
1c96e0f5f39688f8b79735e8dfa90646afc3d5e6
[ "Apache-2.0" ]
null
null
null
from .base import BaseEvaluator from .instance_segmentation import InstanceSegmentationEvaluator from .mmaction import MMActionEvaluator from .mmdetection import MMDetectionEvaluator from .face_detection import MMFaceDetectionEvaluator from .horizontal_text_detection import MMHorizontalTextDetectionEvaluator from .text_spotting import TextSpottingEvaluator from .reid import ReidEvaluator __all__ = [ 'BaseEvaluator', 'MMActionEvaluator', 'MMDetectionEvaluator', 'MMFaceDetectionEvaluator', 'MMHorizontalTextDetectionEvaluator', 'InstanceSegmentationEvaluator', 'TextSpottingEvaluator' 'ReidEvaluator', ]
32
73
0.826563
46
640
11.304348
0.478261
0.057692
0
0
0
0
0
0
0
0
0
0
0.120313
640
19
74
33.684211
0.923623
0
0
0
0
0
0.267188
0.16875
0
0
0
0
0
1
0
false
0
0.444444
0
0.444444
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
f8f8681cf56472ecddac7d078f8a830442e598f8
510
py
Python
threads/007_semaphor.py
keys4words/oop
ddb80de06fcba8075632b6fdd620bb64056634d3
[ "Apache-2.0" ]
null
null
null
threads/007_semaphor.py
keys4words/oop
ddb80de06fcba8075632b6fdd620bb64056634d3
[ "Apache-2.0" ]
2
2021-06-09T07:03:54.000Z
2022-03-12T00:55:18.000Z
threads/007_semaphor.py
keys4words/oop
ddb80de06fcba8075632b6fdd620bb64056634d3
[ "Apache-2.0" ]
null
null
null
import time, threading def producer(): with lock: print('set locking', lock._value) time.sleep(3) print("I'm free") max_workers = 1 lock = threading.BoundedSemaphore(value=max_workers) task1 = threading.Thread(target=producer) task2 = threading.Thread(target=producer) task3 = threading.Thread(target=producer) task4 = threading.Thread(target=producer) task1.start() task2.start() task3.start() task4.start() task1.join() task2.join() task3.join() task4.join() lock.release()
18.214286
52
0.713725
66
510
5.469697
0.439394
0.166205
0.232687
0.32133
0
0
0
0
0
0
0
0.03211
0.145098
510
27
53
18.888889
0.795872
0
0
0
0
0
0.037255
0
0
0
0
0
0
1
0.047619
false
0
0.047619
0
0.095238
0.095238
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f8f9fc64e1762e175a0428bc838f98b5e60e78f5
283
py
Python
5 kyu/Simple Fun 89 Boxes Packing.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
6
2020-09-03T09:32:25.000Z
2020-12-07T04:10:01.000Z
5 kyu/Simple Fun 89 Boxes Packing.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
1
2021-12-13T15:30:21.000Z
2021-12-13T15:30:21.000Z
5 kyu/Simple Fun 89 Boxes Packing.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
null
null
null
def boxes_packing(length, width, height): total=[sorted((i,j,k)) for i,j,k in zip(length, width, height)] res=sorted(total, key=lambda x: -min(x)) for i,j in enumerate(res[1:]): if any((k-l)<=0 for k,l in zip(res[i], j)): return False return True
40.428571
67
0.590106
52
283
3.192308
0.538462
0.048193
0.204819
0
0
0
0
0
0
0
0
0.009217
0.233216
283
7
68
40.428571
0.75576
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.428571
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d0403ce424b76852bfe8c1228332d8255698076
160,758
py
Python
sdk/python/pulumi_aws/tables.py
JakeGinnivan/pulumi-aws
c91ef78932964ac74eda7f5da81f65b0f1798c93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/tables.py
JakeGinnivan/pulumi-aws
c91ef78932964ac74eda7f5da81f65b0f1798c93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/tables.py
JakeGinnivan/pulumi-aws
c91ef78932964ac74eda7f5da81f65b0f1798c93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** _SNAKE_TO_CAMEL_CASE_TABLE = { "acceleration_status": "accelerationStatus", "accelerator_arn": "acceleratorArn", "accept_status": "acceptStatus", "acceptance_required": "acceptanceRequired", "access_log_settings": "accessLogSettings", "access_logs": "accessLogs", "access_policies": "accessPolicies", "access_policy": "accessPolicy", "access_url": "accessUrl", "account_aggregation_source": "accountAggregationSource", "account_alias": "accountAlias", "account_id": "accountId", "actions_enabled": "actionsEnabled", "activated_rules": "activatedRules", "activation_code": "activationCode", "activation_key": "activationKey", "active_directory_id": "activeDirectoryId", "active_trusted_signers": "activeTrustedSigners", "add_header_actions": "addHeaderActions", "additional_artifacts": "additionalArtifacts", "additional_authentication_providers": "additionalAuthenticationProviders", "additional_info": "additionalInfo", "additional_schema_elements": "additionalSchemaElements", "address_family": "addressFamily", "adjustment_type": "adjustmentType", "admin_account_id": "adminAccountId", "admin_create_user_config": "adminCreateUserConfig", "administration_role_arn": "administrationRoleArn", "advanced_options": "advancedOptions", "agent_arns": "agentArns", "agent_version": "agentVersion", "alarm_actions": "alarmActions", "alarm_configuration": "alarmConfiguration", "alarm_description": "alarmDescription", "alb_target_group_arn": "albTargetGroupArn", "alias_attributes": "aliasAttributes", "all_settings": "allSettings", "allocated_capacity": "allocatedCapacity", "allocated_memory": "allocatedMemory", "allocated_storage": "allocatedStorage", "allocation_id": "allocationId", "allocation_strategy": "allocationStrategy", "allow_external_principals": "allowExternalPrincipals", "allow_major_version_upgrade": "allowMajorVersionUpgrade", "allow_overwrite": "allowOverwrite", "allow_reassociation": "allowReassociation", "allow_self_management": "allowSelfManagement", "allow_ssh": "allowSsh", "allow_sudo": "allowSudo", "allow_unassociated_targets": "allowUnassociatedTargets", "allow_unauthenticated_identities": "allowUnauthenticatedIdentities", "allow_users_to_change_password": "allowUsersToChangePassword", "allow_version_upgrade": "allowVersionUpgrade", "allowed_oauth_flows": "allowedOauthFlows", "allowed_oauth_flows_user_pool_client": "allowedOauthFlowsUserPoolClient", "allowed_oauth_scopes": "allowedOauthScopes", "allowed_pattern": "allowedPattern", "allowed_prefixes": "allowedPrefixes", "allowed_principals": "allowedPrincipals", "amazon_address": "amazonAddress", "amazon_side_asn": "amazonSideAsn", "ami_id": "amiId", "ami_type": "amiType", "analytics_configuration": "analyticsConfiguration", "analyzer_name": "analyzerName", "api_endpoint": "apiEndpoint", "api_id": "apiId", "api_key": "apiKey", "api_key_required": "apiKeyRequired", "api_key_selection_expression": "apiKeySelectionExpression", "api_key_source": "apiKeySource", "api_mapping_key": "apiMappingKey", "api_mapping_selection_expression": "apiMappingSelectionExpression", "api_stages": "apiStages", "app_name": "appName", "app_server": "appServer", "app_server_version": "appServerVersion", "app_sources": "appSources", "application_failure_feedback_role_arn": "applicationFailureFeedbackRoleArn", "application_id": "applicationId", "application_success_feedback_role_arn": "applicationSuccessFeedbackRoleArn", "application_success_feedback_sample_rate": "applicationSuccessFeedbackSampleRate", "apply_immediately": "applyImmediately", "approval_rules": "approvalRules", "approved_patches": "approvedPatches", "approved_patches_compliance_level": "approvedPatchesComplianceLevel", "appversion_lifecycle": "appversionLifecycle", "arn_suffix": "arnSuffix", "artifact_store": "artifactStore", "assign_generated_ipv6_cidr_block": "assignGeneratedIpv6CidrBlock", "assign_ipv6_address_on_creation": "assignIpv6AddressOnCreation", "associate_public_ip_address": "associatePublicIpAddress", "associate_with_private_ip": "associateWithPrivateIp", "associated_gateway_id": "associatedGatewayId", "associated_gateway_owner_account_id": "associatedGatewayOwnerAccountId", "associated_gateway_type": "associatedGatewayType", "association_default_route_table_id": "associationDefaultRouteTableId", "association_id": "associationId", "association_name": "associationName", "assume_role_policy": "assumeRolePolicy", "at_rest_encryption_enabled": "atRestEncryptionEnabled", "attachment_id": "attachmentId", "attachments_sources": "attachmentsSources", "attribute_mapping": "attributeMapping", "audio_codec_options": "audioCodecOptions", "audit_stream_arn": "auditStreamArn", "auth_token": "authToken", "auth_type": "authType", "authentication_configuration": "authenticationConfiguration", "authentication_options": "authenticationOptions", "authentication_type": "authenticationType", "authorization_scopes": "authorizationScopes", "authorization_type": "authorizationType", "authorizer_credentials": "authorizerCredentials", "authorizer_credentials_arn": "authorizerCredentialsArn", "authorizer_id": "authorizerId", "authorizer_result_ttl_in_seconds": "authorizerResultTtlInSeconds", "authorizer_type": "authorizerType", "authorizer_uri": "authorizerUri", "auto_accept": "autoAccept", "auto_accept_shared_attachments": "autoAcceptSharedAttachments", "auto_assign_elastic_ips": "autoAssignElasticIps", "auto_assign_public_ips": "autoAssignPublicIps", "auto_bundle_on_deploy": "autoBundleOnDeploy", "auto_deploy": "autoDeploy", "auto_deployed": "autoDeployed", "auto_enable": "autoEnable", "auto_healing": "autoHealing", "auto_minor_version_upgrade": "autoMinorVersionUpgrade", "auto_rollback_configuration": "autoRollbackConfiguration", "auto_scaling_group_provider": "autoScalingGroupProvider", "auto_scaling_type": "autoScalingType", "auto_verified_attributes": "autoVerifiedAttributes", "automated_snapshot_retention_period": "automatedSnapshotRetentionPeriod", "automatic_backup_retention_days": "automaticBackupRetentionDays", "automatic_failover_enabled": "automaticFailoverEnabled", "automatic_stop_time_minutes": "automaticStopTimeMinutes", "automation_target_parameter_name": "automationTargetParameterName", "autoscaling_group_name": "autoscalingGroupName", "autoscaling_groups": "autoscalingGroups", "autoscaling_policy": "autoscalingPolicy", "autoscaling_role": "autoscalingRole", "availability_zone": "availabilityZone", "availability_zone_id": "availabilityZoneId", "availability_zone_name": "availabilityZoneName", "availability_zones": "availabilityZones", "aws_account_id": "awsAccountId", "aws_device": "awsDevice", "aws_flow_ruby_settings": "awsFlowRubySettings", "aws_kms_key_arn": "awsKmsKeyArn", "aws_service_access_principals": "awsServiceAccessPrincipals", "aws_service_name": "awsServiceName", "az_mode": "azMode", "backtrack_window": "backtrackWindow", "backup_retention_period": "backupRetentionPeriod", "backup_window": "backupWindow", "badge_enabled": "badgeEnabled", "badge_url": "badgeUrl", "base_endpoint_dns_names": "baseEndpointDnsNames", "base_path": "basePath", "baseline_id": "baselineId", "batch_size": "batchSize", "batch_target": "batchTarget", "behavior_on_mx_failure": "behaviorOnMxFailure", "berkshelf_version": "berkshelfVersion", "bgp_asn": "bgpAsn", "bgp_auth_key": "bgpAuthKey", "bgp_peer_id": "bgpPeerId", "bgp_status": "bgpStatus", "bid_price": "bidPrice", "billing_mode": "billingMode", "binary_media_types": "binaryMediaTypes", "bisect_batch_on_function_error": "bisectBatchOnFunctionError", "block_device_mappings": "blockDeviceMappings", "block_duration_minutes": "blockDurationMinutes", "block_public_acls": "blockPublicAcls", "block_public_policy": "blockPublicPolicy", "blue_green_deployment_config": "blueGreenDeploymentConfig", "blueprint_id": "blueprintId", "bootstrap_actions": "bootstrapActions", "bootstrap_brokers": "bootstrapBrokers", "bootstrap_brokers_tls": "bootstrapBrokersTls", "bounce_actions": "bounceActions", "branch_filter": "branchFilter", "broker_name": "brokerName", "broker_node_group_info": "brokerNodeGroupInfo", "bucket_domain_name": "bucketDomainName", "bucket_name": "bucketName", "bucket_prefix": "bucketPrefix", "bucket_regional_domain_name": "bucketRegionalDomainName", "budget_type": "budgetType", "build_id": "buildId", "build_timeout": "buildTimeout", "bundle_id": "bundleId", "bundler_version": "bundlerVersion", "byte_match_tuples": "byteMatchTuples", "ca_cert_identifier": "caCertIdentifier", "cache_cluster_enabled": "cacheClusterEnabled", "cache_cluster_size": "cacheClusterSize", "cache_control": "cacheControl", "cache_key_parameters": "cacheKeyParameters", "cache_namespace": "cacheNamespace", "cache_nodes": "cacheNodes", "caching_config": "cachingConfig", "callback_urls": "callbackUrls", "caller_reference": "callerReference", "campaign_hook": "campaignHook", "capacity_provider_strategies": "capacityProviderStrategies", "capacity_providers": "capacityProviders", "capacity_reservation_specification": "capacityReservationSpecification", "catalog_id": "catalogId", "catalog_targets": "catalogTargets", "cdc_start_time": "cdcStartTime", "certificate_arn": "certificateArn", "certificate_authority": "certificateAuthority", "certificate_authority_arn": "certificateAuthorityArn", "certificate_authority_configuration": "certificateAuthorityConfiguration", "certificate_body": "certificateBody", "certificate_chain": "certificateChain", "certificate_id": "certificateId", "certificate_name": "certificateName", "certificate_pem": "certificatePem", "certificate_private_key": "certificatePrivateKey", "certificate_signing_request": "certificateSigningRequest", "certificate_upload_date": "certificateUploadDate", "certificate_wallet": "certificateWallet", "channel_id": "channelId", "chap_enabled": "chapEnabled", "character_set_name": "characterSetName", "child_health_threshold": "childHealthThreshold", "child_healthchecks": "childHealthchecks", "cidr_block": "cidrBlock", "cidr_blocks": "cidrBlocks", "ciphertext_blob": "ciphertextBlob", "classification_type": "classificationType", "client_affinity": "clientAffinity", "client_authentication": "clientAuthentication", "client_certificate_id": "clientCertificateId", "client_cidr_block": "clientCidrBlock", "client_id": "clientId", "client_id_lists": "clientIdLists", "client_lists": "clientLists", "client_secret": "clientSecret", "client_token": "clientToken", "client_vpn_endpoint_id": "clientVpnEndpointId", "clone_url_http": "cloneUrlHttp", "clone_url_ssh": "cloneUrlSsh", "cloud_watch_logs_group_arn": "cloudWatchLogsGroupArn", "cloud_watch_logs_role_arn": "cloudWatchLogsRoleArn", "cloudfront_access_identity_path": "cloudfrontAccessIdentityPath", "cloudfront_distribution_arn": "cloudfrontDistributionArn", "cloudfront_domain_name": "cloudfrontDomainName", "cloudfront_zone_id": "cloudfrontZoneId", "cloudwatch_alarm": "cloudwatchAlarm", "cloudwatch_alarm_name": "cloudwatchAlarmName", "cloudwatch_alarm_region": "cloudwatchAlarmRegion", "cloudwatch_destinations": "cloudwatchDestinations", "cloudwatch_log_group_arn": "cloudwatchLogGroupArn", "cloudwatch_logging_options": "cloudwatchLoggingOptions", "cloudwatch_metric": "cloudwatchMetric", "cloudwatch_role_arn": "cloudwatchRoleArn", "cluster_address": "clusterAddress", "cluster_certificates": "clusterCertificates", "cluster_config": "clusterConfig", "cluster_endpoint_identifier": "clusterEndpointIdentifier", "cluster_id": "clusterId", "cluster_identifier": "clusterIdentifier", "cluster_identifier_prefix": "clusterIdentifierPrefix", "cluster_members": "clusterMembers", "cluster_mode": "clusterMode", "cluster_name": "clusterName", "cluster_parameter_group_name": "clusterParameterGroupName", "cluster_public_key": "clusterPublicKey", "cluster_resource_id": "clusterResourceId", "cluster_revision_number": "clusterRevisionNumber", "cluster_security_groups": "clusterSecurityGroups", "cluster_state": "clusterState", "cluster_subnet_group_name": "clusterSubnetGroupName", "cluster_type": "clusterType", "cluster_version": "clusterVersion", "cname_prefix": "cnamePrefix", "cognito_identity_providers": "cognitoIdentityProviders", "cognito_options": "cognitoOptions", "company_code": "companyCode", "comparison_operator": "comparisonOperator", "compatible_runtimes": "compatibleRuntimes", "complete_lock": "completeLock", "compliance_severity": "complianceSeverity", "compute_environment_name": "computeEnvironmentName", "compute_environment_name_prefix": "computeEnvironmentNamePrefix", "compute_environments": "computeEnvironments", "compute_platform": "computePlatform", "compute_resources": "computeResources", "computer_name": "computerName", "configuration_endpoint": "configurationEndpoint", "configuration_endpoint_address": "configurationEndpointAddress", "configuration_id": "configurationId", "configuration_info": "configurationInfo", "configuration_manager_name": "configurationManagerName", "configuration_manager_version": "configurationManagerVersion", "configuration_set_name": "configurationSetName", "configurations_json": "configurationsJson", "confirmation_timeout_in_minutes": "confirmationTimeoutInMinutes", "connect_settings": "connectSettings", "connection_draining": "connectionDraining", "connection_draining_timeout": "connectionDrainingTimeout", "connection_events": "connectionEvents", "connection_id": "connectionId", "connection_log_options": "connectionLogOptions", "connection_notification_arn": "connectionNotificationArn", "connection_properties": "connectionProperties", "connection_type": "connectionType", "connections_bandwidth": "connectionsBandwidth", "container_definitions": "containerDefinitions", "container_name": "containerName", "container_properties": "containerProperties", "content_base64": "contentBase64", "content_based_deduplication": "contentBasedDeduplication", "content_config": "contentConfig", "content_config_permissions": "contentConfigPermissions", "content_disposition": "contentDisposition", "content_encoding": "contentEncoding", "content_handling": "contentHandling", "content_handling_strategy": "contentHandlingStrategy", "content_language": "contentLanguage", "content_type": "contentType", "cookie_expiration_period": "cookieExpirationPeriod", "cookie_name": "cookieName", "copy_tags_to_backups": "copyTagsToBackups", "copy_tags_to_snapshot": "copyTagsToSnapshot", "core_instance_count": "coreInstanceCount", "core_instance_group": "coreInstanceGroup", "core_instance_type": "coreInstanceType", "cors_configuration": "corsConfiguration", "cors_rules": "corsRules", "cost_filters": "costFilters", "cost_types": "costTypes", "cpu_core_count": "cpuCoreCount", "cpu_count": "cpuCount", "cpu_options": "cpuOptions", "cpu_threads_per_core": "cpuThreadsPerCore", "create_date": "createDate", "create_timestamp": "createTimestamp", "created_at": "createdAt", "created_date": "createdDate", "created_time": "createdTime", "creation_date": "creationDate", "creation_time": "creationTime", "creation_token": "creationToken", "credential_duration": "credentialDuration", "credentials_arn": "credentialsArn", "credit_specification": "creditSpecification", "cross_zone_load_balancing": "crossZoneLoadBalancing", "csv_classifier": "csvClassifier", "current_version": "currentVersion", "custom_ami_id": "customAmiId", "custom_configure_recipes": "customConfigureRecipes", "custom_cookbooks_sources": "customCookbooksSources", "custom_deploy_recipes": "customDeployRecipes", "custom_endpoint_type": "customEndpointType", "custom_error_responses": "customErrorResponses", "custom_instance_profile_arn": "customInstanceProfileArn", "custom_json": "customJson", "custom_security_group_ids": "customSecurityGroupIds", "custom_setup_recipes": "customSetupRecipes", "custom_shutdown_recipes": "customShutdownRecipes", "custom_suffix": "customSuffix", "custom_undeploy_recipes": "customUndeployRecipes", "customer_address": "customerAddress", "customer_aws_id": "customerAwsId", "customer_gateway_configuration": "customerGatewayConfiguration", "customer_gateway_id": "customerGatewayId", "customer_master_key_spec": "customerMasterKeySpec", "customer_owned_ip": "customerOwnedIp", "customer_owned_ipv4_pool": "customerOwnedIpv4Pool", "customer_user_name": "customerUserName", "daily_automatic_backup_start_time": "dailyAutomaticBackupStartTime", "dashboard_arn": "dashboardArn", "dashboard_body": "dashboardBody", "dashboard_name": "dashboardName", "data_encryption_key_id": "dataEncryptionKeyId", "data_retention_in_hours": "dataRetentionInHours", "data_source": "dataSource", "data_source_arn": "dataSourceArn", "data_source_database_name": "dataSourceDatabaseName", "data_source_type": "dataSourceType", "database_name": "databaseName", "datapoints_to_alarm": "datapointsToAlarm", "db_cluster_identifier": "dbClusterIdentifier", "db_cluster_parameter_group_name": "dbClusterParameterGroupName", "db_cluster_snapshot_arn": "dbClusterSnapshotArn", "db_cluster_snapshot_identifier": "dbClusterSnapshotIdentifier", "db_instance_identifier": "dbInstanceIdentifier", "db_parameter_group_name": "dbParameterGroupName", "db_password": "dbPassword", "db_snapshot_arn": "dbSnapshotArn", "db_snapshot_identifier": "dbSnapshotIdentifier", "db_subnet_group_name": "dbSubnetGroupName", "db_user": "dbUser", "dbi_resource_id": "dbiResourceId", "dead_letter_config": "deadLetterConfig", "default_action": "defaultAction", "default_actions": "defaultActions", "default_arguments": "defaultArguments", "default_association_route_table": "defaultAssociationRouteTable", "default_authentication_method": "defaultAuthenticationMethod", "default_availability_zone": "defaultAvailabilityZone", "default_branch": "defaultBranch", "default_cache_behavior": "defaultCacheBehavior", "default_capacity_provider_strategies": "defaultCapacityProviderStrategies", "default_client_id": "defaultClientId", "default_cooldown": "defaultCooldown", "default_instance_profile_arn": "defaultInstanceProfileArn", "default_network_acl_id": "defaultNetworkAclId", "default_os": "defaultOs", "default_propagation_route_table": "defaultPropagationRouteTable", "default_redirect_uri": "defaultRedirectUri", "default_result": "defaultResult", "default_root_device_type": "defaultRootDeviceType", "default_root_object": "defaultRootObject", "default_route_settings": "defaultRouteSettings", "default_route_table_association": "defaultRouteTableAssociation", "default_route_table_id": "defaultRouteTableId", "default_route_table_propagation": "defaultRouteTablePropagation", "default_run_properties": "defaultRunProperties", "default_security_group_id": "defaultSecurityGroupId", "default_sender_id": "defaultSenderId", "default_sms_type": "defaultSmsType", "default_ssh_key_name": "defaultSshKeyName", "default_storage_class": "defaultStorageClass", "default_subnet_id": "defaultSubnetId", "default_value": "defaultValue", "default_version": "defaultVersion", "default_version_id": "defaultVersionId", "delay_seconds": "delaySeconds", "delegation_set_id": "delegationSetId", "delete_automated_backups": "deleteAutomatedBackups", "delete_ebs": "deleteEbs", "delete_eip": "deleteEip", "deletion_protection": "deletionProtection", "deletion_window_in_days": "deletionWindowInDays", "delivery_policy": "deliveryPolicy", "delivery_status_iam_role_arn": "deliveryStatusIamRoleArn", "delivery_status_success_sampling_rate": "deliveryStatusSuccessSamplingRate", "deployment_config_id": "deploymentConfigId", "deployment_config_name": "deploymentConfigName", "deployment_controller": "deploymentController", "deployment_group_name": "deploymentGroupName", "deployment_id": "deploymentId", "deployment_maximum_percent": "deploymentMaximumPercent", "deployment_minimum_healthy_percent": "deploymentMinimumHealthyPercent", "deployment_mode": "deploymentMode", "deployment_style": "deploymentStyle", "deregistration_delay": "deregistrationDelay", "desired_capacity": "desiredCapacity", "desired_count": "desiredCount", "destination_arn": "destinationArn", "destination_cidr_block": "destinationCidrBlock", "destination_config": "destinationConfig", "destination_id": "destinationId", "destination_ipv6_cidr_block": "destinationIpv6CidrBlock", "destination_location_arn": "destinationLocationArn", "destination_name": "destinationName", "destination_port_range": "destinationPortRange", "destination_prefix_list_id": "destinationPrefixListId", "destination_stream_arn": "destinationStreamArn", "detail_type": "detailType", "detector_id": "detectorId", "developer_provider_name": "developerProviderName", "device_ca_certificate": "deviceCaCertificate", "device_configuration": "deviceConfiguration", "device_index": "deviceIndex", "device_name": "deviceName", "dhcp_options_id": "dhcpOptionsId", "direct_internet_access": "directInternetAccess", "directory_id": "directoryId", "directory_name": "directoryName", "directory_type": "directoryType", "disable_api_termination": "disableApiTermination", "disable_email_notification": "disableEmailNotification", "disable_rollback": "disableRollback", "disk_id": "diskId", "disk_size": "diskSize", "display_name": "displayName", "dkim_tokens": "dkimTokens", "dns_config": "dnsConfig", "dns_entries": "dnsEntries", "dns_ip_addresses": "dnsIpAddresses", "dns_ips": "dnsIps", "dns_name": "dnsName", "dns_servers": "dnsServers", "dns_support": "dnsSupport", "document_format": "documentFormat", "document_root": "documentRoot", "document_type": "documentType", "document_version": "documentVersion", "documentation_version": "documentationVersion", "domain_endpoint_options": "domainEndpointOptions", "domain_iam_role_name": "domainIamRoleName", "domain_id": "domainId", "domain_name": "domainName", "domain_name_configuration": "domainNameConfiguration", "domain_name_servers": "domainNameServers", "domain_validation_options": "domainValidationOptions", "drain_elb_on_shutdown": "drainElbOnShutdown", "drop_invalid_header_fields": "dropInvalidHeaderFields", "dx_gateway_association_id": "dxGatewayAssociationId", "dx_gateway_id": "dxGatewayId", "dx_gateway_owner_account_id": "dxGatewayOwnerAccountId", "dynamodb_config": "dynamodbConfig", "dynamodb_targets": "dynamodbTargets", "ebs_block_devices": "ebsBlockDevices", "ebs_configs": "ebsConfigs", "ebs_optimized": "ebsOptimized", "ebs_options": "ebsOptions", "ebs_root_volume_size": "ebsRootVolumeSize", "ebs_volumes": "ebsVolumes", "ec2_attributes": "ec2Attributes", "ec2_config": "ec2Config", "ec2_inbound_permissions": "ec2InboundPermissions", "ec2_instance_id": "ec2InstanceId", "ec2_instance_type": "ec2InstanceType", "ec2_tag_filters": "ec2TagFilters", "ec2_tag_sets": "ec2TagSets", "ecs_cluster_arn": "ecsClusterArn", "ecs_service": "ecsService", "ecs_target": "ecsTarget", "efs_file_system_arn": "efsFileSystemArn", "egress_only_gateway_id": "egressOnlyGatewayId", "elastic_gpu_specifications": "elasticGpuSpecifications", "elastic_inference_accelerator": "elasticInferenceAccelerator", "elastic_ip": "elasticIp", "elastic_load_balancer": "elasticLoadBalancer", "elasticsearch_config": "elasticsearchConfig", "elasticsearch_configuration": "elasticsearchConfiguration", "elasticsearch_settings": "elasticsearchSettings", "elasticsearch_version": "elasticsearchVersion", "email_configuration": "emailConfiguration", "email_verification_message": "emailVerificationMessage", "email_verification_subject": "emailVerificationSubject", "ena_support": "enaSupport", "enable_classiclink": "enableClassiclink", "enable_classiclink_dns_support": "enableClassiclinkDnsSupport", "enable_cloudwatch_logs_exports": "enableCloudwatchLogsExports", "enable_cross_zone_load_balancing": "enableCrossZoneLoadBalancing", "enable_deletion_protection": "enableDeletionProtection", "enable_dns_hostnames": "enableDnsHostnames", "enable_dns_support": "enableDnsSupport", "enable_ecs_managed_tags": "enableEcsManagedTags", "enable_http2": "enableHttp2", "enable_http_endpoint": "enableHttpEndpoint", "enable_key_rotation": "enableKeyRotation", "enable_log_file_validation": "enableLogFileValidation", "enable_logging": "enableLogging", "enable_monitoring": "enableMonitoring", "enable_network_isolation": "enableNetworkIsolation", "enable_sni": "enableSni", "enable_ssl": "enableSsl", "enable_sso": "enableSso", "enabled_cloudwatch_logs_exports": "enabledCloudwatchLogsExports", "enabled_cluster_log_types": "enabledClusterLogTypes", "enabled_metrics": "enabledMetrics", "enabled_policy_types": "enabledPolicyTypes", "encoded_key": "encodedKey", "encrypt_at_rest": "encryptAtRest", "encrypted_fingerprint": "encryptedFingerprint", "encrypted_password": "encryptedPassword", "encrypted_private_key": "encryptedPrivateKey", "encrypted_secret": "encryptedSecret", "encryption_config": "encryptionConfig", "encryption_configuration": "encryptionConfiguration", "encryption_info": "encryptionInfo", "encryption_key": "encryptionKey", "encryption_options": "encryptionOptions", "encryption_type": "encryptionType", "end_date": "endDate", "end_date_type": "endDateType", "end_time": "endTime", "endpoint_arn": "endpointArn", "endpoint_auto_confirms": "endpointAutoConfirms", "endpoint_config_name": "endpointConfigName", "endpoint_configuration": "endpointConfiguration", "endpoint_configurations": "endpointConfigurations", "endpoint_details": "endpointDetails", "endpoint_group_region": "endpointGroupRegion", "endpoint_id": "endpointId", "endpoint_type": "endpointType", "endpoint_url": "endpointUrl", "enforce_consumer_deletion": "enforceConsumerDeletion", "engine_mode": "engineMode", "engine_name": "engineName", "engine_type": "engineType", "engine_version": "engineVersion", "enhanced_monitoring": "enhancedMonitoring", "enhanced_vpc_routing": "enhancedVpcRouting", "eni_id": "eniId", "environment_id": "environmentId", "ephemeral_block_devices": "ephemeralBlockDevices", "ephemeral_storage": "ephemeralStorage", "estimated_instance_warmup": "estimatedInstanceWarmup", "evaluate_low_sample_count_percentiles": "evaluateLowSampleCountPercentiles", "evaluation_periods": "evaluationPeriods", "event_categories": "eventCategories", "event_delivery_failure_topic_arn": "eventDeliveryFailureTopicArn", "event_endpoint_created_topic_arn": "eventEndpointCreatedTopicArn", "event_endpoint_deleted_topic_arn": "eventEndpointDeletedTopicArn", "event_endpoint_updated_topic_arn": "eventEndpointUpdatedTopicArn", "event_pattern": "eventPattern", "event_selectors": "eventSelectors", "event_source_arn": "eventSourceArn", "event_source_token": "eventSourceToken", "event_type_ids": "eventTypeIds", "excess_capacity_termination_policy": "excessCapacityTerminationPolicy", "excluded_accounts": "excludedAccounts", "excluded_members": "excludedMembers", "execution_arn": "executionArn", "execution_property": "executionProperty", "execution_role_arn": "executionRoleArn", "execution_role_name": "executionRoleName", "expiration_date": "expirationDate", "expiration_model": "expirationModel", "expire_passwords": "expirePasswords", "explicit_auth_flows": "explicitAuthFlows", "export_path": "exportPath", "extended_s3_configuration": "extendedS3Configuration", "extended_statistic": "extendedStatistic", "extra_connection_attributes": "extraConnectionAttributes", "failover_routing_policies": "failoverRoutingPolicies", "failure_feedback_role_arn": "failureFeedbackRoleArn", "failure_threshold": "failureThreshold", "fargate_profile_name": "fargateProfileName", "feature_name": "featureName", "feature_set": "featureSet", "fifo_queue": "fifoQueue", "file_system_arn": "fileSystemArn", "file_system_config": "fileSystemConfig", "file_system_id": "fileSystemId", "fileshare_id": "fileshareId", "filter_groups": "filterGroups", "filter_pattern": "filterPattern", "filter_policy": "filterPolicy", "final_snapshot_identifier": "finalSnapshotIdentifier", "finding_publishing_frequency": "findingPublishingFrequency", "fixed_rate": "fixedRate", "fleet_arn": "fleetArn", "fleet_type": "fleetType", "force_delete": "forceDelete", "force_destroy": "forceDestroy", "force_detach": "forceDetach", "force_detach_policies": "forceDetachPolicies", "force_new_deployment": "forceNewDeployment", "force_update_version": "forceUpdateVersion", "from_address": "fromAddress", "from_port": "fromPort", "function_arn": "functionArn", "function_id": "functionId", "function_name": "functionName", "function_version": "functionVersion", "gateway_arn": "gatewayArn", "gateway_id": "gatewayId", "gateway_ip_address": "gatewayIpAddress", "gateway_name": "gatewayName", "gateway_timezone": "gatewayTimezone", "gateway_type": "gatewayType", "gateway_vpc_endpoint": "gatewayVpcEndpoint", "generate_secret": "generateSecret", "geo_match_constraints": "geoMatchConstraints", "geolocation_routing_policies": "geolocationRoutingPolicies", "get_password_data": "getPasswordData", "global_cluster_identifier": "globalClusterIdentifier", "global_cluster_resource_id": "globalClusterResourceId", "global_filters": "globalFilters", "global_secondary_indexes": "globalSecondaryIndexes", "glue_version": "glueVersion", "grant_creation_tokens": "grantCreationTokens", "grant_id": "grantId", "grant_token": "grantToken", "grantee_principal": "granteePrincipal", "grok_classifier": "grokClassifier", "group_name": "groupName", "group_names": "groupNames", "guess_mime_type_enabled": "guessMimeTypeEnabled", "hard_expiry": "hardExpiry", "has_logical_redundancy": "hasLogicalRedundancy", "has_public_access_policy": "hasPublicAccessPolicy", "hash_key": "hashKey", "hash_type": "hashType", "health_check": "healthCheck", "health_check_config": "healthCheckConfig", "health_check_custom_config": "healthCheckCustomConfig", "health_check_grace_period": "healthCheckGracePeriod", "health_check_grace_period_seconds": "healthCheckGracePeriodSeconds", "health_check_id": "healthCheckId", "health_check_interval_seconds": "healthCheckIntervalSeconds", "health_check_path": "healthCheckPath", "health_check_port": "healthCheckPort", "health_check_protocol": "healthCheckProtocol", "health_check_type": "healthCheckType", "healthcheck_method": "healthcheckMethod", "healthcheck_url": "healthcheckUrl", "heartbeat_timeout": "heartbeatTimeout", "hibernation_options": "hibernationOptions", "hls_ingests": "hlsIngests", "home_directory": "homeDirectory", "home_region": "homeRegion", "host_id": "hostId", "host_instance_type": "hostInstanceType", "host_key": "hostKey", "host_key_fingerprint": "hostKeyFingerprint", "host_vpc_id": "hostVpcId", "hosted_zone": "hostedZone", "hosted_zone_id": "hostedZoneId", "hostname_theme": "hostnameTheme", "hsm_eni_id": "hsmEniId", "hsm_id": "hsmId", "hsm_state": "hsmState", "hsm_type": "hsmType", "http_config": "httpConfig", "http_failure_feedback_role_arn": "httpFailureFeedbackRoleArn", "http_method": "httpMethod", "http_success_feedback_role_arn": "httpSuccessFeedbackRoleArn", "http_success_feedback_sample_rate": "httpSuccessFeedbackSampleRate", "http_version": "httpVersion", "iam_arn": "iamArn", "iam_database_authentication_enabled": "iamDatabaseAuthenticationEnabled", "iam_fleet_role": "iamFleetRole", "iam_instance_profile": "iamInstanceProfile", "iam_role": "iamRole", "iam_role_arn": "iamRoleArn", "iam_role_id": "iamRoleId", "iam_roles": "iamRoles", "iam_user_access_to_billing": "iamUserAccessToBilling", "icmp_code": "icmpCode", "icmp_type": "icmpType", "identifier_prefix": "identifierPrefix", "identity_pool_id": "identityPoolId", "identity_pool_name": "identityPoolName", "identity_provider": "identityProvider", "identity_provider_type": "identityProviderType", "identity_source": "identitySource", "identity_sources": "identitySources", "identity_type": "identityType", "identity_validation_expression": "identityValidationExpression", "idle_timeout": "idleTimeout", "idp_identifiers": "idpIdentifiers", "ignore_deletion_error": "ignoreDeletionError", "ignore_public_acls": "ignorePublicAcls", "image_id": "imageId", "image_location": "imageLocation", "image_scanning_configuration": "imageScanningConfiguration", "image_tag_mutability": "imageTagMutability", "import_path": "importPath", "imported_file_chunk_size": "importedFileChunkSize", "in_progress_validation_batches": "inProgressValidationBatches", "include_global_service_events": "includeGlobalServiceEvents", "include_original_headers": "includeOriginalHeaders", "included_object_versions": "includedObjectVersions", "inference_accelerators": "inferenceAccelerators", "infrastructure_class": "infrastructureClass", "initial_lifecycle_hooks": "initialLifecycleHooks", "input_bucket": "inputBucket", "input_parameters": "inputParameters", "input_path": "inputPath", "input_transformer": "inputTransformer", "install_updates_on_boot": "installUpdatesOnBoot", "instance_class": "instanceClass", "instance_count": "instanceCount", "instance_groups": "instanceGroups", "instance_id": "instanceId", "instance_initiated_shutdown_behavior": "instanceInitiatedShutdownBehavior", "instance_interruption_behaviour": "instanceInterruptionBehaviour", "instance_market_options": "instanceMarketOptions", "instance_match_criteria": "instanceMatchCriteria", "instance_name": "instanceName", "instance_owner_id": "instanceOwnerId", "instance_platform": "instancePlatform", "instance_pools_to_use_count": "instancePoolsToUseCount", "instance_port": "instancePort", "instance_ports": "instancePorts", "instance_profile_arn": "instanceProfileArn", "instance_role_arn": "instanceRoleArn", "instance_shutdown_timeout": "instanceShutdownTimeout", "instance_state": "instanceState", "instance_tenancy": "instanceTenancy", "instance_type": "instanceType", "instance_types": "instanceTypes", "insufficient_data_actions": "insufficientDataActions", "insufficient_data_health_status": "insufficientDataHealthStatus", "integration_http_method": "integrationHttpMethod", "integration_id": "integrationId", "integration_method": "integrationMethod", "integration_response_key": "integrationResponseKey", "integration_response_selection_expression": "integrationResponseSelectionExpression", "integration_type": "integrationType", "integration_uri": "integrationUri", "invalid_user_lists": "invalidUserLists", "invert_healthcheck": "invertHealthcheck", "invitation_arn": "invitationArn", "invitation_message": "invitationMessage", "invocation_role": "invocationRole", "invoke_arn": "invokeArn", "invoke_url": "invokeUrl", "iot_analytics": "iotAnalytics", "iot_events": "iotEvents", "ip_address": "ipAddress", "ip_address_type": "ipAddressType", "ip_address_version": "ipAddressVersion", "ip_addresses": "ipAddresses", "ip_group_ids": "ipGroupIds", "ip_set_descriptors": "ipSetDescriptors", "ip_sets": "ipSets", "ipc_mode": "ipcMode", "ipv6_address": "ipv6Address", "ipv6_address_count": "ipv6AddressCount", "ipv6_addresses": "ipv6Addresses", "ipv6_association_id": "ipv6AssociationId", "ipv6_cidr_block": "ipv6CidrBlock", "ipv6_cidr_block_association_id": "ipv6CidrBlockAssociationId", "ipv6_cidr_blocks": "ipv6CidrBlocks", "ipv6_support": "ipv6Support", "is_enabled": "isEnabled", "is_ipv6_enabled": "isIpv6Enabled", "is_multi_region_trail": "isMultiRegionTrail", "is_organization_trail": "isOrganizationTrail", "is_static_ip": "isStaticIp", "jdbc_targets": "jdbcTargets", "joined_method": "joinedMethod", "joined_timestamp": "joinedTimestamp", "json_classifier": "jsonClassifier", "jumbo_frame_capable": "jumboFrameCapable", "jvm_options": "jvmOptions", "jvm_type": "jvmType", "jvm_version": "jvmVersion", "jwt_configuration": "jwtConfiguration", "kafka_settings": "kafkaSettings", "kafka_version": "kafkaVersion", "kafka_versions": "kafkaVersions", "keep_job_flow_alive_when_no_steps": "keepJobFlowAliveWhenNoSteps", "kerberos_attributes": "kerberosAttributes", "kernel_id": "kernelId", "key_arn": "keyArn", "key_fingerprint": "keyFingerprint", "key_id": "keyId", "key_material_base64": "keyMaterialBase64", "key_name": "keyName", "key_name_prefix": "keyNamePrefix", "key_pair_id": "keyPairId", "key_pair_name": "keyPairName", "key_state": "keyState", "key_type": "keyType", "key_usage": "keyUsage", "kibana_endpoint": "kibanaEndpoint", "kinesis_destination": "kinesisDestination", "kinesis_settings": "kinesisSettings", "kinesis_source_configuration": "kinesisSourceConfiguration", "kinesis_target": "kinesisTarget", "kms_data_key_reuse_period_seconds": "kmsDataKeyReusePeriodSeconds", "kms_encrypted": "kmsEncrypted", "kms_key_arn": "kmsKeyArn", "kms_key_id": "kmsKeyId", "kms_master_key_id": "kmsMasterKeyId", "lag_id": "lagId", "lambda_": "lambda", "lambda_actions": "lambdaActions", "lambda_config": "lambdaConfig", "lambda_failure_feedback_role_arn": "lambdaFailureFeedbackRoleArn", "lambda_function_arn": "lambdaFunctionArn", "lambda_functions": "lambdaFunctions", "lambda_multi_value_headers_enabled": "lambdaMultiValueHeadersEnabled", "lambda_success_feedback_role_arn": "lambdaSuccessFeedbackRoleArn", "lambda_success_feedback_sample_rate": "lambdaSuccessFeedbackSampleRate", "last_modified": "lastModified", "last_modified_date": "lastModifiedDate", "last_modified_time": "lastModifiedTime", "last_processing_result": "lastProcessingResult", "last_service_error_id": "lastServiceErrorId", "last_update_timestamp": "lastUpdateTimestamp", "last_updated_date": "lastUpdatedDate", "last_updated_time": "lastUpdatedTime", "latency_routing_policies": "latencyRoutingPolicies", "latest_revision": "latestRevision", "latest_version": "latestVersion", "launch_configuration": "launchConfiguration", "launch_configurations": "launchConfigurations", "launch_group": "launchGroup", "launch_specifications": "launchSpecifications", "launch_template": "launchTemplate", "launch_template_config": "launchTemplateConfig", "launch_template_configs": "launchTemplateConfigs", "launch_type": "launchType", "layer_arn": "layerArn", "layer_ids": "layerIds", "layer_name": "layerName", "lb_port": "lbPort", "license_configuration_arn": "licenseConfigurationArn", "license_count": "licenseCount", "license_count_hard_limit": "licenseCountHardLimit", "license_counting_type": "licenseCountingType", "license_info": "licenseInfo", "license_model": "licenseModel", "license_rules": "licenseRules", "license_specifications": "licenseSpecifications", "lifecycle_config_name": "lifecycleConfigName", "lifecycle_policy": "lifecyclePolicy", "lifecycle_rules": "lifecycleRules", "lifecycle_transition": "lifecycleTransition", "limit_amount": "limitAmount", "limit_unit": "limitUnit", "listener_arn": "listenerArn", "load_balancer": "loadBalancer", "load_balancer_arn": "loadBalancerArn", "load_balancer_info": "loadBalancerInfo", "load_balancer_name": "loadBalancerName", "load_balancer_port": "loadBalancerPort", "load_balancer_type": "loadBalancerType", "load_balancers": "loadBalancers", "load_balancing_algorithm_type": "loadBalancingAlgorithmType", "local_gateway_id": "localGatewayId", "local_gateway_route_table_id": "localGatewayRouteTableId", "local_gateway_virtual_interface_group_id": "localGatewayVirtualInterfaceGroupId", "local_secondary_indexes": "localSecondaryIndexes", "location_arn": "locationArn", "location_uri": "locationUri", "lock_token": "lockToken", "log_config": "logConfig", "log_destination": "logDestination", "log_destination_type": "logDestinationType", "log_format": "logFormat", "log_group": "logGroup", "log_group_name": "logGroupName", "log_paths": "logPaths", "log_publishing_options": "logPublishingOptions", "log_uri": "logUri", "logging_config": "loggingConfig", "logging_configuration": "loggingConfiguration", "logging_info": "loggingInfo", "logging_role": "loggingRole", "logout_urls": "logoutUrls", "logs_config": "logsConfig", "lun_number": "lunNumber", "mac_address": "macAddress", "mail_from_domain": "mailFromDomain", "main_route_table_id": "mainRouteTableId", "maintenance_window": "maintenanceWindow", "maintenance_window_start_time": "maintenanceWindowStartTime", "major_engine_version": "majorEngineVersion", "manage_berkshelf": "manageBerkshelf", "manage_bundler": "manageBundler", "manage_ebs_snapshots": "manageEbsSnapshots", "manages_vpc_endpoints": "managesVpcEndpoints", "map_public_ip_on_launch": "mapPublicIpOnLaunch", "master_account_arn": "masterAccountArn", "master_account_email": "masterAccountEmail", "master_account_id": "masterAccountId", "master_id": "masterId", "master_instance_group": "masterInstanceGroup", "master_instance_type": "masterInstanceType", "master_password": "masterPassword", "master_public_dns": "masterPublicDns", "master_username": "masterUsername", "match_criterias": "matchCriterias", "matching_types": "matchingTypes", "max_aggregation_interval": "maxAggregationInterval", "max_allocated_storage": "maxAllocatedStorage", "max_capacity": "maxCapacity", "max_concurrency": "maxConcurrency", "max_errors": "maxErrors", "max_instance_lifetime": "maxInstanceLifetime", "max_message_size": "maxMessageSize", "max_password_age": "maxPasswordAge", "max_retries": "maxRetries", "max_session_duration": "maxSessionDuration", "max_size": "maxSize", "maximum_batching_window_in_seconds": "maximumBatchingWindowInSeconds", "maximum_event_age_in_seconds": "maximumEventAgeInSeconds", "maximum_execution_frequency": "maximumExecutionFrequency", "maximum_record_age_in_seconds": "maximumRecordAgeInSeconds", "maximum_retry_attempts": "maximumRetryAttempts", "measure_latency": "measureLatency", "media_type": "mediaType", "medium_changer_type": "mediumChangerType", "member_account_id": "memberAccountId", "member_clusters": "memberClusters", "member_status": "memberStatus", "memory_size": "memorySize", "mesh_name": "meshName", "message_retention_seconds": "messageRetentionSeconds", "messages_per_second": "messagesPerSecond", "metadata_options": "metadataOptions", "method_path": "methodPath", "metric_aggregation_type": "metricAggregationType", "metric_groups": "metricGroups", "metric_name": "metricName", "metric_queries": "metricQueries", "metric_transformation": "metricTransformation", "metrics_granularity": "metricsGranularity", "mfa_configuration": "mfaConfiguration", "migration_type": "migrationType", "min_adjustment_magnitude": "minAdjustmentMagnitude", "min_capacity": "minCapacity", "min_elb_capacity": "minElbCapacity", "min_size": "minSize", "minimum_compression_size": "minimumCompressionSize", "minimum_healthy_hosts": "minimumHealthyHosts", "minimum_password_length": "minimumPasswordLength", "mixed_instances_policy": "mixedInstancesPolicy", "model_selection_expression": "modelSelectionExpression", "mongodb_settings": "mongodbSettings", "monitoring_interval": "monitoringInterval", "monitoring_role_arn": "monitoringRoleArn", "monthly_spend_limit": "monthlySpendLimit", "mount_options": "mountOptions", "mount_target_dns_name": "mountTargetDnsName", "multi_attach_enabled": "multiAttachEnabled", "multi_az": "multiAz", "multivalue_answer_routing_policy": "multivalueAnswerRoutingPolicy", "name_prefix": "namePrefix", "name_servers": "nameServers", "namespace_id": "namespaceId", "nat_gateway_id": "natGatewayId", "neptune_cluster_parameter_group_name": "neptuneClusterParameterGroupName", "neptune_parameter_group_name": "neptuneParameterGroupName", "neptune_subnet_group_name": "neptuneSubnetGroupName", "netbios_name_servers": "netbiosNameServers", "netbios_node_type": "netbiosNodeType", "network_acl_id": "networkAclId", "network_configuration": "networkConfiguration", "network_interface": "networkInterface", "network_interface_id": "networkInterfaceId", "network_interface_ids": "networkInterfaceIds", "network_interface_port": "networkInterfacePort", "network_interfaces": "networkInterfaces", "network_load_balancer_arn": "networkLoadBalancerArn", "network_load_balancer_arns": "networkLoadBalancerArns", "network_mode": "networkMode", "network_origin": "networkOrigin", "network_services": "networkServices", "new_game_session_protection_policy": "newGameSessionProtectionPolicy", "nfs_file_share_defaults": "nfsFileShareDefaults", "node_group_name": "nodeGroupName", "node_role_arn": "nodeRoleArn", "node_to_node_encryption": "nodeToNodeEncryption", "node_type": "nodeType", "nodejs_version": "nodejsVersion", "non_master_accounts": "nonMasterAccounts", "not_after": "notAfter", "not_before": "notBefore", "notification_arns": "notificationArns", "notification_metadata": "notificationMetadata", "notification_property": "notificationProperty", "notification_target_arn": "notificationTargetArn", "notification_topic_arn": "notificationTopicArn", "notification_type": "notificationType", "ntp_servers": "ntpServers", "num_cache_nodes": "numCacheNodes", "number_cache_clusters": "numberCacheClusters", "number_of_broker_nodes": "numberOfBrokerNodes", "number_of_nodes": "numberOfNodes", "number_of_workers": "numberOfWorkers", "object_acl": "objectAcl", "object_lock_configuration": "objectLockConfiguration", "object_lock_legal_hold_status": "objectLockLegalHoldStatus", "object_lock_mode": "objectLockMode", "object_lock_retain_until_date": "objectLockRetainUntilDate", "ok_actions": "okActions", "on_create": "onCreate", "on_demand_options": "onDemandOptions", "on_failure": "onFailure", "on_prem_config": "onPremConfig", "on_premises_instance_tag_filters": "onPremisesInstanceTagFilters", "on_start": "onStart", "open_monitoring": "openMonitoring", "openid_connect_config": "openidConnectConfig", "openid_connect_provider_arns": "openidConnectProviderArns", "operating_system": "operatingSystem", "operation_name": "operationName", "opt_in_status": "optInStatus", "optimize_for_end_user_location": "optimizeForEndUserLocation", "option_group_description": "optionGroupDescription", "option_group_name": "optionGroupName", "optional_fields": "optionalFields", "ordered_cache_behaviors": "orderedCacheBehaviors", "ordered_placement_strategies": "orderedPlacementStrategies", "organization_aggregation_source": "organizationAggregationSource", "origin_groups": "originGroups", "original_route_table_id": "originalRouteTableId", "outpost_arn": "outpostArn", "output_bucket": "outputBucket", "output_location": "outputLocation", "owner_account": "ownerAccount", "owner_account_id": "ownerAccountId", "owner_alias": "ownerAlias", "owner_arn": "ownerArn", "owner_id": "ownerId", "owner_information": "ownerInformation", "packet_length": "packetLength", "parallelization_factor": "parallelizationFactor", "parameter_group_name": "parameterGroupName", "parameter_overrides": "parameterOverrides", "parent_id": "parentId", "partition_keys": "partitionKeys", "passenger_version": "passengerVersion", "passthrough_behavior": "passthroughBehavior", "password_data": "passwordData", "password_length": "passwordLength", "password_policy": "passwordPolicy", "password_reset_required": "passwordResetRequired", "password_reuse_prevention": "passwordReusePrevention", "patch_group": "patchGroup", "path_part": "pathPart", "payload_format_version": "payloadFormatVersion", "payload_url": "payloadUrl", "peer_account_id": "peerAccountId", "peer_owner_id": "peerOwnerId", "peer_region": "peerRegion", "peer_transit_gateway_id": "peerTransitGatewayId", "peer_vpc_id": "peerVpcId", "pem_encoded_certificate": "pemEncodedCertificate", "performance_insights_enabled": "performanceInsightsEnabled", "performance_insights_kms_key_id": "performanceInsightsKmsKeyId", "performance_insights_retention_period": "performanceInsightsRetentionPeriod", "performance_mode": "performanceMode", "permanent_deletion_time_in_days": "permanentDeletionTimeInDays", "permissions_boundary": "permissionsBoundary", "pgp_key": "pgpKey", "physical_connection_requirements": "physicalConnectionRequirements", "pid_mode": "pidMode", "pipeline_config": "pipelineConfig", "placement_constraints": "placementConstraints", "placement_group": "placementGroup", "placement_group_id": "placementGroupId", "placement_tenancy": "placementTenancy", "plan_id": "planId", "platform_arn": "platformArn", "platform_credential": "platformCredential", "platform_principal": "platformPrincipal", "platform_types": "platformTypes", "platform_version": "platformVersion", "player_latency_policies": "playerLatencyPolicies", "pod_execution_role_arn": "podExecutionRoleArn", "point_in_time_recovery": "pointInTimeRecovery", "policy_arn": "policyArn", "policy_attributes": "policyAttributes", "policy_body": "policyBody", "policy_details": "policyDetails", "policy_document": "policyDocument", "policy_id": "policyId", "policy_name": "policyName", "policy_names": "policyNames", "policy_type": "policyType", "policy_type_name": "policyTypeName", "policy_url": "policyUrl", "poll_interval": "pollInterval", "port_ranges": "portRanges", "posix_user": "posixUser", "preferred_availability_zones": "preferredAvailabilityZones", "preferred_backup_window": "preferredBackupWindow", "preferred_maintenance_window": "preferredMaintenanceWindow", "prefix_list_id": "prefixListId", "prefix_list_ids": "prefixListIds", "prevent_user_existence_errors": "preventUserExistenceErrors", "price_class": "priceClass", "pricing_plan": "pricingPlan", "primary_container": "primaryContainer", "primary_endpoint_address": "primaryEndpointAddress", "primary_network_interface_id": "primaryNetworkInterfaceId", "principal_arn": "principalArn", "private_dns": "privateDns", "private_dns_enabled": "privateDnsEnabled", "private_dns_name": "privateDnsName", "private_ip": "privateIp", "private_ip_address": "privateIpAddress", "private_ips": "privateIps", "private_ips_count": "privateIpsCount", "private_key": "privateKey", "product_arn": "productArn", "product_code": "productCode", "production_variants": "productionVariants", "project_name": "projectName", "promotion_tier": "promotionTier", "promotional_messages_per_second": "promotionalMessagesPerSecond", "propagate_tags": "propagateTags", "propagating_vgws": "propagatingVgws", "propagation_default_route_table_id": "propagationDefaultRouteTableId", "proposal_id": "proposalId", "protect_from_scale_in": "protectFromScaleIn", "protocol_type": "protocolType", "provider_arns": "providerArns", "provider_details": "providerDetails", "provider_name": "providerName", "provider_type": "providerType", "provisioned_concurrent_executions": "provisionedConcurrentExecutions", "provisioned_throughput_in_mibps": "provisionedThroughputInMibps", "proxy_configuration": "proxyConfiguration", "proxy_protocol_v2": "proxyProtocolV2", "public_access_block_configuration": "publicAccessBlockConfiguration", "public_dns": "publicDns", "public_ip": "publicIp", "public_ip_address": "publicIpAddress", "public_ipv4_pool": "publicIpv4Pool", "public_key": "publicKey", "publicly_accessible": "publiclyAccessible", "qualified_arn": "qualifiedArn", "queue_url": "queueUrl", "queued_timeout": "queuedTimeout", "quiet_time": "quietTime", "quota_code": "quotaCode", "quota_name": "quotaName", "quota_settings": "quotaSettings", "rails_env": "railsEnv", "ram_disk_id": "ramDiskId", "ram_size": "ramSize", "ramdisk_id": "ramdiskId", "range_key": "rangeKey", "rate_key": "rateKey", "rate_limit": "rateLimit", "raw_message_delivery": "rawMessageDelivery", "rds_db_instance_arn": "rdsDbInstanceArn", "read_attributes": "readAttributes", "read_capacity": "readCapacity", "read_only": "readOnly", "reader_endpoint": "readerEndpoint", "receive_wait_time_seconds": "receiveWaitTimeSeconds", "receiver_account_id": "receiverAccountId", "recording_group": "recordingGroup", "recovery_points": "recoveryPoints", "recovery_window_in_days": "recoveryWindowInDays", "redrive_policy": "redrivePolicy", "redshift_configuration": "redshiftConfiguration", "reference_data_sources": "referenceDataSources", "reference_name": "referenceName", "refresh_token_validity": "refreshTokenValidity", "regex_match_tuples": "regexMatchTuples", "regex_pattern_strings": "regexPatternStrings", "regional_certificate_arn": "regionalCertificateArn", "regional_certificate_name": "regionalCertificateName", "regional_domain_name": "regionalDomainName", "regional_zone_id": "regionalZoneId", "registered_by": "registeredBy", "registration_code": "registrationCode", "registration_count": "registrationCount", "registration_limit": "registrationLimit", "registry_id": "registryId", "regular_expressions": "regularExpressions", "rejected_patches": "rejectedPatches", "relationship_status": "relationshipStatus", "release_label": "releaseLabel", "release_version": "releaseVersion", "remote_access": "remoteAccess", "remote_domain_name": "remoteDomainName", "replace_unhealthy_instances": "replaceUnhealthyInstances", "replicate_source_db": "replicateSourceDb", "replication_configuration": "replicationConfiguration", "replication_factor": "replicationFactor", "replication_group_description": "replicationGroupDescription", "replication_group_id": "replicationGroupId", "replication_instance_arn": "replicationInstanceArn", "replication_instance_class": "replicationInstanceClass", "replication_instance_id": "replicationInstanceId", "replication_instance_private_ips": "replicationInstancePrivateIps", "replication_instance_public_ips": "replicationInstancePublicIps", "replication_source_identifier": "replicationSourceIdentifier", "replication_subnet_group_arn": "replicationSubnetGroupArn", "replication_subnet_group_description": "replicationSubnetGroupDescription", "replication_subnet_group_id": "replicationSubnetGroupId", "replication_task_arn": "replicationTaskArn", "replication_task_id": "replicationTaskId", "replication_task_settings": "replicationTaskSettings", "report_name": "reportName", "reported_agent_version": "reportedAgentVersion", "reported_os_family": "reportedOsFamily", "reported_os_name": "reportedOsName", "reported_os_version": "reportedOsVersion", "repository_id": "repositoryId", "repository_name": "repositoryName", "repository_url": "repositoryUrl", "request_id": "requestId", "request_interval": "requestInterval", "request_mapping_template": "requestMappingTemplate", "request_models": "requestModels", "request_parameters": "requestParameters", "request_payer": "requestPayer", "request_status": "requestStatus", "request_template": "requestTemplate", "request_templates": "requestTemplates", "request_validator_id": "requestValidatorId", "requester_managed": "requesterManaged", "requester_pays": "requesterPays", "require_lowercase_characters": "requireLowercaseCharacters", "require_numbers": "requireNumbers", "require_symbols": "requireSymbols", "require_uppercase_characters": "requireUppercaseCharacters", "requires_compatibilities": "requiresCompatibilities", "reservation_plan_settings": "reservationPlanSettings", "reserved_concurrent_executions": "reservedConcurrentExecutions", "reservoir_size": "reservoirSize", "resolver_endpoint_id": "resolverEndpointId", "resolver_rule_id": "resolverRuleId", "resource_arn": "resourceArn", "resource_creation_limit_policy": "resourceCreationLimitPolicy", "resource_group_arn": "resourceGroupArn", "resource_id": "resourceId", "resource_id_scope": "resourceIdScope", "resource_path": "resourcePath", "resource_query": "resourceQuery", "resource_share_arn": "resourceShareArn", "resource_type": "resourceType", "resource_types_scopes": "resourceTypesScopes", "response_mapping_template": "responseMappingTemplate", "response_models": "responseModels", "response_parameters": "responseParameters", "response_template": "responseTemplate", "response_templates": "responseTemplates", "response_type": "responseType", "rest_api": "restApi", "rest_api_id": "restApiId", "restrict_public_buckets": "restrictPublicBuckets", "retain_on_delete": "retainOnDelete", "retain_stack": "retainStack", "retention_in_days": "retentionInDays", "retention_period": "retentionPeriod", "retire_on_delete": "retireOnDelete", "retiring_principal": "retiringPrincipal", "retry_strategy": "retryStrategy", "revocation_configuration": "revocationConfiguration", "revoke_rules_on_delete": "revokeRulesOnDelete", "role_arn": "roleArn", "role_mappings": "roleMappings", "role_name": "roleName", "root_block_device": "rootBlockDevice", "root_block_devices": "rootBlockDevices", "root_device_name": "rootDeviceName", "root_device_type": "rootDeviceType", "root_device_volume_id": "rootDeviceVolumeId", "root_directory": "rootDirectory", "root_password": "rootPassword", "root_password_on_all_instances": "rootPasswordOnAllInstances", "root_resource_id": "rootResourceId", "root_snapshot_id": "rootSnapshotId", "root_volume_encryption_enabled": "rootVolumeEncryptionEnabled", "rotation_enabled": "rotationEnabled", "rotation_lambda_arn": "rotationLambdaArn", "rotation_rules": "rotationRules", "route_filter_prefixes": "routeFilterPrefixes", "route_id": "routeId", "route_key": "routeKey", "route_response_key": "routeResponseKey", "route_response_selection_expression": "routeResponseSelectionExpression", "route_selection_expression": "routeSelectionExpression", "route_settings": "routeSettings", "route_table_id": "routeTableId", "route_table_ids": "routeTableIds", "routing_config": "routingConfig", "routing_strategy": "routingStrategy", "ruby_version": "rubyVersion", "rubygems_version": "rubygemsVersion", "rule_action": "ruleAction", "rule_id": "ruleId", "rule_identifier": "ruleIdentifier", "rule_name": "ruleName", "rule_number": "ruleNumber", "rule_set_name": "ruleSetName", "rule_type": "ruleType", "rules_package_arns": "rulesPackageArns", "run_command_targets": "runCommandTargets", "running_instance_count": "runningInstanceCount", "runtime_configuration": "runtimeConfiguration", "s3_actions": "s3Actions", "s3_bucket": "s3Bucket", "s3_bucket_arn": "s3BucketArn", "s3_bucket_name": "s3BucketName", "s3_canonical_user_id": "s3CanonicalUserId", "s3_config": "s3Config", "s3_configuration": "s3Configuration", "s3_destination": "s3Destination", "s3_import": "s3Import", "s3_key": "s3Key", "s3_key_prefix": "s3KeyPrefix", "s3_object_version": "s3ObjectVersion", "s3_prefix": "s3Prefix", "s3_region": "s3Region", "s3_settings": "s3Settings", "s3_targets": "s3Targets", "saml_metadata_document": "samlMetadataDocument", "saml_provider_arns": "samlProviderArns", "scalable_dimension": "scalableDimension", "scalable_target_action": "scalableTargetAction", "scale_down_behavior": "scaleDownBehavior", "scaling_adjustment": "scalingAdjustment", "scaling_config": "scalingConfig", "scaling_configuration": "scalingConfiguration", "scan_enabled": "scanEnabled", "schedule_expression": "scheduleExpression", "schedule_identifier": "scheduleIdentifier", "schedule_timezone": "scheduleTimezone", "scheduled_action_name": "scheduledActionName", "scheduling_strategy": "schedulingStrategy", "schema_change_policy": "schemaChangePolicy", "schema_version": "schemaVersion", "scope_identifiers": "scopeIdentifiers", "search_string": "searchString", "secondary_artifacts": "secondaryArtifacts", "secondary_sources": "secondarySources", "secret_binary": "secretBinary", "secret_id": "secretId", "secret_key": "secretKey", "secret_string": "secretString", "security_configuration": "securityConfiguration", "security_group_id": "securityGroupId", "security_group_ids": "securityGroupIds", "security_group_names": "securityGroupNames", "security_groups": "securityGroups", "security_policy": "securityPolicy", "selection_pattern": "selectionPattern", "selection_tags": "selectionTags", "self_managed_active_directory": "selfManagedActiveDirectory", "self_service_permissions": "selfServicePermissions", "sender_account_id": "senderAccountId", "sender_id": "senderId", "server_certificate_arn": "serverCertificateArn", "server_hostname": "serverHostname", "server_id": "serverId", "server_name": "serverName", "server_properties": "serverProperties", "server_side_encryption": "serverSideEncryption", "server_side_encryption_configuration": "serverSideEncryptionConfiguration", "server_type": "serverType", "service_access_role": "serviceAccessRole", "service_code": "serviceCode", "service_linked_role_arn": "serviceLinkedRoleArn", "service_name": "serviceName", "service_namespace": "serviceNamespace", "service_registries": "serviceRegistries", "service_role": "serviceRole", "service_role_arn": "serviceRoleArn", "service_type": "serviceType", "ses_smtp_password": "sesSmtpPassword", "ses_smtp_password_v4": "sesSmtpPasswordV4", "session_name": "sessionName", "session_number": "sessionNumber", "set_identifier": "setIdentifier", "shard_count": "shardCount", "shard_level_metrics": "shardLevelMetrics", "share_arn": "shareArn", "share_id": "shareId", "share_name": "shareName", "share_status": "shareStatus", "short_code": "shortCode", "short_name": "shortName", "size_constraints": "sizeConstraints", "skip_destroy": "skipDestroy", "skip_final_backup": "skipFinalBackup", "skip_final_snapshot": "skipFinalSnapshot", "slow_start": "slowStart", "smb_active_directory_settings": "smbActiveDirectorySettings", "smb_guest_password": "smbGuestPassword", "sms_authentication_message": "smsAuthenticationMessage", "sms_configuration": "smsConfiguration", "sms_verification_message": "smsVerificationMessage", "snapshot_arns": "snapshotArns", "snapshot_cluster_identifier": "snapshotClusterIdentifier", "snapshot_copy": "snapshotCopy", "snapshot_copy_grant_name": "snapshotCopyGrantName", "snapshot_delivery_properties": "snapshotDeliveryProperties", "snapshot_id": "snapshotId", "snapshot_identifier": "snapshotIdentifier", "snapshot_name": "snapshotName", "snapshot_options": "snapshotOptions", "snapshot_retention_limit": "snapshotRetentionLimit", "snapshot_type": "snapshotType", "snapshot_window": "snapshotWindow", "snapshot_without_reboot": "snapshotWithoutReboot", "sns_actions": "snsActions", "sns_destination": "snsDestination", "sns_topic": "snsTopic", "sns_topic_arn": "snsTopicArn", "sns_topic_name": "snsTopicName", "software_token_mfa_configuration": "softwareTokenMfaConfiguration", "solution_stack_name": "solutionStackName", "source_account": "sourceAccount", "source_ami_id": "sourceAmiId", "source_ami_region": "sourceAmiRegion", "source_arn": "sourceArn", "source_backup_identifier": "sourceBackupIdentifier", "source_cidr_block": "sourceCidrBlock", "source_code_hash": "sourceCodeHash", "source_code_size": "sourceCodeSize", "source_db_cluster_snapshot_arn": "sourceDbClusterSnapshotArn", "source_db_snapshot_identifier": "sourceDbSnapshotIdentifier", "source_dest_check": "sourceDestCheck", "source_endpoint_arn": "sourceEndpointArn", "source_ids": "sourceIds", "source_instance_id": "sourceInstanceId", "source_location_arn": "sourceLocationArn", "source_port_range": "sourcePortRange", "source_region": "sourceRegion", "source_security_group": "sourceSecurityGroup", "source_security_group_id": "sourceSecurityGroupId", "source_snapshot_id": "sourceSnapshotId", "source_type": "sourceType", "source_version": "sourceVersion", "source_volume_arn": "sourceVolumeArn", "split_tunnel": "splitTunnel", "splunk_configuration": "splunkConfiguration", "spot_bid_status": "spotBidStatus", "spot_instance_id": "spotInstanceId", "spot_options": "spotOptions", "spot_price": "spotPrice", "spot_request_state": "spotRequestState", "spot_type": "spotType", "sql_injection_match_tuples": "sqlInjectionMatchTuples", "sql_version": "sqlVersion", "sqs_failure_feedback_role_arn": "sqsFailureFeedbackRoleArn", "sqs_success_feedback_role_arn": "sqsSuccessFeedbackRoleArn", "sqs_success_feedback_sample_rate": "sqsSuccessFeedbackSampleRate", "sqs_target": "sqsTarget", "sriov_net_support": "sriovNetSupport", "ssh_host_dsa_key_fingerprint": "sshHostDsaKeyFingerprint", "ssh_host_rsa_key_fingerprint": "sshHostRsaKeyFingerprint", "ssh_key_name": "sshKeyName", "ssh_public_key": "sshPublicKey", "ssh_public_key_id": "sshPublicKeyId", "ssh_username": "sshUsername", "ssl_configurations": "sslConfigurations", "ssl_mode": "sslMode", "ssl_policy": "sslPolicy", "stack_endpoint": "stackEndpoint", "stack_id": "stackId", "stack_set_id": "stackSetId", "stack_set_name": "stackSetName", "stage_description": "stageDescription", "stage_name": "stageName", "stage_variables": "stageVariables", "standards_arn": "standardsArn", "start_date": "startDate", "start_time": "startTime", "starting_position": "startingPosition", "starting_position_timestamp": "startingPositionTimestamp", "state_transition_reason": "stateTransitionReason", "statement_id": "statementId", "statement_id_prefix": "statementIdPrefix", "static_ip_name": "staticIpName", "static_members": "staticMembers", "static_routes_only": "staticRoutesOnly", "stats_enabled": "statsEnabled", "stats_password": "statsPassword", "stats_url": "statsUrl", "stats_user": "statsUser", "status_code": "statusCode", "status_reason": "statusReason", "step_adjustments": "stepAdjustments", "step_concurrency_level": "stepConcurrencyLevel", "step_functions": "stepFunctions", "step_scaling_policy_configuration": "stepScalingPolicyConfiguration", "stop_actions": "stopActions", "storage_capacity": "storageCapacity", "storage_class": "storageClass", "storage_class_analysis": "storageClassAnalysis", "storage_descriptor": "storageDescriptor", "storage_encrypted": "storageEncrypted", "storage_location": "storageLocation", "storage_type": "storageType", "stream_arn": "streamArn", "stream_enabled": "streamEnabled", "stream_label": "streamLabel", "stream_view_type": "streamViewType", "subject_alternative_names": "subjectAlternativeNames", "subnet_group_name": "subnetGroupName", "subnet_id": "subnetId", "subnet_ids": "subnetIds", "subnet_mappings": "subnetMappings", "success_feedback_role_arn": "successFeedbackRoleArn", "success_feedback_sample_rate": "successFeedbackSampleRate", "support_code": "supportCode", "supported_identity_providers": "supportedIdentityProviders", "supported_login_providers": "supportedLoginProviders", "suspended_processes": "suspendedProcesses", "system_packages": "systemPackages", "table_mappings": "tableMappings", "table_name": "tableName", "table_prefix": "tablePrefix", "table_type": "tableType", "tag_key_scope": "tagKeyScope", "tag_specifications": "tagSpecifications", "tag_value_scope": "tagValueScope", "tags_collection": "tagsCollection", "tape_drive_type": "tapeDriveType", "target_action": "targetAction", "target_arn": "targetArn", "target_capacity": "targetCapacity", "target_capacity_specification": "targetCapacitySpecification", "target_endpoint_arn": "targetEndpointArn", "target_group_arn": "targetGroupArn", "target_group_arns": "targetGroupArns", "target_id": "targetId", "target_ips": "targetIps", "target_key_arn": "targetKeyArn", "target_key_id": "targetKeyId", "target_name": "targetName", "target_pipeline": "targetPipeline", "target_tracking_configuration": "targetTrackingConfiguration", "target_tracking_scaling_policy_configuration": "targetTrackingScalingPolicyConfiguration", "target_type": "targetType", "task_arn": "taskArn", "task_definition": "taskDefinition", "task_invocation_parameters": "taskInvocationParameters", "task_parameters": "taskParameters", "task_role_arn": "taskRoleArn", "task_type": "taskType", "team_id": "teamId", "template_body": "templateBody", "template_name": "templateName", "template_selection_expression": "templateSelectionExpression", "template_url": "templateUrl", "terminate_instances": "terminateInstances", "terminate_instances_with_expiration": "terminateInstancesWithExpiration", "termination_policies": "terminationPolicies", "termination_protection": "terminationProtection", "thing_type_name": "thingTypeName", "threshold_count": "thresholdCount", "threshold_metric_id": "thresholdMetricId", "throttle_settings": "throttleSettings", "throughput_capacity": "throughputCapacity", "throughput_mode": "throughputMode", "thumbnail_config": "thumbnailConfig", "thumbnail_config_permissions": "thumbnailConfigPermissions", "thumbprint_lists": "thumbprintLists", "time_period_end": "timePeriodEnd", "time_period_start": "timePeriodStart", "time_unit": "timeUnit", "timeout_in_minutes": "timeoutInMinutes", "timeout_in_seconds": "timeoutInSeconds", "timeout_milliseconds": "timeoutMilliseconds", "tls_policy": "tlsPolicy", "to_port": "toPort", "token_key": "tokenKey", "token_key_id": "tokenKeyId", "topic_arn": "topicArn", "tracing_config": "tracingConfig", "traffic_dial_percentage": "trafficDialPercentage", "traffic_direction": "trafficDirection", "traffic_mirror_filter_id": "trafficMirrorFilterId", "traffic_mirror_target_id": "trafficMirrorTargetId", "traffic_routing_config": "trafficRoutingConfig", "traffic_type": "trafficType", "transactional_messages_per_second": "transactionalMessagesPerSecond", "transit_encryption_enabled": "transitEncryptionEnabled", "transit_gateway_attachment_id": "transitGatewayAttachmentId", "transit_gateway_default_route_table_association": "transitGatewayDefaultRouteTableAssociation", "transit_gateway_default_route_table_propagation": "transitGatewayDefaultRouteTablePropagation", "transit_gateway_id": "transitGatewayId", "transit_gateway_route_table_id": "transitGatewayRouteTableId", "transport_protocol": "transportProtocol", "treat_missing_data": "treatMissingData", "trigger_configurations": "triggerConfigurations", "trigger_types": "triggerTypes", "tunnel1_address": "tunnel1Address", "tunnel1_bgp_asn": "tunnel1BgpAsn", "tunnel1_bgp_holdtime": "tunnel1BgpHoldtime", "tunnel1_cgw_inside_address": "tunnel1CgwInsideAddress", "tunnel1_inside_cidr": "tunnel1InsideCidr", "tunnel1_preshared_key": "tunnel1PresharedKey", "tunnel1_vgw_inside_address": "tunnel1VgwInsideAddress", "tunnel2_address": "tunnel2Address", "tunnel2_bgp_asn": "tunnel2BgpAsn", "tunnel2_bgp_holdtime": "tunnel2BgpHoldtime", "tunnel2_cgw_inside_address": "tunnel2CgwInsideAddress", "tunnel2_inside_cidr": "tunnel2InsideCidr", "tunnel2_preshared_key": "tunnel2PresharedKey", "tunnel2_vgw_inside_address": "tunnel2VgwInsideAddress", "unique_id": "uniqueId", "url_path": "urlPath", "usage_plan_id": "usagePlanId", "usage_report_s3_bucket": "usageReportS3Bucket", "use_custom_cookbooks": "useCustomCookbooks", "use_ebs_optimized_instances": "useEbsOptimizedInstances", "use_opsworks_security_groups": "useOpsworksSecurityGroups", "user_arn": "userArn", "user_data": "userData", "user_data_base64": "userDataBase64", "user_name": "userName", "user_pool_add_ons": "userPoolAddOns", "user_pool_config": "userPoolConfig", "user_pool_id": "userPoolId", "user_role": "userRole", "user_volume_encryption_enabled": "userVolumeEncryptionEnabled", "username_attributes": "usernameAttributes", "username_configuration": "usernameConfiguration", "valid_from": "validFrom", "valid_to": "validTo", "valid_until": "validUntil", "valid_user_lists": "validUserLists", "validate_request_body": "validateRequestBody", "validate_request_parameters": "validateRequestParameters", "validation_emails": "validationEmails", "validation_method": "validationMethod", "validation_record_fqdns": "validationRecordFqdns", "vault_name": "vaultName", "verification_message_template": "verificationMessageTemplate", "verification_token": "verificationToken", "version_id": "versionId", "version_stages": "versionStages", "vgw_telemetries": "vgwTelemetries", "video_codec_options": "videoCodecOptions", "video_watermarks": "videoWatermarks", "view_expanded_text": "viewExpandedText", "view_original_text": "viewOriginalText", "viewer_certificate": "viewerCertificate", "virtual_interface_id": "virtualInterfaceId", "virtual_network_id": "virtualNetworkId", "virtual_router_name": "virtualRouterName", "virtualization_type": "virtualizationType", "visibility_timeout_seconds": "visibilityTimeoutSeconds", "visible_to_all_users": "visibleToAllUsers", "volume_arn": "volumeArn", "volume_encryption_key": "volumeEncryptionKey", "volume_id": "volumeId", "volume_size": "volumeSize", "volume_size_in_bytes": "volumeSizeInBytes", "volume_tags": "volumeTags", "vpc_classic_link_id": "vpcClassicLinkId", "vpc_classic_link_security_groups": "vpcClassicLinkSecurityGroups", "vpc_config": "vpcConfig", "vpc_configuration": "vpcConfiguration", "vpc_endpoint_id": "vpcEndpointId", "vpc_endpoint_service_id": "vpcEndpointServiceId", "vpc_endpoint_type": "vpcEndpointType", "vpc_id": "vpcId", "vpc_options": "vpcOptions", "vpc_owner_id": "vpcOwnerId", "vpc_peering_connection_id": "vpcPeeringConnectionId", "vpc_region": "vpcRegion", "vpc_security_group_ids": "vpcSecurityGroupIds", "vpc_settings": "vpcSettings", "vpc_zone_identifiers": "vpcZoneIdentifiers", "vpn_connection_id": "vpnConnectionId", "vpn_ecmp_support": "vpnEcmpSupport", "vpn_gateway_id": "vpnGatewayId", "wait_for_capacity_timeout": "waitForCapacityTimeout", "wait_for_deployment": "waitForDeployment", "wait_for_elb_capacity": "waitForElbCapacity", "wait_for_fulfillment": "waitForFulfillment", "wait_for_ready_timeout": "waitForReadyTimeout", "wait_for_steady_state": "waitForSteadyState", "web_acl_arn": "webAclArn", "web_acl_id": "webAclId", "website_ca_id": "websiteCaId", "website_domain": "websiteDomain", "website_endpoint": "websiteEndpoint", "website_redirect": "websiteRedirect", "weekly_maintenance_start_time": "weeklyMaintenanceStartTime", "weighted_routing_policies": "weightedRoutingPolicies", "window_id": "windowId", "worker_type": "workerType", "workflow_execution_retention_period_in_days": "workflowExecutionRetentionPeriodInDays", "workflow_name": "workflowName", "workmail_actions": "workmailActions", "workspace_properties": "workspaceProperties", "workspace_security_group_id": "workspaceSecurityGroupId", "write_attributes": "writeAttributes", "write_capacity": "writeCapacity", "xml_classifier": "xmlClassifier", "xray_enabled": "xrayEnabled", "xray_tracing_enabled": "xrayTracingEnabled", "xss_match_tuples": "xssMatchTuples", "zone_id": "zoneId", "zookeeper_connect_string": "zookeeperConnectString", } _CAMEL_TO_SNAKE_CASE_TABLE = { "accelerationStatus": "acceleration_status", "acceleratorArn": "accelerator_arn", "acceptStatus": "accept_status", "acceptanceRequired": "acceptance_required", "accessLogSettings": "access_log_settings", "accessLogs": "access_logs", "accessPolicies": "access_policies", "accessPolicy": "access_policy", "accessUrl": "access_url", "accountAggregationSource": "account_aggregation_source", "accountAlias": "account_alias", "accountId": "account_id", "actionsEnabled": "actions_enabled", "activatedRules": "activated_rules", "activationCode": "activation_code", "activationKey": "activation_key", "activeDirectoryId": "active_directory_id", "activeTrustedSigners": "active_trusted_signers", "addHeaderActions": "add_header_actions", "additionalArtifacts": "additional_artifacts", "additionalAuthenticationProviders": "additional_authentication_providers", "additionalInfo": "additional_info", "additionalSchemaElements": "additional_schema_elements", "addressFamily": "address_family", "adjustmentType": "adjustment_type", "adminAccountId": "admin_account_id", "adminCreateUserConfig": "admin_create_user_config", "administrationRoleArn": "administration_role_arn", "advancedOptions": "advanced_options", "agentArns": "agent_arns", "agentVersion": "agent_version", "alarmActions": "alarm_actions", "alarmConfiguration": "alarm_configuration", "alarmDescription": "alarm_description", "albTargetGroupArn": "alb_target_group_arn", "aliasAttributes": "alias_attributes", "allSettings": "all_settings", "allocatedCapacity": "allocated_capacity", "allocatedMemory": "allocated_memory", "allocatedStorage": "allocated_storage", "allocationId": "allocation_id", "allocationStrategy": "allocation_strategy", "allowExternalPrincipals": "allow_external_principals", "allowMajorVersionUpgrade": "allow_major_version_upgrade", "allowOverwrite": "allow_overwrite", "allowReassociation": "allow_reassociation", "allowSelfManagement": "allow_self_management", "allowSsh": "allow_ssh", "allowSudo": "allow_sudo", "allowUnassociatedTargets": "allow_unassociated_targets", "allowUnauthenticatedIdentities": "allow_unauthenticated_identities", "allowUsersToChangePassword": "allow_users_to_change_password", "allowVersionUpgrade": "allow_version_upgrade", "allowedOauthFlows": "allowed_oauth_flows", "allowedOauthFlowsUserPoolClient": "allowed_oauth_flows_user_pool_client", "allowedOauthScopes": "allowed_oauth_scopes", "allowedPattern": "allowed_pattern", "allowedPrefixes": "allowed_prefixes", "allowedPrincipals": "allowed_principals", "amazonAddress": "amazon_address", "amazonSideAsn": "amazon_side_asn", "amiId": "ami_id", "amiType": "ami_type", "analyticsConfiguration": "analytics_configuration", "analyzerName": "analyzer_name", "apiEndpoint": "api_endpoint", "apiId": "api_id", "apiKey": "api_key", "apiKeyRequired": "api_key_required", "apiKeySelectionExpression": "api_key_selection_expression", "apiKeySource": "api_key_source", "apiMappingKey": "api_mapping_key", "apiMappingSelectionExpression": "api_mapping_selection_expression", "apiStages": "api_stages", "appName": "app_name", "appServer": "app_server", "appServerVersion": "app_server_version", "appSources": "app_sources", "applicationFailureFeedbackRoleArn": "application_failure_feedback_role_arn", "applicationId": "application_id", "applicationSuccessFeedbackRoleArn": "application_success_feedback_role_arn", "applicationSuccessFeedbackSampleRate": "application_success_feedback_sample_rate", "applyImmediately": "apply_immediately", "approvalRules": "approval_rules", "approvedPatches": "approved_patches", "approvedPatchesComplianceLevel": "approved_patches_compliance_level", "appversionLifecycle": "appversion_lifecycle", "arnSuffix": "arn_suffix", "artifactStore": "artifact_store", "assignGeneratedIpv6CidrBlock": "assign_generated_ipv6_cidr_block", "assignIpv6AddressOnCreation": "assign_ipv6_address_on_creation", "associatePublicIpAddress": "associate_public_ip_address", "associateWithPrivateIp": "associate_with_private_ip", "associatedGatewayId": "associated_gateway_id", "associatedGatewayOwnerAccountId": "associated_gateway_owner_account_id", "associatedGatewayType": "associated_gateway_type", "associationDefaultRouteTableId": "association_default_route_table_id", "associationId": "association_id", "associationName": "association_name", "assumeRolePolicy": "assume_role_policy", "atRestEncryptionEnabled": "at_rest_encryption_enabled", "attachmentId": "attachment_id", "attachmentsSources": "attachments_sources", "attributeMapping": "attribute_mapping", "audioCodecOptions": "audio_codec_options", "auditStreamArn": "audit_stream_arn", "authToken": "auth_token", "authType": "auth_type", "authenticationConfiguration": "authentication_configuration", "authenticationOptions": "authentication_options", "authenticationType": "authentication_type", "authorizationScopes": "authorization_scopes", "authorizationType": "authorization_type", "authorizerCredentials": "authorizer_credentials", "authorizerCredentialsArn": "authorizer_credentials_arn", "authorizerId": "authorizer_id", "authorizerResultTtlInSeconds": "authorizer_result_ttl_in_seconds", "authorizerType": "authorizer_type", "authorizerUri": "authorizer_uri", "autoAccept": "auto_accept", "autoAcceptSharedAttachments": "auto_accept_shared_attachments", "autoAssignElasticIps": "auto_assign_elastic_ips", "autoAssignPublicIps": "auto_assign_public_ips", "autoBundleOnDeploy": "auto_bundle_on_deploy", "autoDeploy": "auto_deploy", "autoDeployed": "auto_deployed", "autoEnable": "auto_enable", "autoHealing": "auto_healing", "autoMinorVersionUpgrade": "auto_minor_version_upgrade", "autoRollbackConfiguration": "auto_rollback_configuration", "autoScalingGroupProvider": "auto_scaling_group_provider", "autoScalingType": "auto_scaling_type", "autoVerifiedAttributes": "auto_verified_attributes", "automatedSnapshotRetentionPeriod": "automated_snapshot_retention_period", "automaticBackupRetentionDays": "automatic_backup_retention_days", "automaticFailoverEnabled": "automatic_failover_enabled", "automaticStopTimeMinutes": "automatic_stop_time_minutes", "automationTargetParameterName": "automation_target_parameter_name", "autoscalingGroupName": "autoscaling_group_name", "autoscalingGroups": "autoscaling_groups", "autoscalingPolicy": "autoscaling_policy", "autoscalingRole": "autoscaling_role", "availabilityZone": "availability_zone", "availabilityZoneId": "availability_zone_id", "availabilityZoneName": "availability_zone_name", "availabilityZones": "availability_zones", "awsAccountId": "aws_account_id", "awsDevice": "aws_device", "awsFlowRubySettings": "aws_flow_ruby_settings", "awsKmsKeyArn": "aws_kms_key_arn", "awsServiceAccessPrincipals": "aws_service_access_principals", "awsServiceName": "aws_service_name", "azMode": "az_mode", "backtrackWindow": "backtrack_window", "backupRetentionPeriod": "backup_retention_period", "backupWindow": "backup_window", "badgeEnabled": "badge_enabled", "badgeUrl": "badge_url", "baseEndpointDnsNames": "base_endpoint_dns_names", "basePath": "base_path", "baselineId": "baseline_id", "batchSize": "batch_size", "batchTarget": "batch_target", "behaviorOnMxFailure": "behavior_on_mx_failure", "berkshelfVersion": "berkshelf_version", "bgpAsn": "bgp_asn", "bgpAuthKey": "bgp_auth_key", "bgpPeerId": "bgp_peer_id", "bgpStatus": "bgp_status", "bidPrice": "bid_price", "billingMode": "billing_mode", "binaryMediaTypes": "binary_media_types", "bisectBatchOnFunctionError": "bisect_batch_on_function_error", "blockDeviceMappings": "block_device_mappings", "blockDurationMinutes": "block_duration_minutes", "blockPublicAcls": "block_public_acls", "blockPublicPolicy": "block_public_policy", "blueGreenDeploymentConfig": "blue_green_deployment_config", "blueprintId": "blueprint_id", "bootstrapActions": "bootstrap_actions", "bootstrapBrokers": "bootstrap_brokers", "bootstrapBrokersTls": "bootstrap_brokers_tls", "bounceActions": "bounce_actions", "branchFilter": "branch_filter", "brokerName": "broker_name", "brokerNodeGroupInfo": "broker_node_group_info", "bucketDomainName": "bucket_domain_name", "bucketName": "bucket_name", "bucketPrefix": "bucket_prefix", "bucketRegionalDomainName": "bucket_regional_domain_name", "budgetType": "budget_type", "buildId": "build_id", "buildTimeout": "build_timeout", "bundleId": "bundle_id", "bundlerVersion": "bundler_version", "byteMatchTuples": "byte_match_tuples", "caCertIdentifier": "ca_cert_identifier", "cacheClusterEnabled": "cache_cluster_enabled", "cacheClusterSize": "cache_cluster_size", "cacheControl": "cache_control", "cacheKeyParameters": "cache_key_parameters", "cacheNamespace": "cache_namespace", "cacheNodes": "cache_nodes", "cachingConfig": "caching_config", "callbackUrls": "callback_urls", "callerReference": "caller_reference", "campaignHook": "campaign_hook", "capacityProviderStrategies": "capacity_provider_strategies", "capacityProviders": "capacity_providers", "capacityReservationSpecification": "capacity_reservation_specification", "catalogId": "catalog_id", "catalogTargets": "catalog_targets", "cdcStartTime": "cdc_start_time", "certificateArn": "certificate_arn", "certificateAuthority": "certificate_authority", "certificateAuthorityArn": "certificate_authority_arn", "certificateAuthorityConfiguration": "certificate_authority_configuration", "certificateBody": "certificate_body", "certificateChain": "certificate_chain", "certificateId": "certificate_id", "certificateName": "certificate_name", "certificatePem": "certificate_pem", "certificatePrivateKey": "certificate_private_key", "certificateSigningRequest": "certificate_signing_request", "certificateUploadDate": "certificate_upload_date", "certificateWallet": "certificate_wallet", "channelId": "channel_id", "chapEnabled": "chap_enabled", "characterSetName": "character_set_name", "childHealthThreshold": "child_health_threshold", "childHealthchecks": "child_healthchecks", "cidrBlock": "cidr_block", "cidrBlocks": "cidr_blocks", "ciphertextBlob": "ciphertext_blob", "classificationType": "classification_type", "clientAffinity": "client_affinity", "clientAuthentication": "client_authentication", "clientCertificateId": "client_certificate_id", "clientCidrBlock": "client_cidr_block", "clientId": "client_id", "clientIdLists": "client_id_lists", "clientLists": "client_lists", "clientSecret": "client_secret", "clientToken": "client_token", "clientVpnEndpointId": "client_vpn_endpoint_id", "cloneUrlHttp": "clone_url_http", "cloneUrlSsh": "clone_url_ssh", "cloudWatchLogsGroupArn": "cloud_watch_logs_group_arn", "cloudWatchLogsRoleArn": "cloud_watch_logs_role_arn", "cloudfrontAccessIdentityPath": "cloudfront_access_identity_path", "cloudfrontDistributionArn": "cloudfront_distribution_arn", "cloudfrontDomainName": "cloudfront_domain_name", "cloudfrontZoneId": "cloudfront_zone_id", "cloudwatchAlarm": "cloudwatch_alarm", "cloudwatchAlarmName": "cloudwatch_alarm_name", "cloudwatchAlarmRegion": "cloudwatch_alarm_region", "cloudwatchDestinations": "cloudwatch_destinations", "cloudwatchLogGroupArn": "cloudwatch_log_group_arn", "cloudwatchLoggingOptions": "cloudwatch_logging_options", "cloudwatchMetric": "cloudwatch_metric", "cloudwatchRoleArn": "cloudwatch_role_arn", "clusterAddress": "cluster_address", "clusterCertificates": "cluster_certificates", "clusterConfig": "cluster_config", "clusterEndpointIdentifier": "cluster_endpoint_identifier", "clusterId": "cluster_id", "clusterIdentifier": "cluster_identifier", "clusterIdentifierPrefix": "cluster_identifier_prefix", "clusterMembers": "cluster_members", "clusterMode": "cluster_mode", "clusterName": "cluster_name", "clusterParameterGroupName": "cluster_parameter_group_name", "clusterPublicKey": "cluster_public_key", "clusterResourceId": "cluster_resource_id", "clusterRevisionNumber": "cluster_revision_number", "clusterSecurityGroups": "cluster_security_groups", "clusterState": "cluster_state", "clusterSubnetGroupName": "cluster_subnet_group_name", "clusterType": "cluster_type", "clusterVersion": "cluster_version", "cnamePrefix": "cname_prefix", "cognitoIdentityProviders": "cognito_identity_providers", "cognitoOptions": "cognito_options", "companyCode": "company_code", "comparisonOperator": "comparison_operator", "compatibleRuntimes": "compatible_runtimes", "completeLock": "complete_lock", "complianceSeverity": "compliance_severity", "computeEnvironmentName": "compute_environment_name", "computeEnvironmentNamePrefix": "compute_environment_name_prefix", "computeEnvironments": "compute_environments", "computePlatform": "compute_platform", "computeResources": "compute_resources", "computerName": "computer_name", "configurationEndpoint": "configuration_endpoint", "configurationEndpointAddress": "configuration_endpoint_address", "configurationId": "configuration_id", "configurationInfo": "configuration_info", "configurationManagerName": "configuration_manager_name", "configurationManagerVersion": "configuration_manager_version", "configurationSetName": "configuration_set_name", "configurationsJson": "configurations_json", "confirmationTimeoutInMinutes": "confirmation_timeout_in_minutes", "connectSettings": "connect_settings", "connectionDraining": "connection_draining", "connectionDrainingTimeout": "connection_draining_timeout", "connectionEvents": "connection_events", "connectionId": "connection_id", "connectionLogOptions": "connection_log_options", "connectionNotificationArn": "connection_notification_arn", "connectionProperties": "connection_properties", "connectionType": "connection_type", "connectionsBandwidth": "connections_bandwidth", "containerDefinitions": "container_definitions", "containerName": "container_name", "containerProperties": "container_properties", "contentBase64": "content_base64", "contentBasedDeduplication": "content_based_deduplication", "contentConfig": "content_config", "contentConfigPermissions": "content_config_permissions", "contentDisposition": "content_disposition", "contentEncoding": "content_encoding", "contentHandling": "content_handling", "contentHandlingStrategy": "content_handling_strategy", "contentLanguage": "content_language", "contentType": "content_type", "cookieExpirationPeriod": "cookie_expiration_period", "cookieName": "cookie_name", "copyTagsToBackups": "copy_tags_to_backups", "copyTagsToSnapshot": "copy_tags_to_snapshot", "coreInstanceCount": "core_instance_count", "coreInstanceGroup": "core_instance_group", "coreInstanceType": "core_instance_type", "corsConfiguration": "cors_configuration", "corsRules": "cors_rules", "costFilters": "cost_filters", "costTypes": "cost_types", "cpuCoreCount": "cpu_core_count", "cpuCount": "cpu_count", "cpuOptions": "cpu_options", "cpuThreadsPerCore": "cpu_threads_per_core", "createDate": "create_date", "createTimestamp": "create_timestamp", "createdAt": "created_at", "createdDate": "created_date", "createdTime": "created_time", "creationDate": "creation_date", "creationTime": "creation_time", "creationToken": "creation_token", "credentialDuration": "credential_duration", "credentialsArn": "credentials_arn", "creditSpecification": "credit_specification", "crossZoneLoadBalancing": "cross_zone_load_balancing", "csvClassifier": "csv_classifier", "currentVersion": "current_version", "customAmiId": "custom_ami_id", "customConfigureRecipes": "custom_configure_recipes", "customCookbooksSources": "custom_cookbooks_sources", "customDeployRecipes": "custom_deploy_recipes", "customEndpointType": "custom_endpoint_type", "customErrorResponses": "custom_error_responses", "customInstanceProfileArn": "custom_instance_profile_arn", "customJson": "custom_json", "customSecurityGroupIds": "custom_security_group_ids", "customSetupRecipes": "custom_setup_recipes", "customShutdownRecipes": "custom_shutdown_recipes", "customSuffix": "custom_suffix", "customUndeployRecipes": "custom_undeploy_recipes", "customerAddress": "customer_address", "customerAwsId": "customer_aws_id", "customerGatewayConfiguration": "customer_gateway_configuration", "customerGatewayId": "customer_gateway_id", "customerMasterKeySpec": "customer_master_key_spec", "customerOwnedIp": "customer_owned_ip", "customerOwnedIpv4Pool": "customer_owned_ipv4_pool", "customerUserName": "customer_user_name", "dailyAutomaticBackupStartTime": "daily_automatic_backup_start_time", "dashboardArn": "dashboard_arn", "dashboardBody": "dashboard_body", "dashboardName": "dashboard_name", "dataEncryptionKeyId": "data_encryption_key_id", "dataRetentionInHours": "data_retention_in_hours", "dataSource": "data_source", "dataSourceArn": "data_source_arn", "dataSourceDatabaseName": "data_source_database_name", "dataSourceType": "data_source_type", "databaseName": "database_name", "datapointsToAlarm": "datapoints_to_alarm", "dbClusterIdentifier": "db_cluster_identifier", "dbClusterParameterGroupName": "db_cluster_parameter_group_name", "dbClusterSnapshotArn": "db_cluster_snapshot_arn", "dbClusterSnapshotIdentifier": "db_cluster_snapshot_identifier", "dbInstanceIdentifier": "db_instance_identifier", "dbParameterGroupName": "db_parameter_group_name", "dbPassword": "db_password", "dbSnapshotArn": "db_snapshot_arn", "dbSnapshotIdentifier": "db_snapshot_identifier", "dbSubnetGroupName": "db_subnet_group_name", "dbUser": "db_user", "dbiResourceId": "dbi_resource_id", "deadLetterConfig": "dead_letter_config", "defaultAction": "default_action", "defaultActions": "default_actions", "defaultArguments": "default_arguments", "defaultAssociationRouteTable": "default_association_route_table", "defaultAuthenticationMethod": "default_authentication_method", "defaultAvailabilityZone": "default_availability_zone", "defaultBranch": "default_branch", "defaultCacheBehavior": "default_cache_behavior", "defaultCapacityProviderStrategies": "default_capacity_provider_strategies", "defaultClientId": "default_client_id", "defaultCooldown": "default_cooldown", "defaultInstanceProfileArn": "default_instance_profile_arn", "defaultNetworkAclId": "default_network_acl_id", "defaultOs": "default_os", "defaultPropagationRouteTable": "default_propagation_route_table", "defaultRedirectUri": "default_redirect_uri", "defaultResult": "default_result", "defaultRootDeviceType": "default_root_device_type", "defaultRootObject": "default_root_object", "defaultRouteSettings": "default_route_settings", "defaultRouteTableAssociation": "default_route_table_association", "defaultRouteTableId": "default_route_table_id", "defaultRouteTablePropagation": "default_route_table_propagation", "defaultRunProperties": "default_run_properties", "defaultSecurityGroupId": "default_security_group_id", "defaultSenderId": "default_sender_id", "defaultSmsType": "default_sms_type", "defaultSshKeyName": "default_ssh_key_name", "defaultStorageClass": "default_storage_class", "defaultSubnetId": "default_subnet_id", "defaultValue": "default_value", "defaultVersion": "default_version", "defaultVersionId": "default_version_id", "delaySeconds": "delay_seconds", "delegationSetId": "delegation_set_id", "deleteAutomatedBackups": "delete_automated_backups", "deleteEbs": "delete_ebs", "deleteEip": "delete_eip", "deletionProtection": "deletion_protection", "deletionWindowInDays": "deletion_window_in_days", "deliveryPolicy": "delivery_policy", "deliveryStatusIamRoleArn": "delivery_status_iam_role_arn", "deliveryStatusSuccessSamplingRate": "delivery_status_success_sampling_rate", "deploymentConfigId": "deployment_config_id", "deploymentConfigName": "deployment_config_name", "deploymentController": "deployment_controller", "deploymentGroupName": "deployment_group_name", "deploymentId": "deployment_id", "deploymentMaximumPercent": "deployment_maximum_percent", "deploymentMinimumHealthyPercent": "deployment_minimum_healthy_percent", "deploymentMode": "deployment_mode", "deploymentStyle": "deployment_style", "deregistrationDelay": "deregistration_delay", "desiredCapacity": "desired_capacity", "desiredCount": "desired_count", "destinationArn": "destination_arn", "destinationCidrBlock": "destination_cidr_block", "destinationConfig": "destination_config", "destinationId": "destination_id", "destinationIpv6CidrBlock": "destination_ipv6_cidr_block", "destinationLocationArn": "destination_location_arn", "destinationName": "destination_name", "destinationPortRange": "destination_port_range", "destinationPrefixListId": "destination_prefix_list_id", "destinationStreamArn": "destination_stream_arn", "detailType": "detail_type", "detectorId": "detector_id", "developerProviderName": "developer_provider_name", "deviceCaCertificate": "device_ca_certificate", "deviceConfiguration": "device_configuration", "deviceIndex": "device_index", "deviceName": "device_name", "dhcpOptionsId": "dhcp_options_id", "directInternetAccess": "direct_internet_access", "directoryId": "directory_id", "directoryName": "directory_name", "directoryType": "directory_type", "disableApiTermination": "disable_api_termination", "disableEmailNotification": "disable_email_notification", "disableRollback": "disable_rollback", "diskId": "disk_id", "diskSize": "disk_size", "displayName": "display_name", "dkimTokens": "dkim_tokens", "dnsConfig": "dns_config", "dnsEntries": "dns_entries", "dnsIpAddresses": "dns_ip_addresses", "dnsIps": "dns_ips", "dnsName": "dns_name", "dnsServers": "dns_servers", "dnsSupport": "dns_support", "documentFormat": "document_format", "documentRoot": "document_root", "documentType": "document_type", "documentVersion": "document_version", "documentationVersion": "documentation_version", "domainEndpointOptions": "domain_endpoint_options", "domainIamRoleName": "domain_iam_role_name", "domainId": "domain_id", "domainName": "domain_name", "domainNameConfiguration": "domain_name_configuration", "domainNameServers": "domain_name_servers", "domainValidationOptions": "domain_validation_options", "drainElbOnShutdown": "drain_elb_on_shutdown", "dropInvalidHeaderFields": "drop_invalid_header_fields", "dxGatewayAssociationId": "dx_gateway_association_id", "dxGatewayId": "dx_gateway_id", "dxGatewayOwnerAccountId": "dx_gateway_owner_account_id", "dynamodbConfig": "dynamodb_config", "dynamodbTargets": "dynamodb_targets", "ebsBlockDevices": "ebs_block_devices", "ebsConfigs": "ebs_configs", "ebsOptimized": "ebs_optimized", "ebsOptions": "ebs_options", "ebsRootVolumeSize": "ebs_root_volume_size", "ebsVolumes": "ebs_volumes", "ec2Attributes": "ec2_attributes", "ec2Config": "ec2_config", "ec2InboundPermissions": "ec2_inbound_permissions", "ec2InstanceId": "ec2_instance_id", "ec2InstanceType": "ec2_instance_type", "ec2TagFilters": "ec2_tag_filters", "ec2TagSets": "ec2_tag_sets", "ecsClusterArn": "ecs_cluster_arn", "ecsService": "ecs_service", "ecsTarget": "ecs_target", "efsFileSystemArn": "efs_file_system_arn", "egressOnlyGatewayId": "egress_only_gateway_id", "elasticGpuSpecifications": "elastic_gpu_specifications", "elasticInferenceAccelerator": "elastic_inference_accelerator", "elasticIp": "elastic_ip", "elasticLoadBalancer": "elastic_load_balancer", "elasticsearchConfig": "elasticsearch_config", "elasticsearchConfiguration": "elasticsearch_configuration", "elasticsearchSettings": "elasticsearch_settings", "elasticsearchVersion": "elasticsearch_version", "emailConfiguration": "email_configuration", "emailVerificationMessage": "email_verification_message", "emailVerificationSubject": "email_verification_subject", "enaSupport": "ena_support", "enableClassiclink": "enable_classiclink", "enableClassiclinkDnsSupport": "enable_classiclink_dns_support", "enableCloudwatchLogsExports": "enable_cloudwatch_logs_exports", "enableCrossZoneLoadBalancing": "enable_cross_zone_load_balancing", "enableDeletionProtection": "enable_deletion_protection", "enableDnsHostnames": "enable_dns_hostnames", "enableDnsSupport": "enable_dns_support", "enableEcsManagedTags": "enable_ecs_managed_tags", "enableHttp2": "enable_http2", "enableHttpEndpoint": "enable_http_endpoint", "enableKeyRotation": "enable_key_rotation", "enableLogFileValidation": "enable_log_file_validation", "enableLogging": "enable_logging", "enableMonitoring": "enable_monitoring", "enableNetworkIsolation": "enable_network_isolation", "enableSni": "enable_sni", "enableSsl": "enable_ssl", "enableSso": "enable_sso", "enabledCloudwatchLogsExports": "enabled_cloudwatch_logs_exports", "enabledClusterLogTypes": "enabled_cluster_log_types", "enabledMetrics": "enabled_metrics", "enabledPolicyTypes": "enabled_policy_types", "encodedKey": "encoded_key", "encryptAtRest": "encrypt_at_rest", "encryptedFingerprint": "encrypted_fingerprint", "encryptedPassword": "encrypted_password", "encryptedPrivateKey": "encrypted_private_key", "encryptedSecret": "encrypted_secret", "encryptionConfig": "encryption_config", "encryptionConfiguration": "encryption_configuration", "encryptionInfo": "encryption_info", "encryptionKey": "encryption_key", "encryptionOptions": "encryption_options", "encryptionType": "encryption_type", "endDate": "end_date", "endDateType": "end_date_type", "endTime": "end_time", "endpointArn": "endpoint_arn", "endpointAutoConfirms": "endpoint_auto_confirms", "endpointConfigName": "endpoint_config_name", "endpointConfiguration": "endpoint_configuration", "endpointConfigurations": "endpoint_configurations", "endpointDetails": "endpoint_details", "endpointGroupRegion": "endpoint_group_region", "endpointId": "endpoint_id", "endpointType": "endpoint_type", "endpointUrl": "endpoint_url", "enforceConsumerDeletion": "enforce_consumer_deletion", "engineMode": "engine_mode", "engineName": "engine_name", "engineType": "engine_type", "engineVersion": "engine_version", "enhancedMonitoring": "enhanced_monitoring", "enhancedVpcRouting": "enhanced_vpc_routing", "eniId": "eni_id", "environmentId": "environment_id", "ephemeralBlockDevices": "ephemeral_block_devices", "ephemeralStorage": "ephemeral_storage", "estimatedInstanceWarmup": "estimated_instance_warmup", "evaluateLowSampleCountPercentiles": "evaluate_low_sample_count_percentiles", "evaluationPeriods": "evaluation_periods", "eventCategories": "event_categories", "eventDeliveryFailureTopicArn": "event_delivery_failure_topic_arn", "eventEndpointCreatedTopicArn": "event_endpoint_created_topic_arn", "eventEndpointDeletedTopicArn": "event_endpoint_deleted_topic_arn", "eventEndpointUpdatedTopicArn": "event_endpoint_updated_topic_arn", "eventPattern": "event_pattern", "eventSelectors": "event_selectors", "eventSourceArn": "event_source_arn", "eventSourceToken": "event_source_token", "eventTypeIds": "event_type_ids", "excessCapacityTerminationPolicy": "excess_capacity_termination_policy", "excludedAccounts": "excluded_accounts", "excludedMembers": "excluded_members", "executionArn": "execution_arn", "executionProperty": "execution_property", "executionRoleArn": "execution_role_arn", "executionRoleName": "execution_role_name", "expirationDate": "expiration_date", "expirationModel": "expiration_model", "expirePasswords": "expire_passwords", "explicitAuthFlows": "explicit_auth_flows", "exportPath": "export_path", "extendedS3Configuration": "extended_s3_configuration", "extendedStatistic": "extended_statistic", "extraConnectionAttributes": "extra_connection_attributes", "failoverRoutingPolicies": "failover_routing_policies", "failureFeedbackRoleArn": "failure_feedback_role_arn", "failureThreshold": "failure_threshold", "fargateProfileName": "fargate_profile_name", "featureName": "feature_name", "featureSet": "feature_set", "fifoQueue": "fifo_queue", "fileSystemArn": "file_system_arn", "fileSystemConfig": "file_system_config", "fileSystemId": "file_system_id", "fileshareId": "fileshare_id", "filterGroups": "filter_groups", "filterPattern": "filter_pattern", "filterPolicy": "filter_policy", "finalSnapshotIdentifier": "final_snapshot_identifier", "findingPublishingFrequency": "finding_publishing_frequency", "fixedRate": "fixed_rate", "fleetArn": "fleet_arn", "fleetType": "fleet_type", "forceDelete": "force_delete", "forceDestroy": "force_destroy", "forceDetach": "force_detach", "forceDetachPolicies": "force_detach_policies", "forceNewDeployment": "force_new_deployment", "forceUpdateVersion": "force_update_version", "fromAddress": "from_address", "fromPort": "from_port", "functionArn": "function_arn", "functionId": "function_id", "functionName": "function_name", "functionVersion": "function_version", "gatewayArn": "gateway_arn", "gatewayId": "gateway_id", "gatewayIpAddress": "gateway_ip_address", "gatewayName": "gateway_name", "gatewayTimezone": "gateway_timezone", "gatewayType": "gateway_type", "gatewayVpcEndpoint": "gateway_vpc_endpoint", "generateSecret": "generate_secret", "geoMatchConstraints": "geo_match_constraints", "geolocationRoutingPolicies": "geolocation_routing_policies", "getPasswordData": "get_password_data", "globalClusterIdentifier": "global_cluster_identifier", "globalClusterResourceId": "global_cluster_resource_id", "globalFilters": "global_filters", "globalSecondaryIndexes": "global_secondary_indexes", "glueVersion": "glue_version", "grantCreationTokens": "grant_creation_tokens", "grantId": "grant_id", "grantToken": "grant_token", "granteePrincipal": "grantee_principal", "grokClassifier": "grok_classifier", "groupName": "group_name", "groupNames": "group_names", "guessMimeTypeEnabled": "guess_mime_type_enabled", "hardExpiry": "hard_expiry", "hasLogicalRedundancy": "has_logical_redundancy", "hasPublicAccessPolicy": "has_public_access_policy", "hashKey": "hash_key", "hashType": "hash_type", "healthCheck": "health_check", "healthCheckConfig": "health_check_config", "healthCheckCustomConfig": "health_check_custom_config", "healthCheckGracePeriod": "health_check_grace_period", "healthCheckGracePeriodSeconds": "health_check_grace_period_seconds", "healthCheckId": "health_check_id", "healthCheckIntervalSeconds": "health_check_interval_seconds", "healthCheckPath": "health_check_path", "healthCheckPort": "health_check_port", "healthCheckProtocol": "health_check_protocol", "healthCheckType": "health_check_type", "healthcheckMethod": "healthcheck_method", "healthcheckUrl": "healthcheck_url", "heartbeatTimeout": "heartbeat_timeout", "hibernationOptions": "hibernation_options", "hlsIngests": "hls_ingests", "homeDirectory": "home_directory", "homeRegion": "home_region", "hostId": "host_id", "hostInstanceType": "host_instance_type", "hostKey": "host_key", "hostKeyFingerprint": "host_key_fingerprint", "hostVpcId": "host_vpc_id", "hostedZone": "hosted_zone", "hostedZoneId": "hosted_zone_id", "hostnameTheme": "hostname_theme", "hsmEniId": "hsm_eni_id", "hsmId": "hsm_id", "hsmState": "hsm_state", "hsmType": "hsm_type", "httpConfig": "http_config", "httpFailureFeedbackRoleArn": "http_failure_feedback_role_arn", "httpMethod": "http_method", "httpSuccessFeedbackRoleArn": "http_success_feedback_role_arn", "httpSuccessFeedbackSampleRate": "http_success_feedback_sample_rate", "httpVersion": "http_version", "iamArn": "iam_arn", "iamDatabaseAuthenticationEnabled": "iam_database_authentication_enabled", "iamFleetRole": "iam_fleet_role", "iamInstanceProfile": "iam_instance_profile", "iamRole": "iam_role", "iamRoleArn": "iam_role_arn", "iamRoleId": "iam_role_id", "iamRoles": "iam_roles", "iamUserAccessToBilling": "iam_user_access_to_billing", "icmpCode": "icmp_code", "icmpType": "icmp_type", "identifierPrefix": "identifier_prefix", "identityPoolId": "identity_pool_id", "identityPoolName": "identity_pool_name", "identityProvider": "identity_provider", "identityProviderType": "identity_provider_type", "identitySource": "identity_source", "identitySources": "identity_sources", "identityType": "identity_type", "identityValidationExpression": "identity_validation_expression", "idleTimeout": "idle_timeout", "idpIdentifiers": "idp_identifiers", "ignoreDeletionError": "ignore_deletion_error", "ignorePublicAcls": "ignore_public_acls", "imageId": "image_id", "imageLocation": "image_location", "imageScanningConfiguration": "image_scanning_configuration", "imageTagMutability": "image_tag_mutability", "importPath": "import_path", "importedFileChunkSize": "imported_file_chunk_size", "inProgressValidationBatches": "in_progress_validation_batches", "includeGlobalServiceEvents": "include_global_service_events", "includeOriginalHeaders": "include_original_headers", "includedObjectVersions": "included_object_versions", "inferenceAccelerators": "inference_accelerators", "infrastructureClass": "infrastructure_class", "initialLifecycleHooks": "initial_lifecycle_hooks", "inputBucket": "input_bucket", "inputParameters": "input_parameters", "inputPath": "input_path", "inputTransformer": "input_transformer", "installUpdatesOnBoot": "install_updates_on_boot", "instanceClass": "instance_class", "instanceCount": "instance_count", "instanceGroups": "instance_groups", "instanceId": "instance_id", "instanceInitiatedShutdownBehavior": "instance_initiated_shutdown_behavior", "instanceInterruptionBehaviour": "instance_interruption_behaviour", "instanceMarketOptions": "instance_market_options", "instanceMatchCriteria": "instance_match_criteria", "instanceName": "instance_name", "instanceOwnerId": "instance_owner_id", "instancePlatform": "instance_platform", "instancePoolsToUseCount": "instance_pools_to_use_count", "instancePort": "instance_port", "instancePorts": "instance_ports", "instanceProfileArn": "instance_profile_arn", "instanceRoleArn": "instance_role_arn", "instanceShutdownTimeout": "instance_shutdown_timeout", "instanceState": "instance_state", "instanceTenancy": "instance_tenancy", "instanceType": "instance_type", "instanceTypes": "instance_types", "insufficientDataActions": "insufficient_data_actions", "insufficientDataHealthStatus": "insufficient_data_health_status", "integrationHttpMethod": "integration_http_method", "integrationId": "integration_id", "integrationMethod": "integration_method", "integrationResponseKey": "integration_response_key", "integrationResponseSelectionExpression": "integration_response_selection_expression", "integrationType": "integration_type", "integrationUri": "integration_uri", "invalidUserLists": "invalid_user_lists", "invertHealthcheck": "invert_healthcheck", "invitationArn": "invitation_arn", "invitationMessage": "invitation_message", "invocationRole": "invocation_role", "invokeArn": "invoke_arn", "invokeUrl": "invoke_url", "iotAnalytics": "iot_analytics", "iotEvents": "iot_events", "ipAddress": "ip_address", "ipAddressType": "ip_address_type", "ipAddressVersion": "ip_address_version", "ipAddresses": "ip_addresses", "ipGroupIds": "ip_group_ids", "ipSetDescriptors": "ip_set_descriptors", "ipSets": "ip_sets", "ipcMode": "ipc_mode", "ipv6Address": "ipv6_address", "ipv6AddressCount": "ipv6_address_count", "ipv6Addresses": "ipv6_addresses", "ipv6AssociationId": "ipv6_association_id", "ipv6CidrBlock": "ipv6_cidr_block", "ipv6CidrBlockAssociationId": "ipv6_cidr_block_association_id", "ipv6CidrBlocks": "ipv6_cidr_blocks", "ipv6Support": "ipv6_support", "isEnabled": "is_enabled", "isIpv6Enabled": "is_ipv6_enabled", "isMultiRegionTrail": "is_multi_region_trail", "isOrganizationTrail": "is_organization_trail", "isStaticIp": "is_static_ip", "jdbcTargets": "jdbc_targets", "joinedMethod": "joined_method", "joinedTimestamp": "joined_timestamp", "jsonClassifier": "json_classifier", "jumboFrameCapable": "jumbo_frame_capable", "jvmOptions": "jvm_options", "jvmType": "jvm_type", "jvmVersion": "jvm_version", "jwtConfiguration": "jwt_configuration", "kafkaSettings": "kafka_settings", "kafkaVersion": "kafka_version", "kafkaVersions": "kafka_versions", "keepJobFlowAliveWhenNoSteps": "keep_job_flow_alive_when_no_steps", "kerberosAttributes": "kerberos_attributes", "kernelId": "kernel_id", "keyArn": "key_arn", "keyFingerprint": "key_fingerprint", "keyId": "key_id", "keyMaterialBase64": "key_material_base64", "keyName": "key_name", "keyNamePrefix": "key_name_prefix", "keyPairId": "key_pair_id", "keyPairName": "key_pair_name", "keyState": "key_state", "keyType": "key_type", "keyUsage": "key_usage", "kibanaEndpoint": "kibana_endpoint", "kinesisDestination": "kinesis_destination", "kinesisSettings": "kinesis_settings", "kinesisSourceConfiguration": "kinesis_source_configuration", "kinesisTarget": "kinesis_target", "kmsDataKeyReusePeriodSeconds": "kms_data_key_reuse_period_seconds", "kmsEncrypted": "kms_encrypted", "kmsKeyArn": "kms_key_arn", "kmsKeyId": "kms_key_id", "kmsMasterKeyId": "kms_master_key_id", "lagId": "lag_id", "lambda": "lambda_", "lambdaActions": "lambda_actions", "lambdaConfig": "lambda_config", "lambdaFailureFeedbackRoleArn": "lambda_failure_feedback_role_arn", "lambdaFunctionArn": "lambda_function_arn", "lambdaFunctions": "lambda_functions", "lambdaMultiValueHeadersEnabled": "lambda_multi_value_headers_enabled", "lambdaSuccessFeedbackRoleArn": "lambda_success_feedback_role_arn", "lambdaSuccessFeedbackSampleRate": "lambda_success_feedback_sample_rate", "lastModified": "last_modified", "lastModifiedDate": "last_modified_date", "lastModifiedTime": "last_modified_time", "lastProcessingResult": "last_processing_result", "lastServiceErrorId": "last_service_error_id", "lastUpdateTimestamp": "last_update_timestamp", "lastUpdatedDate": "last_updated_date", "lastUpdatedTime": "last_updated_time", "latencyRoutingPolicies": "latency_routing_policies", "latestRevision": "latest_revision", "latestVersion": "latest_version", "launchConfiguration": "launch_configuration", "launchConfigurations": "launch_configurations", "launchGroup": "launch_group", "launchSpecifications": "launch_specifications", "launchTemplate": "launch_template", "launchTemplateConfig": "launch_template_config", "launchTemplateConfigs": "launch_template_configs", "launchType": "launch_type", "layerArn": "layer_arn", "layerIds": "layer_ids", "layerName": "layer_name", "lbPort": "lb_port", "licenseConfigurationArn": "license_configuration_arn", "licenseCount": "license_count", "licenseCountHardLimit": "license_count_hard_limit", "licenseCountingType": "license_counting_type", "licenseInfo": "license_info", "licenseModel": "license_model", "licenseRules": "license_rules", "licenseSpecifications": "license_specifications", "lifecycleConfigName": "lifecycle_config_name", "lifecyclePolicy": "lifecycle_policy", "lifecycleRules": "lifecycle_rules", "lifecycleTransition": "lifecycle_transition", "limitAmount": "limit_amount", "limitUnit": "limit_unit", "listenerArn": "listener_arn", "loadBalancer": "load_balancer", "loadBalancerArn": "load_balancer_arn", "loadBalancerInfo": "load_balancer_info", "loadBalancerName": "load_balancer_name", "loadBalancerPort": "load_balancer_port", "loadBalancerType": "load_balancer_type", "loadBalancers": "load_balancers", "loadBalancingAlgorithmType": "load_balancing_algorithm_type", "localGatewayId": "local_gateway_id", "localGatewayRouteTableId": "local_gateway_route_table_id", "localGatewayVirtualInterfaceGroupId": "local_gateway_virtual_interface_group_id", "localSecondaryIndexes": "local_secondary_indexes", "locationArn": "location_arn", "locationUri": "location_uri", "lockToken": "lock_token", "logConfig": "log_config", "logDestination": "log_destination", "logDestinationType": "log_destination_type", "logFormat": "log_format", "logGroup": "log_group", "logGroupName": "log_group_name", "logPaths": "log_paths", "logPublishingOptions": "log_publishing_options", "logUri": "log_uri", "loggingConfig": "logging_config", "loggingConfiguration": "logging_configuration", "loggingInfo": "logging_info", "loggingRole": "logging_role", "logoutUrls": "logout_urls", "logsConfig": "logs_config", "lunNumber": "lun_number", "macAddress": "mac_address", "mailFromDomain": "mail_from_domain", "mainRouteTableId": "main_route_table_id", "maintenanceWindow": "maintenance_window", "maintenanceWindowStartTime": "maintenance_window_start_time", "majorEngineVersion": "major_engine_version", "manageBerkshelf": "manage_berkshelf", "manageBundler": "manage_bundler", "manageEbsSnapshots": "manage_ebs_snapshots", "managesVpcEndpoints": "manages_vpc_endpoints", "mapPublicIpOnLaunch": "map_public_ip_on_launch", "masterAccountArn": "master_account_arn", "masterAccountEmail": "master_account_email", "masterAccountId": "master_account_id", "masterId": "master_id", "masterInstanceGroup": "master_instance_group", "masterInstanceType": "master_instance_type", "masterPassword": "master_password", "masterPublicDns": "master_public_dns", "masterUsername": "master_username", "matchCriterias": "match_criterias", "matchingTypes": "matching_types", "maxAggregationInterval": "max_aggregation_interval", "maxAllocatedStorage": "max_allocated_storage", "maxCapacity": "max_capacity", "maxConcurrency": "max_concurrency", "maxErrors": "max_errors", "maxInstanceLifetime": "max_instance_lifetime", "maxMessageSize": "max_message_size", "maxPasswordAge": "max_password_age", "maxRetries": "max_retries", "maxSessionDuration": "max_session_duration", "maxSize": "max_size", "maximumBatchingWindowInSeconds": "maximum_batching_window_in_seconds", "maximumEventAgeInSeconds": "maximum_event_age_in_seconds", "maximumExecutionFrequency": "maximum_execution_frequency", "maximumRecordAgeInSeconds": "maximum_record_age_in_seconds", "maximumRetryAttempts": "maximum_retry_attempts", "measureLatency": "measure_latency", "mediaType": "media_type", "mediumChangerType": "medium_changer_type", "memberAccountId": "member_account_id", "memberClusters": "member_clusters", "memberStatus": "member_status", "memorySize": "memory_size", "meshName": "mesh_name", "messageRetentionSeconds": "message_retention_seconds", "messagesPerSecond": "messages_per_second", "metadataOptions": "metadata_options", "methodPath": "method_path", "metricAggregationType": "metric_aggregation_type", "metricGroups": "metric_groups", "metricName": "metric_name", "metricQueries": "metric_queries", "metricTransformation": "metric_transformation", "metricsGranularity": "metrics_granularity", "mfaConfiguration": "mfa_configuration", "migrationType": "migration_type", "minAdjustmentMagnitude": "min_adjustment_magnitude", "minCapacity": "min_capacity", "minElbCapacity": "min_elb_capacity", "minSize": "min_size", "minimumCompressionSize": "minimum_compression_size", "minimumHealthyHosts": "minimum_healthy_hosts", "minimumPasswordLength": "minimum_password_length", "mixedInstancesPolicy": "mixed_instances_policy", "modelSelectionExpression": "model_selection_expression", "mongodbSettings": "mongodb_settings", "monitoringInterval": "monitoring_interval", "monitoringRoleArn": "monitoring_role_arn", "monthlySpendLimit": "monthly_spend_limit", "mountOptions": "mount_options", "mountTargetDnsName": "mount_target_dns_name", "multiAttachEnabled": "multi_attach_enabled", "multiAz": "multi_az", "multivalueAnswerRoutingPolicy": "multivalue_answer_routing_policy", "namePrefix": "name_prefix", "nameServers": "name_servers", "namespaceId": "namespace_id", "natGatewayId": "nat_gateway_id", "neptuneClusterParameterGroupName": "neptune_cluster_parameter_group_name", "neptuneParameterGroupName": "neptune_parameter_group_name", "neptuneSubnetGroupName": "neptune_subnet_group_name", "netbiosNameServers": "netbios_name_servers", "netbiosNodeType": "netbios_node_type", "networkAclId": "network_acl_id", "networkConfiguration": "network_configuration", "networkInterface": "network_interface", "networkInterfaceId": "network_interface_id", "networkInterfaceIds": "network_interface_ids", "networkInterfacePort": "network_interface_port", "networkInterfaces": "network_interfaces", "networkLoadBalancerArn": "network_load_balancer_arn", "networkLoadBalancerArns": "network_load_balancer_arns", "networkMode": "network_mode", "networkOrigin": "network_origin", "networkServices": "network_services", "newGameSessionProtectionPolicy": "new_game_session_protection_policy", "nfsFileShareDefaults": "nfs_file_share_defaults", "nodeGroupName": "node_group_name", "nodeRoleArn": "node_role_arn", "nodeToNodeEncryption": "node_to_node_encryption", "nodeType": "node_type", "nodejsVersion": "nodejs_version", "nonMasterAccounts": "non_master_accounts", "notAfter": "not_after", "notBefore": "not_before", "notificationArns": "notification_arns", "notificationMetadata": "notification_metadata", "notificationProperty": "notification_property", "notificationTargetArn": "notification_target_arn", "notificationTopicArn": "notification_topic_arn", "notificationType": "notification_type", "ntpServers": "ntp_servers", "numCacheNodes": "num_cache_nodes", "numberCacheClusters": "number_cache_clusters", "numberOfBrokerNodes": "number_of_broker_nodes", "numberOfNodes": "number_of_nodes", "numberOfWorkers": "number_of_workers", "objectAcl": "object_acl", "objectLockConfiguration": "object_lock_configuration", "objectLockLegalHoldStatus": "object_lock_legal_hold_status", "objectLockMode": "object_lock_mode", "objectLockRetainUntilDate": "object_lock_retain_until_date", "okActions": "ok_actions", "onCreate": "on_create", "onDemandOptions": "on_demand_options", "onFailure": "on_failure", "onPremConfig": "on_prem_config", "onPremisesInstanceTagFilters": "on_premises_instance_tag_filters", "onStart": "on_start", "openMonitoring": "open_monitoring", "openidConnectConfig": "openid_connect_config", "openidConnectProviderArns": "openid_connect_provider_arns", "operatingSystem": "operating_system", "operationName": "operation_name", "optInStatus": "opt_in_status", "optimizeForEndUserLocation": "optimize_for_end_user_location", "optionGroupDescription": "option_group_description", "optionGroupName": "option_group_name", "optionalFields": "optional_fields", "orderedCacheBehaviors": "ordered_cache_behaviors", "orderedPlacementStrategies": "ordered_placement_strategies", "organizationAggregationSource": "organization_aggregation_source", "originGroups": "origin_groups", "originalRouteTableId": "original_route_table_id", "outpostArn": "outpost_arn", "outputBucket": "output_bucket", "outputLocation": "output_location", "ownerAccount": "owner_account", "ownerAccountId": "owner_account_id", "ownerAlias": "owner_alias", "ownerArn": "owner_arn", "ownerId": "owner_id", "ownerInformation": "owner_information", "packetLength": "packet_length", "parallelizationFactor": "parallelization_factor", "parameterGroupName": "parameter_group_name", "parameterOverrides": "parameter_overrides", "parentId": "parent_id", "partitionKeys": "partition_keys", "passengerVersion": "passenger_version", "passthroughBehavior": "passthrough_behavior", "passwordData": "password_data", "passwordLength": "password_length", "passwordPolicy": "password_policy", "passwordResetRequired": "password_reset_required", "passwordReusePrevention": "password_reuse_prevention", "patchGroup": "patch_group", "pathPart": "path_part", "payloadFormatVersion": "payload_format_version", "payloadUrl": "payload_url", "peerAccountId": "peer_account_id", "peerOwnerId": "peer_owner_id", "peerRegion": "peer_region", "peerTransitGatewayId": "peer_transit_gateway_id", "peerVpcId": "peer_vpc_id", "pemEncodedCertificate": "pem_encoded_certificate", "performanceInsightsEnabled": "performance_insights_enabled", "performanceInsightsKmsKeyId": "performance_insights_kms_key_id", "performanceInsightsRetentionPeriod": "performance_insights_retention_period", "performanceMode": "performance_mode", "permanentDeletionTimeInDays": "permanent_deletion_time_in_days", "permissionsBoundary": "permissions_boundary", "pgpKey": "pgp_key", "physicalConnectionRequirements": "physical_connection_requirements", "pidMode": "pid_mode", "pipelineConfig": "pipeline_config", "placementConstraints": "placement_constraints", "placementGroup": "placement_group", "placementGroupId": "placement_group_id", "placementTenancy": "placement_tenancy", "planId": "plan_id", "platformArn": "platform_arn", "platformCredential": "platform_credential", "platformPrincipal": "platform_principal", "platformTypes": "platform_types", "platformVersion": "platform_version", "playerLatencyPolicies": "player_latency_policies", "podExecutionRoleArn": "pod_execution_role_arn", "pointInTimeRecovery": "point_in_time_recovery", "policyArn": "policy_arn", "policyAttributes": "policy_attributes", "policyBody": "policy_body", "policyDetails": "policy_details", "policyDocument": "policy_document", "policyId": "policy_id", "policyName": "policy_name", "policyNames": "policy_names", "policyType": "policy_type", "policyTypeName": "policy_type_name", "policyUrl": "policy_url", "pollInterval": "poll_interval", "portRanges": "port_ranges", "posixUser": "posix_user", "preferredAvailabilityZones": "preferred_availability_zones", "preferredBackupWindow": "preferred_backup_window", "preferredMaintenanceWindow": "preferred_maintenance_window", "prefixListId": "prefix_list_id", "prefixListIds": "prefix_list_ids", "preventUserExistenceErrors": "prevent_user_existence_errors", "priceClass": "price_class", "pricingPlan": "pricing_plan", "primaryContainer": "primary_container", "primaryEndpointAddress": "primary_endpoint_address", "primaryNetworkInterfaceId": "primary_network_interface_id", "principalArn": "principal_arn", "privateDns": "private_dns", "privateDnsEnabled": "private_dns_enabled", "privateDnsName": "private_dns_name", "privateIp": "private_ip", "privateIpAddress": "private_ip_address", "privateIps": "private_ips", "privateIpsCount": "private_ips_count", "privateKey": "private_key", "productArn": "product_arn", "productCode": "product_code", "productionVariants": "production_variants", "projectName": "project_name", "promotionTier": "promotion_tier", "promotionalMessagesPerSecond": "promotional_messages_per_second", "propagateTags": "propagate_tags", "propagatingVgws": "propagating_vgws", "propagationDefaultRouteTableId": "propagation_default_route_table_id", "proposalId": "proposal_id", "protectFromScaleIn": "protect_from_scale_in", "protocolType": "protocol_type", "providerArns": "provider_arns", "providerDetails": "provider_details", "providerName": "provider_name", "providerType": "provider_type", "provisionedConcurrentExecutions": "provisioned_concurrent_executions", "provisionedThroughputInMibps": "provisioned_throughput_in_mibps", "proxyConfiguration": "proxy_configuration", "proxyProtocolV2": "proxy_protocol_v2", "publicAccessBlockConfiguration": "public_access_block_configuration", "publicDns": "public_dns", "publicIp": "public_ip", "publicIpAddress": "public_ip_address", "publicIpv4Pool": "public_ipv4_pool", "publicKey": "public_key", "publiclyAccessible": "publicly_accessible", "qualifiedArn": "qualified_arn", "queueUrl": "queue_url", "queuedTimeout": "queued_timeout", "quietTime": "quiet_time", "quotaCode": "quota_code", "quotaName": "quota_name", "quotaSettings": "quota_settings", "railsEnv": "rails_env", "ramDiskId": "ram_disk_id", "ramSize": "ram_size", "ramdiskId": "ramdisk_id", "rangeKey": "range_key", "rateKey": "rate_key", "rateLimit": "rate_limit", "rawMessageDelivery": "raw_message_delivery", "rdsDbInstanceArn": "rds_db_instance_arn", "readAttributes": "read_attributes", "readCapacity": "read_capacity", "readOnly": "read_only", "readerEndpoint": "reader_endpoint", "receiveWaitTimeSeconds": "receive_wait_time_seconds", "receiverAccountId": "receiver_account_id", "recordingGroup": "recording_group", "recoveryPoints": "recovery_points", "recoveryWindowInDays": "recovery_window_in_days", "redrivePolicy": "redrive_policy", "redshiftConfiguration": "redshift_configuration", "referenceDataSources": "reference_data_sources", "referenceName": "reference_name", "refreshTokenValidity": "refresh_token_validity", "regexMatchTuples": "regex_match_tuples", "regexPatternStrings": "regex_pattern_strings", "regionalCertificateArn": "regional_certificate_arn", "regionalCertificateName": "regional_certificate_name", "regionalDomainName": "regional_domain_name", "regionalZoneId": "regional_zone_id", "registeredBy": "registered_by", "registrationCode": "registration_code", "registrationCount": "registration_count", "registrationLimit": "registration_limit", "registryId": "registry_id", "regularExpressions": "regular_expressions", "rejectedPatches": "rejected_patches", "relationshipStatus": "relationship_status", "releaseLabel": "release_label", "releaseVersion": "release_version", "remoteAccess": "remote_access", "remoteDomainName": "remote_domain_name", "replaceUnhealthyInstances": "replace_unhealthy_instances", "replicateSourceDb": "replicate_source_db", "replicationConfiguration": "replication_configuration", "replicationFactor": "replication_factor", "replicationGroupDescription": "replication_group_description", "replicationGroupId": "replication_group_id", "replicationInstanceArn": "replication_instance_arn", "replicationInstanceClass": "replication_instance_class", "replicationInstanceId": "replication_instance_id", "replicationInstancePrivateIps": "replication_instance_private_ips", "replicationInstancePublicIps": "replication_instance_public_ips", "replicationSourceIdentifier": "replication_source_identifier", "replicationSubnetGroupArn": "replication_subnet_group_arn", "replicationSubnetGroupDescription": "replication_subnet_group_description", "replicationSubnetGroupId": "replication_subnet_group_id", "replicationTaskArn": "replication_task_arn", "replicationTaskId": "replication_task_id", "replicationTaskSettings": "replication_task_settings", "reportName": "report_name", "reportedAgentVersion": "reported_agent_version", "reportedOsFamily": "reported_os_family", "reportedOsName": "reported_os_name", "reportedOsVersion": "reported_os_version", "repositoryId": "repository_id", "repositoryName": "repository_name", "repositoryUrl": "repository_url", "requestId": "request_id", "requestInterval": "request_interval", "requestMappingTemplate": "request_mapping_template", "requestModels": "request_models", "requestParameters": "request_parameters", "requestPayer": "request_payer", "requestStatus": "request_status", "requestTemplate": "request_template", "requestTemplates": "request_templates", "requestValidatorId": "request_validator_id", "requesterManaged": "requester_managed", "requesterPays": "requester_pays", "requireLowercaseCharacters": "require_lowercase_characters", "requireNumbers": "require_numbers", "requireSymbols": "require_symbols", "requireUppercaseCharacters": "require_uppercase_characters", "requiresCompatibilities": "requires_compatibilities", "reservationPlanSettings": "reservation_plan_settings", "reservedConcurrentExecutions": "reserved_concurrent_executions", "reservoirSize": "reservoir_size", "resolverEndpointId": "resolver_endpoint_id", "resolverRuleId": "resolver_rule_id", "resourceArn": "resource_arn", "resourceCreationLimitPolicy": "resource_creation_limit_policy", "resourceGroupArn": "resource_group_arn", "resourceId": "resource_id", "resourceIdScope": "resource_id_scope", "resourcePath": "resource_path", "resourceQuery": "resource_query", "resourceShareArn": "resource_share_arn", "resourceType": "resource_type", "resourceTypesScopes": "resource_types_scopes", "responseMappingTemplate": "response_mapping_template", "responseModels": "response_models", "responseParameters": "response_parameters", "responseTemplate": "response_template", "responseTemplates": "response_templates", "responseType": "response_type", "restApi": "rest_api", "restApiId": "rest_api_id", "restrictPublicBuckets": "restrict_public_buckets", "retainOnDelete": "retain_on_delete", "retainStack": "retain_stack", "retentionInDays": "retention_in_days", "retentionPeriod": "retention_period", "retireOnDelete": "retire_on_delete", "retiringPrincipal": "retiring_principal", "retryStrategy": "retry_strategy", "revocationConfiguration": "revocation_configuration", "revokeRulesOnDelete": "revoke_rules_on_delete", "roleArn": "role_arn", "roleMappings": "role_mappings", "roleName": "role_name", "rootBlockDevice": "root_block_device", "rootBlockDevices": "root_block_devices", "rootDeviceName": "root_device_name", "rootDeviceType": "root_device_type", "rootDeviceVolumeId": "root_device_volume_id", "rootDirectory": "root_directory", "rootPassword": "root_password", "rootPasswordOnAllInstances": "root_password_on_all_instances", "rootResourceId": "root_resource_id", "rootSnapshotId": "root_snapshot_id", "rootVolumeEncryptionEnabled": "root_volume_encryption_enabled", "rotationEnabled": "rotation_enabled", "rotationLambdaArn": "rotation_lambda_arn", "rotationRules": "rotation_rules", "routeFilterPrefixes": "route_filter_prefixes", "routeId": "route_id", "routeKey": "route_key", "routeResponseKey": "route_response_key", "routeResponseSelectionExpression": "route_response_selection_expression", "routeSelectionExpression": "route_selection_expression", "routeSettings": "route_settings", "routeTableId": "route_table_id", "routeTableIds": "route_table_ids", "routingConfig": "routing_config", "routingStrategy": "routing_strategy", "rubyVersion": "ruby_version", "rubygemsVersion": "rubygems_version", "ruleAction": "rule_action", "ruleId": "rule_id", "ruleIdentifier": "rule_identifier", "ruleName": "rule_name", "ruleNumber": "rule_number", "ruleSetName": "rule_set_name", "ruleType": "rule_type", "rulesPackageArns": "rules_package_arns", "runCommandTargets": "run_command_targets", "runningInstanceCount": "running_instance_count", "runtimeConfiguration": "runtime_configuration", "s3Actions": "s3_actions", "s3Bucket": "s3_bucket", "s3BucketArn": "s3_bucket_arn", "s3BucketName": "s3_bucket_name", "s3CanonicalUserId": "s3_canonical_user_id", "s3Config": "s3_config", "s3Configuration": "s3_configuration", "s3Destination": "s3_destination", "s3Import": "s3_import", "s3Key": "s3_key", "s3KeyPrefix": "s3_key_prefix", "s3ObjectVersion": "s3_object_version", "s3Prefix": "s3_prefix", "s3Region": "s3_region", "s3Settings": "s3_settings", "s3Targets": "s3_targets", "samlMetadataDocument": "saml_metadata_document", "samlProviderArns": "saml_provider_arns", "scalableDimension": "scalable_dimension", "scalableTargetAction": "scalable_target_action", "scaleDownBehavior": "scale_down_behavior", "scalingAdjustment": "scaling_adjustment", "scalingConfig": "scaling_config", "scalingConfiguration": "scaling_configuration", "scanEnabled": "scan_enabled", "scheduleExpression": "schedule_expression", "scheduleIdentifier": "schedule_identifier", "scheduleTimezone": "schedule_timezone", "scheduledActionName": "scheduled_action_name", "schedulingStrategy": "scheduling_strategy", "schemaChangePolicy": "schema_change_policy", "schemaVersion": "schema_version", "scopeIdentifiers": "scope_identifiers", "searchString": "search_string", "secondaryArtifacts": "secondary_artifacts", "secondarySources": "secondary_sources", "secretBinary": "secret_binary", "secretId": "secret_id", "secretKey": "secret_key", "secretString": "secret_string", "securityConfiguration": "security_configuration", "securityGroupId": "security_group_id", "securityGroupIds": "security_group_ids", "securityGroupNames": "security_group_names", "securityGroups": "security_groups", "securityPolicy": "security_policy", "selectionPattern": "selection_pattern", "selectionTags": "selection_tags", "selfManagedActiveDirectory": "self_managed_active_directory", "selfServicePermissions": "self_service_permissions", "senderAccountId": "sender_account_id", "senderId": "sender_id", "serverCertificateArn": "server_certificate_arn", "serverHostname": "server_hostname", "serverId": "server_id", "serverName": "server_name", "serverProperties": "server_properties", "serverSideEncryption": "server_side_encryption", "serverSideEncryptionConfiguration": "server_side_encryption_configuration", "serverType": "server_type", "serviceAccessRole": "service_access_role", "serviceCode": "service_code", "serviceLinkedRoleArn": "service_linked_role_arn", "serviceName": "service_name", "serviceNamespace": "service_namespace", "serviceRegistries": "service_registries", "serviceRole": "service_role", "serviceRoleArn": "service_role_arn", "serviceType": "service_type", "sesSmtpPassword": "ses_smtp_password", "sesSmtpPasswordV4": "ses_smtp_password_v4", "sessionName": "session_name", "sessionNumber": "session_number", "setIdentifier": "set_identifier", "shardCount": "shard_count", "shardLevelMetrics": "shard_level_metrics", "shareArn": "share_arn", "shareId": "share_id", "shareName": "share_name", "shareStatus": "share_status", "shortCode": "short_code", "shortName": "short_name", "sizeConstraints": "size_constraints", "skipDestroy": "skip_destroy", "skipFinalBackup": "skip_final_backup", "skipFinalSnapshot": "skip_final_snapshot", "slowStart": "slow_start", "smbActiveDirectorySettings": "smb_active_directory_settings", "smbGuestPassword": "smb_guest_password", "smsAuthenticationMessage": "sms_authentication_message", "smsConfiguration": "sms_configuration", "smsVerificationMessage": "sms_verification_message", "snapshotArns": "snapshot_arns", "snapshotClusterIdentifier": "snapshot_cluster_identifier", "snapshotCopy": "snapshot_copy", "snapshotCopyGrantName": "snapshot_copy_grant_name", "snapshotDeliveryProperties": "snapshot_delivery_properties", "snapshotId": "snapshot_id", "snapshotIdentifier": "snapshot_identifier", "snapshotName": "snapshot_name", "snapshotOptions": "snapshot_options", "snapshotRetentionLimit": "snapshot_retention_limit", "snapshotType": "snapshot_type", "snapshotWindow": "snapshot_window", "snapshotWithoutReboot": "snapshot_without_reboot", "snsActions": "sns_actions", "snsDestination": "sns_destination", "snsTopic": "sns_topic", "snsTopicArn": "sns_topic_arn", "snsTopicName": "sns_topic_name", "softwareTokenMfaConfiguration": "software_token_mfa_configuration", "solutionStackName": "solution_stack_name", "sourceAccount": "source_account", "sourceAmiId": "source_ami_id", "sourceAmiRegion": "source_ami_region", "sourceArn": "source_arn", "sourceBackupIdentifier": "source_backup_identifier", "sourceCidrBlock": "source_cidr_block", "sourceCodeHash": "source_code_hash", "sourceCodeSize": "source_code_size", "sourceDbClusterSnapshotArn": "source_db_cluster_snapshot_arn", "sourceDbSnapshotIdentifier": "source_db_snapshot_identifier", "sourceDestCheck": "source_dest_check", "sourceEndpointArn": "source_endpoint_arn", "sourceIds": "source_ids", "sourceInstanceId": "source_instance_id", "sourceLocationArn": "source_location_arn", "sourcePortRange": "source_port_range", "sourceRegion": "source_region", "sourceSecurityGroup": "source_security_group", "sourceSecurityGroupId": "source_security_group_id", "sourceSnapshotId": "source_snapshot_id", "sourceType": "source_type", "sourceVersion": "source_version", "sourceVolumeArn": "source_volume_arn", "splitTunnel": "split_tunnel", "splunkConfiguration": "splunk_configuration", "spotBidStatus": "spot_bid_status", "spotInstanceId": "spot_instance_id", "spotOptions": "spot_options", "spotPrice": "spot_price", "spotRequestState": "spot_request_state", "spotType": "spot_type", "sqlInjectionMatchTuples": "sql_injection_match_tuples", "sqlVersion": "sql_version", "sqsFailureFeedbackRoleArn": "sqs_failure_feedback_role_arn", "sqsSuccessFeedbackRoleArn": "sqs_success_feedback_role_arn", "sqsSuccessFeedbackSampleRate": "sqs_success_feedback_sample_rate", "sqsTarget": "sqs_target", "sriovNetSupport": "sriov_net_support", "sshHostDsaKeyFingerprint": "ssh_host_dsa_key_fingerprint", "sshHostRsaKeyFingerprint": "ssh_host_rsa_key_fingerprint", "sshKeyName": "ssh_key_name", "sshPublicKey": "ssh_public_key", "sshPublicKeyId": "ssh_public_key_id", "sshUsername": "ssh_username", "sslConfigurations": "ssl_configurations", "sslMode": "ssl_mode", "sslPolicy": "ssl_policy", "stackEndpoint": "stack_endpoint", "stackId": "stack_id", "stackSetId": "stack_set_id", "stackSetName": "stack_set_name", "stageDescription": "stage_description", "stageName": "stage_name", "stageVariables": "stage_variables", "standardsArn": "standards_arn", "startDate": "start_date", "startTime": "start_time", "startingPosition": "starting_position", "startingPositionTimestamp": "starting_position_timestamp", "stateTransitionReason": "state_transition_reason", "statementId": "statement_id", "statementIdPrefix": "statement_id_prefix", "staticIpName": "static_ip_name", "staticMembers": "static_members", "staticRoutesOnly": "static_routes_only", "statsEnabled": "stats_enabled", "statsPassword": "stats_password", "statsUrl": "stats_url", "statsUser": "stats_user", "statusCode": "status_code", "statusReason": "status_reason", "stepAdjustments": "step_adjustments", "stepConcurrencyLevel": "step_concurrency_level", "stepFunctions": "step_functions", "stepScalingPolicyConfiguration": "step_scaling_policy_configuration", "stopActions": "stop_actions", "storageCapacity": "storage_capacity", "storageClass": "storage_class", "storageClassAnalysis": "storage_class_analysis", "storageDescriptor": "storage_descriptor", "storageEncrypted": "storage_encrypted", "storageLocation": "storage_location", "storageType": "storage_type", "streamArn": "stream_arn", "streamEnabled": "stream_enabled", "streamLabel": "stream_label", "streamViewType": "stream_view_type", "subjectAlternativeNames": "subject_alternative_names", "subnetGroupName": "subnet_group_name", "subnetId": "subnet_id", "subnetIds": "subnet_ids", "subnetMappings": "subnet_mappings", "successFeedbackRoleArn": "success_feedback_role_arn", "successFeedbackSampleRate": "success_feedback_sample_rate", "supportCode": "support_code", "supportedIdentityProviders": "supported_identity_providers", "supportedLoginProviders": "supported_login_providers", "suspendedProcesses": "suspended_processes", "systemPackages": "system_packages", "tableMappings": "table_mappings", "tableName": "table_name", "tablePrefix": "table_prefix", "tableType": "table_type", "tagKeyScope": "tag_key_scope", "tagSpecifications": "tag_specifications", "tagValueScope": "tag_value_scope", "tagsCollection": "tags_collection", "tapeDriveType": "tape_drive_type", "targetAction": "target_action", "targetArn": "target_arn", "targetCapacity": "target_capacity", "targetCapacitySpecification": "target_capacity_specification", "targetEndpointArn": "target_endpoint_arn", "targetGroupArn": "target_group_arn", "targetGroupArns": "target_group_arns", "targetId": "target_id", "targetIps": "target_ips", "targetKeyArn": "target_key_arn", "targetKeyId": "target_key_id", "targetName": "target_name", "targetPipeline": "target_pipeline", "targetTrackingConfiguration": "target_tracking_configuration", "targetTrackingScalingPolicyConfiguration": "target_tracking_scaling_policy_configuration", "targetType": "target_type", "taskArn": "task_arn", "taskDefinition": "task_definition", "taskInvocationParameters": "task_invocation_parameters", "taskParameters": "task_parameters", "taskRoleArn": "task_role_arn", "taskType": "task_type", "teamId": "team_id", "templateBody": "template_body", "templateName": "template_name", "templateSelectionExpression": "template_selection_expression", "templateUrl": "template_url", "terminateInstances": "terminate_instances", "terminateInstancesWithExpiration": "terminate_instances_with_expiration", "terminationPolicies": "termination_policies", "terminationProtection": "termination_protection", "thingTypeName": "thing_type_name", "thresholdCount": "threshold_count", "thresholdMetricId": "threshold_metric_id", "throttleSettings": "throttle_settings", "throughputCapacity": "throughput_capacity", "throughputMode": "throughput_mode", "thumbnailConfig": "thumbnail_config", "thumbnailConfigPermissions": "thumbnail_config_permissions", "thumbprintLists": "thumbprint_lists", "timePeriodEnd": "time_period_end", "timePeriodStart": "time_period_start", "timeUnit": "time_unit", "timeoutInMinutes": "timeout_in_minutes", "timeoutInSeconds": "timeout_in_seconds", "timeoutMilliseconds": "timeout_milliseconds", "tlsPolicy": "tls_policy", "toPort": "to_port", "tokenKey": "token_key", "tokenKeyId": "token_key_id", "topicArn": "topic_arn", "tracingConfig": "tracing_config", "trafficDialPercentage": "traffic_dial_percentage", "trafficDirection": "traffic_direction", "trafficMirrorFilterId": "traffic_mirror_filter_id", "trafficMirrorTargetId": "traffic_mirror_target_id", "trafficRoutingConfig": "traffic_routing_config", "trafficType": "traffic_type", "transactionalMessagesPerSecond": "transactional_messages_per_second", "transitEncryptionEnabled": "transit_encryption_enabled", "transitGatewayAttachmentId": "transit_gateway_attachment_id", "transitGatewayDefaultRouteTableAssociation": "transit_gateway_default_route_table_association", "transitGatewayDefaultRouteTablePropagation": "transit_gateway_default_route_table_propagation", "transitGatewayId": "transit_gateway_id", "transitGatewayRouteTableId": "transit_gateway_route_table_id", "transportProtocol": "transport_protocol", "treatMissingData": "treat_missing_data", "triggerConfigurations": "trigger_configurations", "triggerTypes": "trigger_types", "tunnel1Address": "tunnel1_address", "tunnel1BgpAsn": "tunnel1_bgp_asn", "tunnel1BgpHoldtime": "tunnel1_bgp_holdtime", "tunnel1CgwInsideAddress": "tunnel1_cgw_inside_address", "tunnel1InsideCidr": "tunnel1_inside_cidr", "tunnel1PresharedKey": "tunnel1_preshared_key", "tunnel1VgwInsideAddress": "tunnel1_vgw_inside_address", "tunnel2Address": "tunnel2_address", "tunnel2BgpAsn": "tunnel2_bgp_asn", "tunnel2BgpHoldtime": "tunnel2_bgp_holdtime", "tunnel2CgwInsideAddress": "tunnel2_cgw_inside_address", "tunnel2InsideCidr": "tunnel2_inside_cidr", "tunnel2PresharedKey": "tunnel2_preshared_key", "tunnel2VgwInsideAddress": "tunnel2_vgw_inside_address", "uniqueId": "unique_id", "urlPath": "url_path", "usagePlanId": "usage_plan_id", "usageReportS3Bucket": "usage_report_s3_bucket", "useCustomCookbooks": "use_custom_cookbooks", "useEbsOptimizedInstances": "use_ebs_optimized_instances", "useOpsworksSecurityGroups": "use_opsworks_security_groups", "userArn": "user_arn", "userData": "user_data", "userDataBase64": "user_data_base64", "userName": "user_name", "userPoolAddOns": "user_pool_add_ons", "userPoolConfig": "user_pool_config", "userPoolId": "user_pool_id", "userRole": "user_role", "userVolumeEncryptionEnabled": "user_volume_encryption_enabled", "usernameAttributes": "username_attributes", "usernameConfiguration": "username_configuration", "validFrom": "valid_from", "validTo": "valid_to", "validUntil": "valid_until", "validUserLists": "valid_user_lists", "validateRequestBody": "validate_request_body", "validateRequestParameters": "validate_request_parameters", "validationEmails": "validation_emails", "validationMethod": "validation_method", "validationRecordFqdns": "validation_record_fqdns", "vaultName": "vault_name", "verificationMessageTemplate": "verification_message_template", "verificationToken": "verification_token", "versionId": "version_id", "versionStages": "version_stages", "vgwTelemetries": "vgw_telemetries", "videoCodecOptions": "video_codec_options", "videoWatermarks": "video_watermarks", "viewExpandedText": "view_expanded_text", "viewOriginalText": "view_original_text", "viewerCertificate": "viewer_certificate", "virtualInterfaceId": "virtual_interface_id", "virtualNetworkId": "virtual_network_id", "virtualRouterName": "virtual_router_name", "virtualizationType": "virtualization_type", "visibilityTimeoutSeconds": "visibility_timeout_seconds", "visibleToAllUsers": "visible_to_all_users", "volumeArn": "volume_arn", "volumeEncryptionKey": "volume_encryption_key", "volumeId": "volume_id", "volumeSize": "volume_size", "volumeSizeInBytes": "volume_size_in_bytes", "volumeTags": "volume_tags", "vpcClassicLinkId": "vpc_classic_link_id", "vpcClassicLinkSecurityGroups": "vpc_classic_link_security_groups", "vpcConfig": "vpc_config", "vpcConfiguration": "vpc_configuration", "vpcEndpointId": "vpc_endpoint_id", "vpcEndpointServiceId": "vpc_endpoint_service_id", "vpcEndpointType": "vpc_endpoint_type", "vpcId": "vpc_id", "vpcOptions": "vpc_options", "vpcOwnerId": "vpc_owner_id", "vpcPeeringConnectionId": "vpc_peering_connection_id", "vpcRegion": "vpc_region", "vpcSecurityGroupIds": "vpc_security_group_ids", "vpcSettings": "vpc_settings", "vpcZoneIdentifiers": "vpc_zone_identifiers", "vpnConnectionId": "vpn_connection_id", "vpnEcmpSupport": "vpn_ecmp_support", "vpnGatewayId": "vpn_gateway_id", "waitForCapacityTimeout": "wait_for_capacity_timeout", "waitForDeployment": "wait_for_deployment", "waitForElbCapacity": "wait_for_elb_capacity", "waitForFulfillment": "wait_for_fulfillment", "waitForReadyTimeout": "wait_for_ready_timeout", "waitForSteadyState": "wait_for_steady_state", "webAclArn": "web_acl_arn", "webAclId": "web_acl_id", "websiteCaId": "website_ca_id", "websiteDomain": "website_domain", "websiteEndpoint": "website_endpoint", "websiteRedirect": "website_redirect", "weeklyMaintenanceStartTime": "weekly_maintenance_start_time", "weightedRoutingPolicies": "weighted_routing_policies", "windowId": "window_id", "workerType": "worker_type", "workflowExecutionRetentionPeriodInDays": "workflow_execution_retention_period_in_days", "workflowName": "workflow_name", "workmailActions": "workmail_actions", "workspaceProperties": "workspace_properties", "workspaceSecurityGroupId": "workspace_security_group_id", "writeAttributes": "write_attributes", "writeCapacity": "write_capacity", "xmlClassifier": "xml_classifier", "xrayEnabled": "xray_enabled", "xrayTracingEnabled": "xray_tracing_enabled", "xssMatchTuples": "xss_match_tuples", "zoneId": "zone_id", "zookeeperConnectString": "zookeeper_connect_string", }
45.360609
100
0.735746
12,892
160,758
8.724868
0.221765
0.002987
0.002667
0.001956
0.036131
0.006099
0.001511
0
0
0
0
0.001785
0.132174
160,758
3,543
101
45.373412
0.804473
0.001101
0
0
1
0
0.73546
0.273563
0
0
0
0
0
1
0
false
0.011871
0.001696
0
0.001696
0.003957
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d0ad343cf29622139ce24bca74fcd7291f33777
307
py
Python
codes_/1221_Split_a_String_in_Balanced_Strings.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
codes_/1221_Split_a_String_in_Balanced_Strings.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
codes_/1221_Split_a_String_in_Balanced_Strings.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
# %% [1221. Split a String in Balanced Strings](https://leetcode.com/problems/split-a-string-in-balanced-strings/) class Solution: def balancedStringSplit(self, s: str) -> int: res = cnt = 0 for c in s: cnt += (c == "L") * 2 - 1 res += not cnt return res
34.111111
114
0.557003
42
307
4.071429
0.690476
0.070175
0.140351
0.163743
0.339181
0.339181
0
0
0
0
0
0.03271
0.302932
307
8
115
38.375
0.766355
0.364821
0
0
0
0
0.005181
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.428571
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d19d63f9bf32e92d6c57d69ec96b2b7361cfac8
2,184
py
Python
lasso/logging.py
sharkweek/lasso-python
727957a8b9cf04240b25d18ab730153b9ab8db24
[ "BSD-3-Clause" ]
null
null
null
lasso/logging.py
sharkweek/lasso-python
727957a8b9cf04240b25d18ab730153b9ab8db24
[ "BSD-3-Clause" ]
null
null
null
lasso/logging.py
sharkweek/lasso-python
727957a8b9cf04240b25d18ab730153b9ab8db24
[ "BSD-3-Clause" ]
null
null
null
import logging import platform from lasso.utils.ConsoleColoring import ConsoleColoring # settings MARKER_INFO = '[/]' MARKER_RUNNING = '[~]' MARKER_WARNING = '[!]' MARKER_SUCCESS = '[Y]' if platform.system() == 'Windows' else '[✔]' MARKER_ERROR = '[X]' if platform.system() == 'Windows' else '[✘]' LOGGER_NAME = "lasso" def str_info(msg: str): ''' Format a message as stuff is running Parameters ---------- msg: str message to format Returns ------- msg_ret: str formatted message ''' # return ConsoleColoring.blue("[/] {0}".format(msg), light=True) return "{0} {1}".format(MARKER_INFO, msg) def str_running(msg: str): ''' Format a message as stuff is running Parameters ---------- msg: str message to format Returns ------- msg_ret: str formatted message ''' return "{0} {1}".format(MARKER_RUNNING, msg) def str_success(msg: str): ''' Format a message as successful Parameters ---------- msg: str message to format Returns ------- msg_ret: str formatted message ''' return ConsoleColoring.green("{0} {1}".format(MARKER_SUCCESS, msg)) def str_warn(msg: str): ''' Format a string as a warning Parameters ---------- msg: str message to format Returns ------- msg_ret: str formatted message ''' return ConsoleColoring.yellow("{0} {1}".format(MARKER_WARNING, msg)) def str_error(msg: str): ''' Format a string as an error Parameters ---------- msg: str message to format Returns ------- msg_ret: str formatted message ''' return ConsoleColoring.red("{0} {1}".format(MARKER_ERROR, msg)) def get_logger(file_flag: str) -> logging.Logger: ''' Get the logger for the lasso module Returns ------- logger: logging.Logger logger for the lasso module ''' logging.basicConfig( datefmt='[%(levelname)s] %(message)s [%(pathname)s %(funcName)s %(lineno)d]' ) return logging.getLogger(file_flag)
20.222222
84
0.56456
245
2,184
4.942857
0.269388
0.049546
0.049546
0.053675
0.557391
0.446738
0.393889
0.393889
0.393889
0.393889
0
0.007047
0.285256
2,184
107
85
20.411215
0.767457
0.399267
0
0
0
0.041667
0.141141
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
5d22ce43adae25f1835750f6f60fceedf951696a
1,707
py
Python
oldtoronto/test/date_distribution_test.py
patcon/oldto
44c099550a4e3cfafa85afbaebd3cd6c33325891
[ "Apache-2.0" ]
22
2018-04-25T22:03:53.000Z
2021-07-13T18:43:23.000Z
oldtoronto/test/date_distribution_test.py
patcon/oldto
44c099550a4e3cfafa85afbaebd3cd6c33325891
[ "Apache-2.0" ]
17
2018-04-30T14:04:08.000Z
2022-02-13T19:52:44.000Z
oldtoronto/test/date_distribution_test.py
patcon/oldto
44c099550a4e3cfafa85afbaebd3cd6c33325891
[ "Apache-2.0" ]
7
2018-05-08T23:32:44.000Z
2022-01-27T17:49:30.000Z
from nose.tools import eq_ from parameterized import parameterized import sys sys.path.append('oldtoronto') from oldtoronto.date_distribution import parse_year # noqa @parameterized([ (('1915', '1915'), 'May 20, 1915'), (('1922', '1922'), '[ca. June 1922]'), (('1890', '1890'), '[ca. 1890]'), (('1947', '1947'), '[ca. July 1947]'), (('1920', '1929'), '[192-]'), ((None, '1900'), '[before 1900]'), (('1900', None), '[after 1900]'), (('1946', '1946'), '1946'), (('1945', '1952'), '[ca. 1945-52]'), (('1940', '1949'), '[194-?]'), (('1958', '1958'), '[ca. February 8, 1958-?]'), (('1948', '1948'), '[ca. 1948-?]'), (('1900', '1910'), '[between 1900 and 1910?]'), (('1900', '1910'), '[between 1900? and 1910?]'), (('1900', '1910'), '[betwen 1900 and 1910?]'), (('1920', '1940'), '[between 1920? anad 1940]'), (('1939', '1940'), '1939 or 1940'), (('1950', '1959'), '[ 195-?]'), (('1950', '1959'), '[195?]'), (('1960', '1960'), '[Summer 1960]'), (('1963', '1972'), '1963 - 1972'), (('1962', '1962'), '[ca.1962]'), (('1962', '1962'), 'circa 1962'), (('1939', '1945'), '[between 1939-1945]'), (('1989', '1990'), '[between 1989 or 1990]'), (('1924', '1924'), 'Digitized 2010 (originally created November 9, 1924)'), (('1960', '1960'), '[1960?].'), (('1942', '1942'), 'November 23 & 24, 1942'), (('1923', '1923'), 'Febuary 16, 1923'), (None, 'Digitized 2010'), (('1948', '1948'), 'June 15-19, 1948') # Patterns that don't work yet: # (('1964', '1980'), '[between ca. 1964 and 1980]') ]) def test_parse_year(expected_year, input_text): eq_(expected_year, parse_year(input_text))
36.319149
79
0.511424
197
1,707
4.375635
0.446701
0.031323
0.038283
0.044084
0.069606
0.069606
0.069606
0.069606
0
0
0
0.303249
0.188635
1,707
46
80
37.108696
0.319134
0.049209
0
0
0
0
0.444719
0
0
0
0
0
0
1
0.025
false
0
0.1
0
0.125
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d26d1d0c42aa6591dffbf30fa5e0609b7daf8c5
335
py
Python
api_credentials.sample.py
Payoneer-Escrow/payoneer-escrow-python
691bbbf211e675fdbb4ff8706d239a79bd94b8ed
[ "MIT" ]
2
2017-05-04T12:59:40.000Z
2020-12-26T05:39:26.000Z
api_credentials.sample.py
Payoneer-Escrow/payoneer-escrow-python
691bbbf211e675fdbb4ff8706d239a79bd94b8ed
[ "MIT" ]
null
null
null
api_credentials.sample.py
Payoneer-Escrow/payoneer-escrow-python
691bbbf211e675fdbb4ff8706d239a79bd94b8ed
[ "MIT" ]
3
2017-06-03T12:04:50.000Z
2019-11-16T16:50:57.000Z
""" You can use this file as a template to store your api credentials. Just copy (or rename) this file to `api_credentials.py` and fill in your key and secret. `api_credentials.py` is in this repository's `.gitignore` file. """ PAYONEER_ESCROW_API_KEY = 'ENTER_YOUR_API_KEY_HERE' PAYONEER_ESCROW_SECRET = 'ENTER_YOUR_API_SECRET_HERE'
37.222222
80
0.78806
57
335
4.368421
0.54386
0.084337
0.128514
0
0
0
0
0
0
0
0
0
0.131343
335
8
81
41.875
0.85567
0.653731
0
0
0
0
0.453704
0.453704
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d2eb6169ac286849f6a657daf56e3cd16d198c0
161
py
Python
bomen/huffman/huffman.py
FabioP-2055346/algo-data
0cec3fcef43751224ca9f45d506eb5fb2c09f58a
[ "MIT" ]
null
null
null
bomen/huffman/huffman.py
FabioP-2055346/algo-data
0cec3fcef43751224ca9f45d506eb5fb2c09f58a
[ "MIT" ]
null
null
null
bomen/huffman/huffman.py
FabioP-2055346/algo-data
0cec3fcef43751224ca9f45d506eb5fb2c09f58a
[ "MIT" ]
null
null
null
from huffman_classes import HuffmanCoding #input file path path = "./sample.txt" h = HuffmanCoding(path) output_path = h.compress() h.decompress(output_path)
16.1
41
0.770186
22
161
5.5
0.636364
0.165289
0
0
0
0
0
0
0
0
0
0
0.124224
161
9
42
17.888889
0.858156
0.093168
0
0
0
0
0.082759
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d337eb8c7897c96fc16383218b1bb6db108e43c
612
py
Python
chatterbot/ext/django_chatterbot/admin.py
sybitetechnologies/ChatterBot
05dfe72d31046e16e46c43fc121d6d19bf6e1321
[ "BSD-3-Clause" ]
null
null
null
chatterbot/ext/django_chatterbot/admin.py
sybitetechnologies/ChatterBot
05dfe72d31046e16e46c43fc121d6d19bf6e1321
[ "BSD-3-Clause" ]
null
null
null
chatterbot/ext/django_chatterbot/admin.py
sybitetechnologies/ChatterBot
05dfe72d31046e16e46c43fc121d6d19bf6e1321
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from chatterbot.ext.django_chatterbot.models import Statement, Response, Conversation class StatementAdmin(admin.ModelAdmin): list_display = ('text', ) list_filter = ('text', ) search_fields = ('text', ) class ResponseAdmin(admin.ModelAdmin): list_display = ('statement', 'occurrence', ) class ConversationAdmin(admin.ModelAdmin): list_display = ('statement', 'occurrence', ) list_display = ('root', ) admin.site.register(Statement, StatementAdmin) admin.site.register(Response, ResponseAdmin) admin.site.register(Conversation, ConversationAdmin)
26.608696
85
0.746732
62
612
7.258065
0.419355
0.097778
0.126667
0.173333
0.2
0.2
0
0
0
0
0
0
0.130719
612
22
86
27.818182
0.845865
0
0
0.142857
0
0
0.088235
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.785714
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
5d3a3bc4117b741df204e8dfc91ac67a41bc837b
730
py
Python
src/mitol/oauth_toolkit_extensions/models.py
mitodl/ol-django
16989278e528614d3e8e21d4c5adc4f55761ab98
[ "BSD-3-Clause" ]
1
2021-07-26T12:43:57.000Z
2021-07-26T12:43:57.000Z
src/mitol/oauth_toolkit_extensions/models.py
mitodl/ol-django
16989278e528614d3e8e21d4c5adc4f55761ab98
[ "BSD-3-Clause" ]
43
2020-08-28T12:16:11.000Z
2022-02-01T19:45:41.000Z
src/mitol/oauth_toolkit_extensions/models.py
mitodl/ol-django
16989278e528614d3e8e21d4c5adc4f55761ab98
[ "BSD-3-Clause" ]
null
null
null
"""OAuth toolkit extensions model classes""" from typing import List from django.db import models from oauth2_provider.settings import oauth2_settings from mitol.common.models import TimestampedModel APPLICATION_MODEL = oauth2_settings.APPLICATION_MODEL class ApplicationAccess(TimestampedModel): """Data model for managing application-specific OAuth2 scopes""" application = models.OneToOneField( APPLICATION_MODEL, on_delete=models.CASCADE, related_name="access" ) scopes = models.CharField(max_length=512) @property def scopes_list(self) -> List[str]: """Return a list of scopes this application is permitted""" return [scope.strip() for scope in self.scopes.split(",")]
29.2
74
0.749315
87
730
6.172414
0.586207
0.089385
0
0
0
0
0
0
0
0
0
0.011457
0.163014
730
24
75
30.416667
0.86743
0.206849
0
0
0
0
0.012433
0
0
0
0
0
0
1
0.076923
false
0
0.307692
0
0.692308
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
5d3aa206b1b0400f2de716d407f1e9ab05524953
16,056
py
Python
mininet/mininet/provision/googlecloudprovision.py
a815027104/Distrinet
29a0c6acbbe15932581b7ebb4407412b8daa2feb
[ "MIT" ]
16
2019-08-27T13:57:21.000Z
2021-12-10T12:24:10.000Z
mininet/mininet/provision/googlecloudprovision.py
a815027104/Distrinet
29a0c6acbbe15932581b7ebb4407412b8daa2feb
[ "MIT" ]
56
2019-08-22T14:16:27.000Z
2022-01-15T20:33:31.000Z
mininet/mininet/provision/googlecloudprovision.py
a815027104/Distrinet
29a0c6acbbe15932581b7ebb4407412b8daa2feb
[ "MIT" ]
7
2019-08-11T13:11:20.000Z
2021-12-09T04:03:33.000Z
from mininet.provision.provision import Provision from time import sleep, time import boto3 import os import paramiko import uuid from botocore.exceptions import ClientError import progressbar conf = Provision.get_configurations() gcloud_conf = conf["gcloud"] GCLOUD_REGION = gcloud_conf["region"] SRC_PLAYBOOKS_DIR = "mininet/provision/playbooks" DST_PLAYBOOKS_DIR = "/root/playbooks" VOLUME_SIZE= int(gcloud_conf["volumeSize"]) MAIN_USER = gcloud_conf["user"] KEY_PAIR_NAME_WORKERS = 'DistrinetKey-' + str(uuid.uuid4().hex) IP_PERMISSION = gcloud_conf["network_acl"] IMAGE_NAME_GCLOUD = gcloud_conf["image_name"] KEY_PAIR_NAME_BASTION = gcloud_conf["key_name_gcloud"] class distrinetGCloud(Provision): ec2Resource = boto3.resource('ec2', region_name=GCLOUD_REGION) ec2Client = boto3.client('ec2', region_name=GCLOUD_REGION) def __init__(self, VPCName, addressPoolVPC, publicSubnetNetwork, privateSubnetNetwork, bastionHostDescription, workersHostsDescription, **kwargs): super(distrinetGCloud, self).__init__(VPCName, addressPoolVPC, publicSubnetNetwork, privateSubnetNetwork, bastionHostDescription, workersHostsDescription, **kwargs) self.VPCName = VPCName self.addressPoolVPC = addressPoolVPC self.publicSubnetNetwork = publicSubnetNetwork self.privateSubnetNetwork = privateSubnetNetwork self.bastionHostDescription = bastionHostDescription self.workersHostsDescription = workersHostsDescription self.param = kwargs @staticmethod def CreateVPC(VpcName, addressPoolVPC, **kwargs): """ Create a vpc Object using boto3.resource('ec2') :param VpcName: Name of the new vpc :param addressPoolVPC: Ipv4 Address pool assigned to the vpc, be careful to assign a valid address pool: you can check if your pool is valid at: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html :param kwargs: Optional parameters that you can assign to the Vpc :return: Vpc object from boto3.resource('ec2') """ @staticmethod def CheckResources(VpcNeeded=1, ElasticIpNeeded=2, instancesNeeded=(("t3.2xlarge", 2),)): pass @staticmethod def getAllInstancesInVPC(VpcId): """ get all the instances type, with the private ip in the vpc :param vpcId: Id of the Vpc :return: list containing tuples of (instance_type, private_ip) """ pass @staticmethod def removeVPC(VpcId): """ Remove the vpc using boto3.resource('ec2') :param vpcId: Id of the Vpc :return: client response Script adapted from https://gist.github.com/vernhart/c6a0fc94c0aeaebe84e5cd6f3dede4ce TODO: Make it cleaner and more modular, seems to work now, but the code is terrible """ pass @staticmethod def getImageAMIFromRegion(Region, ImageName): """ Return the imageId (ami-xxxxxxxx) for a given ImageName and a given region. Note that an imageId is different for the same image in a different region. :param Region: regione name ex. eu-central-1 or us-west-1 etc. :param ImageName: image Name provided by in the amazon description, ex. ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20190722.1 for Ubuntu bionic :return: string containing the ImageId """ pass @staticmethod def modifyEnableDnsSupport(VpcId, Value=True): """ Modify the parameter EnableDnsSupport in a given VPC with the new Value :param VpcId: VpcId where to modify EnableDnsSupport :param Value: new value of EnableDnsSupport :return: None """ pass @staticmethod def modifyEnableDnsHostnames(VpcId, Value=True): """ Modify the parameter EnableDnsHostnames in a given VPC with the new Value :param VpcId: VpcId where to modify EnableDnsHostnames :param Value: new value of EnableDnsHostnames :return: None """ pass @staticmethod def createSubnet(VpcId, subnetName, subnetNetwork, routeTable, **kwargs): """ Create a subnet inside a Vpc :param VpcId: id of a Vpc already created; be careful, the Vpc should be ready, before creating a subnet :param subnetName: Subnet Name tag associated to the subnet :param subnetNetwork: Network pool to be assigned, be sure that the subnet is contained in the vpc pool, and that the subnet pool is valid. You can chec if it is a valid subnet at: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html :param routeTable: Route table object associated to the subnet :param kwargs: Optional parameters that you can assign to the Subnet :return: subnet object from boto3.resource('ec2') """ pass @staticmethod def createInternetGateWay(**kwargs): """ Create an Internet Gateway :param kwargs: Optional parameters that you can assign to the gateway :return: Internet Gateway object from boto3.resource('ec2'), you can access the Id by: InternetGatewayObject.id """ pass @staticmethod def attachInternetGateWayToVpc(Vpc, InternetGatewayId, **kwargs): """ Attach an Internet gateway already created to a vpc :param Vpc: vpc object :param InternetGatewayId: internet gateway id :param kwargs: Optional parameters that you can assign :return: None """ pass @staticmethod def createElasticIp(Domain='vpc', **kwargs): """ Create a new Elastic Ip.Be careful, you can have at most 5 Elastic Ip per Region :param Domain: Domain of the Elastic Ip :param kwargs: Optional parameters that you can assign to the ElasticIp :return: ElasticIp Client response, you can access the Id by: ElasticIpObject["AllocationId"] """ pass @staticmethod def assignElasticIp(ElasticIpId, InstanceId): """ Assign an Elastic Ip to an instance :param ElasticIpId: Elastic Ip Id :param InstanceId: Instance Id, The instance has to be in a valid state :return: None """ pass @staticmethod def createNatGateWay(SubnetId, AllocationId, **kwargs): """ Create a new Nat Gateway :param SubnetId: Subnet where to assigne the Nat Gateway :param AllocationId: ElasticIp Id assigned to the Nat Gateway :return: NatGateway Client response, you can access the Id by: NatGatewayObject["NatGateway"]["NatGatewayId"] """ pass @staticmethod def waitNatGateWaysAvailable(NatGatewaysId): """ Wait until the NatGateway is in Available state :param NatGatewaysId: Nat Gateway Id :return: None """ pass @staticmethod def createRouteTable(Vpc, TableName, **kwargs): """ Create a new route table inside a Vpc :param Vpc: Vpc Object where to create the table :param TableName: Tag Name added to the new table :param kwargs: Optional parameters that you can assign to the RouteTable :return: Route Table Object """ pass @staticmethod def addRoute(routeTable, GatewayId, DestinationCidrBlock, **kwargs): """ Add new route in the route table :param routeTable: RouteTable Object :param GatewayId: Gateway Id to add in the route :param DestinationCidrBlock: Ip subnet to route. "0.0.0.0/0" for all the traffic :param kwargs: Optional parameters that you can assign to the route :return: Route Object """ pass @staticmethod def runInstances(SubnetId, numberOfInstances, instanceType, KeyName, ImageId, **kwargs): """ Run multiple instances in the specified SubnetId, using the specified KeyName pair and The specified Id :param SubnetId: SubnetId where to run the instance :param numberOfInstances: Number of instances that you want to run; be careful to not exceed the limits imposed by Amazon AWS :param instanceType: Type of instance that you want to run :param KeyName: KeyName present in your account :param ImageId: Image AMI id provided by Amazon AWS :param kwargs: Optional parameters to personalize your image, the correct documentation can be found at: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.run_instances :return: RunInstances Client response, boto3.client('ec2').run_instances() """ pass @staticmethod def waitInstancesRunning(instancesIdList): """ Wait until all the instance in input are in 'running state' :param instancesIdList: List of instances Ids :return: None """ pass @staticmethod def extractInstancesId(runInstancesResponse): """ Take in input the entire response from runInstance method and extract the Ids of all the instances created by the call :param runInstancesResponse: runInstance Response :return: List of Instance Ids """ pass @staticmethod def createSecurityGroup(VpcId, GroupName="Distrinet", Description="Distrinet", **kwargs): """ Create a new Security in the Vpc :param VpcId: Vpc Id where to create the new Security Group :param GroupName: Name of the Security Group, 'Distrinet by default' :param Description: description of the new Security Group :param kwargs: Optional parameters that you can assign to the Security Group :return: SecurityGroup Client response, you can access the Id by SecurityGroupResponse["GroupId"] """ pass @staticmethod def extractSecurityGroupId(createSecurityGroupResponse): """ Take in input the entire response from createSecurityGroup method and extract the Id of the Security Group :param createSecurityGroupResponse: createSecurityGroup response :return: Security Group Id """ pass @staticmethod def AuthorizeSecurityGroupTraffic(GroupId, IpPermissions, Directions=[]): """ Add a Security Group Rule in the Security Group :param GroupId: Security Group Id :param IpPermissions: Description of the rule, Tuo can find the documentation at: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.authorize_security_group_egress or: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.authorize_security_group_ingress :param Directions: list of the Direction of the rule, it can be : ['ingress','egress'] or ['egress'] or ['ingress'] :return: tuple containing (ingressData, egressData), in case you dont specify one of the two, that part will be None. Example: >>> i, e = distrinetGCloud.AuthorizeSecurityGroupTraffic("id-xxxx", {"RULES..."},Directions=["egress"]) >>> i None >>> e SOMEDATA.... """ pass @staticmethod def modifyGroupId(instancesId, Groups, **kwargs): """ Change the Security Groups Assigned to an instance :param instancesId: Instance where to modify the Security Groups :param Groups: List of Security groups Ids to set in the instance :param kwargs: Optional parameters that you can assign to the boto3.client("ec2").modify_instance_attribute method, you can find the correct documentation at: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.modify_instance_attribute :return: boto3.client("ec2").modify_instance_attribute response """ pass @staticmethod def createKeyPair(KeyName, **kwargs): """ Create a new Key pair in Your Account; if the KeyName already exist, it will override it :param KeyName: Name assigns to the new Kaypair :param kwargs: Optional parameters that you can assign to boto3.client("ec2").create_key_pair method, you can find the correct documentation at: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.create_key_pair :return: """ pass @staticmethod def grantRootAccess(SshSession): """ Takes in input an SshSession object, from a User with root privileges, and allows to connect the root user by ssh :param SshSession: SshSession from a User with root privileges :return: the execution results of the commands """ commands = [] commands.append('sudo rm /root/.ssh/authorized_keys') commands.append('sudo cp $HOME/.ssh/authorized_keys /root/.ssh/authorized_keys') command = ";".join(commands) return distrinetGCloud.executeCommand(SshSession=SshSession, command=command) @staticmethod def setupBastionHost(SshSession, PrivateKey): """ Takes in input an SshSession object, from a User with root privileges and copies the PrivateKey in the $HOME/.ssh/id_rsa and /root/.ssh/id_rsa; after that it update the system and install ansible :param SshSession: SshSession from a User with root privileges :param PrivateKey: Private key to install in the host from the SshSession :return: the execution results of the commands """ commands = [] commands.append('sudo echo -e "{}" > $HOME/.ssh/id_rsa'.format(PrivateKey)) commands.append('sudo chmod 0400 $HOME/.ssh/id_rsa') commands.append('sudo cp $HOME/.ssh/id_rsa /root/.ssh/id_rsa') commands.append('sudo apt update ') commands.append('sleep 5') commands.append('sudo DEBIAN_FRONTEND=noninteractive apt install -y -q software-properties-common') commands.append('sudo apt-add-repository --yes --update ppa:ansible/ansible') commands.append('sudo DEBIAN_FRONTEND=noninteractive apt install -y -q ansible') command = ";".join(commands) return distrinetGCloud.executeCommand(SshSession=SshSession, command=command) @staticmethod def setupMasterAutorizedKeysOnWorkers(SshSession, WorkerHostsIp): """ Append the Master authorized_keys on the Slaves Authorized Keys :param SshSession: SshSession from a User with root privileges :param WorkerHostsIp: list of the worker host private Ip :return: None """ command = "cat $HOME/.ssh/authorized_keys" i, sessionAuthorizedKeys, e = distrinetGCloud.executeCommand(SshSession=SshSession, command=command) for workerIp in WorkerHostsIp: command = " ssh root@{} echo '{} >> $HOME/.ssh/authorized_keys'".format(workerIp, str(sessionAuthorizedKeys, "utf-8")[:-1]) distrinetGCloud.executeCommand(SshSession=SshSession, command=command) @staticmethod def releaseElasticIP(ElasticIpID): """ release An elastic IP :param ElasticIpID: IP id :return: client responce """ def deploy(self): pass def GCloudProvisionHelper(*args, instanceType='t3.2xlarge', volumeSize=10, **kwargs): pass def optimizationGCloudHelper(node_assigement): pass if __name__ == '__main__': a={'host_2': ('t3.xlarge', 0), 'host_1': ('t3.xlarge', 0), 'host_3': ('t3.xlarge', 1), 'host_4': ('t3.xlarge', 1), 'aggr_1': ('t3.xlarge', 2), 'core_1': ('t3.xlarge', 2), 'aggr_2': ('t3.xlarge', 3), 'edge_1': ('t3.xlarge', 3), 'edge_2': ('t3.xlarge', 4)} optimizationGCloudHelper(a)
41.595855
135
0.667601
1,852
16,056
5.737041
0.221922
0.039529
0.041129
0.030024
0.320753
0.268612
0.235671
0.203859
0.182965
0.173647
0
0.010322
0.251806
16,056
385
136
41.703896
0.874136
0.511896
0
0.413793
0
0
0.13109
0.038724
0
0
0
0.002597
0
1
0.22069
false
0.17931
0.055172
0
0.310345
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
5d495513e26dc8f5dec77c24730c2747799a4415
223
py
Python
src/passwords.py
byjiang1996/UIUC-Course-Hunter
464cac8ad6e5760d7213fb73d3c45ec07d21b59b
[ "BSD-2-Clause" ]
1
2021-01-25T21:03:04.000Z
2021-01-25T21:03:04.000Z
src/passwords.py
byjiang1996/UIUC-Course-Hunter
464cac8ad6e5760d7213fb73d3c45ec07d21b59b
[ "BSD-2-Clause" ]
null
null
null
src/passwords.py
byjiang1996/UIUC-Course-Hunter
464cac8ad6e5760d7213fb73d3c45ec07d21b59b
[ "BSD-2-Clause" ]
null
null
null
## Use your gmail account to receive course availability auto updates!!! ## NOTE: Please remember to enable "Less secure app access" for your google account!!! details = {'email': 'example@gmail.com', 'password': 'example'}
74.333333
86
0.735426
30
223
5.466667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.134529
223
3
87
74.333333
0.849741
0.686099
0
0
0
0
0.560606
0
0
0
0
0
0
1
0
false
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
5d4eb248e83deda87915cf17eaaca65987fa72b5
120
py
Python
1.py
seanmanson/euler
b01418cf44c1113a0c574b5158aa5b89d725cca2
[ "MIT" ]
null
null
null
1.py
seanmanson/euler
b01418cf44c1113a0c574b5158aa5b89d725cca2
[ "MIT" ]
null
null
null
1.py
seanmanson/euler
b01418cf44c1113a0c574b5158aa5b89d725cca2
[ "MIT" ]
null
null
null
summultiples = 0 for i in range(1000): if i % 3 == 0 or i % 5 == 0: summultiples += i print(summultiples)
15
32
0.566667
19
120
3.578947
0.631579
0
0
0
0
0
0
0
0
0
0
0.108434
0.308333
120
7
33
17.142857
0.710843
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5d59054949dbb187510a12043bf36b07e052b751
1,257
py
Python
basic_exercises/final/entity.py
vuhe/LearnPython
0a081a85456557ae542925cce950b23313c3c9b9
[ "MIT" ]
null
null
null
basic_exercises/final/entity.py
vuhe/LearnPython
0a081a85456557ae542925cce950b23313c3c9b9
[ "MIT" ]
null
null
null
basic_exercises/final/entity.py
vuhe/LearnPython
0a081a85456557ae542925cce950b23313c3c9b9
[ "MIT" ]
null
null
null
class News: # 允许绑定的对象 __slots__ = ('__id', '__time', '__department', '__info') # 构造函数 def __init__(self, url, time, department, info): self.__id = url self.__time = time self.__department = department self.__info = info @property def id(self): return self.__id @property def time(self): return self.__time @time.setter def time(self, new_value): self.__time = new_value @property def department(self): return self.__department @department.setter def department(self, new_value): self.__department = new_value @property def info(self): return self.__info @info.setter def info(self, new_value): self.__info = new_value def __eq__(self, other): return self.time == other.time \ and self.department == other.department \ and self.info == other.info def __hash__(self): return hash((self.time, self.department, self.info)) def __str__(self): return "时间: %s, 部门: %s, 信息: %s" % (self.time, self.department, self.info) def __repr__(self): return "时间: %s, 部门: %s, 信息: %s" % (self.time, self.department, self.info)
23.277778
81
0.587112
151
1,257
4.490066
0.18543
0.082596
0.106195
0.070796
0.19764
0.19764
0.19764
0.144543
0.144543
0.144543
0
0
0.295147
1,257
53
82
23.716981
0.765237
0.009547
0
0.157895
0
0
0.058018
0
0
0
0
0
0
1
0.315789
false
0
0
0.210526
0.578947
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
5d6218b9860130a19f7ec477e449debe93e6aacf
2,028
py
Python
tests/test.py
e7/json-parser
c8f0af9b2204ac75aa28bf0fe9270f65108f0385
[ "BSD-2-Clause" ]
2
2015-01-21T01:50:27.000Z
2015-08-04T02:45:59.000Z
tests/test.py
e7/json-parser
c8f0af9b2204ac75aa28bf0fe9270f65108f0385
[ "BSD-2-Clause" ]
null
null
null
tests/test.py
e7/json-parser
c8f0af9b2204ac75aa28bf0fe9270f65108f0385
[ "BSD-2-Clause" ]
null
null
null
# See bindings/python for the python jsonparser module import jsonparser import json import glob passed = "\033[92mPassed\033[0m" failed = "\033[91mFailed\033[0m" # Strict JSON tests # for i, test in enumerate( map(lambda file: open(file).read(), sorted(glob.glob('valid*.json')))): try: jsonparser.decode(test) except jsonparser.JSONException as error: print 'valid/%d : Failed with error: %s' % (i, error) continue py_decoded = json.loads(test) py_reencoded = json.dumps(py_decoded) try: reencoded = jsonparser.decode(py_reencoded) except jsonparser.JSONException as error: print 'valid/%d : Failed on re-encoded version with error: %s' % (i, error) continue if reencoded != py_decoded: print 'valid/%d : %s:\n\n%s\n\nbecame\n\n%s\n' % (i, failed, test, reencoded) else: print 'valid/%d : %s' % (i, passed) for i, test in enumerate( map(lambda file: open(file).read(), sorted(glob.glob('invalid*.json')))): try: jsonparser.decode(test) except jsonparser.JSONException as error: print 'invalid/%d : %s: %s' % (i, passed, error) continue print 'invalid/%d : %s (parsing succeeded and shouldn\'t have)' % (i, failed) # Extension tests # for i, test in enumerate( map(lambda file: open(file).read(), sorted(glob.glob('ext-valid*.json')))): try: decoded = jsonparser.decode(test) print 'ext-valid/%d : %s: %s' % (i, passed, json.dumps(decoded)) except jsonparser.JSONException as error: print 'ext-valid/%d : Failed with error: %s' % (i, error) continue for i, test in enumerate( map(lambda file: open(file).read(), sorted(glob.glob('ext-invalid*.json')))): try: jsonparser.decode(test) except jsonparser.JSONException as error: print 'ext-invalid/%d : %s: %s' % (i, passed, error) continue print 'ext-invalid/%d : %s (parsing succeeded and shouldn\'t have)' % (i, failed)
28.56338
85
0.621795
272
2,028
4.617647
0.227941
0.011147
0.115446
0.123408
0.667994
0.657643
0.638535
0.601115
0.601115
0.44586
0
0.011576
0.233235
2,028
70
86
28.971429
0.796141
0.042406
0
0.468085
0
0.021277
0.223371
0.035677
0
0
0
0
0
0
null
null
0.106383
0.06383
null
null
0.212766
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
5d7490821c3da62d51d713794d22526d9123f581
1,611
py
Python
setup.py
ariadnext/IDCheckIO
62804f78e02b9ef42e10f1fe7b4b4f3abbf703fd
[ "Apache-2.0" ]
3
2016-03-24T11:08:57.000Z
2016-10-05T13:32:45.000Z
setup.py
ariadnext/IDCheckIO
62804f78e02b9ef42e10f1fe7b4b4f3abbf703fd
[ "Apache-2.0" ]
null
null
null
setup.py
ariadnext/IDCheckIO
62804f78e02b9ef42e10f1fe7b4b4f3abbf703fd
[ "Apache-2.0" ]
2
2019-10-18T14:25:08.000Z
2020-12-12T17:07:07.000Z
# coding: utf-8 """ IdCheck.IO API Check identity documents OpenAPI spec version: 0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import sys from setuptools import setup, find_packages NAME = "idcheckio_python_client" VERSION = "1.0.0" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] setup( name=NAME, version=VERSION, description="IdCheck.IO API", author="ariadnext", author_email="dev@ariadnext.com", url="https://www.idcheck.io", keywords=["Swagger", "IdCheck.IO API", "idcheckio", "id", "verifications", "passport", "verification", "visa", "driving", "licence", "permit", "de", "sejour", "passeport", "carte", "d'identite"], install_requires=REQUIRES, packages=find_packages(), include_package_data=True, long_description="""\ Check identity documents """ )
28.767857
114
0.690875
211
1,611
5.232227
0.611374
0.054348
0.032609
0.028986
0
0
0
0
0
0
0
0.013037
0.190565
1,611
55
115
29.290909
0.833589
0.498448
0
0
1
0
0.396226
0.030997
0
0
0
0
0
1
0
false
0.095238
0.095238
0
0.095238
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
538d60425a49bb14e5c0a6ca0c42bd31465778e2
575
py
Python
ontask/migrations/0005_auto_20191207_1326.py
pinheiroo27/ontask_b
23fee8caf4e1c5694a710a77f3004ca5d9effeac
[ "MIT" ]
33
2017-12-02T04:09:24.000Z
2021-11-07T08:41:57.000Z
ontask/migrations/0005_auto_20191207_1326.py
pinheiroo27/ontask_b
23fee8caf4e1c5694a710a77f3004ca5d9effeac
[ "MIT" ]
189
2017-11-16T04:06:29.000Z
2022-03-11T23:35:59.000Z
ontask/migrations/0005_auto_20191207_1326.py
pinheiroo27/ontask_b
23fee8caf4e1c5694a710a77f3004ca5d9effeac
[ "MIT" ]
30
2017-11-30T03:35:44.000Z
2022-01-31T03:08:08.000Z
# Generated by Django 2.2.8 on 2019-12-07 02:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ontask', '0004_auto_20191206_2039'), ] operations = [ migrations.RemoveField( model_name='scheduledoperation', name='periodic_task', ), migrations.AddField( model_name='scheduledoperation', name='task id', field=models.CharField(blank=True, max_length=1024, null=True, verbose_name='Task identifier'), ), ]
25
107
0.610435
59
575
5.813559
0.728814
0.052478
0.157434
0.180758
0
0
0
0
0
0
0
0.084337
0.278261
575
22
108
26.136364
0.742169
0.078261
0
0.25
1
0
0.189394
0.043561
0
0
0
0
0
1
0
false
0
0.0625
0
0.25
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
539377be727ee3598d6cafdc8afa5249f54023ca
1,449
py
Python
aiida/sphinxext/calcjob.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
1
2016-09-12T10:51:00.000Z
2016-09-12T10:51:00.000Z
aiida/sphinxext/calcjob.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
17
2020-03-11T17:04:05.000Z
2020-05-01T09:34:45.000Z
aiida/sphinxext/calcjob.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # # # The code is hosted on GitHub at https://github.com/aiidateam/aiida-core # # For further information on the license, see the LICENSE.txt file # # For further information please visit http://www.aiida.net # ########################################################################### """ Defines an rst directive to auto-document AiiDA calculation job. """ import inspect from aiida.engine import CalcJob from .process import AiidaProcessDocumenter, AiidaProcessDirective def setup_extension(app): app.add_directive_to_domain('py', AiidaCalcJobDocumenter.directivetype, AiidaCalcJobDirective) # app.add_autodocumenter(AiidaCalcJobDocumenter) class AiidaCalcJobDocumenter(AiidaProcessDocumenter): """Sphinx Documenter for AiiDA CalcJobs.""" directivetype = 'aiida-calcjob' objtype = 'calcjob' priority = 20 @classmethod def can_document_member(cls, member, membername, isattr, parent): return inspect.isclass(member) and issubclass(member, CalcJob) class AiidaCalcJobDirective(AiidaProcessDirective): signature = 'CalcJob' annotation = 'calcjob'
38.131579
98
0.595583
131
1,449
6.534351
0.641221
0.018692
0.049065
0
0
0
0
0
0
0
0
0.002676
0.226363
1,449
37
99
39.162162
0.760928
0.42098
0
0
0
0
0.054299
0
0
0
0
0.027027
0
1
0.133333
false
0
0.2
0.066667
0.866667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
2
53aabd7710c7a58be66f3b2d5c9556a47f32fa27
1,871
py
Python
pyout/tests/terminal.py
pyout/pyout
8007f33b553a897e2fcf06fa8b58279d8213f411
[ "MIT" ]
2
2020-01-29T13:42:02.000Z
2020-05-13T02:26:50.000Z
pyout/tests/terminal.py
pyout/pyout
8007f33b553a897e2fcf06fa8b58279d8213f411
[ "MIT" ]
132
2017-12-19T18:15:18.000Z
2022-02-03T20:28:19.000Z
pyout/tests/terminal.py
pyout/pyout
8007f33b553a897e2fcf06fa8b58279d8213f411
[ "MIT" ]
3
2017-12-19T20:57:25.000Z
2020-05-12T22:56:21.000Z
"""Terminal test utilities. """ from curses import tigetstr from curses import tparm from functools import partial import re import blessings from pyout.tests.utils import assert_contains class Terminal(blessings.Terminal): def __init__(self, *args, **kwargs): super(Terminal, self).__init__( *args, kind="xterm-256color", **kwargs) self._width = 100 self._height = 20 @property def width(self): return self._width @width.setter def width(self, value): self._width = value @property def height(self): return self._height @height.setter def height(self, value): self._height = value # unicode_cap, and unicode_parm are copied from blessings' tests. def unicode_cap(cap): """Return the result of ``tigetstr`` except as Unicode.""" return tigetstr(cap).decode('latin1') def unicode_parm(cap, *parms): """Return the result of ``tparm(tigetstr())`` except as Unicode.""" return tparm(tigetstr(cap), *parms).decode('latin1') COLORNUMS = {"black": 0, "red": 1, "green": 2, "yellow": 3, "blue": 4, "magenta": 5, "cyan": 6, "white": 7} def capres(name, value): """Format value with CAP key, followed by a reset. """ if name in COLORNUMS: prefix = unicode_parm("setaf", COLORNUMS[name]) else: prefix = unicode_cap(name) return prefix + value + unicode_cap("sgr0") def eq_repr_noclear(actual, expected): """Like `eq_repr`, but strip clear-related codes from `actual`. """ clear_codes = [re.escape(unicode_cap(x)) for x in ["el", "ed", "cuu1"]] match = re.match("(?:{}|{}|{})*(.*)".format(*clear_codes), actual) assert match, "This should always match" return repr(match.group(1)) == repr(expected) assert_contains_nc = partial(assert_contains, cmp=eq_repr_noclear)
24.618421
75
0.640834
240
1,871
4.858333
0.4375
0.042882
0.027444
0.02916
0.049743
0
0
0
0
0
0
0.014325
0.216462
1,871
75
76
24.946667
0.781037
0.172635
0
0.047619
0
0
0.080868
0
0
0
0
0
0.071429
1
0.214286
false
0
0.142857
0.047619
0.52381
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
53addddb18220e51b9ee32e29a8ad88cb13cf41e
1,425
py
Python
docs/examples/types_constrained.py
fiebiga/pydantic
de0657e4a5495de9378db9fe15a17334c2b0fae5
[ "MIT" ]
null
null
null
docs/examples/types_constrained.py
fiebiga/pydantic
de0657e4a5495de9378db9fe15a17334c2b0fae5
[ "MIT" ]
86
2020-12-24T04:10:00.000Z
2022-03-28T22:09:36.000Z
docs/examples/types_constrained.py
Hultner/pydantic
37e0e39c643e49e6a744a54c70d130c4f921f3c9
[ "MIT" ]
1
2020-12-29T05:28:06.000Z
2020-12-29T05:28:06.000Z
from decimal import Decimal from pydantic import ( BaseModel, NegativeFloat, NegativeInt, PositiveFloat, PositiveInt, NonNegativeFloat, NonNegativeInt, NonPositiveFloat, NonPositiveInt, conbytes, condecimal, confloat, conint, conlist, conset, constr, Field, ) class Model(BaseModel): short_bytes: conbytes(min_length=2, max_length=10) strip_bytes: conbytes(strip_whitespace=True) short_str: constr(min_length=2, max_length=10) regex_str: constr(regex=r'^apple (pie|tart|sandwich)$') strip_str: constr(strip_whitespace=True) big_int: conint(gt=1000, lt=1024) mod_int: conint(multiple_of=5) pos_int: PositiveInt neg_int: NegativeInt non_neg_int: NonNegativeInt non_pos_int: NonPositiveInt big_float: confloat(gt=1000, lt=1024) unit_interval: confloat(ge=0, le=1) mod_float: confloat(multiple_of=0.5) pos_float: PositiveFloat neg_float: NegativeFloat non_neg_float: NonNegativeFloat non_pos_float: NonPositiveFloat short_list: conlist(int, min_items=1, max_items=4) short_set: conset(int, min_items=1, max_items=4) decimal_positive: condecimal(gt=0) decimal_negative: condecimal(lt=0) decimal_max_digits_and_places: condecimal(max_digits=2, decimal_places=2) mod_decimal: condecimal(multiple_of=Decimal('0.25')) bigger_int: int = Field(..., gt=10000)
25.446429
77
0.716491
184
1,425
5.293478
0.391304
0.027721
0.020534
0.026694
0.086242
0.086242
0.043121
0
0
0
0
0.037197
0.188772
1,425
55
78
25.909091
0.805363
0
0
0
0
0
0.021754
0
0
0
0
0
0
1
0
true
0
0.043478
0
0.608696
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
2
53b21167af07bd53761019752bd4f739256bfc20
1,830
py
Python
examples/calc_gen.py
ethframe/peg
b9529ba00ca44c0c2ac7c6b38ae3fb7169b282da
[ "MIT" ]
1
2018-03-20T10:27:53.000Z
2018-03-20T10:27:53.000Z
examples/calc_gen.py
ethframe/peg
b9529ba00ca44c0c2ac7c6b38ae3fb7169b282da
[ "MIT" ]
null
null
null
examples/calc_gen.py
ethframe/peg
b9529ba00ca44c0c2ac7c6b38ae3fb7169b282da
[ "MIT" ]
null
null
null
from peg import metagrammar, infer_types, gen_converter, generate_py_parser def main(): grammar = """ Start <- _ Expr !. Expr <- Mult ((ADD / SUB)<:left Mult:right)* Mult <- Term ((MUL / DIV)<:left Term:right)* Term <- LP Expr RP / Number / NEG Term:expr Number <- ([0] / [1-9] [0-9]*) @Number<< _ ADD <- "+"~ _ @Add SUB <- "-"~ _ @Sub MUL <- "*"~ _ @Mul DIV <- "/"~ _ @Div NEG <- "-"~ _ @Neg LP <- "("~ _ RP <- ")"~ _ _ <- ([ \t\r\n]*)~ """ tree, _ = metagrammar.parse(grammar) types = infer_types(tree) with open("calc_generated.py", "w") as fp: fp.write("from peg import *\n\n\n") fp.write(generate_py_parser(tree)) fp.write("\n\n\n") for t, d in types.items(): fp.write(d.gen()) fp.write("\n\n") fp.write(gen_converter(types)) fp.write("\n") fp.write(""" class ExpressionVisitor(ClassVisitor): __call__ = ClassVisitor.visit def visit_Add(self, node): return self(node.left) + self(node.right) def visit_Sub(self, node): return self(node.left) - self(node.right) def visit_Mul(self, node): return self(node.left) * self(node.right) def visit_Div(self, node): return self(node.left) / self(node.right) def visit_Neg(self, node): return -self(node.expr) def visit_Number(self, node): return int(node.value) def main(): parser = make_parser() tree, rest = parser.parse("(2 + 2 * (3 + -1)) / 3 * 2") assert not rest tree = ConverterVisitor().visit(tree) print(ExpressionVisitor().visit(tree)) if __name__ == '__main__': main() """) if __name__ == '__main__': main()
25.068493
75
0.52459
225
1,830
4.057778
0.302222
0.131435
0.092004
0.098576
0.230011
0.205915
0.205915
0.205915
0.205915
0.205915
0
0.008661
0.306011
1,830
72
76
25.416667
0.710236
0
0
0.111111
1
0.018519
0.72459
0.054645
0
0
0
0
0.018519
1
0.018519
false
0
0.037037
0
0.166667
0.018519
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
53b40268d117581d034af1b051736c9939e507b6
74
py
Python
CodeUP/Python basic 100/6074.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
CodeUP/Python basic 100/6074.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
CodeUP/Python basic 100/6074.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
a = input() i = ord(a) for i in range(i-96): print(chr(i+97),end=" ")
14.8
28
0.527027
16
74
2.4375
0.75
0
0
0
0
0
0
0
0
0
0
0.068966
0.216216
74
4
29
18.5
0.603448
0
0
0
0
0
0.013514
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
53bb327ded67c57061b823ec973aaaf51569ab17
467
py
Python
httpd.py
bshah2016/web-processing
a5e252cfbcc0e695ed51e68b57aa91de71902a48
[ "MIT" ]
250
2015-01-03T04:54:44.000Z
2021-11-08T09:59:46.000Z
tools/httpd.py
bbondy/processing-js
b20165886a6c990137b031d69ea981fefe689f5e
[ "MIT" ]
4
2015-07-10T16:29:38.000Z
2019-02-13T07:20:20.000Z
tools/httpd.py
bbondy/processing-js
b20165886a6c990137b031d69ea981fefe689f5e
[ "MIT" ]
51
2015-01-04T14:14:57.000Z
2020-11-09T20:18:55.000Z
#!/usr/bin/env python PORT = 9914 SERVER = '127.0.0.1' import SimpleHTTPServer import BaseHTTPServer import SocketServer Handler = SimpleHTTPServer.SimpleHTTPRequestHandler class Server(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): pass httpd = Server((SERVER, PORT), Handler) print "Web Server listening on http://%s:%s/ (stop with ctrl+c)..." % (SERVER, PORT) try: httpd.serve_forever() except KeyboardInterrupt: print "Going down..."
22.238095
84
0.743041
55
467
6.290909
0.690909
0.057803
0
0
0
0
0
0
0
0
0
0.024814
0.137045
467
21
85
22.238095
0.833747
0.042827
0
0
0
0
0.181208
0
0
0
0
0
0
0
null
null
0.071429
0.214286
null
null
0.142857
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
53c9315475aca7021577097cb21e89be4698210a
1,940
py
Python
testing/projects/cpp_pimpl/__init__.py
roehling/exhale
3ac6712a9079b94c009ccd62f95972f6d600e404
[ "BSD-3-Clause" ]
null
null
null
testing/projects/cpp_pimpl/__init__.py
roehling/exhale
3ac6712a9079b94c009ccd62f95972f6d600e404
[ "BSD-3-Clause" ]
null
null
null
testing/projects/cpp_pimpl/__init__.py
roehling/exhale
3ac6712a9079b94c009ccd62f95972f6d600e404
[ "BSD-3-Clause" ]
null
null
null
""" The ``cpp_pimpl`` test project. """ from testing.hierarchies import clike, directory, file, namespace def default_class_hierarchy_dict(): """Return the default class hierarchy dictionary.""" return { namespace("pimpl"): { clike("class", "Planet"): {}, clike("class", "Earth"): {}, clike("class", "EarthImpl"): {}, clike("class", "Earth_v2"): {}, clike("class", "Jupiter"): {}, clike("class", "JupiterImpl"): {}, clike("class", "Jupiter_v2"): {}, namespace("detail"): { clike("class", "EarthImpl"): {}, clike("class", "JupiterImpl"): {} } } } def default_file_hierarchy_dict(): """Return the default file hierarchy dictionary.""" return { directory("include"): { directory("pimpl"): { file("planet.hpp"): { namespace("pimpl"): { clike("class", "Planet"): {} } }, file("earth.hpp"): { namespace("pimpl"): { clike("class", "Earth"): {}, clike("class", "EarthImpl"): {}, clike("class", "Earth_v2"): {}, namespace("detail"): { clike("class", "EarthImpl"): {} } } }, file("jupiter.hpp"): { namespace("pimpl"): { clike("class", "Jupiter"): {}, clike("class", "JupiterImpl"): {}, clike("class", "Jupiter_v2"): {}, namespace("detail"): { clike("class", "JupiterImpl"): {} } } } } } }
32.333333
65
0.37732
122
1,940
5.909836
0.237705
0.249653
0.105409
0.133148
0.65742
0.428571
0.368932
0.368932
0.368932
0.368932
0
0.003795
0.456701
1,940
59
66
32.881356
0.680266
0.063918
0
0.489796
0
0
0.179088
0
0
0
0
0
0
1
0.040816
true
0
0.020408
0
0.102041
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
53cb8536810863baa36f69facd171aab61f4ca30
980
py
Python
python/turbodbc_test/test_data_types.py
arikfr/turbodbc
80a29a7edfbdabf12410af01c0c0ae74bfc3aab4
[ "MIT" ]
537
2016-03-18T21:46:05.000Z
2022-03-29T04:43:17.000Z
python/turbodbc_test/test_data_types.py
arikfr/turbodbc
80a29a7edfbdabf12410af01c0c0ae74bfc3aab4
[ "MIT" ]
325
2016-04-08T11:54:41.000Z
2022-03-21T23:58:42.000Z
python/turbodbc_test/test_data_types.py
arikfr/turbodbc
80a29a7edfbdabf12410af01c0c0ae74bfc3aab4
[ "MIT" ]
83
2016-06-15T13:55:44.000Z
2022-03-26T02:32:26.000Z
import turbodbc.data_types from turbodbc import STRING, BINARY, NUMBER, DATETIME, ROWID ALL_TYPE_CODES = [turbodbc.data_types._BOOLEAN_CODE, turbodbc.data_types._INTEGER_CODE, turbodbc.data_types._FLOATING_POINT_CODE, turbodbc.data_types._STRING_CODE, turbodbc.data_types._UNICODE_CODE, turbodbc.data_types._TIMESTAMP_CODE, turbodbc.data_types._DATE_CODE] ALL_DATA_TYPES = [STRING, BINARY, NUMBER, DATETIME, ROWID] def test_each_type_code_matches_one_data_type(): for type_code in ALL_TYPE_CODES: matches = [type for type in ALL_DATA_TYPES if type_code == type] assert 1 == len(matches) def test_each_type_code_mismatches_all_but_one_data_type(): for type_code in ALL_TYPE_CODES: mismatches = [type for type in ALL_DATA_TYPES if type_code != type] expected = len(ALL_DATA_TYPES) - 1 assert expected == len(mismatches)
37.692308
75
0.693878
131
980
4.755725
0.267176
0.173355
0.218299
0.202247
0.401284
0.24077
0.24077
0.24077
0.24077
0.24077
0
0.002685
0.239796
980
25
76
39.2
0.833557
0
0
0.105263
0
0
0
0
0
0
0
0
0.105263
1
0.105263
false
0
0.105263
0
0.210526
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
53cea784af1289d170f80bfbfb2cb96456d0375b
837
py
Python
robottelemetryservice/infrastructure/configuration/application.py
andrewwgordon/robot_telemetry_service
4b9dcfe3ceaadcaeced0f7026ae03f13713c5065
[ "MIT" ]
null
null
null
robottelemetryservice/infrastructure/configuration/application.py
andrewwgordon/robot_telemetry_service
4b9dcfe3ceaadcaeced0f7026ae03f13713c5065
[ "MIT" ]
null
null
null
robottelemetryservice/infrastructure/configuration/application.py
andrewwgordon/robot_telemetry_service
4b9dcfe3ceaadcaeced0f7026ae03f13713c5065
[ "MIT" ]
null
null
null
import sys import logging import logging.config import configparser from datetime import datetime from robottelemetryservice.infrastructure.repository.measurement_event_sqlite_repository import MeasurementEventSQLiteRepository try: logging.config.fileConfig('./robottelemetryservice/resources/logging.conf',disable_existing_loggers=False) except Exception as ex: sys.stderr.write(str(datetime.now())+' - __main__ - FATAL - Error loading logging.conf...\n') raise ex log=logging.getLogger(__name__) app_config=configparser.RawConfigParser() app_config.read('./robottelemetryservice/resources/robottelemetryservice.properties') measurement_sqlite_repository=MeasurementEventSQLiteRepository(app_config) def get_app_config(): return app_config def get_measurement_repository(): return measurement_sqlite_repository
33.48
128
0.837515
90
837
7.511111
0.511111
0.066568
0.079882
0.044379
0
0
0
0
0
0
0
0
0.083632
837
25
129
33.48
0.881356
0
0
0
0
0
0.196897
0.133652
0
0
0
0
0
1
0.105263
false
0
0.315789
0.105263
0.526316
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
0
0
0
2