code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class UnsupportedSchema(ReschemaException): <NEW_LINE> <INDENT> pass
Schema uses an unsupported schema format.
62598f05adb09d7d5dc0903d
class LDS(InstRunner): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return "LDS" <NEW_LINE> <DEDENT> def _match(self,instr): <NEW_LINE> <INDENT> opcode = instr.extract_field_u(0b1111100000000000) <NEW_LINE> return opcode == 0b10100 <NEW_LINE> <DEDENT> def _execute(self,instr,state): <NEW_LINE> <INDENT> r...
Còpia memòria a registre.
62598f0550812a4eaa620132
class HybridSynth: <NEW_LINE> <INDENT> def __init__( self, n_harmonics, SR, PAGE_LEN, DTYPE, ): <NEW_LINE> <INDENT> self.n_harmonics = n_harmonics <NEW_LINE> self.SR = SR <NEW_LINE> self.PAGE_LEN = PAGE_LEN <NEW_LINE> self.DTYPE = DTYPE <NEW_LINE> self.bin_freq = SR / PAGE_LEN <NEW_LINE> self.hSynth = HarmonicSynth( n_...
`max_out_of_tune`: smaller gives better precision but slower to synth. (It decides the register cutoff.)
62598f05377c676e912f62ac
class ProfinetIO(Packet): <NEW_LINE> <INDENT> fields_desc = [XShortEnumField("frameID", 0, PNIO_FRAME_IDS)] <NEW_LINE> def guess_payload_class(self, payload): <NEW_LINE> <INDENT> if self.frameID == 0xfefe or 0xfeff or 0xfefd: <NEW_LINE> <INDENT> return PNDCPHeader
Basic PROFINET IO dispatcher
62598f050fa83653e46f3971
class UNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, pretrained=False): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> encoder = models.vgg16_bn(pretrained=pretrained).features <NEW_LINE> self.conv1 = encoder[:6] <NEW_LINE> self.conv2 = encoder[6:13] <NEW_LINE> self.conv3 = encoder[13:23] <NEW_LINE> self.co...
UNet Model inspired by the the original UNet paper Parameters ---------- pretrained: bool (default=True) Option to use pretrained vgg16_bn based on ImageNet References ---------- .. [1] Olaf Ronneberger, Philipp Fischer, Thomas Brox, 2015, "U-Net: Convolutional Networks for Biomedical Image Segmentation,". ...
62598f054f88993c371efa32
class BotQueueWorker(BotThread): <NEW_LINE> <INDENT> def __init__(self, name: str, jobs: Queue = None, target: classmethod = None, *args): <NEW_LINE> <INDENT> super().__init__(name=name, target=target, *args) <NEW_LINE> self._jobs = jobs <NEW_LINE> <DEDENT> def _call(self, *args): <NEW_LINE> <INDENT> while True: <NEW_L...
A worker thread that works on a given queue. It is polling new jobs from the queue and processes it.
62598f055fcc89381b265672
class ForumThreadsBaseFeed(Feed): <NEW_LINE> <INDENT> def items(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def item_title(self, item): <NEW_LINE> <INDENT> return item.title <NEW_LINE> <DEDENT> def item_description(self, item): <NEW_LINE> <INDENT> return item.first_post.content_html <NEW_...
Base class for any forum's threads feed.
62598f0571ff763f4b5e61f1
class AttributeListAPIView(APIView): <NEW_LINE> <INDENT> model = None <NEW_LINE> serializer = None <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> qs = self.model.objects.all() <NEW_LINE> serializer = self.serializer(qs, many=True) <NEW_LINE> return Response( serializer.data, status=status.HTTP_...
Базовый класс view для отображения списка атрибутов и создания новых сущностей с помощью http-метода post Для работы необходимо определить не абстрактный класс атрибута и его сериализатор
62598f05aad79263cf42d29e
class OpenDaylight(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> plugin_name = 'opendaylight' <NEW_LINE> profiles = ('openstack', 'openstack_controller') <NEW_LINE> packages = ('opendaylight', 'puppet-opendaylight') <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.add_copy_spec("/opt/opendaylight/etc/") <NEW_LINE> sel...
OpenDaylight network manager
62598f05091ae356687036a8
class Test2DStatsArrays(Test2DStats): <NEW_LINE> <INDENT> @property <NEW_LINE> def empyrical(self): <NEW_LINE> <INDENT> return PassArraysEmpyricalProxy(self, np.ndarray) <NEW_LINE> <DEDENT> def assert_indexes_match(self, result, expected): <NEW_LINE> <INDENT> pass
Tests pass np.ndarray inputs to empyrical and assert that outputs are of type np.ndarray.
62598f05fff4ab517ebcc262
class AlgConfig: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.use_metamodel = False <NEW_LINE> self.maxGenIter = 10 <NEW_LINE> self.metamodel = None <NEW_LINE> <DEDENT> def LoadFromXmlNode(self, node): <NEW_LINE> <INDENT> pass
Algorithm settings.
62598f05a8370b77170eee6b
class StringyFloat(Float): <NEW_LINE> <INDENT> def from_json(self, value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return float(value) <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> return None
A model type that converts from string to floats when reading from json. If value does not parse as a float, returns None.
62598f055fdd1c0f98e5ca2e
class CFarJob(pipeline.SqliteJob): <NEW_LINE> <INDENT> def __init__(self, cp, sections): <NEW_LINE> <INDENT> exec_name = 'cfar' <NEW_LINE> pipeline.SqliteJob.__init__(self, cp, sections, exec_name)
A cfar job. The static options are read from the section [cfar] in the ini file.
62598f05283ffb24f3cf233a
class UsesAnnotations: <NEW_LINE> <INDENT> def get_item_annotation_str( self, db_session, user, item ): <NEW_LINE> <INDENT> annotation_obj = self.get_item_annotation_obj( db_session, user, item ) <NEW_LINE> if annotation_obj: <NEW_LINE> <INDENT> return galaxy.util.unicodify( annotation_obj.annotation ) <NEW_LINE> <DEDE...
Mixin for getting and setting item annotations.
62598f05ab23a570cc2d42b3
class S3DAL(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> adapter = current.db._adapter <NEW_LINE> try: <NEW_LINE> <INDENT> dialect = adapter.dialect <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> self.INVERT = adapter.INVERT <NEW_LINE> self.COMMA = adapter.COMMA <NEW_LINE> self.O...
Adapter class for backwards-incompatible PyDAL changes
62598f057cff6e4e811b4475
class InterfacesTestCase(unittest.TestCase): <NEW_LINE> <INDENT> pass
Test interfaces.
62598f055fc7496912d477bb
class DealerPublisherBase(zmq_publisher_base.PublisherBase): <NEW_LINE> <INDENT> def __init__(self, conf, matchmaker, sender, receiver): <NEW_LINE> <INDENT> sockets_manager = zmq_sockets_manager.SocketsManager( conf, matchmaker, zmq.ROUTER, zmq.DEALER ) <NEW_LINE> super(DealerPublisherBase, self).__init__(sockets_manag...
Abstract DEALER-publisher.
62598f0531939e2706ed0fa9
class Ising(Gate): <NEW_LINE> <INDENT> @check_gate.Ising_check <NEW_LINE> def __init__(self, phi): <NEW_LINE> <INDENT> Gate.__init__(self) <NEW_LINE> super(Ising, self).set_name('Ising') <NEW_LINE> super(Ising, self).set_matrix(numpy.matrix([ [1, 0, 0, complex(0, -1) * complex(numpy.cos(phi), numpy.sin(phi))], [0, 1, c...
This class is an inherited class from the Gate class. It’s the implementation of the Ising gate. Its unitary matrix:
62598f05ff9c53063f5190f0
class ArrayAdder(ExplicitComponent): <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> super(ArrayAdder, self).__init__() <NEW_LINE> self.size = size <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.add_input('x', val=np.zeros(self.size), units='inch') <NEW_LINE> self.add_output('y', val=np...
Just a simple component that has array inputs and outputs
62598f05a05bb46b38489306
class CachedDataset(object): <NEW_LINE> <INDENT> def __init__(self, dataset, cache_across_multiprocess=True): <NEW_LINE> <INDENT> if not isinstance(dataset, torch.utils.data.dataset.Dataset): <NEW_LINE> <INDENT> raise ValueError(f"Unknown type {type(dataset)}") <NEW_LINE> <DEDENT> self.__class__ = type( dataset.__class...
A wrapper around torch.utils.data.dataset.Dataset that cache __getitem__.
62598f067c178a314d78bf2e
class TI_model_Laura(TI_model): <NEW_LINE> <INDENT> def __init__(self, file, file_type, m): <NEW_LINE> <INDENT> TI_model.__init__(self, file, file_type, m) <NEW_LINE> self.statistics_file = "%d_%d_TI_Laura.csv" % (self.n, m) <NEW_LINE> <DEDENT> def build_model(self): <NEW_LINE> <INDENT> for i in self.iterator: <NEW_LIN...
docstring for TI_model_Laura
62598f06ec188e330fdf7340
class TestOrthogonalLattice(unittest.TestCase): <NEW_LINE> <INDENT> def test_incorrect_dimensions(self): <NEW_LINE> <INDENT> lattice = OrthogonalLattice() <NEW_LINE> with self.assertRaises(XenticaException): <NEW_LINE> <INDENT> lattice.dimensions = 0 <NEW_LINE> <DEDENT> <DEDENT> def test_wrong_field_size(self): <NEW_LI...
Tests for ``OrthogonalLattice`` class.
62598f064527f215b58e898b
class HideIfDraftRegistration(ConditionalField): <NEW_LINE> <INDENT> def should_hide(self, instance): <NEW_LINE> <INDENT> return isinstance(instance, DraftRegistration) or isinstance(getattr(instance, 'draft_registration', False), DraftRegistration) <NEW_LINE> <DEDENT> def should_be_none(self, instance): <NE...
If object is a draft registration, or related to a draft registration, hide the field.
62598f06ab23a570cc2d42b4
class MainForm(QtWidgets.QDialog): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(MainForm, self).__init__(parent) <NEW_LINE> self.setMinimumWidth(500) <NEW_LINE> self.label = QtWidgets.QLabel('Input file...') <NEW_LINE> self.input_path = QtWidgets.QLineEdit() <NEW_LINE> self.output_path...
The main (and so far only) form.
62598f06283ffb24f3cf233c
class Stage(object): <NEW_LINE> <INDENT> def __init__(self, stage_dict, stage_index, test): <NEW_LINE> <INDENT> self.stage_dict = stage_dict <NEW_LINE> self.stage_index = stage_index <NEW_LINE> self.test = test <NEW_LINE> self.input = Input(**stage_dict['input']) <NEW_LINE> self.output = Output(stage_dict['output']) <N...
This class holds information about 1 stage in a test, which contains 1 input and 1 output
62598f06dc8b845886d52057
class PostLikeDeleteView(generics.DestroyAPIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated, IsOwnerOrReadOnly) <NEW_LINE> authentication_classes = (MyAuthentication,) <NEW_LINE> queryset = PostLike.objects.all() <NEW_LINE> def delete(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return self.des...
以认证用户允许取消自己所点的赞
62598f067cff6e4e811b4477
class PersistentDictionary: <NEW_LINE> <INDENT> def __init__(self, store=None): <NEW_LINE> <INDENT> self.store = store <NEW_LINE> if store is not None: <NEW_LINE> <INDENT> self.dictionary = store.get_all_entries() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.dictionary = {} <NEW_LINE> <DEDENT> <DEDENT> def put(se...
A dictionary implementation that optionally writes through to a persistent data store.
62598f067b180e01f3e48590
class Resource(object): <NEW_LINE> <INDENT> def __init__(self, collection, request, ordered_params, resolvers, collection_path, parser): <NEW_LINE> <INDENT> self.__collection = collection <NEW_LINE> self.__request = request <NEW_LINE> self.__name = None <NEW_LINE> self.__self_link = None <NEW_LINE> self.__ordered_param...
Information about a Cloud resource.
62598f06be7bc26dc92513ac
class ConfiguringRunner(RunnerProper): <NEW_LINE> <INDENT> def __call__(self) -> int: <NEW_LINE> <INDENT> super().__call__() <NEW_LINE> version_data = self.build_dir.installed_versions if self.build_dir.installed_versions else dict() <NEW_LINE> for dependency in self.project.dependencies: <NEW_LINE> <INDENT>...
A class for creating callable objects that represent the configuring mode runners of the build script.
62598f06d8ef3951e32c739b
class Softplus(Layer): <NEW_LINE> <INDENT> def __init__(self, *, trainable=True): <NEW_LINE> <INDENT> self.cache_in = None <NEW_LINE> self.trainable = trainable <NEW_LINE> self.l_name = 'LeakyReLU' <NEW_LINE> self.params = [] <NEW_LINE> <DEDENT> def forward(self, X, train=True): <NEW_LINE> <INDENT> out = np.log(1+np.ex...
Represent a nonlinear transformation Y = log(1+exp(X))
62598f067047854f4633de59
class PipetteNotAttachedError(KeyError): <NEW_LINE> <INDENT> pass
An error raised if a pipette is accessed that is not attached
62598f06ab23a570cc2d42b5
@ui.register_ui(field_name=ui.TextField(By.NAME, 'name')) <NEW_LINE> class FormCreateProject(_ui.Form): <NEW_LINE> <INDENT> submit_locator = By.CSS_SELECTOR, 'input.btn.btn-primary'
Form to create new project.
62598f064527f215b58e898d
class DBManagerError(Exception): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return repr("Some troubles with database database")
Error of DB or pool manager.
62598f067b180e01f3e48591
class ProxyMinionSimpleTestCase(ModuleCase): <NEW_LINE> <INDENT> def test_can_it_ping(self): <NEW_LINE> <INDENT> ret = self.run_function('test.ping', minion_tgt='proxytest') <NEW_LINE> self.assertEqual(ret, True) <NEW_LINE> <DEDENT> def test_list_pkgs(self): <NEW_LINE> <INDENT> ret = self.run_function('pkg.list_pkgs', ...
Test proxy minion functionality
62598f064a966d76dd5ed967
class TempFile(aff4.AFF4MemoryStream): <NEW_LINE> <INDENT> def __init__(self, urn, **kwargs): <NEW_LINE> <INDENT> if urn is None: <NEW_LINE> <INDENT> urn = rdfvalue.RDFURN("aff4:/tmp").Add("%X" % utils.PRNG.GetULong()) <NEW_LINE> <DEDENT> super(TempFile, self).__init__(urn, **kwargs)
A temporary file (with a random URN) to store an RDFValue.
62598f06283ffb24f3cf233f
class CertifiedBy(WOT): <NEW_LINE> <INDENT> def __init__(self, connection_handler, search, module='wot'): <NEW_LINE> <INDENT> super(WOT, self).__init__(connection_handler, module) <NEW_LINE> self.search = search <NEW_LINE> <DEDENT> def __get__(self, **kwargs): <NEW_LINE> <INDENT> assert self.search is not None <NEW_LIN...
GET Certification data from a member.
62598f06656771135c48811f
class FixedBinarizedMNIST(TrainValidTestLoader): <NEW_LINE> <INDENT> def __init__(self, root=DATA_PATH, download=True): <NEW_LINE> <INDENT> self.train = FixedBinaryMNISTDataset(root, split='train', download=download) <NEW_LINE> self.valid = FixedBinaryMNISTDataset(root, split='valid') <NEW_LINE> self.test = FixedBinary...
The MNIST dataset of (LeCun, 1998): http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf with a fixed binarization as used in (Larochelle & Murray, 2011): http://proceedings.mlr.press/v15/larochelle11a/larochelle11a.pdf See Footnote 2 on page 6 and Appendix D of (Burda et al., 2015): https://arxiv.org/pdf/1509.00519.pdf...
62598f06a05bb46b3848930a
class DocAttention(tf.keras.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, num_heads, head_size, kernel_initializer="glorot_uniform", bias_initializer="zeros", kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None, **kwargs): <NEW_LINE> <INDENT> s...
Documents Attention layer.
62598f06ff9c53063f5190f4
class TestLoginWithGoogleDto(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testLoginWithGoogleDto(self): <NEW_LINE> <INDENT> pass
LoginWithGoogleDto unit test stubs
62598f06377c676e912f62af
class IdentityProviderCredentials( OktaObject ): <NEW_LINE> <INDENT> def __init__(self, config=None): <NEW_LINE> <INDENT> super().__init__(config) <NEW_LINE> if config: <NEW_LINE> <INDENT> if "client" in config: <NEW_LINE> <INDENT> if isinstance(config["client"], identity_provider_credentials_client.IdentityProviderCre...
A class for IdentityProviderCredentials objects.
62598f065fcc89381b265675
class Rp(HTML5Element): <NEW_LINE> <INDENT> pass
Element corresponding to the ``<rp>`` tag
62598f067cff6e4e811b447b
class DefaultPackageRepositoryLoader(PackageRepositoryLoader): <NEW_LINE> <INDENT> def load(self, name: str, path: pathlib.Path) -> PackageRepository: <NEW_LINE> <INDENT> return DefaultPackageRepository(name, path)
Default implementation of a repository loader.
62598f06283ffb24f3cf2341
class MError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.message)
Exception raised for errors.
62598f06ff9c53063f5190f6
class CCXToffoli(CCXFactory): <NEW_LINE> <INDENT> def ccx(self, qc, conditial_case, control_qubits, tgt): <NEW_LINE> <INDENT> bit_string = "{:b}".format(conditial_case).zfill(len(control_qubits)) <NEW_LINE> for i, b in enumerate(reversed(bit_string)): <NEW_LINE> <INDENT> if b == '0': <NEW_LINE> <INDENT> qc.x(control_qu...
cc-X gate implemented via the Toffoli cascade with auxiliary qubits.
62598f0671ff763f4b5e61f9
class IsLoggedInUserOrAdmin(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> return obj == request.user or request.user.is_staff
Restricting normal user
62598f06ab23a570cc2d42b7
class ContentBlob(object): <NEW_LINE> <INDENT> __storm_table__ = "ContentBlob" <NEW_LINE> hash = RawStr(primary=True, allow_none=False) <NEW_LINE> crc32 = Int(allow_none=False) <NEW_LINE> size = Int(allow_none=False) <NEW_LINE> storage_key = StormUUID() <NEW_LINE> deflated_size = Int() <NEW_LINE> content = RawStr() <NE...
Associates a hash with a specific storage key in S3 or in the case of symlinks and sufficiently small files, the file contents directly. In S3, file contents are deflated, but this is not reflected anywhere except in ContentBlob.deflated_size.
62598f063d592f4c4edb997f
class PersistentSessionDataContainer(Persistent, IterableUserDict): <NEW_LINE> <INDENT> __parent__ = __name__ = None <NEW_LINE> implements(ISessionDataContainer, IAttributeAnnotatable) <NEW_LINE> _v_last_sweep = 0 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.data = OOBTree() <NEW_LINE> self.timeout = 1 * 60 ...
A SessionDataContainer that stores data in the ZODB
62598f067047854f4633de5d
@base.ReleaseTracks(base.ReleaseTrack.BETA) <NEW_LINE> class ErrorReporting(base.Group): <NEW_LINE> <INDENT> def Filter(self, context, args): <NEW_LINE> <INDENT> context['clouderrorreporting_client_v1beta1'] = apis.GetClientInstance( 'clouderrorreporting', 'v1beta1') <NEW_LINE> context['clouderrorreporting_messages_v1b...
Manage Stackdriver Error Reporting.
62598f06aad79263cf42d2a6
class DoubleInputDialog: <NEW_LINE> <INDENT> def __init__(self, title, label_str1, label_str2, input_str1=None, input_str2=None, is_modal=True, ok_handler=None, cancel_handler=None, transient_for=None): <NEW_LINE> <INDENT> self.xml = get_builder('dubbleinput_dialog.ui') <NEW_LINE> self.dialog = self.xml.get_object('dub...
Class for Double Input dialog
62598f06fff4ab517ebcc26a
class Migration(migrations.Migration): <NEW_LINE> <INDENT> dependencies = [ ('auth', '0007_alter_validators_add_error_messages'), ('api', '0002_stagebag'), ] <NEW_LINE> operations = [ migrations.CreateModel( name='GlobusUser', fields=[ ('user_ptr', models.OneToOneField( auto_created=True, on_delete=django.db.models.del...
**Warning on this migration!** This is a quick and dirty migration that won't properly add users to all existing bags properly. Instead of assigning the correct user, it will assign nick@globus.org. This is a quick hack in the interest of time since we don't have a ton of very important data yet and can probably afford...
62598f06099cdd3c63674922
class H_RNN_CNN(H_RNN): <NEW_LINE> <INDENT> def init_embeddings(self, hparams): <NEW_LINE> <INDENT> self.input_embedding, self.input_emb_init, self.input_emb_placeholder = model_helper.create_embeddings (vocab_size=self.vocab_size, emb_size=hparams.input_emb_size, emb_trainable=hparams.input_emb_trainable, e...
Hierarchical Model with RNN in the session level and CNN in the utterance level.
62598f06dc8b845886d5205d
class ConfFixture(config_fixture.Config): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ConfFixture, self).setUp() <NEW_LINE> self.conf.set_default('api_paste_config', paths.state_path_def('etc/nova/api-paste.ini')) <NEW_LINE> self.conf.set_default('host', 'fake-mini') <NEW_LINE> self.conf.set_default(...
Fixture to manage global conf settings.
62598f0697e22403b3839977
class Newz: <NEW_LINE> <INDENT> def __init__(self,author,title,description,url,urlToImage,publishedAt,content): <NEW_LINE> <INDENT> self.author = author <NEW_LINE> self.title = title <NEW_LINE> self.description = description <NEW_LINE> self.url =url <NEW_LINE> self.urlToImage = urlToImage <NEW_LINE> self.publishedAt =...
Newz class to define Newz objects
62598f06bf627c535bcaff0c
class TypedProgPop(Population): <NEW_LINE> <INDENT> species = MyTypedProg <NEW_LINE> initPopulation = 30 <NEW_LINE> childCull = 30 <NEW_LINE> childCount = 20 <NEW_LINE> mutants = 0.3
Population class for typed programming demo
62598f0631939e2706ed0fad
class SignUpPageLocators(object): <NEW_LINE> <INDENT> BASE_URL = "https://www.ziprecruiter.com/" <NEW_LINE> SIGNUP_URL = BASE_URL + "contact/create" <NEW_LINE> NAME_ID = 'contactName' <NEW_LINE> EMAIL_CLASS = "email_hint" <NEW_LINE> CREATE_CLASS = "w100pPhone" <NEW_LINE> ERROR_MSG_CLASS = "error_constraint_callback"
Signup Page CSS Selectors, IDs and Name Holders
62598f06a05bb46b3848930e
class Car(): <NEW_LINE> <INDENT> def __init__(self, make, model, year): <NEW_LINE> <INDENT> self.make = make <NEW_LINE> self.model = model <NEW_LINE> self.year = year <NEW_LINE> self.odometer_reading = 0 <NEW_LINE> <DEDENT> def get_descriptive_name(self): <NEW_LINE> <INDENT> long_name = str(self.year) + ' ' + self.make...
一次模拟汽车的简单尝试
62598f0660cbc95b06362dc8
class GetAliasesByEntityResultSet(ResultSet): <NEW_LINE> <INDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None)
Retrieve the value for the "Response" output from this choreography execution. (The response from LittleSis.org.)
62598f069f2886367281728d
class SrcMulEdgeMessageFunction(object): <NEW_LINE> <INDENT> def __init__(self, src_field, edge_field, out_field): <NEW_LINE> <INDENT> self.mul_op = operator.mul <NEW_LINE> self.src_field = src_field <NEW_LINE> self.edge_field = edge_field <NEW_LINE> self.out_field = out_field <NEW_LINE> <DEDENT> def __call__(self, edg...
This is a temporary workaround for dgl's built-in srcmuledge message function as it is currently incompatible with NodeFlow.
62598f060fa83653e46f397b
class InvalidAccessTokenError(AskhomeException): <NEW_LINE> <INDENT> pass
Amazon docs: Indicates that the access token used for authentication is not valid for a reason other than it has expired.
62598f06167d2b6e312b5a33
class Class: <NEW_LINE> <INDENT> def __init__(self, class_dict): <NEW_LINE> <INDENT> self._class_number = class_dict.get('id') <NEW_LINE> self._profile_name = class_dict.get('profile') <NEW_LINE> self._rules = [] <NEW_LINE> match_list = class_dict.get('match') <NEW_LINE> if match_list is not None: <NEW_LINE> <INDENT> f...
Define the QoS "Class" class. A QoS class object defines the linkage between a QoS class number, its match rules and the profile that is applied to packets that conform to the match rules.
62598f0655399d3f05624fbd
class TcrRepoInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Region = None <NEW_LINE> self.RegistryId = None <NEW_LINE> self.RegistryName = None <NEW_LINE> self.Namespace = None <NEW_LINE> self.RepoName = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> ...
tcr仓库信息
62598f065fcc89381b265677
class gbXMLSurfaceType(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__(self...
This enumeration corresponds to the surfaceType attribute in gbXML and identifies the type of surface defined. enum gbXMLSurfaceType, values: Ceiling (7), ExteriorWall (1), InteriorFloor (3), InteriorWall (0), NoOfSurfaceTypes (12), RaisedFloor (10), Roof (2), Shade (4), SlabOnGrade (11), SurfaceAir (8), Undergr...
62598f06ab23a570cc2d42b8
class DescribeMaintainPeriodRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.InstanceId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.InstanceId = params.get("InstanceId") <NEW_LINE> memeber_set = set(params.keys()) <NEW_LINE> for name, value...
DescribeMaintainPeriod请求参数结构体
62598f06f548e778e596a020
class DOMHTMLOtherWorksParser(DOMParserBase): <NEW_LINE> <INDENT> _defGetRefs = True <NEW_LINE> extractors = [ Extractor( label='other works', path="//li[@class='ipl-zebra-list__item']", attrs=Attribute( key='other works', path=".//text()", multi=True, postprocess=lambda x: x.strip() ) ) ]
Parser for the "other works" page of a given person. The page should be provided as a string, as taken from the akas.imdb.com server. The final result will be a dictionary, with a key for every relevant section. Example: owparser = DOMHTMLOtherWorksParser() result = owparser.parse(otherworks_html_string)
62598f0631939e2706ed0fae
class Converter(object): <NEW_LINE> <INDENT> def __init__(self, channel_settings): <NEW_LINE> <INDENT> self.count = 0 <NEW_LINE> self.frame_id = channel_settings.get("frame_id", "0") <NEW_LINE> self.rostopic = channel_settings["rostopic"] <NEW_LINE> <DEDENT> def update_count(self): <NEW_LINE> <INDENT> self.count += 1 <...
Parent class that implements common functions for converter classes. Attributes: count (int): The number of times a message has been seen (for use in Header.seq of ros msg) frame_id (str): The frame_id for the ros msg rostopic (str): The topic for the ros msg
62598f06283ffb24f3cf2345
class ContentNavigationDrawer(BoxLayout): <NEW_LINE> <INDENT> pass
Shown on root screen
62598f06a05bb46b38489310
class OrderPaymentReturnView(LoginRequired, DetailView): <NEW_LINE> <INDENT> model = Order <NEW_LINE> status = None <NEW_LINE> def render_to_response(self, context, **response_kwargs): <NEW_LINE> <INDENT> if self.status == 'success': <NEW_LINE> <INDENT> messages.success(self.request, _('Thank you for placing a payment....
This view is a fallback from any payments processor. It allows just to set additional message context and redirect to Order view itself.
62598f06fbf16365ca792b34
class ECKeys: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._privateKey = SigningKey.generate(NIST256p, hashfunc=sha384) <NEW_LINE> self._publicKey = self._privateKey.get_verifying_key() <NEW_LINE> self._remoteKey = None <NEW_LINE> <DEDENT> def _check_key(self) -> None: <NEW_LINE> <INDENT> if self._r...
Represents a pair of elliptic-curve keys.
62598f06be7bc26dc92513b0
class PlotFunctor(object): <NEW_LINE> <INDENT> def __init__(self, axes, wavelengths, nr_plot_elements): <NEW_LINE> <INDENT> self.axes = axes <NEW_LINE> self.sortedIndices = sorted(range(len(wavelengths)), key=lambda k: wavelengths[k]) <NEW_LINE> self.sortedWavelenghts = wavelengths[self.sortedIndices] <NEW_LINE> self.n...
helping functor necessary because we need to save color for plotting
62598f06ff9c53063f5190fa
class BgpPeerStatusListResult(Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(BgpPeerStatusListResult, self).__init__(**kwargs) <NEW_LINE> self.value = kwargs.get('value', None)
Response for list BGP peer status API service call. :param value: List of BGP peers :type value: list[~azure.mgmt.network.v2018_04_01.models.BgpPeerStatus]
62598f06377c676e912f62b2
class WidgetBase(PolymorphicModel): <NEW_LINE> <INDENT> title = models.CharField(max_length=40) <NEW_LINE> column = models.PositiveSmallIntegerField() <NEW_LINE> model_name = models.CharField(max_length=100) <NEW_LINE> model_app_label = models.CharField(max_length=100) <NEW_LINE> @property <NEW_LINE> def model(self): <...
A Dashboard widget that displays at-a-glance summary statistics info.
62598f06ad47b63b2c5a62b2
class NXImportDialog(NXDialog): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.default_directory = self.mainwindow.default_directory <NEW_LINE> self.import_file = None <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> raise NotImplementedError...
Base dialog class for NeXpy import dialogs
62598f063d592f4c4edb9983
class CalculatorServicer(object): <NEW_LINE> <INDENT> def AddTwoNumbers(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!')
The Calculator Service definition
62598f06091ae356687036b5
class DummyChart(object): <NEW_LINE> <INDENT> width = 100 <NEW_LINE> height = 100 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.drawing = DummyDrawing() <NEW_LINE> <DEDENT> def _get_margin_left(self): <NEW_LINE> <INDENT> return 10 <NEW_LINE> <DEDENT> def _get_margin_top(self): <NEW_LINE> <INDENT> return 5 <NE...
Shapes need a chart to calculate their coordinates
62598f06a8370b77170eee78
class DigitalInput(Device): <NEW_LINE> <INDENT> data_I = Cpt(EpicsSignal, '}Raw:Data-I_') <NEW_LINE> sec_array = Cpt(EpicsSignal, '}T:sec_Bin_') <NEW_LINE> nsec_array = Cpt(EpicsSignal, '}T:nsec_Bin_') <NEW_LINE> index_array = Cpt(EpicsSignal, '}Cnt:Index_Bin_') <NEW_LINE> data_array = Cpt(EpicsSignal, '}Data_Bin_') <N...
This class defines components but does not implement actual reading. See DigitalInputFS
62598f06956e5f7376df4bc9
class UpdateListener(CacheListener): <NEW_LINE> <INDENT> def __init__(self, storage): <NEW_LINE> <INDENT> super(UpdateListener, self).__init__() <NEW_LINE> self.__storage = storage <NEW_LINE> <DEDENT> def notify(self, name, cached_data): <NEW_LINE> <INDENT> print('update notified by {}'.format(name)) <NEW_LINE> self.__...
docstring for UpdateListener
62598f0626068e7796d4b3f1
class WorldNPCs(BaseQuery): <NEW_LINE> <INDENT> table_name = "world_npcs" <NEW_LINE> @classmethod <NEW_LINE> def get_location(cls, location): <NEW_LINE> <INDENT> return WorldData.get_table_data(cls.table_name, location=location)
All NPCs whose position is fixed.
62598f06a219f33f346c52c8
class ACompCor(CompCor): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ACompCor, self).__init__(*args, **kwargs) <NEW_LINE> self._header = "aCompCor"
Anatomical compcor: for inputs and outputs, see CompCor. When the mask provided is an anatomical mask, then CompCor is equivalent to ACompCor.
62598f064a966d76dd5ed96f
class TfdsProvider(DataProvider): <NEW_LINE> <INDENT> def __init__(self, name, split, data_dir, sample_rate, frame_rate): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._split = split <NEW_LINE> self._data_dir = data_dir <NEW_LINE> super().__init__(sample_rate, frame_rate) <NEW_LINE> <DEDENT> def get_dataset(sel...
Base class for reading datasets from TensorFlow Datasets (TFDS).
62598f06167d2b6e312b5a37
class Meta: <NEW_LINE> <INDENT> layout = [["Mass subscription", "emails"]]
Class to define the name of the fieldsets and what should be included in each.
62598f06adb09d7d5dc0904b
class FileResultDictionaryMatcher(object): <NEW_LINE> <INDENT> def __init__(self, score_dictionary_entry): <NEW_LINE> <INDENT> self._entry = score_dictionary_entry <NEW_LINE> self._compiled_path = (re.compile(score_dictionary_entry.path) if score_dictionary_entry.path else None) <NEW_LINE> <DEDENT> def Match(self, resu...
Dictionary score lookup.
62598f06ec188e330fdf734c
class BillDetail(BaseModel): <NEW_LINE> <INDENT> telephone_expense = models.ForeignKey( TelephoneExpense, help_text='Telephone Expense', related_name='bill_detail_set' ) <NEW_LINE> bill_number = models.CharField( max_length=10, help_text='Enter bill number mentioned on the bill' ) <NEW_LINE> bill_date = models.DateFiel...
This stores details of the bills of the telephone expenses to be reimbursed
62598f0671ff763f4b5e61ff
class AuthenticationInfo: <NEW_LINE> <INDENT> def __init__(self, access_key: str, secret_key: str, username: str) -> None: <NEW_LINE> <INDENT> self.access_key = access_key <NEW_LINE> self.secret_key = secret_key <NEW_LINE> self.username = username <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def load(cls, path: Path = D...
Stores S3 authentication information.
62598f064c34283577618d86
class DumpParametersAscii(DumpParameters): <NEW_LINE> <INDENT> class Inventory(DumpParameters.Inventory): <NEW_LINE> <INDENT> import pyre.inventory <NEW_LINE> filename = pyre.inventory.str("filename", default="pylith_paramters.txt") <NEW_LINE> filename.meta["tip"] = "Name of file written with parameters." <NEW_LINE> in...
Python DumpParameters object for dumping PyLith parameter information to an ASCII file.
62598f06a8370b77170eee7a
class IdolcomplexPoolExtractor(IdolcomplexExtractor): <NEW_LINE> <INDENT> subcategory = "pool" <NEW_LINE> directory_fmt = ("{category}", "pool", "{pool}") <NEW_LINE> archive_fmt = "p_{pool}_{id}" <NEW_LINE> pattern = r"(?:https?://)?idol\.sankakucomplex\.com/pool/show/(\d+)" <NEW_LINE> test = ("https://idol.sankakucomp...
Extractor for image-pools from idol.sankakucomplex.com
62598f068a349b6b43684ce0
class NonceMemory: <NEW_LINE> <INDENT> def __init__(self, path, expiration,debug=False): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.expiration = expiration <NEW_LINE> self.debug = debug <NEW_LINE> self.random = SystemRandom() <NEW_LINE> try: <NEW_LINE> <INDENT> self.random.random() <NEW_LINE> <DEDENT> except ...
File-based nonce-memory (so it can work with multiple workers). Includes expiration per nonce and and IP-check
62598f06851cf427c66b6d65
class SCR0005(Page): <NEW_LINE> <INDENT> locators = { "ok": "ConfirmRequestCancellationYesEvent" } <NEW_LINE> def ok(self): <NEW_LINE> <INDENT> return self.go("ok")
SCR_0005 RGS Cancel confirmation
62598f06be7bc26dc92513b2
class RandomWarp(object): <NEW_LINE> <INDENT> def __init__(self, difficulty=2, max_disp=10, prob=1.0, min_disp=0, randomize_d=False, random_epicenters=True): <NEW_LINE> <INDENT> assert difficulty >= 0 <NEW_LINE> self.randomize_d = randomize_d <NEW_LINE> self.difficulty = difficulty <NEW_LINE> self.max_disp = max_disp <...
Warp With Random Field difficulty 0 == one direction 1 == 2 directions along each axis i == 2^i directions along each axis
62598f063d592f4c4edb9987
class BylanStrategy(Strategy): <NEW_LINE> <INDENT> def __init__(self, yatzy=None): <NEW_LINE> <INDENT> super(Strategy, self).__init__() <NEW_LINE> self.yatzy = yatzy <NEW_LINE> if yatzy.debug and 'dfs' not in yatzy.__dict__: <NEW_LINE> <INDENT> yatzy.dfs = {} <NEW_LINE> self.dfs = [] <NEW_LINE> <DEDENT> <DEDENT> def ho...
from YatzyPy import Yatzy, BylanStrategy c = Yatzy(strategy=BylanStrategy) c.autoGame() print(c.getTotalScore(), {categories[k]: v for k, v in c.scores.items()})
62598f06a219f33f346c52cc
class GoogleCloudHealthcareV1alphaGcsSource(_messages.Message): <NEW_LINE> <INDENT> contentUri = _messages.StringField(1)
The Google Cloud Storage location for the input content. Fields: contentUri: Points to a [Google Cloud Storage](https://cloud.google.com/storage/) URI containing file(s) with content only. The URI must be in the following format: `gs://bucket-id /object-id`. The URI can include wildcards in `object-id` a...
62598f065fc7496912d477c3
class MetricTest(unittest.TestCase): <NEW_LINE> <INDENT> df = pd.DataFrame({'X': [0, 1, 2, 3], 'Y': [0, 1, 1, 2]}) <NEW_LINE> def test_precompute(self): <NEW_LINE> <INDENT> metric = metrics.Metric( 'foo', precompute=lambda df, split_by: df[split_by], compute=lambda x: x.sum().values[0]) <NEW_LINE> output = metric.compu...
Tests general features of Metric.
62598f064a966d76dd5ed973
class Run(LowDataAdapter): <NEW_LINE> <INDENT> _cp_config = dict(LowDataAdapter._cp_config, **{ 'tools.sessions.on': False, }) <NEW_LINE> def POST(self, **kwargs): <NEW_LINE> <INDENT> return { 'return': list(self.exec_lowstate()), }
Class to run commands without normal session handling
62598f0660cbc95b06362dd1
class CcnAttachedInstance(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.CcnId = None <NEW_LINE> self.InstanceType = None <NEW_LINE> self.InstanceId = None <NEW_LINE> self.InstanceName = None <NEW_LINE> self.InstanceRegion = None <NEW_LINE> self.InstanceUin = None <NEW_LINE> self.CidrB...
The instance object associated with a CCN
62598f06d8ef3951e32c73a2
class StateVariableType(Enum): <NEW_LINE> <INDENT> POSE = 1 <NEW_LINE> EXTRINSICS = 2 <NEW_LINE> FEATURE = 3 <NEW_LINE> CAMERA = 4 <NEW_LINE> SPEED_AND_BIASES = 5
State Variable Type
62598f0655399d3f05624fc5
class G4particlexs(Package): <NEW_LINE> <INDENT> homepage = "http://geant4.web.cern.ch" <NEW_LINE> url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4PARTICLEXS.2.1.tar.gz" <NEW_LINE> tags = ['hep'] <NEW_LINE> maintainers = ['drbenmorgan'] <NEW_LINE> version('3.1.1', sha256='66c17edd6cb6967375d0497add84c22019...
Geant4 data for evaluated particle cross-sections on natural composition of elements
62598f06aad79263cf42d2af
class mgClient(mqtt.Client): <NEW_LINE> <INDENT> def __init__(self, host='localhost', port=1883, keepalive=60, client_id='', on_msg_func=None, topics=[], userdata=None): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.keepalive = keepalive <NEW_LINE> self.client_id = client_id <NEW_LINE...
docstring - mg as in mqtt_gateways Args: on_msg_func (function): takes an MQTT message as argument and is called during on_message(). topics (list of strings): e.g.['home/audiovideo/#', 'home/lighting/#']. Note: The MQTT paho library sets quite a few attributes in the Client class. They all start with an unde...
62598f064f88993c371efa3b
class Parameters(BaseLaTeXClass): <NEW_LINE> <INDENT> optional = False <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if len(args) == 1 and hasattr(args[0], '__iter__') and not isinstance(args[0], str): <NEW_LINE> <INDENT> args = args[0] <NEW_LINE> <DEDENT> self._positional_args = li...
A class implementing LaTex parameters. It supports normal positional parameters, as well as key-value pairs. Parameters can be rendered optional within square brackets ``[]`` or required within braces ``{}``. >>> args = Parameters('a', 'b', 'c') >>> args.dumps() '{a}{b}{c}' >>> args.optional = True >>> args.dumps() '[...
62598f06ec188e330fdf7350
class PreferencesMixin: <NEW_LINE> <INDENT> @property <NEW_LINE> def preferences(self): <NEW_LINE> <INDENT> if getattr(self, '_preferences', None) is None: <NEW_LINE> <INDENT> path = '{0}/preferences'.format(self.self_link) <NEW_LINE> self._preferences = Preferences(self._connection, path) <NEW_LINE> <DEDENT> return se...
Mixin for objects that have preferences.
62598f067047854f4633de67
class MushroomClassifier(MushroomProblem): <NEW_LINE> <INDENT> def validate(self, folds): <NEW_LINE> <INDENT> confusion_matrices = [] <NEW_LINE> for test, training in self.validation_data(folds): <NEW_LINE> <INDENT> confusion_matrices.append(self.confusion_matrix(training, test)) <NEW_LINE> <DEDENT> return confusion_ma...
Partial implementation of mushrooms classification problem
62598f06a8370b77170eee7d
class HDF5_Datasource(DS.DatasourceCreator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(HDF5_Datasource, self).__init__() <NEW_LINE> self.name = 'hdf5' <NEW_LINE> self.isFile = True <NEW_LINE> self.fileTypes = ['h5','hd5','hdf5','hdf'] <NEW_LINE> <DEDENT> def toNode(self,filename): <NEW_LINE> <IN...
Creator class for HDF5 files
62598f0626068e7796d4b3f7