code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Remove(ItemGiver): <NEW_LINE> <INDENT> def __init__(self, item, value=no.Constant(1)): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def give(self, character): <NEW_LINE> <INDENT> character.remove(self.item, self.value.get_value(character))
Remove an item.
62598f656e29344779affd10
class Subsets(Input): <NEW_LINE> <INDENT> def __init__(self, name, inputs): <NEW_LINE> <INDENT> self._inputs = inputs <NEW_LINE> self._options = [] <NEW_LINE> for k in range(len(inputs) + 1): <NEW_LINE> <INDENT> self._recurse(inputs, [], depth=0, max_depth=k) <NEW_LINE> <DEDENT> Input.__init__(self, name, self._options...
This class allows all combinations of a particular set of values to be chosen, including, no values, individual values, pairs of values, triplets of values etc.
62598f65a8ecb033258708bb
class Idiom(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=512, null=True) <NEW_LINE> meaning = models.TextField(null=True) <NEW_LINE> examples = models.TextField(null=True) <NEW_LINE> def set_examples(self, eg): <NEW_LINE> <INDENT> self.examples = json.dumps(eg) <NEW_LINE> <DEDENT> def get_exam...
Model to store the idiom, proverb or phrase
62598f6521a7993f00c65630
class LocationTimeOffRequest(Resource): <NEW_LINE> <INDENT> PATH = "organizations/{organization_id}/locations/{location_id}/timeoffrequests/"
this is only a get collection endpoint
62598f658c3a8732951f5c08
class NoneRemoveFirst(NoneRemoveAll): <NEW_LINE> <INDENT> grok.name('remove-first')
Remove first for None.
62598f65d10714528d69d584
class SHSSD(PoundSeparatedCommand): <NEW_LINE> <INDENT> pass
set handset side tone.
62598f6530c21e258be97eb5
class CourseListTestMixin(CourseApiTestMixin): <NEW_LINE> <INDENT> def _make_api_call(self, requesting_user, specified_user, org=None, filter_=None): <NEW_LINE> <INDENT> request = Request(self.request_factory.get('/')) <NEW_LINE> request.user = requesting_user <NEW_LINE> with check_mongo_calls(0): <NEW_LINE> <INDENT> r...
Common behavior for list_courses tests
62598f65d164cc6175820631
class Scene: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.camera = Camera(True, 640, 480) <NEW_LINE> self.objects = [] <NEW_LINE> <DEDENT> def add_object(self, obj): <NEW_LINE> <INDENT> if obj not in self.objects: <NEW_LINE> <INDENT> self.objects.append(obj) <NEW_LI...
Scene class. It handles a scene, storing a list of objects and a camera/viewpoint
62598f6526238365f5fac22e
class VolumePath(basestring): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_api_name(): <NEW_LINE> <INDENT> return "volume-path"
Volume path name
62598f6591af0d3eaad394c1
class PluginError(LivecliError): <NEW_LINE> <INDENT> pass
Plugin related error.
62598f651f5feb6acb1622f2
class Page(object): <NEW_LINE> <INDENT> id = None <NEW_LINE> query_string_key = 'page' <NEW_LINE> __parts = None <NEW_LINE> def __init__(self, id): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self._parts[self.query_string_key] = self.id <NEW_LINE> <DEDENT> @property <NEW_LINE> def query_string(self): <NEW_LINE> <INDENT...
A single page object that is returned from the paginator. Provides the ability to automatically generate a query string.
62598f650a366e3fb87dc079
class Challenge(models.Model): <NEW_LINE> <INDENT> title = models.CharField(u'Titel', max_length=100, help_text="Bitte einen Titel für die Challenge eingeben (mit max. 100 Zeichen).") <NEW_LINE> questions = models.ManyToManyField(Question, verbose_name=u'Fragen', limit_choices_to={'published': True}, help_text="Bitte h...
Challenge model.
62598f6576d4e153a661c2cd
class itkRescaleIntensityImageFilterIUL3IUL3_Superclass(itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IUL3): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constr...
Proxy of C++ itkRescaleIntensityImageFilterIUL3IUL3_Superclass class
62598f6530c21e258be97eb6
class ResponseRedirection(Response): <NEW_LINE> <INDENT> pass
A base class for all 3xx responses.
62598f650383005118f6cdc2
class Alias(WrapperBase): <NEW_LINE> <INDENT> def __init__(self, file_path, in_file_path, typ): <NEW_LINE> <INDENT> self.klass = self.__class__.__name__ <NEW_LINE> self.file_path = file_path <NEW_LINE> self.in_file_path = in_file_path <NEW_LINE> self.name = in_file_path.split('/')[-1] <NEW_LIN...
Alias of a non-loaded histogram on disk. :param file_path: str, path to root file :param in_file_path: str, path to ROOT-object within the root file. :param typ: str, classname of the root object
62598f65d164cc6175820632
class FriendLink(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'friendlinks' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> anchor = db.Column(db.String(64), nullable=False) <NEW_LINE> title = db.Column(db.String(128)) <NEW_LINE> url = db.Column(db.String(255), nullable=False) <NEW_LINE> actived = ...
ссылки на друзей (связи)
62598f6521bff66bcd722314
class I2C_QTPY(I2C): <NEW_LINE> <INDENT> def __init__(self, scl, sda, *, frequency=100000): <NEW_LINE> <INDENT> index = None <NEW_LINE> if scl.id == 25 and sda.id == 24: <NEW_LINE> <INDENT> index = 0 <NEW_LINE> <DEDENT> if scl.id == 23 and sda.id == 22: <NEW_LINE> <INDENT> index = 1 <NEW_LINE> <DEDENT> if index is None...
I2C Class for QT Py 2if
62598f6530c21e258be97eb7
class ratelimit(object): <NEW_LINE> <INDENT> minutes = 2 <NEW_LINE> requests = 20 <NEW_LINE> prefix = 'rl-' <NEW_LINE> expire_after = (minutes + 1) * 60 <NEW_LINE> def __init__(self, **options): <NEW_LINE> <INDENT> for key, value in options.items(): <NEW_LINE> <INDENT> setattr(self, key, value) <NEW_LINE> <DEDENT> <DED...
Instances of this class can be used as decorators
62598f6563f4b57ef00858cc
class CloudStorage(Storage, BlobstoreUploadMixin): <NEW_LINE> <INDENT> write_options = None <NEW_LINE> def __init__(self, bucket=None, google_acl=None): <NEW_LINE> <INDENT> if not bucket: <NEW_LINE> <INDENT> bucket = get_bucket_name() <NEW_LINE> <DEDENT> self.bucket = bucket <NEW_LINE> self._bucket_prefix_len = len(buc...
Google Cloud Storage backend, set this as your default backend for ease of use, you can specify and non-default bucket in the constructor. You can modify objects access control by changing google_acl attribute to one of mentioned by docs (XML column): https://cloud.google.com/storage/docs/access-control?hl=en#predefin...
62598f6591af0d3eaad394c3
class Chebyshev1D(_PolyDomainWindow1D): <NEW_LINE> <INDENT> n_inputs = 1 <NEW_LINE> n_outputs = 1 <NEW_LINE> _separable = True <NEW_LINE> def __init__(self, degree, domain=None, window=None, n_models=None, model_set_axis=None, name=None, meta=None, **params): <NEW_LINE> <INDENT> super().__init__(degree, domain=domain, ...
Univariate Chebyshev series. It is defined as: .. math:: P(x) = \sum_{i=0}^{i=n}C_{i} * T_{i}(x) where ``T_i(x)`` is the corresponding Chebyshev polynomial of the 1st kind. For explanation of ```domain``, and ``window`` see :ref:`Notes regarding usage of domain and window <domain-window-note>`. Parameters ---...
62598f6576d4e153a661c2cf
class Scoreboard(): <NEW_LINE> <INDENT> def __init__(self, ai_setting, screen, stats): <NEW_LINE> <INDENT> self.ai_settings = ai_setting <NEW_LINE> self.screen = screen <NEW_LINE> self.screen_rect = screen.get_rect() <NEW_LINE> self.stats = stats <NEW_LINE> self.text_color = (30, 30, 30) <NEW_LINE> self.font = pygame.f...
显示得分信息的类
62598f650383005118f6cdc4
class Application: <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self._ip = config['host'] <NEW_LINE> <DEDENT> def state(self, app): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> response = requests.get(APP_URL_FORMAT.format(self._ip, APPS[app]), timeout=0.2) <NEW_LINE> return response.content.deco...
Handle applications.
62598f655e10d32532ce3446
class TestImageToWordsWithLocationResult(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 testImageToWordsWithLocationResult(self): <NEW_LINE> <INDENT> pass
ImageToWordsWithLocationResult unit test stubs
62598f65a8ecb033258708bf
class ADS1115(ADS1x15): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ADS1115, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def _data_rate_default(self): <NEW_LINE> <INDENT> return 128 <NEW_LINE> <DEDENT> def _data_rate_config(self, data_rate): <NEW_LINE> <INDENT> if data_rat...
ADS1115 16-bit analog to digital converter instance.
62598f65d99f1b3c44d04d6f
class InputInitMasses(InputInitPositions): <NEW_LINE> <INDENT> attribs = deepcopy(InputInitPositions.attribs) <NEW_LINE> default_label = "INITMASSES" <NEW_LINE> default_help = "This is the class to initialize atomic masses."
Class to handle initialization of the masses.
62598f65ac7a0e7691f71bcd
@skip_unless_lms <NEW_LINE> class TestHubspotSyncCommand(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(TestHubspotSyncCommand, cls).setUpClass() <NEW_LINE> cls.site_config = SiteConfigurationFactory() <NEW_LINE> cls.hubspot_site_config = SiteConfigurationFactory.c...
Test sync_hubspot_contacts management command.
62598f65507cdc57c63a4458
class Message(models.Model): <NEW_LINE> <INDENT> sent_to = models.ForeignKey(EmailAddress) <NEW_LINE> message = models.TextField()
This model is used to test the behavior of ``save_formset_deletion_allowed_if_only``. The presence of message instances should protect email addresses from getting deleted.
62598f65287bf620b6271277
class EmployeeTrainingFactory(factory.django.DjangoModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = EmployeeTraining <NEW_LINE> <DEDENT> training_id = factory.Iterator(TrainingProgram.objects.all()) <NEW_LINE> employee_id = factory.Iterator(Employee.objects.all())
This class creates data for the employee-training table in the API's database. ----Fields---- training_id(Iterator[TrainingProgram]): fake foreign key linked to the training program table employee_id(Iterator[Employee]): fake foreign key linked to the employee table Author: Blaise Roberts
62598f65d164cc6175820635
class ScheduledCall(Model): <NEW_LINE> <INDENT> collection_name = 'scheduled_calls' <NEW_LINE> unique_indices = () <NEW_LINE> search_indices = ('serialized_call_request.tags', 'last_run', 'next_run') <NEW_LINE> def __init__(self, call_request, schedule, failure_threshold=None, last_run=None, enabled=True): <NEW_LINE> <...
Serialized scheduled call request
62598f65d10714528d69d588
class Negate(object): <NEW_LINE> <INDENT> def compare(self, *args, **opts): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return not super(Negate, self).compare(*args, **opts) <NEW_LINE> <DEDENT> except AssertionError: <NEW_LINE> <INDENT> return True
Mixin class that negates the results of :meth:`compare` from the parent class.
62598f658c3a8732951f5c0c
class Hidden(Text, forms.Hidden): <NEW_LINE> <INDENT> pass
Field representing ``<input type="hidden">``
62598f6556b00c62f0fb1f70
class MapSum2: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.root = TrieNode() <NEW_LINE> <DEDENT> def insert(self, key: str, val: int) -> None: <NEW_LINE> <INDENT> curr = self.root <NEW_LINE> for char in key: <NEW_LINE> <INDENT> if char not in curr.edges: <NEW_LINE> <INDENT> curr.edges[char] = TrieN...
Trie (prefix tree) approach Runtime: 68 ms, faster than 5.91% of Python3 Memory Usage: 14.6 MB, less than 6.25% of Python3
62598f651d351010ab8f31ff
class IsOwnerOrReadOnly(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> if request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return obj.owner == request.user
Custom permissins to only allow owners of an object ot edit it
62598f6591af0d3eaad394c5
class LogTickFormatter(TickFormatter): <NEW_LINE> <INDENT> pass
Format ticks as powers of 10. Often useful in conjuction with a `LogTicker`
62598f659b70327d1c57e464
class ResultList(list): <NEW_LINE> <INDENT> def __init__(self, data, total_count, offset): <NEW_LINE> <INDENT> super(ResultList, self).__init__(data) <NEW_LINE> self.total_count = total_count <NEW_LINE> self.offset = offset
List with additional attributes representing a partial list of objects that exist in the cloud. total_count: Count of all objects that exist. offset: Starting index of this slice of results.
62598f65287bf620b6271279
class SubRows(object): <NEW_LINE> <INDENT> def __init__(self, numCols): <NEW_LINE> <INDENT> self.numCols = numCols <NEW_LINE> self.rows = [] <NEW_LINE> <DEDENT> def addRow(self, row): <NEW_LINE> <INDENT> assert(len(row) == self.numCols) <NEW_LINE> self.rows.append(row) <NEW_LINE> <DEDENT> def getNumRows(self): <NEW_LIN...
Object used to specify a set of sub-rows. Indicates number of columns occupied, which is need for laying out.
62598f655166f23b2e242a97
class NAppDirListener(RegexMatchingEventHandler): <NEW_LINE> <INDENT> regexes = [re.compile(r".*\/kytos\/napps\/[a-zA-Z][^/]+\/[a-zA-Z].*")] <NEW_LINE> ignore_regexes = [re.compile(r".*\.installed")] <NEW_LINE> _controller = None <NEW_LINE> def __init__(self, controller): <NEW_LINE> <INDENT> super().__init__() <NEW_LIN...
Class to handle directory changes.
62598f65711fe17d825dfda9
class TestPyCell(SingletonCommand): <NEW_LINE> <INDENT> def run_all_tests(self): <NEW_LINE> <INDENT> test_dataframe_cell.run_test() <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> self.run_all_tests() <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return "test_pycell"
Run PyCell unit tests.
62598f65ff9c53063f519d11
class BasePresenceProtocol(XMPPHandler): <NEW_LINE> <INDENT> presenceTypeParserMap = {} <NEW_LINE> def connectionInitialized(self): <NEW_LINE> <INDENT> self.xmlstream.addObserver("/presence", self._onPresence) <NEW_LINE> <DEDENT> def _onPresence(self, element): <NEW_LINE> <INDENT> stanza = Stanza.fromElement(element) <...
XMPP Presence base protocol handler. This class is the base for protocol handlers that receive presence stanzas. Listening to all incoming presence stanzas, it extracts the stanza's type and looks up a matching stanza parser and calls the associated method. The method's name is the type + C{Received}. E.g. C{available...
62598f654d74a7450cd58a37
class PilotDetail(LoginRequiredMixin, DetailView): <NEW_LINE> <INDENT> model = User <NEW_LINE> context_object_name = 'pilot' <NEW_LINE> template_name = 'checkouts/pilot_detail.html' <NEW_LINE> slug_field = 'username' <NEW_LINE> slug_url_kwarg = 'username' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <IND...
All checkout information for a particular pilot
62598f65d10714528d69d58b
class TestCourseUpdatesPage(BaseCourseUpdatesTestCase): <NEW_LINE> <INDENT> def test_view(self): <NEW_LINE> <INDENT> self.create_course_update('First Message') <NEW_LINE> self.create_course_update('Second Message') <NEW_LINE> url = course_updates_url(self.course) <NEW_LINE> response = self.client.get(url) <NEW_LINE> as...
Test the course updates page.
62598f6530c21e258be97ebc
class EncoderBase(ModuleBase): <NEW_LINE> <INDENT> def __init__(self, hparams=None): <NEW_LINE> <INDENT> ModuleBase.__init__(self, hparams) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def default_hparams(): <NEW_LINE> <INDENT> return { "name": "encoder" } <NEW_LINE> <DEDENT> def _build(self, inputs, *args, **kwargs): ...
Base class inherited by all encoder classes.
62598f659b70327d1c57e466
class MyThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, ip_addr, port, username, passwd): <NEW_LINE> <INDENT> super(MyThread, self).__init__() <NEW_LINE> self.ip_addr = ip_addr <NEW_LINE> self.port = int(port) <NEW_LINE> self.username = username <NEW_LINE> self.passwd = passwd <NEW_LINE> print(self.ip_...
核心处理类,该类得到用户的指令,通过paramiko管理主机
62598f651f5feb6acb1622f9
class BranchMergeProposalCommitMessageEditView(MergeProposalEditView): <NEW_LINE> <INDENT> schema = IBranchMergeProposal <NEW_LINE> label = "Edit merge proposal commit message" <NEW_LINE> page_title = label <NEW_LINE> field_names = ['commit_message'] <NEW_LINE> @action('Update', name='update') <NEW_LINE> def update_act...
The view to edit the commit message of merge proposals.
62598f653eb6a72ae0389d01
class InterfacesArgs(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> argument_spec = { "config": { "elements": "dict", "options": { "description": {"type": "str"}, "duplex": { "choices": ["automatic", "full-duplex", "half-duplex"], "type": "str", }, "enabled": {"d...
The arg spec for the junos_interfaces module
62598f65d99f1b3c44d04d73
class DynamicGhostbusterAgent(GhostbusterAgent): <NEW_LINE> <INDENT> def __init__(self, inferenceModule, game): <NEW_LINE> <INDENT> self.inferenceModule = inferenceModule <NEW_LINE> self.game = game <NEW_LINE> self.inferenceModule.initialize() <NEW_LINE> <DEDENT> def observe(self, observation): <NEW_LINE> <INDENT> self...
Abstract class for agents for the dynamic game, which do model the passage of time. Unlike static agents, dynamic agents process each observation they get incrementally, using belief updates (as in the forward algorithm). You do not need to modify this abstract class.
62598f65796e427e5384de53
class GetAddressSerializer(serializers.Serializer): <NEW_LINE> <INDENT> id = serializers.UUIDField(required=True)
Get Address Serializer
62598f656aa9bd52df0d458e
class ModuleDict(object): <NEW_LINE> <INDENT> def __init__(self, module_dict): <NEW_LINE> <INDENT> U.assert_type(module_dict, dict) <NEW_LINE> for k, m in module_dict.items(): <NEW_LINE> <INDENT> U.assert_type(k, str, 'Key "{}" must be string.'.format(k)) <NEW_LINE> U.assert_type(m, nnx.Module, '"{}" must be torchx.nn....
Two-step serialization. 1. Each element's state_dict() is called 2. The overall dict is then pickled.
62598f65711fe17d825dfdab
class CPlusPlusFiletype(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__extensions = ['c', 'cpp', 'h'] <NEW_LINE> self.__extensionRE = self._compile_extension_regex() <NEW_LINE> <DEDENT> def _compile_extension_regex(self): <NEW_LINE> <INDENT> reExpression = reduce( lambda x,y: x +'$|'+ y, se...
This class represents the C/C++ filetype
62598f65ff9c53063f519d13
@python_2_unicode_compatible <NEW_LINE> class Category(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = '目录' <NEW_LINE> verbose_name_plural = verbose_name
Django 要求模型必须继承 models.Model 类。 Category 只需要一个简单的分类名 name 就可以了。 CharField 指定了分类名 name 的数据类型,CharField 是字符型, CharField 的 max_length 参数指定其最大长度,超过这个长度的分类名就不能被存入数据库。 当然 Django 还为我们提供了多种其它的数据类型,如日期时间类型 DateTimeField、整数类型 IntegerField 等等。 Django 内置的全部类型可查看文档: https://docs.djangoproject.com/en/1.10/ref/models/fields/#field-ty...
62598f654d74a7450cd58a38
class Listing(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> company = models.ForeignKey("Company", related_name="listings") <NEW_LINE> location = models.CharField(max_length=100) <NEW_LINE> job_description = models.TextField() <NEW_LINE> application_link = models.URLField() <NEW...
represent a job listing object
62598f65d10714528d69d58d
class ThreadListGetForm(_PaginationForm): <NEW_LINE> <INDENT> course_id = CharField() <NEW_LINE> def clean_course_id(self): <NEW_LINE> <INDENT> value = self.cleaned_data["course_id"] <NEW_LINE> try: <NEW_LINE> <INDENT> return CourseLocator.from_string(value) <NEW_LINE> <DEDENT> except InvalidKeyError: <NEW_LINE> <INDEN...
A form to validate query parameters in the thread list retrieval endpoint
62598f656fece00bbaccb055
class PyreRingFrameworkAdaptor(object): <NEW_LINE> <INDENT> def Prepare(self): <NEW_LINE> <INDENT> raise NotImplementedError('Prepare method not implemented.') <NEW_LINE> <DEDENT> def CleanUp(self): <NEW_LINE> <INDENT> raise NotImplementedError('CleanUp method not implemented.') <NEW_LINE> <DEDENT> def Run(self, suite_...
Abstract class defined the pyrering framework interface. Any new framework which needs to plug into pyrering needs to implement this adaptor. It defines the general methods will be invoked by runner.
62598f651f037a2d8b9e37b1
class TimeSeriesAnalysisRequest: <NEW_LINE> <INDENT> def __init__(self, time_series: TimeSeries, number_of_values: int): <NEW_LINE> <INDENT> self.time_series = time_series <NEW_LINE> self.number_of_values = number_of_values <NEW_LINE> <DEDENT> def get_time_series(self) -> TimeSeries: <NEW_LINE> <INDENT> return self.tim...
Represents the request that will be sent to the time_series_analysis_service Attributes time_series (TimeSeries) - time series object that is equivalent to a csv number_of_values (int) - count of values to forecast
62598f65d164cc617582063a
class StrictProperty(ValidatedProperty): <NEW_LINE> <INDENT> def __init__(self, property_type): <NEW_LINE> <INDENT> validator = type_validator(property_type) <NEW_LINE> self.__property_type = property_type <NEW_LINE> super(StrictProperty, self).__init__(validator) <NEW_LINE> <DEDENT> @property <NEW_LINE> def property_t...
Property that resticts values to a particular type. Attempting to set a value on a strict property that is not of the provided type (other than None) will raise a TypeError. Example: class Point(HasProps): x = StrictProperty(float) y = StrictProperty(float) point = Point() point.x = 10 point.y = 20...
62598f6515baa72349461647
class AugustSubscriberMixin: <NEW_LINE> <INDENT> def __init__(self, hass, update_interval): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._hass = hass <NEW_LINE> self._update_interval = update_interval <NEW_LINE> self._subscriptions = {} <NEW_LINE> self._unsub_interval = None <NEW_LINE> self._stop_interval = N...
Base implementation for a subscriber.
62598f655166f23b2e242a9b
class AccumuloException(TException): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'msg', None, None, ), ) <NEW_LINE> def __init__(self, msg=None,): <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccele...
Attributes: - msg
62598f65bf627c535bcb0b43
class Unpacker(object): <NEW_LINE> <INDENT> def __init__(self, buf, ptr=0, endian=None): <NEW_LINE> <INDENT> self.buf = buf <NEW_LINE> self.ptr = ptr <NEW_LINE> self.endian = endian <NEW_LINE> self._cache = {} <NEW_LINE> <DEDENT> def unpack(self, fmt): <NEW_LINE> <INDENT> pkst = self._cache.get(fmt) <NEW_LINE> if pkst ...
Class to unpack values from buffer object The buffer object is usually a string. Caches compiled :mod:`struct` format strings so that repeated unpacking with the same format string should be faster than using ``struct.unpack`` directly. Examples -------- >>> a = '1234567890' #23dt : bytes >>> upk = Unpacker(a) >>> up...
62598f6576d4e153a661c2d7
class CmdNewWho(default_cmds.MuxCommand): <NEW_LINE> <INDENT> key = "who" <NEW_LINE> aliases = ["+who", "@who"] <NEW_LINE> locks = "cmd:all()" <NEW_LINE> help_category = "General" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> session_list = sorted(SESSIONS.get_sessions(), reverse=True, key=lambda o: o.cmd_last_visible...
Shows the currently connected players. Usage: who
62598f650383005118f6cdcc
class MatchRegex: <NEW_LINE> <INDENT> def __init__(self, regex) -> None: <NEW_LINE> <INDENT> self._regex = re.compile(regex) <NEW_LINE> <DEDENT> def __eq__(self, other: str) -> bool: <NEW_LINE> <INDENT> return self._regex.match(other) is not None <NEW_LINE> <DEDENT> def match(self, other: str) -> re.Match: <NEW_LINE> <...
Assert that a given string meets some expectations.
62598f65a4f1c619b294dcb7
class BinaryOp(_Node): <NEW_LINE> <INDENT> AND = object() <NEW_LINE> OR = object() <NEW_LINE> OPS = {AND: "AND", OR: "OR"} <NEW_LINE> def __init__(self, left, op, right): <NEW_LINE> <INDENT> self.left = left <NEW_LINE> self.op = op <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT...
Represents a relationship between two nodes: ``and``, ``or``.
62598f656fece00bbaccb057
class Dispatcher(mythread.Thread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> mythread.Thread.__init__(self) <NEW_LINE> self.queue = Queue.Queue() <NEW_LINE> self.elems = [] <NEW_LINE> <DEDENT> def append(self, queue, message_form): <NEW_LINE> <INDENT> if isinstance(queue, Bot): <NEW_LINE> <INDENT> que...
Dispatcher of Message class. It will take msg from is queue and dispatch them to the correct elems if the Message match the pattern
62598f65be8e80087fbbe71d
class MemcachedCache(BaseMemcachedCache): <NEW_LINE> <INDENT> def __init__(self, server, params): <NEW_LINE> <INDENT> import memcache <NEW_LINE> super(MemcachedCache, self).__init__(server, params, library=memcache, value_not_found_exception=ValueError) <NEW_LINE> <DEDENT> @property <NEW_LINE> def _cache(self): <NEW_LI...
An implementation of a cache binding using python-memcached
62598f651f037a2d8b9e37b3
class Associable(object): <NEW_LINE> <INDENT> registered_links = None <NEW_LINE> @classmethod <NEW_LINE> def association_base(cls): <NEW_LINE> <INDENT> for parent in cls.__bases__: <NEW_LINE> <INDENT> if parent is Associable: <NEW_LINE> <INDENT> return cls <NEW_LINE> <DEDENT> if issubclass(parent, Associable): <NEW_LIN...
Mixin to enable associations on a model. Only models which are associable may be targeted by :func:`associated`_
62598f651d351010ab8f3206
class PersonalizerError(Model): <NEW_LINE> <INDENT> _validation = { 'code': {'required': True}, 'message': {'required': True}, } <NEW_LINE> _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', '...
The error object. All required parameters must be populated in order to send to Azure. :param code: Required. High level error code. Possible values include: 'BadRequest', 'ResourceNotFound', 'InternalServerError' :type code: str or ~azure.cognitiveservices.personalizer.models.ErrorCode :param message: Required. A m...
62598f65d164cc617582063d
class VTKFunctionQueue(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "vtk.function_queue" <NEW_LINE> bl_label = "Run functions" <NEW_LINE> _timer = None <NEW_LINE> def modal(self, context, event): <NEW_LINE> <INDENT> global queue <NEW_LINE> if not queue.running: <NEW_LINE> <INDENT> self.cancel(context) <NEW_LINE...
Run functions separated in time by 1/100s
62598f6556b00c62f0fb1f78
class Unk32Packet(Packet): <NEW_LINE> <INDENT> cmd = 0x32 <NEW_LINE> length = 2 <NEW_LINE> def decodeChild(self): <NEW_LINE> <INDENT> self.duchar()
Unknown packet
62598f65bf627c535bcb0b45
class DistanceMatrix(DissimilarityMatrix): <NEW_LINE> <INDENT> _matrix_element_name = 'distance' <NEW_LINE> def condensed_form(self): <NEW_LINE> <INDENT> return squareform(self.data, force='tovector') <NEW_LINE> <DEDENT> def _validate(self, data, ids): <NEW_LINE> <INDENT> super(DistanceMatrix, self)._validate(data, ids...
Store distances between objects. A `DistanceMatrix` is a `DissimilarityMatrix` with the additional requirement that the matrix data is symmetric. There are additional methods made available that take advantage of this symmetry. See Also -------- DissimilarityMatrix Notes ----- The distances are stored in redundant (...
62598f6563f4b57ef00858d1
class Meta: <NEW_LINE> <INDENT> unique_together = ('qapp', 'sectionb_type')
Meta data definitions for SectionB class.
62598f6591af0d3eaad394cd
class ForumRoleUsersListView(generics.ListAPIView): <NEW_LINE> <INDENT> authentication_classes = (authentication.SessionAuthentication,) <NEW_LINE> permission_classes = (ApiKeyHeaderPermission,) <NEW_LINE> serializer_class = UserSerializer <NEW_LINE> paginate_by = 10 <NEW_LINE> paginate_by_param = "page_size" <NEW_LINE...
Forum roles are represented by a list of user dicts
62598f654d74a7450cd58a3a
class OptimizerGEDBS(Optimizer) : <NEW_LINE> <INDENT> def __init__(self, argv, reactor, objective): <NEW_LINE> <INDENT> Optimizer.__init__(self, argv, reactor, objective) <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def end_of_iteration(self): <NEW_LINE> <INDE...
Optimizes using greedy exhaustive dual binary sweeps.
62598f65d10714528d69d590
class DirectionModel: <NEW_LINE> <INDENT> UP = 0 <NEW_LINE> DOWM = 1 <NEW_LINE> LEFT = 2 <NEW_LINE> RIGHT =3
derection data, constant
62598f65d53ae8145f917b59
@base.ReleaseTracks(base.ReleaseTrack.BETA) <NEW_LINE> class DescribeBeta(base.DescribeCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> _CommonArgs(parser) <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> operations_client = operations.Client.FromApiVersion('v1bet...
Describe an operation. This command displays the details of a single managed-zone operation. ## EXAMPLES To describe a managed-zone operation: $ {command} 1234 --zone my_zone
62598f65be8e80087fbbe71f
class Params: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if len(sys.argv) > 1: <NEW_LINE> <INDENT> self.directory = sys.argv[1] <NEW_LINE> <DEDENT> elif os.environ.get('FINISHED_WARCS_DIR') != None: <NEW_LINE> <INDENT> self.directory = os.environ['FINISHED_WARCS_DIR'] <NEW_LINE> <DEDENT> else: <NEW_LIN...
Encapsulation of global parameters from environment and derivation
62598f658c3a8732951f5c16
class BulkImportResultDevice(object): <NEW_LINE> <INDENT> swagger_types = { 'created': 'AtomicInteger', 'errors': 'AtomicInteger', 'errors_list': 'list[str]', 'updated': 'AtomicInteger' } <NEW_LINE> attribute_map = { 'created': 'created', 'errors': 'errors', 'errors_list': 'errorsList', 'updated': 'updated' } <NEW_LINE...
NOTE: This class is auto generated by the swagger code generator program. from tb_rest_client.api_client import ApiClient Do not edit the class manually.
62598f6573bcbd0ca4bc9919
class Metadata(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "KBaseNarrative.Metadata" <NEW_LINE> class v2_0(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "KBaseNarrative.Metadata-2.0"
Metadata type
62598f654d74a7450cd58a3b
class DocGenPlugin(Plugin): <NEW_LINE> <INDENT> def __init__(self, name, description, basedoc, paper, style, extension, docoptclass, basedocname): <NEW_LINE> <INDENT> Plugin.__init__(self, name, description, basedoc.__module__) <NEW_LINE> self.__basedoc = basedoc <NEW_LINE> self.__paper = paper <NEW_LINE> self.__style ...
This class represents a plugin for generating documents from Gramps
62598f6530c21e258be97ec4
class Voicing(Enum): <NEW_LINE> <INDENT> undecided = -1 <NEW_LINE> close_position = 0 <NEW_LINE> open_position = 1
Mapping all voicing as enumerations.
62598f650383005118f6cdd0
@admin.register(ExecutableTaskType) <NEW_LINE> class ExecutableTaskTypeAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ( "name", "user", "command_to_run", "datetime_created", "user", )
Interface modifiers for container task types on the admin page.
62598f6521bff66bcd722322
class EmbeddedReber(Reber): <NEW_LINE> <INDENT> def __init__(self, alphabet): <NEW_LINE> <INDENT> super(EmbeddedReber, self).__init__(alphabet) <NEW_LINE> self.nodes = [Node() for nodenum in range(4)] <NEW_LINE> self.rebers = [Reber(alphabet), Reber(alphabet)] <NEW_LINE> [reber.create_edges() for reber in self.rebers] ...
Parameters ---------- alphabet : list A list of strings that represent the alphabet and it's placement in the Reber edges. Attributes ---------- word : str | None After 'simulate' is called a word is created and storred here. nodes : list List of Node objects that are part of the embedded Reber grammar. ...
62598f65d99f1b3c44d04d7b
class Artist(DeclarativeBase): <NEW_LINE> <INDENT> __tablename__ = "artists" <NEW_LINE> __table_args__ = (UniqueConstraint('proj_id', 'category_id', 'user_id'), {}) <NEW_LINE> id = Column(String(40), primary_key=True) <NEW_LINE> proj_id = Column(Unicode(10), ForeignKey('projects.id')) <NEW_LINE> category_id = Column(Un...
Category artist
62598f658c3a8732951f5c18
class ServerStub(): <NEW_LINE> <INDENT> class Response(object): <NEW_LINE> <INDENT> def __init__(self, content=None, status=None): <NEW_LINE> <INDENT> self.content = content <NEW_LINE> self.status = status <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> return self.content <NEW_LINE> <DEDENT> def status(self): ...
This class stubs a basic server for the API client to talk to
62598f65d164cc6175820641
class InventoryItem(object): <NEW_LINE> <INDENT> def __init__(self, waist, length, style, count): <NEW_LINE> <INDENT> self.waist = waist <NEW_LINE> self.length = length <NEW_LINE> self.style = style <NEW_LINE> self.count = count
A Single Inventory Item
62598f6556b00c62f0fb1f7c
class Number(Node): <NEW_LINE> <INDENT> def __init__(self, key, value, parent): <NEW_LINE> <INDENT> Node.__init__(self, key, value, parent)
Represents a number in a ParserTree.
62598f65ff9c53063f519d1b
class Cartography(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def synchronize(url=XML_URL_DATA_STATION): <NEW_LINE> <INDENT> dom = parseString(Grabber(url).content) <NEW_LINE> for marker in dom.getElementsByTagName('marker'): <NEW_LINE> <INDENT> values = xml_station_information_wrapper(marker) <NEW_LINE> Stat...
Grab the data and save it in db
62598f65d18da76e235b6c9a
class EntityAttribute(Attribute): <NEW_LINE> <INDENT> _lazytype = None <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(EntityAttribute, self).__init__(*args, **kwargs) <NEW_LINE> self.bind_clients = WeakKeyDictionary() <NEW_LINE> <DEDENT> @property <NEW_LINE> def type(self): <NEW_LINE> <INDENT...
Attribute for another entity.
62598f65d10714528d69d594
class PortProfile(base.Resource): <NEW_LINE> <INDENT> id = base.Field('id') <NEW_LINE> name = base.Field('name') <NEW_LINE> description = base.Field('description') <NEW_LINE> type = base.Field('type') <NEW_LINE> box_id = base.Field('box_id')
Represent a port profile resource.
62598f65be8e80087fbbe723
class VersionTooOldError(FileFormatError): <NEW_LINE> <INDENT> pass
The version of the file is too old and cannot be read by the library.
62598f65d10714528d69d595
class LatestBlock(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=128) <NEW_LINE> description = models.TextField(help_text='Field for comments.') <NEW_LINE> video_main = models.ForeignKey( 'VideoObject', null=True, blank=True, related_name='video_main') <NEW_LINE> video_second = models.ForeignKey(...
LatestBlock contains in itself the settings of this unit, it is also part of the Page
62598f65287bf620b6271285
class JSONWebKeySet(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'keys': {'key': 'keys', 'type': '[JSONWebKey]'}, } <NEW_LINE> def __init__( self, *, keys: Optional[List["JSONWebKey"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(JSONWebKeySet, self).__init__(**kwargs) <NEW_LINE> self.keys = key...
JSONWebKeySet. :param keys: The value of the "keys" parameter is an array of JWK values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. :type ke...
62598f65d53ae8145f917b5e
class Teacher(models.Model): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True) <NEW_LINE> tid = models.CharField(max_length=20, verbose_name='教师工号', default='',unique=True) <NEW_LINE> password = models.CharField(max_length=128, verbose_name='密码', default='') <NEW_LINE> name = models.CharField(max_length=20, v...
教师(用户) t_Teacher table
62598f65c432627299fa269c
class Barcode(ePOSElement): <NEW_LINE> <INDENT> tag = 'barcode' <NEW_LINE> required_attributes = ['type'] <NEW_LINE> local_attributes = { "type": None, "hri": None, "width": None, "height": None, "font": None, "align": None, "rotate": None, } <NEW_LINE> def get_tag(self): <NEW_LINE> <INDENT> return self.tag
A barcode object
62598f6591af0d3eaad394d3
class ADPAPIConnectionFactory(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.connection_objects = {'authorization_code': AuthorizationCodeConnection, 'client_credentials': ClientCredentialsConnection} <NEW_LINE> <DEDENT> def createConnection(self, connConfig): <NEW_LINE> <INDENT> return self.connec...
Creates a connection instance and returns either a ClientCredentialsConnection or an AuthorizationCodeConnection depending on the initialized connection configuration provided
62598f65167d2b6e312b6647
class RFClassifier: <NEW_LINE> <INDENT> def __init__(self, X, Y): <NEW_LINE> <INDENT> self.model = RandomForestClassifier(bootstrap=True, criterion='gini', min_samples_split=2, max_features='auto', min_samples_leaf=1, n_estimators=1000) <NEW_LINE> self.X = X <NEW_LINE> self.Y = Y <NEW_LINE> <DEDENT> def tune_and_eval(s...
Random forest classifier
62598f6566673b3332c2fa86
class DataProcessor(object): <NEW_LINE> <INDENT> def get_example_from_tensor_dict(self, tensor_dict): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def get_train_examples(self, data_dir): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def get_dev_examples(self, data_dir): <NEW...
Base class for data converters for sequence classification data sets.
62598f65d10714528d69d596
class FakeIronicPluginProvider(FakeDiscoveryNodeProvider): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(FakeIronicPluginProvider, self).__init__()
This class represents a fake IronicPluginProvider inheriting from DiscoveryNodeProvider.
62598f65a8ecb033258708cf
class FileForm(FlaskForm): <NEW_LINE> <INDENT> upload_file = FileField("Data File", validators=[DataRequired()])
Upload form to specify import file
62598f65d53ae8145f917b60
class ImageBundle( object ): <NEW_LINE> <INDENT> def __init__( self, name, key, imageKeys, certified, containerList, deviceList ): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.key = key <NEW_LINE> self.imageKeys = imageKeys <NEW_LINE> self.deviceList = deviceList <NEW_LINE> self.containerList = containerList <N...
ImageBundle class objects stores all necessary information about the bundle state variables: name -- name of the image bundle key -- unique key assinged to the image bundle imageKeys -- keys corresponding to images present in this image bundle deviceList -- List of devices to which image bundle is mapped t...
62598f6515baa72349461651
class DatasetRelease(object): <NEW_LINE> <INDENT> produces = ['latest_production_release'] <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> self._dbs = DBS(config.get('dbs', None)) <NEW_LINE> <DEDENT> def load(self, inventory): <NEW_LINE> <INDENT> latest_minor = collections.defaultdict(int) <NEW_LINE> results...
Sets one attr: latest_production_release
62598f65d99f1b3c44d04d7f
@route('/(?P<city>\w*)/borough/detail/communityList') <NEW_LINE> class CommunityListDetailHandle(BaseController): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> self.communityService = CommunityService() <NEW_LINE> <DEDENT> @catch() <NEW_LINE> def post(self, *args, **kwargs): <NEW_LINE> <INDENT> city = k...
获取社区列表: @:param city:城市 {bj} @:param filter:查询条件 {name:链家} @:param sort:排序条件 {1:正序, -1:倒序} @:param page:页码条数 {index:页码, size:条数} @:param field: @:return code 状态码 @:return runtime 运行时间 @:return total 记录总数 @:return data 数据
62598f6573bcbd0ca4bc991f