code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class PackIconSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = PackIcon <NEW_LINE> <DEDENT> def validate_width(self, attrs, source): <NEW_LINE> <INDENT> width = attrs[source] <NEW_LINE> if width < 1.0: <NEW_LINE> <INDENT> raise serializers.ValidationError('Width shoul... | PackIcon's Serializer. | 62598ef38e7ae83300ee78cd |
class RegTV(torch.autograd.Function): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def forward(ctx, loss, u, lbda): <NEW_LINE> <INDENT> assert loss.ndim == 0, ( "The regularized loss should be a scalar. " f"Got ndim={loss.ndim}" ) <NEW_LINE> reg = torch.abs(u[:, 1:] - u[:, :-1]).sum() <NEW_LINE> ctx.save_for_backward(l... | Custom autograd Functions wrapper for a loss regularized with TV
It is a in the classical loss except that it computes the gradient
using the prox instead of using sub-derivatives. | 62598ef3009cb60464cffd94 |
class UserManager(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.file = os.path.join(path, 'users.json') <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> if not os.path.exists(self.file): <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT> with open(self.file) as f: <NEW_LINE> <IND... | A very simple user Manager, that saves it's data as json. | 62598ef3a219f33f346c5077 |
class MoneroMnemonicUtils: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def ComputeChecksum(mnemonic: List[str], lang: MoneroLanguages) -> str: <NEW_LINE> <INDENT> unique_prefix_len = MoneroMnemonicConst.LANGUAGE_UNIQUE_PREFIX_LEN[lang] <NEW_LINE> prefixes = "".join(word[:unique_prefix_len] for word in mnemonic) <NEW_L... | Utility functions for Monero mnemonic. | 62598ef363b5f9789fe839a2 |
class ProcessSingles(ProcessDataTable): <NEW_LINE> <INDENT> table_name = 'singles' | Process HiSPARC singles data to clean the data.
This class can be used to process a set of HiSPARC singles data, to
remove duplicates and sort the data by timestamp to store it in to a
copy of the singles data table. | 62598ef360cbc95b06362b79 |
class InvalidPathError(Exception): <NEW_LINE> <INDENT> def __init__(self, path: str, message: Optional[str] = None): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.message = message or f'{path} does not exist' <NEW_LINE> super().__init__(self.message) | InvalidPathError class. | 62598ef363d6d428bbee1012 |
class Team(models.Model): <NEW_LINE> <INDENT> t_id = models.CharField(max_length=36, primary_key=True) <NEW_LINE> member = models.ManyToManyField(User) <NEW_LINE> create_at = models.DateTimeField(auto_now_add=True) <NEW_LINE> update_at = models.DateTimeField(auto_now_add=True) | Team:
t_id - team id (uuid)
member - team member | 62598ef3283ffb24f3cf20ec |
class V1beta3_ReplicationControllerSpec(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'replicas': 'int', 'selector': 'any', 'template': 'V1beta3_PodTemplateSpec', 'templateRef': 'V1beta3_ObjectReference' } <NEW_LINE> self.attributeMap = { 'replicas': 'replicas', 'selector': ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ef37d43ff248742681d |
class DataRunnerMP: <NEW_LINE> <INDENT> def __init__(self, task_func, task_generator, input_pls, capacity=100): <NEW_LINE> <INDENT> self._input_pls = input_pls <NEW_LINE> self._task_func = task_func <NEW_LINE> self._task_generator = task_generator <NEW_LINE> self.counter = 0 <NEW_LINE> self.processes = [] <NEW_LINE> se... | A multi-processing data runner for tensorflow | 62598ef3aad79263cf42d051 |
class StructuralInstanceUsage(Enum,IComparable,IFormattable,IConvertible): <NEW_LINE> <INDENT> def __eq__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __format__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __ge__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __gt__(sel... | Represents the structural usage of a family instance.
enum StructuralInstanceUsage,values: Automatic (10),Brace (7),Column (2),Girder (3),HorizontalBracing (8),Joist (4),KickerBracing (9),Other (6),Purlin (5),TrussChord (11),TrussWeb (12),Undefined (0),Wall (1) | 62598ef37047854f4633dc0d |
class HeatBase(models.ModelBase, models.TimestampMixin): <NEW_LINE> <INDENT> __table_args__ = {'mysql_engine': 'InnoDB'} <NEW_LINE> def expire(self, session=None, attrs=None): <NEW_LINE> <INDENT> if not session: <NEW_LINE> <INDENT> session = Session.object_session(self) <NEW_LINE> if not session: <NEW_LINE> <INDENT> se... | Base class for Heat Models. | 62598ef399fddb7c1ca62226 |
class AdminTestCase(TestCase): <NEW_LINE> <INDENT> def test_models(self): <NEW_LINE> <INDENT> model_list = [m.__name__ for m in get_model_list()] <NEW_LINE> admin_list = [a.replace("Admin", "") for a in admin.__all__] <NEW_LINE> missing = set(model_list).difference(admin_list) <NEW_LINE> self.assertEqual(missing, set([... | Tests the adminstration panel configuration. | 62598ef3fff4ab517ebcc01c |
class HTTPUnavailableForLegalReasons(OptionalRepresentation, HTTPError): <NEW_LINE> <INDENT> def __init__(self, title, **kwargs): <NEW_LINE> <INDENT> super(HTTPUnavailableForLegalReasons, self).__init__(status.HTTP_451, title, **kwargs) | 451 Unavailable For Legal Reasons.
The server is denying access to the resource as a consequence of a
legal demand.
The server in question might not be an origin server. This type of
legal demand typically most directly affects the operations of ISPs
and search engines.
Responses using this status code SHOULD includ... | 62598ef3a05bb46b384890b7 |
class PasswordResetForm(forms.Form): <NEW_LINE> <INDENT> new_password1 = forms.CharField(label="New password", widget=forms.PasswordInput) <NEW_LINE> new_password2 = forms.CharField(label="New password confirmation", widget=forms.PasswordInput) <NEW_LINE> def clean_new_password2(self): <NEW_LINE> <INDENT> password1 = s... | Form for new password input.
| 62598ef376e4537e8c3eddfc |
class NotValidRequestObjectException(Exception): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> Exception.__init__(self, *args, **kwargs) | Indicates that the event passed in is not a valid Request Object | 62598ef316aa5153ce3fed46 |
class DictionaryProperty(BaseProperty): <NEW_LINE> <INDENT> _allowed_python_types = [dict, NoneType] <NEW_LINE> def __init__(self, name, value, xml_path): <NEW_LINE> <INDENT> super(DictionaryProperty, self).__init__( name, value, xml_path, self._allowed_python_types) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def is_v... | A property that accepts dictionary input. | 62598ef355399d3f05624d6a |
class CoreScheduler(CoreDaemon): <NEW_LINE> <INDENT> kind = "scheduler" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.schedule = None <NEW_LINE> self.next = None <NEW_LINE> self.previous = None <NEW_LINE> self.job = None <NEW_LINE> <DEDENT> def sta... | The scheduler enqueues jobs available in core4 projects installed on the
same node. The scheduler queries the ``schedule`` property of all known
:class:`.CoreJob` implementations.
The timing information in the ``schedule`` attribute uses cron format (see
https://en.wikipedia.org/wiki/Cron). core4 uses :mod:`croniter` ... | 62598ef39c8ee8231303f57d |
class NSNitroNserrAsSigMultipleCreditCardRules(NSNitroAsErrors): <NEW_LINE> <INDENT> pass | Nitro error code 3278
Imported signatures has multiple credit card patterns in Rule. | 62598ef33346ee7daa336a8a |
class PyObjectPtr(object): <NEW_LINE> <INDENT> _typename = 'PyObject' <NEW_LINE> def __init__(self, sbval, cast_type = None): <NEW_LINE> <INDENT> if cast_type: <NEW_LINE> <INDENT> self._SBValue = sbval.Cast(cast_type) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._SBValue = sbval; <NEW_LINE> <DEDENT> <DEDENT> def ... | Class wrapping a value that's either a (PyObject *) within the
inferior process, or some subclass pointer e.g. (PyBytesObject *)
There will be a subclass for every refined PyObject type that we
care about
Note that at every stage the underlying pointer could be nullptr,
point to corrupt data, etc; this is the debugge... | 62598ef3a8370b77170eec29 |
class SteaKeys(object): <NEW_LINE> <INDENT> PROJECT_VERSION = "AlternativeVersion" <NEW_LINE> PROJECT_ID = "AlternativeId" <NEW_LINE> PROFILES = "Profiles" <NEW_LINE> PROFILE_ID = "Id" <NEW_LINE> UNIT = "Unit" <NEW_LINE> MULTIPLE = "Multiple" <NEW_LINE> CONFIG_DATE = "ConfigurationDate" <NEW_LINE> RESULTS = "Results" <... | The SteaKeys class contains string constants which are used in HTTP
communication with the stea web service. | 62598ef367a9b606de544813 |
class Morlet(Cwt): <NEW_LINE> <INDENT> _omega0=5.0 <NEW_LINE> fourierwl=4* np.pi/(_omega0+ np.sqrt(2.0+_omega0**2)) <NEW_LINE> def wf(self, s_omega): <NEW_LINE> <INDENT> H= np.ones(len(s_omega)) <NEW_LINE> n=len(s_omega) <NEW_LINE> for i in range(len(s_omega)): <NEW_LINE> <INDENT> if s_omega[i] < 0.0: H[i]=0.0 <NEW_LIN... | Morlet wavelet | 62598ef3460517430c430ccd |
class SpannerProjectsInstancesOperationsListRequest(_messages.Message): <NEW_LINE> <INDENT> filter = _messages.StringField(1) <NEW_LINE> name = _messages.StringField(2, required=True) <NEW_LINE> pageSize = _messages.IntegerField(3, variant=_messages.Variant.INT32) <NEW_LINE> pageToken = _messages.StringField(4) | A SpannerProjectsInstancesOperationsListRequest object.
Fields:
filter: The standard list filter.
name: The name of the operation's parent resource.
pageSize: The standard list page size.
pageToken: The standard list page token. | 62598ef3dc8b845886d51e0b |
class Whip(CondimentDecorator): <NEW_LINE> <INDENT> def __init__(self, beverage): <NEW_LINE> <INDENT> CondimentDecorator.__init__(self, beverage) <NEW_LINE> <DEDENT> def getDescription(self): <NEW_LINE> <INDENT> return self.beverage.getDescription() + ", whip" <NEW_LINE> <DEDENT> def cost(self): <NEW_LINE> <INDENT> if(... | This class is concrete class for mocha. | 62598ef35fcc89381b26554b |
class RedactMode: <NEW_LINE> <INDENT> ALLOWLIST = 'allow' <NEW_LINE> BLOCKLIST = 'block' <NEW_LINE> BLACKLIST = 'black' <NEW_LINE> WHITELIST = 'white' | RedactMode Options | 62598ef3f9cc0f698b1c46f2 |
class TableCreateUpdateParameters(ARMResourceProperties): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'resource': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'typ... | Parameters to create and update Cosmos DB Table.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM ... | 62598ef321bff66bcd72149c |
class AbstractPushUpdater(PushUpdater): <NEW_LINE> <INDENT> def __init__(self, state_dispatcher: ProtocolStateDispatcher): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() <NEW_LINE> self.state_dispatcher = state_dispatcher <NEW_LINE> self._previous_state... | Abstract push updater class.
This class adds a `post_update` method that will publishes a new state, but only
if it has been updated. | 62598ef37d43ff248742681e |
class ContainerJSONBrowserView(BrowserPage): <NEW_LINE> <INDENT> permission = None <NEW_LINE> def __init__(self, context, request): <NEW_LINE> <INDENT> super(ContainerJSONBrowserView, self).__init__(context, request) <NEW_LINE> self.domain_model = proxy.removeSecurityProxy( self.context).domain_model <NEW_LINE> ti = ca... | Base BrowserView Container listing as a JSON AJAX callback.
| 62598ef376e4537e8c3eddfe |
class OnChange(object): <NEW_LINE> <INDENT> def __init__(self, field): <NEW_LINE> <INDENT> self.field = field <NEW_LINE> self.previous = None <NEW_LINE> <DEDENT> def __call__(self, record): <NEW_LINE> <INDENT> new = getattr(record, self.field) <NEW_LINE> check = self.previous != new <NEW_LINE> self.previous = new <NEW_... | A record filter that checks if the record field has changed.
A copy of the field value is stored in the object and compared against new
values. On value changed the object returns True.
Attributes
----------
field : str
The field to check for change.
previous :
Holds the value of the field.
Notes
-----
- Fi... | 62598ef355399d3f05624d6c |
class B1_XML(SetupMixin, unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> SetupMixin.setUp(self, ET.fromstring(XML_LONG)) <NEW_LINE> <DEDENT> def test_01_FindXML(self): <NEW_LINE> <INDENT> self.assertEqual(self.m_xml.root.tag, 'PyHouse') <NEW_LINE> self.assertEqual(self.m_xml.computer_div.ta... | Be sure that the XXML was created
| 62598ef34a966d76dd5ed722 |
class ChunkMetaclass(type): <NEW_LINE> <INDENT> chunk_taghash = {} <NEW_LINE> chunk_labelhash = {} <NEW_LINE> def __new__(metatype,name,bases,clsdict): <NEW_LINE> <INDENT> vars = [] <NEW_LINE> vars.extend(_decls_to_vars(clsdict.get('struct',''))) <NEW_LINE> vars.extend(_decls_to_vars(clsdict.get('single',''))) <NEW_LIN... | Metaclass of chunk types.
This class takes some static data and defines how to read in
the chunks, and preprocesses it. It also creates a dictionary
of chunk classes keyed by tag. | 62598ef39c8ee8231303f57e |
class TrainableModel(BaseModel): <NEW_LINE> <INDENT> def _create_model(self, **kwargs): <NEW_LINE> <INDENT> self.input = tf.placeholder(tf.float32, shape=[None, 10], name='input') <NEW_LINE> self.target = tf.placeholder(tf.float32, shape=[None, 10], name='target') <NEW_LINE> self.var = tf.get_variable(name='var', shape... | Trainable TF model. | 62598ef3fff4ab517ebcc01e |
class LSTMState: <NEW_LINE> <INDENT> def __init__(self, inpt): <NEW_LINE> <INDENT> if isinstance(inpt, tuple): <NEW_LINE> <INDENT> self._c, self._h = inpt <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._both = inpt <NEW_LINE> self.size = inpt.data.size()[1] // 2 <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def... | Class for intelligent LSTM state object.
It can be initialized from either a tuple ``(c, h)`` or a single variable
`both`, and provides lazy attribute access to ``c``, ``h``, and ``both``.
Since the SPINN conducts all LSTM operations on GPU and all tensor
shuffling on CPU, ``c`` and ``h`` are automatically moved to GP... | 62598ef34527f215b58e8746 |
class BeatTimeConverter: <NEW_LINE> <INDENT> def __init__(self, offset, bpms, stops): <NEW_LINE> <INDENT> self.offset = offset <NEW_LINE> self.bpms = bpms <NEW_LINE> self.stops = stops <NEW_LINE> self.gen_beat_time_mapping() <NEW_LINE> <DEDENT> def beat_to_time(self, beats): <NEW_LINE> <INDENT> beat_idxs = np.digitize(... | Converts beats to time and vice versa.
Also provides some formatting of notes given the calculations. | 62598ef3e1aae11d1e7cdc64 |
@test(groups=["neutron", "ha", "ha_neutron_public"]) <NEW_LINE> class NeutronVlanHaPublicNetwork(TestBasic): <NEW_LINE> <INDENT> @test(depends_on=[SetupEnvironment.prepare_slaves_5], groups=["deploy_neutron_vlan_ha_public_network"]) <NEW_LINE> @log_snapshot_after_test <NEW_LINE> def deploy_neutron_vlan_ha_with_public_n... | NeutronVlanHaPublicNetwork. | 62598ef3adb09d7d5dc08e0f |
class Sample(object): <NEW_LINE> <INDENT> def __init__(self, name, concentrations, densities): <NEW_LINE> <INDENT> self.name=name <NEW_LINE> self.concentrations=np.array(concentrations) <NEW_LINE> self.densities=np.array(densities) <NEW_LINE> replicasCount,measuresCount=self.densities.shape <NEW_LINE> if measuresCount ... | This class holds data for one sample - name concenttration and dencity data | 62598ef34f6381625f1988df |
class Global(Package): <NEW_LINE> <INDENT> homepage = "http://www.gnu.org/software/global" <NEW_LINE> url = "http://tamacom.com/global/global-6.5.tar.gz" <NEW_LINE> version('6.5', 'dfec818b4f53d91721e247cf7b218078') <NEW_LINE> depends_on('exuberant-ctags', type=nolink) <NEW_LINE> depends_on('ncurses') <NEW_LINE> def in... | The Gnu Global tagging system | 62598ef3fff4ab517ebcc01f |
class DebugCancel(Reply): <NEW_LINE> <INDENT> pass | If sent in response to DebugWaiting, the user has changed his/her mind | 62598ef33539df3088ecaaf3 |
class AsyncFile(object): <NEW_LINE> <INDENT> def __init__(self, java_obj): <NEW_LINE> <INDENT> self.java_obj = java_obj <NEW_LINE> <DEDENT> def close(self, handler): <NEW_LINE> <INDENT> self.java_obj.close(FSWrappedHandler(handler)) <NEW_LINE> <DEDENT> def write(self, buffer, position, handler): <NEW_LINE> <INDENT> sel... | Represents a file on the file-system which can be read from, or written to asynchronously.
Methods also exist to get a read stream or a write stream on the file. This allows the data to be pumped to and from
other streams, e.g. an HttpClientRequest instance, using the Pump class | 62598ef34428ac0f6e656d95 |
class Profile(models.Model): <NEW_LINE> <INDENT> first_name = models.CharField(max_length=30) <NEW_LINE> last_name = models.CharField(max_length=30) <NEW_LINE> bio = models.TextField() <NEW_LINE> birth_date = models.DateField() <NEW_LINE> skype = models.CharField(max_length=30) <NEW_LINE> icq = models.CharField(max_len... | My profile model | 62598ef34f88993c371ef90d |
class MergeNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, hparams): <NEW_LINE> <INDENT> super(MergeNet, self).__init__() <NEW_LINE> self.lstm = nn.LSTM(hparams.encoder_embedding_dim, int(hparams.encoder_embedding_dim/2), num_layers=1, batch_first=True, bidirectional=True) <NEW_LINE> <DEDENT> def forward(self, x... | one layer bi-lstm | 62598ef357b8e32f52507527 |
class TableResultNew(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TableInstanceId = None <NEW_LINE> self.TaskId = None <NEW_LINE> self.TableName = None <NEW_LINE> self.TableType = None <NEW_LINE> self.TableIdlType = None <NEW_LINE> self.TableGroupId = None <NEW_LINE> self.Error = Non... | 表处理结果信息
| 62598ef332920d7e50bc4874 |
class Stick: <NEW_LINE> <INDENT> from eos import Spline_eos <NEW_LINE> def __init__( self, eos, x=pemberton.positions, vol_0=1/pemberton.densities.mean(), x_dev=pemberton.x_dev, t_dev=pemberton.t_dev, ): <NEW_LINE> <INDENT> self.eos = eos <NEW_LINE> self.x=x <NEW_LINE> self.vol_0=vol_0 <NEW_LINE> self.x_dev=x_dev <NEW_... | Represents an imagined experiment and simulation that creates data,
t, the "measured" times.
See the subsection "A Rate Stick" in the section "Experiments" of
notes.pdf.
Methods:
fit_v() Return detonation velocity
fit_D() Calculates derivative of t wrt to eos in
terms of spline coefficient... | 62598ef3796e427e5384cfe1 |
class MAXDATA_OT_Upload(_DxPxCombine): <NEW_LINE> <INDENT> table_name = 'maxdata_ot' <NEW_LINE> i2b2_map = dict( patient_ide='bene_id', start_date='srvc_bgn_dt', end_date='srvc_end_dt', update_date='srvc_end_dt', provider_id='npi') | Medicaid Other Therapies
Diagnoses and procedures:
>>> rif_data, col_info, simple_cols = _RIFTestData.build(MAXDATA_OT_Upload)
>>> dx_cols = MAXDATA_OT_Upload.vrsn_cd_groups(col_info, kind='DGNS', aux='DGNS_IND')
>>> obs_dx = MAXDATA_OT_Upload.dx_data(rif_data, MAXDATA_OT_Upload.table_name, dx_cols)
>>> obs_dx.sort_v... | 62598ef37b25080760ed5ce3 |
class Node: <NEW_LINE> <INDENT> def __init__(self, f, g, word, previous): <NEW_LINE> <INDENT> self.f = f <NEW_LINE> self.g = g <NEW_LINE> self.word = word <NEW_LINE> self.previous = previous <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> return self.f < other.f | Object used as holder for heap | 62598ef38e7ae83300ee78d1 |
class PatchConflict(Exception): <NEW_LINE> <INDENT> def __init__(self, message=None, **kw): <NEW_LINE> <INDENT> Exception.__init__(self, message, **kw) | Exception when processing patch was unsuccessfull | 62598ef3dd821e528d6d7785 |
class AdtPulseDotCom(alarm.AlarmControlPanel): <NEW_LINE> <INDENT> def __init__(self, username, password): <NEW_LINE> <INDENT> from python_adtpulse import AdtPulsedotcom <NEW_LINE> _LOGGER.debug('Setting up AdtPulse.com...') <NEW_LINE> self._name = name <NEW_LINE> self._username = username <NEW_LINE> self._password = p... | Represent an AdtPulse.com status. | 62598ef366656f66f7d58c2b |
class GitPillar(GitBase): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self.role = 'git_pillar' <NEW_LINE> GitBase.__init__(self, opts, valid_providers=('gitpython', 'pygit2')) <NEW_LINE> <DEDENT> def checkout(self): <NEW_LINE> <INDENT> self.pillar_dirs = {} <NEW_LINE> for repo in self.remotes: <NE... | Functionality specific to the git external pillar | 62598ef3442bda511e95acab |
class SimulatedMetricsRetina40(Rule): <NEW_LINE> <INDENT> def check(self, context): <NEW_LINE> <INDENT> root = context.tree.getroot() <NEW_LINE> device = root.find('device') <NEW_LINE> if device is not None and device.get('id') not in ALLOWED_DEVICES: <NEW_LINE> <INDENT> context.error( device, 'Simulated metrics ("View... | Ensures simulated metrics are for the iPhone SE or a 38mm watch
which are currently the smallest display profiles. | 62598ef33d592f4c4edb9735 |
class SAXParseException(SAXException): <NEW_LINE> <INDENT> def __init__(self, msg, exception, locator): <NEW_LINE> <INDENT> SAXException.__init__(self, msg, exception) <NEW_LINE> self._locator = locator <NEW_LINE> self._systemId = self._locator.getSystemId() <NEW_LINE> self._colnum = self._locator.getColumnNumber() <NE... | Encapsulate an XML parse error or warning.
This exception will include information for locating the error in
the original XML document. Note that although the application will
receive a SAXParseException as the argument to the handlers in the
ErrorHandler interface, the application is not actually required
to throw th... | 62598ef3aad79263cf42d056 |
class IPaddrSet(LinkedSet): <NEW_LINE> <INDENT> def wait_ip(self, net, mask=None, timeout=None, ignore_link_local=False): <NEW_LINE> <INDENT> family = AF_INET6 if net.find(':') >= 0 else AF_INET <NEW_LINE> alen = 32 if family == AF_INET else 128 <NEW_LINE> net = inet_pton(family, net) <NEW_LINE> if mask is None: <NEW_L... | LinkedSet child class with different target filter. The
filter ignores link local IPv6 addresses when sets and checks
the target.
The `wait_ip()` routine by default does not ignore link local
IPv6 addresses, but it may be changed with the `ignore_link_local`
argument. | 62598ef37d43ff248742681f |
class RegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.RegexField(regex=r'^\S+$', max_length=30, widget=forms.TextInput(attrs=attrs_dict), label=_(u'username')) <NEW_LINE> email = forms.EmailField( widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=75)), label=_(u'email address')) <NEW_LINE> pass... | Form for registering a new user account.
Validates that the requested username is not already in use, and
requires the password to be entered twice to catch typos.
Subclasses should feel free to add any additional validation they
need, but should either preserve the base ``save()`` or implement
a ``save()`` method wh... | 62598ef330bbd7224646847e |
class KillDispatcher(EventDispatcher): <NEW_LINE> <INDENT> name = "kill" <NEW_LINE> need_zmq_stats_enabled = True <NEW_LINE> def dispatch(self, victim, killer, data): <NEW_LINE> <INDENT> return super().dispatch(victim, killer, data) | Event that goes off when someone is killed. | 62598ef316aa5153ce3fed4a |
class GraceNote(Note): <NEW_LINE> <INDENT> def __init__(self, pitch: Union[Pitch, str], duration: Union[Duration, str, float], ties: str = None, notations=(), articulations=(), notehead: Union['Notehead', str] = None, directions: Sequence['Direction'] = (), stemless: bool = False, slashed=False, velocity: int = None): ... | Subclass of :class:`Note` representing a durationless grace note.
:param pitch: see :class:`Note`
:param duration: see :class:`Note`. This will be the displayed duration of the note, even though it takes up no
metric space in the bar.
:param ties: see :class:`Note`
:param notations: see :class:`Note`
:param articu... | 62598ef3e1aae11d1e7cdc65 |
class Space(Container): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.parser = InsetParser() <NEW_LINE> self.output = FixedOutput() <NEW_LINE> <DEDENT> def process(self): <NEW_LINE> <INDENT> self.type = self.header[2] <NEW_LINE> if self.type not in StyleConfig.hspaces: <NEW_LINE> <INDENT> Trace.error... | A space of several types | 62598ef37b180e01f3e4846a |
class Header(ctypes.Structure): <NEW_LINE> <INDENT> _fields_ = [ ('magic', ctypes.c_uint), ('aversion', ctypes.c_ushort), ('future1', ctypes.c_ushort), ('future2', ctypes.c_ushort), ('rawheadlen', ctypes.c_ushort), ('rawreclen', ctypes.c_ushort), ('hertz', ctypes.c_ushort), ('sfuture', ctypes.c_ushort * 6), ('sstatlen'... | Top level struct to describe information about the system running ATOP and the log file itself.
Field descriptions from atop:
aversion Creator atop version with MSB.
future1 Can be reused.
future2 Can be reused.
rawheadlen Length of struct rawheader.
rawreclen Length of struct rawrecord.
... | 62598ef357b8e32f52507528 |
class TaskTimerStats(TimerStats): <NEW_LINE> <INDENT> type = "task_time_running" | Time a running :class:`celery.task.Task`. | 62598ef3fff4ab517ebcc021 |
class HideObject(BaseObject): <NEW_LINE> <INDENT> def __init__(self, pos, image, name, boundingbox=None): <NEW_LINE> <INDENT> box = (image.get_width(), image.get_height()) if not boundingbox else boundingbox <NEW_LINE> super().__init__(pos, image, name, boundingbox=box, interactable=True) <NEW_LINE> <DEDENT> def intera... | Object that the player can hide under
This object is an interactable object that allows the player the hide under it. This is achieved by posting the HIDE,
allowing the game screen to handle the rest. | 62598ef323849d37ff84f905 |
class RBF(Stationary): <NEW_LINE> <INDENT> def K(self, X, X2=None, presliced=False): <NEW_LINE> <INDENT> if not presliced: <NEW_LINE> <INDENT> X, X2 = self._slice(X, X2) <NEW_LINE> <DEDENT> return self.variance * tf.exp(-0.5 * self.square_dist(X, X2)) | The radial basis function (RBF) or squared exponential kernel | 62598ef37d847024c075ac18 |
class PatternValidator(IValidator): <NEW_LINE> <INDENT> def __init__(self, pattern_text): <NEW_LINE> <INDENT> self.pattern_text = pattern_text <NEW_LINE> self.pattern = re.compile(pattern_text) <NEW_LINE> <DEDENT> def __call__(self, variable, new_value): <NEW_LINE> <INDENT> if not self.pattern.match(new_value): <NEW_LI... | A validator ensuring that values match a given pattern | 62598ef33d592f4c4edb9736 |
class Mol: <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self._data = data <NEW_LINE> <DEDENT> def to_js(self): <NEW_LINE> <INDENT> return 'pv.io.pdb(%s)' % json.dumps(self._data) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def from_url(url): <NEW_LINE> <INDENT> response = urlopen(url) <NEW_LINE> i... | Class to hold a molecular structure in Python, essentially something that
can be converted to a PDB data string. | 62598ef38a43f66fc4bf09bd |
class LoadingDialog(utility.ui_class(__file__, 'LoadingDialog')): <NEW_LINE> <INDENT> def __init__(self, callback=lambda: None, text=''): <NEW_LINE> <INDENT> super(LoadingDialog, self).__init__() <NEW_LINE> self.callback = callback <NEW_LINE> self.text = text <NEW_LINE> self.return_value = None <NEW_LINE> self.painted ... | Show a screen while running a background process.
The dialog will be shown until the given callback has terminated. | 62598ef37d847024c075ac19 |
class RepoRegistryIdTestCase(SyncPublishMixin, unittest.TestCase): <NEW_LINE> <INDENT> def test_all(self): <NEW_LINE> <INDENT> cfg = config.get_config() <NEW_LINE> if (cfg.pulp_version < Version('2.14') or not selectors.bug_is_fixed(2723, cfg.pulp_version)): <NEW_LINE> <INDENT> self.skipTest('https://pulp.plan.io/issue... | Show Pulp can publish repos with varying ``repo_registry_id`` values. | 62598ef3236d856c2adc883c |
class Token(str): <NEW_LINE> <INDENT> operators = ['+', '|', '^'] <NEW_LINE> tokenPurePattern = re.compile('^!?[a-z]{1}|[+|^()]{1}$', re.I) <NEW_LINE> @classmethod <NEW_LINE> def is_token(cls, token): <NEW_LINE> <INDENT> return True if isinstance(token, str) else None <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tok... | middleware class that handle all simple functions of tokens | 62598ef3377c676e912f6187 |
class ArActionGroupRatioDrive(ArActionGroup): <NEW_LINE> <INDENT> thisown = _swig_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): <NEW_LINE> <INDENT> this = _AriaPy.new_ArActionGroupRatioDrive(*args) <NEW_LINE... | Proxy of C++ ArActionGroupRatioDrive class | 62598ef31f5feb6acb16149d |
class Solution: <NEW_LINE> <INDENT> def insertNode(self, root, node): <NEW_LINE> <INDENT> if not root: <NEW_LINE> <INDENT> root = node <NEW_LINE> return root <NEW_LINE> <DEDENT> cur = root <NEW_LINE> while cur: <NEW_LINE> <INDENT> if cur.val > node.val: <NEW_LINE> <INDENT> if cur.left: <NEW_LINE> <INDENT> cur = cur.lef... | @param root: The root of the binary search tree.
@param node: insert this node into the binary search tree.
@return: The root of the new binary search tree. | 62598ef35fdd1c0f98e5c7ec |
class FPGA(models.Model): <NEW_LINE> <INDENT> FPGA_CIRCUIT_TYPES = [ ("Controllers", "Controller") ] <NEW_LINE> fpga_circuit_type = models.CharField(max_length=1000, help_text="Enter the type of power electronic circuit to be modeled.", choices=FPGA_CIRCUIT_TYPES) <NEW_LINE> name = models.CharField(max_length=1000, hel... | Model representing Power Electronic circuits | 62598ef3adb09d7d5dc08e11 |
class BiosVfIntelTrustedExecutionTechnology(ManagedObject): <NEW_LINE> <INDENT> consts = BiosVfIntelTrustedExecutionTechnologyConsts() <NEW_LINE> naming_props = set([]) <NEW_LINE> mo_meta = MoMeta("BiosVfIntelTrustedExecutionTechnology", "biosVfIntelTrustedExecutionTechnology", "Intel-Trusted-Execution-Technology", Ver... | This is BiosVfIntelTrustedExecutionTechnology class. | 62598ef3d7e4931a7ef3a8e6 |
class Bill(models.Model): <NEW_LINE> <INDENT> billable = models.ForeignKey('Billable', related_name='bills', null=False, blank=False, on_delete=models.PROTECT) <NEW_LINE> paid = models.BooleanField(_('bezahlt'), default=False) <NEW_LINE> bill_date = models.DateField( _('Aktivierungssdatum'), null=True, blank=True) <NEW... | Actuall Bill for billables | 62598ef3091ae35668703463 |
class ICollectionFilterBrowserLayer(IDefaultBrowserLayer): <NEW_LINE> <INDENT> pass | Marker interface that defines a browser layer. | 62598ef38a349b6b43684a8c |
class SetTrafficMirrorHealthSwitchRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TrafficMirrorId = None <NEW_LINE> self.HealthSwitch = None <NEW_LINE> self.HealthNum = None <NEW_LINE> self.UnhealthNum = None <NEW_LINE> self.IntervalTime = None <NEW_LINE> self.HttpCheckDomain = ... | SetTrafficMirrorHealthSwitch请求参数结构体
| 62598ef3ff9c53063f518eab |
class AuthorUrlDirective(Directive): <NEW_LINE> <INDENT> required_arguments = 0 <NEW_LINE> optional_arguments = 100 <NEW_LINE> has_content = False <NEW_LINE> def run(self): <NEW_LINE> <INDENT> env = self.state.document.settings.env <NEW_LINE> author_url = " ".join(self.arguments) <NEW_LINE> if author_url == "default": ... | Author URL directive. The directive is not rendered, just stored in the
metadata and passed to the templating engine. | 62598ef34527f215b58e874a |
class DateTime(Unit): <NEW_LINE> <INDENT> cls = MEASURE <NEW_LINE> __slots__ = 'tz', <NEW_LINE> def __init__(self, tz=None): <NEW_LINE> <INDENT> if tz is not None and not isinstance(tz, _strtypes): <NEW_LINE> <INDENT> raise TypeError('tz parameter to datetime datashape must be a ' 'string') <NEW_LINE> <DEDENT> self.tz ... | DateTime type | 62598ef37047854f4633dc12 |
class DynamicModelForm(StartXModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = self.model_class <NEW_LINE> fields = "__all__" | "默认显示全部的字段 | 62598ef310dbd63aa1c6f3c3 |
class Language(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=200, help_text='Language (e.g. English, French, etc.)') <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name | Model represending a language (e.g. English, French) | 62598ef31b99ca400228e934 |
class Scheme822v1(object): <NEW_LINE> <INDENT> ID = 'lrc-8-2-2-v1' <NEW_LINE> @staticmethod <NEW_LINE> def order_groups(groups_lists): <NEW_LINE> <INDENT> return ( groups_lists[0][0:2] + groups_lists[1][0:2] + groups_lists[0][2:4] + groups_lists[1][2:4] + groups_lists[2][0:4] ) <NEW_LINE> <DEDENT> INDEX_SHARD_INDICES =... | LRC scheme 8-2-2 (version 1)
This object is a collection of routines and constants relevant
to LRC scheme 8-2-2 (version 1). | 62598ef3fff4ab517ebcc022 |
class SortUI(UI): <NEW_LINE> <INDENT> sort_fns = { 'a': lambda n: n.stat.st_atime if n.stat is not None else -1, 'c': lambda n: n.stat.st_ctime if n.stat is not None else -1, 'd': lambda n: '', 'e': lambda n: SortUI.ext_name(n.name), 'm': lambda n: n.stat.st_ctime if n.stat is not None else -1, 's': lambda n: SortUI.si... | The UI for choosing sorting method. | 62598ef34428ac0f6e656d99 |
class MagenUrls(metaclass=Singleton): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__put_json_headers = {'content-type': 'application/json', 'Accept': 'application/json'} <NEW_LINE> self.__get_json_headers = {'Accept': 'application/json'} <NEW_LINE> self.__post_xml_headers = {'content-type': 'applic... | Known Headers for Magen App | 62598ef363b5f9789fe839aa |
class ROIPooler(nn.Module): <NEW_LINE> <INDENT> def __init__( self, output_size, scales, sampling_ratio, canonical_box_size=224, canonical_level=4, ): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> min_level = -math.log2(scales[0]) <NEW_LINE> max_level = -math.log2(scales[-1]) <NEW_LINE> assert math.isclose(min_leve... | Region of interest feature map pooler that supports pooling from one or more
feature maps. | 62598ef3a17c0f6771d5aaa0 |
class LCLSFacilityOptions(BaseDialog): <NEW_LINE> <INDENT> def __init__(self, parent, params, label_style='bold', content_style='normal', *args, **kwargs): <NEW_LINE> <INDENT> self.params = params <NEW_LINE> BaseDialog.__init__(self, parent, label_style=label_style, content_style=content_style, *args, **kwargs) <NEW_LI... | Options settings specific to LCLS | 62598ef3956e5f7376df4a9e |
class Grid2BasicLSTMCell(GridRNNCell): <NEW_LINE> <INDENT> def __init__(self, num_units, tied=False, non_recurrent_fn=None, forget_bias=1): <NEW_LINE> <INDENT> super(Grid2BasicLSTMCell, self).__init__(num_units=num_units, num_dims=2, input_dims=0, output_dims=0, priority_dims=0, tied=tied, non_recurrent_dims=None if no... | 2D BasicLSTM cell
This creates a 2D cell which receives input and gives output in the first dimension.
The first dimension can optionally be non-recurrent if `non_recurrent_fn` is specified. | 62598ef35fcc89381b26554e |
class ParseError(Exception): <NEW_LINE> <INDENT> pass | Parser related errors. | 62598ef360cbc95b06362b82 |
class Integ52(Integrator): <NEW_LINE> <INDENT> def __init__(self,coeffFileName): <NEW_LINE> <INDENT> Integrator.__init__(self,coeffFileName) <NEW_LINE> i=self.initVars <NEW_LINE> i.yinit=np.array([i.greyConc]) <NEW_LINE> i.nVars=len(i.yinit) <NEW_LINE> <DEDENT> def derivs5(self,y,t): <NEW_LINE> <INDENT> sigma=5.67e-8 <... | rewrite the init and derivs5 methods to
work with a single (grey) daisy | 62598ef37d847024c075ac1b |
class AnnalistSettings(object): <NEW_LINE> <INDENT> def __init__(self, annroot, userhome, options): <NEW_LINE> <INDENT> self.configname = options.configuration <NEW_LINE> self.filename = os.path.join(annroot, "annalist_site/settings", "%s.py"%(self.configname)) <NEW_LINE> self.modulename = "annalist_site.settings.%s"... | Access Annalist settings indicated by command line options.
annroot is the root directory for the annalist software installation.
userhome is the home directory for the current user.
options contains options parsed from the command line. | 62598ef376e4537e8c3ede03 |
class IdStore(Mapping): <NEW_LINE> <INDENT> def __init__(self, key=lambda obj: obj): <NEW_LINE> <INDENT> self.objects = [] <NEW_LINE> self._key = key <NEW_LINE> self._ids = {} <NEW_LINE> <DEDENT> def __getitem__(self, obj): <NEW_LINE> <INDENT> key = self._key(obj) <NEW_LINE> if key not in self._ids: <NEW_LINE> <INDENT>... | Mapping from objects to IDs. If object has not been added to the store,
a new id is generated for it. | 62598ef3bf627c535bcafcbd |
@unittest.skipUnless(sys.platform.startswith("linux"), "This test is not valid on this OS") <NEW_LINE> class test_linuxTmpfsRamdisk(GenericRamdiskTest): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpInstanceSpecifics(self): <NEW_LINE> <INDENT> self.test_start_time = datetime.now() <NEW_LINE> self.logger = CyLogg... | Test for the Linux tmpfs Ramdisk interface
@author: Roy Nielsen | 62598ef37047854f4633dc14 |
class TestDescriptor(Nameable): <NEW_LINE> <INDENT> def __get__(self, instance, owner): <NEW_LINE> <INDENT> return self | Descriptor that returns itself for introspection in tests. | 62598ef34527f215b58e874c |
class WholeIntegrationTest(unittest.TestCase): <NEW_LINE> <INDENT> pass | Test case to test the entire MPD playstats tags update script, end to end. This is an integration
test, not a unit test, and it utilizes all the modules the script uses. The script is executed
as it would be normally, but this test case checks the results against expected results to verify
accuracy after setting up in... | 62598ef39c8ee8231303f581 |
class GGPlotSVG(ggplot2.GGPlot): <NEW_LINE> <INDENT> def svg(self, width = 6, height = 4): <NEW_LINE> <INDENT> with grdevices.render_to_bytesio(grdevices.svg, width=width, height=height) as b: <NEW_LINE> <INDENT> robjects.r("print")(self) <NEW_LINE> data = b.getvalue() <NEW_LINE> ip_img = Image(data=data, format='svg',... | The embedding of several SVG figures into one ipython notebook is
giving garbled figures. The SVG functionality is taken out to a
child class. | 62598ef3e1aae11d1e7cdc67 |
class RegistrationManager(Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return RegistrationQuerySet(self.model, using=self._db).select_related( 'course', 'student', 'student__fullname', 'items__title' ).prefetch_related('items') <NEW_LINE> <DEDENT> def registered(self): <NEW_LINE> <INDENT> ... | A Manager selecting related course, barter item titles and student fullname | 62598ef3097d151d1a2bf86d |
class ObjectCreator(ColanderResource): <NEW_LINE> <INDENT> class CreatorSchema(Schema): <NEW_LINE> <INDENT> data = fields.Dict(required=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> strict = True <NEW_LINE> <DEDENT> <DEDENT> @use_kwargs(CreatorSchema) <NEW_LINE> def post(self, type_, data): <NEW_LINE> <INDENT> obj_t... | Creates an object and returns it's ID. | 62598ef310dbd63aa1c6f3c5 |
class ServerConnectionMixin: <NEW_LINE> <INDENT> def __init__(self, server_address=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.server_conn = self.__make_server_conn(server_address) <NEW_LINE> self.__check_self_connect() <NEW_LINE> <DEDENT> def __check_self_connect(self): <NEW_LINE> <INDENT> address = ... | Mixin that provides a layer with the capabilities to manage a server connection.
The server address can be passed in the constructor or set by calling :py:meth:`set_server`.
Subclasses are responsible for calling :py:meth:`disconnect` before returning.
Recommended Usage:
.. code-block:: python
class MyLayer(Laye... | 62598ef3bd1bec0571e144f1 |
class BaseAPI(object): <NEW_LINE> <INDENT> def __init__(self, spec): <NEW_LINE> <INDENT> self.spec = spec <NEW_LINE> self.actions = Object() <NEW_LINE> self.models = Object() <NEW_LINE> name = self.spec['name'] <NEW_LINE> if name in cosmos.keys(): <NEW_LINE> <INDENT> raise RuntimeError("API already exists: {}".format(n... | This class represents the common interface for the server-side and the
client-side API objects. It contains the API spec as well as a collection
of functions for each API endpoint. On the server side, these functions
are user-defined. On the client side, they are created automatically to
execute HTTP calls. | 62598ef399fddb7c1ca6222a |
class ResourceProfile: <NEW_LINE> <INDENT> @overload <NEW_LINE> def __init__(self, _java_resource_profile: JavaObject): <NEW_LINE> <INDENT> ... <NEW_LINE> <DEDENT> @overload <NEW_LINE> def __init__( self, _java_resource_profile: None = ..., _exec_req: Optional[Dict[str, ExecutorResourceRequest]] = ..., _task_req: Optio... | Resource profile to associate with an RDD. A :class:`pyspark.resource.ResourceProfile`
allows the user to specify executor and task requirements for an RDD that will get
applied during a stage. This allows the user to change the resource requirements between
stages. This is meant to be immutable so user cannot change i... | 62598ef37b180e01f3e4846c |
class FakeIOSXRNETCONFDevice(BaseTestDouble): <NEW_LINE> <INDENT> @property <NEW_LINE> def server_capabilities(self): <NEW_LINE> <INDENT> ns = {"nc": "urn:ietf:params:xml:ns:netconf:base:1.0"} <NEW_LINE> server_capabilities = [] <NEW_LINE> try: <NEW_LINE> <INDENT> full_path = self.find_file("server_capabilities.xml") <... | IOSXR NETCONF device test double. | 62598ef3796e427e5384cfe6 |
class MyPy(object): <NEW_LINE> <INDENT> VERSION = parse_mypy_version() <NEW_LINE> def __init__(self, code, filename, mypypath, settings): <NEW_LINE> <INDENT> self.code = code <NEW_LINE> self.filename = filename <NEW_LINE> self.mypypath = mypypath <NEW_LINE> self.settings = settings <NEW_LINE> <DEDENT> @property <NEW_LI... | MyPy class for Anaconda
| 62598ef323849d37ff84f909 |
class Prior(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, args): <NEW_LINE> <INDENT> super(Prior, self).__init__() <NEW_LINE> self.sig1 = args.sig1 <NEW_LINE> self.sig2 = args.sig2 <NEW_LINE> self.pi = args.pi <NEW_LINE> self.device = args.device <NEW_LINE> self.s1 = torch.tensor([math.exp(-1. * self.sig1)],... | Scaled Gaussian Mixtures for Priors | 62598ef4498bea3a75a56381 |
class Cluster: <NEW_LINE> <INDENT> def __init__(self, dataframe, n_split=2, feature_list=None, parents=None, children=None, name=None): <NEW_LINE> <INDENT> self.features = feature_list or list(dataframe) <NEW_LINE> self.dataframe = dataframe[self.features] <NEW_LINE> self.n_split = n_split <NEW_LINE> self.parents = par... | A tree-node type container that is capable of decomposing itself based on PCA and holds the
following information
- features in this cluster
- first n PCA components and their corresponding eigenvalues | 62598ef460cbc95b06362b83 |
class note(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> title = db.Column(db.String(120)) <NEW_LINE> content = db.Column(db.Text) <NEW_LINE> last_modified = db.Column(db.Date) <NEW_LINE> userid = db.Column(db.Integer, db.ForeignKey(user.userid)) <NEW_LINE> def save(self): <NEW_... | id number
title string
content string
last_modified date | 62598ef4be383301e0252029 |
class Task(control.Task): <NEW_LINE> <INDENT> def __init__(self, random=None): <NEW_LINE> <INDENT> if not isinstance(random, np.random.RandomState): <NEW_LINE> <INDENT> random = np.random.RandomState(random) <NEW_LINE> <DEDENT> self._random = random <NEW_LINE> self._visualize_reward = False <NEW_LINE> <DEDENT> @propert... | Base class for tasks in the Control Suite.
Maps actions directly to the states of MuJoCo actuators.
Attributes:
random: A `numpy.random.RandomState` instance. This should be used to
generate all random variables associated with the task, such as random
starting states, observation noise* etc.
*If sensor no... | 62598ef4aad79263cf42d05b |
class FixBondLengthAlt: <NEW_LINE> <INDENT> def __init__(self, bond, indices, masses, maxstep=0.01): <NEW_LINE> <INDENT> self.indices = indices <NEW_LINE> self.bond = bond <NEW_LINE> self.h1 = None <NEW_LINE> self.h2 = None <NEW_LINE> self.masses = masses <NEW_LINE> self.h = [] <NEW_LINE> self.sigma = 1. <NEW_LINE> <DE... | Constraint subobject for fixing bond length within FixInternals. | 62598ef4f9cc0f698b1c46f6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.