code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Client: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def pipeline_class(code_model, async_mode: bool) -> str: <NEW_LINE> <INDENT> if code_model.options["azure_arm"]: <NEW_LINE> <INDENT> if async_mode: <NEW_LINE> <INDENT> return "AsyncARMPipelineClient" <NEW_LINE> <DEDENT> return "ARMPipelineClient" <NEW_LINE> <DE...
A service client.
62599038711fe17d825e1561
class GatlingWidget(urwid.Pile): <NEW_LINE> <INDENT> def __init__(self, executor): <NEW_LINE> <INDENT> self.executor = executor <NEW_LINE> self.dur = executor.get_load().duration <NEW_LINE> widgets = [] <NEW_LINE> if self.executor.script: <NEW_LINE> <INDENT> self.script_name = urwid.Text("Script: %s" % os.path.basename...
Progress sidebar widget :type executor: bzt.modules.grinder.GatlingExecutor
62599038a4f1c619b294f74c
class TestResponse(requests.Response): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self._text = None <NEW_LINE> super(TestResponse, self).__init__() <NEW_LINE> if isinstance(data, dict): <NEW_LINE> <INDENT> self.status_code = data.get('status_code', 200) <NEW_LINE> headers = data.get('headers') <N...
Utility class to wrap requests.Response. Class used to wrap requests.Response and provide some convenience to initialize with a dict.
62599038d99f1b3c44d06830
class PressureReading(AbstractReading): <NEW_LINE> <INDENT> __tablename__ = "pressure_reading" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> timestamp = Column(DateTime, nullable=False) <NEW_LINE> model = Column(String(250), nullable=False) <NEW_LINE> min_reading = Column(Integer, nullable=False) <NEW_LI...
Concrete Implementation of a Pressure Reading
6259903826238365f5fadce0
class TestBusinessUnitReference(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 testBusinessUnitReference(self): <NEW_LINE> <INDENT> pass
BusinessUnitReference unit test stubs
62599038b57a9660fecd2c06
class Node(object): <NEW_LINE> <INDENT> def __init__(self, is_leaf, parent, *, scope=None, active=None, value=None): <NEW_LINE> <INDENT> self.is_leaf = is_leaf <NEW_LINE> if self.is_leaf: <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.scope = range(value, value+1) <NEW_LINE> self.active = set() <NEW_LINE> self....
The node of binary tree. If the node is a leaf, it contains an integer (index) as its value. If the node is an internal node, it contains a series of contiguous integers.
6259903876d4e153a661db38
class RetrieveUser(APIView): <NEW_LINE> <INDENT> def get(self, request, pk): <NEW_LINE> <INDENT> response = requests.get(USER_BASE_URL+"/"+pk) <NEW_LINE> if response.status_code == 200: <NEW_LINE> <INDENT> return Response(response.json()) <NEW_LINE> <DEDENT> return Response(status=status.HTTP_404_NOT_FOUND)
class to retrieve specified users from JsonPlaceHolder external API Reference: 'https://jsonplaceholder.typicode.com/users'
6259903807d97122c4217e28
class NutrientDef(models.Model): <NEW_LINE> <INDENT> nutr_id = models.CharField(primary_key=True, max_length=3, db_column='nutr_id') <NEW_LINE> units = models.CharField(max_length=7) <NEW_LINE> tagname = models.CharField(max_length=20, blank=True) <NEW_LINE> nutr_desc = models.CharField(max_length=60, verbose_name="nut...
Definitions of nutrients used in the database. 150 records from the USDA NUTR_DEF table. See sr27doc page 34 for more info. (names in parenthesis are USDA names when significantly different) nutr_id (Nutr_No): Unique 3-digit identifier code for a nutrient. units: Units of measure (mg, g, μg, and so on). tagname: Inte...
62599038b5575c28eb71358f
class SVC(ProbabilityClassifier): <NEW_LINE> <INDENT> Estimator = svm.SVC <NEW_LINE> BASE_PARAMS = {'probability': True}
Implements a Support Vector Classifier model.
625990388a43f66fc4bf3318
@attr.s(auto_attribs=True, init=False) <NEW_LINE> class GitStatus(model.Model): <NEW_LINE> <INDENT> action: Optional[str] = None <NEW_LINE> conflict: Optional[bool] = None <NEW_LINE> revertable: Optional[bool] = None <NEW_LINE> text: Optional[str] = None <NEW_LINE> def __init__( self, *, action: Optional[str] = None, c...
Attributes: action: Git action: add, delete, etc conflict: When true, changes to the local file conflict with the remote repository revertable: When true, the file can be reverted to an earlier state text: Git description of the action
6259903891af0d3eaad3afbe
class BufferVar(NodeGeneric): <NEW_LINE> <INDENT> def __init__(self, builder, buffer_var, content_type): <NEW_LINE> <INDENT> self._builder = builder <NEW_LINE> self._buffer_var = buffer_var <NEW_LINE> self._content_type = content_type <NEW_LINE> <DEDENT> def asnode(self): <NEW_LINE> <INDENT> return self._buffer_var <NE...
Buffer variable with content type, makes load store easily. Do not create it directly, create use IRBuilder. Examples -------- In the follow example, x is BufferVar. :code:`x[0] = ...` directly emit a store to the IRBuilder, :code:`x[10]` translates to Load. .. code-block:: python # The following code generate ...
625990386e29344779b017dd
@deconstructible <NEW_LINE> class UploadToPathAndRename(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.sub_path = path <NEW_LINE> <DEDENT> def __call__(self, instance, filename): <NEW_LINE> <INDENT> ext = filename.split('.')[-1] <NEW_LINE> if instance.pk: <NEW_LINE> <INDENT> if isinstan...
Helper class for renaming files to a uuid on upload. For user-supplied files, file names should be obfuscated by using this class for the upload_to parameter. This will match the primary key of the parent object if it exists, or generate a new uuid if it does not.
62599038287bf620b6272d76
class AbstractPostgresIndexEntry(BaseIndexEntry): <NEW_LINE> <INDENT> autocomplete = SearchVectorField() <NEW_LINE> title = SearchVectorField() <NEW_LINE> body = SearchVectorField() <NEW_LINE> class Meta(BaseIndexEntry.Meta): <NEW_LINE> <INDENT> abstract = True <NEW_LINE> indexes = [ GinIndex(fields=["autocomplete"]), ...
This class is the specific IndexEntry model for PostgreSQL database systems. It inherits the fields defined in BaseIndexEntry, and adds PostgreSQL-specific fields (tsvectors), plus indexes for doing full-text search on those fields.
6259903816aa5153ce401678
class CategoriesResultExplanation(): <NEW_LINE> <INDENT> def __init__(self, *, relevant_text: List['CategoriesRelevantText'] = None) -> None: <NEW_LINE> <INDENT> self.relevant_text = relevant_text <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_dict(cls, _dict: Dict) -> 'CategoriesResultExplanation': <NEW_LINE> <I...
Information that helps to explain what contributed to the categories result. :attr List[CategoriesRelevantText] relevant_text: (optional) An array of relevant text from the source that contributed to the categorization. The sorted array begins with the phrase that contributed most significantly to the resu...
62599038d10714528d69ef51
class DataReadException(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> Exception.__init__(self, message)
An exception that indicates that there was an error reading from the underlying medium
62599038ac7a0e7691f73674
class WurfdocsError(Exception): <NEW_LINE> <INDENT> pass
Basic exception for errors raised by Wurfdocs
6259903873bcbd0ca4bcb415
class ProjectExplore(generic.ListView): <NEW_LINE> <INDENT> model = Project <NEW_LINE> def project_explore(request): <NEW_LINE> <INDENT> categories = CategoryM.objects.all() <NEW_LINE> ExCategories = [] <NEW_LINE> idbuf = 0 <NEW_LINE> Occupied = [] <NEW_LINE> MaxHorizontal = 6 <NEW_LINE> MaxVertical = 2 <NEW_LINE> MaxD...
Explore Projects
625990380a366e3fb87ddb72
class BasicDistance(sim.Allocation): <NEW_LINE> <INDENT> initial_x = sim.Normal("initial x coordinate", loc=0, scale=1) <NEW_LINE> initial_y = sim.Normal("initial y coordinate", loc=0, scale=1) <NEW_LINE> initial_energy = sim.Exponential("Initial energy of individuals", scale=1000) <NEW_LINE> step_x = sim.Continuous("s...
Distance parameters for a random walk model.
6259903871ff763f4b5e8926
class Mission(object): <NEW_LINE> <INDENT> theatre = "Caucasus" <NEW_LINE> descriptionText = "" <NEW_LINE> descriptionBlueTask = "" <NEW_LINE> descriptionRedTask = "" <NEW_LINE> sortie = "" <NEW_LINE> version = 0 <NEW_LINE> currentKey = 0 <NEW_LINE> startTime = 0 <NEW_LINE> usedModules = [] <NEW_LINE> resourceCounter =...
docstring for Mission
62599038507cdc57c63a5f26
class CreateContainer(show.ShowOne): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(CreateContainer, self).get_parser(prog_name) <NEW_LINE> parser.add_argument('--name', '-n', help='a human-friendly name.') <NEW_LINE> parser.add_argument('--type', default='generic', help='type o...
Store a container in Barbican.
6259903810dbd63aa1c71d61
class TemplateViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.Template.objects.all() <NEW_LINE> serializer_class = serializers.TemplateSerializer
This viewset automatically provides `list` and `detail` actions.
6259903830dc7b76659a09bf
class ObjectType(colander.Mapping): <NEW_LINE> <INDENT> def serialize(self, node, appstruct): <NEW_LINE> <INDENT> appstruct = appstruct.__dict__ <NEW_LINE> return super(ObjectType, self).serialize(node, appstruct) <NEW_LINE> <DEDENT> def deserialize(self, node, cstruct): <NEW_LINE> <INDENT> data = super(ObjectType, sel...
A colander type representing a generic python object (uses colander mapping-based serialization).
62599038d99f1b3c44d06832
class Car: <NEW_LINE> <INDENT> def __init__(self, fuel=0, name=""): <NEW_LINE> <INDENT> self.fuel = fuel <NEW_LINE> self.odometer = 0 <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "{}, fuel={}, odometer={}".format(self.name, self.fuel, self.odometer) <NEW_LINE> <DEDENT> d...
Represent a Car object.
6259903826238365f5fadce2
class DescribeEnvironmentsRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.EnvironmentId = None <NEW_LINE> self.Offset = None <NEW_LINE> self.Limit = None <NEW_LINE> self.ClusterId = None <NEW_LINE> self.Filters = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE...
DescribeEnvironments请求参数结构体
6259903876d4e153a661db39
class Reaction(object): <NEW_LINE> <INDENT> def __init__(self, reactants, products=None, reactant_value=0, product_value=0): <NEW_LINE> <INDENT> if not isinstance(reactants, list) or (products is not None and not isinstance(products, list)): <NEW_LINE> <INDENT> raise TypeError <NEW_LINE> <DEDENT> if len(reactants) == 0...
Reactions record a transformation from initial reactant Molecules to the resulting product Molecules. Associated with the transformation is a 'weight', whose meaning is specific to the IChemistry which generated the Reaction.
62599038b5575c28eb713590
class Entry(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.key = None <NEW_LINE> self.value = None <NEW_LINE> self.hash = 0 <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<Entry: key={0} value={1}>".format(self.key, self.value)
A hash table entry. Attributes: * key - The key for this entry. * hash - The has of the key. * value - The value associated with the key.
625990388a43f66fc4bf331a
class Error: <NEW_LINE> <INDENT> def __init__(self, error_code): <NEW_LINE> <INDENT> self.error_code = error_code <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if self.error_code == ARDUINO_NOT_FOUND: <NEW_LINE> <INDENT> return 'The Arduino cannot be found. Make sure it is plugged in.' <NEW_LINE> <DEDENT> ...
Signifies a load error.
6259903863f4b57ef008663a
class _FileReader(_UnicodeReader): <NEW_LINE> <INDENT> def __init__(self, process, file, bufsize, datatype, encoding): <NEW_LINE> <INDENT> super().__init__(encoding) <NEW_LINE> self._process = process <NEW_LINE> self._file = file <NEW_LINE> self._bufsize = bufsize <NEW_LINE> self._datatype = datatype <NEW_LINE> self._p...
Forward data from a file
62599038d4950a0f3b111706
@register.tag('form') <NEW_LINE> class FormNode(Node): <NEW_LINE> <INDENT> def __init__(self, parser, token): <NEW_LINE> <INDENT> bits = token.split_contents() <NEW_LINE> remaining_bits = bits[1:] <NEW_LINE> self.kwargs = token_kwargs(remaining_bits, parser) <NEW_LINE> if remaining_bits: <NEW_LINE> <INDENT> raise Templ...
Template based form rendering Example:: {% form template='material/form.html' form=form layout=view.layout %} {% part form.email prepend %}<span class="input-group-addon" id="basic-addon1">@</span>{% endpart %} {% endform %}
625990385e10d32532ce41ca
class spacetime: <NEW_LINE> <INDENT> def __init__(self, z_positions, masses, reflection_symmetric=False): <NEW_LINE> <INDENT> self.reflection_symmetric = reflection_symmetric <NEW_LINE> self.z_positions = np.array(z_positions) <NEW_LINE> self.masses = np.array(masses) <NEW_LINE> self.N = len(z_positions)
Define an axisymmetric spacetime. For an axisymmetric, vacuum spacetime with Brill-Lindquist singularities the only parameters that matter is the locations of the singularities (i.e. their z-location) and their bare masses. Parameters ---------- z_positions : list of float The location of the singularities on th...
625990388e05c05ec3f6f722
class ProductionConfig(Config): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> LOG_LEVEL = "INFO" <NEW_LINE> SQLALCHEMY_DATABASE_URI = "mysql://root:123@127.0.0.1:3306/company_info?charset=utf8"
生产模式下的配置
6259903807d97122c4217e2b
class Cache(object): <NEW_LINE> <INDENT> def __init__(self, root_dir, reporthook=None): <NEW_LINE> <INDENT> self.root_dir = root_dir <NEW_LINE> self.reporthook = reporthook <NEW_LINE> if not os.path.isdir(root_dir): <NEW_LINE> <INDENT> os.mkdir(root_dir) <NEW_LINE> <DEDENT> <DEDENT> def fetch_url(self, source_url, file...
A simple disk-based URL cache. Note that it is *not* safe for any kind of multithreading or multiprocessing (i.e. you should not use several instances with the same ``root_dir`` in parallel, as no locking of files is done to ensure correct operation).
6259903871ff763f4b5e8928
class IncidentsSensor(RestoreEntity, SensorEntity): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._entry_id = self._client.entry_id <NEW_LINE> self._unique_id = f"{self._client.unique_id}_Incidents" <NEW_LINE> self._state = None <NEW_LINE> self._state_attribut...
Representation of FireServiceRota incidents sensor.
62599038b830903b9686ed40
class BootstrapPortal(BootstrapCommon): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(BootstrapPortal, self).__init__('portal') <NEW_LINE> self.params = PortalParams() <NEW_LINE> <DEDENT> def _bootstrap_complete(self): <NEW_LINE> <INDENT> BOOTSTRAP.FEEDBACK.block([ 'Finished bootstrapping Lense AP...
Class object for handling bootstrap of the Lense API portal.
62599038711fe17d825e1563
class NSNitroNserrSslBundleMaxCert(NSNitroSsl2Errors): <NEW_LINE> <INDENT> pass
Nitro error code 3665 Exceeded maximum Intermediate certificates limit of 9.
6259903830dc7b76659a09c1
class TaperedGrMFD(object): <NEW_LINE> <INDENT> def __init__(self, mo_t, mo_corner, b_gr): <NEW_LINE> <INDENT> self.mo_t = mo_t <NEW_LINE> self.mo_corner = mo_corner <NEW_LINE> self.b_gr = b_gr <NEW_LINE> <DEDENT> def get_ccdf(self, mo): <NEW_LINE> <INDENT> beta = 2./3.*self.b_gr <NEW_LINE> ratio = self.mo_t / mo <NEW_...
Implements the Tapered G-R (Pareto) MFD as described by Kagan (2002) GJI page 523. :parameter mo_t: :parameter mo_corner: :parameter b_gr:
6259903896565a6dacd2d853
class MAONPCSkeletonPatcher(_ASkeletonTweak): <NEW_LINE> <INDENT> tweak_name = _(u"Mayu's Animation Overhaul Skeleton Tweaker") <NEW_LINE> tweak_tip = _(u'Changes all (modded and vanilla) NPCs to use the MAO ' u'skeletons. Not compatible with VORB. Note: ONLY use if ' u'you have MAO installed.') <NEW_LINE> tweak_key ...
Changes all NPCs to use the right Mayu's Animation Overhaul Skeleton for use with MAO.
62599038d99f1b3c44d06834
class yellow(ColorGroup): <NEW_LINE> <INDENT> _colors = ('Yellow', 'LightYellow', 'LemonChiffon', 'LightGoldenrodYellow', 'PapayaWhip', 'Moccasin', 'PeachPuff', 'PaleGoldenrod', 'Khaki', 'DarkKhaki', 'Gold')
CSS "Yellow" Color Group as defined by https://www.w3schools.com/colors/colors_groups.asp {colors}
625990384e696a045264e6e9
class Solution: <NEW_LINE> <INDENT> def subdomainVisits(self, cpdomains): <NEW_LINE> <INDENT> if not cpdomains: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> res = {} <NEW_LINE> for c in cpdomains: <NEW_LINE> <INDENT> l = c.split(" ") <NEW_LINE> count, names = int(l[0]), l[1].split('.') <NEW_LINE> for i in range(le...
@param cpdomains: a list cpdomains of count-paired domains @return: a list of count-paired domains
62599038be383301e02549a6
class UserView(View): <NEW_LINE> <INDENT> def __init__(self, request): <NEW_LINE> <INDENT> template = '%(path)s/user.pt' % {'path': View.path['templates']} <NEW_LINE> super(UserView, self).__init__(request = request, template = template, actions = { 'login_user': self.login_user, 'logout_user': self.logout_user, 'activ...
This class contains the user view of fora.
62599038287bf620b6272d79
class ProxyServer(tornado.tcpserver.TCPServer): <NEW_LINE> <INDENT> def __init__(self, target_server,target_port, client_ssl_options=None,server_ssl_options=None, session_factory=maproxy.session.SessionFactory(), *args,**kwargs): <NEW_LINE> <INDENT> assert(session_factory , issubclass(session_factory.__class__,maproxy....
TCP Proxy Server .
6259903850485f2cf55dc10f
class DataRequirementSchema: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, nesting_list: List[str] = [], max_recursion_limit: Optional[int] = 2, include_extension: Optional[bool] = False, extension_fields: Optional[List[str]] = [ "valueBoolean...
Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
625990381d351010ab8f4caa
class Supervisor(BotPlugin): <NEW_LINE> <INDENT> @botcmd(split_args_with=None) <NEW_LINE> def supervisor(self, message, args): <NEW_LINE> <INDENT> output = 'Unable to process!' <NEW_LINE> if len(args) < 1: <NEW_LINE> <INDENT> return 'Not enough arguments. Try !supervisor help' <NEW_LINE> <DEDENT> scmd = args[0] <NEW_LI...
Bot Plugin to control supervisord
62599038d4950a0f3b111707
class SkipListHandler: <NEW_LINE> <INDENT> def __init__(self, skip_file_content=""): <NEW_LINE> <INDENT> self.__skip = [] <NEW_LINE> if not skip_file_content: <NEW_LINE> <INDENT> skip_file_content = "" <NEW_LINE> <DEDENT> self.__skip_file_lines = [line.strip() for line in skip_file_content.splitlines() if line.strip()]...
Skiplist file format: -/skip/all/source/in/directory* -/do/not/check/this.file +/dir/check.this.file -/dir/*
625990388da39b475be0437f
class DeleteClusterResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ClusterId = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.ClusterId = params.get("ClusterId") <NEW_LINE> self.RequestId = params.get("RequestI...
DeleteCluster返回参数结构体
625990383eb6a72ae038b7f9
class ChgPokeForm(Form): <NEW_LINE> <INDENT> newpoke = IntegerField("New id", validators=[DataRequired()]) <NEW_LINE> changepoke = SubmitField(u'Submit')
Change user's pokemon.
625990381f5feb6acb163d82
class Meta: <NEW_LINE> <INDENT> verbose_name_plural = 'entries'
Хранит дополнительную информацию по управленью модели.
62599038b830903b9686ed41
class Mem(models.Model): <NEW_LINE> <INDENT> server = models.ForeignKey('Asset', on_delete=models.CASCADE) <NEW_LINE> mem_sn = models.CharField('SN号', max_length=128, blank=True, null=True) <NEW_LINE> mem_model = models.CharField('内存型号', max_length=128, blank=True, null=True) <NEW_LINE> mem_manufacturer = models.CharFi...
内存配置
625990381d351010ab8f4cab
class DictTreeLib(object): <NEW_LINE> <INDENT> def __init__(self,tree): <NEW_LINE> <INDENT> self.tree = tree <NEW_LINE> print('Debug DictTreeLib Class',self.tree) <NEW_LINE> <DEDENT> def printOut(self): <NEW_LINE> <INDENT> print('DictTreeLib PrintOut:',self.tree) <NEW_LINE> return self.tree <NEW_LINE> <DEDENT> def getT...
Dictionary Tree Object Library handles nested dictionary trees
6259903882261d6c5273078d
class WlanExpNodesConfiguration(wn_config.NodesConfiguration): <NEW_LINE> <INDENT> def __init__(self, ini_file=None, serial_numbers=None, host_config=None): <NEW_LINE> <INDENT> super(WlanExpNodesConfiguration, self).__init__(ini_file=ini_file, serial_numbers=serial_numbers, host_config=host_config)
Class for WLAN Exp Node Configuration. This class is a child of the WARPNet Node configuration.
6259903894891a1f408b9fc0
class ChannelException: <NEW_LINE> <INDENT> pass
! Channel related exceptions.
6259903863f4b57ef008663c
class Solution(object): <NEW_LINE> <INDENT> def isPalindrome_change(self, head): <NEW_LINE> <INDENT> pre = None <NEW_LINE> slow = fast = head <NEW_LINE> while fast and fast.next: <NEW_LINE> <INDENT> fast = fast.next.next <NEW_LINE> slow.next, slow, pre = pre, slow.next, slow <NEW_LINE> <DEDENT> if fast: <NEW_LINE> <IND...
:type head: ListNode :rtype: bool
62599038baa26c4b54d5043b
class EntityFilterer(HTMLParser.HTMLParser): <NEW_LINE> <INDENT> _result = [] <NEW_LINE> def getResult(self): <NEW_LINE> <INDENT> return u''.join(self._result) <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> HTMLParser.HTMLParser.reset(self) <NEW_LINE> self._result = [] <NEW_LINE> <DEDENT> def _formatAttrs(sel...
A filter for HTML named and numeric entities that converts them to their equivalent Unicode characters.
62599038b57a9660fecd2c0d
class AnyWrapperMsgGenerator(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> @overloaded <NEW_LINE> def error(cls, ex): <NEW_LINE> <INDENT> return "Error - " + ex <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> @error.register(object, str) <NEW_LINE> def error_0(cls, strval): <NEW_LINE> <INDENT> return strval <NEW_LIN...
generated source for class AnyWrapperMsgGenerator
6259903896565a6dacd2d855
class TransitionError(Exception): <NEW_LINE> <INDENT> pass
Raised when an op attempts an invalid transition on a task.
62599038287bf620b6272d7d
class getGroups_result(object): <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, (apache.airavata.model.sharing.ttypes.UserGroup, apache.airavata.model.sharing.ttypes.UserGroup.thrift_spec), False), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = ...
Attributes: - success
62599038dc8b845886d54747
class Strong(convenience.AbstractWithOptionalEscapedText): <NEW_LINE> <INDENT> def get_default_html_tag(self): <NEW_LINE> <INDENT> return 'strong'
Renders a ``<strong>``.
62599038d164cc6175822107
class Context (tree.Visitor.Context): <NEW_LINE> <INDENT> def __init__ (self, attributes): <NEW_LINE> <INDENT> super ().__init__ (attributes) <NEW_LINE> self.contextCollectStage = True <NEW_LINE> self.colorMap = None <NEW_LINE> self.contextColorId = 0
Visitor for assigning rendering colors.
62599038b5575c28eb713593
class Variable: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = None <NEW_LINE> self.plotPath = None <NEW_LINE> self.type = None <NEW_LINE> self.namespace = None <NEW_LINE> self.moosePath = None <NEW_LINE> self.xml = None <NEW_LINE> <DEDENT> def __init__(self, name, type): <NEW_LINE> <INDENT> se...
Variable to plot.
62599038d10714528d69ef55
class _Getch: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.impl = _Getch_windows() <NEW_LINE> <DEDENT> except ImportError: <NEW_LINE> <INDENT> self.impl = _Getch_unix() <NEW_LINE> <DEDENT> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return self.impl()
Gets a single character from standard input. Does not echo to the screen.
6259903866673b3332c31589
class Rapid_i(Platform): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.platformName = "Rapid-i" <NEW_LINE> self.tags = ["trips"] <NEW_LINE> self.isValidMode = {} <NEW_LINE> self.isValidMode["phonefy"] = False <NEW_LINE> self.isValidMode["usufy"] = True <NEW_LINE> self.isValidMode["searchfy"] = False ...
A <Platform> object for Rapid-i.
6259903830c21e258be999a2
class UserGeneratedAnswer(ORMBase): <NEW_LINE> <INDENT> __tablename__ = 'userGeneratedAnswer' <NEW_LINE> __table_args__ = dict( mysql_engine='InnoDB', mysql_charset='utf8', ) <NEW_LINE> ugAnswerId = sqlalchemy.schema.Column( sqlalchemy.types.Integer(), primary_key=True, autoincrement=True, ) <NEW_LINE> studentId = sqla...
Answers from students evaluating user-generated questions
62599038796e427e5384f911
class EditResult(JsonGetter): <NEW_LINE> <INDENT> def __init__(self, res_dict, feature_id=None): <NEW_LINE> <INDENT> RequestError(res_dict) <NEW_LINE> self.json = munch.munchify(res_dict) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def success_count(l): <NEW_LINE> <INDENT> return len([d for d in l if d.get(SUCCESS_STA...
class to handle Edit operation results
6259903810dbd63aa1c71d69
class ListNamedShadowsForThingRequest(rpc.Shape): <NEW_LINE> <INDENT> def __init__(self, *, thing_name: typing.Optional[str] = None, next_token: typing.Optional[str] = None, page_size: typing.Optional[int] = None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.thing_name = thing_name <NEW_LINE> self.next_token...
ListNamedShadowsForThingRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: thing_name: next_token: page_size: Attributes: thing_name: next_token: page_size:
6259903873bcbd0ca4bcb41e
class NifOp: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> op = None <NEW_LINE> props = None <NEW_LINE> @staticmethod <NEW_LINE> def init(operator): <NEW_LINE> <INDENT> NifOp.op = operator <NEW_LINE> NifOp.props = operator.properties <NEW_LINE> NifLog.op = operator
A simple reference holder class but enables classes to be decoupled. This module require initialisation to function.
62599038d53ae8145f9195fa
class TrustMiddleware(wsgi.Middleware): <NEW_LINE> <INDENT> def process_request(self, req): <NEW_LINE> <INDENT> trusts = list_trust(req.context, req.context.user_id) <NEW_LINE> LOG.debug('Trust list of user %s is %s' % (req.context.user_id, str(trusts))) <NEW_LINE> req.context.trusts = trusts
This middleware gets trusts information of the requester and fill it into request context. This information will be used by senlin engine later to support privilege management.
6259903863f4b57ef008663e
@attr(shard=1) <NEW_LINE> class TestNewInstructorDashboardEmailViewXMLBacked(SharedModuleStoreTestCase): <NEW_LINE> <INDENT> MODULESTORE = TEST_DATA_MIXED_MODULESTORE <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(TestNewInstructorDashboardEmailViewXMLBacked, cls).setUpClass() <NEW_LI...
Check for email view on the new instructor dashboard
6259903816aa5153ce401682
class EqualEarth(_WarpedRectangularProjection): <NEW_LINE> <INDENT> def __init__(self, central_longitude=0, false_easting=None, false_northing=None, globe=None): <NEW_LINE> <INDENT> if PROJ_VERSION < (5, 2, 0): <NEW_LINE> <INDENT> raise ValueError('The EqualEarth projection requires Proj version ' '5.2.0, but you are u...
An Equal Earth projection. This projection is pseudocylindrical, and equal area. Parallels are unequally-spaced straight lines, while meridians are equally-spaced arcs. It is intended for world maps. Note ---- To use this projection, you must be using Proj 5.2.0 or newer. References ---------- Bojan Šavrič, Tom Pat...
6259903807d97122c4217e33
class HomePageView(UploadFormMixin, ListView): <NEW_LINE> <INDENT> model = Activity <NEW_LINE> template_name = 'home.html' <NEW_LINE> context_object_name = 'activities' <NEW_LINE> paginate_by = 25 <NEW_LINE> def get_queryset(self) -> QuerySet: <NEW_LINE> <INDENT> return get_activities_for_user(self.request.user) <NEW_L...
Handle logged-in user home page
6259903873bcbd0ca4bcb41f
class PboInfo: <NEW_LINE> <INDENT> def __init__(self, filename, packing_method=0, original_size=0, reserved=0, timestamp=0, data_size=-1, fp=None): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.packing_method = packing_method <NEW_LINE> self.original_size = original_size <NEW_LINE> self.reserved = reserv...
PboInfo class
6259903823e79379d538d697
class CausalConv1d(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, kernel_size, dilation=1, bias=True, pad="ConstantPad1d", pad_params={"value": 0.0}): <NEW_LINE> <INDENT> super(CausalConv1d, self).__init__() <NEW_LINE> self.pad = getattr(torch.nn, pad)((kernel_size - 1) * dilation, ...
CausalConv1d module with customized initialization.
62599038ec188e330fdf9a2e
class WorkflowNotFoundException(Exception): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> super(WorkflowNotFoundException, self).__init__("The requested workflow run wasn't found.")
Raised when the requested run ID is not found.
6259903823e79379d538d698
class ProjectLookup: <NEW_LINE> <INDENT> exposed = True <NEW_LINE> @staticmethod <NEW_LINE> def _get_projects_details(project_id=None): <NEW_LINE> <INDENT> lookup_url = u'{0}/projectinfo/by_project_id/{1}'.format( get_config().get('metadata', 'endpoint_url'), project_id ) <NEW_LINE> return requests.get(url=lookup_url)....
Retrieves details of a given project.
6259903830c21e258be999a4
@ajax_form_config(name='properties.html', context=IRESTCallerTask, layer=IPyAMSLayer, permission=MANAGE_TASKS_PERMISSION) <NEW_LINE> class RESTTaskEditForm(BaseTaskEditForm): <NEW_LINE> <INDENT> pass
REST task edit form
62599038b830903b9686ed44
class DownscalingLSF(DownscalingBase, LSFTask): <NEW_LINE> <INDENT> pass
downscaling on lsf cluster
6259903896565a6dacd2d857
class SockeyeModel: <NEW_LINE> <INDENT> def __init__(self, config: ModelConfig): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> logger.info("%s", self.config) <NEW_LINE> self.encoder = None <NEW_LINE> self.attention = None <NEW_LINE> self.decoder = None <NEW_LINE> self.rnn_cells = [] <NEW_LINE> self.built = False ...
SockeyeModel shares components needed for both training and inference. ModelConfig contains parameters and their values that are fixed at training time and must be re-used at inference time. :param config: Model configuration.
6259903830c21e258be999a5
class User: <NEW_LINE> <INDENT> def __init__(self,fullname, email, username, password): <NEW_LINE> <INDENT> self.fullname = fullname <NEW_LINE> self.email = email <NEW_LINE> self.username = username <NEW_LINE> self.password = password <NEW_LINE> <DEDENT> user_list = [] <NEW_LINE> def save_user(self): <NEW_LINE> <INDENT...
Class that generates new users login system
62599038dc8b845886d5474b
class Profile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User) <NEW_LINE> rank_choices = ( ('Diagnostic', 'Diagnostic'), ('Research', 'Research'), ('Manager', 'Manager'), ('Quality', 'Quality'), ('Super', 'Super'), ) <NEW_LINE> rank = models.CharField(max_length=100, choices=rank_choices, default='D...
Extends Django User Profile. Certain features of the website check this model access priviledges. Any kind of field can be added to further store information on user. Defaults are created whenever a new user is created
6259903876d4e153a661db3e
class GetEmailIdentityRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.EmailIdentity = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.EmailIdentity = params.get("EmailIdentity") <NEW_LINE> memeber_set = set(params.keys()) <NEW_LINE> for name, va...
GetEmailIdentity请求参数结构体
62599038a8ecb033258723b6
class HalfBeam(Load): <NEW_LINE> <INDENT> def __init__(self, nelx, nely, E, nu): <NEW_LINE> <INDENT> super().__init__(nelx, nely, E, nu) <NEW_LINE> <DEDENT> def force(self): <NEW_LINE> <INDENT> f = super().force() <NEW_LINE> f[1] = -1 <NEW_LINE> return f <NEW_LINE> <DEDENT> def fixdofs(self): <NEW_LINE> <INDENT> n1, n2...
This child of the Load class represents the loading conditions of a half beam. Only half of the beam is considered due to the symetry about the y-axis. Illustration ------------ F | V > #-----#-----#-----#-----#-----#-----# | | | | | | | > #-----#-----#-----#-----#-----#---...
62599038cad5886f8bdc5948
class iPerf3_v6Test(iPerf3Test): <NEW_LINE> <INDENT> opts = "-6" <NEW_LINE> def runTest(self): <NEW_LINE> <INDENT> wan = self.dev.wan <NEW_LINE> self.target_ip = wan.get_interface_ip6addr(wan.iface_dut) <NEW_LINE> super(iPerf3_v6Test, self).runTest()
iPerf3 ipv6 generic performance tests
6259903826068e7796d4dae0
class SponsorFile(models.Model): <NEW_LINE> <INDENT> sponsor = models.ForeignKey('Sponsor', on_delete=models.CASCADE) <NEW_LINE> file = models.FileField(_('Sponsor file'), upload_to=sponsors_upload_to) <NEW_LINE> name = models.CharField(_('Sponsor file name'), max_length=128) <NEW_LINE> description = models.CharField(_...
Sponsor file class handler.
625990385e10d32532ce41cf
class Timer(Animal): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> print("Start...")
docstring for Timer
62599038e76e3b2f99fd9ba4
class TemplateContent(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> verbose_name = _('template content') <NEW_LINE> verbose_name_plural = _('template contents') <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def initialize_type(cls, TEMPLATE_LOADERS=DEFAULT_TEMPLATE_LOADERS)...
This content type scans all template folders for files in the ``content/template/`` folder and lets the website administrator select any template from a set of provided choices. The templates aren't restricted in any way.
6259903823e79379d538d699
class TextProcessor(object): <NEW_LINE> <INDENT> tags = re.compile('<[^>]*>') <NEW_LINE> p_endstart_tags = re.compile('</p>\s*<p>') <NEW_LINE> p_startonlyhack_tags = re.compile('<p>') <NEW_LINE> links = re.compile('(https?://\S*)') <NEW_LINE> domain_re = re.compile('https?://([^ /]*)') <NEW_LINE> do_resave_all = False ...
Static class for doing description processing.
62599038d6c5a102081e32bf
class LibTool(GNUTarPackage): <NEW_LINE> <INDENT> name = 'libtool' <NEW_LINE> built_path = 'libtool' <NEW_LINE> installed_path = 'bin/libtool' <NEW_LINE> tar_compression = 'gz'
:identifier: libtool-<version> :param str version: version to download
62599038b57a9660fecd2c13
class USBRaw(object): <NEW_LINE> <INDENT> CONFIGURATION = None <NEW_LINE> INTERFACE = (0, 0) <NEW_LINE> ENDPOINTS = (None, None) <NEW_LINE> timeout = 2000 <NEW_LINE> find_devices = staticmethod(find_devices) <NEW_LINE> def __init__(self, vendor=None, product=None, serial_number=None, device_filters=None, timeout=None, ...
Base class for drivers that communicate with instruments via usb port using pyUSB
62599038b830903b9686ed45
class BaseModel(): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> form = "%Y-%m-%dT%H:%M:%S.%f" <NEW_LINE> if kwargs: <NEW_LINE> <INDENT> for k, v in kwargs.items(): <NEW_LINE> <INDENT> if k == "created_at" or k == "updated_at": <NEW_LINE> <INDENT> self.__dict__[k] = datetime.strptime(v, f...
Base Model
625990381d351010ab8f4cb3
class TestYamlFileReader(object): <NEW_LINE> <INDENT> @pytest.fixture <NEW_LINE> def template_yaml(self, tmpdir): <NEW_LINE> <INDENT> test_file = tmpdir.mkdir("TestLoadTemplateTextFile").join("sample.yaml") <NEW_LINE> test_file.write("temp: sample") <NEW_LINE> return test_file <NEW_LINE> <DEDENT> def test_reading_temp_...
test code to YamlFIleReader.
62599038c432627299fa4191
class BaseNodeData(models.Model): <NEW_LINE> <INDENT> node = models.OneToOneField('flowr.Node') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True
Subclasses of this object are used to store information associated with a :class:`Node` in the :class:`DCCGraph`.
6259903896565a6dacd2d858
class GetLenders(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Kiva/Loans/GetLenders') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return GetLendersInputSet() <NEW_LINE> <DEDENT> def _make_result_set(...
Create a new instance of the GetLenders Choreography. A TembooSession object, containing a valid set of Temboo credentials, must be supplied.
62599038b57a9660fecd2c14
class DatespanFilter(BaseReportFilter): <NEW_LINE> <INDENT> template = "reports/filters/datespan.html" <NEW_LINE> label = ugettext_lazy("Date Range") <NEW_LINE> slug = "datespan" <NEW_LINE> inclusive = True <NEW_LINE> default_days = 30 <NEW_LINE> @property <NEW_LINE> def datespan(self): <NEW_LINE> <INDENT> datespan = D...
A filter that returns a startdate and an enddate. This is the standard datespan filter that gets pulled into request with the decorator @datespan_in_request
625990388a43f66fc4bf3326
class CentralPane(RecycleView): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(CentralPane, self).__init__(**kwargs) <NEW_LINE> self.data = kwargs.get('data', 'nothing found')
The central pane has two text output sub-panes, both containing some text. The first is an article title; the second - its respective date. The central pane should be Recycle View.
6259903891af0d3eaad3afcc
class RollParser(commands.Converter): <NEW_LINE> <INDENT> async def convert(self, ctx, argument): <NEW_LINE> <INDENT> matches = re.search(r"(?:(\d*)-)?(\d*)", argument) <NEW_LINE> minshit = matches.group(1) or 1 <NEW_LINE> maxshit = matches.group(2) or 100 <NEW_LINE> return (int(minshit), int(maxshit))
This makes parsing the roll thing into a function annotation
6259903863f4b57ef0086640
class BadPDUType (SNMPEngineError): <NEW_LINE> <INDENT> pass
Bad SNMP PDU type
625990386e29344779b017eb
class SecsS07F19(SecsStreamFunction): <NEW_LINE> <INDENT> _stream = 7 <NEW_LINE> _function = 19 <NEW_LINE> _data_format = None <NEW_LINE> _to_host = False <NEW_LINE> _to_equipment = True <NEW_LINE> _has_reply = True <NEW_LINE> _is_reply_required = True <NEW_LINE> _is_multi_block = False
current equipment process program - request. **Structure**:: >>> import secsgem.secs >>> secsgem.secs.functions.SecsS07F19 Header only **Example**:: >>> import secsgem.secs >>> secsgem.secs.functions.SecsS07F19() S7F19 W . :param value: parameters for this function (see example) :type value...
6259903807d97122c4217e37
class Operator(object): <NEW_LINE> <INDENT> def __init__(self, tag=None): <NEW_LINE> <INDENT> self.tag = tag <NEW_LINE> <DEDENT> @property <NEW_LINE> def _tagstr(self): <NEW_LINE> <INDENT> return ' "%s"' % self.tag if self.tag is not None else '' <NEW_LINE> <DEDENT> @property <NEW_LINE> def reads(self): <NEW_LINE> <IND...
Base class for operator instances understood by nengo.Simulator. The lifetime of a Signal during one simulator timestep: 0. at most one set operator (optional) 1. any number of increments 2. any number of reads 3. at most one update A signal that is only read can be considered a "constant". A signal that is both se...
62599038ac7a0e7691f73682
class LongRunningCommand(AbstractCommand): <NEW_LINE> <INDENT> done: bool = False <NEW_LINE> def execute(self) -> int: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> for _ in track(range(10), description='Processing...'): <NEW_LINE> <INDENT> time.sleep(1) <NEW_LINE> <DEDENT> <DEDENT> except KeyboardInterrupt: <NEW_LINE> ...
A long running command class
62599038baa26c4b54d50442
class Ticker(object): <NEW_LINE> <INDENT> url = 'http://www.feixiaohao.com/exchange/bithumb/' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.ua = UserAgent() <NEW_LINE> <DEDENT> def ticker(self, url, num): <NEW_LINE> <INDENT> html = requests.get(url, headers={'User-Agent': self.ua.random}) <NEW_LINE> response ...
通过url获取详情页币种信息
62599038d6c5a102081e32c1
class IsPostOnly(permissions.BasePermission): <NEW_LINE> <INDENT> safe_methods = ('POST',) <NEW_LINE> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> return request.method in self.safe_methods
Custom permission to only allow owners of an object to edit it.
62599038b830903b9686ed46