code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class BatteryTestGroup(Group): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> self.options.declare('vec_size',default=1,desc="Number of mission analysis points to run") <NEW_LINE> self.options.declare('efficiency', default=1., desc='Efficiency (dimensionless)') <NEW_LINE> self.options.declare('p', defaul...
Test the battery component
62598f8266656f66f7d59e65
class BaseTestCase(AutopilotTestCase): <NEW_LINE> <INDENT> local_location = os.path.dirname(os.path.dirname(os.getcwd())) <NEW_LINE> local_location_qml = os.path.join(local_location, 'Main.qml') <NEW_LINE> click_package = '{0}.{1}'.format('networkaccessmanagerfactory', 'liu-xiao-guo') <NEW_LINE> def setUp(self): <NEW_L...
A common test case class
62598f82004d5f362081ed33
class DataManager(object): <NEW_LINE> <INDENT> _data_path = None <NEW_LINE> _DATA_FOLDER_ = u("data") <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._data_path = os.path.join( ProjectUtils.get_project_root(), self._DATA_FOLDER_) <NEW_LINE> if not os.path.exists(self._data_path): <NEW_LINE> <INDENT> raise Runti...
This class is responsible for providing utilities for accessing test data, the ones stored in the /data folder. There is a global singleton instance called 'WTF_DATA_MANAGER' that you can use. The idea of having a DataManager class is so you can remove hard coded references to your data files. This allows other p...
62598f828da39b475be02c57
class OneLineTextField(TextField): <NEW_LINE> <INDENT> typeName = 'OneLineText' <NEW_LINE> editorClass = dataeditors.OneLineTextEditor <NEW_LINE> def __init__(self, name, attrs=None): <NEW_LINE> <INDENT> super().__init__(name, attrs) <NEW_LINE> <DEDENT> def formatOutput(self, storedText, titleMode, formatHtml): <NEW_LI...
Class to handle a single-line rich-text field format type. Stores options and format strings for a text field type. Provides methods to return formatted data.
62598f820383005118f6d173
class MultiHostSequentialAmi(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._amis = [] <NEW_LINE> self._actions = [] <NEW_LINE> self._errors = [] <NEW_LINE> <DEDENT> def add_action(self, action, parameters, callback=None, stop_event=None): <NEW_LINE> <INDENT> self._actions.append((action, par...
Run multiple SequentialAmis at the same time. Note that connecting to a host can delay things. Also not that broken connections will slow things down. Example usage:: s = MultiHostSequentialAmi() kwargs = {'username': 'username', 'secret': 'secret', 'auth': 'md5'} s.add_action('command', {'Command': 'modu...
62598f823eb6a72ae038a0a8
class OptionManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> _rules = {} <NEW_LINE> _mappings = {} <NEW_LINE> _submanagers = {} <NEW_LINE> <DEDENT> def setoption(self, option, value): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getoption(self, option): <NEW_LINE> <INDENT> pass <NEW_LINE...
Manage all option, reads and writes to config file
62598f820fa83653e46f4961
class ArithmeticProgression(Progression): <NEW_LINE> <INDENT> def __init__(self, increment=1, start=0): <NEW_LINE> <INDENT> super().__init__(start) <NEW_LINE> self._increment = increment <NEW_LINE> <DEDENT> def _advance(self): <NEW_LINE> <INDENT> self._current += self._increment
Iterator producing an arithmetic progression.
62598f8276d4e153a661c684
@_maybe_register_keras_serializable(package='TensorFlowTransform') <NEW_LINE> class TransformFeaturesLayer(tf.keras.Model): <NEW_LINE> <INDENT> def __init__(self, tft_output: TFTransformOutput, exported_as_v1: Optional[bool] = None): <NEW_LINE> <INDENT> super().__init__(trainable=False) <NEW_LINE> self._tft_output = tf...
A Keras layer for applying a tf.Transform output to input layers.
62598f82097d151d1a2c0a96
class MayaCommandException(Exception): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._responseData = kwargs.get('response') if 'response' in kwargs else None <NEW_LINE> Exception.__init__(self, *args) <NEW_LINE> <DEDENT> @property <NEW_LINE> def response(self): <NEW_LINE> <INDENT> re...
A class for...
62598f821f037a2d8b9e3b5a
class Database(object): <NEW_LINE> <INDENT> def __init__(self, connection_string): <NEW_LINE> <INDENT> uri_dict = uri_parser.parse_uri(connection_string) <NEW_LINE> if not uri_dict['database']: <NEW_LINE> <INDENT> raise Exception("Invalid Mongo URI. Database name must be specified.") <NEW_LINE> <DEDENT> try: <NEW_LINE>...
Responsible for all dork related communication with the glastopf mongo database.
62598f8226238365f5fac5e0
class Output: <NEW_LINE> <INDENT> vcf = FileField(label="Annotated VCF file") <NEW_LINE> tbi = FileField(label="Tabix index") <NEW_LINE> summary = FileHtmlField(label="Summary of the analysis") <NEW_LINE> species = StringField(label="Species") <NEW_LINE> build = StringField(label="Build")
Output fields for EnsemblVep.
62598f8223e79379d538bf6b
class SwitcherControl(wx.Panel): <NEW_LINE> <INDENT> def __init__(self, parent, id, model, label=None, **kw): <NEW_LINE> <INDENT> wx.Panel.__init__(self, parent, id, **kw) <NEW_LINE> self.model = model <NEW_LINE> self.label = label <NEW_LINE> self._create_widget(model, label) <NEW_LINE> model.observe(self._on_selected_...
The default switcher control (a combo box).
62598f824e696a045264db3a
class test_ui(QMainWindow, main.Ui_MainWindow): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(test_ui, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.pathname.setText('E:/20140905taobao/upload') <NEW_LINE> self.widename.setText('60') <NEW_LINE> QObject.connect(self...
docstring for test_ui
62598f8207d97122c4216715
class Negate(Node): <NEW_LINE> <INDENT> def __init__(self, status, given_priority, child): <NEW_LINE> <INDENT> super().__init__(status, given_priority, "Negation Decorator") <NEW_LINE> self.children.append(child) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.children[0].run() <NEW_LINE> if (self.children[...
Timer Decoractor Constructor Purpose: A Negate decorator reverses the status of the child node. Arguments: start_status (bool), True = Success False = Failed, given_priority (int), to be used by a Priority Composite. Returns: Nothing Effects: Creates a new Node, and initializes Notes:
62598f8250485f2cf55da9e4
class FrozenDict(dict): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.update(*args, **kwargs) <NEW_LINE> <DEDENT> def __setitem__(self, key, val): <NEW_LINE> <INDENT> if key in self: <NEW_LINE> <INDENT> raise KeyError("Cannot overwrite existent key: %s" % str(key)) <NEW_LINE> <DEDENT...
A dictionary that does not permit to redefine its keys.
62598f8210dbd63aa1c70624
class CScriptOp(int): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> @staticmethod <NEW_LINE> def encode_op_pushdata(d): <NEW_LINE> <INDENT> if len(d) < 0x4c: <NEW_LINE> <INDENT> return b'' + bytes([len(d)]) + d <NEW_LINE> <DEDENT> elif len(d) <= 0xff: <NEW_LINE> <INDENT> return b'\x4c' + bytes([len(d)]) + d <NEW_LINE> ...
A single script opcode
62598f82d6c5a102081e1bbb
class ProjectsOperationsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'projects_operations' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(SpeechV1.ProjectsOperationsService, self).__init__(client) <NEW_LINE> self._upload_configs = { }
Service class for the projects_operations resource.
62598f82d53ae8145f917f01
class RefreshJSONWebTokenSerializer(VerificationBaseSerializer): <NEW_LINE> <INDENT> @property <NEW_LINE> def object(self): <NEW_LINE> <INDENT> return self.validated_data <NEW_LINE> <DEDENT> def validate(self, attrs): <NEW_LINE> <INDENT> token = attrs['token'] <NEW_LINE> payload = self._check_payload(token=token) <NEW_...
Refresh an access token.
62598f82cad5886f8bdc4d99
class PostNorm(Module): <NEW_LINE> <INDENT> def __init__(self, d_model:int, sublayer:Module): <NEW_LINE> <INDENT> store_attr('sublayer') <NEW_LINE> self.norm = nn.LayerNorm(d_model) <NEW_LINE> <DEDENT> def forward(self, x, *args, **kwargs): <NEW_LINE> <INDENT> x = self.sublayer(x, *args, **kwargs) <NEW_LINE> return sel...
Adds LayerNorm after sublayer
62598f825f7d997b871f9111
class SlotsUpdatesUnsubscribe(Unsubscribe): <NEW_LINE> <INDENT> def __init__(self, subscription: int) -> None: <NEW_LINE> <INDENT> super().__init__("slotsUpdatesUnsubscribe", subscription)
Request body for slotUpdatesUnsubscribe.
62598f82fb3f5b602db47eea
class PyshSimpleExpression(AstNode): <NEW_LINE> <INDENT> def __init__(self, invoke_name: str, arguments: List[str], keyword_arguments: Dict[str, str]): <NEW_LINE> <INDENT> self.invoke_name = invoke_name <NEW_LINE> self.arguments = arguments <NEW_LINE> self.keyword_arguments = keyword_arguments
the base pysh expression
62598f821d351010ab8f35b1
class ScaledDotProductAttention(nn.Module): <NEW_LINE> <INDENT> def __init__(self, temperature, attn_dropout=0.1): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.temperature = temperature <NEW_LINE> self.dropout = nn.Dropout(attn_dropout) <NEW_LINE> <DEDENT> def forward(self, q, k, v, mask=None): <NEW_LINE> <IN...
Scaled Dot-Product Attention
62598f8294891a1f408b9428
class TrainingExecutorConstructorTest(test.TestCase): <NEW_LINE> <INDENT> def test_required_arguments_set(self): <NEW_LINE> <INDENT> estimator = estimator_lib.Estimator(model_fn=lambda features: features) <NEW_LINE> train_spec = training.TrainSpec(input_fn=lambda: 1) <NEW_LINE> eval_spec = training.EvalSpec(input_fn=la...
Tests constructor of _TrainingExecutor.
62598f82d164cc61758209eb
class comment_delete_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I32, 'user_id', None, None, ), (2, TType.I32, 'post_id', None, None, ), (3, TType.I32, 'comment_id', None, None, ), ) <NEW_LINE> def __init__(self, user_id=None, post_id=None, comment_id=None,): <NEW_LINE> <INDENT> self.user_id = user_id <NE...
Attributes: - user_id - post_id - comment_id
62598f821f5feb6acb1626a7
class Test_Webserver(): <NEW_LINE> <INDENT> log_info = { 'filename': os.path.join('logs','Webserver.log'), 'level': logging.INFO } <NEW_LINE> def __init__(self,_argv): <NEW_LINE> <INDENT> args = self.parseArgv(_argv) <NEW_LINE> port = args['port'] <NEW_LINE> logging.basicConfig(**self.log_info) <NEW_LINE> self._server ...
Butterfly 2.0 EM Data server 2017 VCG + Lichtman Lab
62598f82a17c0f6771d5bcb7
class ACSLogRecord(logging.LogRecord): <NEW_LINE> <INDENT> def __init__(self, name, level, pathname, lineno, msg, args, exc_info, func=None): <NEW_LINE> <INDENT> logging.LogRecord.__init__(self,name,level,pathname,lineno,msg,args,exc_info,func) <NEW_LINE> try: <NEW_LINE> <INDENT> self.source,self.name = name.split('.',...
This class extends the regular LogRecord information to capture specific information for ACS.
62598f823eb6a72ae038a0ab
class CFM_655: <NEW_LINE> <INDENT> play = Hit(ENEMY_WEAPON, 1)
Toxic Sewer Ooze
62598f82e64d504609df90ea
class FileHandler(Thread): <NEW_LINE> <INDENT> def __init__(self, directory_base=""): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.list_of_files = [] <NEW_LINE> self.directory_base = directory_base <NEW_LINE> self.did_finish_starting_asynchronous = False <NEW_LINE> if not os.path.isdir(directory_base): <NEW_L...
Create files fast, threaded and write data into them. There are two way to use this. You can use it to batch process created files or to give you an OutPutfile that you can continuesly put stuff to it and later mark it for final output. When you made sure that you wrote all the data for a file in its buffer (write_data...
62598f82f7d966606f747a5c
class RedisMthodHookInstance(object): <NEW_LINE> <INDENT> id_call = 0 <NEW_LINE> def __init__(self , classname , method , logname): <NEW_LINE> <INDENT> self.classname = classname <NEW_LINE> self.method = method <NEW_LINE> <DEDENT> def __call__(self , *args , **kwargs): <NEW_LINE> <INDENT> assert self.classname <NE...
拦截类的所有函数调用方法,输出调用信息
62598f8273bcbd0ca4bc9cc5
class ParserNotAvailableError(DeepMergeError): <NEW_LINE> <INDENT> pass
An error raised when a file does not have an appropriate parser to read it currently installed
62598f8229b78933be269e14
class GeneratorSection(Section): <NEW_LINE> <INDENT> TAG = 'generator' <NEW_LINE> def __init__(self, items=None): <NEW_LINE> <INDENT> super(GeneratorSection, self).__init__() <NEW_LINE> self._add_member( 'file', str, 'File containing the generator function.') <NEW_LINE> self._add_member( 'module', str, 'Module containi...
Defines a fusesoc section for a Generator. The function specified is run during an extended elaboration to create additional source files.
62598f82be383301e025326e
@public <NEW_LINE> @implementer(IRule) <NEW_LINE> class MaximumRecipients: <NEW_LINE> <INDENT> name = 'max-recipients' <NEW_LINE> description = _('Catch messages with too many explicit recipients.') <NEW_LINE> record = True <NEW_LINE> def check(self, mlist, msg, msgdata): <NEW_LINE> <INDENT> if mlist.max_num_recipients...
The maximum number of recipients rule.
62598f82b57a9660fecd14f1
class FixedTzOffset(tzinfo): <NEW_LINE> <INDENT> ZERO = timedelta(0) <NEW_LINE> def __init__(self, offset, name): <NEW_LINE> <INDENT> self._offset = timedelta(minutes=offset) <NEW_LINE> self._name = name <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<%s %s %s>' % (self.__class__.__name__, self._na...
Fixed offset in minutes east from UTC.
62598f8223e79379d538bf6e
class CooperatorHunter(Player): <NEW_LINE> <INDENT> name = "Cooperator Hunter" <NEW_LINE> classifier = { "memory_depth": float("inf"), "stochastic": False, "makes_use_of": set(), "long_run_time": False, "inspects_source": False, "manipulates_source": False, "manipulates_state": False, } <NEW_LINE> def strategy(self, op...
A player who hunts for cooperators. Names: - Cooperator Hunter: Original name by Karol Langner
62598f829b70327d1c57e812
class BattleField(battlesim.BattleField): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def configure(cls, config): <NEW_LINE> <INDENT> for param in ('ExtendedNeighborhoodSize', 'DynamicFieldDecayFactor'): <NEW_LINE> <INDENT> getattr(cls, 'set%s'%(param))(int(config.get('Common', param))) <NEW_LINE> <DEDENT> for param in...
Light wrapper around C++ side BattleField class.
62598f82711fe17d825e015d
class FlexibleDotScrapyPersistence(DotScrapyPersistence): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_crawler(cls, crawler): <NEW_LINE> <INDENT> settings = crawler.settings <NEW_LINE> enabled = settings.getbool('FLEXIBLEDOTSCRAPY_ENABLED') <NEW_LINE> if not enabled: <NEW_LINE> <INDENT> raise NotConfigured <NEW...
A subclass of scrapy_dotpersistence.DotScrapyPersistence (==0.3.0) to allow the content to be backed up to our bucket rather than ScrapingHub's. Grotty in the absence of a fixed interface. FIXME: According to the docs at https://support.scrapinghub.com/support/solutions/articles/22000225188-syncing-your-scrapy-folder-...
62598f82d6c5a102081e1bbd
class Callback: <NEW_LINE> <INDENT> def GET(self): <NEW_LINE> <INDENT> return render.error_404()
OAuth callback
62598f8207d97122c4216718
class HorizontalCorridor(Corridor): <NEW_LINE> <INDENT> OFFSET = Position(1, 1) <NEW_LINE> is_horizontal = True <NEW_LINE> def __init__(self, position, length, width=1): <NEW_LINE> <INDENT> self.length = length <NEW_LINE> super().__init__(position, Size(self.length, width)) <NEW_LINE> <DEDENT> def get_position(self, le...
Horizontal corridor. ##### .....
62598f8207f4c71912baeeb8
class JsonString(str): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return json_encode(self) <NEW_LINE> <DEDENT> @property <NEW_LINE> def base(self): <NEW_LINE> <INDENT> return str(self)
Hack so repr() called by dumpdata will output JSON instead of Python formatted data. This way fixtures will work!
62598f82004d5f362081ed35
class GalleryDataDiskImage(GalleryDiskImage): <NEW_LINE> <INDENT> _validation = { 'size_in_gb': {'readonly': True}, 'lun': {'required': True}, } <NEW_LINE> _attribute_map = { 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'str'}, 'source': {'key': 'source', 'type': 'Gal...
This is the data disk image. 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 size_in_gb: This property indicates the size of the VHD to be created. :vartype size_in_gb: int :ivar host_caching: The host ...
62598f8215baa723494619f4
class Counter(Widget): <NEW_LINE> <INDENT> __slots__ = ('to_format',) <NEW_LINE> def __init__(self, format_text='%d'): <NEW_LINE> <INDENT> self.format_text = format_text <NEW_LINE> <DEDENT> def update(self, pbar): <NEW_LINE> <INDENT> return self.format_text % pbar.currval
Displays the current count
62598f827c178a314d78cf21
class TFEModule(co.Module): <NEW_LINE> <INDENT> def __init__(self, name, name_to_hyperp, compile_fn, input_names, output_names, scope=None): <NEW_LINE> <INDENT> co.Module.__init__(self, scope, name) <NEW_LINE> for h in name_to_hyperp: <NEW_LINE> <INDENT> if not isinstance(name_to_hyperp[h], co.Hyperparameter): <NEW_LIN...
Class for taking TFEager code and wrapping it in a DeepArchitect module. This class subclasses :class:`deep_architect.core.Module` as therefore inherits all the information associated to it (e.g., inputs, outputs, and hyperparameters). It also enables to do the compile and forward operations for these types of modules...
62598f82c432627299fa2a44
class ConfigurableMixin: <NEW_LINE> <INDENT> config_type = None <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self._config_parser = None <NEW_LINE> self.config_path = os.path.join(self.get_config_base(), self.name) <NEW_LINE> self.config_file = os.path....
A mixin class for configurable entities.
62598f826e29344779b000da
class Atari(object): <NEW_LINE> <INDENT> def __init__(self, envName, no_op_steps=10, agent_history_length=4): <NEW_LINE> <INDENT> self.env = gym.make(envName) <NEW_LINE> self.process_frame = FrameProcessor() <NEW_LINE> self.state = None <NEW_LINE> self.last_lives = 0 <NEW_LINE> self.no_op_steps = no_op_steps <NEW_LINE>...
Wrapper for the environment provided by gym
62598f8210dbd63aa1c70629
class SubstitutionRule(Record): <NEW_LINE> <INDENT> def __init__(self, name, arguments, expression): <NEW_LINE> <INDENT> assert isinstance(arguments, tuple) <NEW_LINE> Record.__init__(self, name=name, arguments=arguments, expression=expression) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "%s(%s) :...
.. attribute:: name .. attribute:: arguments A tuple of strings .. attribute:: expression
62598f8223849d37ff850b33
class ServiceManager(Ice.Object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if __builtin__.type(self) == _M_IceBox.ServiceManager: <NEW_LINE> <INDENT> raise RuntimeError('IceBox.ServiceManager is an abstract class') <NEW_LINE> <DEDENT> <DEDENT> def ice_ids(self, current=None): <NEW_LINE> <INDENT> retu...
Administers a set of Service instances.
62598f826fb2d068a7693b69
class Linear(BaseSequencer): <NEW_LINE> <INDENT> name = 'Linear' <NEW_LINE> @staticmethod <NEW_LINE> def flatten(startnode, integerarray, order=None): <NEW_LINE> <INDENT> startnode, integerarray = _check_input(startnode, integerarray) <NEW_LINE> shape = integerarray.array.shape <NEW_LINE> tmpdata = np.arange(np.prod(sh...
Linear output sequence for N dimensional arrays.
62598f82711fe17d825e015f
class UserCSVImportView(CSVImportView): <NEW_LINE> <INDENT> import_function = staticmethod(import_users) <NEW_LINE> permission_required = 'participant.can_manage_participant' <NEW_LINE> success_url_name = 'user_overview' <NEW_LINE> template_name = 'participant/user_form_csv_import.html'
Import users via CSV.
62598f8282261d6c5272fc0f
class ResponseMeta(object): <NEW_LINE> <INDENT> swagger_types = { 'response_type': 'str', 'current_page': 'int', 'total_pages': 'int', 'limit': 'int' } <NEW_LINE> attribute_map = { 'response_type': 'responseType', 'current_page': 'currentPage', 'total_pages': 'totalPages', 'limit': 'limit' } <NEW_LINE> def __init__(sel...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f820a366e3fb87dc443
class TarsqiFrame(wx.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, id, title, size=(800,800), pos=(50,50), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE): <NEW_LINE> <INDENT> wx.Frame.__init__(self, parent,wx.ID_ANY, title, size=size, pos=pos, style=style) <NEW_LINE> <DEDENT> def OnExit(self, e): <...
Abstract class that contains common functionality for the windows in the Tarsqi application. It is not supposed to have any instances.
62598f828e71fb1e983bb531
class Disconnected(base.WebHandler): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> client_id = self.request.get('from') <NEW_LINE> _log.info('channel %s has disconnected' % client_id)
Request handler to deal with channels that have disconnected.
62598f82a05bb46b3848a2f2
class Relay(Base): <NEW_LINE> <INDENT> __tablename__ = "relay" <NEW_LINE> name = db.Column(IdnaDomain, primary_key=True, nullable=False) <NEW_LINE> smtp = db.Column(db.String(80), nullable=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
Relayed mail domain. The domain is either relayed publicly or through a specified SMTP host.
62598f8215baa723494619f6
class CustomQGraphicsScene(QtGui.QGraphicsScene): <NEW_LINE> <INDENT> def __init__(self, x, y, width, height): <NEW_LINE> <INDENT> self.scene_xmin, self.scene_ymin, self.scene_width, self.scene_height = x, y, width, height <NEW_LINE> QtGui.QGraphicsScene.__init__(self,x,y,width,height) <NEW_LINE> self.projwin = None <...
Custom QGraphicsScene so I can handle custom implementations of mouse click event inherited functions, etc.
62598f82dc8b845886d5302d
class FeffInputSet(AbstractFeffInputSet): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> module_dir = os.path.dirname(os.path.abspath(__file__)) <NEW_LINE> self._config = ConfigParser.SafeConfigParser() <NEW_LINE> self._config.optionxform = str <NEW_LINE> self._config.read...
Standard implementation of FeffInputSet, which can be extended by specific implementations.
62598f82596a8972361276e9
@python_2_unicode_compatible <NEW_LINE> class DeviceBay(models.Model): <NEW_LINE> <INDENT> device = models.ForeignKey('Device', related_name='device_bays', on_delete=models.CASCADE) <NEW_LINE> name = models.CharField(max_length=50, verbose_name='Name') <NEW_LINE> installed_device = models.OneToOneField('Device', relate...
An empty space within a Device which can house a child device
62598f8223e79379d538bf71
class CopyrightAuthorSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = CopyrightAuthor <NEW_LINE> exclude = ('id', 'copyright')
ModelSerializer for `CopyrightAuthor` with all fields excluding `id` and `copyright`
62598f82a17c0f6771d5bcbb
class About(GoogleObject): <NEW_LINE> <INDENT> @property <NEW_LINE> def user(self): <NEW_LINE> <INDENT> return self.data['user'] <NEW_LINE> <DEDENT> @property <NEW_LINE> def email(self): <NEW_LINE> <INDENT> return self.user['emailAddress'] <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> ret...
Docstring for User Resource, this is READ ONLY
62598f823eb6a72ae038a0af
class SerialPosRestriction(object): <NEW_LINE> <INDENT> DEFAULT_POS_SEPARATOR = "," <NEW_LINE> DEFAULT_GROUP_SEPARATOR = ";" <NEW_LINE> def __init__( self, description: str = "", position_separator: str = DEFAULT_POS_SEPARATOR, group_separator: str = DEFAULT_GROUP_SEPARATOR, permissible_combinations: List[List[int]] = ...
Class to describe restrictions on the serial order positions offered at the choice phase. :ivar permissible_combinations: variable of type ``Set[Tuple[int]]``, where the tuples are sorted sequences of serial order position numbers (1 being the first). If the set is not empty, then only such combinations ar...
62598f82fbf16365ca793b21
class CATRegisterE08(CATRegister): <NEW_LINE> <INDENT> register_type = "E08" <NEW_LINE> register_fields = [ ('serial_number', 20, basestring), ('additional_mf', 1, basestring), ('ecf_model', 20, basestring), ('user_cnpj', 14, number), ('mfd_number', 20, basestring) ]
Register E08 - MFD devices list
62598f8273bcbd0ca4bc9cc9
class DropButton(QtGui.QPushButton): <NEW_LINE> <INDENT> dropped = QtCore.pyqtSignal(list) <NEW_LINE> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(DropButton, self).__init__(parent) <NEW_LINE> self.setAcceptDrops(True) <NEW_LINE> <DEDENT> def dragEnterEvent(self, event): <NEW_LINE> <INDENT> if event.mimeD...
Custom button that will accept drag and drop events.
62598f8207d97122c421671b
class GameModelCreator(BaseVisitor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.game = Game() <NEW_LINE> self.variation_stack = collections.deque([self.game]) <NEW_LINE> self.starting_comment = "" <NEW_LINE> self.in_variation = False <NEW_LINE> <DEDENT> def visit_header(self, tagname, tagvalue): <...
Creates a game model. Default visitor for :func:`~chess.pgn.read_game()`.
62598f82d10714528d69d947
class CreadorSaldos(Campo): <NEW_LINE> <INDENT> def __init__(self, nombre, inicial, **kwargs): <NEW_LINE> <INDENT> self.inicial = inicial <NEW_LINE> self.columnas_euro = {} <NEW_LINE> super(CreadorSaldos, self).__init__(nombre, size=None, **kwargs) <NEW_LINE> <DEDENT> def crea_campo(self, cls, nombre, cd, ch, field_nam...
CreadorSaldos: Utilidad para crear los campos de Saldos. Este "campo" simplemente crea de golpe los campos de saldos de todos los meses de forma mas rapida que escribirlos todos a mano...
62598f82442bda511e95bed3
class WebAppProduct(object): <NEW_LINE> <INDENT> def __init__(self, webapp): <NEW_LINE> <INDENT> self.webapp = webapp <NEW_LINE> <DEDENT> def id(self): <NEW_LINE> <INDENT> return self.webapp.pk <NEW_LINE> <DEDENT> def external_id(self): <NEW_LINE> <INDENT> return make_external_id(self.webapp) <NEW_LINE> <DEDENT> def na...
Binding layer to pass a web app into a JWT producer
62598f827b25080760ed6f1e
class PhysiologicalFunction(BoundaryConditionType1): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> BoundaryConditionType1.__init__(self) <NEW_LINE> self.lowPoint = 0.1739 <NEW_LINE> self.fracSin2 = 0.36 <NEW_LINE> self.fracCos = 0.43 <NEW_LINE> self.fracRes = 1.0 - (self.fracSin2 + self.fracCos) <NEW_LINE...
Boundary profile - type 1 creates a similar heart-outflow signal as found in Stergiopulos et al. 1992 set together from 4 continous functions sin2,sin2,cos,sin2 to lead to a continous function
62598f8263b5f9789fe84be9
class Lexer(NamespaceMixin, BaseMatcher): <NEW_LINE> <INDENT> def __init__(self, matcher, tokens, alphabet, discard, t_regexp=None, s_regexp=None): <NEW_LINE> <INDENT> super(Lexer, self).__init__(TOKENS, TokenNamespace) <NEW_LINE> if t_regexp is None: <NEW_LINE> <INDENT> unique = {} <NEW_LINE> for token in tokens: <NEW...
This takes a set of regular expressions and provides a matcher that converts a stream into a stream of tokens, passing the new stream to the embedded matcher. It is added to the matcher graph by the lexer_rewriter; it is not specified explicitly by the user.
62598f8250485f2cf55da9eb
class ServerErrorDetailsHandler: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self._error_page_template = _load_error_page_template() <NEW_LINE> <DEDENT> def produce_response(self, request: Request, exc: Exception) -> Response: <NEW_LINE> <INDENT> tb = traceback.format_exception(exc.__class__, ex...
This class is responsible of producing a detailed response when the Application is configured to show error details to the client, and an unhandled exception happens.
62598f820a366e3fb87dc445
class StatRoller(DiceRoller): <NEW_LINE> <INDENT> def __init__(self, spec): <NEW_LINE> <INDENT> self._rolls = self.parse_spec(spec) <NEW_LINE> <DEDENT> @property <NEW_LINE> def result(self): <NEW_LINE> <INDENT> pass
Base statistical roller. Does not provide a result.
62598f82c432627299fa2a47
class Scanner(PositionFloat): <NEW_LINE> <INDENT> pass
Handling docking tag structure
62598f825f7d997b871f9114
class TopicPublisher(Publisher): <NEW_LINE> <INDENT> def __init__(self, conf, channel, topic, **kwargs): <NEW_LINE> <INDENT> options = {'durable': conf.rabbit_durable_queues, 'auto_delete': False, 'exclusive': False} <NEW_LINE> options.update(kwargs) <NEW_LINE> exchange_name = rpc_amqp.get_control_exchange(conf) <NEW_L...
Publisher class for 'topic'.
62598f82a05bb46b3848a2f4
class Node(): <NEW_LINE> <INDENT> def __init__(self, data, next=None): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.next = next <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f'<Node data={self.data} next={self.next.data if self.next else None}>'
Node for singly linked lists.
62598f826aa9bd52df0d4955
class TestToken(helpers.TestGL): <NEW_LINE> <INDENT> pollute_events_for_testing() <NEW_LINE> shared_alarm_obj = anomaly.Alarm() <NEW_LINE> stress_indicator = [ 'graph_captcha', 'human_captcha', 'proof_of_work' ] <NEW_LINE> @inlineCallbacks <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> yield helpers.TestGL.setUp(self)...
This is an object testing class, to check the handler testing, see in test_anomalies
62598f82fb3f5b602db47eed
class VersionTest(unittest.TestCase): <NEW_LINE> <INDENT> @mock.patch('treadmill.zkutils.get_default', mock.Mock(return_value=[])) <NEW_LINE> @mock.patch('treadmill.zkutils.put', mock.Mock()) <NEW_LINE> def test_save_version(self): <NEW_LINE> <INDENT> zkclient = mock.Mock() <NEW_LINE> hostname = 'testhost' <NEW_LINE> n...
Test treadmill.version
62598f82f8510a7c17d7deb4
class EB_netcdf4_minus_python(PythonPackage): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(EB_netcdf4_minus_python, self).__init__(*args, **kwargs) <NEW_LINE> self.options['modulename'] = 'netCDF4' <NEW_LINE> <DEDENT> def configure_step(self): <NEW_LINE> <INDENT> hdf5 = get_softwar...
Support for building and installing netcdf4-python
62598f821f037a2d8b9e3b62
class Route(VapiStruct): <NEW_LINE> <INDENT> def __init__(self, destination=None, prefix=None, gateway=None, interface_name=None, ): <NEW_LINE> <INDENT> self.destination = destination <NEW_LINE> self.prefix = prefix <NEW_LINE> self.gateway = gateway <NEW_LINE> self.interface_name = interface_name <NEW_LINE> VapiStruct....
``Routes.Route`` class Structure that describes how routing is performed for a particular destination and prefix. A destination/prefix of 0.0.0.0/0 ( for IPv4) or ::/0 (for IPv6) refers to the default gateway. .. tip:: The arguments are used to initialize data attributes with the same names.
62598f82596a8972361276ec
class Song(models.Model): <NEW_LINE> <INDENT> album = models.ForeignKey(Album, on_delete=models.CASCADE) <NEW_LINE> file_type = models.CharField(max_length=10) <NEW_LINE> song_title = models.CharField(max_length=250) <NEW_LINE> is_favorite = models.BooleanField(default=False) <NEW_LINE> def __str__(self): <NEW_LINE> <I...
Create a song linked with Album
62598f83e64d504609df90ed
class Rational: <NEW_LINE> <INDENT> def __init__(self, n, d): <NEW_LINE> <INDENT> assert isinstance(n, int) <NEW_LINE> assert isinstance(d, int) <NEW_LINE> def gcd(x, y): <NEW_LINE> <INDENT> if x == 0: <NEW_LINE> <INDENT> return y <NEW_LINE> <DEDENT> elif x < 0: <NEW_LINE> <INDENT> return gcd(-x, y) <NEW_LINE> <DEDENT>...
Class representing a rational number
62598f83be383301e0253274
class CodeMetadata(HasTraits): <NEW_LINE> <INDENT> version = "1.0" <NEW_LINE> pkg_name = "enthought.chaco" <NEW_LINE> template_vars = Dict <NEW_LINE> root_name = Str
Represents all the metadata about a plot template, to be stored into the generated code. The generated code for a plot template must create one of these objects, which is then used to drive the loading of the rest of the template.
62598f83c432627299fa2a48
class AddPortToRouter(command.Command): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(AddPortToRouter, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'router', metavar='<router>', help=_("Router to which port will be added (name or ID)") ) <NEW_LINE> parser.add_arg...
Add a port to a router
62598f8371ff763f4b5e71e7
class EarlyStopException(Exception): <NEW_LINE> <INDENT> def __init__(self, metric): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.metric = metric
Raised by the reporter when a early stop signal is received.
62598f8323849d37ff850b37
class RoutedComponent(object): <NEW_LINE> <INDENT> def __init__(self, component, router=None, record_summaries=True): <NEW_LINE> <INDENT> self.component = component <NEW_LINE> self.router = router <NEW_LINE> self.record_summaries = record_summaries <NEW_LINE> <DEDENT> def __call__(self, state, num_out_paths): <NEW_LINE...
Component with a router.
62598f83507cdc57c63a4807
class Tile: <NEW_LINE> <INDENT> EDGES = (N, E, S, W) <NEW_LINE> CONFIGURATIONS = {1: set()} <NEW_LINE> ORIENTATIONS = CONFIGURATIONS.keys() <NEW_LINE> PATHS = None <NEW_LINE> def __init__(self, tile_id, edges=set(), paths=None): <NEW_LINE> <INDENT> self.id = tile_id <NEW_LINE> self.edges_with_roads = edges <NEW_LINE> s...
Class representing a game tile (tile_board variable domain value)
62598f83b57a9660fecd14f7
class Category(models.Model): <NEW_LINE> <INDENT> title = models.CharField("Название", max_length=50) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = "Категория" <NEW_LINE> verbose_name_plural = "Категории" <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.title
Класс категорий статей
62598f8391af0d3eaad39876
class ValidateDeviceUnitTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_validate_device_withdot(self): <NEW_LINE> <INDENT> device = "0.0.9845" <NEW_LINE> out = _validate_device(device) <NEW_LINE> self.assertEqual(out, device) <NEW_LINE> <DEDENT> def test_valiadte_device_withoutdot(self): <NEW_LINE> <INDENT> devi...
Unit tests for _validate_device() method
62598f83c432627299fa2a49
class Solution: <NEW_LINE> <INDENT> def reverseBetween(self, head: ListNode, left: int, right: int) -> ListNode: <NEW_LINE> <INDENT> dummy_node = ListNode(0, head) <NEW_LINE> head = dummy_node <NEW_LINE> first_list_head = head <NEW_LINE> first_list_tail = None <NEW_LINE> second_list_head = None <NEW_LINE> second_list_t...
92. Reverse Linked List II
62598f83b5575c28eb712a04
class SuspensionBridgeRoughModel: <NEW_LINE> <INDENT> def __init__(self,sag,da,Lm,Lb): <NEW_LINE> <INDENT> self.d= sag <NEW_LINE> self.da= da <NEW_LINE> self.Lm= Lm <NEW_LINE> self.Lb= Lb <NEW_LINE> <DEDENT> def getVm(self,q): <NEW_LINE> <INDENT> return q*self.Lm/2.0 <NEW_LINE> <DEDENT> def getVb(self,q): <NEW_LINE> <I...
Suspension bridge simple model
62598f8366656f66f7d59e6f
class SettingViewSet(ReadOnlyModelViewSet): <NEW_LINE> <INDENT> queryset = Setting.objects.all() <NEW_LINE> serializer_class = SettingSerializer <NEW_LINE> permission_classes = [permissions.AllowAny] <NEW_LINE> lookup_field = 'slug'
retrieve: Return a setting instance. list: Return all settings.
62598f830383005118f6d17c
class CellEnvZone(CellEnvironmentEntry): <NEW_LINE> <INDENT> def __init__(self, machine, image, base, size, max_pds): <NEW_LINE> <INDENT> CellEnvironmentEntry.__init__(self, machine, image) <NEW_LINE> self.base = base <NEW_LINE> self.size = size <NEW_LINE> self.max_pds = max_pds <NEW_LINE> self.bitmap_allocator = CellE...
Environment entry for a zone. The data structure for the entry is: struct okl4_zone { struct _okl4_mem_container super; _okl4_mcnode_t *mem_container_list; okl4_word_t pd_ref_count; _okl4_mcnode_t *mcnode_pool; okl4_bitmap_allocator_t *mcnode_alloc; };
62598f8315fb5d323ce7e7a6
class ReversoTTS(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._voice = None <NEW_LINE> <DEDENT> def get_voice(self, voice): <NEW_LINE> <INDENT> if voice: <NEW_LINE> <INDENT> return VoiceName[voice] <NEW_LINE> <DEDENT> return "Sharon22k" <NEW_LINE> <DEDENT> def text_to_bash64(self, message):...
Interface class for the Reverso Cognitive Services Text-to-speech translator
62598f8376d4e153a661c68e
class NotebookLoader(object): <NEW_LINE> <INDENT> def __init__(self, path=None): <NEW_LINE> <INDENT> self.shell = InteractiveShell.instance() <NEW_LINE> self.path = path <NEW_LINE> <DEDENT> def load_module(self, fullname): <NEW_LINE> <INDENT> path = find_notebook(fullname, self.path) <NEW_LINE> with open(path, 'r', enc...
Module Loader for Jupyter Notebooks
62598f835f7d997b871f9115
class CHPRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PhoneNumber = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.PhoneNumber = params.get("PhoneNumber") <NEW_LINE> memeber_set = set(params.keys()) <NEW_LINE> for name, value in vars(self).i...
终端骚扰保护请求内容
62598f8315baa723494619fa
class StatsBase(dict): <NEW_LINE> <INDENT> def __init__(self, data: dict): <NEW_LINE> <INDENT> super(StatsBase, self).__init__(data) <NEW_LINE> <DEDENT> @property <NEW_LINE> def event_id(self) -> str: <NEW_LINE> <INDENT> return self.get("event_id") <NEW_LINE> <DEDENT> @property <NEW_LINE> def update_at(self) -> str: <N...
Component for dot notation access of `stats` from any Endpoint. >>> data = { ... "event_id":"2130389", ... "update_at":"1581990853", ... "update_dt":"2020-02-18 01:54:13" ... } >>> StatsBase(data).event_id >>> "2130389" >>> StatsBase(data).update_at >>> "1581990853"
62598f83d99f1b3c44d05129
class Category(models.Model): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True) <NEW_LINE> name = models.CharField('カテゴリー', max_length=255) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
料理のカテゴリー
62598f8323e79379d538bf75
class RejectCd(BaseRMPModel): <NEW_LINE> <INDENT> reject = CopyFromCharField( source_column='LookupCode', primary_key=True, max_length=1, help_text='Unique identifier of the rejection reason.' ) <NEW_LINE> reject_tr = CopyFromCharField( source_column='Description', max_length=59, help_text='Full description of the reje...
Reason an RMP submission may be rejected.
62598f8373bcbd0ca4bc9ccc
class FakeSleep(object): <NEW_LINE> <INDENT> def __init__(self, clock): <NEW_LINE> <INDENT> self._clock = clock <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> <DEDENT> def __call__(self, seconds): <NEW_LINE> <INDENT> self._clock.advance(seconds)
Fake version of time.sleep for testing code that sleeps. Classes that call time.time are encouraged to have a sleep constructor parameter, which can be swapped out with an instance of this class for testing. This class is useful because Google policy is that a test can not be considered "small" if it calls sleep, whi...
62598f836aa9bd52df0d4957
class CollectionCommitLogEntryModel(base_models.BaseCommitLogEntryModel): <NEW_LINE> <INDENT> collection_id = ndb.StringProperty(indexed=True, required=True) <NEW_LINE> @classmethod <NEW_LINE> def _get_instance_id(cls, collection_id, version): <NEW_LINE> <INDENT> return 'collection-%s-%s' % (collection_id, version) <NE...
Log of commits to collections. A new instance of this model is created and saved every time a commit to CollectionModel or CollectionRightsModel occurs. The id for this model is of the form 'collection-{{COLLECTION_ID}}-{{COLLECTION_VERSION}}'.
62598f83fb3f5b602db47eee
class Deploy(CommandBase): <NEW_LINE> <INDENT> cmds = { 'deploy': 'Deploy a prefix', } <NEW_LINE> @staticmethod <NEW_LINE> def setup_subparser(parser, cmd=None): <NEW_LINE> <INDENT> parser.add_argument( 'target', help="Deployment destination", ) <NEW_LINE> parser.add_argument( '-t', '--tar', help="Deploy to .tar", dest...
Package and deploy the prefix
62598f834e696a045264db3f
class ListMemberActivity(BaseApi): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ListMemberActivity, self).__init__(*args, **kwargs) <NEW_LINE> self.endpoint = 'lists' <NEW_LINE> self.list_id = None <NEW_LINE> self.subscriber_hash = None <NEW_LINE> <DEDENT> def all(self, list_id, su...
Get details about subscribers’ recent activity.
62598f837c178a314d78cf27
class KNearestNeighbor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def train(self, X, y): <NEW_LINE> <INDENT> self.X_train = X <NEW_LINE> self.y_train = y <NEW_LINE> <DEDENT> def predict(self, X, k=1, num_loops=0): <NEW_LINE> <INDENT> if num_loops == 0: <NEW_LINE> <INDE...
a kNN classifier with L2 distance
62598f8371ff763f4b5e71e9
class OspfIdentity(RoutingProtocolIdentity): <NEW_LINE> <INDENT> _prefix = 'ospf' <NEW_LINE> _revision = '2015-03-09' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> RoutingProtocolIdentity.__init__(self) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.ietf._meta im...
OSPF Protocol
62598f8350485f2cf55da9ee
class Utility: <NEW_LINE> <INDENT> def __init__(self, data, type): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.type = type <NEW_LINE> if type == 'sqrt' or type == 'quad': self.n = len(data[1]) <NEW_LINE> <DEDENT> def utility(self, x): <NEW_LINE> <INDENT> if self.type == 'sqrt': return sqrt_utility(self.data[0]...
Utility class containing type of the utility function
62598f8363b5f9789fe84bed