code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ArrayComp2D(Component): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ArrayComp2D, self).__init__() <NEW_LINE> self.add_param('x', np.zeros((2, 2))) <NEW_LINE> self.add_output('y', np.zeros((2, 2))) <NEW_LINE> <DEDENT> def solve_nonlinear(self, params, unknowns, resids): <NEW_LINE> <INDENT> x ...
2D Array component.
62598ee64a966d76dd5ed58c
class Lottery: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._name = 'default' <NEW_LINE> self.draws = [] <NEW_LINE> self._balls = SetOfBalls('default', 10) <NEW_LINE> self._get_date_index = 0 <NEW_LINE> self._parser = None <NEW_LINE> self._available_parsers = [] <NEW_LINE> self._line_generation_meth...
The base class for all lotteries. This class implements the functions for a single set of balls (the most common type of lottery).
62598ee61f037a2d8b9e27b0
class LayoutNext(Enum): <NEW_LINE> <INDENT> SAMELINE = 0 <NEW_LINE> BELOW = 1 <NEW_LINE> NEWLINE = 2 <NEW_LINE> CASCADE = 3 <NEW_LINE> MANUAL = 4
LayoutNext enumeration. Used to control the placement of child controls in the parent's client area. The placement is always relative to the current control being placed or to the current row of controls placed. SAMELINE: places the next control at the left, aligned to the TOP of current control; BELLOW: places the ne...
62598ee6ac7a0e7691f70bbf
class RunResult(BaseAPIResult): <NEW_LINE> <INDENT> def __init__(self, response): <NEW_LINE> <INDENT> super(RunResult, self).__init__(response) <NEW_LINE> <DEDENT> def _transform_to_attrs(self, response): <NEW_LINE> <INDENT> response_dict = self._desiarialize_response(response) <NEW_LINE> response_dict = self._flatten_...
Represents the excecution results from the run end point of the HackerEarth API.
62598ee6435de62698e9a47f
class TestIoK8sApimachineryPkgApisMetaV1ObjectMeta(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 testIoK8sApimachineryPkgApisMetaV1ObjectMeta(self): <NEW_LINE> <INDENT> pass
IoK8sApimachineryPkgApisMetaV1ObjectMeta unit test stubs
62598ee663d6d428bbee0e75
class Cell(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, row, column, length, margin, state, rules): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.x, self.y = margin + column*(length + margin), margin + row*(length + margin) <NEW_LINE> self.width, self.height = length, length <NEW_LINE> self.st...
The Cellular object contains all the information about one cell Attributes: width (int): width lenghth of cell height (int): height length of cell x (float): x coordiante of cell y (float): y coordiante of cell state (str): cell is "alive" or "dead" rules (list): set of rules the cell obeys ...
62598ee685dfad0860cbedbc
class ProfileForm(messages.Message): <NEW_LINE> <INDENT> displayName = messages.StringField(1) <NEW_LINE> mainEmail = messages.StringField(2) <NEW_LINE> teeShirtSize = messages.EnumField('TeeShirtSize', 3) <NEW_LINE> sessionWishlist = messages.StringField(4, repeated = True) <NEW_LINE> conf...
ProfileForm -- Profile outbound form message
62598ee6097d151d1a2bf6ca
class Stuff(object): <NEW_LINE> <INDENT> def __init__(self, thing, url, location, image, user_location): <NEW_LINE> <INDENT> self.thing = thing <NEW_LINE> self.url = 'http://' + user_location + '.craigslist.ca' + url <NEW_LINE> self.location = location <NEW_LINE> self.image = image <NEW_LINE> self.user_location = user_...
A freestuff Craigslist object. Fill this object with the information from a craigslist page. (There is no price attribute, because it is designed for invaluable things). The precise coordinates are not initially set, because they require significantly more requests. See class method get_coordinates(). Attributes: ...
62598ee6b7558d5895461cef
class Author: <NEW_LINE> <INDENT> def __init__(self, name: str, birthday: str, place_of_birth: str) -> None: <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.birthday = birthday <NEW_LINE> self.place_of_birth = place_of_birth <NEW_LINE> self.books: List[Book] = [] <NEW_LINE> self.relatives: List[Relative] = []
Class used for example data
62598ee67d847024c075aa78
class storePublicMessages_result(object): <NEW_LINE> <INDENT> def __init__(self, success=None, e=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.e = e <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTrans...
Attributes: - success - e
62598ee6a8370b77170eea8d
class ImporterStatusTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.test_app = create_app(DATABASE_NAME='scheduler', TESTING=True) <NEW_LINE> self.testing_client = self.test_app.test_client() <NEW_LINE> self.testing_client_context = self.test_app.app_context() <NEW_LINE> self....
Test whether an admin user can request the statuses of the importers
62598ee630bbd722464682e2
class ExampleIndex(CopyToIndex): <NEW_LINE> <INDENT> input_file = luigi.Parameter() <NEW_LINE> host = '192.168.254.122' <NEW_LINE> port = 9200 <NEW_LINE> index = 'api' <NEW_LINE> doc_type = 'default' <NEW_LINE> purge_existing_index = True <NEW_LINE> marker_index_hist_size = 1 <NEW_LINE> def requires(self): <NEW_LINE> <...
This class takes the code counts and indexes into elasticsearch index api
62598ee68e7ae83300ee7739
class UserViewedPost(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, related_name='viewed_post_set') <NEW_LINE> post = models.ForeignKey(Post, related_name='viewed_post_set') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> unique_together = ('user', 'post',)
Presence of a row in this table indicates that a user has already seen a given post
62598ee62ae34c7f260a9791
class MatchScoreBreakdown2016(object): <NEW_LINE> <INDENT> openapi_types = { 'blue': 'MatchScoreBreakdown2016Alliance', 'red': 'MatchScoreBreakdown2016Alliance' } <NEW_LINE> attribute_map = { 'blue': 'blue', 'red': 'red' } <NEW_LINE> def __init__(self, blue=None, red=None, local_vars_configuration=None): <NEW_LINE> <IN...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598ee6851cf427c66b697b
class ActionOnFqf(Action): <NEW_LINE> <INDENT> def __init__(self, orthogonal_grp, fqf, on_subquotient=False, is_left=False): <NEW_LINE> <INDENT> import operator <NEW_LINE> self._on_subquotient = on_subquotient <NEW_LINE> if is_left: <NEW_LINE> <INDENT> raise ValueError("the action is from the right") <NEW_LINE> <DEDENT...
Action on a finite quadratic module. INPUT: - ``orthogonal_grp`` -- an instance of :class:`GroupOfIsometries` - ``fqf`` -- a torsion quadratic module - ``on_subquotient`` -- bool (default: ``False``) - ``is_left`` -- bool (default: ``False``) EXAMPLES:: sage: q = matrix.diagonal([2/3, 4/3]) sage: q = Torsi...
62598ee6e76e3b2f99fd70e1
class LinuxUtils(AbstractPlatformSpecificUtils): <NEW_LINE> <INDENT> IFF_PROMISC = 0x100 <NEW_LINE> SIOCGIFFLAGS = 0x8913 <NEW_LINE> SIOCSIFFLAGS = 0x8914 <NEW_LINE> SIOCGIFADDR = 0x8915 <NEW_LINE> SIOCGIFHWADDR = 0x8927 <NEW_LINE> RTF_GATEWAY = 0x0002 <NEW_LINE> IF_NAME_SIZE_BYTES = 16 <NEW_LINE> IF_REQ_FORMAT = '!256...
Linux implementation of OS specific utils
62598ee663b5f9789fe83807
class cmd_vlans(OriginPagedTableCommand): <NEW_LINE> <INDENT> def __init__(self, parser): <NEW_LINE> <INDENT> super(cmd_vlans, self).__init__(parser) <NEW_LINE> parser.add_argument("fabric", nargs=1, help=("Name of the fabric.")) <NEW_LINE> parser.add_argument( "--minimal", action="store_true", help=("Output only the V...
List vlans.
62598ee699fddb7c1ca6215a
class OrderCreateView(generics.CreateAPIView): <NEW_LINE> <INDENT> queryset = Order.objects.all() <NEW_LINE> serializer_class = OrderCreateSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticated,) <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDENT> user = self.request.user <NEW_LINE> pr...
Order Create
62598ee68e71fb1e983ba115
class TestAPIv1URLs(BaseTestAPIVersionURLs, amo.tests.TestCase): <NEW_LINE> <INDENT> urls = 'mkt.api.v1.urls' <NEW_LINE> def test_collections(self): <NEW_LINE> <INDENT> self.assertViewName('/rocketfuel/collections/', 'CollectionViewSet') <NEW_LINE> self.assertView404('/feed/collections/')
Tests for expected changes of URLs between versions of the API using the v1 urlconf.
62598ee67b25080760ed5b44
class Event(Argument): <NEW_LINE> <INDENT> doc_group = docgen.ArgumentsGroup(_('Events'), help_text=_('Event handlers that are available on rendered ' 'tag `events` dictionary'), priority=0) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs['validators'] = kwargs.pop('validators', []) <NEW_LINE...
Event is shorthand for event arguments. Event has additional functionality to add `events` on RenderedTag.
62598ee6d6c5a102081e07db
class AcaoQuandoOcorrerErro(enum.Enum): <NEW_LINE> <INDENT> ABORTAR = 0 <NEW_LINE> REPETIR_E_ABORTAR = 1 <NEW_LINE> REPETIR_E_IGNORAR = 2 <NEW_LINE> IGNORAR = 3
Enum das ações a serem executadas caso ocorra algum erro
62598ee61b99ca400228e862
class SubscribeTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_email = Email("sjtoek@gmail.com") <NEW_LINE> <DEDENT> def test_instance(self): <NEW_LINE> <INDENT> self.assertTrue(isinstance(self.new_subscribe,Subscribe))
Test Class to test the behaviour of the Subscribe class
62598ee6d486a94d0ba2a677
class AVMUnorderedList(AVMData): <NEW_LINE> <INDENT> def __init__(self, path, **kwargs): <NEW_LINE> <INDENT> if 'length' in kwargs: <NEW_LINE> <INDENT> self.length = kwargs['length'] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.length = False <NEW_LINE> <DEDENT> if 'strict_length' in kwargs: <NEW_LINE> <INDENT> s...
Generic data type for lists (i.e xmp bag arrays)
62598ee6ac7a0e7691f70bc1
class DynamicSCSSResource(SCSSResource): <NEW_LINE> <INDENT> implements(IDynamicSCSSResource) <NEW_LINE> def __init__(self, name, slot='addon', before=None, after=None, source=u'', cachekey=None): <NEW_LINE> <INDENT> super(DynamicSCSSResource, self).__init__(name=name, slot=slot, before=before, after=after, source=sour...
A dynamic SCSS resource provides SCSS source which may change. In order to have the correct caching, a cachekey is necessary. Dynamic resources should either subclass the DynamicSCSSResource class or initialize it with at least a name, a source and a cache key.
62598ee6aad79263cf42ceb5
class StdVecDequeSyntheticProvider: <NEW_LINE> <INDENT> def __init__(self, valobj, dict): <NEW_LINE> <INDENT> self.valobj = valobj <NEW_LINE> self.update() <NEW_LINE> <DEDENT> def num_children(self): <NEW_LINE> <INDENT> return self.size <NEW_LINE> <DEDENT> def get_child_index(self, name): <NEW_LINE> <INDENT> index = na...
Pretty-printer for alloc::collections::vec_deque::VecDeque<T> struct VecDeque<T> { tail: usize, head: usize, buf: RawVec<T> }
62598ee6f548e778e5969c36
class ButtonDisViewNN(ButtonDisView): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> ButtonDisView.__init__(self, parent) <NEW_LINE> self.showNames = False
element view with button checkboxes and display boxes with only name labels
62598ee626068e7796d4b006
class DictOf(dict): <NEW_LINE> <INDENT> def __init__(self, missing_value_creator, take_key_as_arg=False): <NEW_LINE> <INDENT> if not take_key_as_arg: <NEW_LINE> <INDENT> self.missing_value_creator = lambda k: missing_value_creator() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.missing_value_creator = missing_valu...
A dictionary where missing values are created by an __init__ time supplied function.
62598ee74527f215b58e85b3
class Line: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.profile_type = None <NEW_LINE> self.ga = -1.0 <NEW_LINE> self.gw = -1.0 <NEW_LINE> self.gq = -1.0 <NEW_LINE> self.lambda0 = -1.0 <NEW_LINE> self.nu0 = -1.0 * u.Hz <NEW_LINE> self.Aji = -1.0 <NEW_LINE> self.Bji = -1.0 <NEW_LINE> self.Bij = -1.0...
class def for spectral line
62598ee77d847024c075aa79
class SerialPort(object): <NEW_LINE> <INDENT> def __init__(self, ttyport, baudrate=9600, force_wait = 0.1): <NEW_LINE> <INDENT> self.m_ttyport = ttyport <NEW_LINE> self.m_baudrate = baudrate <NEW_LINE> self.m_ser = None <NEW_LINE> self.m_fd = None <NEW_LINE> self.m_max_waits = 60 <NEW_LINE> self.m_wait_sleep = 0.05 <NE...
Wrapper for serial port commands. It should only be necessary to create one SerialPort per real port. Object construction sets the class variables. The port is opened with initPort(), and any serial exceptions will thrown at that point. The standard serial settings for v3 and v4 EKM meters are 9600 baud, 7 bits, 1 ...
62598ee730bbd722464682e4
class AccessBoundaryRule(object): <NEW_LINE> <INDENT> def __init__( self, available_resource, available_permissions, availability_condition=None ): <NEW_LINE> <INDENT> self.available_resource = available_resource <NEW_LINE> self.available_permissions = available_permissions <NEW_LINE> self.availability_condition = avai...
Defines an access boundary rule which contains information on the resource that the rule applies to, the upper bound of the permissions that are available on that resource and an optional condition to further restrict permissions.
62598ee756b00c62f0fb0f7b
class PresenterRelationsProgramsParams(object): <NEW_LINE> <INDENT> swagger_types = { 'presenter_id': 'int' } <NEW_LINE> attribute_map = { 'presenter_id': 'presenter_id' } <NEW_LINE> def __init__(self, presenter_id=None): <NEW_LINE> <INDENT> self._presenter_id = None <NEW_LINE> self.discriminator = None <NEW_LINE> if p...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ee75fdd1c0f98e5c650
class GpgCommand(Command): <NEW_LINE> <INDENT> SYNOPSIS = (None, 'gpg', None, "<GPG arguments ...>") <NEW_LINE> ORDER = ('Internals', 4) <NEW_LINE> IS_USER_ACTIVITY = True <NEW_LINE> class CommandResult(Command.CommandResult): <NEW_LINE> <INDENT> def as_text(self): <NEW_LINE> <INDENT> if self.result: <NEW_LINE> <INDENT...
Interact with GPG directly
62598ee73c8af77a43b67289
class FillStrategy(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> def onBars(self, dateTime, bars): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def onOrderFilled(self, order): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def fillMarketOrder(self, order, broker_, bar)...
Base class for order filling strategies.
62598ee74c3428357761898e
class VisitsFilter(SiteFilter): <NEW_LINE> <INDENT> def __init__(self, visited_sites=[]): <NEW_LINE> <INDENT> self.visited_sites=visited_sites <NEW_LINE> <DEDENT> def coarse_pass(self): <NEW_LINE> <INDENT> site_queries = [sql.SQL("SELECT * from {}").format(sql.Identifier("s"+site)) for site in self.visited_sites] <NEW_...
Select only journeys that visit the given list of sites. in any order
62598ee7460517430c430b33
class SluggerShard(db.Model): <NEW_LINE> <INDENT> count = db.IntegerProperty(required=True, default=0)
Shards for the counter
62598ee7435de62698e9a482
class ContainerNode(object): <NEW_LINE> <INDENT> __slots__ = ['_obj', 'index'] <NEW_LINE> def __init__(self, obj): <NEW_LINE> <INDENT> self._obj = obj <NEW_LINE> self.index = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def obj(self): <NEW_LINE> <INDENT> return self._obj <NEW_LINE> <DEDENT> def __eq__(self, other): <N...
A container node. Only used in post-dominator tree generation. We did this so we can set the index property without modifying the original object.
62598ee766673b3332c2ea53
class ExpressRouteCircuitPaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[ExpressRouteCircuit]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ExpressRouteCircuitPaged, self).__init__(*args, **k...
A paging container for iterating over a list of :class:`ExpressRouteCircuit <azure.mgmt.network.v2018_08_01.models.ExpressRouteCircuit>` object
62598ee7d268445f26638ee4
class NoteNotFoundError(ValueError): <NEW_LINE> <INDENT> pass
Note not found for player.
62598ee7aad79263cf42ceb6
class PhNode(base.ContentNode): <NEW_LINE> <INDENT> def _IsValidChild(self, child): <NEW_LINE> <INDENT> return isinstance(child, ExNode) <NEW_LINE> <DEDENT> def MandatoryAttributes(self): <NEW_LINE> <INDENT> return ['name'] <NEW_LINE> <DEDENT> def EndParsing(self): <NEW_LINE> <INDENT> super(type(self), self).EndParsing...
A <ph> element.
62598ee7851cf427c66b697d
class Game: <NEW_LINE> <INDENT> def __init__(self, path: str, line: Optional[str] = None): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.image = 'pcsx2' <NEW_LINE> self.description = 'Idle' <NEW_LINE> if line is not None: <NEW_LINE> <INDENT> if self.check_line(line): <NEW_LINE> <INDENT> self.parse_line(line) <NE...
Class representing a displayed game.
62598ee7796e427e5384ce44
@pytest.mark.draft <NEW_LINE> @pytest.mark.components <NEW_LINE> @pytest.allure.story('Diagnosis') <NEW_LINE> @pytest.allure.feature('POST') <NEW_LINE> class Test_PFE_Components(object): <NEW_LINE> <INDENT> @pytest.allure.link('https://jira.qumu.com/browse/TC-46720') <NEW_LINE> @pytest.mark.Diagnosis <NEW_LINE> @pytest...
PFE Diagnosis test cases.
62598ee75166f23b2e241a83
class LRUCacheNode: <NEW_LINE> <INDENT> def __init__(self, key, value): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.value = value <NEW_LINE> self.hits = 0 <NEW_LINE> self.prev = self <NEW_LINE> self.next = self <NEW_LINE> <DEDENT> def link_after(self, node): <NEW_LINE> <INDENT> self.prev = node <NEW_LINE> self.n...
LRUCache node.
62598ee7d6c5a102081e07dd
class EffectConfigDialog(Gtk.FileChooserDialog): <NEW_LINE> <INDENT> file_filter = Gtk.FileFilter() <NEW_LINE> file_filter.set_name(_('Supported media')) <NEW_LINE> for each in supported.media: <NEW_LINE> <INDENT> if each not in (".cue", ".txt"): <NEW_LINE> <INDENT> file_filter.add_pattern("*" + each) <NEW_LINE> file_f...
Configuration dialog for an Effect.
62598ee7009cb60464cffbfa
class Windows(oz.Guest.CDGuest): <NEW_LINE> <INDENT> def __init__(self, tdl, config, output_disk, netdev, diskbus, macaddress): <NEW_LINE> <INDENT> oz.Guest.CDGuest.__init__(self, tdl, config, output_disk, netdev, "localtime", "usb", diskbus, True, False, macaddress) <NEW_LINE> if self.tdl.key is None: <NEW_LINE> <INDE...
Shared Windows base class.
62598ee78a43f66fc4bf081e
class HomePageView(TemplateView): <NEW_LINE> <INDENT> template_name = "home_page.html" <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> return redirect("map")
Home page
62598ee76fb2d068a769317a
class Decoder: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self._rcv_buffer = b'' <NEW_LINE> self._msg_buffer = [] <NEW_LINE> <DEDENT> def feed(self, data: bytes) -> None: <NEW_LINE> <INDENT> LOGGER.debug("Feeding data into collector: %s", logger.ellipsicate(str(data))) <NEW_LINE> self._rcv_buff...
Collect message chunks until complete JSON string is formed.
62598ee7f548e778e5969c38
class ImageCollection(collection.Collection): <NEW_LINE> <INDENT> _initialized = False <NEW_LINE> def __init__(self, args): <NEW_LINE> <INDENT> self.initialize() <NEW_LINE> if isinstance(args, image.Image): <NEW_LINE> <INDENT> args = [args] <NEW_LINE> <DEDENT> if ee_types.isString(args): <NEW_LINE> <INDENT> super(Image...
Representation for an Earth Engine ImageCollection.
62598ee7090684286d592a36
class TaskContext(object): <NEW_LINE> <INDENT> def __init__(self, source_name, root, report_dir_prefix, priority): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> self.priority = priority <NEW_LINE> self.source = self.root / source_name <NEW_LINE> self.target_dir = self.root / (report_dir_prefix + source_name) <NEW_LIN...
Class providing context parameters and handy methods related to reporting parameters of source files by means of creating JSON files in report directory.
62598ee701c39578d7f11456
class Fluent(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def create_fluent(cls, term, timestep): <NEW_LINE> <INDENT> args = term.args + (Constant(timestep),) <NEW_LINE> return term.with_args(*args)
Factory class for building fluent terms. A fluent term is a problog.logic.Term with a problog.logic.Constant as last argument representing its timestep.
62598ee7e64d504609df8715
class CompanyForm(FlaskForm): <NEW_LINE> <INDENT> email = StringField( label='邮箱', validators=[ DataRequired("邮箱不能为空!"), Length(1, 64, message="邮箱请输入1~64位长度!"), Email() ] ) <NEW_LINE> password = PasswordField( label='密码', validators=[ DataRequired("密码不能为空!"), Length(6, 32, message="密码请输入6~32位的长度") ] ) <NEW_LINE> userna...
新增企业用户表单 Author: little、seven
62598ee7eab8aa0e5d30a426
class GetResourceUsageReportForJob(object): <NEW_LINE> <INDENT> swagger_types = { 'job_id': 'int', 'session_code': 'str' } <NEW_LINE> attribute_map = { 'job_id': 'JobId', 'session_code': 'SessionCode' } <NEW_LINE> def __init__(self, job_id=None, session_code=None): <NEW_LINE> <INDENT> self._job_id = None <NEW_LINE> sel...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ee755399d3f05624be0
class CasualPantDecorator(ClothingDecorator): <NEW_LINE> <INDENT> def __init__(self, person): <NEW_LINE> <INDENT> super().__init__(person) <NEW_LINE> <DEDENT> def decorate(self): <NEW_LINE> <INDENT> print("一条卡其色休闲裤")
休闲裤装饰器
62598ee74e4d562566370ac7
class TestHistory: <NEW_LINE> <INDENT> @responses.activate <NEW_LINE> def test_history(self): <NEW_LINE> <INDENT> urlTest = 'https://fr.wikipedia.org/w/api.php?format=json&action=query&' <NEW_LINE> urlTest += 'list=geosearch&gscoord=48.87610678029149%7C2.351913680291502&gsradius=40' <NEW_LINE> responses.add(responses.G...
A mock class to simulate the tell_history method return's data
62598ee73c8af77a43b6728a
class WhitespaceEOLChecker(Base): <NEW_LINE> <INDENT> __implements__ = IRawChecker <NEW_LINE> name = 'whitespace eol' <NEW_LINE> msgs = {'C9968': ('whitespace at the end of a line', ('Line ends with whitespace, rather than immediately' ' after the text')), } <NEW_LINE> options = () <NEW_LINE> def process_module(self, a...
Check for whitespace at the end of a line.
62598ee70a50d4780f703a59
class SingletonFactory(object): <NEW_LINE> <INDENT> def __init__(self, cls, lock): <NEW_LINE> <INDENT> self._lock = lock <NEW_LINE> self._old_cls = cls <NEW_LINE> self._instance = None <NEW_LINE> <DEDENT> def new_uninstantiated(self, cls, *args, **kwargs): <NEW_LINE> <INDENT> with self._lock: <NEW_LINE> <INDENT> if ...
Takes a class and produces a singleton.
62598ee730bbd722464682e5
class StringToStream(Builtin): <NEW_LINE> <INDENT> attributes = ('Protected') <NEW_LINE> def apply(self, string, evaluation): <NEW_LINE> <INDENT> pystring = string.to_python()[1:-1] <NEW_LINE> stream = io.StringIO(six.text_type(pystring)) <NEW_LINE> name = Symbol('String') <NEW_LINE> n = next(NSTREAMS) <NEW_LINE> resul...
<dl> <dt>'StringToStream[$string$]' <dd>converts a $string$ to an open input stream. </dl> >> strm = StringToStream["abc 123"] = InputStream[String, ...] #> Read[strm, Word] = abc #> Read[strm, Number] = 123 #> Close[strm] = String
62598ee72ae34c7f260a9795
class Single(multiprocessing.Process): <NEW_LINE> <INDENT> def __init__( self, opts, arg_str, host, user=None, port=None, passwd=None, priv=None, timeout=None, sudo=False): <NEW_LINE> <INDENT> self.opts = opts <NEW_LINE> self.arg_str = arg_str <NEW_LINE> self.shell = salt.ssh.shell.Shell( host, user, port, passwd, priv...
Hold onto a single ssh execution
62598ee78e71fb1e983ba119
class LombScargleMultibandFast(PeriodicModelerMultiband): <NEW_LINE> <INDENT> def __init__(self, optimizer=None, Nterms=1, BaseModel=None, fit_period=False, optimizer_kwds=None): <NEW_LINE> <INDENT> self.Nterms = Nterms <NEW_LINE> if BaseModel is None: <NEW_LINE> <INDENT> if Nterms == 1: <NEW_LINE> <INDENT> BaseModel =...
Fast Multiband Periodogram Implementation This implements the specialized multi-band periodogram described in VanderPlas & Ivezic 2015 (with Nbase=0 and Nband=1) which is essentially a weighted sum of the standard periodograms for each band. Parameters ---------- optimizer : PeriodicOptimizer instance Optimizer t...
62598ee7851cf427c66b697f
class WebsiteUser(HttpLocust): <NEW_LINE> <INDENT> host = "http://127.0.0.1:8089" <NEW_LINE> min_wait = 2000 <NEW_LINE> max_wait = 5000 <NEW_LINE> task_set = UserTasks
Locust user class that does requests to the locust web server running on localhost
62598ee771ff763f4b5e5e09
class MockAPI(object): <NEW_LINE> <INDENT> def __init__(self, dir=None, mock_host=None): <NEW_LINE> <INDENT> self.hosts = {} <NEW_LINE> if dir and mock_host: <NEW_LINE> <INDENT> self.add_host(dir, mock_host) <NEW_LINE> <DEDENT> <DEDENT> def add_host(self, dir, mock_host): <NEW_LINE> <INDENT> if not os.path.isdir(dir):...
Creates a mock static api
62598ee78c0ade5d55dc29d9
class ProfileSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> details = serializers.HyperlinkedIdentityField(lookup_field='username', view_name='api_profile_detail') <NEW_LINE> avatar = serializers.SerializerMethodField('get_avatar') <NEW_LINE> full_name = serializers.SerializerMethodField('get_full_name') ...
Profile Serializer for visualization
62598ee7a219f33f346c4ee7
class TestFitLineTo(unittest.TestCase): <NEW_LINE> <INDENT> def testFitLineToCardinalAxes(self): <NEW_LINE> <INDENT> x_axis = np.array([1,0,0]) <NEW_LINE> y_axis = np.array([0,1,0]) <NEW_LINE> z_axis = np.array([0,0,1]) <NEW_LINE> rand_array = np.random.rand(5000, 3) <NEW_LINE> cardinal_line_x = rand_array.copy() <NEW_...
Tests the function fitLineTo from the fitting module.
62598ee77047854f4633da83
class SearchWordlistAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> pass
Indexed words (for search)
62598ee701c39578d7f11457
class Config: <NEW_LINE> <INDENT> SOURCE_API_BASE_URL = 'https://newsapi.org/v2/sources?apiKey={}' <NEW_LINE> ARTICLES_API_BASE_URL ='http://newsapi.org/v2/everything?sources={}&sortBy=publishedAt&apiKey={}' <NEW_LINE> SECRET_KEY = os.environ.get('SECRET_KEY') <NEW_LINE> SOURCE_API_KEY = os.environ.get('SOURCE_API_KEY'...
General configuration parent class
62598ee7bd1bec0571e14422
class SdkConnectionFixture(ClientFixture): <NEW_LINE> <INDENT> def __init__(self, requests_mock, glance_url=GLANCE_URL): <NEW_LINE> <INDENT> super(SdkConnectionFixture, self).__init__(requests_mock) <NEW_LINE> s = self.token.add_service('image') <NEW_LINE> s.add_endpoint(glance_url) <NEW_LINE> <DEDENT> def new_client(s...
Fixture class to access the apis via openstacksdk's Connection object. This class is mocking the requests of glance api.
62598ee776e4537e8c3edc67
class ResponseTestingDict(TypedDict): <NEW_LINE> <INDENT> num: int <NEW_LINE> num_ok: int <NEW_LINE> ok: bool <NEW_LINE> tests_data: List[ResponseTestData]
Описывает формат ответа эндпоинта /testing/
62598ee799cbb53fe682f560
class MutualInformationMatrix(BaseReconstructor): <NEW_LINE> <INDENT> def fit(self, TS, nbins=10, threshold_type='degree', **kwargs): <NEW_LINE> <INDENT> N = TS.shape[0] <NEW_LINE> rang = [np.min(TS), np.max(TS)] <NEW_LINE> IndivP = find_individual_probability_distribution(TS, rang, nbins) <NEW_LINE> ProduP = find_prod...
Uses the mutual information between nodes.
62598ee76e29344779afece0
class CT_Spacing(BaseOxmlElement): <NEW_LINE> <INDENT> after = OptionalAttribute('w:after', ST_TwipsMeasure) <NEW_LINE> before = OptionalAttribute('w:before', ST_TwipsMeasure) <NEW_LINE> line = OptionalAttribute('w:line', ST_SignedTwipsMeasure) <NEW_LINE> lineRule = OptionalAttribute('w:lineRule', WD_LINE_SPACING)
``<w:spacing>`` element, specifying paragraph spacing attributes such as space before and line spacing.
62598ee7cb5e8a47e493b4d0
class Input(templates.Templates): <NEW_LINE> <INDENT> channel_names = { "zjets": "zlight", "stop": "singletop", "qcd": "eleqcd", "data": "DATA", "zp500w5": "zp500w1p", "zp750w7p5": "zp750w1p", "zp1000w10": "zp1000w1p", "zp1250w12p5": "zp1250w1p", "zp1500w15": "zp1500w1p", "zp2000w20": "zp2000w1p", "zp3000w30": "zp3000w...
Save theta input plot(s)
62598ee7627d3e7fe0e05537
@dataclass <NEW_LINE> class Enclave: <NEW_LINE> <INDENT> name: str <NEW_LINE> read: Keyset <NEW_LINE> write: Keyset
Maps a Vault path to 'read' and 'write' Keysets. The 'Enclave' is simply a particular vault path with its own Keysets, e.g. 'k8s_operator/nublado.lsst.codes'
62598ee763d6d428bbee0e7b
class Maze: <NEW_LINE> <INDENT> def __init__(self, height=10, width=10, walls=[], start=(0,0), end=None): <NEW_LINE> <INDENT> self.start = start <NEW_LINE> self.specials = {} <NEW_LINE> self.height = height <NEW_LINE> self.width = width <NEW_LINE> if(end): <NEW_LINE> <INDENT> self.end = end <NEW_LINE> <DEDENT> else: <N...
A class for repersenting mazes
62598ee701c39578d7f11458
class ProcessKarafRunningProcesses(process.Processor): <NEW_LINE> <INDENT> KEY = 'karaf_running_processes' <NEW_LINE> @staticmethod <NEW_LINE> def process(output, dependencies=None): <NEW_LINE> <INDENT> if FIND_WARNING in output['stdout']: <NEW_LINE> <INDENT> logging.error('Find command failed') <NEW_LINE> return proce...
Process a list of Jboss Fuse on Karaf processes.
62598ee745492302aabfab5c
class BatchRename(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.path = 'C:\\Users\\yanghang\\ugthesis\\d' <NEW_LINE> <DEDENT> def rename(self): <NEW_LINE> <INDENT> filelist = os.listdir(self.path) <NEW_LINE> total_num = len(filelist) <NEW_LINE> i = 342 <NEW_LINE> for item in filelist: <NEW_LINE> <...
批量重命名文件夹中的图片文件 用try,except语句来捕捉出现的所有故障
62598ee756ac1b37e630089c
class UploadSessionFinishBatchArg(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_entries_value', '_entries_present', ] <NEW_LINE> _has_required_fields = True <NEW_LINE> def __init__(self, entries=None): <NEW_LINE> <INDENT> self._entries_value = None <NEW_LINE> self._entries_present = False <NEW_LINE> if entries is not...
:ivar entries: Commit information for each file in the batch.
62598ee738b623060ffa7748
class ReaderStatus: <NEW_LINE> <INDENT> Disconnected = 1 <NEW_LINE> Connected = 2 <NEW_LINE> AlreadyInUse = 3
Card Tap Error Enum
62598ee74e4d562566370ac8
class _Bucket: <NEW_LINE> <INDENT> def __init__(self, rate, period=1.0, retry_interval=0.01): <NEW_LINE> <INDENT> self.rate = rate <NEW_LINE> self.token_period = period / rate <NEW_LINE> self.token = 0 <NEW_LINE> self.retry_interval = retry_interval <NEW_LINE> self.timestamp = time() <NEW_LINE> <DEDENT> async def get_t...
Simplified token Bucket implementation. Used to add a rate limit
62598ee7fff4ab517ebcbe87
class YusifovKucuk2004(Fittable1DModel): <NEW_LINE> <INDENT> amplitude = Parameter() <NEW_LINE> a = Parameter() <NEW_LINE> b = Parameter() <NEW_LINE> r_1 = Parameter() <NEW_LINE> evolved = True <NEW_LINE> def __init__(self, amplitude=1, a=1.64, b=4.01, r_1=0.55, **kwargs): <NEW_LINE> <INDENT> super().__init__(amplitude...
Radial distribution of the surface density of pulsars in the galaxy - Yusifov & Kucuk 2004. .. math:: f(r) = A \left ( \frac{r + r_1}{r_{\odot} + r_1} \right )^a \exp \left [-b \left( \frac{r - r_{\odot}}{r_{\odot} + r_1} \right ) \right ] Used by Faucher-Guigere and Kaspi. Density at ``r = 0`` is nonzero. R...
62598ee7a8370b77170eea93
class DeconzEvent(DeconzBase): <NEW_LINE> <INDENT> def __init__(self, device, gateway): <NEW_LINE> <INDENT> super().__init__(device, gateway) <NEW_LINE> self._device.register_callback(self.async_update_callback) <NEW_LINE> self.device_id = None <NEW_LINE> self.event_id = slugify(self._device.name) <NEW_LINE> LOGGER.deb...
When you want signals instead of entities. Stateless sensors such as remotes are expected to generate an event instead of a sensor entity in hass.
62598ee70a50d4780f703a5b
class PlayerLayer(Layer): <NEW_LINE> <INDENT> is_event_handler = True <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(PlayerLayer, self).__init__() <NEW_LINE> startpos = CONFIG['startpos'] <NEW_LINE> self.player = Bird(self,startpos[0],startpos[1]) <NEW_LINE> <DEDENT> def update(self,dt): <NEW_LINE> <INDENT> s...
classdocs
62598ee723849d37ff84f766
class Resource(IndexedType): <NEW_LINE> <INDENT> pass
A fulltextindex.Resource is a URI that also has a human-readable label.
62598ee7435de62698e9a486
class RepoPkgsReinstallOldSubCommandTest(support.ResultTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(RepoPkgsReinstallOldSubCommandTest, self).setUp() <NEW_LINE> base = support.BaseCliStub('main') <NEW_LINE> base.init_sack() <NEW_LINE> self.cli = base.mock_cli() <NEW_LINE> <DEDENT> def test_...
Tests of ``dnf.cli.commands.RepoPkgsCommand.ReinstallOldSubCommand`` class.
62598ee7d7e4931a7ef3a74f
class Bloco1(Bloco): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._registro_abertura = Registro1001() <NEW_LINE> self._registro_fechamento = Registro1990()
Complemento da Escrituração – Controle de Saldos de Créditos e de Retenções, Operações Extemporâneas e Outras Informações
62598ee7f9cc0f698b1c4626
class Event: <NEW_LINE> <INDENT> def __init__(self, name, category, location, owner, description): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.category = category <NEW_LINE> self.location = location <NEW_LINE> self.owner = owner <NEW_LINE> self.description = description <NEW_LINE> self.event_attendees = {} <NE...
This class is the blueprint for creating an event It avails the attributes required for an event
62598ee7f548e778e5969c3b
class BasicStatistics(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sum_of_rewards = 0.0 <NEW_LINE> self.number_of_dones = 0 <NEW_LINE> self.sum_of_rewards_current_episode = 0.0 <NEW_LINE> self.last_done = False <NEW_LINE> <DEDENT> def update_from_dict(self, stats_dict): <NEW_LINE> <INDENT> ...
Keeps basic statistics to calculate mean reward
62598ee74f6381625f198814
class ItemDirectory(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=127, default='', unique=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def get_param(self, param=None): <NEW_LINE> <INDENT> if isinstance(param, str): <NEW_LINE> <INDENT> param_q = ...
This is the main list of all types of files.
62598ee7097d151d1a2bf6d1
class Stack: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> <DEDENT> def show_stack(self) -> None: <NEW_LINE> <INDENT> print("Show stack: ") <NEW_LINE> ok = 1 <NEW_LINE> for i in reversed(self.items): <NEW_LINE> <INDENT> print(i) <NEW_LINE> ok = 0 <NEW_LINE> <DEDENT> if ok: <NEW_...
A stack class. push: add the item to the last level of the stack. pop: get the last item from the top of the stack. its_empty: test if the stack is empty. height: return the number of levels of the stack. top_stack: return the element from the top of the stack. show_stack: show the content of the stack from the top to ...
62598ee74428ac0f6e656c02
class KimPhoto: <NEW_LINE> <INDENT> def __init__(self, photo): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> type(photo) == 'bs4.element.Tag' <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> raise TypeError("Argument must be a bs4.BeautifulSoup object") <NEW_LINE> <DEDENT> self.title = photo['alt'] <NEW_LINE> self.src = ...
A class of photos of Kim Arguments photo: A bs4.BeautifulSoup object containing the data regarding what Kim is looking at
62598ee7dd821e528d6d75f5
class fetchRequest_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRUCT, 'success', (DRPCRequest, DRPCRequest.thrift_spec), None, ), ) <NEW_LINE> def __hash__(self): <NEW_LINE> <INDENT> return 0 + hash(self.success) <NEW_LINE> <DEDENT> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = succes...
Attributes: - success
62598ee71f5feb6acb161301
class _ViewProviderArchMaterialContainer: <NEW_LINE> <INDENT> def __init__(self,vobj): <NEW_LINE> <INDENT> vobj.Proxy = self <NEW_LINE> <DEDENT> def getIcon(self): <NEW_LINE> <INDENT> return ":/icons/Arch_Material_Group.svg"
A View Provider for the Material Container
62598ee763b5f9789fe8380d
class Resource(object): <NEW_LINE> <INDENT> _excluded_attrs = [] <NEW_LINE> def __init__(self, transport, payload, url, token=None, **kwargs): <NEW_LINE> <INDENT> self._url = url <NEW_LINE> self._transport = transport <NEW_LINE> self._token = token <NEW_LINE> self._payload = payload <NEW_LINE> self._excluded_attrs = se...
Defines common functionality for Item and List Resources. Resources are able to make requests to the Web API by returning an HttpRequest object. When an HttpRequest is returned from a method call, the transport layer will execute this request and return the result to the user. Methods for constructing requests to per...
62598ee70c0af96317c54a4d
class SQLiteTokenManager(BaseTokenManager): <NEW_LINE> <INDENT> def __init__(self, database, key): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> import sqlite3 <NEW_LINE> self._connection = sqlite3.connect(database) <NEW_LINE> self._connection.execute( "CREATE TABLE IF NOT EXISTS tokens (id, refresh_token, updated_...
Provides a SQLite3 based token manager. Unlike, :class:`.FileTokenManager`, the initial database need not be created ahead of time, as it'll automatically be created on first use. However, initial ``refresh_tokens`` will need to be registered via :meth:`.register` prior to use. .. warning:: This class is unteste...
62598ee7a17c0f6771d5a903
class Module: <NEW_LINE> <INDENT> def during_bootup(self, keyboard): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def before_matrix_scan(self, keyboard): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def after_matrix_scan(self, keyboard): <NEW_LINE> <INDENT> raise NotImplemented...
Modules differ from extensions in that they not only can read the state, but are allowed to modify the state. The will be loaded on boot, and are not allowed to be unloaded as they are required to continue functioning in a consistant manner.
62598ee7be8e80087fbbd6fe
class GQueryError(GeocoderResultError): <NEW_LINE> <INDENT> pass
Generic Google query error.
62598ee716aa5153ce3febae
class Task(object): <NEW_LINE> <INDENT> def __init__(self, task_id): <NEW_LINE> <INDENT> self.task_id = task_id <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> raise NotImplementedError("The run() method has to be implemented by every task.")
Base class for all tasks Make sure that each implementation of a tasks is a sub class of this class.
62598ee7d7e4931a7ef3a750
class DoExcel(): <NEW_LINE> <INDENT> def __init__(self,file,sheet): <NEW_LINE> <INDENT> self.file=file <NEW_LINE> self.sheet =sheet <NEW_LINE> <DEDENT> def Read_Excel(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> case_id=ReadConfig(project_path.config_ini_path).get_data('CASE','case_id') <NEW_LINE> wb = load_work...
该类完成测试用例的读取及测试结果的返回
62598ee785dfad0860cbedc0
class FlightSearchPage: <NEW_LINE> <INDENT> url="http://flight.qunar.com" <NEW_LINE> loc_from_city_input=(By.NAME,"fromCity") <NEW_LINE> loc_to_city_input=(By.XPATH,'//*[@id="dfsForm"]/div[2]/div[2]/div/input') <NEW_LINE> loc_from_date=(By.ID,"fromDate") <NEW_LINE> loc_search_btn=(By.CLASS_NAME,"btn_search") <NEW_LINE>...
机票搜索页面
62598ee72eb69b55b15a06e2
class Action41(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( self.__class__.__name__))
Aliases->By Character->Set Clipping X... Parameters: 0: Enter Alias (EXPRESSION, ExpressionParameter) 1: Enter A Character (EXPSTRING, ExpressionParameter) 2: Enter X Clipping Coordinate (EXPRESSION, ExpressionParameter)
62598ee74e4d562566370aca
class UserAccessExpired(Exception): <NEW_LINE> <INDENT> pass
Raised when user access has expired
62598ee721bff66bcd721304
class DescribeMeshRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.MeshId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.MeshId = params.get("MeshId") <NEW_LINE> memeber_set = set(params.keys()) <NEW_LINE> for name, value in vars(self).items()...
DescribeMesh请求参数结构体
62598ee78da39b475be0185c
class ImJoyPlugin: <NEW_LINE> <INDENT> def __init__(self, ws): <NEW_LINE> <INDENT> self._ws = ws <NEW_LINE> <DEDENT> async def setup(self): <NEW_LINE> <INDENT> await self._ws.log("initialized") <NEW_LINE> <DEDENT> async def run(self, ctx): <NEW_LINE> <INDENT> await self._ws.log("hello world")
Represent a test plugin.
62598ee74e4d562566370acb