code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class TestTag(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 testTag(self): <NEW_LINE> <INDENT> pass | Tag unit test stubs | 62598ee376e4537e8c3edbea |
@provides(IImageResource) <NEW_LINE> class ImageResource(MImageResource, HasTraits): <NEW_LINE> <INDENT> _ref = Any() <NEW_LINE> absolute_path = Property(Str) <NEW_LINE> name = Str() <NEW_LINE> search_path = List() <NEW_LINE> def create_bitmap(self, size=None): <NEW_LINE> <INDENT> return self.create_image(size).Convert... | The toolkit specific implementation of an ImageResource. See the
IImageResource interface for the API documentation. | 62598ee3d486a94d0ba2a603 |
class Seq2SeqDecoder(nn.HybridBlock): <NEW_LINE> <INDENT> @validated() <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> <DEDENT> def hybrid_forward( self, F, static_input: Tensor, dynamic_input: Tensor ) -> Tensor: <NEW_LINE> <INDENT> raise NotImplementedError | Abstract class for the Decoder block in sequence-to-sequence models. | 62598ee3d53ae8145f916abf |
class ComponentRenameSymbol(ComponentActionVisitor): <NEW_LINE> <INDENT> def __init__(self, componentclass, old_symbol_name, new_symbol_name): <NEW_LINE> <INDENT> ComponentActionVisitor.__init__( self, require_explicit_overrides=True) <NEW_LINE> self.old_symbol_name = old_symbol_name <NEW_LINE> self.new_symbol_name = n... | Can be used for:
StateVariables, Aliases, Ports | 62598ee33617ad0b5ee04762 |
class acquisitionServer: <NEW_LINE> <INDENT> okProtVersion = {1} <NEW_LINE> def __init__(self,host,port,radio,samplesink): <NEW_LINE> <INDENT> self.log = logging.getLogger(__name__) <NEW_LINE> self.sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) <NEW_LINE> self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSE... | A service to coordinate with a controller to grab samples from a radio. | 62598ee307f4c71912bada87 |
class BrandSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Brand <NEW_LINE> exclude = ('create_time', 'update_time') | 品牌序列化器类 | 62598ee37cff6e4e811b4020 |
class Real(EventGenerator): <NEW_LINE> <INDENT> def __init__(self, name, parameters): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.gamma = float(parameters['gamma']) <NEW_LINE> self.lamda = float(parameters['lamda']) <NEW_LINE> <DEDENT> def reset(self, current_time): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT>... | recovery time generator in real distributed storage system, detection time and identification time. | 62598ee3a219f33f346c4e6c |
class CreatedTimestamp(AutoColumn): <NEW_LINE> <INDENT> __columnblock__ = 7 <NEW_LINE> def __init__(self, name="created", order=None, comment=None): <NEW_LINE> <INDENT> Column.__init__(self, name, datetime, order=order, comment=comment) <NEW_LINE> <DEDENT> @property <NEW_LINE> def default_clause(self): <NEW_LINE> <INDE... | An auto-populated timestamp column for storing when the
record was created. | 62598ee301c39578d7f113dc |
class Media(page_measurement.PageMeasurement): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Media, self).__init__('media_metrics') <NEW_LINE> self._media_metric = None <NEW_LINE> self._add_browser_metrics = False <NEW_LINE> self._cpu_metric = None <NEW_LINE> self._memory_metric = None <NEW_LINE> se... | The MediaMeasurement class gathers media-related metrics on a page set.
Media metrics recorded are controlled by metrics/media.js. At the end of the
test each metric for every media element in the page are reported. | 62598ee399cbb53fe682f4e4 |
class BooleanFlag(Flag): <NEW_LINE> <INDENT> def __init__(self, name, default, help, short_name=None, **args): <NEW_LINE> <INDENT> p = BooleanParser() <NEW_LINE> Flag.__init__(self, p, None, name, default, help, short_name, 1, **args) <NEW_LINE> if not self.help: self.help = "a boolean value" | Basic boolean flag.
Boolean flags do not take any arguments, and their value is either
True (1) or False (0). The false value is specified on the command
line by prepending the word 'no' to either the long or the short flag
name.
For example, if a Boolean flag was created whose long name was
'update' and whose short... | 62598ee356ac1b37e630081f |
class TestTargetMachines(TestCase): <NEW_LINE> <INDENT> def test_native(self): <NEW_LINE> <INDENT> m, _ = self._build_module() <NEW_LINE> tm = le.EngineBuilder.new(m).select_target() <NEW_LINE> self.assertTrue(tm.target_name) <NEW_LINE> self.assertTrue(tm.target_data) <NEW_LINE> self.assertTrue(tm.target_short_descript... | Exercise target machines
Require PTX backend | 62598ee356ac1b37e6300820 |
class Token(object): <NEW_LINE> <INDENT> def __init__(self, id, username, tenant_id, tenant_name, serviceCatalog=None): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.user = {'name': username} <NEW_LINE> self.tenant = {'id': tenant_id, 'name': tenant_name} <NEW_LINE> self.serviceCatalog = serviceCatalog <NEW_LINE> <D... | More or less fakes what the api is looking for | 62598ee321bff66bcd721285 |
class SmallBlog(Base): <NEW_LINE> <INDENT> __tablename__ = 'small_blog' <NEW_LINE> id = Column('id', Integer, primary_key=True) <NEW_LINE> post_user_id = Column('post_user_id', Integer, ForeignKey(User.id)) <NEW_LINE> post_time = Column('post_time', DateTime, default = datetime.datetime.now) <NEW_LINE> title = Column('... | 小型博客 | 62598ee3a8ecb0332586f81c |
class BaseCommand(object): <NEW_LINE> <INDENT> def get_rnms_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '-c', '--config', action='store', dest='config', help='Specify the config file to use', default='production.ini', ) | Base Object for Rnms specific functions | 62598ee32c8b7c6e89bd1df4 |
class RB_KFold_DualSVM_Regression(WorkFlow): <NEW_LINE> <INDENT> def __init__(self, input, split_index, output_dir, n_folds, n_threads=8, grid_search_folds=10, c_range=[j * 10 ** k for k in range(1, 4) for j in [1, 2, 4, 7]], gamma_range=[j * 10 ** k for k in range(-8, -6) for j in [1, 4, 7]], kernel=None, verbose=Fals... | The main class to run MLNI with stritified KFold CV for regression with ROI features. | 62598ee38e7ae83300ee76c3 |
class GetSharedDataResponse(rpc.Response): <NEW_LINE> <INDENT> def __init__(self, meta): <NEW_LINE> <INDENT> self.meta = meta <NEW_LINE> <DEDENT> def __getstate__(self): <NEW_LINE> <INDENT> return self.meta <NEW_LINE> <DEDENT> def __setstate__(self, state): <NEW_LINE> <INDENT> self.meta = state | Send meta data of shared-memory tensor to client.
Parameters
----------
meta : dict
a dict of meta, e.g.,
{'data_0' : (shape, dtype, policy_str),
'data_1' : (shape, dtype, policy_str)} | 62598ee36aa9bd52df0d34e2 |
class DjangoJinjaTemplate: <NEW_LINE> <INDENT> def __init__(self, jt): <NEW_LINE> <INDENT> self.jt = jt <NEW_LINE> <DEDENT> def render(self, context): <NEW_LINE> <INDENT> context_dict = {} <NEW_LINE> for d in context.dicts: <NEW_LINE> <INDENT> context_dict.update(d) <NEW_LINE> <DEDENT> extend_context(context_dict) <NEW... | used e.g. to render :srcref:`/lino/lino/config/500.html` | 62598ee3379a373c97d9762f |
class v2_0(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "MAK.MAKInputData-2.0" | MAK dataset source | 62598ee38e71fb1e983ba09e |
class TestAccountManagementForAdminOnlyUser(TestCase, WagtailTestUtils): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> admin_only_group = Group.objects.create(name='Admin Only') <NEW_LINE> admin_only_group.permissions.add(Permission.objects.get(codename='access_admin')) <NEW_LINE> self.admin_only_user = get_... | Tests for users with no edit/publish permissions at all | 62598ee3d268445f26638ea8 |
class XMLParser: <NEW_LINE> <INDENT> def __init__(self,path_to_xml,extTree=None): <NEW_LINE> <INDENT> if extTree: <NEW_LINE> <INDENT> root = extTree <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> tree = ET.parse(path_to_xml) <NEW_LINE> root = tree.getroot() <NEW_LINE> <DEDENT> self.rootNode = Node(root) <NEW_LINE> self.... | XML Parser for Liftago. Takes either `path_to_xml` string (mandatory, set to None if unusued) or `extTree` ElementTree
object. Method `parseToDataFrame` returns flattened xml as pandas.DataFrame, which can be then exported to csv via *.to_csv method | 62598ee34e4d562566370a4d |
class CIMElement(Element): <NEW_LINE> <INDENT> ownerDocument = None <NEW_LINE> def __init__(self, name): <NEW_LINE> <INDENT> Element.__init__(self, name) <NEW_LINE> <DEDENT> def setName(self, name): <NEW_LINE> <INDENT> self.setAttribute('NAME', name) <NEW_LINE> <DEDENT> def setOptionalAttribute(self, name, value): <NEW... | A base class that has a few bonus helper methods. | 62598ee3a17c0f6771d5a888 |
class RectangleEffectOptions(LabelEffectOptions): <NEW_LINE> <INDENT> def __init__(self, parent=0): <NEW_LINE> <INDENT> super(RectangleEffectOptions,self).__init__(parent) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> super(RectangleEffectOptions,self).__del__() <NEW_LINE> <DEDENT> def create(self): <NEW_L... | RectangleEffect-specfic gui
| 62598ee367a9b606de544602 |
@attr.s(cmp=False) <NEW_LINE> class DataError(Exception): <NEW_LINE> <INDENT> code = attr.ib(type=Optional[int]) <NEW_LINE> payload = attr.ib(type=Optional[ByteString]) | Peer replied with an Error | 62598ee3f548e778e5969bca |
class HistoryMeter(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.hist = [] <NEW_LINE> self.partials = [] <NEW_LINE> self.count = 0 <NEW_LINE> self.val = 0 <NEW_LINE> <DEDENT> def update(self, x, n=1): <NEW_LINE> <INDENT> s... | Remember all values | 62598ee35fdd1c0f98e5c5e2 |
class Fahrenheit(Temperature): <NEW_LINE> <INDENT> def convert_to_base(self): <NEW_LINE> <INDENT> return Kelvin((self.value + 459.67) * (5/9)) <NEW_LINE> <DEDENT> def convert_from_base(self, value): <NEW_LINE> <INDENT> return Fahrenheit(value / (5/9) - 459.67) | Convert the current value to the base unit. | 62598ee3e64d504609df86d9 |
class TokenObtainPairPatchedView(TokenObtainPairView): <NEW_LINE> <INDENT> serializer_class = serializers.TokenObtainPairPatchedSerializer | Takes a set of user credentials and returns an access and refresh JSON web
token pair to prove the authentication of those credentials. | 62598ee3dd821e528d6d7579 |
class SupConLoss(nn.Module): <NEW_LINE> <INDENT> def __init__(self, temperature=0.07, contrast_mode='all', base_temperature=0.07): <NEW_LINE> <INDENT> super(SupConLoss, self).__init__() <NEW_LINE> self.temperature = temperature <NEW_LINE> self.contrast_mode = contrast_mode <NEW_LINE> self.base_temperature = base_temper... | Supervised Contrastive Learning:
https://arxiv.org/pdf/2004.11362.pdf
https://github.com/HobbitLong/SupContrast
It also supports the unsupervised contrastive loss in SimCLR | 62598ee34f88993c371ef800 |
class OffensiveReflexAgent(ReflexCaptureAgent): <NEW_LINE> <INDENT> def choosePowers(self, gameState, powerLimit): <NEW_LINE> <INDENT> validPowers = LEGAL_POWERS[:] <NEW_LINE> powers = util.Counter() <NEW_LINE> powers['capacity'] = 2 <NEW_LINE> validPowers.remove('capacity') <NEW_LINE> for i in range(powerLimit - 2): <... | A reflex agent that seeks food. This is an agent
we give you to get an idea of what an offensive agent might look like,
but it is by no means the best or only way to build an offensive agent. | 62598ee3d7e4931a7ef3a6d2 |
class IClassificationPortlet(IPortletDataProvider): <NEW_LINE> <INDENT> pass | A portlet displaying a the top news | 62598ee3851cf427c66b6906 |
class User(Base): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> id = sa.Column(sa.Integer, primary_key=True) <NEW_LINE> first_name = sa.Column(sa.Text) <NEW_LINE> last_name = sa.Column(sa.Text) <NEW_LINE> gender = sa.Column(sa.Text) <NEW_LINE> email = sa.Column(sa.Text) <NEW_LINE> birthdate = sa.Column(sa.Text)... | Описывает структуру таблицы user для хранения регистрационных данных пользователей | 62598ee33eb6a72ae0388c77 |
class Drift: <NEW_LINE> <INDENT> def __init__(self, name, length, radius, offset_up=0, offset_down=0): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.len = length <NEW_LINE> self.r = radius <NEW_LINE> self.offset_u = offset_up <NEW_LINE> self.offset_d = offset_down <NEW_LINE> <DEDENT> def track(self, particle): <... | A 'drift' for accelerators. | 62598ee307f4c71912bada89 |
class DishwasherEnergyFactor(BSElement): <NEW_LINE> <INDENT> element_type = "xs:decimal" | Energy Factor (EF) was the ENERGY STAR dishwasher energy performance metric prior to 2009. EF is expressed in cycles per kWh. A higher EF value means a dishwasher is more efficient. EF is the reciprocal of the sum of the machine electrical energy per cycle, M, plus the water heating energy consumption per cycle, W: EF ... | 62598ee3cc0a2c1114479637 |
class Backend(object): <NEW_LINE> <INDENT> def __init__(self, filename, try_pdf_removal=True): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.try_pdf_removal = try_pdf_removal <NEW_LINE> self.pdf_removed = False <NEW_LINE> self.project = angr.Project(filename) <NEW_LINE> self._identifer = None <NEW_LINE> ... | Patcher backend. | 62598ee3462c4b4f79dba02e |
class CertificateManager: <NEW_LINE> <INDENT> def __init__(self, session): <NEW_LINE> <INDENT> self.session = session <NEW_LINE> self.client = self.session.client('acm', region_name='us-east-1') <NEW_LINE> <DEDENT> def cert_matches(self, cert_arn, domain_name): <NEW_LINE> <INDENT> cert_details = self.client.describe_ce... | Manage an ACM Certificate. | 62598ee399cbb53fe682f4e6 |
class _Decoder(protobuf_base.Decoder): <NEW_LINE> <INDENT> def no_decoding(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def decode_string(self): <NEW_LINE> <INDENT> return self.getPrefixedString().decode('UTF-8') <NEW_LINE> <DEDENT> def decode_boolean(self): <NEW_LINE> <INDENT> return bool... | Extension of protocol buffer decoder.
Original protocol buffer decoder does not have complete set of methods
for handling required decoding. This class adds them. | 62598ee3eab8aa0e5d30a3ad |
class SnapshotUnstructuredGridReader(vtk.vtkProgrammableFilter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.FileName = "" <NEW_LINE> self.SetExecuteMethod(self._Execute) <NEW_LINE> return <NEW_LINE> <DEDENT> def SetFileName(self, path): <NEW_LINE> <INDENT> self.FileName = path <NEW_LINE> return <N... | VTK-style filter for reading HemeLB snapshot files as VTK data into the
geometry provided as input. This input must be that derived from the HemeLB
geometry file used by the simulation from which the snapshot comes an be
as output by GmyUnstructuredGridReader (e.g. no scaling), as this class
uses the positions to mat... | 62598ee31f5feb6acb161286 |
class UserTest(base_test.BaseTest): <NEW_LINE> <INDENT> def testGenerateKeyPair(self): <NEW_LINE> <INDENT> user = models.User() <NEW_LINE> rsa_public_key = RSA.importKey(user.public_key) <NEW_LINE> rsa_private_key = RSA.importKey(user.private_key) <NEW_LINE> self.assertEqual(2048, rsa_public_key.size() + 1) <NEW_LINE> ... | Test for user model class functionality. | 62598ee34e4d562566370a4e |
class EllipticalAperture(PixelAperture): <NEW_LINE> <INDENT> def __init__(self, positions, a, b, theta): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.a = float(a) <NEW_LINE> self.b = float(b) <NEW_LINE> self.theta = float(theta) <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> raise TypeError("'a' and 'b'... | Elliptical aperture(s), defined in pixel coordinates.
Parameters
----------
positions : tuple, list, array, or `~astropy.units.Quantity`
Pixel coordinates of the aperture center(s), either as a single
``(x, y)`` tuple, a list of ``(x, y)`` tuples, an ``Nx2`` or
``2xN`` `~numpy.ndarray`, or an ``Nx2`` or ``... | 62598ee3e5267d203ee69f3a |
class MultiplyOperation(AbstractOperation): <NEW_LINE> <INDENT> def execute(self): <NEW_LINE> <INDENT> return self.operand_a * self.operand_b | Subclass to implement multiplication. | 62598ee3498bea3a75a5616a |
class TagName(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Instagram/TagName') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return TagNameInputSet() <NEW_LINE> <DEDENT> def _make_result_set(self, resu... | Create a new instance of the TagName Choreography. A TembooSession object, containing a valid
set of Temboo credentials, must be supplied. | 62598ee330bbd7224646826e |
class IRATUpdateView(LoginRequiredMixin, PermissionMixin, UpdateView): <NEW_LINE> <INDENT> model = TBLSession <NEW_LINE> template_name = 'questions/irat.html' <NEW_LINE> form_class = IRATForm <NEW_LINE> permissions_required = ['crud_tests'] <NEW_LINE> def get_discipline(self): <NEW_LINE> <INDENT> discipline = Disciplin... | Update the iRAT duration and weight | 62598ee3435de62698e9a40c |
class Object: <NEW_LINE> <INDENT> client = None <NEW_LINE> object_id: int = 0 <NEW_LINE> subscriptions: Mapping[str, Callable[[int, str, Any], Any]] = None <NEW_LINE> async def get(self, property: str) -> Any: <NEW_LINE> <INDENT> return await self.client.get(self.object_id, property) <NEW_LINE> <DEDENT> async def set(s... | A client-side object.
Can be indexed to access the properties, but this happens asynchronously; you must await the result of obj["property"] to actually get the property value. | 62598ee363b5f9789fe83799 |
class IpCidrRouteTable(metaclass=MIBMeta, prefix='.1.3.6.1.2.1.4.24.4'): <NEW_LINE> <INDENT> route_updater = RouteUpdater() <NEW_LINE> ipCidrRouteDest = SubtreeMIBEntry('1.1', route_updater, ValueType.IP_ADDRESS, route_updater.route_dest) | 'ipCidrRouteDest table in IP Forwarding Table MIB' https://tools.ietf.org/html/rfc4292 | 62598ee3460517430c430abd |
class StaticPrivateKeyRetriever(BasePrivateKeyRetriever): <NEW_LINE> <INDENT> def __init__(self, key_identifier, private_key_pem): <NEW_LINE> <INDENT> if not isinstance(key_identifier, KeyIdentifier): <NEW_LINE> <INDENT> key_identifier = KeyIdentifier(key_identifier) <NEW_LINE> <DEDENT> self.key_identifier = key_identi... | This class simply returns the key_identifier and private_key_pem
initially provided to it in calls to load. | 62598ee376e4537e8c3edbed |
class OrdenMantenimiento(models.Model): <NEW_LINE> <INDENT> ESTADO = ( ('NUEVO', 'Nuevo'), ('EN_REVISION', 'En revisión'), ('REVISADO', 'Revisado'), ('CONFIRMADO', 'Confirmado'), ('FINALIZADO', 'Finalizado'), ) <NEW_LINE> fecha_registro = models.DateField( verbose_name="Fecha de registro", auto_now_add=True) <NEW_LINE>... | Contiene los datos del registro de una orden de mantenimientos de uno o muchos equipos y los datos del cliente | 62598ee3498bea3a75a5616b |
class CategoryQuery(mixins.MatchAlias, compquery.ComponentQuery): <NEW_LINE> <INDENT> def results(self): <NEW_LINE> <INDENT> self.log.info("Generating results from {0.policy}".format(self)) <NEW_LINE> self.log.debug("Name: {0.name!r}, regex: {0.name_regex}".format(self)) <NEW_LINE> self.log.debug("Alias: {0.alias}, reg... | Query MLS Categories
Parameter:
policy The policy to query.
Keyword Parameters/Class attributes:
name The name of the category to match.
name_regex If true, regular expression matching will
be used for matching the name.
alias The alias name to match.
alias_regex If true, regular ... | 62598ee3009cb60464cffb84 |
class CommandCompleter(object): <NEW_LINE> <INDENT> DEFAULTPATH = "/bin:/usr/bin:/usr/local/bin" <NEW_LINE> def __init__(self, qtile, _testing=False): <NEW_LINE> <INDENT> self.lookup = None <NEW_LINE> self.offset = -1 <NEW_LINE> self.thisfinal = None <NEW_LINE> self._testing = _testing <NEW_LINE> <DEDENT> def actual(se... | Parameters
==========
_testing :
disables reloading of the lookup table to make testing possible. | 62598ee3cb5e8a47e493b494 |
class RulePermissions(BridgekeeperRESTMixin, BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> if self.skip_permission_checks(request, view): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return self.get_permission(request, view).is_possible_for(request.user) <NEW_L... | Django REST Framework permission class for Bridgekeeper.
Note that this class **does not**, by itself, perform queryset
filtering on list views, since Django REST Framework doesn't provide
an API for permission classes to do so. | 62598ee3d268445f26638ea9 |
class CST(tzinfo): <NEW_LINE> <INDENT> def utcoffset(self, date_time): <NEW_LINE> <INDENT> return timedelta(seconds=-3600) <NEW_LINE> <DEDENT> def dst(self, date_time): <NEW_LINE> <INDENT> return timedelta(seconds=-7200) | Timezone object for CST | 62598ee33539df3088eca8e8 |
class Concept(six.with_metaclass(abc.ABCMeta, object)): <NEW_LINE> <INDENT> def __init__(self, name, key=None, help_text='', required=False, hidden=False): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.help_text = help_text <NEW_LINE> self.required = required <NEW_LINE> self.hidden = hidden <NEW_LINE> self.key =... | Abstract base class for concept args.
Attributes:
name: str, the name of the concept. Used to determine
the argument or group name of the concept.
key: str, the name by which the parsed concept is stored in the dependency
view. If not given, is the same as the concept's name. Generally,
this should onl... | 62598ee330dc7b766599debe |
class Transformer(object): <NEW_LINE> <INDENT> __module__ = os.path.splitext(os.path.basename(__file__))[0] <NEW_LINE> def __init__(self, transform_X=False, transform_y=False, transform_w=False, dataset=None): <NEW_LINE> <INDENT> self.dataset = dataset <NEW_LINE> self.transform_X = transform_X <NEW_LINE> self.transform... | Abstract base class for different ML models. | 62598ee3be8e80087fbbd683 |
class TestTask(tasks.BroadcastTask): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> self.fetch_photo_album(1671066229) | 测试任务 | 62598ee3e64d504609df86da |
class TeacherAssistantCourse(BaseModel): <NEW_LINE> <INDENT> user = models.ForeignKey(verbose_name='用户', to=User) <NEW_LINE> course = models.ForeignKey(verbose_name='课程', to=ClassCourseInfo) <NEW_LINE> des = models.TextField(verbose_name='描述', null=True, blank=True) <NEW_LINE> @property <NEW_LINE> def showname(self): <... | 教辅课程 | 62598ee357b8e32f52507420 |
class SQSTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> sqs.clear_outbox() <NEW_LINE> <DEDENT> def test_sqs(self): <NEW_LINE> <INDENT> queue = sqs.get_queue('test') <NEW_LINE> self.assertEquals(queue.name, 'test') <NEW_LINE> sqs.send_message(queue, { 'message_type': 'demo', 'this': 'should... | Test SQS works in the test mode correctly
| 62598ee385dfad0860cbed83 |
class OBJECT_OT_delete_variation(Operator): <NEW_LINE> <INDENT> bl_idname = "lfs.delete_variation" <NEW_LINE> bl_label = "Delete variation" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> var_name: StringProperty() <NEW_LINE> @classmethod <NEW_LINE> def poll(self, context): <NEW_LINE> <INDENT> return context.ob... | Delete variation property | 62598ee3baa26c4b54d4d905 |
class MediaController(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def play_pause(): <NEW_LINE> <INDENT> return_code = call(['xdotool', 'key', 'XF86AudioPlay'], stdin=PIPE, stdout=PIPE, stderr=STDOUT) <NEW_LINE> if return_code == 0: <NEW_LINE> <INDENT> return SuccessfulReturnTypeBase() <NEW_LINE> <DEDENT> else... | This class provides control functions for simulating media keys on the system.
There is no constructor, as there is no state to persist.
The functions here require the xdotool command to be available on PATH: apt-get install xdotool | 62598ee37047854f4633da0b |
class ResultAwaiter(object): <NEW_LINE> <INDENT> __slots__ = 'requestList', 'index' <NEW_LINE> def __init__(self, requestList): <NEW_LINE> <INDENT> self.requestList = requestList <NEW_LINE> self.index = 0 <NEW_LINE> <DEDENT> def __await__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __anext__(self): <... | Reinvents generators because of PEP 479, sigh. See #513. | 62598ee3ac7a0e7691f70b4c |
class MethodInvocation(object): <NEW_LINE> <INDENT> def __init__(self, instance, method_name, args, kwargs, interceptors): <NEW_LINE> <INDENT> self.instance = instance <NEW_LINE> self.method_name = method_name <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self.intercept_stack = copy.copy(interc... | Encapsulation of invoking a method on a proxied service. It iterates throgh the list of interceptors by using
a generator. | 62598ee3097d151d1a2bf656 |
class StarEditor(QWidget): <NEW_LINE> <INDENT> editing_finished = Signal() <NEW_LINE> def __init__(self, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.setMouseTracking(True) <NEW_LINE> self.setAutoFillBackground(True) <NEW_LINE> self.star_rating = StarRating() <NEW_LINE> <DEDENT> def sizeHi... | The custom editor for editing StarRatings. | 62598ee301c39578d7f113df |
class DirichletPrior: <NEW_LINE> <INDENT> def __init__(self, counts): <NEW_LINE> <INDENT> counts = np.array(counts) <NEW_LINE> if not np.all(counts > 0): <NEW_LINE> <INDENT> raise Exception("All elements of 'counts' must be positive.") <NEW_LINE> <DEDENT> self._counts = counts <NEW_LINE> <DEDENT> def boom(self): <NEW_L... | A Dirichlet prior distribution over discrete probability distributions. | 62598ee37cff6e4e811b4024 |
class LagrangeDualSet(dual_set.DualSet): <NEW_LINE> <INDENT> def __init__(self, ref_el, degree): <NEW_LINE> <INDENT> entity_ids = {} <NEW_LINE> nodes = [] <NEW_LINE> top = ref_el.get_topology() <NEW_LINE> cur = 0 <NEW_LINE> for dim in sorted(top): <NEW_LINE> <INDENT> entity_ids[dim] = {} <NEW_LINE> for entity in sorted... | The dual basis for Lagrange elements. This class works for
simplices of any dimension. Nodes are point evaluation at
equispaced points. | 62598ee33539df3088eca8e9 |
class CSRFMiddleware: <NEW_LINE> <INDENT> def __init__(self, app, cookie_name, param_name=None): <NEW_LINE> <INDENT> if param_name is None: <NEW_LINE> <INDENT> param_name = cookie_name <NEW_LINE> <DEDENT> self._app = app <NEW_LINE> self._param_name = param_name <NEW_LINE> self._cookie_name = cookie_name <NEW_LINE> <DED... | On POSTs, looks for a special field name that matches the value of a given
cookie. If this field is missing, the cookies are cleared to anonymize the
request. | 62598ee363d6d428bbee0e09 |
class UserGroup(db.Model, SurrogatePK): <NEW_LINE> <INDENT> __tablename__ = 'user_group' <NEW_LINE> name = db.Column(db.String(80), unique=True, nullable=False) <NEW_LINE> users = db.relationship('User', back_populates='user_group') <NEW_LINE> schedules = db.relationship('GroupSchedule', back_populates='user_group') <N... | A group for a user. | 62598ee38e7ae83300ee76c6 |
class GFile(file_io.FileIO): <NEW_LINE> <INDENT> def __init__(self, name, mode='r'): <NEW_LINE> <INDENT> mode = mode.replace('b', '') <NEW_LINE> super(GFile, self).__init__(name=name, mode=mode) | File I/O wrappers with thread locking. | 62598ee3b7558d5895461c80 |
class Boundary(object): <NEW_LINE> <INDENT> def __init__(self, geometry, n): <NEW_LINE> <INDENT> super(Boundary, self).__init__() <NEW_LINE> self.geometry = geometry <NEW_LINE> self.direction = self.geometry[1, :] - self.geometry[0, :] <NEW_LINE> self.direction = self.direction / np.linalg.norm(self.direction) <NEW_LIN... | docstring for Boundary | 62598ee363b5f9789fe8379c |
class ContextStaticAttribute(Attribute,_Attribute): <NEW_LINE> <INDENT> def __init__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __reduce_ex__(self,*args): <NEW_LINE> <INDENT> pass | Indicates that the value of a static field is unique for a particular context.
ContextStaticAttribute() | 62598ee34527f215b58e853d |
class WriteRIRSerializer(object): <NEW_LINE> <INDENT> def __init__(self, name=None, slug=None): <NEW_LINE> <INDENT> self.swagger_types = { 'name': 'str', 'slug': 'str' } <NEW_LINE> self.attribute_map = { 'name': 'name', 'slug': 'slug' } <NEW_LINE> self._name = name <NEW_LINE> self._slug = slug <NEW_LINE> <DEDENT> @prop... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ee338b623060ffa76cd |
class AtCommandAction(CommonMixin): <NEW_LINE> <INDENT> def __init__(self, command, parameterPattern, action, description): <NEW_LINE> <INDENT> assert command, "You must provide a value for command" <NEW_LINE> assert action in (ENABLE_EXCLUSION, DISABLE_EXCLUSION), "Invalid action parameter value" <NEW_LINE>... | Configuration for a custom At-Command action configuration.
Attributes
----------
command : string
The At-Command to trigger for.
parameterPattern : string
Optional regex pattern to match against the command parameter(s)
action : string
The action to perform. May be one of ENABLE_EXCLUSION or DISABLE_EXCL... | 62598ee38da39b475be017e2 |
class Task(object): <NEW_LINE> <INDENT> def __init__(self, task_type, task): <NEW_LINE> <INDENT> self.task = task <NEW_LINE> self.task_type = task_type <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> if self.task_type == 'github_contributor': <NEW_LINE> <INDENT> from gitalizer.aggregator.github.user import ... | An object which is passed to a worker. | 62598ee3d268445f26638eaa |
class OneTime(Future, AbstractEvent): <NEW_LINE> <INDENT> def __init__(self, loop=None, name=None): <NEW_LINE> <INDENT> super(OneTime, self).__init__(loop=loop) <NEW_LINE> self._name = name or self.__class__.__name__.lower() <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '%s: %s' % (self._name, supe... | An :class:`AbstractEvent` which can be fired once only.
This event handler is a subclass of :class:`.Future`.
Implemented mainly for the one time events of the :class:`EventHandler`. | 62598ee30c0af96317c549d5 |
class ExactInference(InferenceModule): <NEW_LINE> <INDENT> def initializeUniformly(self, gameState): <NEW_LINE> <INDENT> self.beliefs = util.Counter() <NEW_LINE> for p in self.legalPositions: self.beliefs[p] = 1.0 <NEW_LINE> self.beliefs.normalize() <NEW_LINE> <DEDENT> def observe(self, observation, gameState): <NEW_LI... | The exact dynamic inference module should use forward-algorithm updates to
compute the exact belief function at each time step. | 62598ee34e4d562566370a51 |
class QUICK3( afc.UpwindFlux1D ): <NEW_LINE> <INDENT> def __init__( self ): <NEW_LINE> <INDENT> super( QUICK3, self ).__init__() <NEW_LINE> self.stencil_radius = 2 <NEW_LINE> return <NEW_LINE> <DEDENT> def flux_calculation( self, args ): <NEW_LINE> <INDENT> var = args[0] <NEW_LINE> dx = args[1] <NEW_LINE> h = args[2... | Advective flux class
Quadratic Upwind Interpolation Scheme
Third order
Stencil: f_{i+1/2} = 3/4f_{i } + 3/8f_{i+1} - 1/8f_{i-1} if u_{i+1/2} > 0
= 3/4f_{i+1} + 3/8f_{i } - 1/8f_{i+2} if u_{i+1/2} < 0
Required keys in namelists:
other_variable_names:
Advection velocity
parameter_names:
No... | 62598ee3be8e80087fbbd685 |
class OpenidRegisterForm(forms.Form): <NEW_LINE> <INDENT> next = NextUrlField() <NEW_LINE> username = UserNameField(widget_attrs={'tabindex': 0}) <NEW_LINE> email = UserEmailField() | openid signin form | 62598ee3925a0f43d25e6666 |
class Alias: <NEW_LINE> <INDENT> def __init__(self, model, *args, **kwargs): <NEW_LINE> <INDENT> model._check_abstract() <NEW_LINE> self.model = model <NEW_LINE> self.alias = model.__table__.alias(*args, **kwargs) <NEW_LINE> <DEDENT> def __getattr__(self, item): <NEW_LINE> <INDENT> rv = getattr( self.alias.columns, ite... | Experimental proxy for table alias on model. | 62598ee3ac7a0e7691f70b4e |
class ClusterControllerServicer(object): <NEW_LINE> <INDENT> def CreateCluster(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details("Method not implemented!") <NEW_LINE> raise NotImplementedError("Method not implemented!") <NEW_LINE> <DEDENT> def Up... | The ClusterControllerService provides methods to manage clusters
of Compute Engine instances. | 62598ee30a50d4780f7039e2 |
class SubjectTag(TimeStampedModel): <NEW_LINE> <INDENT> feed_object = models.CharField(max_length=16) <NEW_LINE> feed_object_id = models.IntegerField() <NEW_LINE> title = models.CharField(max_length=300) <NEW_LINE> sort_order = models.IntegerField(blank=True, null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT>... | Was feed_tags, but was only being used for subject tags, so renaming. | 62598ee366673b3332c2e9e0 |
class EchoMatches(App): <NEW_LINE> <INDENT> def build(self): <NEW_LINE> <INDENT> Builder.load_file('select.kv') <NEW_LINE> manager = ScreenManager() <NEW_LINE> global ECHO_SERVER <NEW_LINE> ECHO_SERVER = Select(name='select') <NEW_LINE> manager.add_widget(ECHO_SERVER) <NEW_LINE> manager.add_widget(Login(name='login')) ... | Class for client app | 62598ee307f4c71912bada8d |
class Testing(Config): <NEW_LINE> <INDENT> TESTING = True <NEW_LINE> DEBUG = True | TestingConfig | 62598ee3adb09d7d5dc08bff |
class TestPostMortemDebugging(tests.TestCase): <NEW_LINE> <INDENT> class TracebackRecordingResult(tests.ExtendedTestResult): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> tests.ExtendedTestResult.__init__(self, StringIO(), 0, 1) <NEW_LINE> self.postcode = None <NEW_LINE> <DEDENT> def _post_mortem(self, tb... | Check post mortem debugging works when tests fail or error | 62598ee356b00c62f0fb0f09 |
@register_detector <NEW_LINE> class TextBlobNameDetector(RegexDetector): <NEW_LINE> <INDENT> filth_cls = NameFilth <NEW_LINE> name = 'text_blob_name' <NEW_LINE> autoload = False <NEW_LINE> disallowed_nouns = CanonicalStringSet(["skype"]) <NEW_LINE> def iter_filth(self, text, document_name: Optional[str] = None) -> Gene... | Use part of speech tagging from textblob to clean proper nouns out of the dirty dirty
``text``. Disallow particular nouns by adding them to the ``NameDetector.disallowed_nouns`` set. | 62598ee3aad79263cf42ce4f |
class Solution: <NEW_LINE> <INDENT> def nthToLast(self, head, n): <NEW_LINE> <INDENT> result = head <NEW_LINE> if not head: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> for i in range(n-1): <NEW_LINE> <INDENT> head = head.next <NEW_LINE> if not head: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> <DEDENT> w... | @param head: The first node of linked list.
@param n: An integer.
@return: Nth to last node of a singly linked list. | 62598ee391af0d3eaad3844d |
class ProcessAliasProtocol(protocol.ProcessProtocol): <NEW_LINE> <INDENT> onEnd = None <NEW_LINE> def processEnded(self, reason): <NEW_LINE> <INDENT> if self.onEnd is not None: <NEW_LINE> <INDENT> self.onEnd.errback(reason) | A process protocol which errbacks a deferred when the associated
process ends.
@type onEnd: L{NoneType <types.NoneType>} or L{Deferred <defer.Deferred>}
@ivar onEnd: If set, a deferred on which to errback when the process ends. | 62598ee3e5267d203ee69f3e |
class GeneralIsExpression(VdmslNode): <NEW_LINE> <INDENT> _fields = ('body',) <NEW_LINE> def __init__(self, body, lineno, lexpos): <NEW_LINE> <INDENT> self.body = body <NEW_LINE> self.__setattr__('lineno', lineno) <NEW_LINE> self.__setattr__('lexpos', lexpos) | 一般is式 | 62598ee3498bea3a75a5616e |
class DiffractionEffects(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def add_diffraction(self, surface, psf_geo, PSF_window, scale_mas, wavelength): <NEW_LINE> <INDENT> N_window = psf_geo.shape[0] <NEW_LINE> diffraction = airy_and_slicer(surface=surface, wavelength=wa... | A class to take care of diffraction effects
for the PSF FWHM calculations | 62598ee3435de62698e9a40f |
class BrazilBahia(Brazil): <NEW_LINE> <INDENT> FIXED_HOLIDAYS = Brazil.FIXED_HOLIDAYS + ( (7, 2, "Independência da Bahia"), ) | Brazil Bahia State | 62598ee3a8370b77170eea1d |
class IOSource(FileSource): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def can_i_handle(cls, action, file_type): <NEW_LINE> <INDENT> if action == params.READ_ACTION: <NEW_LINE> <INDENT> status = file_type in READERS or file_type in AVAILABLE_READERS <NEW_LINE> <DEDENT> elif action == params.WRITE_ACTION: <NEW_LINE> <I... | Get excel data from file source | 62598ee3090684286d5929fc |
class Operations(object): <NEW_LINE> <INDENT> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self.api_version = "2017-04-02" <NEW_LINE> self.config = config <NEW_LINE> ... | Operations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Co... | 62598ee32c8b7c6e89bd1df9 |
@base.ReleaseTracks(base.ReleaseTrack.GA) <NEW_LINE> class Create(base.CreateCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> _Args(parser) <NEW_LINE> flags.AddClusterAutoscalingFlags(parser, hidden=True) <NEW_LINE> flags.AddLocalSSDFlag(parser, suppressed=True) <NEW_LINE> fl... | Create a node pool in a running cluster. | 62598ee321bff66bcd72128b |
class Difference(object): <NEW_LINE> <INDENT> diff_op = None <NEW_LINE> inv_diff_op = None <NEW_LINE> def __init__(self, value): <NEW_LINE> <INDENT> assert isinstance(value, core.Term) <NEW_LINE> self.val = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "{}({})".format(type(self).__name__, str(... | Represent differences.
The *difference* between two `Term` :math:`x` and :math:`y`
is defined as :math:`\alpha = y - x`,
where the *difference operation* :math:`-`
is a bit-vector `Operation`. In other words, the pair
:math:`(x, x + \alpha)` has difference :math:`\alpha`,
where :math:`+` is the inverse of the differen... | 62598ee34527f215b58e853f |
class LookupTableTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.initial = list(range(20)) <NEW_LINE> self.list = lookup.LookupTable(self.initial) <NEW_LINE> <DEDENT> def test_initialization(self): <NEW_LINE> <INDENT> self.assertEquals(self.list, self.initial) <NEW_LINE> self.asse... | Tests for list-dict synchrony and data access | 62598ee3498bea3a75a5616f |
class CoreResource(resource.CoAPResource): <NEW_LINE> <INDENT> def __init__(self, root): <NEW_LINE> <INDENT> resource.CoAPResource.__init__(self) <NEW_LINE> self.root = root <NEW_LINE> <DEDENT> def render_GET(self, request): <NEW_LINE> <INDENT> data = [] <NEW_LINE> self.root.generateResourceList(data, "") <NEW_LINE> pa... | Example Resource that provides list of links hosted by a server.
Normally it should be hosted at /.well-known/core
Resource should be initialized with "root" resource, which can be used
to generate the list of links.
For the response, an option "Content-Format" is set to value 40,
meaning "application/link-format". W... | 62598ee34e4d562566370a53 |
class ABFLoader(BaseRecordingLoader): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _read_data_from_file(self, file_name): <NEW_LINE> <INDENT> return AxonIO(file_name).read()[0].segments <NEW_LINE> <DEDENT> def _get_sampling_intervals_in_ms(self, file_data): <NEW_LINE> <INDENT... | Load recordings in Axon binary format (.abf).
Recordings are loaded by passing a list of file names to the `load()`
method. | 62598ee34f6381625f1987d9 |
class EventEngine(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__handlers = defaultdict(list) <NEW_LINE> self.__general_handlers = [] <NEW_LINE> self.__active = False <NEW_LINE> self.__active = True <NEW_LINE> self.__timer = QTimer() <NEW_LINE> self.__timer.timeout.connect(self.__onTimer) <... | 计时器使用python线程的事件驱动引擎 | 62598ee35fdd1c0f98e5c5e8 |
class Square: <NEW_LINE> <INDENT> def __init__(self, sizevar): <NEW_LINE> <INDENT> self.__size = sizevar | Square class. Has a size | 62598ee38a43f66fc4bf07ac |
@base.IronicObjectRegistry.register_if(False) <NEW_LINE> class NotificationPayloadBase(base.IronicObject): <NEW_LINE> <INDENT> SCHEMA = {} <NEW_LINE> VERSION = '1.0' <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(NotificationPayloadBase, self).__init__(*args, **kwargs) <NEW_LINE> self.populat... | Base class for the payload of versioned notifications. | 62598ee3e5267d203ee69f3f |
class BaseCellTextEditor(wx.TextCtrl): <NEW_LINE> <INDENT> def __init__(self, olv, subItemIndex, **kwargs): <NEW_LINE> <INDENT> style = wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB <NEW_LINE> if hasattr(olv, "columns"): <NEW_LINE> <INDENT> if olv.HasFlag(wx.LC_ICON): <NEW_LINE> <INDENT> style |= (wx.TE_CENTRE | wx.TE_MULTIL... | This is a base text editor for text-like editors used in an ObjectListView | 62598ee33d592f4c4edb952f |
class FuncSetRelationship(StatementFunction): <NEW_LINE> <INDENT> key = "set_relation" <NEW_LINE> const = False <NEW_LINE> async def func(self): <NEW_LINE> <INDENT> element_type = self.args[0] <NEW_LINE> element_key = self.args[1] <NEW_LINE> number = self.args[2] <NEW_LINE> try: <NEW_LINE> <INDENT> await self.caller.se... | Set the relationship between the player and the element.
Args:
args[0]: (string) element's type
args[1]: (string) element's key
args[2]: (number) number
Returns:
(boolean) value has set | 62598ee3097d151d1a2bf65a |
class Pepperoni(Ingredient.Ingredient): <NEW_LINE> <INDENT> def __init__(self, description): <NEW_LINE> <INDENT> super().__init__(description) | docstring for Pepperoni | 62598ee31b99ca400228e82a |
class PublicUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_create_valid_user_success(self): <NEW_LINE> <INDENT> payload = { 'email': 'test@testy.com', 'password': 'testpass', 'name': 'Test name' } <NEW_LINE> res = self.client.post(... | Test the users API (public) | 62598ee366673b3332c2e9e2 |
class InvalidOptionTypeError (OptionError): <NEW_LINE> <INDENT> pass | Exception raised when an option is incorrectly defined.
Each subclass of :class:`UrOption` must override
:attr:`UrOption.number` with the integer option number,
:attr:`UrOption.name` with the Unicode option name,
:attr:`UrOption.format` with the type of the option, and
:attr:`UrOption._repeatable` with repeatability i... | 62598ee3cc0a2c111447963d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.