code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@attr('shard_5') <NEW_LINE> class MyTeamsTest(TeamsTabBase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(MyTeamsTest, self).setUp() <NEW_LINE> self.topic = {u"name": u"Example Topic", u"id": "example_topic", u"description": "Description"} <NEW_LINE> self.set_team_configuration({'course_id': self.cour...
Tests for the "My Teams" tab of the Teams page.
62598eed97e22403b383965f
class BookmarkList(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.bookmarks = [] <NEW_LINE> self.linkIDnum = 0 <NEW_LINE> self.debug = Debug('bookmarks') <NEW_LINE> <DEDENT> def addBookmarkUsingID(self, id, text): <NEW_LINE> <INDENT> curItem = len(self.bookmarks) <NEW_LINE> self.bookmarks.app...
This class keeps track of bookmarks in the document being processed by AVScript. Bookmarks are automatically created for each new shot added in a document. If the ///Shotlist/// keyword is later used, then the bookmark list in this object is used to create a list of the shots with a link back to the location in the do...
62598eed99fddb7c1ca621bc
class TocTree(Directive): <NEW_LINE> <INDENT> has_content = True <NEW_LINE> required_arguments = 0 <NEW_LINE> optional_arguments = 0 <NEW_LINE> final_argument_whitespace = False <NEW_LINE> option_spec = { 'maxdepth': int, 'glob': directives.flag, 'hidden': directives.flag, 'includehidden': directives.flag, 'numbered': ...
Directive to notify Sphinx about the hierarchical structure of the docs, and to include a table-of-contents like tree in the current document.
62598eed44b2445a339b5d22
class ClosenessReportTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testReport(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass
test the ClosenessReport functionalities from view function.
62598eed5166f23b2e241b49
class CustomErrorMessagesModelSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super( CustomErrorMessagesModelSerializer, self ).__init__(*args, **kwargs) <NEW_LINE> for v in self.validators: <NEW_LINE> <INDENT> if isinstance(v, UniqueTogetherValidato...
Replace validators error messages with error codes
62598eedf7d966606f746762
class BaseExternalEnrollment(): <NEW_LINE> <INDENT> def _execute_post(self, url, data=None, headers=None, json_data=None): <NEW_LINE> <INDENT> response = requests.post( url=url, data=data, headers=headers, json=json_data, ) <NEW_LINE> return response <NEW_LINE> <DEDENT> def _post_enrollment(self, data, course_settings=...
Base class for all the enrollments.
62598eedaad79263cf42cf7c
class MajiangQuickStartDispatcher(BaseQuickStartDispatcher): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def dispatchQuickStart(cls, msg, userId, gameId, roomId, tableId, playMode, clientId): <NEW_LINE> <INDENT> clientVersion = 4.0 <NEW_LINE> if clientVersion >= 4.0 : <NEW_LINE> <INDENT> return MajiangQuickStartV4_0.on...
按clientId分发快速开始请求
62598eed2eb69b55b15a0743
class Packet(DateCreateModMixin): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> summary = models.TextField(max_length=100000, blank=True, null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.title
This model common to every type of device. It includes common things like, title, summary, device type, etc.
62598eeda79ad1619776878f
class RecognitionModel(object): <NEW_LINE> <INDENT> def __init__(self, recognition_params, X, S, P, rng, batch_size): <NEW_LINE> <INDENT> self.X = X <NEW_LINE> self.S = S <NEW_LINE> self.P = P <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.rng = rng <NEW_LINE> self.pz = 0.015 <NEW_LINE> self.p_sigma = recognit...
Recognition Model Interface Class The recognition model approximates the posterior given observed fluorescence: q_phi(z|x).
62598eedbe7bc26dc925121a
class NotFile(BaseException): <NEW_LINE> <INDENT> pass
The path is not a file
62598eedcb5e8a47e493b531
class AfternoonState(State): <NEW_LINE> <INDENT> def write_program(self, work): <NEW_LINE> <INDENT> if work.hour < 17: <NEW_LINE> <INDENT> print("Current time:", work.hour, ", work continually!") <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> work.set_state(EveningState()) <NEW_LINE> work.write_program()
Afternoon state.
62598eed498bea3a75a562a3
class ShowListUI(object): <NEW_LINE> <INDENT> def __init__(self, config, log=None): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.log = log <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def selectSeries(all_results): <NEW_LINE> <INDENT> show_id_list = {int(x.indexerid) for x in sickbeard.showList if x} <NEW_L...
This class is for tvdb-api. Instead of prompting with a UI to pick the desired result out of a list of shows it tries to be smart about it based on what shows are in SickRage.
62598eed26068e7796d4b0cd
class KeyserverVindexParser: <NEW_LINE> <INDENT> def __init__(self, response_bytes): <NEW_LINE> <INDENT> assert isinstance(response_bytes, bytes), type(response_bytes) <NEW_LINE> self.key_strings = self._split_on_key(response_bytes.decode('utf-8')) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _split_on_key(string):...
Parse strings like this: info:1:7 pub:A856CF8734A8407B60E9DA269B08F1E400000000:1:4096:1331844405:: uid:Thorsten Rapp <Thorsten@giblicht.de>:1418066014:: pub:C303008DA232D19BC612CC01FA0D2D9200000000:3:4096:1244914753::r uid:Julian Blake Kongslie <jblake@omgwallhack.org>:1347568322:: uid:Julian Blake Kongslie (Born 1985...
62598eedd7e4931a7ef3a810
class JSONMatcher(BaseMatcher): <NEW_LINE> <INDENT> def __init__(self, s): <NEW_LINE> <INDENT> self.json = loads(s) <NEW_LINE> <DEDENT> def _matches(self, item): <NEW_LINE> <INDENT> return loads(item) == self.json <NEW_LINE> <DEDENT> def describe_to(self, description): <NEW_LINE> <INDENT> description.append_text("json ...
Match JSON content.
62598eed32920d7e50bc479d
class ValidAccessTokenKeyIDsResponse(Base): <NEW_LINE> <INDENT> def __init__(self, kids=None, **kwargs): <NEW_LINE> <INDENT> super(ValidAccessTokenKeyIDsResponse, self).__init__(**kwargs) <NEW_LINE> self.kids = kids
ValidAccessTokenKeyIDsResponse. https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1
62598eed38b623060ffa780d
class Mwrank_class(Expect): <NEW_LINE> <INDENT> def __init__(self, options="", server=None,server_tmpdir=None): <NEW_LINE> <INDENT> Expect.__init__(self, name = 'mwrank', prompt = 'Enter curve: ', command = "mwrank %s"%options, server = server, server_tmpdir = server_tmpdir, restart_on_ctrlc = True, verbose_start = Fal...
Interface to the Mwrank interpreter.
62598eed851cf427c66b6a3a
class CsvDataHandler(BaseDataHandler): <NEW_LINE> <INDENT> def __init__(self, write_buffer_size=1, output_path="csv"): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.sensor_data = {} <NEW_LINE> self.write_buffer = write_buffer_size <NEW_LINE> self.current_buffer = 0 <NEW_LINE> self.test_name = None <NEW_LINE> s...
Create CSV file per connected sensor.
62598eeda8370b77170eeb56
class FakeUser(dam.User): <NEW_LINE> <INDENT> saved_password = None <NEW_LINE> def save(self): <NEW_LINE> <INDENT> self.saved_password = self.password
stub user object for testing
62598eed4a966d76dd5ed64c
class CommandKeyParser(basekeyparser.BaseKeyParser): <NEW_LINE> <INDENT> def __init__(self, *, mode: usertypes.KeyMode, win_id: int, commandrunner: 'runners.CommandRunner', parent: QObject = None, do_log: bool = True, passthrough: bool = False, supports_count: bool = True) -> None: <NEW_LINE> <INDENT> super().__init__(...
KeyChainParser for command bindings. Attributes: _commandrunner: CommandRunner instance.
62598eed67a9b606de544740
class TrajGenConst(object): <NEW_LINE> <INDENT> def __init__(self, position: ArrayLike, momentum: ArrayLike, initial_state: Any, seed: Any = None): <NEW_LINE> <INDENT> self.position = position <NEW_LINE> self.momentum = momentum <NEW_LINE> self.initial_state = initial_state <NEW_LINE> self.seed_sequence = np.random.See...
Canned class whose call function acts as a generator for static initial conditions :param position: initial position :param momentum: initial momentum :param initial_state: initial state specification should be either an integer or "ground" :param seed: entropy seed for random generator (unused)
62598eed8da39b475be0191e
class RadialDerivativeTaker(ExprDerivativeTaker): <NEW_LINE> <INDENT> def __init__(self, expr, var_list, rscale=1, sac=None): <NEW_LINE> <INDENT> import sumpy.symbolic as sym <NEW_LINE> super(RadialDerivativeTaker, self).__init__(expr, var_list, rscale, sac) <NEW_LINE> empty_mi = (0,) * len(var_list) <NEW_LINE> self.ca...
Specialized derivative taker for radial expressions.
62598eed7c178a314d78bc06
class MotionSensor: <NEW_LINE> <INDENT> def __init__(self, client, module_id=1): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> self.module_id = module_id <NEW_LINE> self._soap_actions = None <NEW_LINE> <DEDENT> @asyncio.coroutine <NEW_LINE> def latest_trigger(self): <NEW_LINE> <INDENT> if not self._soap_actions: ...
Wrapper class for a motion sensor.
62598eed97e22403b3839661
class Stroke(object): <NEW_LINE> <INDENT> _default_dictionary_filepath = pkg_resources.resource_filename( __name__, 'dict_chinese_stroke.txt') <NEW_LINE> def __init__(self, dictionary_filepath=None): <NEW_LINE> <INDENT> if dictionary_filepath: <NEW_LINE> <INDENT> self._dictionary_filepath = dictionary_filepath <NEW_LIN...
A class to translate a chinese character into strokes. Parameters: dictionary_filepath (str): default=None. File path for user provided dictionary. Default dictionary will be used if not specified. A valid dictionary should be a "UTF-8" encoded text file, having two columns sep...
62598eed63b5f9789fe838cf
class User(Base): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> user_id = Column(Integer, primary_key=True) <NEW_LINE> user_name = Column(String(250), nullable=False) <NEW_LINE> email = Column(String(250), nullable=False) <NEW_LINE> picture = Column(String(250)) <NEW_LINE> @classmethod <NEW_LINE> def create(cls...
User Table - sqlAlchemy linked with SQLite3 back end
62598eedd7e4931a7ef3a811
class SimpleClass(object): <NEW_LINE> <INDENT> _object_class = SimpleObject <NEW_LINE> def __init__(self, api, url_name, object_id_field): <NEW_LINE> <INDENT> self._api = api <NEW_LINE> self._url_name = url_name <NEW_LINE> self._object_id_field = object_id_field <NEW_LINE> <DEDENT> def _url_of(self, obj=None, obj_id=No...
Represents a collection of remote objects on the Billogram service Provides methods to search, fetch and create instances of the object type. See the online documentation for the actual structure of remote objects.
62598eede5267d203ee6a079
class ClassCoveredRateCentersTest(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls._client = Client("http://foo", "bar", "bar", "qux") <NEW_LINE> cls._crc = CoveredRateCenters(client=cls._client) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tearDownClass(cls): <NEW_...
Test the covered rate centers directory mapping
62598eed44b2445a339b5d23
class SpinHandler(handler.TriggeredHandler): <NEW_LINE> <INDENT> update_frequency = 5.0 <NEW_LINE> handles_what = { 'message_matcher': matchers.match_or( matchers.match_slack("message"), matchers.match_telnet("message") ), 'channel_matcher': matchers.match_channel(c.TARGETED), 'triggers': [ trigger.Trigger('spin', take...
Handler that never stops (for testing).
62598eed3cc13d1c6d463ee4
class PostgreSQLRowBatcher(RowBatcher): <NEW_LINE> <INDENT> def _make_single_column_query(self, command, table, filter_column, filter_value, rows_need_flattened): <NEW_LINE> <INDENT> if not command.startswith("UPDATE"): <NEW_LINE> <INDENT> stmt = "%s FROM %s WHERE %s = ANY (%s)" % ( command, table, filter_column, self....
Applies array operations to DELETE and SELECT for single column filters.
62598eeddc8b845886d51d36
class ColorTests( unittest.TestCase ): <NEW_LINE> <INDENT> def test_set( self ): <NEW_LINE> <INDENT> dc = { 'r' : 99, 'g' : 88, 'b' : 77 } <NEW_LINE> class CObj( object ): <NEW_LINE> <INDENT> r = 66 <NEW_LINE> g = 55 <NEW_LINE> b = 44 <NEW_LINE> <DEDENT> co = CObj() <NEW_LINE> class CSeq( object ): <NEW_LINE> <INDENT> ...
Tests the color module
62598eedbd1bec0571e14483
class OperationPlaceholder(AbstractOperation): <NEW_LINE> <INDENT> def __init__(self, subgraph_resource_manager): <NEW_LINE> <INDENT> ... <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> raise exceptions.UsageError('This placeholder operation handle is not in an executable context.') <NEW_LINE> <DEDENT> @property...
Placeholder for Operation handle during subgraph definition.
62598eedbe7bc26dc925121b
class marginline(emptyline): <NEW_LINE> <INDENT> def __init__(self, l, margin=0): <NEW_LINE> <INDENT> super().__init__(l.colour, l.userdata) <NEW_LINE> self.l = l <NEW_LINE> self.margin = margin <NEW_LINE> <DEDENT> def idealwidth(self): <NEW_LINE> <INDENT> return self.l.idealwidth() + (2 * self.margin) <NEW_LINE> <DEDE...
Indent another line with a margin at the left and right. Colour is taken from the line to be indented.
62598eed796e427e5384cf0b
class TestRepositoryRevisionTreeArchive(TestRemoteRepository): <NEW_LINE> <INDENT> def _serialize_inv_delta(self, old_name, new_name, delta): <NEW_LINE> <INDENT> serializer = inventory_delta.InventoryDeltaSerializer(True, False) <NEW_LINE> return b"".join(serializer.delta_to_lines(old_name, new_name, delta)) <NEW_LINE>...
Test Repository.iter_inventories.
62598eed8e7ae83300ee7802
class Proxy: <NEW_LINE> <INDENT> pip: str <NEW_LINE> protos: Set[str] <NEW_LINE> last_check: int <NEW_LINE> last_lat: int <NEW_LINE> exit_country: str <NEW_LINE> def __init__(self, pip: str, protos: Set[str] = None, last_check: int = None, last_lat: int = None, exit_country: str = None): <NEW_LINE> <INDENT> assure_prox...
A definition of a proxy with info.
62598eed435de62698e9a549
class RunQALog(RunLoopLog, RunQA): <NEW_LINE> <INDENT> pass
Async loop QA with LoopLog
62598eed21bff66bcd7213c7
@ttsengine('sapi') <NEW_LINE> class SAPITTSEngine(TTSEngine): <NEW_LINE> <INDENT> SPF_ASYNC = (1 << 0) <NEW_LINE> SPF_PURGEBEFORESPEAK = (1 << 1) <NEW_LINE> def __init__(self, controller=None): <NEW_LINE> <INDENT> TTSEngine.__init__(self, controller=controller) <NEW_LINE> self.sapi=None <NEW_LINE> <DEDENT> @staticmetho...
SAPI (win32) TTSEngine.
62598eeddd821e528d6d76b1
class TagViewSet(BaseRecipeAttrViewSet): <NEW_LINE> <INDENT> queryset = Tag.objects.all() <NEW_LINE> serializer_class = serializers.TagSerializer
Manage tags in the Database
62598eed0a50d4780f703b1b
class SubscriptionCollection(BaseEntityCollection): <NEW_LINE> <INDENT> def __init__(self, context, resource_path=None, parent=None): <NEW_LINE> <INDENT> super(SubscriptionCollection, self).__init__(context, Subscription, resource_path, parent) <NEW_LINE> <DEDENT> def get_by_id(self, _id): <NEW_LINE> <INDENT> return Su...
Represents a collection of Subscription (WebHook) resources.
62598eedeab8aa0e5d30a4ef
class RNNCell(BaseRNNCell): <NEW_LINE> <INDENT> def __init__(self, num_hidden, activation='tanh', prefix='rnn_', params=None): <NEW_LINE> <INDENT> super(RNNCell, self).__init__(prefix=prefix, params=params) <NEW_LINE> self._num_hidden = num_hidden <NEW_LINE> self._activation = activation <NEW_LINE> self._iW = self.para...
Simple recurrent neural network cell. Parameters ---------- num_hidden : int Number of units in output symbol. activation : str or Symbol, default 'tanh' Type of activation function. Options are 'relu' and 'tanh'. prefix : str, default ``'rnn_'`` Prefix for name of layers (and name of weight if params is N...
62598eed97e22403b3839663
class OverflowMenu(dict): <NEW_LINE> <INDENT> def __init__( self, action_id, options, *, confirm=None, ): <NEW_LINE> <INDENT> if not isinstance(options, list): <NEW_LINE> <INDENT> options = [options] <NEW_LINE> <DEDENT> overflow = { 'type': 'overflow', 'action_id': action_id, 'options': options } <NEW_LINE> if confirm:...
Generate a OverflowMenu element. See Slack documentation for the OverflowMenu Block Element here: https://api.slack.com/reference/block-kit/block-elements#overflow
62598eed7047854f4633db47
class AromaticGenerator(object): <NEW_LINE> <INDENT> def __init__(self, rec_name, rec_atoms, lig_atoms, side): <NEW_LINE> <INDENT> self.rec_name = rec_name <NEW_LINE> self.rec_atoms = rec_atoms <NEW_LINE> self.lig_atoms = lig_atoms <NEW_LINE> self.side = side <NEW_LINE> <DEDENT> def __call__(self, ligand): <NEW_LINE> <...
2----------3 / 1 4 \ / 6----------5
62598eed44b2445a339b5d24
class ListenerModel(object): <NEW_LINE> <INDENT> def __init__(self, env, scope="listener"): <NEW_LINE> <INDENT> assert not env.bag <NEW_LINE> self.env = env <NEW_LINE> self._scope = tf.variable_scope(scope) <NEW_LINE> self.feeds = [] <NEW_LINE> self.train_op = None <NEW_LINE> self._build_graph() <NEW_LINE> <DEDENT> def...
Parametric listener model $q_\theta(z|u)$ which maps utterances to LF representations.
62598eed379a373c97d9776a
class HashableZ3: <NEW_LINE> <INDENT> def __init__(self, z3): <NEW_LINE> <INDENT> self.z3 = z3 <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self is other <NEW_LINE> <DEDENT> def __hash__(self): <NEW_LINE> <INDENT> return id(self) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> retu...
Some kind of hashable constraints for z3 constraints and variables
62598eed5166f23b2e241b4d
class PrintGetAddr(Reply): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def parse(cls, packet): <NEW_LINE> <INDENT> b0, b1 = super(PrintGetAddr, cls).parse(packet) <NEW_LINE> return (b1 << 8) | b0
@brief Print Get Address reply packet parser @see PATO_CMD_PRINT_GETADDR
62598eedfff4ab517ebcbf4c
class NodeDeleteView(PermissionRequiredMixin, NodeDeleteBase): <NEW_LINE> <INDENT> template_name = 'nodes/remove_node.html' <NEW_LINE> object = None <NEW_LINE> permission_required = ('osf.view_node', 'osf.delete_node') <NEW_LINE> raise_exception = True <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT...
Allow authorized admin user to remove/hide nodes Interface with OSF database. No admin models.
62598eed4e4d562566370b8f
class PollOptionEditView(LaunchpadEditFormView): <NEW_LINE> <INDENT> schema = IPollOption <NEW_LINE> label = "Edit option details" <NEW_LINE> page_title = 'Edit option' <NEW_LINE> field_names = ["name", "title"] <NEW_LINE> custom_widget("title", TextWidget, displayWidth=30) <NEW_LINE> @property <NEW_LINE> def cancel_ur...
Edit one of a poll's options.
62598eedcc0a2c111447977a
class TrajGenBoltzmann(object): <NEW_LINE> <INDENT> def __init__(self, position: ArrayLike, mass: ArrayLike, temperature: float, initial_state: Any, scale: bool = True, seed: Any = None, momentum_seed: Any = None): <NEW_LINE> <INDENT> assert position.shape == mass.shape <NEW_LINE> self.position = position <NEW_LINE> se...
Generate momenta randomly according to the Boltzmann distribution
62598eed26068e7796d4b0d1
class objectdeletion(objectevent): <NEW_LINE> <INDENT> pass
A stored object has been successfully deleted
62598eed8e7ae83300ee7804
class DeleteDatapath(DeleteCommand): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.DeleteDatapath') <NEW_LINE> resource = 'datapath'
Delete Datapath information.
62598eed5fcc89381b2654e1
class Feature(PrimitiveBase): <NEW_LINE> <INDENT> def __new__(self, feature_or_var, entity=None): <NEW_LINE> <INDENT> if entity is None: <NEW_LINE> <INDENT> assert isinstance(feature_or_var, (Variable)) <NEW_LINE> return IdentityFeature(feature_or_var) <NEW_LINE> <DEDENT> assert isinstance(feature_or_var, (Variable, Pr...
Alias for IdentityFeature and DirectFeature depending on arguments
62598eedbe8e80087fbbd7c5
class TestCpf(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.cpf = docbr.CPF() <NEW_LINE> <DEDENT> def test_generate_validate(self): <NEW_LINE> <INDENT> cpfs = self.cpf.generate_list(5000) + self.cpf.generate_list(5000, mask=True) + self.cpf.generate_list(5...
Testar a classe CPF.
62598eed56ac1b37e6300961
class VGUIMenu(UserMessageCreator): <NEW_LINE> <INDENT> message_name = 'VGUIMenu' <NEW_LINE> translatable_fields = [] <NEW_LINE> def __init__(self, name, subkeys=None, show=True): <NEW_LINE> <INDENT> if subkeys is None: <NEW_LINE> <INDENT> subkeys = {} <NEW_LINE> <DEDENT> super().__init__(name=name, subkeys=subkeys, sh...
Create a VGUIMenu.
62598eed442bda511e95abd8
class MembershipResource(SearchModelResource): <NEW_LINE> <INDENT> user = fields.ToOneField('freeform_data.api.UserResource', 'user') <NEW_LINE> organization = fields.ToOneField('freeform_data.api.OrganizationResource', 'organization') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> queryset = Membership.objects.all() <NEW_...
Encapsulates the Membership Model
62598eede5267d203ee6a07c
class TestBceClientConfiguration(TestClient): <NEW_LINE> <INDENT> def test_init(self): <NEW_LINE> <INDENT> conf = BceClientConfiguration(1, 2, 3, 4, 5, 6, 7) <NEW_LINE> self.assertEqual(conf.credentials, 1) <NEW_LINE> self.assertEqual(conf.endpoint, compat.convert_to_bytes(2)) <NEW_LINE> self.assertEqual(conf.protocol,...
test BceClientConfiguration
62598eedd486a94d0ba2a742
class IpcHdr(Structure): <NEW_LINE> <INDENT> _pack_ = 1 <NEW_LINE> _fields_ = [ ("size", c_uint32) ] <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> output = ("Size: 0x%08X" % self.size) <NEW_LINE> return output
Data structure for IPC Header
62598eed97e22403b3839665
class DBFactory(object): <NEW_LINE> <INDENT> def __init__(self, arg): <NEW_LINE> <INDENT> self.arg = arg
control database
62598eed3539df3088ecaa27
class Reply(ComplexType): <NEW_LINE> <INDENT> def __init__(self, name, elt): <NEW_LINE> <INDENT> ComplexType.__init__(self, name, elt) <NEW_LINE> self.is_reply = True <NEW_LINE> self.doc = None <NEW_LINE> for child in list(elt): <NEW_LINE> <INDENT> if child.tag == 'doc': <NEW_LINE> <INDENT> self.doc = Doc(name, child) ...
Derived class representing a reply. Only found as a field of Request.
62598eed3539df3088ecaa28
class Student: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self) -> None: <NEW_LINE> <INDENT> TERM = os.get_terminal_size() <NEW_LINE> print("-" * TERM.columns) <NEW_LINE> print("STUDENT Mode".center(TERM.columns)) <NEW_LINE> print("-" * TERM.columns) <NEW_LINE> ...
Class for Student Mode. Used as base class for `Teacher` Class
62598eed8a43f66fc4bf08e9
class signal(object): <NEW_LINE> <INDENT> greenlet_class = None <NEW_LINE> def __init__(self, signalnum, handler, *args, **kwargs): <NEW_LINE> <INDENT> if not callable(handler): <NEW_LINE> <INDENT> raise TypeError("signal handler must be callable.") <NEW_LINE> <DEDENT> self.hub = get_hub() <NEW_LINE> self.watcher = sel...
Call the *handler* with the *args* and *kwargs* when the process receives the signal *signalnum*. The *handler* will be run in a new greenlet when the signal is delivered. This returns an object with the useful method ``cancel``, which, when called, will prevent future deliveries of *signalnum* from calling *handler*...
62598eedfff4ab517ebcbf4d
class FileMetadataNotStardardException(StorageException): <NEW_LINE> <INDENT> def __init__(self, values=[], message='This file has metadata that is not standard'): <NEW_LINE> <INDENT> super(FileMetadataNotStardardException, self).__init__(values, message)
Exception thrown when a file's metadata is not how it's supposed to be e.g. either it is missing fields or it has too many fields of one kind.
62598eede1aae11d1e7cdbfa
class ReadTemplate(FileChecking): <NEW_LINE> <INDENT> GEN_VERBOSE = 'GEN_MMAP::PRO::READ_TEMPLATE' <NEW_LINE> TEMPLATE_DIR = '/../conf/template/' <NEW_LINE> def __init__(self, verbose=False): <NEW_LINE> <INDENT> FileChecking.__init__(self, verbose=verbose) <NEW_LINE> verbose_message(ReadTemplate.GEN_VERBOSE, verbose, '...
Defined class ReadTemplate with attribute(s) and method(s). Created API for read a template file and return a content. It defines: :attributes: | GEN_VERBOSE - console text indicator for process-phase. | TEMPLATE_DIR - template dir path. | __template_dir - absolute file path of template dir...
62598eed56b00c62f0fb1048
class F3P146EC072600(BaseFan): <NEW_LINE> <INDENT> __logger = None <NEW_LINE> __output = "AO0" <NEW_LINE> __speed = -1 <NEW_LINE> def __init__(self, **config): <NEW_LINE> <INDENT> super().__init__(config) <NEW_LINE> self._vendor = "HangzhouAirflowElectricApplications" <NEW_LINE> self._model = "F3P146EC072600" <NEW_LINE...
Model: F3P146-EC072-600 See http://www.shidaqian.com/Upload/SDQ_ECqqlxfj/F3P146-EC072-600.PDF
62598eed30dc7b766599dfff
class AuthInfoUpdateParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'token_type': {'key': 'tokenType', 'type': 'str'}, 'token': {'key': 'token', 'type': 'str'}, 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, 'scope': {'key': 'scope', 'type': 'str'}, 'expires_in': {'key': 'expire...
The authorization properties for accessing the source code repository. :ivar token_type: The type of Auth token. Possible values include: "PAT", "OAuth". :vartype token_type: str or ~azure.mgmt.containerregistry.v2019_04_01.models.TokenType :ivar token: The access token used to access the source control provider. :var...
62598eed5fdd1c0f98e5c717
class ThermoChem: <NEW_LINE> <INDENT> def get_ZPE_correction(self): <NEW_LINE> <INDENT> zpe = 0. <NEW_LINE> for energy in self.vib_energies: <NEW_LINE> <INDENT> zpe += 0.5 * energy <NEW_LINE> <DEDENT> return zpe <NEW_LINE> <DEDENT> def _vibrational_energy_contribution(self, temperature): <NEW_LINE> <INDENT> kT = units....
Base class containing common methods used in thermochemistry calculations.
62598eed3346ee7daa336a23
class List(messages.Message): <NEW_LINE> <INDENT> id = messages.IntegerField(1, required=True) <NEW_LINE> title = messages.StringField(3, required=True) <NEW_LINE> description = messages.StringField(4, required=False) <NEW_LINE> created = message_types.DateTimeField(6, required=False) <NEW_LINE> updated = message_types...
List that stores a message.
62598eedaad79263cf42cf82
class UpperLevelMoveExtender: <NEW_LINE> <INDENT> def extend(self, move, diff): <NEW_LINE> <INDENT> if not move.current_config_tokens: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> upper_current_tokens = move.current_config_tokens[:-1] <NEW_LINE> operation_type = self._get_upper_operation(upper_current_tokens, diff) <...
A class to extend the given move by including its parent. It has 3 cases: 1) If parent was in current and target, then replace the parent 2) If parent was in current but not target, then delete the parent 3) If parent was in target but not current, then add the parent
62598eed6e29344779afedad
class DropDatabaseChecker(Visitor): <NEW_LINE> <INDENT> def visit_query(self, tokens): <NEW_LINE> <INDENT> self.visit(tokens, running_scheme=tokens.get('running_scheme')) <NEW_LINE> <DEDENT> def visit_drop_database(self, tokens, running_scheme): <NEW_LINE> <INDENT> if running_scheme and self._GetDescendants(running_sch...
Visitor to perform check on Drop Database queries.
62598eedcc0a2c111447977b
class flags(struct): <NEW_LINE> <INDENT> def summary(self, **options): <NEW_LINE> <INDENT> return self.__summary_initialized() if self.initializedQ() else self.__summary_uninitialized() <NEW_LINE> <DEDENT> def __summary_initialized(self): <NEW_LINE> <INDENT> flags = [] <NEW_LINE> for (t, name), value in zip(self._field...
represents bit flags that can be toggled
62598eedfff4ab517ebcbf4e
class SKUAdmin(object): <NEW_LINE> <INDENT> model_icon = 'fa fa-gift' <NEW_LINE> list_display = ['id', 'name', 'price', 'stock', 'sales', 'comments'] <NEW_LINE> search_fields = ['id','name'] <NEW_LINE> list_filter = ['category'] <NEW_LINE> list_editable = ['price', 'stock'] <NEW_LINE> show_detail_fields = ['name'] <NEW...
SKU模型Admin管理类
62598eed236d856c2adc87d1
class Deck(object): <NEW_LINE> <INDENT> cards = {'Ah': 11, 'Kh': 10, 'Qh': 10, 'Jh': 10, '10h': 10, '9h': 9, '8h': 8, '7h': 7, '6h': 6, '5h': 5, '4h': 4, '3h': 3, '2h': 2, 'At': 11, 'Kt': 10, 'Qt': 10, 'Jt': 10, '10t': 10, '9t': 9, '8t': 8, '7t': 7, '6t': 6, '5t': 5, '4t': 4, '3t': 3, '2t': 2, 'Ac': 11, 'Kc': 10, 'Qc':...
ATTRIBUTES: decks: Integer of how many decks a 52 cards should be used for the game
62598eeda8370b77170eeb5b
class PlaybackFailedEventHandler(AbstractRequestHandler): <NEW_LINE> <INDENT> def can_handle(self, handler_input): <NEW_LINE> <INDENT> return is_request_type("AudioPlayer.PlaybackFailed")(handler_input) <NEW_LINE> <DEDENT> def handle(self, handler_input): <NEW_LINE> <INDENT> logger.info("In PlaybackFailedHandler") <NEW...
AudioPlayer.PlaybackFailed Directive received. Logging the error and restarting playing with no output speech.
62598eed2ae34c7f260a985e
class BaseRequest(object): <NEW_LINE> <INDENT> _port_range = range(65535, 49150, -1) <NEW_LINE> _client_ip = socket.gethostbyname(socket.gethostname()) <NEW_LINE> _host_ports = {} <NEW_LINE> def __init__(self, buffer=b''): <NEW_LINE> <INDENT> self.buffer = buffer <NEW_LINE> <DEDENT> @synchronized(RLock()) <NEW_LINE> de...
Synchronous base request object
62598eed71ff763f4b5e5ed5
class Recombination(RegriddableModel1D): <NEW_LINE> <INDENT> def __init__(self, name='recombination'): <NEW_LINE> <INDENT> self.refer = Parameter(name, 'refer', 5000., tinyval, hard_min=tinyval, frozen=True, units="angstroms") <NEW_LINE> self.ampl = Parameter(name, 'ampl', 1., tinyval, hard_min=tinyval, units="angstrom...
Optically-thin recombination continuum model. It is for use when the independent axis is in Angstroms. Attributes ---------- refer The reference point, in Angstroms. ampl The amplitude of the emission; it is defined at the reference point but its numerical value there also depends on the temperature. ...
62598eede5267d203ee6a07e
class TestConnection(unittest.TestCase): <NEW_LINE> <INDENT> def test_match_hostname_no_cert(self): <NEW_LINE> <INDENT> cert = None <NEW_LINE> asserted_hostname = 'foo' <NEW_LINE> self.assertRaises(ValueError, _match_hostname, cert, asserted_hostname) <NEW_LINE> <DEDENT> def test_match_hostname_empty_cert(self): <NEW_L...
Tests in this suite should not make any network requests or connections.
62598eed0a50d4780f703b1f
class SetCurrentTransition(base_classes.Baserequests): <NEW_LINE> <INDENT> def __init__(self, transition_name): <NEW_LINE> <INDENT> base_classes.Baserequests.__init__(self) <NEW_LINE> self.name = "SetCurrentTransition" <NEW_LINE> self.dataout["transition-name"] = transition_name
Set the active transition. :Arguments: *transition_name* type: String The name of the transition.
62598eed97e22403b3839667
class TaskBatcher(ndb.Model): <NEW_LINE> <INDENT> all_tasks_loaded = ndb.BooleanProperty(default=False, indexed=False) <NEW_LINE> def CheckComplete(self): <NEW_LINE> <INDENT> session_id = self.key.id() <NEW_LINE> if self.all_tasks_loaded: <NEW_LINE> <INDENT> incomplete = BatchTask.query(BatchTask.completed == False, an...
Model to represent a batch of tasks and the loading status of the batch. Expects the key to be a session ID for communicating with a client.
62598eedd268445f26638f4a
class UserSerializers(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = get_user_model() <NEW_LINE> fields = ('email', 'password', 'name') <NEW_LINE> extra_kwargs = {'password': {'write_only': True, 'min_length': 5}} <NEW_LINE> <DEDENT> def create(self, validated_data): <NEW_LINE...
Serializers for the users object
62598eed23849d37ff84f82f
class RandomAgent(VGDLSprite): <NEW_LINE> <INDENT> speed = 0.5 <NEW_LINE> is_stochastic = True <NEW_LINE> def update(self, game): <NEW_LINE> <INDENT> VGDLSprite.update(self, game) <NEW_LINE> self.physics.activeMovement(self, choice(BASEDIRS)) <NEW_LINE> game.step = game.step + 1
Chooses randomly from all available actions each step.
62598eed56b00c62f0fb104a
class PicardNode(CommandNode): <NEW_LINE> <INDENT> def _teardown(self, config, temp): <NEW_LINE> <INDENT> try_rmtree(os.path.join(temp, getpass.getuser())) <NEW_LINE> try_rmtree(os.path.join(temp, "hsperfdata_" + getpass.getuser())) <NEW_LINE> CommandNode._teardown(self, config, temp)
Base class for nodes using Picard Tools; adds an additional cleanup step, in order to allow the jars to be run using the same temporary folder as any other commands associated with the node. This is nessesary as some Picard tools create a large number of temporary files, leading to potential performance issues if these...
62598eed4428ac0f6e656cc5
class SimpleFinalizationTest(TestBase, unittest.TestCase): <NEW_LINE> <INDENT> def test_simple(self): <NEW_LINE> <INDENT> with SimpleBase.test(): <NEW_LINE> <INDENT> s = Simple() <NEW_LINE> ids = [id(s)] <NEW_LINE> wr = weakref.ref(s) <NEW_LINE> del s <NEW_LINE> gc.collect() <NEW_LINE> self.assert_del_calls(ids) <NEW_L...
Test finalization without refcycles.
62598eedbe383301e0251f52
class VoiceFilterInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.BizId = None <NEW_LINE> self.FileId = None <NEW_LINE> self.FileName = None <NEW_LINE> self.OpenId = None <NEW_LINE> self.Timestamp = None <NEW_LINE> self.Data = None <NEW_LINE> <DEDENT> def _deserialize(self, params):...
语音文件过滤详情
62598eed16aa5153ce3fec78
class Elevation(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> rast = models.RasterField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ('name',) <NEW_LINE> verbose_name = 'Elevation' <NEW_LINE> verbose_name_plural = 'Elevations' <NEW_LINE> <DEDENT> def __str__(self): <NE...
! Clase que gestiona los datos de la Elevation @author Ing. Leonel Paolo Hernandez Macchiarulo (lhernandez at cenditel.gob.ve) @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> @date 04-10-2017 @version 1.0.0
62598eed851cf427c66b6a41
class BOLFIRESample(Sample): <NEW_LINE> <INDENT> def __init__(self, method_name, chains, parameter_names, warmup, *args, **kwargs): <NEW_LINE> <INDENT> n_chains = chains.shape[0] <NEW_LINE> warmed_up = chains[:, warmup:, :] <NEW_LINE> concatenated = warmed_up.reshape((-1,) + chains.shape[2:]) <NEW_LINE> outputs = dict(...
Container for results from BOLFIRE.
62598eed2c8b7c6e89bd1f39
class Node: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.properties = [] <NEW_LINE> self.children = []
represent a node in the game tree
62598eed32920d7e50bc47a4
class Dropdowns: <NEW_LINE> <INDENT> def __init__(self, soup, selector, descendants="", dd_options=None): <NEW_LINE> <INDENT> self.soup = soup <NEW_LINE> self.selector = selector <NEW_LINE> self.descendants = descendants <NEW_LINE> self.dd_options = dd_options <NEW_LINE> <DEDENT> def list_options(self): <NEW_LINE> <IND...
Manage dropdown-class filter queries.
62598eed66656f66f7d58b5a
class Optimizer(Makeable, metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, learning_rate=0.001, decay=0.0, clip_norm=None, clip_value=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.optimizer = None <NEW_LINE> self.learning_rate = Decay.make(learning_rate) <NEW_LINE> self.decay = decay <NEW_LINE...
A local optimizer performs optimization irrespective of any distributed semantics, i.e. it has no knowledge of other machines and does not implement any communications with them.
62598eed1f037a2d8b9e2881
class APIWrapper: <NEW_LINE> <INDENT> def __init__(self, api_key): <NEW_LINE> <INDENT> self.api_key = api_key <NEW_LINE> <DEDENT> def _get(self, method, limit, **params): <NEW_LINE> <INDENT> r = redis.StrictRedis() <NEW_LINE> key = 'meetup_{}_{}'.format(method, limit) <NEW_LINE> result = None and r.get(key) <NEW_LINE> ...
Wrapper around the meetup.com API.
62598eedd7e4931a7ef3a818
class TDFSettings(TDFCoreSettings): <NEW_LINE> <INDENT> OBJECTS = read_settings(os.path.join(TDFCoreSettings.SETTINGS_DIR, 'objects.yml')) <NEW_LINE> ORBIT_LENGTH = 3564 <NEW_LINE> BX_SEC = 1 / 40000000. <NEW_LINE> ORBIT_SEC = ORBIT_LENGTH * BX_SEC <NEW_LINE> MUON = DataSpecification(**OBJECTS.muon._asdict()) <NEW_LINE...
Constants for TDF software.
62598eed8e7ae83300ee7808
class HheaField(Statement): <NEW_LINE> <INDENT> def __init__(self, key, value, location=None): <NEW_LINE> <INDENT> Statement.__init__(self, location) <NEW_LINE> self.key = key <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def build(self, builder): <NEW_LINE> <INDENT> builder.add_hhea_field(self.key, self.value) <NE...
An entry in the ``hhea`` table.
62598eed5fc7496912d4762f
class RestyAPI(object): <NEW_LINE> <INDENT> def __init__(self, baseUrl='', token=None): <NEW_LINE> <INDENT> self.resources = {} <NEW_LINE> self.url = None <NEW_LINE> self.auth = None <NEW_LINE> if baseUrl: <NEW_LINE> <INDENT> self.url = baseUrl <NEW_LINE> <DEDENT> if token: <NEW_LINE> <INDENT> self.auth = RestAuthToken...
Used to easily consume a django-rest-framework compatable API. it can discover all the resources automatically and imports the field validation.
62598eed7047854f4633db4c
class AsyncResource(AsyncClient): <NEW_LINE> <INDENT> client = property(AsyncClient.clone, doc="upcasted [AsyncClient][clients.aio.AsyncClient]") <NEW_LINE> __getattr__ = AsyncClient.__truediv__ <NEW_LINE> __getitem__ = AsyncClient.get <NEW_LINE> content_type = Resource.content_type <NEW_LINE> __call__ = Resource.__cal...
An [AsyncClient][clients.aio.AsyncClient] which returns json content and has syntactic support for requests.
62598eed7b25080760ed5c13
class list_permutation(invariant): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def run(values: List[Any]) -> List[Any]: <NEW_LINE> <INDENT> ret = [] <NEW_LINE> for v in values: <NEW_LINE> <INDENT> if isinstance(v, np.ndarray): <NEW_LINE> <INDENT> ret.append(np.sort(v)) <NEW_LINE> <DEDENT> elif isinstance(v, Iterable) ...
An invariant that compares iterables (except strings) ignoring ordering, using ``sorted``.
62598eed91f36d47f2230260
class TestTaskApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = TaskApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_add_task(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_delete_task(self): <NEW_LINE> <INDENT> p...
TaskApi unit test stubs
62598eed2c8b7c6e89bd1f3a
class ProductRetrieveView(generics.RetrieveAPIView): <NEW_LINE> <INDENT> queryset = Product.objects.all() <NEW_LINE> serializer_class = ProductRetrieveSerializer
产品详情
62598eed3539df3088ecaa2c
class SentenceLength(summaryrank.Feature): <NEW_LINE> <INDENT> def check(self, model): <NEW_LINE> <INDENT> assert model.contains(['sentences_stem']) <NEW_LINE> <DEDENT> def compute(self, model): <NEW_LINE> <INDENT> sentences_stem = model.load_sentences('sentences_stem') <NEW_LINE> return [len(text.split()) for text, _ ...
Number of stems in the sentence
62598eed63b5f9789fe838d7
class AdminSalesByMarketerSchema(Schema): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> type_ = 'admin-sales-by-marketer' <NEW_LINE> self_view = 'v1.admin_sales_by_marketer' <NEW_LINE> <DEDENT> id = fields.String() <NEW_LINE> fullname = fields.String() <NEW_LINE> email = fields.String() <NEW_LINE> sales = fields....
Sales summarized by marketer Provides marketer name, count of tickets and total sales for orders grouped by status
62598eedfff4ab517ebcbf51
class AdditionalInput(InputFile): <NEW_LINE> <INDENT> def __init__(self, mesh: PySALEMesh, material_names: Dict[int, str], host_object_number: int = 1): <NEW_LINE> <INDENT> super(AdditionalInput, self).__init__('additional') <NEW_LINE> self.mesh = mesh <NEW_LINE> self.material_names = material_names <NEW_LINE> self.hos...
additional.inp file creator class. Allows a user to build an additional.inp file and uses a simple template to write one to a new file of the user's choice.
62598eed4f6381625f198878
class ResultMetaData(object): <NEW_LINE> <INDENT> def __init__(self, result_proxy, metadata): <NEW_LINE> <INDENT> self._processors = processors = [] <NEW_LINE> result_map = {} <NEW_LINE> if result_proxy._result_map: <NEW_LINE> <INDENT> result_map = {elem[0]: elem[3] for elem in result_proxy._result_map} <NEW_LINE> <DED...
Handle cursor.description, applying additional info from an execution context.
62598eeda219f33f346c4fb5
class BaseUser: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _create_sample_user( cls, username: str = "testuser", height=185, weight=70, gender="Male", age=25, ) -> "UserModel": <NEW_LINE> <INDENT> user = UserModel( username=username, password=generate_password_hash("testpass") ) <NEW_LINE> user.save_to_db() <NEW_L...
Create a base user
62598eed76e4537e8c3edd2e
class CreateOrder(generics.CreateAPIView): <NEW_LINE> <INDENT> serializer_class = PlaceOrderSerializer <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDENT> serializer.save(customer=self.request.user)
Place an Order.
62598eed6e29344779afedb0
class f(a): <NEW_LINE> <INDENT> def __init__(self, e): <NEW_LINE> <INDENT> super(f, self).__init__(e)
docstring for f
62598eed5166f23b2e241b53