code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class AggregatedBuilding(AbstractBuilding): <NEW_LINE> <INDENT> numberOfBuildings = EAttribute(eType=EInt, unique=True, derived=False, changeable=True) <NEW_LINE> floorArea = EAttribute(eType=EDouble, unique=True, derived=False, changeable=True) <NEW_LINE> aggregationOf = EReference(ordered=True, unique=True, containme...
Represents more than one building aggregated into one entity. It supports different types of aggregation, such as building type, energy label etc.
62598ee1a17c0f6771d5a853
class icmpv4_code(oxm_tlv): <NEW_LINE> <INDENT> def __init__(self, value=None, hasmask=False): <NEW_LINE> <INDENT> oxm_tlv.__init__(self, OFPXMT_OFB_ICMPV4_CODE, hasmask, 1, value) <NEW_LINE> <DEDENT> def show(self, prefix=''): <NEW_LINE> <INDENT> outstr = prefix + "name = icmpv4_code\n" <NEW_LINE> outstr += oxm_tlv.sh...
Wrapper class for icmpv4_code match object Data members inherited from oxm_tlv: @arg class @arg field @arg hasmask @arg body
62598ee1dd821e528d6d7545
class AutocompleteTestCase(StaticLiveServerTestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> global GLOBAL_BROWSER <NEW_LINE> if GLOBAL_BROWSER is None: <NEW_LINE> <INDENT> GLOBAL_BROWSER = Browser(os.environ.get('BROWSER', 'firefox')) <NEW_LINE> <DEDENT> cls.browser = GLOB...
Provide a class-persistent selenium instance and assertions.
62598ee1c432627299fa15b5
class AddRoleForm(forms.Form): <NEW_LINE> <INDENT> error_css_class = 'error' <NEW_LINE> required_css_class = 'required' <NEW_LINE> name = forms.CharField(widget=forms.TextInput, required=True) <NEW_LINE> description = forms.CharField(widget=forms.TextInput, required=False) <NEW_LINE> copy_from = forms.CharField(widget=...
Django form for adding a role to CRITs.
62598ee18a43f66fc4bf0771
class String(BaseType): <NEW_LINE> <INDENT> def __init__( self, *, minlen: int = None, maxlen: int = None, forbidden: str = None, regex: str = None, encoding: str = None, none_ok: bool = False, completions: _Completions = None, valid_values: ValidValues = None, ) -> None: <NEW_LINE> <INDENT> super().__init__(none_ok=no...
A string value. See the setting's valid values for more information on allowed values. Attributes: minlen: Minimum length (inclusive). maxlen: Maximum length (inclusive). forbidden: Forbidden chars in the string. regex: A regex used to validate the string. completions: completions to be used, or N...
62598ee185dfad0860cbed68
class Message(object): <NEW_LINE> <INDENT> def __init__(self, mail_db, message_id=None, timestamp=None, mailbox_index=None, read=None, from_id=None, from_name=None, subject=None, body=None): <NEW_LINE> <INDENT> self.mail_db = mail_db <NEW_LINE> self.message_id = message_id <NEW_LINE> self.timestamp = timestamp <NEW_LIN...
Transient object representing a message.
62598ee1d58c6744b42db5b6
class JadeBusemUserChangeForm(UserChangeForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kargs): <NEW_LINE> <INDENT> super(JadeBusemUserChangeForm, self).__init__(*args, **kargs) <NEW_LINE> del self.fields['username'] <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> model = JadeBusemUser
A form for updating users. Includes all the fields on the user, but replaces the password field with admin's password hash display field.
62598ee13d592f4c4edb94f3
class ComponentTests(ossie.utils.testing.ScaComponentTestCase): <NEW_LINE> <INDENT> def testScaBasicBehavior(self): <NEW_LINE> <INDENT> execparams = self.getPropertySet(kinds=("execparam",), modes=("readwrite", "writeonly"), includeNil=False) <NEW_LINE> execparams = dict([(x.id, any.from_any(x.value)) for x in execpara...
Test for all component implementations in sub_cc_4i
62598ee1baa26c4b54d4d8cf
class Post(models.Model): <NEW_LINE> <INDENT> title = models.CharField('Title', max_length=100, blank=False) <NEW_LINE> author = models.ForeignKey(User, blank=False) <NEW_LINE> url = models.URLField('URL', max_length=100, blank=False) <NEW_LINE> submitted_on = models.DateTimeField(auto_now_add=True) <NEW_LINE> tags = m...
A specific Post model in the webiste.
62598ee14e4d562566370a18
class itemmining(object): <NEW_LINE> <INDENT> pass
description of class
62598ee11b99ca400228e80c
class expose_this_t( registration_based.registration_based_t , declaration_based.declaration_based_t ): <NEW_LINE> <INDENT> def __init__(self, class_ ): <NEW_LINE> <INDENT> registration_based.registration_based_t.__init__( self ) <NEW_LINE> declaration_based.declaration_based_t.__init__( self, declaration=class_) <NEW...
creates code that expose address of the object to Python
62598ee1f8510a7c17d7d47b
class TYPE: <NEW_LINE> <INDENT> NESTED = 'nested' <NEW_LINE> CARTESIAN = 'cartesian' <NEW_LINE> WORDS = 'words' <NEW_LINE> PHRASES = 'phrases' <NEW_LINE> CONST = 'const'
Node type in configuration.
62598ee1498bea3a75a56134
class Source: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self.code: str = "none" <NEW_LINE> self.type: str = "default" <NEW_LINE> self.destination_dir: str = DEFAULT_PODCAST_DIR <NEW_LINE> self.name: str = "<unknown>" <NEW_LINE> self.enable: bool = True <NEW_LINE> <DEDENT> @property <NEW_LINE> ...
Source data object This object contains an information about source, where the podcast can be downloaded
62598ee12c8b7c6e89bd1dbf
@patch('blogs.views.PostForm') <NEW_LINE> class NewPostViewTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.request = HttpRequest() <NEW_LINE> self.request.user = Mock() <NEW_LINE> self.request.user.email = "user.name@example.com" <NEW_LINE> self.request.user.is_authenticated = Tru...
Test suite: new post view.
62598ee1a8370b77170ee9e4
class Counter(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.counters = collections.OrderedDict() <NEW_LINE> self.data = collections.OrderedDict() <NEW_LINE> self.Desc = collections.namedtuple('Desc', ['title', 'initial', 'increment']) <NEW_LINE> self.Counter = collections.namedtuple...
A class of counters with a total and a set for each key.
62598ee1be8e80087fbbd64c
class Mailer: <NEW_LINE> <INDENT> def scanRecordAttributes(self,r): <NEW_LINE> <INDENT> return [ a for a in self.__class__.MESSAGE_ATTRIBUTES if not hasattr(r,a) ] <NEW_LINE> <DEDENT> def validateRecord(self,r): <NEW_LINE> <INDENT> missing = self.scanRecordAttributes(r) <NEW_LINE> if missing: <NEW_LINE> <INDENT> raise ...
Simple mailer class that which all future mailers should inherit. The interface will use methods defined here to send emails.
62598ee1435de62698e9a3d6
class removeStaves(PluginFunction): <NEW_LINE> <INDENT> category = "Stable Paths Toolkit" <NEW_LINE> return_type = ImageType([ONEBIT], "output") <NEW_LINE> self_type = ImageType([ONEBIT]) <NEW_LINE> args = Args([Int('staffline_height', default=0), Int('staffspace_height', default=0)]) <NEW_LINE> def __c...
Finds and removes all found staves. Unless you have already computed *staffline_height* and *staffspace_height*, leave them as 0. If left as 0 they will be computed automatically.
62598ee130bbd72246468238
class QueryPackageRemainderRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v2"): <NEW_LINE> <INDENT> super(QueryPackageRemainderRequest, self).__init__( '/regions/{regionId}/queryPackageRemainder', 'POST', header, version) <NEW_LINE> self.parameters = parameters
套餐包余量,仅预付费用户使用
62598ee191f36d47f22301a3
class ForceStopParameter(AbstractBooleanParameter): <NEW_LINE> <INDENT> name = 'force_stop' <NEW_LINE> description = 'Whether to make cruise-control trigger a ' 'kafka controller switch to clear ongoing partition movements' <NEW_LINE> argparse_properties = { 'args': ('--force-stop', '--force_stop'), 'k...
force_stop=[true/false]
62598ee1379a373c97d975fa
class AddressMode(enum.IntEnum): <NEW_LINE> <INDENT> RELATIVE = 0x00 <NEW_LINE> PC32 = 0x10 <NEW_LINE> ABS32 = 0x30 <NEW_LINE> REL32 = 0x60 <NEW_LINE> PC16 = 0x90 <NEW_LINE> REL12 = 0xa0 <NEW_LINE> ABS16 = 0xb0 <NEW_LINE> PCX = 0xd0 <NEW_LINE> RELX = 0xe0
CLIPPER cpu addressing modes
62598ee167a9b606de5445ce
class Server(models.Model): <NEW_LINE> <INDENT> name = models.CharField(_('Servername'), max_length=100) <NEW_LINE> playercount = models.IntegerField(_('Player Count')) <NEW_LINE> maxplayercount = models.IntegerField(_('Max Player Count')) <NEW_LINE> spectatorcount = models.IntegerField(_('Spectator Count')) <NEW_LINE>...
A basic game server
62598ee12c8b7c6e89bd1dc0
class Lab(YAMLObject): <NEW_LINE> <INDENT> def __init__(self, name, lab_type, filters=None): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._lab_type = lab_type <NEW_LINE> self._filters = filters or list() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_yaml(cls, lab, kw): <NEW_LINE> <INDENT> return cls(**k...
Test lab model.
62598ee18a43f66fc4bf0773
class SetDMXBlockAddress(TestMixins.SetMixin, OptionalParameterTestFixture): <NEW_LINE> <INDENT> CATEGORY = TestCategory.DMX_SETUP <NEW_LINE> PID = 'DMX_BLOCK_ADDRESS' <NEW_LINE> REQUIRES = ['total_sub_device_footprint', 'base_dmx_address'] <NEW_LINE> EXPECTED_FIELDS = ['base_dmx_address'] <NEW_LINE> def NewValue(self)...
SET the DMX_BLOCK_ADDRESS.
62598ee14428ac0f6e656b53
class MockRecord(object): <NEW_LINE> <INDENT> pass
A mock record class
62598ee1d58c6744b42db5b7
class ScrolledPage(Page): <NEW_LINE> <INDENT> def __init__(self, dialog): <NEW_LINE> <INDENT> super(ScrolledPage, self).__init__(dialog) <NEW_LINE> layout = QVBoxLayout(margin=0, spacing=0) <NEW_LINE> self.setLayout(layout) <NEW_LINE> scrollarea = QScrollArea(frameWidth=0, frameShape=QScrollArea.NoFrame) <NEW_LINE> lay...
Base class for settings pages that are scrollable. Te scrolledWidget attribute has the widget the other components can be added to.
62598ee1dd821e528d6d7547
class DynetError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message
Class for Dynet errors.
62598ee14e4d562566370a1a
class NoAliasException(click.ClickException): <NEW_LINE> <INDENT> def __init__(self, alias): <NEW_LINE> <INDENT> click.ClickException.__init__(self, "No `{}` alias " "defined.".format(alias))
Exception raised when an alias lookup fails.
62598ee163d6d428bbee0dd4
class EnumClass(Dummy): <NEW_LINE> <INDENT> basename = "Enum class" <NEW_LINE> def __init__(self, cls, dtype): <NEW_LINE> <INDENT> assert isinstance(cls, type) <NEW_LINE> assert isinstance(dtype, Type) <NEW_LINE> self.instance_class = cls <NEW_LINE> self.dtype = dtype <NEW_LINE> name = "%s<%s>(%s)" % (self.basename, se...
Type class for Enum classes.
62598ee16e29344779afec2f
class CheckNoArch(JavaCheckBase): <NEW_LINE> <INDENT> def __init__(self, base): <NEW_LINE> <INDENT> JavaCheckBase.__init__(self, base) <NEW_LINE> self.text = """Packages are noarch unless they use JNI""" <NEW_LINE> self.url = 'https://fedoraproject.org/wiki/Packaging:Java' <NEW_LINE> self.automatic = True <NEW_LINE> se...
Package should be noarch in most cases
62598ee123849d37ff84f6bc
class ModeratorSaveTest(ModeratorTest): <NEW_LINE> <INDENT> pass
Test save and save_checkpoint.
62598ee144b2445a339b5c67
class AuthenticationView(APIView): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get(request): <NEW_LINE> <INDENT> send_account_verification_email(request.user.email) <NEW_LINE> content = {'status': 'Verification e-mail has been sent.'} <NEW_LINE> return Response(content, status=status.HTTP_200_OK) <NEW_LINE> <DEDEN...
A view for authorizing users.
62598ee16fb2d068a7693123
class Eventseverity(basestring): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_api_name(): <NEW_LINE> <INDENT> return "eventseverity"
EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFORMATIONAL|DEBUG Possible values: <ul> <li> "emergency" - System is unusable, <li> "alert" - Action must be taken immediately, <li> "critical" - Critical condition, <li> "error" - Error condition, <li> "warning" - Warning condition, <li> "n...
62598ee13539df3088eca8b3
class TestGitHubAPICreateRelease(GitHubAPICaseWithIssues): <NEW_LINE> <INDENT> def test_dry_run(self): <NEW_LINE> <INDENT> api = self.api() <NEW_LINE> api.create_release(dry_run=True) <NEW_LINE> self.assertEqual(api.milestone.edit.call_count, 0) <NEW_LINE> <DEDENT> def test_closes_milestone(self): <NEW_LINE> <INDENT> a...
Tests for :meth:`pywincffi.dev.release.GitHubAPI.create_release`
62598ee1d53ae8145f916a8d
class Solution: <NEW_LINE> <INDENT> def EntryNodeOfLoop(self, pHead): <NEW_LINE> <INDENT> p_temp = pHead <NEW_LINE> pHead_list = [] <NEW_LINE> if pHead: <NEW_LINE> <INDENT> while pHead: <NEW_LINE> <INDENT> pHead_list.append(pHead) <NEW_LINE> if pHead.next in pHead_list: <NEW_LINE> <INDENT> break <NEW_LINE> <DEDENT> pHe...
3种情况: 0、输入空列表 1、完全不指向 2、自己的终点指向七点 3、自己的终点指向起点的一半
62598ee1f548e778e5969b97
class TestQuickSort(SortingAlgorithmTestCase): <NEW_LINE> <INDENT> def test_quicksort(self): <NEW_LINE> <INDENT> self.output = quick_sort.sort(self.input) <NEW_LINE> self.assertEqual(self.correct, self.output)
Test Quick sort on a small range from 0-9 also tests partition function included in quick sort.
62598ee1b7558d5895461c4e
class MetadataRpcCallback(n_rpc.RpcCallback): <NEW_LINE> <INDENT> RPC_API_VERSION = '1.0' <NEW_LINE> @property <NEW_LINE> def plugin(self): <NEW_LINE> <INDENT> if not hasattr(self, '_plugin'): <NEW_LINE> <INDENT> self._plugin = manager.NeutronManager.get_plugin() <NEW_LINE> <DEDENT> return self._plugin <NEW_LINE> <DEDE...
Metadata agent RPC callback in plugin implementations.
62598ee17d847024c075a9d1
class ApproximateQAgent(PacmanQAgent): <NEW_LINE> <INDENT> def __init__(self, extractor='IdentityExtractor', **args): <NEW_LINE> <INDENT> self.featExtractor = util.lookup(extractor, globals())() <NEW_LINE> PacmanQAgent.__init__(self, **args) <NEW_LINE> self.weights = util.Counter() <NEW_LINE> <DEDENT> def getWeights(se...
ApproximateQLearningAgent You should only have to overwrite getQValue and update. All other QLearningAgent functions should work as is.
62598ee1379a373c97d975fc
class Cache: <NEW_LINE> <INDENT> def __init__(self, time_diff, jikan, scraper): <NEW_LINE> <INDENT> print("Fixing cache...") <NEW_LINE> self.write_to_cache_periodically = 25 <NEW_LINE> self.allowed_time_diff = time_diff <NEW_LINE> self.jikan = jikan <NEW_LINE> self.scraper = scraper <NEW_LINE> self.json_fullpath = path...
Class that caches requests to local json file, and scrapes for scores that could not be found.
62598ee14527f215b58e8507
class AnalysisError(Exception): <NEW_LINE> <INDENT> pass
The analysis cannot complete due to misconfiguration.
62598ee1379a373c97d975fd
class UserApi(TdApi): <NEW_LINE> <INDENT> def __init__(self, gateway: ComstarGateway): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.gateway = gateway <NEW_LINE> self.gateway_name = gateway.gateway_name <NEW_LINE> self.trades: Dict[str, TradeData] = {} <NEW_LINE> self.orders: Dict[str, OrderData] = {} <NEW_LIN...
Implements Comstar API.
62598ee167a9b606de5445d0
class GetUserProfile(GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> serializer_class = BasicProfileSerializer <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> username = kwargs.get('username', {}) <NEW_LINE> try: <NEW_LINE> <INDENT> user = get_user_model()...
Defines the view for getting a User's profile
62598ee12c8b7c6e89bd1dc2
class PopularTablesAPI(Resource): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self.client = get_proxy_client() <NEW_LINE> <DEDENT> @swag_from('swagger_doc/popular_tables_get.yml') <NEW_LINE> def get(self, user_id: Optional[str] = None) -> Iterable[Union[Mapping, int, None]]: <NEW_LINE> <INDENT> ...
PopularTables API
62598ee163b5f9789fe83770
class SshConnection(object): <NEW_LINE> <INDENT> def __init__(self, hostname, username, password): <NEW_LINE> <INDENT> self.__hostname = hostname <NEW_LINE> self.__username = username <NEW_LINE> self.__password = password <NEW_LINE> try: <NEW_LINE> <INDENT> self.__host_keys = paramiko.util.load_host_...
A simple class responsible for making a remote ssh connection for the given host-name and user
62598ee130bbd7224646823b
class PasswordTooShortError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(PasswordTooShortError, self).__init__(message)
密码过短
62598ee123849d37ff84f6bd
class userloginform(forms.ModelForm): <NEW_LINE> <INDENT> username = forms.CharField() <NEW_LINE> password = forms.CharField(widget=forms.PasswordInput) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = UserProfile <NEW_LINE> fields = ['username', 'password']
docstring for userloginform"forms.Form def __init__(self, arg): super userloginform,forms.Form.__init__() self.arg = arg
62598ee1c432627299fa15ba
class ImageDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, root_dir, trainPercent, valPercent, flag, transform=None): <NEW_LINE> <INDENT> self.root_dir = root_dir <NEW_LINE> self.transform = transform <NEW_LINE> with open(self.root_dir + "cleanTrainCap", "rb") as f: <NEW_LINE> <INDENT> trainCaps = pickle.load...
MIT image dataset.
62598ee121bff66bcd721255
class PushAuthToken(db.Model): <NEW_LINE> <INDENT> user_id = db.Column('user_id', UUIDType(binary=False), db.ForeignKey("user.user_id"), primary_key=True, nullable=False) <NEW_LINE> authenticated = db.Column(db.Boolean, unique=False, default=False) <NEW_LINE> send_date = db.Column(ArrowType) <NEW_LINE> ack_date = db.Co...
the PushAuth class hold data related to the push-authentication mechanism.
62598ee1f8510a7c17d7d47d
class _ConfigProxy: <NEW_LINE> <INDENT> def __init__(self, config, section): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.section = section <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> return self.config.get(self.section, key) <NEW_LINE> <DEDENT> def __setitem__(self, key, value): <NE...
Proxy class for performing item setting and getting for Config. Emulates configparser interface in Python 3.
62598ee144b2445a339b5c68
class BinarySearchTree: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.root = None <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def find_min(node): <NEW_LINE> <INDENT> compare_node = node <NEW_LINE> while compare_node is not None: <NEW_LINE> <INDENT> if compare_node.left_child is None: <NEW_LINE> <IND...
이진 탐색 트리 클래스
62598ee167a9b606de5445d1
class BankPruneError(BankError): <NEW_LINE> <INDENT> pass
Raised when trying to prune a local bank and no server is specified.
62598ee110dbd63aa1c6f174
class OSPFInterfaceSetting(Element): <NEW_LINE> <INDENT> typeof = "ospfv2_interface_settings" <NEW_LINE> key_chain_ref = ElementRef("key_chain_ref") <NEW_LINE> @classmethod <NEW_LINE> def create( cls, name, dead_interval=40, hello_interval=10, hello_interval_type="normal", dead_multiplier=1, mtu_mismatch_detection=True...
OSPF Interface Setting indicate specific configurations that are applied to the interface and OSPF Area configuration, including authentication. If you require non-default settings applied to your interface OSPF instance, you can create a custom interface profile:: OSPFInterfaceSetting.create( name='mypro...
62598ee1442bda511e95aa6b
class QueueResource(WebResource): <NEW_LINE> <INDENT> def __init__(self, user_service, audio_service): <NEW_LINE> <INDENT> super(QueueResource, self).__init__("/api/queue") <NEW_LINE> self.user_service = user_service <NEW_LINE> self.audio_service = audio_service <NEW_LINE> <DEDENT> @get("") <NEW_LINE> @requires_auth("u...
QueueResource
62598ee16fb2d068a7693124
class OwnerMixinQuerySet(models.QuerySet): <NEW_LINE> <INDENT> def owned_by(self, user, include_staff=False, include_superuser=False): <NEW_LINE> <INDENT> if not user: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> UserModel = get_user_model() <NEW_LINE> user_pk, user = (user.pk, user) if isinstance(user, UserModel)...
Queryset for owner mixin
62598ee1fbf16365ca7926a7
class CRISPRLibSeqQC: <NEW_LINE> <INDENT> def __init__(self, name, out): <NEW_LINE> <INDENT> self.samplename = name <NEW_LINE> self.outfolder = out <NEW_LINE> self.bt2stats = '' <NEW_LINE> self.picardstats = '' <NEW_LINE> self.filenames = {'sam':'', 'guidesCt':'', 'guidespergene':'', 'guidemiss':'', 'misspergene':''} <...
Store info for the result presentation Attributes: samplename: Name of the fastq file which the following processing info/results belong to. outfolder: Directory where you can find processing results for the corresponding (samplename) fastq file. bt2stats: A multi-line strings re...
62598ee13539df3088eca8b5
class DeptaExtractor(RecordExtractor): <NEW_LINE> <INDENT> def __init__(self, extractors, template_tokens): <NEW_LINE> <INDENT> super(DeptaExtractor, self).__init__(extractors, template_tokens) <NEW_LINE> self.best_match = first_longest_subsequence <NEW_LINE> <DEDENT> def extract(self, page, start_index=0, end_index=No...
A simple RecordExtractor variant to handle the tabulated data.
62598ee1627d3e7fe0e0548b
class LegitSproutCommand(LegitWindowCmd, WindowCommand): <NEW_LINE> <INDENT> def run(self, select_branch=False): <NEW_LINE> <INDENT> repo = self.get_repo() <NEW_LINE> if not repo: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> if select_branch: <NEW_LINE> <INDENT> self.show_branches_panel(repo, partial(self.sprout, rep...
Documentation coming soon.
62598ee1e5267d203ee69f08
class Action7(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( self.__class__.__name__))
Insert a line Parameters: 0: Line number to insert after (EXPRESSION, ExpressionParameter) 1: Line to insert (EXPSTRING, ExpressionParameter)
62598ee124f1403a92684ba6
class PetShop: <NEW_LINE> <INDENT> def __init__(self, animal_factory=None): <NEW_LINE> <INDENT> self.pet_factory = animal_factory <NEW_LINE> <DEDENT> def show_pet(self): <NEW_LINE> <INDENT> pet = self.pet_factory.get_pet() <NEW_LINE> print("This is a lovely", str(pet)) <NEW_LINE> print("It says", pet.speak()) <NEW_LINE...
A pet shop
62598ee1f7d966606f7465f3
class License(Model): <NEW_LINE> <INDENT> AFL_3_0 = "afl-3.0" <NEW_LINE> APACHE_2_0 = "apache-2.0" <NEW_LINE> ARTISTIC_2_0 = "artistic-2.0" <NEW_LINE> BSL_1_0 = "bsl-1.0" <NEW_LINE> BSD_2_CLAUSE = "bsd-2-clause" <NEW_LINE> BSD_3_CLAUSE = "bsd-3-clause" <NEW_LINE> BSD_3_CLAUSE_CLEAR = "bsd-3-clause-clear" <NEW_LINE> CC ...
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
62598ee10a50d4780f7039ad
class Variable(Formula): <NEW_LINE> <INDENT> def __init__(self, name, generator=None, arguments=None, markers=None, attributors=None, choosers=None): <NEW_LINE> <INDENT> super(Variable, self).__init__(generator=generator, arguments=arguments, markers=markers, attributors=attributors, choosers=choosers) <NEW_LINE> self....
A variable.
62598ee1d268445f26638e90
class Teacher(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'teacher'
老师表
62598ee17d847024c075a9d3
class TestTodo_post(TestTodo): <NEW_LINE> <INDENT> def test_post_success(self): <NEW_LINE> <INDENT> self.client.get('/login/%s' % self.user.id) <NEW_LINE> todo = { 'subject': 'Test Subject', 'todoListId': 1, 'creatorId': 1, 'dueDate': None, 'description': 'Test Description', 'priority': 3, 'completed': 0, 'assigneeId':...
Test cases for the post API endpoint.
62598ee17d847024c075a9d2
class HomeKitEntity(Entity): <NEW_LINE> <INDENT> def __init__(self, accessory, devinfo): <NEW_LINE> <INDENT> self._name = accessory.model <NEW_LINE> self._securecon = accessory.securecon <NEW_LINE> self._aid = devinfo['aid'] <NEW_LINE> self._iid = devinfo['iid'] <NEW_LINE> self._address = "homekit-{}-{}".format(devinfo...
Representation of a Home Assistant HomeKit device.
62598ee1d7e4931a7ef3a6a0
class TableSchema(messages.Message): <NEW_LINE> <INDENT> fields = messages.MessageField('TableFieldSchema', 1, repeated=True)
A TableSchema object. Fields: fields: Describes the fields in a table.
62598ee14a966d76dd5ed4e7
class SimpleAutoPlayer(DominoPlayer): <NEW_LINE> <INDENT> def __init__(self, game, number): <NEW_LINE> <INDENT> DominoPlayer.__init__(self, game, number) <NEW_LINE> self.pieces_position = self.game.table.first_player_position <NEW_LINE> <DEDENT> def play(self): <NEW_LINE> <INDENT> if self.game.is_finished(): <NEW_LINE>...
Jugador automatico simple Busca la primera ficha que pueda ubicarse en alguna de las posiciones si no encuentra una pide NO TIENE NINGUNA ESTRATEGIA
62598ee15166f23b2e2419da
class TestKFTarget(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> model = mht.models.ConstantVelocityModel(0.1) <NEW_LINE> self.x0 = np.array([0.0] * 4) <NEW_LINE> self.P0 = np.eye(4) <NEW_LINE> self.target = mht.kf.KFilter(model, self.x0, self.P0) <NEW_LINE> <DEDENT> def test_predict(self...
Testcases for KF Target.
62598ee17b25080760ed5a9f
class CustomDevelopCommand(develop): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> system("pip install https://github.com/dsoprea/PyEasyArchive/tarball/master") <NEW_LINE> develop.run(self)
Hack to install github version of PyEasyArchive
62598ee130bbd7224646823d
class Context(object): <NEW_LINE> <INDENT> YELLOWANT_HOST = "https://yellowant.com" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.verbose = False <NEW_LINE> self.requests = None <NEW_LINE> self.config_file = None <NEW_LINE> self.token = None <NEW_LINE> self.host = None <NEW_LINE> try: <NEW_LINE> <INDENT> self...
YellowAnt Dev CLI common methods
62598ee16e29344779afec33
class ManagedClusterPodIdentityProvisioningErrorBody(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ManagedClusterPodIdentityProv...
An error response from the pod identity provisioning. :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. :vartype code: str :ivar message: A message describing the error, intended to be suitable for display in a user interface. :vartype message: str :ivar t...
62598ee1442bda511e95aa6c
class DwSepConv2d(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_planes, out_planes, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> kwargs["groups"] = in_planes <NEW_LINE> self.dw = nn.Conv2d(in_planes, in_planes, *args, **kwargs) <NEW_LINE> self.bn1 = nn.BatchNorm2d(in_planes) <NEW_LINE> se...
Depth-wise separable convolution. Its structure is: Depthwise Conv -> Bn -> ReLU -> 1x1 Conv -> Bn -> ReLU.
62598ee1b7558d5895461c51
class RecurrentControlNet(object): <NEW_LINE> <INDENT> def __init__(self, input_size, output_size, every_t=True): <NEW_LINE> <INDENT> self.every_t = every_t <NEW_LINE> from config import rcn_params <NEW_LINE> self.layer_activation = rcn_params["layer_activation"] <NEW_LINE> self.n_use_bias = rcn_params["n_use_bias"] <N...
Nonlinear Module: OUTPUT_n(t) | HIDDEN(t-1) -> HIDDEN(t) -> ... | INPUT(t) Linear Module: INPUT(t) -> OUTPUT_l(t) Architecture: Nonlinear + Linear -> OUTPUT(t)
62598ee1eab8aa0e5d30a37d
class TagAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('title', 'description', 'site') <NEW_LINE> list_filter = ('title', 'site') <NEW_LINE> search_fields = ('title', 'site')
Display the tag model in the admin.
62598ee16aa9bd52df0d34b4
class IDNodeDict(object): <NEW_LINE> <INDENT> dictClass=dict <NEW_LINE> def __init__(self,graph,fromNode): <NEW_LINE> <INDENT> self.graph=graph <NEW_LINE> self.fromNode=fromNode <NEW_LINE> <DEDENT> def __getitem__(self,target): <NEW_LINE> <INDENT> edgeID=self.graph.d[self.fromNode][self.graph.pack_target(target)] <NEW_...
2nd layer graph interface implementation using proxy dict. e.g. shelve.
62598ee1a17c0f6771d5a85a
class Optional(BaseValidator): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> def validate(self, data): <NEW_LINE> <INDENT> return data is None or validate_common(self.data, data) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "<Optional: '%s'>"...
When used as a key for hash, validates data if data matches scheme or if key is absent from hash. When used anywhere else, validates data if data is None or if data is valid. >>> Optional('foo').validate(None) True >>> Optional('foo').validate('foo') True >>> Optional('foo').validate('bar') False
62598ee156b00c62f0fb0ed5
class StudioUnitHelpTest(ContainerBase): <NEW_LINE> <INDENT> def setUp(self, is_staff=True): <NEW_LINE> <INDENT> super(StudioUnitHelpTest, self).setUp(is_staff=is_staff) <NEW_LINE> <DEDENT> def populate_course_fixture(self, course_fixture): <NEW_LINE> <INDENT> course_fixture.add_advanced_settings( {u"advanced_modules":...
Tests help links on Unit page.
62598ee192d797404e387e7e
class AddLiveStreamAppRecordRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(AddLiveStreamAppRecordRequest, self).__init__( '/recordApps:config', 'POST', header, version) <NEW_LINE> self.parameters = parameters
添加应用级别直播录制配置 - 添加应用级别的直播录制模板配置
62598ee18da39b475be017b0
class PAINT_OT_MassLinkAppend(Operator, ImportHelper): <NEW_LINE> <INDENT> bl_idname = "wm.mass_link_append" <NEW_LINE> bl_label = "Mass Link/Append" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> active_layer : bpy.props.BoolProperty(name="Active Layer", default = True, description="Put the linked objects on ...
Import objects from multiple blend-files at the same time
62598ee14e4d562566370a1f
class Strategy: <NEW_LINE> <INDENT> def __init__(self, goal, behavior): <NEW_LINE> <INDENT> self.target_goal = goal <NEW_LINE> self.behavior = behavior <NEW_LINE> self.precedents = [] <NEW_LINE> <DEDENT> def add_precedent(self, gnode): <NEW_LINE> <INDENT> self.precedents.append(gnode) <NEW_LINE> <DEDENT> def all_goal_n...
A particular behavior and set of precedent goals to achieve a goal.
62598ee14428ac0f6e656b57
class Sparse_Cauchy_Mapper(Block_Mapper): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Block_Mapper.__init__(self, 1024) <NEW_LINE> self.As = None <NEW_LINE> <DEDENT> def parse(self, row): <NEW_LINE> <INDENT> return [float(v) for v in row.split()] <NEW_LINE> <DEDENT> def process(self): <NEW_LINE> <INDENT...
Cauchy random projection
62598ee156ac1b37e63007f2
class ExtractKeyPhrasesAction(DictMixin): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.model_version = kwargs.get("model_version", None) <NEW_LINE> self.disable_service_logs = kwargs.get("disable_service_logs", None) <NEW_LINE> <DEDENT> def __repr__(self, **kwargs): <NEW_LINE> <INDENT> ret...
ExtractKeyPhrasesAction encapsulates the parameters for starting a long-running key phrase extraction operation If you just want to extract key phrases from a list of documents, and not perform multiple long running actions on the input of documents, call method `extract_key_phrases` instead of interfacing with this m...
62598ee13cc13d1c6d463d72
class FooService(object): <NEW_LINE> <INDENT> def look_up(self, name, url, purpose=None): <NEW_LINE> <INDENT> if 'lp:///apt' == url: <NEW_LINE> <INDENT> return target_branch.base.rstrip('/') <NEW_LINE> <DEDENT> return '!unexpected look_up value!'
A directory service that maps the name to a FILE url
62598ee18e7ae83300ee7695
class NVB_PG_object_dummy(bpy.types.PropertyGroup): <NEW_LINE> <INDENT> emptytype: bpy.props.EnumProperty( name='Type', items=[(nvb_def.Emptytype.DUMMY, 'Dummy', 'Simple dummy object', 0), (nvb_def.Emptytype.REFERENCE, 'Reference node', 'Used in spells. Default value "fx_ref"', 1), (nvb_def.Emptytype.PATCH, 'Patch node...
TODO: Move dummy stuff here and use PointerProperty. This class defines all additional properties needed by the mdl file format. It hold the properties for meshes, lamps and empties.
62598ee17d847024c075a9d4
class Described(object): <NEW_LINE> <INDENT> description = Column(Text, default="") <NEW_LINE> def html_description(self): <NEW_LINE> <INDENT> if self.description == "": <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> html = publish_parts(self.description, writer_nam...
Abstract class used for all objects with a description
62598ee17d847024c075a9d5
class SparsityBlock(base.Sparsity): <NEW_LINE> <INDENT> def __init__(self, parent, i, j): <NEW_LINE> <INDENT> self._dsets = (parent.dsets[0][i], parent.dsets[1][j]) <NEW_LINE> self._rmaps = tuple(m.split[i] for m in parent.rmaps) <NEW_LINE> self._cmaps = tuple(m.split[j] for m in parent.cmaps) <NEW_LINE> self._nrows = ...
A proxy class for a block in a monolithic :class:`.Sparsity`. :arg parent: The parent monolithic sparsity. :arg i: The block row. :arg j: The block column. .. warning:: This class only implements the properties necessary to infer its shape. It does not provide arrays of non zero fill.
62598ee13617ad0b5ee04735
class Search(Container): <NEW_LINE> <INDENT> def __init__(self, search='', fuzz_delims=False, fuzz_param=False, fuzz_value=True, fuzzable=True, name=None): <NEW_LINE> <INDENT> fields = [ Delimiter(name='search main delim', value='?', fuzzable=fuzz_delims), ] <NEW_LINE> for i, part in enumerate(search.split('&')): <NEW_...
Container to fuzz the search part of the URL .. todo:: real implementation (parse search string etc.)
62598ee1a8ecb0332586f7ee
class UntransposedComplexField(BaseComplexField): <NEW_LINE> <INDENT> def __init__(self, pm, base=None): <NEW_LINE> <INDENT> Field.__init__(self, pm, base)
A complex field with untransposed representation. Faster for whitenoise, slower for r2c and c2r.
62598ee14f6381625f1987bf
class FanTasTicI2c(I2cPlatformInterface): <NEW_LINE> <INDENT> __slots__ = ["platform", "address", "channel"] <NEW_LINE> def __init__(self, number: str, platform) -> None: <NEW_LINE> <INDENT> if type(number) is not str or '-' not in number: <NEW_LINE> <INDENT> RuntimeError( "I2C number must be of format `<CHANNEL>-<I2C_...
Represents a device with a certain address on one of the four I2C channels
62598ee15166f23b2e2419dc
class One2ManyTarget(ModelSQL): <NEW_LINE> <INDENT> __name__ = 'test.one2many.target' <NEW_LINE> name = fields.Char('Name') <NEW_LINE> origin = fields.Many2One('test.one2many', 'Origin')
One2Many Target
62598ee12c8b7c6e89bd1dc6
class RootResource(Resource): <NEW_LINE> <INDENT> def __init__(self, rootResource, children): <NEW_LINE> <INDENT> Resource.__init__(self) <NEW_LINE> self._rootResource = rootResource <NEW_LINE> self.children = children <NEW_LINE> <DEDENT> def getChild(self, path, request): <NEW_LINE> <INDENT> request.prepath.pop() <NEW...
Root resource when you want one specific resource be the default serving resource for a Twisted Web site, but have sub-paths served by different resources.
62598ee1c432627299fa15be
class PortNotOutputError(RtShellError): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Port is not output: {0}'.format(self._name)
A port is not an output that should be.
62598ee123849d37ff84f6c2
@dataclass <NEW_LINE> class _JobState: <NEW_LINE> <INDENT> cluster_id: int <NEW_LINE> proc_id: int <NEW_LINE> job_status: _Status <NEW_LINE> exit_code: Optional[int] <NEW_LINE> exit_by_signal: bool <NEW_LINE> exit_signal: Optional[int] <NEW_LINE> @classmethod <NEW_LINE> def from_class_ad(cls, class_ad: ClassAd) -> '_Jo...
https://htcondor.readthedocs.io/en/latest/classad-attributes/job-classad-attributes.html
62598ee1b7558d5895461c53
class DataprocProjectsRegionsJobsDeleteRequest(_messages.Message): <NEW_LINE> <INDENT> jobId = _messages.StringField(1, required=True) <NEW_LINE> projectId = _messages.StringField(2, required=True) <NEW_LINE> region = _messages.StringField(3, required=True)
A DataprocProjectsRegionsJobsDeleteRequest object. Fields: jobId: Required. The job ID. projectId: Required. The ID of the Google Cloud Platform project that the job belongs to. region: Required. The Cloud Dataproc region in which to handle the request.
62598ee17d43ff24874266ff
class Loader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def load(module): <NEW_LINE> <INDENT> import ConfigParser <NEW_LINE> config = ConfigParser.RawConfigParser() <NEW_LINE> config.read('/opt/OpenvStorage/ovs/plugin/injection/settings.cfg') <...
Loader class
62598ee166656f66f7d589e7
class MockOU: <NEW_LINE> <INDENT> def __init__(self, uuid, parent_uuid): <NEW_LINE> <INDENT> parent_json = {"uuid": str(parent_uuid)} if parent_uuid else None <NEW_LINE> self.json = {"parent": parent_json} <NEW_LINE> self.uuid = uuid
Mock class for api-object
62598ee14428ac0f6e656b59
class CmdHoof(Command): <NEW_LINE> <INDENT> key = "+hoof" <NEW_LINE> help_category = "General" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> caller = self.caller <NEW_LINE> if not self.args: <NEW_LINE> <INDENT> caller.msg("Hoof who?") <NEW_LINE> return <NEW_LINE> <DEDENT> if self.args == " me": <NEW_LINE> <INDENT> obj...
This provides information about the selected character. Usage: +hoof <name> This command is similar to @finger, pinfo, or cinfo on other systems in that it provides publically accessible information about the character.
62598ee167a9b606de5445d5
class WellnessAutoRegressiveDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, MAX_LEN = 1024): <NEW_LINE> <INDENT> self.file_path = "./TK_data/T0_data/T0_data.txt" <NEW_LINE> self.DATA = [] <NEW_LINE> self.MAX_LEN = MAX_LEN <NEW_LINE> self.signal = 1 <NEW_LINE> self.tokenizer = get_kogpt2_tokenizer() <NEW_LINE> ...
Wellness Auto Regressive Dataset
62598ee15fdd1c0f98e5c5b6
class FeaturedSpeakerForm(messages.Message): <NEW_LINE> <INDENT> field = messages.StringField(1) <NEW_LINE> operator = messages.StringField(2) <NEW_LINE> value = messages.StringField(3)
FeaturedSpeakerForm -- FeaturedSpeaker query inbound form message
62598ee18c0ade5d55dc2987
class logger: <NEW_LINE> <INDENT> version='v0.0.1' <NEW_LINE> def __init__(self, log_file_path): <NEW_LINE> <INDENT> self.file_path=log_file_path <NEW_LINE> print('information: log file is "'+self.file_path+'"') <NEW_LINE> <DEDENT> def log(self,set): <NEW_LINE> <INDENT> current_time = time.localtime() <NEW_LINE> strTim...
log information in a file with date/time stamp.
62598ee1a8370b77170ee9ec
class Solution3: <NEW_LINE> <INDENT> def longestConsecutive(self, root): <NEW_LINE> <INDENT> return self.helper(root)[0] <NEW_LINE> <DEDENT> def helper(self, root): <NEW_LINE> <INDENT> if not root: <NEW_LINE> <INDENT> return 0, 0 <NEW_LINE> <DEDENT> left_max_in_subtree, left_max_from_root = self.helper(root.left) <NEW_...
@param root: the root of binary tree @return: the length of the longest consecutive sequence path
62598ee14e4d562566370a21
class ThrowerAnt(Ant): <NEW_LINE> <INDENT> name = 'Thrower' <NEW_LINE> implemented = True <NEW_LINE> damage = 1 <NEW_LINE> food_cost = 3 <NEW_LINE> min_range = 0 <NEW_LINE> max_range = 9999999 <NEW_LINE> def nearest_bee(self, hive): <NEW_LINE> <INDENT> count_range = 0 <NEW_LINE> current_place = self.place <NEW_LINE> wh...
ThrowerAnt throws a leaf each turn at the nearest Bee in its range.
62598ee18da39b475be017b2