code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class UserActivationToken( OktaObject ): <NEW_LINE> <INDENT> def __init__(self, config=None): <NEW_LINE> <INDENT> super().__init__(config) <NEW_LINE> if config: <NEW_LINE> <INDENT> self.activation_token = config["activationToken"] if "activationToken" in config else None <NEW_LINE> self.activation_url = ... | A class for UserActivationToken objects. | 62598edda79ad1619776859c |
class ListMemberAppsResult(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_linked_api_apps_value', '_linked_api_apps_present', ] <NEW_LINE> _has_required_fields = True <NEW_LINE> def __init__(self, linked_api_apps=None): <NEW_LINE> <INDENT> self._linked_api_apps_value = None <NEW_LINE> self._linked_api_apps_present = F... | :ivar linked_api_apps: List of third party applications linked by this team
member. | 62598edd498bea3a75a560b7 |
class DBStorage: <NEW_LINE> <INDENT> __engine = None <NEW_LINE> __session = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.__engine = create_engine("mysql+mysqldb://{}:{}@{}/{}".format( getenv("HBNB_MYSQL_USER"), getenv("HBNB_MYSQL_PWD"), getenv("HBNB_MYSQL_HOST"), getenv("HBNB_MYSQL_DB")), pool_pre_ping=... | [DBStorage class]
| 62598edda17c0f6771d5a7dc |
class InputFileRemote(Object): <NEW_LINE> <INDENT> ID = "inputFileRemote" <NEW_LINE> def __init__(self, id, **kwargs): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "InputFileRemote": <NEW_LINE> <INDENT> id = q.get('id') <NEW_LINE> return InputFileRemote(id) | A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the correspondin... | 62598edd32920d7e50bc45ae |
class Stub(BaseSensor): <NEW_LINE> <INDENT> name = 'Stub sensor' <NEW_LINE> def _read_data(self, config) -> str: <NEW_LINE> <INDENT> sleep(0.2) <NEW_LINE> data = { "temp": f'{uniform(20.0, 28.9):.1f}', "humid": f'{uniform(30.0, 39.9):.1f}', } <NEW_LINE> return dumps(data) <NEW_LINE> <DEDENT> def get_protocol(self) -> s... | Just a stub class to generate random data, and do tests on systems that do not have GPIO ports. | 62598edd3c8af77a43b671f2 |
class UnsupportedRsyncArgsError(Exception): <NEW_LINE> <INDENT> pass | Unsupported rsync arguments where used. | 62598edd097d151d1a2bf59f |
class SaveDefaultConfigOp(ActionBase): <NEW_LINE> <INDENT> action_name = 'xmnr save-default-config' <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> super(SaveDefaultConfigOp, self).__init__(*args) <NEW_LINE> self.filter = DevcliLogMatch() <NEW_LINE> <DEDENT> def cli_filter(self, msg): <NEW_LINE> <INDENT> repo... | Action handler used to save/create default device configuration
by saving running configuration to the filesystem of the device. | 62598eddd7e4931a7ef3a61d |
class RDicekriging(RPackage): <NEW_LINE> <INDENT> homepage = "http://dice.emse.fr/" <NEW_LINE> url = "https://cloud.r-project.org/src/contrib/DiceKriging_1.5.5.tar.gz" <NEW_LINE> list_url = "https://cloud.r-project.org/src/contrib/Archive/DiceKriging" <NEW_LINE> version('1.5.8', sha256='11d02b894cb509dbb8887ae27b6... | Kriging Methods for Computer Experiments
Estimation, validation and prediction of kriging models. Important
functions : km, print.km, plot.km, predict.km. | 62598eddd58c6744b42db577 |
class MonitoringSite(MonitoringObjectGeom): <NEW_LINE> <INDENT> def preprocess_data(self, data): <NEW_LINE> <INDENT> module_ids = [module.id_module for module in self._model.modules] <NEW_LINE> id_module = int(data['id_module']) <NEW_LINE> if id_module not in module_ids: <NEW_LINE> <INDENT> module_ids.append(id_module)... | PATCH
pour pouvoir renseigner la table cor_site_module
avec la méthode from_dict | 62598edd460517430c430a0a |
class CarInterface(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def step(self, action: np.ndarray): <NEW_LINE> <INDENT> raise NotImplementedError() | Base class of car interface | 62598edd925a0f43d25e65af |
class _Dummy(object): <NEW_LINE> <INDENT> def __init__(self, name='Dummy', **kwargs): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.__dict__.update(kwargs) <NEW_LINE> <DEDENT> def __eq__(self, right): <NEW_LINE> <INDENT> self_parent_keys = sorted(list(self.__dict__.keys())) <NEW_LINE> right_parent_keys = sorted(... | Empty class for constructing empty objects monitor, guide, and detector
| 62598eddfff4ab517ebcbd65 |
class TagDetailView(ListView): <NEW_LINE> <INDENT> def tag(self, **kwargs): <NEW_LINE> <INDENT> return get_object_or_404(Tag, slug=self.kwargs['slug']) <NEW_LINE> <DEDENT> def get_queryset(self, **kwargs): <NEW_LINE> <INDENT> return Item.objects.published().filter(tags=self.tag) <NEW_LINE> <DEDENT> def get_template_nam... | Display all items with a given tag. | 62598eddadb09d7d5dc08b48 |
class TibitLldpDestAddress(Packet): <NEW_LINE> <INDENT> name = "LLDP Dest Address" <NEW_LINE> fields_desc = [ByteEnumField("branch", 0xB7, OamBranchEnum), XShortField("leaf", 0x010B), ] | Variable Descriptor: LLDP Destination MAC Address | 62598edd1f037a2d8b9e2687 |
class Node: <NEW_LINE> <INDENT> def __init__(self, interval=None, max=None): <NEW_LINE> <INDENT> self.lb = interval[0] <NEW_LINE> self.hb = interval[1] <NEW_LINE> self.max = interval[1] <NEW_LINE> self.left = None <NEW_LINE> self.right = None | Class to represent a node of the tree and store its contents | 62598edd55399d3f05624ab0 |
class Itoi(db.Model, BaseMixin): <NEW_LINE> <INDENT> extend_existing = True <NEW_LINE> __table_args__ = (db.CheckConstraint("incident_id < related_incident_id"),) <NEW_LINE> incident_id = db.Column(db.Integer, db.ForeignKey("incident.id"), primary_key=True) <NEW_LINE> related_incident_id = db.Column( db.Integer, db.For... | Incident to incident relation model | 62598edd30bbd722464681b9 |
class ZIPParserError(ParserError): <NEW_LINE> <INDENT> pass | Ошибка работы парсера zip файлов. | 62598edd6aa9bd52df0d342f |
class SEQUENCER_OT_ReverseSelectedMovies(Operator): <NEW_LINE> <INDENT> bl_idname = "sequencer.reverse_selected_movies" <NEW_LINE> bl_label = "Reverse Movies" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return (context.scene and context.sce... | Reverse all selected movie sources | 62598edd2c8b7c6e89bd1d42 |
class Pages(object): <NEW_LINE> <INDENT> def __init__(self, query, page, size): <NEW_LINE> <INDENT> self._query = deepcopy(query) <NEW_LINE> self._page = page <NEW_LINE> self._size = size <NEW_LINE> self._content_cache = [] <NEW_LINE> self._total = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def element_offset(self):... | pages iterator | 62598edd63d6d428bbee0d53 |
class Map(object): <NEW_LINE> <INDENT> def __init__(self, cry, parsed_map, height, width, map_group_id, map_id, config=config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.cry = cry <NEW_LINE> self.threat_zones = set() <NEW_LINE> self.obstacles = set() <NEW_LINE> self.parsed_map = parsed_map <NEW_LINE> sel... | The ``Map`` class provides an interface for reading the currently loaded
map. | 62598edd30bbd722464681ba |
class HomeView(ListView): <NEW_LINE> <INDENT> model = models.Room <NEW_LINE> paginate_by = 12 <NEW_LINE> ordering = "created" <NEW_LINE> paginate_orphans = 5 <NEW_LINE> context_object_name = "rooms" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LI... | HomeView Class Definition | 62598eddcb5e8a47e493b43a |
class Solution: <NEW_LINE> <INDENT> def findMaxConsecutiveOnes(self, nums): <NEW_LINE> <INDENT> res = [] <NEW_LINE> for i in range(len(nums)): <NEW_LINE> <INDENT> if nums[i] == 0: <NEW_LINE> <INDENT> res.append(self.dfs(nums, i, 0)) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> res.append(0) <NEW_LINE> <DEDENT> <DEDENT... | @param nums: a list of integer
@return: return a integer, denote the maximum number of consecutive 1s | 62598edd91f36d47f2230165 |
class TestXMLContextTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.doc = Document() <NEW_LINE> self.root = builder.TestXMLContext(self.doc) <NEW_LINE> <DEDENT> def test_current_element_tag_name(self): <NEW_LINE> <INDENT> self.root.begin('tag', 'context-name') <NEW_LINE> self.asse... | TestXMLContext test cases.
| 62598edd23849d37ff84f63c |
class PatchSkyMapTask(PipelineTask): <NEW_LINE> <INDENT> ConfigClass = PatchSkyMapTaskConfig <NEW_LINE> _DefaultName = 'patchSkyMapTask' <NEW_LINE> def run(self, coadd, inputCatalog): <NEW_LINE> <INDENT> _LOG.info("executing %s: coadd=%s inputCatalog=%s", self.getName(), coadd, type(inputCatalog)) <NEW_LINE> data = inp... | Simple example PipelineTask.
| 62598edd498bea3a75a560b8 |
class NeighborhoodsModel(models.Model): <NEW_LINE> <INDENT> name = models.CharField(_('Name'),max_length=200) <NEW_LINE> county = models.ForeignKey(CountysModel, verbose_name=_('County'), on_delete=models.CASCADE) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = _('Neighborhood') <NEW_LINE> verbose_name_plural... | NeighborhoodsModel table model.
- brazilian neighborhoods. | 62598edd56ac1b37e630076f |
class VariableScope(object): <NEW_LINE> <INDENT> def __init__(self, *maps): <NEW_LINE> <INDENT> self.maps = [dict()] + list(maps) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<VariableScope(%s)>" % (', '.join(repr(map) for map in self.maps),) <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_L... | Implements Sass variable scoping.
Similar to `ChainMap`, except that assigning a new value will replace an
existing value, not mask it. | 62598edd7d847024c075a951 |
class EC2SecurityGroupEgress(ModelElement): <NEW_LINE> <INDENT> def __init__(self, cfn_model, debug=False): <NEW_LINE> <INDENT> self.debug = debug <NEW_LINE> if self.debug: <NEW_LINE> <INDENT> print('EC2SecurityGroupEgress __init__') <NEW_LINE> <DEDENT> ModelElement.__init__(self, cfn_model) <NEW_LINE> self.resource_ty... | Ec2 security group egress model | 62598edd4e4d56256637099b |
class PCA: <NEW_LINE> <INDENT> def __init__(self, k: int): <NEW_LINE> <INDENT> self.k = int(k) <NEW_LINE> <DEDENT> def fit(self, data: RDD["VectorLike"]) -> PCAModel: <NEW_LINE> <INDENT> jmodel = callMLlibFunc("fitPCA", self.k, data) <NEW_LINE> return PCAModel(jmodel) | A feature transformer that projects vectors to a low-dimensional space using PCA.
.. versionadded:: 1.5.0
Examples
--------
>>> data = [Vectors.sparse(5, [(1, 1.0), (3, 7.0)]),
... Vectors.dense([2.0, 0.0, 3.0, 4.0, 5.0]),
... Vectors.dense([4.0, 0.0, 0.0, 6.0, 7.0])]
>>> model = PCA(2).fit(sc.parallelize(dat... | 62598edd67a9b606de544550 |
class Mesh(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.points = 0 <NEW_LINE> self.commands = [] <NEW_LINE> self._command = '#/usr/bin/python' <NEW_LINE> self._command = 'import rhom' <NEW_LINE> self._command = 'mesh = rhom.Mesh()' <NEW_LINE> <DEDENT> @property <NEW_LINE> def _command(self)... | A stub class implementing the interface provided by rhom.mesh.Mesh | 62598edde64d504609df8681 |
class IEcoregion(Interface): <NEW_LINE> <INDENT> pass | marker
| 62598eddf7d966606f746572 |
class DeleteCommentHandler(Handler): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> comment_id = self.request.get('comment_id') <NEW_LINE> comment = Comment.get_by_id(int(comment_id)) <NEW_LINE> if self.authenticated(): <NEW_LINE> <INDENT> if comment.commenter.username == self.user.username: <NEW_LINE> <INDENT... | Handles the request when a user deletes a comment on a post | 62598edd67a9b606de544551 |
class _Run(Subshape): <NEW_LINE> <INDENT> def __init__(self, r, parent): <NEW_LINE> <INDENT> super(_Run, self).__init__(parent) <NEW_LINE> self._r = r <NEW_LINE> <DEDENT> @property <NEW_LINE> def font(self): <NEW_LINE> <INDENT> rPr = self._r.get_or_add_rPr() <NEW_LINE> return Font(rPr) <NEW_LINE> <DEDENT> @lazyproperty... | Text run object. Corresponds to ``<a:r>`` child element in a paragraph. | 62598edde5267d203ee69e85 |
class NormalWithSoftplusSigma(Normal): <NEW_LINE> <INDENT> def __init__(self, mu, sigma, validate_args=False, allow_nan_stats=True, name="NormalWithSoftplusSigma"): <NEW_LINE> <INDENT> with ops.name_scope(name, values=[mu, sigma]) as ns: <NEW_LINE> <INDENT> super(NormalWithSoftplusSigma, self).__init__( mu=mu, sigma=nn... | Normal with softplus applied to `sigma`. | 62598edd4527f215b58e8487 |
class status_5xx(RetryPredicate): <NEW_LINE> <INDENT> def should_retry_after_response(self, response): <NEW_LINE> <INDENT> return 500 <= response.status_code < 600 | Retry after receiving a 5xx (server error) response. | 62598eddd268445f26638e4f |
class AddLabelAction(ViewerAction): <NEW_LINE> <INDENT> name = 'Add Label' <NEW_LINE> accelerator = 'Alt+L' <NEW_LINE> enabled_name = 'has_origin' <NEW_LINE> def get_ranges(self, editor, segment, event): <NEW_LINE> <INDENT> if editor.can_copy: <NEW_LINE> <INDENT> ranges = segment.get_style_ranges(selected=True) <NEW_LI... | Add a label to a byte location.
Like `Add Comment`_, a label is associated with a single byte, so although
a range can be selected, the comment is applied to only the first byte in
the range.
Unlike comments, labels are *not* highlighted and are only shown in the
disassembly window. | 62598edd24f1403a92684b65 |
class SUNWSyminfoTableSection(Section): <NEW_LINE> <INDENT> def __init__(self, header, name, elffile, symboltable): <NEW_LINE> <INDENT> super(SUNWSyminfoTableSection, self).__init__(header, name, elffile) <NEW_LINE> self.symboltable = symboltable <NEW_LINE> <DEDENT> def num_symbols(self): <NEW_LINE> <INDENT> return sel... | ELF .SUNW Syminfo table section.
Has an associated SymbolTableSection that's passed in the constructor. | 62598edd498bea3a75a560b9 |
class Writer(object): <NEW_LINE> <INDENT> __metaclass__ = util.ABCMeta <NEW_LINE> @util.abstractmethod <NEW_LINE> def WriteMetadata(self, metadata, overwrite=True): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> @util.abstractmethod <NEW_LINE> def WriteKey(self, key, version_number, encrypter=None): <NEW_LINE> <INDENT>... | Abstract class/interface providing supported methods for writing key sets. | 62598edd44b2445a339b5c27 |
class CourseDetail(generics.RetrieveAPIView): <NEW_LINE> <INDENT> queryset = Course.objects.all() <NEW_LINE> serializer_class = CourseSerializer | Retrieve information on a specific course. Course identifier is MD5 hash of
course URL. It's not optimal, but I haven't found anything better. This means
that as courses get moved around it will change.
In python you can generate it by running:
import hashlib
link_url = 'http://ocw.uci.edu/lectures/lecture.a... | 62598edd66673b3332c2e929 |
class DenseNet(nn.Module): <NEW_LINE> <INDENT> def __init__( self, growth_rate=32, block_config=(6, 12, 24, 16), num_init_features=64, bn_size=4, drop_rate=0, num_classes=1000, ): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.features = nn.Sequential( OrderedDict( [ ( "conv0", nn.Conv2d( 3, num_init_features, ... | Densenet-BC model class, based on
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_
Args:
growth_rate (int) - how many filters to add each layer (`k` in paper)
block_config (list of 4 ints) - how many layers in each pooling block
num_init_features (int) - the number of fi... | 62598edd0a50d4780f70392b |
class Rectify(object): <NEW_LINE> <INDENT> def __call__(self, X_before_activation): <NEW_LINE> <INDENT> return X_before_activation * (X_before_activation > 0) | .. todo::
WRITEME | 62598eddd53ae8145f916a0e |
class Joueur: <NEW_LINE> <INDENT> pass | Gère un joueur. | 62598edd009cb60464cffad2 |
class ContainerSpec(BaseModel): <NEW_LINE> <INDENT> image: str <NEW_LINE> commands: Optional[Sequence[ValidCommandArgs]] = None <NEW_LINE> arguments: Optional[Sequence[ValidCommandArgs]] = None <NEW_LINE> env: Optional[Mapping[str, ValidCommandArgs]] = None <NEW_LINE> resources: Optional[ResourceSpec] = None <NEW_LINE>... | Container implementation definition.
Attributes:
image: The container image.
commands: Optional; the container entrypoint.
arguments: Optional; the arguments to the container entrypoint.
env: Optional; the environment variables to be passed to the container.
resources: Optional; the specification o... | 62598edd3617ad0b5ee046b1 |
class Export(DefaultHandler): <NEW_LINE> <INDENT> def data_received(self, chunk): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> self.post() <NEW_LINE> <DEDENT> def post(self): <NEW_LINE> <INDENT> wid = self.get_arg("wid") <NEW_LINE> current = self.get_arg("current") <NEW_LINE> name = s... | export dir | 62598edd6fb2d068a76930e3 |
class InjectionResponseParser(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def parse(response: str, response_code: int): <NEW_LINE> <INDENT> injection_response = get_injection_response_dto(response) <NEW_LINE> result_enum = determine_send_result(injection_response, response_code) <NEW_LINE> new_response = Send... | Used by the HttpClient to convert the response form the Injection API. | 62598edd097d151d1a2bf5a2 |
class Category(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100, verbose_name='名称') <NEW_LINE> child = models.ForeignKey('self', default=None, blank=True, null=True, verbose_name='下级分类') <NEW_LINE> rank = models.IntegerField(default=0, verbose_name='排序') <NEW_LINE> status = models.IntegerField(... | bolg的分类 | 62598edda8370b77170ee972 |
class State: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.gs = {} <NEW_LINE> <DEDENT> def getState(self, key=None): <NEW_LINE> <INDENT> if key: <NEW_LINE> <INDENT> return self.gs[key] <NEW_LINE> <DEDENT> return self.gs <NEW_LINE> <DEDENT> def updateState(self, key, val): <NEW_LINE> <INDENT> self.gs[... | A State holds a current game state and all of its attributes | 62598edd3317a56b869bd82a |
class NotFoundError(AwairError): <NEW_LINE> <INDENT> message = "The Awair API returned an unexpected HTTP 404." | The requested endpoint is gone. | 62598eddc432627299fa1539 |
class Alice: <NEW_LINE> <INDENT> def __init__(self, network: Network): <NEW_LINE> <INDENT> self.spend_key = Account() <NEW_LINE> self.view_key = Account() <NEW_LINE> self.network = network <NEW_LINE> <DEDENT> def set_peer(self, bob): <NEW_LINE> <INDENT> self.bob = bob <NEW_LINE> <DEDENT> def get_spendkey_point(self): <... | Alice is the sender | 62598edd91f36d47f2230166 |
class PolicyV1beta1RuntimeClassStrategyOptions(object): <NEW_LINE> <INDENT> openapi_types = { 'allowed_runtime_class_names': 'list[str]', 'default_runtime_class_name': 'str' } <NEW_LINE> attribute_map = { 'allowed_runtime_class_names': 'allowedRuntimeClassNames', 'default_runtime_class_name': 'defaultRuntimeClassName' ... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598edd23849d37ff84f63e |
class PythonConfig(collections.namedtuple('PythonConfig', [ 'name', 'build', 'run'])): <NEW_LINE> <INDENT> pass | Tuple of commands (named s.t. 'what it says on the tin' applies) | 62598edd498bea3a75a560ba |
class MeetingSeraingTestCase(MeetingCommunesTestCase, MeetingSeraingTestingHelpers): <NEW_LINE> <INDENT> layer = MS_TESTING_PROFILE_FUNCTIONAL <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> MeetingCommunesTestCase.setUp(self) <NEW_LINE> self.meetingConfig = getattr(self.tool, 'meeting-config-college') <NEW_LINE> self.... | Base class for defining MeetingSeraing test cases. | 62598edd45492302aabfaa37 |
class DebugFileAccessError(Exception): <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> super(DebugFileAccessError, self).__init__(msg) | An error occurred while accessing the debug log file | 62598edd21bff66bcd7211d6 |
@tf_export("data.TextLineDataset", v1=[]) <NEW_LINE> class TextLineDatasetV2(dataset_ops.DatasetSource): <NEW_LINE> <INDENT> def __init__(self, filenames, compression_type=None, buffer_size=None, num_parallel_reads=None): <NEW_LINE> <INDENT> filenames = _create_or_validate_filenames_dataset(filenames) <NEW_LINE> self._... | A `Dataset` comprising lines from one or more text files. | 62598edd4e4d56256637099d |
class AutoDocError(ValueError): <NEW_LINE> <INDENT> pass | Helper error Raised when the autodoc application failed.
Traps this very specific error and not other ValueErrors | 62598edd3d592f4c4edb9478 |
class TestLocationDirectOther(AttrCalcTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> AttrCalcTestCase.setUp(self) <NEW_LINE> self.tgtAttr = self.ch.attribute(attributeId=1) <NEW_LINE> srcAttr = self.ch.attribute(attributeId=2) <NEW_LINE> modifier = Modifier() <NEW_LINE> modifier.state = State.offli... | Test location.other for direct modifications | 62598edd91af0d3eaad3839d |
class Shared(OrganizingCollection): <NEW_LINE> <INDENT> def __init__(self, iworkflow): <NEW_LINE> <INDENT> super(Shared, self).__init__(iworkflow) <NEW_LINE> self._meta_data['allowed_lazy_attributes'] = [ Authz, Identified_Devices, Resolver, System ] | An organizing collection for shared resources. | 62598edd45492302aabfaa38 |
class OracleManage(object): <NEW_LINE> <INDENT> source_time = '' <NEW_LINE> oracle_user = '' <NEW_LINE> oracle_home = '' <NEW_LINE> handle_head = 'start /B sql' + 'plus / as sys' + 'dba' <NEW_LINE> logger_inst = None <NEW_LINE> def __init__(self, source_time, oracle_user, oracle_home): <NEW_LINE> <INDENT> self.source_t... | Class about oracle operations.
:method obtain_object: | 62598edd236d856c2adc86d5 |
class MultiProcessDatasetPredictor(DatasetPredictorBase): <NEW_LINE> <INDENT> def __init__(self, config, dataset, nr_proc, use_gpu=True, ordered=True): <NEW_LINE> <INDENT> if config.return_input: <NEW_LINE> <INDENT> logger.warn("Using the option `return_input` in MultiProcessDatasetPredictor might be slow") <NEW_LINE> ... | Run prediction in multiple processes, on either CPU or GPU.
Each process fetch datapoints as tasks and run predictions independently. | 62598edde64d504609df8682 |
class EnvBinarySuccessMixin(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def is_success(self): <NEW_LINE> <INDENT> pass | Adds binary success metric to environment. | 62598edd29b78933be269391 |
class JsonPushes(object): <NEW_LINE> <INDENT> def __init__(self, path='integration', branch='mozilla-inbound'): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.branch = branch <NEW_LINE> <DEDENT> def repo_url(self): <NEW_LINE> <INDENT> path = '' if not self.path else (self.path + '/') <NEW_LINE> return "https://hg... | Find pushlog json objects from a mozilla hg json-pushes api. | 62598edd3cc13d1c6d463cef |
class AlphaBetaAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> def merge_values(agent, state, remaining_depth, mode, a, b): <NEW_LINE> <INDENT> nextAgent = (agent + 1) % state.getNumAgents() <NEW_LINE> rem_depth = remaining_depth <NEW_LINE> if not nextAgent: <NEW_LI... | Your minimax agent with alpha-beta pruning (question 3) | 62598eddeab8aa0e5d30a2fb |
class Uri(object): <NEW_LINE> <INDENT> def get_route_name(self, prefix=route_sentinel, controller=route_sentinel, action=route_sentinel): <NEW_LINE> <INDENT> prefix = prefix if prefix != route_sentinel else self.route.prefix <NEW_LINE> controller = controller if controller != route_sentinel else self.route.controller <... | URI Utility class to help controllers and anything else
that deals with URIs | 62598edd498bea3a75a560bb |
class ICleanUserView(Interface): <NEW_LINE> <INDENT> pass | CleanUser view interface | 62598edda17c0f6771d5a7e0 |
class DominantSeventhSimultaneityPrevalence(featuresModule.FeatureExtractor): <NEW_LINE> <INDENT> id = 'CS7' <NEW_LINE> def __init__(self, dataOrStream=None, *arguments, **keywords): <NEW_LINE> <INDENT> super().__init__(dataOrStream=dataOrStream, *arguments, **keywords) <NEW_LINE> self.name = 'Dominant Seventh Simultan... | Percentage of all simultaneities that are dominant seventh.
>>> s = corpus.parse('bwv66.6')
>>> fe = features.native.DominantSeventhSimultaneityPrevalence(s)
>>> fe.extract().vector
[0.076...] | 62598edd3c8af77a43b671f4 |
class ZFSFileCreateEventFormatter(eventdata.EventFormatter): <NEW_LINE> <INDENT> DATA_TYPE = "fs:zfs:file:create" <NEW_LINE> FORMAT_STRING = u'Create: Pool: {pool_guid} TXG: {txg} Path: {fileobj}' <NEW_LINE> SOURCE_LONG = "ZFS File Create" <NEW_LINE> SOURCE_SHORT = 'ZFS' | Formatter for a ZFS File Create Event.
Can be strict as this will always have a TXG and Timestamp.
NOTE: File atributes in the object are the latest attributes, NOT those
at the time of this event. | 62598edd01c39578d7f1132c |
class FallbackToText(Exception): <NEW_LINE> <INDENT> pass | Used for failed conversion to float | 62598eddbe383301e0251d5c |
class User(Base): <NEW_LINE> <INDENT> __tablename__ = 'users' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(Text, nullable=False, unique=True) <NEW_LINE> email = Column(Text, unique=True) <NEW_LINE> role = Column(Text, nullable=False) <NEW_LINE> password_hash = Column(Text) <NEW_LINE> def s... | The SQLAlchemy declarative model class for a User object. | 62598edd4f6381625f19877f |
class ProfileSitemap(Sitemap): <NEW_LINE> <INDENT> limit = getattr(settings, 'SITEMAPS_ITEMS_PER_PAGE', 10000) <NEW_LINE> def items(self): <NEW_LINE> <INDENT> return User.objects.only('id', 'username').active() <NEW_LINE> <DEDENT> def location(self, obj): <NEW_LINE> <INDENT> return obj.get_absolute_url() | Sitemap des profils utilisateurs | 62598edd1b99ca400228e7cf |
class Source(LoggingBuildStep): <NEW_LINE> <INDENT> haltOnFailure = True <NEW_LINE> notReally = False <NEW_LINE> branch = None <NEW_LINE> def __init__(self, workdir=None, mode='update', alwaysUseLatest=False, timeout=20*60, retry=None, **kwargs): <NEW_LINE> <INDENT> LoggingBuildStep.__init__(self, **kwargs) <NEW_LINE> ... | This is a base class to generate a source tree in the buildslave.
Each version control system has a specialized subclass, and is expected
to override __init__ and implement computeSourceRevision() and
startVC(). The class as a whole builds up the self.args dictionary, then
starts a LoggedRemoteCommand with those argume... | 62598eddd58c6744b42db579 |
class _SCMToolIDProperty(object): <NEW_LINE> <INDENT> _scmtool_ids_by_class_names = {} <NEW_LINE> def __get__(self, owner_self, owner_cls): <NEW_LINE> <INDENT> if not _SCMToolIDProperty._scmtool_ids_by_class_names: <NEW_LINE> <INDENT> _SCMToolIDProperty._scmtool_ids_by_class_names = { '%s.%s' % (ep.module_name, ep.attr... | A property that automatically determines the ID for an SCMTool.
This is used for SCMTools that don't explicitly specify a
:py:attr:`SCMTool.scmtool_id` value. It will attempt to find a matching
Python EntryPoint for the class and use its registration key as the ID.
Version Added:
3.0.16 | 62598eddd53ae8145f916a10 |
class DateTimeItem(Item): <NEW_LINE> <INDENT> types = [openhab.types.DateTimeType] <NEW_LINE> def __gt__(self, other): <NEW_LINE> <INDENT> return self._state > other <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> return not self.__gt__(other) <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <IN... | DateTime item type | 62598eddb5575c28eb711f93 |
class MultiOptimizer(object): <NEW_LINE> <INDENT> def __init__(self, optimizers): <NEW_LINE> <INDENT> self.optimizers = optimizers <NEW_LINE> <DEDENT> def zero_grad(self): <NEW_LINE> <INDENT> [op.zero_grad() for op in self.optimizers] <NEW_LINE> <DEDENT> def step(self): <NEW_LINE> <INDENT> for op in self.optimizers: <N... | An optimizer that simply runs multiple internal
optimizers with different losses | 62598edd56ac1b37e6300772 |
class Ad(models.Model): <NEW_LINE> <INDENT> brand = models.ForeignKey( AdBrand, on_delete=models.SET_NULL, related_name="ads", blank=True, null=True, ) <NEW_LINE> size = models.ForeignKey( AdSize, on_delete=models.SET_NULL, related_name="ads", blank=True, null=True, help_text=_("Set null for popup ads"), ) <NEW_LINE> c... | The ad object | 62598edd0a50d4780f70392e |
class Runtime(Cronus, unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.desired = OpSystemState.OS <NEW_LINE> super(Runtime, cls).setUpClass() <NEW_LINE> <DEDENT> def test_query_chips(self): <NEW_LINE> <INDENT> command = "ecmdquery chips -dc" <NEW_LINE> try: <N... | Runtime Class performs tests with Host On
HostOff Class will turn the Host Off
--run testcases.testCronus.Runtime
--run testcases.testCronus.HostOff | 62598edd30bbd722464681be |
class Costumer: <NEW_LINE> <INDENT> def __init__(self, name='', phone='', email='', address={}): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.phone = phone <NEW_LINE> self.email = email <NEW_LINE> self.address = address <NEW_LINE> <DEDENT> def create_costumer(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> ... | This is the costumer class | 62598edd8e71fb1e983b9ff7 |
class ModelGraphTraverser(object): <NEW_LINE> <INDENT> classProvides(ITraverserFactory) <NEW_LINE> implements(ITraverser) <NEW_LINE> def __init__(self, root): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> <DEDENT> def __call__(self, environ): <NEW_LINE> <INDENT> if 'bfg.routes.matchdict' in environ: <NEW_LINE> <INDEN... | A model graph traverser that should be used (for convenience)
when no object in the graph supplies either a ``__name__`` or a
``__parent__`` attribute (ie. no object 'provides the ILocation
interface') . | 62598eddbe8e80087fbbd5d2 |
class SlugInputPlugin(FormFieldPlugin): <NEW_LINE> <INDENT> uid = UID <NEW_LINE> name = _("Slug") <NEW_LINE> group = _("Fields") <NEW_LINE> form = SlugInputForm <NEW_LINE> def get_form_field_instances(self): <NEW_LINE> <INDENT> widget_attrs = { 'class': theme.form_element_html_class, 'placeholder': self.data.placeholde... | Slug field plugin. | 62598edd45492302aabfaa39 |
class TestProjectAddDeleteNetwork: <NEW_LINE> <INDENT> pytestmark = pytest.mark.usefixtures(*(default_fixtures + ['additional_database'])) <NEW_LINE> def test_network_grant_project_access(self): <NEW_LINE> <INDENT> api.network_grant_project_access('manhattan', 'runway_pxe') <NEW_LINE> network = api._must_find(model.Net... | Tests for adding and deleting a network from a project | 62598edd4428ac0f6e656ade |
class simple_name(parser.simple_name): <NEW_LINE> <INDENT> def __init__(self, sString): <NEW_LINE> <INDENT> parser.simple_name.__init__(self, sString) | unique_id = component : simple_name | 62598edd435de62698e9a35c |
class Node(_messages.Message): <NEW_LINE> <INDENT> class StateValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> STATE_UNSPECIFIED = 0 <NEW_LINE> CREATING = 1 <NEW_LINE> READY = 2 <NEW_LINE> RESTARTING = 3 <NEW_LINE> REIMAGING = 4 <NEW_LINE> DELETING = 5 <NEW_LINE> REPAIRING = 6 <NEW_LINE> <DEDENT> acceleratorType = ... | An instance.
Enums:
StateValueValuesEnum: This contains a current state for the accelerator.
Output only.
Fields:
acceleratorType: The type of hardware accelerators associated with this
node.
cidrBlock: The user must supply a CIDR block that the TPU node will use
when selecting an IP address. This C... | 62598edd21bff66bcd7211d8 |
class InOrder(object): <NEW_LINE> <INDENT> def __init__(self, original_verification): <NEW_LINE> <INDENT> self.original_verification = original_verification <NEW_LINE> <DEDENT> def verify(self, wanted_invocation, count): <NEW_LINE> <INDENT> for invocation in reversed(wanted_invocation.mock.invocations): <NEW_LINE> <IND... | Verifies invocations in order.
Verifies if invocation was in expected order, and if yes -- degrades to original Verifier (AtLeast, Times, Between, ...). | 62598edd67a9b606de544554 |
class StringifyDateParamTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_str_input(self): <NEW_LINE> <INDENT> for inp in ( "2019-01-01", "2019-01-01T00:00:00", "2019-12-30T00:00:00", "2019-12-30T04:05:06", "2019-09-06T16:17:48", ): <NEW_LINE> <INDENT> if utils.PY3: <NEW_LINE> <INDENT> with self.subTest(inp=inp): <... | Test utils.stringify_date_param(). | 62598edd925a0f43d25e65b4 |
class SubRectifiedGrid(np.ndarray): <NEW_LINE> <INDENT> def __new__(cls, data, crs, gtransform, dtype=None, order=None): <NEW_LINE> <INDENT> obj = np.asanyarray(data, dtype, order).view(cls) <NEW_LINE> obj.crs = copyp.deepcopy(parse_projection(crs)) <NEW_LINE> obj.gtransform = copyp.deepcopy(gtransform) <NEW_LINE> retu... | Defines a base np.ndarray subclass, that stores rectified grid metadata.
| 62598edd4527f215b58e848b |
class TeamSettingsDaysOffPatch(Model): <NEW_LINE> <INDENT> _attribute_map = { 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} } <NEW_LINE> def __init__(self, days_off=None): <NEW_LINE> <INDENT> super(TeamSettingsDaysOffPatch, self).__init__() <NEW_LINE> self.days_off = days_off | TeamSettingsDaysOffPatch.
:param days_off:
:type days_off: list of :class:`DateRange <work.v4_0.models.DateRange>` | 62598eded268445f26638e51 |
class VerbalFluencyAdmin(BaseAdmin): <NEW_LINE> <INDENT> form = VerbalFluencyForm <NEW_LINE> fieldsets = ( (_(u'Patient'), { 'fields': ('patient', 'period'), 'description': { 'fieldset': '_patient', } }), (_('FAS'), { 'fields': (('fas_words'), ('fas_count'), ('fas_obs')), 'description' : { 'fieldset': '_1col_panel', } ... | Visual Analog Scale | 62598ede32920d7e50bc45b4 |
class RuleBase(object): <NEW_LINE> <INDENT> def __init__(self, domain="general"): <NEW_LINE> <INDENT> self.rules = {} <NEW_LINE> self.domain = domain <NEW_LINE> self.model = None <NEW_LINE> self.forest_base_roots = [] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> res = "There are " + str(self.rule_amount()... | to store rules, and load the trained word2vec model. | 62598ede9c8ee8231303f41b |
class MergeFang(MergeStats): <NEW_LINE> <INDENT> def computeStatistics(self, df, particleCol='particle'): <NEW_LINE> <INDENT> particleGroups = df.groupby(particleCol) <NEW_LINE> tempResultsX = particleGroups.apply(self._wAvg, 'x') <NEW_LINE> tempResultsY = particleGroups.apply(self._wAvg, 'y') <NEW_LINE> tempResultsZ =... | Merger for localizations computed from Fang's sCMOS MLE software.
| 62598ede2eb69b55b15a064c |
class AttributeExtension(object): <NEW_LINE> <INDENT> def append(self, state, value, initiator): <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> def remove(self, state, value, initiator): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def set(self, state, value, oldvalue, initiator): <NEW_LINE> <INDENT> return value | An event handler for individual attribute change events.
AttributeExtension is assembled within the descriptors associated
with a mapped class. | 62598edeac7a0e7691f70a9a |
class NextWordPart(ScintillaCmdKeyExecute): <NEW_LINE> <INDENT> key_bindings = {'default': 'C-/', 'emacs': None} <NEW_LINE> cmd = wx.stc.STC_CMD_WORDPARTRIGHT | Move the cursor to the next word part | 62598ede3539df3088eca839 |
class MultinomialLogitEstimator(ModelEstimator): <NEW_LINE> <INDENT> def __init__(self, x, y, c, initial_parameters, parameter_indices, fixed_parameters, variable_indices): <NEW_LINE> <INDENT> super(MultinomialLogitEstimator, self).__init__(x, y, c) <NEW_LINE> self.theta = np.random.randn(self.k, self.n) <NEW_LINE> sel... | Based on:
http://ufldl.stanford.edu/wiki/index.php/Softmax_Regression | 62598edebd1bec0571e1438f |
class SrvNameChangeMsg(SerializableMsg): <NEW_LINE> <INDENT> attrs = ['oldname', 'newname'] | broadcasted by the server to notify all the clients of a name change | 62598edecc0a2c1114479589 |
class MongoDbRestartCommand(CommandProperties): <NEW_LINE> <INDENT> _validation = { 'command_type': {'required': True}, 'errors': {'readonly': True}, 'state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'command_type': {'key': 'commandType', 'type': 'str'}, 'errors': {'key': 'errors', 'type': '[ODataError]'}, '... | Properties for the command that restarts a migration in whole or in part.
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.
:param command_type: Required. Command type.Constant filled by server.
:type command_t... | 62598ede56ac1b37e6300774 |
class StartInstanceForm(BaseSecureForm): <NEW_LINE> <INDENT> pass | CSRF-protected form to start an instance | 62598ede6fb2d068a76930e5 |
class Thing2(object): <NEW_LINE> <INDENT> letters = 'abc' | docstring for Thing2 | 62598ede3617ad0b5ee046b5 |
class MaterialBuilder(Action): <NEW_LINE> <INDENT> @asyncio.coroutine <NEW_LINE> def process(self, request): <NEW_LINE> <INDENT> material = request['body']['data'] <NEW_LINE> request['material'] = Material(json_source=material) | Query an SOS to retrieve observation data structured according to the
O&M specification. | 62598edee5267d203ee69e8a |
@collection( name='treatments-agent', properties={ 'title': 'Treatments-Agentbased', 'description': 'Listing Physical or Chemical Treatments', }) <NEW_LINE> class TreatmentAgent(Treatment): <NEW_LINE> <INDENT> item_type = 'treatment_agent' <NEW_LINE> schema = load_schema('encoded:schemas/treatment_agent.json') <NEW_LIN... | Subclass of treatment for physical/chemical treatments. | 62598ede76e4537e8c3edb49 |
class LocalScheduler(AbstractScheduler): <NEW_LINE> <INDENT> def submit(self, job_id, experiment_name, experiment_dir, database_address): <NEW_LINE> <INDENT> base_path = os.path.dirname(os.path.realpath(spearmint.__file__)) <NEW_LINE> cmd = ('export CUDA_VISIBLE_DEVICES=2; python %s/launcher.py --database-address %s --... | scheduler which submits jobs to the local machine via a shell command | 62598edee1aae11d1e7cdb02 |
class TestHlld(unittest.TestCase): <NEW_LINE> <INDENT> testID = None <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.client = HlldClient('localhost') <NEW_LINE> self.testID = "%d.%d" % (time.time(), random.randint(1000, 1000000)) <NEW_LINE> <DEDENT> def test_simple(self): <NEW_LINE> <INDENT> foobar = self.client.c... | TestCase class for pyhlld. | 62598ede7047854f4633d969 |
class EdgeSlide(bpy.types.Operator): <NEW_LINE> <INDENT> bl_label = "Edge Slide" <NEW_LINE> bl_idname = "emc.edgeslide" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> bpy.ops.object.mode_set(mode='EDIT') <NEW_LINE> bpy.ops.wm.tool_set_by_id(name="builtin.edge_slide") <NEW_LINE> return{'FINISHED'} | Enter Edit Mode With the Edge Slide Tool Enabled | 62598edefbf16365ca79262a |
class SecretsManager(object): <NEW_LINE> <INDENT> barbican_driver = driver.BarbicanDriver() <NEW_LINE> _url_re = re.compile(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|' '(?:%[0-9a-fA-F][0-9a-fA-F]))+') <NEW_LINE> @staticmethod <NEW_LINE> def requires_encryption(document): <NEW_LINE> <INDENT> clazz = document_wr... | Internal API resource for interacting with Barbican.
Currently only supports Barbican. | 62598ede8e71fb1e983b9ff9 |
class NewsletterConfig(object): <NEW_LINE> <INDENT> interface.implements(interfaces.INewsletterConfig) <NEW_LINE> component.adapts(interfaces.IPossibleNewsletter) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def __get_newsletter_activated(self): <NEW_LINE> <INDE... | An INewsletterConfig adapter for Archetypes content. | 62598ede7b25080760ed5a22 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.