code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SharedData(Belief): <NEW_LINE> <INDENT> pass
Shared belief amond the whole network
62598f9c507cdc57c63a4b45
class GloboPlayViewTestCase(APITestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.url = reverse('api:globo_play') <NEW_LINE> <DEDENT> def test_post_for_the_view_pogram(self): <NEW_LINE> <INDENT> data = {'title':'teste', 'duration':'10:15:00;FF', 'name':'teste name'} <NEW_LINE> response = self.clie...
Class Testing View Pogramas
62598f9c596a897236127a31
class TrafficLightMachine(StateMachine): <NEW_LINE> <INDENT> green = State('Green', initial=True) <NEW_LINE> yellow = State('Yellow') <NEW_LINE> red = State('Red') <NEW_LINE> cycle = green.to(yellow) | yellow.to(red) | red.to(green) <NEW_LINE> @green.to(yellow) <NEW_LINE> def slowdown(self, *args, **kwargs): <NEW_LINE>...
A traffic light machine
62598f9c4527f215b58e9c94
class Menu: <NEW_LINE> <INDENT> def __init__(self, screen, **kwargs): <NEW_LINE> <INDENT> self.log = logging.getLogger('DragonHab') <NEW_LINE> self.screen = screen <NEW_LINE> self.id = kwargs['id'] <NEW_LINE> self.parent = kwargs.get("parent",None) <NEW_LINE> self.title = kwargs.get("title","NO TITLE") <NEW_LINE> self....
Menu Class
62598f9c3cc13d1c6d46551c
class EditarItemOpcao(RestauranteMixin, CardapioMixin, OpcaoMixin, ItemOpcaoMixin, View): <NEW_LINE> <INDENT> form_class = Form_Item_Default <NEW_LINE> def post(self, request): <NEW_LINE> <INDENT> form = self.form_class(request.POST, instance=self.item) <NEW_LINE> if form.is_valid(): <NEW_LINE> <INDENT> form.save() <NE...
Edita item de opcao via json
62598f9c4a966d76dd5eec91
class Threshold(object): <NEW_LINE> <INDENT> def __init__(self, weights, thresh_type='soft'): <NEW_LINE> <INDENT> self.weights = weights <NEW_LINE> self.thresh_type = thresh_type <NEW_LINE> <DEDENT> def op(self, data, extra_factor=1.0): <NEW_LINE> <INDENT> threshold = self.weights * extra_factor <NEW_LINE> return thres...
Threshold proximity operator This class defines the threshold proximity operator Parameters ---------- weights : np.ndarray Input array of weights thresh_type : str {'hard', 'soft'}, optional Threshold type (default is 'soft')
62598f9c3539df3088ecc067
class StateLayer(tf.compat.v1.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, input_layer_norm: bool = False) -> None: <NEW_LINE> <INDENT> super(StateLayer, self).__init__(name='state_layer') <NEW_LINE> self.flatten = tf.compat.v1.layers.Flatten() <NEW_LINE> self.input_layer_norm = input_layer_norm <NEW_LINE> <DE...
StateLayer should be used as an input layer in a DRP. It flattens each state fluent and returns a single concatenated tensor. Args: input_layer_norm (bool): The boolean flag for enabling layer normalization.
62598f9c07f4c71912baf1fc
class EventSource(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "EventSource %s" % self.name
A source catalogue of seismic events. E.g. ISC Web Catalogue :attribute id: Internal identifier :attribute created_at: When this object has been imported into the catalogue db :attribute name: an unique event source short name. :attribyte agencies: a list of :py:class:`~eqcatalogue.models.Agency` instances ...
62598f9cd53ae8145f91823f
class LineStringBufferByM(AlgorithmMetadata, QgsProcessingFeatureBasedAlgorithm): <NEW_LINE> <INDENT> METADATA = AlgorithmMetadata.read(__file__, 'LineStringBufferByM') <NEW_LINE> def inputLayerTypes(self): <NEW_LINE> <INDENT> return [QgsProcessing.TypeVectorLine] <NEW_LINE> <DEDENT> def outputName(self): <NEW_LINE> <I...
Variable-Width Vertex-Wise Buffer. Local buffer width at each vertex is determined from M coordinate.
62598f9c56ac1b37e6301f9b
class DbTestCase(test_base.BaseTestCase): <NEW_LINE> <INDENT> FIXTURE = DbFixture <NEW_LINE> SCHEMA_SCOPE = None <NEW_LINE> _schema_resources = {} <NEW_LINE> _database_resources = {} <NEW_LINE> def _resources_for_driver(self, driver, schema_scope, generate_schema): <NEW_LINE> <INDENT> if driver not in self._database_re...
Base class for testing of DB code.
62598f9c76e4537e8c3ef367
class PIDrecord: <NEW_LINE> <INDENT> def __init__(self, fields): <NEW_LINE> <INDENT> self.pidType = int(fields[0]) <NEW_LINE> self.pidSType = int(fields[1]) <NEW_LINE> self.pidAPID = int(fields[2]) <NEW_LINE> self.pidPI1 = int(fields[3]) <NEW_LINE> self.pidPI2 = int(fields[4]) <NEW_LINE> self.pidSPID = int(fields[5]) <...
MIB record from pid.dat
62598f9c8e7ae83300ee8e50
class AdaptorDiagCap(ManagedObject): <NEW_LINE> <INDENT> consts = AdaptorDiagCapConsts() <NEW_LINE> naming_props = set([]) <NEW_LINE> mo_meta = MoMeta("AdaptorDiagCap", "adaptorDiagCap", "diag", VersionMeta.Version131c, "InputOutput", 0x3f, [], ["read-only"], ['adaptorFruCapProvider'], [], ["Get"]) <NEW_LINE> prop_meta...
This is AdaptorDiagCap class.
62598f9c85dfad0860cbf94d
class MainCharacter(Character): <NEW_LINE> <INDENT> health = 100 <NEW_LINE> List = [] <NEW_LINE> def __init__(self, x, y, agent): <NEW_LINE> <INDENT> self.health = MainCharacter.health <NEW_LINE> self.description = "maincharacter" <NEW_LINE> self.direction = 'w' <NEW_LINE> self.velocity = 16 <NEW_LINE> self.imgPath = '...
This class represents the MainCharacter for the game
62598f9c44b2445a339b6845
class Synthesizer(): <NEW_LINE> <INDENT> def __init__(self, lpc_frame_array): <NEW_LINE> <INDENT> self._frame_array = lpc_frame_array <NEW_LINE> <DEDENT> def decode(self): <NEW_LINE> <INDENT> audio_frames = self._reconstruct_frames() <NEW_LINE> audio_array = self._merge_frames(audio_frames) <NEW_LINE> return audio_arra...
Class decodes lpc packets into an array.
62598f9c67a9b606de545d7b
class Operator(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String, nullable=False, index=True, unique=True) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return '<Operator name={0!r}>'.format(self.name) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def g...
An operator that has been handled by IIB.
62598f9c56ac1b37e6301f9c
class Measure(models.Model): <NEW_LINE> <INDENT> index_weight = 5 <NEW_LINE> code = models.CharField(_("code"),max_length=const.DB_CHAR_CODE_6,blank=True,null=True) <NEW_LINE> name = models.CharField(_("name"),max_length=const.DB_CHAR_NAME_20) <NEW_LINE> status = models.BooleanField(_("in use"),default=True) <NEW_LINE>...
计量单位
62598f9c60cbc95b063640fe
class Paraboloid(Component): <NEW_LINE> <INDENT> x = Float(0.0, iotype='in', desc='The variable x') <NEW_LINE> y = Float(0.0, iotype='in', desc='The variable y') <NEW_LINE> f_xy = Float(0.0, iotype='out', desc='F(x,y)') <NEW_LINE> def execute(self): <NEW_LINE> <INDENT> x = self.x <NEW_LINE> y = self.y <NEW_LINE> self.f...
Evaluates the equation f(x,y) = (x-3)^2 + xy + (y+4)^2 - 3
62598f9cc432627299fa2d8a
class CntFlagB(CntBasic): <NEW_LINE> <INDENT> @property <NEW_LINE> def _regular_cnt_id(self): <NEW_LINE> <INDENT> return NPK_FLAG_B
Flag typ found in gps-5.23-mipsbe.npk Payload contains b' update-console '
62598f9cdd821e528d6d8ce6
class UserFavoriteAdmin(object): <NEW_LINE> <INDENT> list_display = ['user', 'fav_id', 'fav_type', 'add_time'] <NEW_LINE> search_fields = ['user', 'fav_id', 'fav_type'] <NEW_LINE> list_filter = ['user', 'fav_id', 'fav_type', 'add_time'] <NEW_LINE> model_icon = 'fas fa-star'
用户收藏后台
62598f9c8e71fb1e983bb867
class DmozSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = 'dmoz' <NEW_LINE> allowed_domains = ['dmoz.org'] <NEW_LINE> start_urls = [ "http://www.dmoz.org/Computers/Programming/Languages/Python/" ] <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT> for href in response.css('ul.directory.dir-col > li > a::attr(\...
docstring for DmozSpider
62598f9c627d3e7fe0e06c5c
class AffineTransform3D(ImagePreprocessing3D): <NEW_LINE> <INDENT> def __init__(self, affine_mat, translation=np.zeros(3), clamp_mode="clamp", pad_val=0.0, bigdl_type="float"): <NEW_LINE> <INDENT> affine_mat_tensor = JTensor.from_ndarray(affine_mat) <NEW_LINE> translation_tensor = JTensor.from_ndarray(translation) <NEW...
Affine transformer implements affine transformation on a given tensor. To avoid defects in resampling, the mapping is from destination to source. dst(z,y,x) = src(f(z),f(y),f(x)) where f: dst -> src :param affine_mat: numpy array in 3x3 shape.Define affine transformation from dst to src. :param translation: numpy array...
62598f9cd268445f26639a5c
class PyPath: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.py_buffer = "" <NEW_LINE> <DEDENT> def call(self, pathobj): <NEW_LINE> <INDENT> cursym = pathobj.prog[pathobj.y][pathobj.x] <NEW_LINE> if cursym == '@': <NEW_LINE> <INDENT> result = eval(self.getstr(pathobj), {'pathobj' : pathobj}) <NEW_LINE...
Plugin that allows inline execution of Python expressions and statements.
62598f9c91af0d3eaad39bbc
@attr.s <NEW_LINE> class TurnParams(object): <NEW_LINE> <INDENT> main_corridor_length = attr.ib(default=8, type=float) <NEW_LINE> turn_corridor_length = attr.ib(default=5, type=float) <NEW_LINE> turn_corridor_angle = attr.ib(default= 2 * np.pi / 8, type=float) <NEW_LINE> main_corridor_width = attr.ib(default=1.0, type=...
Parametrization of a specific turn
62598f9ca219f33f346c65cc
class ListTopDDoSDataResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Data = None <NEW_LINE> self.IPData = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Data") is not None: <NEW_LINE> <INDENT> self.Da...
ListTopDDoSData返回参数结构体
62598f9ca8370b77170f0195
class MsgLinuxMemState(SBP): <NEW_LINE> <INDENT> _parser = construct.Struct( 'index' / construct.Int8ul, 'pid' / construct.Int16ul, 'pmem' / construct.Int8ul, 'time' / construct.Int32ul, 'flags' / construct.Int8ul, 'tname'/ construct.Bytes(15), 'cmdline' / construct.GreedyBytes,) <NEW_LINE> __slots__ = [ 'index', 'pid'...
SBP class for message MSG_LINUX_MEM_STATE (0x7F09). You can have MSG_LINUX_MEM_STATE inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields. This message indicates the process state of the top 10 heaviest consumers of memory on the system, including a timestamp. ...
62598f9c442bda511e95c20f
class PathType(Enum): <NEW_LINE> <INDENT> STOP = 0 <NEW_LINE> MAY_STOP = 1 <NEW_LINE> CURVE = 2 <NEW_LINE> LINEAR = 3 <NEW_LINE> STEP = 4
Interpolation type of Path.
62598f9ce5267d203ee6b6c0
class MyDynamicMplCanvas(MyMplCanvas): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> MyMplCanvas.__init__(self, *args, **kwargs) <NEW_LINE> timer = QtCore.QTimer(self) <NEW_LINE> timer.timeout.connect(self.update_figure) <NEW_LINE> timer.start(1000) <NEW_LINE> <DEDENT> def compute_initial...
A canvas that updates itself every second with a new plot.
62598f9cbe383301e02535a8
class TestCheck(Check): <NEW_LINE> <INDENT> __test__ = True <NEW_LINE> @property <NEW_LINE> def this_check(self): <NEW_LINE> <INDENT> return chk <NEW_LINE> <DEDENT> def test_smoke(self): <NEW_LINE> <INDENT> assert self.passes("""Smoke phrase with nothing flagged.""") <NEW_LINE> assert not self.passes( """The legal team...
The test class for sexism.misc.
62598f9c7047854f4633f194
class TDistSoftAttention(ProbabilityTensor): <NEW_LINE> <INDENT> def get_output_shape_for(self, input_shape): <NEW_LINE> <INDENT> return (input_shape[0], input_shape[1], input_shape[2]) <NEW_LINE> <DEDENT> def compute_mask(self, x, mask=None): <NEW_LINE> <INDENT> if mask is None or mask.ndim==2: <NEW_LINE> <INDENT> ret...
This will create the context vector at each timestep
62598f9c4f6381625f199396
class FileHandler: <NEW_LINE> <INDENT> def get_srtm_dir(self): <NEW_LINE> <INDENT> result = "" <NEW_LINE> if 'HOME' in os.environ: <NEW_LINE> <INDENT> result = '{0}/.cache/srtm'.format(os.environ['HOME']) <NEW_LINE> <DEDENT> elif 'HOMEPATH' in os.environ: <NEW_LINE> <INDENT> result = '{0}/.cache/srtm'.format(os.environ...
The default file handler. It can be changed if you need to save/read SRTM files in a database or Amazon S3.
62598f9c009cb60464d012d8
class TriggerEfficiency: <NEW_LINE> <INDENT> def __init__(self, triggername, minbiascontainer, triggeredcontainer): <NEW_LINE> <INDENT> self.__triggername = triggername <NEW_LINE> self.__minbiascontainer = minbiascontainer <NEW_LINE> self.__triggeredcontainer = triggeredcontainer <NEW_LINE> self.__triggerefficiency = N...
Class calculating the trigger efficiency from a given min. bias container and a given triggered container
62598f9cd7e4931a7ef3be4b
class UnityML(): <NEW_LINE> <INDENT> def __init__(self, name, seed=0): <NEW_LINE> <INDENT> from unityagents import UnityEnvironment <NEW_LINE> self.seed = seed <NEW_LINE> print('SEED: {}'.format(self.seed)) <NEW_LINE> self.env = UnityEnvironment(file_name=name, seed=seed) <NEW_LINE> self.brain_name = self.env.brain_nam...
Base class for Unity ML environments using unityagents (v0.4).
62598f9c38b623060ffa8e44
class DeleteProductResponse(SdkResponse): <NEW_LINE> <INDENT> sensitive_list = [] <NEW_LINE> openapi_types = { 'body': 'str' } <NEW_LINE> attribute_map = { 'body': 'body' } <NEW_LINE> def __init__(self, body=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._body = None <NEW_LINE> self.discriminator = None ...
Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition.
62598f9c236d856c2adc9313
class PartialRollout(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.states = [] <NEW_LINE> self.actions = [] <NEW_LINE> self.rewards = [] <NEW_LINE> self.values = [] <NEW_LINE> self.r = 0.0 <NEW_LINE> self.features = [] <NEW_LINE> <DEDENT> def add(self, state, action, reward, value, features)...
a piece of a complete rollout. We run our agent, and process its experience once it has processed enough steps.
62598f9c0a50d4780f70518c
class GameAlreadyStarted(Exception): <NEW_LINE> <INDENT> pass
An action requiring the game to be waiting was attempted after starting it
62598f9cd7e4931a7ef3be4c
class SlackIssuesMessageBuilder(SlackMessageBuilder): <NEW_LINE> <INDENT> def __init__( self, group: Group, event: Event | None = None, tags: set[str] | None = None, identity: Identity | None = None, actions: Sequence[MessageAction] | None = None, rules: list[Rule] | None = None, link_to_event: bool = False, issue_deta...
We're keeping around this awkward interface so that we can share logic with unfurling.
62598f9cc432627299fa2d8c
class TerminalMode: <NEW_LINE> <INDENT> def __init__(self, fileno: int): <NEW_LINE> <INDENT> self.fileno = fileno <NEW_LINE> self.mode = None <NEW_LINE> self.ttysize = None <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.mode = tty.tcgetattr(self.fileno) <NEW_LINE> <DEDENT> ex...
Save terminal mode and size on entry, restore them on exit
62598f9c627d3e7fe0e06c5e
class ActionStructure(PClass): <NEW_LINE> <INDENT> type = field(type=(unicode, None.__class__)) <NEW_LINE> children = pvector_field(object) <NEW_LINE> failed = field(type=bool) <NEW_LINE> @classmethod <NEW_LINE> def from_written(cls, written): <NEW_LINE> <INDENT> if isinstance(written, WrittenMessage): <NEW_LINE> <INDE...
A tree structure used to generate/compare to Eliot trees. Individual messages are encoded as a unicode string; actions are encoded as a L{ActionStructure} instance.
62598f9cd268445f26639a5d
class HomeKitEntity(Entity): <NEW_LINE> <INDENT> def __init__(self, accessory, devinfo): <NEW_LINE> <INDENT> self._name = accessory.model <NEW_LINE> self._accessory = accessory <NEW_LINE> self._aid = devinfo['aid'] <NEW_LINE> self._iid = devinfo['iid'] <NEW_LINE> self._address = "homekit-{}-{}".format(devinfo['serial']...
Representation of a Home Assistant HomeKit device.
62598f9c442bda511e95c210
class FuzzyAvoidObstacle(ISensorBasedController): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> sensors = [] <NEW_LINE> for i in range(0, 8): <NEW_LINE> <INDENT> sensors.append(createSensorAtecendent('sensor' + str(i))) <NEW_LINE> <DEDENT> self.linearCsq = createLinearSpeedConsequent() <NEW_LINE> self.ang...
Fuzzy controller to avoid obstacles.
62598f9c379a373c97d98dc9
class QuickDjangoTest(object): <NEW_LINE> <INDENT> DIRNAME = os.path.dirname(__file__) <NEW_LINE> INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', ) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.apps = args <NEW_LINE> ...
A quick way to run the Django test suite without a fully-configured project. Example usage: >>> QuickDjangoTest('app1', 'app2') Based on a script published by Lukasz Dziedzia at: http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app
62598f9c8a43f66fc4bf1f30
class UO2(UraniumOxide): <NEW_LINE> <INDENT> pass
Another name for UraniumOxide
62598f9c1f5feb6acb1629d6
class ResponseError(UltronClientError): <NEW_LINE> <INDENT> pass
The base exception for errors stemming from UltronClient responses.
62598f9c090684286d5935b4
class Config: <NEW_LINE> <INDENT> def __init__(self, yaml_file): <NEW_LINE> <INDENT> with open(yaml_file, 'r') as f: <NEW_LINE> <INDENT> s = yaml.load(f) <NEW_LINE> <DEDENT> self.data_path = s['data'] <NEW_LINE> self.strategy = s['strategy'] <NEW_LINE> self.strategy_parameters = s['parameters'] <NEW_LINE> self.output_f...
Class representing the global configuration of the marketcrush scripts Parameters ---------- yaml_file : string The path to the yaml config file. For details on the yaml schema see the marketcrush documentation
62598f9ce76e3b2f99fd87eb
class AlignmentQCReport(QCReport): <NEW_LINE> <INDENT> data_process = AlignmentQC <NEW_LINE> target_name = 'alignment' <NEW_LINE> data_file = AlnQCfile <NEW_LINE> file_target_name = 'alignmentqc'
Abstract class handling all alignment-based QC Reports.
62598f9c596a897236127a35
class SQLTableExporter(DjangoModelExporter): <NEW_LINE> <INDENT> def __init__(self, session): <NEW_LINE> <INDENT> DjangoModelExporter.__init__(self) <NEW_LINE> self.session = session
public interface for sql table export
62598f9cf8510a7c17d7e052
class Ports(APIClassTemplate): <NEW_LINE> <INDENT> URL_SUFFIX = "/object/ports" <NEW_LINE> def __init__(self, fmc, **kwargs): <NEW_LINE> <INDENT> super().__init__(fmc, **kwargs) <NEW_LINE> logging.debug("In __init__() for Ports class.") <NEW_LINE> self.parse_kwargs(**kwargs) <NEW_LINE> <DEDENT> def post(self): <NEW_LIN...
The Ports Object in the FMC.
62598f9c442bda511e95c211
class NodeVisitor(object): <NEW_LINE> <INDENT> def visit(self, node): <NEW_LINE> <INDENT> method = 'visit_' + node.__class__.__name__ <NEW_LINE> visitor = getattr(self, method, self.generic_visit) <NEW_LINE> return visitor(node) <NEW_LINE> <DEDENT> def generic_visit(self, node): <NEW_LINE> <INDENT> for c_name, c in nod...
A base NodeVisitor class for visiting c_ast nodes. Subclass it and define your own visit_XXX methods, where XXX is the class name you want to visit with these methods. For example: class ConstantVisitor(NodeVisitor): def __init__(self): self.values = [] def visit_Constant(self, node): self.va...
62598f9c4527f215b58e9c98
class RegistroY600(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'Y600'), CampoData(2, 'DT_INCL_SOC'), CampoData(3, 'DT_FIM_SOC'), Campo(4, 'PAIS'), Campo(5, 'IND_QUALIF_SOCIO'), Campo(6, 'CPF_CNPJ'), Campo(7, 'NOM_EMP'), Campo(8, 'QUALIF'), CampoNumerico(9, 'PERC_CAP_TOT'), CampoNumerico(10, 'PERC_CAP_...
Identificação de Sócios ou Titular
62598f9ca17c0f6771d5bff0
class TestHaskellComments(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 test_name_to_func_map(self): <NEW_LINE> <INDENT> test_file = 'tests/commentsForHaskell' <NEW_LINE> options = Namespace() <N...
Test line counter for the Haskell programmig language.
62598f9c009cb60464d012da
class Interactive: <NEW_LINE> <INDENT> def __init__(self, f, event="auto", recompute_out_event="auto", *args, **kwargs): <NEW_LINE> <INDENT> from hyperspy.signal import BaseSignal <NEW_LINE> self.f = f <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> _plot_kwargs = self.kwargs.pop('_plot_kwargs', ...
Chainable operations on Signals that update on events.
62598f9c45492302aabfc28d
class Hook(Action): <NEW_LINE> <INDENT> def __init__(self, hook): <NEW_LINE> <INDENT> super(Hook, self).__init__(hook)
Base class for all python hackabot hooks
62598f9cadb09d7d5dc0a33f
class SlackNotificationError(BaseError): <NEW_LINE> <INDENT> pass
Raises error when a response code from Slack is not 200
62598f9c56b00c62f0fb2666
class Raw(Field): <NEW_LINE> <INDENT> pass
Field that applies no formatting or validation.
62598f9ccc0a2c111447adc1
class PriorityLevel(IntEnum): <NEW_LINE> <INDENT> STANDARD = 0 <NEW_LINE> IFB = 1
Possible priority levels.
62598f9c45492302aabfc28e
class QueueColumn(Column): <NEW_LINE> <INDENT> def __init__(self, name, wip_limit=None, card_type=None, card_source=None): <NEW_LINE> <INDENT> super(QueueColumn, self).__init__(name, touch=0, wip_limit=wip_limit, card_type=card_type, card_source=card_source) <NEW_LINE> <DEDENT> def next_card(self, card_type=None): <NEW...
A queue column in a lane name: name of the column wip_limit: max number of cards allowed at any one time card_type: the Card type (class) accepted, or None if all types accepted card_source: the CardSource where this column pulls from It is normally not necerssary to set card_source, because it is set when...
62598f9c30bbd72246469851
class UserGroupsEntity(object): <NEW_LINE> <INDENT> swagger_types = { 'user_groups': 'list[UserGroupEntity]' } <NEW_LINE> attribute_map = { 'user_groups': 'userGroups' } <NEW_LINE> def __init__(self, user_groups=None): <NEW_LINE> <INDENT> self._user_groups = None <NEW_LINE> if user_groups is not None: <NEW_LINE> <INDEN...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f9cd7e4931a7ef3be4e
class DayGroupDay(models.Model): <NEW_LINE> <INDENT> objects = DayGroupDayManager() <NEW_LINE> daygroup = models.ForeignKey(DayGroup, on_delete=models.CASCADE) <NEW_LINE> day = models.ForeignKey(Day, on_delete=models.CASCADE) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ("day__number",) <NEW_LINE> unique_toget...
Day Group Day.
62598f9c44b2445a339b6847
@view_config( route_name='ptahcrowd-login-success', renderer='ptahcrowd:login-success.lt', layout='ptahcrowd' ) <NEW_LINE> class LoginSuccess(ptah.View): <NEW_LINE> <INDENT> def update(self): <NEW_LINE> <INDENT> user = ptah.auth_service.get_current_principal() <NEW_LINE> if user is None: <NEW_LINE> <INDENT> request = s...
Login successful information page.
62598f9ce5267d203ee6b6c3
class Debugger(DebugObject): <NEW_LINE> <INDENT> def __init__(self, project_id): <NEW_LINE> <INDENT> self._CheckClient() <NEW_LINE> self._project_id = project_id <NEW_LINE> self._project_number = str(self.GetProjectNumber(project_id)) <NEW_LINE> <DEDENT> @errors.HandleHttpError <NEW_LINE> def ListDebuggees(self, includ...
Abstracts Cloud Debugger service for a project.
62598f9ca05bb46b3848a635
class ajaxGetClients(BrowserView): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> CheckAuthenticator(self.request) <NEW_LINE> searchTerm = self.request.get('searchTerm', '').lower() <NEW_LINE> page = self.request.get('page', 1) <NEW_LINE> nr_rows = self.request.get('rows', 20) <NEW_LINE> sord = self.reques...
Vocabulary source for jquery combo dropdown box
62598f9c009cb60464d012db
class PrivateUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = create_user( email='test@MAANTAITO.FI', password='Testtestpass123', name='name' ) <NEW_LINE> self.client = APIClient() <NEW_LINE> self.client.force_authenticate(user=self.user) <NEW_LINE> <DEDENT> def test_retrieve...
Test API requests that require authentication
62598f9c8c0ade5d55dc356a
class Eng_AllRunning(MultistateDerivedParameterNode): <NEW_LINE> <INDENT> name = 'Eng (*) All Running' <NEW_LINE> values_mapping = { 0 : 'Not Running', 1 : 'Running', } <NEW_LINE> @classmethod <NEW_LINE> def can_operate(cls, available): <NEW_LINE> <INDENT> return 'Eng (*) N1 Min' in available or 'Eng (*) ...
Discrete parameter describing when all available engines are running. TODO: Include Fuel cut-off switch if recorded? TODO: Confirm that all engines were recording for the N2 Min / Fuel Flow Min parameters - theoretically there could be only three engines in the frame for a four engine aircraft. Use "Engine Count". T...
62598f9cb7558d58954633e5
class MonitoringWindow(QtGui.QMainWindow): <NEW_LINE> <INDENT> closed = QtCore.pyqtSignal() <NEW_LINE> def __init__(self, main, feature, layer): <NEW_LINE> <INDENT> QtGui.QMainWindow.__init__(self, main.iface.mainWindow()) <NEW_LINE> self.main = main <NEW_LINE> self.feature = feature <NEW_LINE> self.layer = layer <NEW_...
Window showing the MonitoringWidget for a specific field.
62598f9c0a50d4780f70518f
class AssertionClient(object): <NEW_LINE> <INDENT> DEFAULT_GRANT_TYPE = None <NEW_LINE> ASSERTION_METHODS = {} <NEW_LINE> token_auth_class = None <NEW_LINE> def __init__(self, session, token_endpoint, issuer, subject, audience=None, grant_type=None, claims=None, token_placement='header', scope=None, **kwargs): <NEW_LIN...
Constructs a new Assertion Framework for OAuth 2.0 Authorization Grants per RFC7521_. .. _RFC7521: https://tools.ietf.org/html/rfc7521
62598f9c442bda511e95c212
class GetReportCountTestResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) <NEW_LINE> <DEDENT> def get_Count(self): <NEW_LINE> <INDENT> return sel...
A ResultSet with methods tailored to the values returned by the GetReportCountTest Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598f9c24f1403a9268578d
class tanh(SimpleBlock): <NEW_LINE> <INDENT> def data_fn(self, args): <NEW_LINE> <INDENT> new_data = np.tanh(args.data) <NEW_LINE> return(new_data) <NEW_LINE> <DEDENT> def gradient_fn(self, args): <NEW_LINE> <INDENT> grad = 1 - np.tanh(args.data)**2 <NEW_LINE> return(grad)
vectorized tan h function on vectors
62598f9c851cf427c66b807e
class IdpProfileForm(happyforms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = IdpProfile <NEW_LINE> fields = ['privacy']
Form for the IdpProfile model.
62598f9ca8370b77170f0199
class Buller(Sprite): <NEW_LINE> <INDENT> def __init__(self,setting,screen,ship): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.screen = screen <NEW_LINE> self.rect = pygame.Rect(0,0,setting.buller_width, setting.buller_height) <NEW_LINE> self.rect.centerx = ship.rect.centerx <NEW_LINE> self.rect.top = ship.re...
一个队飞机发射子弹管理的类
62598f9c32920d7e50bc5e0d
class TaskFailedError(TaskError): <NEW_LINE> <INDENT> def __init__(self, code=4): <NEW_LINE> <INDENT> super(TaskFailedError, self).__init__(code) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'TaskFailedError({code})'.format(code=self.code)
Exception to indicate that a task execution has failed. Tasks can choose to raise this exception directly or derive from a more specific exception to provide more information about the error.
62598f9cac7a0e7691f722c2
class RedisPort(object): <NEW_LINE> <INDENT> def __init__(self, redis_hosts, counter_keyname): <NEW_LINE> <INDENT> self.redis_hosts = redis_hosts <NEW_LINE> self.counter_keyname = counter_keyname <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _create_redis_client(cls, host, port): <NEW_LINE> <INDENT> client = redis.Re...
将已有的redis instances中的数据迁移到其他节点上。 注意添加的redis instance的顺序一定要和以后利用SimpleRedisPort的顺序一样。 hosts格式: [("127.0.0.1", 6379), ("127.0.0.1", 6380)]
62598f9c4a966d76dd5eec97
class ShowOspfNeighborSchema(MetaParser): <NEW_LINE> <INDENT> schema = { Optional('process_name'): str, 'vrfs': { Any(): { 'neighbors': { Optional(Any()): { 'priority': str, 'state': str, 'dead_time': str, 'address': str, 'interface': str, 'up_time': str } }, Optional('total_neighbor_count'): int } } }
Schema detail for: * show ospf neighbor * show ospf {process_name} neighbor * show ospf vrf {vrf} neighbor * show ospf {process} vrf {vrf} neighbor
62598f9c009cb60464d012dc
class Meta: <NEW_LINE> <INDENT> unique_together = (('gene', 'aa_reference', 'aa_position', 'aa_variant'),)
Defines combination of gene and amino acid change as unique.
62598f9c38b623060ffa8e48
class Query(object): <NEW_LINE> <INDENT> def __init__(self, snmp_params): <NEW_LINE> <INDENT> self.snmp_query = snmp_manager.Interact(snmp_params) <NEW_LINE> <DEDENT> def supported(self): <NEW_LINE> <INDENT> validity = False <NEW_LINE> oid = '.1.3.6.1.4.1.9.9.87.1.4.1.1.18' <NEW_LINE> if self.snmp_query.oid_exists(oid)...
Class interacts with CISCO-C2900-MIB. Args: None Returns: None Key Methods: supported: Queries the device to determine whether the MIB is supported using a known OID defined in the MIB. Returns True if the device returns a response to the OID, False if not. layer1: Returns all neede...
62598f9c7b25080760ed725d
class PlaneNormalizedCuts(SegmentationStrategy): <NEW_LINE> <INDENT> def __init__(self, affinity_method=None, cut_max_pen=0.01, cut_min_size=40, cut_max_size=200): <NEW_LINE> <INDENT> super(PlaneNormalizedCuts, self).__init__() <NEW_LINE> if affinity_method is None: <NEW_LINE> <INDENT> affinity_method = BasicAffinityMa...
Segment image by iteratively performing normalized cuts. Parameters ---------- affinity_method : AffinityMatrixMethod The method used to calculate the affinity matrix. max_pen : float Iterative cutting will continue as long as the cut cost is less than max_pen. cut_min_size, cut_max_size : int Regardle...
62598f9c76e4537e8c3ef36d
class TestComponentsComponentResponse(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 testComponentsComponentResponse(self): <NEW_LINE> <INDENT> pass
ComponentsComponentResponse unit test stubs
62598f9c63d6d428bbee2569
class TotalWordsView(ListAPIView): <NEW_LINE> <INDENT> serializer_class = TotalWordsSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return TotalWords.objects.all() <NEW_LINE> <DEDENT> def get(self, request): <NEW_LINE> <INDENT> queryset = self.get_queryset() <NEW_LINE> serialized_data = self.serialize...
View for listing word:word_count pairs.
62598f9cb7558d58954633e6
class ProxyAdapterTestFixture(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.num_targets = 2 <NEW_LINE> self.test_servers = [] <NEW_LINE> self.ports = [] <NEW_LINE> self.target_config = "" <NEW_LINE> for _ in range(self.num_targets): <NEW_LINE> <INDENT> test_server = ProxyTestServer() <NEW_LINE> se...
Container class used in fixtures for testing proxy adapters.
62598f9ca79ad16197769e1b
class MinConflictsSolver(Solver): <NEW_LINE> <INDENT> def __init__(self, steps=1000): <NEW_LINE> <INDENT> self._steps = steps <NEW_LINE> self.GRID = [] <NEW_LINE> self.PG = None <NEW_LINE> self.SCREEN = None <NEW_LINE> self.CLOCK = None <NEW_LINE> self.steps = 0 <NEW_LINE> <DEDENT> def getSolution(self, domains, constr...
Problem solver based on the minimum conflicts theory Examples: >>> result = [[('a', 1), ('b', 2)], ... [('a', 1), ('b', 3)], ... [('a', 2), ('b', 3)]] >>> problem = Problem(MinConflictsSolver()) >>> problem.addVariables(["a", "b"], [1, 2, 3]) >>> problem.addConstraint(lambda a, b: b > a, ["a", "b"])...
62598f9c91f36d47f2230d7b
class History(BaseObject): <NEW_LINE> <INDENT> def __init__(self, gox, timeframe): <NEW_LINE> <INDENT> BaseObject.__init__(self) <NEW_LINE> self.signal_changed = Signal() <NEW_LINE> self.gox = gox <NEW_LINE> self.candles = [] <NEW_LINE> self.timeframe = timeframe <NEW_LINE> gox.signal_trade.connect(self.slot_trade) <NE...
represents the trading history
62598f9c56b00c62f0fb2668
@dataclass <NEW_LINE> class RemoveTextDefinition(NodeTextDefinitionChange): <NEW_LINE> <INDENT> _inherited_slots: ClassVar[List[str]] = [] <NEW_LINE> class_class_uri: ClassVar[URIRef] = KGCL.RemoveTextDefinition <NEW_LINE> class_class_curie: ClassVar[str] = "kgcl:RemoveTextDefinition" <NEW_LINE> class_name: ClassVar[st...
A node change where a text definition is deleted
62598f9c21a7993f00c65d39
class MultiprocessLivestreamRecordersController(MultiprocessRecordersController): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(MultiprocessLivestreamRecordersController, self).__init__() <NEW_LINE> <DEDENT> def recording_stopped(self, context: Context, item: ContentItem): <NEW_LINE> <INDENT> contex...
Livestreams recorder which starts new worker process every time it is invoked.
62598f9cbaa26c4b54d4f064
class GroupChatSetModifyMyCardPage(BasePage): <NEW_LINE> <INDENT> ACTIVITY = 'com.cmcc.cmrcs.android.ui.activities.GroupCardActivity' <NEW_LINE> __locators = {'': (MobileBy.ID, ''), 'com.chinasofti.rcs:id/action_bar_root': (MobileBy.ID, 'com.chinasofti.rcs:id/action_bar_root'), 'android:id/content': (MobileBy.ID, 'andr...
修改群名片页面
62598f9c01c39578d7f12b35
class ProductionConfig(): <NEW_LINE> <INDENT> SECRET_KEY = os.urandom(24) <NEW_LINE> SESSION_COOKIE_NAME = 'session name' <NEW_LINE> SESSION_PERMANENT = True
Set app config vars.
62598f9cf548e778e596b363
class Author(models.Model): <NEW_LINE> <INDENT> author = models.CharField(max_length=255) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.author <NEW_LINE> <DEDENT> def get_absolute_url(self): <NEW_LINE> <INDENT> return reverse('author-detail', args=[str(self.id)])
Book Author
62598f9cbe8e80087fbbee16
class Check(base.Endpoint): <NEW_LINE> <INDENT> def register(self, name, script=None, check_id=None, interval=None, ttl=None, notes=None, http=None): <NEW_LINE> <INDENT> if script and not interval: <NEW_LINE> <INDENT> raise ValueError('Must specify interval when using script') <NEW_LINE> <DEDENT> elif script and ttl: <...
One of the primary roles of the agent is the management of system and application level health checks. A health check is considered to be application level if it associated with a service. A check is defined in a configuration file, or added at runtime over the HTTP interface. There are two different kinds of checks: ...
62598f9cdd821e528d6d8ced
class PrechatCapture(object): <NEW_LINE> <INDENT> openapi_types = { 'avatar_url': 'str', 'enabled': 'bool', 'enable_email_linking': 'bool', 'fields': 'list[Field]' } <NEW_LINE> attribute_map = { 'avatar_url': 'avatarUrl', 'enabled': 'enabled', 'enable_email_linking': 'enableEmailLinking', 'fields': 'fields' } <NEW_LINE...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598f9ca05bb46b3848a637
class FlowFailedError(Error): <NEW_LINE> <INDENT> pass
Raised when waiting on a flow that eventually fails.
62598f9cc432627299fa2d90
class WeakTimer(notifier.WeakNotifierCallback, Timer): <NEW_LINE> <INDENT> pass
Weak variant of the Timer class. All references to the callback and supplied args/kwargs are weak references. When any of the underlying objects are deleted, the WeakTimer is automatically stopped.
62598f9c30dc7b766599f605
class HypixelSkyblockCollection: <NEW_LINE> <INDENT> def __init__(self, id: str, data: dict) -> None: <NEW_LINE> <INDENT> self._data = data <NEW_LINE> self._id = id <NEW_LINE> self._name = None <NEW_LINE> self._items = tuple() <NEW_LINE> self.__parse_data() <NEW_LINE> <DEDENT> def __parse_data(self) -> None: <NEW_LINE>...
Object representing a Skyblock Collection
62598f9c91af0d3eaad39bc2
class RecordingRegistrantStatus(object): <NEW_LINE> <INDENT> swagger_types = { 'action': 'str', 'registrants': 'list[MeetingsmeetingIdrecordingsregistrantsstatusRegistrants]' } <NEW_LINE> attribute_map = { 'action': 'action', 'registrants': 'registrants' } <NEW_LINE> def __init__(self, action=None, registrants=None): <...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f9cd268445f26639a5f
class ShoppingBasket(InjectionProvider): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.baskets = defaultdict(list) <NEW_LINE> <DEDENT> def acquire_injection(self, worker_ctx): <NEW_LINE> <INDENT> class Basket(object): <NEW_LINE> <INDENT> def __init__(self, basket): <NEW_LINE> <INDENT> self._basket = ...
A shopping basket tied to the current ``user_id``.
62598f9c379a373c97d98dcd
class RespCondition(common.QTICommentContainer, ConditionMixin): <NEW_LINE> <INDENT> XMLNAME = 'respcondition' <NEW_LINE> XMLATTR_continue = ('continueFlag', core.ParseYesNo, core.FormatYesNo) <NEW_LINE> XMLATTR_title = 'title' <NEW_LINE> XMLCONTENT = xml.ElementContent <NEW_LINE> def __init__(self, parent): <NEW_LINE>...
This element contains the actual test to be applied to the user responses to determine their correctness or otherwise. Each <respcondition> contains an actual test, the assignment of a value to the associate scoring variables and the identification of the feedback to be associated with the test:: <!ELEMENT respconditi...
62598f9cd99f1b3c44d05468
class Adjective(ConjugationType): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def conforms_to(pos_info: List[str], base: str, c_type_info: str) -> bool: <NEW_LINE> <INDENT> return pos.Adjective.conforms_to(pos_info) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def conjugate(base: str, ending: str) -> str: <NEW_LINE> <...
形容詞活用
62598f9cd486a94d0ba2bd8d
class PublishDrop8Test(BaseTest): <NEW_LINE> <INDENT> fixtureCmds = [ "aptly repo create local1", "aptly repo create local2", "aptly repo add local1 ${files}/libboost-program-options-dev_1.49.0.1_i386.deb", "aptly repo add local2 ${files}", "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly....
publish drop: skip component cleanup
62598f9c596a897236127a38
class InboundNatRuleListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[InboundNatRule]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[Lis...
Response for ListInboundNatRule API service call. Variables are only populated by the server, and will be ignored when sending a request. :param value: A list of inbound nat rules in a load balancer. :type value: list[~azure.mgmt.network.v2019_07_01.models.InboundNatRule] :ivar next_link: The URL to get the next set ...
62598f9c99cbb53fe6830c8a
class Blockchain: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.blockchain = [Blockchain._create_genesis_block()] <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _create_genesis_block(): <NEW_LINE> <INDENT> return Block(0, datetime.datetime.now(), 'genesis', '0') <NEW_LINE> <DEDENT> def latest(self)...
A snakecoin blockchain.
62598f9c0c0af96317c5613b
class TestAccountBrokerBeforeMetadata(TestAccountBroker): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._imported_create_account_stat_table = AccountBroker.create_account_stat_table <NEW_LINE> AccountBroker.create_account_stat_table = premetadata_create_account_stat_table <NEW_LINE...
Tests for AccountBroker against databases created before the metadata column was added.
62598f9c3cc13d1c6d465524
class TestNewActivity(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 testNewActivity(self): <NEW_LINE> <INDENT> pass
NewActivity unit test stubs
62598f9cd7e4931a7ef3be51
class PermissionTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_get_methods(self): <NEW_LINE> <INDENT> permission = Permission("GRANT_READ", "PROJECT", "uuid") <NEW_LINE> self.assertEqual("GRANT_READ", permission.get_right()) <NEW_LINE> self.assertEqual("PROJECT", permission.get_target_type()) <NEW_LINE> self.ass...
Unit tests for permission object
62598f9cfbf16365ca793e72