code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ListVirtualHubBgpConnectionResults(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[BgpConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["BgpConnection"]] = None, next_link: Optional[str] ... | VirtualHubBgpConnections list.
:param value: The list of VirtualHubBgpConnections.
:type value: list[~azure.mgmt.network.v2020_05_01.models.BgpConnection]
:param next_link: URL to get the next set of results.
:type next_link: str | 62598f11bf627c535bcb0080 |
class CanvasFrame(tk.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, datacontroller, *args, **kwargs): <NEW_LINE> <INDENT> tk.Frame.__init__(self, parent, *args, **kwargs) <NEW_LINE> self.parent = parent <NEW_LINE> """ DATA """ <NEW_LINE> self.width = 1070 <NEW_LINE> self.height = 650 <NEW_LINE> """ GUI """ <NEW... | The CanvasFrame Module handles the UI for the canvas and passes
events and data between the MainApplication and the Canvas | 62598f114527f215b58e8b02 |
class BadTermName(ACLError): <NEW_LINE> <INDENT> pass | Raised when an invalid name is assigned to a `~acl.parser.Term`
object | 62598f119f28863672817402 |
class AzureRawUploadJob(MashJob): <NEW_LINE> <INDENT> def post_init(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.container = self.job_config['container'] <NEW_LINE> self.storage_account = self.job_config['storage_account'] <NEW_LINE> self.account = self.job_config.get('account') <NEW_LINE> self.region = sel... | Implements raw image upload to Azure.
The image tarball is not expanded during upload. | 62598f11956e5f7376df4c81 |
class Player(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "" <NEW_LINE> self.link = "" | Doc string for player | 62598f11adb09d7d5dc091b2 |
class AnnouncementList(ListOfDatabaseEntries): <NEW_LINE> <INDENT> def __init__(self, contest_id): <NEW_LINE> <INDENT> super(AnnouncementList, self).__init__(contest_id) <NEW_LINE> self.announcements = set() <NEW_LINE> <DEDENT> def poll(self): <NEW_LINE> <INDENT> r = [] <NEW_LINE> for a in self._get_announcements(): <N... | Keeps track of all announcements
| 62598f11656771135c488295 |
class FileSystem(IntEnum): <NEW_LINE> <INDENT> LOCAL = 0 <NEW_LINE> HDFS = 1 | File Systems supported for storing metrics and temporary results. | 62598f1150812a4eaa6201f1 |
class QtMimeData(MimeData): <NEW_LINE> <INDENT> _q_data = Typed(QMimeData) <NEW_LINE> def __init__(self, data=None): <NEW_LINE> <INDENT> self._q_data = data or QMimeData() <NEW_LINE> <DEDENT> def q_data(self): <NEW_LINE> <INDENT> return self._q_data <NEW_LINE> <DEDENT> def formats(self): <NEW_LINE> <INDENT> return self... | A Qt implementation of an Enaml MimeData object.
| 62598f110fa83653e46f3af0 |
class WebUIDataProvider: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._redisdb = Redis() <NEW_LINE> self._mongodb = MongoDB() <NEW_LINE> <DEDENT> @property <NEW_LINE> def databse_info(self): <NEW_LINE> <INDENT> result = [] <NEW_LINE> database_names = self._redisdb.get('database_name') <NEW_LINE> dat... | 提供网站UI所需的数据,数据一般储存在Redis数据库
:return: 无返回值 | 62598f11cc40096d616197df |
class DeletePostInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> super(DeletePostInputSet, self)._set_input('AccessToken', value) <NEW_LINE> <DEDENT> def set_ActionID(self, value): <NEW_LINE> <INDENT> super(DeletePostInputSet, self)._set_input('ActionID', value) | An InputSet with methods appropriate for specifying the inputs to the DeletePost
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598f11d8ef3951e32c7459 |
class WebWindMover(BaseWebObject, WindMover): <NEW_LINE> <INDENT> default_name = 'Wind Mover' <NEW_LINE> state = copy.deepcopy(WindMover._state) <NEW_LINE> state.add(save=['uncertain_angle_scale_units', 'name'], update=['uncertain_angle_scale_units', 'name']) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <... | A subclass of :class:`gnome.movers.WindMover` that provides
webgnome-specific functionality. | 62598f117b180e01f3e4864d |
class ScoreBoard(): <NEW_LINE> <INDENT> Level = 1 <NEW_LINE> Level2 = 1 <NEW_LINE> Display = 0 <NEW_LINE> def __init__(self, win, width, height): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.canvas = CanvasFrame(win, self.width * Block.BLOCK_SIZE, self.height * Block.BLOCK_SIZE... | ScoreBoard class: Scores the game, keeps track of the level
Attributes: width - type:int - width of the board in squares
height - type:int - height of the board in squares
canvas - type:CanvasFrame - where the pieces will be drawn | 62598f11bf627c535bcb0082 |
class phasesym_arr_dimension_tests(unittest.TestCase): <NEW_LINE> <INDENT> imagename = 'data/cameraman.tif' <NEW_LINE> image = Image.open(imagename) <NEW_LINE> img_array = np.asarray(image) <NEW_LINE> def test_phasesym_from_array(self): <NEW_LINE> <INDENT> phase_sym, orientation = phasesym_from_array(self.img_array, DE... | class for sanity check for array sizes from various functions in
pyphasesym | 62598f113346ee7daa336c68 |
class llds(object): <NEW_LINE> <INDENT> def __init__(self, shape): <NEW_LINE> <INDENT> self.__shape = shape <NEW_LINE> self.__inter_prod = list() <NEW_LINE> product = 1 <NEW_LINE> for entry in self.__shape: <NEW_LINE> <INDENT> self.__inter_prod.append(product) <NEW_LINE> product = product * entry <NEW_LINE> <DEDENT> se... | The llds class represents a low-level data store of variable size.
The size of the store is set upon creation and cannot be changed. | 62598f11fbf16365ca792cab |
class PhotoAlbum(BaseModel): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> table_name = 'photo_album' <NEW_LINE> <DEDENT> _attrs_to_compare_ = [ 'title', 'desc', 'cover', 'photos_count', 'last_updated', 'views_count', 'like_count', 'rec_count', ] <NEW_LINE> douban_id = CharField(unique=True, help_text='豆瓣ID') <NE... | 相册 | 62598f11adb09d7d5dc091b4 |
class Page(core.Page): <NEW_LINE> <INDENT> def _query(self, ptable, stable='User'): <NEW_LINE> <INDENT> pt, st = [getattr(orm, i) for i in (ptable, stable)] <NEW_LINE> return pt.select(pt, st.name).join(st).where(pt.page == self._id) <NEW_LINE> <DEDENT> @utils.cached_property <NEW_LINE> def _pdata(self): <NEW_LINE> <IN... | Objeto Page. | 62598f11ad47b63b2c5a6425 |
class LinkedInAPIClient(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = "LinkedIn API Client" <NEW_LINE> <DEDENT> linkedin_app = models.CharField(max_length=64, verbose_name="LinkedIn App") <NEW_LINE> api_call_url = models.URLField(verbose_name="LinkedIn API Auth URL", null=True) <NEW_... | A model for containing required information or LinkedIn OAuth2 cycle.
Docs: https://developer.linkedin.com/docs/oauth2 | 62598f117cff6e4e811b45f6 |
class MarginCosineProduct(nn.Module): <NEW_LINE> <INDENT> def __init__(self,in_features,out_features,s = 30.0, m=0.4): <NEW_LINE> <INDENT> super(MarginCosineProduct,self).__init__() <NEW_LINE> self.in_features = in_features <NEW_LINE> self.out_features = out_features <NEW_LINE> self.s = s <NEW_LINE> self.m = m <NEW_LIN... | Implement of large margin cosine distance
Args:
in_features: size of each input sample
out_features: size of each output sample
s: norm of input feature
m: margin | 62598f11cc40096d616197e0 |
class S3GCMModel(S3ChannelModel): <NEW_LINE> <INDENT> names = ("msg_gcm_channel", ) <NEW_LINE> def model(self): <NEW_LINE> <INDENT> T = current.T <NEW_LINE> set_method = self.set_method <NEW_LINE> tablename = "msg_gcm_channel" <NEW_LINE> self.define_table(tablename, self.super_link("channel_id", "msg_channel"), Field("... | Google Cloud Messaging
Channels
https://developers.google.com/cloud-messaging/ | 62598f119f28863672817405 |
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount = 0.9, iterations = 100): <NEW_LINE> <INDENT> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_LINE> self.iterations = iterations <NEW_LINE> self.values = util.Counter() <NEW_LINE> self.runValueIteration() <NEW_... | * Please read learningAgents.py before reading this.*
A ValueIterationAgent takes a Markov decision process
(see mdp.py) on initialization and runs value iteration
for a given number of iterations using the supplied
discount factor. | 62598f118a349b6b43684e51 |
class RPCCoverage(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.dir = tempfile.mkdtemp(prefix="coverage") <NEW_LINE> self.flag = '--coveragedir=%s' % self.dir <NEW_LINE> <DEDENT> def report_rpc_coverage(self): <NEW_LINE> <INDENT> uncovered = self._get_uncovered_rpc_commands() <NEW_LINE> if u... | Coverage reporting utilities for test_runner.
Coverage calculation works by having each test script subprocess write
coverage files into a particular directory. These files contain the RPC
commands invoked during testing, as well as a complete listing of RPC
commands per `bitcoinbridge-cli help` (`rpc_interface.txt`).... | 62598f1197e22403b3839aef |
class NodeCollection(models.Model): <NEW_LINE> <INDENT> uuid = UUIDField(unique=True, auto=True) <NEW_LINE> identifier = models.TextField(blank=True, null=True) <NEW_LINE> title = models.TextField(blank=True, null=True) <NEW_LINE> description = models.TextField(blank=True, null=True) <NEW_LINE> submission_date = models... | Base class for Investigation and Study
| 62598f11adb09d7d5dc091b6 |
@register <NEW_LINE> class SetVariableRequest(Request): <NEW_LINE> <INDENT> COMMAND = 'setVariable' <NEW_LINE> class ARGUMENTS(FieldsNamespace): <NEW_LINE> <INDENT> FIELDS = [ Field('variablesReference', int), Field('name'), Field('value'), Field.START_OPTIONAL, Field('format', datatypes.ValueFormat), ] | setVariable request.
Set the variable with the given name in the variable container
to a new value. | 62598f11091ae35668703817 |
class AdvancedTestSuite(unittest.TestCase): <NEW_LINE> <INDENT> def test_genFunctions(self): <NEW_LINE> <INDENT> qmworld.genSimpleWavePackage() | Advanced test cases. | 62598f11377c676e912f636d |
class Behavior(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.common = PyCommon.common() <NEW_LINE> self.motion = PyMotion.motion() <NEW_LINE> self.output = Output.BehaviorLog(self) <NEW_LINE> self.hardwareStop = False <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.output.printf(... | class brings all of information together and runs the behaviors | 62598f11be7bc26dc9251468 |
class TestSendMail: <NEW_LINE> <INDENT> @patch('styler_rest_framework.pubsub.publishers.publish_message') <NEW_LINE> def test_send_mail(self, mocked_message): <NEW_LINE> <INDENT> mailer.send_email('some@mail.com', 'Some title', 'a body') <NEW_LINE> mocked_message.assert_called_once() | Tests for send_mail
| 62598f11283ffb24f3cf24b5 |
class SSACompliantMixin(object): <NEW_LINE> <INDENT> pass | Mixin to indicate a pass is SSA form compliant. Nothing is asserted
about this condition at present. | 62598f1160cbc95b06362f40 |
class RequestHandler(): <NEW_LINE> <INDENT> def __init__(self, app, fn): <NEW_LINE> <INDENT> self._app = app <NEW_LINE> self._func = fn <NEW_LINE> <DEDENT> async def __call__(self, request): <NEW_LINE> <INDENT> kw = None <NEW_LINE> r = await self._func(**kw) <NEW_LINE> return r | RequestHandler是一个类,由于定义了__call__()方法,因此可以将其实例视为函数。
RequestHandler目的就是从URL函数中分析其需要接收的参数,从request中获取必要的参数,调用URL函数,然后把结果转换为web.Response对象,这样,就完全符合aiohttp框架的要求: | 62598f119f28863672817407 |
class _SubmissionSubStatus(Model): <NEW_LINE> <INDENT> __tablename__ = 'submissionsubstatus' <NEW_LINE> id = Column(UnicodeText(36), primary_key=True, default=uuid4) <NEW_LINE> tid = Column(Integer, primary_key=True, default=1, nullable=False) <NEW_LINE> submissionstatus_id = Column(UnicodeText(36), nullable=False) <NE... | Contains the substatuses that a submission may be in | 62598f11ab23a570cc2d4374 |
class DeleteRegistryRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(DeleteRegistryRequest, self).__init__( '/regions/{regionId}/registries/{registryName}', 'DELETE', header, version) <NEW_LINE> self.parameters = parameters | 删除指定用户下某个 registry. | 62598f11adb09d7d5dc091b8 |
class AbstractEmailUser(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(_('email address'), max_length=255, unique=True, db_index=True) <NEW_LINE> is_staff = models.BooleanField( _('staff status'), default=False, help_text=_( 'Designates whether the user can log into this admin site.'... | Abstract User with the same behaviour as Django's default User.
AbstractEmailUser does not have username field. Uses email as the
USERNAME_FIELD for authentication.
Use this if you need to extend EmailUser.
Inherits from both the AbstractBaseUser and PermissionMixin.
The following attributes are inherited from the ... | 62598f110fa83653e46f3af6 |
class BaseProcessor(ABC): <NEW_LINE> <INDENT> def __call__(self, observation, action, reward, terminal): <NEW_LINE> <INDENT> return self.preprocess(observation, action, reward, terminal) <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def preprocess(self, observation, action, reward, terminal): <NEW_LINE> <INDENT> raise... | Abstract Processor Class
Note
----
You need to implement the follwoings:
preprocess: preprocess observed data | 62598f11cc40096d616197e2 |
class XcbUtilImage(AutotoolsPackage): <NEW_LINE> <INDENT> homepage = "https://xcb.freedesktop.org/" <NEW_LINE> url = "https://xcb.freedesktop.org/dist/xcb-util-image-0.4.0.tar.gz" <NEW_LINE> version('0.4.0', sha256='cb2c86190cf6216260b7357a57d9100811bb6f78c24576a3a5bfef6ad3740a42') <NEW_LINE> depends_on('libxcb@1.... | The XCB util modules provides a number of libraries which sit on top
of libxcb, the core X protocol library, and some of the extension
libraries. These experimental libraries provide convenience functions
and interfaces which make the raw X protocol more usable. Some of the
libraries also provide client-side code which... | 62598f11d8ef3951e32c745c |
class MainHandler(RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> self.render("templates/main.html") | Main page | 62598f114527f215b58e8b0a |
@abstract <NEW_LINE> class InvocationAction(_user_module.InvocationActionMixin, Action): <NEW_LINE> <INDENT> argument = EReference(ordered=True, unique=True, containment=True, derived=False, upper=-1) <NEW_LINE> onPort = EReference(ordered=False, unique=True, containment=False, derived=False) <NEW_LINE> def __init__(se... | InvocationAction is an abstract class for the various actions that request Behavior invocation.
<p>From package UML::Actions.</p> | 62598f11adb09d7d5dc091ba |
class PoolScanPnp9(AbstractCallbackScanner): <NEW_LINE> <INDENT> checks = [('MultiPoolTagCheck', dict(tags=["Pnp9", "PnpD", "PnpC"])), ('CheckPoolSize', dict(condition=lambda x: x >= 0x30)), ('CheckPoolType', dict(non_paged=True, paged=True, free=True)), ('CheckPoolIndex', dict(value=1)), ] <NEW_LINE> def __init__(self... | PoolScanner for Pnp9 (EventCategoryHardwareProfileChange) | 62598f11cc40096d616197e3 |
class SPICompositionWebAPIPipeline(SPICompositionPipeline): <NEW_LINE> <INDENT> def __init__(self, api_endpoint, **kwargs): <NEW_LINE> <INDENT> self.api_endpoint = api_endpoint <NEW_LINE> self.spi_composition_url = "https://en.wikipedia.org/wiki/Swiss_Performance_Index" <NEW_LINE> self.execute_pipeline() <NEW_LINE> <DE... | An object that contains all the logic and methods
necessary to construct a ETL pipeline for extracting
and ingesting daily relevant Swiss Performance Index data to a database through
the velkozz REST API.
It inherits from the Sqlite SPIComposition object and is modified
to perform POST requests to the velkozz Web API ... | 62598f1155399d3f05625138 |
class PydleIRCBotFactory(protocol.ReconnectingClientFactory, object): <NEW_LINE> <INDENT> def __init__(self, irc): <NEW_LINE> <INDENT> self.irc = irc <NEW_LINE> self.irc.factory = self <NEW_LINE> <DEDENT> def buildProtocol(self, addr): <NEW_LINE> <INDENT> return self.irc <NEW_LINE> <DEDENT> def getRandomServer(self): <... | A singleton factory for PydleIRCBot | 62598f1160cbc95b06362f44 |
class IMUsedException(RestException): <NEW_LINE> <INDENT> status_code = 226 | The server has fulfilled a request for the resource, and the response is a representation of
the result of one or more instance-manipulations applied to the current instance. | 62598f113346ee7daa336c6c |
class SendStatus(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.CallId = None <NEW_LINE> self.SessionContext = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.CallId = params.get("CallId") <NEW_LINE> self.SessionContext = params.get("SessionContext") <... | 语音验证码发送状态
| 62598f11099cdd3c636749e1 |
class StatWindow(Window): <NEW_LINE> <INDENT> def __init__(self, cage, font, trackmonster): <NEW_LINE> <INDENT> Window.__init__(self, cage) <NEW_LINE> self.trackmonster = trackmonster <NEW_LINE> self.font = font <NEW_LINE> <DEDENT> def draw(self, surface): <NEW_LINE> <INDENT> if self.trackmonster.getStatsDirty(): <NEW_... | A window that renders the stats of a PlayerObject or a subcass. Records stats from xp, and any status messages,
converted via the constants dict
The messages are outlines so they are equidistant. Colored low HP may be supported in the future | 62598f11ad47b63b2c5a642d |
class MergeVisibleLayers (Command): <NEW_LINE> <INDENT> display_name = _("Merge Visible Layers") <NEW_LINE> def __init__(self, doc, **kwds): <NEW_LINE> <INDENT> super(MergeVisibleLayers, self).__init__(doc, **kwds) <NEW_LINE> self._nothing_initially_visible = False <NEW_LINE> self._old_current_path = doc.layer_stack.cu... | Consolidate all visible layers into one
Deletes all visible layers, but inserts the result of merging them
into the layer stack just before the highest root of any of the
merged+deleted layers. | 62598f11a219f33f346c543f |
class PublisherFacade(object): <NEW_LINE> <INDENT> def __init__(self, broker_client, delivery_store): <NEW_LINE> <INDENT> self.broker_client = broker_client <NEW_LINE> self.delivery_store = delivery_store <NEW_LINE> <DEDENT> def send(self, msg, out_name, exchange, routing_key, properties={}, headers={}, *args, **kwargs... | An AMQP facade for services so they aren't aware that publishing AMQP
messages actually requires us to use the Zato broker underneath. | 62598f11cc40096d616197e4 |
class KeyIndicator(Base): <NEW_LINE> <INDENT> def __init__(self, api, json_sent, json_return): <NEW_LINE> <INDENT> self.__api = api <NEW_LINE> self.__json_sent = json_sent <NEW_LINE> self.__json_returned = json_return <NEW_LINE> self.__type_id = self.__json_returned.get('typeId') <NEW_LINE> self._is_deleted = False <NE... | KeyIndicator() | 62598f1160cbc95b06362f46 |
class Solution: <NEW_LINE> <INDENT> def climb_stairs_recursive(self, n: int) -> int: <NEW_LINE> <INDENT> if n < 2: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return self.climb_stairs_recursive(n - 1) + self.climb_stairs_recursive(n - 2) <NEW_LINE> <DEDENT> <DEDENT> def ... | 爬楼梯方法数 | 62598f11ec188e330fdf74ca |
class Day01(Day): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super().__init__("Day 1: Chronal Calibration") <NEW_LINE> self._data = self._convert_input_to_integers(data) <NEW_LINE> <DEDENT> def solve_part_one(self): <NEW_LINE> <INDENT> self._part_one = 0 <NEW_LINE> for value in self._data: <NEW_L... | A solution to Day 1: Chronal Calibration problem. | 62598f11ab23a570cc2d4377 |
class Debug(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Assert(condition,message=None,*__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def Close(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def Fail(message,detailMessage=None): <NEW_LINE> <INDENT>... | Provides a set of methods and properties that help debug your code. This class cannot be inherited. | 62598f11adb09d7d5dc091be |
class Testcase_320_20_MultipartTableStatsTableOrder(base_tests.SimpleDataPlane): <NEW_LINE> <INDENT> @wireshark_capture <NEW_LINE> def runTest(self): <NEW_LINE> <INDENT> logging.info("Running 320.20 - Identifier of table test") <NEW_LINE> logging.info("Delete all flows on DUT") <NEW_LINE> rv = delete_all_flows(self.con... | 320.20 - /* Identifier of table. Lower numbered tables are consulted first. */
Verify that the n_tables ofp_table_stats messages are returned in response to a multipart table request
from lowest table_id to the highest supported table_id. | 62598f11656771135c4882a1 |
class MaterializedQuerySet(QuerySet): <NEW_LINE> <INDENT> def __init__(self, model=None, query=None, using=None, hints=None, queryset=None): <NEW_LINE> <INDENT> if queryset is None: <NEW_LINE> <INDENT> super(MaterializedQuerySet, self).__init__(model, query, using, hints) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> s... | A queryset that will keep its cached result. | 62598f11377c676e912f6371 |
class Solution: <NEW_LINE> <INDENT> def stoneGame(self, A): <NEW_LINE> <INDENT> if not A or len(A) == 0: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> size = len(A) <NEW_LINE> dp = [[0 for _ in range(size)] for _ in range(size)] <NEW_LINE> prefix_sum = [0] * (size + 1) <NEW_LINE> for i in range(size): <NEW_LINE> <IN... | @param A: An integer array
@return: An integer | 62598f117b180e01f3e48653 |
class StageData: <NEW_LINE> <INDENT> def __init__(self, num_players): <NEW_LINE> <INDENT> self.calls = [False] * num_players <NEW_LINE> self.raises = [False] * num_players <NEW_LINE> self.min_call_at_action = [0] * num_players <NEW_LINE> self.contribution = [0] * num_players <NEW_LINE> self.stack_at_action = [0] * num_... | Preflop, flop, turn and river | 62598f118a349b6b43684e5b |
class StringFlag(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.values = [] <NEW_LINE> <DEDENT> def add_definition(self, definition): <NEW_LINE> <INDENT> assert(definition.startswith(self.name)) <NEW_LINE> value = definition[len(self.name):] <NEW_LINE> if val... | Class for string flags in manifest entries in the form:
"flag=string"
"flag!=string" | 62598f114a966d76dd5edaeb |
class LogFormatChecker(object): <NEW_LINE> <INDENT> def check_json_log_format(self, logfile): <NEW_LINE> <INDENT> for line in logfile: <NEW_LINE> <INDENT> if line: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> logmsg = json.loads(line) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <INDENT> self.fail('Improperly form... | Class to give clauses the ability to check the format of logs.
For json logs, there must be one json object per line. Furthermore, all
entries must have the following fields:
- timestamp
- seconds
- nanos
- severity
- thread
- message
For access logs, it seems that th... | 62598f114527f215b58e8b10 |
class EmailModelTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.email_owner = Person.objects.create( first_name="John", last_name="Doe", date_of_birth=date(1990, 4, 15) ) <NEW_LINE> self.email_email = "john.doe@example.com" <NEW_LINE> self.email = Email( owner=self.email_owner, email=s... | This class defines the test suite for the email model. | 62598f11ec188e330fdf74cc |
class Player(models.Model): <NEW_LINE> <INDENT> discord_server_id = models.CharField(max_length=255) <NEW_LINE> discord_id = models.CharField(max_length=255) <NEW_LINE> lang = models.CharField(max_length=255, blank=True) <NEW_LINE> wt_nick = models.CharField(max_length=50, blank=True) | Игроки | 62598f11ab23a570cc2d4378 |
class HttpSchema: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__http = "http://" <NEW_LINE> self.__https = "https://" <NEW_LINE> <DEDENT> @property <NEW_LINE> def HTTP(self): <NEW_LINE> <INDENT> return self.__http <NEW_LINE> <DEDENT> @property <NEW_LINE> def HTTPS(self): <NEW_LINE> <INDENT> return ... | HTTP Schema常量 | 62598f1197e22403b3839af9 |
@dataclass <NEW_LINE> class RetornoInformacoesLote: <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> namespace = "http://www.prefeitura.sp.gov.br/nfe" <NEW_LINE> <DEDENT> cabecalho: Optional["RetornoInformacoesLote.Cabecalho"] = field( default=None, metadata={ "name": "Cabecalho", "type": "Element", "namespace": "",... | Schema utilizado para RETORNO de Pedidos de Informações de Lote.
Este Schema XML é utilizado pelo Web Service para informar aos
prestadores de serviços o resultado do pedido de informações de
lote.
:ivar cabecalho: Cabeçalho do retorno.
:ivar alerta: Elemento que representa a ocorrência de eventos de
alerta duran... | 62598f11956e5f7376df4c88 |
class FlaskFilter(logging.Filter): <NEW_LINE> <INDENT> def filter(self, record): <NEW_LINE> <INDENT> return "* Running on http://" not in record.getMessage() | This removes a misleading logging message by Flask | 62598f120fa83653e46f3afe |
class TestNewInventoryAdjustment(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 testNewInventoryAdjustment(self): <NEW_LINE> <INDENT> pass | NewInventoryAdjustment unit test stubs | 62598f12ec188e330fdf74ce |
class _QemuGuestAgentAPI(): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> <DEDENT> def ping(self): <NEW_LINE> <INDENT> return self.client._call('guest-ping') <NEW_LINE> <DEDENT> def file_open(self, path, mode="r"): <NEW_LINE> <INDENT> args = { 'path': path, 'mode': ... | Wrapper functions for the supported Qemu guest agent API calls. | 62598f1297e22403b3839afb |
class User(db.Model): <NEW_LINE> <INDENT> __tablename__ = "users" <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> email = db.Column(db.Text, nullable=False, unique=True) <NEW_LINE> username = db.Column(db.Text, nullable=False, unique=True) <NEW_LINE> image_url = db.Column(db.Text, default="/static/im... | User in the system. | 62598f1250812a4eaa6201f9 |
class UserProfileSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> city = serializers.CharField(allow_blank=True, required=False) <NEW_LINE> house_address = serializers.CharField(allow_blank=True, required=False) <NEW_LINE> first_name = serializers.CharField(allow_blank=True, required=False) <NEW_LINE> last_... | Serializes users profiles | 62598f123617ad0b5ee04d4b |
class Generate(object): <NEW_LINE> <INDENT> reserved_keys = ('required', 'type', 'title') <NEW_LINE> def get_data(self, json_validation_object): <NEW_LINE> <INDENT> if not json_validation_object: <NEW_LINE> <INDENT> return dict() <NEW_LINE> <DEDENT> example = self.generate(json_validation_object) <NEW_LINE> return exam... | This class holds methods to
generate data from json validator object | 62598f124a966d76dd5edaf1 |
class UploadCertificateResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'resource_id': {'required': True}, 'aad_authority': {'required': True}, 'aad_tenant_id': {'required': True}, 'service_principal_client_id': {'required': True}, 'service_principal_object_id': {'required': True}, 'azure_manag... | The upload registration certificate response.
All required parameters must be populated in order to send to Azure.
:param auth_type: Specifies authentication type. Possible values include: "Invalid",
"AzureActiveDirectory".
:type auth_type: str or ~azure.mgmt.databoxedge.v2019_03_01.models.AuthenticationType
:param ... | 62598f1250812a4eaa6201fa |
class AuditManager(DataManager): <NEW_LINE> <INDENT> def save(self, visit_log): <NEW_LINE> <INDENT> self.session.add(visit_log) <NEW_LINE> self.session.flush() <NEW_LINE> return visit_log <NEW_LINE> <DEDENT> @popular_concepts.cache_on_arguments(expiration_time=86400) <NEW_LINE> def get_most_popular_concepts_for_concept... | A data manager for logging the visit. | 62598f120fa83653e46f3b02 |
class FuraffinityGalleryExtractor(FuraffinityExtractor): <NEW_LINE> <INDENT> subcategory = "gallery" <NEW_LINE> pattern = BASE_PATTERN + r"/gallery/([^/?#]+)" <NEW_LINE> test = ("https://www.furaffinity.net/gallery/mirlinthloth/", { "pattern": r"https://d\d?\.f(uraffinity|acdn)\.net" r"/art/mirlinthloth/\d+/\d+.\w+\.\w... | Extractor for a furaffinity user's gallery | 62598f12283ffb24f3cf24c3 |
class UserShortNameSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> short_name = serializers.SerializerMethodField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = get_user_model() <NEW_LINE> fields = ('short_name',) <NEW_LINE> <DEDENT> def get_short_name(self, user): <NEW_LINE> <INDENT> return user.sho... | Serializer for a user short name object | 62598f12be7bc26dc925146f |
class InputDataUWind(InputData): <NEW_LINE> <INDENT> load_vars = ['uwnd'] <NEW_LINE> def __init__(self, props, date_s=None, date_e=None): <NEW_LINE> <INDENT> super(InputDataUWind, self).__init__(props, date_s, date_e) <NEW_LINE> self.out_data = {'uwnd': None} <NEW_LINE> <DEDENT> def _calc_interp(self, var_name): <NEW_L... | Contains the relevant input data and routines for an STJPV jet find.
Parameters
----------
jet_find : :py:meth:`~STJ_PV.run_stj.JetFindRun`
Object containing properties about the metric calculation
to be performed. Used to locate correct files, and variables
within those files.
year : int, optional
Yea... | 62598f123d592f4c4edb9b04 |
class StrategyOnePlusLambda(object): <NEW_LINE> <INDENT> def __init__(self, parent, sigma, **kargs): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> self.sigma = sigma <NEW_LINE> self.dim = len(self.parent) <NEW_LINE> self.C = numpy.identity(self.dim) <NEW_LINE> self.A = numpy.identity(self.dim) <NEW_LINE> self.pc ... | A CMA-ES strategy that uses the :math:`1 + \lambda` paradigme.
:param parent: An iterable object that indicates where to start the
evolution. The parent requires a fitness attribute.
:param sigma: The initial standard deviation of the distribution.
:param parameter: One or more parameter to pass to the ... | 62598f12fbf16365ca792cbd |
class Qcachegrind(QMakePackage): <NEW_LINE> <INDENT> homepage = "https://github.com/KDE/kcachegrind" <NEW_LINE> url = "https://github.com/KDE/kcachegrind/archive/v20.08.0.tar.gz" <NEW_LINE> version('20.12.2', sha256='935cf6665fac274f84af84d0a30cc2fdf27d437234b9accbf8ec0a5dba6ad867') <NEW_LINE> version('20.08.0', sha256... | {K,Q}Cachegrind is a KDE/Qt GUI to visualize profiling data.
It's mainly used as visualization frontend for data measured
by Cachegrind/Callgrind tools from the Valgrind package, but
there are converters for other measurement tools available.
Also provides the command-line tool 'cgview' | 62598f12ec188e330fdf74d4 |
class LogicalIndexStore(object): <NEW_LINE> <INDENT> def __init__(self, cim, file_path, mapping): <NEW_LINE> <INDENT> super(LogicalIndexStore, self).__init__() <NEW_LINE> self._cim = cim <NEW_LINE> self._file_path = file_path <NEW_LINE> self._mapping = mapping <NEW_LINE> self._file_size = os.path.getsize(file_path) <NE... | provides an interface for accessing index nodes by logical page id.
indexing logic should go at a higher level. | 62598f129f28863672817418 |
class BoggleBoardTestCase(TestCase): <NEW_LINE> <INDENT> def test_initializer(self): <NEW_LINE> <INDENT> board = BoggleBoard(3) <NEW_LINE> self.assertTrue( all( all(cell in ascii_uppercase for cell in row) for row in board )) <NEW_LINE> self.assertTrue(board[0] is not board[1]) <NEW_LINE> <DEDENT> def test_check_word_o... | Tests about the BoggleBoard. | 62598f127b180e01f3e48658 |
class MirrorTask(DefaultTask): <NEW_LINE> <INDENT> indicator = luigi.Parameter(default=random_string()) <NEW_LINE> def requires(self): <NEW_LINE> <INDENT> return FTPMirror(host='ftp.cs.brown.edu', username='anonymous', password='anonymous', pattern='*pdf', base='/pub/techreports/00') <NEW_LINE> <DEDENT> def run(self): ... | Indicator make this task run on each test run. | 62598f120fa83653e46f3b06 |
class ApiCreateCronJobHandler(api_call_handler_base.ApiCallHandler): <NEW_LINE> <INDENT> args_type = ApiCreateCronJobArgs <NEW_LINE> result_type = ApiCronJob <NEW_LINE> def Handle(self, source_args, context=None): <NEW_LINE> <INDENT> args = source_args.Copy() <NEW_LINE> args.flow_args.ClearFieldsWithLabel( rdf_structs.... | Creates a new cron job. | 62598f12ec188e330fdf74d6 |
class ExampleClass(object): <NEW_LINE> <INDENT> def __init__(self, param1, param2, param3): <NEW_LINE> <INDENT> self.attr1 = param1 <NEW_LINE> self.attr2 = param2 <NEW_LINE> self.attr3 = param3 <NEW_LINE> self.attr4 = ['attr4'] <NEW_LINE> self.attr5 = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def readonly_property(... | 1行目にはクラスの概要を書く
クラスがpublic属性を持つなら、Argsセクションと同じフォーマットで
Attributesセクションに書ける。
あるいは__init__の中での代入のところでインラインでも書ける。
``@property`` デコレータで作ったプロパティの説明ははプロパティのゲッターに書くべきだ。
Attributes:
attr1 (str): ほげ
attr2 (:obj:`int`, optional): ぴよ | 62598f127cff6e4e811b460c |
class PostForm(FlaskForm): <NEW_LINE> <INDENT> title = StringField('Title', validators=[DataRequired()]) <NEW_LINE> content = TextAreaField('Content', validators=[DataRequired()]) <NEW_LINE> submit = SubmitField('Post') | New post Form. | 62598f12091ae3566870382b |
class PostModel(UUIDPrimaryKey, AuditedModel): <NEW_LINE> <INDENT> title = models.CharField(max_length=128, db_index=True, verbose_name=_("name")) <NEW_LINE> email = models.EmailField(verbose_name=_("email")) <NEW_LINE> post_category = models.ForeignKey( "posts_areas.PostArea", on_delete=models.SET_NULL, verbose_name=_... | Abstract model with basic info of a post | 62598f12adb09d7d5dc091ca |
class ReplaceList(Builtin): <NEW_LINE> <INDENT> messages = { 'reps': "`1` is not a valid replacement rule.", 'rmix': "Elements of `1` are a mixture of lists and nonlists.", } <NEW_LINE> def apply(self, expr, rules, max, evaluation): <NEW_LINE> <INDENT> if max.get_name() == 'System`Infinity': <NEW_LINE> <INDENT> max_cou... | <dl>
<dt>'ReplaceList[$expr$, $rules$]'
<dd>returns a list of all possible results of applying $rules$
to $expr$.
</dl>
Get all subsequences of a list:
>> ReplaceList[{a, b, c}, {___, x__, ___} -> {x}]
= {{a}, {a, b}, {a, b, c}, {b}, {b, c}, {c}}
You can specify the maximum number of items:
>> ReplaceList[{a,... | 62598f1255399d3f05625147 |
class InnerScope(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name | Private class visible to this method only | 62598f120fa83653e46f3b08 |
@admin.register(models.Reservation) <NEW_LINE> class Reservation(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ( "room", "status", "check_in", "check_out", "guest", "in_progress", "is_finished", ) <NEW_LINE> list_filter = ("status",) | Reservation Admin Definition | 62598f1250812a4eaa6201fe |
class Response(models.Model): <NEW_LINE> <INDENT> user_from = models.ForeignKey(User, related_name="user_response_from") <NEW_LINE> user_to = models.ForeignKey(User, related_name="user_response_to") <NEW_LINE> text = models.CharField(max_length=constants.MAX_LENGTH_TEXT_MESSAGE) <NEW_LINE> files = models.FileField(uplo... | Create a Response model in database. | 62598f12be7bc26dc9251473 |
class IDType(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.num = 0; <NEW_LINE> self.className = ""; <NEW_LINE> self.strName = ""; <NEW_LINE> <DEDENT> def addIDType(self, num, className, strName): <NEW_LINE> <INDENT> self.num = num <NEW_LINE> self.className = className <NEW_LINE> self.strName... | 默认的配置数据,来源于id_type SHEET
ID类型表
num为类型范围值
className是对应该类型的结构体名称
strName是对应的中文名
这组数据存储在id_type表中 | 62598f120fa83653e46f3b0a |
class ThemeColors(Enum): <NEW_LINE> <INDENT> TEXT_DEFAULT = Color(43, 43, 42, 255) <NEW_LINE> TEXT_ACTIVE = Color(238, 175, 98, 255) <NEW_LINE> TEXT_SELECT = Color(128, 94, 53, 255) <NEW_LINE> BACKGROUND = Color(34, 40, 51, 255) <NEW_LINE> FOREGROUND = Color(217, 215, 206, 255) <NEW_LINE> MENU = TileColor(BACKGROUND, F... | Colors used for the default main menu. | 62598f12ad47b63b2c5a643c |
class InvalidJSONError(RequestException): <NEW_LINE> <INDENT> pass | A JSON error occurred. | 62598f127b180e01f3e4865b |
class DatabaseException(Exception): <NEW_LINE> <INDENT> pass | Raised when a database operation fails. | 62598f12a05bb46b384894a1 |
class TestCompareXLSXFiles(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> filename = 'chart_scatter14.xlsx' <NEW_LINE> test_dir = 'xlsxwriter/test/comparison/' <NEW_LINE> self.got_filename = test_dir + '_test_' + filename <NEW_LINE> self.exp_filename = test_d... | Test file created by XlsxWriter against a file created by Excel. | 62598f123617ad0b5ee04d55 |
class _PositionMixin(Device): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_PositionMixin, self).__init__() <NEW_LINE> <DEDENT> @background <NEW_LINE> async def move(self, delta): <NEW_LINE> <INDENT> await self.set_position(await self.get_position() + delta) <NEW_LINE> <DEDENT> @background <NEW_LIN... | Provide positional, discrete behaviour interface. | 62598f12283ffb24f3cf24cd |
class PDistr(Distr): <NEW_LINE> <INDENT> def __init__(self, segs = None, **kvargs): <NEW_LINE> <INDENT> super(PDistr, self).__init__(**kvargs) <NEW_LINE> self.segs = segs <NEW_LINE> <DEDENT> def init_piecewise_pdf(self): <NEW_LINE> <INDENT> if isinstance(self.segs, PiecewiseFunction): <NEW_LINE> <INDENT> self.piecewise... | General distribution defined as piecewise function. | 62598f12099cdd3c636749eb |
class Ant(Insect): <NEW_LINE> <INDENT> blocks_path = True <NEW_LINE> is_ant = True <NEW_LINE> implemented = True <NEW_LINE> food_cost = 0 <NEW_LINE> container = False <NEW_LINE> doubled = False <NEW_LINE> def __init__(self, armor=1): <NEW_LINE> <INDENT> Insect.__init__(self, armor) <NEW_LINE> <DEDENT> def can_contain(s... | An Ant occupies a place and does work for the colony. | 62598f12956e5f7376df4c91 |
class MyNotebook(ttk.Frame): <NEW_LINE> <INDENT> def __init__(self, parent: tk.Widget, **kw): <NEW_LINE> <INDENT> ttk.Frame.__init__(self, parent) <NEW_LINE> self._notebook = ttk.Notebook(self, **kw) <NEW_LINE> self._notebook.pack(fill=tk.BOTH, expand=True) <NEW_LINE> self._index_right_clicked = None <NEW_LINE> self._c... | A small wrapper around ttk.Notebook with a context menu.
:param parent: The parent widget
:type parent: tkinter.Widget | 62598f12091ae35668703833 |
class BreakpointManager: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.breakpoints: ObjectContainer = ObjectContainer([], 'List of breakpoints') <NEW_LINE> <DEDENT> def clear(self): <NEW_LINE> <INDENT> self.breakpoints.clear() <NEW_LINE> self.breakpoints.am_event() <NEW_LINE> <DEDENT> def add_breakpo... | Manager of breakpoints. | 62598f129f28863672817424 |
class FiwareAuth(BaseOAuth2): <NEW_LINE> <INDENT> AUTHORIZATION_URL = FIWARE_AUTHORIZATION_URL <NEW_LINE> ACCESS_TOKEN_URL = FIWARE_ACCESS_TOKEN_URL <NEW_LINE> AUTH_BACKEND = FiwareBackend <NEW_LINE> REDIRECT_STATE = False <NEW_LINE> STATE_PARAMETER = False <NEW_LINE> SETTINGS_KEY_NAME = 'FIWARE_APP_ID' <NEW_LINE> SETT... | FI-WARE OAuth2 mechanism | 62598f128a349b6b43684e6f |
class Particle: <NEW_LINE> <INDENT> def __init__(self, x = 50, y = 50, velX = 10, velY = 15, radius = 15, color = '#663977'): <NEW_LINE> <INDENT> self._x = x <NEW_LINE> self._y = y <NEW_LINE> self._velX = velX <NEW_LINE> self._velY = velY <NEW_LINE> self._radius = radius <NEW_LINE> self._color = color <NEW_LINE> <DEDEN... | Particle models a single particle that may be rendered to a canvas | 62598f1226238365f5fab7b5 |
class LoggerMixin(object): <NEW_LINE> <INDENT> level_name = level_name_property() <NEW_LINE> def debug(self, *args, **kwargs): <NEW_LINE> <INDENT> if not self.disabled and DEBUG >= self.level: <NEW_LINE> <INDENT> self._log(DEBUG, args, kwargs) <NEW_LINE> <DEDENT> <DEDENT> def info(self, *args, **kwargs): <NEW_LINE> <IN... | This mixin class defines and implements the "usual" logger
interface (i.e. the descriptive logging functions).
Classes using this mixin have to implement a :meth:`!handle` method which
takes a :class:`~logbook.LogRecord` and passes it along. | 62598f12656771135c4882b7 |
class PyTestpath(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/jupyter/testpath" <NEW_LINE> pypi = "testpath/testpath-0.4.2.tar.gz" <NEW_LINE> version('0.4.2', sha256='b694b3d9288dbd81685c5d2e7140b81365d46c29f5db4bc659de5aa6b98780f8') | Testpath is a collection of utilities for Python code working with
files and commands. | 62598f12d8ef3951e32c746a |
class APIAuthenticationFailedException(BanzeeException): <NEW_LINE> <INDENT> def __init__(self, inner_exception=None): <NEW_LINE> <INDENT> super().__init__(401) | APIAuthentictionFailedException class | 62598f124a966d76dd5edb01 |
class SQLAlchemyCategory(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._setup_table() <NEW_LINE> pass <NEW_LINE> <DEDENT> def reconnect_db(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _setup_table(self): <NEW_LINE> <INDENT> results = Category.query.all() <NEW_LINE> if len(results) == 0:... | Maintain an index of services category data. | 62598f12be7bc26dc9251477 |
class StripAttributeFilter (Filter): <NEW_LINE> <INDENT> def __init__ (self, source, attributes): <NEW_LINE> <INDENT> Filter.__init__ (self, source) <NEW_LINE> self.attributes = set (map (str.lower, attributes)) <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> for token in Filter.__iter__(self): <NEW_LINE> <... | Remove arbitrary HTML attributes | 62598f12283ffb24f3cf24d3 |
class SessionResource(Resource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, 'location': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type... | The session object.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource Manager Resource ID.
:vartype id: str
:ivar type: Resource Manager Resource Type.
:vartype type: str
:ivar name: Resource Manager Resource Name.
:vartype name: str
:ivar location: Resource Ma... | 62598f12fbf16365ca792ccb |
class AudioStreamFormat(): <NEW_LINE> <INDENT> def __init__(self, samples_per_second: int = None, bits_per_sample: int = 16, channels: int = 1): <NEW_LINE> <INDENT> if samples_per_second is None: <NEW_LINE> <INDENT> self._impl = impl.AudioStreamFormat_get_default_input_format() <NEW_LINE> <DEDENT> else: <NEW_LINE> <IND... | Represents specific audio configuration, such as microphone, file, or custom audio streams
When called without arguments, returns the default `AudioStreamFormat` (16 kHz, 16 bit, mono
PCM).
Currently, only WAV / PCM with 16-bit samples, 16 kHz sample rate, and a single channel (Mono)
is supported.
:param samples_per... | 62598f12099cdd3c636749ee |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.