code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class EthernetDevIfEnum(Enum): <NEW_LINE> <INDENT> no_interface = 0 <NEW_LINE> xgmii = 1 <NEW_LINE> xaui = 2 <NEW_LINE> ethernet_num_dev_if = 3 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_drivers_media_eth_oper as meta <NEW_LINE> retu...
EthernetDevIfEnum Ethernet dev if .. data:: no_interface = 0 no interface .. data:: xgmii = 1 xgmii .. data:: xaui = 2 xaui .. data:: ethernet_num_dev_if = 3 ethernet num dev if
62598ede8da39b475be01749
class iPdb(Plugin): <NEW_LINE> <INDENT> enabled_for_errors = False <NEW_LINE> enabled_for_failures = False <NEW_LINE> score = 5 <NEW_LINE> def options(self, parser, env): <NEW_LINE> <INDENT> parser.add_option( "--ipdb", action="store_true", dest="ipdbErrors", default=env.get('NOSE_IPDB', False), help="Drop into ipdb on...
Provides --ipdb and --ipdb-failures options that cause the test runner to drop into ipdb if it encounters an error or failure, respectively.
62598ede7d43ff24874266cb
class TestInsertDataUseCaseInsert: <NEW_LINE> <INDENT> def test_insert(self): <NEW_LINE> <INDENT> key = "key" <NEW_LINE> value = "value" <NEW_LINE> database = mock.Mock() <NEW_LINE> database.insert.return_value = {"key": key, "value": value} <NEW_LINE> request = mock.MagicMock() <NEW_LINE> request.key = key <NEW_LINE> ...
Test class for `hotness.use_cases.InsertDataUseCase.insert` method
62598edee1aae11d1e7cdb0e
class Patient: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def discharge(self, name): <NEW_LINE> <INDENT> pass
master class
62598ede6aa9bd52df0d344d
class Music(): <NEW_LINE> <INDENT> def __init__(self, name, price): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.price = price <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if self is other: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> elif type(self) != type(other): <NEW_LINE> <INDENT...
Representation of all physical forms of music. Receives name and price as inputs. Defines class comparisons.
62598edea8370b77170ee98e
class NFeICMSSN202(BaseNFeICMS): <NEW_LINE> <INDENT> tag = 'ICMSSN202' <NEW_LINE> txttag = 'N10f' <NEW_LINE> attributes = [(u'orig', ''), (u'CSOSN', ''), (u'modBCST', ''), (u'pMVAST', ''), (u'pRedBCST', ''), (u'vBCST', ''), (u'pICMSST', ''), (u'vICMSST', ''), ]
Grupo CRT=1 – Simples Nacional e CSOSN=202, 203
62598ede4a966d76dd5ed483
class Bootstrap(object): <NEW_LINE> <INDENT> def __init__(self, conf): <NEW_LINE> <INDENT> self.conf = conf <NEW_LINE> self.conf.register_opts(_GENERAL_OPTIONS) <NEW_LINE> self.conf.register_opts(_DRIVER_OPTIONS, group=_DRIVER_GROUP) <NEW_LINE> self.driver_conf = self.conf[_DRIVER_GROUP] <NEW_LINE> log.setup('zaqar') <...
Defines the Zaqar bootstrapper. The bootstrap loads up drivers per a given configuration, and manages their lifetimes.
62598ede8e71fb1e983ba010
class Model(FifeClass): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [FifeClass]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, Model, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> for _s in [Fif...
Proxy of C++ FIFE::Model class
62598ede498bea3a75a560d6
class Sb_desc: <NEW_LINE> <INDENT> def __init__(self, libname, libdir): <NEW_LINE> <INDENT> self.c_sb_desc = ctl.load_library(libname, libdir).sb_descriptors <NEW_LINE> <DEDENT> def __call__(self, disp, weights, rc, n_atom, n_max): <NEW_LINE> <INDENT> desc = np.empty((n_max + 1) * (n_max + 2) // 2) <NEW_LINE> self.c_sb...
Calculates spherical Bessel descriptors for the given atomic environment. While the description below specifies several of the argument as numpy arrays, anything that exposes the __array_interface__ should be accepted. Parameters ---------- `disp`: numpy array The relative Cartesian coordinates of the surrounding ...
62598ede56ac1b37e630078d
class JagsLexer(RegexLexer): <NEW_LINE> <INDENT> name = 'JAGS' <NEW_LINE> aliases = ['jags'] <NEW_LINE> filenames = ['*.jags'] <NEW_LINE> _FUNCTIONS = [ 'abs', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctanh', 'cos', 'cosh', 'cloglog', 'equals', 'exp', 'icloglog', 'ifelse', 'ilogit', 'log', 'logfact', 'log...
Pygments Lexer for JAGS. *New in Pygments 1.6.*
62598ede379a373c97d9759b
class Ceil(Device): <NEW_LINE> <INDENT> def status(self) -> CeilStatus: <NEW_LINE> <INDENT> properties = ['power', 'bright', 'cct', 'snm', 'dv', 'bl', 'ac', ] <NEW_LINE> values = self.send( "get_prop", properties ) <NEW_LINE> properties_count = len(properties) <NEW_LINE> values_count = len(values) <NEW_LINE> if propert...
Main class representing Xiaomi Philips LED Ceiling Lamp.
62598ede435de62698e9a376
class EscapedStr(str, Escaped): <NEW_LINE> <INDENT> pass
string class which is marked as escaped.
62598ede24f1403a92684b74
class GraphConvolution(Module): <NEW_LINE> <INDENT> def __init__(self, in_features, out_features, bias=True): <NEW_LINE> <INDENT> super(GraphConvolution, self).__init__() <NEW_LINE> self.in_features = in_features <NEW_LINE> self.out_features = out_features <NEW_LINE> self.weight = Parameter(torch.FloatTensor(in_feature...
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
62598ede99cbb53fe682f452
class UTF8Recoder: <NEW_LINE> <INDENT> def __init__(self, f, encoding): <NEW_LINE> <INDENT> self.reader = codecs.getreader(encoding)(f) <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> return self.reader.next().encode("utf-8")
Iterator that reads a stream encoded in any given encoding. The output is reencoded to UTF-8 for internal consistency.
62598edea79ad161977685bc
class NeuralNetwork: <NEW_LINE> <INDENT> def __init__(self, layerInOutArr, activationFuncs = None, samplers = np.random.normal): <NEW_LINE> <INDENT> self._numHiddenLayers = len(layerInOutArr)-1 <NEW_LINE> if activationFuncs == None: <NEW_LINE> <INDENT> activationFuncs = [None]*self._numHiddenLayers <NEW...
Every neuralNetwork instance internally contains several NeuronLayers which vary depending on the parameters passed on initialization. layerInOutArr: An index (such as a list) of non-negative integers. (len > 1) Each sequential pair of numbers in the index denotes the inSize and outSize of a NeuronLayer in...
62598edea17c0f6771d5a7fb
@register <NEW_LINE> class _Example1(ABCEngineExtension): <NEW_LINE> <INDENT> def get_supported_engines(self): <NEW_LINE> <INDENT> example_engine = self.create_engine_metadata('EXAMPLE1', None, [EngineInterface.Internal, EngineInterface.FileIO]) <NEW_LINE> return [example_engine] <NEW_LINE> <DEDENT> def crea...
A dummy engine extension.
62598ede91af0d3eaad383b9
class MessageSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> hashtags = HashtagSummarySerializer(many=True, read_only=True) <NEW_LINE> mentions = UserSummarySerializer(many=True, read_only=True) <NEW_LINE> likers = UserSummarySerializer(many=True, read_only=True) <NEW_LINE> dislikers = UserSummarySerialize...
General usage for Creating and Showing Message
62598eded268445f26638e5e
class BeeminderHandler: <NEW_LINE> <INDENT> def initialize(self, bot_handler: Any) -> None: <NEW_LINE> <INDENT> self.config_info = bot_handler.get_config_info('beeminder') <NEW_LINE> auth_token = self.config_info['auth_token'] <NEW_LINE> try: <NEW_LINE> <INDENT> r = requests.get("https://www.beeminder.com/api/v1/users/...
This plugin allows users to easily add datapoints towards their beeminder goals via zulip
62598ede9c8ee8231303f428
class ApiDebug(resource.Resource): <NEW_LINE> <INDENT> isLeaf = True <NEW_LINE> @staticmethod <NEW_LINE> def render_GET(request): <NEW_LINE> <INDENT> request.setHeader("Content-Type", "application/json; charset=utf-8") <NEW_LINE> return "{}"
Implements the /api/debug endpoint
62598ede32920d7e50bc45ce
class CommitResults: <NEW_LINE> <INDENT> def __init__(self, commit, results, build_info=NoBuildInfo()): <NEW_LINE> <INDENT> self._commit = commit <NEW_LINE> self._results = results <NEW_LINE> self._build_info = build_info <NEW_LINE> <DEDENT> @property <NEW_LINE> def commit(self): <NEW_LINE> <INDENT> return self._commit...
Results for a commit.
62598ede0a50d4780f703949
class LeaveClaimWhen(object): <NEW_LINE> <INDENT> openapi_types = { '_from': 'date', 'to': 'date' } <NEW_LINE> attribute_map = { '_from': 'from', 'to': 'to' } <NEW_LINE> def __init__(self, _from=None, to=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> l...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598edeadb09d7d5dc08b68
class AppX(object): <NEW_LINE> <INDENT> def __init__(self, execution=None, display_name=None, description=None, icon_path=None): <NEW_LINE> <INDENT> self.execution = execution <NEW_LINE> self.display_name = display_name <NEW_LINE> self.description = description <NEW_LINE> self.icon_path = icon_path
Represents an executable application from a windows app package
62598edea8370b77170ee990
class SuccessfulEditRedirect(HttpResponseRedirect): <NEW_LINE> <INDENT> handled = False <NEW_LINE> def __init__(self, urn): <NEW_LINE> <INDENT> self.urn = urn <NEW_LINE> return HttpResponseRedirect.__init__(self, resolve_urn(urn)) <NEW_LINE> <DEDENT> def set_redirect_url(self, url): <NEW_LINE> <INDENT> self['Location']...
Used by 'edit' views to say that an edit or fork has led to a new URN
62598edea05bb46b38488e1f
class DatabaseTask(Thread): <NEW_LINE> <INDENT> def __init__(self, xprt, *f): <NEW_LINE> <INDENT> super(DatabaseTask, self).__init__() <NEW_LINE> self.export = xprt <NEW_LINE> self.functions = f <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> transaction.set_autocommit(False, using=self.export.database) <NEW_LIN...
An auxiliary class that allows us to run a function with its own database connection in its own thread.
62598ede97e22403b3839491
class CronExplorationSearchRankHandler(base.BaseHandler): <NEW_LINE> <INDENT> @require_cron_or_superadmin <NEW_LINE> def get(self): <NEW_LINE> <INDENT> exp_jobs_one_off.IndexAllExplorationsJobManager.enqueue( exp_jobs_one_off.IndexAllExplorationsJobManager.create_new())
Handler for computing exploration search ranks.
62598ede99cbb53fe682f453
class HumTempSensorController(BaseController): <NEW_LINE> <INDENT> def __init__(self, sensor_name=None, threshold_humidity_upper=100, threshold_humidity_lower=0, threshold_temp_upper=100, threshold_temp_lower=0, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> _sensor = HumidityTempera...
This class uses data from a sensor to control the operation
62598ede82261d6c5272f187
class PermissionForm(forms.Form): <NEW_LINE> <INDENT> TYPES = ( ('employee','employee'), ('category','category'),) <NEW_LINE> PERMISSION_CHOICES=tuple([(y, y) for x in PERMISSIONS for y in x[1]]) <NEW_LINE> def __init__(self, employees, company, *args, **kwargs): <NEW_LINE> <INDENT> super(PermissionForm, self).__init__...
Django makes permissions automatically for every model, i.e add_contract, change_contract, delete_contract We make use of those.
62598ede1f037a2d8b9e26a7
class TestHasOnlyReadOnly(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return HasOnlyReadOnly...
HasOnlyReadOnly unit test stubs
62598ede796e427e5384cd3a
class AlterModelTable(ModelOptionOperation): <NEW_LINE> <INDENT> def __init__(self, name, table): <NEW_LINE> <INDENT> self.table = table <NEW_LINE> super().__init__(name) <NEW_LINE> <DEDENT> def deconstruct(self): <NEW_LINE> <INDENT> kwargs = { 'name': self.name, 'table': self.table, } <NEW_LINE> return ( self.__class_...
Rename a model's table.
62598edee5267d203ee69ea5
class FeatureTypeField(relations.RelatedField): <NEW_LINE> <INDENT> read_only = False <NEW_LINE> def to_representation(self, obj): <NEW_LINE> <INDENT> return obj.name <NEW_LINE> <DEDENT> def to_internal_value(self, value): <NEW_LINE> <INDENT> if value == "": <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> if isinst...
This is a relational field that handles the addition of feature_types to content objects. This field also allows the user to create feature_types in the db if they don't already exist.
62598ededd821e528d6d74e9
class Signup(View): <NEW_LINE> <INDENT> def post(self, request): <NEW_LINE> <INDENT> forms = UserSignUpForm(request.POST) <NEW_LINE> if forms.is_valid() : <NEW_LINE> <INDENT> username = forms.cleaned_data['username'] <NEW_LINE> email = forms.cleaned_data['email'] <NEW_LINE> password = forms.cleaned_data['password'] <NE...
Create View For Signing Up
62598ede67a9b606de544570
class _TransformNode(_BaseNode): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_TransformNode, self).__init__() <NEW_LINE> self._name = 'Transform' <NEW_LINE> self._fields = ['center', 'children', 'rotation', 'scale', 'scaleOrientation', 'translation', 'bboxCenter', 'bboxSize'] <NEW_LINE> self._fiel...
Transform node. Has eight optional fields.
62598ede29b78933be2693a0
@Expression.register("__xor__") <NEW_LINE> @Expression.register("__rxor__", reversed=True) <NEW_LINE> class BitwiseXOr(BinaryOp): <NEW_LINE> <INDENT> r <NEW_LINE> op = "^" <NEW_LINE> oper = operator.xor
Bitwise XOR object.
62598ede4e4d5625663709bb
class TestDestinyDefinitionsDestinyTalentNodeExclusiveSetDefinition(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 testDestinyDefinitionsDestinyTalentNodeExclusiveSetDefinition(self): <NEW_LINE> <...
DestinyDefinitionsDestinyTalentNodeExclusiveSetDefinition unit test stubs
62598ede925a0f43d25e65d0
class Cluster(object): <NEW_LINE> <INDENT> def __init__(self, graph=None): <NEW_LINE> <INDENT> self._graph = nx.Graph() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> s = self.get_adjacency_matrix() <NEW_LINE> return str(s) <NEW_LINE> <DEDENT> @property <NEW_LINE> def graph(self): <NEW_LINE> <INDENT> return...
Describes a computing cluster
62598ede24f1403a92684b75
@dataclass <NEW_LINE> class GeneratorType: <NEW_LINE> <INDENT> product_name: Optional[str] = field( default=None, metadata={ "type": "Element", } ) <NEW_LINE> product_version: Optional[str] = field( default=None, metadata={ "type": "Element", } ) <NEW_LINE> schema_version: List[SchemaVersionType] = field( default_facto...
The GeneratorType complex type defines an element that is used to hold information about when a particular OVAL document was compiled, what version of the schema was used, what tool compiled the document, and what version of that tool was used. Additional generator information is also allowed although it is not part o...
62598ede23849d37ff84f65c
class TableText(gtk.Alignment): <NEW_LINE> <INDENT> def __init__(self, text): <NEW_LINE> <INDENT> gtk.Alignment.__init__(self, xalign=0.0, yalign=0.0, xscale=0.0, yscale=0.0) <NEW_LINE> self.label = gtk.Label(text) <NEW_LINE> self.label.set_selectable(True) <NEW_LINE> self.add(self.label)
class that implements selectable labels aligned to the left
62598edee76e3b2f99fd6fdc
class TestSafeSessionsLogMixin(object): <NEW_LINE> <INDENT> @contextmanager <NEW_LINE> def assert_logged(self, log_string, log_level='error'): <NEW_LINE> <INDENT> with patch('openedx.core.djangoapps.safe_sessions.middleware.log.' + log_level) as mock_log: <NEW_LINE> <INDENT> yield <NEW_LINE> self.assertTrue(mock_log.ca...
Test Mixin class with helpers for testing log method calls in the safe sessions middleware.
62598ede38b623060ffa7636
class ChoosePluralTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.variants = ("гвоздь", "гвоздя", "гвоздей") <NEW_LINE> <DEDENT> def checkChoosePlural(self, amount, estimated): <NEW_LINE> <INDENT> self.assertEquals(pytils.numeral.choose_plural(amount, self.variants), estimated...
Test case for pytils.numeral.choose_plural
62598edee64d504609df8691
class AbstractCommand(object): <NEW_LINE> <INDENT> description = '' <NEW_LINE> help = '' <NEW_LINE> arguments = {} <NEW_LINE> args = {} <NEW_LINE> def setup(self, description='', arguments=None, help=''): <NEW_LINE> <INDENT> self.description = description <NEW_LINE> self.arguments = arguments if arguments is not None e...
Abstract Command Class. Attributes: description (str): Description of the command. arguments (dict): Optional aguments for the command. help (str): Help Text for the command. args (dict): Dictionary with possible passed arguments.
62598eded268445f26638e5f
@gin.configurable <NEW_LINE> class RNDRainbowAgent( base_rainbow_agent.RainbowAgent, intrinsic_dqn_agent.RNDDQNAgent): <NEW_LINE> <INDENT> def __init__(self, sess, num_actions, num_atoms=51, vmax=10., gamma=0.99, update_horizon=1, min_replay_history=20000, update_period=4, target_update_period=8000, epsilon_fn=intrinsi...
A Rainbow agent paired with an intrinsic bonus derived from RND.
62598ede30bbd722464681db
class SqlRelationalDelegate(QSqlRelationalDelegate): <NEW_LINE> <INDENT> def createEditor(self, parent, option, index): <NEW_LINE> <INDENT> if not index.isValid(): <NEW_LINE> <INDENT> return QItemDelegate.createEditor(self, parent, option, index) <NEW_LINE> <DEDENT> if not isinstance(index.model(), QSqlRelationalTableM...
QSqlRelationalDelegate that's corrected to work with proxy models The original QSqlRelationalDelegate doesn't work if you have any proxy model (even a QIdentityProxyModel) between your source model and your view. This one does work. It's gotten from: https://wiki.qt.io/QSqlRelationalDelegate-subclass-for-QSqlRelation...
62598eded53ae8145f916a2e
class GapsParams(): <NEW_LINE> <INDENT> __slots__ = ['gap_open', 'gap_ext'] <NEW_LINE> def __init__(self, gap_open, gap_ext=None): <NEW_LINE> <INDENT> self.gap_open = gap_open <NEW_LINE> self.gap_ext = gap_ext
defines gaps parameters required for alignment Args: gap_open: number, penalty for opening a gap gap_ext: number or None (default), penalty for extending an existing gap. if gap_ext is None, the scoring assumes a linear gap penalty, else the scoring assumes affine gap penalty ...
62598ede91f36d47f2230175
class OptionValue(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> return { 'label': (str,), 'value': (str,), } <NEW_LINE> <DEDENT>...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Attributes: allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the a...
62598ede3eb6a72ae0388be4
class Stoichiometry(BaseFeaturizer): <NEW_LINE> <INDENT> def __init__(self, p_list=(0, 2, 3, 5, 7, 10), num_atoms=False): <NEW_LINE> <INDENT> self.p_list = p_list <NEW_LINE> self.num_atoms = num_atoms <NEW_LINE> <DEDENT> def featurize(self, comp): <NEW_LINE> <INDENT> el_amt = comp.get_el_amt_dict() <NEW_LINE> n_atoms_p...
Calculate norms of stoichiometric attributes. Parameters: p_list (list of ints): list of norms to calculate num_atoms (bool): whether to return number of atoms per formula unit
62598edee1aae11d1e7cdb10
class AvalonMaster(AvalonMM): <NEW_LINE> <INDENT> def __init__(self, entity, name, clock): <NEW_LINE> <INDENT> AvalonMM.__init__(self, entity, name, clock) <NEW_LINE> self.log.debug("AvalonMaster created") <NEW_LINE> self.busy_event = Event("%s_busy" % name) <NEW_LINE> self.busy = False <NEW_LINE> <DEDENT> @coroutine <...
Avalon-MM master
62598edeb5575c28eb711fa2
class ajaxGetWorksheetReferences(ReferenceSamplesView): <NEW_LINE> <INDENT> implements(IViewView) <NEW_LINE> def __init__(self, context, request): <NEW_LINE> <INDENT> super(ajaxGetWorksheetReferences, self).__init__(context, request) <NEW_LINE> self.contentFilter = {'portal_type': 'ReferenceSample'} <NEW_LINE> self.con...
Display reference samples matching services in this worksheet
62598ede6aa9bd52df0d3451
class CentraLiteIASSensorV3(CustomDevice): <NEW_LINE> <INDENT> signature = { MODELS_INFO: CentraLiteIASSensor.signature[MODELS_INFO], ENDPOINTS: { 1: CentraLiteIASSensor.signature[ENDPOINTS][1], 2: { PROFILE_ID: MANUFACTURER_SPECIFIC_PROFILE_ID, DEVICE_TYPE: zha.DeviceType.SIMPLE_SENSOR, INPUT_CLUSTERS: [ Basic.cluster...
Custom device representing centralite ias sensors.
62598edefbf16365ca792647
class RandomIdentitySamplerXC(Sampler): <NEW_LINE> <INDENT> def __init__( self, dataset, num_instances=1): <NEW_LINE> <INDENT> self.dataset = dataset <NEW_LINE> self.num_instances = num_instances <NEW_LINE> if num_instances == 1: <NEW_LINE> <INDENT> print('The num_instances in RandomIdentitySamplerXC should be larger t...
generate the batch index for data loader
62598ede82261d6c5272f188
class BasePlugin(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def matches(self, cwd): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def get_coverage(self, cwd): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def get_rep...
Base class for coverage plugins.
62598ede596a897236126203
class PreloadSDNCKeywords(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(PreloadSDNCKeywords, self).__init__() <NEW_LINE> self.reqs = RequestsHelper() <NEW_LINE> self.templating = TemplatingKeywords() <NEW_LINE> <DEDENT> @keyword <NEW_LINE> def preload_vfmodule(self, endpoint, data_path, tem...
SDNC is an ONAP testing library for Robot Framework that provides functionality for interacting with the network controller.
62598ede2c8b7c6e89bd1d63
class Memo5x5Widget(BaseMemoWidget): <NEW_LINE> <INDENT> plugin_uid = 'memo_5x5' <NEW_LINE> cols = 5 <NEW_LINE> rows = 5
Memo 5x5 plugin widget.
62598edecc0a2c11144795a5
class MyTopo( Topo ): <NEW_LINE> <INDENT> def __init__( self ): <NEW_LINE> <INDENT> Topo.__init__( self ) <NEW_LINE> R1 = self.addSwitch( 'R1' ) <NEW_LINE> R2 = self.addSwitch( 'R2' ) <NEW_LINE> R3 = self.addSwitch( 'R3' ) <NEW_LINE> R4 = self.addSwitch( 'R4' ) <NEW_LINE> R5 = self.addSwitch( 'R5' ) <NEW_LINE> R6 = sel...
Simple topology example.
62598edee5267d203ee69ea7
class testMultiException_args(object): <NEW_LINE> <INDENT> __slots__ = ( 'arg0', 'arg1', ) <NEW_LINE> def __init__(self, arg0=None, arg1=None,): <NEW_LINE> <INDENT> self.arg0 = arg0 <NEW_LINE> self.arg1 = arg1 <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstanc...
Attributes: - arg0 - arg1
62598ede379a373c97d9759e
class Gene: <NEW_LINE> <INDENT> __slots__ = ['start', 'length', 'width'] <NEW_LINE> def __init__(self, record): <NEW_LINE> <INDENT> self.start = 0.01 <NEW_LINE> self.length = len(record[1]) <NEW_LINE> self.width = 0.008 <NEW_LINE> <DEDENT> def drawGene(self, context, y_coord, surface_width): <NEW_LINE> <INDENT> context...
Gene object contains length of the full gene, drawGene draws a thin line based on the gene length
62598ede29b78933be2693a1
class Bip32Ed25519Slip(Bip32Ed25519SlipBase): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def CurveType() -> EllipticCurveTypes: <NEW_LINE> <INDENT> return Bip32Ed25519SlipConst.CURVE_TYPE <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _MasterKeyHmacKey() -> bytes: <NEW_LINE> <INDENT> return Bip32Ed25519SlipBaseCons...
BIP32 ed25519 class. It allows master key generation and children keys derivation using ed25519 curve. Derivation based on SLIP-0010.
62598ede4e4d5625663709bd
class WatchPatchsets(threading.Thread): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> SSH_CLIENT = paramiko.SSHClient() <NEW_LINE> SSH_CLIENT.load_host_keys(HOSTKEY_PATH) <NEW_LINE> SSH_CLIENT.set_missing_host_key_policy(paramiko.AutoAddPolicy()) <NEW_LINE> try: <NEW_LINE> <INDE...
This class watches gerrit stream event patchset-created
62598ede5fdd1c0f98e5c552
class ErrorLocation(object): <NEW_LINE> <INDENT> def __init__(self, source, pos): <NEW_LINE> <INDENT> self.source = source <NEW_LINE> self.pos = pos <NEW_LINE> self.text = self._text(source, pos) <NEW_LINE> self.visu = self._visu(source, pos) <NEW_LINE> <DEDENT> def _text(self, source, pos): <NEW_LINE> <INDENT> source_...
textual and visual information about failure location in source string
62598edea79ad161977685c0
class ConvNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, f_size, dropout_rate, num_classes=2): <NEW_LINE> <INDENT> super(ConvNet, self).__init__() <NEW_LINE> self.layer1 = nn.Sequential( nn.Conv2d(1, 16, kernel_size=3, stride=1, padding=0), nn.BatchNorm2d(16), nn.ReLU()) <NEW_LINE> self.layer2 = nn.Sequential( ...
3层二维卷积神经网络模型(输入:W*H,输出:2) 3层卷积层+3层批归一化+1层池化+1层全连接 Args: f_size: width or height of the feature matrix dropout_rate: hidden layer dropout rate num_classes: size of each output sample
62598edebaa26c4b54d4d875
class map_yield: <NEW_LINE> <INDENT> def __init__(self, *funcs): <NEW_LINE> <INDENT> self._mapper = compose(*funcs) <NEW_LINE> <DEDENT> def __call__(self, func): <NEW_LINE> <INDENT> return compose(partial(imap_yield, self._mapper), func)
Decorate a generator callable to apply a function to each ``yield`` value Example ------- >>> @map_yield('the current max is: {}'.format) ... def my_max(value): ... while value < 100: ... newvalue = yield value ... if newvalue > value: ... value = newvalue ... return value ... >>> ...
62598edea79ad161977685c1
@tf_export('layers.AveragePooling1D') <NEW_LINE> class AveragePooling1D(keras_layers.AveragePooling1D, base.Layer): <NEW_LINE> <INDENT> def __init__(self, pool_size, strides, padding='valid', data_format='channels_last', name=None, **kwargs): <NEW_LINE> <INDENT> if strides is None: <NEW_LINE> <INDENT> raise ValueError(...
Average Pooling layer for 1D inputs. Arguments: pool_size: An integer or tuple/list of a single integer, representing the size of the pooling window. strides: An integer or tuple/list of a single integer, specifying the strides of the pooling operation. padding: A string. The padding method, either 'vali...
62598ede0a50d4780f70394d
class FlumineMarketStream(MarketStream): <NEW_LINE> <INDENT> def _process(self, data: list, publish_time: int) -> bool: <NEW_LINE> <INDENT> active = False <NEW_LINE> for market_book in data: <NEW_LINE> <INDENT> if "id" not in market_book: <NEW_LINE> <INDENT> continue <NEW_LINE> <DEDENT> market_id = market_book["id"] <N...
Custom bflw stream to speed up processing by limiting to inplay/not inplay or limited seconds to start. `_process` updated to not call `on_process` which reduces some function calls.
62598eded53ae8145f916a30
class NamesBrowser(QTreeView): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> QTreeView.__init__(self, parent) <NEW_LINE> self.__parentDialog = parent <NEW_LINE> self.__model = FindNameModel() <NEW_LINE> self.__sortModel = FindNameSortFilterProxyModel() <NEW_LINE> self.__sortModel.setDynamicSo...
List of names widget implementation
62598ede4e4d5625663709be
class Square: <NEW_LINE> <INDENT> def __init__(self, size=0): <NEW_LINE> <INDENT> if type(size) != int: <NEW_LINE> <INDENT> raise TypeError("size must be an integer") <NEW_LINE> <DEDENT> elif size < 0: <NEW_LINE> <INDENT> raise ValueError("size must be >= 0") <NEW_LINE> <DEDENT> self.__size = size <NEW_LINE> <DEDENT> d...
intializing square class
62598edebd1bec0571e1439e
class ToolButton(QToolButton): <NEW_LINE> <INDENT> def paintEvent(self, event): <NEW_LINE> <INDENT> opt = QStyleOptionToolButton() <NEW_LINE> self.initStyleOption(opt) <NEW_LINE> opt.features &= ~QStyleOptionToolButton.HasMenu <NEW_LINE> painter = QStylePainter(self) <NEW_LINE> painter.drawComplexControl(QStyle.CC_Tool...
QToolButton without menu-arrow
62598ede6aa9bd52df0d3453
class Solution: <NEW_LINE> <INDENT> def backPackII(self, m, A, V): <NEW_LINE> <INDENT> dp = [0] * (m + 1) <NEW_LINE> n = len(A) <NEW_LINE> for i in range(n): <NEW_LINE> <INDENT> for j in range(m, A[i] - 1, -1): <NEW_LINE> <INDENT> dp[j] = max(dp[j], dp[j - A[i]] + V[i]) <NEW_LINE> <DEDENT> <DEDENT> return dp[m]
@param m: An integer m denotes the size of a backpack @param A: Given n items with size A[i] @param V: Given n items with value V[i] @return: The maximum value
62598ede097d151d1a2bf5c4
class MockUserModel: <NEW_LINE> <INDENT> def __init__(self, pk: int, username: str): <NEW_LINE> <INDENT> self.pk: int = pk <NEW_LINE> self.username: str = username <NEW_LINE> self.profile: dict = {"metadata": "My user profile."} <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return f"<MockUserModel: ...
A mock user model object that contains the query data for a test user.
62598ede07f4c71912bad9fe
class DealerAssign(models.TransientModel): <NEW_LINE> <INDENT> _name = 'xpr_dealer.dealer_assign' <NEW_LINE> def _init_dealers(self): <NEW_LINE> <INDENT> context = self.env.context <NEW_LINE> active_ids = context.get('active_ids') <NEW_LINE> if not active_ids: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> return se...
Dealer Assign wizard. Loaded to assign a sales person to multiple dealers
62598ede8a43f66fc4bf0717
class TEST7(PMEMSET_PART): <NEW_LINE> <INDENT> test_case = "test_part_map_descriptor"
get the descriptor from the part map
62598ede82261d6c5272f189
class _BlobIterator(Iterator): <NEW_LINE> <INDENT> def __init__(self, bucket, extra_params=None, client=None): <NEW_LINE> <INDENT> if client is None: <NEW_LINE> <INDENT> client = bucket.client <NEW_LINE> <DEDENT> self.bucket = bucket <NEW_LINE> self.prefixes = set() <NEW_LINE> self._current_prefixes = None <NEW_LINE> s...
An iterator listing blobs in a bucket You shouldn't have to use this directly, but instead should use the :class:`google.cloud.storage.blob.Bucket.list_blobs` method. :type bucket: :class:`google.cloud.storage.bucket.Bucket` :param bucket: The bucket from which to list blobs. :type extra_params: dict or None :param ...
62598ede3539df3088eca857
class Namespace: <NEW_LINE> <INDENT> def __init__(self, id): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.modules_to_add = [] <NEW_LINE> self.connections_to_add = [] <NEW_LINE> self.namespaces = []
A namespace is in itself basically a :class:Configuration , which can in turn contain multiple namespaces. :param id: unique id for this configuration :param modules_to_add: list of modules needed in this *configuration* :param connections_to_add: list of connections needed :param namespaces: list of *namespace*s
62598ede16aa5153ce3feaa1
class GoogleCloudRedisV1beta1LocationMetadata(_messages.Message): <NEW_LINE> <INDENT> @encoding.MapUnrecognizedFields('additionalProperties') <NEW_LINE> class AvailableZonesValue(_messages.Message): <NEW_LINE> <INDENT> class AdditionalProperty(_messages.Message): <NEW_LINE> <INDENT> key = _messages.StringField(1) <NEW_...
This location metadata represents additional configuration options for a given location where a Redis instance may be created. All fields are output only. It is returned as content of the `google.cloud.location.Location.metadata` field. Messages: AvailableZonesValue: Output only. The set of available zones in the ...
62598edef7d966606f746596
class Arrow(GraphObject): <NEW_LINE> <INDENT> def __init__(self,parent,x0,y0,x1,y1,color): <NEW_LINE> <INDENT> GraphObject.__init__(self,parent,x0,y0) <NEW_LINE> self.x1=x1 <NEW_LINE> self.y1=y1 <NEW_LINE> self.color=color <NEW_LINE> self.maxdist = 3 <NEW_LINE> <DEDENT> def Draw_(self, ctx): <NEW_LINE> <INDENT> x1,y1=s...
An arrow connecting two objects.
62598ede2ae34c7f260a968d
class RegimaticTest(ScriptedLoadableModuleTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> slicer.mrmlScene.Clear(0) <NEW_LINE> <DEDENT> def runTest(self): <NEW_LINE> <INDENT> self.setUp() <NEW_LINE> self.test_Regimatic1() <NEW_LINE> <DEDENT> def test_Regimatic1(self): <NEW_LINE> <INDENT> self.delayDispl...
This is the test case for your scripted module. Uses ScriptedLoadableModuleTest base class, available at: https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/ScriptedLoadableModule.py
62598ede8e71fb1e983ba016
class PyBindExtract(PyExtract): <NEW_LINE> <INDENT> def __init__(self, query): <NEW_LINE> <INDENT> PyExtract.__init__(self, query) <NEW_LINE> self.function_keyword = "" <NEW_LINE> self.docstring_symbol = "" <NEW_LINE> self.keywords = { 'function': '', 'docstring': '', 'self': 'self', 'signature_end': '', 'token_split':...
Extract function header, signature, and documentation from PyBind-generated docstrings.
62598ede21bff66bcd7211f8
class PromoCodeFilter(FilterSet): <NEW_LINE> <INDENT> min_value = NumberFilter(name='value', lookup_expr='gte') <NEW_LINE> max_value = NumberFilter(name='value', lookup_expr='lte') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = apps.get_model('promo_codes.PromoCode') <NEW_LINE> fields = ['user', 'bound', 'type', 'm...
An initial basic filter for Coupons. This could be handled with filter_fields = () until I add in range filtering on the discount value, then it is more helpful to do this.
62598ede2ae34c7f260a968e
class LP(object): <NEW_LINE> <INDENT> def __init__(self, graph, verbose=None): <NEW_LINE> <INDENT> assert isinstance(graph, AFG) <NEW_LINE> self.afg_graph = graph <NEW_LINE> self.lp_file = VPSolver.new_tmp_file(".lp") <NEW_LINE> self.output = VPSolver.afg2lp( graph.filename, self.filename, verbose=verbose ) <NEW_LINE> ...
Wrapper for .lp files.
62598ede925a0f43d25e65d4
class Culture(object): <NEW_LINE> <INDENT> def __init__(self, lang, world): <NEW_LINE> <INDENT> self.lang = lang <NEW_LINE> self.world = world <NEW_LINE> <DEDENT> def city_survivability(self, idx, other_idx): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def city_economy(self, idx, other_idx): <NE...
Cultures are responsible for the logic related to decisions for intelligent life, i.e. how things are named (what language? what rules?) and where cities are placed. Cultures can represent different races (orcs, humans, elves), different subgroups (desert-dwelling humans vs mountain-dwelling humans), or different alli...
62598edea79ad161977685c2
class HugeModel(DTypeModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.dtype = numpy.dtype('float64') <NEW_LINE> dimension = (3 * GRPC_MAX_MESSAGE_LENGTH) // self.dtype.itemsize + 1000 <NEW_LINE> self.value = numpy.ones((dimension,), dtype=self.dtype)
Model which has value which does not fit in message body Can be run from command line with ..code-block:: bash run-bmi-server --path $PWD/test --name fake_models.HugeModel --port 55555 --debug
62598ede63b5f9789fe83717
class MovementSystem(System): <NEW_LINE> <INDENT> def __init__(self, ai_table, position_table): <NEW_LINE> <INDENT> self.ai_table = ai_table <NEW_LINE> self.position_table = position_table <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> moveable = (ai for pos in self.position_table.all_entities() for ai in se...
System to resolve actions generated by AI
62598ede4e4d5625663709bf
class OSGTextTestRunner(unittest.TextTestRunner): <NEW_LINE> <INDENT> def _makeResult(self): <NEW_LINE> <INDENT> return OSGTextTestResult(self.stream, self.descriptions, self.verbosity) <NEW_LINE> <DEDENT> def run(self, test, **kwargs): <NEW_LINE> <INDENT> result = self._makeResult() <NEW_LINE> startTime = time.time() ...
Extended unittest.TextTestRunner with support for okSkips / badSkips / timeouts.
62598edebaa26c4b54d4d877
class TaskTypeF(factory.DjangoModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.TaskType <NEW_LINE> <DEDENT> id = 150 <NEW_LINE> name = "PNG creation"
Factory for TaskType.
62598ede45492302aabfaa5a
class CertificateRequest(object): <NEW_LINE> <INDENT> def __init__(self, common_name=None, names=None, hosts=None, key=None): <NEW_LINE> <INDENT> self.common_name = common_name <NEW_LINE> self.names = names or [] <NEW_LINE> self.hosts = hosts or [] <NEW_LINE> self.key = key <NEW_LINE> <DEDENT> def to_api(self): <NEW_LI...
It provides a Certificate Request compatible with CFSSL.
62598ede6e29344779afebd3
class StreamMuxer(abc.Iterator): <NEW_LINE> <INDENT> def __init__(self, streams): <NEW_LINE> <INDENT> self._streams = streams <NEW_LINE> <DEDENT> def __next__(self) -> ANY_MODEL: <NEW_LINE> <INDENT> return next(self.__iter__()) <NEW_LINE> <DEDENT> def __iter__(self) -> Iterator[ANY_MODEL]: <NEW_LINE> <INDENT> return ch...
Proxy object that handles applying changes to individual streams. Once iteration has begun, these smaller feeds are combined to act as a single stream.
62598ede01c39578d7f1134e
class Album: <NEW_LINE> <INDENT> def __init__(self, name, year, artist=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.year = year <NEW_LINE> if artist is None: <NEW_LINE> <INDENT> self.artist = "Various Artists" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.artist = artist <NEW_LINE> <DEDENT> self.tra...
Class to represent an album using it's tracklist. Attrbutes: name (str): The name of the album. year (int): Release year. artist (str): The name of the artist who made the album. Default to "Various Artists" tracks (List[song]): A list of the songs on the album Methods: add_song: Add song to track list.
62598ede0a50d4780f70394f
class Queue: <NEW_LINE> <INDENT> def __init__(self, data = None): <NEW_LINE> <INDENT> self.ref = ll.__linked_list__(data) <NEW_LINE> <DEDENT> def enqueue(self, data): <NEW_LINE> <INDENT> self.ref.add_at_start(self, data) <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self.ref.__iter__()
TO_DO
62598ede097d151d1a2bf5c5
class TestNumericrange(PschedTestBase): <NEW_LINE> <INDENT> def test_nrange(self): <NEW_LINE> <INDENT> nrange = NumericRange({ "lower": 3.14, "upper": "100K" }) <NEW_LINE> value = 1 <NEW_LINE> result = value in nrange <NEW_LINE> self.assertFalse(result) <NEW_LINE> self.assertTrue(nrange.contains(value, invert=True)[0])...
Numericrange tests.
62598ede91f36d47f2230177
class LikesTestClass(TestCase): <NEW_LINE> <INDENT> pass
class that test the characteristics of the Comment model
62598eded58c6744b42db58a
class AccountScraper(object): <NEW_LINE> <INDENT> def __init__(self, sts_client, account, arn): <NEW_LINE> <INDENT> assumed_role_object = sts_client.assume_role( RoleArn=arn, RoleSessionName=account ) <NEW_LINE> credentials = assumed_role_object['Credentials'] <NEW_LINE> self.credentials = credentials <NEW_LINE> r53cli...
An accountscraper object has the credentials to an assumed account in order to be able to scrape the route53 contents thereof
62598ede3617ad0b5ee046d5
class _SIGNAL(object): <NEW_LINE> <INDENT> NEXT_BATCH = 1 <NEW_LINE> STOP = 2
Signal used to control the input thread of infeed.
62598edee1aae11d1e7cdb12
@tf_export('keras.callbacks.TerminateOnNaN') <NEW_LINE> class TerminateOnNaN(Callback): <NEW_LINE> <INDENT> def on_batch_end(self, batch, logs=None): <NEW_LINE> <INDENT> logs = logs or {} <NEW_LINE> loss = logs.get('loss') <NEW_LINE> if loss is not None: <NEW_LINE> <INDENT> if np.isnan(loss) or np.isinf(loss): <NEW_LIN...
Callback that terminates training when a NaN loss is encountered.
62598edeadb09d7d5dc08b6e
class DummyInvalidCallback(FormCallback): <NEW_LINE> <INDENT> stage = CALLBACK_FORM_INVALID <NEW_LINE> def callback(self, form_entry, request, form): <NEW_LINE> <INDENT> logger.debug("Damn! You've made a mistake, boy!")
Saves the form as a foo item, if certain conditions are met.
62598ede6aa9bd52df0d3455
class PolarDBDatabaseModel(BaseModel): <NEW_LINE> <INDENT> model_name = '数据库实例' <NEW_LINE> model_sign = 'polardb_database' <NEW_LINE> polardb = models.ForeignKey(PolarDBModel, on_delete=models.CASCADE) <NEW_LINE> name = models.CharField('名称', max_length=128) <NEW_LINE> instance_id = models.CharField('实例ID', max_length=...
数据库实例下的库
62598ede07f4c71912bada00
class GetDashPluginNode(Node): <NEW_LINE> <INDENT> def __init__(self, dashboard_entry, as_var=None): <NEW_LINE> <INDENT> self.dashboard_entry = dashboard_entry <NEW_LINE> self.as_var = as_var <NEW_LINE> <DEDENT> def render(self, context): <NEW_LINE> <INDENT> request = context['request'] <NEW_LINE> dashboard_entry = sel...
Node for ``get_dash_plugin`` tag.
62598ede7d43ff24874266cf
class PercentModifier(BaseModifier): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> if not isinstance(self.effect, float): <NEW_LINE> <INDENT> raise TypeError("effect must be a number") <NEW_LINE> <DEDENT> if self.effect > 0: <NEW_LINE> <INDENT> return f'{self.name}: +{self.effect * 100}% \n' <NEW_LINE> <DE...
Class for handling modifiers that are percent based. I.e. National Tax, Discipline, Morale, etc.
62598ede57b8e32f525073da
class SpiderSession: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.cookies_dir_path = "./cookies/" <NEW_LINE> self.user_agent = global_config.getRaw('config', 'DEFAULT_USER_AGENT') <NEW_LINE> self.session = self._init_session() <NEW_LINE> <DEDENT> def _init_session(self): <NEW_LINE> <INDENT> session ...
Session相关操作
62598ede435de62698e9a37d
class QATrackerBug(QATrackerRPCObject): <NEW_LINE> <INDENT> CONVERT_INT = ['bugnumber', 'count'] <NEW_LINE> CONVERT_DATE = ['earliest_report', 'latest_report'] <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "%s: %s" % (self.__class__.__name__, self.bugnumber)
A bug entry
62598ede23849d37ff84f661
class TirePsi(object): <NEW_LINE> <INDENT> def __init__(self, ref=26.0): <NEW_LINE> <INDENT> self.__ref = ref <NEW_LINE> <DEDENT> def interpolate(self, psi: float) -> float: <NEW_LINE> <INDENT> return psi / self.__ref <NEW_LINE> <DEDENT> def interpolate_color(self, psi: float) -> list: <NEW_LINE> <INDENT> perc = self.i...
Handles tire pressure interpolations.
62598edf2c8b7c6e89bd1d67
class ARFPlot(shplot.HistogramPlot): <NEW_LINE> <INDENT> histo_prefs = shplot.backend.get_model_histo_defaults() <NEW_LINE> def prepare(self, arf, data=None): <NEW_LINE> <INDENT> self.xlo = arf.energ_lo <NEW_LINE> self.xhi = arf.energ_hi <NEW_LINE> self.y = arf.specresp <NEW_LINE> self.title = arf.name <NEW_LINE> self....
Create plots of the ancillary response file (ARF). Attributes ---------- histo_prefs : dict The preferences for the plot. xlo, xhi : array_like The lower and upper edges of each bin. y : array_like The effective area (ARF) value for the bin. xlabel, ylabel, title : str Plot labels.
62598edf56ac1b37e6300793
class account: <NEW_LINE> <INDENT> def POST(self): <NEW_LINE> <INDENT> web.header('Content-Type', 'application/json') <NEW_LINE> if context.user_id() > 0: <NEW_LINE> <INDENT> users_model.session_login(context.user_id()) <NEW_LINE> return json.dumps( { 'success': True, 'user_id': context.user_id(), 'username': context.u...
Handles login, and REST API for login/registration.
62598edf3539df3088eca859