code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class KerisWirelessWired(KerisWireless): <NEW_LINE> <INDENT> product_id = 0x195E | Keris Wireless in wired mode. | 625990832c8b7c6e89bd530a |
class MissingDataWarning(Warning): <NEW_LINE> <INDENT> pass | Warns when prerequisite data/files are not available. | 6259908363b5f9789fe86c8d |
class UserDefinedType(TypeEngine): <NEW_LINE> <INDENT> __visit_name__ = "user_defined" <NEW_LINE> def _adapt_expression(self, op, othertype): <NEW_LINE> <INDENT> return self.adapt_operator(op), self <NEW_LINE> <DEDENT> def adapt_operator(self, op): <NEW_LINE> <INDENT> return op | Base for user defined types.
This should be the base of new types. Note that
for most cases, :class:`TypeDecorator` is probably
more appropriate::
import sqlalchemy.types as types
class MyType(types.UserDefinedType):
def __init__(self, precision = 8):
self.precision = precision
def get_co... | 62599083796e427e5385029f |
class StackedInlineWithGeneric(BaseGenericModelAdmin, admin.StackedInline): <NEW_LINE> <INDENT> pass | "Normal stacked inline with a generic relation | 62599083283ffb24f3cf53c5 |
class MonitorData(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.Data = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.StartTime = params.get("StartTime") <NEW_LINE> self.EndTime = params... | 监控数据
| 62599083091ae35668706765 |
class HookMap(dict): <NEW_LINE> <INDENT> def __new__(cls, points=None): <NEW_LINE> <INDENT> d = dict.__new__(cls) <NEW_LINE> for p in points or []: <NEW_LINE> <INDENT> d[p] = [] <NEW_LINE> <DEDENT> return d <NEW_LINE> <DEDENT> def __init__(self, *a, **kw): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def attach(self, p... | A map of call points to lists of callbacks (Hook objects). | 62599083099cdd3c6367618c |
class OrientationClusterer: <NEW_LINE> <INDENT> time_stamp_format = '%H:%M:%S %m/%d/%Y' <NEW_LINE> def __init__(self, gmm, cluster_on=[""]): <NEW_LINE> <INDENT> self.gmm = gmm <NEW_LINE> self.accelerometer_data = self.get_accelerometer_data() <NEW_LINE> self.predictions = None <NEW_LINE> self.data_array = self.to_numpy... | Class for clustering accelerometer data and retrieving data | 62599083aad79263cf4302e0 |
class ContractReceiveRouteNew(StateChange): <NEW_LINE> <INDENT> def __init__( self, token_network_identifier: typing.TokenNetworkID, participant1: typing.Address, participant2: typing.Address, ): <NEW_LINE> <INDENT> if not isinstance(participant1, typing.T_Address): <NEW_LINE> <INDENT> raise ValueError('participant1 mu... | New channel was created and this node is NOT a participant. | 62599083283ffb24f3cf53c6 |
class AnonPermissionOnly(permissions.BasePermission): <NEW_LINE> <INDENT> message = "You are already authenticated. Please log out to try again" <NEW_LINE> def has_permission(self, request, view): <NEW_LINE> <INDENT> return not request.user.is_authenticated() | Non authenticated User Only | 625990837b180e01f3e49df7 |
class DeleteDisk(DiskCommand): <NEW_LINE> <INDENT> positional_args = '<disk-name-1> ... <disk-name-n>' <NEW_LINE> safety_prompt = 'Delete disk' <NEW_LINE> def __init__(self, name, flag_values): <NEW_LINE> <INDENT> super(DeleteDisk, self).__init__(name, flag_values) <NEW_LINE> <DEDENT> def Handle(self, *disk_names): <NE... | Delete one or more persistent disks.
Specify multiple disks as space-separated entries. If multiple disk names
are specified, the disks will be deleted in parallel. | 625990834527f215b58eb732 |
class Ship(object): <NEW_LINE> <INDENT> def __init__(self, ai_settings, screen): <NEW_LINE> <INDENT> self.screen = screen <NEW_LINE> self.ai_settings = ai_settings <NEW_LINE> self.image = pygame.image.load('images/ship.png') <NEW_LINE> self.rect = self.image.get_rect() <NEW_LINE> self.screen_rect = screen.get_rect() <N... | docstring | 625990834428ac0f6e65a054 |
class SubmissionErrorRecastMiddleware(object): <NEW_LINE> <INDENT> def process_exception(self, request, exception): <NEW_LINE> <INDENT> if isinstance(exception, SubmissionError) and not hasattr(SubmissionError, "response_data"): <NEW_LINE> <INDENT> raise StructuredException(code="SUBMISSION_ERROR", message=exception.me... | When this middleware sees a SubmissionError,
it adds a response_data field to it.
We do this instead of "monkey-patching" a response_data
property into SubmissionError. | 62599083d8ef3951e32c8bf1 |
class DelSubscriptionEventSubscriber(EventSubscriber): <NEW_LINE> <INDENT> event_id = DEL_SUBSCRIPTION_EVENT_ID | Event Notification Subscriber for Subscription Modifications.
The "origin" parameter in this class' initializer should be the dispatcher resource id (UUID). | 6259908392d797404e3898ef |
class ActiveBannerManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self, *args, **kwargs): <NEW_LINE> <INDENT> now = datetime.now() <NEW_LINE> return super(ActiveBannerManager, self). get_query_set(*args, **kwargs).filter(is_active=True) .filter(Q(end_date__gte=now) | Q(end_date_... | Queryset com o banner ativo (active=True) e datas de início e final,
válidas (de acordo com o número de dias definido pela assinatura). | 625990837cff6e4e811b7567 |
class FileParentIsNotInRevisionAncestryScenario(BrokenRepoScenario): <NEW_LINE> <INDENT> def all_versions_after_reconcile(self): <NEW_LINE> <INDENT> return (b'rev1a', b'rev2') <NEW_LINE> <DEDENT> def populated_parents(self): <NEW_LINE> <INDENT> return ( ((), b'rev1a'), ((), b'rev1b'), ((b'rev1a', b'rev1b'), b'rev2')) <... | A scenario where a revision 'rev2' has 'a-file' with a
parent 'rev1b' that is not in the revision ancestry.
Reconcile should remove 'rev1b' from the parents list of 'a-file' in
'rev2', preserving 'rev1a' as a parent. | 625990837d847024c075df04 |
class HideReferers(Transform): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.regexp = re.compile(r'href="(http[^"]+)"') <NEW_LINE> <DEDENT> def replace(self, match): <NEW_LINE> <INDENT> url = match.group(1) <NEW_LINE> scheme, host, path, parameters, query, fragment = urlparse.urlparse(url) <NEW_LINE>... | A transform that hides referers for external hyperlinks. | 6259908363b5f9789fe86c8f |
class RemoveLabelTransform(AbstractTransform): <NEW_LINE> <INDENT> def __init__(self, remove_label, replace_with=0, input_key="seg", output_key="seg"): <NEW_LINE> <INDENT> self.output_key = output_key <NEW_LINE> self.input_key = input_key <NEW_LINE> self.replace_with = replace_with <NEW_LINE> self.remove_label = remove... | Replaces all pixels in data_dict[input_key] that have value remove_label with replace_with and saves the result to
data_dict[output_key] | 62599083283ffb24f3cf53c7 |
class TestStripping(InvenioTestCase): <NEW_LINE> <INDENT> if UNIDECODE_AVAILABLE: <NEW_LINE> <INDENT> def test_text_to_ascii(self): <NEW_LINE> <INDENT> self.assertEqual(translate_to_ascii( ["á í Ú", "H\xc3\xb6hne", "Åge Øst Vær", "normal"]), ["a i U", "Hohne", "Age Ost Vaer", "normal"] ) <NEW_LINE> self.assertEqual(tra... | Test for stripping functions like accents and control characters. | 62599083aad79263cf4302e1 |
class Method(_TwincatProjectSubItem, _POUMember): <NEW_LINE> <INDENT> Implementation: list <NEW_LINE> Declaration: list <NEW_LINE> @property <NEW_LINE> def source_code(self): <NEW_LINE> <INDENT> return "\n".join( ( self.declaration, self.implementation, "END_METHOD", ) ) | [TcPOU] Code declaration for function block methods. | 62599083aad79263cf4302e2 |
class Solution: <NEW_LINE> <INDENT> def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int: <NEW_LINE> <INDENT> self.len_word = len(beginWord) <NEW_LINE> self.deq = deque() <NEW_LINE> self.history = set() <NEW_LINE> self.wordList = wordList <NEW_LINE> self.add2deq(beginWord, 1) <NEW_LINE> whil... | bfs | 62599083283ffb24f3cf53c8 |
class Store(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.data = {} <NEW_LINE> self.document = {} <NEW_LINE> <DEDENT> def configure(self, document): <NEW_LINE> <INDENT> self.document = document <NEW_LINE> <DEDENT> def count_matrixes(self): <NEW_LINE> <INDENT> return len(self.data) <NEW_LINE>... | Central collection of pipeline process data.
Attributes:
data (dict): the key is the matrix name and each value represents a list of stages. | 6259908355399d3f0562803c |
class BaseSinkAdapter(BaseFalcon): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> engines = { 'key': 'url' } <NEW_LINE> @abstractmethod <NEW_LINE> def __call__(self, req, resp, **kwargs): <NEW_LINE> <INDENT> pass | think this:
I want to get 3 results, but i only want to request 1 urls from client.
Sink Adapter can help us, translate 1 url -> 3 url by engines (dict), and
request them, get result and return. | 6259908350812a4eaa621958 |
class TestThreadLeakDetection(tests.TestCase): <NEW_LINE> <INDENT> class LeakRecordingResult(tests.ExtendedTestResult): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> tests.ExtendedTestResult.__init__(self, StringIO(), 0, 1) <NEW_LINE> self.leaks = [] <NEW_LINE> <DEDENT> def _report_thread_leak(self, test,... | Ensure when tests leak threads we detect and report it | 625990837c178a314d78e97e |
class EventLinks(flourish.page.RefineLinksViewlet): <NEW_LINE> <INDENT> pass | Manager for Action links in event views. | 6259908376e4537e8c3f10a7 |
class UsefulnessFactory(factory.django.DjangoModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Usefulness <NEW_LINE> <DEDENT> name = factory.Sequence(lambda n: 'usefulness%d' % n) <NEW_LINE> notes = factory.Faker('paragraph', nb_sentences=1) | Usefulness factory | 62599084283ffb24f3cf53c9 |
class WorkflowTriggerHistoryListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[WorkflowTriggerHistory]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(WorkflowTriggerHistoryListResu... | The list of workflow trigger histories.
:param value: A list of workflow trigger histories.
:type value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory]
:param next_link: The URL to get the next set of results.
:type next_link: str | 625990845fcc89381b266ef1 |
class MeterStatDict(UserDict): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> UserDict.__init__(self) <NEW_LINE> self._m1 = EWMA.oneMinute() <NEW_LINE> self._m5 = EWMA.fiveMinute() <NEW_LINE> self._m15 = EWMA.fifteenMinute() <NEW_LINE> self._meters = (self._m1, self._m5, self._m15) <NEW_LINE> TICKERS.appen... | Stores the meters for MeterStat. Expects to be ticked every 5 seconds. | 62599084283ffb24f3cf53ca |
class JobOffer(models.Model): <NEW_LINE> <INDENT> position = models.CharField(max_length=160) <NEW_LINE> description = MarkdownxField(blank=True, null=True) <NEW_LINE> slug = AutoSlugField(populate_from='position', unique=True) <NEW_LINE> entity = models.CharField(max_length=100) <NEW_LINE> location = models.CharField(... | Job offer item
position -
entity - entity offering the position
location - (blank) where the job is offered
published - boolean for the job to be listed on the website
date_created - (auto) date of inserting in the DB
gps_lat - GPS coordinates (for mapping purposes)
gps_lon - GPS coordinates (for mapping purposes)
fi... | 62599084ad47b63b2c5a937b |
class Lps141(base): <NEW_LINE> <INDENT> __tablename__ = 'lps141' <NEW_LINE> year = Column(CHAR,primary_key=True) <NEW_LINE> mq = Column(VARCHAR,primary_key=True) <NEW_LINE> kisc_code = Column(VARCHAR,primary_key=True) <NEW_LINE> ca_gva_index = Column(DOUBLE) <NEW_LINE> def __init__(self, year, mq, kisc_code, ca_gva_ind... | Value Add Index | 625990845fdd1c0f98e5faa9 |
class Test01_ReconnectLDAPObject(Test00_SimpleLDAPObject): <NEW_LINE> <INDENT> ldap_object_class = ReconnectLDAPObject <NEW_LINE> @requires_sasl() <NEW_LINE> @requires_ldapi() <NEW_LINE> def test101_reconnect_sasl_external(self): <NEW_LINE> <INDENT> l = self.ldap_object_class(self.server.ldapi_uri) <NEW_LINE> l.sasl_ex... | test ReconnectLDAPObject by restarting slapd | 62599084d8ef3951e32c8bf3 |
class PretrainedModelLoader: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._valid_models = [n for n, _ in inspect.getmembers(torchvision.models, inspect.isfunction)] <NEW_LINE> <DEDENT> @property <NEW_LINE> def model_names(self): <NEW_LINE> <INDENT> return self._valid_models <NEW_LINE> <DEDENT> def l... | Loads a pretrained model | 6259908492d797404e3898f1 |
class InstallCommand(InstallCommandBase): <NEW_LINE> <INDENT> def finalize_options(self): <NEW_LINE> <INDENT> ret = InstallCommandBase.finalize_options(self) <NEW_LINE> self.install_headers = os.path.join(self.install_purelib, 'tensorflow_core', 'include') <NEW_LINE> self.install_lib = self.install_platlib <NEW_LINE> r... | Override the dir where the headers go. | 625990847cff6e4e811b756b |
class GoodsSPU(BaseModel): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, verbose_name='商品SPU名称') <NEW_LINE> detail = HTMLField(verbose_name='商品详情', blank=True, null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> db_table = 'goods... | 商品SPU模型类 | 6259908499fddb7c1ca63b6f |
class Iris: <NEW_LINE> <INDENT> flowers = [] <NEW_LINE> labels = [] <NEW_LINE> threshold = 0 <NEW_LINE> def __init__(self, values, label): <NEW_LINE> <INDENT> self.values = values <NEW_LINE> self.label = label | Class to store a kind of Iris and it's values | 62599084e1aae11d1e7cf5a8 |
class TestExample(TestCase): <NEW_LINE> <INDENT> def test_add_positive(self): <NEW_LINE> <INDENT> self.assertEqual(5, add(2, 3)) | Tests of example module | 625990844a966d76dd5f0a10 |
class Subscription: <NEW_LINE> <INDENT> __slots__ = ('id', 'topic', 'active', 'session', 'handler') <NEW_LINE> def __init__(self, subscription_id, topic, session, handler): <NEW_LINE> <INDENT> self.id = subscription_id <NEW_LINE> self.topic = topic <NEW_LINE> self.active = True <NEW_LINE> self.session = session <NEW_LI... | Object representing a handler subscription. | 625990845fc7496912d49000 |
class SetWebProtectSwitchRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(SetWebProtectSwitchRequest, self).__init__( '/domain/{domain}/wafWebProtectSwitch', 'POST', header, version) <NEW_LINE> self.parameters = parameters | 设置web防护开关 | 625990845fdd1c0f98e5faaa |
class AlphaBetaPlayer(IsolationPlayer): <NEW_LINE> <INDENT> def get_move(self, game, time_left): <NEW_LINE> <INDENT> self.time_left = time_left <NEW_LINE> best_move = (-1, -1) <NEW_LINE> try: <NEW_LINE> <INDENT> depth = 0 <NEW_LINE> while True: <NEW_LINE> <INDENT> depth += 1 <NEW_LINE> best_move = self.alphabeta(game, ... | Game-playing agent that chooses a move using iterative deepening minimax
search with alpha-beta pruning. You must finish and test this player to
make sure it returns a good move before the search time limit expires. | 625990844527f215b58eb735 |
class S3Storage(BaseFileStorage): <NEW_LINE> <INDENT> def upload(self, filename, content, app): <NEW_LINE> <INDENT> new_file = CloudFile(name=filename, app=app) <NEW_LINE> conn = S3Connection(settings.AWS_ACCESS_KEY_ID, settings.AWS_SECRET_ACCESS_KEY) <NEW_LINE> key = new_file.get_upload_loc(filename) <NEW_LINE> if def... | Amazon S3 storage for app file uploads | 62599084bf627c535bcb2ffe |
class TestUserInfo(dict, Enum): <NEW_LINE> <INDENT> user1 = { 'username': 'foo', 'firstname': 'bar', 'lastname': 'User', 'keycloak_guid': uuid.uuid4() } | Test scenarios of user. | 625990845fdd1c0f98e5faab |
class Scene: <NEW_LINE> <INDENT> def __init__(self, store, painter, selection_store): <NEW_LINE> <INDENT> self.store = store <NEW_LINE> self.painter = painter <NEW_LINE> self.selection_store = selection_store <NEW_LINE> <DEDENT> def repaint(self): <NEW_LINE> <INDENT> self.painter.clear() <NEW_LINE> for object in self.s... | Класс сцены | 6259908497e22403b383ca29 |
class FactSheetHasPredecessor: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'ID': 'str', 'factSheetID': 'str', 'factSheetRefID': 'str', 'description': 'str', 'dependencyTypeID': 'str' } <NEW_LINE> self.ID = None <NEW_LINE> self.factSheetID = None <NEW_LINE> self.factSheetRefID = Non... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62599084656771135c48adc6 |
class MessageFailedException(TransportException): <NEW_LINE> <INDENT> pass | The transport has failed to deliver the message due to a problem with
the message itself, and no attempt should be made to retry delivery of
this message. The transport may still be re-used, however.
The reason for the failure should be the first argument. | 6259908444b2445a339b76f2 |
class CyberSourceTransaction(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, on_delete=models.CASCADE) <NEW_LINE> course = models.ForeignKey(Course, on_delete=models.CASCADE) <NEW_LINE> uuid = models.CharField(max_length=32) <NEW_LINE> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> retur... | Stores credit card transaction receipts made with CyberSource. | 62599084adb09d7d5dc0c086 |
class Meta: <NEW_LINE> <INDENT> app_label = "game" <NEW_LINE> verbose_name = "User Profile" | Metadata class for Player | 625990847c178a314d78e980 |
@inside_glslc_testsuite('Include') <NEW_LINE> class TestWrongPoundVersionInIncludingFile(expect.ValidObjectFileWithWarning): <NEW_LINE> <INDENT> environment = Directory('.', [ File('a.vert', '#version 100000000\n#include "b.glsl"\n'), File('b.glsl', 'void main() {}\n')]) <NEW_LINE> glslc_args = ['-c', 'a.vert'] <NEW_LI... | Tests that warning message for #version directive in the including file
has the correct filename. | 62599084283ffb24f3cf53cd |
class CambiarDireccionForm(forms.Form): <NEW_LINE> <INDENT> direccion = forms.ModelChoiceField(Direccion.objects.all()) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> usuario = kwargs.pop('usuario') <NEW_LINE> direccion_previa = kwargs.pop('direccion_previa') <NEW_LINE> super(CambiarDireccionForm, ... | CambiarDireccion form class. | 62599084e1aae11d1e7cf5a9 |
class TestLti1p3LaunchGateEndpoint(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.location = 'block-v1:course+test+2020+type@problem+block@test' <NEW_LINE> self.url = '/lti_consumer/v1/launch/' <NEW_LINE> self.request = {'login_hint': self.location} <NEW_LINE> xblock... | Test `launch_gate_endpoint` method. | 625990843617ad0b5ee07c7d |
class DescribeBanRegionsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RegionSet = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("RegionSet") is not None: <NEW_LINE> <INDENT> self.RegionSet = [] <NEW... | DescribeBanRegions返回参数结构体
| 62599084ad47b63b2c5a937f |
class CrcPURCHASE(db.Model): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> __tablename__ = 'crcPURCHASE' <NEW_LINE> id = db.Column(db.Integer(15, unsigned=True), nullable=False, primary_key=True, autoincrement=True) <NEW_LINE> id_bibrec = db.Column(db.MediumInteger(8, unsigned=Tru... | Represents a CrcPURCHASE record. | 6259908455399d3f05628042 |
class NoNameFoundError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message | No name was found for this entry | 6259908423849d37ff852be7 |
class EqualizedLinear(EqualizedLayer): <NEW_LINE> <INDENT> def __init__(self, dim_in, dim_out, equalized = True): <NEW_LINE> <INDENT> super(EqualizedLinear, self).__init__( nn.Linear(dim_in, dim_out), equalized ) | Linear layer with He's initialization | 625990842c8b7c6e89bd5313 |
class Kkma(): <NEW_LINE> <INDENT> def nouns(self, phrase): <NEW_LINE> <INDENT> nouns = self.jki.extractNoun(phrase) <NEW_LINE> if not nouns: return [] <NEW_LINE> return [nouns.get(i).getString() for i in range(nouns.size())] <NEW_LINE> <DEDENT> def pos(self, phrase, flatten=True): <NEW_LINE> <INDENT> sentences = self.j... | Wrapper for `Kkma <http://kkma.snu.ac.kr>`_.
Kkma is a morphological analyzer and natural language processing system written in Java, developed by the Intelligent Data Systems (IDS) Laboratory at `SNU <http://snu.ac.kr>`_.
.. code-block:: python
>>> from konlpy.tag import Kkma
>>> kkma = Kkma()
>>> print... | 62599084796e427e538502a9 |
class ExpressionEvaluationOptions(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'scope': {'key': 'scope', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, scope: Optional[Union[str, "ExpressionEvaluationOptionsScopeType"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(ExpressionEvaluationOption... | Specifies whether template expressions are evaluated within the scope of the parent template or nested template.
:ivar scope: The scope to be used for evaluation of parameters, variables and functions in a
nested template. Possible values include: "NotSpecified", "Outer", "Inner".
:vartype scope: str or
~azure.mgmt.... | 625990848a349b6b43687d8c |
class ImageSpec(BaseImageSpec): <NEW_LINE> <INDENT> processors = [] <NEW_LINE> format = None <NEW_LINE> options = None <NEW_LINE> autoconvert = True <NEW_LINE> def __init__(self, source): <NEW_LINE> <INDENT> self.source = source <NEW_LINE> super(ImageSpec, self).__init__() <NEW_LINE> <DEDENT> @property <NEW_LINE> def c... | An object that defines how to generate a new image from a source file using
PIL-based processors. (See :mod:`imagekit.processors`) | 625990847b180e01f3e49dfc |
class Sky2Pix_TAN(Sky2PixProjection, Zenithal): <NEW_LINE> <INDENT> @property <NEW_LINE> def inverse(self): <NEW_LINE> <INDENT> return Pix2Sky_TAN() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def evaluate(cls, phi, theta): <NEW_LINE> <INDENT> phi = np.deg2rad(phi) <NEW_LINE> theta = np.deg2rad(theta) <NEW_LINE> r_thet... | TAN : Gnomonic Projection - sky to pixel. | 6259908423849d37ff852be9 |
class SpellRecords(_UsesEffectsMixin): <NEW_LINE> <INDENT> _extra_attrs = (u'flags.noAutoCalc', u'flags.startSpell', u'flags.immuneToSilence', u'flags.ignoreLOS', u'flags.scriptEffectAlwaysApplies', u'flags.disallowAbsorbReflect', u'flags.touchExplodesWOTarget') <NEW_LINE> _csv_attrs = (u'eid', u'cost', u'level', u'spe... | Statistics for spells, with functions for importing/exporting from/to
mod/text file. | 6259908499fddb7c1ca63b72 |
@doc_subst(_doc_snippets) <NEW_LINE> class LineOptions(HasTraits): <NEW_LINE> <INDENT> stroke_color = geotraitlets.ColorAlpha( allow_none=False, default_value=DEFAULT_STROKE_COLOR ).tag(sync=True) <NEW_LINE> stroke_weight = Float( min=0.0, allow_none=False, default_value=2.0 ).tag(sync=True) <NEW_LINE> stroke_opacity =... | Style options for a line
Pass an instance of this class to :func:`gmaps.drawing_layer` to
control the style of new user-drawn lines on the map.
:Examples:
>>> fig = gmaps.figure()
>>> drawing = gmaps.drawing_layer(
marker_options=gmaps.MarkerOptions(hover_text='some text'),
line_options=gmaps.LineOpt... | 62599084099cdd3c63676192 |
class SupportEngineer(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'email_address': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'email_address': {'key': 'emailAddress', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(SupportEngineer, self).__init__(**kw... | Support engineer information.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar email_address: Email address of the Azure Support engineer assigned to the support
ticket.
:vartype email_address: str | 62599084aad79263cf4302eb |
class PageListShop(PageList): <NEW_LINE> <INDENT> def __init__(self, win, api, set_statusbar, page): <NEW_LINE> <INDENT> page_name = page[0] <NEW_LINE> col_category = page[1] <NEW_LINE> col_category_json = page[2] <NEW_LINE> view_cols = [ ["Date", 9, 'date', 'd'], ["Item", 25, 'item', 'i'], [col_category, 20, 'category... | used for things like food, socials etc. | 62599084dc8b845886d550eb |
class Location: <NEW_LINE> <INDENT> def __init__(self, data: dict) -> None: <NEW_LINE> <INDENT> self.code = data["LocationCode"] <NEW_LINE> self.point = geopy.Point(data["Latitude"], data["Longitude"]) <NEW_LINE> self.facility_owned = bool(data["FacilityOwnedByCarvana"]) <NEW_LINE> self.trips = [] <NEW_LINE> self.visit... | The Node/Vertex of the graph.
Contains an adjacency list stored in the `trips` attribute used to build the
adjacency graph. Also has a `visited` attribute used in the search to avoid
cycles. | 62599084283ffb24f3cf53d2 |
class Rectangle: <NEW_LINE> <INDENT> number_of_instances = 0 <NEW_LINE> def __init__(self, width=0, height=0): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> Rectangle.number_of_instances += 1 <NEW_LINE> <DEDENT> @property <NEW_LINE> def width(self): <NEW_LINE> <INDENT> return self.__... | Show the attribute of rectangle | 625990847047854f46340ee7 |
class Status(NamedTuple): <NEW_LINE> <INDENT> instance_name: str <NEW_LINE> driver_name: str <NEW_LINE> provisioner_name: str <NEW_LINE> scenario_name: str <NEW_LINE> created: bool <NEW_LINE> converged: bool | Scenario status information. | 62599084ec188e330fdfa3de |
class _SlotPriorityQueues(object): <NEW_LINE> <INDENT> def __init__(self, pqfactory, slot_startprios=None): <NEW_LINE> <INDENT> self.pqfactory = pqfactory <NEW_LINE> self.pqueues = {} <NEW_LINE> for slot, startprios in (slot_startprios or {}).items(): <NEW_LINE> <INDENT> self.pqueues[slot] = self.pqfactory(startprios) ... | Container for multiple priority queues. | 62599084283ffb24f3cf53d3 |
class SimpleHistoryOneToOneField(OneToOneField): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> sh_to_field = kwargs.pop("sh_to_field",None) <NEW_LINE> if sh_to_field is not None: <NEW_LINE> <INDENT> self.sh_to_field = sh_to_field <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise ValueEr... | Allows a OneToOneField to work when
'to' is a string
Kwarg 'sh_to_field' should be a field instance
with the same arguments as the 'to' field. | 625990845fdd1c0f98e5fab3 |
class Almost: <NEW_LINE> <INDENT> def __init__(self, value, offset=0.00001): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.offset = offset <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return abs(other - self.value) < self.offset | Compares a float value with a certain jitter.
| 6259908497e22403b383ca2f |
class TestCLIInitDb(BaseTest): <NEW_LINE> <INDENT> def test_init_db(self): <NEW_LINE> <INDENT> runner = CliRunner() <NEW_LINE> result = runner.invoke( init_db_cli, catch_exceptions=False, ) <NEW_LINE> self.assertEqual(result.exit_code, 0) | Test case for init_db_cli cli method. | 6259908423849d37ff852bed |
class CategorymanagerAssetsAnnotationTagsListRequest(_messages.Message): <NEW_LINE> <INDENT> name = _messages.StringField(1, required=True) <NEW_LINE> pageSize = _messages.IntegerField(2, variant=_messages.Variant.INT32) <NEW_LINE> pageToken = _messages.StringField(3) <NEW_LINE> subAssetName = _messages.StringField(4) | A CategorymanagerAssetsAnnotationTagsListRequest object.
Fields:
name: [Required] Resource name of the asset, must be RFC3986 escaped.
pageSize: The maximum number of items to return.
pageToken: The next_page_token value returned from a previous List
request, if any.
subAssetName: A finer grained sub asset... | 62599084adb09d7d5dc0c08e |
class SatelliteSchema(Schema): <NEW_LINE> <INDENT> id = fields.Int(dump_only=True) <NEW_LINE> timestamp = fields.DateTime(dump_only=True) <NEW_LINE> sets = fields.Nested(SetSchema, many=True) | Satellite Schema | 6259908463b5f9789fe86c9d |
class Menu: <NEW_LINE> <INDENT> def __init__(self, name, items, start_time, end_time): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.items = items <NEW_LINE> self.start_time = start_time <NEW_LINE> self.end_time = end_time <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "{name} menu available ... | Class that represents a restaraunt menu. | 62599084796e427e538502af |
class CustomToken(Base): <NEW_LINE> <INDENT> _CREDENTIAL_TYPE = 'authorized_user' <NEW_LINE> def __init__(self, token, project_id): <NEW_LINE> <INDENT> super(CustomToken, self).__init__() <NEW_LINE> self._project_id = project_id <NEW_LINE> self._g_credential = credentials.Credentials(token=token, scopes=_scopes) <NEW_L... | A credential initialized from an existing refresh token. | 625990847047854f46340ee9 |
class SnmpManagerPost(object): <NEW_LINE> <INDENT> swagger_types = { 'host': 'str', 'notification': 'str', 'v2c': 'SnmpV2c', 'v3': 'SnmpV3Post', 'version': 'str' } <NEW_LINE> attribute_map = { 'host': 'host', 'notification': 'notification', 'v2c': 'v2c', 'v3': 'v3', 'version': 'version' } <NEW_LINE> required_args = { }... | Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62599084ec188e330fdfa3e0 |
class TopRecipientOrganizationsResultSet(ResultSet): <NEW_LINE> <INDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | Retrieve the value for the "Response" output from this choreography execution. ((json) The response from Influence Explorer.) | 6259908426068e7796d4e476 |
class ScalarLocalBasis(ScalarNode): <NEW_LINE> <INDENT> def __new__(cls, u=None, v=None, tag=None): <NEW_LINE> <INDENT> tag = tag or random_string( 6 ) <NEW_LINE> obj = Basic.__new__(cls, tag) <NEW_LINE> obj._test = v <NEW_LINE> obj._trial = u <NEW_LINE> return obj <NEW_LINE> <DEDENT> @property <NEW_LINE> def tag(se... | This is used to describe scalar dof over an element | 6259908450812a4eaa62195f |
class HasFile(): <NEW_LINE> <INDENT> def __init__(self, filefield): <NEW_LINE> <INDENT> self.filefield = filefield <NEW_LINE> <DEDENT> def __call__(self, form, field): <NEW_LINE> <INDENT> filename = form._fields.get(self.filefield).data.filename.strip() <NEW_LINE> if len(filename) == 0: <NEW_LINE> <INDENT> raise Valida... | Validator to check if the form has a file in a given field | 6259908423849d37ff852bef |
class ExactInference(InferenceModule): <NEW_LINE> <INDENT> def initializeUniformly(self, gameState): <NEW_LINE> <INDENT> self.beliefs = util.Counter() <NEW_LINE> for p in self.legalPositions: self.beliefs[p] = 1.0 <NEW_LINE> self.beliefs.normalize() <NEW_LINE> <DEDENT> def observe(self, observation, gameState): <NEW_LI... | The exact dynamic inference module should use forward-algorithm
updates to compute the exact belief function at each time step. | 62599084a05bb46b3848bec2 |
class VisualTreeChangeType(Enum,IComparable,IFormattable,IConvertible): <NEW_LINE> <INDENT> def __eq__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __format__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __ge__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __gt__(self,*... | enum VisualTreeChangeType,values: Add (0),Remove (1) | 6259908471ff763f4b5e92e2 |
class PythonRunner(): <NEW_LINE> <INDENT> def __init__(self, module_string, args, func_name='execute'): <NEW_LINE> <INDENT> assert isinstance(args, dict), ('Args must be a dict, ' '%s (%s) found instead' % (args, type(args))) <NEW_LINE> module, module_name = locate_module(module_string) <NEW_LINE> timestamp = datetime.... | Wrapper object for the executor class
* Loads the target module
* Creates the output workspace
* Runs the executor
* contains communicator event objects that other functions can register
with. | 62599084adb09d7d5dc0c090 |
class _Connection_Pool( object ): <NEW_LINE> <INDENT> _defpoolsize = 2 <NEW_LINE> _logmode = MythLog.SOCKET <NEW_LINE> @classmethod <NEW_LINE> def setDefaultSize(cls, size): <NEW_LINE> <INDENT> cls._defpoolsize = size <NEW_LINE> <DEDENT> def resizePool(self, size): <NEW_LINE> <INDENT> if size < 1: <NEW_LINE> <INDENT> s... | Provides a scaling connection pool to access a shared resource. | 62599084aad79263cf4302f1 |
class MainPage(Handler): <NEW_LINE> <INDENT> def render_posts(self, title="", blogtext="", error=""): <NEW_LINE> <INDENT> blogs = db.GqlQuery("SELECT * FROM BlogDB ORDER BY created DESC LIMIT 5") <NEW_LINE> self.render("posts.html", title=title, blogtext=blogtext, error=error, blogs=blogs) <NEW_LINE> <DEDENT> def get(s... | handles the first page | 625990845fdd1c0f98e5fab6 |
class UnorderedList(Base): <NEW_LINE> <INDENT> def __init__(self, raw, parsed_blocks_list, style_cls): <NEW_LINE> <INDENT> super(UnorderedList, self).__init__(raw, style_cls) <NEW_LINE> self.parsed_blocks_list = parsed_blocks_list <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def parse(cls, raw, style_cls): <NEW_LINE> <I... | Implements parsing for the following block format.
* Item 1
* Item 2
* Item 3 | 625990844c3428357761bdf1 |
class Operation(Loggable): <NEW_LINE> <INDENT> name = dict( type = "text" ) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.name = "Transaction" | The operation entity class, representing a logical
operation and attributes. | 6259908492d797404e3898f8 |
class Asyncer: <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> <DEDENT> async def _a_func(self, *args): <NEW_LINE> <INDENT> return self.func(*args) <NEW_LINE> <DEDENT> async def _async_tasker(self, args): <NEW_LINE> <INDENT> tasks = [asyncio.ensure_future(self._a_func(*arg)... | Основной и единственный класс в модуле. | 6259908471ff763f4b5e92e4 |
class Nice(Strategy): <NEW_LINE> <INDENT> def decide(self, _): <NEW_LINE> <INDENT> return coop() if rnd(3) else defeat() | Cooperates (almost) always. | 6259908444b2445a339b76f8 |
class TestParameterLambdaRuntime(BaseRuleTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestParameterLambdaRuntime, self).setUp() <NEW_LINE> self.collection.register(LambdaRuntime()) <NEW_LINE> <DEDENT> def atest_file_positive(self): <NEW_LINE> <INDENT> self.helper_file_positive() <NEW_LINE> ... | Test template parameter configurations | 62599084283ffb24f3cf53d8 |
class ConvLayer(object): <NEW_LINE> <INDENT> def __init__(self, rng, input, filter_shape, image_shape, activation=None, W_values=None, b_values=None, use_adam=False): <NEW_LINE> <INDENT> assert image_shape[1] == filter_shape[1] <NEW_LINE> self.input = input <NEW_LINE> "fan_in - #of input to convolution layer = #of inpu... | Convolution Layer
| 62599084adb09d7d5dc0c092 |
class Mode_Countdown(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, tb, hosts, set_current_mode, choreography): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.tb = tb <NEW_LINE> self.hosts = hosts <NEW_LINE> self.mode_names = settings.Game_Modes <NEW_LINE> self.set_current_mode = set_cur... | This class watches for incoming messages
Its only action will be to change the current mode | 62599084d486a94d0ba2daee |
class Ordering: <NEW_LINE> <INDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if not isinstance(other, Ordering): <NEW_LINE> <INDENT> other = self.literal(value=other) <NEW_LINE> <DEDENT> return self.operator(evaluator=operator.eq, operands=(self, other)) <NEW_LINE> <DEDENT> __hash__ = object.__hash__ <NEW_LINE> def... | This is a mix-in class that traps comparisons
The point is to redirect comparisons among instances of subclasses of {Ordering} to methods
defined in these subclasses. These methods then build and return representations of the
corresponding operators and their operands.
{Ordering} expects its subclasses to define two ... | 62599084167d2b6e312b8332 |
class ZMQClientBaseTest(BaseClientTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = ZMQClientBase(ENDPOINT_CLIENT_HANDLER, ENDPOINT_PUBLISHER) <NEW_LINE> self.server = Server(ENDPOINT_APPLICATION_HANDLER, ENDPOINT_CLIENT_HANDLER, ENDPOINT_PUBLISHER) <NEW_LINE> <DEDENT> def test___init__(self... | Test suite for zmq_transport.client.zmq_client.ZMQClientBase | 625990845fcc89381b266ef9 |
class AddPetForm(FlaskForm): <NEW_LINE> <INDENT> name = StringField("Pet Name", validators = [InputRequired()]) <NEW_LINE> photo_url = StringField("Photo URL", validators = [Optional(), URL()]) <NEW_LINE> age = IntegerField("Age", validators = [Optional()]) <NEW_LINE> notes = TextAreaField("Notes", validators = [Option... | Form for adding pets | 625990847047854f46340eed |
class SmartServerRepositoryGetPhysicalLockStatus(SmartServerRepositoryRequest): <NEW_LINE> <INDENT> def do_repository_request(self, repository): <NEW_LINE> <INDENT> if repository.get_physical_lock_status(): <NEW_LINE> <INDENT> return SuccessfulSmartServerResponse((b'yes', )) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT... | Get the physical lock status for a repository.
New in 2.5. | 62599084aad79263cf4302f3 |
class SingleOccurrenceForm(DorsaleBaseModelForm): <NEW_LINE> <INDENT> start_time = forms.DateTimeField(widget=SplitDateTimeWidget, localize=True, label=_('start time')) <NEW_LINE> start_time.help_text = _('-') <NEW_LINE> end_time = forms.DateTimeField(widget=SplitDateTimeWidget, localize=True, label=_('end time')) <NEW... | A simple form for adding and updating single Occurrence attributes
Required keyword parameter: `user` | 625990844527f215b58eb73c |
class PdfGeneratorUncorrelated(PdfGeneratorBase): <NEW_LINE> <INDENT> def process(self, source_map): <NEW_LINE> <INDENT> source_map_local = source_map.map[:, 0, :] <NEW_LINE> source_map_local[:] = 0 <NEW_LINE> ls = source_map.map.local_shape[0] <NEW_LINE> gs = source_map.map.global_shape[0] <NEW_LINE> z_weights = mpiar... | Generate uniform PDF for making uncorrelated mocks. | 625990845fdd1c0f98e5fab9 |
class BusQueryIntent(Intent): <NEW_LINE> <INDENT> def __init__(self, dictionary = None): <NEW_LINE> <INDENT> if dictionary is not None: <NEW_LINE> <INDENT> self.origin = None <NEW_LINE> self.destination = None <NEW_LINE> self.route = None <NEW_LINE> entities = dictionary.get("entities", {}) <NEW_LINE> stops = entities.... | Represents a Bus query intent | 6259908455399d3f0562804e |
class passivecoldhead(): <NEW_LINE> <INDENT> def gettemps(self): <NEW_LINE> <INDENT> a = self.serial.readline() <NEW_LINE> self.temperatures = [float(a[i:i+5].decode('utf-8')) for i in [0,6,12,18]] <NEW_LINE> self._t = time.time() <NEW_LINE> <DEDENT> def mean_temp(self): <NEW_LINE> <INDENT> if (time.time()-self._t)>1: ... | Class to get the mean temperature from a Serial connection to Arduino Nano. | 6259908471ff763f4b5e92e6 |
class GitPersonInfo(Info): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = None <NEW_LINE> self.email = None <NEW_LINE> self.date = None <NEW_LINE> self.timezone = None <NEW_LINE> <DEDENT> def tokenize(self): <NEW_LINE> <INDENT> yield Token.Text, self.name <NEW_LINE> yield Token.Whitespace, ' ' ... | A git person object. | 625990842c8b7c6e89bd531f |
class AbstractProjectFavorite(AbstractTimeStamped): <NEW_LINE> <INDENT> user = models.ForeignKey(User) <NEW_LINE> project = models.ForeignKey('Project') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> unique_together = ('user', 'project') | Project favourite by an User | 6259908476e4537e8c3f10b9 |
class TroveSpecError(ParseError): <NEW_LINE> <INDENT> def __init__(self, spec, error): <NEW_LINE> <INDENT> self.spec = spec <NEW_LINE> ParseError.__init__(self, 'Error with spec "%s": %s' % (spec, error)) | Error parsing a trove spec (parseTroveSpec or TroveSpec) | 625990843346ee7daa3383ff |
class replaceeProp(SchemaProperty): <NEW_LINE> <INDENT> _prop_schema = 'replacee' <NEW_LINE> _expected_schema = 'Thing' <NEW_LINE> _enum = False <NEW_LINE> _format_as = "TextField" | SchemaField for replacee
Usage: Include in SchemaObject SchemaFields as your_django_field = replaceeProp()
schema.org description:A sub property of object. The object that is being replaced.
prop_schema returns just the property without url#
format_as is used by app templatetags based upon schema.org datatype
used t... | 6259908450812a4eaa621962 |
class McDatabaseHandlerException(Exception): <NEW_LINE> <INDENT> pass | Database handler exception. | 6259908444b2445a339b76fa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.