code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class RestClientError(Exception): <NEW_LINE> <INDENT> def __init__(self, status, name="ERR_INTERNAL", message=None): <NEW_LINE> <INDENT> super(RestClientError, self).__init__(message) <NEW_LINE> self.code = status <NEW_LINE> self.name = name <NEW_LINE> self.msg = message <NEW_LINE> if status in http_client.responses: <...
Exception for ZFS REST API client errors.
62599061be8e80087fbc0752
class AlexaRefreshToken(HttpRunner): <NEW_LINE> <INDENT> config = ( Config("Alexa 使用 refresh token 重新获取 access token") .variables(**{ "client_id": alexa_settings.client_id }) ) <NEW_LINE> teststeps = [ Step( RunRequest("Alexa 使用 refresh token 重新获取 access token") .with_variables(**{"api": "${get_api_from_orm_by_name(ale...
Refresh access token assigned by vesync with refresh token. Config Variables: - refresh_token (str): required - client_id (str): optional, default to 'alexa_settings.client_id' Export Variables: - access_token (str)
62599061f548e778e596cc55
class ProviderTopology(JujuTopology): <NEW_LINE> <INDENT> @property <NEW_LINE> def scrape_identifier(self): <NEW_LINE> <INDENT> return "juju_{}_prometheus_scrape".format( "_".join([self.model, self.model_uuid[:7], self.application, self.charm_name]) )
Class for initializing topology information for MetricsEndpointProvider.
625990617cff6e4e811b7112
class ClassifierBaseSGD(BaseSGD, ClassifierMixin): <NEW_LINE> <INDENT> def __init__(self, loss="hinge", penalty='l2', alpha=0.0001, rho=0.85, fit_intercept=True, n_iter=5, shuffle=False, verbose=0, n_jobs=1): <NEW_LINE> <INDENT> super(ClassifierBaseSGD, self).__init__(loss=loss, penalty=penalty, alpha=alpha, rho=rho, f...
Base class for dense and sparse classification using SGD.
6259906155399d3f05627bec
class ProductionConfig(BaseConfig): <NEW_LINE> <INDENT> SECRET_KEY = 'my_precious' <NEW_LINE> DEBUG = False <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@host:port/database' <NEW_LINE> DEBUG_TB_ENABLED = False <NEW_LINE> config_path = os.path.join(basedir, 'instance', 'production.cfg') <NEW_LINE>...
Production configuration.
625990613617ad0b5ee0781b
class LoadBalancer(resource.Resource): <NEW_LINE> <INDENT> PROPERTIES = ( POOL_ID, PROTOCOL_PORT, MEMBERS, ) = ( 'pool_id', 'protocol_port', 'members', ) <NEW_LINE> properties_schema = { POOL_ID: properties.Schema( properties.Schema.STRING, _('The ID of the load balancing pool.'), required=True, update_allowed=True ), ...
A resource to link a neutron pool with servers.
6259906145492302aabfdba7
class Plugin(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.pid = None <NEW_LINE> <DEDENT> def run(self, url, checks, output, auth): <NEW_LINE> <INDENT> return NotImplementedError("Method has not been implemented") <NEW_LINE> <DEDENT> def __exec_process__(sel...
Represents the base methods a Plugin must implement.
6259906167a9b606de547608
@route(r"/") <NEW_LINE> class Index(RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> path = os.path.join(self.settings['root_path'], 'README.md') <NEW_LINE> html = '' <NEW_LINE> if os.path.isfile(path): <NEW_LINE> <INDENT> md_file = open(path) <NEW_LINE> md = md_file.read() <NEW_LINE> md_file.clo...
喵星人 wiki
625990614f88993c371f1085
class JSONStorage(Storage): <NEW_LINE> <INDENT> def __init__(self, path, create_dirs=False, **kwargs): <NEW_LINE> <INDENT> super(JSONStorage, self).__init__() <NEW_LINE> touch(path, create_dirs=create_dirs) <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self._handle = open(path, 'r+') <NEW_LINE> <DEDENT> def close(self): <...
Store the data in a JSON file.
625990618a43f66fc4bf385c
class NetAppsSecureDyn(LEDMTree): <NEW_LINE> <INDENT> def __init__(self, data=ledm_templates.NET_APPS_SECURE_DYN): <NEW_LINE> <INDENT> super().__init__(data) <NEW_LINE> <DEDENT> @property <NEW_LINE> def state(self): <NEW_LINE> <INDENT> return self.get("State") <NEW_LINE> <DEDENT> @state.setter <NEW_LINE> def state(self...
NetAppsDyn tree /DevMgmt/NetAppsSecureDyn.xml
6259906156b00c62f0fb3f98
class WizardGenerarContabilidad(models.TransientModel): <NEW_LINE> <INDENT> _name = 'saving.wizard.generate.accounting' <NEW_LINE> _description = 'Asistente Generar Contabilidad' <NEW_LINE> @api.multi <NEW_LINE> def generate_accounting(self): <NEW_LINE> <INDENT> context = dict(self._context or {}) <NEW_LINE> active_ids...
DCLS
6259906116aa5153ce401ba9
class ActionParameterType(models.Model): <NEW_LINE> <INDENT> name = models.CharField( max_length=64, verbose_name=_('Action parameter type'), ) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.name
Defines the type of parameter the ``ActionParameter`` model stores. e.g. "amount" for an ``Action`` called "payment sent".
625990618e7ae83300eea75a
class KB(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, stopper, q): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.q = q <NEW_LINE> self.stopper = stopper <NEW_LINE> self.listener = keyboard.Listener(on_press=self.on_press) <NEW_LINE> <DEDENT> def on_press(self, key): <NEW_LINE> <INDENT...
Threaded Keyboard Event detection handling thread. Parameters: (1) stopper : threaded event for stopping threads (2) q : the queue to place the keyboard stuff too
62599061fff4ab517ebceef4
class TwitterTimelineExtractor(TwitterExtractor): <NEW_LINE> <INDENT> subcategory = "timeline" <NEW_LINE> pattern = (BASE_PATTERN + r"/(?!search)(?:([^/?#]+)/?(?:$|[?#])" r"|i(?:/user/|ntent/user\?user_id=)(\d+))") <NEW_LINE> test = ( ("https://twitter.com/supernaturepics", { "range": "1-40", "url": "c570ac1aae38ed1463...
Extractor for Tweets from a user's timeline
625990617d43ff2487427f76
class QuotaRequestOneResourceSubmitResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'message': {'readonly': True}, 'request_submit_time': {'readonly': True}, } <NEW_LINE> ...
Response for the quota submission request. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The quota request ID. :vartype id: str :ivar name: The name of the quota request. :vartype name: str :ivar type: Type of resource. "Microsoft.Capacity/ServiceLimits". :vartype t...
62599061627d3e7fe0e08558
class FlyBehavior(): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @abc.abstractmethod <NEW_LINE> def fly(self): <NEW_LINE> <INDENT> return
FlyBehavior :param:nothing
6259906144b2445a339b74c7
class BilinearResizeLayer(Layer): <NEW_LINE> <INDENT> def __init__(self, LayerParameter): <NEW_LINE> <INDENT> super(BilinearResizeLayer, self).__init__(LayerParameter) <NEW_LINE> param = LayerParameter.resize_param <NEW_LINE> dsize = [int(dim) for dim in param.shape.dim] if param.HasField('shape') else None ...
The implementation of ``BilinearResizeLayer``. Parameters ---------- shape : caffe_pb2. BlobShape The output shape. Refer `ResizeParameter.shape`_. fx : float The scale factor of height. Refer `ResizeParameter.fx`_. fy : float The scale factor of width. Refer `ResizeParameter.fy`_.
62599061097d151d1a2c273d
class Game(): <NEW_LINE> <INDENT> def __init__(self, name, width, height): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.running = True <NEW_LINE> self.frame = 0 <NEW_LINE> pygame.display.init() <NEW_LINE> pygame.font.init() <NEW_LINE> pygame.display....
Game is an abstract base class to manage basic game concepts
625990613cc13d1c6d466e10
class CmdPlayers(MuxCommand): <NEW_LINE> <INDENT> key = "@players" <NEW_LINE> aliases = ["@listplayers"] <NEW_LINE> locks = "cmd:perm(listplayers) or perm(Wizards)" <NEW_LINE> help_category = "System" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> caller = self.caller <NEW_LINE> if self.args and self.args.isdigit(): <N...
list all registered players Usage: @players [nr] Lists statistics about the Players registered with the game. It will list the <nr> amount of latest registered players If not given, <nr> defaults to 10.
625990614e4d562566373ad5
class GuessEval(messages.Message): <NEW_LINE> <INDENT> guessEval = messages.StringField(1) <NEW_LINE> gameState = messages.StringField(2) <NEW_LINE> firstPlayerHistory = messages.StringField(3) <NEW_LINE> secondPlayerHistory = messages.StringField(4)
GuessEval -- evaluation form message
62599061a219f33f346c7ed5
class OneCardMonthlyTransactionsList(GenericAPIView): <NEW_LINE> <INDENT> allowed_methods = ('GET',) <NEW_LINE> authentication_classes = (OneCardTokenAuthentication,) <NEW_LINE> serializer_class = OneCardMonthlyTransactionsSerializer <NEW_LINE> def get(self, request, username, year, month, format=None): <NEW_LINE> <IND...
Get one-month of transactions of OneCard
6259906124f1403a92686435
class BzrBranchFormat4(BranchFormat): <NEW_LINE> <INDENT> def initialize(self, a_controldir, name=None, repository=None, append_revisions_only=None): <NEW_LINE> <INDENT> if append_revisions_only: <NEW_LINE> <INDENT> raise errors.UpgradeRequired(a_controldir.user_url) <NEW_LINE> <DEDENT> if repository is not None: <NEW_...
Bzr branch format 4. This format has: - a revision-history file. - a branch-lock lock file [ to be shared with the bzrdir ] It does not support binding.
625990617d847024c075daa3
class ReportDesign(Element): <NEW_LINE> <INDENT> typeof = "report_design" <NEW_LINE> def generate( self, start_time=0, end_time=0, senders=None, wait_for_finish=False, timeout=5, **kw ): <NEW_LINE> <INDENT> if start_time and end_time: <NEW_LINE> <INDENT> kw.setdefault("params", {}).update({"start_time": start_time, "en...
A ReportDesign defines a report available in the SMC. This class provides access to generating these reports and exporting into a format supported by the SMC. Example of generating a report, and providing a callback once the report is complete which exports the report:: >>> def export_my_report(task): ... if...
6259906145492302aabfdba9
class CobraAdminUser(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> id = db.Column(INTEGER(unsigned=True), primary_key=True, autoincrement=True, nullable=None) <NEW_LINE> username = db.Column(db.String(64), nullable=True, default=None, unique=True) <NEW_LINE> password = db.Column(db.String(256), nulla...
:role: 1-super admin, 2-admin, 3-rule admin
6259906191f36d47f22319f6
class InputHandler(object): <NEW_LINE> <INDENT> _commands_callbacks = {} <NEW_LINE> @classmethod <NEW_LINE> def register_command(cls,command,callback): <NEW_LINE> <INDENT> if command not in cls._commands_callbacks.keys(): <NEW_LINE> <INDENT> cls._commands_callbacks[command] = [] <NEW_LINE> <DEDENT> cls._commands_callba...
_commands_callbacks is where register_command adds the callback for a certain command. The structure is a dictionary with key=command and value is a list to support multiple callbacks per command.
625990612ae34c7f260ac7b5
class LoadBalancerHealthCheck: <NEW_LINE> <INDENT> def __init__(self, target='ICMP', interval=5, unhealthy_threshold=1): <NEW_LINE> <INDENT> self.target = target <NEW_LINE> self.interval = interval <NEW_LINE> self.unhealthy_threshold = unhealthy_threshold <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT>...
Model of NIFCLOUD LoadBalancer HealthCheck
62599061379a373c97d9a6f3
class Xsd11AnyAttribute(XsdAnyAttribute): <NEW_LINE> <INDENT> def _parse(self) -> None: <NEW_LINE> <INDENT> super(Xsd11AnyAttribute, self)._parse() <NEW_LINE> self._parse_not_constraints() <NEW_LINE> <DEDENT> def is_matching(self, name: Optional[str], default_namespace: Optional[str] = None, **kwargs: Any) -> bool: <NE...
Class for XSD 1.1 *anyAttribute* declarations. .. <anyAttribute id = ID namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) ) notNamespace = List of (anyURI | (##targetNamespace | ##local)) notQName = List of (QName | ##defined) processContents = (lax | skip...
62599061a17c0f6771d5d70c
class Brick(GRectangle): <NEW_LINE> <INDENT> def collideb(self, ball): <NEW_LINE> <INDENT> if self.contains(ball.left, ball.bottom): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> if self.contains(ball.right, ball.bottom): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> if self.contains(ball.left, ball.top): <...
An instance is a brick. This class contains a method to detect collision with the ball. You may wish to add more features to this class. The attributes of this class are those inherited from GRectangle. LIST MORE ATTRIBUTES (AND THEIR INVARIANTS) HERE IF NECESSARY
62599061627d3e7fe0e0855a
class CountSearch(ModelView): <NEW_LINE> <INDENT> __name__ = 'stock.inventory.count.search' <NEW_LINE> search = fields.Reference( "Search", [ ('product.product', "Product"), ], required=True, domain={ 'product.product': [ ('type', '=', 'goods'), ('consumable', '=', False), ], }, help="The item that's counted.") <NEW_LI...
Stock Inventory Count
62599061435de62698e9d4d7
class Plugin(plugin.AdminPlugin, plugin.OnReadyPlugin): <NEW_LINE> <INDENT> def __init__(self, *args, always_watch_messages=list(), **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, always_watch_messages=always_watch_messages, **kwargs) <NEW_LINE> self.always_watch_messages=always_watch_messages <NEW_LINE> <DEDENT...
UIdea plugin to terminate UIs. The lifespan of your UI should be declared in the config .json for it. For more information about UIdea, see GitHub : <https://github.com/IdeaBot/UIdea> Your interaction with this will probably never be evident. If it is evident, I've probably done something wrong. **NOTE:** This is ru...
625990614428ac0f6e659c02
class CodeEntry(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.code = None <NEW_LINE> with open(self.path, "r") as code_file: <NEW_LINE> <INDENT> self.code = code_file.read() <NEW_LINE> <DEDENT> self.url_pattern = r"//.*?(http://rosettacode.org/wiki/[^\s]+)" ...
Code information.
62599061adb09d7d5dc0bc3a
class StyleReader: <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self._filename = filename <NEW_LINE> if not self._filename.endswith('.sld'): <NEW_LINE> <INDENT> self._filename += '.sld' <NEW_LINE> <DEDENT> if not os.path.isabs(self._filename): <NEW_LINE> <INDENT> self._filename = os.path.join( ...
Raster style reader :param str filename: input SLD file
62599061a8370b77170f1a9e
class End(six.with_metaclass(abc.ABCMeta)): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def operation_stats(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def add_idle_action(self, action): <NEW_LINE> <INDENT> raise NotImplementedError()
Common type for entry-point objects on both sides of an operation.
62599061baa26c4b54d50973
class Primitive_guard (Primitive): <NEW_LINE> <INDENT> def __init__ (self, G, name, attributes): <NEW_LINE> <INDENT> interfaces = { 'inputs': ['data', 'cond'], 'outputs': ['data'] } <NEW_LINE> super ().setup (name, G, attributes, interfaces) <NEW_LINE> self.append_rule (Intg (self.input.cond)) <NEW_LINE> self.append_ru...
Guard primitive This primitive guards the control the data flow in a protocol. Input data is only transferred to the output interfaces if the condition on the input interfaces is true.
625990610a50d4780f706927
class CheckPayView(View): <NEW_LINE> <INDENT> def post(self,request): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> if not user.is_authenticated(): <NEW_LINE> <INDENT> return JsonResponse({'res': 0, 'errmsg': '用户未登录'}) <NEW_LINE> <DEDENT> order_id = request.POST.get('order_id') <NEW_LINE> if not order_id: <NEW_LIN...
查看订单支付的结果
62599061a219f33f346c7ed7
class LegacyChargeSummary(ChargeSummary): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'billing_period_id': {'readonly': True}, 'usage_start': {'readonly': True}, 'usage_end': {'readonly': True}, 'azure_charges': {'read...
Legacy charge summary. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar...
62599061f548e778e596cc59
class Schur(Basis): <NEW_LINE> <INDENT> def __init__(self, A): <NEW_LINE> <INDENT> SymSuperfunctionsAlgebra.Basis.__init__( self, A, prefix='s')
Class of the type I super Schur.
6259906129b78933be26ac2c
class WorkItemTests(PlacelessSetup, unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(WorkItemTests, self).setUp() <NEW_LINE> setUpZCML(self) <NEW_LINE> setUpIntIds(self) <NEW_LINE> setUpRelationCatalog(self) <NEW_LINE> self.root = rootFolder() <NEW_LINE> testing.setUpWorkLists(self.roo...
Tests for components common to all/different workitems
62599061379a373c97d9a6f4
@register_relay_node <NEW_LINE> class CompileEngine(NodeBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise RuntimeError("Cannot construct a CompileEngine") <NEW_LINE> <DEDENT> def lower(self, source_func, target=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> key = _get_cache_key(source_func, ...
CompileEngine to get lowered code.
625990617d847024c075daa5
class BaseAlembicCommand(distutils.core.Command): <NEW_LINE> <INDENT> user_options = [ ('config=', 'c', 'Configuration file (YAML or Python)'), ('debug', 'd', 'Print debug logs'), ] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> self.config = None <NEW_LINE> self.debug = False <NEW_LINE> <DEDENT> def fina...
Base class for commands provided by Alembic.
625990617d847024c075daa6
class SetBWListRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(SetBWListRequest, self).__init__( '/regions/{regionId}/blackwhite:list', 'POST', header, version) <NEW_LINE> self.parameters = parameters
设置黑白名单
625990613617ad0b5ee0781f
class Solution: <NEW_LINE> <INDENT> def lastPosition(self, nums, target): <NEW_LINE> <INDENT> if nums is None or len(nums) == 0: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> start, end = 0, len(nums) - 1 <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = (start + end) // 2 <NEW_LINE> if nums[mid] == targe...
@param nums: An integer array sorted in ascending order @param target: An integer @return: An integer
625990614a966d76dd5f05c5
class SlackApiError(SlackBaseError): <NEW_LINE> <INDENT> def __init__(self, response: dict): <NEW_LINE> <INDENT> self.msg = 'Slack error - {}'.format(response.get('error')) <NEW_LINE> super(HandlerBaseError, self).__init__(self.msg)
Slack API error class
6259906191f36d47f22319f7
class RebuildTenantRelations(ZenPackMigration): <NEW_LINE> <INDENT> version = Version(2, 2, 0) <NEW_LINE> def migrate(self, pack): <NEW_LINE> <INDENT> results = ICatalogTool(pack.dmd.Devices).search(Tenant) <NEW_LINE> LOG.info("starting: %s total devices", results.total) <NEW_LINE> progress = ProgressLogger( LOG, prefi...
Rebuilds relations on all Tenant objects. This is necessary anytime new relations are added to Tenant. The code is generic enough to work simply by updating the version at which the migrate script should run. Update the version anytime you add a new relationship to Tenant. No other changes to this script are necessary...
625990614f88993c371f1087
class User(Base,UserMixin): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> ROLE_USER = 10 <NEW_LINE> ROLE_COMPANY = 20 <NEW_LINE> ROLE_ADMIN = 30 <NEW_LINE> id = db.Column(db.Integer,primary_key=True) <NEW_LINE> username = db.Column(db.String(32),unique=True,index=True,nullable=False) <NEW_LINE> email = db.Colum...
用户信息类
62599061379a373c97d9a6f5
class BlochOp(OpBase): <NEW_LINE> <INDENT> def __init__(self, theta, phi, name=None): <NEW_LINE> <INDENT> super(BlochOp, self).__init__() <NEW_LINE> self.theta = theta <NEW_LINE> self.phi = phi <NEW_LINE> if name is None: <NEW_LINE> <INDENT> self.name = 'Bloch Op (theta=%s, phi=%s)' % (theta, phi) <NEW_LINE> <DEDENT> e...
single particle operator on bloch sphere This class offers methods related to operators on bloch sphere
625990613539df3088ecd96e
class OperationDisplay(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } <NEW_LINE> def __init__( se...
Operation details. :param provider: The service provider. :type provider: str :param resource: Resource on which the operation is performed. :type resource: str :param operation: The operation type. :type operation: str :param description: The operation description. :type description: str
625990612c8b7c6e89bd4ec0
class ToggleAction(gtk.ToggleAction, _ActionBase): <NEW_LINE> <INDENT> def __init__(self, keypresses=(), name=None, label=None, tooltip=None, stock_id=None, preference_name=None, default=True): <NEW_LINE> <INDENT> if name is None: <NEW_LINE> <INDENT> name = label <NEW_LINE> <DEDENT> gtk.ToggleAction.__init__(self, name...
A custom Action class based on gtk.ToggleAction. Pass additional arguments such as keypresses.
625990618da39b475be048ba
class ImprimirCertificadoRTNPersonaNaturalPstMenuView(LoginRequiredMixin, DetailView, MenuPSTMixin): <NEW_LINE> <INDENT> model = Pst <NEW_LINE> template_name = 'registro/funcionario/imprimir_certificado_persona_natural_rtn_menu_pst.html' <NEW_LINE> context_object_name = "pst" <NEW_LINE> def get_context_data(self, **kwa...
Vista utilizada para mostrar el comprobante de certificacion en el menu pst solo si ya lo tiene registrado
625990614e4d562566373ad8
class PersonBuilder: <NEW_LINE> <INDENT> def __init__(self, person: Optional[Person] = None) -> None: <NEW_LINE> <INDENT> if person is None: <NEW_LINE> <INDENT> self.person = Person() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.person = person <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def works(self) -> ...
Builder to build a person. Contains sub-builders to build the person's job and address.
62599061d6c5a102081e37f6
class PositionWeightMatrix(GenericPositionMatrix): <NEW_LINE> <INDENT> def __init__(self, alphabet, counts): <NEW_LINE> <INDENT> GenericPositionMatrix.__init__(self, alphabet, counts) <NEW_LINE> for i in range(self.length): <NEW_LINE> <INDENT> total = sum(float(self[letter][i]) for letter in alphabet) <NEW_LINE> for le...
Class for the support of weight calculations on the Position Matrix.
6259906163d6d428bbee3df1
class VonAgentError(Exception): <NEW_LINE> <INDENT> def __init__(self, error_code: ErrorCode, message: str): <NEW_LINE> <INDENT> self.error_code = error_code <NEW_LINE> self.message = message
Error class for von_agent operation.
62599061460517430c432bbc
class XingAuth(ConsumerBasedOAuth): <NEW_LINE> <INDENT> AUTH_BACKEND = XingBackend <NEW_LINE> AUTHORIZATION_URL = XING_AUTHORIZATION_URL <NEW_LINE> REQUEST_TOKEN_URL = XING_REQUEST_TOKEN_URL <NEW_LINE> ACCESS_TOKEN_URL = XING_ACCESS_TOKEN_URL <NEW_LINE> SETTINGS_KEY_NAME = 'XING_CONSUMER_KEY' <NEW_LINE> SETTINGS_SECRET...
Xing OAuth authentication mechanism
62599061a8370b77170f1aa0
class ZmeyObjectPropertiesPanel(bpy.types.Panel): <NEW_LINE> <INDENT> bl_label = "Zmey Object" <NEW_LINE> bl_idname = "ZMEY_OBJECT" <NEW_LINE> bl_space_type = "PROPERTIES" <NEW_LINE> bl_region_type = "WINDOW" <NEW_LINE> bl_context = "object" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <...
Zmey Object Properties
625990614428ac0f6e659c05
@Operations.register_operation("drop_constraint") <NEW_LINE> @BatchOperations.register_operation("drop_constraint", "batch_drop_constraint") <NEW_LINE> class DropConstraintOp(MigrateOperation): <NEW_LINE> <INDENT> def __init__(self, constraint_name, table_name, type_=None, schema=None): <NEW_LINE> <INDENT> self.constra...
Represent a drop constraint operation.
62599061adb09d7d5dc0bc3c
class Repository(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'repository' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String, nullable=False) <NEW_LINE> owner_id = db.Column(db.Integer, db.ForeignKey('github_user.id'), nullable=False) <NEW_LINE> owner = db.relationship('Git...
Table containing references to repository sources of pull requests. Subclasses ``wptdash.app.db.Model``
625990618e71fb1e983bd19d
class RagelCppLexer(DelegatingLexer): <NEW_LINE> <INDENT> name = 'Ragel in CPP Host' <NEW_LINE> aliases = ['ragel-cpp'] <NEW_LINE> filenames = ['*.rl'] <NEW_LINE> def __init__(self, **options): <NEW_LINE> <INDENT> super(RagelCppLexer, self).__init__(CppLexer, RagelEmbeddedLexer, **options) <NEW_LINE> <DEDENT> def analy...
A lexer for `Ragel`_ in a CPP host file. *New in Pygments 1.1*
625990613539df3088ecd96f
class Trend(object): <NEW_LINE> <INDENT> def __init__(self, x=None, y=None): <NEW_LINE> <INDENT> self.fx, self.fy = fx, fy <NEW_LINE> <DEDENT> def plot(self, page, **kw): <NEW_LINE> <INDENT> return page.line(fx, fy, **kw)
A line fx vs. fy. Note that this may be infinite extent, and should probably have a mechanism for recalculating given new axes limits.
625990611f037a2d8b9e53d4
class EffiEdgeResUnit(HybridBlock): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, strides, exp_factor, se_factor, mid_from_in, use_skip, bn_epsilon, bn_use_global_stats, activation, **kwargs): <NEW_LINE> <INDENT> super(EffiEdgeResUnit, self).__init__(**kwargs) <NEW_LINE> self.residual = (in_channels...
EfficientNet-Edge edge residual unit. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. strides : int or tuple/list of 2 int Strides of the second convolution layer. exp_factor : int Factor for expansion of channels. se_factor : int SE ...
6259906166673b3332c31acf
class Events: <NEW_LINE> <INDENT> class Key: <NEW_LINE> <INDENT> OperationCode = "code" <NEW_LINE> Time = "time" <NEW_LINE> Description = "description" <NEW_LINE> Extra = "extra" <NEW_LINE> <DEDENT> class ExtraInformation: <NEW_LINE> <INDENT> CloseReason = "订单关闭原因" <NEW_LINE> Payments = "支付详情" <NEW_LINE> PayId = "支付单号"...
事件相关设置
625990610c0af96317c578c8
class UpdateProfile(UpdateView): <NEW_LINE> <INDENT> model = Patient <NEW_LINE> form_class = ProfileForm <NEW_LINE> template_name = 'HealthApps/patient_profile.html' <NEW_LINE> success_url = '/profile' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(UpdateView, self).get_context_dat...
View for updating profile
625990613539df3088ecd970
class RedBaronProvider(provider.ProviderBase): <NEW_LINE> <INDENT> @red_src(dump=False) <NEW_LINE> def analyze(self, red, deep=2, with_formatting=False): <NEW_LINE> <INDENT> return "\n".join(red.__help__(deep=deep, with_formatting=False)) <NEW_LINE> <DEDENT> @red_src() <NEW_LINE> @red_validate([validators.OptionalRegio...
Provider for inspecting and transforming source code via redbaron.
62599061379a373c97d9a6f7
class FramesSequence(FramesStream): <NEW_LINE> <INDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> _len = len(self) <NEW_LINE> if isinstance(key, slice): <NEW_LINE> <INDENT> return (self.get_frame(_k) for _k in xrange(*key.indices(_len))) <NEW_LINE> <DEDENT> elif isinstance(key, collections.Iterable): <NEW_LINE> <...
Baseclass for wrapping data buckets that have random access. Support random access. Supports standard slicing and fancy slicing, but returns a generator. Must be finite length.
62599061a79ad1619776b626
class GUI: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.user_id_var = None <NEW_LINE> self.result_list = None <NEW_LINE> self.ratings = None <NEW_LINE> self.movie_names = None <NEW_LINE> self._load_data() <NEW_LINE> self._create_gui() <NEW_LINE> <DEDENT> def _create_gui(self): <NEW_LINE> <INDENT> ro...
Implement a user interface for the movie recommender system. The GUI allows user to input a user id to find the top 5 recommended movies based on user's rating data.
625990612c8b7c6e89bd4ec2
class RedirectDashboard(BrowserView): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> url = self.context.absolute_url() + '/wp-admin-dashboard' <NEW_LINE> self.request.response.redirect(url)
Redirect to wp-admin-dashboard
625990618e7ae83300eea760
class DeciderTests(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.decider = Decider(100, 0.05) <NEW_LINE> <DEDENT> def test_decide(self): <NEW_LINE> <INDENT> pump = Pump('127.0.0.1', 1000) <NEW_LINE> actions = { 'PUMP_IN': pump.PUMP_IN, 'PUMP_OUT': pump.PUMP_OUT, 'PUMP_OFF': pump.PUMP...
This method does a setup for unit testing Decider
62599061097d151d1a2c2743
class FramedProtocol(asyncio.BaseProtocol): <NEW_LINE> <INDENT> def frame_received(self, frame): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def eof_received(self): <NEW_LINE> <INDENT> pass
An interface for protocols expecting to receive framed data. This class should be implemented almost identically to the ``asyncio.Protocol`` class, with the substitution of a ``frame_received()`` method for the ``data_received()`` method.
62599061b7558d5895464a97
class ManifestEntryIGNORE(ManifestPathEntry): <NEW_LINE> <INDENT> tag = 'IGNORE' <NEW_LINE> @classmethod <NEW_LINE> def from_list(cls, data): <NEW_LINE> <INDENT> assert data[0] == cls.tag <NEW_LINE> return cls(cls.process_path(data)) <NEW_LINE> <DEDENT> def to_list(self): <NEW_LINE> <INDENT> return (self.tag, self.enco...
Ignored path
625990614e4d562566373ada
class Tipue(LateTask): <NEW_LINE> <INDENT> name = "local_search" <NEW_LINE> def gen_tasks(self): <NEW_LINE> <INDENT> self.site.scan_posts() <NEW_LINE> kw = { "translations": self.site.config['TRANSLATIONS'], "output_folder": self.site.config['OUTPUT_FOLDER'], "filters": self.site.config['FILTERS'], "timeline": self.sit...
Render the blog posts as JSON data.
6259906144b2445a339b74ca
class DeleteSubnetResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
DeleteSubnet返回参数结构体
62599061e5267d203ee6cf29
class win32tz(datetime.tzinfo): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.data = win32tz_data(name) <NEW_LINE> <DEDENT> def utcoffset(self, dt): <NEW_LINE> <INDENT> if self._isdst(dt): <NEW_LINE> <INDENT> return datetime.timedelta(minutes=self.data.dstoffset) <NEW_LINE> <DEDENT> else: <NEW_...
tzinfo class based on win32's timezones available in the registry. >>> local = win32tz('Central Standard Time') >>> oct1 = datetime.datetime(month=10, year=2004, day=1, tzinfo=local) >>> dec1 = datetime.datetime(month=12, year=2004, day=1, tzinfo=local) >>> oct1.dst() datetime.timedelta(0, 3600) >>> dec1.dst() datetim...
62599061be8e80087fbc075a
class conformation_scorer (object) : <NEW_LINE> <INDENT> def __init__ (self, old_residue, new_residue) : <NEW_LINE> <INDENT> from scitbx.array_family import flex <NEW_LINE> old_residue_atoms = old_residue.atoms() <NEW_LINE> self.new_residue_atoms = new_residue.atoms() <NEW_LINE> n_atoms = self.new_residue_atoms.size() ...
Stand-in for the conformation scoring class in mmtbx.refinement.real_space; instead of calculating fit to the map, this simply uses the change in position of the first atom being moved at each rotation. This allows us to superimpose the conformations for those atoms which are present in both the old and the new residu...
625990614428ac0f6e659c07
class TextColumn(Column): <NEW_LINE> <INDENT> def __init__(self, name: str): <NEW_LINE> <INDENT> super().__init__(name, 'text')
TextColumn class representing a column with data type "text".
62599061cc0a2c111447c639
@implementer(ITensorSource) <NEW_LINE> class ElasticSearch(Source): <NEW_LINE> <INDENT> def __init__(self, *a, **kw): <NEW_LINE> <INDENT> Source.__init__(self, *a, **kw) <NEW_LINE> self.url = self.config.get('url', 'http://localhost:9200').rstrip('\n') <NEW_LINE> user = self.config.get('user') <NEW_LINE> passwd = self....
Reads elasticsearch metrics **Configuration arguments:** :param url: Elasticsearch base URL (default: http://localhost:9200) :type url: str. :param user: Basic auth username :type user: str. :param password: Password :type password: str. **Metrics:** :(service name).cluster.status: Cluster status (Red=0, Yellow=1, ...
62599061f548e778e596cc5c
class TestGameEditorial(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 testGameEditorial(self): <NEW_LINE> <INDENT> pass
GameEditorial unit test stubs
62599061a219f33f346c7edb
class L2ProductFunctionalQ1(NumpyMatrixBasedOperator): <NEW_LINE> <INDENT> sparse = False <NEW_LINE> def __init__(self, grid, function, boundary_info=None, dirichlet_data=None, order=2, name=None): <NEW_LINE> <INDENT> assert grid.reference_element(0) in {square} <NEW_LINE> assert function.shape_range == tuple() <NEW_LI...
|Functional| representing the scalar product with an L2-|Function| for bilinear finite elements. Boundary treatment can be performed by providing `boundary_info` and `dirichlet_data`, in which case the DOFs corresponding to Dirichlet boundaries are set to the values provided by `dirichlet_data`. The current implement...
625990613539df3088ecd971
class Test0003PuppetIndexesDropped(unittest.TestCase): <NEW_LINE> <INDENT> @patch.object(migration, 'get_collection') <NEW_LINE> def test_migration(self, mock_get_collection): <NEW_LINE> <INDENT> migration.migrate() <NEW_LINE> mock_get_collection.assert_called_once_with('units_puppet_module') <NEW_LINE> calls = [call('...
Test the migration of dropping the puppet module indexes
625990613617ad0b5ee07823
class CuTarget(CcTarget): <NEW_LINE> <INDENT> def __init__(self, name, type, srcs, deps, visibility, tags, warning, defs, incs, extra_cppflags, extra_linkflags, kwargs): <NEW_LINE> <INDENT> srcs = var_to_list(srcs) <NEW_LINE> deps = var_to_list(deps) <NEW_LINE> extra_cppflags = var_to_list(extra_cppflags) <NEW_LINE> ex...
This class is derived from CcTarget and is the base class of cu_library, cu_binary etc.
6259906145492302aabfdbaf
class ComputeVpnTunnelsListRequest(_messages.Message): <NEW_LINE> <INDENT> filter = _messages.StringField(1) <NEW_LINE> maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32, default=500) <NEW_LINE> orderBy = _messages.StringField(3) <NEW_LINE> pageToken = _messages.StringField(4) <NEW_LINE> project =...
A ComputeVpnTunnelsListRequest object. Fields: filter: Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. The field_name is the name of the field you want to compare. Only atomic field types are supported (stri...
625990613eb6a72ae038bd34
class DestinationResponse(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.systran_types = { 'error': 'ErrorResponse', 'total': 'int', 'offset': 'int', 'destinations': 'list[Destination]' } <NEW_LINE> self.attribute_map = { 'error': 'error', 'total': 'total', 'offset': 'offset', 'destinations':...
NOTE: This class is auto generated by the systran code generator program. Do not edit the class manually.
625990614f88993c371f1089
class User(AbstractUser): <NEW_LINE> <INDENT> @property <NEW_LINE> def access_token(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.social_auth.first().extra_data[u'access_token'] <NEW_LINE> <DEDENT> except Exception: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> <DEDENT> class Meta(object): <NEW_...
Custom user model for use with OIDC.
62599061a8ecb033258728ec
class BasePreprocessor(object): <NEW_LINE> <INDENT> def __init__(self, name=None, shape=None, *args, **kwargs): <NEW_LINE> <INDENT> self._shape = shape <NEW_LINE> self._name = name <NEW_LINE> <DEDENT> def process(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @property <NEW_LINE> def provide_data(self): ...
Base class for preprocessors
6259906197e22403b383c5e2
class ADJUSTMENT(Aggregate): <NEW_LINE> <INDENT> adjno = String(32) <NEW_LINE> adjdesc = String(80, required=True) <NEW_LINE> adjamt = Decimal(required=True) <NEW_LINE> adjdate = DateTime()
OFX Section 12.5.2.4
625990629c8ee82313040cf4
class A2_XML(SetupMixin, unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> SetupMixin.setUp(self, ET.fromstring(XML_LONG)) <NEW_LINE> <DEDENT> def test_1_HouseDiv(self): <NEW_LINE> <INDENT> l_xml = self.m_xml.house_div <NEW_LINE> self.assertEqual(l_xml.attrib['Name'], TESTING_HOUSE_NAME) <NEW...
Be sure that we load the data properly as a whole test. Detailed test of xml is in the test_schedule_xml module.
62599062a17c0f6771d5d70f
class TestSqlGroupsAdapter(GroupsAdapterTester, _BaseSqlAdapterTester): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestSqlGroupsAdapter, self).setUp() <NEW_LINE> databasesetup.setup_database() <NEW_LINE> self.adapter = SqlGroupsAdapter(databasesetup.Group, databasesetup.User, databasesetup.DBSession...
Test suite for the SQL group source adapter
62599062627d3e7fe0e08560
class _Clearable: <NEW_LINE> <INDENT> def clear(self: _HasRedisClientAndKey) -> None: <NEW_LINE> <INDENT> self.redis.unlink(self.key)
Mixin class that implements clearing (emptying) a Redis-backed collection.
625990623d592f4c4edbc5b2
class XsdMinInclusiveFacet(XsdFacet): <NEW_LINE> <INDENT> base_type: BaseXsdType <NEW_LINE> _ADMITTED_TAGS = XSD_MIN_INCLUSIVE, <NEW_LINE> def _parse_value(self, elem: ElementType) -> None: <NEW_LINE> <INDENT> value = elem.attrib['value'] <NEW_LINE> self.value, errors = cast(LaxDecodeType, self.base_type.decode(value, ...
XSD *minInclusive* facet. .. <minInclusive fixed = boolean : false id = ID value = anySimpleType {any attributes with non-schema namespace . . .}> Content: (annotation?) </minInclusive>
6259906276e4537e8c3f0c62
@tf_export('keras.layers.FlexPooling') <NEW_LINE> class FlexPooling(Layer): <NEW_LINE> <INDENT> def __init__(self, features, neighborhoods, data_format='simple', name=None): <NEW_LINE> <INDENT> super(FlexPooling, self).__init__(name=name) <NEW_LINE> self.features = features <NEW_LINE> self.neighborhoods = neighborhoods...
flex pooling layer. This layer performs a max-pooling operation over elements in arbitrary neighborhoods. When `data_format` is 'simple', the input shape should have rank 3, otherwise rank 4 and dimension 2 should be 1. Remarks: In contrast to traditional pooling, this operation has no option for sub-sampling...
62599062a219f33f346c7edd
class BGEError(Exception): <NEW_LINE> <INDENT> pass
SDK 错误
62599062379a373c97d9a6fa
class ModelEntity: <NEW_LINE> <INDENT> def __init__(self, entity_id, model, history_index=-1, connected=True): <NEW_LINE> <INDENT> self.entity_id = entity_id <NEW_LINE> self.model = model <NEW_LINE> self._history_index = history_index <NEW_LINE> self.connected = connected <NEW_LINE> self.connection = model.connection()...
An object in the Model tree
6259906232920d7e50bc771d
class element_exists_and_does_not_contain_expected_text(object): <NEW_LINE> <INDENT> def __init__(self, locator, expected_text): <NEW_LINE> <INDENT> self.locator = locator <NEW_LINE> self.expected_text = expected_text <NEW_LINE> <DEDENT> def __call__(self, driver): <NEW_LINE> <INDENT> element = driver.find_element(*sel...
An expectation for checking that an element exists and its innerText attribute does not contain expected text. This class is meant to be used in combination with Selenium's `WebDriverWait::until()`. For example: ``` custom_wait = WebDriverWait(browser, 10) smart_ballot_tracker_element = custom_wait.until(element_exists...
6259906245492302aabfdbb1
class MessageBuilder(object): <NEW_LINE> <INDENT> ASCII_CODES = [0, 1, 2, 4] <NEW_LINE> DATAFRAME_CODES = [3] <NEW_LINE> BINARY_CODE = [5] <NEW_LINE> GET_RESULT_CLASS = lambda: Message <NEW_LINE> @classmethod <NEW_LINE> def unpack_all(cls, mbytes, mtype): <NEW_LINE> <INDENT> if mtype in cls.ASCII_CODES: <NEW_LINE> <IND...
Give a bytestring to build the relevant message object (either DataFrame or AsciiMessage)
625990624f6381625f19a00e
class InvalidArgumentError(RuntimeError): <NEW_LINE> <INDENT> pass
! @brief Exception class raised for invalid target names.
625990628a43f66fc4bf3865
class Timer(object): <NEW_LINE> <INDENT> def __init__(self, task_description='elapsed time', verbose=False): <NEW_LINE> <INDENT> self.verbose = verbose <NEW_LINE> self.task_description = task_description <NEW_LINE> self.laps = OrderedDict() <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.start(lap="__...
Timer object usable as a context manager, or for manual timing. Based on code from http://coreygoldberg.blogspot.com/2012/06/python-timer-class-context-manager-for.html # noqa As a context manager, do: from timer import Timer url = 'https://github.com/timeline.json' with Timer() as t: r = requ...
625990621f037a2d8b9e53d6
class AbstractTkPushButton(AbstractTkControl): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def shell_text_changed(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def shell_icon_changed(self, icon): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @...
The abstract toolkit interface for a PushButton.
6259906266673b3332c31ad3
class FirewallPolicyNatRule(FirewallPolicyRule): <NEW_LINE> <INDENT> _validation = { 'rule_type': {'required': True}, 'priority': {'maximum': 65000, 'minimum': 100}, } <NEW_LINE> _attribute_map = { 'rule_type': {'key': 'ruleType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'priority': {'key': 'priority', '...
Firewall Policy NAT Rule. All required parameters must be populated in order to send to Azure. :param rule_type: Required. The type of the rule.Constant filled by server. Possible values include: "FirewallPolicyNatRule", "FirewallPolicyFilterRule". :type rule_type: str or ~azure.mgmt.network.v2019_07_01.models.Fire...
62599062a8ecb033258728ee
class Zoomify(object): <NEW_LINE> <INDENT> def __init__(self, width, height, tile_size=256, tileformat='jpg'): <NEW_LINE> <INDENT> self.tile_size = tile_size <NEW_LINE> self.tileformat = tileformat <NEW_LINE> imagesize = (width, height) <NEW_LINE> tiles = (math.ceil(width / tile_size), math.ceil(height / tile_size)) <N...
Tiles compatible with the Zoomify viewer ----------------------------------------
62599062435de62698e9d4de
class Webserver(Thread): <NEW_LINE> <INDENT> def __init__(self, port=8000, root='.'): <NEW_LINE> <INDENT> Thread.__init__(self) <NEW_LINE> Handler = AcrylServe <NEW_LINE> Handler.www_root = root <NEW_LINE> Handler.log_error = lambda x, *y: None <NEW_LINE> Handler.log_message = lambda x, *y: None <NEW_LINE> self.httpd =...
A single-threaded webserver to serve while generation. :param port: port to listen on :param root: serve this directory under /
6259906256b00c62f0fb3fa2
class DR(Conversion): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def to_dict(): <NEW_LINE> <INDENT> return {"type": "datetime"} <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def x12_to_python(raw): <NEW_LINE> <INDENT> if raw is None or raw == "": <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> d1, punct, d2 = raw....
Convert between DR format dates to proper DateTime objects.
62599062a79ad1619776b628
class ECParameters(univ.Choice): <NEW_LINE> <INDENT> componentType = namedtype.NamedTypes( namedtype.NamedType("namedCurve", univ.ObjectIdentifier()), namedtype.NamedType("implicitCurve", univ.Null()), namedtype.NamedType("specifiedCurve", SpecifiedECDomain()), )
RFC5480: Elliptic Curve Cryptography Subject Public Key Information ECParameters ::= CHOICE { namedCurve OBJECT IDENTIFIER -- implicitCurve NULL -- specifiedCurve SpecifiedECDomain }
6259906238b623060ffaa3bc