code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class DescriptionWindow(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{DAD5408A-CE79-4C22-9225-185C0F1D2F7B}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{C0FC1503-7E6F-11D2-AABF-00C04FA375F1}', 10, 2)
Provides access to memebers of DescriptionWindow.
6259906216aa5153ce401bbf
class Declare(Basic): <NEW_LINE> <INDENT> __slots__ = ('_dtype','_variable','_intent','_value', '_static','_passed_from_dotted', '_external', '_module_variable') <NEW_LINE> _attribute_nodes = ('_variable', '_value') <NEW_LINE> def __init__( self, dtype, variable, intent=None, value=None, static=False, passed_from_dotte...
Represents a variable declaration in the code. Parameters ---------- dtype : DataType The type for the declaration. variable(s) A single variable or an iterable of Variables. If iterable, all Variables must be of the same type. intent: None, str one among {'in', 'out', 'inout'} value: PyccelAstNode ...
6259906201c39578d7f142a6
class Solution(object): <NEW_LINE> <INDENT> def reverseKGroup(self, head, k): <NEW_LINE> <INDENT> dummy = ListNode() <NEW_LINE> curr_dummy = dummy <NEW_LINE> curr_dummy.next = head <NEW_LINE> ptr = head <NEW_LINE> while ptr: <NEW_LINE> <INDENT> stack = [] <NEW_LINE> for i in range(k): <NEW_LINE> <INDENT> if ptr: <NEW_L...
stack: use stack to reverse list time: O(n) space: O(k)
62599062796e427e5384fe59
class TrelloAPI(object): <NEW_LINE> <INDENT> def __init__(self, stats, config): <NEW_LINE> <INDENT> self.stats = stats <NEW_LINE> self.key = config['apikey'] <NEW_LINE> self.token = config['token'] <NEW_LINE> self.username = config['user'] if "user" in config else "me" <NEW_LINE> self.board_links = split(config['board_...
Trello API
62599062460517430c432bc5
class WorkspaceWidgetTest(GuiTest): <NEW_LINE> <INDENT> def test_widget_creation(self): <NEW_LINE> <INDENT> widget = WorkspaceTreeWidget() <NEW_LINE> self.assertTrue(widget is not None) <NEW_LINE> sip.delete(widget)
Minimal testing as it is exported from C++
625990628e7ae83300eea771
class GCSPersistor(Persistor): <NEW_LINE> <INDENT> def __init__(self, bucket_name): <NEW_LINE> <INDENT> from google.cloud import storage <NEW_LINE> super(GCSPersistor, self).__init__() <NEW_LINE> self.storage_client = storage.Client() <NEW_LINE> self._ensure_bucket_exists(bucket_name) <NEW_LINE> self.bucket_name = buck...
Store models on Google Cloud Storage. Fetches them when needed, instead of storing them on the local disk.
62599062fff4ab517ebcef0a
class loadCode(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.enabled = False <NEW_LINE> self.checked = False <NEW_LINE> <DEDENT> def onClick(self): <NEW_LINE> <INDENT> codhoja = "{}{}{}".format(getRow.value, getCol.value, getQuad.value) <NEW_LINE> if getRow.enabled: <NEW_LINE> <INDENT> getRo...
Implementation for addin_addin.loadCode (Button)
62599062be8e80087fbc076a
class SendMessageGeoLocationAction(TLObject): <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> ID = 0x176f8ba1 <NEW_LINE> QUALNAME = "types.SendMessageGeoLocationAction" <NEW_LINE> def __init__(self, ): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(b: BytesIO, *args) -> "SendMessageGeoLoca...
Attributes: LAYER: ``112`` Attributes: ID: ``0x176f8ba1`` No parameters required.
6259906244b2445a339b74d2
class ApplicationGatewaySslPredefinedPolicy(SubResource): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str...
An Ssl predefined policy. :param id: Resource ID. :type id: str :param name: Name of the Ssl predefined policy. :type name: str :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application gateway. :type cipher_suites: list[str or ~azure.mgmt.network.v2021_02_01.models.ApplicationGate...
62599062f548e778e596cc6d
class HistoryPage(Page): <NEW_LINE> <INDENT> def __init__(self, driver): <NEW_LINE> <INDENT> Page.__init__(self, driver) <NEW_LINE> self.driver = driver <NEW_LINE> self._history_dialog = (By.XPATH, '//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[3]') <NEW_LINE> <DEDENT> @property <NEW_LINE> def...
ABP native dialog object which opened when user click on middle bottom button
625990627d847024c075dab9
class InputContactMessageContent(BaseType): <NEW_LINE> <INDENT> def __init__(self, phone_number, first_name, last_name=None, vcard=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.phone_number = phone_number <NEW_LINE> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.vcard...
Represents the content of a contact message to be sent as the result of an inline query. Parameters ---------- phone_number : String Contact's phone number first_name : String Contact's first name last_name : String, optional Contact's last name vcard : String, optional Additional data about the co...
6259906232920d7e50bc772b
class Resize(object): <NEW_LINE> <INDENT> def __init__(self, output_size): <NEW_LINE> <INDENT> assert isinstance(output_size, (int, tuple)) <NEW_LINE> if isinstance(output_size, int): <NEW_LINE> <INDENT> self.output_size = (output_size,output_size) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.output_size = output...
Rescale the image in a sample to a given size. Args: output_size (tuple or int): Desired output size. If tuple, output is matched to output_size. If int, smaller of image edges is matched to output_size keeping aspect ratio the same.
6259906266673b3332c31ae1
class RunScriptTest(cros_test_lib.MockTempDirTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.stats_module_mock = stats_unittest.StatsModuleMock() <NEW_LINE> self.StartPatcher(self.stats_module_mock) <NEW_LINE> self.PatchObject(cros, '_RunSubCommand', autospec=True) <NEW_LINE> <DEDENT> def testS...
Test the main functionality.
6259906256ac1b37e6303859
class UnreachableRepositoryURLDetected(TwineException): <NEW_LINE> <INDENT> pass
An upload attempt was detected to a URL without a protocol prefix. All repository URLs must have a protocol (e.g., ``https://``).
62599062442bda511e95d8cc
class Attachment(EmbeddedDocument): <NEW_LINE> <INDENT> category = StringField(required=True) <NEW_LINE> aid = StringField(required=True)
Fields: * category: StringField **REQUIRED** * aid: StringField **REQUIRED** **category** is the name of the locationdata collection to which the attachment refers. **aid** is the id (not mongodb id, but the back-end's id) of the object to which the attachment refers ("foreignkey").
62599062627d3e7fe0e08570
class CookieMW(object): <NEW_LINE> <INDENT> def process_request(self, request, spider): <NEW_LINE> <INDENT> request.meta['cookiejar'] = 1
cookie middlewares
62599062be8e80087fbc076c
class VimLCode(NoneditableTextObject): <NEW_LINE> <INDENT> def __init__(self, parent, token): <NEW_LINE> <INDENT> self._code = token.code.replace("\\`", "`").strip() <NEW_LINE> NoneditableTextObject.__init__(self, parent, token) <NEW_LINE> <DEDENT> def _update(self, done): <NEW_LINE> <INDENT> self.overwrite(_vim.eval(s...
See module docstring.
62599062a8370b77170f1ab4
class PairwiseAlignment: <NEW_LINE> <INDENT> def __init__(self, query, hit, score): <NEW_LINE> <INDENT> self.query = query <NEW_LINE> self.hit = hit <NEW_LINE> self.score = score
Structure to store the numbers associated with a Needleman Wunsch pairwise alignment. Keeps track of two sequence ids (represented by Sequence object) and associated alignment score (float)
625990621f5feb6acb1642d0
class AgentUser(Base): <NEW_LINE> <INDENT> __tablename__ = 'agent_users' <NEW_LINE> Id = Column(Integer, primary_key = True) <NEW_LINE> AADUserId = Column(String) <NEW_LINE> Description = Column(String) <NEW_LINE> Role = Column(String) <NEW_LINE> SubscriptionId = Column(String) <NEW_LINE> ObjectId = Column(String) <NEW...
description of class
6259906221bff66bcd72434b
class ComputeFirewallsDeleteRequest(_messages.Message): <NEW_LINE> <INDENT> firewall = _messages.StringField(1, required=True) <NEW_LINE> project = _messages.StringField(2, required=True)
A ComputeFirewallsDeleteRequest object. Fields: firewall: Name of the firewall resource to delete. project: Project ID for this request.
62599062adb09d7d5dc0bc50
class Association: <NEW_LINE> <INDENT> __slots__=['owner', 'peer_associator'] <NEW_LINE> def __init__(self, owner, peer_associator): <NEW_LINE> <INDENT> self.owner = owner <NEW_LINE> self.peer_associator = peer_associator
This base class provides the behaviour common to all types of association containers.
62599062d7e4931a7ef3d6f8
class ResolveResult(object): <NEW_LINE> <INDENT> def __init__(self, address_infos: List[AddressInfo], dns_infos: Optional[List[DNSInfo]]=None): <NEW_LINE> <INDENT> self._address_infos = address_infos <NEW_LINE> self._dns_infos = dns_infos <NEW_LINE> <DEDENT> @property <NEW_LINE> def addresses(self) -> Sequence[AddressI...
DNS resolution information.
62599062379a373c97d9a70a
class Solution: <NEW_LINE> <INDENT> def searchRange(self, nums: 'List[int]', target: 'int') -> 'List[int]': <NEW_LINE> <INDENT> if len(nums) == 0: <NEW_LINE> <INDENT> return [-1, -1] <NEW_LINE> <DEDENT> self.nums = [float('-inf')]+nums+[float('inf')] <NEW_LINE> self.target = target <NEW_LINE> l = self.fl(0, len(self.nu...
Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1].
62599062d486a94d0ba2d6af
class CasperTestCase(LiveServerTestCase): <NEW_LINE> <INDENT> use_phantom_disk_cache = False <NEW_LINE> no_colors = True <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(CasperTestCase, self).__init__(*args, **kwargs) <NEW_LINE> if self.use_phantom_disk_cache: <NEW_LINE> <INDENT> StaticFilesHan...
LiveServerTestCase subclass that can invoke CasperJS tests.
625990622ae34c7f260ac7cd
class PresolvedQEnv2(BaseQEnv): <NEW_LINE> <INDENT> def __init__(self, hamiltonian: Sequence[HamiltonianData], t: float, N: int, initial_state: Qobj = None, target_state: Qobj = None, initial_h_x=-4): <NEW_LINE> <INDENT> super().__init__(initial_state, target_state) <NEW_LINE> self.hamiltonian = hamiltonian <NEW_LINE> ...
state / observation: S = (t, h_x(t)) action: A = 0, 1; corresponding to stay (dh = 0), switch sign (dh = +-8).
6259906266673b3332c31ae3
class Settings(dict, DottedAccessMixin): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.update(*args, **kwargs) <NEW_LINE> <DEDENT> def __setitem__(self, name, value): <NEW_LINE> <INDENT> if isinstance(value, Mapping): <NEW_LINE> <INDENT> value = Settings(value) <NEW_LINE> <DEDENT> su...
Dict-ish container for settings. Provides access to settings via regular item access, attribute access, and dotted names:: >>> settings = Settings() >>> settings['name'] = 'name' >>> settings['name'] 'name' >>> settings.name = 'name' >>> settings.name 'name' >>> settings.set_dotted('NA...
62599062009cb60464d02c1e
class Migration(object): <NEW_LINE> <INDENT> timestamp = None <NEW_LINE> def run(self): <NEW_LINE> <INDENT> pass
App Engine data migration The timestamp is used to order migrations. No output is shown to the user, so make liberal use logging. Before running a migration on produciton data, download portitions of real data into an sample application using the bulk exporter
625990628e71fb1e983bd1b2
class MinimaxPlayer(IsolationPlayer): <NEW_LINE> <INDENT> def get_move(self, game, time_left): <NEW_LINE> <INDENT> self.time_left = time_left <NEW_LINE> best_move = (-1, -1) <NEW_LINE> try: <NEW_LINE> <INDENT> return self.minimax(game, self.search_depth) <NEW_LINE> <DEDENT> except SearchTimeout: <NEW_LINE> <INDENT> pas...
Game-playing agent that chooses a move using depth-limited minimax search. You must finish and test this player to make sure it properly uses minimax to return a good move before the search time limit expires.
625990627d43ff2487427f83
@frozen_after_init <NEW_LINE> @dataclass(unsafe_hash=True) <NEW_LINE> class StyleRequest(Generic[_FS], metaclass=ABCMeta): <NEW_LINE> <INDENT> field_set_type: ClassVar[Type[_FS]] <NEW_LINE> field_sets: Collection[_FS] <NEW_LINE> prior_formatter_result: Optional[Snapshot] = None <NEW_LINE> def __init__( self, field_sets...
A request to style or lint a collection of `FieldSet`s. Should be subclassed for a particular style engine in order to support autoformatting or linting.
62599062d268445f2663a6d0
class AppleSignInAsyncApi(Shared): <NEW_LINE> <INDENT> def __init__(self, config: AppleConfig): <NEW_LINE> <INDENT> super().__init__(config) <NEW_LINE> self._session = ClientSession() <NEW_LINE> <DEDENT> async def try_auth( self, code: str ) -> Optional[Union[AppleSignInSuccessRet, AppleSignInFailureRet]]: <NEW_LINE> <...
苹果登陆异步处理接口 Apple SignIn async process interface
625990621f5feb6acb1642d2
@singleton <NEW_LINE> class TCOrderValuePerDay(TradingControl): <NEW_LINE> <INDENT> def __init__(self, default_max, max_amount_dict=None, on_fail=None): <NEW_LINE> <INDENT> super(self.__class__, self).__init__(on_fail=on_fail) <NEW_LINE> self._max_amount_dict = max_amount_dict if max_amount_dict else {} <NEW_LINE> self...
Class implementing max order value per asset per day.
625990624e4d562566373aee
class DummyStafflineExtractor(object): <NEW_LINE> <INDENT> staffline_distance_multiple = 2 <NEW_LINE> target_height = 10
A placeholder for StafflineExtractor. It only contains the constants necessary to scale the x coordinates.
6259906221bff66bcd72434d
class DescribeCheckConfigDetailRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Id = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Id = params.get("Id")
DescribeCheckConfigDetail请求参数结构体
62599062f548e778e596cc70
class Layer2D(Layer): <NEW_LINE> <INDENT> def __init__(self, activation_params={}, activation_type="random", normalize=config.gan.normalization, use_dropout=False, skip_conn=False): <NEW_LINE> <INDENT> super().__init__(activation_params=activation_params, activation_type=activation_type, normalize=normalize, use_dropou...
Represents an generic 2d layer in the evolving model.
62599062cc0a2c111447c643
class DominantColorsAnnotation(proto.Message): <NEW_LINE> <INDENT> colors = proto.RepeatedField(proto.MESSAGE, number=1, message="ColorInfo",)
Set of dominant colors and their corresponding scores. Attributes: colors (Sequence[google.cloud.vision_v1p1beta1.types.ColorInfo]): RGB color values with their score and pixel fraction.
625990620a50d4780f706933
class PinwheelDialog(wx.Dialog): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> wx.Dialog.__init__(self, parent, wx.ID_ANY, "Add Pinwheel Command", size = (400, 225)) <NEW_LINE> self.directionPanel = wx.BoxSizer(wx.HORIZONTAL) <NEW_LINE> self.directionChoices = ['Clockwise', 'Counter-clockwise'] <N...
Dialog for specifying Pinwheel details.
625990623617ad0b5ee07837
class CertificateStatusInvalidOperation(exception.BarbicanHTTPException): <NEW_LINE> <INDENT> client_message = "" <NEW_LINE> status_code = 400 <NEW_LINE> def __init__(self, reason=u._('Unknown')): <NEW_LINE> <INDENT> super(CertificateStatusInvalidOperation, self).__init__( u._('Invalid operation requested - ' 'Reason: ...
Raised when the CA has encountered an issue with request data.
6259906207f4c71912bb0b1f
class ImportTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_import_fail(self): <NEW_LINE> <INDENT> sys.modules['smbus'] = None <NEW_LINE> with self.assertRaisesRegex(ImportError, 'requires'): <NEW_LINE> <INDENT> import sn3218 <NEW_LINE> self.assertTrue(sn3218) <NEW_LINE> <DEDENT> del sys.modules['smbus'] <NEW_LIN...
Test for import failure, and the actual module import
625990620c0af96317c578d3
class ImageInfoSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "CreateTime": fields.Int(required=False, load_from="CreateTime"), "DeployInfoList": fields.List(DeployImageInfoSchema()), "Gpu": fields.Int(required=False, load_from="Gpu"), "ImageDesc": fields.Str(required=False, load_from="ImageDesc"), "Imag...
ImageInfo - 镜像详情
6259906255399d3f05627c08
class PayloadProviderTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_list(self): <NEW_LINE> <INDENT> payloads = [ b'payload A', b'second payload' b'payload 3+' ] <NEW_LINE> res = [] <NEW_LINE> provider = payload_provider.List(payloads) <NEW_LINE> for payload in provider: <NEW_LINE> <INDENT> res.append(payload...
Tests for PayloadProvider class
625990621f037a2d8b9e53df
class ServerDnsAliasAcquisition(Model): <NEW_LINE> <INDENT> _attribute_map = { 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, } <NEW_LINE> def __init__(self, old_server_dns_alias_id=None): <NEW_LINE> <INDENT> super(ServerDnsAliasAcquisition, self).__init__() <NEW_LINE> self.old_server_dns_ali...
A server DNS alias acquisition request. :param old_server_dns_alias_id: The id of the server alias that will be acquired to point to this server instead. :type old_server_dns_alias_id: str
6259906299cbb53fe68325cb
class ZhaGroupEntity(BaseZhaEntity): <NEW_LINE> <INDENT> def __init__( self, entity_ids: List[str], unique_id: str, group_id: int, zha_device, **kwargs ) -> None: <NEW_LINE> <INDENT> super().__init__(unique_id, zha_device, **kwargs) <NEW_LINE> self._name = ( f"{zha_device.gateway.groups.get(group_id).name}_zha_group_0x...
A base class for ZHA group entities.
625990628da39b475be048d2
class CourseTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> CourseFactory() <NEW_LINE> <DEDENT> def test_duplicate_course_name_cannot_be_saved(self): <NEW_LINE> <INDENT> course = Course( name='appetizer', sequence_order=2 ) <NEW_LINE> self.assertRaises(ValidationError, course.save)
Tests the Course model.
625990622ae34c7f260ac7d0
class IxnBgpAigpListEmulation(IxnEmulationHost): <NEW_LINE> <INDENT> def __init__(self, ixnhttp): <NEW_LINE> <INDENT> super(IxnBgpAigpListEmulation, self).__init__(ixnhttp) <NEW_LINE> <DEDENT> def find(self, vport_name=None, emulation_host=None, **filters): <NEW_LINE> <INDENT> return super(IxnBgpAigpListEmulation, self...
Generated NGPF bgpAigpList emulation host
62599062460517430c432bc8
class RequestParameters(dict): <NEW_LINE> <INDENT> def get(self, name: str, default: Any = None) -> Any: <NEW_LINE> <INDENT> return super().get(name, [default])[0] <NEW_LINE> <DEDENT> def getlist(self, name: str, default: Any = None) -> List[Any]: <NEW_LINE> <INDENT> return super().get(name, default)
Hosts a dict with lists as values where get returns the first value of the list and getlist returns the whole shebang
625990628e7ae83300eea777
class InfoVersion(Api): <NEW_LINE> <INDENT> def __init__(self, *args, **kw): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> resp_json = super().request(self.__class__.__name__) <NEW_LINE> if resp_json: <NEW_LINE> <INDENT> print(resp_json.get('status').get('message'))
super(): http://python3-cookbook.readthedocs.io/zh_CN/latest/c08/p07_calling_method_on_parent_class.html#id3
62599062435de62698e9d4f1
class SlugModel(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=255, db_index=True) <NEW_LINE> slug = models.SlugField(max_length=255, editable=False, db_index=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> def save(self, *args, **kwargs): <NEW_LINE> <INDENT>...
A mixin Model for creating unique Slugs
62599062ac7a0e7691f73bce
class CommentIfExtension(Extension): <NEW_LINE> <INDENT> tags = set(['commentif']) <NEW_LINE> def parse(self, parser): <NEW_LINE> <INDENT> lineno = next(parser.stream).lineno <NEW_LINE> args = [parser.parse_expression(), parser.parse_expression()] <NEW_LINE> body = parser.parse_statements(['name:endcommentif'], drop_ne...
Put a string before each line to comment out a block based on a boolean expression. Example:: {% set comment=True %} {% commentif "#" comment %} My text should be comment if "comment" is True. {% endcommentif %}
625990620a50d4780f706934
class IntegerPreference(object): <NEW_LINE> <INDENT> def __init__(self, minval=None, maxval=None): <NEW_LINE> <INDENT> self.minval = minval <NEW_LINE> self.maxval = maxval
User interface info for an integer preference This signals that a preference should be displayed and edited as an integer, optionally limited by a range.
625990627cff6e4e811b7130
class VnsfOrchestratorUnreacheable(ExceptionMessage): <NEW_LINE> <INDENT> pass
vNSFO cannot be reached.
625990628a43f66fc4bf3879
class CheapMensClothingSpider(PageSpider): <NEW_LINE> <INDENT> name = 'cheapmensclothing' <NEW_LINE> config = Configuration('cheapmensclothing_spider') <NEW_LINE> start_urls = [PageSpider.home_url + 'lists/cheap-mens-clothing.aspx?cur=' + config.currency + '&pp=' + config.pp + '&o=lth&s=' + (config.size).replace...
Spider that gets clothes on sale for men's from http://www.prodirectselect.com/
6259906245492302aabfdbc5
class Minimum(_NumericValue): <NEW_LINE> <INDENT> pass
Field transform: bound numeric field with specified value. See: https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.minimum Args: value (int | float...
625990621f037a2d8b9e53e0
class BaseAlgorithm(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.derivative_function = None <NEW_LINE> self.quadrature_function = None <NEW_LINE> self.boundarycondition_function = None <NEW_LINE> self.initial_cost_function = None <NEW_...
Object representing an algorithm that solves boundary valued problems. This object serves as a base class for other algorithms.
62599062462c4b4f79dbd0f0
class AgentMacroReference(BaseObject): <NEW_LINE> <INDENT> def __init__(self, api=None, id=None, macro_id=None, macro_title=None, type=None, via=None, **kwargs): <NEW_LINE> <INDENT> self.api = api <NEW_LINE> self.id = id <NEW_LINE> self.macro_id = macro_id <NEW_LINE> self.macro_title = macro_title <NEW_LINE> self.type ...
###################################################################### # Do not modify, this class is autogenerated by gen_classes.py # ######################################################################
6259906266673b3332c31ae7
class Browser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.socket = HttpSocket() <NEW_LINE> self.state = BrowserState() <NEW_LINE> self.response = None <NEW_LINE> self.domain = None <NEW_LINE> <DEDENT> def request(self, method, file, body=None, headers=None, dest=None): <NEW_LINE> <INDENT> if self....
This class acts as an interface for the internet. Other classes may use it to request HTTP resources and get the responses.
625990622ae34c7f260ac7d2
class RentalItem(models.Model): <NEW_LINE> <INDENT> condition = models.TextField(max_length=500) <NEW_LINE> new_damage = models.BooleanField(default=False) <NEW_LINE> damage_fee = models.DecimalField(max_digits=10, decimal_places=2, null=True) <NEW_LINE> late_fee = models.DecimalField(max_digits=10, decimal_places=2, n...
DESCRIPTION: An association class that adds more information when a user rents an item. NOTES:
62599062460517430c432bc9
class StoryScraper(object): <NEW_LINE> <INDENT> FIELDS = { "created_at": "created_at", "title": "title", "url": "url", "author": "author", "points": "points", "story_text": "points", "timestamp": "created_at_i", "objectID": "story_id" } <NEW_LINE> @staticmethod <NEW_LINE> def getStories(since, until=None, timeout=None)...
hacker news story scraper. Example: StoryScraper.getStories("story", 1394901958) will return all stories since 15 Mar 2014 16:45:58 GMT.
62599062cc0a2c111447c645
class MiniTry(MiniAst): <NEW_LINE> <INDENT> def __init__(self, body, filters, low, high): <NEW_LINE> <INDENT> self.body = body <NEW_LINE> self.filters = filters <NEW_LINE> super(MiniTry, self).__init__(low, high) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "MiniTry({0}, {1})".format(self.body, se...
Mini-AST element representing a ``try`` expression.
62599062a219f33f346c7ef2
class Speaker(ndb.Model): <NEW_LINE> <INDENT> displayName = ndb.StringProperty(required=True) <NEW_LINE> mainEmail = ndb.StringProperty() <NEW_LINE> bio = ndb.StringProperty()
Speaker -- Speaker profile object
62599062adb09d7d5dc0bc56
class _Task(object): <NEW_LINE> <INDENT> def __init__(self, func, args, argd=None): <NEW_LINE> <INDENT> self._func = func <NEW_LINE> self._args = args <NEW_LINE> self._argd = {} if argd is None else argd <NEW_LINE> self._ret = None <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> self._ret = self._func(*self....
Executor task
62599062f548e778e596cc75
class ScopedCenterViewSet(ModelViewSet): <NEW_LINE> <INDENT> queryset = ScopedCenter.objects.all() <NEW_LINE> serializer_class = ScopedCenterSerializer
This endpoint Represents the Centers with definite Scopes It presents the list of Current Centers with definite Scopes
625990628a43f66fc4bf387b
class SyntaxData(syndata.SyntaxDataBase): <NEW_LINE> <INDENT> def __init__(self, langid): <NEW_LINE> <INDENT> syndata.SyntaxDataBase.__init__(self, langid) <NEW_LINE> self.SetLexer(stc.STC_LEX_KIX) <NEW_LINE> <DEDENT> def GetKeywords(self): <NEW_LINE> <INDENT> return [COMMANDS, FUNCTIONS, MACROS] <NEW_LINE> <DEDENT> de...
SyntaxData object for Kix
625990627047854f46340aaa
class CaloriesTest(PluginTest, unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.test = self.load_plugin(calories) <NEW_LINE> <DEDENT> def test_calories(self): <NEW_LINE> <INDENT> gender = "m" <NEW_LINE> age = 20 <NEW_LINE> height = 165 <NEW_LINE> weight = 54 <NEW_LINE> exercise_level = ...
This class is testing the calories plugin
6259906245492302aabfdbc7
class TestQuestion(object): <NEW_LINE> <INDENT> def test___init___basic(self, questions): <NEW_LINE> <INDENT> question = WatsonQuestion(questions[0]['questionText']) <NEW_LINE> assert question.question_text == questions[0]['questionText'] <NEW_LINE> <DEDENT> def test___init___complete(self, questions): <NEW_LINE> <INDE...
Unit tests for the WatsonQuestion class
62599062dd821e528d6da4f7
class BurnMethod(ContractMethod): <NEW_LINE> <INDENT> def __init__( self, web3_or_provider: Union[Web3, BaseProvider], contract_address: str, contract_function: ContractFunction, validator: Validator = None, ): <NEW_LINE> <INDENT> super().__init__(web3_or_provider, contract_address, validator) <NEW_LINE> self._underlyi...
Various interfaces to the burn method.
625990622ae34c7f260ac7d3
class PassageDetectorChannel(FunctionalChannel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.leftCounter = 0 <NEW_LINE> self.leftRightCounterDelta = 0 <NEW_LINE> self.passageBlindtime = 0.0 <NEW_LINE> self.passageDirection = PassageDirection.RIGHT <NEW_LINE> self.passa...
this is the representive of the PASSAGE_DETECTOR_CHANNEL channel
62599062009cb60464d02c24
class WorkerMessageResponse(_messages.Message): <NEW_LINE> <INDENT> workerHealthReportResponse = _messages.MessageField('WorkerHealthReportResponse', 1) <NEW_LINE> workerMetricsResponse = _messages.MessageField('ResourceUtilizationReportResponse', 2) <NEW_LINE> workerShutdownNoticeResponse = _messages.MessageField('Wor...
A worker_message response allows the server to pass information to the sender. Fields: workerHealthReportResponse: The service's response to a worker's health report. workerMetricsResponse: Service's response to reporting worker metrics (currently empty). workerShutdownNoticeResponse: Service's response ...
6259906256ac1b37e630385d
class Notification(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TopicName = None <NEW_LINE> self.EventConfigs = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TopicName = params.get("TopicName") <NEW_LINE> if params.get("EventConfigs") is not None: ...
通知信息
62599062442bda511e95d8d0
class MODE: <NEW_LINE> <INDENT> simulation = "SIMULATION" <NEW_LINE> hardware = "HARDWARE"
simulation mode: Use the hardware for the master side, and simulation for the ECM hardware mode: Use hardware for both the master side, and the ECM
625990622ae34c7f260ac7d4
class SetAttrSubCommand(CommonPoolSubCommand): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__("set-attr") <NEW_LINE> self.attr = PositionalParameter(2) <NEW_LINE> self.value = PositionalParameter(3) <NEW_LINE> self.sys_name = FormattedParameter("--sys-name={}")
Defines an object for the daos pool set-attr command.
625990628e7ae83300eea77a
class InfoField(InputField): <NEW_LINE> <INDENT> def __init__(self, **options) -> None: <NEW_LINE> <INDENT> super().__init__(**options) <NEW_LINE> self._type(gui.InputField.INFO_TYPE)
Informational field (no input is done)
62599062d6c5a102081e3811
class ListExtender(list): <NEW_LINE> <INDENT> def read_all(self): <NEW_LINE> <INDENT> ret = simplejson.dumps([simplejson.loads(x) for x in self]) <NEW_LINE> return ret <NEW_LINE> <DEDENT> def remove_old(self, delay): <NEW_LINE> <INDENT> pass
Class extends list class with necessary methods.
62599062fff4ab517ebcef14
class WriteSDO: <NEW_LINE> <INDENT> def __init__( self, nodeID, objectIndex, subIndex, data ): <NEW_LINE> <INDENT> self.nodeID, self.objectIndex, self.subIndex = nodeID, objectIndex, subIndex <NEW_LINE> self.data = data <NEW_LINE> <DEDENT> def update( self, packet ): <NEW_LINE> <INDENT> self.packet = packet <NEW_LINE> ...
Write Dictionary Object via CANopen Service Data Objects (SDO)
625990624428ac0f6e659c20
class CharCNN(CharNN): <NEW_LINE> <INDENT> OPTIMIZER = 'adadelta' <NEW_LINE> def model_architecture(self): <NEW_LINE> <INDENT> embedding_size = 128 <NEW_LINE> conv1_filters = 128 <NEW_LINE> conv1_kernel_size = 3 <NEW_LINE> conv2_filters = 256 <NEW_LINE> conv2_kernel_size = 3 <NEW_LINE> hidden_units = 64 <NEW_LINE> outp...
Convolutional neural network on char-level data.
62599062009cb60464d02c25
class NT_RS_SARSA(QTable): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.qvals = np.zeros(self.dims) <NEW_LINE> self.load_qvals() <NEW_LINE> if self.lmbda is not None: <NEW_LINE> <INDENT> self.el_traces = np.zeros(self.dims) <NEW_LINE> <DE...
No-target Reduced-state SARSA. State consists of cell coordinates only.
6259906276e4537e8c3f0c71
class Sensor(object): <NEW_LINE> <INDENT> def __init__(self, id, analog, interval): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.analog = analog <NEW_LINE> self.interval = interval <NEW_LINE> self.delay = None <NEW_LINE> self.verbose = False <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def do_static(x, y): <NEW_LIN...
A Sensor have the following properties: Attributes: name: A string representing the sensor's name. id: int analog: An int tracking number of analog channels needed digital: An int tracking number of digital pins needed
62599062f548e778e596cc76
class TrainingCallbackHandler(CallbackHandler): <NEW_LINE> <INDENT> def __init__(self, optimizer, train_metrics, log, val_metrics=None, callbacks=None): <NEW_LINE> <INDENT> super().__init__(dict(log=log, optimizer=optimizer, train_metrics=train_metrics)) <NEW_LINE> if val_metrics: <NEW_LINE> <INDENT> self['val_metrics'...
Object for holding all callbacks.
625990625fdd1c0f98e5f672
class Statistics(object): <NEW_LINE> <INDENT> def __init__(self, filename, match, mismatch, gap, extension): <NEW_LINE> <INDENT> self.matches = _fgrep_count('"SEQUENCE" %s' % match, filename) <NEW_LINE> self.mismatches = _fgrep_count('"SEQUENCE" %s' % mismatch, filename) <NEW_LINE> self.gaps = _fgrep_count('"INSERT" %s...
Calculate statistics from an ALB report
62599062d7e4931a7ef3d6fc
class TestHeartbeat(RouteTest): <NEW_LINE> <INDENT> CONTROLLER_NAME = "heartbeat" <NEW_LINE> def test_heartbeat(self): <NEW_LINE> <INDENT> self.assert_request_calls("/heartbeat", self.controller.heartbeat)
Test routes that end up in the HeartbeatController.
625990627cff6e4e811b7134
class Pet(object): <NEW_LINE> <INDENT> def __init__(self, birthyear, weight, length, color, owner=None): <NEW_LINE> <INDENT> self.age = datetime.datetime.now().year - birthyear <NEW_LINE> self.birthyear = birthyear <NEW_LINE> self.weight = weight <NEW_LINE> self.length = length <NEW_LINE> self.color = color <NEW_LINE> ...
A class that represents a generic Pet.
625990623539df3088ecd98b
class TestPiecewisePolynomial1DFit(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.poly = np.array([1.0, 2.0, 3.0, 4.0]) <NEW_LINE> self.x = np.linspace(-3.0, 2.0, 100) <NEW_LINE> self.y = np.polyval(self.poly, self.x) <NEW_LINE> <DEDENT> def test_fit_eval(self): <NEW_LINE> <INDENT> interp = Pi...
Fit a 1-D piecewise polynomial to data from a known polynomial.
6259906232920d7e50bc7734
class TestClass(unittest.TestCase): <NEW_LINE> <INDENT> My_Class = xtuml.MetaClass('My_Class') <NEW_LINE> def test_plus_operator(self): <NEW_LINE> <INDENT> inst1 = self.My_Class() <NEW_LINE> inst2 = self.My_Class() <NEW_LINE> q = inst1 + inst2 <NEW_LINE> self.assertEqual(2, len(q)) <NEW_LINE> self.assertIn(inst1, q) <N...
Test suite for the class xtuml.Class
62599062e64d504609df9f45
class VIEW3D_TP_Wire_Off(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "tp_ops.wire_off" <NEW_LINE> bl_label = "Wire off" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> selection = bpy.context.selected_objects <NEW_LINE> if not(selection): <NEW_LINE> <INDE...
Wire off
625990623539df3088ecd98c
class itkNumericTraitsFASL2(object): <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_itkNumericTraitsFASL2 <NEW_LINE> def __init__(self, *args): <NEW_...
Proxy of C++ itkNumericTraitsFASL2 class
62599062a8ecb03325872906
class Sparse(Transform): <NEW_LINE> <INDENT> shape = ShapeParam("shape", length=2, low=1) <NEW_LINE> init = SparseInitParam("init") <NEW_LINE> def __init__(self, shape, indices=None, init=1.0): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.shape = shape <NEW_LINE> if scipy_sparse and isinstance(init, scipy_spa...
A sparse matrix transformation between an input and output signal. .. versionadded:: 3.0.0 Parameters ---------- shape : tuple of int The full shape of the sparse matrix: ``(size_out, size_in)``. indices : array_like of int An Nx2 array of integers indicating the (row,col) coordinates for the N non-zero e...
625990627b25080760ed8858
class _Type(object): <NEW_LINE> <INDENT> def _getdefault(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def convert(self, config_path, key, value): <NEW_LINE> <INDENT> raise NotImplementedError
An abstract type for the configuration file schema. Types convert low-level configuration file elements to more useful high-level values and they provide default values for missing elements.
625990627d847024c075dac4
class AsyncConfigEntryAuth(AbstractAuth): <NEW_LINE> <INDENT> def __init__( self, websession: ClientSession, oauth_session: config_entry_oauth2_flow.OAuth2Session, client_id: str, client_secret: str, ) -> None: <NEW_LINE> <INDENT> super().__init__(websession, API_URL) <NEW_LINE> self._oauth_session = oauth_session <NEW...
Provide Google Nest Device Access authentication tied to an OAuth2 based config entry.
62599062442bda511e95d8d1
class PyDMDesignerPlugin(QtDesigner.QPyDesignerCustomWidgetPlugin): <NEW_LINE> <INDENT> def __init__(self, cls, is_container=False, group='PyDM Widgets', extensions=None): <NEW_LINE> <INDENT> QtDesigner.QPyDesignerCustomWidgetPlugin.__init__(self) <NEW_LINE> self.initialized = False <NEW_LINE> self.is_container = is_co...
Parent class to standardize how pydm plugins are accessed in qt designer. All functions have default returns that can be overriden as necessary.
6259906266673b3332c31aeb
class CaCfar(): <NEW_LINE> <INDENT> def __init__(self, numGuardBins, numAvgBins, scale=0): <NEW_LINE> <INDENT> self.back = np.arange(-numAvgBins, 0, 1) <NEW_LINE> self.front = np.arange(numAvgBins) <NEW_LINE> self.numGuardBins = numGuardBins <NEW_LINE> self.numAvgBins = numAvgBins <NEW_LINE> self.scale = scale <NEW_LIN...
Cell averaging constant false alarm rate detector
625990622ae34c7f260ac7d6
class ChDir(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.old_dir = os.getcwd() <NEW_LINE> self.new_dir = path <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> os.chdir(self.new_dir) <NEW_LINE> <DEDENT> def __exit__(self, *args): <NEW_LINE> <INDENT> os.chdir(self.old_dir)
Step into a directory context on which to operate on. https://pythonadventures.wordpress.com/2013/12/15/chdir-a-context-manager-for-switching-working-directories/
625990628e7ae83300eea77d
class TestRunner(WorkflowTestRunner, NoseTestSuiteRunner): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _loaddevdata(): <NEW_LINE> <INDENT> from django.core.management import call_command <NEW_LINE> call_command( 'loaddevdata', reset=False, interactive=False, commit=False, verbosity=0 ) <NEW_LINE> <DEDENT> @staticm...
Our test runner: load data before execution
62599062a8370b77170f1abd
class TestSignalsBlocked(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.obj = QObject() <NEW_LINE> self.args = tuple() <NEW_LINE> self.called = False <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> del self.obj <NEW_LINE> del self.args <NEW_LINE> <DEDENT> def callback(self...
Test case to check if the signals are really blocked
625990623cc13d1c6d466e31
class PointerTypeDescriptor(DerivedTypeDescriptor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> DerivedTypeDescriptor.__init__(self)
Points to another type descriptor
62599062f7d966606f749431
class add_item(Command): <NEW_LINE> <INDENT> def __init__(self, item, get_uid=None, outer_instance: "Repository" = None): <NEW_LINE> <INDENT> super().__init__(outer_instance, undo_enabled=True) <NEW_LINE> self.item = item <NEW_LINE> self.uid = 0 <NEW_LINE> self.get_uid = get_uid <NEW_LINE> <DEDENT> def execute(self): <...
Adds an item to the list. :param item: The item to add. :return uid: The uid of the added item.
6259906292d797404e3896d5
@tinctest.skipLoading('scenario') <NEW_LINE> class co_create_with_column_sub_part_small(SQLTestCase): <NEW_LINE> <INDENT> sql_dir = 'co_create_with_column_sub_part/small/' <NEW_LINE> ans_dir = 'expected/co_create_with_column_sub_part/' <NEW_LINE> out_dir = 'output/'
@description: Create tables with compression attributes in with clause at sub-partition level - CO tables @gucs gp_create_table_random_default_distribution=off @product_version gpdb: [4.3-]
62599062f548e778e596cc78
class MashCredentialsDatastoreException(MashException): <NEW_LINE> <INDENT> pass
Base exception for credentials datastore class.
625990625fdd1c0f98e5f674
class EchoHandler(socketserver.DatagramRequestHandler): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> while 1: <NEW_LINE> <INDENT> line = self.rfile.read() <NEW_LINE> if not line: <NEW_LINE> <INDENT> break <NEW_LINE> <DEDENT> elemento = line.decode('utf-8') <NEW_LINE> linea = elemento.split('\r\n') <NEW_LIN...
Echo server class
625990624e4d562566373af7
class S3GroupAggregate(object): <NEW_LINE> <INDENT> def __init__(self, method, key, values): <NEW_LINE> <INDENT> self.method = method <NEW_LINE> self.key = key <NEW_LINE> self.values = values <NEW_LINE> self.result = self.__compute(method, values) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __compute(method, value...
Class representing aggregated values
6259906267a9b606de54761a
class Utility(): <NEW_LINE> <INDENT> pass
Reusable utilities and logic go here At the moment I don't see the need for sub classes
6259906207f4c71912bb0b27
class Events(FitnessFunc): <NEW_LINE> <INDENT> def fitness(self, N_k, T_k): <NEW_LINE> <INDENT> return N_k * np.log(N_k / T_k) <NEW_LINE> <DEDENT> def prior(self, N, Ntot): <NEW_LINE> <INDENT> if self.gamma is not None: <NEW_LINE> <INDENT> return self.gamma_prior(N, Ntot) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> r...
Fitness for binned or unbinned events Parameters ---------- p0 : float False alarm probability, used to compute the prior on N (see eq. 21 of Scargle 2012). Default prior is for p0 = 0. gamma : float or None If specified, then use this gamma to compute the general prior form, p ~ gamma^N. If gamma is...
6259906245492302aabfdbcb