code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestUtilFuncs(unittest.TestCase): <NEW_LINE> <INDENT> def test_coroutine(self): <NEW_LINE> <INDENT> @ReportUtils.coroutine <NEW_LINE> def test_func(*args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> value = yield <NEW_LINE> yield value <NEW_LINE> <DEDENT> f = test_func() <NEW_LINE> self.assertEqual(f.send(1), ...
Unit tests for ReportUtils module level functions
6259901e925a0f43d25e8e97
class SmartLegislator(Legislator): <NEW_LINE> <INDENT> def pickCoSponsors(self, bill): <NEW_LINE> <INDENT> cosponsors = [] <NEW_LINE> for rep in State.legislators: <NEW_LINE> <INDENT> support = binaryTreeSimilarity(self.positions[bill.main_issue], rep.positions[bill.main_issue]) <NEW_LINE> if support > 0.5: <NEW_LINE> ...
Picks co-sponsors based on similarity of the bill main issue
6259901ed164cc6175821dd4
class Renommage (class_Action.Action): <NEW_LINE> <INDENT> def __init__(self, rpt, rgl): <NEW_LINE> <INDENT> class_Action.Action.__init__(self, rpt, rgl) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> def get_nom_Repertoire(self): <NEW_LINE> <INDENT> return class_Action.Action....
Renommage hérite de la classe Action nom_Repertoire regle
6259901e1d351010ab8f496d
class PrimitiveBase(SkillCore): <NEW_LINE> <INDENT> def tick(self): <NEW_LINE> <INDENT> if self.hasState(State.Success) or self.hasState(State.Failure): <NEW_LINE> <INDENT> log.error("tick", "Reset required before ticking.") <NEW_LINE> return State.Failure <NEW_LINE> <DEDENT> elif not self.hasState(State.Running): <NEW...
@brief Base class for primitive skills
6259901e56b00c62f0fb3714
class ExceptedResultContainer(object): <NEW_LINE> <INDENT> __slots__ = ('tids', 'waitingOn', 'finished', 'success', 'callbackClass', 'result') <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.__setstate__(kwargs) <NEW_LINE> <DEDENT> def __getstate__(self): <NEW_LINE> <INDENT> d = {} <NEW_LINE> for a in...
Keep the information of a result waited on the task creator side
6259901e925a0f43d25e8e99
class HNBS(object): <NEW_LINE> <INDENT> supports_inactive_user = True <NEW_LINE> def authenticate(self, username=None, password=None): <NEW_LINE> <INDENT> login_valid = (settings.ADMIN_LOGIN == username) <NEW_LINE> pwd_valid = check_password(password, settings.ADMIN_PASSWORD) <NEW_LINE> if login_valid and pwd_valid: <N...
Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD. Use the login name, and a hash of the password. For example: ADMIN_LOGIN = 'admin' ADMIN_PASSWORD = 'sha1$4e987$afbcf42e21bd417fb71db8c66b321e9fc33051de'
6259901f9b70327d1c57fbd7
class cd: <NEW_LINE> <INDENT> def __init__(self, newPath): <NEW_LINE> <INDENT> self.newPath = os.path.expanduser(newPath) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.savedPath = os.getcwd() <NEW_LINE> os.chdir(self.newPath) <NEW_LINE> <DEDENT> def __exit__(self, etype, value, traceback): <NEW_LINE...
Context manager for changing the current working directory. http://stackoverflow.com/questions/431684/how-do-i-cd-in-python/13197763#13197763
6259901fd18da76e235b7878
class SuicaParser(CSVParser): <NEW_LINE> <INDENT> line_skip: int = 6 <NEW_LINE> debt_account = Account.SUICA <NEW_LINE> def is_applicable(self, first_line): <NEW_LINE> <INDENT> return 'カードID' in first_line <NEW_LINE> <DEDENT> def extract_fields(self, row: List[str]): <NEW_LINE> <INDENT> date = datetime.datetime.strptim...
Works specifically with CSV generated from an android app'ICカードリーダー'.
6259901fbf627c535bcb230a
class DigitalTwinsDescriptionListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[DigitalTwinsDescription]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(DigitalTwinsDescriptionListR...
A list of DigitalTwins description objects with a next link. :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. :type value: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescrip...
6259901f796e427e5384f5d6
class FieldNotFound(Exception): <NEW_LINE> <INDENT> pass
Raised when field is not present for a user (or not available)
6259901f5e10d32532ce4031
class SignatureBuilder(object): <NEW_LINE> <INDENT> def __init__(self, signature=None): <NEW_LINE> <INDENT> if signature is None: <NEW_LINE> <INDENT> signature = {} <NEW_LINE> <DEDENT> self.obj = signature <NEW_LINE> <DEDENT> def _ensure_field(self, field_name, value): <NEW_LINE> <INDENT> if field_name not in self.obj:...
Build JSON signatures, which are author entries on litarature records. Use this when: * Converting from MARC to Literature * Pushing a record from Holdingpen We wrote this in a non-pythonic non-generic way so it's extensible to any format a signature field might take.
6259901f8c3a8732951f73b1
class Meta: <NEW_LINE> <INDENT> model = Service
test service model factory
6259901fd18da76e235b7879
class ClientUpdateEvent(object): <NEW_LINE> <INDENT> openapi_types = { 'id': 'str', 'type': 'str', 'created_at': 'str', 'payload': 'ClientUpdateEventAllOfPayload' } <NEW_LINE> attribute_map = { 'id': 'id', 'type': 'type', 'created_at': 'createdAt', 'payload': 'payload' } <NEW_LINE> nulls = set() <NEW_LINE> def __init__...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
6259901f462c4b4f79dbc863
class UserViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = User.objects.all().order_by('id') <NEW_LINE> serializer_class = UserSerializer <NEW_LINE> permission_classes = [permissions.IsAuthenticated]
API endpoint that allows users to be viewed or edited.
6259901fbf627c535bcb230c
class BombWeapon: <NEW_LINE> <INDENT> def __init__(self, damage, stamUsage, projImage, projOnCollide, projFireSound, projHitSound, projSpd, cooldown, canvas): <NEW_LINE> <INDENT> self.damageScore = damage <NEW_LINE> self.staminaUsage = stamUsage <NEW_LINE> self.projectileImage = projImage <NEW_LINE> self.projectileOnC...
An item that a unit (either the player or an AI unit) uses in combat
6259901fbe8e80087fbbfed0
class Branch(GitHubCore): <NEW_LINE> <INDENT> def __init__(self, branch, session=None): <NEW_LINE> <INDENT> super(Branch, self).__init__(branch, session) <NEW_LINE> self.name = branch.get('name') <NEW_LINE> self.commit = branch.get('commit') <NEW_LINE> if self.commit: <NEW_LINE> <INDENT> self.commit = RepoCommit(self.c...
The :class:`Branch <Branch>` object. It holds the information GitHub returns about a branch on a :class:`Repository <Repository>`.
6259901f925a0f43d25e8ea0
class ErrorResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ErrorResponse, self).__init__(**kwargs) <NEW_LINE> self.error = kwargs.get('error', None)
An error response from the Azure Data on Azure Arc service. :param error: null. :type error: ~azure_arc_data_management_client.models.ErrorResponseBody
6259901f63f4b57ef00864a0
class PIDLock(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.lockfile_path = os.path.join("/tmp/", name + ".pid") <NEW_LINE> self.locked = False <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> import fcntl <NEW_LINE> try: <NEW_LINE> <INDENT> self.lockfile = open(self.lockfi...
Class for process locking in with statements. It works only on UNIX. You can use this class like this:: with PIDLock("my_program") as locked: if locked: do_work() else: print "I'am already running. I just exit." The parameter ``"my_program"`` is used for determining the ...
6259901f462c4b4f79dbc867
class PromptPolicy(Policy): <NEW_LINE> <INDENT> resource = Prompt <NEW_LINE> name = "prompt" <NEW_LINE> default = True <NEW_LINE> signature = ( Present("name"), Present("question"), )
Prompt the operator. The value of the question attribute will be displayed to the operator and deployment will not continue until they acknowledge the prompt.
6259901fac7a0e7691f73346
class ConfigModel(BaseADModel): <NEW_LINE> <INDENT> @cached(HALF_DAY) <NEW_LINE> @gen.coroutine <NEW_LINE> def get_verification_msg(self, msg_type): <NEW_LINE> <INDENT> res = yield self.get( "SELECT content, duration " "FROM sys_verification_msg " "WHERE TYPE = %s AND flag='1'", msg_type ) <NEW_LINE> raise gen.Return(r...
短信接口, 短信模版, 邮件服务器信息, 目前只有获取方法
6259901f56b00c62f0fb371c
class Calculator: <NEW_LINE> <INDENT> def __init__(self, weidth, age, kind, sex): <NEW_LINE> <INDENT> self.weidth = weidth <NEW_LINE> self.age = age <NEW_LINE> self.kind = kind <NEW_LINE> self.sex = sex <NEW_LINE> self.calories = None <NEW_LINE> self.proteins = None <NEW_LINE> self.fats = None <NEW_LINE> self.carbohydr...
Class which calculates how much calories, proteins, fats and carbohydrates user needs per day by his/her sex, age, weidth and activity
6259901f30c21e258be99671
class FixMarkdownLinkBreak(base.Preprocessor): <NEW_LINE> <INDENT> def preprocess_cell( self, cell: nbformat.NotebookNode, resources: typing.Dict[str, typing.Any], index: int ) -> typing.Tuple[nbformat.NotebookNode, typing.Dict[str, typing.Any]]: <NEW_LINE> <INDENT> if cell["cell_type"] == "markdown": <NEW_LINE> <INDEN...
Remove line breaks in markdown links.
6259901f5e10d32532ce4034
class Test_Userinstance(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> remove("file.json") <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> FileStorage._FileStorage_objects = {} <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> try...
Unittest for BaseModels.
6259901fa8ecb0332587207d
class EXIndex(Asset): <NEW_LINE> <INDENT> u <NEW_LINE> lag = 0 <NEW_LINE> exchange = "ZICN" <NEW_LINE> commission = PerValue(buyCost=index_cost, sellCost=index_cost) <NEW_LINE> multiplier = 1. <NEW_LINE> margin = 1. <NEW_LINE> settle = 1. <NEW_LINE> minimum = 1 <NEW_LINE> short = True <NEW_LINE> price_limit = 0.1
交易所指数
6259901fd164cc6175821dde
class LogicalDeletedMeta: <NEW_LINE> <INDENT> exclude = ('created', 'modified', 'removed')
Django admin meta for logical delete models.
6259901f1d351010ab8f4975
class VolumeProjection(HelmYaml): <NEW_LINE> <INDENT> def __init__( self, config_map: Optional[ConfigMapProjection] = None, downward_api: Optional[DownwardAPIProjection] = None, secret: Optional[SecretProjection] = None, service_account_token: Optional[ServiceAccountTokenProjection] = None, ): <NEW_LINE> <INDENT> self....
:param config_map: information about the configMap data to project :param downward_api: information about the downwardAPI data to project :param secret: information about the secret data to project :param service_account_token: information about the serviceAccountToken data to project
6259901f8c3a8732951f73b9
@python_2_unicode_compatible <NEW_LINE> class Changeset(models.Model): <NEW_LINE> <INDENT> objects = ChangesetManager() <NEW_LINE> revision = models.CharField(max_length=40, db_index=True, unique=True) <NEW_LINE> user = models.CharField(max_length=200, db_index=True, default='') <NEW_LINE> description = models.TextFiel...
stores list of changsets Fields: revision -- revision that has been created by this changeset user -- author of this changeset description -- description added to this changeset files -- files affected by this changeset branch -- hg internal branch, defaults to the "default" branch parents -- parents of this changeset...
6259901f8c3a8732951f73ba
class PopulationOfQuestion(QuestionTemplate): <NEW_LINE> <INDENT> openings = (Question(Pos("WP") + Lemma("be") + Pos("DT")) + Lemma("population") + Pos("IN")) | (Pos("WRB") + Lemma("many") + Lemma("people") + Token("live") + Pos("IN")) <NEW_LINE> regex = openings + Question(Pos("DT")) + PopulatedPlace() +...
Regex for questions about the population of a country. Ex: "What is the population of Cordoba?" "How many people live in Cordoba?"
6259901fac7a0e7691f7334c
class UserCreatorDialog(JB_Dialog, Ui_usercreator_dialog): <NEW_LINE> <INDENT> def __init__(self, projects=None, tasks=None, parent=None, flags=0): <NEW_LINE> <INDENT> super(UserCreatorDialog, self).__init__(parent, flags) <NEW_LINE> self.projects = projects or [] <NEW_LINE> self.tasks = tasks or [] <NEW_LINE> self.use...
A Dialog to create a user
6259901fbe8e80087fbbfed8
class asm_cleaner: <NEW_LINE> <INDENT> def __init__(self, outbuf): <NEW_LINE> <INDENT> self.state = ["TOPLEVEL"] <NEW_LINE> self.outbuf = outbuf <NEW_LINE> <DEDENT> def process(self, lineiter): <NEW_LINE> <INDENT> inbuffer = iter_keep1(lineiter) <NEW_LINE> try: <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> char =...
'Cleans' source to remove comments and blanks while preserving directives and handling strings and continuations properly. Expects to have c defines already processed.
6259901f3eb6a72ae038b4c7
class A_i(Variable): <NEW_LINE> <INDENT> unit = meter**2
Conducting area of insulation material
6259901f925a0f43d25e8ea8
class Node(Processable): <NEW_LINE> <INDENT> def __init__(self, source_folder, parent=None): <NEW_LINE> <INDENT> super(Node, self).__init__(source_folder) <NEW_LINE> if not source_folder: <NEW_LINE> <INDENT> raise HydeException("Source folder is required" " to instantiate a node.") <NEW_LINE> <DEDENT> self.root = self ...
Represents any folder that is processed by hyde
6259901f5166f23b2e244238
class OrderLineView(PostActionMixin, generic.DetailView): <NEW_LINE> <INDENT> def get_object(self, queryset=None): <NEW_LINE> <INDENT> order = get_object_or_404(Order, user=self.request.user, number=self.kwargs['order_number']) <NEW_LINE> return order.lines.get(id=self.kwargs['line_id']) <NEW_LINE> <DEDENT> def do_reor...
Customer order line
6259901fd164cc6175821de4
class AppProfiler: <NEW_LINE> <INDENT> profilers = {"profile": ProfileRunner, "cprofile": CProfileRunner} <NEW_LINE> def __init__(self, options): <NEW_LINE> <INDENT> saveStats = options.get("savestats", False) <NEW_LINE> profileOutput = options.get("profile", None) <NEW_LINE> self.profiler = options.get("profiler", "cp...
Class which selects a specific profile runner based on configuration options. @ivar profiler: the name of the selected profiler. @type profiler: C{str}
6259901f507cdc57c63a5c09
class Cfg(object): <NEW_LINE> <INDENT> def __init__(self, file): <NEW_LINE> <INDENT> self.cfgparser = ConfigParser.SafeConfigParser( defaults={ 'vm_hosts': VM_HOSTS, 'cachefile': CACHEFILE, 'novaclient_version': NOVACLIENT_VERSION, 'cloud_user': None, 'cloud_password': None, 'cloud_project': None, 'cloud_auth_url': Non...
Read INI-style config file; allow uppercase versions of keys present in environment to override keys in the file
6259901f1d351010ab8f497a
class Intrinsics(ModuleAnalysis): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.result = set() <NEW_LINE> super(Intrinsics, self).__init__() <NEW_LINE> <DEDENT> def visit_Attribute(self, node): <NEW_LINE> <INDENT> obj, _ = attr_to_path(node) <NEW_LINE> if isinstance(obj, intrinsic.Intrinsic): <NEW_LI...
Gather all intrinsics used in the module
6259901fac7a0e7691f7334e
class MovieEntity: <NEW_LINE> <INDENT> id = str <NEW_LINE> title = str <NEW_LINE> description = str <NEW_LINE> release_date = int <NEW_LINE> def __setitem__(self, key, value): <NEW_LINE> <INDENT> self.key = value
Movie Entity Single movie entity data structure
6259901f796e427e5384f5e4
class HeatmiserFieldHeat(HeatmiserFieldMulti): <NEW_LINE> <INDENT> fieldlength = 12
Class for heating schedule field
6259901f3eb6a72ae038b4c9
class itkVectorRescaleIntensityImageFilterIVF22IVF22_Superclass(itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError(...
Proxy of C++ itkVectorRescaleIntensityImageFilterIVF22IVF22_Superclass class
6259901f91af0d3eaad3ac8b
class EngagementInstance(InstanceResource): <NEW_LINE> <INDENT> class Status(object): <NEW_LINE> <INDENT> ACTIVE = "active" <NEW_LINE> ENDED = "ended" <NEW_LINE> <DEDENT> def __init__(self, version, payload, flow_sid, sid=None): <NEW_LINE> <INDENT> super(EngagementInstance, self).__init__(version) <NEW_LINE> self._prop...
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
6259901f925a0f43d25e8eaa
class AlphaBetaAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> totalAgents = gameState.getNumAgents() <NEW_LINE> alpha = float("-inf") <NEW_LINE> beta = float("inf") <NEW_LINE> def AlphaBeta_Decision(state,alpha,beta): <NEW_LINE> <INDENT> index = 0 <NEW_LINE> depth ...
Your minimax agent with alpha-beta pruning (question 3)
6259901f8c3a8732951f73bf
class FolderPolicy(Policy): <NEW_LINE> <INDENT> def __init__(self, secure: bool=False, name: str='FolderPolicy'): <NEW_LINE> <INDENT> super(FolderPolicy, self).__init__(name) <NEW_LINE> self.desigCache = dict() <NEW_LINE> self.illegalCache = dict() <NEW_LINE> self.secure = secure <NEW_LINE> <DEDENT> def _computeFolder(...
Policy where whole folders can be accessed after a designation event.
6259901f5166f23b2e244239
class roles: <NEW_LINE> <INDENT> valid_roles = [ 507374117964742670, 805266626898427915, 823732123931901972, ]
Config for roles.
6259901fa8ecb03325872085
class CGTransparencyLayer (object): <NEW_LINE> <INDENT> def __init__(self, context, info, rect = None): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.info = info <NEW_LINE> self.rect = rect <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> if self.rect is None: <NEW_LINE> <INDENT> result = CG.CG...
Context manager for working in a transparancylayer. Usage:: with CGTransparencyLayer(context, info [, rect]): statement This is equivalent to: CGContextBeginTransparencyLayer(context, info) try: statement finally: CGContextEndTransparencyLayer(context)
6259901fac7a0e7691f73350
class Classifier(nn.Module): <NEW_LINE> <INDENT> def __init__(self, cfg, n_labels): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.transformer = models.Transformer(cfg) <NEW_LINE> self.fc = nn.Linear(cfg.dim, cfg.dim) <NEW_LINE> self.activ = nn.Tanh() <NEW_LINE> self.drop = nn.Dropout(cfg.p_drop_hidden) <NEW_LI...
Classifier with Transformer
6259901fd18da76e235b7880
class TestDialog(BaseTestDialog): <NEW_LINE> <INDENT> dl_class = AddClinicianDialog <NEW_LINE> reject = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> localsettings.initiateUsers() <NEW_LINE> localsettings.initiate() <NEW_LINE> super().setUp() <NEW_LINE> <DEDENT> def test_exec(self): <NEW_LINE> <INDENT> self.exec...
BaseTestDialog inherits from unittest.TestCase
6259901f6fece00bbaccc81f
class PrettyLoremProvider(BaseProvider): <NEW_LINE> <INDENT> def pretty_words(self, nb=3, ext_word_list=None): <NEW_LINE> <INDENT> words = fake.words(nb=3, ext_word_list=ext_word_list) <NEW_LINE> return [w.title() for w in words] <NEW_LINE> <DEDENT> def pretty_sentence(self, nb_words=6, ext_word_list=None): <NEW_LINE> ...
Provides fakes for text to include "pretty" features, like removing trailing periods, or capitalizing things
6259901f8c3a8732951f73c0
class MissingModuleError(Exception): <NEW_LINE> <INDENT> def __init__(self, message, import_traceback): <NEW_LINE> <INDENT> super(MissingModuleError, self).__init__(message) <NEW_LINE> self.import_traceback = import_traceback
Failed to import 3rd party module required by the caller
6259901fa8ecb03325872087
class SimpleUploadedFile(InMemoryUploadedFile): <NEW_LINE> <INDENT> def __init__(self, name, content, contentType='text/plain'): <NEW_LINE> <INDENT> content = content or b'' <NEW_LINE> super(SimpleUploadedFile, self).__init__(BytesIO(content), None, name, contentType, len(content), None, None) <NEW_LINE> <DEDENT> @clas...
A simple representation of a file, which just has content, size, and a name.
6259901f1d351010ab8f497d
class renew_delegation_token_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'token_str_form', None, None, ), ) <NEW_LINE> def __init__(self, token_str_form=None,): <NEW_LINE> <INDENT> self.token_str_form = token_str_form <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot....
Attributes: - token_str_form
6259901fbf627c535bcb231c
class Element(): <NEW_LINE> <INDENT> def __init__(self, vdw, cov, m, n, s): <NEW_LINE> <INDENT> self.vdw = vdw <NEW_LINE> self.covalent = cov <NEW_LINE> self.mass = m <NEW_LINE> self.name = n <NEW_LINE> self.symbol = s <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.symbol
Element of the Periodic Table
6259901f3eb6a72ae038b4cd
class Unmarshaller(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def unmarshal(pkg_reader, package, part_factory): <NEW_LINE> <INDENT> parts = Unmarshaller._unmarshal_parts( pkg_reader, package, part_factory ) <NEW_LINE> Unmarshaller._unmarshal_relationships(pkg_reader, package, parts) <NEW_LINE> for part in pa...
Hosts static methods for unmarshalling a package from a |PackageReader| instance.
6259901f8c3a8732951f73c2
class Parameters(): <NEW_LINE> <INDENT> labels = DatasetParameter('watershed labels', type='input') <NEW_LINE> resolved = DatasetParameter('filled-resolved elevation raster', type='output') <NEW_LINE> flat_labels = DatasetParameter('flat labels', type='output') <NEW_LINE> flat_graph = DatasetParameter('flat adjacency g...
Resolve flats parameters
6259901f63f4b57ef00864a7
class PlaceViewSet(ModelViewSet): <NEW_LINE> <INDENT> queryset = Place.objects.all() <NEW_LINE> serializer_class = PlaceSerializer
List of api views for ``Place`` model.
6259901f56b00c62f0fb372a
class Material(Model): <NEW_LINE> <INDENT> pass
原始物料信息
6259901fa8ecb0332587208b
class EmbeddedSequence(EmbeddedFactorSequence): <NEW_LINE> <INDENT> def __init__(self, name: str, vocabulary: Vocabulary, data_id: str, embedding_size: int, max_length: int = None, add_start_symbol: bool = False, add_end_symbol: bool = False, scale_embeddings_by_depth: bool = False, trainable: bool = True, embeddings_s...
A sequence of embedded inputs (for a single factor).
6259901f796e427e5384f5ec
class BatchQuery(ClientQuery): <NEW_LINE> <INDENT> def __init__(self, context, queries=None): <NEW_LINE> <INDENT> super(BatchQuery, self).__init__(context) <NEW_LINE> self._current_boundary = create_boundary("batch_") <NEW_LINE> if queries is None: <NEW_LINE> <INDENT> queries = [] <NEW_LINE> <DEDENT> self._queries = qu...
Client query collection
6259901fa8ecb0332587208d
class Bee(Insect): <NEW_LINE> <INDENT> name = 'Bee' <NEW_LINE> watersafe = True <NEW_LINE> def sting(self, ant): <NEW_LINE> <INDENT> ant.reduce_armor(1) <NEW_LINE> <DEDENT> def move_to(self, place): <NEW_LINE> <INDENT> self.place.remove_insect(self) <NEW_LINE> place.add_insect(self) <NEW_LINE> <DEDENT> def blocked(self...
A Bee moves from place to place, following exits and stinging ants.
6259901f21a7993f00c66ded
class TestMochadSwitchSetup(unittest.TestCase): <NEW_LINE> <INDENT> PLATFORM = mochad <NEW_LINE> COMPONENT = switch <NEW_LINE> THING = 'switch' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.hass = get_test_home_assistant() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.hass.stop() <NEW_LINE> <D...
Test the mochad switch.
6259901fac7a0e7691f7335a
class PythonFileReporter(FileReporter): <NEW_LINE> <INDENT> def __init__(self, morf, coverage=None): <NEW_LINE> <INDENT> self.coverage = coverage <NEW_LINE> filename = source_for_morf(morf) <NEW_LINE> super().__init__(canonical_filename(filename)) <NEW_LINE> if hasattr(morf, '__name__'): <NEW_LINE> <INDENT> name = morf...
Report support for a Python file.
6259901fbe8e80087fbbfee6
class Regexp(object): <NEW_LINE> <INDENT> def __init__(self, regex, flags=0, message=None): <NEW_LINE> <INDENT> if isinstance(regex, string_types): <NEW_LINE> <INDENT> regex = re.compile(regex, flags) <NEW_LINE> <DEDENT> self.regex = regex <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __call__(self, form, f...
Validates the field against a user provided regexp. :param regex: The regular expression string to use. Can also be a compiled regular expression pattern. :param flags: The regexp flags to use, for example re.IGNORECASE. Ignored if `regex` is not a string. :param message: Error message to raise in ...
6259901f925a0f43d25e8eb6
class IResourceRemoved(IResourceEvent): <NEW_LINE> <INDENT> pass
A resource was removed.
6259901f507cdc57c63a5c16
class AircraftFilter(object): <NEW_LINE> <INDENT> def __init__(self, *aircraft): <NEW_LINE> <INDENT> self.aircraft = aircraft <NEW_LINE> <DEDENT> def __call__(self, event): <NEW_LINE> <INDENT> return event.aircraft in self.aircraft
Match (Flight) events with one of given aircraft
6259901f5166f23b2e244245
class GoogleGeocoder(Geocoders): <NEW_LINE> <INDENT> def __init__(self, address): <NEW_LINE> <INDENT> return super(GoogleGeocoder, self).__init__(address) <NEW_LINE> <DEDENT> def geocode(self): <NEW_LINE> <INDENT> time.sleep(0.25) <NEW_LINE> Geocoders.count_dict['total'] += 1 <NEW_LINE> Geocoders.count_dict['google'] +...
Google geocoder
6259901f63f4b57ef00864ab
class Node(object): <NEW_LINE> <INDENT> __slots__ = ('position', 'data', 'level', 'parent') <NEW_LINE> def __init__(self, position=None, data=None, parent=None, level=cns.NODE_FORUM_LEVEL): <NEW_LINE> <INDENT> self.position = position <NEW_LINE> self.data = data <NEW_LINE> self.level = level <NEW_LINE> self.parent = pa...
Сущность узла дерева необходима только лишь для простого доступа к данным родительских узлов(в редисе) в распределённой системе при сохранении их в БД обобщенным документом. Т.е. документ будет содержать данные из узлов дерева от листа до корня.
6259901f21a7993f00c66df1
class MipsRelocType(ElfRelocType): <NEW_LINE> <INDENT> _show = {}
ElfRelocType for MIPS processors.
6259901f5166f23b2e244247
class FFSocket(ForceField): <NEW_LINE> <INDENT> def __init__( self, latency=1.0, name="", pars=None, dopbc=True, active=np.array([-1]), threaded=True, interface=None, ): <NEW_LINE> <INDENT> super(FFSocket, self).__init__(latency, name, pars, dopbc, active, threaded) <NEW_LINE> if interface is None: <NEW_LINE> <INDENT> ...
Interface between the PIMD code and a socket for a single replica. Deals with an individual replica of the system, obtaining the potential force and virial appropriate to this system. Deals with the distribution of jobs to the interface. Attributes: socket: The interface object which contains the socket through w...
6259901f9b70327d1c57fbf5
class MatchCondition(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'match_variables': {'required': True}, 'operator': {'required': True}, 'match_values': {'required': True}, } <NEW_LINE> _attribute_map = { 'match_variables': {'key': 'matchVariables', 'type': '[MatchVariable]'}, 'operator': {'key': 'o...
Define match conditions. All required parameters must be populated in order to send to Azure. :param match_variables: Required. List of match variables. :type match_variables: list[~azure.mgmt.network.v2019_12_01.models.MatchVariable] :param operator: Required. The operator to be matched. Possible values include: "IP...
6259901fa8ecb03325872093
class TestImioRevisionHistoryAdapter(IntegrationTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestImioRevisionHistoryAdapter, self).setUp() <NEW_LINE> doc = api.content.create(type='Document', id='doc', container=self.portal) <NEW_LINE> self.doc = doc <NEW_LINE> <DEDENT> def test_getHistory(...
Test ImioRevisionHistoryAdapter.
6259901fbf627c535bcb2328
class EnhancedEthernetStatisticsTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_enhanced_ethernet_statistics(self): <NEW_LINE> <INDENT> enhanced_ethernet_statistics_obj = EnhancedEthernetStatistics() <NEW_LINE> self.assertNotEqual(enhanced_ethernet_statistics_obj, None)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259901fac7a0e7691f7335e
class Cache(object): <NEW_LINE> <INDENT> def __init__(self, graph): <NEW_LINE> <INDENT> self.enum = dict() <NEW_LINE> self.inv_enum = [] <NEW_LINE> self.in_neighbors = [] <NEW_LINE> self.terminals = [] <NEW_LINE> vertices = graph.vertices() <NEW_LINE> for (index, vertex) in enumerate(vertices): <NEW_LINE> <INDENT> self...
Caches common calculations for a given graph associated to a Markov process for efficiency when computing the stationary distribution with the approximate algorithm. Parameters ---------- graph: a Graph object The graph underlying the Markov process.
6259901fd18da76e235b7887
class DeleteGradesMixin(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def query_grades(cls, course_ids=None, modified_start=None, modified_end=None): <NEW_LINE> <INDENT> kwargs = {} <NEW_LINE> if course_ids: <NEW_LINE> <INDENT> kwargs['course_id__in'] = [course_id for course_id in course_ids] <NEW_LINE> <DEDENT>...
A Mixin class that provides functionality to delete grades.
6259901f287bf620b6272a61
class ChooseSameAddressTestCase(ComplianceTestCase): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> if len(self.target(1).global_ip(offset='*')) < 2: <NEW_LINE> <INDENT> fail("Cannot Test. The UUT requires two global IP addresses for this test case to be valid.") <NEW_LINE> <DEDENT> self.ui.tell("Please send an...
IPv6 Default Address Selection - Choose Same Address Verify that a node selects a source address that is the same as the destination address if the packet is being sent to the same interface. @private Source: RFC 3484 Section 5, Rule 1
6259901f5166f23b2e244249
class ConnectomistConcatenate(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.popen_patcher = patch("pyconnectomist.wrappers.subprocess.Popen") <NEW_LINE> self.mock_popen = self.popen_patcher.start() <NEW_LINE> mock_process = mock.Mock() <NEW_LINE> attrs = { "communicate.return_value":...
Test the Connectomist function that concatenates volumes: 'pyconnectomist.utils.filetools.ptk_concatenate_volumes'
6259901fa8ecb03325872095
class NetworkInterface(object): <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> self.name = None <NEW_LINE> self.addr0 = None <NEW_LINE> self.addr1 = None <NEW_LINE> self.addr2 = None <NEW_LINE> self.addr3 = None <NEW_LINE> self.addr4 = None <NEW_LINE> self.addr5 = None <NEW_LINE> self.addr6 = No...
This class provides a place to store broken-out address fields into discrete attributes that can successfully have model references built on top of them. All attributes are meant to be public.
6259901fac7a0e7691f73360
class Pile: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.pile = None <NEW_LINE> self.nbr = 0 <NEW_LINE> <DEDENT> def empiler(self, elm): <NEW_LINE> <INDENT> element = Noeud(elm, self.pile) <NEW_LINE> self.pile = element <NEW_LINE> self.nbr += 1 <NEW_LINE> <DEDENT> def depiler(self): <NEW_LINE> <IND...
File doublement chaîné +=========+ +=========+ +=========+ | NOEUDN-1|/_____ | NOEUDN |/____ | NOEUDN+1| |=========|\ \ |=========|\ \ |=========| None <--|precedent| \____|precedent| \____|precedent| |¨¨¨¨¨¨¨¨¨| ...
6259902021a7993f00c66df5
class LinearModel(Model): <NEW_LINE> <INDENT> def __init__(self, param, data): <NEW_LINE> <INDENT> super().__init__(param, data) <NEW_LINE> iname = 'imp_vol' if 'imp_vol' in data.dtype.names else 'imp_vol_data' <NEW_LINE> formula = 'np.log(' + iname + ') ~ moneyness_norm*maturity+moneyness2' <NEW_LINE> self.model = sm....
Linear Regression model.
625990205e10d32532ce4041
class FetchListRequestHandler(HermesHTTPRequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> def _set_output(): <NEW_LINE> <INDENT> self.output = { 'groups': dao.fetch_list() } <NEW_LINE> <DEDENT> def _set_headers(): <NEW_LINE> <INDENT> self.set_header("Access-Control-Allow-Origin", "*") <NEW_LINE> <...
Simulation list metric request handler.
625990201d351010ab8f498d
class HostsOrigin(main.Origin): <NEW_LINE> <INDENT> cobbler = None <NEW_LINE> expression = None <NEW_LINE> whitelist = [] <NEW_LINE> def __init__(self, server_url, user, pw, ssh_uri, expression="igor-", whitelist=[]): <NEW_LINE> <INDENT> self.cobbler = Cobbler(server_url, (user, pw), ssh_uri) <NEW_LINE> self.expression...
This is the source where igor retrieves cobbler systems as hosts
62599020462c4b4f79dbc882
class Bucketlist(models.Model): <NEW_LINE> <INDENT> deseo = models.CharField(max_length=255, blank=False, unique=True) <NEW_LINE> dueño = models.ForeignKey( 'auth.User', related_name='bucketlists', on_delete=models.CASCADE) <NEW_LINE> fecha_creacion = models.DateTimeField(auto_now_add=True) <NEW_LINE> fecha_modificacio...
This class represents the bucketlist model.
62599020ac7a0e7691f73362
class CpcNotInDpmError(ConflictError): <NEW_LINE> <INDENT> def __init__(self, method, uri, cpc): <NEW_LINE> <INDENT> super(CpcNotInDpmError, self).__init__( method, uri, reason=5, message="CPC is not in DPM mode: %s" % cpc.uri)
Indicates that the operation requires DPM mode but the CPC is not in DPM mode. Out of the set of operations that only work in DPM mode, this error is used only for the following subset: - Create Partition - Create Hipersocket - Start CPC - Stop CPC - Set Auto-Start List
62599020bf627c535bcb232c
class PropertyTests: <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_no_default_value(self): <NEW_LINE> <INDENT> p = self.prop_class() <NEW_LINE> self.assertIs(p.default, none_object) <NEW_LINE> self.assertFalse(p.has_default) <NEW_LINE> self.assertTrue(p.required) <NEW_LINE> ...
Common tests for all property classes
62599020be8e80087fbbfeef
class SchNetInteraction(nn.Module): <NEW_LINE> <INDENT> def __init__(self, n_atom_basis, n_spatial_basis, n_filters, cutoff, cutoff_network=HardCutoff, normalize_filter=False): <NEW_LINE> <INDENT> super(SchNetInteraction, self).__init__() <NEW_LINE> self.filter_network = nn.Sequential( schnetpack.nn.base.Dense(n_spatia...
SchNet interaction block for modeling quantum interactions of atomistic systems with cosine cutoff. Args: n_atom_basis (int): number of features used to describe atomic environments n_spatial_basis (int): number of input features of filter-generating networks n_filters (int): number of filters used in cont...
625990203eb6a72ae038b4dd
class Base_2D_Grid_2_Lines(unittest.TestCase): <NEW_LINE> <INDENT> params = ["p1", "p2"] <NEW_LINE> param_range_dict = OD( [("p1", (-5, 3)), ("p2", (1.2e6, 15e6))] ) <NEW_LINE> n_gridpts_list = (11, 9) <NEW_LINE> interpd_shape = (50, 45) <NEW_LINE> lines = ["L1", "L2"] <NEW_LINE> line_peaks = [8, 5] <NEW_LINE> @classme...
Base class holding setup and cleanup methods to make a 2D grid with only 2 emission lines, and using a 2D Gaussian to make the grid. There are only two lines, but one has fluxes set to all 1 and is just for normalisation.
625990208c3a8732951f73d2
class Conditional: <NEW_LINE> <INDENT> def __init__(self, condition, if_true, if_false=None): <NEW_LINE> <INDENT> self.condition = condition <NEW_LINE> self.if_true = if_true <NEW_LINE> self.if_false = if_false <NEW_LINE> <DEDENT> def evaluate(self, scope): <NEW_LINE> <INDENT> if self.condition.evaluate(scope).value: <...
Conditional - представляет ветвление в программе, т. е. if.
625990205166f23b2e24424d
class FuncBlock(Block): <NEW_LINE> <INDENT> def __init__(self, func, preset_kwargs, **block_kwargs): <NEW_LINE> <INDENT> if not hasattr(this_module, func.__name__): <NEW_LINE> <INDENT> func_copy = FunctionType(func.__code__, globals(), func.__name__) <NEW_LINE> setattr(this_module, func_copy.__name__, func_copy) <NEW_L...
Block that will run anmy fucntion you give it, either unfettered through the __call__ function, or with optional hardcoded parameters for use in a pipeline. Typically the FuncBlock is only used in the `blockify` decorator method. Attributes: func(function): the function to call internally preset_kwargs(dict): ...
62599020462c4b4f79dbc884
class TestKnitSomeLines(CommunicationTest): <NEW_LINE> <INDENT> lines = ["B" * 200] * 301 <NEW_LINE> lines[100] = "BBBBBBBDDBBBBBBBDDDDBBBBDBDBDBDB" + "B" * 168 <NEW_LINE> line_100 = b'\x80\x01\x0fU' + b'\00' * 21 + b'\x00' + b'\xd0' <NEW_LINE> input = (b'\xc3\x04\x03\xcc\r\n' + b'\x84\x00BbCcde\r\n' + b'\x84\x01BbCcde...
Test that we knit some lines.
6259902066673b3332c31267
class Job(models.Model): <NEW_LINE> <INDENT> title = models.CharField(verbose_name='job title', max_length=50) <NEW_LINE> image = models.ImageField(verbose_name='thumbnail', upload_to='img/jobs') <NEW_LINE> summary = models.CharField(verbose_name='description', max_length=140) <NEW_LINE> copy = models.TextField(verbose...
Describes individual past Jobs to display in CV
62599020d164cc6175821df1
class SpaException(Exception): <NEW_LINE> <INDENT> pass
A exception within the SPA subsystem.
6259902063f4b57ef00864b0
class Configuration(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'display_name': {'readonly': True}, 'description': {'readonly': True}, 'image_information': {'readonly': True}, 'cost_information': {'readonly': True}, 'availability_information': {'readonly': True}, 'hierarchy_information': {'readonly...
Configuration object. Variables are only populated by the server, and will be ignored when sending a request. :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models...
6259902056b00c62f0fb373c
class AutoWidthListCtrl(wx12.ListCtrl, listmix.ListCtrlAutoWidthMixin): <NEW_LINE> <INDENT> def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, *args, **kwargs): <NEW_LINE> <INDENT> wx12.ListCtrl.__init__(self, parent, ID, pos, size, style, *args, **kwargs) <NEW_LINE> listmix.ListCtrlAu...
wxListCtrl subclass that automatically adjusts its column width.
6259902063f4b57ef00864b1
class Conflict(LeonardoException): <NEW_LINE> <INDENT> status_code = 409
Generic error to replace all "Conflict"-type API errors.
62599020462c4b4f79dbc888
class GLgetGames_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT,(GLGame, GLGame.thrift_spec)), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TB...
Attributes: - success
62599020ac7a0e7691f73368
class BindReceiverResp(PDU): <NEW_LINE> <INDENT> command_id = Integer(command_ids.bind_receiver_resp, 4) <NEW_LINE> system_id = CString("") <NEW_LINE> sc_interface_version = Integer(IV.SMPP_VERSION_5, 1)
SMPP bind_receiver_resp PDU type
62599020be8e80087fbbfef5
class LabelParc(Parcellation): <NEW_LINE> <INDENT> DICT_ATTRS = ('kind', 'labels') <NEW_LINE> kind = 'label_parc' <NEW_LINE> make = True <NEW_LINE> def __init__( self, labels: Sequence[str], views: Union[str, Sequence[str]] = None, ): <NEW_LINE> <INDENT> Parcellation.__init__(self, views) <NEW_LINE> self.labels = tuple...
Assemble parcellation from FreeSurfer labels Combine one or several ``*.label`` files into a parcellation.
6259902063f4b57ef00864b2
class stdmodel(object): <NEW_LINE> <INDENT> _str = "" <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self._str <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self._str = "" <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> return self._str <NEW_LINE> <DEDENT> def write(self, line): <NEW_LINE> <...
a class to model stdout for pdfminer file parameter Can get context use get() method
62599020796e427e5384f600
class CommandBadArguments(CommandFailure): <NEW_LINE> <INDENT> pass
Command cannot be executed because the Arguments are wrong.
6259902091af0d3eaad3aca7
class TripRequest(models.Model): <NEW_LINE> <INDENT> initiator = models.ForeignKey(Traveller, on_delete=models.CASCADE) <NEW_LINE> trip = models.ForeignKey(Trip, on_delete=models.CASCADE) <NEW_LINE> status = models.CharField(max_length=20) <NEW_LINE> pass
In order to decline the trip from trip owner perspective: Make a post request and delete the TripRequest from DB. Optionally notify the initiator by using his id and email via emailing backend. Accept button will lock the trip to be proceeding (started). id initiator - relationships trip_owner - relationships trip_id -...
625990208c3a8732951f73db
class InputNotifyUsers(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = [] <NEW_LINE> ID = 0x193b4417 <NEW_LINE> QUALNAME = "types.InputNotifyUsers" <NEW_LINE> def __init__(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(data: BytesIO, *args: Any) -> "InputNotifyUsers"...
This object is a constructor of the base type :obj:`~pyrogram.raw.base.InputNotifyPeer`. Details: - Layer: ``122`` - ID: ``0x193b4417`` **No parameters required.**
62599020bf627c535bcb2336
class LanguageIdentification: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pretrained_lang_model = "lid.176.bin" <NEW_LINE> self.model = fasttext.load_model(pretrained_lang_model) <NEW_LINE> <DEDENT> def predict_lang(self, text): <NEW_LINE> <INDENT> predictions = self.model.predict(text, k=1) <NEW_LINE> ...
Class object for Language Identification
6259902066673b3332c3126f