code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class BaseAbstractConv2d(Op): <NEW_LINE> <INDENT> check_broadcast = False <NEW_LINE> __props__ = ('border_mode', 'subsample', 'filter_flip', 'imshp', 'kshp') <NEW_LINE> def __init__(self, imshp=None, kshp=None, border_mode="valid", subsample=(1, 1), filter_flip=True): <NEW_LINE> <INDENT> if isinstance(border_mode, int)... | Base class for AbstractConv
Define an abstract convolution op that will be replaced with the appropriate implementation
:type imshp: None, tuple/list of len 4 of int or Constant variable
:param imshp: The shape of the input parameter.
Optional, possibly used to choose an optimal implementation.
You can give ``... | 62599050596a897236129000 |
class EvtAnimationsLoaded(event.Event): <NEW_LINE> <INDENT> pass | Triggered when animations names have been received from the engine | 625990508e71fb1e983bcf69 |
class ConcreteHandler2(Handler): <NEW_LINE> <INDENT> def check_range(self, request): <NEW_LINE> <INDENT> start, end = self.get_interval_from_db() <NEW_LINE> if start <= request < end: <NEW_LINE> <INDENT> print("request {} handled in handler 2".format(request)) <NEW_LINE> return True <NEW_LINE> <DEDENT> <DEDENT> @static... | ... With helper methods. | 62599050d7e4931a7ef3d51d |
class User(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> username = models.CharField(db_index=True, max_length=255, unique=True) <NEW_LINE> email = models.EmailField(db_index=True) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> cre... | An extension of the User class:
https://docs.djangoproject.com/en/1.10/topics/auth/customizing/#django.contrib.auth.models.CustomUser
Attributes:
username (CharField): Unique username
email (EmailField): An e-mail
is_active (BooleanField): User information cannot be deleted, only
deactivated
... | 62599050d53ae8145f919907 |
class ReceivedBeaconMessages(ReceivedXXXPackets): <NEW_LINE> <INDENT> def __init__(self, period, simulationTime): <NEW_LINE> <INDENT> ReceivedXXXPackets.__init__(self, 'detection.message.BeaconMessage', period, simulationTime) | Total number of received beacon messages | 62599050dd821e528d6da37f |
class scan: <NEW_LINE> <INDENT> __slots__ = ("func", "iter") <NEW_LINE> def __init__(self, func, iterable): <NEW_LINE> <INDENT> self.func, self.iter = func, iterable <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> acc = empty_acc = _coconut.object() <NEW_LINE> for item in self.iter: <NEW_LINE> <INDENT> if a... | Reduce func over iterable, yielding intermediate results. | 6259905055399d3f056279bf |
class Block: <NEW_LINE> <INDENT> MISSING = 1 <NEW_LINE> PROCESSING = 2 <NEW_LINE> COMPLETE = 3 <NEW_LINE> def __init__(self, length, offset): <NEW_LINE> <INDENT> self.length = length <NEW_LINE> self.offset = offset <NEW_LINE> self.state = self.MISSING <NEW_LINE> self.data = bytearray() <NEW_LINE> <DEDENT> def fill_bloc... | Integral part of the piece as a whole | 6259905024f1403a92686320 |
class NotebookHandler(PatternMatchingEventHandler): <NEW_LINE> <INDENT> patterns = ["*.ipynb"] <NEW_LINE> def process(self, event): <NEW_LINE> <INDENT> if "untitled" not in event.src_path.lower() and ".~" not in event.src_path: <NEW_LINE> <INDENT> render_notebooks(reload_config=True) <NEW_LINE> <DEDENT> <DEDENT> def on... | Handle notebook changes. | 62599050dc8b845886d54a64 |
@inherit_doc <NEW_LINE> class LogisticRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol, HasMaxIter, HasRegParam): <NEW_LINE> <INDENT> _java_class = "org.apache.spark.ml.classification.LogisticRegression" <NEW_LINE> def _create_model(self, java_model): <NEW_LINE> <INDENT> return LogisticRegression... | Logistic regression.
>>> from pyspark.sql import Row
>>> from pyspark.mllib.linalg import Vectors
>>> dataset = sqlCtx.inferSchema(sc.parallelize([ Row(label=1.0, features=Vectors.dense(1.0)), Row(label=0.0, features=Vectors.sparse(1, [], []))]))
>>> lr = LogisticRegression() .setMa... | 62599050498bea3a75a58fc6 |
class Paragraph(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.school = None <NEW_LINE> self.department = None <NEW_LINE> self.specialized_study = None <NEW_LINE> self.location = None <NEW_LINE> self.year = None <NEW_LINE> self.program_study_type = None <NEW_LINE> self.subject = None <NEW_LINE> sel... | Lọc những đoạn văn bản | 62599050f7d966606f749308 |
class SafeCookieError(Exception): <NEW_LINE> <INDENT> def __init__(self, error_message): <NEW_LINE> <INDENT> super().__init__(error_message) <NEW_LINE> log.error(error_message) | An exception class for safe cookie related errors. | 62599050009cb60464d029df |
class URLParameterHandler(urllib2.BaseHandler): <NEW_LINE> <INDENT> def __init__(self, url_param): <NEW_LINE> <INDENT> self._url_parameter = url_param <NEW_LINE> <DEDENT> def http_request(self, req): <NEW_LINE> <INDENT> url_instance = URL(req.get_full_url()) <NEW_LINE> url_instance.set_param(self._url_parameter) <NEW_L... | Appends a user configured URL parameter to the request URL.
e.g.: http://www.myserver.com/index.html;jsessionid=dd18fa45014ce4fc?id=5
See Section 2.1 URL Syntactic Components of RFC 1808
<scheme>://<net_loc>/<path>;<params>?<query>#<fragment>
See Section 3.2.2 of RFC 1738
:author: Kevin Denver ( muffysw@hotmail.c... | 62599050cad5886f8bdc5ad1 |
class MeasurementTimeseriesTVPResultMixin(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._result_points = [] <NEW_LINE> self._unit_of_measurement = None <NEW_LINE> super(MeasurementTimeseriesTVPResultMixin, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> @property <NEW_LI... | Result Mixin: Measurement Timeseries TimeValuePair | 6259905076d4e153a661dccb |
class sets(): <NEW_LINE> <INDENT> def __init__( self, log, ra, dec, radius, sourceList, convertToArray=True ): <NEW_LINE> <INDENT> self.log = log <NEW_LINE> log.debug("instansiating a new 'sets' object") <NEW_LINE> self.ra = ra <NEW_LINE> self.dec = dec <NEW_LINE> self.radius = radius <NEW_LINE> self.sourceList = sourc... | *Given a list of coordinates and a crossmatch radius, split the list up into sets of associated locations*
**Key Arguments:**
- ``log`` -- logger
- ``ra`` -- a list of the corrdinate right ascensions
- ``dec`` -- a list of the corrdinate declinations (same length as ``ra``)
- ``radius`` -- the radius t... | 62599050cb5e8a47e493cbd9 |
class nakedTwin(__nakedN): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "Naked Twin" <NEW_LINE> self.minSize = None <NEW_LINE> self.maxSize = None <NEW_LINE> self.rank = 20 <NEW_LINE> <DEDENT> def solve(self, puzzle): <NEW_LINE> <INDENT> return super(nakedTwin, self).solve(puzzle, 2) | Naked Twin
This plugin looks for 2 cells in every intersection that have 2, and only 2
candidates in common. If these are found, these 2 candidates are removed
from every other location in the intersection. | 62599050a79ad1619776b50f |
class Condition(_TimeoutGarbageCollector): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Condition, self).__init__() <NEW_LINE> self.io_loop = ioloop.IOLoop.current() <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> result = '<%s' % (self.__class__.__name__, ) <NEW_LINE> if self._waiters:... | A condition allows one or more coroutines to wait until notified.
Like a standard `threading.Condition`, but does not need an underlying lock
that is acquired and released.
With a `Condition`, coroutines can wait to be notified by other coroutines:
.. testcode::
from tornado import gen
from tornado.ioloop i... | 6259905045492302aabfd97a |
class SimpleApp(wx.App): <NEW_LINE> <INDENT> def __init__(self, xrcfile, main_frame_name): <NEW_LINE> <INDENT> self.__xrcfile = xrcfile <NEW_LINE> self.__main_frame_name = main_frame_name <NEW_LINE> wx.App.__init__(self, redirect=False) <NEW_LINE> <DEDENT> def OnInit(self): <NEW_LINE> <INDENT> self.controls = wxMeta(se... | Basic application class that the user can derive from for simple applications. | 62599050e76e3b2f99fd9ea6 |
class VodPoliticalReviewSegmentItem(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StartTimeOffset = None <NEW_LINE> self.EndTimeOffset = None <NEW_LINE> self.Confidence = None <NEW_LINE> self.Suggestion = None <NEW_LINE> self.Name = None <NEW_LINE> self.Label = None <NEW_LINE> self.Ur... | 内容审核鉴政任务结果类型
| 625990508e71fb1e983bcf6c |
class PostDetailHandler(BlogHandler): <NEW_LINE> <INDENT> @post_exists <NEW_LINE> def get(self, post_id, post): <NEW_LINE> <INDENT> if not self.user: <NEW_LINE> <INDENT> username = "" <NEW_LINE> userSignedIn = "false" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> username = self.user.name <NEW_LINE> userSignedIn = "tru... | Post details request handler
We would show post details even when user has not signed-in
But in that case, user cannot alter post content or write any
comment for the post | 6259905063b5f9789fe86614 |
class SlicedClassificationMetrics(Artifact): <NEW_LINE> <INDENT> TYPE_NAME = 'system.SlicedClassificationMetrics' <NEW_LINE> def __init__(self, name: Optional[str] = None, uri: Optional[str] = None, metadata: Optional[Dict] = None): <NEW_LINE> <INDENT> super().__init__(uri=uri, name=name, metadata=metadata) <NEW_LINE> ... | Metrics class representing Sliced Classification Metrics.
Similar to ClassificationMetrics clients using this class are
expected to use log methods of the class to log metrics with the
difference being each log method takes a slice to associate the
ClassificationMetrics. | 625990503c8af77a43b68991 |
class AbstractBatchSystem(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractclassmethod <NEW_LINE> def supportsHotDeployment(cls): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @abstractclassmethod <NEW_LINE> def supportsWorkerCleanup(cls): <NEW_LINE> <INDENT> raise NotImple... | An abstract (as far as Python currently allows) base class to represent the interface the batch
system must provide to Toil. | 62599050435de62698e9d2a5 |
class HMCover(homematic.HMDevice, CoverDevice): <NEW_LINE> <INDENT> @property <NEW_LINE> def current_cover_position(self): <NEW_LINE> <INDENT> if self.available: <NEW_LINE> <INDENT> return int(self._hm_get_state() * 100) <NEW_LINE> <DEDENT> return None <NEW_LINE> <DEDENT> def set_cover_position(self, **kwargs): <NEW_LI... | Represents a Homematic Cover in Home Assistant. | 62599050e76e3b2f99fd9ea7 |
class catalog_069(models.Model): <NEW_LINE> <INDENT> id = models.IntegerField(primary_key=True) <NEW_LINE> src_word = models.CharField(max_length=50) <NEW_LINE> tar_word = models.CharField(max_length=50) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.src_word + "-->" + self.tar_word | Create a table which contains catalog id
and word pair.
The number of this catalog table is 069
It contains three columns:
id int type catalog id
src_word char type the source word which needs to be subsitute
tar_word char type the word that is translated from the source word | 625990506e29344779b01aeb |
class DummyProcess(object): <NEW_LINE> <INDENT> pid = 1 <NEW_LINE> proto = None <NEW_LINE> _terminationDelay = 1 <NEW_LINE> def __init__(self, reactor, executable, args, environment, path, proto, uid=None, gid=None, usePTY=0, childFDs=None): <NEW_LINE> <INDENT> self.proto = proto <NEW_LINE> self._reactor = reactor <NEW... | An incomplete and fake L{IProcessTransport} implementation for testing how
L{ProcessMonitor} behaves when its monitored processes exit.
@ivar _terminationDelay: the delay in seconds after which the DummyProcess
will appear to exit when it receives a TERM signal | 6259905026068e7796d4ddeb |
class Tag(models.Model): <NEW_LINE> <INDENT> name = models.CharField(_('name'), max_length=50, unique=True, db_index=True) <NEW_LINE> owners = models.ManyToManyField(OWNER_MODEL) <NEW_LINE> objects = TagManager() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ('name',) <NEW_LINE> verbose_name = _('tag') <N... | A tag. | 625990507b25080760ed8731 |
class JavaScriptActionButton(BaseActionButton): <NEW_LINE> <INDENT> def __init__(self, onclick, **kwargs): <NEW_LINE> <INDENT> self.onclick = onclick <NEW_LINE> super(JavaScriptActionButton, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def render(self, request): <NEW_LINE> <INDENT> if not get_missing_permissions(reques... | An action button that uses `onclick` for action dispatch. | 62599050baa26c4b54d50752 |
class distant_light(baseObj): <NEW_LINE> <INDENT> def __init__(self, direction=(0.,0.,0.), color=(1.,1.,1.), frame=None, display=None, **kwargs): <NEW_LINE> <INDENT> super(distant_light, self).__init__(**kwargs) <NEW_LINE> self._direction = vector(direction) if type(direction) in [tuple, list, np.ndarray] else directio... | see lighting documentation at http://vpython.org/contents/docs/lights.html | 62599050d6c5a102081e35c0 |
class SolarEph: <NEW_LINE> <INDENT> def __init__(self, a, e, I, O, w, lM): <NEW_LINE> <INDENT> self.a = (a*u.AU).to('km').value <NEW_LINE> if not isinstance(self.a, float): <NEW_LINE> <INDENT> self.a = self.a.tolist() <NEW_LINE> <DEDENT> self.e = e <NEW_LINE> self.I = I <NEW_LINE> self.O = O <NEW_LINE> self.w = w <NEW_... | Solar system ephemerides class
This class takes the constants in Appendix D.4 of Vallado as inputs
and stores them for use in defining solar system ephemerides at a
given time.
Args:
a (list):
semimajor axis list (in AU)
e (list):
eccentricity list
I (list):
inclination list
... | 62599050b5575c28eb71371d |
class BlogEntryVote(db.Model): <NEW_LINE> <INDENT> blog_entry = db.ReferenceProperty(BlogEntry, collection_name="blogentries_votes") <NEW_LINE> user_voted = db.ReferenceProperty(User, collection_name="blogentries_votes") <NEW_LINE> vote_kind = db.StringProperty() | Model for a blog entry vote | 625990508e7ae83300eea53a |
class Categorical(_BaseCategorical): <NEW_LINE> <INDENT> @lagacy_default_name_arg <NEW_LINE> def __init__(self, logits=None, probs=None, dtype=None, group_event_ndims=None, check_numerics=False, name=None, scope=None): <NEW_LINE> <INDENT> if dtype is None: <NEW_LINE> <INDENT> dtype = tf.int32 <NEW_LINE> <DEDENT> else: ... | Categorical distribution.
Parameters
----------
logits : tf.Tensor | np.ndarray
A float tensor of shape (..., n_categories), which is the
un-normalized log-odds of probabilities of the categories.
probs : tf.Tensor | np.ndarray
A float tensor of shape (..., n_categories), which is the
normalized proba... | 6259905023849d37ff852566 |
class TestDapver(object): <NEW_LINE> <INDENT> def test_comparsion(self): <NEW_LINE> <INDENT> versions = ['1.0', '1.0.5', '1.1dev', '1.1a', '1.1b', '1.1', '1.1.1', '1.2'] <NEW_LINE> assert versions == sorted(versions, key=cmp_to_key(dapver.compare)) | Tests for dap version comparison | 62599050d53ae8145f919909 |
class CFG(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.__dict__.update( **kwargs ) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> header = '{type}: {name}'.format( type=self.__class__.__name__, name=self.name) <NEW_LINE> varlines = ['\t{var:<15}: {value}'.format(var=... | Base configuration class. The attributes are used to store parameters of any type | 6259905071ff763f4b5e8c50 |
class Question(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> app_label = 'polls' <NEW_LINE> <DEDENT> title = models.CharField(max_length=200) <NEW_LINE> text = models.TextField(blank=True, default='') <NEW_LINE> last_modify_date = models.DateTimeField(default=timezone.now) <NEW_LINE> author = model... | this class is to represent a question, a question should contains
at least one response (Reponse Object), and relative answers
(Answer Object)
title: string, question title, max size is 200, example: "derivate
problem"
background: string, question background information
weight: int, the total weight in question, exa... | 62599050b57a9660fecd2f25 |
class RuleCondition(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'odata_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, } <NEW_LINE> _subtype_map = { 'odata_type': {'Micro... | The condition that results in the alert rule being activated.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: LocationThresholdRuleCondition, ManagementEventRuleCondition, ThresholdRuleCondition.
All required parameters must be populated in order to send to Azure.
:param ... | 62599050462c4b4f79dbcea8 |
class ContactVATCase(TransactionCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ContactVATCase, self).setUp() <NEW_LINE> self.partner = self.env["res.partner"].create({"name": "something"}) <NEW_LINE> <DEDENT> def test_company(self): <NEW_LINE> <INDENT> self.partner.is_company = True <NEW_LINE> se... | Test behavior of training contact VAT. | 6259905082261d6c5273091b |
class XMLElementText(AccessorGeneratorBase): <NEW_LINE> <INDENT> required_dargs = ('parent_xpath', 'tag_name') <NEW_LINE> def __init__(self, property_name, libvirtxml, forbidden=None, parent_xpath=None, tag_name=None): <NEW_LINE> <INDENT> super(XMLElementText, self).__init__(property_name, libvirtxml, forbidden, parent... | Class of accessor classes operating on element.text | 6259905096565a6dacd2d9dd |
class GTKComboTreeBox(BaseComboTreeBox, wx.Panel): <NEW_LINE> <INDENT> def _createPopupFrame(self): <NEW_LINE> <INDENT> return GTKPopupFrame(self) <NEW_LINE> <DEDENT> def _createTextCtrl(self): <NEW_LINE> <INDENT> if self._readOnly: <NEW_LINE> <INDENT> style = wx.TE_READONLY <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT... | The ComboTreeBox widget for wxGTK. This is actually a work
around because on wxGTK, there doesn't seem to be a way to intercept
mouse events sent to the Combobox. Intercepting those events is
necessary to prevent the Combobox from popping up the list and pop up
the tree instead. So, until wxPython makes intercepting ... | 625990504e4d5625663738b8 |
class Attribute(Item): <NEW_LINE> <INDENT> def __init__(self, name, points, creator_key_name): <NEW_LINE> <INDENT> content = str(points) <NEW_LINE> Item.__init__(self, name, content, creator_key_name) <NEW_LINE> self.available = points <NEW_LINE> self.total = points <NEW_LINE> <DEDENT> def Initialize(self): <NEW_LINE> ... | Quantity attributes such as having 10 gallons: non-transferable. | 625990507cff6e4e811b6ee5 |
class DetailView(generic.DetailView): <NEW_LINE> <INDENT> model = Article <NEW_LINE> template_name = 'article/post.html' <NEW_LINE> context_object_name = 'post' | looking one blog page
try:
post = Article.objects.get(id=str(id))
except Article.DoesNotExist:
raise Http404
#post.content = post.content.replace(' ', ' ').replace('
', '<br>')
return render(request, 'article/post.html', {'post': post}) | 6259905015baa72349463436 |
class PEGI(RATING_BODY): <NEW_LINE> <INDENT> id = 4 <NEW_LINE> iarc_name = 'PEGI' <NEW_LINE> ratings = (PEGI_3, PEGI_7, PEGI_12, PEGI_16, PEGI_18, PEGI_PARENTAL_GUIDANCE) <NEW_LINE> name = 'PEGI' <NEW_LINE> description = _lazy(u'Europe') <NEW_LINE> full_name = _lazy(u'Pan European Game Information') <NEW_LINE> url = 'h... | The European game ratings body (i.e. GBR, Poland, Spain). | 625990508e7ae83300eea53c |
class Query(Model): <NEW_LINE> <INDENT> _validation = { 'text': {'required': True}, 'display_text': {'readonly': True}, 'web_search_url': {'readonly': True}, 'search_link': {'readonly': True}, 'thumbnail': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'display_text': {'key'... | Defines a search query.
Variables are only populated by the server, and will be ignored when
sending a request.
:param text: The query string. Use this string as the query term in a new
search request.
:type text: str
:ivar display_text: The display version of the query term. This version of
the query term may cont... | 625990508e71fb1e983bcf6f |
class ProtocolFilesInvalid(ErrorDetails): <NEW_LINE> <INDENT> id: Literal["ProtocolFilesInvalid"] = "ProtocolFilesInvalid" <NEW_LINE> title: str = "Protocol File(s) Invalid" | An error returned when an uploaded protocol files are invalid. | 62599050cad5886f8bdc5ad3 |
class Contributor(Resource): <NEW_LINE> <INDENT> pass | Repository Contributor API | 62599050cb5e8a47e493cbdb |
class Response(object): <NEW_LINE> <INDENT> success_codes = [200, 304, 204] <NEW_LINE> error_codes = [404, 406, 409, 500] <NEW_LINE> def __init__(self, raw_response_data): <NEW_LINE> <INDENT> data = json.loads(raw_response_data) <NEW_LINE> if 'code' not in data.keys(): <NEW_LINE> <INDENT> raise InvalidResponseError('ke... | Provides access to the response data.
Raises an exception if the request was not successful (e.g. key not found).
Note that we are explicitly ignoring NodeManager error code 501 (unknown
action). We are tightly controlling the specified action, so we do not
expect to encounter this error.
Args:
raw_response_data: ... | 62599050b57a9660fecd2f27 |
class Inspector: <NEW_LINE> <INDENT> TEST404_OK = 0 <NEW_LINE> TEST404_MD5 = 1 <NEW_LINE> TEST404_STRING = 2 <NEW_LINE> TEST404_URL = 3 <NEW_LINE> TEST404_NONE = 4 <NEW_LINE> def __init__(self, target): <NEW_LINE> <INDENT> self.target = target <NEW_LINE> <DEDENT> def _give_it_a_try(self): <NEW_LINE> <INDENT> s = [] <NE... | This class mission is to examine the behaviour of the application when on
purpose an inexistent page is requested | 6259905082261d6c5273091c |
class JaikuException(Exception): <NEW_LINE> <INDENT> pass | Base class for Jaiku-related exceptions. | 62599050b830903b9686eed0 |
class UnitKeyParser(KeyParser): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> KeyParser.__init__(self) <NEW_LINE> self.key = key <NEW_LINE> <DEDENT> def clone(self): <NEW_LINE> <INDENT> ret = UnitKeyParser(self.key) <NEW_LINE> ret.filt = self.filt <NEW_LINE> return ret <NEW_LINE> <DEDENT> def offer(s... | A KeyParser that wants a single key. | 62599050ac7a0e7691f73987 |
class Power(StochasticParameter): <NEW_LINE> <INDENT> def __init__(self, other_param, val, elementwise=False): <NEW_LINE> <INDENT> super(Power, self).__init__() <NEW_LINE> assert isinstance(other_param, StochasticParameter) <NEW_LINE> self.other_param = other_param <NEW_LINE> self.val = handle_continuous_param(val, "va... | Parameter to exponentiate another parameter's results with.
Parameters
----------
other_param : StochasticParameter
Other parameter which's sampled values are to be
modified.
val : number or tuple of two number or list of number or StochasticParameter
Value to use exponentiate the other parameter's result... | 62599050dc8b845886d54a6a |
class TestBaseModelMethods(unittest.TestCase): <NEW_LINE> <INDENT> def test_pep8_conformance(self): <NEW_LINE> <INDENT> pep8style = pep8.StyleGuide(quiet=True) <NEW_LINE> result = pep8style.check_files(['models/base_model.py']) <NEW_LINE> self.assertEqual(result.total_errors, 0, "fix pep8") <NEW_LINE> <DEDENT> def setU... | class with tests | 62599050b57a9660fecd2f28 |
class UserInfoView(APIView): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_permission_from_role(cls, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if request.user: <NEW_LINE> <INDENT> perms_list = [] <NEW_LINE> for item in request.user.roles.values('permissions__method').distinct(): <NEW_LINE> <INDENT> p... | 获取当前用户信息和权限 | 6259905023e79379d538d9a2 |
class DiscreteSkyMapConfig(CachingSkyMap.ConfigClass): <NEW_LINE> <INDENT> raList = ListField(dtype=float, default=[], doc="Right Ascensions of tracts (ICRS, degrees)") <NEW_LINE> decList = ListField(dtype=float, default=[], doc="Declinations of tracts (ICRS, degrees)") <NEW_LINE> radiusList = ListField(dtype=float, de... | Configuration for the DiscreteSkyMap | 6259905029b78933be26ab18 |
class Process: <NEW_LINE> <INDENT> def __init__(self, group=None, target=None, name=None, args=(), kwargs={}): <NEW_LINE> <INDENT> self._popen = None <NEW_LINE> self._parent_pid = os.getpid() <NEW_LINE> self._target = target <NEW_LINE> self._args = tuple(args) <NEW_LINE> self._kwargs = dict(kwargs) <NEW_LINE> <DEDENT> ... | 实现一个简易版本的 multiprocessing.Proccess | 625990508e71fb1e983bcf71 |
class UTC(StaticTzInfo): <NEW_LINE> <INDENT> _zone = 'Etc/UTC' <NEW_LINE> _utcoffset = timedelta(seconds=0) <NEW_LINE> _tzname = 'UTC' | Etc/UTC timezone definition. See datetime.tzinfo for details | 62599050287bf620b6273096 |
class PayInvoiceAsk(ModelView): <NEW_LINE> <INDENT> __name__ = 'account.invoice.pay.ask' <NEW_LINE> type = fields.Selection([ ('writeoff', 'Write-Off'), ('partial', 'Partial Payment'), ], 'Type', required=True) <NEW_LINE> journal_writeoff = fields.Many2One('account.journal', 'Write-Off Journal', domain=[ ('type', '=', ... | Pay Invoice | 62599050cad5886f8bdc5ad4 |
class JsonResponse: <NEW_LINE> <INDENT> def __init__(self, response_code, filename): <NEW_LINE> <INDENT> self.status_code = response_code <NEW_LINE> self.filename = filename <NEW_LINE> <DEDENT> def json(self): <NEW_LINE> <INDENT> cur_path = os.path.dirname(__file__) <NEW_LINE> abs_file_path = cur_path + "/proofpoint_te... | Summary conversion of json data to dictionary.
| 6259905099cbb53fe6832392 |
class ActingManeuverTable(ArtisticActiveManeuverTable): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> trace.entry() <NEW_LINE> super().__init__(**kwargs) <NEW_LINE> self.unfamiliar = IntVar() <NEW_LINE> self.proficient_language = IntVar() <NEW_LINE> trace.exit() <NEW_LINE> <DEDENT> def setup_man... | Acting static maneuver table.
Methods:
setup_maneuver_skill_frames(self, parent_frame)
skill_type_bonus(self) | 6259905045492302aabfd980 |
class UiucAirfoil: <NEW_LINE> <INDENT> def __init__(self, chord, span, profile): <NEW_LINE> <INDENT> self.chord = chord <NEW_LINE> self.span = span <NEW_LINE> self.profile = profile <NEW_LINE> self.shape = self.make_shape() <NEW_LINE> <DEDENT> def make_shape(self): <NEW_LINE> <INDENT> foil_dat_url = 'http://www.ae.illi... | Airfoil with a section from the UIUC database | 62599050e76e3b2f99fd9eac |
class EnergyBounds(Energy): <NEW_LINE> <INDENT> @property <NEW_LINE> def nbins(self): <NEW_LINE> <INDENT> return self.size - 1 <NEW_LINE> <DEDENT> @property <NEW_LINE> def log_centers(self): <NEW_LINE> <INDENT> center = np.sqrt(self[:-1] * self[1:]) <NEW_LINE> return center.view(Energy) <NEW_LINE> <DEDENT> @property <N... | EnergyBounds array.
This is a `~gammapy.spectrum.energy.Energy` sub-class that adds convenience
methods to handle common tasks for energy bin edges arrays, like FITS I/O or
generating arrays of bin centers.
See :ref:`energy_handling_gammapy` for further information.
Parameters
----------
energy : `~numpy.array`, s... | 6259905076e4537e8c3f0a33 |
class Page: <NEW_LINE> <INDENT> def __init__(self, title): <NEW_LINE> <INDENT> self.lines = list() <NEW_LINE> self.title = title <NEW_LINE> self.cur_line = 0 <NEW_LINE> self.eop = False <NEW_LINE> <DEDENT> def add_line(self, line): <NEW_LINE> <INDENT> if line: <NEW_LINE> <INDENT> self.lines = line <NEW_LINE> <DEDENT> <... | Represents a page (aka 'slide') in TPP. A page consists of a title and one or more lines. | 62599050dd821e528d6da387 |
class QNetwork: <NEW_LINE> <INDENT> def __init__(self, input_dim=21, lr=0.00001): <NEW_LINE> <INDENT> model = Sequential() <NEW_LINE> model.add(BatchNormalization(input_shape=(input_dim,))) <NEW_LINE> model.add(Dense(50, input_dim=input_dim, W_regularizer=l2(0.01), init='normal', activation='relu')) <NEW_LINE> model.ad... | Holds sequential model for Q learning. | 625990508e71fb1e983bcf72 |
class IncomeBreakdownType(ModelSimple): <NEW_LINE> <INDENT> allowed_values = { ('value',): { 'None': None, 'BONUS': "bonus", 'OVERTIME': "overtime", 'REGULAR': "regular", 'NULL': "null", }, } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = True <NEW_LINE> @cached_propert... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the a... | 625990503cc13d1c6d466be6 |
class MaxPooling2D(_Pooling2D): <NEW_LINE> <INDENT> def __init__(self, pool_size, strides, padding='valid', data_format='channels_last', name=None, **kwargs): <NEW_LINE> <INDENT> super(MaxPooling2D, self).__init__( nn.max_pool, pool_size=pool_size, strides=strides, padding=padding, data_format=data_format, name=name, *... | Max pooling layer for 2D inputs (e.g. images).
Arguments:
pool_size: An integer or tuple/list of 2 integers: (pool_height, pool_width)
specifying the size of the pooling window.
Can be a single integer to specify the same value for
all spatial dimensions.
strides: An integer or tuple/list of 2 integers... | 6259905073bcbd0ca4bcb737 |
@register <NEW_LINE> class Adam(Optimizer): <NEW_LINE> <INDENT> def __init__(self, learning_rate=0.001, beta1=0.9, beta2=0.999, epsilon=1e-8, **kwargs): <NEW_LINE> <INDENT> super(Adam, self).__init__(learning_rate=learning_rate, **kwargs) <NEW_LINE> self.beta1 = beta1 <NEW_LINE> self.beta2 = beta2 <NEW_LINE> self.epsil... | The Adam optimizer.
This class implements the optimizer described in *Adam: A Method for
Stochastic Optimization*, available at http://arxiv.org/abs/1412.6980.
The optimizer updates the weight by::
rescaled_grad = clip(grad * rescale_grad + wd * weight, clip_gradient)
m = beta1 * m + (1 - beta1) * rescaled_g... | 6259905123e79379d538d9a4 |
class LoginView(TemplateView): <NEW_LINE> <INDENT> template_name = "accounts/login.html" | view to render login template | 625990518da39b475be04694 |
class Atm: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "atmosphere" | Singleton class representing the number of dimensions of the
Atmosphere. | 6259905129b78933be26ab19 |
class TestImageListResponse(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 testImageListResponse(self): <NEW_LINE> <INDENT> model = idcheckio_python_client.models.image_list_response.ImageListResp... | ImageListResponse unit test stubs | 62599051287bf620b6273098 |
class OrderedGroup(Group): <NEW_LINE> <INDENT> def __init__(self, order, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.order = order <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> if isinstance(other, OrderedGroup): <NEW_LINE> <INDENT> return self.order < other.order <NEW_... | A group with partial order.
Ordered groups with a common parent are rendered in ascending order of
their ``order`` field. This is a useful way to render multiple layers of
a scene within a single batch. | 625990512ae34c7f260ac596 |
class TwoProvidersTwoLabelsOneShared(tests.AllocatorTestCase): <NEW_LINE> <INDENT> scenarios = [ ('one_node', dict(provider1=10, provider2=10, label1=1, label2=1, results=[1, 1, 0])), ('two_nodes', dict(provider1=10, provider2=10, label1=2, label2=2, results=[2, 1, 1])), ('three_nodes', dict(provider1=10, provider2=10,... | One label is served by both providers, the other can only come
from one. This tests that the allocator uses the diverse provider
to supply the label that can come from either while reserving
nodes from the more restricted provider for the label that can
only be supplied by it.
label1 is supplied by provider1 and prov... | 62599051e64d504609df9e25 |
class AWSCommonTest(unittest.TestCase): <NEW_LINE> <INDENT> @typing.no_type_check <NEW_LINE> def testCreateTags(self): <NEW_LINE> <INDENT> tag_specifications = common.CreateTags(common.VOLUME, {'Name': 'fake-name'}) <NEW_LINE> self.assertEqual('volume', tag_specifications['ResourceType']) <NEW_LINE> self.assertEqual(1,... | Test the common.py public methods | 6259905130c21e258be99cb4 |
class SoftLink(linkextension.SoftLink, Link): <NEW_LINE> <INDENT> _c_classid = 'SOFTLINK' <NEW_LINE> _c_classId = previous_api_property('_c_classid') <NEW_LINE> def __call__(self): <NEW_LINE> <INDENT> target = self.target <NEW_LINE> if not self.target.startswith('/'): <NEW_LINE> <INDENT> target = self._v_parent._g_join... | Represents a soft link (aka symbolic link).
A soft link is a reference to another node in the *same* file hierarchy.
Getting access to the pointed node (this action is called *dereferrencing*)
is done via the __call__ special method (see below). | 62599051462c4b4f79dbceae |
class SusceptibleInfectionsTracker: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> @covidsim.models.hookimpl <NEW_LINE> def track_infection_event(infecting_node, exposed_node, day, results, graph): <NEW_LINE> <INDENT> if 'daily_susceptible_infections' not in results: <NEW_LINE> <INDENT> results['daily_susceptible_infecti... | Tracks how susceptible on average were all individuals who became infected per day. | 625990510a50d4780f706814 |
class Car(): <NEW_LINE> <INDENT> price_per_raise = 1.0 <NEW_LINE> def __init__(self, company, details): <NEW_LINE> <INDENT> self._company = company <NEW_LINE> self._details = details <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'str : {} - {}'.format(self._company,self._details) <NEW_LINE> <DEDENT>... | Car Class
Author : bskim
Date : 2019.11.09
Description : Class, Static, Instance, Mehtod | 625990514428ac0f6e6599e2 |
class SHA1Hasher(interface.BaseHasher): <NEW_LINE> <INDENT> NAME = u'sha1' <NEW_LINE> DESCRIPTION = u'Calculates a SHA-1 digest hash over input data.' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(SHA1Hasher, self).__init__() <NEW_LINE> self._sha1_context = hashlib.sha1() <NEW_LINE> <DEDENT> def Update(self,... | This class provides SHA-1 hashing functionality. | 6259905163d6d428bbee3c7b |
class TestAliasContext(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 testAliasContext(self): <NEW_LINE> <INDENT> model = swagger_client.models.alias_context.AliasContext() | AliasContext unit test stubs | 62599051b830903b9686eed2 |
class QtLineCompleter(RawWidget): <NEW_LINE> <INDENT> text = d_(Str()) <NEW_LINE> entries = d_(List()) <NEW_LINE> entries_updater = d_(Callable()) <NEW_LINE> delimiters = d_(Tuple(Str(), ('{','}'))) <NEW_LINE> hug_width = 'ignore' <NEW_LINE> _no_update = Bool(False) <NEW_LINE> def create_widget(self, parent): <NEW_LINE... | Simple style text editor, which displays a text field.
| 62599051435de62698e9d2ad |
class SelectorCV(ModelSelector): <NEW_LINE> <INDENT> def select(self): <NEW_LINE> <INDENT> warnings.filterwarnings("ignore", category=DeprecationWarning) <NEW_LINE> best_logL = float("-inf") <NEW_LINE> for component in range(self.min_n_components, self.max_n_components+1): <NEW_LINE> <INDENT> if len(self.sequences) <= ... | select best model based on average log Likelihood of cross-validation folds
| 62599051379a373c97d9a4da |
class Parser(object): <NEW_LINE> <INDENT> def __init__(self, max_deep=0): <NEW_LINE> <INDENT> self._max_deep = max_deep <NEW_LINE> return <NEW_LINE> <DEDENT> def working(self, priority: int, url: str, keys: dict, deep: int, content: object) -> (int, list, list): <NEW_LINE> <INDENT> logging.debug("%s start: %s", self.__... | class of Parser, must include function working() | 6259905194891a1f408ba14c |
class GetContextExtractorsTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def request_factory(self, settings={}): <NEW_LINE> <INDENT> request = testing.DummyRequest() <NEW_LINE> request.registry.settings = settings <NEW_LINE> return request <NEW_LINE> <DEDENT> def test_default_configuration(self): <NEW_LINE> <INDENT> ... | Test contextextractors.get_context_extractors(). | 62599051507cdc57c63a624f |
class InitialConditions(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.pressure = 0.0 <NEW_LINE> self.velocity = [0.0001, 0.0001, 0.0001] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return ', '.join("%s: %s" % item for item in vars(self).items()) | The InitialConditions class is used to set fluid simulation initial conditions.
| 625990510c0af96317c577b8 |
class CodeReviewCommentContextMenu(ContextMenu): <NEW_LINE> <INDENT> usedfor = ICodeReviewComment <NEW_LINE> links = ['reply'] <NEW_LINE> def reply(self): <NEW_LINE> <INDENT> enabled = self.context.branch_merge_proposal.isMergable() <NEW_LINE> return Link('+reply', 'Reply', icon='add', enabled=enabled) | Context menu for branches. | 625990514e696a045264e878 |
class Enemy(GameSprites): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__('./images/enemy1.png') <NEW_LINE> self.rect.bottom = 0 <NEW_LINE> max_x = SCREEN_RECT.width - self.rect.width <NEW_LINE> self.rect.x = random.randint(0, max_x) <NEW_LINE> self.speed = random.randint(1, 3) <NEW_LINE> <... | 敌机精灵 | 625990512ae34c7f260ac597 |
class LevelArea: <NEW_LINE> <INDENT> course: LevelCourse <NEW_LINE> layer_0: typing.List[LevelObject] <NEW_LINE> layer_1: typing.List[LevelObject] <NEW_LINE> layer_2: typing.List[LevelObject] <NEW_LINE> def __init__(self, course=None, layer_0=None, layer_1=None, layer_2=None): <NEW_LINE> <INDENT> self.course = course <... | An area | 62599051d7e4931a7ef3d529 |
class SparQLClient: <NEW_LINE> <INDENT> def __init__(self, endpoint_url): <NEW_LINE> <INDENT> self.endpoint = SPARQLWrapper(endpoint_url) <NEW_LINE> self.endpoint_url = endpoint_url <NEW_LINE> self.endpoint.setTimeout(10*60) <NEW_LINE> <DEDENT> def addLocalFileToEndpoint(self, tfile, tgraph=default): <NEW_LINE> <INDENT... | Fuseki connection maintainer through rdflib | 62599051287bf620b627309a |
class LoginViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> serializer_class = AuthTokenSerializer <NEW_LINE> def create(self,request): <NEW_LINE> <INDENT> return ObtainAuthToken().post(request) | Checks email and password and returns an auth token. | 6259905145492302aabfd984 |
class SyntaxBuildableNode: <NEW_LINE> <INDENT> def __init__(self, node): <NEW_LINE> <INDENT> if isinstance(node, SyntaxBuildableType): <NEW_LINE> <INDENT> assert node.base_name() not in SYNTAX_BASE_KINDS, "Syntax base kinds are not represented by Nodes" <NEW_LINE> self.node = create_node_map()[node.base_name()] <NEW_LI... | Wrapper around the `Node` type defined in `gyb_syntax_support` to provide functionality specific to SwiftSyntaxBuilder. | 6259905107d97122c4218155 |
class PasswordCriteria(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/DevShortcuts/Validation/PasswordCriteria') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return PasswordCriteriaInputSet() <NEW_LINE>... | Create a new instance of the PasswordCriteria Choreography. A TembooSession object, containing a valid
set of Temboo credentials, must be supplied. | 6259905182261d6c5273091f |
class BetterLogReport(LogReport): <NEW_LINE> <INDENT> def __call__(self, trainer): <NEW_LINE> <INDENT> keys = self._keys <NEW_LINE> observation = trainer.observation <NEW_LINE> summary = self._summary <NEW_LINE> if keys is None: <NEW_LINE> <INDENT> summary.add(observation) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ... | Subclass LogReport to handle numpy arrays reporting | 6259905110dbd63aa1c7208f |
class DescribeAccountAllGrantPrivilegesRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ClusterId = None <NEW_LINE> self.Account = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.ClusterId = params.get("ClusterId") <NEW_LINE> if params.get("Accou... | DescribeAccountAllGrantPrivileges请求参数结构体
| 62599051379a373c97d9a4dc |
class Mapping(models.Model): <NEW_LINE> <INDENT> RELATION_TYPE_CROSSDB = "crossdb" <NEW_LINE> RELATION_TYPE_ORTHOLOG = "ortholog" <NEW_LINE> RELATION_TYPE_TRANSCRIPT = "transcript" <NEW_LINE> RELATION_TYPE_EXON = "exon" <NEW_LINE> RELATION_TYPE_CHOICES = ( (RELATION_TYPE_CROSSDB, "Crossdb"), (RELATION_TYPE_ORTHOLOG, "O... | Describes a mapping between features from different sources. | 6259905155399d3f056279cb |
class OAuthSignIn(object): <NEW_LINE> <INDENT> providers = None <NEW_LINE> def __init__(self, provider_name): <NEW_LINE> <INDENT> self.provider_name = provider_name <NEW_LINE> credentials = current_app.config['OAUTH_CREDENTIALS'][provider_name] <NEW_LINE> self.consumer_id = credentials['id'] <NEW_LINE> self.consumer_se... | Defines the structure that the subclasses that implement each provider
must follow | 625990517cff6e4e811b6eed |
class IOThread(object): <NEW_LINE> <INDENT> def __init__(self, input_file, output_file): <NEW_LINE> <INDENT> self.input_file = input_file <NEW_LINE> self.output_file = output_file <NEW_LINE> self._running = False <NEW_LINE> self.got_exception = False <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.done = ... | Class that reads chunks from the input file and writes them to the
output file till the transfer is completely done. | 62599051d99f1b3c44d06b4c |
class PostgresSearch(object): <NEW_LINE> <INDENT> def filter_by(self, query, terms): <NEW_LINE> <INDENT> q = query <NEW_LINE> q = q.filter(model.package_search_table.c.package_id==model.Package.id) <NEW_LINE> q = q.filter('package_search.search_vector ' '@@ plainto_tsquery(:terms)'... | Demo of how postgres search works. | 625990517b25080760ed8736 |
class Home(Resource): <NEW_LINE> <INDENT> def __init__(self, resource): <NEW_LINE> <INDENT> Resource.__init__(self, resource.raw_resource()) <NEW_LINE> <DEDENT> def get_home_entry_link(self, link_rel): <NEW_LINE> <INDENT> for key in self.get('resources'): <NEW_LINE> <INDENT> if key == link_rel.rel: <NEW_LINE> <INDENT> ... | This is the model of home resource | 6259905126068e7796d4ddf5 |
class GistAddFileCommand(GistListCommandBase, sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def is_enabled(self): <NEW_LINE> <INDENT> return self.view.settings().get('gist_url') is None <NEW_LINE> <DEDENT> def handle_gist(self, gist): <NEW_LINE> <INDENT> @catch_errors <NEW_LINE> def on_filename(filename): <NEW_LINE>... | Adds file to existing gist | 6259905199cbb53fe6832397 |
class CacheSearchResultIter(object): <NEW_LINE> <INDENT> def __init__(self, xapids, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.it = enumerate(xapids) <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> rank, xapid = self.it.next() <NEW_LINE> msetitem = CacheMSetItem(self.context.conn, rank... | An iterator over a set of results from a search.
| 62599051e5267d203ee6cd9c |
class Pin(PinAPI): <NEW_LINE> <INDENT> __trigger__ = EDGE <NEW_LINE> def __init__(self, bank, index, soc_pin_number, direction=In, interrupt=None, pull=None): <NEW_LINE> <INDENT> super(Pin, self).__init__(None, index) <NEW_LINE> self._soc_pin_number = soc_pin_number <NEW_LINE> self._file = None <NEW_LINE> self._directi... | Controls a GPIO pin. | 62599051462c4b4f79dbceb2 |
class TestExportTaskException(TestCase): <NEW_LINE> <INDENT> fixtures = ("osm_provider.json", "datamodel_presets.json") <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> group, created = Group.objects.get_or_create(name="TestDefaultExportExtentGroup") <NEW_LINE> with patch("eventkit_cloud.jobs.signals.Group") as mock_gro... | Test cases for ExportTaskException model | 62599051a79ad1619776b515 |
@attr.s <NEW_LINE> class Sender(protocols.Filter[bytes, bytes]): <NEW_LINE> <INDENT> _logger = logging.getLogger(".".join((__name__, "Sender"))) <NEW_LINE> _buffer: channels.DequeChannel[bytes] = attr.ib( factory=channels.DequeChannel ) <NEW_LINE> def input(self, event: Optional[bytes]) -> None: <NEW_LINE> <INDENT> if ... | Generates the crc for incoming bytes data and attaches
the generated crc key to the message and returns it back. | 6259905176e4537e8c3f0a39 |
class PasswordField(TextField): <NEW_LINE> <INDENT> widget = widgets.PasswordInput() | A StringField, except renders an ``<input type="password">``.
Also, whatever value is accepted by this field | 6259905163b5f9789fe86620 |
class TestLookaside(Base): <NEW_LINE> <INDENT> expected_title = "git.lookaside.new" <NEW_LINE> expected_subti = 'jnovy uploaded pst-diffraction.doc.tar.xz for texlive' <NEW_LINE> expected_icon = "https://apps.fedoraproject.org/img/icons/git-logo.png" <NEW_LINE> expected_secondary_icon = "https://seccdn.libravatar.org/a... | Messages like this one are published when **new sources** are
uploaded to the "lookaside cache". | 625990518e71fb1e983bcf78 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.