code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class TritonBrowser(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._tree4url = make_tree4url() <NEW_LINE> <DEDENT> @property <NEW_LINE> def _url_of_schedule(self): <NEW_LINE> <INDENT> tree, _url = self._tree4url(TRITONLINK_HOME_URL) <NEW_LINE> return schedule_of_classes_hrefs(tree)[0] <NEW_LI... | Used to programmatically browse TritonLink's Schedule of Classes. | 62599051d486a94d0ba2d477 |
class UpnpStatusBinarySensor(UpnpEntity, BinarySensorEntity): <NEW_LINE> <INDENT> _attr_device_class = DEVICE_CLASS_CONNECTIVITY <NEW_LINE> def __init__( self, coordinator: UpnpDataUpdateCoordinator, entity_description: UpnpBinarySensorEntityDescription, ) -> None: <NEW_LINE> <INDENT> super().__init__(coordinator=coord... | Class for UPnP/IGD binary sensors. | 625990513cc13d1c6d466bec |
class MultiHeadedAttention(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_heads, d_model, dropout=0.1): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> assert d_model % num_heads == 0 <NEW_LINE> self.d_k = d_model // num_heads <NEW_LINE> self.num_heads = num_heads <NEW_LINE> self.linear_layers = nn.ModuleList... | Take in model size and number of heads. | 62599051ac7a0e7691f7398f |
class ProductionConfig(Config): <NEW_LINE> <INDENT> SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or 'sqlite:///' + os.path.join(basedir,'data.sqlite') | 生产环境 | 6259905155399d3f056279cd |
class Module(containers.DeclarativeContainer): <NEW_LINE> <INDENT> config = configparser.ConfigParser() <NEW_LINE> config.read('config.ini') <NEW_LINE> configuration = providers.Object(config) <NEW_LINE> rofex_client = providers.Singleton(RofexClient, config=config) <NEW_LINE> rofex_facade = providers.Singleton(RofexFa... | IoC container of engine providers. | 62599051dc8b845886d54a71 |
class res_partner(osv.osv): <NEW_LINE> <INDENT> _inherit = 'res.partner' <NEW_LINE> _columns = { 'name_prefix':fields.many2one('config.preffix', 'Prefix'), 'lastname':fields.char('Lastname', size=128), 'firstname':fields.char('Firstname', size=128), 'middlename':fields.char('Middle Name', size=128), 'name_sufix':fields... | OpenERP Model : Res Partner Information | 6259905124f1403a92686327 |
class SettingsNotConfigured(Exception): <NEW_LINE> <INDENT> def __init__(self, missing_setting: str = 'Unknown', comment: str = 'None'): <NEW_LINE> <INDENT> self.missing = missing_setting <NEW_LINE> self.comment = comment <NEW_LINE> super().__init__() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if self.m... | Is raised when the settings file is missing information | 62599051498bea3a75a58fd4 |
class APIRequestFailureException(Exception): <NEW_LINE> <INDENT> pass | Indicates that a request to external API has failed
Arguments:
Exception {[type]} -- Exception class | 6259905107d97122c4218158 |
class UserCreateView(CreateView): <NEW_LINE> <INDENT> model = User <NEW_LINE> form_class = UserCreationForm <NEW_LINE> template_name = 'signup.html' <NEW_LINE> def form_valid(self, form): <NEW_LINE> <INDENT> form.save() <NEW_LINE> user = authenticate(username=form.cleaned_data.get('username'), password=form.cleaned_dat... | A view that creates a new user, logs them in, and redirects them to the
root URL. | 6259905130dc7b76659a0cd6 |
class LiamsGame(Game): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(LiamsGame, self).__init__() <NEW_LINE> self._name = name <NEW_LINE> self._gameobjects = [] <NEW_LINE> self._font = pygame.font.Font(None, 24) <NEW_LINE> self.pause_surface = pygame.Surface( (self._screen.get_size()[0] / 3, se... | need documentation | 62599051d6c5a102081e35cc |
class Character: <NEW_LINE> <INDENT> def __init__(self, name, age, height, weight): <NEW_LINE> <INDENT> self.race = "Generic Character" <NEW_LINE> self.intelligence = random.randrange(8, 18) <NEW_LINE> self.strength = random.randrange(8, 18) <NEW_LINE> self.dexterity = random.randrange(8, 18) <NEW_LINE> self.wisdom = r... | Common base class for any type of character | 625990518e7ae83300eea546 |
class Middleware(Application): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def factory(cls, global_config, **local_config): <NEW_LINE> <INDENT> def _factory(app): <NEW_LINE> <INDENT> return cls(app, **local_config) <NEW_LINE> <DEDENT> return _factory <NEW_LINE> <DEDENT> def __init__(self, application): <NEW_LINE> <INDE... | Base WSGI middleware.
These classes require an application to be
initialized that will be called next. By default the middleware will
simply call its wrapped app, or you can override __call__ to customize its
behavior. | 625990513eb6a72ae038bb0f |
class KattisClient: <NEW_LINE> <INDENT> HEADERS = {'User-Agent': 'kattis-cli-submit'} <NEW_LINE> @staticmethod <NEW_LINE> def create_from_config(kattis_config): <NEW_LINE> <INDENT> if kattis_config is None: <NEW_LINE> <INDENT> raise KattisClientException( "No config provided. Make sure you are not passing None values")... | A client for executing Kattis requests | 625990514e4d5625663738c3 |
class SteamWishlistDataUpdateCoordinator(DataUpdateCoordinator): <NEW_LINE> <INDENT> def __init__(self, hass: core.HomeAssistant, url: str): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.steam_id = self.url.split("/")[-3] <NEW_LINE> self.http_session = async_get_clientsession(hass) <NEW_LINE> super().__init__( has... | Data update coordinator for all steam_wishlist entities.
This class handles updating for all entities created by this component.
Since all data required to update all sensors and binary_sensors comes
from a single api endpoint, this will handle fetching that data. This way
each entity doesn't need to fetch the exact ... | 6259905191af0d3eaad3b2d9 |
class AcceptAll(Test): <NEW_LINE> <INDENT> def why_not(self, _: Globals, subject: Data) -> str: <NEW_LINE> <INDENT> return '' | Every value passes this test | 6259905130c21e258be99cba |
class OrgView(View): <NEW_LINE> <INDENT> def get(self,request): <NEW_LINE> <INDENT> return render(request,"org-list.html") | 课程机构 | 6259905107d97122c4218159 |
class PySparseSGD(mx.optimizer.Optimizer): <NEW_LINE> <INDENT> def __init__(self, learning_rate=0.01, momentum=0.0, **kwargs): <NEW_LINE> <INDENT> super(PySparseSGD, self).__init__(learning_rate=learning_rate, **kwargs) <NEW_LINE> self.momentum = momentum <NEW_LINE> <DEDENT> def create_state(self, index, weight): <NEW_... | python reference implemenation of sgd | 62599051b57a9660fecd2f31 |
class Rectangle(BaseGeometry): <NEW_LINE> <INDENT> def __init__(self, width, height): <NEW_LINE> <INDENT> self.__width = width <NEW_LINE> self.__height = height <NEW_LINE> self.integer_validator('width', width) <NEW_LINE> self.integer_validator('height', height) | rectangle class | 625990513c8af77a43b68998 |
class PublishArchiveIndex(PublishArchivePage, ArchiveIndexView): <NEW_LINE> <INDENT> def get_page_title(self): <NEW_LINE> <INDENT> return "%s, Archive - %s" % (self.picker.name, self.picker.commune.name) <NEW_LINE> <DEDENT> def get_template_names(self): <NEW_LINE> <INDENT> tpl_list = ( "{0:>s}/newsengine/archive/{1:>s}... | Archive index view for :model:`newsengine.Publish`, populated by a :model:`conduit.DynamicPicker` | 625990518e71fb1e983bcf7a |
class ClusterUpgradeDescriptionObject(Model): <NEW_LINE> <INDENT> _attribute_map = { 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, 'code_version': {'key': 'CodeVersion', 'type': 'str'}, 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str... | Represents a ServiceFabric cluster upgrade.
:param config_version:
:type config_version: str
:param code_version:
:type code_version: str
:param upgrade_kind: Possible values include: 'Invalid', 'Rolling'.
Default value: "Rolling" .
:type upgrade_kind: str or :class:`enum <azure.servicefabric.models.enum>`
:param rol... | 625990513cc13d1c6d466bee |
class Operation(models.Model): <NEW_LINE> <INDENT> operation_name = models.CharField(max_length=128) <NEW_LINE> operation_description = models.TextField(max_length=256, null=True, blank=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.operation_name | Catalogo de operaciones
Registro de las diferentes acciones que pueden hacer sobre un objeto
(view, create, delete, update, otros) | 62599051097d151d1a2c2526 |
class _DiskImage(object): <NEW_LINE> <INDENT> tmp_prefix = 'openstack-disk-mount-tmp' <NEW_LINE> def __init__(self, image, partition=None, mount_dir=None): <NEW_LINE> <INDENT> self.partition = partition <NEW_LINE> self.mount_dir = mount_dir <NEW_LINE> self.image = image <NEW_LINE> self._mkdir = False <NEW_LINE> self._m... | Provide operations on a disk image file. | 6259905173bcbd0ca4bcb73f |
class AttributeAPIView(APIView): <NEW_LINE> <INDENT> model = None <NEW_LINE> serializer = None <NEW_LINE> def get(self, request, pk, *args, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> instance = self.model.objects.get(id=pk) <NEW_LINE> <DEDENT> except ObjectDoesNotExist: <NEW_LINE> <INDENT> return Response(... | Базовый класс vie для отображения атрибута по id, обновления и удаления записии
Для работы необходимо определить не абстрактный класс атрибута и его сериализатор | 62599051d99f1b3c44d06b50 |
class TestPubSubPubSubSubcommands(object): <NEW_LINE> <INDENT> @skip_if_redis_py_version_lt('2.10.6') <NEW_LINE> def test_pubsub_channels(self, r): <NEW_LINE> <INDENT> r.pubsub(ignore_subscribe_messages=True).subscribe('foo', 'bar', 'baz', 'quux') <NEW_LINE> channels = sorted(r.pubsub_channels()) <NEW_LINE> assert chan... | Test Pub/Sub subcommands of PUBSUB
@see https://redis.io/commands/pubsub | 62599051a219f33f346c7cb6 |
class ComprehensiveTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.pf = NavTrajectoryOpt() <NEW_LINE> self.dt = 0.005 <NEW_LINE> self.ins = SimpleINSComputer() <NEW_LINE> self.ins.dt = self.dt <NEW_LINE> init_state = self.pf.init_state() <NEW_LINE> self.ins.set_state(init_state) <... | Test each method in SimpleINSComputer. | 62599051009cb60464d029ef |
class ModerationTranslationTaskEditCreateView(UpdateAPIView): <NEW_LINE> <INDENT> permission_classes = [IsAdminUser] <NEW_LINE> lookup_field = "id" <NEW_LINE> queryset = TranslationTask.objects.all() <NEW_LINE> serializer_class = TranslationTaskWithDataSerializer <NEW_LINE> def update(self, request, id=None, *args, **k... | Update TranslationTask view for Moderator | 62599051596a897236129009 |
class IMAPConnection: <NEW_LINE> <INDENT> def __init__(self, host, port, enc): <NEW_LINE> <INDENT> self.conn = imaplib.IMAP4_SSL(host, port) <NEW_LINE> self.enc = enc <NEW_LINE> self.mailbox = "INBOX" <NEW_LINE> self.uid_cache = {} <NEW_LINE> <DEDENT> def login(self, user, passwd): <NEW_LINE> <INDENT> self.conn.login(u... | Class that manages a connection to an IMAP server
| 6259905123e79379d538d9ac |
class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> ACCOUNT_NAME_INVALID = "AccountNameInvalid" <NEW_LINE> ALREADY_EXISTS = "AlreadyExists" | The reason that a vault name could not be used. The Reason element is only returned if
NameAvailable is false. | 6259905176d4e153a661dcd3 |
class ToolTipEventFilter(QtCore.QObject): <NEW_LINE> <INDENT> codes = None <NEW_LINE> code_text = None <NEW_LINE> annotations = None <NEW_LINE> def set_codes_and_annotations(self, code_text, codes, annotations): <NEW_LINE> <INDENT> self.code_text = code_text <NEW_LINE> self.codes = codes <NEW_LINE> self.annotations = a... | Used to add a dynamic tooltip for the textEdit.
The tool top text is changed according to its position in the text.
If over a coded section the codename is displayed in the tooltip.
Need to add av time segments to the code_text where relevant. | 625990512ae34c7f260ac59a |
class Restaurant(): <NEW_LINE> <INDENT> def __init__(self, restaurant_name, cuisine_type): <NEW_LINE> <INDENT> self.restaurant_name = restaurant_name <NEW_LINE> self.cuisine_type = cuisine_type <NEW_LINE> self.number_served = 0 <NEW_LINE> <DEDENT> def describe_restaurant(self): <NEW_LINE> <INDENT> print(self.restaurant... | class to define attributes for restaurant instances and indicate if they're open or not | 62599051462c4b4f79dbceb6 |
class Sentiment2Vec(X2Vec): <NEW_LINE> <INDENT> POSITIVE_SENTIMENT = "POSITIVE" <NEW_LINE> NEUTRAL_SENTIMENT = "NEUTRAL" <NEW_LINE> NEGATIVE_SENTIMENT = "NEGATIVE" <NEW_LINE> NEUTRAL_MARGIN = 0.15 <NEW_LINE> @staticmethod <NEW_LINE> def _get_sentence_tokens(sentence): <NEW_LINE> <INDENT> sentiment = Sentiment2Vec.NEUTR... | A word embedding model that generates different embeddings for identical words based on their meaning. | 6259905199cbb53fe683239b |
class EncryptedMessage(object): <NEW_LINE> <INDENT> implements(smtp.IMessage) <NEW_LINE> log = Logger() <NEW_LINE> def __init__(self, user, outgoing_mail): <NEW_LINE> <INDENT> leap_assert_type(user, smtp.User) <NEW_LINE> self._user = user <NEW_LINE> self._lines = [] <NEW_LINE> self._outgoing = outgoing_mail <NEW_LINE> ... | Receive plaintext from client, encrypt it and send message to a
recipient. | 6259905171ff763f4b5e8c5e |
class BaseModelAdmin(ModelAdmin): <NEW_LINE> <INDENT> form = AdminModelForm | Base class for ModelAdmins used across the site. | 6259905145492302aabfd98a |
class Forward(RelativeCompose): <NEW_LINE> <INDENT> SYNOPSIS = ('f', 'forward', 'message/forward', '[att] <messages>') <NEW_LINE> ORDER = ('Composing', 4) <NEW_LINE> HTTP_QUERY_VARS = { 'mid': 'metadata-ID', } <NEW_LINE> HTTP_POST_VARS = {} <NEW_LINE> def command(self): <NEW_LINE> <INDENT> session, config, idx = self.s... | Create forwarding drafts of one or more messages | 62599051d53ae8145f919913 |
class ResourceTemplates(object): <NEW_LINE> <INDENT> template_packages = [__name__] <NEW_LINE> @classmethod <NEW_LINE> def templates(cls): <NEW_LINE> <INDENT> templates = [] <NEW_LINE> dirname = cls.get_template_dir() <NEW_LINE> if dirname is not None: <NEW_LINE> <INDENT> for pkg in cls.template_packages: <NEW_LINE> <I... | Gets the templates associated w/ a containing cls. The cls must have a 'template_dir_name' attribute.
It finds the templates as directly in this directory under 'templates'. | 62599051b57a9660fecd2f33 |
class SphinxBaseFileInput(FileInput): <NEW_LINE> <INDENT> def __init__(self, app, env, *args, **kwds): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> self.env = env <NEW_LINE> warnings.warn('%s is deprecated.' % self.__class__.__name__, RemovedInSphinx30Warning, stacklevel=2) <NEW_LINE> kwds['error_handler'] = 'sphinx' ... | A base class of SphinxFileInput.
It supports to replace unknown Unicode characters to '?'. | 62599051e76e3b2f99fd9eb3 |
class TestTextInstance(DeepQaTestCase): <NEW_LINE> <INDENT> def tearDown(self): <NEW_LINE> <INDENT> super(TestTextInstance, self).tearDown() <NEW_LINE> TextInstance.tokenizer = tokenizers['words'](Params({})) <NEW_LINE> <DEDENT> def test_words_tokenizes_the_sentence_correctly(self): <NEW_LINE> <INDENT> t = TextClassifi... | The point of this test class is to test the TextEncoder used by the TextInstance, to be sure
that we get what we expect when using character encoders, or word-and-character encoders. | 625990513539df3088ecd758 |
class TennisSingleEliminationTournamentView(): <NEW_LINE> <INDENT> def print_SET_header(self): <NEW_LINE> <INDENT> print("*** Tennis Single Elimination Tournament Example ***") <NEW_LINE> <DEDENT> def print_players(self, players): <NEW_LINE> <INDENT> print("* Players *") <NEW_LINE> for player in players: <NEW_LINE> <IN... | View from MVC for TournamentTest in TennisTournament example. | 62599051dc8b845886d54a75 |
class Item(db.Model, CRUDMixin, MarshmallowMixin): <NEW_LINE> <INDENT> __schema__ = ItemSchema <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> unique = db.Column(db.String(255), unique=True, default=id_generator) <NEW_LINE> name = db.Column(db.String(255)) <NEW_LINE> description = db.Column(db.String... | Description.
:param int id: the database object identifier
:param str unique: alpha-numeric code for shorthand identifier
:param str name: what the item is called
:param int :
:param int :
:param int : | 6259905155399d3f056279d1 |
class MesosNetworkManager(object): <NEW_LINE> <INDENT> _mesos_network_manager = None <NEW_LINE> def __init__(self, args=None, mesos_api_connected=False, queue=None): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> if queue: <NEW_LINE> <INDENT> self.queue = queue <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.queue ... | Starts all background process | 62599051baa26c4b54d50762 |
class PriorityQueue(Queue): <NEW_LINE> <INDENT> def __init__(self, order=min, f=lambda x: x): <NEW_LINE> <INDENT> update(self, A=[], order=order, f=f) <NEW_LINE> <DEDENT> def append(self, item): <NEW_LINE> <INDENT> bisect.insort(self.A, (self.f(item), item)) <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> re... | A queue in which the minimum (or maximum) element (as determined by f and
order) is returned first. If order is min, the item with minimum f(x) is
returned first; if order is max, then it is the item with maximum f(x).
Also supports dict-like lookup. | 62599051f7d966606f749311 |
class MultiLineLabel(pg.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, path, size, text, color, rect_attr, bg=None, char_limit=42, align="left", vert_space=0): <NEW_LINE> <INDENT> attr = {"center": (0, 0)} <NEW_LINE> lines = wrap_text(text, char_limit) <NEW_LINE> labels = [Label(path, size, line, color, attr, b... | Create a single surface with multiple lines of text rendered on it. | 62599051009cb60464d029f1 |
class AttachmentTile(PersistentTile): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> self.update() <NEW_LINE> return self.index() <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def file_size(self, file_): <NEW_LINE> <INDENT> if INamed.providedBy(file_): <NEW_LINE> <INDEN... | Attachment tile.
This is a persistent tile which stores a file and optionally link
text. When rendered, the tile will output an <a /> tag like::
<a href="http://.../@@plone.app.standardtiles.attachment/tile-id/
@@download/filename.ext">Link text</a>
If the link text is not provided, the filename itself will be used.... | 6259905176d4e153a661dcd4 |
class ExperienceProviding(server.Thing): <NEW_LINE> <INDENT> def delete_operation(self, op): <NEW_LINE> <INDENT> aggressor = self.get_prop_string("__aggressor") <NEW_LINE> xp_provided = self.get_prop_float("xp_provided") <NEW_LINE> if aggressor and xp_provided: <NEW_LINE> <INDENT> return server.OPERATION_IGNORED, ... | Attached to entities that will gift "xp" to their attackers when killed. | 62599051d53ae8145f919915 |
class EntryMixin: <NEW_LINE> <INDENT> def getIdAndTitle(self, value): <NEW_LINE> <INDENT> portal_directories = getToolByName(self, 'portal_directories') <NEW_LINE> dir = getattr(portal_directories, self.directory) <NEW_LINE> if not value: <NEW_LINE> <INDENT> id = None <NEW_LINE> title = None <NEW_LINE> <DEDENT> else: <... | Mixin class that knows how to access id and title from
and entry, even if it's LDAP keyed by dn. | 62599051287bf620b62730a2 |
class CharactersLimitExceeded(TranslatorError): <NEW_LINE> <INDENT> def __init__(self, cause, message='Characters Limit Exceeded'): <NEW_LINE> <INDENT> self.cause = cause <NEW_LINE> self.message = message <NEW_LINE> super().__init__(self.cause, self.message) | Exception raised when the char limit has been exceeded. | 6259905163d6d428bbee3c85 |
class ESRowIterator(object): <NEW_LINE> <INDENT> def __init__(self, resultset, field_names): <NEW_LINE> <INDENT> self.resultset = resultset <NEW_LINE> self.field_names = field_names <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> record = self.resultset.__getitem__(index) <NEW_LINE> array = [] <NE... | Wrapper for ElasticSearch ResultSet to be able to return rows() as tuples and records() as
dictionaries | 62599051b830903b9686eed7 |
class ProjectAdmins(APIView): <NEW_LINE> <INDENT> @handle_exceptions_for_ajax <NEW_LINE> def post(self, request, project_id): <NEW_LINE> <INDENT> project = Project.objects.as_admin(request.user, project_id) <NEW_LINE> if project.islocked: <NEW_LINE> <INDENT> return Response( {'error': 'The project is locked. New admini... | API endpoints for all project administrators.
/ajax/projects/:project_id/admins | 625990518e71fb1e983bcf7e |
class CircularWindow(SlidingWindow): <NEW_LINE> <INDENT> def _customize(self): <NEW_LINE> <INDENT> self._indices_nan.extend(self._remove_corners(self.window_size)) <NEW_LINE> super()._customize() <NEW_LINE> <DEDENT> def _remove_corners(self, ny): <NEW_LINE> <INDENT> return [(0, 0), (0, ny - 1), (ny - 1, 0), (ny - 1, ny... | Modify the functionality of the SlidingWindow iterator extending the
customization to include a circular window, that is adding corners
element of window to be set as nan.
Examples
--------
Using iter and next (not usual)
>>> import numpy as np
>>> from sliding_window import CircularWindow
>>> grid = np.arange(25).res... | 62599051435de62698e9d2b7 |
class Downder: <NEW_LINE> <INDENT> def __init__(self, heads=None, retries=3, proxies=None, delay=3, timeout=30): <NEW_LINE> <INDENT> self.throttle = Throttle(delay) <NEW_LINE> self.retries = retries <NEW_LINE> self.heads = heads <NEW_LINE> self.proxies = proxies <NEW_LINE> self.delay = delay <NEW_LINE> self.timeout = t... | 下载类 | 6259905173bcbd0ca4bcb743 |
class SW_evap_from_surfacewater(flux_connection): <NEW_LINE> <INDENT> thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> _cmf_core.SW_evap_from_surfacewater_swiginit(self, ... | Connection for Shuttleworth-Wallace canopy interception evaporation.
C++ includes: ShuttleworthWallace.h | 62599051d99f1b3c44d06b54 |
class TestNewUpstreamVersion(Base): <NEW_LINE> <INDENT> expected_title = "anitya.project.version.update" <NEW_LINE> expected_subti = ('A new version of "2ping" has been detected: "2.1.1" ' 'in advance of "2.1.0", packaged as "2ping"') <NEW_LINE> expected_link = "https://release-monitoring.org/project/2/" <NEW_LINE> ex... | The purpose of anitya is to monitor upstream projects and to
try and detect when they release new tarballs.
*These* messages are the ones that get published when a tarball is found
that is newer than the one last seen in the `anitya
<https://release-monitoring.org>`_ database. | 62599051498bea3a75a58fda |
class GoalID(metaclass=Metaclass): <NEW_LINE> <INDENT> __slots__ = [ '_stamp', '_id', ] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> assert all(['_' + key in self.__slots__ for key in kwargs.keys()]), 'Invalid arguments passed to constructor: %r' % kwargs.keys() <NEW_LINE> from builtin_interf... | Message class 'GoalID'. | 6259905116aa5153ce4019a7 |
class UserProfile(AuditModel): <NEW_LINE> <INDENT> user = models.OneToOneField(User, on_delete=models.CASCADE) <NEW_LINE> phone_number = models.CharField(max_length=20, null=True, default=None) | Store additional information on users | 62599051b57a9660fecd2f36 |
class AutoBlogAction(SimpleItem): <NEW_LINE> <INDENT> implements(IAutoBlogAction, IRuleElementData) <NEW_LINE> enable_blogging = False <NEW_LINE> exclude_from_nav = False <NEW_LINE> enable_comments = False <NEW_LINE> element = 'collective.blogging.actions.AutoBlog' <NEW_LINE> @property <NEW_LINE> def summary(self): <NE... | The implementation of the action defined before | 62599051009cb60464d029f3 |
@implementer(IProtocolNegotiationFactory) <NEW_LINE> class ClientNegotiationFactory(ClientFactory): <NEW_LINE> <INDENT> def __init__(self, acceptableProtocols): <NEW_LINE> <INDENT> self._acceptableProtocols = acceptableProtocols <NEW_LINE> <DEDENT> def acceptableProtocols(self): <NEW_LINE> <INDENT> return self._accepta... | A L{ClientFactory} that has a set of acceptable protocols for NPN/ALPN
negotiation. | 625990518da39b475be046a0 |
class TestCaseBackendArchive(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.test_path = tempfile.mkdtemp(prefix='perceval_') <NEW_LINE> archive_path = os.path.join(self.test_path, 'myarchive') <NEW_LINE> self.archive = Archive.create(archive_path) <NEW_LINE> <DEDENT> def tearDown(self... | Unit tests for Backend using the archive | 6259905129b78933be26ab1f |
class PayInvoiceAsk(ModelView): <NEW_LINE> <INDENT> __name__ = 'account.invoice.pay.ask' <NEW_LINE> type = fields.Selection([ ('writeoff', 'Write-Off'), ('partial', 'Partial Payment'), ], 'Type', required=True) <NEW_LINE> journal_writeoff = fields.Many2One('account.journal', 'Write-Off Journal', states={ 'invisible': E... | Pay Invoice | 625990513617ad0b5ee075fb |
class AccessResource(object): <NEW_LINE> <INDENT> __slots__ = ['idx', 'usr', 'token', '_remaining', 'reset_time', 'last_used', 'used_cnt', 'fail_cnt'] <NEW_LINE> def __init__(self, usr=None, token=None, remaining=None, reset_time=None, idx=0, *args, **kwargs): <NEW_LINE> <INDENT> self.idx = idx <NEW_LINE> self.usr = us... | Represents one access token | 62599051435de62698e9d2b8 |
class TestExperiment(GOLExperiment): <NEW_LINE> <INDENT> size = (100, 100, ) <NEW_LINE> seed = BigBang( pos=(32, 20), size=(10, 10), vals={ "state": RandInt(0, 1), } ) | Regular experiment for tests. | 625990511f037a2d8b9e52c8 |
class SpcComment(Comment): <NEW_LINE> <INDENT> rest_comment = models.TextField(_('rest_comment'), max_length=COMMENT_MAX_LENGTH, null = True) | Custom model for comments
`rest_comment` stores compiled ReST comments | 62599051cad5886f8bdc5adb |
class ImageDetectionServicer(object): <NEW_LINE> <INDENT> def ListAvailableDetectors(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> ... | Missing associated documentation comment in .proto file. | 6259905123849d37ff852578 |
class Module(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.required_mips = 0 <NEW_LINE> self.required_ram = 0 <NEW_LINE> self.required_storage = 0 <NEW_LINE> self.m_id = 0 <NEW_LINE> <DEDENT> def set_required_mips(self, required_mips): <NEW_LINE> <INDENT> self.required_mips = required_mips <NEW_LI... | Each Application has modules in it.
This class describes, creates the modules and loads the data into them | 6259905107d97122c421815f |
class AppointmentSerializer(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> url = serializers.HyperlinkedIdentityField(view_name='api:appointment-detail') <NEW_LINE> stylist = serializers.HyperlinkedRelatedField(view_name='api:stylist-detail', many=False, read_only=False, queryset=User.objects.filter(is_st... | AppointmentSerializer (serializer for Appointment Model)
- **fields**::
:url: Url for a specific object
:location: Text field for the location
:date: Date Field
:stylist: SlugRelatedField (ensures that you can only select a stylist from the given options)
:customer: UserSerialzer(many=False, read_o... | 6259905191af0d3eaad3b2de |
class JSONHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def set_default_headers(self): <NEW_LINE> <INDENT> self.set_header('Content-Type', 'application/json') <NEW_LINE> <DEDENT> def write_json(self, data): <NEW_LINE> <INDENT> self.write(json.dumps(data, sort_keys=True, indent=4)) | Base Request Handler.
Every other handler should inherit this handler.
Assures the process of returning JSON to the clients. | 625990514428ac0f6e6599ee |
class Person: <NEW_LINE> <INDENT> def __init__(self, name, country='unknown', colour='undefined', age=0): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.country = country <NEW_LINE> self.colour = colour <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return f"{self.name}, {sel... | describes different people | 625990516e29344779b01aff |
class MatchPartner(models.AbstractModel): <NEW_LINE> <INDENT> _inherit = "res.partner.match" <NEW_LINE> def match_after_match(self, partner, new_partner, infos, opt): <NEW_LINE> <INDENT> if partner.contact_type == "attached": <NEW_LINE> <INDENT> if partner.type == "email_alias": <NEW_LINE> <INDENT> partner = partner.co... | Extend the matching so that all create partner must be checked by a human. | 6259905145492302aabfd98f |
class DreamhostProviderTests(TestCase, IntegrationTestsV2): <NEW_LINE> <INDENT> provider_name = "dreamhost" <NEW_LINE> domain = "lexicon-example.com" <NEW_LINE> def _filter_query_parameters(self): <NEW_LINE> <INDENT> return ["key"] <NEW_LINE> <DEDENT> @pytest.mark.skip(reason="can not set ttl when creating/updating rec... | TestCase for Dreamhost | 62599051ac7a0e7691f73997 |
class FunOpt(Structure): <NEW_LINE> <INDENT> _fields_ = [ ('algorithm', c_int), ('timeout', c_size_t), ('max_object_size', c_size_t), ('flag_exact_wanted', c_bool), ('flag_best_wanted', c_bool) ] | typedef struct ap_funopt_t {
int algorithm;
/* Algorithm selection:
- 0 is default algorithm;
- MAX_INT is most accurate available;
- MIN_INT is most efficient available;
- otherwise, no accuracy or speed meaning
*/
size_t timeout; /* unit !? */
/* Above the given computation time, the fun... | 625990510fa83653e46f639a |
class AntGroup: <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> self.ants = [] <NEW_LINE> self.timeElapsed = 0. <NEW_LINE> self.createAnts() <NEW_LINE> <DEDENT> def createAnts(self): <NEW_LINE> <INDENT> ngon = Ngon(self.n) <NEW_LINE> for vertex in ngon.getVerticies(): <NEW_LINE> <IN... | Represents a group of ants arranged on the verticies of an n
sided polygon.
SPEED: float/int
Speed that the ants should move with.
n: int
Number of ants
ants: list-type
List of ants in this group.
timeElapsed: float
The amount of time that has passed since the beginning of
the simulation. | 6259905124f1403a9268632b |
class TimeToFailure(BaseClass): <NEW_LINE> <INDENT> def __init__(self, pinger=None, target=None, timeout=300, threshold=5, *args, **kwargs): <NEW_LINE> <INDENT> super(TimeToFailure, self).__init__(*args, **kwargs) <NEW_LINE> self._pinger = pinger <NEW_LINE> self.target = target <NEW_LINE> self.target = target <NEW_LINE... | A TimeToFailure pings a target until the pings fail. | 6259905107d97122c4218160 |
class OfferVariation(models.Model, TimestampMixin): <NEW_LINE> <INDENT> offer = models.ForeignKey(Offer, on_delete=models.CASCADE, related_name="variations") <NEW_LINE> _price = models.DecimalField(null=True, max_digits=10, decimal_places=3) <NEW_LINE> _is_active = models.BooleanField(default=True) <NEW_LINE> @property... | TODO:
This is a specific combination of menuitem-variations for a given offer (eg. small burger, big chips) | 62599051b7558d5895464985 |
class BlobGoal(Goal): <NEW_LINE> <INDENT> def score(self, board: Block) -> int: <NEW_LINE> <INDENT> score = [] <NEW_LINE> flatten_board = _flatten(board) <NEW_LINE> board_size = len(flatten_board) <NEW_LINE> visit = [[-1] * board_size for _ in range(board_size)] <NEW_LINE> for i in range(board_size): <NEW_LINE> <INDENT... | Stores the goal for players. Blob goal accounts for the max score for
player's colours connected top/left/right/bottom together. Player gains
a point for each block connected together. | 62599051d6c5a102081e35d4 |
class _SolverDlg(object): <NEW_LINE> <INDENT> WRITE_COMMENTS_PARAM = "writeCommentsToInputFile" <NEW_LINE> def __init__(self, default, param_path, use_default, custom_path): <NEW_LINE> <INDENT> self.default = default <NEW_LINE> self.param_path = param_path <NEW_LINE> self.use_default = use_default <NEW_LINE> self.custo... | Internal query logic for solver specific settings.
Each instance queries settings for one specific solver (e.g. Elmer) common
among all solvers. To clarify: There are a few settings that are useful
for every solver (e.g. where to find the solver binary) but the value and
the FreeCAD parameter path is different for eac... | 62599051cad5886f8bdc5adc |
class ABCLedgerInput(ABCInput): <NEW_LINE> <INDENT> raw_columns = [ "volume", "balance", "fee", "refid", "type", "product" ] <NEW_LINE> resampled_columns = [ "balance" ] <NEW_LINE> @property <NEW_LINE> @abstractmethod <NEW_LINE> def asset(self) -> Union[CryptoEnum, QuoteEnum]: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDEN... | Base class for any ledger | 62599051462c4b4f79dbcebb |
class getSettings_result(object): <NEW_LINE> <INDENT> def __init__(self, success=None, e=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.e = e <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) an... | Attributes:
- success
- e | 625990513eb6a72ae038bb17 |
class MapzenReverse(MapzenQuery): <NEW_LINE> <INDENT> provider = 'mapzen' <NEW_LINE> method = 'reverse' <NEW_LINE> _URL = 'https://search.mapzen.com/v1/reverse' <NEW_LINE> _RESULT_CLASS = MapzenReverseResult <NEW_LINE> def _build_params(self, location, provider_key, **kwargs): <NEW_LINE> <INDENT> location = Location(lo... | Mapzen REST API
=======================
API Reference
-------------
https://mapzen.com/documentation/search/reverse/ | 625990512ae34c7f260ac59e |
class URL(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> full = db.Column(db.String(CHROME_MAX_URL_LENGTH), unique=True, nullable=False, index=True) <NEW_LINE> short = db.Column(db.String(MAX_HASH_LENGTH), nullable=True) | A model to represent the only entity of our app - the URL.
It has a primary key, full version of the url (unique since we don't want repetitions) and fully searchable
because we search in records using that field. And a short user friendly identifier generated directly from the
primary key. | 625990511f037a2d8b9e52c9 |
class IntervalClass(AbjadObject): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> @abc.abstractmethod <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __abs__(self): <NEW_LINE> <INDENT> return type(self)(abs(self._number)) <NEW_LINE> <DEDENT> def __float__(self): <NEW_LINE> <INDENT> return ... | Interval-class base class.
| 6259905145492302aabfd990 |
class Collection(model.Model): <NEW_LINE> <INDENT> name = model.StringProperty('n', required=True) <NEW_LINE> urlname = model.ComputedProperty(lambda self: urlname(self.name)) <NEW_LINE> owner = model.UserProperty('o', required=True) <NEW_LINE> admins = model.UserProperty('a', repeated=True) <NEW_LINE> created = model.... | Model for a collection of records. | 625990516e29344779b01b01 |
@inherit_doc <NEW_LINE> class JavaPredictionModel(PredictionModel[T], JavaModel, _PredictorParams): <NEW_LINE> <INDENT> @property <NEW_LINE> @since("2.1.0") <NEW_LINE> def numFeatures(self) -> int: <NEW_LINE> <INDENT> return self._call_java("numFeatures") <NEW_LINE> <DEDENT> @since("3.0.0") <NEW_LINE> def predict(self,... | (Private) Java Model for prediction tasks (regression and classification). | 62599051498bea3a75a58fde |
class Print3DTools(bpy.types.Panel): <NEW_LINE> <INDENT> bl_label = "3D Print Tools" <NEW_LINE> bl_idname = "3D Print Tools" <NEW_LINE> bl_space_type = 'VIEW_3D' <NEW_LINE> bl_region_type = 'TOOLS' <NEW_LINE> bl_category = "Extended Tools" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NE... | Creates a new tab with physics UI | 625990510c0af96317c577be |
class Room: <NEW_LINE> <INDENT> def __init__(self, name, room_setting=None): <NEW_LINE> <INDENT> if not room_setting: <NEW_LINE> <INDENT> room_setting = { 'moderate': { 'room': name.lower(), 'anything': False, 'spam': False, 'banword': False, 'caps': False, 'stretching': False, 'groupchats': False, 'urls': False }, 'br... | Contains all important information of a pokemon showdown room.
Attributes:
name: string, name of this room.
room_setting: dict, dictionary containing a lot of the room settings in this room
defined below:
room_setting = {
'moderate': {
... | 62599051fff4ab517ebcecda |
class metaStatic(Singleton): <NEW_LINE> <INDENT> def __new__(mcl, classname, bases, classdict): <NEW_LINE> <INDENT> def __init__(self, *p, **k): <NEW_LINE> <INDENT> cls = self.__class__ <NEW_LINE> if p: <NEW_LINE> <INDENT> if not self: <NEW_LINE> <INDENT> return super(newcls, self).__init__(*p, **k) <NEW_LINE> <DEDENT>... | A static (immutable) Singleton metaclass to quickly build classes
holding predefined immutable dicts
>>> class FrozenDictSingleton(with_metaclass(metaStatic, dict)) :
... pass
...
>>> FrozenDictSingleton({'A':1})
{'A': 1}
>>> a = FrozenDictSingleton()
>>> a
{'A': 1}
>>> b = FrozenDictSingleton()
>>> a, b
({'A': 1},... | 62599051d99f1b3c44d06b58 |
class PuzzleButton(Button): <NEW_LINE> <INDENT> def __init__(self, master, v, r, c ): <NEW_LINE> <INDENT> self.board_width, self.board_height= ( int(master['width']), int(master['height']) ) <NEW_LINE> self.dx = self.board_width/4 <NEW_LINE> self.dy = self.board_height/4 <NEW_LINE> Button.__init__(self, master, text='%... | A button with additional info | 6259905107d97122c4218162 |
class EmailBackend(ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, request: HttpRequest, email: str=None, password: str=None, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = User.objects.get(email=email) <NEW_LINE> <DEDENT> except (User.MultipleObjectsReturned, User.DoesNotExist): <NEW_LINE> <I... | Authenticate against email addresses. | 62599051a219f33f346c7cbe |
class Hypothesis(object): <NEW_LINE> <INDENT> def __init__(self, tokens, log_prob, state): <NEW_LINE> <INDENT> self.tokens = tokens <NEW_LINE> self.log_prob = log_prob <NEW_LINE> self.state = state <NEW_LINE> <DEDENT> def Extend(self, token, log_prob, new_state): <NEW_LINE> <INDENT> return Hypothesis(self.tokens + [tok... | Defines a hypothesis during beam search. | 6259905130dc7b76659a0cdb |
class MATS1DElasticWithFlaw( MATS1DElastic ): <NEW_LINE> <INDENT> flaw_position = Float( 0.15 ) <NEW_LINE> flaw_radius = Float( 0.05 ) <NEW_LINE> reduction_factor = Float( 0.9 ) <NEW_LINE> stiffness = 'secant' <NEW_LINE> def get_E( self, sctx = None ): <NEW_LINE> <INDENT> if sctx: <NEW_LINE> <INDENT> X = sctx.fets_eval... | Specialized damage model.
The damage model is driven by a single damage variable omega_0
at the point x = 0. The material points are damage according
to the nonlocal distribution function alpha implemnted
in the get_alpha procedure.
The implementation reuses the standard MATS1DDamage but replaces
the state variables ... | 62599051507cdc57c63a625d |
class WarningTestMixin(object): <NEW_LINE> <INDENT> @contextmanager <NEW_LINE> def assertWarns(self, warning_class): <NEW_LINE> <INDENT> with warnings.catch_warnings(record=True) as warns: <NEW_LINE> <INDENT> warnings.simplefilter("always") <NEW_LINE> yield <NEW_LINE> self.assertGreaterEqual(len(warns), 1) <NEW_LINE> s... | Add the ability to assert on warnings raised by a chunk of code. | 625990512ae34c7f260ac5a0 |
class ControlModel(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'control_de_materias' <NEW_LINE> id_control = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> id_cohorte = db.Column(db.Integer, db.ForeignKey('cohorte.id_cohorte')) <NEW_LINE> id_materia = db.Column(db.Integer, db.ForeignKey('mate... | Control Model | 62599051287bf620b62730a8 |
class Solution: <NEW_LINE> <INDENT> def isPalindrome(self, s:str): <NEW_LINE> <INDENT> if s == "": <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> s = s.lower() <NEW_LINE> z = "" <NEW_LINE> for i in s: <NEW_LINE> <INDENT> if ord("a") <= ord(i) <= ord("z"): <NEW_LINE> <INDENT> z += i <NEW_LINE> <DEDENT> <DEDENT> ret... | @param s: A string
@return: Whether the string is a valid palindrome | 6259905173bcbd0ca4bcb749 |
class HeapSort: <NEW_LINE> <INDENT> def sort(self, nums): <NEW_LINE> <INDENT> if not nums: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self._heapify(nums) <NEW_LINE> tail = len(nums) - 1 <NEW_LINE> while tail: <NEW_LINE> <INDENT> swap(nums, 0, tail) <NEW_LINE> self._sink(nums, 0, tail - 1) <NEW_LINE> tail -= 1 <NEW_... | O(N*logN), in-place, unstable sorting algorithm | 62599051ac7a0e7691f7399b |
class ModelPeople(Base): <NEW_LINE> <INDENT> __tablename__ = 'people' <NEW_LINE> id = Column('id', Integer, primary_key=True) <NEW_LINE> name = Column('name', String) <NEW_LINE> height = Column('height', String) <NEW_LINE> mass = Column('mass', String) <NEW_LINE> hair_color = Column('hair_color', String) <NEW_LINE> ski... | People model. | 62599051498bea3a75a58fe0 |
class _FilterHints(object): <NEW_LINE> <INDENT> def __init__(self, namefield): <NEW_LINE> <INDENT> self._namefield = namefield <NEW_LINE> self._allnames = False <NEW_LINE> self._names = None <NEW_LINE> self._datakinds = set() <NEW_LINE> <DEDENT> def RequestedNames(self): <NEW_LINE> <INDENT> if self._allnames or self._n... | Class for filter analytics.
When filters are used, the user of the L{Query} class usually doesn't know
exactly which items will be necessary for building the result. It therefore
has to prepare and compute the input data for potentially returning
everything.
There are two ways to optimize this. The first, and simpler... | 625990510c0af96317c577bf |
class power_off_device(relay_step): <NEW_LINE> <INDENT> def __init__(self, serial, except_charging=False, timeout=120, device_info="", **kwargs): <NEW_LINE> <INDENT> relay_step.__init__(self, **kwargs) <NEW_LINE> self.serial = serial <NEW_LINE> self.timeout = timeout <NEW_LINE> self.except_charging = except_charging <N... | description:
Shuts down the device.
usage:
relay_steps.power_off_device(serial=serial,
relay_type = relay_type,
relay_port = relay_port,
power_port = power_port)()
tags:
shutdown, relay | 6259905121a7993f00c67428 |
class Generator(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_classes, dims, shape): <NEW_LINE> <INDENT> super(Generator, self).__init__() <NEW_LINE> self._shape = shape <NEW_LINE> self.labels_emb = nn.Embedding(num_classes, num_classes) <NEW_LINE> self.model = nn.Sequential( *self._block(dims + num_classes, 1... | Definition of the generator class
| 6259905115baa7234946344c |
class Image(Model): <NEW_LINE> <INDENT> def insert_bare(self, cursor): <NEW_LINE> <INDENT> cursor.execute("INSERT INTO images (document_id, url, alt)" "VALUES (%(document_id)s, %(url)s, %(alt)s)", self.serialize()) | Represents an image from a document, as it is stored in the database. | 62599051d6c5a102081e35d7 |
class DBEventSink(EventSink): <NEW_LINE> <INDENT> def __init__(self, dest, db_stats=False, namespace=STAMPEDE_NS, props=None, db_type=None, **kw): <NEW_LINE> <INDENT> self._namespace=namespace <NEW_LINE> if namespace == STAMPEDE_NS: <NEW_LINE> <INDENT> self._db = stampede_loader.Analyzer(dest, perf=db_stats, batch="yes... | Write wflow event logs to database via loader | 62599051009cb60464d029f9 |
class Benchmark(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self, index, last=False, word_size=4): <NEW_LINE> <INDENT> self.index = index <NEW_LINE> self.last = last <NEW_LINE> self.word_size = word_size <NEW_LINE> self.directory = '' <NEW_LINE> self.max_addr = -1 <NEW_LINE> <DEDENT> de... | Base clase for benchmarks.
A benchmark is a kernel used to generate an address trace. | 62599051b57a9660fecd2f3a |
class Surface(DaeObject): <NEW_LINE> <INDENT> def __init__(self, id, img, format=None, xmlnode=None): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.image = img <NEW_LINE> self.format = format if format is not None else "A8R8G8B8" <NEW_LINE> if xmlnode != None: <NEW_LINE> <INDENT> self.xmlnode = xmlnode <NEW_LINE> <D... | Class containing data coming from a <surface> tag.
Collada materials use this to access to the <image> tag.
The only extra information we store right now is the
image format. In theory, this enables many more features
according to the collada spec, but no one seems to actually
use them in the wild, so for now, it's un... | 62599051b5575c28eb713729 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.