code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Capacities(BorrowedResources[T]): <NEW_LINE> <INDENT> def __init__(self, __zero__: Optional[T] = None, **capacity: T): <NEW_LINE> <INDENT> resources = Resources(__zero__, **capacity) <NEW_LINE> super().__init__(resources, resources.levels) <NEW_LINE> self._available = Tracked(resources.levels) | Fixed supply of named resources which can be temporarily borrowed
The resources and their maximum capacity are defined
when the resource supply is created.
Afterwards, it is only possible to temporarily :py:meth:`borrow`
resources:
.. code:: python3
# create a limited supply of resources
resources = Capaciti... | 62598efb4527f215b58e8834 |
class ICMS40(Entidade): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(ICMS40, self).__init__(schema={ 'Orig': { 'type': 'string', 'required': True, 'allowed': [v for v,s in constantes.N06_ORIG]}, 'CST': { 'type': 'string', 'required': True, 'allowed': [v for v,s in constantes.N07_CST_ICMS4... | Grupo de tributação do ICMS 40, 41 e 60 (``ICMS40``, grupo ``N03``).
:param str Orig:
:param str CST:
.. sourcecode:: python
>>> icms = ICMS40(Orig='0', CST='60')
>>> ET.tostring(icms._xml())
'<ICMS40><Orig>0</Orig><CST>60</CST></ICMS40>' | 62598efb379a373c97d97930 |
class TemplateError(Exception): <NEW_LINE> <INDENT> def __init__(self, message, filename=None, lineno=-1, offset=-1): <NEW_LINE> <INDENT> if filename is None: <NEW_LINE> <INDENT> filename = '<string>' <NEW_LINE> <DEDENT> self.msg = message <NEW_LINE> if filename != '<string>' or lineno >= 0: <NEW_LINE> <INDENT> message... | Base exception class for errors related to template processing. | 62598efb009cb60464cffe87 |
class GetPrompt(WaitableCommand, SSHCommand): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> ret = self.api.run('source /etc/bashrc; if [ -x /bin/ps1 ]; ' 'then /bin/ps1; elif [ -f /var/prompt/ps1 ]; ' 'then getPromptStatus; else echo "!"; fi') <NEW_LINE> if ret.status: <NEW_LINE> <INDENT> LOG.error(ret) <NEW... | Returns the bash prompt string.
Examples:
[root@bp6800-123:Active] config #
returns: 'Active'
[root@viprioncmi:/S2-green-P:Active] config #
returns: 'Active'
@rtype: str | 62598efb92d797404e388016 |
class Huffman: <NEW_LINE> <INDENT> def __init__(self, frequences): <NEW_LINE> <INDENT> self.foret = [] <NEW_LINE> for i in frequences: <NEW_LINE> <INDENT> feuille_to_add = Feuille(frequence=frequences[i], symbole=i) <NEW_LINE> self.foret.append(feuille_to_add) <NEW_LINE> <DEDENT> while True: <NEW_LINE> <INDENT> bol = H... | Huffman's contruction algorithm | 62598efbcc0a2c1114479939 |
class raw_decoder(): <NEW_LINE> <INDENT> def decode(self, data): <NEW_LINE> <INDENT> words = len(data) <NEW_LINE> if (words % 2) != 0: <NEW_LINE> <INDENT> print(u'WARNING: Data contains an odd number of bytes, shall be even') <NEW_LINE> words -= 1 <NEW_LINE> <DEDENT> for i in range(0, words, 2): <NEW_LINE> <INDENT> yie... | Iterator yielding signed two-byte integers from data | 62598efb283ffb24f3cf21e2 |
class Ball(object): <NEW_LINE> <INDENT> def __init__(self, x, y, radius, sx, sy, color=Color.RED): <NEW_LINE> <INDENT> self._x = x <NEW_LINE> self._y = y <NEW_LINE> self._radius = radius <NEW_LINE> self._sx = sx <NEW_LINE> self._sy = sy <NEW_LINE> self._color = color <NEW_LINE> self._alive = True <NEW_LINE> <DEDENT> de... | 求 | 62598efb57b8e32f5250759e |
class IO(Monad): <NEW_LINE> <INDENT> pass | Represents IO value. | 62598efb5fdd1c0f98e5c8dd |
class WithQoS: <NEW_LINE> <INDENT> def __init__(self, obj, max_tries=5, wait_time=None): <NEW_LINE> <INDENT> self._obj = obj <NEW_LINE> self._max_tries = max_tries <NEW_LINE> self._wait_time = wait_time <NEW_LINE> <DEDENT> def __getattribute__(self, attr): <NEW_LINE> <INDENT> method = getattr(object.__getattribute__(se... | A wrapper around other objects providing Quality of Service (QoS)
support.
Basically, it wraps a created object. Upon a method call, it delegates it
to the wrapped object. If it raises an exception, it retries this call
after some specified wait time. This is done for the given maximal number
of times. Each failed met... | 62598efbaad79263cf42d147 |
class SampleBamReader(BamReader): <NEW_LINE> <INDENT> def __init__(self, path: str, *, source_id: int = 0, reference: Optional[str] = None): <NEW_LINE> <INDENT> self.source_id: int = source_id <NEW_LINE> if reference: <NEW_LINE> <INDENT> reference = os.path.abspath(reference) <NEW_LINE> <DEDENT> self._samfile = pysam.A... | A wrapper for Samfile that provides only those reads from a BAM or CRAM file
that belong to a specified sample. The BAM/CRAM file must have an index
(bai/crai). | 62598efb76e4537e8c3edef2 |
class NumbersBACS(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> @cached_property <NEW_LINE> def additional_properties_type(): <NEW_LINE> <INDENT> return (bool, date, datetime, dict, float, int, list, str, none_type,) <NEW_LINE> <DEDENT> _nullable = False <NEW_LINE> @cach... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the a... | 62598efb091ae35668703552 |
class Relation(LexemeRelation): <NEW_LINE> <INDENT> lexeme_1 = models.ForeignKey(Lexeme, related_name='relation_fst_set') <NEW_LINE> lexeme_2 = models.ForeignKey(Lexeme, related_name='relation_snd_set') <NEW_LINE> wordform_1 = models.ForeignKey(Wordform, null=True, blank=True, related_name='relation_fst_set') <NEW_LINE... | Class representing lexeme relations
| 62598efb4f88993c371ef987 |
class BaseTextStreamScraper(BaseScraper, BaseTextStreamReader): <NEW_LINE> <INDENT> def iter_processed_text(self, file, encoding=None, base_url=None): <NEW_LINE> <INDENT> for text, is_link in self.iter_text(file, encoding): <NEW_LINE> <INDENT> if is_link and base_url: <NEW_LINE> <INDENT> new_link = urljoin_safe(base_ur... | Base class for scrapers that process either link and non-link text. | 62598efb2c8b7c6e89bd20fb |
class IdentityGrpcTransport(IdentityTransport): <NEW_LINE> <INDENT> def __init__(self, *, host: str = 'localhost:7469', credentials: credentials.Credentials = None, channel: grpc.Channel = None) -> None: <NEW_LINE> <INDENT> if channel: <NEW_LINE> <INDENT> credentials = False <NEW_LINE> <DEDENT> super().__init__(host=ho... | gRPC backend transport for Identity.
A simple identity service.
This class defines the same methods as the primary client, so the
primary client can load the underlying transport implementation
and call it.
It sends protocol buffers over the wire using gRPC (which is built on
top of HTTP/2); the ``grpcio`` package m... | 62598efb283ffb24f3cf21e3 |
class BatchNormLayer(Layer): <NEW_LINE> <INDENT> def __init__(self, n_in, n_out, noise=None, gamma_init=0.1, beta_init=1e-6, alpha=0.1, name=None): <NEW_LINE> <INDENT> self.n_in = n_in <NEW_LINE> self.n_out = n_out <NEW_LINE> self.noise = noise <NEW_LINE> self.alpha = alpha <NEW_LINE> self.gamma_init = gamma_init <NEW_... | Basic batch normalization layer. | 62598efb21bff66bcd72158f |
class ResourceSet(object, IDisposable, IEnumerable): <NEW_LINE> <INDENT> def Close(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetDefaultReader(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetDefaultWriter(self): <NEW_LINE> <INDENT> ... | Stores all the resources localized for one particular culture, ignoring all other cultures, including any fallback rules.
ResourceSet(fileName: str)
ResourceSet(stream: Stream)
ResourceSet(reader: IResourceReader) | 62598efb3d592f4c4edb9827 |
class LauncheRpcServiceBase(LauncheServiceBase): <NEW_LINE> <INDENT> def __init__(self, manager, user='root', gourp='root', **kwargs): <NEW_LINE> <INDENT> plugin_threadpool = kwargs.pop('plugin_threadpool', None) <NEW_LINE> if isinstance(manager, basestring): <NEW_LINE> <INDENT> self.manager = importutils.import_class(... | Service object for binaries running on hosts.
A service takes a manager and enables rpc by listening to queues based
on topic. It also periodically runs tasks on the manager. | 62598efbff9c53063f518f9b |
class InlineResponse20010(object): <NEW_LINE> <INDENT> swagger_types = { 'meta': 'Meta' } <NEW_LINE> attribute_map = { 'meta': 'meta' } <NEW_LINE> def __init__(self, meta=None): <NEW_LINE> <INDENT> self._meta = None <NEW_LINE> if meta is not None: <NEW_LINE> <INDENT> self.meta = meta <NEW_LINE> <DEDENT> <DEDENT> @prope... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598efb167d2b6e312b58d5 |
class Ascad(gdl.GDL): <NEW_LINE> <INDENT> def __load_from_file(self, ascad_file): <NEW_LINE> <INDENT> gdl.check_file_exists(ascad_file) <NEW_LINE> try: <NEW_LINE> <INDENT> self.__raw_data = h5py.File(ascad_file, "r") <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> print("Error: can't open HDF5 file '%s' for reading (it... | TODO: add description | 62598efb7b180e01f3e484e3 |
class ImageFrameDataset(torch.utils.data.Dataset): <NEW_LINE> <INDENT> def __init__( self, source_dataset, image_element_idx, transforms=[], target_crop_width=None): <NEW_LINE> <INDENT> super(ImageFrameDataset, self).__init__() <NEW_LINE> self.source_dataset = source_dataset <NEW_LINE> self.image_element_idx = image_el... | Dataset for data files with images (byte per channel).
Optionally takes a centered crop to target width.
Makes sure the raw data is in uint8 format (i.e byte per channel).
Converts to float32 to feed to tensors and normalizes to [0, 1]. | 62598efbfff4ab517ebcc10b |
class WorkflowList(list, base.CrudListMixin): <NEW_LINE> <INDENT> pass | List of Workflows. | 62598efbadb09d7d5dc08ef0 |
class InstrumentStatusField(Base): <NEW_LINE> <INDENT> _fields_ = [ ('ExchangeID', ctypes.c_char * 9), ('ExchangeInstID', ctypes.c_char * 31), ('SettlementGroupID', ctypes.c_char * 9), ('InstrumentID', ctypes.c_char * 31), ('InstrumentStatus', ctypes.c_char), ('TradingSegmentSN', ctypes.c_int), ('EnterTime', ctypes.c_c... | 合约状态 | 62598efb91f36d47f2230340 |
class Place: <NEW_LINE> <INDENT> def __init__(self, name, exit=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.exit = exit <NEW_LINE> self.bees = [] <NEW_LINE> self.ant = None <NEW_LINE> self.entrance = None <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_LINE> if self.exit != None: <NEW_LINE> <INDENT> self.exit.e... | A Place holds insects and has an exit to another Place. | 62598efb8a349b6b43684b7c |
class BaseModel(models.Model): <NEW_LINE> <INDENT> created_at = models.DateTimeField(auto_now_add=True, blank=True, null=True) <NEW_LINE> updated_at = models.DateTimeField(auto_now_add=True, blank=True, null=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True | Parent model | 62598efb50812a4eaa620087 |
class CPIData: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.year_cpi = {} <NEW_LINE> self.last_year = None <NEW_LINE> self.first_year = None <NEW_LINE> <DEDENT> def load_from_url(self, url, save_as_file=None): <NEW_LINE> <INDENT> fp = requests.get(url, stream=True, headers={'Accept-Encoding': None})... | Abstraction of the CPI data provided by FRED.
This stores internally only one value per year. | 62598efbcc40096d61619676 |
class RegistroC860(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'C860'), Campo(2, 'COD_MOD', obrigatorio=True), CampoNumerico(3, 'NR_SAT', obrigatorio=True), CampoData(4, 'DT_DOC'), Campo(5, 'DOC_INI'), Campo(6, 'DOC_FIM'), ] <NEW_LINE> nivel = 3 | Identificação do Equipamento SAT-CF-e | 62598efb283ffb24f3cf21e5 |
class parsing: <NEW_LINE> <INDENT> def __init__(self, cmds): <NEW_LINE> <INDENT> self.cmds = cmds <NEW_LINE> <DEDENT> def __call__(self, fun): <NEW_LINE> <INDENT> @functools.wraps(fun) <NEW_LINE> def wrapper(*args, **kwargs): <NEW_LINE> <INDENT> with CmdlineParser.global_instance(self.cmds, allow_override=True): <NEW_L... | Convenient decorator for test cases to set the parsing environment. | 62598efb3d592f4c4edb9828 |
class Command(BaseCommand): <NEW_LINE> <INDENT> help = 'To import user details' <NEW_LINE> def add_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument('--file_path', type=str) <NEW_LINE> <DEDENT> def handle(self, *args, **options): <NEW_LINE> <INDENT> export_file = "user_data.csv" <NEW_LINE> if export_file... | management command for importing user data from csv file | 62598efbbe7bc26dc9251301 |
class Algorithm: <NEW_LINE> <INDENT> def __init__(self, str1, str2): <NEW_LINE> <INDENT> self._str1 = str1 <NEW_LINE> self._str2 = str2 <NEW_LINE> self._len1 = len(self._str1) <NEW_LINE> self._len2 = len(self._str2) <NEW_LINE> self._distance_table = [ [0 for _ in range(self._len1 + 1)] for _ in range(self._len2 + 1) ] ... | Edit Distance Algorithm Class. | 62598efb9f2886367281712e |
class DemoNumber(NumberEntity): <NEW_LINE> <INDENT> _attr_should_poll = False <NEW_LINE> def __init__( self, unique_id: str, name: str, state: float, icon: str, assumed: bool, min_value: float | None = None, max_value: float | None = None, step: float | None = None, mode: NumberMode = NumberMode.AUTO, ) -> None: <NEW_L... | Representation of a demo Number entity. | 62598efbf9cc0f698b1c476c |
class get_last_log_entry_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'filename', None, None, ), ) <NEW_LINE> def __init__(self, filename=None,): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinary... | Attributes:
- filename | 62598efb3346ee7daa336b04 |
class Event: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.handlers = set() <NEW_LINE> <DEDENT> def handle(self, handler): <NEW_LINE> <INDENT> self.handlers.add(handler) <NEW_LINE> return self <NEW_LINE> <DEDENT> def unhandle(self, handler): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.handlers.... | An Event controller class. | 62598efb5166f23b2e241d18 |
class RY(Orbital): <NEW_LINE> <INDENT> pass | Rydberg Orbital | 62598efb92d797404e388018 |
class LikeComment(UpdateAPIView): <NEW_LINE> <INDENT> def update(self, request, comment_pk): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> comment = Comment.objects.get(id=comment_pk) <NEW_LINE> <DEDENT> except Comment.DoesNotExist: <NEW_LINE> <INDENT> raise CommentNotFound <NEW_LINE> <DEDENT> user = request.user <NEW_L... | Class for liking and un-liking an article | 62598efb099cdd3c63674874 |
class EntryAdmin(TranslatableAdmin): <NEW_LINE> <INDENT> date_hierarchy = 'pub_date' <NEW_LINE> list_display = ('__unicode__', 'slug', 'category', 'is_published', 'pub_date') <NEW_LINE> list_filter = ('is_published', 'category') <NEW_LINE> search_fields = ['title', 'excerpt', 'content'] <NEW_LINE> form = EntryForm <NEW... | Admin for entry | 62598efb656771135c487fc5 |
class RasterFormatENVIFilter(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{2B1ED0A2-F201-4419-9D9D-5C4DCAD84F97}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{ADC7DE29-DC0B-448E-BBF6-27E4E34CF2EC}', 10, 2) | The format filter for ENVI. | 62598efb99fddb7c1ca622a0 |
class UNetDownBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_size, out_size, padding, batch_norm): <NEW_LINE> <INDENT> super(UNetDownBlock, self).__init__() <NEW_LINE> block = [] <NEW_LINE> block.append(nn.Conv2d(in_size, out_size, kernel_size = 3, padding = int(padding))) <NEW_LINE> block.append(nn.ReLU()... | As the UNet contracts, it does so with a bunch of these blocks effectively. | 62598efb4a966d76dd5ed810 |
class ComponentList(Component): <NEW_LINE> <INDENT> dependency_list = ListSetting() <NEW_LINE> def __init__(self, components): <NEW_LINE> <INDENT> self._components = components <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> return self._components[index] <NEW_LINE> <DEDENT> def __len__(self): <NE... | A list of components, used to implement dependency lists.
This generally will not be instantiated by a user; instead,
when a dependency is set to a list in the configuration,
this is an adaptor to set that dependency to a list-like object
with the ordered dependencies. | 62598efb3617ad0b5ee04a66 |
class MovementSystem(esper.Processor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def process(self): <NEW_LINE> <INDENT> for intent in self.world.msg_bus.get_by_type(MessageType.INTENT): <NEW_LINE> <INDENT> if intent.intent == Intent.MOVE_LEFT: <NEW_LINE> <INDENT>... | Responsible for moving entities. | 62598efbbe383301e025211d |
class Response(object): <NEW_LINE> <INDENT> def __init__(self, response, **kwargs): <NEW_LINE> <INDENT> self.logger = logging.getLogger('pt-base-response') <NEW_LINE> self.logger.setLevel('INFO') <NEW_LINE> shandler = logging.StreamHandler(sys.stdout) <NEW_LINE> fmtr = logging.Formatter('\033[1;32m%(levelname)-5s %(mod... | Base client that all response clients will inherit from. | 62598efb56ac1b37e6300b29 |
class SessionContext(InstanceContext): <NEW_LINE> <INDENT> def __init__(self, version, service_sid, sid): <NEW_LINE> <INDENT> super(SessionContext, self).__init__(version) <NEW_LINE> self._solution = {'service_sid': service_sid, 'sid': sid, } <NEW_LINE> self._uri = '/Services/{service_sid}/Sessions/{sid}'.format(**self... | PLEASE NOTE that this class contains beta products that are subject to
change. Use them with caution. | 62598efb3346ee7daa336b05 |
class BCNode(): <NEW_LINE> <INDENT> bin_name = "bitcoind" <NEW_LINE> short_name = "bc" <NEW_LINE> min_version = 140000 <NEW_LINE> index = 0 <NEW_LINE> def __init__(self, tmd_dir): <NEW_LINE> <INDENT> self.index = self.__class__.index <NEW_LINE> self.__class__.index += 1 <NEW_LINE> self.data_dir = tmd_dir + "/%snode%d" ... | A class representing a bitcoind node | 62598efb627d3e7fe0e057cb |
class TempDirectory(object): <NEW_LINE> <INDENT> def __init__( self, path=None, delete=None, kind="temp", globally_managed=False, ): <NEW_LINE> <INDENT> super(TempDirectory, self).__init__() <NEW_LINE> if path is not None and delete is None: <NEW_LINE> <INDENT> delete = False <NEW_LINE> <DEDENT> if path is None: <NEW_L... | Helper class that owns and cleans up a temporary directory.
This class can be used as a context manager or as an OO representation of a
temporary directory.
Attributes:
path
Location to the created temporary directory
delete
Whether the directory should be deleted when exiting
(when us... | 62598efb97e22403b383982e |
class ImageDataDisk(Model): <NEW_LINE> <INDENT> _validation = { 'lun': {'required': True}, } <NEW_LINE> _attribute_map = { 'lun': {'key': 'lun', 'type': 'int'}, 'snapshot': {'key': 'snapshot', 'type': 'SubResource'}, 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'}, 'blob_uri': {'key': 'blobUri', 'type': '... | Describes a data disk.
:param lun: The logical unit number.
:type lun: int
:param snapshot: The snapshot.
:type snapshot: :class:`SubResource
<azure.mgmt.compute.compute.v2016_04_30_preview.models.SubResource>`
:param managed_disk: The managedDisk.
:type managed_disk: :class:`SubResource
<azure.mgmt.compute.compute.... | 62598efb71ff763f4b5e609e |
class Config(BotPlugin): <NEW_LINE> <INDENT> def get_configuration_template(self): <NEW_LINE> <INDENT> return {"One": "one"} | Just a plugin with a simple string config. | 62598efb99cbb53fe682f7ed |
class LodgingReservationSchema(SchemaObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.schema = 'LodgingReservation' | Schema Mixin for LodgingReservation
Usage: place after django model in class definition, schema will return the schema.org url for the object
A reservation for lodging at a hotel, motel, inn, etc. | 62598efb67a9b606de54490d |
class cached_property(object): <NEW_LINE> <INDENT> def __init__(self, fget=None, fset=None, fdel=None, doc=None): <NEW_LINE> <INDENT> self.__get = fget <NEW_LINE> self.__set = fset <NEW_LINE> self.__del = fdel <NEW_LINE> self.__doc__ = doc or fget.__doc__ <NEW_LINE> self.__name__ = fget.__name__ <NEW_LINE> self.__modul... | Property descriptor that caches the return value
of the get function.
*Examples*
.. code-block:: python
@cached_property
def connection(self):
return Connection()
@connection.setter # Prepares stored value
def connection(self, value):
if value is None:
raise TypeError("C... | 62598efb4527f215b58e883a |
class TestSmartSsdAtaSctStatus(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 testSmartSsdAtaSctStatus(self): <NEW_LINE> <INDENT> pass | SmartSsdAtaSctStatus unit test stubs | 62598efb4c34283577618c24 |
class InlineResponse2007InboundRules(object): <NEW_LINE> <INDENT> def __init__(self, id=None, rule=None): <NEW_LINE> <INDENT> self.swagger_types = { 'id': 'int', 'rule': 'str' } <NEW_LINE> self.attribute_map = { 'id': 'ID', 'rule': 'Rule' } <NEW_LINE> self._id = None <NEW_LINE> self._rule = None <NEW_LINE> if id is not... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598efb283ffb24f3cf21e8 |
@_add_metaclass(SmileiComponentType) <NEW_LINE> class SmileiComponent(object): <NEW_LINE> <INDENT> def _fillObjectAndAddToList(self, cls, obj, **kwargs): <NEW_LINE> <INDENT> if kwargs is not None: <NEW_LINE> <INDENT> deprecated = { "output_format":"See documentation for radiation reaction", "clrw":"See https://smileipi... | Smilei component generic class | 62598efb5fdd1c0f98e5c8e2 |
class Directive: <NEW_LINE> <INDENT> def __init__(self, type, spec_dict): <NEW_LINE> <INDENT> self.type = type.lower() <NEW_LINE> self.spec = spec_dict <NEW_LINE> self.comment = '' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Directive object: ' + self.type | Holds all initial data for one user-given directive (e.g., one cell in Excel spreadsheet).
:param type: type of directive, from approved list, e.g., 'CHILL' or 'fov' [string, case-insens.]
:param spec: dictionary of specification data to hold, depends on directive type [directory_path]. | 62598efb956e5f7376df4b19 |
class MetaData(Base.Node): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> tagName = "meta" <NEW_LINE> displayable = False <NEW_LINE> properties = Base.Node.properties.copy() <NEW_LINE> properties['value'] = {'action':'setValue'} <NEW_LINE> properties['name'] = {'action':'setName'} <NEW_LINE> properties['http-equiv'] = {... | A webelement implementation of the meta tag | 62598efb32920d7e50bc4967 |
class Login(LowDataAdapter): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Login, self).__init__(*args, **kwargs) <NEW_LINE> self.auth = salt.auth.Resolver(self.opts) <NEW_LINE> <DEDENT> def GET(self): <NEW_LINE> <INDENT> cherrypy.response.headers['WWW-Authenticate'] = 'Session' <NE... | All interactions with this REST API must be authenticated. Authentication
is performed through Salt's eauth system. You must set the eauth backend
and allowed users by editing the :conf_master:`external_auth` section in
your master config.
Authentication credentials are passed to the REST API via a session id in
one o... | 62598efb99fddb7c1ca622a1 |
class Cart(db.Document): <NEW_LINE> <INDENT> meta = {'collection': 'carts'} <NEW_LINE> user_id = StringField(default='') <NEW_LINE> user_email = StringField(default='') <NEW_LINE> qty = IntField(default=0) <NEW_LINE> subtotal = IntField(default=0) <NEW_LINE> total = IntField(default=0) <NEW_LINE> shipping_total = IntFi... | Users are Buyers or merchants | 62598efb442bda511e95ad9f |
class NoteTestCase(TestBase): <NEW_LINE> <INDENT> def test_note_creation_basic(self): <NEW_LINE> <INDENT> title = u"Fat people" <NEW_LINE> description = u"bla bla bla" <NEW_LINE> tracker = self.folder.tracker <NEW_LINE> request = self.app.REQUEST <NEW_LINE> request.set('title', title) <NEW_LINE> request.set('fromname',... | Test adding, finding rendering notes | 62598efb9f28863672817132 |
class NumberParam(Parameter): <NEW_LINE> <INDENT> equatable = True <NEW_LINE> def __init__(self, name, default=Unconfigurable, low=None, high=None, low_open=False, high_open=False, optional=False, readonly=None): <NEW_LINE> <INDENT> self.low = low <NEW_LINE> self.high = high <NEW_LINE> self.low_open = low_open <NEW_LIN... | A parameter where the value is a number. | 62598efb55399d3f05624e65 |
class TemplateLoader: <NEW_LINE> <INDENT> TEMPLATES = {} <NEW_LINE> @classmethod <NEW_LINE> def store(cls, context, name, template): <NEW_LINE> <INDENT> if context not in cls.TEMPLATES: <NEW_LINE> <INDENT> cls.TEMPLATES[context] = {} <NEW_LINE> <DEDENT> cls.TEMPLATES[context][name] = template <NEW_LINE> <DEDENT> @class... | The :class:`TemplateLoader` class takes care of storing and retrieving
templates defined/requested by the user or other plugins. | 62598efb2ae34c7f260a9a21 |
class GetLeaderboardHandler(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self, game): <NEW_LINE> <INDENT> leaderboard = get_top_ten_leaderboard(game) <NEW_LINE> if (leaderboard is None or len(leaderboard) == 0): <NEW_LINE> <INDENT> self.error(404) <NEW_LINE> self.response.write("There is no leaderboard associat... | Handler class for returning a leaderboard | 62598efb7047854f4633dd06 |
@dataclass <NEW_LINE> class CpefactRefType(FactRefType): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> name = "CPEFactRefType" <NEW_LINE> <DEDENT> name: Optional[str] = field( default=None, metadata={ "type": "Attribute", "required": True, "pattern": r"[c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\._\-~%]*){0,6}", } ) | A reference to a CPE Name that always evaluates to a Boolean result. | 62598efb627d3e7fe0e057cd |
class RequestError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if not isinstance(self.value, dict): <NEW_LINE> <INDENT> return (u"%s" % (self.value, )).encode(CP) <NEW_LINE> <DEDENT> s = [] <NEW_LINE> for k,... | raise this exception when request to casebook.ru failed
| 62598efb7cff6e4e811b4322 |
class Product(PolymorphicModel): <NEW_LINE> <INDENT> name = models.TextField(max_length=30) <NEW_LINE> description = models.TextField(max_length=30) <NEW_LINE> category = models.TextField(max_length=30) <NEW_LINE> current_price = models.DecimalField(max_digits=10, decimal_places=2) <NEW_LINE> legal_entity = models.Fore... | 62598efb44b2445a339b5e0e | |
class Main(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.app = Ursina() <NEW_LINE> self.app.run() | The Main Class that instantiates the other classes and starts the ursina main window. | 62598efb4527f215b58e883c |
class NamespaceId: <NEW_LINE> <INDENT> id: Optional[int] <NEW_LINE> ns: str <NEW_LINE> ord_ns: int <NEW_LINE> def __init__(self, ex: "Example", id: Union[int, str]): <NEW_LINE> <INDENT> if isinstance(id, int): <NEW_LINE> <INDENT> if id < 0 or id >= ex.num_namespaces(): <NEW_LINE> <INDENT> raise Exception("namespace " +... | The NamespaceId class is simply a wrapper to convert between
hash spaces referred to by character (eg 'x') versus their index
in a particular example. Mostly used internally, you shouldn't
really need to touch this. | 62598efb379a373c97d97939 |
class UIViewObject(UIBaseObject): <NEW_LINE> <INDENT> tid = None <NEW_LINE> _READ_ONLY = ['_controller_uid'] <NEW_LINE> def __init__(self, controller_uid): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._controller_uid = controller_uid <NEW_LINE> UIM_class = self.get_manager_class() <NEW_LINE> UIM = UIM_class()... | The base class for all View classes (MVC software architectural pattern).
| 62598efb4c34283577618c26 |
class Hardware_host_attribute(extensions.ExtensionDescriptor): <NEW_LINE> <INDENT> name = "HardwareHostAttribute" <NEW_LINE> alias = "os-vol-host-attr" <NEW_LINE> namespace = ("http://docs.openstack.org/storage/ext/" "storage_host_attribute/api/v1") <NEW_LINE> updated = "2011-11-03T00:00:00+00:00" <NEW_LINE> def get_co... | Expose host as an attribute of a storage. | 62598efbcc0a2c1114479941 |
class ProducesSomaInputR(sciunit.Capability): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def produce_soma_inputR(self): <NEW_LINE> <INDENT> raise NotImplementedError("Must implement produce_soma_inputR") <NEW_LINE> <DEDENT> def produce_voltage_response(self): <NEW_LINE> <INDENT... | capacity (of getting soma input resistance) to fulfill the capability. | 62598efb656771135c487fc9 |
class TestWriteDT(object): <NEW_LINE> <INDENT> def test_format_dt(self): <NEW_LINE> <INDENT> elem = DataElement(0x00181078, 'DT', DT('20010203123456.123456')) <NEW_LINE> assert hasattr(elem.value, 'original_string') <NEW_LINE> assert _format_DT(elem.value) == '20010203123456.123456' <NEW_LINE> del elem.value.original_s... | Test filewriter.write_DT | 62598efb7d847024c075ad09 |
class AddDocumentWatcherFeatureFlag(UpgradeStep): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> pass | Add document watcher feature flag.
| 62598efb10dbd63aa1c6f4bd |
class CloudpickleSerializer(SerializerBase): <NEW_LINE> <INDENT> serializer_id = 7 <NEW_LINE> def dumpsCall(self, obj, method, vargs, kwargs): <NEW_LINE> <INDENT> return cloudpickle.dumps((obj, method, vargs, kwargs), config.PICKLE_PROTOCOL_VERSION) <NEW_LINE> <DEDENT> def dumps(self, data): <NEW_LINE> <INDENT> return ... | A (de)serializer that wraps the Cloudpickle serialization protocol.
It can optionally compress the serialized data, and is thread safe. | 62598efb8a349b6b43684b82 |
class FlatmapViewer(ExposureFileViewBase): <NEW_LINE> <INDENT> index = ViewPageTemplateFile('flatmap_viewer.pt') | The flatmap viewer. | 62598efbec188e330fdf71ec |
class ISong(form.Schema, IImageScaleTraversable): <NEW_LINE> <INDENT> audio_file = NamedBlobFile( title=_(u'Audio'), description=_('Upload the MP3 or AAC audio file here'), required=True, ) <NEW_LINE> score_file = NamedBlobFile( title=_(u'Score (PDF)'), description=_(u'Upload score PDF of the song here'), required=True... | Manage Song | 62598efb3d592f4c4edb982e |
class SetQueue(Queue): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(SetQueue, self).__init__(*args, **kwargs) <NEW_LINE> self.set = Set(key="%s-set" % self.key) <NEW_LINE> <DEDENT> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> item = super(SetQueue, self).get(*args, **kwargs)... | Redis list + Redis set <-> Queue with only unique items. | 62598efb21bff66bcd721597 |
class V1ConfigMapVolumeSource(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'name': 'str', 'items': 'list[V1KeyToPath]' } <NEW_LINE> self.attribute_map = { 'name': 'name', 'items': 'items' } <NEW_LINE> self._name = None <NEW_LINE> self._items = None <NEW_LINE> <DEDENT> @pro... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598efb55399d3f05624e67 |
class IniReader(abc.Reader): <NEW_LINE> <INDENT> def read(self, stream): <NEW_LINE> <INDENT> if stream is None: <NEW_LINE> <INDENT> raise ValueError('stream cannot be None') <NEW_LINE> <DEDENT> parser = ConfigParser() <NEW_LINE> if PY2: <NEW_LINE> <INDENT> parser.readfp(stream) <NEW_LINE> <DEDENT> else: <NEW_LINE> <IND... | A reader for ini content.
Example usage:
.. code-block:: python
from central.readers import IniReader
reader = IniReader()
with open('config.ini') as f:
data = reader.read(f) | 62598efb44b2445a339b5e0f |
class GameStats(): <NEW_LINE> <INDENT> def __init__(self, settings): <NEW_LINE> <INDENT> self.settings = settings <NEW_LINE> self.target_score = settings.score_target <NEW_LINE> self.reset_stats() <NEW_LINE> self.game_active = False <NEW_LINE> <DEDENT> def reset_stats(self): <NEW_LINE> <INDENT> self.player_score = 0 <N... | Tracks the game stats | 62598efb92d797404e38801b |
class TriblerConfigSections(BaseSettings): <NEW_LINE> <INDENT> class Config: <NEW_LINE> <INDENT> extra = Extra.ignore <NEW_LINE> <DEDENT> general: GeneralSettings = GeneralSettings() <NEW_LINE> tunnel_community: TunnelCommunitySettings = TunnelCommunitySettings() <NEW_LINE> bandwidth_accounting: BandwidthAccountingSett... | Base Tribler config class that contains section listing.
| 62598efbcc0a2c1114479943 |
class DescribeDBZoneConfigResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.Items = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.get("TotalCount") <NEW_LINE... | DescribeDBZoneConfig返回参数结构体
| 62598efb4f6381625f19895d |
class PmwDirDialog(PmwFileDialog): <NEW_LINE> <INDENT> def __init__(self, parent = None, **kw): <NEW_LINE> <INDENT> optiondefs = ( ('directory', os.getcwd(), self.newdir), ('historylen',10, None), ('command', None, None), ('info', None, None), ) <NEW_LINE> self.defineop... | Directory Dialog using Pmw | 62598efb3d592f4c4edb9831 |
class OrderableListMixin(object): <NEW_LINE> <INDENT> orderable_columns = None <NEW_LINE> orderable_columns_default = None <NEW_LINE> order_by = None <NEW_LINE> ordering = None <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(OrderableListMixin, self).get_context_data(**kwargs) <NEW_... | Mixin allows your users to order records using GET parameters | 62598efb55399d3f05624e69 |
class SQLSolver (Solver): <NEW_LINE> <INDENT> def __init__ (self, dbname): <NEW_LINE> <INDENT> self.dbname = dbname <NEW_LINE> <DEDENT> def solve (self, tripcode): <NEW_LINE> <INDENT> db_conn = sqlite3.connect(self.dbname) <NEW_LINE> db_conn.text_factory = str <NEW_LINE> db_cursor = db_conn.cursor() <NEW_LINE> db_curso... | Solver that uses an SQL database for solutions.
The SQL database must have a table named 'solutions' in which there are
two columns named 'tripcode' and 'solution', where 'tripcode' is the
tripcode generated by 'solution'. | 62598efb56ac1b37e6300b2f |
class subi(CALExt): <NEW_LINE> <INDENT> def block(self, d, a, value): <NEW_LINE> <INDENT> code = self.get_active_code() <NEW_LINE> temp = code.prgm.acquire_register((value, value, value, value)) <NEW_LINE> code.add(cal.sub(d, a, temp)) <NEW_LINE> code.prgm.release_register(temp) <NEW_LINE> return | Floating point add immediate | 62598efb67a9b606de544912 |
class Solution: <NEW_LINE> <INDENT> @timeit <NEW_LINE> def minPartitions(self, n: str) -> int: <NEW_LINE> <INDENT> return max([int(e) for e in n]) | [5626. 十-二进制数的最少数目]() | 62598efbf548e778e5969ec9 |
class GistPDF(TransformGist): <NEW_LINE> <INDENT> mimetype = 'application/pdf' <NEW_LINE> extension = "pdf" <NEW_LINE> template_name = "transformer/pdf.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> _c = super(GistPDF, self).get_context_data(**kwargs) <NEW_LINE> _c["project_path"] = settings... | Just changes the response from standard HTML to PDF | 62598efba8370b77170eed27 |
class Shrd(X86InstructionBase): <NEW_LINE> <INDENT> def __init__(self, prefix, mnemonic, operands, architecture_mode): <NEW_LINE> <INDENT> super(Shrd, self).__init__(prefix, mnemonic, operands, architecture_mode) <NEW_LINE> <DEDENT> @property <NEW_LINE> def source_operands(self): <NEW_LINE> <INDENT> return [ ] <NEW_LIN... | Representation of Shrd x86 instruction. | 62598efbaad79263cf42d152 |
class GameState(IntEnum): <NEW_LINE> <INDENT> MENU = 1 <NEW_LINE> END = 2 <NEW_LINE> GAME = 4 <NEW_LINE> INIT = 8 <NEW_LINE> LOST_GAME = 16 <NEW_LINE> WON_GAME = 32 <NEW_LINE> LOST_LIFE = 64 <NEW_LINE> NEW_HIGHSCORE = 128 <NEW_LINE> SHOW_HIGHSCORES = 256 <NEW_LINE> PAUSED = 512 | Enum representing game state. | 62598efb4c34283577618c2a |
class Method(RESTfulHandler): <NEW_LINE> <INDENT> def handle(self, **m): <NEW_LINE> <INDENT> http_method = self.request.method.lower() <NEW_LINE> rest_method = m.get('method','default') <NEW_LINE> if http_method == "post": <NEW_LINE> <INDENT> rest_method = "post" <NEW_LINE> <DEDENT> content_id = m['content_id'] <NEW_LI... | call a method
| 62598efb379a373c97d9793d |
class PAC3100(PAC): <NEW_LINE> <INDENT> def __init__(self, port, baudrate=4800, unit=1, parity='N', stopbits=1): <NEW_LINE> <INDENT> import serial <NEW_LINE> import modbus_tk.modbus_rtu as modbus_rtu <NEW_LINE> self._unit = unit <NEW_LINE> self._master = modbus_rtu.RtuMaster( serial.Serial(port=port, baudrate=baudrate,... | Class for connecting to PAC3100 through Modbus RTU.
Note: Untested. | 62598efb656771135c487fcd |
class Teacher(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, on_delete=models.SET_NULL, blank=True, null=True) <NEW_LINE> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self.user.get_full_name() if self.user else 'anonymous' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDEN... | Teacher can create classrooms and see progress of the students.
| 62598efb3317a56b869bda06 |
@route('/(?P<city>\w*)/borough/detail/getBoroughData') <NEW_LINE> class BoroughDataDetailHandle(BaseController): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> self.service = BoroughOnlineService() <NEW_LINE> <DEDENT> @catch() <NEW_LINE> def post(self, *args, **kwargs): <NEW_LINE> <INDENT> city = kwargs.... | @:param city:城市 {bj}
@:param id:小区id {id:1004567}
获取小区当前均价 | 62598efb5fdd1c0f98e5c8e8 |
class Error(Exception): <NEW_LINE> <INDENT> pass | Base class for all exceptions of Sparrow | 62598efbfff4ab517ebcc116 |
class PutBucketCORSInputSet(InputSet): <NEW_LINE> <INDENT> def set_CORSConfiguration(self, value): <NEW_LINE> <INDENT> super(PutBucketCORSInputSet, self)._set_input('CORSConfiguration', value) <NEW_LINE> <DEDENT> def set_AWSAccessKeyId(self, value): <NEW_LINE> <INDENT> super(PutBucketCORSInputSet, self)._set_input('AWS... | An InputSet with methods appropriate for specifying the inputs to the PutBucketCORS
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598efba219f33f346c5171 |
class BotConfig(object): <NEW_LINE> <INDENT> __slots__ = 'command_prefix', 'token', 'search', 'presence', 'db_url', 'posting_limit', 'last_searched', 'when_started' <NEW_LINE> def __init__(self, *, token, db_url, search, command_prefix='#', presence=['hard to get'], posting_limit=3): <NEW_LINE> <INDENT> self.token = to... | Contains all import and running configuration used for the bot | 62598efb57b8e32f525075a4 |
class InvalidTransferEncoding(BadRequest): <NEW_LINE> <INDENT> pass | An invalid transfer encoding was supplied | 62598efb4a966d76dd5ed817 |
class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__... | Response for ListFrontendIPConfiguration API service call.
Variables are only populated by the server, and will be ignored when sending a request.
:param value: A list of frontend IP configurations in a load balancer.
:type value: list[~azure.mgmt.network.v2020_04_01.models.FrontendIPConfiguration]
:ivar next_link: T... | 62598efb76e4537e8c3edefe |
class EnumEditorDemo ( HasFacets ): <NEW_LINE> <INDENT> name_list = Enum( 'A-495', 'A-498', 'R-1226', 'TS-17', 'TS-18' ) <NEW_LINE> enum_group = Group( Item( 'name_list', style = 'simple', label = 'Simple' ), Item( '_' ), Item( 'name_list', style = 'custom', label = 'Custom' ), Item( '_' ), Item( 'name_list', style... | Defines the main EnumEditor demo class. | 62598efbec188e330fdf71f0 |
class SourceLevels(Enum,IComparable,IFormattable,IConvertible): <NEW_LINE> <INDENT> def __eq__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __format__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __ge__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __gt__(self,*args): <... | Specifies the levels of trace messages filtered by the source switch and event type filter.
enum (flags) SourceLevels,values: ActivityTracing (65280),All (-1),Critical (1),Error (3),Information (15),Off (0),Verbose (31),Warning (7) | 62598efb3617ad0b5ee04a6e |
class TestV1ISCSIVolumeSource(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 testV1ISCSIVolumeSource(self): <NEW_LINE> <INDENT> model = kubernetes.client.models.v1_iscsi_volume_source.V1ISCSIVolum... | V1ISCSIVolumeSource unit test stubs | 62598efb2c8b7c6e89bd2107 |
class Route(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, ... | Route resource.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:param name: The name of the resource that is unique within a resource group. This name can be
used to access the resource.
:type name: str
:ivar etag: A unique read-only stri... | 62598efb5fc7496912d47714 |
class YAMLRendererTests(TestCase): <NEW_LINE> <INDENT> def test_render(self): <NEW_LINE> <INDENT> obj = {'foo': ['bar', 'baz']} <NEW_LINE> renderer = YAMLRenderer() <NEW_LINE> content = renderer.render(obj, 'application/yaml') <NEW_LINE> self.assertEqual(content, _yaml_repr) <NEW_LINE> <DEDENT> def test_render_and_pars... | Tests specific to the JSON Renderer | 62598efb0fa83653e46f3826 |
class InputFeatures(object): <NEW_LINE> <INDENT> def __init__(self, unique_id, example_index, doc_span_index, tokens, token_to_orig_map, token_is_max_context, input_ids, input_mask, segment_ids, start_position=None, end_position=None, is_impossible=None): <NEW_LINE> <INDENT> self.unique_id = unique_id <NEW_LINE> self.e... | A single set of features of NERdata. | 62598efb4f88993c371ef98d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.