code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class BufferingMixin: <NEW_LINE> <INDENT> _delayedWriteCall = None <NEW_LINE> data = None <NEW_LINE> DELAY = 0.0 <NEW_LINE> def schedule(self): <NEW_LINE> <INDENT> return reactor.callLater(self.DELAY, self.flush) <NEW_LINE> <DEDENT> def reschedule(self, token): <NEW_LINE> <INDENT> token.reset(self.DELAY) <NEW_LINE> <DE... | Mixin which adds write buffering.
| 62598f748da39b475be02a84 |
class Login(LowDataAdapter): <NEW_LINE> <INDENT> exposed = True <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Login, self).__init__(*args, **kwargs) <NEW_LINE> self.auth = salt.auth.LoadAuth(self.opts) <NEW_LINE> <DEDENT> def GET(self): <NEW_LINE> <INDENT> cherrypy.response.status = '401 Una... | All interactions with this REST API must be authenticated. Authentication
is performed through Salt's eauth system. You must set the eauth backend
and allowed users by editing the :conf_master:`external_auth` section in
your master config.
Authentication credentials are passed to the REST API via a session id in
one o... | 62598f746fece00bbaccb22e |
class BeartypeCallHintForwardRefException(BeartypeCallHintException): <NEW_LINE> <INDENT> pass | **Beartyped callable forward reference type-checking exception.**
This exception is raised from wrapper functions generated by the
:func:`beartype.beartype` decorator when a **forward reference type hint**
(i.e., string whose value is the name of a user-defined class that has yet
to be defined) erroneously references ... | 62598f7476d4e153a661c4b6 |
class Solution: <NEW_LINE> <INDENT> def flatten(self, root): <NEW_LINE> <INDENT> if not root: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> stack = [root] <NEW_LINE> while stack: <NEW_LINE> <INDENT> node = stack.pop() <NEW_LINE> if node.right: <NEW_LINE> <INDENT> stack.append(node.right) <NEW_LINE> <DEDENT> if node.le... | @param root: a TreeNode, the root of the binary tree
@return: nothing | 62598f747b25080760ed6d42 |
class BasicGaussianFitter(BaseFitter1D): <NEW_LINE> <INDENT> label = "Gaussian" <NEW_LINE> def _errorfunc(self, params, x, y, dy): <NEW_LINE> <INDENT> yp = self.eval(x, *params) <NEW_LINE> result = (yp - y) <NEW_LINE> if dy is not None: <NEW_LINE> <INDENT> result /= dy <NEW_LINE> <DEDENT> return result <NEW_LINE> <DEDE... | Fallback Gaussian fitter, for astropy < 0.3.
If :mod:`astropy.modeling` is installed, this class is replaced by
:class:`SimpleAstropyGaussianFitter` | 62598f74287bf620b627145b |
class BaseModel(models.Model): <NEW_LINE> <INDENT> create_time = models.DateField(auto_now_add=True,verbose_name='创建时间') <NEW_LINE> update_time = models.DateField(auto_now=True,verbose_name='更新事件') <NEW_LINE> is_delete = models.BooleanField(default=False,verbose_name='删除标记') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> a... | 抽象模型类 | 62598f74b830903b9686e0c4 |
class CityList(generics.GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (IsAdminOrReadOnly,) <NEW_LINE> def get_city_list(self, request, cld): <NEW_LINE> <INDENT> return City.filter_objects(**cld) <NEW_LINE> <DEDENT> def make_perfect_data(self, params_dict): <NEW_LINE> <INDENT> for key in params_dict: <NEW_LI... | 城市列表 | 62598f7496565a6dacd2cbcd |
class ProxyResource(Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}... | A definition of an Azure resource.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The ID of the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:ivar etag: The ETag of the re... | 62598f74dc8b845886d52e57 |
class Unpack(Transformer): <NEW_LINE> <INDENT> def __init__(self, data_stream): <NEW_LINE> <INDENT> super(Unpack, self).__init__(data_stream) <NEW_LINE> self.data = None <NEW_LINE> <DEDENT> def get_data(self, request=None): <NEW_LINE> <INDENT> if not self.data: <NEW_LINE> <INDENT> data = next(self.child_epoch_iterator)... | Unpacks batches to compose a stream of examples.
This class is the inverse of the Batch class: it turns a minibatch into
a stream of examples.
Parameters
----------
data_stream : :class:`AbstractDataStream` instance
The data stream to unpack | 62598f74d53ae8145f917d3a |
class Area(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name | docstring for Area | 62598f748a43f66fc4bf1a21 |
class Encoder(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def __init__(self, dtype): <NEW_LINE> <INDENT> logger.info('{}.{} dtype: {}'.format(self.__module__, self.__class__.__name__, dtype)) <NEW_LINE> self.dtype = dtype <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def encode(self, data: mx.sym.Symbol, data... | Generic encoder interface.
:param dtype: Data type. | 62598f7415fb5d323ce7e5cb |
class TalosFormat: <NEW_LINE> <INDENT> def __init__(self, project=None, residues=None): <NEW_LINE> <INDENT> self.project = project <NEW_LINE> self.IOkeywords = {} <NEW_LINE> <DEDENT> def writeShifts(self, filePath, measurementList, **kw): <NEW_LINE> <INDENT> minShiftQuality = self.IOkeywords.get('minShiftQuality', 0.0)... | Adapter class to allow FormatConverter-like interface
| 62598f741f5feb6acb1624db |
class MasterEventHandler(EventHandler): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> EventHandler.__init__(self) <NEW_LINE> self.state = StateManager() <NEW_LINE> self.draw_handler = DrawHandler(self) <NEW_LINE> <DEDENT> def handle_event(self, event): <NEW_LINE> <INDENT> if isinstance(event, events.PageC... | The MASTER Event Handler and main component that launches the UI. | 62598f7450485f2cf55da813 |
class ShowMetadata(command.ShowOne): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(ShowMetadata, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( "server", metavar="<server>", help="Server ID", ) <NEW_LINE> parser.add_argument( "key", metavar="<key>", help="Metadata ... | Show metadata details for server | 62598f748c3a8732951f5df2 |
class CrossTarget(BaseTarget): <NEW_LINE> <INDENT> def _drawForm(self, ctx, brush): <NEW_LINE> <INDENT> ctx.polygon( ( 0, self._size/3, 0, self._size*2/3, self._size/3, self._size*2/3, self._size/3, self._size, self._size*2/3, self._size, self._size*2/3, self._size*2/3, self._size, self._size*2/3, self._size, self._siz... | A target in the form of a cross. | 62598f74e76e3b2f99fd82d3 |
class OPFail(Operation): <NEW_LINE> <INDENT> def __init__(self, op, site): <NEW_LINE> <INDENT> super().__init__(op) <NEW_LINE> self.SITE = site | fail a site | 62598f74be383301e025309b |
@skipUnless(getattr(settings, 'SELENIUM_TESTS', False), 'Selenium tests disabled. Set SELENIUM_TESTS = True in your settings.py to enable.') <NEW_LINE> class HomepageTestCase(OnePercentSeleniumTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.init_projects() <NEW_LINE> self.projects = dict([(slug... | Test that the homepage doesn't error out if no/a campaign is available | 62598f7430dc7b766599f102 |
class DeleteEdgeUnitApplicationsRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.EdgeUnitID = None <NEW_LINE> self.ApplicationIDs = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.EdgeUnitID = params.get("EdgeUnitID") <NEW_LINE> self.ApplicationI... | DeleteEdgeUnitApplications请求参数结构体
| 62598f746fece00bbaccb22f |
class MultiprocessLogger(metaclass=Singleton): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.simulation_id = get_simulation_id() <NEW_LINE> <DEDENT> def info(self, s): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def debug(self, s): <NEW_LINE> <INDENT> raise NotImplementedError <... | Platform-agnostic logger, to support single machine multiprocessing or multiple
machines communicating through cloud storage | 62598f740383005118f6cfa7 |
@pytest.mark.draft <NEW_LINE> @pytest.mark.components <NEW_LINE> @pytest.allure.story('Broadcasts') <NEW_LINE> @pytest.allure.feature('POST') <NEW_LINE> class Test_PFE_Components(object): <NEW_LINE> <INDENT> @pytest.allure.link('https://jira.qumu.com/browse/TC-44768') <NEW_LINE> @pytest.mark.Broadcasts <NEW_LINE> @pyte... | PFE Broadcasts test cases. | 62598f7430c21e258be980a9 |
class Locale(Uninstantiable, str): <NEW_LINE> <INDENT> pass | Maps the type representing the user requested locale for presentation.
Only used as a class, do not create an instance. | 62598f7466673b3332c2fc65 |
class UserData(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def load(cls): <NEW_LINE> <INDENT> cls._createDirs() <NEW_LINE> preferences, cluster = DefaultData.preferences(), DefaultData.cluster() <NEW_LINE> try: <NEW_LINE> <INDENT> if os.path.isfile(location + "/UserData.mm"): <NEW_LINE> <INDENT> cls.write(*cls... | read and write data into hdd | 62598f74287bf620b627145c |
class LabelEntry(TixWidget): <NEW_LINE> <INDENT> def __init__ (self,master=None,cnf={}, **kw): <NEW_LINE> <INDENT> TixWidget.__init__(self, master, 'tixLabelEntry', ['labelside','options'], cnf, kw) <NEW_LINE> self.subwidget_list['label'] = _dummyLabel(self, 'label') <NEW_LINE> self.subwidget_list['entry'] = _dummyEntr... | LabelEntry - Entry field with label. Packages an entry widget
and a label into one mega widget. It can be used to simplify the creation
of ``entry-form'' type of interface.
Subwidgets Class
---------- -----
label Label
entry Entry | 62598f748e05c05ec3f6ea98 |
class LogInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Type = None <NEW_LINE> self.Time = None <NEW_LINE> self.Message = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Type = params.get("Type") <NEW_LINE> self.Time = params.get("Time") <NEW_LINE... | Log information.
| 62598f74d10714528d69d772 |
class Wallet(AbstractModel): <NEW_LINE> <INDENT> _get_one_database_method_name = 'get_wallet' <NEW_LINE> _get_all_database_method_name = 'get_wallets' <NEW_LINE> def __init__(self, data): <NEW_LINE> <INDENT> AbstractModel.__init__(self, data) | Wallet model | 62598f7415baa72349461830 |
class NoContent(Exception): <NEW_LINE> <INDENT> pass | Server returned a code 401 or 404, indicating no content found. | 62598f74be8e80087fbbe904 |
class Archive(object): <NEW_LINE> <INDENT> def GET(self, url): <NEW_LINE> <INDENT> url = config.archive_url + url <NEW_LINE> params = entryService.archive(entryService.types.entry, url) <NEW_LINE> if params.entries == None: <NEW_LINE> <INDENT> raise web.notfound(render.error(params)) <NEW_LINE> <DEDENT> return render.a... | Archive Handler for /archive(.*)
example:
/archive
request the archive of all posted entries on this blog
/archive/
the same as /archive
/archive/2013
request the archive of all posted entries on 2013
/archive/2013/
the same as /archive/2013
... | 62598f74fb3f5b602db47e03 |
class ScheduleKeyDeletionRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(ScheduleKeyDeletionRequest, self).__init__( '/key/{keyId}:delete', 'DELETE', header, version) <NEW_LINE> self.parameters = parameters | 计划在以后的是个时间点删除密钥,默认为7天 | 62598f748c3a8732951f5df4 |
class Detect(Function): <NEW_LINE> <INDENT> def __init__(self, cfg): <NEW_LINE> <INDENT> self.num_classes = cfg.NUM_CLASSES <NEW_LINE> self.top_k = cfg.TOP_K <NEW_LINE> self.nms_thresh = cfg.NMS_THRESH <NEW_LINE> self.conf_thresh = cfg.CONF_THRESH <NEW_LINE> self.variance = cfg.VARIANCE <NEW_LINE> self.nms_top_k = cfg.... | At test time, Detect is the final layer of SSD. Decode location preds,
apply non-maximum suppression to location predictions based on conf
scores and threshold to a top_k number of output predictions for both
confidence score and locations. | 62598f748c3a8732951f5df5 |
class WriteConflictError(bb.Union): <NEW_LINE> <INDENT> _catch_all = 'other' <NEW_LINE> file = None <NEW_LINE> folder = None <NEW_LINE> file_ancestor = None <NEW_LINE> other = None <NEW_LINE> def is_file(self): <NEW_LINE> <INDENT> return self._tag == 'file' <NEW_LINE> <DEDENT> def is_folder(self): <NEW_LINE> <INDENT> r... | This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar files.WriteConflictError.file: There's a file in the way.
:ivar files.WriteConflictError.folder: There's a folder in the way.
:ivar f... | 62598f740a366e3fb87dc26e |
class BiosVfSrIov(ManagedObject): <NEW_LINE> <INDENT> consts = BiosVfSrIovConsts() <NEW_LINE> naming_props = set([]) <NEW_LINE> mo_meta = MoMeta("BiosVfSrIov", "biosVfSrIov", "sr-iov", VersionMeta.Version151f, "InputOutput", 0x1f, [], ["admin"], [u'biosPlatformDefaults', u'biosSettings'], [], ["Get", "Set"]) <NEW_LINE>... | This is BiosVfSrIov class. | 62598f741d351010ab8f33e5 |
class AlarmSetterInteraction(Interaction): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> proxy = True <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Interaction, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def post_init_hook(self): <NEW_LINE> <INDENT> self.global_trigge... | Interaction with GlobalReceptor Detecting the command about Setting Alarm
| 62598f74a4f1c619b294de92 |
class Trainer(object): <NEW_LINE> <INDENT> def __init__(self, tokenizer): <NEW_LINE> <INDENT> super(Trainer, self).__init__() <NEW_LINE> self.tokenizer = tokenizer <NEW_LINE> self.data = TrainedData() <NEW_LINE> <DEDENT> def train(self, text, className): <NEW_LINE> <INDENT> tokens = self.tokenizer.tokenize(text) <NEW_L... | docstring for Trainer | 62598f7407d97122c4216546 |
class Item(Base): <NEW_LINE> <INDENT> __tablename__ = 'item' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(250), nullable=False) <NEW_LINE> description = Column(String(250), nullable=False) <NEW_LINE> catagory_id = Column(Integer, ForeignKey('catagory.id')) <NEW_LINE> catagory = rela... | Item is inherited from Base class, which is the instance
of declarative_base. it is used to create item table
and map the table acording to given atributes | 62598f74d99f1b3c44d04f5d |
class CheckinsByUser(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Foursquare/Users/CheckinsByUser') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return CheckinsByUserInputSet() <NEW_LINE> <DEDENT> def... | Create a new instance of the CheckinsByUser Choreography. A TembooSession object, containing a valid
set of Temboo credentials, must be supplied. | 62598f748a349b6b43685ae9 |
@dataclass <NEW_LINE> class RunningNode: <NEW_LINE> <INDENT> process: Popen <NEW_LINE> config: NodeConfig <NEW_LINE> url: URL <NEW_LINE> starting_balances: Dict[Address, TokenAmount] | A running node, this has a Raiden instance running in the background
in a separate process. | 62598f744d74a7450cd58b2d |
class getAllStartId_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.LIST, 'success', (TType.I64,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.TBinaryPro... | Attributes:
- success | 62598f745e10d32532ce3540 |
class eucafrontend(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> packages = ('euca2ools',) <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.add_cmd_output("/usr/bin/euca-describe-services") <NEW_LINE> self.add_cmd_output("/usr/bin/euca-describe-availability-zones verbose") <NEW_LINE> self.add_cmd_output("/usr/bin/euca... | Eucalyptus Cloud - Frontend | 62598f7416aa5153ce3ffda4 |
class VerifiedEmailBackend(ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, site, site_url, token): <NEW_LINE> <INDENT> verified_email = login_token.load_login_token(site, site_url, token) <NEW_LINE> if verified_email is None: <NEW_LINE> <INDENT> raise AuthenticationError('Token invalid or expired.') <NEW_LINE... | "Backend that authenticates the user using verified email | 62598f746aa9bd52df0d477d |
class float (basis.simpleTypeDefinition, six.float_type): <NEW_LINE> <INDENT> _XsdBaseType = anySimpleType <NEW_LINE> _ExpandedName = pyxb.namespace.XMLSchema.createExpandedName('float') <NEW_LINE> @classmethod <NEW_LINE> def XsdLiteral (cls, value): <NEW_LINE> <INDENT> return '%s' % (value,) | XMLSchema datatype U{float<http://www.w3.org/TR/xmlschema-2/#float>}. | 62598f74d6c5a102081e19ed |
class Meta: <NEW_LINE> <INDENT> model = Lesson <NEW_LINE> fields = '__all__' | Meta class. | 62598f7415baa72349461832 |
class AlbuNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_classes=1, num_filters=32, pretrained=False, is_deconv=False): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.num_classes = num_classes <NEW_LINE> self.pool = nn.MaxPool2d(2, 2) <NEW_LINE> self.encoder = torchvision.models.resnet34(pretrained=... | UNet (https://arxiv.org/abs/1505.04597) with Resnet34(https://arxiv.org/abs/1512.03385) encoder
Proposed by Alexander Buslaev: https://www.linkedin.com/in/al-buslaev/ | 62598f748c3a8732951f5df6 |
class dLSTM(nn.Module): <NEW_LINE> <INDENT> def __init__(self, r, input_size, hidden_size): <NEW_LINE> <INDENT> super(dLSTM, self).__init__() <NEW_LINE> self.lstm = nn.LSTMCell(input_size, hidden_size) <NEW_LINE> self.r = r <NEW_LINE> <DEDENT> def init_state(self, batch_size): <NEW_LINE> <INDENT> h0 = [torch.zeros(batc... | Implements the dilated LSTM
Uses a cyclic list of size r to keep r independent hidden states | 62598f741f5feb6acb1624df |
class WorkbookTemplateResource(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 't... | An azure resource object.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Azure resource Id.
:vartype id: str
:ivar name: Azure resource name.
:vartype name: str
:ivar type: Azure resource type.
:va... | 62598f7476d4e153a661c4bb |
class RecomputePriceStart(ModelView): <NEW_LINE> <INDENT> __name__ = 'sale.recompute_price.start' <NEW_LINE> method = fields.Selection([ ('percentage', 'By Percentage'), ('fixed_amount', 'Fixed Amount'), ], 'Recompute Method', required=True) <NEW_LINE> percentage = fields.Float('Percentage', digits=(16, 4), states={ 'i... | Recompute Price - Start | 62598f7423e79379d538bd9f |
class HelpView(BaseView): <NEW_LINE> <INDENT> def process(self, code, user, endpoint): <NEW_LINE> <INDENT> view_name = getattr(settings, 'DJANGO_NUMERICS_HELP_VIEW', 'djangonumerics/help.html') <NEW_LINE> return render(self.request, view_name, {'code': code, 'user': user, 'endpoint': endpoint, 'endpoint_response_class'... | Endpoint for given help page. | 62598f74d10714528d69d775 |
class I18nTest(BotPlugin): <NEW_LINE> <INDENT> @botcmd <NEW_LINE> def i18n_1(self, msg, args): <NEW_LINE> <INDENT> return "язы́к" <NEW_LINE> <DEDENT> @botcmd(name="ру́сский") <NEW_LINE> def i18n_2(self, msg, args): <NEW_LINE> <INDENT> return "OK" <NEW_LINE> <DEDENT> @botcmd(name="prefix_ру́сский") <NEW_LINE> def i18n_3... | A Just a test plugin to see if it is picked up. | 62598f7430dc7b766599f106 |
class DataPuller(RedisQueue): <NEW_LINE> <INDENT> def pull_data(self, batch): <NEW_LINE> <INDENT> return self.get(batch=batch, timeout=1) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_config(cls, config): <NEW_LINE> <INDENT> return cls(**config) | pull data from redis queue | 62598f746fece00bbaccb233 |
class Strophe(Paragraph): <NEW_LINE> <INDENT> def __init__(self, isStropheOf=None, structureHasUnit=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self._namespace = ONTOLOGY_NS <NEW_LINE> self._project_id = PROJECT_ID <NEW_LINE> self._name = "Strophe" <NEW_LINE> self.isStropheOf = IsStropheO... | Paragraph of verses as part of a poem.
Labels: Strophe (de) / strophe (en) | 62598f7476d4e153a661c4bc |
class Library(LoginRequiredMixin, TemplateView): <NEW_LINE> <INDENT> login_url = reverse_lazy('login') <NEW_LINE> template_name = "library.html" <NEW_LINE> def get_context_data(self): <NEW_LINE> <INDENT> albums = self.request.user.albums.all() <NEW_LINE> photos = self.request.user.photos.all() <NEW_LINE> albums_page = ... | Library View. | 62598f7450485f2cf55da818 |
@inherit_doc <NEW_LINE> class IsotonicRegression(JavaEstimator, _IsotonicRegressionParams, HasWeightCol, JavaMLWritable, JavaMLReadable): <NEW_LINE> <INDENT> @keyword_only <NEW_LINE> def __init__(self, featuresCol="features", labelCol="label", predictionCol="prediction", weightCol=None, isotonic=True, featureIndex=0): ... | Currently implemented using parallelized pool adjacent violators algorithm.
Only univariate (single feature) algorithm supported.
>>> from pyspark.ml.linalg import Vectors
>>> df = spark.createDataFrame([
... (1.0, Vectors.dense(1.0)),
... (0.0, Vectors.sparse(1, [], []))], ["label", "features"])
>>> ir = Isot... | 62598f747c178a314d78cd4f |
class ResourceProducer(Service): <NEW_LINE> <INDENT> def __init__(self, resource_type): <NEW_LINE> <INDENT> name = '{0}-producer'.format(resource_type.name) <NEW_LINE> props = [PropertyDefinition('{0}-quantity-produced'.format(resource_type.name), int, True, 1)] <NEW_LINE> super(ResourceProducer, self).__init__(name, p... | Provides the ability to produce a resource. | 62598f748a349b6b43685aeb |
class FileIO(object): <NEW_LINE> <INDENT> def __init__(self, in_path, **kwargs): <NEW_LINE> <INDENT> self.in_path = in_path <NEW_LINE> self.debug = kwargs.get('debug', True) <NEW_LINE> <DEDENT> def load_data(self, **kwargs): <NEW_LINE> <INDENT> all_csv_files = glob.glob(os.path.join(self.in_path, '*.csv')) <NEW_LINE> s... | FileIO class that exoises methods to read from preprocessed csv
files. | 62598f74d18da76e235b6d8b |
class DeprecatedError(LastfmError, ClientError): <NEW_LINE> <INDENT> code = 27 | Deprecated - This type of request is no longer supported | 62598f7466673b3332c2fc69 |
class UnauthenticatedUser(OAuth2Exception): <NEW_LINE> <INDENT> pass | The provided user is not internally authenticated, via
user.is_authenticated | 62598f74c432627299fa2880 |
class blockBuddyMember_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'requestId', None, None, ), (2, TType.STRING, 'mid', None, None, ), ) <NEW_LINE> def __init__(self, requestId=None, mid=None,): <NEW_LINE> <INDENT> self.requestId = requestId <NEW_LINE> self.mid = mid <NEW_LINE> <DEDENT> def read(s... | Attributes:
- requestId
- mid | 62598f745e10d32532ce3541 |
class HasMetaData(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @LazyProperty <NEW_LINE> def metadata(self): return Metadata(self.path) | Any class that inherits from this class gains the metadata attribute that
loads metadata from the class's 'path' attribute. This is done lazily so
there is no performance penalty to inheriting from this and subsequent
calls to metadata are cached | 62598f7407d97122c4216549 |
class RunProjectsLocationsRevisionsDeleteRequest(_messages.Message): <NEW_LINE> <INDENT> name = _messages.StringField(1, required=True) <NEW_LINE> orphanDependents = _messages.BooleanField(2) | A RunProjectsLocationsRevisionsDeleteRequest object.
Fields:
name: The name of the revision being deleted. If needed, replace
{namespace_id} with the project ID.
orphanDependents: Deprecated. Specifies the cascade behavior on delete.
Cloud Run only supports cascading behavior, so this must be false. This
... | 62598f741f037a2d8b9e3997 |
class SessionEx(Session): <NEW_LINE> <INDENT> def __init__(self, db, autocommit=False, autoflush=True, **options): <NEW_LINE> <INDENT> self.db = db <NEW_LINE> bind = options.pop('bind', None) or db.engine <NEW_LINE> binds = options.pop('binds', db.get_binds()) <NEW_LINE> super().__init__( autocommit=autocommit, autoflu... | The SessionEx extends the default session system with bind selection.
| 62598f74167d2b6e312b6825 |
class ProdConfig(Config): <NEW_LINE> <INDENT> ENV = 'production' <NEW_LINE> DEBUG = 'False' | Production configuration | 62598f74a4f1c619b294de95 |
class JsonApiSerializerMeta(SchemaMeta): <NEW_LINE> <INDENT> def __new__(mcs, name, bases, attrs): <NEW_LINE> <INDENT> parents = [b for b in bases if isinstance(b, JsonApiSerializerMeta)] <NEW_LINE> if not parents: <NEW_LINE> <INDENT> return super(JsonApiSerializerMeta, mcs).__new__( mcs, name, bases, attrs) <NEW_LINE>... | Meta class for JSON API schemas. | 62598f7426238365f5fac41e |
class SenderEncodingTest(TestCase): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _create_email(from_header): <NEW_LINE> <INDENT> mail = 'Message-Id: %s\n' % make_msgid() + 'From: %s\n' % from_header + 'Subject: test\n\n' + 'test' <NEW_LINE> return message_from_string(mail) ... | Validate correct handling of encoded recipients. | 62598f7476d4e153a661c4bd |
class BookInstance(models.Model): <NEW_LINE> <INDENT> id = models.UUIDField(primary_key = True, default = uuid.uuid4) <NEW_LINE> book = models.ForeignKey('book', on_delete = models.SET_NULL, null = True) <NEW_LINE> imprint = models.CharField(max_length = 200) <NEW_LINE> due_back = models.DateField(null = True, blank = ... | Model representing a specific copy of a book (i.e. that can be borrowed from the library). | 62598f74287bf620b6271461 |
class Movie(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'movies' <NEW_LINE> movie_id = db.Column(db.Integer, autoincrement=True, primary_key=True) <NEW_LINE> title = db.Column(db.String) <NEW_LINE> overview = db.Column(db.Text) <NEW_LINE> release_date = db.Column(db.DateTime) <NEW_LINE> poster_path = db.Column(db.St... | A movie. | 62598f74b57a9660fecd1329 |
class interpolate(): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _gaussian(bandwidth, d): <NEW_LINE> <INDENT> return 1/math.sqrt(2*math.pi)*math.exp((-1/2)*(d/bandwidth)**2) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _initiaize(lixelGraph, lxcenterGraph): <NEW_LINE> <INDENT> lookupDict={} <NEW_LINE> for edge... | Class to implement interpolate analysis.
Calculate a density value based on
1) a kernel function,
http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/an-overview-of-the-interpolation-tools.htm
http://connor-johnson.com/2014/03/20/simple-kriging-in-python/
2) network distance - centerGraph ... | 62598f74d99f1b3c44d04f61 |
class CPlusPlusModePlugin(IPeppyPlugin): <NEW_LINE> <INDENT> def getMajorModes(self): <NEW_LINE> <INDENT> yield CPlusPlusMode | C plugin to register modes and user interface.
| 62598f7423e79379d538bda2 |
class Soft(): <NEW_LINE> <INDENT> def __init__(self, epsilon=0): <NEW_LINE> <INDENT> self.epsilon = epsilon <NEW_LINE> <DEDENT> def decide(self, Q_S): <NEW_LINE> <INDENT> if random() <= self.epsilon: <NEW_LINE> <INDENT> return (choice(list(Q_S.keys())), self.epsilon / len(Q_S)) <NEW_LINE> <DEDENT> else: <NEW_LINE> <IND... | Epsilon-greedy policy | 62598f747c178a314d78cd51 |
class GnrSqlBusinessLogicException(GnrSqlException): <NEW_LINE> <INDENT> code = 'GNRSQL-021' <NEW_LINE> description = '!!Genro SQL Business Logic Exception' <NEW_LINE> caption = '!!The requested operation violates the internal business logic: %(msg)s' | Standard Genro SQL Business Logic Exception
* **code**: GNRSQL-021
* **description**: Genro SQL Business Logic Exception | 62598f7466673b3332c2fc6b |
class AuthTokenSerializer(serializers.Serializer): <NEW_LINE> <INDENT> email = serializers.CharField() <NEW_LINE> password = serializers.CharField( style={'input_type': 'password'}, trim_whitespace=False ) <NEW_LINE> def validate(self, attrs): <NEW_LINE> <INDENT> email = attrs.get('email') <NEW_LINE> password = attrs.g... | Serializer for the user authentication object | 62598f74b57a9660fecd132a |
@mark.django_db <NEW_LINE> class TestClearRequestCache(TestCase): <NEW_LINE> <INDENT> def _get_cache(self): <NEW_LINE> <INDENT> return RequestCache("TestClearRequestCache") <NEW_LINE> <DEDENT> @task <NEW_LINE> def _dummy_task(self): <NEW_LINE> <INDENT> self._get_cache().set("cache_key", "blah blah") <NEW_LINE> <DEDENT>... | Tests _clear_request_cache is called after celery task is run. | 62598f7463f4b57ef00859c4 |
class mac_lsmod(common.AbstractMacCommand): <NEW_LINE> <INDENT> def calculate(self): <NEW_LINE> <INDENT> common.set_plugin_members(self) <NEW_LINE> p = self.get_profile_symbol("_kmod") <NEW_LINE> kmodaddr = obj.Object("Pointer", offset = p, vm = self.addr_space) <NEW_LINE> kmod = kmodaddr.dereference_as("kmod_info") <N... | Lists loaded kernel modules | 62598f74a8ecb03325870ab4 |
class Solution: <NEW_LINE> <INDENT> def removeDuplicates(self, A): <NEW_LINE> <INDENT> cur = 0 <NEW_LINE> for i in A: <NEW_LINE> <INDENT> if cur == 0 or i != A[cur - 1]: <NEW_LINE> <INDENT> A[cur] = i <NEW_LINE> cur += 1 <NEW_LINE> <DEDENT> <DEDENT> return cur | @param A: a list of integers
@return an integer | 62598f7423e79379d538bda3 |
class Graph(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.graph = {} <NEW_LINE> self.nodes = {} <NEW_LINE> self.node_count = 0 <NEW_LINE> self.edge_count = 0 <NEW_LINE> <DEDENT> def add_node(self,**kwargs): <NEW_LINE> <INDENT> if 'node' in kwargs: <NEW_LINE> <INDENT> node = kwargs['node'] <NEW_LIN... | Dictionary based representation of a graph
graph [dict]: node id as dict key points to list with neighbor ids
nodes [dict]: dict of nodes, used to hold node info
node_count [int]: :)
edge_count [int]: :) | 62598f74d10714528d69d778 |
class ShowNode(command.ShowCommand): <NEW_LINE> <INDENT> resource = 'node' <NEW_LINE> json_indent = 4 <NEW_LINE> allow_names = False <NEW_LINE> log = logging.getLogger(__name__ + '.ShowNode') | Show node status. | 62598f741f5feb6acb1624e3 |
class FileEditorValueWidget(gtk.HBox): <NEW_LINE> <INDENT> FILE_PROTOCOL = "file://{0}" <NEW_LINE> def __init__(self, value, metadata, set_value, hook, arg_str=None): <NEW_LINE> <INDENT> super(FileEditorValueWidget, self).__init__(homogeneous=False, spacing=0) <NEW_LINE> self.value = value <NEW_LINE> self.metadata = me... | This class creates a button that launches an editor for a file path. | 62598f741d351010ab8f33ea |
class IdAndSlugUrlMixin: <NEW_LINE> <INDENT> id_and_slug_url_name = '' <NEW_LINE> @cached_property <NEW_LINE> def id_and_slug_url(self) -> str: <NEW_LINE> <INDENT> return self.get_id_and_slug_url() <NEW_LINE> <DEDENT> def get_id_and_slug_url_name(self) -> str: <NEW_LINE> <INDENT> assert isinstance(self, Page) <NEW_LINE... | A mixin for wagtail Page models for detail pages with a url route which has the Page id and slug in the url.
The custom route is expected to be on a parent index page using RoutablePageMixin and works along with IdAndSlugUrlIndexMixin. | 62598f74b57a9660fecd132b |
class CoerceToCursorTests(BaseCase): <NEW_LINE> <INDENT> def test_none(self): <NEW_LINE> <INDENT> self.assertIsNone(params.coerce_to_cursor(None)) <NEW_LINE> self.assertIsNone(params.coerce_to_cursor("")) <NEW_LINE> self.assertIsNone(params.coerce_to_cursor([])) <NEW_LINE> <DEDENT> def test_error(self): <NEW_LINE> <IND... | Tests for voluptuous coersion to str to ndb cursor object | 62598f74d53ae8145f917d42 |
class AbstractFeatureSeries(TimeSeries): <NEW_LINE> <INDENT> def set_features(self, names, units): <NEW_LINE> <INDENT> if isinstance(names, str): <NEW_LINE> <INDENT> names = [ str(names) ] <NEW_LINE> <DEDENT> if isinstance(units, str): <NEW_LINE> <INDENT> units = [ str(units) ] <NEW_LINE> <DEDENT> if len(names) != len(... | Represents the salient features of a data stream. Typically this
will be used for things like a visual grating stimulus, where
the bulk of data (each frame sent to the graphics card) is bulky
and not of high value, while the salient characteristics (eg,
orientation, spatial frequency, contrast, etc) are what important
... | 62598f740a366e3fb87dc274 |
class TestAsyncAwaker(testutils.GanetiTestCase): <NEW_LINE> <INDENT> family = socket.AF_INET <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> testutils.GanetiTestCase.setUp(self) <NEW_LINE> self.mainloop = daemon.Mainloop() <NEW_LINE> self.awaker = daemon.AsyncAwaker(signal_fn=self.handle_signal) <NEW_LINE> self.signal_... | Test daemon.AsyncAwaker | 62598f74a4f1c619b294de97 |
class JSONView(BrowserView): <NEW_LINE> <INDENT> @property <NEW_LINE> def include_all(self): <NEW_LINE> <INDENT> return 'include_all' in self.request.form <NEW_LINE> <DEDENT> @property <NEW_LINE> def url_tool(self): <NEW_LINE> <INDENT> return plone.api.portal.get_tool('portal_url') <NEW_LINE> <DEDENT> def handle_client... | Present Archetypes-based content as JSON | 62598f74cad5886f8bdc4bcd |
class SingleFieldFormTest(FormTestCase, TransactionTestCase): <NEW_LINE> <INDENT> formclass = RoomBookingJustRoomForm | Test that partial unique validation on a ModelForm works when not all unique fields are present on the form.
These have to be provided from an existing instance. | 62598f747b25080760ed6d4c |
class Template(object): <NEW_LINE> <INDENT> def __init__(self, wave, flux, template): <NEW_LINE> <INDENT> self.w = wave <NEW_LINE> self.f = flux <NEW_LINE> self.t = template | SDSS template spectrum | 62598f7496565a6dacd2cbd2 |
class IdxPHRASE26R(db.Model): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> __tablename__ = 'idxPHRASE26R' <NEW_LINE> id_bibrec = db.Column(db.MediumInteger(8, unsigned=True), db.ForeignKey(Bibrec.id), primary_key=True) <NEW_LINE> termlist = db.Column(db.iLargeBinary, nullable=Tru... | Represents a IdxPHRASE26R record. | 62598f746e29344779afff0d |
class IMDetailsPanel(AccountPanelForm): <NEW_LINE> <INDENT> template = ViewPageTemplateFile('templates/imdetails.pt') <NEW_LINE> def getIMDetailsLink(self): <NEW_LINE> <INDENT> context = aq_inner(self.context) <NEW_LINE> template = None <NEW_LINE> if self._checkPermission('Set own properties', context): <NEW_LINE> <IND... | Implementation of 'IM Details' page. | 62598f741f5feb6acb1624e5 |
class GreenletTransport(object): <NEW_LINE> <INDENT> def __init__(self, transport, protocol): <NEW_LINE> <INDENT> self._transport = transport <NEW_LINE> self._disconnected = None <NEW_LINE> self._state = None <NEW_LINE> self._paused = False <NEW_LINE> self._protocol = protocol <NEW_LINE> <DEDENT> def read(self): <NEW_L... | An object which represents a connection that greenlets can use.
@ivar _transport: See L{__init__}.
@ivar _protocol: See L{__init__}.
@ivar _disconnected: None or a L{twisted.python.failure.Failure}. If set,
I/O operations will raise the encapsulated error.
@ivar _state: Indicates whether the greenlet hooked up to ... | 62598f7416aa5153ce3ffdab |
class SwaggerFile(Swagger): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __init__( self, app: web.Application, spec_file: str = "", *, validate: bool = True, request_key: str = "data", swagger_ui_settings: Optional[SwaggerUiSettings] = None, redoc_ui_settings: Optional[ReDocUiSettings] = None, rapidoc_ui_settings:... | This class should be used if you want to use swagger scheme.
:param aiohttp.web.Application app: aiohttp's Application instance
:param str spec_file: path to swagger file scheme
:param bool validate: if ``False``, request validation is disabled, default ``True``
:param str request_key: key name under which the data wi... | 62598f7491af0d3eaad396b8 |
class InvoicingNumberingSettings(EmbeddedDocument): <NEW_LINE> <INDENT> SCHEMES = ( ("DN", _("Date, Number")), ("N", _("Number")) ) <NEW_LINE> DATE_FORMATS = ( ("Ymd", _("YYYYMMDD")), ("dmY", _("DDMMYYYY")), ("ymd", _("YYMMDD")), ("dmy", _("DDMMYY")), ("Ym", _("YYYYMM")), ("mY", _("MMYYYY")), ("ym", _("YYMM")), ("my",... | A wrapper to Invoicing's module numbering settings. | 62598f748da39b475be02a8f |
class StackQueue: <NEW_LINE> <INDENT> def __init__(self, limit=10): <NEW_LINE> <INDENT> self.limit = limit <NEW_LINE> self.stack_one = Stack(limit) <NEW_LINE> self.stack_two = Stack(limit) <NEW_LINE> <DEDENT> def enqueue(self, item): <NEW_LINE> <INDENT> if self.isFull(): <NEW_LINE> <INDENT> raise QueueOverflowError("Ca... | Implementation of Queue using two Stacks. | 62598f74b830903b9686e0c9 |
class Candidate(CommonInfo): <NEW_LINE> <INDENT> ballotorder = models.IntegerField(null=True, blank=True) <NEW_LINE> id = models.BigIntegerField(primary_key=True) <NEW_LINE> is_ballot_measure = models.BooleanField(default=False, verbose_name="For a ballot measure?", help_text="Check this box if the \"candidate\" you ar... | Canonical representation of a
candidate. Should be globally unique
for this election, across races. | 62598f746fece00bbaccb239 |
class AppLayer(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUp(cls): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def testSetUp(cls, test): <NEW_LINE> <INDENT> test.app = create_app('testing') <NEW_LINE> test.app_context = test.app.app_context() <NEW_LINE> test.app_context.push() ... | Main Flask application layer | 62598f74e76e3b2f99fd82de |
class MatplotCharting(object): <NEW_LINE> <INDENT> def __init__(self, stockReader): <NEW_LINE> <INDENT> x = [s.date for s in stockReader.stock_list] <NEW_LINE> y = [s.op for s in stockReader.stock_list] <NEW_LINE> vl = 100 <NEW_LINE> vr = 600 <NEW_LINE> vt = 80 <NEW_LINE> vb = 580 <NEW_LINE> period = stockReader.getLDa... | Plotting the graph from the data using matplotlib | 62598f74fb3f5b602db47e07 |
class cmd_user_password(Command): <NEW_LINE> <INDENT> synopsis = "%prog [options]" <NEW_LINE> takes_options = [ Option("--newpassword", help="New password", type=str), ] <NEW_LINE> takes_optiongroups = { "sambaopts": options.SambaOptions, "credopts": options.CredentialsOptions, "versionopts": options.VersionOptions, } ... | Change password for a user account (the one provided in authentication). | 62598f74d164cc6175820823 |
class Tests(IMP.test.TestCase): <NEW_LINE> <INDENT> def test_surface_mover(self): <NEW_LINE> <INDENT> m = IMP.Model() <NEW_LINE> surf = IMP.pmi.tools.SetupSurface(m, (0, 0, 0), (0, 0, 1), True).get_particle() <NEW_LINE> d = IMP.core.create_xyzr_particles(m, 1, 1.)[0] <NEW_LINE> d.set_coordinates((0, 0, 10)) <NEW_LINE> ... | Test correct setup and usage of ``IMP.core.SurfaceMover`` | 62598f747c178a314d78cd55 |
class View(): <NEW_LINE> <INDENT> def __init__(self, log="", logs=""): <NEW_LINE> <INDENT> self.log = log <NEW_LINE> self.logs = logs <NEW_LINE> <DEDENT> def view_logs(self, search_query=None, search_type=None): <NEW_LINE> <INDENT> logs = Log.select().order_by(Log.timestamp.desc()) <NEW_LINE> if search_type == "user_se... | Contains all methods and variables
associated with VIEWING data in the database | 62598f748a43f66fc4bf1a2b |
class _Taggable(object): <NEW_LINE> <INDENT> def __init__(self, ws_prefix): <NEW_LINE> <INDENT> self.ws_prefix = ws_prefix <NEW_LINE> <DEDENT> def add_tags(self, *tags): <NEW_LINE> <INDENT> for tag in tags: <NEW_LINE> <INDENT> self._add_tag(tag) <NEW_LINE> <DEDENT> <DEDENT> def _add_tag(self, tag): <NEW_LINE> <INDENT> ... | Common functions for classes with tags. | 62598f7430dc7b766599f10c |
class DonorListView(DonorBaseListView): <NEW_LINE> <INDENT> queryset = Donor.objects.filter(type='I').order_by('-contribs_sum') <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(DonorBaseListView, self).get_context_data(**kwargs) <NEW_LINE> context['group_donor_list'] = Donor.groups.p... | Notice that this is the one overridden base view we're using. That's because
this is the spot where it's easiest to define how the donors will be split up.
Top 100 total? Top 50 individual and top 50 group? That logic happens here.
Would be nice to add to the admin interface somehow, but that's for another time. | 62598f7476d4e153a661c4c2 |
class LazyDict( UserDict ): <NEW_LINE> <INDENT> def __init__( self, dict=None, populate=None, keyTransform=None ): <NEW_LINE> <INDENT> UserDict.__init__( self, dict ) <NEW_LINE> self._populated = 0 <NEW_LINE> self.__populateFunc = populate or (lambda: {}) <NEW_LINE> self._keyTransform = keyTransform or (lambda key: key... | A lazy-populating User Dictionary.
Lazy initialization is not thread-safe. | 62598f74a4f1c619b294de99 |
class ethernet(packet_base.PacketBase): <NEW_LINE> <INDENT> _PACK_STR = '!6s6sH' <NEW_LINE> _MIN_LEN = struct.calcsize(_PACK_STR) <NEW_LINE> _TYPE = { 'ascii': [ 'src', 'dst' ] } <NEW_LINE> def __init__(self, dst='ff:ff:ff:ff:ff:ff', src='00:00:00:00:00:00', ethertype=ether.ETH_TYPE_IP): <NEW_LINE> <INDENT> super(ether... | Ethernet header encoder/decoder class.
An instance has the following attributes at least.
MAC addresses are represented as a string like '08:60:6e:7f:74:e7'.
__init__ takes the corresponding args in this order.
============== ==================== =====================
Attribute Description Example
=====... | 62598f74d10714528d69d77d |
class YearRangeExtractionFromArrayColumnHeadingsTest(unittest.TestCase): <NEW_LINE> <INDENT> example_dtype = [('r', '<i4'), ('b', '<i4'), ('s', '<i4'), ('f', '<i4'), ('d', '<i4'), ('t', '<i4'), ('v', '<i4'), ('2004', '<f8'), ('2005', '<f8'), ('2006', '<f8'), ('2007', '<f8'), ('2008', '<f8'), ('2009', '<f8'), ('2010', '... | Test the function that extracts the maximum and minimum year
from the dtype for a numpy structured array in the case where the
data are recorded in columns for each year instead of having a row
that corresponds to the calendar year for the data in each row | 62598f7423e79379d538bda7 |
class ParameterException(ModbusException): <NEW_LINE> <INDENT> def __init__(self, string="", **kwargs): <NEW_LINE> <INDENT> message = "[Invalid Paramter] %s" % string <NEW_LINE> ModbusException.__init__(self, message) | Error resulting from invalid paramater | 62598f74a8ecb03325870ab8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.