code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class HealthCheckPluginDirectory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._registry = {} <NEW_LINE> <DEDENT> def register(self, plugin, admin_class=None, **options): <NEW_LINE> <INDENT> if plugin in self._registry: <NEW_LINE> <INDENT> raise AlreadyRegistered('The model %s is already reg... | Django health check registry.
An AdminSite object encapsulates an instance of the Django admin application, ready
to be hooked in to your URLconf. Models are registered with the AdminSite using the
register() method, and the get_urls() method can then be used to access Django view
functions that present a full admin i... | 62598edebe8e80087fbbd5d4 |
class TestValidateQuery(object): <NEW_LINE> <INDENT> swagger_types = { 'id': 'int', 'tag': 'list[str]' } <NEW_LINE> attribute_map = { 'id': 'id', 'tag': 'tag' } <NEW_LINE> def __init__(self, id=None, tag=None): <NEW_LINE> <INDENT> self._id = None <NEW_LINE> self._tag = None <NEW_LINE> self.discriminator = None <NEW_LIN... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ede379a373c97d97582 |
class ResultsController(validation.BaseRestControllerWithValidation): <NEW_LINE> <INDENT> __validator__ = validators.TestResultValidator <NEW_LINE> meta = MetadataController() <NEW_LINE> @pecan.expose('json') <NEW_LINE> @api_utils.check_permissions(level=const.ROLE_USER) <NEW_LINE> def get_one(self, test_id): <NEW_LINE... | /v1/results handler. | 62598ede498bea3a75a560be |
class SpaceIgnoredString(FuzzyMatchingString): <NEW_LINE> <INDENT> def __init__( self, value, ignore_space_change=False, ignore_whitespaces=False ): <NEW_LINE> <INDENT> self.ignore_space_change = ignore_space_change <NEW_LINE> self.ignore_whitespaces = ignore_whitespaces <NEW_LINE> <DEDENT> def real_content(self): <NEW... | Inherits FuzzyMatchingString, ingores whitespace and space change
when compared with other strings. | 62598ede0c0af96317c54925 |
class LightSwitch(LightEntity): <NEW_LINE> <INDENT> def __init__(self, name: str, switch_entity_id: str) -> None: <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._switch_entity_id = switch_entity_id <NEW_LINE> self._is_on = False <NEW_LINE> self._available = False <NEW_LINE> self._async_unsub_state_changed: Optio... | Represents a Switch as a Light. | 62598ede66656f66f7d58969 |
class BaseConcreteDp(CommonConcreteObject): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(BaseConcreteDp, self).__init__(parent) <NEW_LINE> self._parent = parent <NEW_LINE> if parent is not None: <NEW_LINE> <INDENT> self._parent.add_child(self) <NEW_LINE> <DEDENT> <DEDENT> @staticmethod... | BaseConcreteDp : Base class for ConcreteCdp and ConcreteLLdp | 62598ede7d847024c075a957 |
class State( object ): <NEW_LINE> <INDENT> def __init__( self ): <NEW_LINE> <INDENT> self.prngSeed = None <NEW_LINE> self.keyCreation = None <NEW_LINE> self.hmacKey = None <NEW_LINE> self.aesKey = None <NEW_LINE> self.oldHmacKey = None <NEW_LINE> self.oldAesKey = None <NEW_LINE> self.ticketReplay = None <NEW_LINE> self... | Implement a state class which stores the server's state.
This class makes it possible to store state information on disk. It
provides methods to generate and write state information. | 62598ede5f7d997b871f8699 |
class Operator(object): <NEW_LINE> <INDENT> def build_exp(self): <NEW_LINE> <INDENT> attr_values = AttributeValues() <NEW_LINE> return self._build_exp(attr_values), attr_values.data <NEW_LINE> <DEDENT> def _build_exp(self, attr_values): <NEW_LINE> <INDENT> raise NotImplemented <NEW_LINE> <DEDENT> def __and__(self, oper... | Abstract operators used in the filter expression.
| 62598ede4e4d5625663709a1 |
class member_attribute(_relation_attribute): <NEW_LINE> <INDENT> def __init__(self, attr_type, entity_attr=None, cardinality=CARDINALITY.MANYTOONE, is_nested=False): <NEW_LINE> <INDENT> _relation_attribute.__init__(self, attr_type, entity_attr=entity_attr, cardinality=cardinality, is_nested=is_nested) <NEW_LINE> <DEDEN... | Descriptor for declaring member attributes of a resource as attributes
from its underlying entity. | 62598edebaa26c4b54d4d859 |
class Score_pooling(Layer): <NEW_LINE> <INDENT> def __init__(self, output_dim, kernel_initializer='glorot_uniform', bias_initializer='zeros', kernel_regularizer=None, bias_regularizer=None, use_bias=True, pooling_mode='max', **kwargs): <NEW_LINE> <INDENT> self.output_dim = output_dim <NEW_LINE> self.pooling_mode = pool... | Score pooling layer
This layer contains a FC layer which only has one neural with sigmoid actiavtion
and MIL pooling. The input of this layer is instance features. Then we obtain
instance scores via this FC layer. And use MIL pooling to aggregate instance scores
into bag score that is the output of Score pooling layer... | 62598ede8e7ae83300ee7618 |
class IDict(IMinMaxLen, IIterable, IContainer): <NEW_LINE> <INDENT> key_type = Attribute( "key_type", _("Field keys must conform to the given type, expressed via a Field.") ) <NEW_LINE> value_type = Attribute( "value_type", _("Field values must conform to the given type, expressed " "via a Field.") ) | Field containing a conventional dict.
The key_type and value_type fields allow specification
of restrictions for keys and values contained in the dict. | 62598ede67a9b606de544556 |
class ValuePluginModel(CMSPlugin): <NEW_LINE> <INDENT> titulo = models.CharField(max_length=100) <NEW_LINE> def copy_relations(self, oldinstance): <NEW_LINE> <INDENT> self.values_item.all().delete() <NEW_LINE> for values_item in oldinstance.values_item.all(): <NEW_LINE> <INDENT> values_item.pk = None <NEW_LINE> values_... | plugin para valores de pagina principal | 62598edeeab8aa0e5d30a2ff |
class BadURL(ValueError, JenkinsAPIException): <NEW_LINE> <INDENT> pass | A URL appears to be broken
| 62598ede32920d7e50bc45b6 |
class GeoMultiLine(geo_field.Geom): <NEW_LINE> <INDENT> _type = 'geo_multi_line' <NEW_LINE> def __init__(self, string, dim=2, srid=900913, gist_index=True, **args): <NEW_LINE> <INDENT> super(GeoMultiLine, self).__init__( string, "MULTILINESTRING", dim=dim, srid=srid, gist_index=gist_index, **args) | New type of column in the ORM for POSTGIS geometry MultiLine type | 62598ede97e22403b3839479 |
class TestImageApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = beanie.api.image_api.ImageApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_add_image(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_find_image_by_id... | ImageApi unit test stubs | 62598ede9c8ee8231303f41c |
class CustomerBadFNameExceptionTestCases(unittest.TestCase): <NEW_LINE> <INDENT> def test_bad_fname_exception(self): <NEW_LINE> <INDENT> with self.assertRaises(ce.InvalidNameException): <NEW_LINE> <INDENT> self.customer_bad_id = cust.customer(5555, 'Last', '0000', '123-456-7890') <NEW_LINE> <DEDENT> with self.assertRai... | Test to ensure bad first name results in InvalidNameException | 62598ede56b00c62f0fb0e59 |
class MyList(list): <NEW_LINE> <INDENT> def print_sorted(self): <NEW_LINE> <INDENT> print(sorted(self)) | like lists only better | 62598ede55399d3f05624ab8 |
class TaskSimpleInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TaskId = None <NEW_LINE> self.TaskType = None <NEW_LINE> self.CreateTime = None <NEW_LINE> self.BeginProcessTime = None <NEW_LINE> self.FinishTime = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <... | Task overview information
| 62598ede23849d37ff84f643 |
class ProcessJWSInstalledWithRpm(process.Processor): <NEW_LINE> <INDENT> KEY = 'jws_installed_with_rpm' <NEW_LINE> RETURN_CODE_ANY = True <NEW_LINE> @staticmethod <NEW_LINE> def process(output, dependencies=None): <NEW_LINE> <INDENT> stdout = output.get('stdout_lines', []) <NEW_LINE> if len(stdout) == 1 and 'Red Hat JB... | Process the results of 'yum grouplist jws3 jws3plus jws5...'. | 62598ede8c0ade5d55dc2948 |
class Page1(object): <NEW_LINE> <INDENT> def __init__(self, master): <NEW_LINE> <INDENT> self.app = master <NEW_LINE> self.app.title("ALGO-0.2MINI") <NEW_LINE> self.started = False <NEW_LINE> self.epic = Var.epic <NEW_LINE> self.timing = "SECOND" <NEW_LINE> ig = Rest.ig() <NEW_LINE> self.LStoken = ig.streamingToken(Var... | docstring for app | 62598edecc0a2c111447958b |
class URLForm(forms.Form, DashboardPluginFormBase): <NEW_LINE> <INDENT> class Media(object): <NEW_LINE> <INDENT> css = { 'all': ('css/dash_plugin_url_form.css',) } <NEW_LINE> js = ('js/dash_plugin_url_form.js',) <NEW_LINE> <DEDENT> plugin_data_fields = [ ("title", ""), ("url", ""), ("external", False), ("image", "") ] ... | URL form for ``BaseURLPlugin`` plugin. | 62598ede6aa9bd52df0d3437 |
class StyleConv_Block(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channel, out_channel, dim_latent, output_dim): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.style1 = FC_A(dim_latent, out_channel) <NEW_LINE> self.style2 = FC_A(dim_latent, out_channel) <NEW_LINE> self.noise1 = quick_scale(Scale_B(out... | This is the general class of style-based convolutional blocks | 62598ede462c4b4f79db9f83 |
class RegionCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> RECOMMENDED = "Recommended" <NEW_LINE> EXTENDED = "Extended" <NEW_LINE> OTHER = "Other" | The category of the region.
| 62598edea219f33f346c4dc1 |
class VIEW3D_PT_links(VIEW3D_PT_characterUI): <NEW_LINE> <INDENT> bl_label = "Info" <NEW_LINE> bl_idname = "VIEW3D_PT_links" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> layout.separator() <NEW_LINE> col = layout.column() <NEW_LINE> data = CharacterUIUtils.get_character().data... | Panel containing links and build info of the UI | 62598ede0a50d4780f703932 |
class TestGroup(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 testGroup(self): <NEW_LINE> <INDENT> model = swagger_client.models.group.Group() | Group unit test stubs | 62598ede99fddb7c1ca620cb |
class Meta: <NEW_LINE> <INDENT> filters_converter = ModelFilters <NEW_LINE> model = None <NEW_LINE> models_converter = None <NEW_LINE> primary_key = None <NEW_LINE> schema = {} | Default options. | 62598ede23849d37ff84f644 |
class FieldList(FieldListBase): <NEW_LINE> <INDENT> def __init__(self, unbound_field, metavar=None, **kwargs): <NEW_LINE> <INDENT> super(FieldList, self).__init__(unbound_field, **kwargs) <NEW_LINE> self.metavar = metavar | :class:`wtforms.fields.FieldList` with :attr:`metavar`. | 62598edecb5e8a47e493b43e |
class BayLock(Base): <NEW_LINE> <INDENT> __tablename__ = 'baylock' <NEW_LINE> __table_args__ = ( schema.UniqueConstraint('bay_uuid', name='uniq_baylock0bay_uuid'), table_args() ) <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> bay_uuid = Column(String(36)) <NEW_LINE> conductor_id = Column(String(64)) | Represents a baylock. | 62598ede0c0af96317c54927 |
class EmptyIterable(Exception): <NEW_LINE> <INDENT> pass | A given iterable returns no results | 62598edef7d966606f74657a |
class Test(namespaceable, metaclass=Meta): <NEW_LINE> <INDENT> with namespace() as namespace_: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def cls_mthd(cls): <NEW_LINE> <INDENT> return 'called' | A throwaway test class, for testing classmethods. | 62598ede85dfad0860cbed2f |
class ModifyPsaRegulationResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId") | ModifyPsaRegulation返回参数结构体
| 62598ede44b2445a339b5c2b |
class Waist(BodyPart): <NEW_LINE> <INDENT> nouns = 'waist' <NEW_LINE> typ = EQ_PARTS.WAIST | waist | 62598edea79ad161977685a6 |
class NSNitroNserrBadCrAttribs(NSNitroCrErrors): <NEW_LINE> <INDENT> pass | Nitro error code 607
Bad cache redirection VIP attributes given | 62598ede38b623060ffa761e |
class FireAnt(Ant): <NEW_LINE> <INDENT> name = 'Fire' <NEW_LINE> damage = 3 <NEW_LINE> implemented = True <NEW_LINE> food_cost = 5 <NEW_LINE> def reduce_armor(self, amount): <NEW_LINE> <INDENT> bees = self.place.bees <NEW_LINE> Ant.reduce_armor(self, amount) <NEW_LINE> if self.armor <= 0: <NEW_LINE> <INDENT> self.aoe(b... | FireAnt cooks any Bee in its Place when it expires. | 62598edea17c0f6771d5a7e6 |
class GetDirectMessagesResultSet(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 GetDirectMessages Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution. | 62598ede3c8af77a43b671f7 |
class DefinitionHandlerTask(BaseTask): <NEW_LINE> <INDENT> document_builder = DocumentBuilder <NEW_LINE> transforms = None <NEW_LINE> def __init__(self, domain, env): <NEW_LINE> <INDENT> super(DefinitionHandlerTask, self).__init__(domain, env) <NEW_LINE> self.definition = self.env['definition'] <NEW_LINE> self.db = sel... | Base task for the definition handlers.
"Definition" represents some entity like function, class, method etc. | 62598ede97e22403b383947b |
class WeightDecayPenalty(Node): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> Node.__init__(self, name=name) <NEW_LINE> self.input = core.Port(name=self.__own__('input')) <NEW_LINE> self.weight = core.Port(name=self.__own__('weight')) <NEW_LINE> self._inputs.extend([self.input, self.weight]) <NEW_LI... | Compute the mean L2-magnitude of an `input`, scaled by `weight`.
See also: optimus.nodes.L2Magnitude. | 62598ede097d151d1a2bf5a9 |
class AuthUserLogoutView(views.APIView): <NEW_LINE> <INDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> user.jwt_secret = uuid.uuid4() <NEW_LINE> user.save() <NEW_LINE> return Response(status=status.HTTP_204_NO_CONTENT) | Logs out all all session for a user by changing the users jwt secret | 62598ede6e29344779afebb8 |
class FloatList(ItemList): <NEW_LINE> <INDENT> def __init__(self, items:Iterator, log:bool=False, **kwargs): <NEW_LINE> <INDENT> super().__init__(np.array(items, dtype=np.float32), **kwargs) <NEW_LINE> self.log = log <NEW_LINE> self.copy_new.append('log') <NEW_LINE> self.c = self.items.shape[1] if len(self.items.shape)... | `ItemList` suitable for storing the floats in items for regression. Will add a `log` if True | 62598ede1b99ca400228e7d2 |
class News(models.Model): <NEW_LINE> <INDENT> userFCC = models.ForeignKey('UserFCC') <NEW_LINE> titre = models.CharField(max_length=100) <NEW_LINE> message = models.TextField() <NEW_LINE> date = models.DateTimeField(auto_now=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.titre + " par " + self.user... | News. | 62598ede460517430c430a14 |
class Data(Model): <NEW_LINE> <INDENT> def __init__(self, id: int=None, mac: str=None, data: float=None, time: datetime=None): <NEW_LINE> <INDENT> self.swagger_types = { 'id': int, 'mac': str, 'data': float, 'time': datetime } <NEW_LINE> self.attribute_map = { 'id': 'id', 'mac': 'mac', 'data': 'data', 'time': 'time' } ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ede56ac1b37e6300778 |
class CustomerTestCase(CustomAPITestCase): <NEW_LINE> <INDENT> def test_can_create_a_customer(self): <NEW_LINE> <INDENT> url = self.reverse_by_name("customers:customers-list") <NEW_LINE> payload = { "full_name": self.faker.name(), "address": self.faker.address(), "cpf": "12345678912", "email": "test@email.com", "phone"... | Customer tests cases | 62598ededd821e528d6d74d2 |
class AddtionCar(View): <NEW_LINE> <INDENT> def post(self,request): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> if not user.is_authenticated(): <NEW_LINE> <INDENT> return redirect(reverse('user:login')) <NEW_LINE> <DEDENT> carid_after=request.POST.get('car_id') <NEW_LINE> if not all([carid_after]): <NEW_LINE> <I... | 完成收藏夹的加入功能 | 62598ede796e427e5384cd24 |
class CoNLLWriter: <NEW_LINE> <INDENT> def __init__( self, sentence_splitter: SentenceSplitter, ): <NEW_LINE> <INDENT> self.sentence_splitter = sentence_splitter <NEW_LINE> <DEDENT> def process_dataset(self, datasets: Dict[str, InternalBioNerDataset], out_dir: Path): <NEW_LINE> <INDENT> self.write_to_conll(datasets["tr... | Class which implements the output CONLL file generation of corpora given as instances of
:class:`InternalBioNerDataset`. | 62598ede435de62698e9a361 |
class BrandCategoryMapping(models.Model): <NEW_LINE> <INDENT> category_id = models.IntegerField(verbose_name='分类id') <NEW_LINE> brand_id = models.IntegerField(verbose_name='品牌id') <NEW_LINE> status = models.CharField(max_length=8, blank=True, null=True, verbose_name='状态;0:无效(逻辑删除),1:有效') <NEW_LINE> class Meta: <NEW_LIN... | 品牌和商品分类映射表 | 62598ede462c4b4f79db9f85 |
class Install(install): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> install.run(self) <NEW_LINE> if not self.distribution.with_gaupol: return <NEW_LINE> get_command_obj = self.distribution.get_command_obj <NEW_LINE> root = get_command_obj("install").root <NEW_LINE> data_dir = get_command_obj("install_data").... | Command to install everything. | 62598ede76e4537e8c3edb4d |
class RemoveItem(DockLayoutOp): <NEW_LINE> <INDENT> item = Str() | A layout operation which will remove an item from the layout.
This layout operation will remove the dock item from the layout
and hide it. It can be added back to layout later with one of the
other layout operations. | 62598ede0a50d4780f703934 |
class ConfigEntry(metaclass=_ConfigEntryMeta): <NEW_LINE> <INDENT> def __init__(self) -> NoReturn: <NEW_LINE> <INDENT> raise InvalidOperation("Creating instances of ConfigEntry isn't allowed.") | Base class for configuration entries.
Values of class attributes can be overwritten by loading YAML configuration files. Otherwise, their given default
values will be used. The exception is class attributes whose names begin with an underscore; they always behave like
normal class attributes and therefore their values... | 62598edea8370b77170ee97a |
class SegregatingConditionWrapper(ConditionWrapper): <NEW_LINE> <INDENT> def __init__(self, base, color, box): <NEW_LINE> <INDENT> ConditionWrapper.__init__(self, base) <NEW_LINE> self.__color = color <NEW_LINE> self.__box = box <NEW_LINE> <DEDENT> @routine <NEW_LINE> def check(self): <NEW_LINE> <INDENT> assert self.__... | A condition wrapper that puts the given color to the given box before checking.
Empties the box afterwards. | 62598edec432627299fa1541 |
class CharacteristicFormats(object): <NEW_LINE> <INDENT> bool = 'bool' <NEW_LINE> uint8 = 'uint8' <NEW_LINE> uint16 = 'uint16' <NEW_LINE> uint32 = 'uint32' <NEW_LINE> uint64 = 'uint64' <NEW_LINE> int = 'int' <NEW_LINE> float = 'float' <NEW_LINE> string = 'string' <NEW_LINE> tlv8 = 'tlv8' <NEW_LINE> data = 'data' | Values for characteristic's format taken from table 5-5 page 67 | 62598ede07f4c71912bad9e6 |
class TransitionState: <NEW_LINE> <INDENT> def __init__(self, label='', states=None, geometry=None, E0=0.0, frequency=0.0, degeneracy=1): <NEW_LINE> <INDENT> self.label = label <NEW_LINE> self.states = states <NEW_LINE> self.geometry = geometry <NEW_LINE> self.E0 = E0 <NEW_LINE> self.frequency = frequency <NEW_LINE> se... | A chemical transition state, representing a first-order saddle point on a
potential energy surface.
=============== =========================== ================================
Attribute Type Description
=============== =========================== ================================
`label` ... | 62598ede91f36d47f223016a |
class ValueEstimator(): <NEW_LINE> <INDENT> def __init__(self, state_dim=4, action_dim=2, learning_rate=0.005, tau=0.001, num_actor_vars=1): <NEW_LINE> <INDENT> self.state_dim = state_dim <NEW_LINE> self.action_dim = action_dim <NEW_LINE> self.learning_rate = learning_rate <NEW_LINE> self.tau = tau <NEW_LINE> self.stat... | Value Function approximator. | 62598ede498bea3a75a560c2 |
class IncludeStatement(Filter): <NEW_LINE> <INDENT> def __init__(self, dirpath=".", maxRecursive=10): <NEW_LINE> <INDENT> self.dirpath = abspath(dirpath) <NEW_LINE> self.maxRecursive = maxRecursive <NEW_LINE> self.detected = False <NEW_LINE> <DEDENT> def process(self, stack, stream): <NEW_LINE> <INDENT> for token_type,... | Filter that enable a INCLUDE statement | 62598ede56ac1b37e6300779 |
class ConcreteProductA1(AbstractProductA): <NEW_LINE> <INDENT> def interface(self): <NEW_LINE> <INDENT> print("ConcreteProductA1") | Define product object | 62598ede435de62698e9a362 |
class DatabaseError(HTTPError): <NEW_LINE> <INDENT> pass | Raised in case of database error. | 62598ede99cbb53fe682f43e |
class AlternatingSignMatrices(Parent): <NEW_LINE> <INDENT> __metaclass__ = ClasscallMetaclass <NEW_LINE> @staticmethod <NEW_LINE> def __classcall_private__(cls, n, **kwds): <NEW_LINE> <INDENT> assert(isinstance(n, (int, Integer))) <NEW_LINE> return AlternatingSignMatrices_n(n, **kwds) | Factory class for the combinatorial structure of alternating sign matrices of size `n`.
An alternating sign matrix is a square matrix of 0s, 1s and -1s
such that the sum of each row and column is 1 and the non zero
entries in each row and column alternate in sign.
EXAMPLES:
This will create an instance to manipulate... | 62598ede21bff66bcd7211de |
class RideDetailView(LoginRequiredMixin, DetailView): <NEW_LINE> <INDENT> model = Ride <NEW_LINE> context_object_name = "ride" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> context["already_requested"] = ( Request.objects.filter(ride=self.kw... | View for Ride details | 62598ede63d6d428bbee0d5e |
class ScaleFreeNetwork(AbstractNetwork): <NEW_LINE> <INDENT> def __createNetwork__(self, amount_nodes, amount_links): <NEW_LINE> <INDENT> random.seed() <NEW_LINE> for i in range(0, 3): <NEW_LINE> <INDENT> AbstractNetwork.appendNode(self, node=Node(i)) <NEW_LINE> <DEDENT> n0 = AbstractNetwork.getNode(self, 0) <NEW_LINE>... | Scale-free network implementation of AbstractNetwork | 62598ede63b5f9789fe836fe |
class SpatialBatchNormalization(Layer): <NEW_LINE> <INDENT> def __init__(self, n_output, eps=1e-5, momentum=0.1, affine=True, init_weight=None, init_bias=None, init_grad_weight=None, init_grad_bias=None, bigdl_type="float"): <NEW_LINE> <INDENT> super(SpatialBatchNormalization, self).__init__(None, bigdl_type, n_output,... | This file implements Batch Normalization as described in the paper:
"Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift"
by Sergey Ioffe, Christian Szegedy
This implementation is useful for inputs coming from convolution layers.
For non-convolutional layers,... | 62598ede67a9b606de54455b |
@registries.ZIGBEE_CHANNEL_REGISTRY.register( measurement.IlluminanceLevelSensing.cluster_id ) <NEW_LINE> class IlluminanceLevelSensing(AttributeListeningChannel): <NEW_LINE> <INDENT> REPORT_CONFIG = [{"attr": "level_status", "config": REPORT_CONFIG_DEFAULT}] | Illuminance Level Sensing channel. | 62598ede3cc13d1c6d463cf7 |
class MNEAnnotationFigure(MNEFigure): <NEW_LINE> <INDENT> def _close(self, event): <NEW_LINE> <INDENT> parent = self.mne.parent_fig <NEW_LINE> parent.mne.ax_main.selector.active = False <NEW_LINE> parent._remove_annotation_hover_line() <NEW_LINE> callback_id = parent.mne._callback_ids['motion_notify_event'] <NEW_LINE> ... | Interactive dialog figure for annotations. | 62598edea79ad161977685a8 |
class DataSetList(generics.ListCreateAPIView): <NEW_LINE> <INDENT> permission_classes = (permissions.IsAuthenticatedOrReadOnly, IsOwnerOrReadOnly) <NEW_LINE> queryset = DataSet.objects.all() <NEW_LINE> serializer_class = DataSetSerializer | REST: List All DataSets, or create a new DataSet | 62598ede3c8af77a43b671f8 |
class Infrastructure(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> AZURE = "azure" <NEW_LINE> GCP = "gcp" <NEW_LINE> AWS = "aws" <NEW_LINE> ALIBABA = "alibaba" <NEW_LINE> ONPREMISES = "onpremises" <NEW_LINE> OTHER = "other" | The infrastructure the data controller is running on.
| 62598ede32920d7e50bc45ba |
class Sensor(object): <NEW_LINE> <INDENT> def __init__(self, filepaths, bounds=None, trim_vals=None): <NEW_LINE> <INDENT> self.source_path = filepaths <NEW_LINE> self.bounds = bounds <NEW_LINE> self.trim_vals = trim_vals <NEW_LINE> self.df = None <NEW_LINE> self.offset = None <NEW_LINE> self.hour_offset = None <NEW_LIN... | Parent class for all sensors, with shared methods | 62598ede6e29344779afebba |
class DviFont: <NEW_LINE> <INDENT> __slots__ = ('texname', 'size', 'widths', '_scale', '_vf', '_tfm') <NEW_LINE> def __init__(self, scale, tfm, texname, vf): <NEW_LINE> <INDENT> cbook._check_isinstance(bytes, texname=texname) <NEW_LINE> self._scale = scale <NEW_LINE> self._tfm = tfm <NEW_LINE> self.texname = texname <N... | Encapsulation of a font that a DVI file can refer to.
This class holds a font's texname and size, supports comparison,
and knows the widths of glyphs in the same units as the AFM file.
There are also internal attributes (for use by dviread.py) that
are *not* used for comparison.
The size is in Adobe points (converted... | 62598ede66673b3332c2e933 |
class TestDiscoveryAsset(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 testDiscoveryAsset(self): <NEW_LINE> <INDENT> pass | DiscoveryAsset unit test stubs | 62598edebe383301e0251d64 |
class IntExpr(Node): <NEW_LINE> <INDENT> value = 0 <NEW_LINE> literal = LITERAL_YES <NEW_LINE> def __init__(self, value: int) -> None: <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.literal_hash = value <NEW_LINE> <DEDENT> def accept(self, visitor: NodeVisitor[T]) -> T: <NEW_LINE> <INDENT> return visitor.visit_... | Integer literal | 62598ede1b99ca400228e7d3 |
@attr.s <NEW_LINE> class VirtualMachineBuilderInterface(object): <NEW_LINE> <INDENT> def build_image(self): <NEW_LINE> <INDENT> raise NotImplemented | Interface for building an image. This should actually go to the underlying
provider and create an image. | 62598eded53ae8145f916a18 |
class AnnouncementsManager(metaclass=SingletonMeta): <NEW_LINE> <INDENT> blog = logging.getLogger('botlog') <NEW_LINE> db: DBUtils = DBUtils() <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.blog.info('Creating AnnouncementsManager instance') <NEW_LINE> self.db.setup_new_connection(1) <NEW_LINE> <DEDENT> def ge... | Add or get announcements from database | 62598ede8c0ade5d55dc294a |
class ControlAreaGeneratingUnit(Element): <NEW_LINE> <INDENT> def __init__(self, AltGeneratingUnitMeas=None, ControlArea=None, GeneratingUnit=None, *args, **kw_args): <NEW_LINE> <INDENT> self._AltGeneratingUnitMeas = [] <NEW_LINE> self.AltGeneratingUnitMeas = [] if AltGeneratingUnitMeas is None else AltGeneratingUnitMe... | A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit.
| 62598ede57b8e32f525073cd |
class GaleraCommonGuestAgentAPI(guest_api.API): <NEW_LINE> <INDENT> def install_cluster(self, replication_user, cluster_configuration, bootstrap): <NEW_LINE> <INDENT> LOG.debug("Installing Galera cluster.") <NEW_LINE> version = guest_api.API.API_BASE_VERSION <NEW_LINE> self._call("install_cluster", CONF.cluster_usage_t... | Cluster Specific Datastore Guest API
**** VERSION CONTROLLED API ****
The methods in this class are subject to version control as
coordinated by guestagent/api.py. Whenever a change is made to
any API method in this class, add a version number and comment
to the top of guestagent/api.py and use the version number as... | 62598edecc0a2c111447958f |
class NetworkManager(DesignatedWrapPolicy): <NEW_LINE> <INDENT> _com_interfaces_ = [IID_ISesNetwork] <NEW_LINE> _public_methods_ = ['ConnectionMade', 'ConnectionMadeNoQOCInfo', 'ConnectionLost'] <NEW_LINE> _reg_clsid_ = '{41B032DA-86B5-4907-A7F7-958E59333010}' <NEW_LINE> _reg_progid_ = "UbuntuOne.NetworkManager" <NEW_L... | Implement ISesNetwork to know about the network status. | 62598ede8da39b475be01737 |
@DATASET_REGISTRY.register() <NEW_LINE> class Hazy_DukeMTMC(ImagePairDataset): <NEW_LINE> <INDENT> dataset_dir = 'DukeMTMC-reID' <NEW_LINE> dataset_url = 'http://vision.cs.duke.edu/DukeMTMC/data/misc/DukeMTMC-reID.zip' <NEW_LINE> dataset_name = "dukemtmc" <NEW_LINE> def __init__(self, root='datasets', **kwargs): <NEW_L... | DukeMTMC-reID.
Reference:
- Ristani et al. Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking. ECCVW 2016.
- Zheng et al. Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro. ICCV 2017.
URL: `<https://github.com/layumi/DukeMTMC-reID_evaluation>`_
... | 62598ede6fb2d068a76930e8 |
class Trajectories(dict): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super(Trajectories, self).__init__(data or {}) <NEW_LINE> <DEDENT> def _repr_html_(self): <NEW_LINE> <INDENT> return Utils.render_html('trajectory.html', trajectories=self) | A class that represents a multiples trajectories in WLTS.
.. note::
For more information about trajectory definition, please, refer to
`WLTS specification <https://github.com/brazil-data-cube/wlts-spec>`_. | 62598ede8e7ae83300ee761d |
class Student12APIViewSet(ModelViewSet): <NEW_LINE> <INDENT> serializer_class = StudentModelSerializer <NEW_LINE> queryset = Student.objects.all() <NEW_LINE> @action(methods=['get'], detail=True) <NEW_LINE> def login(self, request, pk): <NEW_LINE> <INDENT> raise DataError("数据库错误") <NEW_LINE> return Response("测试数据login"... | list:
返回所有学生信息
create:
新建学生信息 | 62598edee5267d203ee69e90 |
class AppleAccountPluginTest(test_lib.PlistPluginTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._plugin = appleaccount.AppleAccountPlugin() <NEW_LINE> self._parser = plist.PlistParser() <NEW_LINE> <DEDENT> def testProcess(self): <NEW_LINE> <INDENT> plist_file = ( u'com.apple.coreservices.apple... | Tests for the Apple account plist plugin. | 62598edee1aae11d1e7cdb05 |
class ConnectivityHop(Model): <NEW_LINE> <INDENT> _validation = { 'type': {'readonly': True}, 'id': {'readonly': True}, 'address': {'readonly': True}, 'resource_id': {'readonly': True}, 'next_hop_ids': {'readonly': True}, 'issues': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'type': {'key': 'type', 'type': 'str... | Information about a hop between the source and the destination.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar type: The type of the hop.
:vartype type: str
:ivar id: The ID of the hop.
:vartype id: str
:ivar address: The IP address of the hop.
:vartype address: str
:iva... | 62598edec432627299fa1543 |
class Case(object): <NEW_LINE> <INDENT> def __init__(self,graines): <NEW_LINE> <INDENT> self.graines=graines <NEW_LINE> <DEDENT> def clone(self): <NEW_LINE> <INDENT> c=Case(self.graines) <NEW_LINE> return c | 62598ede91f36d47f223016b | |
class TestTeacherObject(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 testTeacherObject(self): <NEW_LINE> <INDENT> pass | TeacherObject unit test stubs | 62598ede92d797404e387e42 |
class Config: <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.logger = logging.getLogger(__name__) <NEW_LINE> self.bot = bot | A cog defining commands for configuring the bot
| 62598ede7d847024c075a95d |
class AVGTicketPriceByCarrier(models.Model): <NEW_LINE> <INDENT> quote_dateTime = models.DateTimeField(blank=False, null=False) <NEW_LINE> place_id_origin = models.ForeignKey(Place, on_delete=models.CASCADE, related_name='%(class)s_place_id_origin') <NEW_LINE> place_id_dest = models.ForeignKey(Place, on_delete=models.C... | Provides Average prices of all by carrier | 62598ede56ac1b37e630077b |
class EnvironmentMockGroup(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.patches = { 'popen': mock.patch('subprocess.Popen'), 'process': mock.Mock(), 'api': mock.patch('slumber.Resource'), 'api_versions': mock.patch( 'readthedocs.projects.models.Project.api_versions'), 'non_blocking_lock': m... | Mock out necessary environment pieces | 62598ede435de62698e9a364 |
class BulkEditMixin(object): <NEW_LINE> <INDENT> action_param = 'action' <NEW_LINE> actions = None <NEW_LINE> current_view = None <NEW_LINE> checkbox_object_name = None <NEW_LINE> def get_checkbox_object_name(self): <NEW_LINE> <INDENT> if self.checkbox_object_name: <NEW_LINE> <INDENT> return self.checkbox_object_name <... | Mixin for views that have a bulk editing facility. This is normally in the
form of tabular data where each row has a checkbox. The UI allows a number
of rows to be selected and then some 'action' to be performed on them. | 62598edeb7558d5895461bd9 |
class DecisionTree(object): <NEW_LINE> <INDENT> def __init__(self, min_samples_split=2, max_depth=10, feature_is=None): <NEW_LINE> <INDENT> self.min_samples_split = min_samples_split <NEW_LINE> self.max_depth = max_depth <NEW_LINE> self._compute_leaf_value = None <NEW_LINE> self._compute_node_impurity=None <NEW_LINE> s... | 决策树 base
| 62598ede3cc13d1c6d463cf9 |
class ReviewInLine(admin.TabularInline): <NEW_LINE> <INDENT> model = Review <NEW_LINE> extra = 0 <NEW_LINE> readonly_fields = ("name", "email") | Отзывы на странице товара | 62598eded268445f26638e55 |
class CardinalityRule(Rule): <NEW_LINE> <INDENT> def __init__(self,head,body,card): <NEW_LINE> <INDENT> self.r=Rule(head,body) <NEW_LINE> self.head=self.r.getHead() <NEW_LINE> self.body=self.r.getBody() <NEW_LINE> self.card=card <NEW_LINE> <DEDENT> def encode(self): <NEW_LINE> <INDENT> r="" <NEW_LINE> if self.getHead()... | Suposo que no es la millor manera de fer herencia
no en se mes
TODO: Revisa aixo analfabet! | 62598edea79ad161977685ab |
class SocketWriteable(object): <NEW_LINE> <INDENT> def __init__(self, sock): <NEW_LINE> <INDENT> self.sock = sock | A socket is writeable. | 62598ede97e22403b383947f |
class TestSetAnd(TestSet): <NEW_LINE> <INDENT> def __init__(self, ts1, ts2): <NEW_LINE> <INDENT> super(TestSetAnd, self).__init__() <NEW_LINE> assert isinstance(ts1, TestSet) <NEW_LINE> assert isinstance(ts2, TestSet) <NEW_LINE> self._ts1 = ts1 <NEW_LINE> self._ts2 = ts2 <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LIN... | Logic form : TestSet1 & TestSet2
Lazy evaluation: if TestSet1 fail, TestSet2 is not launched | 62598ede56b00c62f0fb0e5f |
class GameView(QGroupBox): <NEW_LINE> <INDENT> def __init__(self, texas_model, players): <NEW_LINE> <INDENT> super().__init__("main window") <NEW_LINE> self.model = texas_model <NEW_LINE> vbox = QVBoxLayout() <NEW_LINE> hbox_lower = QHBoxLayout() <NEW_LINE> hbox_upper = QHBoxLayout() <NEW_LINE> hbox_lower.addWidget(Inp... | A class representing the main window. It contains functions for displaying pop-up
messages alerting the user. | 62598edebe383301e0251d66 |
class DeploymentmanagerTypeProvidersListRequest(_messages.Message): <NEW_LINE> <INDENT> filter = _messages.StringField(1) <NEW_LINE> maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32, default=500) <NEW_LINE> orderBy = _messages.StringField(3) <NEW_LINE> pageToken = _messages.StringField(4) <NEW_LI... | A DeploymentmanagerTypeProvidersListRequest object.
Fields:
filter: A filter expression that filters resources listed in the response.
The expression must specify the field name, a comparison operator, and
the value that you want to use for filtering. The value must be a
string, a number, or a boolean. T... | 62598ede7d847024c075a95e |
class Window(Enum): <NEW_LINE> <INDENT> this_month = (0, 'm', _("This month")) <NEW_LINE> last_30_days = (30, 'd', _("Last 30 days")) <NEW_LINE> last_60_days = (60, 'd', _("Last 60 days")) <NEW_LINE> last_90_days = (90, 'd', _("Last 90 days")) <NEW_LINE> def __init__(self, ordinal, unit, label): <NEW_LINE> <INDENT> sel... | Data window | 62598ede30bbd722464681c7 |
class Stat(object): <NEW_LINE> <INDENT> def __init__(self, name, value='', logger = None): <NEW_LINE> <INDENT> self.__name = name <NEW_LINE> self.__default = value <NEW_LINE> self._logger = logger <NEW_LINE> self._aggregators = {} <NEW_LINE> <DEDENT> def getName(self): <NEW_LINE> <INDENT> return self.__name <NEW_LINE> ... | Basic stat value class. | 62598ede8da39b475be01739 |
class KullbackLeiblerCrossEntropyConvexConj(Functional): <NEW_LINE> <INDENT> def __init__(self, space, prior=None): <NEW_LINE> <INDENT> super().__init__(space=space, linear=False, grad_lipschitz=np.nan) <NEW_LINE> if prior is not None and prior not in self.domain: <NEW_LINE> <INDENT> raise ValueError('`prior` not in `d... | The convex conjugate of Kullback-Leibler Cross Entorpy functional.
Notes
-----
The functional :math:`F^*` with prior :math:`g>0` is given by
.. math::
F^*(x) = \sum_i g_i \left(e^{x_i} - 1\right)
See Also
--------
KullbackLeiblerCrossEntropy : convex conjugate functional | 62598ede656771135c487c1f |
class EquidistantTensorProductElementGroup(LegendreTensorProductElementGroup): <NEW_LINE> <INDENT> def __init__(self, mesh_el_group, order, index=None): <NEW_LINE> <INDENT> from modepy.nodes import equidistant_nodes <NEW_LINE> unit_nodes_1d = equidistant_nodes(1, order)[0] <NEW_LINE> unit_nodes = mp.tensor_product_node... | Elemental discretization supplying a high-order quadrature rule
with a number of nodes matching the number of polynomials in the tensor
product basis, hence usable for differentiation and interpolation.
Nodes sufficient for unisolvency are present on the boundary of the hypercube.
Uses :func:`~modepy.equidistant_nodes... | 62598edeb5575c28eb711f98 |
class Schema: <NEW_LINE> <INDENT> def __init__(self,var_attrs): <NEW_LINE> <INDENT> self.__dict__["_var_attrs"] = var_attrs <NEW_LINE> <DEDENT> def __setattr__(self, attr, value): <NEW_LINE> <INDENT> if attr in self._var_attrs: <NEW_LINE> <INDENT> object.__setattr__(self, attr, value) <NEW_LINE> <DEDENT> else: <NEW_LIN... | Schema objects restrict how Engine users may create or modify
attributes. Standard assignment (``x.y = z``) syntax thus only works for
those attributes listed in the ``_var_attrs`` whitelist.
==================== ======================================================
Attribute Description
=============... | 62598ededd821e528d6d74d6 |
class Movie(): <NEW_LINE> <INDENT> def __init__(self, title, storyline, poster_image, trailer_youtube, year, director, IMDB_rating, stars=[]): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.storyline = storyline <NEW_LINE> self.poster_image_url = poster_image <NEW_LINE> self.trailer_youtube_url = trailer_youtub... | This class contains data about movies, which will be shown at the webpage
Attributes:
title (str): Title of the movie
storyline (str): Storyline of the movie
poster_image (str): Link to the poster image
trailer_youtube (str): Link to the trailer on the Youtube
year (int): Year, the movie was releas... | 62598ede462c4b4f79db9f89 |
class SaltLoadModules(ioflo.base.deeding.Deed): <NEW_LINE> <INDENT> Ioinits = {'opts': '.salt.opts', 'grains': '.salt.grains', 'modules': '.salt.loader.modules', 'grain_time': '.salt.var.grain_time', 'module_refresh': '.salt.var.module_refresh', 'returners': '.salt.loader.returners'} <NEW_LINE> def _prepare(self): <NEW... | Reload the minion modules
FloScript:
do salt load modules at enter | 62598ede4a966d76dd5ed473 |
class SimpleID3Change(ID3Change): <NEW_LINE> <INDENT> def __init__(self, field: str, transformer: object, needs_change=None): <NEW_LINE> <INDENT> super().__init__(field) <NEW_LINE> self.transformer = transformer <NEW_LINE> if needs_change: <NEW_LINE> <INDENT> self.needs_change = needs_change <NEW_LINE> <DEDENT> <DEDENT... | This handles changes for most id3 tags use cases. | 62598ede3eb6a72ae0388bd0 |
class AzureAsyncOperationResult(Model): <NEW_LINE> <INDENT> _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'error': {'key': 'error', 'type': 'Error'}, } <NEW_LINE> def __init__(self, status=None, error=None): <NEW_LINE> <INDENT> super(AzureAsyncOperationResult, self).__init__() <NEW_LINE> self.status = ... | The response body contains the status of the specified asynchronous
operation, indicating whether it has succeeded, is in progress, or has
failed. Note that this status is distinct from the HTTP status code
returned for the Get Operation Status operation itself. If the asynchronous
operation succeeded, the response bod... | 62598ede99fddb7c1ca620ce |
class Clear: <NEW_LINE> <INDENT> def __init__(self, code_box): <NEW_LINE> <INDENT> self.code_box = code_box <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'actions.Clear()' <NEW_LINE> <DEDENT> def steps(self): <NEW_LINE> <INDENT> return [steplib.Clear(self.code_box), ] | Clears the contents of a :class:`purdy.ui.CodeBox`.
:param code_box: the :class:`purdy.ui.CodeBox` instance where the code is
to be replaced | 62598ede498bea3a75a560c6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.