code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ListEntityTypesResponse(proto.Message): <NEW_LINE> <INDENT> @property <NEW_LINE> def raw_page(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> entity_types = proto.RepeatedField(proto.MESSAGE, number=1, message="EntityType",) <NEW_LINE> next_page_token = proto.Field(proto.STRING, number=2,)
The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. Attributes: entity_types (Sequence[google.cloud.dialogflow_v2beta1.types.EntityType]): The list of agent entity types. There will be a maximum number of items returned based on the p...
62598ee1d53ae8145f916a93
class IVisualizationJson(Interface): <NEW_LINE> <INDENT> json = schema.Text( title=u'JSON', description=u'Visualization JSON', readonly=True )
Visualization data JSON (daviz.json)
62598ee10a50d4780f7039b1
class Sphere(Lathe): <NEW_LINE> <INDENT> def __init__( self, trace, transforms = [], material = None, parent=None): <NEW_LINE> <INDENT> super().__init__(trace, transforms, material, lambda t: math.sin(t), lambda t: -math.cos(t), 0, math.pi, 2, 1, parent)
A unit UV sphere.
62598ee160cbc95b06362944
class UpdateFunctionConfigurationResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
UpdateFunctionConfiguration返回参数结构体
62598ee1dd821e528d6d754e
class PersonaUpdateView(UpdateView, LoginRequiredMixin): <NEW_LINE> <INDENT> model = Persona <NEW_LINE> form_class = PersonaForm <NEW_LINE> template_name = 'persona/persona_update.html'
Permite actualizar los datos de una :class:`Persona`
62598ee1379a373c97d97603
class DataprocSubmitHadoopJobOperator(DataprocJobBaseOperator): <NEW_LINE> <INDENT> template_fields = [ 'arguments', 'job_name', 'cluster_name', 'region', 'dataproc_jars', 'dataproc_properties', 'impersonation_chain', ] <NEW_LINE> ui_color = '#0273d4' <NEW_LINE> job_type = 'hadoop_job' <NEW_LINE> @apply_defaults <NEW_L...
Start a Hadoop Job on a Cloud DataProc cluster. :param main_jar: The HCFS URI of the jar file containing the main class (use this or the main_class, not both together). :type main_jar: str :param main_class: Name of the job class. (use this or the main_jar, not both together). :type main_class: str :param argu...
62598ee14f6381625f1987c0
class NodeGroupTemplate(mb.SaharaBase): <NEW_LINE> <INDENT> __tablename__ = 'node_group_templates' <NEW_LINE> __table_args__ = ( sa.UniqueConstraint('name', 'tenant_id'), ) <NEW_LINE> id = _id_column() <NEW_LINE> name = sa.Column(sa.String(80), nullable=False) <NEW_LINE> description = sa.Column(sa.Text) <NEW_LINE> tena...
Template for NodeGroup.
62598ee101c39578d7f113b2
class WeightsForm(forms.ModelForm): <NEW_LINE> <INDENT> weight = forms.IntegerField(widget=forms.TextInput( {'class': 'form-control', 'type': 'number'})) <NEW_LINE> date_weights = forms.DateField(widget=forms.TextInput( attrs={'class': 'form-control'})) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Weights <NEW_LI...
Weights Form
62598ee10a50d4780f7039b2
class ConstantInt(Node): <NEW_LINE> <INDENT> def __init__(self, intval): <NEW_LINE> <INDENT> self.intval = intval <NEW_LINE> <DEDENT> def compile(self, ctx): <NEW_LINE> <INDENT> from kermit.objects import W_IntObject <NEW_LINE> w = W_IntObject(self.intval) <NEW_LINE> ctx.emit(bytecode.LOAD_CONSTANT, ctx.register_consta...
Represent a constant
62598ee156ac1b37e63007f5
class TagViewSet(BaseRecipeAttrViewset): <NEW_LINE> <INDENT> queryset = Tag.objects.all() <NEW_LINE> serializer_class = serializers.TagSerializer
Lida com as tags no BD
62598ee276e4537e8c3edbc0
class TestAddressActivationForm(unittest.TestCase): <NEW_LINE> <INDENT> def test_valid_email_is_valid(self): <NEW_LINE> <INDENT> data = { 'email': 'les@example.org', 'user_email': 'me@example.org', } <NEW_LINE> form = AddressActivationForm(data) <NEW_LINE> self.assertTrue(form.is_valid()) <NEW_LINE> <DEDENT> def test_i...
Test the activation form.
62598ee2d6c5a102081e073a
class RepositoryOfferProductPriceStoragePickuppoint(models.Model, Offer): <NEW_LINE> <INDENT> text = models.CharField(max_length=200) <NEW_LINE> product = models.ForeignKey(Product) <NEW_LINE> price = models.IntegerField(u"Цена") <NEW_LINE> currency = models.CharField(u"Валюта", max_length=5) <NEW_LINE> storage = model...
Для точки получения в Москве если товар едет с московского склада цена одна, а если точка получения на Сахалинее и товар едет также с московского скалада то цена будет другой.
62598ee216aa5153ce3feb05
class CandleData(Enum): <NEW_LINE> <INDENT> OPEN = 1 <NEW_LINE> HIGH = 2 <NEW_LINE> LOW = 3 <NEW_LINE> CLOSE = 4
Candle Data enum
62598ee27d43ff2487426700
class FailTestException(Exception): <NEW_LINE> <INDENT> pass
It provides a failing build
62598ee2a17c0f6771d5a85e
class SalomeMesh(geometries_io.Mesh): <NEW_LINE> <INDENT> def __init__(self, salome_mesh, mesh_description, model_part_name=""): <NEW_LINE> <INDENT> if isinstance(salome_mesh, str): <NEW_LINE> <INDENT> mesh_identifier = salome_mesh <NEW_LINE> <DEDENT> elif any([salome_mesh_utilities.IsMeshProxy(salome_mesh), salome_mes...
Specialized version of Mesh to make access to Salome-meshes easier
62598ee2627d3e7fe0e05491
class AplicaAnimCor(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.aplica_anima_cor" <NEW_LINE> bl_label = "Apply Color and Animation" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> if len(bpy.context.selected_objects) == 1: <NEW...
Tooltip
62598ee2d58c6744b42db5bb
class CustomUserManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, email, password, ** extra_fields): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise ValueError(_('Email Address must be set')) <NEW_LINE> <DEDENT> email = self.normalize_email(email) <NEW_LINE> user = self.model(email=email, ...
Custom user model manager where email address is the unique identifier instead of usernames
62598ee291f36d47f22301a8
class MathJax: <NEW_LINE> <INDENT> def __call__(self, x, combine_all=False): <NEW_LINE> <INDENT> return self.eval(x, combine_all=combine_all) <NEW_LINE> <DEDENT> def eval(self, x, globals=None, locals=None, mode='display', combine_all=False): <NEW_LINE> <INDENT> x = latex(x, combine_all=combine_all) <NEW_LINE> prefix =...
Render LaTeX input using MathJax. This returns a :class:`MathJaxExpr`. EXAMPLES:: sage: from sage.misc.latex import MathJax sage: MathJax()(3) <html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}3</script></html> sage: MathJax()(ZZ) <html><script type="math/tex; mode=dis...
62598ee2d486a94d0ba2a5e0
class Star: <NEW_LINE> <INDENT> def __init__(self, sp_weight, sp_bias, cooldown): <NEW_LINE> <INDENT> self.hit_damage = (sp_weight*intellect + sp_bias)/2 <NEW_LINE> self.cooldown = cooldown <NEW_LINE> self.hit_count = 1
Creates stats for Divine Star
62598ee22ae34c7f260a96f2
class BaseAPI(remote.Service): <NEW_LINE> <INDENT> @property <NEW_LINE> def current_user(self): <NEW_LINE> <INDENT> if not hasattr(self, '_user'): <NEW_LINE> <INDENT> self._user = get_current_user() <NEW_LINE> <DEDENT> return self._user
A base class for all APIs
62598ee2379a373c97d97605
class ThreadStart(TaskSpec): <NEW_LINE> <INDENT> def __init__(self, wf_spec, name='ThreadStart', **kwargs): <NEW_LINE> <INDENT> TaskSpec.__init__(self, wf_spec, name, **kwargs) <NEW_LINE> self.internal = True <NEW_LINE> <DEDENT> def _on_complete_hook(self, my_task): <NEW_LINE> <INDENT> my_task._assign_new_thread_id() <...
This class implements the task the is placed at the beginning of each thread. It is NOT supposed to be used! It is purely internal, and used only by the ThreadSplit task. The task has no inputs and at least one output. If more than one output is connected, the task does an implicit parallel split.
62598ee2f548e778e5969ba0
class GetWeatherByCoordinatesInputSet(InputSet): <NEW_LINE> <INDENT> def set_AppID(self, value): <NEW_LINE> <INDENT> super(GetWeatherByCoordinatesInputSet, self)._set_input('AppID', value) <NEW_LINE> <DEDENT> def set_Latitude(self, value): <NEW_LINE> <INDENT> super(GetWeatherByCoordinatesInputSet, self)._set_input('Lat...
An InputSet with methods appropriate for specifying the inputs to the GetWeatherByCoordinates Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598ee25166f23b2e2419e0
class ReportBucketPage(Page): <NEW_LINE> <INDENT> pass
Class representing a page of reports from a bucket or search.
62598ee238b623060ffa76a0
class openflow(packet_base.PacketBase): <NEW_LINE> <INDENT> PACK_STR = "!BBHI" <NEW_LINE> _MIN_LEN = struct.calcsize(PACK_STR) <NEW_LINE> def __init__(self, msg): <NEW_LINE> <INDENT> super(openflow, self).__init__() <NEW_LINE> self.msg = msg <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def parser(cls, buf): <NEW_LINE> <...
OpenFlow message encoder/decoder class. An instance has the following attributes at least. ============== ========================================================= Attribute Description ============== ========================================================= msg An instance of OpenFlow message (see :r...
62598ee27b25080760ed5aa5
class SetSubnetPool(command.Command): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(SetSubnetPool, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'subnet_pool', metavar='<subnet-pool>', help='Subnet pool to modify (name or ID)' ) <NEW_LINE> parser.add_argument( '--...
Set subnet pool properties
62598ee26e29344779afec3a
class Kurt(Rolling): <NEW_LINE> <INDENT> def __init__(self, feature, N): <NEW_LINE> <INDENT> if N != 0 and N < 4: <NEW_LINE> <INDENT> raise ValueError("The rolling window size of Kurtosis operation should >= 5") <NEW_LINE> <DEDENT> super(Kurt, self).__init__(feature, N, "kurt")
Rolling Kurtosis Parameters ---------- feature : Expression feature instance N : int rolling window size Returns ---------- Expression a feature instance with rolling kurtosis
62598ee2c432627299fa15c2
class _SubnetworkRecWrappedLoss(Loss): <NEW_LINE> <INDENT> def __init__(self, base_loss, loss_value, error_value, norm_factor): <NEW_LINE> <INDENT> super(_SubnetworkRecWrappedLoss, self).__init__( base_network=base_loss.base_network, use_flatten_frames=base_loss.use_flatten_frames, use_normalized_loss=base_loss.use_nor...
This wraps losses inside the loop of :class:`RecLayer`.
62598ee244b2445a339b5c6c
class FastRCNNPredictorAttention(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels_two_ml_head, in_channels_attention_head, num_classes): <NEW_LINE> <INDENT> super(FastRCNNPredictorAttention, self).__init__() <NEW_LINE> self.cls_score = nn.Linear(in_channels_attention_head, num_classes) <NEW_LINE> self.bbo...
Standard classification + bounding box regression layers for Fast R-CNN with AttentionHead. Arguments: in_channels_two_ml_head (int): number of input channels from TwoMLPHead in_channels_attention_head (int): number of input channels from AttentionHead num_classes (int): number of output classes (including ...
62598ee276e4537e8c3edbc3
class IterationRunner(base.Runner): <NEW_LINE> <INDENT> __execution_type__ = 'Iteration' <NEW_LINE> def _run_step(self, cls, method, step_cfg, context_cfg, input_params): <NEW_LINE> <INDENT> name = "{}-{}-{}".format(self.__execution_type__, step_cfg.get("type"), os.getpid()) <NEW_LINE> self.process = multiprocessing.Pr...
Run a step for a configurable number of times If the step ends before the time has elapsed, it will be started again. Parameters iterations - amount of times the step will be run for type: int unit: na default: 1 interval - time to wait between each step invocation type...
62598ee221bff66bcd72125d
class SubWFActionFunctionsTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) <NEW_LINE> self.swf_params = {'cfg_mgr': self.cfg_mgr, 'action_type': 'subwf', 'name': 'fake_model', 'error': "JoiningNode", 'ok': "JoiningNode", 'file': '/user/fake_op...
Tests the functionality of the Shell Action class
62598ee27cff6e4e811b3ff8
class InlineResponse200KillsLog(object): <NEW_LINE> <INDENT> swagger_types = { 'time': 'int', 'key': 'str' } <NEW_LINE> attribute_map = { 'time': 'time', 'key': 'key' } <NEW_LINE> def __init__(self, time=None, key=None): <NEW_LINE> <INDENT> self._time = None <NEW_LINE> self._key = None <NEW_LINE> self.discriminator = N...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ee266656f66f7d589ec
class XSubs(Transformer): <NEW_LINE> <INDENT> def __init__(self, mapper=None, replacer=None): <NEW_LINE> <INDENT> super(XSubs, self).__init__() <NEW_LINE> self.replacer = replacer or (lambda i: i.subs(mapper)) <NEW_LINE> <DEDENT> def visit_Expression(self, o): <NEW_LINE> <INDENT> return o._rebuild(expr=self.replacer(o....
:class:`Transformer` that performs substitutions on :class:`Expression`s in a given tree, akin to SymPy's ``subs``. Parameters ---------- mapper : dict, optional The substitution rules. replacer : callable, optional An ad-hoc function to perform the substitution. Defaults to SymPy's ``subs``.
62598ee224f1403a92684baa
class Title: <NEW_LINE> <INDENT> def __init__(self, bg_color, screen, text, text_size=56, text_color=(255, 255, 255)): <NEW_LINE> <INDENT> self.bg_color = bg_color <NEW_LINE> self.screen = screen <NEW_LINE> self.text = text <NEW_LINE> self.text_color = text_color <NEW_LINE> self.font = SysFont(None, text_size) <NEW_LIN...
Represents the title text to be displayed on screen
62598ee25f7d997b871f86db
class SendingBooks(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(CustomUser, on_delete = models.DO_NOTHING) <NEW_LINE> title = models.CharField(max_length = 50) <NEW_LINE> author = models.CharField(max_length = 50) <NEW_LINE> publisher = models.CharField(max_length = 50) <NEW_LINE> publishing_date = model...
登録キーワードにヒットした、メールで送る候補の本のモデル
62598ee23317a56b869bd86d
@tf_export("train.ProfilerHook") <NEW_LINE> class ProfilerHook(session_run_hook.SessionRunHook): <NEW_LINE> <INDENT> def __init__(self, save_steps=None, save_secs=None, output_dir="", show_dataflow=True, show_memory=False): <NEW_LINE> <INDENT> self._output_file = os.path.join(output_dir, "timeline-{}.json") <NEW_LINE> ...
Captures CPU/GPU profiling information every N steps or seconds. This produces files called "timeline-<step>.json", which are in Chrome Trace format. For more information see: https://github.com/catapult-project/catapult/blob/master/tracing/README.md
62598ee25fdd1c0f98e5c5ba
class TrainingMonitor(keras.callbacks.Callback): <NEW_LINE> <INDENT> def __init__(self, n_epochs, batch_size, title='Disease detection monitor', quantities=['loss', 'val_loss']): <NEW_LINE> <INDENT> super(TrainingMonitor, self).__init__() <NEW_LINE> self.progplot = Progplot(n_epochs, "epochs (batch_size " + str(batch_s...
Monitor training and validation quantities By default, loss and val_loss are monitored, further quantities can be provided to the constructor To be used together with keras as documented under http://keras.io/callbacks/ For further usage instructions see the documentation of the Progplot class
62598ee23539df3088eca8bd
class Language(object): <NEW_LINE> <INDENT> def __init__(self, machine): <NEW_LINE> <INDENT> self.log = logging.getLogger('Language') <NEW_LINE> self.machine = machine <NEW_LINE> self.config = None <NEW_LINE> self.machine.language = None <NEW_LINE> self.current_language = None <NEW_LINE> if 'languages' in self.machine....
MPF module which handles text, audio, and video replacement of objects for multi-language environments. Args: machine: The main machine object
62598ee210dbd63aa1c6f17c
class GPoint: <NEW_LINE> <INDENT> def __init__(self, x=0, y=0): <NEW_LINE> <INDENT> self._x = x <NEW_LINE> self._y = y <NEW_LINE> <DEDENT> def getX(self): <NEW_LINE> <INDENT> return self._x <NEW_LINE> <DEDENT> def getY(self): <NEW_LINE> <INDENT> return self._y <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> ...
This class contains real-valued x and y fields. It is used to represent a location on the graphics plane.
62598ee2dd821e528d6d7551
class PackagerApp(object): <NEW_LINE> <INDENT> def __init__(self, build_type='Debug'): <NEW_LINE> <INDENT> self.build_dir = os.path.join(test_env.SRC_DIR, 'out', build_type) <NEW_LINE> self.binary = os.path.join(self.build_dir, 'packager') <NEW_LINE> <DEDENT> def BuildSrc(self, clean=True): <NEW_LINE> <INDENT> if clean...
Main integration class for testing the packager binary.
62598ee2baa26c4b54d4d8db
class ArMapInfo(ArMapInfoInterface): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [ArMapInfoInterface]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, ArMapInfo, name, value) <NEW_LINE> __swig_getmethods__ = {}...
Proxy of C++ ArMapInfo class
62598ee24527f215b58e8511
class TimeFromEpoch(TimeFormat): <NEW_LINE> <INDENT> def __init__(self, val1, val2, scale, precision, in_subfmt, out_subfmt, from_jd=False): <NEW_LINE> <INDENT> self.scale = scale <NEW_LINE> epoch = Time(self.epoch_val, self.epoch_val2, scale=self.epoch_scale, format=self.epoch_format) <NEW_LINE> self.epoch = epoch <NE...
Base class for times that represent the interval from a particular epoch as a floating point multiple of a unit time interval (e.g. seconds or days).
62598ee23cc13d1c6d463d77
class ColorPicker: <NEW_LINE> <INDENT> color_table = { (True, 'green'): '0f0', (False, 'green'): '0c0', (True, 'red'): 'f00', (False, 'red'): 'c00', (True, 'orange'): 'fc0', (False, 'orange'): 'ca0', (True, 'gray'): '999', (False, 'gray'): '555' } <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.color = 'green' ...
ColorPicker decides the background color the pytddmon window, based on the number of green tests, and the total number of tests. Also, there is a "pulse" (light color, dark color), to increase the feeling of continuous testing.
62598ee2dd821e528d6d7552
class ReluLayer(NeuronLayer): <NEW_LINE> <INDENT> def _forwardImplementation(self, inbuf, outbuf): <NEW_LINE> <INDENT> outbuf[:] = inbuf * (inbuf > 0) <NEW_LINE> <DEDENT> def _backwardImplementation(self, outerr, inerr, outbuf, inbuf): <NEW_LINE> <INDENT> inerr[:] = outerr * (inbuf > 0)
Layer of rectified linear units (relu).
62598ee2435de62698e9a3e2
class BaseDataLoader(object): <NEW_LINE> <INDENT> def __init__(self, filelist): <NEW_LINE> <INDENT> self.filelist=filelist <NEW_LINE> <DEDENT> def is_supported(self): <NEW_LINE> <INDENT> raise Exception('This method must be implemented') <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> if hasattr(self, 'temp_...
Base class for data loader. Loaders should all support at the very least the iterable protocol (returning a dictionary of key/value pairs) for each data set found.
62598ee2d268445f26638e94
class ExpectimaxAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> val = ExpectimaxAgent.max_value(self,gameState,0) <NEW_LINE> return val[1] <NEW_LINE> <DEDENT> def max_value(self,gameState,depth): <NEW_LINE> <INDENT> if(gameState.isWin() or gameState.isLose() or self...
Your expectimax agent (question 4)
62598ee256ac1b37e63007f8
class MonitorEnv(gym.Wrapper): <NEW_LINE> <INDENT> def __init__(self, env): <NEW_LINE> <INDENT> super().__init__(env) <NEW_LINE> self.tstart = time.time() <NEW_LINE> self.rewards = None <NEW_LINE> <DEDENT> def step(self, action): <NEW_LINE> <INDENT> ob, rew, done, info = self.env.step(action) <NEW_LINE> self.update(ob,...
Env wrapper that keeps tracks of total raw episode rewards, length of raw episode rewards for evaluation.
62598ee23617ad0b5ee0473b
class PublicUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_create_valid_user_success(self): <NEW_LINE> <INDENT> payload = { 'email': 'u1@gmail.com', 'password': '123456789', 'name': 'Test user' } <NEW_LINE> res = self.client.post(C...
Test the user API (public)
62598ee22ae34c7f260a96f4
class Episode(collections.namedtuple('Episode', 'url date dir_name videos')): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def make_episodes(feed): <NEW_LINE> <INDENT> video_groups = collections.defaultdict(list) <NEW_LINE> for video in cc.video.Video.make_videos(feed): <NEW_LINE> <INDENT> video_groups[(video.date, vid...
One episode of the show.
62598ee267a9b606de5445da
class RawTextPacket(Packet): <NEW_LINE> <INDENT> _TYPE_HEADER = b"RT" <NEW_LINE> def __init__(self, text): <NEW_LINE> <INDENT> if isinstance(text, bytes): <NEW_LINE> <INDENT> self._text = text.strip() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise ValueError("Text must be a bytes string") <NEW_LINE> <DEDENT> <DEDE...
A packet containing a text string.
62598ee2f548e778e5969ba2
class PerFutureTrade(PerContract): <NEW_LINE> <INDENT> def __init__(self, cost=DEFAULT_MINIMUM_COST_PER_FUTURE_TRADE): <NEW_LINE> <INDENT> super(PerFutureTrade, self).__init__( cost=0, exchange_fee=cost, min_trade_cost=0, ) <NEW_LINE> self._cost_per_trade = self._exchange_fee <NEW_LINE> <DEDENT> def __repr__(self): <NE...
Calculates a commission for a transaction based on a per trade cost. Parameters ---------- cost : float or dict The flat amount of commissions paid per trade, regardless of the number of contracts being traded. If given a float, the commission for all futures contracts is the same. If given a dictionary, i...
62598ee2e76e3b2f99fd7045
class CythonizeCommand(cmd.Command): <NEW_LINE> <INDENT> description = 'build cython source c files' <NEW_LINE> user_options = [] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finalize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDE...
A custom command to run Pylint on all Python source files.
62598ee25166f23b2e2419e2
class MIMEAudio(MIMENonMultipart): <NEW_LINE> <INDENT> def __init__(self, _audiodata, _subtype=None, _encoder=encoders.encode_base64, *, policy=None, **_params): <NEW_LINE> <INDENT> if _subtype is None: <NEW_LINE> <INDENT> _subtype = _whatsnd(_audiodata) <NEW_LINE> <DEDENT> if _subtype is None: <NEW_LINE> <INDENT> rais...
Class for generating audio/* MIME documents.
62598ee23539df3088eca8be
class AvailabilityValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> UNSPECIFIED = 0 <NEW_LINE> RESIDENT = 1 <NEW_LINE> DYNAMIC = 2
Availability of the instance.@OutputOnly Values: UNSPECIFIED: <no description> RESIDENT: <no description> DYNAMIC: <no description>
62598ee232920d7e50bc4639
class Error(Exception): <NEW_LINE> <INDENT> pass
Base class for userscript exceptions.
62598ee263b5f9789fe83776
class Glazing(Asset): <NEW_LINE> <INDENT> uWindow = EAttribute(eType=EDouble, unique=True, derived=False, changeable=True) <NEW_LINE> glazingType = EAttribute(eType=GlazingTypeEnum, unique=True, derived=False, changeable=True, default_value=GlazingTypeEnum.UNDEFINED) <NEW_LINE> def __init__(self, *, uWindow=None, glazi...
Allows to specify the glass of a building, e.g. for calculating heat loss
62598ee2c432627299fa15c4
class ModelTreeGUI_api(Api): <NEW_LINE> <INDENT> def mt_update(self, nodetree = None): <NEW_LINE> <INDENT> raise Exception("overload me") <NEW_LINE> <DEDENT> def repaint_some_nodes(self, nodes): <NEW_LINE> <INDENT> raise Exception("overload me") <NEW_LINE> <DEDENT> pass
This should be a Qt4 widget that can be put into a layout.
62598ee20a50d4780f7039b6
class Singleton(type): <NEW_LINE> <INDENT> _instances = {} <NEW_LINE> def __call__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if cls not in cls._instances: <NEW_LINE> <INDENT> cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) <NEW_LINE> <DEDENT> return cls._instances[cls]
Base class to support Singleton Pattern
62598ee221bff66bcd72125f
class DealCardsTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_deal_cards(self): <NEW_LINE> <INDENT> Card = namedtuple('Card', 'rank suit') <NEW_LINE> deck = [Card(rank='A', suit='spades'), Card(rank='2', suit='spades'), Card(rank='3', suit='spades'), Card(rank='4', suit='spades'), Card(rank='5', suit='spades'), ...
Test for deal_cards.
62598ee26aa9bd52df0d34bc
class TestGetErrorFormat(base_test.BaseServerTestCase): <NEW_LINE> <INDENT> def test_get_by_id(self): <NEW_LINE> <INDENT> message = self._get_err_message('dep') <NEW_LINE> assert 'not found' in message <NEW_LINE> assert 'with ID `dep`' in message <NEW_LINE> assert 'filters' not in message <NEW_LINE> <DEDENT> def test_g...
Tests for the 404 not found error message formatting
62598ee2aad79263cf42ce23
class XML2Dict: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._cdata_parts = None <NEW_LINE> self._current = None <NEW_LINE> self._stack = None <NEW_LINE> self._parser = None <NEW_LINE> self.root = None <NEW_LINE> <DEDENT> def _set_item(self, k, v): <NEW_LINE> <INDENT...
A simple class to convert XML data into Python dictionary.
62598ee2435de62698e9a3e3
class BuildPropertiesPlanner(TaskPlanner): <NEW_LINE> <INDENT> @property <NEW_LINE> def goal_name(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @property <NEW_LINE> def product_types(self): <NEW_LINE> <INDENT> return {Classpath: [[BuildPropertiesConfiguration]]} <NEW_LINE> <DEDENT> def plan(self, scheduler...
A planner that adds a Classpath entry for all targets configured for build_properties. NB: In the absence of support for merging multiple Promises for a particular product_type, this serves as a valid example that explodes when it should succeed.
62598ee299fddb7c1ca6210c
class Resource: <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> name = self.__name__ <NEW_LINE> container = self.__parent__ <NEW_LINE> url = unquote(absoluteURL(container, self.request)) <NEW_LINE> if not isinstance(container, DirectoryResource): <NEW_LINE> <INDENT> name = '++resource++%s' % name <NEW_LINE>...
A mixin that changes the URL-rendering of resources (__call__). In zope.browserresource, resource URLs are of the form nearest_site/@@/resource_name. Since Zope 2 didn't have support for sites from the beginning of the Five integration, resource URLs in Zope 2 are of the form context/++resource++resource_name. TODO ...
62598ee2d7e4931a7ef3a6aa
class VideoUploadTestMixin(VideoUploadTestBase): <NEW_LINE> <INDENT> shard = 1 <NEW_LINE> def test_anon_user(self): <NEW_LINE> <INDENT> self.client.logout() <NEW_LINE> response = self.client.get(self.url) <NEW_LINE> self.assertEqual(response.status_code, 302) <NEW_LINE> <DEDENT> def test_put(self): <NEW_LINE> <INDENT> ...
Test cases for the video upload feature
62598ee260cbc95b0636294a
class NetworkSecurityGroup(Resource): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'network_interfaces': {'readonly': True}, 'subnets': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {...
NetworkSecurityGroup resource. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :param location: Resource location. :type location: str :param tags: ...
62598ee245492302aabfaaba
class BenchCompare(object): <NEW_LINE> <INDENT> def __init__(self, b1, b2): <NEW_LINE> <INDENT> self.bench1 = b1 <NEW_LINE> self.bench2 = b2 <NEW_LINE> logging.debug("Ready to compare {} and {}".format(self.bench1.toolname, self.bench2.toolname)) <NEW_LINE> <DEDENT> def compare_benches(self, standings=None): <NEW_LINE>...
Object to compare two benchmarks done on the same bench list
62598ee2dd821e528d6d7554
class CourtSkirt(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.image = pygame.Surface((1280, 44)) <NEW_LINE> self.image.fill(black) <NEW_LINE> self.rect = self.image.get_rect(topleft=(0, 676)) <NEW_LINE> self.surface = pygame.displ...
"Skirt" because it's on the bottom and it hides only a little bit
62598ee2236d856c2adc871a
class ApplicationNotRunningError(ConnectionError): <NEW_LINE> <INDENT> pass
The application master is not currently running
62598ee297e22403b38394fe
class Synchronizer(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sample_rate =44100 <NEW_LINE> self.single_freq_duration = 0.5 <NEW_LINE> self.min_freq = 120 <NEW_LINE> self.freq_difference = 50 <NEW_LINE> self.sync_freq = 80 <NEW_LINE> self.sync_repeat = 2 <NEW_LINE> self.sync_search_chunk = 1000...
Holds config for the data transfer between encoder and decoder
62598ee2e76e3b2f99fd7047
class Limit(AttrDict): <NEW_LINE> <INDENT> def __init__(self, rate=1.5, per=60): <NEW_LINE> <INDENT> allowance = rate <NEW_LINE> last_check = time.monotonic() <NEW_LINE> self.update(locals()) <NEW_LINE> <DEDENT> def __call__(self) -> bool: <NEW_LINE> <INDENT> now = time.monotonic() <NEW_LINE> self.allowance += (now - s...
Limit the request rate.
62598ee232920d7e50bc463b
class FixHadGEMMask(MultiStageDataFix, metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, filename, directory): <NEW_LINE> <INDENT> super().__init__(filename, directory) <NEW_LINE> self.byte_mask_file = None <NEW_LINE> self.mask_var_name = None <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def _set_byte_mask(s...
Fix the land sea mask in the HadGEM ORCA grids.
62598ee2097d151d1a2bf62e
class Label(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> prefix = models.CharField(max_length=20, blank=True) <NEW_LINE> slug = models.SlugField(unique=True) <NEW_LINE> website = models.URLField(blank=True, verify_exists=False) <NEW_LINE> class Met...
Label
62598ee23eb6a72ae0388c51
class BackupLinkHandler(webapp.RequestHandler): <NEW_LINE> <INDENT> SUFFIX = 'backup.create' <NEW_LINE> def get(self): <NEW_LINE> <INDENT> self.post() <NEW_LINE> <DEDENT> def post(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if ('X-AppEngine-TaskName' not in self.request.headers and 'X-AppEngine-Cron' not in sel...
Handler to deal with requests to the backup link to backup data.
62598ee2e1aae11d1e7cdb46
class MethodView(with_metaclass(MethodViewType, View)): <NEW_LINE> <INDENT> def dispatch_request(self, *args, **kwargs): <NEW_LINE> <INDENT> meth = getattr(self, request.method.lower(), None) <NEW_LINE> if meth is None and request.method == 'HEAD': <NEW_LINE> <INDENT> meth = getattr(self, 'get', None) <NEW_LINE> <DEDEN...
Like a regular class-based view but that dispatches requests to particular methods. For instance if you implement a method called :meth:`get` it means it will respond to ``'GET'`` requests and the :meth:`dispatch_request` implementation will automatically forward your request to that. Also :attr:`options` is set for ...
62598ee28e71fb1e983ba079
@dataclass <NEW_LINE> class ClassLoadingStats: <NEW_LINE> <INDENT> loaded: int <NEW_LINE> total_loaded: int <NEW_LINE> unloaded: int
Class loading statistics. Attributes: loaded (int) total_loaded (int) unloaded (int)
62598ee2e64d504609df86c7
class RGB_LEDState(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> def __init__(self, isSubstate=False): <NEW_LINE> <INDENT> self._isSubstate = isSubstate <NEW_LINE> <DEDENT> @property <NEW_LINE> def isSubstate(self): <NEW_LINE> <INDENT> return self._isSubstate <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def initial...
Abstract State class for a RGB LED SM
62598ee2d7e4931a7ef3a6ac
class PeriodList(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=25, verbose_name=_('Name')) <NEW_LINE> created_by = models.ForeignKey(User, verbose_name=_('Created By')) <NEW_LINE> created_at = models.DateTimeField(auto_now_add=True)
Priod List will be container for peiords
62598ee27047854f4633d9e6
class _LogManagerDisabled(object): <NEW_LINE> <INDENT> def __init__(self, docker_client, log_server_port): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def add(self, app, module, version, instance): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @property <NEW...
Base class for Log Managers. Logs are disabled by default.
62598ee260cbc95b0636294b
class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): <NEW_LINE> <INDENT> type: base.String = fields.Field(alias='type', default='mpeg4_gif') <NEW_LINE> mpeg4_file_id: base.String = fields.Field() <NEW_LINE> title: base.String = fields.Field() <NEW_LINE> caption: base.String = fields.Field() <NEW_LINE> input_messag...
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation. ...
62598ee2cc0a2c1114479612
class PyextensionsInteractiveConsole(code.InteractiveConsole): <NEW_LINE> <INDENT> def __init__(self, locals=None, show_python=False): <NEW_LINE> <INDENT> self.show_python = show_python <NEW_LINE> super().__init__(locals=locals) <NEW_LINE> source = transforms.add_all_imports("").split("\n") <NEW_LINE> for line in sourc...
A Python console that tries to emulate the normal Python interpreter except that it support experimental code transformations. It inherits from cPython's ``code.InteractiveConsole``. Like the normal Python's interactive console, it attempts to evaluate code entered one line at a time by a user.
62598ee2d268445f26638e96
class InvalidValuesError(AptecoException): <NEW_LINE> <INDENT> pass
Raised when invalid values used in selection query.
62598ee2baa26c4b54d4d8df
class TestFillNaN: <NEW_LINE> <INDENT> def test_basic(self, stream_wf): <NEW_LINE> <INDENT> wf = make_wf_with_nan(stream_wf, x_inds=0, y_inds=0) <NEW_LINE> out = wf.fillna(2019) <NEW_LINE> assert out.data.loc[0, 0] == 2019
tests for filling NaN values.
62598ee2460517430c430a98
class TestNewsSpoke(BaseSpokeTest): <NEW_LINE> <INDENT> type = NewsType
Test the News type
62598ee256ac1b37e63007fc
class JMSInventory(JMSBaseInventory): <NEW_LINE> <INDENT> def __init__(self, assets, run_as_admin=False, run_as=None, become_info=None): <NEW_LINE> <INDENT> self.assets = assets <NEW_LINE> self.using_admin = run_as_admin <NEW_LINE> self.run_as = run_as <NEW_LINE> self.become_info = become_info <NEW_LINE> host_list = []...
JMS Inventory is the manager with jumpserver assets, so you can write you own manager, construct you inventory, user_info is obtained from admin_user or asset_user
62598ee2379a373c97d9760a
class AddLibraryScript(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "material.libraryaddscript" <NEW_LINE> bl_label = "add script as a text datablock" <NEW_LINE> filename = bpy.props.StringProperty() <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> global library <NEW_LINE> global current_material_cac...
Add OSL script as a text datablock
62598ee28e7ae83300ee769f
class Light(Object): <NEW_LINE> <INDENT> @property <NEW_LINE> def enabled(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @enabled.setter <NEW_LINE> def enabled(self, state): <NEW_LINE> <INDENT> self.client.async_remote_methods.setLightState(self.get_id(), state) <NEW_LINE> <DEDENT> @property...
Representa una fuente de luz de la escena.
62598ee2e76e3b2f99fd7049
class ObjectHasZoneMembers(BaseException): <NEW_LINE> <INDENT> pass
Raised when an object being deleted or moved to a different ID would cause zone members to start freaking out.
62598ee2cad5886f8bdc3910
class TestWritablePowerFeed(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 testWritablePowerFeed(self): <NEW_LINE> <INDENT> pass
WritablePowerFeed unit test stubs
62598ee24a966d76dd5ed4f3
class File: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def read(file): <NEW_LINE> <INDENT> return codecs.open(file, 'r', 'utf-8') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read_yml(file): <NEW_LINE> <INDENT> file_object = open(file, 'r', encoding='utf-8') <NEW_LINE> return yaml.load(file_object) <NEW_LINE> <DE...
Clase para leer archivos
62598ee27b25080760ed5aab
class ForTheMugPlugin(plugin.HuttonHelperPlugin): <NEW_LINE> <INDENT> from big_dicts import EVENT_PATHS as event_paths <NEW_LINE> def plugin_start(self): <NEW_LINE> <INDENT> extra_paths = xmit.get(ADDITIONAL_PATHS_URL) <NEW_LINE> if extra_paths is not None: <NEW_LINE> <INDENT> self.event_paths = merge_dicts(self.event_...
Forwards data to the Hutton Helper Server.
62598ee201c39578d7f113b9
class SelectionChange(object): <NEW_LINE> <INDENT> def __init__(self, overlay, offset, oldSelection, newSelection): <NEW_LINE> <INDENT> self.overlay = overlay <NEW_LINE> self.offset = offset <NEW_LINE> self.oldSelection = oldSelection <NEW_LINE> self.newSelection = newSelection
Represents a change which has been made to a :class:`.selection.Selection` instance. Stores the location, the old selection, and the new selection.
62598ee2097d151d1a2bf630
class Categories(models.Model): <NEW_LINE> <INDENT> ID = models.AutoField(primary_key=True) <NEW_LINE> Name = models.CharField(max_length=30) <NEW_LINE> Icon = models.CharField(max_length=250) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.Name <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> verbose_...
Categories model.
62598ee2d6c5a102081e0742
class AppServiceCertificateResource(Resource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type...
Key Vault container ARM resource for a certificate that is purchased through Azure. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :param name: Resource Name. :type name: str :param kind: Kind of resource. :type kind: str :param location...
62598ee24428ac0f6e656b64
class PagureUnsignedCommitHook(BaseHook): <NEW_LINE> <INDENT> name = 'Block Un-Signed commits' <NEW_LINE> description = 'Using this hook you can block any push with commits ' 'missing a "Signed-Off-By"' <NEW_LINE> form = PagureUnsignedCommitForm <NEW_LINE> db_object = PagureUnsignedCommitTable <NEW_LINE> backref...
PagurPagureUnsignedCommit hook.
62598ee2a17c0f6771d5a866
class AuthorizeUserView(LoginRequiredMixin, generic.FormView): <NEW_LINE> <INDENT> template_name = 'hosting/place_authorized_users.html' <NEW_LINE> form_class = AuthorizeUserForm <NEW_LINE> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> self.place = get_object_or_404(Place, pk=self.kwargs['pk'], owne...
Form view to add a user to the list of authorized users for a place to be able to see more details.
62598ee24e4d562566370a2a
class Report(Total, Time): <NEW_LINE> <INDENT> def init(self, header = "\n========================="): <NEW_LINE> <INDENT> Total.init(self) <NEW_LINE> Time.init(self) <NEW_LINE> self.header = header <NEW_LINE> <DEDENT> def close(self): <NEW_LINE> <INDENT> self.elapsed = self.current() <NEW_LINE> with self.printlock: <N...
'Total' and 'Time' combined.
62598ee2435de62698e9a3e7
class ModifyDDoSPolicyRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Business = None <NEW_LINE> self.PolicyId = None <NEW_LINE> self.DropOptions = None <NEW_LINE> self.PortLimits = None <NEW_LINE> self.IpAllowDenys = None <NEW_LINE> self.PacketFilters = None <NEW_LINE> self.Wat...
ModifyDDoSPolicy请求参数结构体
62598ee2a8370b77170ee9f6
class PersonView(ListView): <NEW_LINE> <INDENT> model = Person <NEW_LINE> template_name = "home.html"
Viwing person data on page
62598ee2d268445f26638e97
class CodEORIType(pyxb.binding.datatypes.string): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'CodEORIType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('../data/fatturapa/FatturaPA_versione_1.2.1.xsd', 1197, 2) <NEW_LINE> _Documentation = None
An atomic simple type.
62598ee2ac7a0e7691f70b27
class ConcurrencyProtectionUserChangeForm(UserChangeForm): <NEW_LINE> <INDENT> object_version = forms.CharField(required=False, widget=forms.HiddenInput) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ConcurrencyProtectionUserChangeForm, self). __init__(*args, **kwargs) <NEW_LINE> self.concur...
UserAdmin can be re-registered like this:: from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin from useful.django.concurrency import ConcurrencyProtectionUserChangeForm class UserAdmin(DjangoUserAdmin): form = ConcurrencyProtectionUserChangeForm fieldsets = ( .....
62598ee2f548e778e5969ba8
class SkillLevelUpShard(Item): <NEW_LINE> <INDENT> def __init__(self, name, description, coin_cost): <NEW_LINE> <INDENT> Item.__init__(self, name, description, coin_cost)
This class contains attributes of a skill level up shard to level up skills owned by legendary creatures.
62598ee24f6381625f1987c5