code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class CMS(object): <NEW_LINE> <INDENT> __metaclass__ = CmsMetaclass <NEW_LINE> def site_main(self, galaxy=None, system=None): <NEW_LINE> <INDENT> current_planet = self.game.get_current_planet() <NEW_LINE> current_galaxy = self.game.get_galaxy(current_planet.galaxy_id) <NEW_LINE> try: <NEW_LINE> <INDENT> galaxy = int(ga...
@DynamicAttrs
62598fbd63b5f9789fe85352
class MetricsManager(object): <NEW_LINE> <INDENT> __metrics_registry = None <NEW_LINE> @staticmethod <NEW_LINE> def singleton(): <NEW_LINE> <INDENT> if MetricsManager.__metrics_registry is None: <NEW_LINE> <INDENT> raise Exception('startup_metrics was not called.') <NEW_LINE> <DEDENT> return MetricsManager.__metrics_re...
Acts as factory for specialized BaseMetricsRegistry singleton.
62598fbd50812a4eaa620cdb
class Gaus: <NEW_LINE> <INDENT> def __init__(self, x, area: float, mu: float, sigma: float): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.area = area <NEW_LINE> self.mu = mu <NEW_LINE> self.sigma = sigma <NEW_LINE> self.y = self.area/np.sqrt(2*np.pi*self.sigma**2) * np.exp(-(self.x-self.mu)**2/(2*self.sigm...
Class for generating a Gaussian on the form Gaus.equation() with norm 1 times area, mean at mu and standard deviation of sigma. x is a numpy.ndarray of arbitrary size, respective y values for the generated gaussian can be accessed through Gaus.y.
62598fbd099cdd3c636754d3
class PKCS7Encoder(object): <NEW_LINE> <INDENT> block_size = 32 <NEW_LINE> def encode(self, text): <NEW_LINE> <INDENT> text_length = len(text) <NEW_LINE> amount_to_pad = self.block_size - (text_length % self.block_size) <NEW_LINE> if amount_to_pad == 0: <NEW_LINE> <INDENT> amount_to_pad = self.block_size <NEW_LINE> <DE...
提供基于PKCS7算法的加解密接口
62598fbdd268445f26639c75
class EnterpriseServerUserAccountsUploadOrder(sgqlc.types.Input): <NEW_LINE> <INDENT> __schema__ = github_schema <NEW_LINE> __field_names__ = ('field', 'direction') <NEW_LINE> field = sgqlc.types.Field(sgqlc.types.non_null(EnterpriseServerUserAccountsUploadOrderField), graphql_name='field') <NEW_LINE> direction = sgqlc...
Ordering options for Enterprise Server user accounts upload connections.
62598fbd5fdd1c0f98e5e173
class Exit(DefaultExit): <NEW_LINE> <INDENT> def at_traverse(self, traversing_object, target_location): <NEW_LINE> <INDENT> source_location = traversing_object.location <NEW_LINE> if self.tags.get('wild'): <NEW_LINE> <INDENT> coords = self.tags.get('wild', return_tagobj=True).db_data.split() <NEW_LINE> coords = (int(co...
Exits are connectors between rooms. Exits are normal Objects except they defines the `destination` property. It also does work in the following methods: basetype_setup() - sets default exit locks (to change, use `at_object_creation` instead). at_cmdset_get(**kwargs) - this is called when the cmdset is accessed and s...
62598fbdfff4ab517ebcd9c7
class RemoteCollectionsEditorTableView(BaseTableView): <NEW_LINE> <INDENT> def __init__(self, parent, data, truncate=True, minmax=False, get_value_func=None, set_value_func=None, new_value_func=None, remove_values_func=None, copy_value_func=None, is_list_func=None, get_len_func=None, is_array_func=None, is_image_func=N...
DictEditor table view
62598fbd3617ad0b5ee06329
class InvalidAccess(Exception): <NEW_LINE> <INDENT> pass
Quick helper for invalid accesses
62598fbd99fddb7c1ca62edd
class ScheduleFunctionWithoutCalendar(ZiplineCalendarError): <NEW_LINE> <INDENT> msg = ( "To use schedule_function, the TradingAlgorithm must be running on an " "ExchangeTradingSchedule, rather than {schedule}." )
Raised when schedule_function is called but there is not a calendar to be used in the construction of an event rule.
62598fbd44b2445a339b6a67
class CoreObject(object): <NEW_LINE> <INDENT> def __init__(self, coreRef, *args, **kwargs): <NEW_LINE> <INDENT> self.coreRef = coreRef <NEW_LINE> if hasattr(self, "onInit"): <NEW_LINE> <INDENT> self.onInit(*args, **kwargs)
Core Object A core object knows a reference to its core.
62598fbda219f33f346c69e9
class udp(packet_base.PacketBase): <NEW_LINE> <INDENT> _PACK_STR = '!HHHH' <NEW_LINE> _MIN_LEN = struct.calcsize(_PACK_STR) <NEW_LINE> _STR_CONVERT_RULE = {'csum': lambda value: '0x%x' % value} <NEW_LINE> def __init__(self, src_port, dst_port, total_length=0, csum=0): <NEW_LINE> <INDENT> super(udp, self).__init__() <NE...
UDP (RFC 768) header encoder/decoder class. An instance has the following attributes at least. Most of them are same to the on-wire counterparts but in host byte order. __init__ takes the correspondig args in this order. ============== ==================== Attribute Description ============== ===================...
62598fbd4f88993c371f05fa
class ManagedRuleSet(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'rule_set_type': {'required': True}, 'rule_set_version': {'required': True}, } <NEW_LINE> _attribute_map = { 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, 'rule_g...
Defines a managed rule set. All required parameters must be populated in order to send to Azure. :param rule_set_type: Required. Defines the rule set type to use. :type rule_set_type: str :param rule_set_version: Required. Defines the version of the rule set to use. :type rule_set_version: str :param rule_group_overr...
62598fbd442bda511e95c640
class EnvironmentAttributesTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.env = EnvironmentStub() <NEW_LINE> self.env.config.set('trac', 'base_url', 'https://trac.edgewall.org/some/path') <NEW_LINE> <DEDENT> def test_is_component_enabled(self): <NEW_LINE> <INDENT> self.assert...
Tests for attributes which don't require a real environment on disk, and therefore can be executed against an `EnvironmentStub` object (faster execution).
62598fbdbf627c535bcb1688
class CallSignature(Definition): <NEW_LINE> <INDENT> def __init__(self, evaluator, executable_name, bracket_start_pos, index, key_name_str): <NEW_LINE> <INDENT> super(CallSignature, self).__init__(evaluator, executable_name) <NEW_LINE> self._index = index <NEW_LINE> self._key_name_str = key_name_str <NEW_LINE> self._br...
`CallSignature` objects is the return value of `Script.function_definition`. It knows what functions you are currently in. e.g. `isinstance(` would return the `isinstance` function. without `(` it would return nothing.
62598fbd7b180e01f3e49141
class Gui: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.menu_def = [['Help', 'About...']] <NEW_LINE> self.layout = [ [sg.Menu(self.menu_def)], [sg.Radio('Import HTML', group_id="selectors", default=True, key='import_select', enable_events=True), sg.Radio('Import File', group_id="selectors", key='exp...
Create the GUI
62598fbd3539df3088ecc490
class FieldSelection(object): <NEW_LINE> <INDENT> def base_select(self): <NEW_LINE> <INDENT> return "select * from Field" <NEW_LINE> <DEDENT> def combine_queries(self, *queries, **kwargs): <NEW_LINE> <INDENT> combiners = kwargs.get("combiners", ()) <NEW_LINE> if len(combiners) != len(queries) - 1: <NEW_LINE> <INDENT> r...
Class for constructing SQL queries on the survey fields database. This class is for creating SQL queries to perform on the survey fields database. It does not actually perform the queries.
62598fbd167d2b6e312b7159
class Models(TestCase): <NEW_LINE> <INDENT> def test_validation(self): <NEW_LINE> <INDENT> TemplateFile(title="valid", name="tests/test.tex").full_clean() <NEW_LINE> with self.assertRaises(ValidationError): <NEW_LINE> <INDENT> TemplateFile(title="invalid", name="template/doesnt.exist").full_clean()
TeXTemplateFile contains the relative path to a tex template (e.g. django_tex/test.tex) and validates if this template can be loaded.abs Since TeXTemplateFile is an abstract base class, it is used here in a subclassed version 'TemplateFile'
62598fbd377c676e912f6e63
class IndicatorViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = IndicatorSerializer <NEW_LINE> queryset = Indicator.objects.all() <NEW_LINE> filter_backends = [DjangoFilterBackend] <NEW_LINE> filter_class = IndicatorFilter <NEW_LINE> filterset_fields = ['name', 'price__stock', 'price__date'] <NEW_...
Indicator stored in the db.
62598fbd796e427e5384e979
class Hbonds(Plugin): <NEW_LINE> <INDENT> enabled = True <NEW_LINE> order = 100 <NEW_LINE> create_command_subparser = True <NEW_LINE> def help(self): <NEW_LINE> <INDENT> return "Find and report hydrogen bonds in molecules" <NEW_LINE> <DEDENT> def process_parser(self): <NEW_LINE> <INDENT> p = self.command_subparsers['hb...
The core plugin to offer the 'Hbonds' command.
62598fbd283ffb24f3cf3a66
class MissingCookieError(TavernException): <NEW_LINE> <INDENT> pass
Tried to use a cookie in a request that was not present in the session cookie jar
62598fbd4f6381625f1995b3
class TweetAnalyzer(): <NEW_LINE> <INDENT> def tweets_to_dataframe(self, tweets): <NEW_LINE> <INDENT> df = pd.DataFrame(data = [tweet.full_text for tweet in tweets], columns = ["tweets"]) <NEW_LINE> df['id'] = np.array([tweet.id for tweet in tweets]) <NEW_LINE> df['len'] = np.array([len(tweet.full_text) for tweet in tw...
Functionality for analyzing and categorizing content from tweets
62598fbd55399d3f056266f9
class CapacityReservationProperties(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'last_sku_update': {'readonly': True}, 'min_capacity': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'last_sku_update': {'key': 'lastSkuUpdate', 'type': 'str'}, 'min_capacity': {'key': 'minCapacity', 'type': 'long...
The Capacity Reservation properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar last_sku_update: The last time Sku was updated. :vartype last_sku_update: str :ivar min_capacity: Minimum CapacityReservation value in GB. :vartype min_capacity: long
62598fbd56ac1b37e63023d2
class PortCache(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._ports = {} <NEW_LINE> self._waiters = {} <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self._ports) <NEW_LINE> <DEDENT> def get_port(self, origin): <NEW_LINE> <INDENT> if origin in self._ports: <NEW_LINE> ...
Caches created ports.
62598fbd2c8b7c6e89bd39a7
class RedFishTemplate(ZenDevice): <NEW_LINE> <INDENT> def __init__(self, record=None, username=None, password=None, url=None, priority=30, productionstate=None, additional_groups='', additional_systems='', location_override=None): <NEW_LINE> <INDENT> super(RedFishTemplate, self).__init__(record, username, password, url...
Set: exists name url username password priority productionstate groups systems deviceclass location Not Set: get_current_state_object implemented: True get_state_object implemented: True
62598fbd3346ee7daa33773a
class SQSClient(BaseAWSClient): <NEW_LINE> <INDENT> def __init__(self, region_name, aws_access_key_id, aws_secret_access_key, endpoint_url=None ): <NEW_LINE> <INDENT> self.__urls = {} <NEW_LINE> settings = dict( service='sqs', region_name=region_name, aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secre...
AWS SQS client
62598fbd3317a56b869be641
class SocialAuthTestsCase(unittest.TestCase): <NEW_LINE> <INDENT> SERVER_NAME = None <NEW_LINE> SERVER_PORT = None <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> client_kwargs = {} <NEW_LINE> if self.SERVER_NAME: <NEW_LINE> <INDENT> client_kwargs['SERVER_NAME'] = self.SERVER_NAME <NEW_LINE> <DEDENT...
Base class for social auth tests
62598fbdcc0a2c111447b1f2
class RefreshButton(Button): <NEW_LINE> <INDENT> def __init__(self, master, textwindow): <NEW_LINE> <INDENT> super().__init__(text='Speak again!', command=self.update) <NEW_LINE> self.textwindow = textwindow <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> self.textwindow.clear() <NEW_LINE> self.textwindow.wri...
Allows refreshing of the fortune
62598fbd3539df3088ecc492
class AverageMultipleIn(Actor): <NEW_LINE> <INDENT> def init(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @condition(action_input=['tem1','tem2','tem3'], action_output=['ip']) <NEW_LINE> def avg(self, temperature1, temperature2, temperature3): <NEW_LINE> <INDENT> if(temperature1[0] != 'ignore' and temperature2[0...
Divides input on port 'dividend' with input on port 'divisor' Inputs : tem1 : tem2 : tem3 : Output : ip:
62598fbd377c676e912f6e64
class Meta: <NEW_LINE> <INDENT> ordering = ('created',)
Define meta information for model.
62598fbd796e427e5384e97b
class YUV(tuple): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _fields = ('y', 'u', 'v') <NEW_LINE> def __new__(cls, y, u, v): <NEW_LINE> <INDENT> return tuple.__new__(cls, (y, u, v)) <NEW_LINE> <DEDENT> def _replace(self, **kw): <NEW_LINE> <INDENT> result = tuple.__new__(YUV, map(kw.pop, 'yuv', self)) <NEW_LINE> if k...
Named tuple representing luma and two chroma offsets
62598fbd71ff763f4b5e7960
class Student: <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def to_json(self): <NEW_LINE> <INDENT> return self.__dict__
class that defines a student
62598fbd656771135c489854
class ReverseProxyResourceConnector: <NEW_LINE> <INDENT> isLeaf = True <NEW_LINE> implements(resource.IResource) <NEW_LINE> def __init__(self, connector, path): <NEW_LINE> <INDENT> self.connector = connector <NEW_LINE> self.path = path <NEW_LINE> <DEDENT> def render(self, request): <NEW_LINE> <INDENT> request.received_...
Resource that renders the results gotten from another server Put this resource in the tree to cause everything below it to be relayed to a different server.
62598fbd099cdd3c636754d5
class AppServiceCertificatePatchResource(ProxyOnlyResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str...
Key Vault container ARM resource for a certificate that is purchased through Azure. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource Name. :vartype name: str :ivar kind: Kind of resource. :vartype kind: str :ivar type:...
62598fbdfff4ab517ebcd9cb
class Exhaustion(object): <NEW_LINE> <INDENT> def __init__(self, link, crossing=None): <NEW_LINE> <INDENT> if crossing is None: <NEW_LINE> <INDENT> crossing = random.choice(link.crossings) <NEW_LINE> <DEDENT> crossings = [crossing] <NEW_LINE> gluings = [[]] <NEW_LINE> frontier = set(crossing.crossing_strands()) <NEW_LI...
An exhaustion of a link where crossings are added in one-by-one so that the resulting tangle is connected at every stage. Starting at the given crossing, it uses a greedy algorithm to try to minimize the sizes of the frontiers of the intermediate tangles. If no initial crossing is specified, one is choosen at rando...
62598fbdcc40096d6161a2cc
class ObjectAnnotation: <NEW_LINE> <INDENT> def __init__(self, label, xmin, xmax, ymin, ymax): <NEW_LINE> <INDENT> self.label = label <NEW_LINE> self.xmin = xmin <NEW_LINE> self.xmax = xmax <NEW_LINE> self.ymin = ymin <NEW_LINE> self.ymax = ymax
Value object representing the annotation of a single object within an annotated image.
62598fbdf548e778e596b78d
class ModelMethodRequest(ModelRequest): <NEW_LINE> <INDENT> def post(self, selector, method): <NEW_LINE> <INDENT> instance = self.model.get_one(selector) <NEW_LINE> method = getattr(instance, method) <NEW_LINE> assert method.restful is not None <NEW_LINE> result = method(**{arg: lmd(self) for arg, lmd in method.restful...
/<resource>/<resource_id>/<method>
62598fbdbf627c535bcb168c
class DebugCustomFilter(logging.Filter): <NEW_LINE> <INDENT> def filter(self, record): <NEW_LINE> <INDENT> from .config import core, report <NEW_LINE> if record.levelname == "DEBUG": <NEW_LINE> <INDENT> return core.debug or int(report.verbosity) >= 1 <NEW_LINE> <DEDENT> if record.levelname == "DEBUG2": <NEW_LINE> <INDE...
A custom filter for debug message
62598fbd63d6d428bbee2998
class CallUnits(unittest.TestCase): <NEW_LINE> <INDENT> def testCase100(self): <NEW_LINE> <INDENT> resX = tdata + '/b/c/c.pod' + os.pathsep + tdata + '/b/c/c.py' + os.pathsep + tdata + '/b/c/c.pl' + os.pathsep + tdata + '/b/c/c.pm' <NEW_LINE> from filesysobjects import V3K <NEW_LINE> ...
Sets the specific data array and required parameters for test case.
62598fbd97e22403b383b0ef
class CommonFlat(Flat): <NEW_LINE> <INDENT> def __init__(self, node, test_directory): <NEW_LINE> <INDENT> self.common_params = {'output_file': ['', 'Missing output file'], 'golden_file': ['', ''], 'stdout_file': ['', '']} <NEW_LINE> self.test_directory = test_directory <NEW_LINE> Flat.__init__(self, node, self.common_p...
The class inheriting from Flat. Designed to handle common test parameters.
62598fbd0fa83653e46f50cc
class ConsoleAuthAPI(nova.openstack.common.rpc.proxy.RpcProxy): <NEW_LINE> <INDENT> BASE_RPC_API_VERSION = '1.0' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(ConsoleAuthAPI, self).__init__( topic=CONF.consoleauth_topic, default_version=self.BASE_RPC_API_VERSION) <NEW_LINE> <DEDENT> def authorize_console(sel...
Client side of the consoleauth rpc API. API version history: 1.0 - Initial version. 1.1 - Added get_backdoor_port()
62598fbd7d847024c075c5a5
class ChatTitleEmpty(BadRequest): <NEW_LINE> <INDENT> ID = "CHAT_TITLE_EMPTY" <NEW_LINE> MESSAGE = __doc__
The chat title is empty
62598fbda05bb46b3848aa53
class RitaLexer(RegexLexer): <NEW_LINE> <INDENT> name = 'Rita' <NEW_LINE> filenames = ['*.rita'] <NEW_LINE> aliases = ['rita'] <NEW_LINE> mimetypes = ['text/rita'] <NEW_LINE> tokens = { 'root': [ (r'\n', Whitespace), (r'\s+', Whitespace), (r'#(.*?)\n', Comment.Single), (r'@(.*?)\n', Operator), (r'"(\w|\d|\s|(\\")|[\'_\...
Lexer for `RITA <https://github.com/zaibacu/rita-dsl>`_ .. versionadded:: 2.11
62598fbdad47b63b2c5a7a3e
class LogEngine(BaseEngine): <NEW_LINE> <INDENT> def __init__(self, main_engine: MainEngine, event_engine: EventEngine): <NEW_LINE> <INDENT> super(LogEngine, self).__init__(main_engine, event_engine, "log") <NEW_LINE> if not SETTINGS["log.active"]: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.level = SETTINGS["l...
Processes log event and output with logging module.
62598fbd3617ad0b5ee0632f
class DjangoAdminSettingsDirectory(AdminScriptTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.write_settings('settings', is_dir=True) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.remove_settings('settings', is_dir=True) <NEW_LINE> <DEDENT> def test_setup_environ(self): <NEW_...
A series of tests for django-admin.py when the settings file is in a directory. (see #9751).
62598fbd5166f23b2e2435c7
class Poisson: <NEW_LINE> <INDENT> def __init__(self, data=None, lambtha=1.): <NEW_LINE> <INDENT> if not data: <NEW_LINE> <INDENT> if lambtha <= 0: <NEW_LINE> <INDENT> raise ValueError('lambtha must be a positive value') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.lambtha = lambtha/1.0 <NEW_LINE> <DEDENT> <DEDEN...
A class
62598fbd7cff6e4e811b5c0c
class Robot(object): <NEW_LINE> <INDENT> mov_d = {0: (0, 1), 1: (1, 0), 2: (0, -1), 3: (-1, 0)} <NEW_LINE> def __init__(self, x, y, dir): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.dir = dir <NEW_LINE> <DEDENT> def mov(self): <NEW_LINE> <INDENT> self.x += Robot.mov_d[self.dir][0] <NEW_LINE> se...
题目隐藏了Robot的一种重要参数 abs direction, 即为当前robot朝那个方向: 我们定位为 0 x轴向右, j+1 1 y轴向下, i+1 2 x轴向左, j-1 3 y轴向上, i-1
62598fbd167d2b6e312b715f
class IRATUpdateView(LoginRequiredMixin, PermissionMixin, UpdateView): <NEW_LINE> <INDENT> model = TBLSession <NEW_LINE> template_name = 'irat/irat.html' <NEW_LINE> form_class = IRATForm <NEW_LINE> permissions_required = ['crud_tests'] <NEW_LINE> def get_discipline(self): <NEW_LINE> <INDENT> discipline = Discipline.obj...
Update the iRAT duration and weight
62598fbd5fcc89381b266241
class ProjectVariationDelete(UserPassesTestMixin, DeleteView): <NEW_LINE> <INDENT> model = Variation <NEW_LINE> template_name = 'dashboard/project_variation_confirm_delete.html' <NEW_LINE> success_message = 'Variation deleted successfully.' <NEW_LINE> def test_func(self, *args, **kwargs): <NEW_LINE> <INDENT> variation ...
Delete a particular a variation record from the current project
62598fbd76e4537e8c3ef78f
class NotWordExpression: <NEW_LINE> <INDENT> def __init__(self, exp): <NEW_LINE> <INDENT> self.exp = exp <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'NotWordExpression({})'.format(self.exp) <NEW_LINE> <DEDENT> def eval(self): <NEW_LINE> <INDENT> all_par = set(Paragraph.objects.all()) <NEW_LINE> e...
Represents NOT expression
62598fbd7047854f4633f5bd
class Adapter(Target): <NEW_LINE> <INDENT> def __init__(self: Adapter, target_object: Adaptee) -> None: <NEW_LINE> <INDENT> self._target_object = target_object <NEW_LINE> <DEDENT> def method_1(self: Adapter) -> None: <NEW_LINE> <INDENT> self._target_object.method_adaptee_1() <NEW_LINE> <DEDENT> def method_2(self: Adapt...
Объект, заменяющий целевой объект.
62598fbd71ff763f4b5e7964
class PasswordChanger(object): <NEW_LINE> <INDENT> def __init__(self, osclients_o=None): <NEW_LINE> <INDENT> if not osclients_o: <NEW_LINE> <INDENT> osclients_o = osclients.OpenStackClients() <NEW_LINE> <DEDENT> if 'KEYSTONE_ADMIN_ENDPOINT' in os.environ: <NEW_LINE> <INDENT> osclients_o.override_endpoint( 'identity', o...
Class to change/reset the password of any user
62598fbdf548e778e596b790
class NumpyBaseEstimator: <NEW_LINE> <INDENT> def _fit_validation(self, X, y): <NEW_LINE> <INDENT> assert isinstance(X, Iterable) and isinstance(y, Iterable) <NEW_LINE> assert len(X) == len(y) <NEW_LINE> X = X if isinstance(X, np.ndarray) else np.array(X) <NEW_LINE> y = y if isinstance(y, np.ndarray) else np.array(y) <...
Numpy estimator base class for all numpy estimator.
62598fbdadb09d7d5dc0a766
class BBCodeCheck(TargetCheck): <NEW_LINE> <INDENT> check_id = 'bbcode' <NEW_LINE> name = _('Mismatched BBcode') <NEW_LINE> description = _('BBcode in translation does not match source') <NEW_LINE> severity = 'warning' <NEW_LINE> def check_single(self, source, target, unit, cache_slot): <NEW_LINE> <INDENT> src_match = ...
Check for matching bbcode tags.
62598fbd7d43ff24874274f9
class LabelDomainUtilsMixin(models.Model): <NEW_LINE> <INDENT> @property <NEW_LINE> def pretty_name(self): <NEW_LINE> <INDENT> return self.fqdn <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(LabelDomainUtilsMixin, se...
This class provides common functionality that many DNS record classes share. If you plan on using the ``unique_together`` constraint on a Model that inherits from ``LabelDomainUtilsMixin`` or ``LabelDomainMixin``, you must include ``domain`` and ``label`` explicitly if you need them to. All common records have an ``f...
62598fbd099cdd3c636754d7
class ShellExampleTests(PyFlinkTestCase): <NEW_LINE> <INDENT> def test_batch_case(self): <NEW_LINE> <INDENT> from pyflink.shell import b_env, bt_env, FileSystem, OldCsv, DataTypes, Schema <NEW_LINE> import tempfile <NEW_LINE> import os <NEW_LINE> import shutil <NEW_LINE> sink_path = tempfile.gettempdir() + '/batch.csv'...
If these tests failed, please fix these examples code and copy them to shell.py
62598fbd97e22403b383b0f2
class Keywordtopic20(AbstructFeature): <NEW_LINE> <INDENT> DIMNUM = 20 <NEW_LINE> key = f"Keywordtopic{DIMNUM}" <NEW_LINE> def create_features(self): <NEW_LINE> <INDENT> topic_texts_pairs = defaultdict(list) <NEW_LINE> for k in TOPIC_KEYWORDS.keys(): <NEW_LINE> <INDENT> topic_texts_pairs[k] = train[train.topic_keyword ...
keyword単位でツイート集合を作ってトピックモデリングからベクトルを取得 Args: AbstructFeature ([type]): [description]
62598fbda8370b77170f05ca
class ShowBootvarSchema(MetaParser): <NEW_LINE> <INDENT> pass
Schema for show bootvar
62598fbdd268445f26639c79
class Pluginmanager: <NEW_LINE> <INDENT> def __init__(self, quickload=False): <NEW_LINE> <INDENT> self.p_mgr = None <NEW_LINE> self.plugins = None <NEW_LINE> self.plugins_loaded = False <NEW_LINE> if quickload: <NEW_LINE> <INDENT> self.load_plugins() <NEW_LINE> <DEDENT> <DEDENT> def load_plugins(self): <NEW_LINE> <INDE...
A very simple plugin manager.
62598fbdcc40096d6161a2ce
class PullRequestMergeStatus(github.GithubObject.BasicGithubObject): <NEW_LINE> <INDENT> @property <NEW_LINE> def merged(self): <NEW_LINE> <INDENT> return self._NoneIfNotSet(self._merged) <NEW_LINE> <DEDENT> @property <NEW_LINE> def message(self): <NEW_LINE> <INDENT> return self._NoneIfNotSet(self._message) <NEW_LINE> ...
This class represents PullRequestMergeStatuss as returned for example by http://developer.github.com/v3/todo
62598fbd8a349b6b43686428
class SubredditInfoBar(CachedTemplate): <NEW_LINE> <INDENT> def __init__(self, site = None): <NEW_LINE> <INDENT> site = site or c.site <NEW_LINE> self.sr = list(wrap_links(site))[0] <NEW_LINE> target = "_top" if c.cname else None <NEW_LINE> self.description_usertext = UserText(self.sr, self.sr.description, target=targe...
When not on Default, renders a sidebox which gives info about the current reddit, including links to the moderator and contributor pages, as well as links to the banning page if the current user is a moderator.
62598fbd091ae35668704e0f
class Enclosure(models.Model): <NEW_LINE> <INDENT> href = models.CharField(max_length=1000) <NEW_LINE> file_type = models.CharField(max_length=1000) <NEW_LINE> length = models.TextField() <NEW_LINE> entry = models.ForeignKey( Entry, on_delete=models.CASCADE, related_name="enclosures" ) <NEW_LINE> def __str__(self): <NE...
A media file. TODO can this just be removed?
62598fbd851cf427c66b84a1
class Pinnwand(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> file = open("pinnwand.dmp", 'rb') <NEW_LINE> <DEDENT> except FileNotFoundError: <NEW_LINE> <INDENT> print("Datei konnte nicht gefunde werden. Erstelle Datei...") <NEW_LINE> <DEDENT> try : <NEW_LINE> <INDENT> self.__no...
Dies ist eine Klasse um Notizen zu verwalten
62598fbda05bb46b3848aa57
class Pattern(object): <NEW_LINE> <INDENT> def __init__(self, ptn, flags=0): <NEW_LINE> <INDENT> if isinstance(ptn, (str, bytes)): <NEW_LINE> <INDENT> self._re = re.compile(ptn, flags=flags) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._re = ptn <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def pattern(self):...
Wraps the SRE_Pattern object returned by re.
62598fbd97e22403b383b0f4
class CliResult: <NEW_LINE> <INDENT> def __init__(self, completed_process): <NEW_LINE> <INDENT> self.completed_process = completed_process <NEW_LINE> self.returncode = completed_process.returncode <NEW_LINE> self.stdout = self.completed_process.stdout.decode('utf-8') <NEW_LINE> self.stderr = self.completed_process.stde...
Wraps CompletedProcess, decodes output to strings
62598fbd5fdd1c0f98e5e17d
class FileContentSerializer(SingleArtifactContentUploadSerializer, ContentChecksumSerializer): <NEW_LINE> <INDENT> def deferred_validate(self, data): <NEW_LINE> <INDENT> data = super().deferred_validate(data) <NEW_LINE> data["digest"] = data["artifact"].sha256 <NEW_LINE> content = FileContent.objects.filter( digest=dat...
Serializer for File Content.
62598fbdd486a94d0ba2c1bb
class LeNet5(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(LeNet5, self).__init__() <NEW_LINE> self.model = None <NEW_LINE> self.c1 = C1() <NEW_LINE> self.c2_1 = C2() <NEW_LINE> self.c2_2 = C2() <NEW_LINE> self.c3 = C3() <NEW_LINE> self.f4 = F4() <NEW_LINE> self.f5 = F5() <NEW_LINE> <DED...
Input - 1x32x32 Output - 10
62598fbd56ac1b37e63023da
class ProvisionListView(ListView): <NEW_LINE> <INDENT> model = Provision <NEW_LINE> template_name = 'provision_list.html' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> self.queryset = self.model.objects.filter(returned=False, approved=True) <NEW_LINE> return super(ProvisionListView, self).get_queryset()
View for list of provisions to mark returned from
62598fbdad47b63b2c5a7a42
class DDPGAlgorithm(Algorithm): <NEW_LINE> <INDENT> def __init__(self, obs_dim, vel_obs_dim, act_dim, GAMMA, TAU, gpu_id, ensemble_num=1): <NEW_LINE> <INDENT> self.obs_dim = obs_dim <NEW_LINE> self.vel_obs_dim = vel_obs_dim <NEW_LINE> self.act_dim = act_dim <NEW_LINE> self.GAMMA, self.TAU = GAMMA, TAU <NEW_LINE> self.g...
Multi head version DDPG algorithm
62598fbdcc40096d6161a2cf
class TestApiUserFactory(AbstractUserFactory): <NEW_LINE> <INDENT> username = TEST_API_USER <NEW_LINE> is_active = True
Factory for creating basic user `test_api_user`.
62598fbd57b8e32f52508213
class TestXmlNs0JdbcDriver(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testXmlNs0JdbcDriver(self): <NEW_LINE> <INDENT> pass
XmlNs0JdbcDriver unit test stubs
62598fbd21bff66bcd722e56
class VirtualNetworkListUsageResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, next_link: Op...
Response for the virtual networks GetUsage API service call. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: VirtualNetwork usage stats. :vartype value: list[~azure.mgmt.network.v2019_12_01.models.VirtualNetworkUsage] :param next_link: The URL to get the next set o...
62598fbdf548e778e596b793
class ObjectClass(): <NEW_LINE> <INDENT> def __init__(self, object_name, on, is_heavier_than): <NEW_LINE> <INDENT> self.object_name = object_name <NEW_LINE> self.setState(on, is_heavier_than) <NEW_LINE> <DEDENT> def setState(self, on, is_heavier_than): <NEW_LINE> <INDENT> self.on = on <NEW_LINE> self.is_heavier_than = ...
Object Class that holds a name and a state
62598fbd4a966d76dd5ef0c0
class RagMarwa(ConcreteScale): <NEW_LINE> <INDENT> def __init__(self, tonic=None): <NEW_LINE> <INDENT> super(RagMarwa, self).__init__(tonic=tonic) <NEW_LINE> self._abstract = AbstractRagMarwa() <NEW_LINE> self.type = 'Rag Marwa'
A concrete pseudo-raga scale. >>> sc = scale.RagMarwa('c2') this gets a pitch beyond the terminus b/c of descending form max >>> [str(p) for p in sc.pitches] ['C2', 'D-2', 'E2', 'F#2', 'A2', 'B2', 'A2', 'C3', 'D-3']
62598fbda219f33f346c69f3
class FalsePositive4657: <NEW_LINE> <INDENT> __attr_a = None <NEW_LINE> __attr_b = 'b' <NEW_LINE> @classmethod <NEW_LINE> def load_attrs(cls): <NEW_LINE> <INDENT> cls.__attr_a = 'a' <NEW_LINE> <DEDENT> @property <NEW_LINE> def attr_a(self): <NEW_LINE> <INDENT> return self.__attr_a <NEW_LINE> <DEDENT> @property <NEW_LIN...
False positivie tests for 4657
62598fbd66673b3332c305bf
class ApproximateQAgent(PacmanQAgent): <NEW_LINE> <INDENT> def __init__(self, extractor='IdentityExtractor', **args): <NEW_LINE> <INDENT> self.featExtractor = util.lookup(extractor, globals())() <NEW_LINE> PacmanQAgent.__init__(self, **args) <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_LINE> self.weights = util.Counter() <...
ApproximateQLearningAgent You should only have to overwrite getQValue and update. All other QLearningAgent functions should work as is.
62598fbd97e22403b383b0f5
class DesiredCapabilities(object): <NEW_LINE> <INDENT> FIREFOX = { "browserName": "firefox", "marionette": True, "acceptInsecureCerts": True, } <NEW_LINE> INTERNETEXPLORER = { "browserName": "internet explorer", "version": "", "platform": "WINDOWS", } <NEW_LINE> EDGE = { "browserName": "MicrosoftEdge", "version": "", "...
Set of default supported desired capabilities. Use this as a starting point for creating a desired capabilities object for requesting remote webdrivers for connecting to selenium server or selenium grid. Usage Example:: from selenium import webdriver selenium_grid_url = "http://198.0.0.1:4444/wd/hub" #...
62598fbd50812a4eaa620ce1
class SmsResource(BaseResource): <NEW_LINE> <INDENT> routes = ['/sale/<sale_id>/send_coupon_sms'] <NEW_LINE> method_decorators = [login_required, store_provider] <NEW_LINE> def _send_sms(self, to, message): <NEW_LINE> <INDENT> config = get_config() <NEW_LINE> sid = config.get('Twilio', 'sid') <NEW_LINE> secret = config...
SMS RESTful resource.
62598fbd60cbc95b0636452b
class BotCollectState(BotState): <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> BotState.__init__(self, bot) <NEW_LINE> self.prev_target = None <NEW_LINE> self.target = None <NEW_LINE> self.path = [] <NEW_LINE> self.pwrup_table = [] <NEW_LINE> self.snake = bot.snake <NEW_LINE> self.game = bot.game <NE...
State class implementing the 'Collect State' in which the AI is attempting to collect powerups.
62598fbd2c8b7c6e89bd39ae
class RunTests(Command): <NEW_LINE> <INDENT> description = 'run tests' <NEW_LINE> user_options = [] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finalize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> errno = call(['py.test', '...
Run all tests.
62598fbd5fdd1c0f98e5e17f
class BadRequest(Exception): <NEW_LINE> <INDENT> def __init__(self, msg: str = None) -> None: <NEW_LINE> <INDENT> msg = msg if msg else "" <NEW_LINE> super(BadRequest, self).__init__(msg)
BadRequest raises if the job was not found / does not exist.
62598fbd9f28863672818972
class MP4StorageStyle(StorageStyle): <NEW_LINE> <INDENT> formats = ['MP4'] <NEW_LINE> def serialize(self, value): <NEW_LINE> <INDENT> value = super(MP4StorageStyle, self).serialize(value) <NEW_LINE> return value
A general storage style for MPEG-4 tags.
62598fbd3d592f4c4edbb0ac
@register_node <NEW_LINE> class LoweredFunc(NodeBase): <NEW_LINE> <INDENT> MixedFunc = 0 <NEW_LINE> HostFunc = 1 <NEW_LINE> DeviceFunc = 2
Represent a LoweredFunc in TVM.
62598fbdcc40096d6161a2d0
class ISCSIError(RESTError): <NEW_LINE> <INDENT> message = 'Error starting iSCSI target' <NEW_LINE> def __init__(self, error_msg, exit_code, stdout, stderr): <NEW_LINE> <INDENT> details = ('Error starting iSCSI target: {0}. Failed with exit code ' '{1}. stdout: {2}. stderr: {3}') <NEW_LINE> details = details.format(err...
Error raised when an image cannot be written to a device.
62598fbd99fddb7c1ca62ee3
class PropertyName(Base, OrmUtil): <NEW_LINE> <INDENT> __tablename__ = 'property_name' <NEW_LINE> id = Column(INTEGER, primary_key=True, nullable=False, autoincrement=True) <NEW_LINE> property_name = Column(CHAR(240), nullable=False) <NEW_LINE> category_id = Column(INTEGER, ForeignKey('property_category.id'), nullable=...
new named properties - property names
62598fbecc0a2c111447b1fc
class Supplier(models.Model): <NEW_LINE> <INDENT> SUPPLY_STATUS_CHOICES = ( (0, '停用'), (1, '启用') ) <NEW_LINE> SUPPLY_TYPE_CHOICES = ( (0, '内部单位'), (1, '外部单位') ) <NEW_LINE> id = models.AutoField(primary_key=True) <NEW_LINE> supply_identify = models.CharField(max_length=7, unique=True, verbose_name='供应商编码') <NEW_LINE> su...
供应商
62598fbe442bda511e95c64c
@python_2_unicode_compatible <NEW_LINE> class BallotItem(models.Model, ReverseLookupStringMixin): <NEW_LINE> <INDENT> CONTEST_TYPES = ( ('R', 'Referendum'), ('O', 'Office'), ) <NEW_LINE> contest_type = models.CharField( max_length=1, choices=CONTEST_TYPES, help_text='Office if the contest is for a person, referendum if...
A single referendum or candidate office which appears on a voter's Ballot.
62598fbe66673b3332c305c1
class Table (object): <NEW_LINE> <INDENT> def __init__(self, sep = ' '): <NEW_LINE> <INDENT> self.__cols = list() <NEW_LINE> self.__width = list() <NEW_LINE> self.__sep = sep <NEW_LINE> <DEDENT> def addRow(self, *row): <NEW_LINE> <INDENT> row = [ str(item) for item in row ] <NEW_LINE> len_row = [ len(item) for i...
Text based table. The number of columns and the width of each column is automatically calculated.
62598fbebf627c535bcb1694
class django_language(object): <NEW_LINE> <INDENT> def __enter__(self): <NEW_LINE> <INDENT> if django_translation is None: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> current_lang = django_translation.get_language() <NEW_LINE> if current_lang != 'en': <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> activate(current_lan...
a context manager for easy language switching in Django. Usage:: with django_language(): humanize.whatever(…) And that's all. It runs activate with the current django language in the current thread.
62598fbe5fcc89381b266244
class Condition(object): <NEW_LINE> <INDENT> def __init__(self, length=0): <NEW_LINE> <INDENT> self._condition = np.zeros(length) <NEW_LINE> <DEDENT> def add(self, arg, unit=1.0): <NEW_LINE> <INDENT> self._condition = np.hstack((self._condition, arg / unit)) <NEW_LINE> <DEDENT> def equal(self, arg1, arg2, unit=1.0): <N...
OpenGoddard.optimize Condition class thin wrappper of numpy zeros and hstack Examples: for examples in equality function. Initial condtion : x[0] = 0.0 Termination Condition : x[-1] = 100 >>> result = Condition() >>> result.equal(x[0], 0.0) >>> result.equal(x[-1], 100) >>> return result...
62598fbeec188e330fdf8a81
class Rankstr(CMakePackage): <NEW_LINE> <INDENT> homepage = "https://github.com/ecp-veloc/rankstr" <NEW_LINE> url = "https://github.com/ecp-veloc/rankstr/archive/v0.0.3.tar.gz" <NEW_LINE> git = "https://github.com/ecp-veloc/rankstr.git" <NEW_LINE> tags = ['ecp'] <NEW_LINE> version('main', branch='main') <NEW...
Assign one-to-one mapping of MPI ranks to strings
62598fbe26068e7796d4cb4b
class TimeBasedStopCondition(StopCondition): <NEW_LINE> <INDENT> def __init__(self, max_time): <NEW_LINE> <INDENT> self.max_time = max_time <NEW_LINE> <DEDENT> def should_stop(self, abs_seconds, rel_seconds, sensor_graph): <NEW_LINE> <INDENT> return rel_seconds >= self.max_time <NEW_LINE> <DEDENT> @classmethod <NEW_LIN...
Stop the simulation after a fixed period of time. This time is relative to the call to `run` so the simulation may be continued over multiple run calls, each of which lasts for max_time seconds. Args: max_time (int): The maximum number of seconds to run the simulation for.
62598fbef548e778e596b796
class ResampledFieldGridWarperLayer(GridWarperLayer): <NEW_LINE> <INDENT> def __init__(self, source_shape, output_shape, coeff_shape, field_transform=None, resampler=None, name='resampling_interpolated_spline_grid_warper'): <NEW_LINE> <INDENT> if resampler==None: <NEW_LINE> <INDENT> self._resampler=ResamplerLayer(inter...
The resampled field grid warper defines a grid based on sampling coordinate values from a spatially varying displacement field (passed as a tensor input) along an affine grid pattern in the field. This enables grids representing small patches of a larger transform, as well as the composition of multiple transforms bef...
62598fbe3346ee7daa337740
class CommentForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Comments <NEW_LINE> fields = ('text', ) <NEW_LINE> widgets = { 'text': SummernoteWidget(), }
Форма добавления комментария к требованию
62598fbe5fdd1c0f98e5e182
class MailboxTileSource(pager.DataSource): <NEW_LINE> <INDENT> __gtype_name__ = 'PisakEmailMailboxTileSource' <NEW_LINE> __gproperties__ = { 'mailbox': ( str, '', '', '', GObject.PARAM_READWRITE) } <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._mailbox = None <NEW_LINE> now = dat...
Data source that provides tiles representing messages in various email mailboxes.
62598fbee1aae11d1e7ce91d
class XRay(NCNRLoader): <NEW_LINE> <INDENT> instrument = "X-ray" <NEW_LINE> radiation = "xray" <NEW_LINE> wavelength = 1.5416 <NEW_LINE> dLoL = 1e-3/wavelength <NEW_LINE> d_s1 = 275.5 <NEW_LINE> d_s2 = 192.5 <NEW_LINE> d_s3 = 175.0 <NEW_LINE> d_detector = None
Instrument definition for NCNR X-ray reflectometer. Normal dT is in the range 2e-5 to 3e-4. Slits are fixed throughout the experiment in one of a few preconfigured openings. Please update this file with the standard configurations when you find them. You can choose to ignore the geometric calculation entirely by se...
62598fbe44b2445a339b6a6e
class NamespacedCommand(BaseCommand): <NEW_LINE> <INDENT> @property <NEW_LINE> def commands(self): <NEW_LINE> <INDENT> if not hasattr(self, "_commands"): <NEW_LINE> <INDENT> self._commands = {} <NEW_LINE> for _ in reversed(self.__class__.mro()): <NEW_LINE> <INDENT> self._commands.update( { name: cmd_cls for name, cmd_c...
Namespaced django command implementation.
62598fbe57b8e32f52508215
class UpdateOwnStatus(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> if request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return obj.user_profile.id == request.user.id
Allow users to edit their own status
62598fbe091ae35668704e15
class Meta: <NEW_LINE> <INDENT> db_table = 'vacancies'
Model's metaclass.
62598fbe1f5feb6acb162e10
class LinkEncode(object): <NEW_LINE> <INDENT> def __init__(self, length=DEFAULT_LENGTH): <NEW_LINE> <INDENT> self.params = [] <NEW_LINE> self.encode_mapping = string.ascii_letters + string.digits <NEW_LINE> self.length = length <NEW_LINE> self.base = len(self.encode_mapping) <NEW_LINE> <DEDENT> def add(self, param): <N...
>>> encode = LinkEncode() >>> encode.add('127.0.0.1') >>> encode.add(time.time()) >>> encode.hexdigest()
62598fbe7b180e01f3e49148
class RunConfig: <NEW_LINE> <INDENT> cases_path = os.path.join(PRO_PATH, "test_dir") <NEW_LINE> uat_url = "uat-api.3ona.co" <NEW_LINE> prd_url="api.crypto.com" <NEW_LINE> rerun = "1" <NEW_LINE> max_fail = "5" <NEW_LINE> NEW_REPORT = None <NEW_LINE> DATA_LOCATION=os.path.join(PRO_PATH, "data", "cyprto_test_data.xls") <N...
运行测试配置
62598fbe66673b3332c305c3