code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Sensor(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) | Each data source | 6259907f7d847024c075de75 |
class BaseTransaccionDetalle(BaseTabla): <NEW_LINE> <INDENT> registro_padre = database.Column(database.String(50), nullable=True) <NEW_LINE> registro_padre_id = database.Column(database.String(75), nullable=True) <NEW_LINE> referencia = database.Column(database.String(50), nullable=True) <NEW_LINE> referencia_id = data... | Base para crear transacciones en la entidad. | 6259907f23849d37ff852b51 |
class Poll(models.Model): <NEW_LINE> <INDENT> error_css_class = 'error' <NEW_LINE> DRINKS = ( ('v', 'Водка'), ('b', 'Пиво'), ('j', 'Сок'), ('w', 'Вино'), ('l', 'Вино'), ) <NEW_LINE> PRESENCE_STATUSES = ( ('t', 'Приду'), ('f', "Не приду"), ) <NEW_LINE> user = models.ForeignKey('auth.User') <NEW_LINE> drink = models.Char... | The polls | 6259907f4527f215b58eb6ec |
class Smartdenovo(MakefilePackage): <NEW_LINE> <INDENT> homepage = "https://github.com/ruanjue/smartdenovo" <NEW_LINE> git = "https://github.com/ruanjue/smartdenovo.git" <NEW_LINE> version('master', branch='master') <NEW_LINE> depends_on('sse2neon', when='target=aarch64:') <NEW_LINE> patch('aarch64.patch', sha256=... | SMARTdenovo is a de novo assembler for PacBio and Oxford Nanopore
(ONT) data. | 6259907fa8370b77170f1e68 |
class PoolCollection(NamedTuple): <NEW_LINE> <INDENT> pools: List[Pool] <NEW_LINE> total_entries: int | List of Pools with metadata | 6259907fd486a94d0ba2da4f |
class OutputControl(OptionContainer): <NEW_LINE> <INDENT> def __init__(self, dirpath, filepath=None): <NEW_LINE> <INDENT> super().__init__(OutputControlOption, dirpath, filepath) <NEW_LINE> <DEDENT> def set_option(self, name=None, period=None, sum=0, instant=1, mean=0, variance=0, min=0, max=0, mode=0): <NEW_LINE> <IND... | The OutputControl object manages what output SUMMA will
write out. Each output variable is stored in the `options`
list as an `OutputControlOption`. These options are
automatically populated on instantiation, and can be
added or modified through the `set_option` method. | 6259907f7b180e01f3e49db1 |
class StatusNeed(Need): <NEW_LINE> <INDENT> def action(self, tasker, status, **kw): <NEW_LINE> <INDENT> result = (tasker.status == status) <NEW_LINE> console.profuse("Need Tasker {0} status is {1} = {2}\n".format( tasker.name, StatusNames[status], result)) <NEW_LINE> return result <NEW_LINE> <DEDENT> def resolve(self, ... | StatusNeed Need
parameters:
tasker
status | 6259907f4f88993c371f126e |
class _CompatCredentialsNotFoundError(CredentialsNotFoundError, ValueError): <NEW_LINE> <INDENT> pass | To nudge external code from ValueErrors, we raise a compatibility subclass. | 6259907f656771135c48ad7c |
class CreateTargetGroupResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TargetGroupId = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TargetGroupId = params.get("TargetGroupId") <NEW_LINE> self.RequestId = para... | CreateTargetGroup response structure.
| 6259907ffff4ab517ebcf2b0 |
class LocalizedApplication(aiohttp.web.Application): <NEW_LINE> <INDENT> async def _handle(self, request): <NEW_LINE> <INDENT> language = request.path.split('/')[1] <NEW_LINE> if language not in settings.I18N_LANGUAGES: <NEW_LINE> <INDENT> language = settings.I18N_PRIMARY_LANGUAGE <NEW_LINE> <DEDENT> url = str(request.... | Special version of the :see:aiohttp application
that overrides the handler and takes care of extracting
the preferred language from the URL.
This applies to URLs such as:
/ro/about
/en/about | 6259907f4a966d76dd5f097f |
class ProxySurface: <NEW_LINE> <INDENT> def __init__(self, parent, rect, real_surface, offset=(0, 0)): <NEW_LINE> <INDENT> self.offset = offset <NEW_LINE> self.x = self.y = 0 <NEW_LINE> if rect[0] < 0: self.x = rect[0] <NEW_LINE> if rect[1] < 0: self.y = rect[1] <NEW_LINE> self.real_surface = real_surface <NEW_LINE> if... | A surface-like object which smartly handle out-of-area blitting.
<pre>ProxySurface(parent, rect, real_surface=None, offset=(0, 0))</pre>
<p>only one of parent and real_surface should be supplied (non None)</p>
<dl>
<dt>parent<dd>a ProxySurface object
<dt>real_surface<dd>a pygame Surface object
</dl>
<strong>Variable... | 6259907f5fdd1c0f98e5fa18 |
class SearchView(ListView): <NEW_LINE> <INDENT> template_name = "admin/admin_products.html" <NEW_LINE> context_object_name = 'products' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> query = self.request.GET.get('q') <NEW_LINE> if query: <NEW_LINE> <INDENT> return Product.objects.filter(name__icontains=query) <... | Admin search view | 6259907f099cdd3c63676146 |
class NoteTranslator(EntityTranslator): <NEW_LINE> <INDENT> def __init__(self, session=None): <NEW_LINE> <INDENT> EntityTranslator.__init__(self, session) <NEW_LINE> self.register('project', convert_project) <NEW_LINE> self.register('user', convert_user) <NEW_LINE> self.register('addressings_to', convert_recipients) <N... | Note property translator.
Assigning this translator to a Note model will cause inbound property values to be converted.
.. versionadded:: v00_02_00
.. versionchanged:: v00_03_00
Removed obsolete internal conversion methods, update to support grenade.common.translator.Translator
changes.
.. versionchanged:: v0... | 6259907f3617ad0b5ee07be8 |
class Objective(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Objective, self).__init__() <NEW_LINE> self.radius = settings.OBJECTIVE_RADIUS <NEW_LINE> r = self.radius <NEW_LINE> self.image = pygame.Surface((r*2, r*2), pygame.SRCALPHA) <NEW_LINE> pygame.draw.circle(self.image,... | The objective of the game is to reach this | 6259907fbf627c535bcb2f6a |
class ModuleConfigWizardOther(ModelView): <NEW_LINE> <INDENT> __name__ = 'ir.module.config_wizard.other' <NEW_LINE> percentage = fields.Float('Percentage', readonly=True) <NEW_LINE> @staticmethod <NEW_LINE> def default_percentage(): <NEW_LINE> <INDENT> pool = Pool() <NEW_LINE> Item = pool.get('ir.module.config_wizard.i... | Module Config Wizard Other | 6259907f7cff6e4e811b74da |
class UserAborted(Exception): <NEW_LINE> <INDENT> pass | User aborted by pressing the Stop button
on the main window's toolbar. | 6259907f23849d37ff852b53 |
class News: <NEW_LINE> <INDENT> def __init__(self,source,author,title,description,url,urlToImage,publishedAt,content,category,country,language): <NEW_LINE> <INDENT> self.source =source <NEW_LINE> self.author = author <NEW_LINE> self.title = title <NEW_LINE> self.description = description <NEW_LINE> self.url = url <NEW_... | news class to define news Objects | 6259907f63b5f9789fe86c02 |
class FileFilter(object): <NEW_LINE> <INDENT> def __init__(self, *filenames): <NEW_LINE> <INDENT> self.filenames = filenames <NEW_LINE> <DEDENT> def filter(self, regex, repl, **kwargs): <NEW_LINE> <INDENT> return filter_file(regex, repl, *self.filenames, **kwargs) | Convenience class for calling ``filter_file`` a lot. | 6259907f76e4537e8c3f101a |
class WallboxSensor(CoordinatorEntity, Entity): <NEW_LINE> <INDENT> def __init__(self, coordinator, idx, ent, config): <NEW_LINE> <INDENT> super().__init__(coordinator) <NEW_LINE> self._properties = CONF_SENSOR_TYPES[ent] <NEW_LINE> self._name = f"{config.title} {self._properties[CONF_NAME]}" <NEW_LINE> self._icon = se... | Representation of the Wallbox portal. | 6259907f4f88993c371f126f |
class ZmqREPConnection(ZmqConnection): <NEW_LINE> <INDENT> socketType = constants.ROUTER <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._routingInfo = {} <NEW_LINE> ZmqConnection.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> def reply(self, messageId, *messageParts): <NEW_LINE> <INDENT> ... | A Reply ZeroMQ connection.
This is implemented with an underlying ROUTER socket, but the semantics
are close to REP socket. | 6259907f4a966d76dd5f0981 |
class BaseKernel(object): <NEW_LINE> <INDENT> def __init__(self, x_rank, ydim=1.): <NEW_LINE> <INDENT> self.xrank_ = theano.shared(x_rank) <NEW_LINE> self.ydim_ = ydim <NEW_LINE> <DEDENT> def build_result(self, X1, X2): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def get_params(self): <NEW_LINE> <... | Abstract base class for kernel implementations in theano.
A kernel function by definition, computes the inner product
of two data points in a transformed space. Each class
is defined by some underlying kernel function, but is designed
to operate on complete data sets, not individual pairs of
data points. Thus, the out... | 6259907f442bda511e95daa4 |
class SocketCommunicator(rosebot.communicator.Communicator): <NEW_LINE> <INDENT> def __init__(self, address, connect=True, wait_for_acknowledgement=True, send_acknowledgement=False, is_debug=False): <NEW_LINE> <INDENT> self.address = address <NEW_LINE> self.read_buffer_size = 4096 <NEW_LINE> self.bytes_read_but_not_yet... | Uses a socket to send and receive messages to/from the robot
| 6259907f7cff6e4e811b74dc |
class KeywordsWidget(forms.MultiWidget): <NEW_LINE> <INDENT> class Media: <NEW_LINE> <INDENT> js = content_media_urls("js/jquery-1.4.4.min.js", "js/keywords_field.js") <NEW_LINE> <DEDENT> def __init__(self, attrs=None): <NEW_LINE> <INDENT> widgets = (forms.HiddenInput, forms.TextInput(attrs={"class": "vTextField"})) <N... | Form field for the ``KeywordsField`` generic relation field. Since
the admin with model forms has no form field for generic
relations, this form field provides a single field for managing
the keywords. It contains two actual widgets, a text input for
entering keywords, and a hidden input that stores the ID of each
``Ke... | 6259907f7d847024c075de79 |
class CertificateValidationError(CertificateException): <NEW_LINE> <INDENT> pass | An exception raised when certificate information is invalid. | 6259907f4527f215b58eb6ee |
class InboxMailList(JsonView): <NEW_LINE> <INDENT> @check_inbox <NEW_LINE> def prepare_context(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if request.inbox: <NEW_LINE> <INDENT> mails = Mail.objects.get_inbox_mails(request.inbox) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> mails = Mail.objects.get_user_mails(... | Returns mails for inbox or for all inboxes in json format. | 6259907f4a966d76dd5f0983 |
class TransactionIndexable(object): <NEW_LINE> <INDENT> @indexed(LongFieldType(stored=True), attr_query_name="tx_state") <NEW_LINE> def idx_tx_state(self): <NEW_LINE> <INDENT> return 0 | Internal fields to temporaty index documents that have been committed
to model index mid transaction | 6259907f97e22403b383c99d |
class TemplateState(MegaState): <NEW_LINE> <INDENT> def __init__(self, Candidate): <NEW_LINE> <INDENT> StateA = Candidate.state_a <NEW_LINE> StateB = Candidate.state_b <NEW_LINE> transition_map, target_scheme_n = combine_maps(StateA.transition_map, StateB.transition_map) <NEW_LINE> ski_db = StateKeyIndexDB(StateA.state... | _________________________________________________________________________
Implements multiple AnalyzerState-s in one single state. Its transition
map, its entry and drop-out sections function are based on a 'state_key'.
That is, when a 'state_key' of an implemented AnalyzerState is set, the
transition map, the en... | 6259907ff548e778e596d02f |
class AttrDict(dict): <NEW_LINE> <INDENT> def __init__(self, other=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> if other is not None: <NEW_LINE> <INDENT> for key, value in other.items(): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self[key] = AttrDict(value) <NEW_LINE> <DEDENT> except AttributeError: <NEW_... | Defines an attribute dictionary that allows the user to address keys as
if they were attributes.
`AttrDict` inherits from `dict`, so it can be used everywhere where `dict` is expected.
The __init__ constructs an empty `AttrDict` or recursively initialises an `AttrDict`
from a (maybe nested) `dict`.
Args:
other (d... | 6259907f55399d3f05627fb1 |
class WPConfirmEPaymentSkipjack( conferences.WPConferenceDefaultDisplayBase ): <NEW_LINE> <INDENT> def __init__( self, rh, conf, reg ): <NEW_LINE> <INDENT> conferences.WPConferenceDefaultDisplayBase.__init__(self, rh, conf) <NEW_LINE> self._registrant = reg <NEW_LINE> <DEDENT> def _getBody( self, params ): <NEW_LINE> <... | Confirmation page for Skipjack callback | 6259907f4428ac0f6e659fcc |
class Literal(Expression): <NEW_LINE> <INDENT> def __new__(cls, term): <NEW_LINE> <INDENT> if term == None: <NEW_LINE> <INDENT> return NULL <NEW_LINE> <DEDENT> if term is True: <NEW_LINE> <INDENT> return TRUE <NEW_LINE> <DEDENT> if term is False: <NEW_LINE> <INDENT> return FALSE <NEW_LINE> <DEDENT> if is_data(term) and... | A literal JSON document | 6259907fbe7bc26dc9252ba4 |
class IperfClientConstants(object): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> options = ('udp', 'bandwidth', 'dualtest', 'num', 'tradeoff', 'time', 'fileinput', 'stdin', 'listenport', 'parallel', 'ttl') <NEW_LINE> bandwidth = '_bandwidth' <NEW_LINE> num = '_num' <NEW_LINE> tradeoff = '_tradeoff' <NEW_LINE> time = '... | Constants for the IperfClientSettings | 6259907f5fc7496912d48fba |
class Student: <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def to_json(self, attrs=None): <NEW_LINE> <INDENT> if attrs is not None: <NEW_LINE> <INDENT> listLatt = ... | Student class
| 6259907f7d847024c075de7b |
class ReceptiveFieldsConverter(Converter): <NEW_LINE> <INDENT> def __init__(self, sigma2, max_x, n_fields, k_round): <NEW_LINE> <INDENT> self.sigma2 = sigma2 <NEW_LINE> self.max_x = max_x <NEW_LINE> self.n_fields = n_fields <NEW_LINE> self.k_round = k_round <NEW_LINE> <DEDENT> def convert(self, x, y): <NEW_LINE> <INDEN... | Class for receptive fields data conversion | 6259907f92d797404e3898ab |
class LabelledLoader(): <NEW_LINE> <INDENT> def __init__(self, array_module): <NEW_LINE> <INDENT> self.xp = array_module <NEW_LINE> self.device = None <NEW_LINE> self.workers = {} <NEW_LINE> self.sources = {} <NEW_LINE> <DEDENT> def get_samples(self, data_dir): <NEW_LINE> <INDENT> for d in os.listdir(data_dir): <NEW_LI... | A Data Loader that provides batches of data with corresponding labels
for classification. | 6259907f5166f23b2e244e76 |
class HttpBackend(pymatrix.backend.base.BackendBase): <NEW_LINE> <INDENT> _session = None <NEW_LINE> _hostname = None <NEW_LINE> _port = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._session = None <NEW_LINE> <DEDENT> async def connect( self, hostname, port): <NEW_LINE> <INDENT> if(self._session is not ... | A HTTP backend | 6259907f7047854f46340e54 |
class ContactPhoneSerializer(ContactAssociationSerializer): <NEW_LINE> <INDENT> class Meta(ContactAssociationSerializer.Meta): <NEW_LINE> <INDENT> model = models.ContactPhone <NEW_LINE> fields = ContactAssociationSerializer.Meta.fields + ( "phone", "phone_type") | ContactPhone model serializer class. | 6259907f091ae356687066de |
class ManagerTestBase(DatabaseTestBase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ManagerTestBase, self).setUp() <NEW_LINE> self.manager = APIManager(self.flaskapp, session=self.session) | Base class for tests that use a SQLAlchemy database and an
:class:`flask_restless.APIManager`.
The :class:`flask_restless.APIManager` is accessible at ``self.manager``. | 6259907f3346ee7daa3383b1 |
class Acceptor (essential.Acceptor): <NEW_LINE> <INDENT> pending_promise = None <NEW_LINE> pending_accepted = None <NEW_LINE> active = True <NEW_LINE> @property <NEW_LINE> def persistance_required(self): <NEW_LINE> <INDENT> return self.pending_promise is not None or self.pending_accepted is not None <NEW_LIN... | Acceptors act as the fault-tolerant memory for Paxos. To ensure correctness
in the presence of failure, Acceptors must be able to remember the promises
they've made even in the event of power outages. Consequently, any changes
to the promised_id, accepted_id, and/or accepted_value must be persisted to
stable media prio... | 6259907f32920d7e50bc7ae0 |
class Cost_ABC(MABS.UntrainableAbstraction_ABC, MABS.Apply_ABC) : <NEW_LINE> <INDENT> def __init__(self, reverse=False, streams=["test", "train"], **kwargs) : <NEW_LINE> <INDENT> super(Cost_ABC, self).__init__(streams=streams, **kwargs) <NEW_LINE> self.setHP("reverse", reverse) <NEW_LINE> <DEDENT> def logApply(self, la... | This is the interface a Cost must expose. In order for the trainer/recorder to know which attributes are hyper-parameters,
this class must also include a list attribute **self.hyperParameters** containing the names of all attributes that must be considered
as hyper-parameters. | 6259907f71ff763f4b5e924b |
class ColorMap(Color): <NEW_LINE> <INDENT> def __init__(self, colormap=[ColorMapStep(0, Color(0, 0, 0)), ColorMapStep(1, Color(1, 1, 1))]): <NEW_LINE> <INDENT> super().__init__(r=colormap[0].color.r, g=colormap[0].color.g, b=colormap[0].color.b, a=colormap[0].color.a, name='color_map') <NEW_LINE> self.colormap = colorm... | ColorMap is a special case of Color() that defines a linear color map, mapping a range to a color.
By convention I expect we will use the range (0,1) but any range is actually possible.
The map is defined as a list of ColorMapStep, which maps a value to a color.
If the value we map is between two ColorMapStep the line... | 6259907f97e22403b383c99f |
class Batch(): <NEW_LINE> <INDENT> def __init__(self, src, trg=None, max_len=40): <NEW_LINE> <INDENT> self.src = src <NEW_LINE> length = [min(max_len, len(x))+2 for x in self.src] <NEW_LINE> self.src_mask = torch.zeros((len(length), max_len + 2)) <NEW_LINE> self.max_len = max_len <NEW_LINE> for i,j in enumerate(length)... | Object for holding a batch of data with mask during training. | 6259907faad79263cf430259 |
class ConfigDialog(BaseDialog): <NEW_LINE> <INDENT> DEFAULT_CHANNEL_STATES = [True] * 4 <NEW_LINE> DEFAULT_COINCIDENCE_STATES = [True] + [False] * 3 <NEW_LINE> DEFAULT_CHANNEL_VETO_STATES = [False] * 3 <NEW_LINE> def __init__(self, channel_states=DEFAULT_CHANNEL_STATES, coincidence_states=DEFAULT_COINCIDENCE_STATES, ve... | Dialog to set the configuration
:param channel_states: activation states of the channels
:type channel_states: list of bool
:param coincidence_states: coincidence states
:type coincidence_states: list of bool
:param veto_enabled: enable veto group
:type veto_enabled: bool
:param channel_veto_states: channel veto
:type... | 6259907fa05bb46b3848be78 |
class FormSubmissionFile(models.Model): <NEW_LINE> <INDENT> submission = models.ForeignKey( "FormSubmission", verbose_name=_("Submission"), on_delete=models.CASCADE, related_name="files", ) <NEW_LINE> field = models.CharField(verbose_name=_("Field"), max_length=255) <NEW_LINE> file = models.FileField(verbose_name=_("Fi... | Data for a form submission file. | 6259907fec188e330fdfa34a |
class FileDataHttpReplacement(object): <NEW_LINE> <INDENT> def __init__(self, cache=None, timeout=None): <NEW_LINE> <INDENT> self.hit_counter = {} <NEW_LINE> <DEDENT> def request(self, uri, method="GET", body=None, headers=None, redirections=5): <NEW_LINE> <INDENT> path = urlparse.urlparse(uri)[2] <NEW_LINE> fname = os... | Build a stand-in for httplib2.Http that takes its
response headers and bodies from files on disk
http://bitworking.org/news/172/Test-stubbing-httplib2 | 6259907f23849d37ff852b59 |
class ListPhotoTagsResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | A ResultSet with methods tailored to the values returned by the ListPhotoTags Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution. | 6259907f4c3428357761bd5b |
class OriginType(StringChoice): <NEW_LINE> <INDENT> choices = [ 'hypocenter', 'centroid', 'amplitude', 'macroseismic', 'rupture start', 'rupture end'] | Describes the origin type. | 6259907f5166f23b2e244e78 |
class Component(Base): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> linked_subsystems = list() <NEW_LINE> material = None <NEW_LINE> volume = None <NEW_LINE> object_sort = 'Component' <NEW_LINE> @property <NEW_LINE> def mass(self): <NEW_LINE> <INDENT> return self.volume * self.material.density | Abstract Base Class for components. | 6259907fa8370b77170f1e71 |
class CRMConnection(AuthenticationContext): <NEW_LINE> <INDENT> default_headers = {'Content-Type': 'application/json; charset=utf-8', 'OData-MaxVersion': '4.0', 'OData-Version': '4.0', 'Accept': 'application/json'} <NEW_LINE> api_query_stem = '/api/data/v9.0/' <NEW_LINE> _session = None <NEW_LINE> _debug = False <NEW_L... | Implements AuthenticationContext from Python Adal Library
Adds additional functionality for Executing Py365CE Request Classes | 6259907f32920d7e50bc7ae2 |
class BaseGeometry(SpatialReferenceMixin): <NEW_LINE> <INDENT> def dumps(self, **kwargs): <NEW_LINE> <INDENT> if 'ensure_ascii' not in kwargs: <NEW_LINE> <INDENT> kwargs['ensure_ascii'] = False <NEW_LINE> <DEDENT> return json.dumps(self.json, **kwargs) | base geometry obect | 6259907fad47b63b2c5a92f1 |
@unique <NEW_LINE> class Currency(Enum): <NEW_LINE> <INDENT> ALL = 'ALL' <NEW_LINE> USD = 'USD' <NEW_LINE> HKD = 'HKD' <NEW_LINE> CNH = 'CNH' <NEW_LINE> SGD = 'SGD' | Enum for currency | 6259907f7c178a314d78e93b |
class MissingTypeKeyError(Exception): <NEW_LINE> <INDENT> pass | A 'type' key is missing from the JSON | 6259907f7cff6e4e811b74e2 |
@final <NEW_LINE> class TooLongYieldTupleViolation(ASTViolation): <NEW_LINE> <INDENT> error_template = 'Found too long yield tuple: {0}' <NEW_LINE> code = 227 | Forbids to yield too long tuples.
Reasoning:
Long yield tuples complicate generator using.
This rule helps to reduce complication.
Solution:
Use lists of similar type or wrapper objects.
.. versionadded:: 0.10.0 | 6259907f4f6381625f19a1ff |
class PickleableObject(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def read(cls, path, store_path=False, create_if_error=False, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> with open(path, 'rb') as f: <NEW_LINE> <INDENT> the_object = pickle.load(f) <NEW_LINE> <DEDENT> <DEDENT> except Exception: <NEW... | An :class:`object` serializable/deserializable by :mod:`pickle`. | 6259907f5fc7496912d48fbc |
class IndexAwareList(list): <NEW_LINE> <INDENT> def __getitem__(self, item): <NEW_LINE> <INDENT> if len(self) > item: <NEW_LINE> <INDENT> return super(IndexAwareList, self).__getitem__(item) <NEW_LINE> <DEDENT> return None | List has awareness of its index bound | 6259907fa05bb46b3848be79 |
class FreeProvider(BaseProvider): <NEW_LINE> <INDENT> def required_keys(self): <NEW_LINE> <INDENT> return ['api_id', 'api_key'] <NEW_LINE> <DEDENT> def send(self, msg): <NEW_LINE> <INDENT> params = { 'user': self.params['api_id'], 'passwd': self.params['api_key'] } <NEW_LINE> f = FreeClient(**params) <NEW_LINE> res = f... | This is a provider class for the French telco 'Free'.
>>> f = FreeProvider({'api_id': '12345678', 'api_key':'xyz'})
>>> f.send('Hello, World!')
True | 6259907f4c3428357761bd5d |
class TEX(Drawable): <NEW_LINE> <INDENT> def __init__(self, config=TEXConfig(), image=None): <NEW_LINE> <INDENT> self._color = config.color <NEW_LINE> self._formula = config.formula <NEW_LINE> self._position = config.position <NEW_LINE> self._background = config.background <NEW_LINE> self._alpha = config.alpha <NEW_LIN... | LaTex drawable class
Attributes
----------
_color: color of formula text
_formula: the formula
_position: position of the formula
_background: background color | 6259907f92d797404e3898ad |
class ChannelDispatchOperation(dbus.service.Object): <NEW_LINE> <INDENT> @dbus.service.method('org.freedesktop.Telepathy.ChannelDispatchOperation', in_signature='s', out_signature='') <NEW_LINE> def HandleWith(self, Handler): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @dbus.service.method('org.fr... | A channel dispatch operation is an object in the ChannelDispatcher
representing a batch of unrequested channels being announced to
client
Approver
processes.
These objects can result from new incoming channels or channels
which are automatically created for some reason, but cannot result
from outgoing requ... | 6259907fa8370b77170f1e72 |
class HIDProfile(Server): <NEW_LINE> <INDENT> conns = {} <NEW_LINE> sock = None <NEW_LINE> def __init__(self, bus, path, sock): <NEW_LINE> <INDENT> Server.__init__(self, bus, path) <NEW_LINE> self.sock = sock <NEW_LINE> <DEDENT> def Release(self): <NEW_LINE> <INDENT> print("Release") <NEW_LINE> self.quit() <NEW_LINE> <... | <node>
<interface name='org.bluez.Profile1'>
<method name='Release'></method>
<method name='RequestDisconnection'>
<arg type='o' name='device' direction='in'/>
</method>
<method name='NewConnection'>
... | 6259907f796e427e5385021d |
class TableWidget(object): <NEW_LINE> <INDENT> def __init__(self, with_table_tag=True): <NEW_LINE> <INDENT> self.with_table_tag = with_table_tag <NEW_LINE> <DEDENT> def __call__(self, field, **kwargs): <NEW_LINE> <INDENT> html = [] <NEW_LINE> if self.with_table_tag: <NEW_LINE> <INDENT> kwargs.setdefault('id', field.id)... | Renders a list of fields as a set of table rows with th/td pairs.
If `with_table_tag` is True, then an enclosing <table> is placed around the
rows.
Hidden fields will not be displayed with a row, instead the field will be
pushed into a subsequent table row to ensure XHTML validity. Hidden fields
at the end of the fi... | 6259907fd486a94d0ba2da59 |
class SelfEncodable(object): <NEW_LINE> <INDENT> def write_to(self, stream): <NEW_LINE> <INDENT> raise NotImplementedError("Subclasses must implement") <NEW_LINE> <DEDENT> def encode(self): <NEW_LINE> <INDENT> stream = StringIO() <NEW_LINE> self.write_to(stream) <NEW_LINE> return stream.getvalue() | Represents an object that can decode itself. | 6259907f3346ee7daa3383b3 |
class RuntimeDisplay(wx.Panel): <NEW_LINE> <INDENT> def __init__(self, parent, **kwargs): <NEW_LINE> <INDENT> wx.Panel.__init__(self, parent, **kwargs) <NEW_LINE> self._init_properties() <NEW_LINE> self._init_components() <NEW_LINE> self._do_layout() <NEW_LINE> <DEDENT> def set_font_style(self, style): <NEW_LINE> <INDE... | Textbox displayed during the client program's execution. | 6259907fdc8b845886d5505d |
class Category(models.Model): <NEW_LINE> <INDENT> name = models.CharField(u'Name', max_length=20) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def balance(self): <NEW_LINE> <INDENT> debit = Trade.objects.filter(dr_name=self).aggregate(Sum('amount'))['amount__sum'] <NEW_LINE> i... | 勘定科目 | 6259907f32920d7e50bc7ae4 |
class Malt(object): <NEW_LINE> <INDENT> def __init__(self,name,maker,max_yield,color,kolbach_min,kolbach_max): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.maker=maker <NEW_LINE> self.max_yield = max_yield <NEW_LINE> self.color=color <NEW_LINE> self.kolbach_min=kolbach_min <NEW_LINE> self.kolbach_max=kolbach_ma... | A class to store a malt's attributes in a brewing session | 6259907f5fdd1c0f98e5fa22 |
@public <NEW_LINE> class test(coroutine): <NEW_LINE> <INDENT> def __init__(self, timeout=None, expect_fail=False, expect_error=False, skip=False): <NEW_LINE> <INDENT> self.timeout = timeout <NEW_LINE> self.expect_fail = expect_fail <NEW_LINE> self.expect_error = expect_error <NEW_LINE> self.skip = skip <NEW_LINE> <DEDE... | Decorator to mark a function as a test
All tests are coroutines. The test decorator provides
some common reporting etc, a test timeout and allows
us to mark tests as expected failures.
KWargs:
timeout: (int)
value representing simulation timeout (not implemented)
expect_fail: (bool):
Don't ma... | 6259907ff548e778e596d035 |
class Module(Thing): <NEW_LINE> <INDENT> def __init__(self, name, flavor, flavor2, loc, ship = None, isRing = False): <NEW_LINE> <INDENT> super().__init__(name, flavor) <NEW_LINE> self.loc = loc <NEW_LINE> self.isRing = isRing <NEW_LINE> if isRing: <NEW_LINE> <INDENT> self.ringModules = {"U":None, "D":None, "L":None, "... | class for ship modules | 6259907f7c178a314d78e93c |
class Prefix(object): <NEW_LINE> <INDENT> def __init__(self, prefix): <NEW_LINE> <INDENT> self.prefix = prefix <NEW_LINE> self._parse() <NEW_LINE> <DEDENT> def _parse(self): <NEW_LINE> <INDENT> if "!" not in self.prefix or "@" not in self.prefix: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.nick, rest = self.pre... | Prefix represents a source of an IRC message, usually a hostmask.
Instance variables:
prefix The complete prefix.
nick A nickname, or None.
ident An ident/username, or None.
host A hostname, or None. | 6259907f5fdd1c0f98e5fa23 |
class WaypointSequenceResponse(HEREModel): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(WaypointSequenceResponse, self).__init__() <NEW_LINE> self.param_defaults = { "results": None, "errors": None, "warnings": None, } <NEW_LINE> for (param, default) in self.param_defaults.items(): <NEW_L... | A class representing the Fleet Telematics Waypoint Sequence response data. | 6259907f66673b3332c31ea3 |
class ZenossDataSource(TemplateRouter): <NEW_LINE> <INDENT> def __init__(self, url, headers, ssl_verify, ds_data): <NEW_LINE> <INDENT> super(ZenossDataSource, self).__init__(url, headers, ssl_verify) <NEW_LINE> uid = ds_data.pop('uid') <NEW_LINE> self.uid = uid.replace('/zport/dmd/', '', 1) <NEW_LINE> self.name = ds_da... | Class for Zenoss template data sources | 6259907f60cbc95b06365abe |
class BasePageObjectMeta(type): <NEW_LINE> <INDENT> def __new__(cls, name, bases, attrs): <NEW_LINE> <INDENT> instance = super(BasePageObjectMeta, cls).__new__(cls, name, bases, attrs) <NEW_LINE> for name, value in attrs.iteritems(): <NEW_LINE> <INDENT> if isinstance(value, BasePageElement): <NEW_LINE> <INDENT> setattr... | Metaclass for all PageObjects. | 6259907fa05bb46b3848be7a |
class AsyncChannel(object): <NEW_LINE> <INDENT> _resolver_configured = False <NEW_LINE> @classmethod <NEW_LINE> def _config_resolver(cls, num_threads=10): <NEW_LINE> <INDENT> from tornado.netutil import Resolver <NEW_LINE> Resolver.configure( 'tornado.netutil.ThreadedResolver', num_threads=num_threads) <NEW_LINE> cls._... | Parent class for Async communication channels | 6259907f1f5feb6acb16469e |
class X265BAdaptSignal: <NEW_LINE> <INDENT> def __init__(self, x265_handlers, inputs_page_handlers): <NEW_LINE> <INDENT> self.x265_handlers = x265_handlers <NEW_LINE> self.inputs_page_handlers = inputs_page_handlers <NEW_LINE> <DEDENT> def on_x265_b_adapt_combobox_changed(self, x265_b_adapt_combobox): <NEW_LINE> <INDEN... | Handles the signal emitted when the x265 BAdapt option is changed. | 6259907f091ae356687066e4 |
class ToTensor(): <NEW_LINE> <INDENT> def np2th(self, arr): <NEW_LINE> <INDENT> if np.iscomplexobj(arr): <NEW_LINE> <INDENT> arr = arr.astype(np.complex64) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> arr = arr.astype(np.float32) <NEW_LINE> <DEDENT> return utils.numpy_to_torch(arr) <NEW_LINE> <DEDENT> def __call__(sel... | Convert sample ndarrays to tensors. | 6259907f4527f215b58eb6f2 |
class Right(Either): <NEW_LINE> <INDENT> def map(self, func): <NEW_LINE> <INDENT> return func(self.value) | This class defines the Right side of an Either Monad | 6259907f3346ee7daa3383b4 |
class HBarGraph(twc.Widget): <NEW_LINE> <INDENT> template = 'rnms.templates.widgets.hbargraph' <NEW_LINE> title = twc.Param('Title of the Chart', default='') <NEW_LINE> graph_data = twc.Param('List of (label,pct,val)') | Small Horizontal Bar Graph Chart
graph_data should be a list of 3 item list
(label, percent, value label)
| 6259907f656771135c48ad82 |
class HiddenUnless(object): <NEW_LINE> <INDENT> field_flags = ('initially_hidden',) <NEW_LINE> def __init__(self, field, value=None, preserve_data=False): <NEW_LINE> <INDENT> self.field = field <NEW_LINE> self.value = value <NEW_LINE> self.preserve_data = preserve_data <NEW_LINE> <DEDENT> def __call__(self, form, field... | Hides and disables a field unless another field has a certain value.
:param field: The name of the other field to check
:param value: The value to check for. If unspecified, any truthy
value is accepted.
:param preserve_data: If True, a disabled field will keep whatever
``object_da... | 6259907ffff4ab517ebcf2bd |
class Partition(Object, metaclass=PartitionType): <NEW_LINE> <INDENT> block_device = ObjectFieldRelated( "device_id", "BlockDevice", readonly=True, pk=0, map_func=map_device_id_to_dict ) <NEW_LINE> id = ObjectField.Checked("id", check(int), readonly=True, pk=1) <NEW_LINE> uuid = ObjectField.Checked("uuid", check(str), ... | A partition on a block device. | 62599080f548e778e596d037 |
class Network_Node: <NEW_LINE> <INDENT> def __init__(self, host="0.0.0.0", port=0): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.game = Game() <NEW_LINE> self.view = None <NEW_LINE> super().__init__() <NEW_LINE> <DEDENT> @circuits.handler("read") <NEW_LINE> def read(self, *args): <NE... | Represents a node (In the graph-theory sense) in the network.
A node can be either a server or a client. Note: This object is
game-specific. (So feel free to put in wumpus-related information.)
Maybe one day the design will justify splitting this out from the game-related
information, but that day isn't today. | 625990807c178a314d78e93d |
class UserSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = get_user_model() <NEW_LINE> fields = ('email', 'password', 'name') <NEW_LINE> extra_kwargs = {'password': {'write_only': True, 'min_length': 5}} <NEW_LINE> <DEDENT> def create(self, validate_data): <NEW_LINE> ... | Serializers for the user object | 62599080aad79263cf43025f |
class MedianScaleNumpy(object): <NEW_LINE> <INDENT> def __init__(self, range_min=0.0, range_max=1.0): <NEW_LINE> <INDENT> self.scale = (range_min, range_max) <NEW_LINE> <DEDENT> def __call__(self, image): <NEW_LINE> <INDENT> mn = image.min(axis=(0, 1)) <NEW_LINE> md = np.median(image, axis=(0, 1)) <NEW_LINE> return sel... | Scale with median and mean of each channel of the numpy array i.e.
channel = (channel - mean) / std | 625990804428ac0f6e659fd4 |
class ImportWestwood3D(Operator, ImportHelper): <NEW_LINE> <INDENT> bl_idname = "import.westwood3d" <NEW_LINE> bl_label = "Import Westwood3D" <NEW_LINE> filename_ext = ".w3d" <NEW_LINE> filter_glob = StringProperty( default="*.w3d", options={'HIDDEN'}, ) <NEW_LINE> ignore_lightmap = BoolProperty( name="Don't import lig... | This appears in the tooltip of the operator and in the generated docs | 625990807cff6e4e811b74e6 |
class MutatedISA(ImplicitDict): <NEW_LINE> <INDENT> dss_response: MutatedISAResponse <NEW_LINE> notifications: Dict[str, fetch.Query] | Result of an attempt to mutate an ISA (including DSS & notifications) | 62599080aad79263cf430260 |
class StrategyFactory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> factoryMethods = {} <NEW_LINE> @classmethod <NEW_LINE> def register(cls, name, method): <NEW_LINE> <INDENT> StrategyFactory.factoryMethods[name] = method <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def cr... | classdocs | 62599080be7bc26dc9252ba8 |
class HubDBMixin(object): <NEW_LINE> <INDENT> def __init__(self, session_factory): <NEW_LINE> <INDENT> self.db = session_factory() | Mixin for connecting to the hub database | 62599080ec188e330fdfa350 |
class TwoTerminal: <NEW_LINE> <INDENT> def __init__(self, pos_node: str, neg_node: str): <NEW_LINE> <INDENT> self.pos_node = pos_node <NEW_LINE> self.neg_node = neg_node <NEW_LINE> <DEDENT> @property <NEW_LINE> @abstractmethod <NEW_LINE> def impedance(self): <NEW_LINE> <INDENT> ... | A mixin class for components with two terminals.
| 6259908026068e7796d4e3e6 |
class Dispatcher: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.queue_timeout = QUEUE_TIMEOUT <NEW_LINE> self._commands = Queue() <NEW_LINE> self._results = Queue() <NEW_LINE> <DEDENT> def addCommand(self, command): <NEW_LINE> <INDENT> self._commands.put(command, block=True, timeout=self.queue_timeou... | Sends commands to and receives results from a web browser.
Dispatcher:
_Computer Science_: A routine that controls the order in which input
and output devices obtain access to the processing system.
(source: http://dictionary.reference.com/search?q=dispatcher)
In Selenium, the Dispatcher class takes co... | 6259908023849d37ff852b5f |
class Expression12(Expression): <NEW_LINE> <INDENT> def get(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( self.__class__.__name__)) | Get Background Color
Return type: Int | 62599080d268445f2663a8b1 |
class GarageDoor(Accessory): <NEW_LINE> <INDENT> category = CATEGORY_GARAGE_DOOR_OPENER <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self._led = LED(17) <NEW_LINE> self._lock = None <NEW_LINE> self.add_preload_service("GarageDoorOpener").configure_char... | Garage door opener | 62599080e1aae11d1e7cf565 |
class CallUnits(unittest.TestCase): <NEW_LINE> <INDENT> def testCase310(self): <NEW_LINE> <INDENT> arg = tdata + '/*/"""/[^//]*"""/(c.s.*|c.p.*)$' <NEW_LINE> resX = [ tdata + '/b/c/c.smod', tdata + '/b/c/c.pod', tdata + '/b/c/c.py', tdata + '/b/c/c.pl', tdata + '/b/c/c.pm', tdata + '/b/c/c.sh', tdata + '/b2/c/c.smod', ... | Sets the specific data array and required parameters for test case.
| 6259908044b2445a339b76b0 |
class AVBDiscriminator(pxd.Deterministic): <NEW_LINE> <INDENT> def __init__(self, channel_num, z_dim): <NEW_LINE> <INDENT> super().__init__(cond_var=["x", "z"], var=["t"], name="d") <NEW_LINE> self.disc_x = nn.Sequential( nn.Conv2d(channel_num, 32, 4, stride=2, padding=1), nn.ReLU(), nn.Conv2d(32, 32, 4, stride=2, padd... | T(x, z) | 62599080a8370b77170f1e77 |
class HeadNode(TailNode): <NEW_LINE> <INDENT> def __init__(self, link=None, down=None): <NEW_LINE> <INDENT> TailNode.__init__(self, down) <NEW_LINE> self.link = TailNode() <NEW_LINE> self.skip = None <NEW_LINE> self.index = None <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return ("HeadNode({0}, {1})".fo... | A HeadNode object used in SkipList.
| 62599080dc8b845886d55061 |
class ProcessingStatus(atom.core.XmlElement): <NEW_LINE> <INDENT> _qname = SC_NAMESPACE_TEMPLATE % 'processing_status' | sc:processing_status element
| 62599080099cdd3c6367614d |
class RestaurantNoteSerializer(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = RestaurantNote <NEW_LINE> fields = ('url', 'created', 'title', 'note_text', 'restaurant_id', 'favorite_dish', ) | This class defines the fields that get serialized/deserialized, related
to :model:`RestaurantNote`
author: Mark Ellis | 62599080442bda511e95daaa |
class AmFastError(Exception): <NEW_LINE> <INDENT> def _get_message(self): <NEW_LINE> <INDENT> return self._message <NEW_LINE> <DEDENT> def _set_message(self, message): <NEW_LINE> <INDENT> self._message = message <NEW_LINE> <DEDENT> message = property(_get_message, _set_message) | Base exception for this package. | 62599080aad79263cf430261 |
class Point(GeometryObject,IDisposable): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Create(coord,id=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseManagedResources(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseU... | A 3D point. | 62599080283ffb24f3cf5347 |
class SNSPolicy(ServerlessResource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self["Type"] = "AWS::SNS::TopicPolicy" <NEW_LINE> self["Properties"] = { "PolicyDocument": { "Id": None, "Statement": [ { "Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "sns:Publish", ... | Base class representing a SNS Topic Policy. Inherit and extend using dict interface | 625990807d847024c075de85 |
class Position: <NEW_LINE> <INDENT> def __init__(self, idx, ln, col, fn, ftxt): <NEW_LINE> <INDENT> self.idx = idx <NEW_LINE> self.ln = ln <NEW_LINE> self.col = col <NEW_LINE> self.fn = fn <NEW_LINE> self.ftxt = ftxt <NEW_LINE> <DEDENT> def advance(self, current_char=None): <NEW_LINE> <INDENT> self.idx += 1 <NEW_LINE> ... | Class for keeping track of position.
Methods :
1. advance: updates current index pointer, if line ends, updates line number.
2. copy: returns a copy of its own POSITION object. | 6259908023849d37ff852b61 |
class TreeNode: <NEW_LINE> <INDENT> def __init__(self, init_quality=None, prior_probability=None): <NEW_LINE> <INDENT> self._quality_sum = 0 <NEW_LINE> self._quality_count = 0 <NEW_LINE> if init_quality is not None: <NEW_LINE> <INDENT> self.visit(init_quality) <NEW_LINE> <DEDENT> self.prior_probability = prior_probabil... | Node of the search tree.
Attrs:
children (list): List of children, indexed by action.
is_leaf (bool): Whether the node is a leaf, i.e. has not been expanded
yet. | 62599080d268445f2663a8b2 |
class TestSink(unittest.TestCase): <NEW_LINE> <INDENT> def test_instantiation(self): <NEW_LINE> <INDENT> id = "test_id" <NEW_LINE> stats = {} <NEW_LINE> decoder = Mock(name="decoder_object") <NEW_LINE> decoder.block_size = Mock(return_value=100) <NEW_LINE> c = simulator.sink.Sink(id, stats, decoder) <NEW_LINE> self.ass... | Class for testing Sink. | 6259908097e22403b383c9a8 |
class NickMask(six.text_type): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_params(cls, nick, user, host): <NEW_LINE> <INDENT> return cls('{nick}!{user}@{host}'.format(**vars())) <NEW_LINE> <DEDENT> @property <NEW_LINE> def nick(self): <NEW_LINE> <INDENT> nick, sep, userhost = self.partition("!") <NEW_LINE> ret... | A nickmask (the source of an Event)
>>> nm = NickMask('pinky!username@example.com')
>>> print(nm.nick)
pinky
>>> print(nm.host)
example.com
>>> print(nm.user)
username
>>> isinstance(nm, six.text_type)
True
>>> nm = 'красный!red@yahoo.ru'
>>> if not six.PY3: nm = nm.decode('utf-8')
>>> nm = NickMask(nm)
>>> isins... | 62599080091ae356687066e8 |
class SolventShellsFeaturizer(Featurizer): <NEW_LINE> <INDENT> def __init__(self, solute_indices, solvent_indices, n_shells, shell_width, periodic=True): <NEW_LINE> <INDENT> self.solute_indices = solute_indices <NEW_LINE> self.solvent_indices = solvent_indices <NEW_LINE> self.n_shells = n_shells <NEW_LINE> self.shell_w... | Featurizer based on local, instantaneous water density.
Parameters
----------
solute_indices : np.ndarray, shape=(n_solute,1)
Indices of solute atoms
solvent_indices : np.ndarray, shape=(n_solvent, 1)
Indices of solvent atoms
n_shells : int
Number of shells to consider around each solute atom
shell_width :... | 62599080d486a94d0ba2da5f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.