code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@functools.total_ordering <NEW_LINE> class SecretAssertion(object): <NEW_LINE> <INDENT> def __init__(self, guid, index, nonce, verdicts, metadata): <NEW_LINE> <INDENT> self.guid = guid <NEW_LINE> self.index = index <NEW_LINE> self.nonce = nonce <NEW_LINE> self.verdicts = verdicts <NEW_LINE> self.metadata = metadata <NE...
An assertion which has yet to be publically revealed
62598f8d15baa72349461b53
class ShardUse: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.value = "" <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def from_tree(node: tree.Tree, parameter_dict): <NEW_LINE> <INDENT> assert node.data == 'use_shard_item' <NEW_LINE> if isinstance(node.children[0], lexer.Token): <NEW_LINE> <INDENT> i...
Class for representing and parsing legal persistent global shard use elements
62598f8d656771135c489254
class AbodeSensor(AbodeDevice, SensorEntity): <NEW_LINE> <INDENT> def __init__(self, data, device, sensor_type): <NEW_LINE> <INDENT> super().__init__(data, device) <NEW_LINE> self._sensor_type = sensor_type <NEW_LINE> self._name = f"{self._device.name} {SENSOR_TYPES[self._sensor_type][0]}" <NEW_LINE> self._device_class...
A sensor implementation for Abode devices.
62598f8dd6c5a102081e1d1c
class Function(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> value = CommaValue(args) <NEW_LINE> alias = kwargs.get('alias') <NEW_LINE> if alias: <NEW_LINE> <INDENT> fn_str = "{}({}) AS '{}'".forma...
Basic function implementation. Use this for aggregation functions
62598f8d30dc7b766599f431
class Result(models.Model): <NEW_LINE> <INDENT> check = models.ForeignKey('monitor.Check') <NEW_LINE> minion = models.ForeignKey('monitor.Minion') <NEW_LINE> timestamp = models.DateTimeField(default=timezone.now) <NEW_LINE> result = models.TextField() <NEW_LINE> result_type = models.CharField(max_length=30) <NEW_LINE> ...
The results of a Check
62598f8d71ff763f4b5e7349
class HTTP_401_UNAUTHORIZED(Exception): <NEW_LINE> <INDENT> pass
401 - Unauthorized: The request authentication failed. The OAuth credentials that the client supplied were missing or invalid.
62598f8d96565a6dacd2cd64
class KB: <NEW_LINE> <INDENT> def __init__(self, sentence=None): <NEW_LINE> <INDENT> if sentence: <NEW_LINE> <INDENT> self.tell(sentence) <NEW_LINE> <DEDENT> <DEDENT> def tell(self, sentence): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def ask(self, query): <NEW_LINE> <INDENT> return first(self.a...
A knowledge base to which you can tell and ask sentences. To create a KB, first subclass this class and implement tell, ask_generator, and retract. For a Propositional Logic KB, ask(P & Q) returns True or False, but for an So ask_generator generates these one at a time, and ask either returns the first one or returns ...
62598f8dc432627299fa2ba5
class User(AbstractUser): <NEW_LINE> <INDENT> GENDER_MALE = "male" <NEW_LINE> GENDER_FEMALE = "female" <NEW_LINE> GENDER_OTHER = "other" <NEW_LINE> GENDER_CHOICES = ( (GENDER_MALE, "Male"), (GENDER_FEMALE, "Female"), (GENDER_OTHER, "Other"), ) <NEW_LINE> LANGUAGE_ENGLISH = "en" <NEW_LINE> LANGUAGE_KOREAN = "kr" <NEW_LI...
Custom User Model
62598f8d8da39b475be02db6
class KakoViewsTestCase(unittest.TestCase): <NEW_LINE> <INDENT> fixtures = ['kc_members.yaml', 'kc_setup_data.yaml', 'kc_operators_configs.yaml', 'categories.yaml'] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.client = Client() <NEW_LINE> for fixture in self.fixtures: <NEW_LINE> <INDENT> call_command('loaddata'...
This test derives django.utils.unittest.TestCate rather than the default django.test.TestCase. Thus, self.client is not automatically created and fixtures not automatically loaded. This will be achieved manually by a custom implementation of setUp()
62598f8d498bea3a75a576fe
class TfAgent(bg.Agent): <NEW_LINE> <INDENT> def __init__(self, model): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> <DEDENT> def get_action(self, available_moves: Set[bg.Moves], board: bg.Board) -> bg.Moves: <NEW_LINE> <INDENT> v_best = 0 <NEW_LINE> best_moves = None <NEW_LINE> for moves in available_moves: <NEW_...
Tensorflow td-gammon player.
62598f8d7cff6e4e811b55ee
class fhaspref(haspref): <NEW_LINE> <INDENT> pass
Change current tag to tag X, if prefix is Y and current tag is Z. Prefix Y is length from 1 to 4 (y <= 4) Syntax: Z Y hassuf len(Y) X Ex. : ADV bla haspref 3 DTC:sg
62598f8d5f7d997b871f91c5
class List(base.ListCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) <NEW_LINE> parser.display_info.AddUriFunc(utils.MakeGetUriFunc()) <NEW_LINE> lister.AddZonalListerArgs(parser) <NEW_LINE> <DEDENT> def Run(self, args)...
List Google Compute Engine virtual machine instances.
62598f8dd7e4931a7ef3bc76
class SystemApiInfo(NetAppObject): <NEW_LINE> <INDENT> _name = None <NEW_LINE> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self._name <NEW_LINE> <DEDENT> @name.setter <NEW_LINE> def name(self, val): <NEW_LINE> <INDENT> if val != None: <NEW_LINE> <INDENT> self.validate('name', val) <NEW_LINE> <DEDENT...
api information
62598f8d004d5f362081ede6
class LatexMathNode(LatexNode): <NEW_LINE> <INDENT> def __init__(self, displaytype, nodelist=[], **kwargs): <NEW_LINE> <INDENT> delimiters = kwargs.pop('delimiters', (None, None)) <NEW_LINE> super(LatexMathNode, self).__init__( _fields = ('displaytype','nodelist','delimiters'), **kwargs ) <NEW_LINE> self.displaytype = ...
A Math node type. .. py:attribute:: displaytype Either 'inline' or 'display', to indicate an inline math block or a display math block. (Note that math environments such as ``\begin{equation}...\end{equation}``, are reported as :py:class:`LatexEnvironmentNode`'s, and not as :py:class:`LatexMathNode`'s....
62598f8df8510a7c17d7df63
class DeleteProjectResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Msg = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Msg = params.get("Msg") <NEW_LINE> self.RequestId = params.get("RequestId")
DeleteProject返回参数结构体
62598f8d2ae34c7f260aacbf
class ExaleadBase(NagiosPlugin): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> super(ExaleadBase, self).initialize() <NEW_LINE> self.xml_namespaces = { 'buildgroup': '{exa:com.exalead.mercury.mami.indexing.v10}', 'deployment': '{exa:exa.bee.deploy.v10}', } <NEW_LINE> self.port = self.options.baseport + ...
Class for an Exalead Plugin
62598f8d76d4e153a661c7f1
@patch('api.mining_api.get_resource_id_from_key', return_value='mocked_id') <NEW_LINE> class CreateRuleTest(MiningTestsBase): <NEW_LINE> <INDENT> def test_base(self, m_get_id): <NEW_LINE> <INDENT> ant = ['Peanut Butter:1', 'Steak:0', 'Peanut Butter:0'] <NEW_LINE> con = ['Cheese:0'] <NEW_LINE> m = mining_api.Association...
Tests around creating a single AssociationRuleModel
62598f8d379a373c97d98bef
class HostInterfaceSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = HostInterface <NEW_LINE> fields = ('interface_id', 'interface_name', 'network_name', 'node', 'mac_address', 'ip_address', 'subnet_address', 'gateway_address')
Serializer for the Host_Interface model. Used to expose a usm-rest-api Host_Interface management resource.
62598f8d4e696a045264dbf2
class AnsibleVaultRunner(AnsibleBaseRunner): <NEW_LINE> <INDENT> BINARY_NAME = 'ansible-vault' <NEW_LINE> REPLACEMENT_RULES = { '--vault_password_file': '--vault-password-file' } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AnsibleVaultRunner, self).__init__(*args, **kwargs)
Runs Ansible vault commands: encrypt/decrypt. See: https://docs.ansible.com/playbooks_vault.html
62598f8d07d97122c4216883
class MailForm(wtf.Form): <NEW_LINE> <INDENT> mail_to = wtforms.TextField( 'Mail to', [RequiredIf('active')] ) <NEW_LINE> active = wtforms.BooleanField( 'Active', [wtforms.validators.Optional()] )
Form to configure the mail hook.
62598f8d3617ad0b5ee05d1f
class GridCellIconRenderer(wx.grid.PyGridCellRenderer): <NEW_LINE> <INDENT> def __init__(self, *arg, **kw): <NEW_LINE> <INDENT> super(GridCellIconRenderer, self).__init__() <NEW_LINE> self.bmpList = arg[0] <NEW_LINE> self.selectBmpIndex = 0 <NEW_LINE> <DEDENT> def Draw(self, grid, attr, dc, rect, row, col, isSelected):...
Utility class for displaying an icon in a table column.
62598f8d7b25080760ed7085
class SWITCH_TYPE(Choice): <NEW_LINE> <INDENT> ASTERISK = 3, _('ASTERISK') <NEW_LINE> FREESWITCH = 4, _('FREESWITCH') <NEW_LINE> KAMAILIO = 5, _('KAMAILIO') <NEW_LINE> YATE = 6, _('YATE') <NEW_LINE> OPENSIPS = 7, _('OPENSIPS')
List of switches
62598f8d8e7ae83300ee8c7b
class XcessivStackedEnsemble(bp): <NEW_LINE> <INDENT> def __init__(self, base_learners, meta_feature_generators, secondary_learner, cv_function): <NEW_LINE> <INDENT> super(XcessivStackedEnsemble, self).__init__() <NEW_LINE> self.base_learners = base_learners <NEW_LINE> self.meta_feature_generators = meta_feature_genera...
Contains the class for the Xcessiv stacked ensemble
62598f8db5575c28eb712ab7
class LinePixelRegion(PixelRegion): <NEW_LINE> <INDENT> _params = ('start', 'end') <NEW_LINE> _mpl_artist = 'Patch' <NEW_LINE> start = ScalarPixCoord('The start pixel position as a PixCoord.') <NEW_LINE> end = ScalarPixCoord('The end pixel position as a PixCoord.') <NEW_LINE> def __init__(self, start, end, meta=None, v...
A line in pixel coordinates. Parameters ---------- start : `~regions.PixCoord` The start position. end : `~regions.PixCoord` The end position. meta : `~regions.RegionMeta`, optional A dictionary that stores the meta attributes of this region. visual : `~regions.RegionVisual`, optional A dictionary that...
62598f8d287bf620b6271792
class DateDir(LogItem): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "{}: {} ({})".format(self.__class__.__name__, self.displayName, self.dirName) <NEW_LINE> <DEDENT> def list_logs(self): <NEW_LINE> <INDENT> return self._manager.list_logs(dir_name=self.dirName)
Directory with log files.
62598f8d3eb6a72ae038a20f
class LengthPredictor(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(LengthPredictor, self).__init__() <NEW_LINE> self.decoder = Decoder(len_max_seq=hp.max_seq_len, d_word_vec=hp.length_predictor_hidden, n_layers=hp.length_predictor_layer, n_head=hp.length_predictor_head, d_k=hp.length_pr...
Duration Predictor
62598f8dd53ae8145f918065
class Follow(db.Model): <NEW_LINE> <INDENT> __tablesname__ = 'follows' <NEW_LINE> followed_id = db.Column( db.Integer, db.ForeignKey('users.id'), primary_key=True, index=True) <NEW_LINE> follower_id = db.Column( db.Integer, db.ForeignKey('users.id'), primary_key=True, index=True) <NEW_LINE> timestamp = db.Column(db.Dat...
关注关联表
62598f8d50485f2cf55dab4a
class FocalLoss2d(nn.Module): <NEW_LINE> <INDENT> def __init__(self, weight=None, gamma=0, size_average=True, ignore_index=255): <NEW_LINE> <INDENT> super(FocalLoss2d, self).__init__() <NEW_LINE> self.gamma = gamma <NEW_LINE> self.weight = weight <NEW_LINE> self.size_average = size_average <NEW_LINE> self.ignore_index ...
Work taken from https://github.com/c0nn3r/RetinaNet/blob/master/focal_loss.py
62598f8d1f037a2d8b9e3cb5
class IncorrectDateFormat(LisValueError): <NEW_LINE> <INDENT> code = 207
Datetime value has invalid format. #207
62598f8dd6c5a102081e1d1e
class USqlAssembly(CatalogItem): <NEW_LINE> <INDENT> _attribute_map = { 'compute_account_name': {'key': 'computeAccountName', 'type': 'str'}, 'version': {'key': 'version', 'type': 'str'}, 'database_name': {'key': 'databaseName', 'type': 'str'}, 'name': {'key': 'assemblyName', 'type': 'str'}, 'clr_name': {'key': 'clrNam...
A Data Lake Analytics catalog U-SQL Assembly. :param compute_account_name: the name of the Data Lake Analytics account. :type compute_account_name: str :param version: the version of the catalog item. :type version: str :param database_name: the name of the database. :type database_name: str :param name: the name of t...
62598f8d8da39b475be02db8
class SocialShareKitPlugin(CMSPlugin): <NEW_LINE> <INDENT> size = models.CharField( _('size'), max_length=2, choices=SOCIALBUTTON_SIZES, default=DEFAULT_SOCIALBUTTON_SIZE ) <NEW_LINE> style = models.CharField( _('style'), max_length=10, choices=SOCIALBUTTON_STYLES, default=DEFAULT_SOCIALBUTTON_STYLE ) <NEW_LINE> count ...
Social Share Kit CMS plugin model
62598f8ddc8b845886d53194
class Laplacian(RegisterSubclasses): <NEW_LINE> <INDENT> symmetric = False <NEW_LINE> def __init__(self, symmetrize_input=True, scaling_epps=None, full_output=False): <NEW_LINE> <INDENT> self.symmetrize_input = symmetrize_input <NEW_LINE> self.scaling_epps = scaling_epps <NEW_LINE> self.full_output = full_output <NEW_L...
Base class for computing laplacian matrices Notes ----- The methods here all return the negative of the standard Laplacian definition.
62598f8d851cf427c66b7e9b
class Calldata: <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> if isinstance(value, str): <NEW_LINE> <INDENT> assert(value.startswith('0x')) <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> elif isinstance(value, bytes): <NEW_LINE> <INDENT> self.value = bytes_to_hexstring(value) <NEW_LINE> <DEDENT>...
Represents Ethereum calldata. Attributes: value: Calldata as either a string starting with `0x`, or as bytes.
62598f8d07f4c71912baf020
class GetLenderTeamsResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None)
A ResultSet with methods tailored to the values returned by the GetLenderTeams Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598f8d004d5f362081ede7
class Set(CustomType): <NEW_LINE> <INDENT> init_type = set <NEW_LINE> mongo_type = list <NEW_LINE> python_type = set <NEW_LINE> def __init__(self, structure_type=None): <NEW_LINE> <INDENT> super(Set, self).__init__() <NEW_LINE> self._structure_type = structure_type <NEW_LINE> <DEDENT> def to_bson(self, value): <NEW_LIN...
SET custom type to handle python set() type
62598f8d2ae34c7f260aacc1
class arch_s390x(generic_s390x): <NEW_LINE> <INDENT> def __init__(self, myspec): <NEW_LINE> <INDENT> generic_s390x.__init__(self, myspec) <NEW_LINE> self.settings["CFLAGS"] = "-O2 -pipe" <NEW_LINE> self.settings["CHOST"] = "s390x-ibm-linux-gnu"
builder class for generic s390x
62598f8d63d6d428bbee2395
class CatalogShapeNoiseAdder(NoiseAdder): <NEW_LINE> <INDENT> def __init__(self,start_seed=None, diff_seed_elem = False, rs_correction = True, inplace = False): <NEW_LINE> <INDENT> _check_start_seed(start_seed) <NEW_LINE> self.start_seed = start_seed <NEW_LINE> self.inplace = inplace <NEW_LINE> self.diff_seed_elem = di...
Generates a catalog collection with randomly drawn shape noise. Presently we start with a starting seed and just add the number of the realization to it. If the sum of the numbers would be greater than the maximum value of an 32bit unsigned integer (the maximum value in the range of seeds, we have it wrap around) ...
62598f8d66656f66f7d59fd4
class AgGeodetic(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{4A6D507B-D6F0-4FCF-B973-3FAC07863335}') <NEW_LINE> _idlflags_ = ['noncreatable'] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{00DD7BD4-53D5-4870-996B-8ADB8AF904FA}', 1, 0)
Class defining Geodetic position.
62598f8d6e29344779b00230
class Normalize(template.Process): <NEW_LINE> <INDENT> def __init__(self, project, previous): <NEW_LINE> <INDENT> super(Normalize, self).__init__(project) <NEW_LINE> self.previous = previous <NEW_LINE> <DEDENT> def run(self) : <NEW_LINE> <INDENT> mat = self.previous.result <NEW_LINE> avg = numpy.mean(mat) <NEW_LINE> st...
Substract the mean and divide by the std
62598f8d3617ad0b5ee05d21
class Item(): <NEW_LINE> <INDENT> def __init__(self, item): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> <DEDENT> def get(self, info): <NEW_LINE> <INDENT> return self.item.get(info) <NEW_LINE> <DEDENT> def createEquipment(self): <NEW_LINE> <INDENT> product_url = self.get("itemUrl") <NEW_LINE> equipment_name = self.g...
このクラスは、楽天apiの検索結果からgetItemsで取得出来ます。 Equipment作成時は、このクラスを使用します。 createEquipment()でEquipmentモデルを取得出来るので、それに対しsave()を実行してください。
62598f8d097d151d1a2c0c03
class ObtainAuthToken(APIView): <NEW_LINE> <INDENT> permission_classes = () <NEW_LINE> serializer_class = AuthTokenSerializer <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> serializer = self.serializer_class(data=request.data, context={'request': request}) <NEW_LINE> serializer.is_valid(raise_...
A Custom ObtainAuthToken APIView that uses email instead of username.
62598f8d435de62698e9b9ca
class DataGenerator(tf.keras.utils.Sequence): <NEW_LINE> <INDENT> def __init__(self, list_IDs, batch_size=4, dim=(176,192,160), n_channels=1, n_classes=4, shuffle=True): <NEW_LINE> <INDENT> self.list_IDs = list_IDs <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.dim = dim <NEW_LINE> self.n_channels = n_channels...
Generates data for Keras
62598f8d7b25080760ed7087
class RobotsTagHeader(MiddlewareMixin): <NEW_LINE> <INDENT> def process_response(self, request, response): <NEW_LINE> <INDENT> if getattr(response, 'no_robots_tag', False): <NEW_LINE> <INDENT> return response <NEW_LINE> <DEDENT> if 'X-Robots-Tag' not in response: <NEW_LINE> <INDENT> default = getattr(settings, 'X_ROBOT...
Set an X-Robots-Tag header. Default to noodp to avoid using directories for page titles. Set a value of response['X-Robots-Tag'] or use the relevant decorators to override. Change the default in settings by setting X_ROBOTS_DEFAULT = ''.
62598f8db5575c28eb712ab8
class CrossSectionDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, equations): <NEW_LINE> <INDENT> self.x, self.y, self.w = equations.stack(dropna=True) <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.y) <NEW_LINE> <DEDENT> def __getitem__(self, item): <NEW_LINE> <INDENT> x_ = self.x[...
Parameters ---------- equations : Equations
62598f8d090684286d5934c3
class NoActiveModel(Exception): <NEW_LINE> <INDENT> pass
Raised when no active model could be found.
62598f8d3c8af77a43b67d25
class TravisEventType(enum.Enum): <NEW_LINE> <INDENT> push = 'push' <NEW_LINE> pull_request = 'pull_request' <NEW_LINE> api = 'api' <NEW_LINE> cron = 'cron'
Enum representing all possible Travis event types.
62598f8d3eb6a72ae038a211
class TestNSWFuelStation(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.hass = get_test_home_assistant() <NEW_LINE> self.config = VALID_CONFIG <NEW_LINE> self.addCleanup(self.hass.stop) <NEW_LINE> <DEDENT> @patch( "homeassistant.components.nsw_fuel_station.sensor.FuelCheckClient", new...
Test the NSW Fuel Station sensor platform.
62598f8d6fb2d068a7693c1e
class MetricMonth(models.Model): <NEW_LINE> <INDENT> metric = models.ForeignKey(Metric, verbose_name=_('metric'), on_delete=models.PROTECT) <NEW_LINE> num = models.BigIntegerField(_('number'), default=0) <NEW_LINE> created = models.DateField(_('created'), default=datetime.date.today) <NEW_LINE> class Meta: <NEW_LINE> <...
Aggregation of Metrics on monthly basis
62598f8d82261d6c5272fcc3
class LightConv3x3(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels): <NEW_LINE> <INDENT> super(LightConv3x3, self).__init__() <NEW_LINE> self.conv1 = nn.Conv2d( in_channels, out_channels, 1, stride=1, padding=0, bias=False, groups=8 ) <NEW_LINE> self.conv2 = nn.Conv2d( out_channels, out_cha...
Ours TRSOSNet use shufflenet to decrease parameters, it contains a group 1*1 convolution, a channel shuffle and a dw 3*3 refer at https://blog.csdn.net/kobayashi_/article/details/108850789
62598f8d8a43f66fc4bf1d62
class Like(Base): <NEW_LINE> <INDENT> __tablename__ = "likes" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> post_id = Column(Integer, ForeignKey("posts.id")) <NEW_LINE> user_id = Column(Integer, ForeignKey("users.id"))
Like model
62598f8d16aa5153ce4000e2
class CodeSource(metaclass=ABCMeta): <NEW_LINE> <INDENT> __slots__ = ("__weakref__",) <NEW_LINE> def __enter__(self: S) -> S: <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> Optional[bool]:...
abc for representing a code object inside a storage
62598f8d0383005118f6d2d6
class UnittestWindow(E5MainWindow): <NEW_LINE> <INDENT> def __init__(self, prog=None, parent=None): <NEW_LINE> <INDENT> super(UnittestWindow, self).__init__(parent) <NEW_LINE> self.cw = UnittestDialog(prog=prog, parent=self) <NEW_LINE> self.cw.installEventFilter(self) <NEW_LINE> size = self.cw.size() <NEW_LINE> self.se...
Main window class for the standalone dialog.
62598f8d8c0ade5d55dc347a
class ropecontext(object): <NEW_LINE> <INDENT> def __init__(self, view): <NEW_LINE> <INDENT> self.view = view <NEW_LINE> self.project = None <NEW_LINE> self.resource = None <NEW_LINE> self.tmpfile = None <NEW_LINE> self.input = "" <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> file_path = self.view.file_n...
a context manager to have a rope project context
62598f8d004d5f362081ede8
class HtmlWriter(object): <NEW_LINE> <INDENT> def __init__(self, directory='html', url=None, version=None): <NEW_LINE> <INDENT> self.verbnet_version = version <NEW_LINE> self.verbnet_url = url <NEW_LINE> self.directory = directory <NEW_LINE> self.index = open(os.path.join(self.directory, 'index.html'), 'w') <NEW_LINE> ...
Class that knows how to create html files for a set of GLVerbClass instances. This class is responsible for writing the index file and for invoking HtmlClassWriter on individual classes.
62598f8d63d6d428bbee2397
class saveData_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRING, 'success', None, None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerate...
Attributes: - success
62598f8d94891a1f408b94dd
class BaseNetworkingSchema(BaseSchema): <NEW_LINE> <INDENT> additional_security_groups = fields.List( fields.Str(validate=get_field_validator("security_group_id")), metadata={"update_policy": UpdatePolicy.SUPPORTED}, ) <NEW_LINE> security_groups = fields.List( fields.Str(validate=get_field_validator("security_group_id"...
Represent the schema of common networking parameters used by head and compute nodes.
62598f8d07f4c71912baf023
class PasswordResetView(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> return render(request, 'registration/password_reset.html') <NEW_LINE> <DEDENT> def post(self, request): <NEW_LINE> <INDENT> form = PasswordResetForm(request.POST) <NEW_LINE> if form.is_valid(): <NEW_LINE> <INDENT> opts = { 'd...
The view to send a reset email on forgeting password.
62598f8d0fa83653e46f4ac3
class Tissue: <NEW_LINE> <INDENT> def __init__(self, c_0, k_b, k_t, nX=10, nY=10, diseases=None, t=0, epsilon=1e-2, D=1): <NEW_LINE> <INDENT> self.nX = nX <NEW_LINE> self.nY = nY <NEW_LINE> self.c_0 = c_0 <NEW_LINE> self.c = c_0 <NEW_LINE> self.t = t <NEW_LINE> self.k_b = k_b <NEW_LINE> self.k_t = k_t <NEW_LINE> self.b...
Models the tissue compartment in the three-compartment model. Note: nextX(), nextY(), and diffusion() are largely derived from Assignment 2.
62598f8d4e4d562566372004
class _AdminModeMachine(Machine): <NEW_LINE> <INDENT> def __init__(self, callback=None, **extra_kwargs): <NEW_LINE> <INDENT> self._callback = callback <NEW_LINE> states = ["RESERVED", "NOT_FITTED", "OFFLINE", "MAINTENANCE", "ONLINE"] <NEW_LINE> transitions = [ { "source": ["NOT_FITTED", "RESERVED", "OFFLINE"], "trigger...
The state machine governing admin modes. For documentation of states and transitions, see the documentation of the public :py:class:`.AdminModeModel` class.
62598f8d090684286d5934c4
class PrimitiveProcedure(Procedure): <NEW_LINE> <INDENT> def __init__(self, fn, use_env=False, name='primitive'): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.fn = fn <NEW_LINE> self.use_env = use_env <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return '#[{0}]'.format(self.name) <NEW_LINE> <DEDENT...
A Scheme procedure defined as a Python function.
62598f8d73bcbd0ca4bc9e2f
class _CompletionTreeGenerator(walker.Walker): <NEW_LINE> <INDENT> def __init__(self, cli=None, branch=None, ignore_load_errors=False): <NEW_LINE> <INDENT> super(_CompletionTreeGenerator, self).__init__( cli=cli, ignore_load_errors=ignore_load_errors) <NEW_LINE> self._branch = branch <NEW_LINE> <DEDENT> def Visit(self,...
Generates the gcloud static completion CLI tree.
62598f8dbaa26c4b54d4ee92
class AugmentationVisualizationCommand: <NEW_LINE> <INDENT> def __init__(self, source: Source, samples, cases): <NEW_LINE> <INDENT> self.source = source <NEW_LINE> self.samples = samples <NEW_LINE> self.cases = cases <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> dataset = self.source.train_dataset() <NEW_LINE>...
Visualize augmentations
62598f8d6fb2d068a7693c1f
class Installation(object): <NEW_LINE> <INDENT> swagger_types = { 'file_type': 'str', 'file_reference_id': 'str', 'requires_restart': 'bool' } <NEW_LINE> attribute_map = { 'file_type': 'fileType', 'file_reference_id': 'fileReferenceId', 'requires_restart': 'requiresRestart' } <NEW_LINE> def __init__(self, file_type=Non...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f8db57a9660fecd165c
class API(object): <NEW_LINE> <INDENT> def dispatch(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> result = self._dispatch_without_catching_api_errors(request) <NEW_LINE> <DEDENT> except PermissionDenied: <NEW_LINE> <INDENT> return _text_http_response(traceback.format_exc(), status=403) <NEW_LINE> <DEDENT...
Handle web API requests.
62598f8d82261d6c5272fcc4
class ISettingsSchema(Interface): <NEW_LINE> <INDENT> rsslink = URI( title=_(u"RSS Feed"), description=_(u"The URL to your news in RSS format (Clear it to disable)"), required=False ) <NEW_LINE> facebooklink = URI( title=_(u"Facebook link"), description=_(u"The URL to your FaceBook web page (Clear it to disable)"), req...
Defines the control panel schema for the iServices Theme settings
62598f8d71ff763f4b5e734f
class SliderItem(base.ATCTContent): <NEW_LINE> <INDENT> implements(ISliderItem) <NEW_LINE> meta_type = "SliderItem" <NEW_LINE> schema = SliderItemSchema <NEW_LINE> title = atapi.ATFieldProperty('title') <NEW_LINE> description = atapi.ATFieldProperty('description')
Slider Item content-type
62598f8d96565a6dacd2cd67
class Keyboard(Component): <NEW_LINE> <INDENT> class KeyboardHandler(EventHandler): <NEW_LINE> <INDENT> def __init__(self, key_id): <NEW_LINE> <INDENT> EventHandler.__init__(self) <NEW_LINE> self.key_id = key_id <NEW_LINE> <DEDENT> <DEDENT> def __init__(self, stdscr): <NEW_LINE> <INDENT> self.stdscr = stdscr <NEW_LINE>...
This class accepts keyboard input
62598f8d07f4c71912baf024
class Credentials: <NEW_LINE> <INDENT> username = None <NEW_LINE> password = None <NEW_LINE> signature = None <NEW_LINE> def __init__(self, username, password, signature): <NEW_LINE> <INDENT> self.username = username <NEW_LINE> self.password = password <NEW_LINE> self.signature = signature
API credentials for NVP requests.
62598f8d6fece00bbaccb56a
class AttributeOptions(object): <NEW_LINE> <INDENT> swagger_types = { 'data': 'Options' } <NEW_LINE> attribute_map = { 'data': 'data' } <NEW_LINE> def __init__(self, data=None): <NEW_LINE> <INDENT> self._data = None <NEW_LINE> self.discriminator = None <NEW_LINE> if data is not None: <NEW_LINE> <INDENT> self.data = dat...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f8d10dbd63aa1c70797
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('visualitemmodel1', 'liu-xiao-guo') <NEW_LINE> def setUp(self): <NEW_LINE> <INDEN...
A common test case class
62598f8d8c0ade5d55dc347b
class ObservationComponent: <NEW_LINE> <INDENT> def __init__(self, system: str, code: str, display: str, value: Optional[Union[str, float]], unit: Optional[str]): <NEW_LINE> <INDENT> self.system: str = system <NEW_LINE> self.code: str = code <NEW_LINE> self.display: str = display <NEW_LINE> self.value: float = value <N...
An observation component object containing the details of a part of the observation
62598f8d76d4e153a661c7f6
class ExampleTest(unittest.TestCase): <NEW_LINE> <INDENT> def test(self): <NEW_LINE> <INDENT> self.assertTrue(True)
Verify that tests are running - make test should return failure
62598f8df8510a7c17d7df66
class Unregistered(Message): <NEW_LINE> <INDENT> MESSAGE_TYPE = 67 <NEW_LINE> def __init__(self, request): <NEW_LINE> <INDENT> assert(type(request) in six.integer_types) <NEW_LINE> Message.__init__(self) <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def parse(wmsg): <NEW_LINE> <INDENT> ...
A WAMP `UNREGISTERED` message. Format: `[UNREGISTERED, UNREGISTER.Request|id]`
62598f8d596a897236127857
class WatchlistinquirypostPayload(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { } <NEW_LINE> self.attribute_map = { } <NEW_LINE> <DEDENT> def to_dict(self): <NEW_LINE> <INDENT> result = {} <NEW_LINE> for attr, _ in iteritems(self.swagger_types): <NEW_LINE> <INDENT> value = ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f8df7d966606f747bbe
class APIProject(Project): <NEW_LINE> <INDENT> features = [] <NEW_LINE> class Meta: <NEW_LINE> <INDENT> proxy = True <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.features = kwargs.pop('features', []) <NEW_LINE> environment_variables = kwargs.pop('environment_variables', {}) <NEW_LIN...
Project proxy model for API data deserialization. This replaces the pattern where API data was deserialized into a mocked :py:class:`Project` object. This pattern was confusing, as it was not explicit as to what form of object you were working with -- API backed or database backed. This model preserves the Project mo...
62598f8d66656f66f7d59fd7
class TestJSONEncoderOF10(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> patch('kytos.core.helpers.run_on_thread', lambda x: x).start() <NEW_LINE> from napps.kytos.of_core.v0x01.utils import JSONEncoderOF10 <NEW_LINE> self.addCleanup(patch.stopall) <NEW_LINE> self.encoder = JSONEncoderOF10() <NEW_L...
Test custom JSON encoder for OF 1.0 .
62598f8d6e29344779b00234
class PageObject(object): <NEW_LINE> <INDENT> def __init__(self, webdriver, root_uri=None): <NEW_LINE> <INDENT> self.w = webdriver <NEW_LINE> self.root_uri = root_uri if root_uri else getattr(self.w, 'root_uri', None) <NEW_LINE> <DEDENT> def get(self, uri): <NEW_LINE> <INDENT> root_uri = self.root_uri or '' <NEW_LINE> ...
Page Object pattern. :param webdriver: `selenium.webdriver.WebDriver` Selenium webdriver instance :param root_uri: `str` Root URI to base any calls to the ``PageObject.get`` method. If not defined in the constructor it will try and look it from the webdriver object.
62598f8dbde94217f3707456
class Vendedor(TimeStampedModel): <NEW_LINE> <INDENT> usuario = models.ForeignKey(User, related_name="vendedores") <NEW_LINE> habilitado = models.BooleanField(default=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.usuario.get_full_name() <NEW_LINE> <DEDENT> def get_absolute_url(self): <NEW_LINE...
Indica quien realizo una venta de un :clas:`Contrato`
62598f8d7b25080760ed708b
class EmotableAggregateSerializerMixin: <NEW_LINE> <INDENT> emote_aggregate = serializers.ListField( child=serializers.IntegerField( min_value=0, max_value=None, ), min_length=len(Emote.EMOTES), max_length=len(Emote.EMOTES), )
Aggregation for Emotable serializer.
62598f8d8e7ae83300ee8c81
class _IfTrueFunction(Function): <NEW_LINE> <INDENT> nargs = 1 <NEW_LINE> def fdiff(self, argindex=1): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def eval(cls, *args): <NEW_LINE> <INDENT> if args[0]: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return 0
Implements a sympy function to implement a step function. This will return 1 if the argument is true, 0 otherwise.
62598f8de76e3b2f99fd8611
class TaskDTOListResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'response': 'list[TaskDTOResponseResponse]', 'version': 'str' } <NEW_LINE> attribute_map = { 'response': 'response', 'version': 'version' } <NEW_LINE> def __init__(self, response=None, version=None): <NEW_LINE> <INDENT> self._response = None <NEW_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f8d8e71fb1e983bb691
class Inner(Node): <NEW_LINE> <INDENT> def __init__(self, class_props, nex_node, nex_total, split, left, right, depth): <NEW_LINE> <INDENT> super(Inner, self).__init__(class_props, nex_node, nex_total, depth) <NEW_LINE> self.split = split <NEW_LINE> self.left = left <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def...
An inner node in the decision tree Attributes: split -- an object of class Split left -- the left child (examples that satisfy the split condition) right -- the right child (examples that do not satisfy the split condition)
62598f8e656771135c48925c
class RobustProblem(Problem): <NEW_LINE> <INDENT> def __init__(self, parameters, outcome_names, scenarios, robustness_functions, constraints): <NEW_LINE> <INDENT> super(RobustProblem, self).__init__('robust', parameters, outcome_names, constraints) <NEW_LINE> assert len(robustness_functions) == len(outcome_names) <NEW_...
small extension to Problem object for robust optimization, adds the scenarios and the robustness functions
62598f8e82261d6c5272fcc5
class PluginTestRunner(object): <NEW_LINE> <INDENT> def __init__(self, plugin_dir): <NEW_LINE> <INDENT> self.plugin_dir = plugin_dir <NEW_LINE> self.timeline = None <NEW_LINE> self.expectations = None <NEW_LINE> try: <NEW_LINE> <INDENT> test_directory = join(plugin_dir, PLUGIN_TESTS_DIRECTORY) <NEW_LINE> self.timeline ...
Run tests to verify a plugin functions as expected.
62598f8e30dc7b766599f439
class UrlField(TextField): <NEW_LINE> <INDENT> type = 'url' <NEW_LINE> validator = twc.UrlValidator
An url input field (HTML5 only). Will fallback to a normal text input field on browser not supporting HTML5.
62598f8eb57a9660fecd165e
class Station_Autolib: <NEW_LINE> <INDENT> def __init__(self,status,dist,charging_status,rental_status,cars,geo_point,charge_slots,postal_code,subscription_status,slots,address): <NEW_LINE> <INDENT> self._status = status <NEW_LINE> self._dist = dist <NEW_LINE> self._charging_status = charging_status <NEW_LINE> self._re...
Classe permettant de formaliser une station Autolib avec les données issus de l'API
62598f8e596a897236127858
@pytest.mark.windows_whitelisted <NEW_LINE> class TestDaemonSaltApi(TestSaltDaemon): <NEW_LINE> <INDENT> pass
Manager for salt-api daemon.
62598f8e16aa5153ce4000e6
class euca2ools_euscale(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> def checkenabled(self): <NEW_LINE> <INDENT> if ( self.is_installed("euca2ools") and self.is_installed("eucalyptus-admin-tools") and self.is_installed("eucalyptus-cloud") ): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return False <NEW_LINE> <DED...
euca2ools euscale commands: - all euscale-* commands
62598f8e9b70327d1c57e97e
class FeaturePublication(models.Model): <NEW_LINE> <INDENT> feature = models.ForeignKey( Feature, models.CASCADE, db_column="kohdeid", verbose_name=_("feature") ) <NEW_LINE> publication = models.ForeignKey( Publication, models.CASCADE, db_column="julkid", verbose_name=_("publication") ) <NEW_LINE> objects = FeatureRela...
Through model for Feature & Publication m2m relation
62598f8eb7558d5895463215
class AdminNoteOverviewTest(WorkoutManagerAccessTestCase): <NEW_LINE> <INDENT> url = reverse_lazy('gym:admin_note:list', kwargs={'user_pk': 14}) <NEW_LINE> anonymous_fail = True <NEW_LINE> user_success = ('trainer1', 'trainer2', 'trainer3') <NEW_LINE> user_fail = ('member1', 'manager1', 'manager2', 'trainer4', 'general...
Tests accessing the gym overview page
62598f8e55399d3f056260fb
class TestDebtsResultPagedMetadata(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 testDebtsResultPagedMetadata(self): <NEW_LINE> <INDENT> model = billforward.models.debts_result_paged_metadata.Deb...
DebtsResultPagedMetadata unit test stubs
62598f8e8da39b475be02dbf
class Br(WebElement): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> tagName = "br" <NEW_LINE> tagSelfCloses = True <NEW_LINE> allowsChildren = False
Defines a single line break
62598f8ef8510a7c17d7df67
class ResponseCtx: <NEW_LINE> <INDENT> results: List[Result] <NEW_LINE> def __init__(self, results: List[Result]) -> None: <NEW_LINE> <INDENT> self.results = results <NEW_LINE> <DEDENT> def add_result(self, result: Result) -> None: <NEW_LINE> <INDENT> self.results.append(result) <NEW_LINE> <DEDENT> def __str__(self) ->...
Represents response from PDP to PEP.
62598f8ea79ad16197769c46
class Memoize(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.cache = {} <NEW_LINE> <DEDENT> def __call__(self, *args): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.cache[args] <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> res = self.fun...
This is a decorator to allow memoization of function calls. It is a completely dumb cache, and will cache anything given to it indefinitely.
62598f8e4e696a045264dbf6
class SubWikiTextWithArgs(SubWikiText): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _name_args_matcher = NotImplemented <NEW_LINE> _first_arg_sep = 0 <NEW_LINE> @property <NEW_LINE> def nesting_level(self) -> int: <NEW_LINE> <INDENT> return self._nesting_level(('Template', 'ParserFunction')) <NEW_LINE> <DEDENT> @prop...
Define common attributes for `Template` and `ParserFunction`.
62598f8edd821e528d6d8b12
class Imagebox(Component): <NEW_LINE> <INDENT> def __init__(self, controller, path: str, parent: Component=None, z: int=0): <NEW_LINE> <INDENT> Component.__init__(self, controller, parent, z) <NEW_LINE> self.text = 'Imagebox' <NEW_LINE> self.image = Image(path) <NEW_LINE> self.reset = self.image.reset <NEW_LINE> self.r...
@brief Component to hold an image for simpler z index placement.
62598f8ec432627299fa2bae
class BillCheckPage(Page): <NEW_LINE> <INDENT> basePage_alert = PageElement(xpath="/html/body/div[6]/div/span/div", describe="电子对账提示框") <NEW_LINE> basePage_sure_button = PageElement(xpath="/html/body/div[6]/div/span/div/div/div/span/span/button[2]", describe="确定按钮") <NEW_LINE> '''菜单按钮''' <NEW_LINE> menu_transfer_button...
alert弹框
62598f8ebde94217f3707457
class UnsupervisedRnn(BaseRnn, rnn.UnsupervisedRecurrentNetwork, UnsupervisedBrezeWrapperBase, TransformBrezeWrapperMixin): <NEW_LINE> <INDENT> transform_expr_name = 'output' <NEW_LINE> sample_dim = 1, <NEW_LINE> def iter_fit(self, X): <NEW_LINE> <INDENT> f_loss, f_d_loss = self._make_loss_functions() <NEW_LINE> args =...
Class implementing recurrent neural networks for unsupervised learning.. The class inherits from breze's RecurrentNetwork class and adds several sklearn like methods.
62598f8e8e7ae83300ee8c83
class I_subbr_f(Instruction_f_B): <NEW_LINE> <INDENT> name = 'SUBBR' <NEW_LINE> mask = 0xFFA000 <NEW_LINE> code = 0xBDA000
SUBBR{.B} f
62598f8e462c4b4f79dbb5e5
class UnitedKingdom(WesternCalendar, ChristianMixin): <NEW_LINE> <INDENT> include_good_friday = True <NEW_LINE> include_easter_sunday = True <NEW_LINE> include_easter_monday = True <NEW_LINE> include_boxing_day = True <NEW_LINE> shift_new_years_day = True <NEW_LINE> def get_variable_days(self, year): <NEW_LINE> <INDENT...
United Kingdom
62598f8ee76e3b2f99fd8613