code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class SingletonMeta(type): <NEW_LINE> <INDENT> def __init__(cls, name: str, bases: Tuple[type, ...], dct: Dict[str, Any]): <NEW_LINE> <INDENT> cls._Singleton__instance = None <NEW_LINE> super(SingletonMeta, cls).__init__(name, bases, dct) <NEW_LINE> <DEDENT> def __call__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if cl... | Metaclass for defining singleton classes.
The resulting singleton class can then be instantiated at most once. The first instance is reused for subsequent
instantiations and the arguments provided in subsequent instantiations are simply discarded. | 6259909badb09d7d5dc0c396 |
class SpriteSheet(object): <NEW_LINE> <INDENT> def __init__(self, file_name: str): <NEW_LINE> <INDENT> self.sprite_sheet = pygame.image.load(file_name).convert() <NEW_LINE> <DEDENT> def get_image(self, x: int, y: int, width: int, height: int): <NEW_LINE> <INDENT> image = pygame.Surface([width, height]).convert() <NEW_L... | Class. Used to grab images out of a sprite sheet. | 6259909cd8ef3951e32c8d7f |
class Trajectory(models.Model): <NEW_LINE> <INDENT> data = models.FileField(storage=fs, upload_to=_upload_trajectory_file_path) <NEW_LINE> length = models.PositiveIntegerField( help_text='length in frames', default=0) <NEW_LINE> parent_traj = models.ForeignKey('self', blank=True, null=True) <NEW_LINE> collection = mode... | Stores a trajectory file associated to a collection.
Has a unique hash (sha512).
Can refer to a parent trajectory from which the actual has been forked from. | 6259909cc4546d3d9def81c0 |
class Address(models.Model): <NEW_LINE> <INDENT> id = models.CharField(max_length=64, primary_key=True) <NEW_LINE> lines = models.CharField(max_length=200) <NEW_LINE> city = models.CharField(max_length=64) <NEW_LINE> state = models.CharField(max_length=2) <NEW_LINE> postalCode = models.CharField(max_length=5) <NEW_... | Represents a single address input | 6259909cc4546d3d9def81c2 |
class ApplicationView(ApplicationAuthMixin, View): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> applicationid = kwargs.get('applicationid') <NEW_LINE> app_obj = AppDetails(applicationid) <NEW_LINE> return render(request, 'application.html', {'application': app_obj.application}) | Show applied application to the user who applied it! | 6259909cadb09d7d5dc0c3a8 |
class KeystoreException(Exception): <NEW_LINE> <INDENT> pass | Superclass for all pyjks exceptions. | 6259909cc4546d3d9def81c3 |
class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper): <NEW_LINE> <INDENT> form = DiscussionSettingsEditForm <NEW_LINE> index = ViewPageTemplateFile('controlpanel.pt') <NEW_LINE> def settings(self): <NEW_LINE> <INDENT> registry = queryUtility(IRegistry) <NEW_LINE> settings = registry.forInterface(I... | Discussion settings control panel.
| 6259909c50812a4eaa621aef |
class TimeReturn(TimeFrameAnalyzerBase): <NEW_LINE> <INDENT> params = ( ('data', None), ('firstopen', True), ('fund', None), ) <NEW_LINE> def start(self): <NEW_LINE> <INDENT> super(TimeReturn, self).start() <NEW_LINE> if self.p.fund is None: <NEW_LINE> <INDENT> self._fundmode = self.strategy.broker.fundmode <NEW_LINE> ... | This analyzer calculates the Returns by looking at the beginning
and end of the timeframe
Params:
- ``timeframe`` (default: ``None``)
If ``None`` the ``timeframe`` of the 1st data in the system will be
used
Pass ``TimeFrame.NoTimeFrame`` to consider the entire dataset with no
time constraints
- ... | 6259909c50812a4eaa621af0 |
class Number(HerokuConnectFieldMixin, models.DecimalField): <NEW_LINE> <INDENT> def get_internal_type(self): <NEW_LINE> <INDENT> return "FloatField" <NEW_LINE> <DEDENT> def get_db_prep_save(self, value, connection): <NEW_LINE> <INDENT> if value is not None: <NEW_LINE> <INDENT> value = float(self.to_python(value)) <NEW_... | Salesforce ``Number`` field.
Allows users to enter any number. Leading zeros are removed.
Numbers in Salesforce are constrained by length and decimal places.
Heroku Connect maps those decimal values to ``double precision``
floats. To have the same accuracy and avoid Salesforce validation
rule issues this field uses :... | 6259909c283ffb24f3cf56ec |
class itkNumericTraitsUC(vcl_numeric_limitsUC): <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> __swig_destroy__ = _itkNumericTraitsPython.delete_itkNumericTraitsUC <NEW_LINE> def __init__(self, *args... | Proxy of C++ itkNumericTraitsUC class | 6259909c3617ad0b5ee07fa7 |
class pp_ls: <NEW_LINE> <INDENT> def __init__(self, val): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> <DEDENT> def to_string(self): <NEW_LINE> <INDENT> return self.val['lazy_str'].lazy_string() <NEW_LINE> <DEDENT> def display_hint (self): <NEW_LINE> <INDENT> return 'string' | Print a std::basic_string of some kind | 6259909cc4546d3d9def81c6 |
class CarColorOption(models.Model): <NEW_LINE> <INDENT> color_name = models.CharField(max_length=128) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.color_name | List of options for car maker in Car model | 6259909cc4546d3d9def81c8 |
class BackgroundTimer(object): <NEW_LINE> <INDENT> def __init__(self, interval=60, repeat=True, call=None): <NEW_LINE> <INDENT> self._timer = None <NEW_LINE> self.callback = call <NEW_LINE> self.interval = interval <NEW_LINE> self.repeat = repeat <NEW_LINE> self.is_running = False <NEW_LINE> if call is None: <NEW_LINE>... | A repeating timer that runs in the background
and calls a provided callback each time the
timer runs out. | 6259909c283ffb24f3cf56f2 |
class BusinessDetailSerializer(BusinessSerializer): <NEW_LINE> <INDENT> services = ServiceSerializer(many=True, read_only=True) <NEW_LINE> categories = CategorySerializer(many=True, read_only=True) | Serializer for Business Detail object | 6259909c091ae35668706a8a |
class Call(Action): <NEW_LINE> <INDENT> def __init__(self, amount): <NEW_LINE> <INDENT> Action.__init__(self) <NEW_LINE> self.amount = amount <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "Call: " + " $" + str(self.amount) | Action a player can take to call the current bet.
next hand. | 6259909cd8ef3951e32c8d89 |
class ComponentTests(ossie.utils.testing.ScaComponentTestCase): <NEW_LINE> <INDENT> def testScaBasicBehavior(self): <NEW_LINE> <INDENT> execparams = self.getPropertySet(kinds=("execparam",), modes=("readwrite", "writeonly"), includeNil=False) <NEW_LINE> execparams = dict([(x.id, any.from_any(x.value)) for x in execpara... | Test for all component implementations in stream_to_streams_cc_4o | 6259909cc4546d3d9def81ca |
class ExceptionsTest(cros_test_lib.TestCase): <NEW_LINE> <INDENT> def _TestException(self, err, expected_startswith): <NEW_LINE> <INDENT> err2 = cPickle.loads(cPickle.dumps(err, cPickle.HIGHEST_PROTOCOL)) <NEW_LINE> self.assertTrue(str(err).startswith(expected_startswith)) <NEW_LINE> self.assertEqual(str(err), str(err2... | Test that the exceptions in the module are sane. | 6259909c091ae35668706a8e |
class XboxControllerAdapter(ApplicationSession): <NEW_LINE> <INDENT> @inlineCallbacks <NEW_LINE> def onJoin(self, details): <NEW_LINE> <INDENT> log.msg("XboxControllerAdapter connected.") <NEW_LINE> extra = self.config.extra <NEW_LINE> self._id = extra['id'] <NEW_LINE> self._xbox = extra['xbox'] <NEW_LINE> self._xbox._... | Connects Xbox gamepad controller to WAMP. | 6259909c656771135c48af60 |
class OldSeqAccuracy(DiscreteLoss): <NEW_LINE> <INDENT> def _forward(self, x, gold): <NEW_LINE> <INDENT> ignoremask = self.get_ignore_mask(gold, self.ignore_indices) <NEW_LINE> _, best = torch.max(x, 2) <NEW_LINE> same = best == gold <NEW_LINE> outignoremask = None <NEW_LINE> if ignoremask is not None: <NEW_LINE> <INDE... | very basic explicit seqaccuracy implementation.
does not support batchable sparse mask | 6259909c283ffb24f3cf56f8 |
class Storage(object): <NEW_LINE> <INDENT> path = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if Storage.path is None: <NEW_LINE> <INDENT> raise Exception("Path for data not set") <NEW_LINE> <DEDENT> db = Database(os.path.join(Storage.path, "db")) <NEW_LINE> if db.exists(): <NEW_LINE> <INDENT> db.open() <NE... | Database storage | 6259909dc4546d3d9def81cc |
class Circulo: <NEW_LINE> <INDENT> def __init__(self, centro, radio): <NEW_LINE> <INDENT> self.Centro, self.Radio = centro, radio | Representa un circulo en un mundo 2D | 6259909d099cdd3c6367632b |
class TestCloudLocationReq(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 testCloudLocationReq(self): <NEW_LINE> <INDENT> pass | CloudLocationReq unit test stubs | 6259909dc4546d3d9def81cd |
class CmdWorkspace(BaseWorkspace): <NEW_LINE> <INDENT> def __init__(self, working_dir, cmd=None, auto=False, **kw): <NEW_LINE> <INDENT> BaseWorkspace.__init__(self, working_dir) <NEW_LINE> if auto: <NEW_LINE> <INDENT> for marker, cls in _cmd_classes.items(): <NEW_LINE> <INDENT> target = abspath(normpath(join(self.worki... | Default workspace, file based. | 6259909d656771135c48af63 |
class GPIO(ObjectFromList): <NEW_LINE> <INDENT> def __init__(self, server_guid=None): <NEW_LINE> <INDENT> super(GPIO, self).__init__() <NEW_LINE> if server_guid is None: <NEW_LINE> <INDENT> server_guid = [srv.guid for srv in Servers().get_all()] <NEW_LINE> <DEDENT> self.server_guid = server_guid <NEW_LINE> <DEDENT> def... | Класс для работы с тревожными входами/выходами
Args:
server_guid (:obj:`str` | List[:obj:`str`], optional): Guid сервера или список guid.
По умолчанию :obj:`None`, что соотвествует всем доступным серверам.
Examples:
>>> gpio = GPIO()
>>> gpio_door = gpio.get_inputs("Door")[0]
>>> gpio_door.obj... | 6259909d656771135c48af65 |
class CreateQuestionView(LoginRequired, CreateView): <NEW_LINE> <INDENT> template_name = 'qa/create_question.html' <NEW_LINE> message = _('Thank you! your question has been created.') <NEW_LINE> form_class = QuestionForm <NEW_LINE> model = Question <NEW_LINE> def get_context_data(self, *args, **kwargs): <NEW_LINE> <IND... | View to handle the creation of a new question | 6259909dadb09d7d5dc0c3c6 |
class Dconv_vertical(nn.Module): <NEW_LINE> <INDENT> def __init__(self, inplane, outplane, kernel_size, stride, padding): <NEW_LINE> <INDENT> super(Dconv_vertical, self).__init__() <NEW_LINE> print('Dconv_vertical is used') <NEW_LINE> self.dilated_conv = nn.Conv2d(inplane, outplane, kernel_size=kernel_size, stride=stri... | Deformable convolution with random shuffling of the feature map.
Random shuffle feature maps vertically.
The sampling locations are generated for each forward pass during the training. | 6259909d099cdd3c63676330 |
class YakDBUtils: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def incrementKey(key): <NEW_LINE> <INDENT> if isinstance(key, str): key = key.encode("utf-8") <NEW_LINE> keyList = list(key) <NEW_LINE> for idx in range(-1,(-1)-len(keyList),-1): <NEW_LINE> <INDENT> lastChar = keyList[idx] <NEW_LINE> if lastChar == 255: <NE... | This class provides static utility methods for using YakDB. | 6259909d3617ad0b5ee07fc3 |
class Phi(CombinatorialFreeModule, BindableClass): <NEW_LINE> <INDENT> def __init__(self, NCSF): <NEW_LINE> <INDENT> CombinatorialFreeModule.__init__(self, NCSF.base_ring(), Compositions(), prefix='Phi', bracket=False, category=NCSF.MultiplicativeBasesOnPrimitiveElements()) <NEW_LINE> <DEDENT> def _from_complete_on_gen... | The Hopf algebra of non-commutative symmetric functions in the
Phi basis.
The Phi basis is defined in Definition 3.4 of [NCSF1]_, where
it is denoted by `(\Phi^I)_I`. It is a multiplicative basis, and
is connected to the elementary generators `\Lambda_i` of the ring
of non-commutative symmetric functions by the follow... | 6259909dc4546d3d9def81d4 |
class Publisher(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return 'Catagory : %s' % self.name <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> get_latest_by = "name" <NEW_LINE> ordering = ['name'] <NEW_LINE> verbose_name = "Catagor... | Class defines book's publisher | 6259909d3617ad0b5ee07fc7 |
class RedfishUpdateServiceNotFoundError( Exception ): <NEW_LINE> <INDENT> pass | Raised when the Update Service or an update action cannot be found | 6259909d091ae35668706aa8 |
class LFRCollate(object): <NEW_LINE> <INDENT> def __init__(self, feature_dim, char_list, path_list, label_list, LFR_m=1, LFR_n=1): <NEW_LINE> <INDENT> self.path_list = path_list <NEW_LINE> self.label_list = label_list <NEW_LINE> self.LFR_m = LFR_m <NEW_LINE> self.LFR_n = LFR_n <NEW_LINE> self.feature_dim = feature_dim ... | Build this wrapper to pass arguments(LFR_m, LFR_n) to _collate_fn | 6259909e50812a4eaa621b08 |
class Share(models.Model): <NEW_LINE> <INDENT> container = models.ForeignKey(Container) <NEW_LINE> expire_date = models.DateTimeField('share expiration date') <NEW_LINE> secret = models.CharField(max_length=250,null=True,blank=True) <NEW_LINE> def generate_secret(self): <NEW_LINE> <INDENT> self.secret = str(uuid.uuid4(... | a temporary share / link for a container
| 6259909e091ae35668706ab4 |
@python_2_unicode_compatible <NEW_LINE> class Binding(object): <NEW_LINE> <INDENT> def __init__(self, wsdl, name, port_name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.port_name = port_name <NEW_LINE> self.port_type = None <NEW_LINE> self.wsdl = wsdl <NEW_LINE> self._operations = {} <NEW_LINE> <DEDENT> def r... | Base class for the various bindings (SoapBinding / HttpBinding)
Binding
|
+-> Operation
|
+-> ConcreteMessage
|
+-> AbstractMessage | 6259909e283ffb24f3cf571d |
class StylesList(object): <NEW_LINE> <INDENT> def __init__(self, dirlist): <NEW_LINE> <INDENT> self.__styles = sorted(self.__findStyles(dirlist)) <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.__styles) <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> return self.__style... | Класс для хранения списка существующих стилей страниц | 6259909e50812a4eaa621b09 |
class InitialConditionsView(Sequence): <NEW_LINE> <INDENT> def __init__(self, model): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> initial = self.model.initials[key] <NEW_LINE> return (initial.pattern, initial.value) <NEW_LINE> <DEDENT> def __len__(self): <N... | Compatibility shim for the Model.initial_conditions property. | 6259909e099cdd3c6367633c |
class ServiceManager(list): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ServiceManager, self).__init__(*args, **kwargs) <NEW_LINE> msg = "ServiceManager is deprecated. Use fixtures instead." <NEW_LINE> warnings.warn(msg, DeprecationWarning) <NEW_LINE> self.failed = set() <NEW_LINE... | A class that manages services that may be required by some of the
unit tests. ServiceManager will start up daemon services as
subprocesses or threads and will stop them when requested or when
destroyed. | 6259909e283ffb24f3cf571e |
class DataLoaderTransformer(NervanaObject): <NEW_LINE> <INDENT> def __init__(self, dataloader, index=None): <NEW_LINE> <INDENT> super(DataLoaderTransformer, self).__init__() <NEW_LINE> self.dataloader = dataloader <NEW_LINE> self.index = index <NEW_LINE> if self.index is not None: <NEW_LINE> <INDENT> data_size = np.pro... | DataLoaderTransformers are used to transform the output of a DataLoader.
DataLoader doesn't have easy access to the device or graph, so any
computation that should happen there should use a DataLoaderTransformer. | 6259909e3617ad0b5ee07fd9 |
class GaussianSimProcess(SimProcess): <NEW_LINE> <INDENT> def __init__(self, rate, std): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.has_pdf = True <NEW_LINE> self.has_cdf = True <NEW_LINE> self.rate = rate <NEW_LINE> self.std = std <NEW_LINE> <DEDENT> def generate_trace(self): <NEW_LINE> <INDENT> return max... | GaussianSimProcess extends the functionality of :class:`~simfaas.SimProcess.SimProcess` for
gaussian processes. This class also implements the `pdf` and `cdf` functions
which can be used for visualization purposes.
Parameters
----------
rate : float
The rate at which the process should fire off
... | 6259909ed8ef3951e32c8d9f |
class _PartitionKeyRange(object): <NEW_LINE> <INDENT> MinInclusive = 'minInclusive' <NEW_LINE> MaxExclusive = 'maxExclusive' <NEW_LINE> Id = 'id' <NEW_LINE> Parents = 'parents' | Partition Key Range Constants | 6259909e656771135c48af75 |
@python_2_unicode_compatible <NEW_LINE> class Person(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField( User, on_delete=models.CASCADE, help_text="The corresponding user to this person") <NEW_LINE> phone = models.CharField( max_length=20, blank=True, help_text="Person's phone number, no particular formatti... | A class to associate more personal information with the default django auth user class | 6259909e3617ad0b5ee07fdd |
class PlecostResults(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.__target = kwargs.get("target", None) <NEW_LINE> self.__start_time = kwargs.get("start_time", datetime.now()) <NEW_LINE> self.__end_time = kwargs.get("end_time", datetime.now()) <NEW_LINE> self.__wordpress_info = kw... | Plecost results | 6259909eadb09d7d5dc0c3e6 |
class VixException(Exception): <NEW_LINE> <INDENT> def __init__(self, err_code): <NEW_LINE> <INDENT> _vix.Vix_GetErrorText.restype = c_char_p <NEW_LINE> self._err_code = err_code <NEW_LINE> self._msg = _vix.Vix_GetErrorText(self._err_code, None) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(sel... | A exception that specifies VIX-related errors and the corresponding messages. | 6259909e283ffb24f3cf5724 |
class Sha256DictStore(BaseDictStore): <NEW_LINE> <INDENT> HASH_SIZE_BYTES = 8 <NEW_LINE> def hash_object(cls, serialized_obj): <NEW_LINE> <INDENT> hash_bytes = sha256(serialized_obj).digest() <NEW_LINE> hexdigest = hexlify(hash_bytes[:Sha256DictStore.HASH_SIZE_BYTES]) <NEW_LINE> return hexdigest.decode('utf-8') | Dict-based store using truncated SHA256 hex-encoded hashes.
>>> store = Sha256DictStore()
>>> obj = b'dummy'
>>> obj_hash = store.hash_object(obj)
>>> store.add(obj) == obj_hash
True
>>> obj_hash in store
True
>>> b'nonexistent' not in store
True
>>> store.get(obj_hash) == obj
True | 6259909e656771135c48af77 |
class NodeStatistic(NamedTuple): <NEW_LINE> <INDENT> is_updated: bool = False <NEW_LINE> error: Exception = None <NEW_LINE> update_time: float = None | Statistic should be kept separately for each node
because each node can have 10 or even 100 of different statistic profiles according number of group nodes using it | 6259909eadb09d7d5dc0c3e8 |
class VxrailHost(object): <NEW_LINE> <INDENT> def __init__(self, esxversion): <NEW_LINE> <INDENT> self.esxversion = esxversion <NEW_LINE> <DEDENT> def GetEsxVersion(self, host): <NEW_LINE> <INDENT> version = vim.HostSystem.config.product.fullName <NEW_LINE> return self.version | A class that defines ESX attributes for a VxRail Host
Attributes:
esxversion: Version of ESXi
marvinvib: Version of the Marvin vib. | 6259909e283ffb24f3cf5726 |
class MyWindow(QWidget): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.init_gui() <NEW_LINE> <DEDENT> def init_gui(self): <NEW_LINE> <INDENT> self.resize(200,200) <NEW_LINE> self.move(50,50) <NEW_LINE> self.setWindowTitle("MyWindow") <NEW_LINE> self.button1 = QPushButton... | Main Window class for our application | 6259909ec4546d3d9def81e3 |
class StringRelativePointer16(StringRelativePointer): <NEW_LINE> <INDENT> def __init__(self, size=0, address=None, field_order='auto'): <NEW_LINE> <INDENT> super().__init__(size=size, address=address, bit_size=16, field_order=field_order) | A `StringRelativePointer16` field is a :class:`StringRelativePointer`
field with a :class:`Field` *size* of two bytes. | 6259909e091ae35668706ac0 |
class TestNER(unittest.TestCase): <NEW_LINE> <INDENT> @ignore_warnings <NEW_LINE> def test_stanford(self): <NEW_LINE> <INDENT> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) <NEW_LINE> result = sock.connect_ex(("localhost", 9000)) <NEW_LINE> if result != 0: <NEW_LINE> <INDENT> Popen( [executable, "core_nlp.py... | Class for testing named entity recognition functions | 6259909e283ffb24f3cf5728 |
class MattermChannel(Channel): <NEW_LINE> <INDENT> def __init__(self, team, subteam, id, name, private=False, member=True, im=None): <NEW_LINE> <INDENT> if subteam is None and im is None: <NEW_LINE> <INDENT> raise Exception('only DM channels should be subteamless') <NEW_LINE> <DEDENT> if subteam is not None: <NEW_LINE>... | Simple object representing one channel in a group.
| 6259909e50812a4eaa621b0f |
class RangeColumns(Ranges): <NEW_LINE> <INDENT> def __init__(self, rng): <NEW_LINE> <INDENT> self.rng = rng <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return self.rng.shape[1] <NEW_LINE> <DEDENT> count = property(__len__) <NEW_LINE> def autofit(self): <NEW_LINE> <INDENT> self.rng.impl.autofit(axis='c') ... | Represents the columns of a range. Do not construct this class directly, use :attr:`Range.columns` instead.
Example
-------
.. code-block:: python
import xlwings as xw
rng = xw.Range('A1:C4')
assert len(rng.columns) == 3 # or rng.columns.count
rng.columns[0].value = 'a'
assert rng.columns[2]... | 6259909e187af65679d2ab32 |
class FileLikeProvider: <NEW_LINE> <INDENT> def __init__(self, destination): <NEW_LINE> <INDENT> self.destination = destination <NEW_LINE> self.file_object = None <NEW_LINE> self.ret = None <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> if not self.destination: <NEW_LINE> <INDENT> self.file_object = io.St... | Class that produces a file-like object for different kinds of outputs.
The purpose is to relieve exporters of handling different kinds of outputs.
Supported output types (see doc of __init__):
- to string
- to file object
- to file path (takes care of opening the file)
Usage:
# destination = None or string or oth... | 6259909ed8ef3951e32c8da5 |
class DataObjectBase(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ts = None <NEW_LINE> self.value = None | Base class for DataObject and DataObjectX | 6259909e187af65679d2ab33 |
class AddWorkflowToManage(BaseHandler): <NEW_LINE> <INDENT> def __init__(self, component): <NEW_LINE> <INDENT> BaseHandler.__init__(self, component) <NEW_LINE> self.threadpool = ThreadPool( "WMComponent.WorkflowManager.Handler.AddWorkflowToManageSlave", self.component, 'AddWorkflowToManage', ... | Default handler for addition of workflow / fileset --> workflow mapping | 6259909eadb09d7d5dc0c3f2 |
class AddingIAMRole(object): <NEW_LINE> <INDENT> def __init__(self, cluster_identifier, iam_role_name, cmd_prefix): <NEW_LINE> <INDENT> self.cmd_prefix = cmd_prefix <NEW_LINE> self.cluster_identifier = cluster_identifier <NEW_LINE> self.iam_role_name = iam_role_name <NEW_LINE> cmd = self.cmd_prefix + ['redshift', 'modi... | IAM Role to associate with the cluster.
IAM Role can be associated with the cluster to access to other services such
as S3.
Attributes:
cluster_identifier: Identifier of the cluster
iam_role_name: Role name of the IAM | 6259909e091ae35668706ac8 |
class PyImageioFfmpeg(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/imageio/imageio-ffmpeg" <NEW_LINE> pypi = "imageio-ffmpeg/imageio-ffmpeg-0.4.3.tar.gz" <NEW_LINE> version('0.4.3', sha256='f826260a3207b872f1a4ba87ec0c8e02c00afba4fd03348a59049bdd8215841e') <NEW_LINE> depends_on('python@3.4:', type... | The purpose of this project is to provide a simple and
reliable ffmpeg wrapper for working with video files. It
implements two simple generator functions for reading and
writing data from/to ffmpeg, which reliably terminate the
ffmpeg process when done. It also takes care of publishing
platform-specific wheels that inc... | 6259909ec4546d3d9def81e8 |
class signal(): <NEW_LINE> <INDENT> def __init__(self,signal): <NEW_LINE> <INDENT> self.__signal = np.asarray(signal) <NEW_LINE> <DEDENT> def __getitem__(self,key): <NEW_LINE> <INDENT> return self.__signal[key] <NEW_LINE> <DEDENT> def add_signal(self,signal): <NEW_LINE> <INDENT> sCombined = list(self.__signal[:]) + lis... | Generates an object that represents the selected signal.
Parameters
----------
signal : list
Returns
-------
signal: Class object that represents the signal
Examples
--------
>>> signal = signal(sig)
Call the class signal and generate object signal. | 6259909ed8ef3951e32c8da8 |
class MarginLoss(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, nb_classes, beta=1.2, margin=0.2, nu=0.0, class_specific_beta=False, **kwargs): <NEW_LINE> <INDENT> super(MarginLoss, self).__init__() <NEW_LINE> self.nb_classes = nb_classes <NEW_LINE> self.class_specific_beta = class_specific_beta <NEW_LINE> if... | Margin based loss.
Parameters
----------
nb_classes: int
Number of classes in the train dataset.
Used to initialize class-specific boundaries beta.
margin : float
Margin between positive and negative pairs.
nu : float
Regularization parameter for beta.
class_specific_beta : bool
Are class-specific ... | 6259909e187af65679d2ab36 |
class FeedAppViewSet(CORSMixin, MarketplaceView, SlugOrIdMixin, ImageURLUploadMixin): <NEW_LINE> <INDENT> authentication_classes = [RestOAuthAuthentication, RestSharedSecretAuthentication, RestAnonymousAuthentication] <NEW_LINE> permission_classes = [AnyOf(AllowReadOnly, GroupPermission('Feed', 'Curate'))] <NEW_LINE> f... | A viewset for the FeedApp class, which highlights a single app and some
additional metadata (e.g. a review or a screenshot). | 6259909eadb09d7d5dc0c3f6 |
class FunctionalTestCase(TestCase): <NEW_LINE> <INDENT> pass | Simple test case for functional tests | 6259909e091ae35668706acc |
class ExactSolver(Sampler): <NEW_LINE> <INDENT> properties = None <NEW_LINE> parameters = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.properties = {} <NEW_LINE> self.parameters = {} <NEW_LINE> <DEDENT> def sample(self, bqm: BinaryQuadraticModel, **kwargs) -> SampleSet: <NEW_LINE> <INDENT> kwargs = self... | A simple exact solver for testing and debugging code using your local CPU.
Notes:
This solver becomes slow for problems with 18 or more
variables.
Examples:
This example solves a two-variable Ising model.
>>> h = {'a': -0.5, 'b': 1.0}
>>> J = {('a', 'b'): -1.5}
>>> sampleset = dimod.ExactSolv... | 6259909e656771135c48af7e |
class Task(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self, task_id, job_exe): <NEW_LINE> <INDENT> self._task_id = task_id <NEW_LINE> self._job_exe_id = job_exe.id <NEW_LINE> self._cpus = job_exe.cpus_scheduled <NEW_LINE> self._mem = job_exe.mem_scheduled <NEW_LINE> self._disk_in = job... | Abstract base class for a job execution task
| 6259909ed8ef3951e32c8dab |
class ChordViz(BaseViz): <NEW_LINE> <INDENT> viz_type = "chord" <NEW_LINE> verbose_name = _("Directed Force Layout") <NEW_LINE> credits = '<a href="https://github.com/d3/d3-chord">Bostock</a>' <NEW_LINE> is_timeseries = False <NEW_LINE> def query_obj(self): <NEW_LINE> <INDENT> qry = super(ChordViz, self).query_obj() <N... | A Chord diagram | 6259909eadb09d7d5dc0c3fc |
class Issue(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> car_id = db.Column(db.Integer, unique=False, nullable=False) <NEW_LINE> time = db.Column(db.DateTime, unique=False, nullable=False) <NEW_LINE> details = db.Column(db.String(128), unique=False, nullable=False) <NEW_LINE> r... | Class to represent an issue for a car
:param id: unique id of the issue
:type id: int
:param car_id: the id of the car that has the issue
:type car_id: int
:param time: the time (in utc format) that the issue was reported
:type time: datetime
:param details: details of the car's issue
:type details: string
:param reso... | 6259909e283ffb24f3cf573a |
class activation_keys(models.Model): <NEW_LINE> <INDENT> id_user = models.ForeignKey(User, null=False, related_name='%(class)s_id_user') <NEW_LINE> email = models.CharField(max_length=150, verbose_name="Email") <NEW_LINE> activation_key = models.CharField(max_length=150, verbose_name = "Activation_key") <NEW_LINE> dat... | Table necessary for create an user account, This serves to validate the email. | 6259909fd8ef3951e32c8dad |
class ColumnGroupRule: <NEW_LINE> <INDENT> def __init__(self, alias: str, schema: ColumnGroupSchema) -> None: <NEW_LINE> <INDENT> self.alias = alias <NEW_LINE> self.schema = schema <NEW_LINE> <DEDENT> def __repr__(self) -> str: <NEW_LINE> <INDENT> class_name = type(self).__name__ <NEW_LINE> return f"<{class_name}: alia... | Defines a column group rule.
Attributes:
alias: Alias of the column group.
schema: Member columns belonging to the column group. May be a sequence
of member columns, or a mapping of column aliases to column names,
or a combination of the two. | 6259909f099cdd3c6367634b |
class InputExecOrderField(Base): <NEW_LINE> <INDENT> _fields_ = [ ('BrokerID', ctypes.c_char * 11), ('InvestorID', ctypes.c_char * 13), ('InstrumentID', ctypes.c_char * 31), ('ExecOrderRef', ctypes.c_char * 13), ('UserID', ctypes.c_char * 16), ('Volume', ctypes.c_int), ('RequestID', ctypes.c_int), ('BusinessUnit', ctyp... | 输入的执行宣告 | 6259909f187af65679d2ab3b |
class MapGradient(GradientProcessor): <NEW_LINE> <INDENT> def __init__(self, func, regex='.*'): <NEW_LINE> <INDENT> args = inspect.getargspec(func).args <NEW_LINE> arg_num = len(args) - inspect.ismethod(func) <NEW_LINE> assert arg_num in [1, 2], "The function must take 1 or 2 arguments! ({})".format(args) <... | Apply a function on all gradient if the name matches regex.
Keep the other gradients unchanged. | 6259909f091ae35668706ad5 |
class CdnWebApplicationFirewallPolicyPatchParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(CdnWebApplicationFirewallPolicyPatchParameters, self).__init__(**kwargs) <NEW_LINE> se... | Properties required to update a CdnWebApplicationFirewallPolicy.
:param tags: A set of tags. CdnWebApplicationFirewallPolicy tags.
:type tags: dict[str, str] | 6259909f656771135c48af83 |
class TransferReassemblyErrorID(enum.Enum): <NEW_LINE> <INDENT> MISSED_START_OF_TRANSFER = enum.auto() <NEW_LINE> UNEXPECTED_TOGGLE_BIT = enum.auto() <NEW_LINE> UNEXPECTED_TRANSFER_ID = enum.auto() <NEW_LINE> TRANSFER_CRC_MISMATCH = enum.auto() | Transfer reassembly error codes. Used in the extended error statistics.
See the UAVCAN specification for background info.
We have ``ID`` in the name to make clear that this is not an exception type. | 6259909f283ffb24f3cf5740 |
class Hidden(Base): <NEW_LINE> <INDENT> def __init__(self, n=100): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> self.count = 0 <NEW_LINE> <DEDENT> def process(self, string): <NEW_LINE> <INDENT> all_count = self.count + len(string) <NEW_LINE> if all_count < self.n: <NEW_LINE> <INDENT> self.count = all_count <NEW_LINE> retu... | Hide output and print dot every N characters. | 6259909f50812a4eaa621b1b |
class TroubleshootingResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 'code': {'key': 'code', 'type': 'str'}, 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, } <NEW_LI... | Troubleshooting information gained from specified resource.
:param start_time: The start time of the troubleshooting.
:type start_time: ~datetime.datetime
:param end_time: The end time of the troubleshooting.
:type end_time: ~datetime.datetime
:param code: The result code of the troubleshooting.
:type code: str
:param... | 6259909fc4546d3d9def81f1 |
class LEDLearnedPositionalEmbedding(nn.Embedding): <NEW_LINE> <INDENT> def __init__(self, num_embeddings: int, embedding_dim: int, padding_idx: int): <NEW_LINE> <INDENT> assert padding_idx is not None, "`padding_idx` should not be None, but of type int" <NEW_LINE> super().__init__(num_embeddings, embedding_dim, padding... | This module learns positional embeddings up to a fixed maximum size. | 6259909fadb09d7d5dc0c408 |
class ClusterUser(UserBase): <NEW_LINE> <INDENT> USER_PREFIX = 'mcv-cluster-' <NEW_LINE> CAN_GENERATE = True <NEW_LINE> CLUSTER_USER = True <NEW_LINE> DISTRIBUTED = False <NEW_LINE> @Expose() <NEW_LINE> def is_superuser(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> @property <NEW_LINE> def allow_proxy_user... | User type for cluster daemon users. | 6259909f091ae35668706add |
class PornConfigureInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ImgReviewInfo = None <NEW_LINE> self.AsrReviewInfo = None <NEW_LINE> self.OcrReviewInfo = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("ImgReviewInfo") is not None: <NEW... | 鉴黄任务控制参数
| 6259909f099cdd3c63676350 |
class PrimarySlotError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message | Thrown when the key is not present in the default values database. | 6259909f099cdd3c63676352 |
class LESSStylesView(BrowserView): <NEW_LINE> <INDENT> def registry(self): <NEW_LINE> <INDENT> return getToolByName(aq_inner(self.context), 'portal_less') <NEW_LINE> <DEDENT> def skinname(self): <NEW_LINE> <INDENT> return aq_inner(self.context).getCurrentSkinName() <NEW_LINE> <DEDENT> def styles(self): <NEW_LINE> <INDE... | Information for LESS style rendering. | 6259909fadb09d7d5dc0c40e |
class VideoList: <NEW_LINE> <INDENT> def __init__(self, path_response, list_id=None): <NEW_LINE> <INDENT> self.perpetual_range_selector = path_response.get('_perpetual_range_selector') <NEW_LINE> self.data = path_response <NEW_LINE> has_data = bool(path_response.get('lists')) <NEW_LINE> self.videos = OrderedDict() <NEW... | A video list | 6259909f099cdd3c63676353 |
class Configuration(SingletonMixin): <NEW_LINE> <INDENT> def __init__(self, fp, parser_dep=SafeConfigParser): <NEW_LINE> <INDENT> self.conf = parser_dep() <NEW_LINE> self.conf.readfp(fp) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_env(cls): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> filepath = os.environ['LO... | Acts as a proxy to the ConfigParser module | 6259909fadb09d7d5dc0c410 |
class RowTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> copy = copytext.Copy('etc/test_copy.xls') <NEW_LINE> sheet = copy['content'] <NEW_LINE> self.row = sheet['header_title'] <NEW_LINE> <DEDENT> def test_cell_by_value_repr(self): <NEW_LINE> <INDENT> cell = repr(self.row) <NEW_LI... | Test the Row object. | 6259909f50812a4eaa621b22 |
class LambdaPrinter(StrPrinter): <NEW_LINE> <INDENT> def _print_MatrixBase(self, expr): <NEW_LINE> <INDENT> return "%s(%s)" % (expr.__class__.__name__, self._print((expr.tolist()))) <NEW_LINE> <DEDENT> _print_SparseMatrix = _print_MutableSparseMatrix = _print_ImmutableSparseMatrix = _print_Matrix =... | This printer converts expressions into strings that can be used by
lambdify. | 6259909f099cdd3c63676355 |
class _VertexSitesMixin: <NEW_LINE> <INDENT> def _add_vertex_sites(self, box_geom_or_site): <NEW_LINE> <INDENT> offsets = ( (-half_length, half_length) for half_length in box_geom_or_site.size) <NEW_LINE> site_positions = np.vstack(itertools.product(*offsets)) <NEW_LINE> if box_geom_or_site.pos is not None: <NEW_LINE> ... | Mixin class that adds sites corresponding to the vertices of a box. | 6259909fd8ef3951e32c8db8 |
class ThundercoinTestNet(Thundercoin): <NEW_LINE> <INDENT> name = 'test-thundercoin' <NEW_LINE> seeds = ("testnet-seed.litecointools.com", "testnet-seed.ltc.xurious.com", "dnsseed.wemine-testnet.com") <NEW_LINE> port = 64547 <NEW_LINE> message_start = b'\xfc\xc1\xb7\xdc' <NEW_LINE> base58_prefixes = { 'PUBKEY_ADDR': 11... | Class with all the necessary Thundercoin testing network information based on
https://github.com/VanIerselDev/Thundercoin/blob/master/src/net.cpp
(date of access: 02/21/2018) | 6259909f3617ad0b5ee0800d |
class QueryImpl(object): <NEW_LINE> <INDENT> def __init__(self, test, hashval): <NEW_LINE> <INDENT> self._test = test <NEW_LINE> self.hashval = hashval <NEW_LINE> <DEDENT> def __call__(self, value): <NEW_LINE> <INDENT> return self._test(value) <NEW_LINE> <DEDENT> def __hash__(self): <NEW_LINE> <INDENT> return hash(self... | A query implementation.
This query implementation wraps a test function which is run when the
query is evaluated by calling the object.
Queries can be combined with logical and/or and modified with logical not. | 6259909f50812a4eaa621b24 |
class NullIterator(six.Iterator): <NEW_LINE> <INDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> raise StopIteration() | An empty iterator that doesn't gives any result.
| 6259909fc4546d3d9def81f9 |
class CopyScreenDialog(BaseDialog): <NEW_LINE> <INDENT> expectedTitle = "Copy Screen" <NEW_LINE> locatorClass = CopyScreenDialogLocators <NEW_LINE> screenname_field = TextElement(*locatorClass.name_field) <NEW_LINE> def copyScreen(self, screen_name): <NEW_LINE> <INDENT> self.screenname_field = "" <NEW_LINE> self.screen... | Copy Screen dialog action methods go here | 6259909f3617ad0b5ee0800f |
class JSON(Encode): <NEW_LINE> <INDENT> def __init__(self, sort_keys=False, ensure_ascii=False, indent=None): <NEW_LINE> <INDENT> self.sort_keys = sort_keys <NEW_LINE> self.ensure_ascii = ensure_ascii <NEW_LINE> self.indent = indent <NEW_LINE> <DEDENT> def handleDict(self, data): <NEW_LINE> <INDENT> return dumps(data, ... | **Encode data into JSON format.**
Convert a Python datastructure into JSON format.
Parameters:
- sort_keys(bool)(False)
| Sorts keys when True
- ensure_ascii(bool)(False)
| When True makes sure all chars are valid ascii
- ident(int)(None)
| The indentation used. | 6259909fc4546d3d9def81fa |
class TestAlignmentEnd(TestCase): <NEW_LINE> <INDENT> def testOffsetIndexError(self): <NEW_LINE> <INDENT> error = r'^string index out of range$' <NEW_LINE> self.assertRaisesRegex(IndexError, error, alignmentEnd, '', 4, 1) <NEW_LINE> <DEDENT> def testLengthTooLarge(self): <NEW_LINE> <INDENT> error = r'^string index out ... | Test the alignmentEnd function. | 6259909f187af65679d2ab47 |
class TunaSkeleton(metaclass=ABCMeta): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def setTunaFeatures(self, array=[]): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def getTunaFeatures(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def getTunaTuple(self): <N... | This TunaSkeleton class is purely abstract class designed to demonstrate Inheritance capability of Python.
Class: TunaSkeleton
Extends: object
Author: Nikolay Melnik
Date created: 10/1/2018
Date last modified: 10/14/2018
Python Version: 3.7 | 6259909f3617ad0b5ee08011 |
class EmailField(TextField): <NEW_LINE> <INDENT> EMAIL_REGEXP = re.compile(r'^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]+$', flags=re.IGNORECASE) <NEW_LINE> @classmethod <NEW_LINE> def serialize(cls, value, *args, **kwargs): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> return six.text_... | Field class to represent e-mail addresses
Is not locale-aware (does not need to be) | 6259909fd8ef3951e32c8dbc |
class Converter: <NEW_LINE> <INDENT> def get_amount_for_save(self, amount, source_currency): <NEW_LINE> <INDENT> if source_currency == DEFAULT_CURRENCY: <NEW_LINE> <INDENT> return amount <NEW_LINE> <DEDENT> return amount * self.get_exhange_rate(DEFAULT_CURRENCY, source_currency) <NEW_LINE> <DEDENT> def get_e... | Stub class for currency convertation.
Also handles currency API monitoring and errors alarming.
Throws errors if API can't be reached.
Transactions are supposed to fail then | 6259909f091ae35668706af3 |
@dataclass <NEW_LINE> class SiteInformation: <NEW_LINE> <INDENT> site_name: str = None <NEW_LINE> location: str = None <NEW_LINE> country: str = None <NEW_LINE> northernmost_latitude: float = None <NEW_LINE> southernmost_latitude: float = None <NEW_LINE> easternmost_longitude: float = None <NEW_LINE> westernmost_longit... | Proxy site information | 625990a0187af65679d2ab4b |
class DummySSHServer(test_edi_gateway.DummySSHServer): <NEW_LINE> <INDENT> root = None <NEW_LINE> def create_transport(self, sock): <NEW_LINE> <INDENT> transport = super().create_transport(sock) <NEW_LINE> transport.set_subsystem_handler('sftp', paramiko.SFTPServer, DummySFTPServer) <NEW_LINE> return transport | Dummy SSH server with SFTP support | 625990a0091ae35668706af5 |
class StatTimeQuant(Base): <NEW_LINE> <INDENT> __tablename__ = 'stat_time_quant' <NEW_LINE> __table_args__ = ({'sqlite_autoincrement': True},) <NEW_LINE> id = Column(types.Integer, primary_key=True) <NEW_LINE> time = Column(types.Time, nullable=False, unique=True) | (Node-specific) A time quant (useful for statistics). | 625990a0099cdd3c6367635e |
class LinearProjectorGaussianPosterior: <NEW_LINE> <INDENT> stddev_A_mean = 1e-4 <NEW_LINE> stddev_A_std = 1e-2 <NEW_LINE> mean_A_std = -3.0 <NEW_LINE> stddev_b_std = 1e-1 <NEW_LINE> mean_b_std = -10.0 <NEW_LINE> def __init__(self, input_dim, output_dim): <NEW_LINE> <INDENT> A_shape = [1, output_dim, input_dim] <NEW_LI... | Same as LinearProjector but uses VI with a gaussian diagonal posterior distribution,
to estimate the affine projection parameters | 625990a0099cdd3c6367635f |
class ServiceException(ABC, Exception): <NEW_LINE> <INDENT> error_message: str = _("Unexpected exception occurred.") <NEW_LINE> app_id: int = None <NEW_LINE> error_code: int = None <NEW_LINE> status_code: int = status.HTTP_400_BAD_REQUEST <NEW_LINE> def __init__(self, **error_message_format_kwargs) -> None: <NEW_LINE> ... | Service exception. | 625990a0adb09d7d5dc0c428 |
class reCAPTCHA(CAPTCHABase): <NEW_LINE> <INDENT> _SERVER_API_URL = 'http://www.google.com/recaptcha/api' <NEW_LINE> _SERVER_ERROR_CODES = {'unknown': '#recaptcha:error-codes/unknown', 'invalid-site-public-key': '#recaptcha:error-codes/invalid-site-public-key', 'invalid-site-private-key': '#recaptcha:error-codes/invali... | Google reCAPTCHA API.
See documentation http://code.google.com/apis/recaptcha/. | 625990a0099cdd3c63676360 |
@call_signature() <NEW_LINE> class Element: <NEW_LINE> <INDENT> __type__: Any = NotImplemented <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> bound = self.__signature__.bind(*args, **kwargs) <NEW_LINE> bound.apply_defaults() <NEW_LINE> for name, val in bound.arguments.items(): <NEW_LINE> <INDENT> s... | Python representation of OFX 'element', i.e. *ML leaf node containing text data.
Pass validation parameters (e.g. maximum string length, decimal scale,
required vs. optional, etc.) as arguments to __init__() when defining
an Aggregate subclass.
``Element`` instances are bound to model classes (sundry ``Aggregate``
su... | 625990a0adb09d7d5dc0c42a |
class DummyFingerprintDataset(FingerprintDataset): <NEW_LINE> <INDENT> DATAS = { MetadataField.BROWSER_ID: [1, 2, 3, 2, 3], MetadataField.TIME_OF_COLLECT: pd.date_range(('2021-03-12'), periods=5, freq='H'), ATTRIBUTES[0].name: ['Firefox', 'Chrome', 'Edge', 'Chrome', 'Edge'], ATTRIBUTES[1].name: [60, 120, 90, 120, 90], ... | Dummy fingerprint class to define the required functions. | 625990a0187af65679d2ab51 |
class MetadataItem(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, 'value': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, } <NEW_LINE> def __init__(self, *, name: str, value: str, **kwargs) -> None: <NEW_LINE... | A name-value pair associated with a Batch service resource.
The Batch service does not assign any meaning to this metadata; it is
solely for the use of user code.
All required parameters must be populated in order to send to Azure.
:param name: Required.
:type name: str
:param value: Required.
:type value: str | 625990a0d8ef3951e32c8dc6 |
class Configurator(object): <NEW_LINE> <INDENT> def deploy_cert(self, vhost, cert, key, cert_chain=None): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def choose_virtual_host(self, name): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def get_all_names(self): <NEW_LINE> <INDE... | Generic Let's Encrypt configurator.
Class represents all possible webservers and configuration editors
This includes the generic webserver which wont have configuration
files at all, but instead create a new process to handle the DVSNI
and other challenges. | 625990a0091ae35668706b0b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.