code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Encoder: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.encode_dict = {} <NEW_LINE> <DEDENT> def fit(self, data, features): <NEW_LINE> <INDENT> m, n = data.shape <NEW_LINE> for f in features: <NEW_LINE> <INDENT> for t in range(m): <NEW_LINE> <INDENT> val = data[t][f] <NEW_LINE> if self.get_code(...
A Encoder will fit the given data set with discrete features. For all values in given features, it will replace the string value to a int value so that the data set can fit into the np.array(float)
62599035d99f1b3c44d067d5
class ShuffleDataset(UnaryUnchangedStructureDataset): <NEW_LINE> <INDENT> def __init__(self, input_dataset, buffer_size, seed=None, reshuffle_each_iteration=None, name=None): <NEW_LINE> <INDENT> self._input_dataset = input_dataset <NEW_LINE> self._buffer_size = ops.convert_to_tensor( buffer_size, dtype=dtypes.int64, na...
A `Dataset` that randomly shuffles the elements of its input.
6259903576d4e153a661db0a
class Connections(OADict): <NEW_LINE> <INDENT> class ConnectionsEntries(OAList): <NEW_LINE> <INDENT> class ConnectionsEntry(OADict): <NEW_LINE> <INDENT> def connection(self): <NEW_LINE> <INDENT> if self.oneall: <NEW_LINE> <INDENT> return self.oneall.connection(self.connection_token) <NEW_LINE> <DEDENT> <DEDENT> <DEDENT...
Represents the /connections/ OneAll API call
6259903582261d6c5273075d
class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'protocol': {'key': 'protocol', 'type': 'str'}, 'source_addresses': {'key': 'sourceAddresses...
Intrusion detection bypass traffic specification. :param name: Name of the bypass traffic rule. :type name: str :param description: Description of the bypass traffic rule. :type description: str :param protocol: The rule bypass protocol. Possible values include: "TCP", "UDP", "ICMP", "ANY". :type protocol: str or ~a...
62599035d10714528d69ef25
class ExporterXslList(APIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> exporter_list = xsl_api.get_all() <NEW_LINE> return_value = ExporterXslSerializer(exporter_list, many=True) <NEW_LINE> return Response(return_value....
List all XSL Exporters, or create
6259903530c21e258be9993f
class Server(common.JSONConfigurable): <NEW_LINE> <INDENT> _attrs = collections.OrderedDict([ ('name', None), ('host', None), ('port', None), ('channels', Channel), ('all_channels', Channel), ('locked', None), ('pause', None), ('fast', None), ('uptime', None) ]) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE...
Client implementation of server
6259903523e79379d538d63d
class CollectCurrentFile(pyblish.api.ContextPlugin): <NEW_LINE> <INDENT> order = pyblish.api.CollectorOrder <NEW_LINE> def process(self, context): <NEW_LINE> <INDENT> project = context.data('activeProject') <NEW_LINE> context.set_data('currentFile', value=project.path())
Inject the current working file into context
62599035a8ecb03325872351
class Descendants(JSONPath): <NEW_LINE> <INDENT> def __init__(self, left, right): <NEW_LINE> <INDENT> self.left = left <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def find(self, datum): <NEW_LINE> <INDENT> left_matches = self.left.find(datum) <NEW_LINE> if not isinstance(left_matches, list): <NEW_LINE> <INDENT> l...
JSONPath that matches first the left expression then any descendant of it which matches the right expression.
625990358a43f66fc4bf32be
class Ceilometer(monasca_setup.detection.ServicePlugin): <NEW_LINE> <INDENT> def __init__(self, template_dir, overwrite=True, args=None): <NEW_LINE> <INDENT> service_params = { 'template_dir': template_dir, 'overwrite': overwrite, 'service_name': 'telemetry', 'process_names': ['ceilometer-agent-compute', 'ceilometer-ag...
Detect Ceilometer daemons and setup configuration to monitor them.
6259903571ff763f4b5e88cd
class UnknownServiceEnvironmentNotConfiguredError(Exception): <NEW_LINE> <INDENT> pass
Raised when unknown service-environment is not configured for plugin.
62599035be8e80087fbc01b2
class WebSearchAdminWebPagesAvailabilityTest(InvenioTestCase): <NEW_LINE> <INDENT> def test_websearch_admin_interface_pages_availability(self): <NEW_LINE> <INDENT> baseurl = cfg['CFG_SITE_URL'] + '/admin/websearch/websearchadmin.py' <NEW_LINE> _exports = ['', '?mtype=perform_showall', '?mtype=perform_addcollection', '?...
Check WebSearch Admin web pages whether they are up or not.
625990358c3a8732951f768c
class StringUI(TextUI): <NEW_LINE> <INDENT> def __init__(self, parameter): <NEW_LINE> <INDENT> super(StringUI, self).__init__(parameter) <NEW_LINE> self.value.textEdited.connect(self.parameter.push_value)
The String is a Text based UI that display a string
625990353eb6a72ae038b79b
class SSH: <NEW_LINE> <INDENT> def __init__(self, ssh_keyfile): <NEW_LINE> <INDENT> self._ssh_keyfile = ssh_keyfile <NEW_LINE> <DEDENT> def connect(self, instance): <NEW_LINE> <INDENT> client = sshclient.SSHClient() <NEW_LINE> client.set_missing_host_key_policy(sshclient.AutoAddPolicy()) <NEW_LINE> client.connect(insta...
SSH client to communicate with instances.
62599035c432627299fa412b
class FakeFunction(_ReturnValues): <NEW_LINE> <INDENT> def __init__(self, name, code, func_globals = {}, varnames = None) : <NEW_LINE> <INDENT> _ReturnValues.__init__(self) <NEW_LINE> self.func_name = self.__name__ = name <NEW_LINE> self.func_doc = self.__doc__ = "ignore" <NEW_LINE> self.func_code = FakeCode(code, va...
This is a holder class for turning non-scoped code (for example at module-global level, or generator expressions) into a function. Pretends to be a normal callable and can be used as constructor argument to L{Function}
62599035d99f1b3c44d067d7
class PersonalityList(generics.ListAPIView): <NEW_LINE> <INDENT> model = Personality <NEW_LINE> queryset = Personality.objects.all() <NEW_LINE> serializer_class = PersonalitySerializer <NEW_LINE> authentication_classes = (JSONWebTokenAuthentication,) <NEW_LINE> permission_classes = ( permissions.IsAdminUser, )
https://themoviebook.herokuapp.com/movies/personalities/
62599035ac7a0e7691f7361c
class Solution(): <NEW_LINE> <INDENT> def dailyTemperatures(self, T): <NEW_LINE> <INDENT> nxt = [float('inf')] * 102 <NEW_LINE> ans = [0] * len(T) <NEW_LINE> for i in range(len(T) - 1, -1, -1): <NEW_LINE> <INDENT> warmer_index = min(nxt[t] for t in range(T[i]+1, 102)) <NEW_LINE> if warmer_index < float('inf'): <NEW_LIN...
从后向前遍历,时O(nm),m是温度范围长度
62599035b57a9660fecd2bb2
class CodeGenerationStage(Stage): <NEW_LINE> <INDENT> def __init__(self, control): <NEW_LINE> <INDENT> super().__init__(control) <NEW_LINE> <DEDENT> def command_line_args(self, args): <NEW_LINE> <INDENT> self.control.stage('CompilerConfigurationStage').emitters.command_line_args(args) <NEW_LINE> <DEDENT> def command_li...
Code Generation Stage * Generates code for the given firmware backend * Backend is selected in the Compiler Configuration Stage * Uses the specified emitter to generate the code
625990354e696a045264e6bc
class GetCompanyFilingsResultSet(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 GetCompanyFilings Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
625990358c3a8732951f768d
class NeuralBagOfWordsModel(model.TFModel): <NEW_LINE> <INDENT> def __init__(self, config, vocab, label_space_size): <NEW_LINE> <INDENT> super(NeuralBagOfWordsModel, self).__init__(config, vocab, label_space_size) <NEW_LINE> self.notes = tf.placeholder(tf.int32, [config.batch_size, None], name='notes') <NEW_LINE> self....
A neural bag of words model.
6259903516aa5153ce401621
class DataObject(object): <NEW_LINE> <INDENT> def __init__(self, C, ID): <NEW_LINE> <INDENT> self.C = C <NEW_LINE> self.ID = ID <NEW_LINE> self.U = self <NEW_LINE> self.D = self <NEW_LINE> self.L = self <NEW_LINE> self.R = self
Describes a data object in the Dancing Links algorithm.
6259903507d97122c4217dd9
class EELandsat(object): <NEW_LINE> <INDENT> def list(self, bounds): <NEW_LINE> <INDENT> bbox = ee.Feature.Rectangle( *[float(i.strip()) for i in bounds.split(',')]) <NEW_LINE> images = ee.ImageCollection('LANDSAT/LE7_L1T').filterBounds(bbox).getInfo() <NEW_LINE> if 'features' in images: <NEW_LINE> <INDENT> return [x['...
A helper for accessing Landsat 7 images.
62599035dc8b845886d546e8
class DownloadWindow(QDialog): <NEW_LINE> <INDENT> def __init__(self, url, version, win_parent=None): <NEW_LINE> <INDENT> self.win_parent = win_parent <NEW_LINE> self.url = url <NEW_LINE> self.version = version <NEW_LINE> QDialog.__init__(self, win_parent) <NEW_LINE> self.setWindowTitle('pyNastran Update') <NEW_LINE> s...
+-------------------+ | Legend Properties | +-----------------------+ | Title ______ Default | | Min ______ Default | | Max ______ Default | | Format ______ Default | | Scale ______ Default | | Number of Colors ____ | (TODO) | Number of Labels ____ | (TODO) | Label Size ____ | (TODO) | ...
625990353eb6a72ae038b79d
class SonosNodeServer(SimpleNodeServer): <NEW_LINE> <INDENT> controller = [] <NEW_LINE> speakers = [] <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> super(SimpleNodeServer, self).setup() <NEW_LINE> manifest = self.config.get('manifest',{}) <NEW_LINE> self.controller = SonosControl(self,'sonoscontrol','Sonos Control', ...
Sonos Node Server
62599035d6c5a102081e325c
class NGramModelSet(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, NGramModelSet, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, NGramModelSet, name) <NEW_LINE> __repr__ = _sw...
Proxy of C NGramModelSet struct.
6259903576d4e153a661db0c
class types: <NEW_LINE> <INDENT> server = String <NEW_LINE> port = Integer(optional=True, default=25) <NEW_LINE> user = String(optional=True, default=None) <NEW_LINE> password = String(optional=True, default=None) <NEW_LINE> local_hostname = String(optional=True, default=None)
Only the server is required; all other parameters are optionally.
62599035596a897236128dd4
class Habit(): <NEW_LINE> <INDENT> def __init__(self, config_obj, store): <NEW_LINE> <INDENT> self.config = config_obj <NEW_LINE> self.name = config_obj['name'] <NEW_LINE> self.tag = config_obj['tag'] <NEW_LINE> self.code = config_obj['name'] <NEW_LINE> self.store = store <NEW_LINE> <DEDENT> def per_interval(self): <NE...
Привычка
6259903571ff763f4b5e88d1
class Solution(object): <NEW_LINE> <INDENT> def func(self, n): <NEW_LINE> <INDENT> tmp = [] <NEW_LINE> def total(x): <NEW_LINE> <INDENT> for _ in range(2*x): tmp.append(['(', ')']) <NEW_LINE> from itertools import product <NEW_LINE> for i in product(*tmp): <NEW_LINE> <INDENT> yield i <NEW_LINE> <DEDENT> <DEDENT> res = ...
Solution description
62599035d53ae8145f91959b
class TestIO(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.path = os.path.dirname(os.path.abspath(__file__)) <NEW_LINE> self.file_ = 'pt_test_data.hdf5' <NEW_LINE> shutil.copy(os.path.join(self.path, self.file_), self.file_) <NEW_LINE> self.assertTrue(os.path.exists(self.file_)) <NEW...
Tests of the io module. **Testing Strategy** Input/Output values are compared to a reference.
6259903573bcbd0ca4bcb3bf
class PurchaseOrder(BaseModel): <NEW_LINE> <INDENT> STATUS = Choices((0, 'draft', ('Draft')), (1, 'assigned', ('Assigned')), (2, 'done', ('Done')), (3, 'cancelled', ('Cancelled')) ) <NEW_LINE> purchaser = models.ForeignKey(Facility, related_name='%(app_label)s_%(class)s_purchaser') <NEW_LINE> supplier = models.ForeignK...
PurchaseOrder: is used to place a formal request for supply of products listed in the purchase order lines by the purchasing facility(purchaser). it can be generated by the LMIS system, edited by the store manager or CCO then forwarded for the Supplying Facility
625990351d351010ab8f4c52
class EntryAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> fieldsets = [ ('Title', {'fields': ['headline']}), ('Content', {'fields': ['body_text']}), ]
fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': ['pub_date']}), ]
62599035cad5886f8bdc5917
class ExportStatistics(Operator, ExportHelper): <NEW_LINE> <INDENT> bl_idname = "export_stats.tofile" <NEW_LINE> bl_label = "Export statistics to file" <NEW_LINE> filename_ext = ".csv" <NEW_LINE> filter_glob: StringProperty( default="*.csv", options={'HIDDEN'}, maxlen=255, ) <NEW_LINE> groups: BoolProperty( name="add c...
This appears in the tooltip of the operator and in the generated docs
625990350a366e3fb87ddb1e
class ModelDefinitionException(NeomodelException): <NEW_LINE> <INDENT> def __init__(self, db_node_class, current_node_class_registry): <NEW_LINE> <INDENT> self.db_node_class = db_node_class <NEW_LINE> self.current_node_class_registry = current_node_class_registry
Abstract exception to handle error conditions related to the node-to-class registry.
6259903526068e7796d4da80
class vonmises_gen(rv_continuous): <NEW_LINE> <INDENT> def _rvs(self, b): <NEW_LINE> <INDENT> return mtrand.vonmises(0.0, b, size=self._size) <NEW_LINE> <DEDENT> def _pdf(self, x, b): <NEW_LINE> <INDENT> return exp(b*cos(x)) / (2*pi*special.i0(b)) <NEW_LINE> <DEDENT> def _cdf(self, x, b): <NEW_LINE> <INDENT> return von...
A Von Mises continuous random variable. %(before_notes)s Notes ----- If `x` is not in range or `loc` is not in range it assumes they are angles and converts them to [-pi, pi] equivalents. The probability density function for `vonmises` is:: vonmises.pdf(x, b) = exp(b*cos(x)) / (2*pi*I[0](b)) for ``-pi <= x <= ...
625990354e696a045264e6be
class Transformation(Getter): <NEW_LINE> <INDENT> name = None <NEW_LINE> arity = 1 <NEW_LINE> args = ['expression'] <NEW_LINE> def __init__(self, inner): <NEW_LINE> <INDENT> self.inner = inner <NEW_LINE> <DEDENT> def get(self, raw_doc): <NEW_LINE> <INDENT> inner_values = self.inner.get(raw_doc) <NEW_LINE> assert isinst...
A transformation on a value from another Getter.
62599035d4950a0f3b1116db
class FieldComparatorExactString(FieldComparator): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> FieldComparator.__init__(self, kwargs) <NEW_LINE> self.log() <NEW_LINE> <DEDENT> def compare(self, val1, val2): <NEW_LINE> <INDENT> if (val1 in self.missing_values) or (val2 in self.missing_values): ...
A field comparator based on exact string comparison.
625990358e05c05ec3f6f6f7
class ChangInShareOfOwnerEquitiInSu(HandleIndexContent): <NEW_LINE> <INDENT> def __init__(self, stk_cd_id, acc_per, indexno, indexcontent): <NEW_LINE> <INDENT> super(ChangInShareOfOwnerEquitiInSu, self).__init__(stk_cd_id, acc_per, indexno, indexcontent) <NEW_LINE> <DEDENT> def recognize(self): <NEW_LINE> <INDENT> inde...
在子公司所有者权益份额发生变化的情况说明
62599035d18da76e235b79eb
class PredictionQueryTag(Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'min_threshold': {'readonly': True}, 'max_threshold': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'min_threshold': {'key': 'minThreshold', 'type': 'float'}, 'max_threshold': {'key':...
PredictionQueryTag. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: :vartype id: str :ivar min_threshold: :vartype min_threshold: float :ivar max_threshold: :vartype max_threshold: float
6259903521bff66bcd723d9f
class FindOverlapInOneLayer(QgsProcessingAlgorithm): <NEW_LINE> <INDENT> INPUT = 'INPUT' <NEW_LINE> OUTPUT = 'OUTPUT' <NEW_LINE> TABLE = 'TABLE' <NEW_LINE> PRIMARY_KEY = 'PRIMARY_KEY' <NEW_LINE> def tr(self, string): <NEW_LINE> <INDENT> return QCoreApplication.translate('Processing', string) <NEW_LINE> <DEDENT> def cre...
This is an example algorithm that takes a vector layer and creates a new identical one. It is meant to be used as an example of how to create your own algorithms and explain methods and variables used to do it. An algorithm like this will be available in all elements, and there is not need for additional work. All Pr...
62599035711fe17d825e1538
class BitSet(object): <NEW_LINE> <INDENT> __slots__ = ('capacity', 'integers') <NEW_LINE> def __init__(self, capacity): <NEW_LINE> <INDENT> true_capacity = math.ceil(capacity / 32) <NEW_LINE> self.capacity = capacity <NEW_LINE> self.integers = [0] * true_capacity <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDEN...
The BitSet class. Args: capacity (number): Capacity of the bitset.
62599035a8ecb03325872357
@register_cmd("echo") <NEW_LINE> class Echo(BaseCommand): <NEW_LINE> <INDENT> def __init__(self, args=[]): <NEW_LINE> <INDENT> super(Echo, self).__init__() <NEW_LINE> self.args = args <NEW_LINE> <DEDENT> def call(self,*args,**kwargs): <NEW_LINE> <INDENT> input_generator = self.get_input_generator() <NEW_LINE> def outpu...
Echoes anything from the command line arguments as well as input from the previous command.
6259903566673b3332c3152d
class IwatchedVariablesBox(Interface): <NEW_LINE> <INDENT> pass
This view will allow the user to enter custom variables to be watched through the execution of the debugger.
6259903594891a1f408b9f96
class SpeechServiceStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.ListenSpeechEvent = channel.unary_stream( '/speechService.SpeechService/ListenSpeechEvent', request_serializer=speech__pb2.ListenSpeechEventRequest.SerializeToString, response_deserializer=speech__pb2.ListenSpeech...
speechService.SpeechService 语音服务 开发管理平台功能参考: http://10.10.10.2/speech
625990358c3a8732951f7692
class BitmapShape(RectangleShape): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> RectangleShape.__init__(self, 100, 50) <NEW_LINE> self._filename = "" <NEW_LINE> <DEDENT> def OnDraw(self, dc): <NEW_LINE> <INDENT> if not self._bitmap.IsOk(): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> x = self._xpos - s...
The :class:`BitmapShape` class draws a bitmap (non-resizable).
6259903526238365f5fadc8d
class MarkupPreview(View): <NEW_LINE> <INDENT> http_method_names = ['post'] <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> markup_type = self.request.POST.get('markup_type') <NEW_LINE> if not markup_type: <NEW_LINE> <INDENT> return HttpResponse("", content_type='text/html') <NEW_LINE> <DEDENT>...
Renders markup content to HTML for preview purposes.
6259903573bcbd0ca4bcb3c1
class ScriptProblemTypeTestNonRandomized(ScriptProblemTypeBase, NonRandomizedProblemTypeTestMixin): <NEW_LINE> <INDENT> shard = 8 <NEW_LINE> def get_problem(self): <NEW_LINE> <INDENT> return XBlockFixtureDesc( 'problem', self.problem_name, data=self.factory.build_xml(**self.factory_kwargs), metadata={'rerandomize': 'ne...
Tests for non-randomized Script problem
625990356e29344779b0178b
class ThreadLocals(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> _thread_locals.user = getattr(request, 'user', None) <NEW_LINE> _thread_locals.logs = {} <NEW_LINE> _thread_locals.entrys = {}
Middleware that gets various objects from the request object and saves them in thread local storage.
6259903576d4e153a661db0e
class OpenLatchImpl(AbstractCommandImpl[OpenLatchParams, OpenLatchResult]): <NEW_LINE> <INDENT> def __init__(self, **kwargs: object) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> async def execute(self, params: OpenLatchParams) -> OpenLatchResult: <NEW_LINE> <INDENT> raise NotImplementedError("Heater-Shaker ope...
Execution implementation of a Heater-Shaker's open latch command.
62599035b57a9660fecd2bb6
class PyErrorLog(_BaseErrorLog): <NEW_LINE> <INDENT> def copy(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def log(self, log_entry, message, *args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def receive(self, log_entry): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self, logger_n...
PyErrorLog(self, logger_name=None, logger=None) A global error log that connects to the Python stdlib logging package. The constructor accepts an optional logger name or a readily instantiated logger instance. If you want to change the mapping between libxml2's ErrorLevels and Python logging level...
625990354e696a045264e6bf
class OracleTypeSource(OraclePLSQLSource): <NEW_LINE> <INDENT> pass
Source code of type
62599035d10714528d69ef29
class InValidator(BaseValidator): <NEW_LINE> <INDENT> code = 'in_validator' <NEW_LINE> message = _('The selected {key} is invalid.') <NEW_LINE> def __init__(self, *choices): <NEW_LINE> <INDENT> super(InValidator, self).__init__() <NEW_LINE> self.choices = {choice.lower() for choice in choices} <NEW_LINE> <DEDENT> def c...
Check if the value is in the choices list.
62599035711fe17d825e1539
class ErrorDetails(BaseModel): <NEW_LINE> <INDENT> model_types = { 'request_id': 'str', '_date': 'datetime' } <NEW_LINE> attribute_map = { 'request_id': 'requestId', '_date': 'date' } <NEW_LINE> def __init__(self, request_id=None, _date=None): <NEW_LINE> <INDENT> self._request_id = None <NEW_LINE> self.__date = None <N...
Attributes: model_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition.
6259903594891a1f408b9f97
class InlineOffset(Block): <NEW_LINE> <INDENT> def __init__(self, joints, name='offset', controlShape=Ctrl.ARROWS4, **kwargs): <NEW_LINE> <INDENT> super(InlineOffset,self).__init__(name=name,controlShape=controlShape, **kwargs) <NEW_LINE> if type(joints) != list: <NEW_LINE> <INDENT> joints = [joints] <NEW_LINE> <DEDEN...
Inserts control shapes into the scene hierarchy above the given jnts.
62599035be8e80087fbc01ba
class InlineResponse20032Payload(object): <NEW_LINE> <INDENT> swagger_types = { 'colour_code': 'ColourCode', 'percent_of_total': 'float', 'minutes': 'float' } <NEW_LINE> attribute_map = { 'colour_code': 'colour_code', 'percent_of_total': 'percent_of_total', 'minutes': 'minutes' } <NEW_LINE> def __init__(self, colour_co...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62599035287bf620b6272d24
class IPv4If(_IpBase): <NEW_LINE> <INDENT> def __init__(self, logger): <NEW_LINE> <INDENT> version = IpVersion.kIPv4 <NEW_LINE> _IpBase.__init__(self, logger, version)
An IPv4 network object.
62599035d164cc61758220af
class FunctionCacheKey(trace.TraceType): <NEW_LINE> <INDENT> def __init__(self, function_signature: trace.TraceType, call_context: ExecutionContext): <NEW_LINE> <INDENT> self.function_signature = function_signature <NEW_LINE> self.call_context = call_context <NEW_LINE> <DEDENT> def is_subtype_of(self, other: trace.Trac...
The unique key associated with a concrete function. Attributes: function_signature: A TraceType corresponding to the function arguments. call_context: The ExecutionContext for when the function_signature was generated.
625990353eb6a72ae038b7a3
class BlockchainDB(JSBASE): <NEW_LINE> <INDENT> def __init__(self, name, db): <NEW_LINE> <INDENT> JSBASE.__init__(self) <NEW_LINE> self.name <NEW_LINE> self.db
a blockchain modeled on a DB
62599035d99f1b3c44d067df
class muglue(glue): <NEW_LINE> <INDENT> units = ['m']
Class used for muglue values
6259903576d4e153a661db0f
class _FinalStateViaOption(str, Enum): <NEW_LINE> <INDENT> AZURE_ASYNC_OPERATION_FINAL_STATE = "azure-async-operation" <NEW_LINE> LOCATION_FINAL_STATE = "location" <NEW_LINE> OPERATION_LOCATION_FINAL_STATE = "operation-location"
Possible final-state-via options.
62599035d6c5a102081e3261
class SetupBasicTests(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.console = logging.StreamHandler() <NEW_LINE> cls.console.setLevel(logging.INFO) <NEW_LINE> logger.addHandler(cls.console) <NEW_LINE> logger.info('Running unit tests for main routine ..') <N...
Sets up unit tests for basic helper routines inside lib
62599035ac7a0e7691f73624
class HermitePoly: <NEW_LINE> <INDENT> def __init__(self, N, mu=0, sig=1): <NEW_LINE> <INDENT> self.mu = mu <NEW_LINE> self.sig = sig <NEW_LINE> self.N = N <NEW_LINE> self.C = np.zeros((N, N)) <NEW_LINE> h_coefs(self.C, N) <NEW_LINE> h_normalize(self.C, N) <NEW_LINE> <DEDENT> def __call__(self, i, x): <NEW_LINE> <INDEN...
The purpose of this class is to provide fast evaluations of the form h_i(x) where h_i is the i-th normalized probabilist's Hermite polynomial. The evaluations are vectorized. The class also provides a function to evaluate the inner product \int f(x) h_i(x) \pi(x) dx where f is a supplied function and \pi i...
6259903530c21e258be99949
class NotInterestedMessage(BasePeerMessage): <NEW_LINE> <INDENT> pass
Format: <len=0001><id=3>
625990358a349b6b4368737c
class HelloWorld: <NEW_LINE> <INDENT> def index(self): <NEW_LINE> <INDENT> return "Hello world!" <NEW_LINE> <DEDENT> index.exposed = True
Sample request handler class.
62599035507cdc57c63a5ed7
class KitchenDot(pydot.Dot): <NEW_LINE> <INDENT> def __init__(self, *argsl, **argsd): <NEW_LINE> <INDENT> super(KitchenDot, self).__init__(*argsl, **argsd) <NEW_LINE> self.p = None <NEW_LINE> <DEDENT> def create(self, prog=None, format='ps'): <NEW_LINE> <INDENT> if prog is None: <NEW_LINE> <INDENT> prog = self.prog <NE...
Inherits from the pydot library Dot class, and makes the subprocess as an attribute for being killed from outside
6259903521bff66bcd723da3
class AbstractProvider: <NEW_LINE> <INDENT> __type__ = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.env_resolver = EnvVarResolver() <NEW_LINE> self.shell_exec = None <NEW_LINE> self.git_exec = None <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def deploy_by_git_push(self, app, env): <NEW_LINE> <INDENT>...
Classe abstrata que define o que um provider precisa ter implementado para possibilitar o deploy de aplicações.
6259903594891a1f408b9f98
class Votes(models.Model): <NEW_LINE> <INDENT> project = models.ForeignKey('app_projects.Project') <NEW_LINE> user = models.ForeignKey('app_users.UserProfile')
Model for a `Vote`, a many-to-many relationship between projects (:class:`app_projects.models.Project`) and users (:class:`app_users.models.UserProfile`) :project: the project of interest :users: the users that have voted the project
62599035287bf620b6272d26
class _NeuralNetwork(NeuralNetwork): <NEW_LINE> <INDENT> def _forward(self, input_data, weights): <NEW_LINE> <INDENT> batch_size = input_data.shape[0] if input_data is not None else 1 <NEW_LINE> return np.zeros((batch_size, *self.output_shape)) <NEW_LINE> <DEDENT> def _backward(self, input_data, weights): <NEW_LINE> <I...
Dummy implementation to test the abstract neural network class.
62599035d6c5a102081e3263
class SysterUser(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User) <NEW_LINE> country = CountryField(blank=True, null=True) <NEW_LINE> blog_url = models.URLField(max_length=255, blank=True) <NEW_LINE> homepage_url = models.URLField(max_length=255, blank=True) <NEW_LINE> profile_picture = models.Image...
Profile model to store additional information about a user
625990351d351010ab8f4c58
class GdkCursor( gobject__GObject.GObject): <NEW_LINE> <INDENT> def __init__( self, cursor_type, obj = None): <NEW_LINE> <INDENT> if obj: self._object = obj <NEW_LINE> else: <NEW_LINE> <INDENT> libgtk3.gdk_cursor_new.restype = POINTER(c_void_p) <NEW_LINE> libgtk3.gdk_cursor_new.argtypes = [GdkCursorType] <NEW_LINE> se...
Class GdkCursor Constructors
62599035cad5886f8bdc591a
class CppPIDController(pm.CppBase, pm.Controller): <NEW_LINE> <INDENT> public_settings = OrderedDict([ ("Kp", st.Kp), ("Ti", st.Ti), ("Td", st.Td), ("dt [s]", 0.1), ("output_limits", st.limits_ctrl), ("input_state", st.input_ctrl), ("tick divider", 1), ]) <NEW_LINE> def __init__(self, settings): <NEW_LINE> <INDENT> set...
PID Controller implemented in cpp with pybind11
62599035b57a9660fecd2bb9
class ButtonMappingButton(ButtonMappingKey): <NEW_LINE> <INDENT> def __init__(self, name, id_num, joy_name): <NEW_LINE> <INDENT> super(ButtonMappingButton, self).__init__(name, id_num) <NEW_LINE> self.joy_device_name = joy_name <NEW_LINE> self.map_type = con.BUTTON_MAP_BUTTON <NEW_LINE> <DEDENT> def get_json(self): <NE...
This Mapping subclass corresponds to a button on an associated USB joystick device and is used to yield input for the controllers.Button object
6259903530c21e258be9994a
class RPCCoverage(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.dir = tempfile.mkdtemp(prefix="coverage") <NEW_LINE> self.flag = '--coveragedir=%s' % self.dir <NEW_LINE> <DEDENT> def report_rpc_coverage(self): <NEW_LINE> <INDENT> uncovered = self._get_uncovered_rpc_commands() <NEW_LINE> if u...
Coverage reporting utilities for pull-tester. Coverage calculation works by having each test script subprocess write coverage files into a particular directory. These files contain the RPC commands invoked during testing, as well as a complete listing of RPC commands per `aethercoin-cli help` (`rpc_interface.txt`). A...
62599035b830903b9686ed18
class XnatProject(Base): <NEW_LINE> <INDENT> def __init__(self, rest_client, project_id, project_name, secondary_id, description): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.rest_client = rest_client <NEW_LINE> self.project_id = project_id <NEW_LINE> self.project_name = project_name <NEW_LINE> self.secondar...
Describes an XNAT project
625990358c3a8732951f7697
class XmlProcessingError(Exception): <NEW_LINE> <INDENT> _filename = None <NEW_LINE> _line = None <NEW_LINE> _col = None <NEW_LINE> def __init__(self, msg, node=None): <NEW_LINE> <INDENT> super(XmlProcessingError, self).__init__() <NEW_LINE> self._msg = msg <NEW_LINE> if node and hasattr(node, "parse_position"): <NEW_L...
Exception thrown on parsing errors
6259903516aa5153ce40162b
class CrossHairWidget: <NEW_LINE> <INDENT> def __init__(self, profile=0, radius=2): <NEW_LINE> <INDENT> if not radius: <NEW_LINE> <INDENT> self.radius = Globals.renderProps["sphereSize"] * 1.1 <NEW_LINE> <DEDENT> else: self.radius = radius <NEW_LINE> self.z = 0 <NEW_LINE> self.data = vtk.vtkPolyData() <NEW_LINE> self.s...
navigation cursor the coordinates of this actor will be in 2D, i.e. the last coordinate will always be zero
62599035b57a9660fecd2bba
class Tweet(Base): <NEW_LINE> <INDENT> __tablename__ = "tweet" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> text = Column(String(length=500)) <NEW_LINE> lon = Column(Float()) <NEW_LINE> lat = Column(Float()) <NEW_LINE> retweet_count = Column(Integer()) <NEW_LINE> tweet_id = Column(String(20)) <NEW_LINE>...
Table, that stores following information about tweet: ["text"], ["coordinates"] -> [lon][lat], ["retweet_count"], ["id"], ["created_at"], ["user"]["id"].
6259903582261d6c52730763
class ResultError(RemouladeError): <NEW_LINE> <INDENT> pass
Base class for result errors.
6259903571ff763f4b5e88d9
class Mpileaks(AutotoolsPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/hpc/mpileaks" <NEW_LINE> url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz" <NEW_LINE> version('1.0', '8838c574b39202a57d7c2d68692718aa') <NEW_LINE> depends_on('mpi') <NEW_LINE> depends_on('adept-ut...
Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes.
62599035d164cc61758220b3
class NeuralNetwork: <NEW_LINE> <INDENT> ParametersContainer = namedtuple("ParametersContainer", ["alpha"]) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.__layer_list = list() <NEW_LINE> self.__network_parameters = None <NEW_LINE> <DEDENT> def add_layer(self, layer_to_add): <NEW_LINE> <INDENT> self.__layer_li...
Class used as neural network. To create instance of this class use :class:`NeuralNetworkDirector`.
62599035c432627299fa4137
class ProxyAuthenticationRequired(ClientError): <NEW_LINE> <INDENT> status_code = 407 <NEW_LINE> status_phrase = "Proxy Authentication Required"
This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy.
625990353eb6a72ae038b7a7
class ExcelDataReader(object): <NEW_LINE> <INDENT> __pasta = os.path.dirname(os.path.abspath(__file__)).split("xlsxreader")[0] <NEW_LINE> def __init__(self, arquivo_excel, l1, usecols=()): <NEW_LINE> <INDENT> self.arquivo = arquivo_excel <NEW_LINE> self.usecols = usecols <NEW_LINE> self.l1 = l1 <NEW_LINE> <DEDENT> @pro...
Objeto para leitura e parseamento de arquivos do excel
62599035287bf620b6272d29
class CmdEntity(CmdPositioner): <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <INDENT> CmdPositioner.__init__(self, connection, b"entity") <NEW_LINE> <DEDENT> def getName(self, id): <NEW_LINE> <INDENT> return self.conn.sendReceive(b"entity.getName", id)
Methods for entities
6259903576d4e153a661db11
class Tree(object): <NEW_LINE> <INDENT> def __init__(self, namespace='', access_key=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _NormalizeDirectoryPath(path): <NEW_LINE> <INDENT> if path and path[-1] != '/': <NEW_LINE> <INDENT> return path + '/' <NEW_LINE> <DEDENT> return path <NEW_...
An abstract base class for accessing a tree of files. At minimum subclasses must implement GetFileContents() and HasFile(). Additionally, mutable trees should override IsMutable() to return True and provide implementations of SetFile() and Clear().
62599035ec188e330fdf99d5
class conv_ln(LayerMaster): <NEW_LINE> <INDENT> def __init__(self, rng, trng, n_in, n_out, n_batches, activation, old_weights=None,go_backwards=False): <NEW_LINE> <INDENT> self.go_backwards = go_backwards <NEW_LINE> self.activation = activation <NEW_LINE> self.rng = rng <NEW_LINE> self.trng = trng <NEW_LINE> if old_wei...
Hyperbolic tangent or rectified linear unit layer
62599035d6c5a102081e3266
class urlopenNetworkTests(unittest.TestCase): <NEW_LINE> <INDENT> def urlopen(self, *args): <NEW_LINE> <INDENT> return _open_with_retry(urllib.request.urlopen, *args) <NEW_LINE> <DEDENT> def test_basic(self): <NEW_LINE> <INDENT> open_url = self.urlopen("http://www.python.org/") <NEW_LINE> for attr in ("read", "readline...
Tests urllib.reqest.urlopen using the network. These tests are not exhaustive. Assuming that testing using files does a good job overall of some of the basic interface features. There are no tests exercising the optional 'data' and 'proxies' arguments. No tests for transparent redirection have been written. setUp ...
625990356fece00bbacccaea
class GenericSH(BaseSH): <NEW_LINE> <INDENT> PROG = None <NEW_LINE> def highlightBlock(self, text): <NEW_LINE> <INDENT> text = str(text) <NEW_LINE> self.setFormat(0, len(text), self.formats["normal"]) <NEW_LINE> match = self.PROG.search(text) <NEW_LINE> index = 0 <NEW_LINE> while match: <NEW_LINE> <INDENT> for key, val...
Generic Syntax Highlighter
6259903563f4b57ef0086613
class Node(object): <NEW_LINE> <INDENT> def __init__(self, val, priority): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> self.priority = priority <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.priority == other.priority <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> retur...
Node for use in a Priority Queue.
6259903530c21e258be9994c
class Montage(object): <NEW_LINE> <INDENT> def __init__(self, pos, ch_names, kind, selection): <NEW_LINE> <INDENT> self.pos = pos <NEW_LINE> self.ch_names = ch_names <NEW_LINE> self.kind = kind <NEW_LINE> self.selection = selection <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> s = '<Montage | %s - %d Chan...
Montage for EEG cap Montages are typically loaded from a file using read_montage. Only use this class directly if you're constructing a new montage. Parameters ---------- pos : array, shape (n_channels, 3) The positions of the channels in 3d. ch_names : list The channel names. kind : str The type of monta...
6259903573bcbd0ca4bcb3c8
class ReservableResource(BaseResource): <NEW_LINE> <INDENT> def __init__(self, name, sync, flag=None): <NEW_LINE> <INDENT> super(ReservableResource, self).__init__(name, flag=flag) <NEW_LINE> self.sync = sync
Describe a reservable resource.
62599035d10714528d69ef2c
class ImageHarbor(object): <NEW_LINE> <INDENT> def __init__(self, harbor_url, username=None, password=None, api_version='v2', cacert=None, insecure=False, ): <NEW_LINE> <INDENT> self.username = username <NEW_LINE> self.password = password <NEW_LINE> self.harbor_url = harbor_url <NEW_LINE> self.api_version = api_version...
处理harbor请求
625990358c3a8732951f7699
class ItemQueueProducer(QueueProducer): <NEW_LINE> <INDENT> def __init__(self, queue_object): <NEW_LINE> <INDENT> super(ItemQueueProducer, self).__init__(queue_object) <NEW_LINE> self._number_of_produced_items = 0 <NEW_LINE> <DEDENT> @property <NEW_LINE> def number_of_produced_items(self): <NEW_LINE> <INDENT> return se...
Class that implements an item queue producer. The producer generates updates on the queue.
6259903516aa5153ce40162d
class EnumConverter: <NEW_LINE> <INDENT> def __init__(self, enum: Type[Enum]): <NEW_LINE> <INDENT> self._enum = enum <NEW_LINE> <DEDENT> def loads(self, value: Any) -> Enum: <NEW_LINE> <INDENT> return self._enum(value) <NEW_LINE> <DEDENT> def dumps(self, value: Enum) -> Any: <NEW_LINE> <INDENT> if not isinstance(value,...
Convert values to and from an enum.
625990351d351010ab8f4c5b
class SpinneretResource(Resource, object): <NEW_LINE> <INDENT> def _adaptToResource(self, result): <NEW_LINE> <INDENT> if result is None: <NEW_LINE> <INDENT> return NotFound() <NEW_LINE> <DEDENT> renderable = IRenderable(result, None) <NEW_LINE> if renderable is not None: <NEW_LINE> <INDENT> return _RenderableResource(...
Web resource convenience base class. Child resource location is done by `SpinneretResource.locateChild`, which gives a slightly higher level interface than `IResource.getChildWithDefault <twisted:twisted.web.resource.IResource.getChildWithDefault>`.
6259903521bff66bcd723da7
class Texture(Structure): <NEW_LINE> <INDENT> _fields_ = [ ("mWidth", c_uint), ("mHeight", c_uint), ("achFormatHint", c_char*9), ("pcData", POINTER(Texel)), ("mFilename", String), ]
See 'texture.h' for details.
62599035dc8b845886d546f3
class RenderNoeud(ecs.System): <NEW_LINE> <INDENT> def __init__(self, canvas): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.canvas=canvas <NEW_LINE> <DEDENT> def init(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def update(self, dt): <NEW_LI...
Systeme pour le rendering des noeuds via coloriage.
62599035796e427e5384f8bc
class Plagiarist(object): <NEW_LINE> <INDENT> def observe(self, document): <NEW_LINE> <INDENT> raise NotImplementedError()
Given a sequence of documents, produce scores indicating how much "plagiarism" (i.e. how many ideas were borrowed) from each of the preceding documents. Note that getting a high score doesn't really mean there was plagiarism since citations, etc. are not analyzed.
62599035e76e3b2f99fd9b4d
class Question(models.Model): <NEW_LINE> <INDENT> question_text = models.CharField(max_length=200) <NEW_LINE> pub_date = models.DateTimeField('date published') <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.question_text <NEW_LINE> <DEDENT> def was_published_recently(self): <NEW_LINE> <INDENT> return sel...
The Question model contains three fields: question_text: to input text for question_text pub_date: uses date time to designate data/time. IF USED, PLEASE IMPORT timezone
62599035507cdc57c63a5edb
@req_cmd(Roundup) <NEW_LINE> class _GetItemRequest(Multicall): <NEW_LINE> <INDENT> def __init__(self, *, ids, fields=None, **kw): <NEW_LINE> <INDENT> super().__init__(command='display', **kw) <NEW_LINE> if ids is None: <NEW_LINE> <INDENT> raise ValueError(f'No {self.service.item.type} ID(s) specified') <NEW_LINE> <DEDE...
Construct an item request.
62599035287bf620b6272d2b
class Conda(PythonEnvironment): <NEW_LINE> <INDENT> def venv_path(self): <NEW_LINE> <INDENT> return os.path.join(self.project.doc_path, 'conda', self.version.slug) <NEW_LINE> <DEDENT> def setup_base(self): <NEW_LINE> <INDENT> conda_env_path = os.path.join(self.project.doc_path, 'conda') <NEW_LINE> version_path = os.pat...
A Conda_ environment. .. _Conda: https://conda.io/docs/
62599035be383301e0254956
class UserProfile(models.Model): <NEW_LINE> <INDENT> website = models.URLField(default="", verify_exists=False, max_length=news_settings.NEWS_MAX_URL_LENGTH) <NEW_LINE> comment_points = models.IntegerField(default=0) <NEW_LINE> user = models.ForeignKey(User, unique=True) <NEW_LINE> date_created = models.DateTimeField(d...
This is a profile to a user. It is intrinsically linked to django's default User model. This UserProfile holds additional info about the user.
62599036cad5886f8bdc591c
class DescribeAIAnalysisTemplatesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.AIAnalysisTemplateSet = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.get(...
DescribeAIAnalysisTemplates返回参数结构体
62599036b57a9660fecd2bbd