code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class RestInterface(): <NEW_LINE> <INDENT> def __init__(self, version, methods, schema=None, rules=None): <NEW_LINE> <INDENT> if not isinstance(methods, list): <NEW_LINE> <INDENT> methods = [methods] <NEW_LINE> <DEDENT> self.version = str(version) <NEW_LINE> self.methods = [m.upper() for m in methods] <NEW_LINE> self.s...
Denotes the schema and rest rules associated with a rest API version and HTTP method.
62598fd05fdd1c0f98e5e3c8
class OrderAlreadyClosedError(ActiveParticipantError): <NEW_LINE> <INDENT> pass
Occurs when trying to cancel a already-closed Order
62598fd08a349b6b4368667d
class InactiveLoginError(ClientError): <NEW_LINE> <INDENT> def __init__(self, message, meta=None): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> self.meta = meta
Indicates some sort of configuration error
62598fd055399d3f05626956
class HttpConnection(object): <NEW_LINE> <INDENT> def __init__(self, username='', password=''): <NEW_LINE> <INDENT> self.username = username <NEW_LINE> self.password = password <NEW_LINE> self.session = self._create_session() <NEW_LINE> <DEDENT> def _create_session(self): <NEW_LINE> <INDENT> s = requests.Session() <NEW...
Connects to the collection database by using Http protocol.
62598fd03d592f4c4edbb2f1
class Game(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.GameBoard = Board() <NEW_LINE> self.Score = 0 <NEW_LINE> self.GameWon = False <NEW_LINE> <DEDENT> def move_board(self, direction): <NEW_LINE> <INDENT> vector = direction.vector() <NEW_LINE> vector_x = vector[0] <NEW_LINE> vector_y = ve...
A single game of 2048 - contains the board and functions which manipulate it
62598fd03346ee7daa337865
class Level_OpenDoorLoc(Level_OpenDoor): <NEW_LINE> <INDENT> def __init__(self, seed=None): <NEW_LINE> <INDENT> super().__init__( select_by="loc", seed=seed )
Go to the door The door is selected by location. (always unlocked, in the current room)
62598fd00fa83653e46f5324
class UDPLogClientFactory(protocol.ReconnectingClientFactory): <NEW_LINE> <INDENT> maxDelay = 30 <NEW_LINE> def __init__(self, protocolClass, *args, **kwargs): <NEW_LINE> <INDENT> self.protocol = protocolClass <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> <DEDENT> def buildProtocol(self, addr):...
Reconnecting client factory that resets retry delay upon connecting.
62598fd060cbc95b0636477a
class ResourceTfWorkspace(object): <NEW_LINE> <INDENT> swagger_types = { 'links': 'HalRscLinks', 'name': 'str', 'modules': 'list[ResourceTfModule]' } <NEW_LINE> attribute_map = { 'links': '_links', 'name': 'name', 'modules': 'modules' } <NEW_LINE> def __init__(self, links=None, name=None, modules=None): <NEW_LINE> <IND...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fd05fdd1c0f98e5e3ca
class XmlExportPipeline(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.files = {} <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_crawler(cls, crawler): <NEW_LINE> <INDENT> pipeline = cls() <NEW_LINE> crawler.signals.connect(pipeline.spider_opened, signals.spider_opened) <NEW_LINE> crawl...
XMLエクスポートクラス
62598fd050812a4eaa620e03
class RetryParameters(validation.Validated): <NEW_LINE> <INDENT> ATTRIBUTES = { TASK_RETRY_LIMIT: validation.Optional(validation.TYPE_INT), TASK_AGE_LIMIT: validation.Optional(_TASK_AGE_LIMIT_REGEX), MIN_BACKOFF_SECONDS: validation.Optional(validation.TYPE_FLOAT), MAX_BACKOFF_SECONDS: validation.Optional(validation.TYP...
Retry parameters for a single task queue.
62598fd0ff9c53063f51aa8a
class component: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def createEvaluation(self): pass <NEW_LINE> @abstractmethod <NEW_LINE> def createTransition(self): pass <NEW_LINE> @abstractmethod <NEW_LINE> def createCovPrior(self): pass <NEW_LINE> @abstractmethod <NEW_LINE> def create...
The abstract class provides the basic structure for all model components Methods: createEvaluation: create the initial evaluation matrix createTransition: create the initial transition matrix createCovPrior: create a simple prior covariance matrix createMeanPrior: create a simple prior latent state ...
62598fd0377c676e912f6f97
class GroupingDirective(Stmt): <NEW_LINE> <INDENT> body: List[Stmt] <NEW_LINE> def __init__(self, *body: Stmt) -> None: <NEW_LINE> <INDENT> self.body = list(body) <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> inner_text = "".join(indent(str(stmt)) for stmt in self.body) <NEW_LINE> return f"<{type(se...
An un-scoped group of statements.
62598fd04a966d76dd5ef316
class Forbidden(modioException): <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> super().__init__(msg)
You do not have permission to perform the requested action.
62598fd0656771135c489ab0
class PermissionsController(rest.RestController): <NEW_LINE> <INDENT> @decorators.db_exceptions <NEW_LINE> @secure(checks.guest) <NEW_LINE> @wsme_pecan.wsexpose([wtypes.text], int) <NEW_LINE> def get(self, worklist_id): <NEW_LINE> <INDENT> worklist = worklists_api.get(worklist_id) <NEW_LINE> if worklists_api.visible(wo...
Manages operations on worklist permissions.
62598fd08a349b6b43686681
class HCNPreprocessAgent(Agent): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def add_cmdline_args(argparser): <NEW_LINE> <INDENT> WordDictionaryAgent.add_cmdline_args(argparser) <NEW_LINE> ActionDictionaryAgent.add_cmdline_args(argparser) <NEW_LINE> return argparser <NEW_LINE> <DEDENT> def __init__(self, opt, shared=N...
Contains WordDictionaryAgent and ActionDictionaryAgent.
62598fd0099cdd3c636755ff
class DisplayableSitemap(Sitemap): <NEW_LINE> <INDENT> def items(self): <NEW_LINE> <INDENT> return list(Displayable.objects.url_map(in_sitemap=True).values()) <NEW_LINE> <DEDENT> def lastmod(self, obj): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_urls(self, **kwargs): <NEW_LINE> <INDENT> kwargs["site"] = Site....
Sitemap class for Django's sitemaps framework that returns all published items for models that subclass ``Displayable``.
62598fd050812a4eaa620e04
class RandomWalk: <NEW_LINE> <INDENT> def __init__(self,num_points = 5000): <NEW_LINE> <INDENT> self.num_points = num_points <NEW_LINE> self.x_values = [0] <NEW_LINE> self.y_values = [0] <NEW_LINE> <DEDENT> def fill_walk(self): <NEW_LINE> <INDENT> while len(self.x_values)< self.num_points: <NEW_LINE> <INDENT> x_directi...
a class to generate random walks
62598fd0bf627c535bcb18ed
class CommonLocators: <NEW_LINE> <INDENT> EBANKING_PAGE_TITLE = By.XPATH, '//h1[contains(text(),"E-Banking login")]' <NEW_LINE> DEMO_APP_LINK = By.XPATH, '//a[contains(text(),"demo")]' <NEW_LINE> WELCOME_MSG = By.XPATH, '//button[@class="Button__StyledButton-sc-13wwmgi-0 jjajkX"]' <NEW_LINE> PAGE_TITLE = By.XPATH, '//h...
Rules for finding elements that appear on multiple pages
62598fd0377c676e912f6f98
class arch_sh2a(generic_sh): <NEW_LINE> <INDENT> def __init__(self, myspec): <NEW_LINE> <INDENT> generic_sh.__init__(self, myspec) <NEW_LINE> self.settings["CFLAGS"] = "-O2 -m2a -pipe" <NEW_LINE> self.settings["CHOST"] = "sh2a-unknown-linux-gnu"
Builder class for SH-2A [Little-endian]
62598fd04a966d76dd5ef318
class BoletoItau(BoletoData): <NEW_LINE> <INDENT> nosso_numero = custom_property('nosso_numero', 8) <NEW_LINE> conta_cedente = custom_property('conta_cedente', 5) <NEW_LINE> agencia_cedente = custom_property('agencia_cedente', 4) <NEW_LINE> carteira = custom_property('carteira', 3) <NEW_LINE> def __init__(self): <NEW_L...
Implementa Boleto Itaú Gera Dados necessários para criação de boleto para o banco Itau Todas as carteiras com excessão das que utilizam 15 dígitos: (106,107, 195,196,198)
62598fd0ec188e330fdf8cd7
class FilterWordsPipeline(object): <NEW_LINE> <INDENT> words_to_filter = ['Female', 'Male'] <NEW_LINE> def process_item(self, item): <NEW_LINE> <INDENT> for word in self.words_to_filter: <NEW_LINE> <INDENT> if word in unicode(item['description']).lower(): <NEW_LINE> <INDENT> raise DropItem("!!!!!!!!!!!!!!!!!!!!!!!!!Con...
A pipeline for filtering out items which contain certain words in their description
62598fd055399d3f0562695c
class Event(Base): <NEW_LINE> <INDENT> __slots__ = [ 'author', 'id', 'name', 'type', 'url', 'view' ] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(Event, self).__init__(**kwargs) <NEW_LINE> _event = kwargs.pop('event').pop('data') <NEW_LINE> author = {} <NEW_LINE> author['user_id'] = kwargs['user']...
Represents a Group Me image Supported Operations: +-----------+---------------------------------------+ | Operation | Description | +===========+=======================================+ | x == y | Checks if two images are equal. | +-----------+---------------------------------------...
62598fd0cc40096d6161a3f8
class SomeLines(object): <NEW_LINE> <INDENT> def __init__(self, listoflines, comments): <NEW_LINE> <INDENT> self.listoflines = listoflines <NEW_LINE> self.comments = comments <NEW_LINE> self.getourid() <NEW_LINE> <DEDENT> def getourid(self): <NEW_LINE> <INDENT> cmsgid = None <NEW_LINE> if not isinstance(self, Entry): <...
SomeLines represents some lines from between two empty lines, not necessarily an Entry
62598fd03346ee7daa337868
class LoginForm(Form): <NEW_LINE> <INDENT> username = TextField(u'Name', validators=[validators.required()]) <NEW_LINE> password = PasswordField(u'Password', validators=[validators.Required()] )
Login form for Kremlin application
62598fd050812a4eaa620e05
class UpdateMirror9Test(BaseTest): <NEW_LINE> <INDENT> fixtureGpg = True <NEW_LINE> fixtureCmds = [ "aptly mirror create --keyring=aptlytest.gpg -with-sources flat-src https://cloud.r-project.org/bin/linux/debian jessie-cran35/", ] <NEW_LINE> runCmd = "aptly mirror update --keyring=aptlytest.gpg flat-src" <NEW_LINE> ou...
update mirrors: flat repository + sources
62598fd0ff9c53063f51aa8e
class XZYJointDiscriminator(Initializable): <NEW_LINE> <INDENT> def __init__(self, x_discriminator, z_discriminator, joint_discriminator, **kwargs): <NEW_LINE> <INDENT> self.x_discriminator = x_discriminator <NEW_LINE> self.z_discriminator = z_discriminator <NEW_LINE> self.joint_discriminator = joint_discriminator <NEW...
Three-way discriminator. Parameters ---------- x_discriminator : :class:`blocks.bricks.Brick` Part of the discriminator taking :math:`x` as input. Its output will be concatenated with ``z_discriminator``'s output and fed to ``joint_discriminator``. z_discriminator : :class:`blocks.bricks.Brick` Part of...
62598fd0377c676e912f6f99
class Attachment(models.Model): <NEW_LINE> <INDENT> document = models.ForeignKey( 'document_library.Document', verbose_name=_('Document'), ) <NEW_LINE> position = models.PositiveIntegerField( verbose_name=_('Position'), null=True, blank=True, ) <NEW_LINE> content_type = models.ForeignKey(ContentType) <NEW_LINE> object_...
Mapping class to map any object to ``Document`` objects. This allows you to add inlines to your admins and attach documents to your objects.
62598fd04a966d76dd5ef31a
class BFList(list): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "<{0}: {1}>".format(self.__class__.__name__, list(self)) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.__str__() <NEW_LINE> <DEDENT> def index(self, item): <NEW_LINE> <INDENT> if isinstance(item, str): <NEW_L...
Enhanced list of objects with idname property. Get an item by its idname: bf_list["item idname"] Get a BFList of items by items idnames: bf_list[("item1 idname", "item2 idname")] Get the index of item: bf_list.index["item idname"] Check presence of item: "item idname" in bf_list Get item by idname with default: bf_list...
62598fd07b180e01f3e49271
class rfi: <NEW_LINE> <INDENT> location = "/data/attack-payloads/rfi/rfi.txt" <NEW_LINE> rfi = file_read(location)
This implements the rfi payloads from fuzzdb
62598fd03617ad0b5ee0658c
class PutInstanceTool(DataTool): <NEW_LINE> <INDENT> only2d = False <NEW_LINE> def mousePressEvent(self, event): <NEW_LINE> <INDENT> if event.button() == Qt.LeftButton: <NEW_LINE> <INDENT> self.editingStarted.emit() <NEW_LINE> pos = self.mapToPlot(event.pos()) <NEW_LINE> self.issueCommand.emit(Append([pos])) <NEW_LINE>...
Add a single data instance with a mouse click.
62598fd03d592f4c4edbb2f9
class Dictionary(Command): <NEW_LINE> <INDENT> name = 'survey:dictionary' <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(Dictionary, self).get_parser(prog_name) <NEW_LINE> parser.add_argument("--file", help="Survey file", action="store", required=False) <NEW_LINE> parser.add_argument("na...
Validate survey description file agaisnt json schema
62598fd0cc40096d6161a3f9
class ModelBias(Metric): <NEW_LINE> <INDENT> def __init__(self, target, model_output=None, name=None, element_wise=False): <NEW_LINE> <INDENT> name = "Bias_" + target if name is None else name <NEW_LINE> super(ModelBias, self).__init__(name) <NEW_LINE> self.target = target <NEW_LINE> self.model_output = model_output <N...
Calculates the bias of the model. For non-scalar quantities, the mean of all components is taken. Args: target (str): name of target property model_output (int, str): index or key, in case of multiple outputs (Default: None) name (str): name used in logging for this metric. If set to `None`, ...
62598fd0099cdd3c63675601
class PotentialOperator: <NEW_LINE> <INDENT> def __init__(self, op, component_count, space, evaluation_points): <NEW_LINE> <INDENT> self._op = op <NEW_LINE> self._component_count = component_count <NEW_LINE> self._space = space <NEW_LINE> self._evaluation_points = evaluation_points <NEW_LINE> <DEDENT> def evaluate(self...
Provides an interface to potential operators. This class is not supposed to be instantiated directly.
62598fd050812a4eaa620e06
class CrawlTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> if os.path.isdir(TEST_DIR): <NEW_LINE> <INDENT> shutil.rmtree(TEST_DIR) <NEW_LINE> <DEDENT> os.mkdir(TEST_DIR) <NEW_LINE> self.args = { 'output': os.path.join(TEST_DIR, '%s.out' % self.filename), 'log_file': os.path.join(TEST_D...
Base class for crawl test cases.
62598fd0ff9c53063f51aa90
class VirtualMachineIdentity(Model): <NEW_LINE> <INDENT> _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'type': {'key': 'type', 'type': 'ResourceI...
Identity for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. :ivar principal_id: The principal id of virtual machine identity. :vartype principal_id: str :ivar tenant_id: The tenant id associated with the virtual machine. :vartype tenant_id: str :param type...
62598fd097e22403b383b34d
class CleanImages(superdesk.Command): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> print('Starting image cleaning.') <NEW_LINE> used_images = set() <NEW_LINE> types = ['picture', 'video', 'audio'] <NEW_LINE> query = {'$or': [{'type': {'$in': types}}, {ASSOCIATIONS: {'$ne': None}}]} <N...
This command will remove all the images from the system which are not referenced by content. It checks the media type and calls the correspoinding function as s3 and mongo requires different approaches for handling multiple files. Probably running db.repairDatabase() is needed in Mongo to shring the DB size.
62598fd0ec188e330fdf8cdb
class ResizeImageTransformer(BaseTransformer): <NEW_LINE> <INDENT> def __init__(self, fraction_of_current_size): <NEW_LINE> <INDENT> self.fraction_of_current_size = fraction_of_current_size <NEW_LINE> <DEDENT> @overrides <NEW_LINE> def transform(self, observation): <NEW_LINE> <INDENT> return scipy.misc.imresize(observa...
Rescale a given image by a percentage
62598fd0656771135c489ab6
class HousePurchase(Purchase, House): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def prompt_init(): <NEW_LINE> <INDENT> init = House.prompt_init() <NEW_LINE> init.update(Purchase.prompt_init()) <NEW_LINE> return init
A class representin a house that is put for sale, having the details of both House and transaction to be made to purchase the house and the piece of land, that goes with the specified house
62598fd0956e5f7376df58a0
class EndPoint(TimePoint): <NEW_LINE> <INDENT> XML_tag = "end" <NEW_LINE> XML_tag_legacy = 'tEnd' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(self.__class__, self).__init__()
The end time of a :class:`~objects.TimeWindow.TimeWindow`. See documentation for :class:`~objects.timePoints.TimePoint`.
62598fd0091ae35668705071
class GuiFuncs(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def open_file(caption, lineedit: QtWidgets.QLineEdit, display_container: QtWidgets.QTextEdit or None = None, file: bool = True): <NEW_LINE> <INDENT> if file: <NEW_LINE> <INDENT> filename, _ = QtWidgets.QFileDialog.getOpenFileName(caption=caption, dire...
Class linking functions to existing gui
62598fd0fbf16365ca794502
class Catcher(base.PyGameWrapper): <NEW_LINE> <INDENT> def __init__(self, width=256, height=256, init_lives=3): <NEW_LINE> <INDENT> actions = { "left": K_a, "right": K_d } <NEW_LINE> base.PyGameWrapper.__init__(self, width, height, actions=actions) <NEW_LINE> self.fruit_size = percent_round_int(height, 0.06) <NEW_LINE>...
Based on `Eder Santana`_'s game idea. .. _`Eder Santana`: https://github.com/EderSantana Parameters ---------- width : int Screen width. height : int Screen height, recommended to be same dimension as width. init_lives : int (default: 3) The number lives the agent has.
62598fd03d592f4c4edbb2fb
class CacheController(BaseController): <NEW_LINE> <INDENT> @ckan_cache() <NEW_LINE> def defaults(self): <NEW_LINE> <INDENT> return "defaults" <NEW_LINE> <DEDENT> @ckan_cache(test=lambda *av, **kw: start + 3600) <NEW_LINE> def future(self): <NEW_LINE> <INDENT> return "future" <NEW_LINE> <DEDENT> @ckan_cache(test=lambda ...
Dummy controller - we are testing the decorator not the controller
62598fd0099cdd3c63675602
class Topic(object): <NEW_LINE> <INDENT> def __init__(self, pub_or_sub, name_regex, *args, **kwargs): <NEW_LINE> <INDENT> self._pub_or_sub = pub_or_sub <NEW_LINE> self._name_regex = name_regex <NEW_LINE> self._args = args <NEW_LINE> self._kwargs = kwargs <NEW_LINE> self._topics = {} <NEW_LINE> topics = self._get_all_to...
Super class for wildcard subscriber / publisher :type _topics: dict[str, (rospy.Subscriber|rospy.Publisher)]
62598fd09f28863672818aa0
class ObservedMac(Base): <NEW_LINE> <INDENT> __tablename__ = 'observed_mac' <NEW_LINE> switch_id = Column(Integer, ForeignKey('tor_switch.id', ondelete='CASCADE', name='obs_mac_hw_fk'), primary_key=True) <NEW_LINE> port_number = Column(Integer, primary_key=True) <NEW_LINE> mac_address = Column(AqMac(17), nullable=False...
reports the observance of a mac address on a switch port.
62598fd0656771135c489ab8
class City(Base): <NEW_LINE> <INDENT> __tablename__ = 'cities' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(128), nullable=False) <NEW_LINE> state_id = Column(Integer, ForeignKey("states.id"), nullable=False) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<Cities(name ='...
The city class for this table
62598fd060cbc95b06364785
@functools.total_ordering <NEW_LINE> class PhononMode(object): <NEW_LINE> <INDENT> __slots__ = [ "qpoint", "freq", "displ_cart", "structure" ] <NEW_LINE> def __init__(self, qpoint, freq, displ_cart, structure): <NEW_LINE> <INDENT> self.qpoint = Kpoint.as_kpoint(qpoint, structure.reciprocal_lattice) <NEW_LINE> self.freq...
A phonon mode has a q-point, a frequency, a cartesian displacement and a structure.
62598fd08a349b6b43686689
class TestGrainsReg(ModuleCase, LoaderModuleMockMixin): <NEW_LINE> <INDENT> def setup_loader_modules(self): <NEW_LINE> <INDENT> self.opts = opts = salt.config.DEFAULT_MINION_OPTS.copy() <NEW_LINE> utils = salt.loader.utils(opts, whitelist=['reg']) <NEW_LINE> return { salt.modules.reg: { '__opts__': opts, '__utils__': u...
Test the core windows grains
62598fd0cc40096d6161a3fb
class InternalGetVariable(InternalThreadCommand): <NEW_LINE> <INDENT> def __init__(self, seq, thread_id, frame_id, scope, attrs): <NEW_LINE> <INDENT> self.sequence = seq <NEW_LINE> self.thread_id = thread_id <NEW_LINE> self.frame_id = frame_id <NEW_LINE> self.scope = scope <NEW_LINE> self.attributes = attrs <NEW_LINE> ...
gets the value of a variable
62598fd097e22403b383b351
class HashServices (object): <NEW_LINE> <INDENT> def __init__(self, nodes): <NEW_LINE> <INDENT> self.nodes=[] <NEW_LINE> for n in nodes: <NEW_LINE> <INDENT> if n == 'self': <NEW_LINE> <INDENT> self.nodes.append(self) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.nodes.append(xmlrpclib.Server(n)) <NEW_LINE> <DEDENT...
Basic hash services.
62598fd0ec188e330fdf8cdf
class LoadDialog(BoxLayout): <NEW_LINE> <INDENT> load = ObjectProperty(None) <NEW_LINE> cancel = ObjectProperty(None) <NEW_LINE> file_types = ListProperty(['*.*']) <NEW_LINE> text_input = ObjectProperty(None) <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(LoadDialog, self).__init__(**kwargs) <NEW_LI...
'Load File' popup dialog.
62598fd0091ae35668705075
class DirectoryMarketingDescription(object): <NEW_LINE> <INDENT> swagger_types = { 'de': 'list[str]', 'en': 'list[str]', 'fr': 'list[str]', 'it': 'list[str]' } <NEW_LINE> attribute_map = { 'de': 'de', 'en': 'en', 'fr': 'fr', 'it': 'it' } <NEW_LINE> def __init__(self, de=None, en=None, fr=None, it=None): <NEW_LINE> <IND...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fd03617ad0b5ee06591
class Resource(MethodView): <NEW_LINE> <INDENT> representations = None <NEW_LINE> method_decorators = [] <NEW_LINE> def dispatch_request(self, *args, **kwargs): <NEW_LINE> <INDENT> meth = getattr(self, request.method.lower(), None) <NEW_LINE> if meth is None and request.method == 'HEAD': <NEW_LINE> <INDENT> meth = geta...
Represents an abstract RESTful resource. Concrete resources should extend from this class and expose methods for each supported HTTP method. If a resource is invoked with an unsupported HTTP method, the API will return a response with status 405 Method Not Allowed. Otherwise the appropriate method is called and passed ...
62598fd0bf627c535bcb18f7
class File(Base, bob.db.base.File): <NEW_LINE> <INDENT> __tablename__ = 'file' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> client_id = Column(Integer, ForeignKey('client.id')) <NEW_LINE> path = Column(String(100), unique=True) <NEW_LINE> session_id = Column(Integer) <NEW_LINE> camera_choices = ('ca0', ...
Generic file container
62598fd060cbc95b06364789
class FullpowerAnimator(Animator): <NEW_LINE> <INDENT> def __init__(self, calanfpga): <NEW_LINE> <INDENT> Animator.__init__(self, calanfpga) <NEW_LINE> self.figure = CalanFigure(n_plots=1, create_gui=True) <NEW_LINE> self.figure.create_axis(0, FullpowerAxis, self.settings.pow_info['reg_list']) <NEW_LINE> <DEDENT> def a...
Class used to plot full bandwidth power of ADC signals as bar plot. Useful to test the power calibration of multiple ADC.
62598fd05fcc89381b266372
class PageNumberPagination(object): <NEW_LINE> <INDENT> page_size = settings.API_PAGE_SIZE <NEW_LINE> django_paginator_class = Paginator <NEW_LINE> page_query_param = "page" <NEW_LINE> page_size_query_param = 'page_size' <NEW_LINE> max_page_size = None <NEW_LINE> last_page_strings = ("last",) <NEW_LINE> request = None ...
A simple page number based style that supports page numbers as query parameters. For example: http://api.example.org/accounts/?page=4 http://api.example.org/accounts/?page=4&page_size=100
62598fd0099cdd3c63675605
class AddressType(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'address_types' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> address_type = db.Column(db.String) <NEW_LINE> def __init__(self, address_type): <NEW_LINE> <INDENT> self.address_type = address_type
1|Electoral Postal 2|Electoral Physical 3|Parliamentary Postal 4|Parliamentary Physical 5|Alternative
62598fd0377c676e912f6f9e
class Potential (object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.explanation = ""
A potential class. Defined with the presence of two elements of the system.
62598fd04a966d76dd5ef324
class TemplateNodeRelationManager(models.Manager): <NEW_LINE> <INDENT> def related_map(self): <NEW_LINE> <INDENT> return self.select_related() <NEW_LINE> <DEDENT> def has_same_node(self, node, template): <NEW_LINE> <INDENT> return self.filter(node__code=node.code, node__name=node.name, node__parent=node.parent, templat...
Exposes additional methods for model query operations. Open Budgets makes extensive use of related_map and related_map_min methods for efficient bulk select queries.
62598fd0283ffb24f3cf3cd2
class Shots: <NEW_LINE> <INDENT> def __init__(self, player_id, league_id="00", season="2014-15", season_type="Regular Season", team_id=0, game_id="", outcome="", location="", month=0, season_segment="", date_from="", date_to="", opp_team_id=0, vs_conference="", vs_division="", position="", rookie_year="", game_segment=...
Shots is a wrapper around the NBA stats API that can access the shot chart data and player image.
62598fd0ec188e330fdf8ce3
class put_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'table', None, None, ), (2, TType.STRUCT, 'tput', (TPut, TPut.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, table=None, tput=None,): <NEW_LINE> <INDENT> self.table = table <NEW_LINE> self.tput = tput <NEW_LINE> <DEDENT> def read(self, ...
Attributes: - table: the table to put data in - tput: the TPut to put
62598fd07b180e01f3e49276
class PresenceSensor(Actor): <NEW_LINE> <INDENT> def __init__(self, name, id, topics, inputobj, auto_init=False, normally_open=True ): <NEW_LINE> <INDENT> super(PresenceSensor, self).__init__(name=name) <NEW_LINE> self._name = name <NEW_LINE> self._id = id <NEW_LINE> self.allowed_topics = ('State', 'Value', 'StationErr...
Presence sensor class as an active object
62598fd0a219f33f346c6c53
class Browser(zope.testbrowser.browser.Browser): <NEW_LINE> <INDENT> def __init__(self, *args, **kw): <NEW_LINE> <INDENT> kw['mech_browser'] = InterceptBrowser() <NEW_LINE> super(Browser, self).__init__(*args, **kw)
Override the zope.testbrowser.browser.Browser interface so that it uses InterceptBrowser.
62598fd0656771135c489abe
class ModuleInterceptor(object): <NEW_LINE> <INDENT> def __init__(self, moduleName, callback): <NEW_LINE> <INDENT> self.module = __import__(moduleName, globals(), locals(), ['']) <NEW_LINE> self.callback = callback <NEW_LINE> <DEDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return geta...
This class is used to intercept an unset attribute of a module to perfrom a callback. The callback will only be performed if the attribute does not exist on the module. Any error raised in the callback will cause the original AttributeError to be raised. def cb( module, attr): if attr == 'this': ...
62598fd03346ee7daa33786e
class FocalMechanism(_ModelWithResourceID): <NEW_LINE> <INDENT> triggering_origin_id: Optional[ResourceIdentifier] = None <NEW_LINE> nodal_planes: Optional[NodalPlanes] = None <NEW_LINE> principal_axes: Optional[PrincipalAxes] = None <NEW_LINE> azimuthal_gap: Optional[float] = None <NEW_LINE> station_polarity_count: Op...
Focal Mechanism
62598fd0099cdd3c63675606
class TimerCase(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def set_up_class(cls): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tear_down_class(cls): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def add_method(cls, method): <NEW_LINE> <INDENT> setattr(cls, me...
Timer case instances are the things that get timed by the framework. A :class:`timer runner <performance_analyst.timer_runner.TimerRunner>` can be used to time a collection of :class:`timer suites <performance_analyst.timer_suite.TimerSuite>` containing timer cases.
62598fd0ff9c53063f51aa9a
class DBTestTestFactory(factory.DjangoModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = DBTestTest <NEW_LINE> <DEDENT> data_info = factory.SubFactory(DBTestDataBaseFactory)
Define temp data Factory
62598fd0283ffb24f3cf3cd4
class FakeClass(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def imitate(cls, *others): <NEW_LINE> <INDENT> for other in others: <NEW_LINE> <INDENT> for name in other.__dict__: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> setattr(cls, name, mock.Mock()) <NEW_LINE> <DEDENT> except (TypeError, AttributeError): <N...
Fake class.
62598fd0ec188e330fdf8ce5
class FileFolderItem(Widget): <NEW_LINE> <INDENT> @decorate_constructor_parameter_types([str, bool]) <NEW_LINE> def __init__(self, text, is_folder=False, **kwargs): <NEW_LINE> <INDENT> super(FileFolderItem, self).__init__(**kwargs) <NEW_LINE> super(FileFolderItem, self).set_layout_orientation(Widget.LAYOUT_HORIZONTAL) ...
FileFolderItem widget for the FileFolderNavigator
62598fd060cbc95b0636478d
class InMayaSettings(BaseSettingsWidget): <NEW_LINE> <INDENT> def __init__(self, cameras=None, filename=None, parent=None, *args, **kwargs): <NEW_LINE> <INDENT> super(InMayaSettings, self).__init__(parent=parent) <NEW_LINE> self.mayaFileInput = Widgets.CueLabelLineEdit('Maya File:', filename) <NEW_LINE> self.cameraSele...
Settings widget to be used when launching from within Maya.
62598fd0d8ef3951e32c8083
class NodeRef: <NEW_LINE> <INDENT> REF_PATTERN = re.compile( r"(?P<dir1>:[a-z\-]+:)?(?P<dir2>[a-z\-]+:)?`?(?P<refname>.*)`?$" ) <NEW_LINE> STD_ROLES = ("doc", "label", "term", "cmdoption", "envvar", "opcode", "token") <NEW_LINE> def __init__(self, refname: str, role: str, lang: Optional[str]): <NEW_LINE> <INDENT> self....
Class for a reference to a sphinx node. Attributes ---------- refname : str The reference name to search for. role : str The role for the reference. Can be ``"any"`` to be totally ambiguous. lang : Optional[str] The language to match the role. ``None`` if omitted - this is not often needed.
62598fd0091ae3566870507b
class Cell(Context): <NEW_LINE> <INDENT> __tablename__ = 'cell' <NEW_LINE> id = Column(Integer, ForeignKey('context.id', ondelete='CASCADE'), primary_key=True) <NEW_LINE> document_id = Column(Integer, ForeignKey('document.id')) <NEW_LINE> table_id = Column(Integer, ForeignKey('table.id')) <NEW_LINE> p...
A cell Context in a Document.
62598fd0fbf16365ca79450c
class BumpyboxExtractTranscodeH264(api.InstancePlugin): <NEW_LINE> <INDENT> order = inventory.get_order(__file__, "BumpyboxExtractTranscodeH264") <NEW_LINE> families = ["h264", "h264_half"] <NEW_LINE> label = "Transcode H264" <NEW_LINE> optional = True <NEW_LINE> def process(self, instance): <NEW_LINE> <INDENT> data = ...
Enable/Disable h264 transcoding.
62598fd05fdd1c0f98e5e3dc
class BrushGroupsToolItem (widgets.MenuButtonToolItem): <NEW_LINE> <INDENT> __gtype_name__ = "MyPaintBrushGroupsToolItem" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> widgets.MenuButtonToolItem.__init__(self) <NEW_LINE> self.menu = BrushGroupsMenu()
Toolbar item showing a dynamic dropdown BrushGroupsMenu This is instantiated by the app's UIManager using a FactoryAction which must be named "BrushGroups" (see factoryaction.py).
62598fd00fa83653e46f5338
class AppStaticStorage(FileSystemStorage): <NEW_LINE> <INDENT> source_dir = 'static' <NEW_LINE> def __init__(self, app, *args, **kwargs): <NEW_LINE> <INDENT> bits = app.__name__.split('.')[:-1] <NEW_LINE> self.app_name = bits[-1] <NEW_LINE> self.app_module = '.'.join(bits) <NEW_LINE> app = import_module(self.app_module...
A file system storage backend that takes an app module and works for the ``static`` directory of it.
62598fd0283ffb24f3cf3cd6
class Executor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._test_filter = {} <NEW_LINE> <DEDENT> def test_filter(self): <NEW_LINE> <INDENT> return self._test_filter <NEW_LINE> <DEDENT> def clear_filter(self): <NEW_LINE> <INDENT> self._test_filter.clear() <NEW_LINE> <DEDENT> def test(self, ...
Maintains the collection of tests detected by the :class:`Watcher` and provides an interface to execute all or some of those tests.
62598fd060cbc95b0636478f
class Lighting(object): <NEW_LINE> <INDENT> def __init__(self, alphastd): <NEW_LINE> <INDENT> self.alphastd = alphastd <NEW_LINE> self.eigval = torch.Tensor([0.2175, 0.0188, 0.0045]) <NEW_LINE> self.eigvec = torch.Tensor([ [-0.5675, 0.7192, 0.4009], [-0.5808, -0.0045, -0.8140], [-0.5836, -0.6948, 0.4203], ]) <NEW_LINE>...
Lighting noise(AlexNet - style PCA - based noise)
62598fd0fbf16365ca79450e
class VerticalRange(BaseLayer): <NEW_LINE> <INDENT> time_lower = AstropyTime(help='The date/time at which the range starts.') <NEW_LINE> time_upper = AstropyTime(help='The date/time at which the range ends.') <NEW_LINE> color = Color(None, help='The fill color of the range.') <NEW_LINE> opacity = Opacity(0.2, help='The...
A continuous range specified by a lower and upper time.
62598fd04527f215b58ea321
class TestContentHistoryViewlet(ViewletsTestCase): <NEW_LINE> <INDENT> def afterSetUp(self): <NEW_LINE> <INDENT> self.folder.invokeFactory('Document', 'd1') <NEW_LINE> <DEDENT> def test_emptyHistory(self): <NEW_LINE> <INDENT> request = self.app.REQUEST <NEW_LINE> context = getattr(self.folder, 'd1') <NEW_LINE> viewlet ...
Test the workflow history viewlet
62598fd0bf627c535bcb18ff
class VmData: <NEW_LINE> <INDENT> vmid = None <NEW_LINE> vmname = None <NEW_LINE> vmstatus = None <NEW_LINE> vmtype = None
A simple class whose objects will store (VMid, VMname, VMstatus, VMtype) tuples
62598fd03346ee7daa337870
@injected <NEW_LINE> @setup(IMessageService) <NEW_LINE> class MessageServiceAlchemy(EntityGetCRUDServiceAlchemy, IMessageService): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> EntityGetCRUDServiceAlchemy.__init__(self, Message, QMessage) <NEW_LINE> <DEDENT> def getMessages(self, sourceId=None, offset=Non...
Alchemy implementation for @see: IMessageService
62598fd00fa83653e46f533a
class ShortestPath(MazeSolveAlgo): <NEW_LINE> <INDENT> def _solve(self): <NEW_LINE> <INDENT> self.start_edge = self._on_edge(self.start) <NEW_LINE> self.end_edge = self._on_edge(self.start) <NEW_LINE> start = self.start <NEW_LINE> if self.start_edge: <NEW_LINE> <INDENT> start = self._push_edge(self.start) <NEW_LINE> <D...
The Algorithm: 1) create a solution for each starting position 2) loop through each solution, and find the neighbors of the last element 3) a solution reaches the end or a dead end when we mark it by appending a None. 4) clean-up solutions Results Find all unique solutions. Works against imperfect mazes.
62598fd0dc8b845886d53a10
class Session(object): <NEW_LINE> <INDENT> def query(self, *args, **kwargs): <NEW_LINE> <INDENT> return self.session.query(*args, **kwargs) <NEW_LINE> <DEDENT> def files(self, **kwargs): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def models(self): <NEW_LINE> <INDENT> return [x[0] for x in self.qu...
Holds a connection to the catalog Create using :func:`ARCCSSive.CMIP5.connect()`
62598fd0adb09d7d5dc0a9cd
class AgentState(Enum): <NEW_LINE> <INDENT> NAVIGATING = 1 <NEW_LINE> BLOCKED_BY_VEHICLE = 2 <NEW_LINE> BLOCKED_RED_LIGHT = 3
AGENT_STATE represents the possible states of a roaming agent
62598fd09f28863672818aa6
class RequestError(Error): <NEW_LINE> <INDENT> pass
Raised when server failed to process a request. The client can continue normally with another request or repeat the failing request.
62598fd07b180e01f3e49279
class BadExpectation(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(BadExpectation, self).__init__(message) <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return colored(self.message, 'red')
Raised when an assertion fails.
62598fd0bf627c535bcb1901
class AlreadyRegistered(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(AlreadyRegistered, self).__init__('Endpoint {} is already registered'.format(message))
Exception raised attempting to register an endpoint already registered.
62598fd055399d3f0562696f
class Solution: <NEW_LINE> <INDENT> def longestConsecutive(self, root): <NEW_LINE> <INDENT> return self.helper(root, None, 0) <NEW_LINE> <DEDENT> def helper(self, node, parent, length): <NEW_LINE> <INDENT> if node == None: <NEW_LINE> <INDENT> return length <NEW_LINE> <DEDENT> if parent and node.val == parent.val+1: <NE...
@param root: the root of binary tree @return: the length of the longest consecutive sequence path
62598fd05fdd1c0f98e5e3e2
class MaxPooling3D(object): <NEW_LINE> <INDENT> def __init__(self, window_size, stride_size, num_gpus=1, default_gpu_id=0, scope="max_pool_3d"): <NEW_LINE> <INDENT> self.window_size = window_size <NEW_LINE> self.stride_size = stride_size <NEW_LINE> self.scope = scope <NEW_LINE> self.device_spec = get_device_spec(defaul...
max pooling layer
62598fd0377c676e912f6fa3
class IofloMaster(object): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self.opts = opts <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> behaviors = ['salt.transport.road.raet', 'salt.daemons.flo'] <NEW_LINE> metadata = explode_opts(self.opts) <NEW_LINE> ioflo.app.run.start( name='master',...
IofloMaster Class
62598fd00fa83653e46f533e
class UploadJSON(FlaskForm): <NEW_LINE> <INDENT> selectarchivefile = FileField('CFFA Archive File', validators=[FileRequired(), FileAllowed('cffaDB', 'CFFA DB exports only!')]) <NEW_LINE> submitrecovery = SubmitField("Reset and Recover DB")
Form to upload JSON into the DB. Not implemented and likely validators will not work yet. Once implemented this will drop the current database collections for the tenancy to upload the JSON data. Will not append existing data. TO DO: Implement Attributes ---------- selectarchivefile : FileField FlaskForm class t...
62598fd0283ffb24f3cf3cdd
class StatIncrease: <NEW_LINE> <INDENT> def __init__(self, max_hp_up, max_hp_percentage_up, max_magic_points_up, max_magic_points_percentage_up, attack_up, attack_percentage_up, defense_up, defense_percentage_up, attack_speed_up, crit_rate_up, crit_damage_up, resistance_up, accuracy_up): <NEW_LINE> <INDENT> self.max_hp...
This class contains attributes of increase in stats of a rune.
62598fd0be7bc26dc9252084
class Query(APIOperation): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.api = DataAPI() <NEW_LINE> self.cr = CReader('../APIInterface/sampledata') <NEW_LINE> <DEDENT> def probe(self): <NEW_LINE> <INDENT> self.api.connect() <NEW_LINE> self.api.dispReq(self.api.req) <NEW_LINE> self.api.dispRes(self.ap...
classdocs
62598fd0a219f33f346c6c5e
class FaceApi(object): <NEW_LINE> <INDENT> def __init__(self, spath, attrs='gender,age'): <NEW_LINE> <INDENT> self.attrs = attrs <NEW_LINE> self.spath = spath <NEW_LINE> self.frist_write = True <NEW_LINE> self.faceurl = 'https://api-cn.faceplusplus.com/facepp/v3/detect' <NEW_LINE> self.payload = {'api_key': 'your_api_k...
docstring for FaceApi
62598fd03617ad0b5ee0659f
class Heiltrank(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ID = 0 <NEW_LINE> self.typ = "Energie" <NEW_LINE> self.name = "Heiltrank" <NEW_LINE> zeile1 = [1] <NEW_LINE> self.spalte = [zeile1] <NEW_LINE> self.stapelbar = True <NEW_LINE> self.actor = Actor("models/box.x") <NEW_LINE> self.anzahl = ...
Erstellt ein Item vom Typ Heiltrank
62598fd0656771135c489ac8
class BaseFactory(factory.alchemy.SQLAlchemyModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> sqlalchemy_session = db_session <NEW_LINE> sqlalchemy_session_persistence = 'flush'
Base model factory.
62598fd0bf627c535bcb1905
class CharacterClass(GenericEntry): <NEW_LINE> <INDENT> def __init__(self, e, file=None): <NEW_LINE> <INDENT> super().__init__(e, file=None) <NEW_LINE> <DEDENT> def display(self): <NEW_LINE> <INDENT> displayNext(self.element)
docstring for CharacterClass
62598fd00fa83653e46f5340
class ColourIndicator(wx.Window): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> wx.Window.__init__(self, parent, -1, style=wx.SUNKEN_BORDER) <NEW_LINE> self.SetBackgroundColour(wx.WHITE) <NEW_LINE> self.SetMinSize( (45, 45) ) <NEW_LINE> self.colour = self.thickness = None <NEW_LINE> self.Bind(wx.E...
An instance of this class is used on the ControlPanel to show a sample of what the current doodle line will look like.
62598fd0ff9c53063f51aaa4
class TestInlineObject8(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 testInlineObject8(self): <NEW_LINE> <INDENT> pass
InlineObject8 unit test stubs
62598fd097e22403b383b361
class MyChevyStatus(Entity): <NEW_LINE> <INDENT> _name = "MyChevy Status" <NEW_LINE> _icon = "mdi:car-connected" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._state = None <NEW_LINE> <DEDENT> async def async_added_to_hass(self): <NEW_LINE> <INDENT> self.async_on_remove( self.hass.helpers.dispatcher.async_dis...
A string representing the charge mode.
62598fd0ad47b63b2c5a7cb4
class DiskCreateOptionTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> FROM_IMAGE = "FromImage" <NEW_LINE> EMPTY = "Empty" <NEW_LINE> ATTACH = "Attach"
Specifies how the virtual machine should be created.:code:`<br>`:code:`<br>` Possible values are::code:`<br>`:code:`<br>` **Attach** – This value is used when you are using a specialized disk to create the virtual machine.:code:`<br>`:code:`<br>` **FromImage** – This value is used when you are using an image to create ...
62598fd07b180e01f3e4927c