code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ArrayVarianceMutator(Mutator): <NEW_LINE> <INDENT> def __init__(self, peach, node, name="ArrayVarianceMutator"): <NEW_LINE> <INDENT> Mutator.__init__(self) <NEW_LINE> ArrayVarianceMutator.weight = 2 <NEW_LINE> if not ArrayVarianceMutator.supportedDataElement(node): <NEW_LINE> <INDENT> raise Exception("ArrayVarian... | Change the length of arrays to count - N to count + N. | 62598fa44e4d5625663722d8 |
class ClientConfiguration: <NEW_LINE> <INDENT> def __init__(self, server_url, command_port, request_port, server_version=1, timeout=30, wait_period=10, linger_period=1, polling_limit=10, logger=None, verbosity=4): <NEW_LINE> <INDENT> self.server_url = server_url <NEW_LINE> self.command_port = command_port <NEW_LINE> se... | Configuration of network worker evaluating the environments | 62598fa44527f215b58e9d97 |
class CaptureLog(logging.Handler): <NEW_LINE> <INDENT> def __init__(self, logger_name, level=logging.WARNING): <NEW_LINE> <INDENT> super().__init__(level) <NEW_LINE> self.logger_name = logger_name <NEW_LINE> self.level = level <NEW_LINE> self.records = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def record_tuples(self)... | Context manager to capture log entries.
Usage::
with CaptureLog('foo', logging.DEBUG) as captured:
logger = logging.getLogger('foo')
logger.debug("Debug")
>>> captured.records[0].getMessage()
'Debug'
:param logger_name: the name of the logger, can be prefix too.
:param level: the loglevel to captu... | 62598fa4f548e778e596b459 |
class Birds: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.N = N <NEW_LINE> self.minDist = minDist <NEW_LINE> self.maxRuleVel = maxRuleVel <NEW_LINE> self.maxVel = maxVel <NEW_LINE> self.pos = [width / 2.0, height / 2.0] + 10 * np.random.rand(2 * N).reshape(N, 2) <NEW_LINE> angles = 2 * math.pi * np.... | Simulates flock behaviour of birds, using the realistic-looking Boids model (1986) | 62598fa4e5267d203ee6b7c2 |
class ModelInfoResponse(Model): <NEW_LINE> <INDENT> _validation = { 'id': {'required': True}, 'readable_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type_id': {'key': 'typeId', 'type': 'int'}, 'readable_type': {'key': 'readableTy... | An application model info.
All required parameters must be populated in order to send to Azure.
:param id: Required. The ID of the Entity Model.
:type id: str
:param name: Name of the Entity Model.
:type name: str
:param type_id: The type ID of the Entity Model.
:type type_id: int
:param readable_type: Required. Poss... | 62598fa4009cb60464d013d9 |
class ATM: <NEW_LINE> <INDENT> def __init__(self, account_holder, balance=0.00, interest_rate=0.1): <NEW_LINE> <INDENT> self.account_holder = account_holder <NEW_LINE> self.balance = balance <NEW_LINE> self.interest_rate = interest_rate <NEW_LINE> self.transactions = [] <NEW_LINE> <DEDENT> def check_balance(self): <NEW... | This is our ATM class that does ATM-type things | 62598fa4435de62698e9bca9 |
class Content(object): <NEW_LINE> <INDENT> def __init__(self, base_size, enhancement_size, prob): <NEW_LINE> <INDENT> super(Content, self).__init__() <NEW_LINE> self.base_size = base_size <NEW_LINE> self.enhancement_size = enhancement_size <NEW_LINE> self.prob = prob <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get... | docstring for Content | 62598fa47b25080760ed735f |
class WriteBufferTests(unittest.SynchronousTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.transport = StringTransport() <NEW_LINE> <DEDENT> def test_partialWrite(self): <NEW_LINE> <INDENT> buf = imap4.WriteBuffer(self.transport) <NEW_LINE> data = b'x' * buf.bufferSize <NEW_LINE> buf.write(data... | Tests for L{imap4.WriteBuffer}. | 62598fa432920d7e50bc5f0c |
class Identity(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def f(cls, x): <NEW_LINE> <INDENT> return x <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def g(cls, y): <NEW_LINE> <INDENT> return y <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def df(cls, x): <NEW_LINE> <INDENT> if numx.isscalar(x): <NEW_LINE> <INDENT>... | Identity function.
:Info: http://www.wolframalpha.com/input/?i=line | 62598fa499cbb53fe6830d89 |
class VerticalityTriplet(VerticalityNTuplet): <NEW_LINE> <INDENT> def __init__(self, listofVerticalities): <NEW_LINE> <INDENT> VerticalityNTuplet.__init__(self, listofVerticalities) <NEW_LINE> self.tnlsDict = {} <NEW_LINE> self._calcTNLS() <NEW_LINE> <DEDENT> def _calcTNLS(self): <NEW_LINE> <INDENT> for partNum in rang... | a collection of three vertical slices | 62598fa467a9b606de545e80 |
class IProcessor(Interface): <NEW_LINE> <INDENT> export_as_webservice_entry(publish_web_link=False, as_of='beta') <NEW_LINE> id = Attribute("The Processor ID") <NEW_LINE> name = exported( TextLine(title=_("Name"), description=_("The Processor Name")), as_of='devel', readonly=True) <NEW_LINE> title = exported( TextLine(... | The SQLObject Processor Interface | 62598fa4a219f33f346c66cf |
class SenderResponse(object): <NEW_LINE> <INDENT> openapi_types = { 'data': 'SenderFullResponse' } <NEW_LINE> attribute_map = { 'data': 'data' } <NEW_LINE> def __init__(self, data=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_vars_configuration ... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598fa4eab8aa0e5d30bc3e |
@admin.register(KeyFigure) <NEW_LINE> class KeyFigureAdmin(SortableAdminMixin, admin.ModelAdmin): <NEW_LINE> <INDENT> pass | Key figure admin panel.
Key figures can be sorted through a drag'n'drop interface (thanks
to django-admin-sortable2). | 62598fa4d53ae8145f918342 |
@ddt.ddt <NEW_LINE> class TestDeleteTeamAPI(EventTestMixin, TeamAPITestCase): <NEW_LINE> <INDENT> shard = 6 <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestDeleteTeamAPI, self).setUp('lms.djangoapps.teams.utils.tracker') <NEW_LINE> <DEDENT> @ddt.data( (None, 401), ('student_inactive', 401), ('student_unenroll... | Test cases for the team delete endpoint. | 62598fa4baa26c4b54d4f166 |
class LutronCasetaDevice(Entity): <NEW_LINE> <INDENT> def __init__(self, device, bridge): <NEW_LINE> <INDENT> self._device_id = device["device_id"] <NEW_LINE> self._device_type = device["type"] <NEW_LINE> self._device_name = device["name"] <NEW_LINE> self._state = None <NEW_LINE> self._smartbridge = bridge <NEW_LINE> <... | Common base class for all Lutron Caseta devices. | 62598fa48e7ae83300ee8f57 |
class Person(CachingMixin, models.Model): <NEW_LINE> <INDENT> person_id = models.PositiveIntegerField(primary_key=True) <NEW_LINE> name = models.CharField(max_length=150) <NEW_LINE> objects = CachingManager() <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.name | Person model. | 62598fa457b8e32f52508076 |
class Adagrad(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_instance(learning_rate): <NEW_LINE> <INDENT> return tf.train.AdagradOptimizer( learning_rate=learning_rate, initial_accumulator_value=0.1, use_locking=False, name='Adagrad') | Adagrad optimiser with default hyper parameters | 62598fa4498bea3a75a579d8 |
class GraphModule(object): <NEW_LINE> <INDENT> def __init__(self, module, ctx, graph_json_str, debug): <NEW_LINE> <INDENT> self.module = module <NEW_LINE> self._set_input = module["set_input"] <NEW_LINE> self._run = module["run"] <NEW_LINE> self._get_output = module["get_output"] <NEW_LINE> self._get_input = module["ge... | Wrapper runtime module.
This is a thin wrapper of the underlying TVM module.
you can also directly call set_input, run, and get_output
of underlying module functions
Parameters
----------
module : Module
The interal tvm module that holds the actual graph functions.
ctx : TVMContext
The context this module is... | 62598fa4090684286d593636 |
class ObjectModelWithRefProps( DictSchema ): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> @property <NEW_LINE> def myNumber(cls) -> typing.Type['NumberWithValidations']: <NEW_LINE> <INDENT> return NumberWithValidations <NEW_LINE> <DEDENT> myString = StrSchema <NEW_LINE> myBoolean = BoolSchema <NEW_LINE> def __new__( cls... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations | 62598fa476e4537e8c3ef463 |
class _HeaderFooterPart(Strict): <NEW_LINE> <INDENT> text = String(allow_none=True) <NEW_LINE> font = String(allow_none=True) <NEW_LINE> size = Integer(allow_none=True) <NEW_LINE> RGB = ("^[A-Fa-f0-9]{6}$") <NEW_LINE> color = MatchPattern(allow_none=True, pattern=RGB) <NEW_LINE> def __init__(self, text=None, font=None,... | Individual left/center/right header/footer part
Do not use directly.
Header & Footer ampersand codes:
* &A Inserts the worksheet name
* &B Toggles bold
* &D or &[Date] Inserts the current date
* &E Toggles double-underline
* &F or &[File] Inserts the workbook name
* &I Toggles italic
* &N or &[Pages] I... | 62598fa43eb6a72ae038a4fa |
class PathUI(gtk.HBox): <NEW_LINE> <INDENT> def __init__(self, req, backend, width): <NEW_LINE> <INDENT> super(PathUI, self).__init__() <NEW_LINE> self.backend = backend <NEW_LINE> self.req = req <NEW_LINE> self._populate_gtk(width) <NEW_LINE> <DEDENT> def _populate_gtk(self, width): <NEW_LINE> <INDENT> label = gtk.Lab... | Gtk widgets to show a path in a textbox, and a button to bring up a
filesystem explorer to modify that path (also, a label to describe those) | 62598fa42c8b7c6e89bd367b |
class Cache: <NEW_LINE> <INDENT> __allInstances = set() <NEW_LINE> maxAge = 3600 <NEW_LINE> collectionInterval = 2 <NEW_LINE> __stopCollecting = False <NEW_LINE> def __init__(self, func): <NEW_LINE> <INDENT> Cache.__allInstances.add(self) <NEW_LINE> self._store = {} <NEW_LINE> self.__func = func <NEW_LINE> <DEDENT> def... | A cached function | 62598fa463d6d428bbee2668 |
class BlockLoaderTestCase(TestCase): <NEW_LINE> <INDENT> BLOB_WORKING_DIRECTORY = 'blob/working/directory' <NEW_LINE> DEFAULT_KWARGS = { 'blob_working_directory': BLOB_WORKING_DIRECTORY } <NEW_LINE> def wipe_loader(self): <NEW_LINE> <INDENT> del self.block_loader <NEW_LINE> <DEDENT> def build_loader(self, *args, **kwar... | Collects common items and defaults across test cases | 62598fa4851cf427c66b817f |
class CodingFormatter(string.Formatter): <NEW_LINE> <INDENT> def __init__(self, coding): <NEW_LINE> <INDENT> self._coding = coding <NEW_LINE> <DEDENT> def format(self, format_string, *args, **kwargs): <NEW_LINE> <INDENT> if isinstance(format_string, bytes): <NEW_LINE> <INDENT> format_string = format_string.decode(self.... | A variant of `string.Formatter` that converts everything to `unicode`
strings.
This is necessary on Python 2, where formatting otherwise occurs on
bytestrings. It intercepts two points in the formatting process to decode
the format string and all fields using the specified encoding. If decoding
fails, the values are u... | 62598fa4be383301e02536ae |
class AutomaticScaling(_messages.Message): <NEW_LINE> <INDENT> coolDownPeriod = _messages.StringField(1) <NEW_LINE> cpuUtilization = _messages.MessageField('CpuUtilization', 2) <NEW_LINE> customMetrics = _messages.MessageField('CustomMetric', 3, repeated=True) <NEW_LINE> diskUtilization = _messages.MessageField('DiskUt... | Automatic scaling is based on request rate, response latencies, and other
application metrics.
Fields:
coolDownPeriod: Amount of time that the Autoscaler
(https://cloud.google.com/compute/docs/autoscaler/) should wait between
changes to the number of virtual machines. Only applicable in the App
Engine fl... | 62598fa41f5feb6acb162ad8 |
class Test(object): <NEW_LINE> <INDENT> def __init__(self, level, _id): <NEW_LINE> <INDENT> self.level = level <NEW_LINE> self.id = _id <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.level == other.level and self.id == other.id <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> ret... | Identifies a test.
Level - The level of the test.
Test Number - A number of some other ID (like letters) that identifies a test within a level. | 62598fa4dd821e528d6d8deb |
class Songs: <NEW_LINE> <INDENT> def on_get(self, req, resp): <NEW_LINE> <INDENT> albums = req.get_param_as_list('album') <NEW_LINE> if albums: <NEW_LINE> <INDENT> songs = [song for song in _songs.values() if song['album'] in albums] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> songs = list(_songs.values()) <NEW_LINE>... | API resource for the collection of songs.
| 62598fa4d486a94d0ba2be84 |
class ExpansionModel(AddonModel): <NEW_LINE> <INDENT> name = '__expansion__' <NEW_LINE> def __init__(self, expansion): <NEW_LINE> <INDENT> self.num_sdv = 15 <NEW_LINE> self.sdv_names = ['EM'+COMPONENT_SEP+x for x in SYMMETRIC_COMPONENTS] <NEW_LINE> self.sdv_names.extend(['FM'+COMPONENT_SEP+x for x in TENSOR_COMPONENTS]... | Thermal expansion model | 62598fa4a17c0f6771d5c0eb |
class UserSmartListMixin(object): <NEW_LINE> <INDENT> search_fields = ('first_name', 'last_name', 'email') <NEW_LINE> ordering_fields = ( ('first_name', 'first_name'), ('last_name', 'last_name'), ('email', 'email'), ('date_joined', 'created_at') ) <NEW_LINE> ordering = ('first_name',) <NEW_LINE> filter_backends = (Date... | ``User`` list which is also searchable and sortable.
The queryset can be further filtered to a before date with ``ends_at``.
The queryset can be further filtered by passing a ``q`` parameter.
The value in ``q`` will be matched against:
- User.first_name
- User.last_name
- User.email
The result queryset can be... | 62598fa4a8370b77170f0291 |
class FactorList(ListResource): <NEW_LINE> <INDENT> def __init__(self, version, service_sid, identity): <NEW_LINE> <INDENT> super(FactorList, self).__init__(version) <NEW_LINE> self._solution = {'service_sid': service_sid, 'identity': identity, } <NEW_LINE> self._uri = '/Services/{service_sid}/Entities/{identity}/Facto... | PLEASE NOTE that this class contains preview products that are subject
to change. Use them with caution. If you currently do not have developer
preview access, please contact help@twilio.com. | 62598fa4435de62698e9bcab |
class YoloImageGenerator(tf.keras.utils.Sequence): <NEW_LINE> <INDENT> def __init__(self,filenames,batch_size=32,reshape_size=(608,1280)): <NEW_LINE> <INDENT> self.batch_size = batch_size <NEW_LINE> self.filenames = filenames <NEW_LINE> self.channels = 3 <NEW_LINE> self.reshape_size = reshape_size <NEW_LINE> self.resha... | 读取图片,预处理,送入YOLO网络寻找文字区域 | 62598fa47b25080760ed7361 |
class NodeDistributedSampler(Sampler): <NEW_LINE> <INDENT> def __init__(self, dataset, num_replicas=None, rank=None, local_rank=None, local_size=None, shuffle=True): <NEW_LINE> <INDENT> if num_replicas is None: <NEW_LINE> <INDENT> if not dist.is_available(): <NEW_LINE> <INDENT> raise RuntimeError("Requires distributed ... | Sampler that restricts data loading to a subset of the dataset.
It is especially useful in conjunction with
:class:`torch.nn.parallel.DistributedDataParallel`. In such case, each
process can pass a DistributedSampler instance as a DataLoader sampler,
and load a subset of the original dataset that is exclusive to it.
..... | 62598fa4442bda511e95c30c |
@dataclass <NEW_LINE> class BufferedByteReceiveStream(ByteReceiveStream): <NEW_LINE> <INDENT> receive_stream: AnyByteReceiveStream <NEW_LINE> _buffer: bytearray = field(init=False, default_factory=bytearray) <NEW_LINE> _closed: bool = field(init=False, default=False) <NEW_LINE> async def aclose(self) -> None: <NEW_LINE... | Wraps any bytes-based receive stream and uses a buffer to provide sophisticated receiving
capabilities in the form of a byte stream. | 62598fa499cbb53fe6830d8b |
class PoiExtHotelSkuResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'error_code': 'ErrorCode', 'description': 'Description', 'data': 'list[PoiExtHotelSkuResponseData]' } <NEW_LINE> attribute_map = { 'error_code': 'error_code', 'description': 'description', 'data': 'data' } <NEW_LINE> def __init__(self, error_co... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa48e7ae83300ee8f58 |
class ChargeMethodUnavailableError(OpenFFToolkitException): <NEW_LINE> <INDENT> pass | A toolkit does not support the requested partial_charge_method combination | 62598fa4eab8aa0e5d30bc40 |
class Requestor(object): <NEW_LINE> <INDENT> def __init__(self, api_app_id, api_app_secret, endpoint, api_host=COVEAPI_HOST): <NEW_LINE> <INDENT> self.api_app_id = api_app_id <NEW_LINE> self.api_app_secret = api_app_secret <NEW_LINE> self.endpoint = endpoint <NEW_LINE> self.api_host = api_host <NEW_LINE> <DEDENT> def g... | Handle API requests.
Keyword arguments:
`api_app_id` -- your COVE API app id
`api_app_secret` -- your COVE API secret key
`endpoint` -- endpoint of COVE API request
Returns:
`coveapi.connection.Requestor` instance | 62598fa47d847024c075c27d |
class GcloudDeploymentManager(GcloudService): <NEW_LINE> <INDENT> service_name = "deploymentmanager" <NEW_LINE> default_api_version = "v2" | A class that wraps the Deployment Manager service for the Hastexo XBlock. | 62598fa4097d151d1a2c0ede |
class Serializer(base.Serializer): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.options = None <NEW_LINE> self.stream = None <NEW_LINE> self.fields = None <NEW_LINE> self.excludes = None <NEW_LINE> self.relations = None <NEW_LINE> self.extras = None <NEW_LINE> self.use_natural_keys ... | Serializer for Django models inspired by Ruby on Rails serializer.
| 62598fa41b99ca400228f48b |
class ScanTemplateDatabase(object): <NEW_LINE> <INDENT> swagger_types = { 'db2': 'str', 'links': 'list[Link]', 'oracle': 'list[str]', 'postgres': 'str' } <NEW_LINE> attribute_map = { 'db2': 'db2', 'links': 'links', 'oracle': 'oracle', 'postgres': 'postgres' } <NEW_LINE> def __init__(self, db2=None, links=None, oracle=N... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa4a79ad16197769f19 |
class Task(object): <NEW_LINE> <INDENT> def __init__(self, taskfile): <NEW_LINE> <INDENT> self.name = taskfile <NEW_LINE> with open(taskfile) as t: <NEW_LINE> <INDENT> msg, delay = t.read().split(";") <NEW_LINE> <DEDENT> self.msg = msg <NEW_LINE> self.delay = int(delay) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <IN... | read a task file with the following content: Hello Parallel Tasks;5 | 62598fa467a9b606de545e83 |
class itkInPlaceImageFilterIRGBAUS2IRGBAUC2(itkImageToImageFilterAPython.itkImageToImageFilterIRGBAUS2IRGBAUC2): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructo... | Proxy of C++ itkInPlaceImageFilterIRGBAUS2IRGBAUC2 class | 62598fa4009cb60464d013dc |
class AkismetValidatorView(BrowserView): <NEW_LINE> <INDENT> def __init__(self, context, request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> registry = queryUtility(IRegistry) <NEW_LINE> self.settings = registry.forInterface(IAkismetSettings) <NEW_LINE> <DEDENT> def verify(... | Akismet validator view
| 62598fa416aa5153ce4003b9 |
class EmailAddress(Container): <NEW_LINE> <INDENT> def __init__(self, username, hostname, fuzz_delim=True, fuzzable=True, name=None): <NEW_LINE> <INDENT> fields = [ _to_string_field(_merge(name, 'username'), username, fuzzable=True), Delimiter('@', fuzzable=fuzz_delim), _to_string_field(_merge(name, 'hostname'), hostna... | Container to fuzz email address | 62598fa410dbd63aa1c70a68 |
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> s_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> objects = UserP... | Represents a "user profile" inside our system. | 62598fa407f4c71912baf2fb |
class document: <NEW_LINE> <INDENT> def __init__(self, pages=None): <NEW_LINE> <INDENT> if pages is None: <NEW_LINE> <INDENT> self.pages = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.pages = pages <NEW_LINE> <DEDENT> <DEDENT> def append(self, page): <NEW_LINE> <INDENT> self.pages.append(page) <NEW_LINE> <DEDE... | holds a collection of page instances which are output as pages of a document | 62598fa42c8b7c6e89bd367d |
class StoreOutput(base_handler.PipelineBase): <NEW_LINE> <INDENT> def run(self, mr_type, encoded_key, output): <NEW_LINE> <INDENT> logging.debug("output is %s" % str(output)) <NEW_LINE> key = db.Key(encoded=encoded_key) <NEW_LINE> m = FileMetadata.get(key) <NEW_LINE> url_path = [] <NEW_LINE> for o in output: <NEW_LINE>... | A pipeline to store the result of the MapReduce job in the database.
Args:
mr_type: the type of mapreduce job run (e.g., WordCount, Index)
encoded_key: the DB key corresponding to the metadata of this job
output: the gcs file path where the output of the job is stored | 62598fa40a50d4780f705294 |
class PowerSupplyListField(base.ListField): <NEW_LINE> <INDENT> firmware_version = base.Field('FirmwareVersion') <NEW_LINE> identity = base.Field('MemberId') <NEW_LINE> indicator_led = base.MappedField('IndicatorLed', res_cons.IndicatorLED) <NEW_LINE> input_ranges = InputRangeListField('InputRanges', default=[]) <NEW_L... | The power supplies associated with this Power resource | 62598fa44a966d76dd5eed9a |
class ReviewDocumentBackend(object): <NEW_LINE> <INDENT> def authenticate(self, username=None, password=None): <NEW_LINE> <INDENT> user = None <NEW_LINE> try: <NEW_LINE> <INDENT> review = ReviewDocument.objects.get(slug=username) <NEW_LINE> pk = review.get_auth(auth_key=password) <NEW_LINE> if pk is None: <NEW_LINE> <I... | Authenticated based on the url
/review/:slug/:unique_key
where the slug gets the ReviewDocument
and the :unique_key provides a lookup in the ReviewDocument.data['auth']
which will provide the user pk | 62598fa4851cf427c66b8181 |
class TestConfigCASigningProfilesTls(): <NEW_LINE> <INDENT> def test_config_ca_signing_profiles_tls_serialization(self): <NEW_LINE> <INDENT> config_ca_signing_profiles_tls_model_json = {} <NEW_LINE> config_ca_signing_profiles_tls_model_json['usage'] = ['cert sign'] <NEW_LINE> config_ca_signing_profiles_tls_model_json['... | Test Class for ConfigCASigningProfilesTls | 62598fa4be8e80087fbbef1a |
class DraftPaymentEntry(BunqModel): <NEW_LINE> <INDENT> _id_ = None <NEW_LINE> _amount = None <NEW_LINE> _alias = None <NEW_LINE> _counterparty_alias = None <NEW_LINE> _description = None <NEW_LINE> _merchant_reference = None <NEW_LINE> _type_ = None <NEW_LINE> _attachment = None <NEW_LINE> _amount_field_for_request = ... | :param _amount: The amount of the payment.
:type _amount: Amount
:param _counterparty_alias: The LabelMonetaryAccount containing the public
information of the other (counterparty) side of the DraftPayment.
:type _counterparty_alias: MonetaryAccountReference
:param _description: The description for the DraftPayment. Max... | 62598fa44f88993c371f0466 |
class _stream_info: <NEW_LINE> <INDENT> def __init__(self, infos: Iterable[_pcap.packet_info]) -> None: <NEW_LINE> <INDENT> self.total_packets = 0 <NEW_LINE> self.encapsulation_protocol = set() <NEW_LINE> self.timestamp_min = float('inf') <NEW_LINE> self.timestamp_max = float('-inf') <NEW_LINE> self.udp_streams: Dict[_... | Gather some useful info about UDP data in a pcap. | 62598fa4a8370b77170f0292 |
class EclCase: <NEW_LINE> <INDENT> def __init__(self , input_case): <NEW_LINE> <INDENT> warnings.warn("The EclCase class is deprecated - instantiate the EclSum / EclGrid / ... classes directly." , DeprecationWarning) <NEW_LINE> self.case = input_case <NEW_LINE> (path , tmp) = os.path.split( input_case ) <NEW_LINE> if p... | Small container for one ECLIPSE case.
Mostly a wrapper around an ECLIPSE datafile, along with properties
to load the corresponding summary, grid and rft files. In addition
there are methods run() and submit() to run the ECLIPSE
simulation. | 62598fa401c39578d7f12c38 |
class TestJobCreateParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'parameters': {'key': 'parameters', 'type': '{str}'}, 'run_on': {'key': 'runOn', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, parameters: Optional[Dict[str, str]] = None, run_on: Optional[str] = None, **kwargs ): <N... | The parameters supplied to the create test job operation.
:param parameters: Gets or sets the parameters of the test job.
:type parameters: dict[str, str]
:param run_on: Gets or sets the runOn which specifies the group name where the job is to be
executed.
:type run_on: str | 62598fa48da39b475be0309a |
class Instruction51l(Instruction): <NEW_LINE> <INDENT> length = 10 <NEW_LINE> def __init__(self, cm, buff): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.cm = cm <NEW_LINE> self.OP, self.AA, self.BBBBBBBBBBBBBBBB = cm.packer["BBq"].unpack(buff[:self.length]) <NEW_LINE> <DEDENT> def get_output(self, idx=-1): <N... | This class represents all instructions which have the 51l format | 62598fa43317a56b869be4a6 |
class KNeighborsCounterfactual(BaseCounterfactual): <NEW_LINE> <INDENT> def __init__(self, random_state=None): <NEW_LINE> <INDENT> self.random_state = random_state <NEW_LINE> <DEDENT> def fit(self, estimator): <NEW_LINE> <INDENT> if not isinstance(estimator, KNeighborsClassifier): <NEW_LINE> <INDENT> raise ValueError("... | Fit a counterfactual explainer to a k-nearest neighbors classifier
Attributes
----------
explainer_ : dict
The explainer for each label
References
----------
Karlsson, I., Rebane, J., Papapetrou, P., & Gionis, A. (2020).
Locally and globally explainable time series tweaking.
Knowledge and Information Sy... | 62598fa4cc0a2c111447aec8 |
class MyConsole(code.InteractiveConsole): <NEW_LINE> <INDENT> lastCode = None <NEW_LINE> def getLastCode(self): <NEW_LINE> <INDENT> return self.lastCode <NEW_LINE> <DEDENT> def runcode(self, code): <NEW_LINE> <INDENT> self.lastCode = code <NEW_LINE> try: <NEW_LINE> <INDENT> exec(code, self.locals) <NEW_LINE> <DEDENT> e... | MyConsole Subclass of code.InteractiveConsole | 62598fa41f037a2d8b9e3fa4 |
class Vertex: <NEW_LINE> <INDENT> radius = 10 <NEW_LINE> color = "lightgray" <NEW_LINE> def __init__(self, x=None, y=None, label=None, radius=None, color=None): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.label = label <NEW_LINE> if color: <NEW_LINE> <INDENT> self.color = color <NEW_LINE> <DEDE... | Represents one vertex in the graph.
Has some additional properties so it can be displayed via GraphCanvas.
If x & y == None, Vertex can't be drawn. | 62598fa4d6c5a102081e2000 |
class MonthlyCollectionImmutable( _ImmutableCollectionBase, MonthlyCollection): <NEW_LINE> <INDENT> def to_mutable(self): <NEW_LINE> <INDENT> new_obj = MonthlyCollection(self.header, self.values, self.datetimes) <NEW_LINE> new_obj._validated_a_period = self._validated_a_period <NEW_LINE> return new_obj | Immutable Monthly Data Collection. | 62598fa45f7d997b871f933d |
class FunctionWrapper(dict): <NEW_LINE> <INDENT> def __init__(self, opts, minion): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.opts = opts <NEW_LINE> self.minion = minion <NEW_LINE> self.local = LocalClient(self.opts["conf_file"]) <NEW_LINE> self.functions = self.__load_functions() <NEW_LINE> <DEDENT> def __... | Create a function wrapper that looks like the functions dict on the minion
but invoked commands on the minion via a LocalClient.
This allows SLS files to be loaded with an object that calls down to the
minion when the salt functions dict is referenced. | 62598fa416aa5153ce4003bb |
class GetClientStats(flow_base.FlowBase, GetClientStatsProcessResponseMixin): <NEW_LINE> <INDENT> category = "/Administrative/" <NEW_LINE> result_types = (rdf_client_stats.ClientStats,) <NEW_LINE> def Start(self): <NEW_LINE> <INDENT> self.CallClient( server_stubs.GetClientStats, next_state=compatibility.GetName(self.St... | This flow retrieves information about the GRR client process. | 62598fa43617ad0b5ee0600d |
class TestMappingUsersRulesRuleOptions(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 testMappingUsersRulesRuleOptions(self): <NEW_LINE> <INDENT> pass | MappingUsersRulesRuleOptions unit test stubs | 62598fa4cb5e8a47e493c0d4 |
class MemberAuth(Resource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.auth_post_parser = reqparse.RequestParser() <NEW_LINE> self.auth_post_parser.add_argument( 'email', location='json', required=True, type=str, ) <NEW_LINE> self.auth_post_parser.add_argument( 'password', location='json', require... | Employee class that create employee or read employee list.
| 62598fa444b2445a339b68cb |
class Item(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String(20), unique=True, nullable=False) <NEW_LINE> price = db.Column(db.Float, nullable=False) <NEW_LINE> desc = db.Column(db.String(300), nullable=False) <NEW_LINE> owner_username = db.Column( db.Stri... | items that exist in each category stored in db | 62598fa430dc7b766599f708 |
class terminus(Symbol): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __init__(self, cid: Hashable) -> None: <NEW_LINE> <INDENT> super().__init__("terminus", cid) | A terminus symbol. | 62598fa4460517430c431fb8 |
class Filter2(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Filter2, self).__init__() <NEW_LINE> self.conv1 = ConvBNReLU(in_channels=1, out_channels=10, kernel_size=32, stride=2) <NEW_LINE> self.maxpool1 = nn.AvgPool1d(kernel_size=10, stride=2) <NEW_LINE> self.conv2 = ConvBNReLU(in_chann... | 神经网络滤波器
input - Conv1 - Maxpool - Conv2 - Maxpool - Conv3 - Maxpool - Conv4 - Conv5 - Globaverg
(1, 2000) - (10, 997) - (10, 498)- (100, 248) - (100, 122) - (500, 60) - (500, 29) - (1000, 14)-(2000, 6)-(2000,1) | 62598fa40a50d4780f705296 |
class HiddenVAE(nn.Module): <NEW_LINE> <INDENT> def __init__(self, img_channels, latent_size): <NEW_LINE> <INDENT> super(HiddenVAE, self).__init__() <NEW_LINE> self.encoder = Encoder(img_channels, latent_size) <NEW_LINE> self.decoder = Decoder(img_channels, latent_size) <NEW_LINE> <DEDENT> def forward(self, x): <NEW_LI... | Variational Autoencoder | 62598fa4796e427e5384e64e |
class DescribeInstancesRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(DescribeInstancesRequest, self).__init__( '/regions/{regionId}/instances', 'GET', header, version) <NEW_LINE> self.parameters = parameters | 查询实例列表 | 62598fa44a966d76dd5eed9c |
class Blob(sc.prettyobj): <NEW_LINE> <INDENT> def __init__(self, obj=None, key=None, objtype=None, uid=None, force=True): <NEW_LINE> <INDENT> if uid is None: <NEW_LINE> <INDENT> if force: <NEW_LINE> <INDENT> uid = sc.uuid() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> errormsg = 'DataStore: Not creating a new Blob UUI... | Wrapper for any Python object we want to store in the DataStore. | 62598fa4d58c6744b42dc231 |
class Meta: <NEW_LINE> <INDENT> database = DB <NEW_LINE> primary_key = CompositeKey('citation', 'doi') | PeeWee meta class contains the database and the primary key. | 62598fa4be8e80087fbbef1c |
class UploadFile(AuthenticatedMethod): <NEW_LINE> <INDENT> method_name = 'wp.uploadFile' <NEW_LINE> method_args = ('data',) | Upload a file to the blog.
Note: the file is not attached to or inserted into any blog posts.
Parameters:
`data`: `dict` with three items:
* `name`: filename
* `type`: MIME-type of the file
* `bits`: base-64 encoded contents of the file. See xmlrpclib.Binary()
* `overwrite` (option... | 62598fa4dd821e528d6d8dee |
class OpenSubtitlesError(ProviderError): <NEW_LINE> <INDENT> pass | Base class for non-generic :class:`OpenSubtitlesProvider` exceptions | 62598fa4d486a94d0ba2be88 |
class PluginSettings(object): <NEW_LINE> <INDENT> def __init__(self, pluginName): <NEW_LINE> <INDENT> self.s = QSettings() <NEW_LINE> self.name = pluginName <NEW_LINE> <DEDENT> def pluginValue(self, key, default): <NEW_LINE> <INDENT> return self.s.value('plugins/{0}/{1}'.format(self.name, key), default) <NEW_LINE> <DED... | Wrapper Settings class for plugins.
This is a generic settings class, which provide consistent loading
and saving of settings for plugins. It works by providing the
plugin name to the constructor, and using this value to retrive and
save settings in the main luma settings file. | 62598fa42ae34c7f260aaf9c |
class Qualifier(models.Model): <NEW_LINE> <INDENT> __model_label__ = "qualifier" <NEW_LINE> qualifier = models.CharField( 'Qualifier', max_length=200, null=True, blank=True) <NEW_LINE> pcsRow_fk = models.ForeignKey('PcsRow') <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return "%s: %s" % (self.qualifier, self.p... | The ICD 10 PCS qualifier models. | 62598fa4236d856c2adc9398 |
class ManualLoanForm(Form): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> super().__init__(**kw) <NEW_LINE> self.fields = OrderedDict() <NEW_LINE> self.fields["loan_issue"] = Field( label=_("Loan Issue"), required=True, template="iwp_website.selection_field", choices=self._choices_loan_issue, ) <NEW... | Form to create new Manual Share for a user | 62598fa456ac1b37e63020a7 |
class CheckFilename(CheckPath): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(CheckFilename, self).__init__(**kwargs) <NEW_LINE> self.message = "File does not exist." <NEW_LINE> self.allow_none = True <NEW_LINE> self.msg_level = "warning" | Checks whether a directory exists. These are files that the may be created
or not necessary to run. E.g. Log files | 62598fa47d847024c075c280 |
class HTTPTemporaryRedirect(HTTPStatus): <NEW_LINE> <INDENT> def __init__(self, location, headers=None): <NEW_LINE> <INDENT> if headers is None: <NEW_LINE> <INDENT> headers = {} <NEW_LINE> <DEDENT> headers.setdefault('location', location) <NEW_LINE> super(HTTPTemporaryRedirect, self).__init__(falcon.HTTP_307, headers) | 307 Temporary Redirect.
The 307 (Temporary Redirect) status code indicates that the target
resource resides temporarily under a different URI and the user
agent MUST NOT change the request method if it performs an automatic
redirection to that URI. Since the redirection can change over
time, the client ought to conti... | 62598fa4a8370b77170f0294 |
class NatGatewayListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[NatGateway]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(NatGatewayListResult, self).__init__(**kwargs) <NEW_LI... | Response for ListNatGateways API service call.
:param value: A list of Nat Gateways that exists in a resource group.
:type value: list[~azure.mgmt.network.v2019_11_01.models.NatGateway]
:param next_link: The URL to get the next set of results.
:type next_link: str | 62598fa47b25080760ed7365 |
class GetRequestPaginator(object): <NEW_LINE> <INDENT> def __init__(self, queryset, page_requested, page_size): <NEW_LINE> <INDENT> self.queryset = queryset <NEW_LINE> self.curr_page = 1 if page_requested < 1 else page_requested <NEW_LINE> self.page_size = page_size if page_size < MAX_GET_RESPONSE_PER_PAGE e... | Used to paginate queryset:
i.e. breaking large number of items in queryset in pages of smaller subset | 62598fa423849d37ff850f70 |
class EditForm(FlaskForm): <NEW_LINE> <INDENT> username = TextField('username', [ Required(message='must provide an email address.')]) <NEW_LINE> email = TextField('email address', [Email(), Required(message='must provide an email address.')]) <NEW_LINE> password = PasswordField('password') | FlaskForm to edit existing users. | 62598fa463d6d428bbee266d |
class GDataClient(gdata.service.GDataService): <NEW_LINE> <INDENT> def __init__(self, application_name=None, tokens=None): <NEW_LINE> <INDENT> gdata.service.GDataService.__init__(self, source=application_name, tokens=tokens) <NEW_LINE> <DEDENT> def ClientLogin(self, username, password, service_name, source=None, accoun... | This class is deprecated.
All functionality has been migrated to gdata.service.GDataService. | 62598fa491af0d3eaad39cc9 |
@add_metaclass(abc.ABCMeta) <NEW_LINE> class LabelingAsRoot(loopbackedtestcase.LoopBackedTestCase): <NEW_LINE> <INDENT> _fs_class = abc.abstractproperty( doc="The class of the filesystem being tested on.") <NEW_LINE> _invalid_label = abc.abstractproperty( doc="A label which is invalid for this filesystem.") <NEW_LINE> ... | Tests various aspects of labeling a filesystem where there
is no easy way to read the filesystem's label once it has been
set and where the filesystem can not be relabeled. | 62598fa46e29344779b00518 |
class P1(): <NEW_LINE> <INDENT> def __init__(self, unitcell_size, det_shape, dtype=np.complex128): <NEW_LINE> <INDENT> T0 = 1 <NEW_LINE> self.translations = np.array([T0]) <NEW_LINE> self.unitcell_size = unitcell_size <NEW_LINE> self.syms = np.zeros((1,) + tuple(det_shape), dtype=dtype) <NEW_LINE> <DEDENT> def solid_sy... | Store arrays to make the crystal mapping more
efficient.
Assume that Fourier space arrays are fft shifted.
Perform symmetry operations with the np.fft.fftfreq basis
so that (say) a flip operation behaves like:
a = [0, 1, 2, 3, 4, 5, 6, 7]
a flipped = [0, 7, 6, 5, 4, 3, 2, 1]
or:
i = np.fft.fftfreq(8)... | 62598fa47047854f4633f294 |
class AssignmentShortPollSerializer(AssignmentAllPollSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> list_serializer_class = FilterPollListSerializer <NEW_LINE> model = AssignmentPoll <NEW_LINE> fields = ( "id", "pollmethod", "description", "published", "options", "votesabstain", "votesno", "votesvalid... | Serializer for assignment.models.AssignmentPoll objects.
Serializes only short polls (excluded unpublished polls). | 62598fa4f548e778e596b460 |
class PatchvversionservicerequestsserviceOperations(object): <NEW_LINE> <INDENT> models = models <NEW_LINE> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self.config =... | PatchvversionservicerequestsserviceOperations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer. | 62598fa4fff4ab517ebcd6a1 |
class LiteracyAndLanguageResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | A ResultSet with methods tailored to the values returned by the LiteracyAndLanguage Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution. | 62598fa44a966d76dd5eed9e |
class Call_IdHeader( DeepClass("_cidh_", { "host": {}, "key": { dck.gen: "GenerateKey", dck.check: lambda x: isinstance(x, bytes)} }), Header): <NEW_LINE> <INDENT> parseinfo = { Parser.Pattern: b"(.*)$", Parser.Mappings: [("key",)], Parser.PassMappingsToInit: True, } <NEW_LINE> @classmethod <NEW_LINE> def GenerateKey(c... | Call ID header.
To paraphrase:
https://tools.ietf.org/html/rfc3261#section-8.1.1.4
This value should be generated uniquely over space and time for each new
dialogue initiated by the UA. It must be the same for all messages during
a dialogue. It SHOULD also be the same for each REGISTER sent to maintain a
registratio... | 62598fa455399d3f056263e0 |
class SentSimClassInterface(object): <NEW_LINE> <INDENT> def __init__(self, model, vocab, session, opt): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> self.vocab = vocab <NEW_LINE> self.session = session <NEW_LINE> self.opt = opt <NEW_LINE> self.model_saver = tf.train.Saver() <NEW_LINE> <DEDENT> def infer_step(self... | A small interface for the evaluation of sentence similarity classifier; extendable. | 62598fa47d43ff2487427360 |
class FitResultCollector(varial.tools.Tool): <NEW_LINE> <INDENT> io = varial.dbio <NEW_LINE> def run(self): <NEW_LINE> <INDENT> fit_chains = varial.analysis.lookup_children_names('../..') <NEW_LINE> fitters = list( (name, varial.analysis.lookup( '../../%s/TemplateFitToolData' % name)) for name in fit_chains ) <NEW_LINE... | Collect fit results (numbers only). | 62598fa401c39578d7f12c3b |
class CreateUDBSlaveResponseSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "DBId": fields.Str(required=False, load_from="DBId"), } | CreateUDBSlave - 创建UDB实例的slave | 62598fa4a8370b77170f0296 |
class ParseBaseException(Exception): <NEW_LINE> <INDENT> def __init__(self, pstr, loc=0, msg=None, elem=None): <NEW_LINE> <INDENT> self.loc = loc <NEW_LINE> if msg is None: <NEW_LINE> <INDENT> self.msg = pstr <NEW_LINE> self.pstr = "" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> self.pstr = p... | base exception class for all parsing runtime exceptions | 62598fa47b25080760ed7367 |
@benchmark.Disabled('reference') <NEW_LINE> class SmoothnessTop25(_Smoothness): <NEW_LINE> <INDENT> page_set = page_sets.Top25SmoothPageSet <NEW_LINE> @classmethod <NEW_LINE> def Name(cls): <NEW_LINE> <INDENT> return 'smoothness.top_25_smooth' | Measures rendering statistics while scrolling down the top 25 web pages.
http://www.chromium.org/developers/design-documents/rendering-benchmarks | 62598fa48da39b475be0309e |
class Fellow(Person): <NEW_LINE> <INDENT> def __init__(self, first_name, second_name, person_type='FELLOW', lspace_option='N'): <NEW_LINE> <INDENT> super(Fellow, self).__init__(first_name, second_name, person_type, lspace_option='N') | New fellow blueprint but also inherits from the Person class
person type(f) translates to fellow and (s) to staff. | 62598fa456b00c62f0fb276f |
class MidptTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_mi_to_m(self): <NEW_LINE> <INDENT> assert mi_to_m(3) == 4828 <NEW_LINE> <DEDENT> def test_stricter_radius(self): <NEW_LINE> <INDENT> self.assertEqual(stricter_radius(3, 2), 2) <NEW_LINE> <DEDENT> def test_midpt_formula(self): <NEW_LINE> <INDENT> self.asse... | Unit tests for the calculations behind the making of the midpoint between
two user locations. | 62598fa499cbb53fe6830d92 |
class DirectoryIterator(image.DirectoryIterator, Iterator): <NEW_LINE> <INDENT> def __init__(self, directory, image_data_generator, target_size=(256, 256), color_mode='rgb', classes=None, class_mode='categorical', batch_size=32, shuffle=True, seed=None, data_format=None, save_to_dir=None, save_prefix='', save_format='p... | Iterator capable of reading images from a directory on disk.
# Arguments
directory: Path to the directory to read images from.
Each subdirectory in this directory will be
considered to contain images from one class,
or alternatively you could specify class subdirectories
via the `cl... | 62598fa45fdd1c0f98e5de55 |
class IncompatibleTypesException(Exception): <NEW_LINE> <INDENT> def __init__(self, value=None): <NEW_LINE> <INDENT> Exception.__init__(self) <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "%s" %(self.value,) | Raised when we assign some values that breaksour rules
@see ArgCompatibility class for allowed situations | 62598fa44f6381625f19941c |
class TransformerEncoder(nn.Module): <NEW_LINE> <INDENT> r <NEW_LINE> def __init__(self, num_layers, d_model=512, n_head=8, dim_ff=2048, dropout=0.1): <NEW_LINE> <INDENT> super(TransformerEncoder, self).__init__() <NEW_LINE> self.layers = nn.ModuleList([TransformerSeq2SeqEncoderLayer(d_model = d_model, n_head = n_head,... | transformer的encoder模块,不包含embedding层 | 62598fa463d6d428bbee266f |
class FindFilesNode(Node): <NEW_LINE> <INDENT> def __init__(self, name, parent): <NEW_LINE> <INDENT> super(FindFilesNode, self).__init__(name, parent) <NEW_LINE> self._location = StringAttribute("location", self) <NEW_LINE> self._location.setSpecializationOverride("Path") <NEW_LINE> self._pattern = StringAttribute("pat... | This node uses fnmatch to find matching file paths in the given folder
@ivar _location: base folder to search in
@ivar _pattern: fnmatch pattern to search for
@ivar _files: all files found | 62598fa4d6c5a102081e2004 |
class ArtiefactDiscovery(Base): <NEW_LINE> <INDENT> __tablename__ = 'artiefact_discovery' <NEW_LINE> artiefact_id = Column(BIGINT, ForeignKey('artiefact.id'), primary_key=True) <NEW_LINE> user_id = Column(BIGINT, ForeignKey('artiefact_user.id'), index=True) <NEW_LINE> uploaded_at = Column(DateTime(timezone=True), nulla... | Artiefact Discovery | 62598fa4cc0a2c111447aecd |
class TestSpellRapidTranqProperty(TransactionCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestSpellRapidTranqProperty, self).setUp() <NEW_LINE> self.spell_model = self.registry('nh.clinical.spell') <NEW_LINE> self.patient_model = self.registry('nh.clinical.patient') <NEW_LINE> cr, uid = self.cr... | Test that the rapid_tranq column on nh.clinical.spell is present and can
be set | 62598fa41f037a2d8b9e3fa8 |
class RemoveHandler(handler.TriggeredHandler): <NEW_LINE> <INDENT> handles_what = { 'message_matcher': matchers.match_or( matchers.match_slack("message"), matchers.match_telnet("message") ), 'channel_matcher': matchers.match_channel(c.TARGETED), 'triggers': [ trigger.Trigger('alias remove', True), ], 'schema': Schema({... | Remove a alias to a long command (for the calling user). | 62598fa438b623060ffa8f53 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.