code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class AssemblyMemberDifferentType(AssemblyMemberDifference,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseUnmanagedResources(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __enter__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def... | The two assembly members being compared have different type | 62598f9c56ac1b37e6301fa3 |
class MongoDBPipeline: <NEW_LINE> <INDENT> collection_name = "articles" <NEW_LINE> def __init__(self, mongo_uri, mongo_db): <NEW_LINE> <INDENT> self._mongo_uri = mongo_uri <NEW_LINE> self._mongo_db = mongo_db <NEW_LINE> self._client = None <NEW_LINE> self._db = None <NEW_LINE> self._conn = None <NEW_LINE> <DEDENT> @cla... | Pipeline for saving scraped data to MongoDB | 62598f9c21bff66bcd722a1d |
class PlainOldData: <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> def as_prolog_str(self) -> str: <NEW_LINE> <INDENT> slot_strs = [] <NEW_LINE> for slot in self.__slots__: <NEW_LINE> <INDENT> value = getattr(self, slot) <NEW_LINE> if value is not None: <NEW_LINE> <INDENT> slot_strs.append(f'{_prolog_atom(slot)}:{_as_pr... | A mixin class that adds serialization methods. | 62598f9cf7d966606f747da0 |
class EditForm(forms.Form): <NEW_LINE> <INDENT> content = forms.CharField( label=_(u'Content'), help_text=_('File content'), required=True, widget=forms.Textarea(attrs={'rows': '18'}), ) <NEW_LINE> def __init__(self, path, filename, file_extension, *args, **kwargs): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.... | Form for editing the File. | 62598f9c91f36d47f2230d7c |
class TestSingleComponentResponseOfDestinyKiosksComponent(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 testSingleComponentResponseOfDestinyKiosksComponent(self): <NEW_LINE> <INDENT> pass | SingleComponentResponseOfDestinyKiosksComponent unit test stubs | 62598f9cb7558d58954633e8 |
class Chunk(models.Model): <NEW_LINE> <INDENT> __metaclass__ = TransMeta <NEW_LINE> key = models.CharField(verbose_name=_('key'), help_text="A unique name for this chunk of content", max_length=255, blank=False, unique=True) <NEW_LINE> content = models.TextField(_('content'), blank=True, null=True) <NEW_LINE> url_patte... | A Chunk is a piece of content associated
with a unique key that can be inserted into
any template with the use of a special template
tag | 62598f9c44b2445a339b6849 |
class DatSegUEV(DatSegBase): <NEW_LINE> <INDENT> MARK = 'uev' <NEW_LINE> SCHEMA = { Optional('description'): str, Optional('address'): Any(int, All(str, lambda v: int(v, 0))), Optional('file'): str, Optional('mark', default='bootcmd='): str, Required('eval'): str } <NEW_LINE> def load(self, db, root_path): <NEW_LINE> <... | Data segments class for U-Boot ENV image
<NAME>.uev:
description: str
address: int
file: str
mark: str (default: 'bootcmd=')
eval: str | 62598f9c67a9b606de545d83 |
@python_2_unicode_compatible <NEW_LINE> class Plan(OrderedModel): <NEW_LINE> <INDENT> name = models.CharField(_('name'), max_length=100) <NEW_LINE> description = models.TextField(_('description'), blank=True) <NEW_LINE> default = models.BooleanField(default=False, db_index=True) <NEW_LINE> available = models.BooleanFie... | Single plan defined in the system. A plan can customized (referred to user) which means
that only this user can purchase this plan and have it selected.
Plan also can be visible and available. Plan is displayed on the list of currently available plans
for user if it is visible. User cannot change plan to a plan that i... | 62598f9c85dfad0860cbf951 |
class ExpirationOptions(TypedDict, total=False): <NEW_LINE> <INDENT> type: str <NEW_LINE> time: Optional[datetime] | Pending order expiration settings. | 62598f9cdd821e528d6d8cee |
class PublicTagApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_login_required(self): <NEW_LINE> <INDENT> res = self.client.get(TAGS_URL) <NEW_LINE> self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED) | The publicly available tags API | 62598f9c1b99ca400228f40a |
class Content(InheritableDocument): <NEW_LINE> <INDENT> status = StringField(help_text='The status of this content.') <NEW_LINE> type = StringField(help_text='The type of content', required=True) <NEW_LINE> user = StringField(help_text="ID of the user submitting the content") ... | A Content object which stores different types of staff-defined static content | 62598f9c435de62698e9bbae |
class ClearMessageInfo(restful.Resource): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get(): <NEW_LINE> <INDENT> parser = reqparse.RequestParser() <NEW_LINE> parser.add_argument('sender_id', type=str, required=True, help=u'sender_id 必须') <NEW_LINE> parser.add_argument('receiver_id', type=str, required=True, help=u... | 清楚某一个私信详情 | 62598f9c8da39b475be02f9f |
class Sequence(ElementBase): <NEW_LINE> <INDENT> def __init__(self, children=(), name=None, default=None): <NEW_LINE> <INDENT> ElementBase.__init__(self, name=name, default=default) <NEW_LINE> self._children = self._copy_sequence(children, "children", ElementBase) <NEW_LINE> <DEDENT> def _get_children(self): <NEW_LINE>... | Element class representing a sequence of child elements
which must all match a recognition in the correct order.
Constructor arguments:
- *children* (iterable, default: *()*) --
the child elements of this element
- *name* (*str*, default: *None*) --
the name of this element
For a recognition to match, all chi... | 62598f9ca05bb46b3848a639 |
class RetraceTaskPackage: <NEW_LINE> <INDENT> def __init__(self, db_package: Package) -> None: <NEW_LINE> <INDENT> self.db_package = db_package <NEW_LINE> self.nvra: str = db_package.nvra() <NEW_LINE> if db_package.pkgtype.lower() == "rpm": <NEW_LINE> <INDENT> self.unpack_to_tmp = unpack_rpm_to_tmp <NEW_LINE> <DEDENT> ... | A "buffer" representing pyfaf.storage.Package. SQL Alchemy objects are
not threadsafe and this object is used to query and buffer all
the necessary information so that DB calls are not required from workers. | 62598f9c596a897236127a39 |
class Card(pg.sprite.Sprite): <NEW_LINE> <INDENT> card_names = {1: "Ace", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Six", 7: "Seven", 8: "Eight", 9: "Nine", 10: "Ten", 11: "Jack", 12: "Queen", 13: "King"} <NEW_LINE> def __init__(self, value, suit, card_size, speed): <NEW_LINE> <INDENT> super(Card, self).__init__(... | Class to represent a single playing card. | 62598f9c462c4b4f79dbb7c5 |
class AppSyncRequest(TypedDict): <NEW_LINE> <INDENT> headers: Dict[str, str] | AppSyncRequest
Attributes:
----------
headers: Dict[str, str] | 62598f9ccc0a2c111447adc6 |
class Task (object): <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<%s.%s name=%r>" % (type(self).__module__, type(self).__name__, getattr(self, 'name', None)) <NEW_LINE> <DEDENT> def start(self, finish_callbac... | Represent a task that can be done in the background
The finish_callback received in Task.start(..) must be stored,
and regardless if the task exits with an error, or completes
successfully, the callback *must* be called.
The finish callback must pass the Task instance itself as
the only and first argument:
finis... | 62598f9c442bda511e95c217 |
@implementer(IExternal) <NEW_LINE> class External(object): <NEW_LINE> <INDENT> __slots__ = ("identifier", ) <NEW_LINE> @classmethod <NEW_LINE> def _build(cls, data): <NEW_LINE> <INDENT> identifier, = data <NEW_LINE> return cls(identifier) <NEW_LINE> <DEDENT> def __init__(self, identifier): <NEW_LINE> <INDENT> self.iden... | Used by TreeSerializer to encapsulate external references. | 62598f9c7047854f4633f19d |
class InvalidEncodingChars(HL7apyException): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.message if self.message else 'Invalid encoding chars' | Raised when the encoding chars specified is not a correct set of HL7 encoding chars
>>> from hl7apy.core import Message
>>> encoding_chars = {'GROUP': '\r', 'SEGMENT': '\r', 'COMPONENT': '^', 'SUBCOMPONENT': '&', 'REPETITION': '~', 'ESCAPE': '\\'}
>>> m = Message('ADT_A01', encoding_chars=enc... | 62598f9cd7e4931a7ef3be53 |
class Stock: <NEW_LINE> <INDENT> def GetMaxStockPrice(self): <NEW_LINE> <INDENT> return max(self.StockPrices) <NEW_LINE> <DEDENT> def GetMinStockPrice(self): <NEW_LINE> <INDENT> return min(self.StockPrices) <NEW_LINE> <DEDENT> def IsNumber(self,rowValue): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> float(rowValue) <NE... | Stock class will read a csv file provide a list of stock prices | 62598f9c21bff66bcd722a1f |
class Mode(): <NEW_LINE> <INDENT> def __init__(self, sw=0.116, sh=5.8): <NEW_LINE> <INDENT> self.SLIT_WIDTH = sw <NEW_LINE> self.SLIT_HEIGHT = sh <NEW_LINE> self.TAU_0 = 0.0 <NEW_LINE> self.DGAP = 0.0 <NEW_LINE> self.DPIX = 0.018 <NEW_LINE> self.NDET = 3 <NEW_LINE> self.NXPIX = 2048 <NEW_LINE> self.NYPIX = 2048 <NEW_LI... | Testing dummy class | 62598f9c91f36d47f2230d7d |
class AssetListUpdateApi(CustomFilterMixin, ListBulkCreateUpdateDestroyAPIView): <NEW_LINE> <INDENT> queryset = Asset.objects.all() <NEW_LINE> serializer_class = serializers.AssetSerializer <NEW_LINE> permission_classes = (IsSuperUser,) | Asset bulk update api | 62598f9c435de62698e9bbaf |
class PyPycares(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/saghul/pycares" <NEW_LINE> url = "https://github.com/saghul/pycares/archive/pycares-3.0.0.tar.gz" <NEW_LINE> version('3.0.0', sha256='28dc2bd59cf20399a6af4383cc8f57970cfca8b808ca05d6493812862ef0ca9c') <NEW_LINE> depends_on('python@2... | pycares is a Python module which provides an interface to c-ares. c-ares
is a C library that performs DNS requests and name resolutions
asynchronously. | 62598f9c56b00c62f0fb266c |
class NoSuchRank(Error): <NEW_LINE> <INDENT> pass | Attempted to look up a rank which did not exist | 62598f9c460517430c431f38 |
class UpdateFlairTask(AbstractTaskType): <NEW_LINE> <INDENT> def handle(self, requirements): <NEW_LINE> <INDENT> for message in requirements['messages']: <NEW_LINE> <INDENT> flair = self.bot.data_manager.query(FlairModel).filter(FlairModel.name == message.body).first() <NEW_LINE> subscriber = self.bot.data_manager.quer... | Updates a users flair based on a choice from them
MCP
:license: MIT
:messages used: 'flair_update_success', 'rank_not_high_enough' | 62598f9cbd1bec0571e14fa1 |
class GatewayRouteListResult(Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[GatewayRoute]'}, } <NEW_LINE> def __init__(self, *, value=None, **kwargs) -> None: <NEW_LINE> <INDENT> super(GatewayRouteListResult, self).__init__(**kwargs) <NEW_LINE> self.value = value | List of virtual network gateway routes.
:param value: List of gateway routes
:type value: list[~azure.mgmt.network.v2017_06_01.models.GatewayRoute] | 62598f9c44b2445a339b684a |
class AppointmentSchema(Schema): <NEW_LINE> <INDENT> id = fields.Integer(dump_only=True) <NEW_LINE> client_name = fields.String(required=True) <NEW_LINE> request_date = fields.Date(required=False) <NEW_LINE> appointment_date = fields.Date(required=False) <NEW_LINE> appointment_time = fields.Time(required=False) <NEW_LI... | Appointment Schema | 62598f9c9b70327d1c57eb5c |
class Vec: <NEW_LINE> <INDENT> def __init__(self, labels, function=None): <NEW_LINE> <INDENT> if function == None: <NEW_LINE> <INDENT> f = {x:y for (x,y) in list(enumerate(labels))} <NEW_LINE> self.D=set(f.keys()) <NEW_LINE> self.f=f <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.D = labels <NEW_LINE> self.f = func... | A vector has two fields:
D - the domain (a set)
f - a dictionary mapping (some) domain elements to field elements
elements of D not appearing in f are implicitly mapped to zero | 62598f9c498bea3a75a578dc |
class TruncateMixin(MinimalHandler): <NEW_LINE> <INDENT> truncate_error = False <NEW_LINE> @classmethod <NEW_LINE> def using(cls, truncate_error=None, **kwds): <NEW_LINE> <INDENT> subcls = super(TruncateMixin, cls).using(**kwds) <NEW_LINE> if truncate_error is not None: <NEW_LINE> <INDENT> truncate_error = as_bool(trun... | PasswordHash mixin which provides a method
that will check if secret would be truncated,
and can be configured to throw an error. | 62598f9c2c8b7c6e89bd358d |
class JSONField(models.TextField): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> if "default" not in kwargs: <NEW_LINE> <INDENT> kwargs["default"] = {} <NEW_LINE> <DEDENT> super().__init__(**kwargs) <NEW_LINE> <DEDENT> def to_python(self, value): <NEW_LINE> <INDENT> if not value: <NEW_LINE> <IND... | JSON serializaed TextField. | 62598f9c8da39b475be02fa1 |
class KeyCommand(Command): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> store = self.option('store') <NEW_LINE> key = bytes(Fernet.generate_key()).decode('utf-8') <NEW_LINE> if store: <NEW_LINE> <INDENT> with open('.env', 'r') as file: <NEW_LINE> <INDENT> data = file.readlines() <NEW_LINE> <DEDENT> for lin... | Generate a new key.
key
{--s|--store : Stores the key in the .env file} | 62598f9cb7558d58954633eb |
class http_parameter_required(object): <NEW_LINE> <INDENT> def __init__(self, request_method, parameter_name, human_readable_name ): <NEW_LINE> <INDENT> self.request_method = request_method <NEW_LINE> self.parameter_name = parameter_name <NEW_LINE> self.human_readable_name = human_readable_name <NEW_LINE> <DEDENT> def ... | Applied to a request handler to ensure a specified parameter is supplied with the request | 62598f9c009cb60464d012e1 |
class mainPage(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.scraper = DBAScraper() <NEW_LINE> self.trainer = machineLearning() <NEW_LINE> <DEDENT> def scrape(self): <NEW_LINE> <INDENT> self.scraper.scrape_dba() <NEW_LINE> <DEDENT> def train(self): <NEW_LINE> <INDENT> print("######################... | Handle CLI GUI/ Main menu. | 62598f9c0a50d4780f705195 |
class LogOutput: <NEW_LINE> <INDENT> def __init__(self, live): <NEW_LINE> <INDENT> self.live = live <NEW_LINE> self.stdout = [] <NEW_LINE> self.stderr = [] <NEW_LINE> <DEDENT> def log_stdout(self, line): <NEW_LINE> <INDENT> if self.live: <NEW_LINE> <INDENT> logging.info(line.strip()) <NEW_LINE> <DEDENT> self.stdout.app... | Handles the log output of executed applications | 62598f9c32920d7e50bc5e12 |
@register_relay_node <NEW_LINE> class ModulePass(Pass): <NEW_LINE> <INDENT> pass | A pass that works on tvm.relay.Module. Users don't need to interact with
this class directly. Instead, a module pass should be created through
`module_pass`, because the design of the `module_pass` API is flexible
enough to handle the creation of a module pass in different manners. In
addition, all members of a module ... | 62598f9c442bda511e95c218 |
class RegistrationProfile(models.Model): <NEW_LINE> <INDENT> ACTIVATED = u"CONFIRMADO" <NEW_LINE> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) <NEW_LINE> activation_key = models.CharField(_('activation key'), max_length=40) <NEW_LINE> objects = RegistrationManager() <NEW_LINE> class Meta: <NEW_LI... | A simple profile which stores an activation key for use during
user account registration.
Generally, you will not want to interact directly with instances
of this model; the provided manager includes methods
for creating and activating new accounts, as well as for cleaning
out accounts which have never been activated.... | 62598f9c004d5f362081eedb |
class Symbol(AbstractCachedSymbol): <NEW_LINE> <INDENT> is_Symbol = True <NEW_LINE> @classmethod <NEW_LINE> def __dtype_setup__(cls, **kwargs): <NEW_LINE> <INDENT> return kwargs.get('dtype', np.int32) | A :class:`sympy.Symbol` capable of mimicking an :class:`sympy.Indexed` | 62598f9c3539df3088ecc072 |
class Match(object): <NEW_LINE> <INDENT> def __init__(self, match_results): <NEW_LINE> <INDENT> if match_results.shape.ndims != 1: <NEW_LINE> <INDENT> raise ValueError('match_results should have rank 1') <NEW_LINE> <DEDENT> if match_results.dtype != tf.int32: <NEW_LINE> <INDENT> raise ValueError('match_results should b... | Class to store results from the matcher.
This class is used to store the results from the matcher. It provides
convenient methods to query the matching results. | 62598f9ce64d504609df9296 |
class VolumeBarFn(beam.DoFn): <NEW_LINE> <INDENT> def __init__(self, threshold=10000): <NEW_LINE> <INDENT> beam.DoFn.__init__(self) <NEW_LINE> self.ticks_processed = Metrics.counter(self.__class__, 'ticks_processed') <NEW_LINE> self.buffer = 0 <NEW_LINE> self.threshold = threshold <NEW_LINE> <DEDENT> def process(self, ... | Parse the tick objects into volume bars | 62598f9c507cdc57c63a4b51 |
class ExtractError(MBSError): <NEW_LINE> <INDENT> def __init__(self, tar_cmd, return_code, cmd_output, cause): <NEW_LINE> <INDENT> msg = "Failed to extract source backup" <NEW_LINE> details = ("Failed to tar. Tar command '%s' returned a non-zero " "exit status %s. Command output:\n%s" % (tar_cmd, return_code, cmd_outpu... | Base error for archive errors | 62598f9c656771135c48943f |
class Glyph(_Glyph): <NEW_LINE> <INDENT> def __new__(cls, code: Union[Text, CharCode], fg_color: Color = None, bg_color: Color = None): <NEW_LINE> <INDENT> if not isinstance(code, CharCode): <NEW_LINE> <INDENT> code = CharCode(ord(code)) <NEW_LINE> <DEDENT> fg_color = color.WHITE if fg_color is None else Color(*fg_colo... | Represent a glyph
code -- a unicode code point or a character (str of length 1).
fg_color -- the foreground color of the glyph.
bg_color -- the background color of the glyph. | 62598f9c498bea3a75a578dd |
class main_parser(Parser): <NEW_LINE> <INDENT> def validate(self): <NEW_LINE> <INDENT> return len([1 for d in weather_terms if d in self.query]) <NEW_LINE> <DEDENT> def parse(self, parent): <NEW_LINE> <INDENT> if self.info.has_key("key"): <NEW_LINE> <INDENT> WEATHER_API_KEY = self.info["key"] <NEW_LINE> <DEDENT> else: ... | weather parser class | 62598f9c7d43ff24874272e0 |
class TestAutomationVerticalSplit(vertical_split.TestVerticalSplit): <NEW_LINE> <INDENT> def test_vertical_split(self): <NEW_LINE> <INDENT> worker_proc, _, worker_rpc_port = utils.run_vtworker_bg( ['--cell', 'test_nj'], auto_log=True) <NEW_LINE> vtworker_endpoint = 'localhost:' + str(worker_rpc_port) <NEW_LINE> automat... | End-to-end test for running a vertical split via the automation framework.
This test is a subset of vertical_split.py. The "VerticalSplitTask" automation
operation runs the major commands for a vertical split instead of calling them
"manually" from the test. | 62598f9c435de62698e9bbb1 |
class TestRight(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.db_session = init_testing_db() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.db_session.remove() <NEW_LINE> <DEDENT> def test_right_basic(self): <NEW_LINE> <INDENT> self.db_session.add(Right("read")) <NE... | Test of right | 62598f9c460517430c431f39 |
class Text: <NEW_LINE> <INDENT> def __init__(self, rect, size, color, screen, text): <NEW_LINE> <INDENT> self.screen = screen <NEW_LINE> self.rect = copy.deepcopy(rect) <NEW_LINE> self.text = text <NEW_LINE> self.color = color <NEW_LINE> self.font = pygame.font.SysFont(None, size) <NEW_LINE> self.text_image = None <NEW... | Draws a text to the screen. | 62598f9c91f36d47f2230d7e |
class Line(object): <NEW_LINE> <INDENT> def __init__(self, dictionary): <NEW_LINE> <INDENT> for k, v in dictionary.items(): <NEW_LINE> <INDENT> if isinstance(v, collections.Mapping): <NEW_LINE> <INDENT> dictionary[k] = self.__class__(v) <NEW_LINE> <DEDENT> <DEDENT> self.__dict__.update(dictionary) | The default user-defined "bunch" class, for lines in a log | 62598f9c44b2445a339b684b |
class DataProvider(BaseDataProvider): <NEW_LINE> <INDENT> channels = 1 <NEW_LINE> n_class = 3 <NEW_LINE> def __init__(self, nx, path, a_min=0, a_max=20, sigma=1): <NEW_LINE> <INDENT> super(DataProvider, self).__init__(a_min, a_max) <NEW_LINE> self.nx = nx <NEW_LINE> self.path = path <NEW_LINE> self.sigma = sigma <NEW_L... | Extends the BaseDataProvider to randomly select the next
chunk of the image and randomly applies transformations to the data | 62598f9cf548e778e596b369 |
class Solution: <NEW_LINE> <INDENT> def canJump(self, A): <NEW_LINE> <INDENT> if A is None or len(A)==0: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> farthest=A[0] <NEW_LINE> for i in range(len(A)): <NEW_LINE> <INDENT> if A[i]+i>=farthest: <NEW_LINE> <INDENT> farthest=A[i]+i <NEW_LINE> <DEDENT> <DEDENT> return fart... | @param A: A list of integers
@return: A boolean | 62598f9c8e7ae83300ee8e5d |
class LibvirtBaseVolumeDriver(object): <NEW_LINE> <INDENT> def __init__(self, connection, is_block_dev): <NEW_LINE> <INDENT> self.connection = connection <NEW_LINE> self.is_block_dev = is_block_dev <NEW_LINE> <DEDENT> def connect_volume(self, connection_info, disk_info): <NEW_LINE> <INDENT> conf = vconfig.LibvirtConfig... | Base class for volume drivers. | 62598f9c63d6d428bbee256f |
class CodeBlockProcessor(BlockProcessor): <NEW_LINE> <INDENT> def test(self, parent, block): <NEW_LINE> <INDENT> return block.startswith(' '*self.tab_length) <NEW_LINE> <DEDENT> def run(self, parent, blocks): <NEW_LINE> <INDENT> sibling = self.lastChild(parent) <NEW_LINE> block = blocks.pop(0) <NEW_LINE> theRest = '' <... | Process code blocks. | 62598f9c0c0af96317c56140 |
class File(AutotoolsPackage): <NEW_LINE> <INDENT> homepage = "http://www.darwinsys.com/file/" <NEW_LINE> url = "https://astron.com/pub/file/file-5.37.tar.gz" <NEW_LINE> version('5.40', sha256='167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57') <NEW_LINE> version('5.39', sha256='f05d286a76d9556243d0... | The file command is "a file type guesser", that is, a command-line
tool that tells you in words what kind of data a file contains | 62598f9cbaa26c4b54d4f06a |
class Figshare(DoiProvider): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.hosts = [ { "hostname": [ "https://figshare.com/articles/", "http://figshare.com/articles/", "https://figshare.com/account/articles/", ], "api": "https://api.figshare.com/v2/articles/", "filepath"... | Provide contents of a Figshare article.
See https://docs.figshare.com/#public_article for API docs.
Examples:
- https://doi.org/10.6084/m9.figshare.9782777
- https://doi.org/10.6084/m9.figshare.9782777.v2
- https://figshare.com/articles/binder-examples_requirements/9784088 (only one zipfile, no DOI) | 62598f9c379a373c97d98dd2 |
class TransactionalBank(object): <NEW_LINE> <INDENT> def __init__(self, factory): <NEW_LINE> <INDENT> self.logger = logging.getLogger("springpythontest.testSupportClasses.TransactionalBank") <NEW_LINE> self.dt = DatabaseTemplate(factory) <NEW_LINE> <DEDENT> def open(self, account_num): <NEW_LINE> <INDENT> self.logger.d... | This sample application can be used to demonstrate the value of atomic operations. The transfer operation
must be wrapped in a transaction in order to perform correctly. Otherwise, any errors in the deposit will
allow the from-account to leak assets. | 62598f9c8da39b475be02fa3 |
class PhraseAround(_Through): <NEW_LINE> <INDENT> def __init__(self, namespace_uri, localnames): <NEW_LINE> <INDENT> self._config = { 'namespace-uri': namespace_uri, 'localname': assert_list_of_type(localnames, str) } | A phrase around. | 62598f9ca05bb46b3848a63d |
class OscPacket(object): <NEW_LINE> <INDENT> def __init__(self, dgram): <NEW_LINE> <INDENT> now = time.time() <NEW_LINE> try: <NEW_LINE> <INDENT> if osc_bundle.OscBundle.dgram_is_bundle(dgram): <NEW_LINE> <INDENT> self._messages = sorted( _timed_msg_of_bundle(osc_bundle.OscBundle(dgram), now), key=lambda x: x.time) <NE... | Unit of transmission of the OSC protocol.
Any application that sends OSC Packets is an OSC Client.
Any application that receives OSC Packets is an OSC Server. | 62598f9c0a50d4780f705197 |
@deconstructible <NEW_LINE> class FileSystemFinder(BaseFinder): <NEW_LINE> <INDENT> def __init__(self, app_names=None, *args, **kwargs): <NEW_LINE> <INDENT> self.locations = [] <NEW_LINE> self.storages = OrderedDict() <NEW_LINE> if not isinstance(settings.STATICFILES_DIRS, (list, tuple)): <NEW_LINE> <INDENT> raise Impr... | A static files finder that uses the ``STATICFILES_DIRS`` setting
to locate files. | 62598f9c4f6381625f19939b |
class FemWorkbench (Workbench): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Fem/Resources/icons/preferences-fem.svg" <NEW_LINE> self.__class__.MenuText = "FEM" <NEW_LINE> self.__class__.ToolTip = "FEM workbench" <NEW_LINE> <DEDENT> def Initialize(sel... | Fem workbench object | 62598f9cb5575c28eb712bac |
class DeviceNotFound(FmAnalyserException): <NEW_LINE> <INDENT> pass | Raised when the system can't connect the device | 62598f9ceab8aa0e5d30bb43 |
class ParallelismTest(): <NEW_LINE> <INDENT> def __init__(self, use_dummy_version=False): <NEW_LINE> <INDENT> print('') <NEW_LINE> self.thread_number = 0 <NEW_LINE> if use_dummy_version: <NEW_LINE> <INDENT> print('Executing Parallel Threading Test:') <NEW_LINE> thread_pool = MultiThreadPool(10) <NEW_LINE> <DEDENT> else... | Parallel execution testing class.
To run threading as parallel processes, set "use_dummy_version" var to False.
To run threading as parallel threads on a single process, set "use_dummy_version" var to True. | 62598f9c99cbb53fe6830c90 |
class BuildFactory(util.ComparableMixin): <NEW_LINE> <INDENT> buildClass = Build <NEW_LINE> useProgress = 1 <NEW_LINE> workdir = "build" <NEW_LINE> compare_attrs = ['buildClass', 'steps', 'useProgress', 'workdir'] <NEW_LINE> def __init__(self, steps=None): <NEW_LINE> <INDENT> if steps is None: <NEW_LINE> <INDENT> steps... | @cvar buildClass: class to use when creating builds
@type buildClass: L{buildbot.process.base.Build} | 62598f9cfff4ab517ebcd5ac |
class RBF (Stationary): <NEW_LINE> <INDENT> def __init__(self,n_dims,variance=1.,lengthscale=1.,active_dims=None,name=None): <NEW_LINE> <INDENT> super(RBF, self).__init__( n_dims=n_dims, active_dims=active_dims, name=name) <NEW_LINE> logger.debug('Initializing %s kernel.' % self.name) <NEW_LINE> asse... | squared exponential kernel with the same shape parameter in each dimension | 62598f9c851cf427c66b8086 |
class RMS(Variance) : <NEW_LINE> <INDENT> def __init__ ( self , xmin , xmax , err = False ) : <NEW_LINE> <INDENT> Variance.__init__ ( self , xmin , xmax , err ) <NEW_LINE> <DEDENT> def __call__ ( self , func , *args ) : <NEW_LINE> <INDENT> args = args if args else self._args <NEW_LINE> var2 = Variance.__call__ ( self... | Calculate the RMS for the distribution or function
>>> xmin,xmax = 0,math.pi
>>> rms = RMS ( xmin,xmax ) ## specify min/max
>>> value = rms ( math.sin ) | 62598f9ca17c0f6771d5bff9 |
class Sine(DataGenerator): <NEW_LINE> <INDENT> def __init__(self,phase=0.0,frequency=1.,amplitude=1.,sampling_frequency=1.,*args,**kwargs): <NEW_LINE> <INDENT> self.phase = phase <NEW_LINE> self.frequency = frequency <NEW_LINE> self.amplitude = amplitude <NEW_LINE> super(Sine,self).__init__(sampling_frequency=sampling_... | Generates a sine wave | 62598f9ca219f33f346c65d8 |
class CurveHelperNoiseProperties(bpy.types.PropertyGroup) : <NEW_LINE> <INDENT> blend_items = [ ('REPLACE', 'Replace', ""), ('ADD', 'Add', ""), ('SUBSTRACT', 'Substract', ""), ('MULTIPLY', 'Multiply', ""), ] <NEW_LINE> blend_type : bpy.props.EnumProperty(name = "Blend Type", items = blend_items) <NEW_LINE> scale : bpy.... | name : StringProperty() | 62598f9c7047854f4633f1a1 |
class Fin(MecaComponent): <NEW_LINE> <INDENT> def __init__(self, doc, name='fin'): <NEW_LINE> <INDENT> self.data = { 'len': 365., 'e': 222., 'p': 55., 'm': 255., 'thick': 3., } <NEW_LINE> shape = [] <NEW_LINE> shape.append(Vector(0, 0, 0)) <NEW_LINE> shape.append(Vector(0, 0, self.data['len'])) <NEW_LINE> shape.append(... | make a fin | 62598f9cf7d966606f747da6 |
class Template(grok.Adapter): <NEW_LINE> <INDENT> grok.context(interfaces.IPossibleTemplate) <NEW_LINE> grok.implements(interfaces.ITemplate) <NEW_LINE> def compile(self, content): <NEW_LINE> <INDENT> return zope.component.getMultiAdapter( (content, ITemplateConfiguration(self.context)), interfaces.ICompilationStrategy... | A template.
This object extracts configuration from a possible template and
delegates to a compilation strategy. | 62598f9c38b623060ffa8e50 |
class SmallModulesChecker(BaseChecker): <NEW_LINE> <INDENT> __implements__ = IAstroidChecker <NEW_LINE> name = 'small-modules' <NEW_LINE> priority = -1 <NEW_LINE> msgs = { 'R1273': ('Too many classes in module "%s" (%s/%s classes)', 'too-many-classes', 'Object Calisthenics Rule 7'), } <NEW_LINE> options = () <NEW_LINE>... | checks for modules to have less than number of classes. | 62598f9c8e7ae83300ee8e5e |
class LinearModel(object): <NEW_LINE> <INDENT> def __init__(self, game, config): <NEW_LINE> <INDENT> self.state_depth, self.board_x, self.board_y = game.board.state.shape <NEW_LINE> self.put_action_size = game.get_placement_action_size() <NEW_LINE> self.capture_action_size = game.get_capture_action_size() <NEW_LINE> se... | A linear model takes in a state and estimates the corresponding pi_put, pi_capture and v | 62598f9c21a7993f00c65d41 |
class LibvirtBridgeDriver(vif.VIFDriver): <NEW_LINE> <INDENT> def _get_configurations(self, instance, network, mapping): <NEW_LINE> <INDENT> mac_id = mapping['mac'].replace(':', '') <NEW_LINE> conf = vconfig.LibvirtConfigGuestInterface() <NEW_LINE> conf.net_type = "bridge" <NEW_LINE> conf.mac_addr = mapping['mac'] <NEW... | VIF driver for Linux bridge. | 62598f9c0a50d4780f705198 |
class SubjectData(object): <NEW_LINE> <INDENT> def __init__(self, log=None, subjects=None, version=None): <NEW_LINE> <INDENT> self.swagger_types = { 'log': 'list[str]', 'subjects': 'list[Subject]', 'version': 'str' } <NEW_LINE> self.attribute_map = { 'log': 'log', 'subjects': 'subjects', 'version': 'version' } <NEW_LIN... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f9c30bbd72246469856 |
class StatsAggregator(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._resource = gen_dataset_ops.stats_aggregator_handle() <NEW_LINE> <DEDENT> def get_summary(self): <NEW_LINE> <INDENT> return gen_dataset_ops.stats_aggregator_summary(self._resource) | A stateful resource that aggregates statistics from one or more iterators.
To record statistics, use one of the custom transformation functions defined
in this module when defining your `tf.data.Dataset`. All statistics will be
aggregated by the `StatsAggregator` that is associated with a particular
iterator (see belo... | 62598f9c0c0af96317c56142 |
class IS_SPX(object): <NEW_LINE> <INDENT> pack_s = struct.Struct('4B2I4B') <NEW_LINE> def unpack(self, data): <NEW_LINE> <INDENT> self.Size, self.Type, self.ReqI, self.PLID, self.STime, self.ETime, self.Split, self.Penalty, self.NumStops, self.Sp3 = self.pack_s.unpack(data) <NEW_LINE> return self | SPlit X time
| 62598f9cd6c5a102081e1f04 |
class EventType(models.Model): <NEW_LINE> <INDENT> abbr = models.CharField(_('abbreviation'), max_length=4, unique=True) <NEW_LINE> label = models.CharField(_('label'), max_length=50) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = _('event type') <NEW_LINE> verbose_name_plural = _('event types') <NEW_LINE> <... | Simple ``Event`` classification. | 62598f9cd7e4931a7ef3be58 |
class VoronoiTransformer(object): <NEW_LINE> <INDENT> def __init__(self, triangulation): <NEW_LINE> <INDENT> self.triangulation = triangulation <NEW_LINE> <DEDENT> def transform(self): <NEW_LINE> <INDENT> self.centers = {} <NEW_LINE> for t in self.triangulation.triangles: <NEW_LINE> <INDENT> self.centers[id(t)] = self.... | Class to transform a Delaunay triangulation into a Voronoi diagram
| 62598f9c45492302aabfc298 |
class Solution: <NEW_LINE> <INDENT> def Power(self, base, exponent): <NEW_LINE> <INDENT> return pow(base, exponent) <NEW_LINE> <DEDENT> def Power1(self, base, exponent): <NEW_LINE> <INDENT> if exponent != int(exponent): <NEW_LINE> <INDENT> print('错误的输入!') <NEW_LINE> return None <NEW_LINE> <DEDENT> if equal(base, 0.0): ... | 题目说明:给定一个double类型的浮点数base和int类型的整数exponent。求base的exponent次方。
思路:需要考虑底数是0,指数为0或者负数的情况。 | 62598f9c56b00c62f0fb2670 |
class PubSubChannelSubscribe(PubSubMessage): <NEW_LINE> <INDENT> __slots__ = ( "channel", "context", "user", "message", "emotes" "is_gift", "recipient", "sub_plan", "sub_plan_name", "time", "cumulative_months", "streak_months", "multi_month_duration", ) <NEW_LINE> def __init__(self, client: Client, topic: str, data: di... | Channel subscription
Attributes
-----------
channel: :class:`twitchio.Channel`
Channel that has been subscribed or subgifted.
context: :class:`str`
Event type associated with the subscription product.
user: :class:`twitchio.PartialUser`
The person who subscribed or sent a gift subscription.
message: :class... | 62598f9ce5267d203ee6b6cd |
class DatabaseRequest(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> lazy_import() <NEW_LINE> return { 'name': (MultiLingualStrin... | 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... | 62598f9c379a373c97d98dd4 |
class TestConflictError(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return ConflictError( er... | ConflictError unit test stubs | 62598f9c8da39b475be02fa5 |
class AFNICommand(AFNICommandBase): <NEW_LINE> <INDENT> input_spec = AFNICommandInputSpec <NEW_LINE> _outputtype = None <NEW_LINE> def __init__(self, **inputs): <NEW_LINE> <INDENT> super(AFNICommand, self).__init__(**inputs) <NEW_LINE> self.inputs.on_trait_change(self._output_update, 'outputtype') <NEW_LINE> if self._o... | Shared options for several AFNI commands | 62598f9cc432627299fa2d98 |
class ProjectInformation(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ProjectInformation, self).__init__() <NEW_LINE> self.include_directories = [] <NEW_LINE> self.library_name = None <NEW_LINE> self.library_names = [] <NEW_LINE> self.library_version = None <NEW_LINE> self._ReadConfigureAc... | Class to define the project information. | 62598f9ccb5e8a47e493c054 |
class StructuredDataRegressor(SupervisedStructuredDataPipeline): <NEW_LINE> <INDENT> def __init__(self, column_names: Optional[List[str]] = None, column_types: Optional[Dict[str, str]] = None, output_dim: Optional[int] = None, loss: types.LossType = 'mean_squared_error', metrics: Optional[types.MetricsType] = None, nam... | AutoKeras structured data regression class.
# Arguments
column_names: A list of strings specifying the names of the columns. The
length of the list should be equal to the number of columns of the data
excluding the target column. Defaults to None. If None, it will obtained
from the header o... | 62598f9c009cb60464d012e5 |
class SMWinservice(win32serviceutil.ServiceFramework): <NEW_LINE> <INDENT> _svc_name_ = 'pythonService' <NEW_LINE> _svc_display_name_ = 'Python Service' <NEW_LINE> _svc_description_ = 'Python Service Description' <NEW_LINE> @classmethod <NEW_LINE> def parse_command_line(cls): <NEW_LINE> <INDENT> win32serviceutil.Handle... | Base class to create winservice in Python | 62598f9ceab8aa0e5d30bb45 |
class AccessionViewSet( OrgReadViewMixin, mixins.ListModelMixin, mixins.RetrieveModelMixin, mixins.UpdateModelMixin, viewsets.GenericViewSet, ): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> queryset = Accession.objects.all().order_by("-created") <NEW_LINE> if not self.request.user.is_archivist(): <NE... | Endpoint for Accessions | 62598f9c925a0f43d25e7dfd |
class EventHubConsumerGroupsListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[EventHubConsumerGroupInfo]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, ... | The JSON-serialized array of Event Hub-compatible consumer group names with a next link.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of consumer groups objects.
:vartype value: list[~azure.mgmt.iothub.v2021_07_01.models.EventHubConsumerGroupInfo]
:ivar nex... | 62598f9c63d6d428bbee2572 |
class BaseRecipeAttrViewSet(viewsets.GenericViewSet, mixins.ListModelMixin, mixins.CreateModelMixin): <NEW_LINE> <INDENT> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> assigned_only = bool( int(self.request.query... | Base viewset for user owned recipe attributes | 62598f9cbe383301e02535b5 |
@task(ignore_result=True) <NEW_LINE> class JobFactoryManager(Task): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.factory = JobFactory() <NEW_LINE> <DEDENT> def run(self, *args, **kwargs): <NEW_LINE> <INDENT> self.factory.initialize_job(*args, **kwargs) | Manages factories handling Job initialization (from db entry). | 62598f9ccc0a2c111447adcc |
class ExecutionLog(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'execution_log' <NEW_LINE> id = db.Column(db.Integer(), primary_key=True) <NEW_LINE> text = db.Column(db.Text()) <NEW_LINE> level = db.Column(db.String(80), nullable=False, default='DEBUG') <NEW_LINE> register_date = db.Column(db.DateTime(), default=date... | ExecutionLog Model | 62598f9c2ae34c7f260aaea2 |
class PasswordResetForm(django_forms.PasswordResetForm): <NEW_LINE> <INDENT> def get_users(self, email): <NEW_LINE> <INDENT> active_users = User.objects.filter(email__iexact=email, is_active=True) <NEW_LINE> return active_users <NEW_LINE> <DEDENT> def send_mail( self, subject_template_name, email_template_name, context... | Allow resetting passwords.
This subclass overrides sending emails to use templated email. | 62598f9cd99f1b3c44d05470 |
class TotalItemCountResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'total_item_count': 'int' } <NEW_LINE> attribute_map = { 'total_item_count': 'total_item_count' } <NEW_LINE> required_args = { } <NEW_LINE> def __init__( self, total_item_count=None, ): <NEW_LINE> <INDENT> if total_item_count is not None: <NEW_... | Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62598f9cd7e4931a7ef3be59 |
class AsynchronousFileReader(CustomThread): <NEW_LINE> <INDENT> def __init__(self, fd, _queue): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> assert isinstance(_queue, queue.Queue) <NEW_LINE> assert callable(fd.readline) <NEW_LINE> self._fd = fd <NEW_LINE> self._queue = _queue <NEW_LINE> self.is_running = False <NE... | Helper class to implement asynchronous reading of a file
in a separate thread. Pushes read lines on a queue to
be consumed in another thread. | 62598f9c01c39578d7f12b3e |
class StateMachine(ABC): <NEW_LINE> <INDENT> state: State <NEW_LINE> states: Type[State] <NEW_LINE> actions: Dict[State, Callable[[], State]] <NEW_LINE> __should_halt: bool = False <NEW_LINE> def next(self) -> State: <NEW_LINE> <INDENT> previous_state = self.state <NEW_LINE> try: <NEW_LINE> <INDENT> if self.__should_ha... | Base class for a finite state machine implementation. | 62598f9c5f7d997b871f92bf |
class OracleSpatialRefSys(models.Model, SpatialRefSysMixin): <NEW_LINE> <INDENT> cs_name = models.CharField(max_length=68) <NEW_LINE> srid = models.IntegerField(primary_key=True) <NEW_LINE> auth_srid = models.IntegerField() <NEW_LINE> auth_name = models.CharField(max_length=256) <NEW_LINE> wktext = models.CharField(max... | Maps to the Oracle MDSYS.CS_SRS table. | 62598f9c55399d3f056262e2 |
class CleanCssFilter(CompilerFilter): <NEW_LINE> <INDENT> command = "cleancss" | Compress CSS with clean-css
Requires cleancss to be available in the $PATH: https://github.com/jakubpawlowicz/clean-css | 62598f9c85dfad0860cbf955 |
@registry.register_model <NEW_LINE> class NextFrameBasicStochasticDiscrete( basic_deterministic.NextFrameBasicDeterministic): <NEW_LINE> <INDENT> def inject_latent(self, layer, features, filters): <NEW_LINE> <INDENT> del filters <NEW_LINE> hparams = self.hparams <NEW_LINE> final_filters = common_layers.shape_list(layer... | Basic next-frame model with a tiny discrete latent. | 62598f9cbe8e80087fbbee20 |
class GLIMPS_Writer: <NEW_LINE> <INDENT> def __init__(self, stdout_messenger, stderr_messenger): <NEW_LINE> <INDENT> self.stdout_messenger = stdout_messenger <NEW_LINE> self.stderr_messenger = stderr_messenger <NEW_LINE> <DEDENT> def write(self, s): <NEW_LINE> <INDENT> if __name__ == '__main__': <NEW_LINE> <INDENT> sys... | Class to pipe stdout and sterr to parent process in asyncrounous threads | 62598f9c627d3e7fe0e06c6c |
class _RLock: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._block = _allocate_lock() <NEW_LINE> self._owner = None <NEW_LINE> self._count = 0 <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> owner = self._owner <NEW_LINE> try: <NEW_LINE> <INDENT> owner = _active[owner].name <NEW_LINE> <DE... | This class implements reentrant lock objects.
A reentrant lock must be released by the thread that acquired it. Once a
thread has acquired a reentrant lock, the same thread may acquire it
again without blocking; the thread must release it once for each time it
has acquired it. | 62598f9c8e7ae83300ee8e61 |
class GlobalOperationsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'globalOperations' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(ComputeAlpha.GlobalOperationsService, self).__init__(client) <NEW_LINE> self._method_configs = { 'AggregatedList': base_api.ApiMethodInfo( http_method=... | Service class for the globalOperations resource. | 62598f9cbd1bec0571e14fa4 |
class BasicReplay: <NEW_LINE> <INDENT> def __init__(self, state_shape, policy_size, capacity=50000): <NEW_LINE> <INDENT> self.policy_size = policy_size <NEW_LINE> self._capacity = 50000 <NEW_LINE> self._insertion_index = 0 <NEW_LINE> self._states = np.zeros([self._capacity, *state_shape]) <NEW_LINE> self._policy_values... | A basic replay table.
Stores state, policy-value and state-value information in numpy arrays.
Can be used as a generator to randomly select from the replay table. | 62598f9c7d847024c075c193 |
class CaPPBuilder(_PPBuilder): <NEW_LINE> <INDENT> def __init__(self, radius=4.3): <NEW_LINE> <INDENT> _PPBuilder.__init__(self, radius) <NEW_LINE> <DEDENT> def _is_connected(self, prev_res, next_res): <NEW_LINE> <INDENT> for r in [prev_res, next_res]: <NEW_LINE> <INDENT> if not r.has_id("CA"): <NEW_LINE> <INDENT> retu... | Use CA--CA distance to find polypeptides. | 62598f9c15baa72349461d46 |
class HongbaoFullBackRule: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.DOUBLE, 'full_amount', None, None, ), (2, TType.DOUBLE, 'back_amount', None, None, ), ) <NEW_LINE> def __init__(self, full_amount=None, back_amount=None,): <NEW_LINE> <INDENT> self.full_amount = full_amount <NEW_LINE> self.back_amount = back... | Attributes:
- full_amount
- back_amount | 62598f9c67a9b606de545d8b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.