code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class JobId(Value): <NEW_LINE> <INDENT> def create_elt(self, parent, compo): <NEW_LINE> <INDENT> return Value._create_elt(self, parent, "job-id", compo.pid)
Job id factory
62598f887b25080760ed6fd2
class User(object): <NEW_LINE> <INDENT> optional_fields = {'email', 'fname', 'lname', 'address', 'bday', 'phone'} <NEW_LINE> def __init__(self, username, password, **kwargs): <NEW_LINE> <INDENT> self.username = username <NEW_LINE> self.password = password <NEW_LINE> for field in kwargs: <NEW_LINE> <INDENT> if field in ...
Basic class for web shop customer. Optional arguments handled via `optional_fields`. No data validation so far. Password is never stored in plain texts. Settings password triggers descriptor hashing it with md5 algorithm and storing only hash
62598f88507cdc57c63a48b7
class Broker(jsonrpc.DjangoBroker): <NEW_LINE> <INDENT> def allow(self, data): <NEW_LINE> <INDENT> request = data["begin"] <NEW_LINE> if request.user.is_authenticated(): <NEW_LINE> <INDENT> self.print('#' * 80) <NEW_LINE> self.print(request.user) <NEW_LINE> self.print('#' * 80) <NEW_LINE> return True <NEW_LINE> <DEDENT...
DjangoBroker class implementing allow.
62598f88c432627299fa2afb
class GroceryStoreSimulation: <NEW_LINE> <INDENT> def __init__(self, store_file): <NEW_LINE> <INDENT> self._events = PriorityQueue() <NEW_LINE> self._store = GroceryStore(store_file) <NEW_LINE> <DEDENT> def run(self, event_file): <NEW_LINE> <INDENT> stats = { 'num_customers': 0, 'total_time': 0, 'max_wait': -1 } <NEW_L...
A Grocery Store simulation. This is the class which is responsible for setting up and running a simulation. The API is given to you: your main task is to implement the two methods according to their docstrings. Of course, you may add whatever private attributes and methods you want. But because you should not change ...
62598f8866656f66f7d59f21
class Select2Mixin(object): <NEW_LINE> <INDENT> options = { 'minimumResultsForSearch': 6, 'placeholder': '', 'allowClear': True, 'multiple': False, 'closeOnSelect': False, } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.options = dict(self.options) <NEW_LINE> select2_options = kwargs.pop('select2_op...
The base mixin of all Select2 widgets. This mixin is responsible for rendering the necessary JavaScript and CSS codes which turns normal ``<select>`` markups into Select2 choice list. The following Select2 options are added by this mixin:- * minimumResultsForSearch: ``6`` * placeholder: ``''`` * allowCle...
62598f880a366e3fb87dc4fa
class Jumper: <NEW_LINE> <INDENT> def __init__(self, view: sublime.View, position: str) -> None: <NEW_LINE> <INDENT> self.position = position <NEW_LINE> self.view = view <NEW_LINE> <DEDENT> def jump(self, transient: bool=False) -> None: <NEW_LINE> <INDENT> flags = sublime.ENCODED_POSITION <NEW_LINE> if transient is Tru...
Jump to the specified file line and column making an indicator to toggle
62598f88925a0f43d25e7b5f
class MySeriesHelper(SeriesHelper): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> client = client <NEW_LINE> series_name = 'Malilog-logs' <NEW_LINE> fields = ['port_src', 'port_dst'] <NEW_LINE> tags = ['src_geohash', 'l3_proto', 'l4_proto', "ip_src", "ip_dst", "log_message"] <NEW_LINE> bulk_size = 5 <NEW_LINE> au...
Instantiate SeriesHelper to write points to the backend.
62598f88a79ad16197769b8d
class AI(Editable): <NEW_LINE> <INDENT> def __init__(self, session, json_dict=None, fetch=False): <NEW_LINE> <INDENT> super(AI, self).__init__(session, json_dict, fetch)
A moderator action.
62598f8816aa5153ce40002d
class command(Reader): <NEW_LINE> <INDENT> def __init__(self, config, name, input_files): <NEW_LINE> <INDENT> super(command, self).__init__(config, name) <NEW_LINE> commands = self.config.c.items(self.name) <NEW_LINE> commands = dict(filter(lambda x: x[0].startswith('exec_'), commands)) <NEW_LINE> self.strip = self.con...
Lector command. Ejecuta un comando y devuelve su resultado. Soporta reemplazo de argumentos.
62598f8810dbd63aa1c706e0
class DocumentPart(XmlPart): <NEW_LINE> <INDENT> @property <NEW_LINE> def core_properties(self): <NEW_LINE> <INDENT> return self.package.core_properties <NEW_LINE> <DEDENT> @property <NEW_LINE> def document(self): <NEW_LINE> <INDENT> return Document(self._element, self) <NEW_LINE> <DEDENT> def get_or_add_image(self, im...
Main document part of a WordprocessingML (WML) package, aka a .docx file. Acts as broker to other parts such as image, core properties, and style parts. It also acts as a convenient delegate when a mid-document object needs a service involving a remote ancestor. The `Parented.part` property inherited by many content ob...
62598f8896565a6dacd2cd0d
class Enums(object): <NEW_LINE> <INDENT> _names2members = {} <NEW_LINE> @staticmethod <NEW_LINE> def from_name(enum_cls, name: str) -> Enum: <NEW_LINE> <INDENT> if isinstance(name, enum_cls): <NEW_LINE> <INDENT> return name <NEW_LINE> <DEDENT> if not issubclass(enum_cls, Enum): <NEW_LINE> <INDENT> raise ValueError('enu...
This is a utility class that wants to help you work with :py:class:`Enum` types.
62598f888a349b6b43685d70
class StringUtils: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def leftPad(self, originalStr, s, padChar=' '): <NEW_LINE> <INDENT> return padChar * (s - len(originalStr)) + originalStr
@param: originalStr: the string we want to append to @param: size: the target length of the string @param: padChar: the character to pad to the left side of the string @return: A string
62598f8891af0d3eaad39927
class TUIOSymbol: <NEW_LINE> <INDENT> def __init__(self, session_id, type_user_id, class_id, group, data): <NEW_LINE> <INDENT> ids = ('0' * (32 - len(bin(type_user_id)[2:]))) + bin(type_user_id)[2:] <NEW_LINE> self.session_id = session_id <NEW_LINE> self.type_id = int('0b' + ids[16:], 2) <NEW_LINE> self.user_id = int('...
/tuio2/sym s_id tu_id c_id group data /tuio2/sym int32 int32 int32 string string
62598f88d7e4931a7ef3bbc6
class StatesLibrary(Database): <NEW_LINE> <INDENT> def __init__(self, label='', name='', shortDesc='', longDesc=''): <NEW_LINE> <INDENT> Database.__init__(self, label=label, name=name, shortDesc=shortDesc, longDesc=longDesc) <NEW_LINE> <DEDENT> def loadEntry(self, index, label, molecule, states, reference=None, referen...
A class for working with a RMG states (frequencies) library.
62598f8821a7993f00c65a9f
class CallFamily(object): <NEW_LINE> <INDENT> normalized = False <NEW_LINE> modified = True <NEW_LINE> def __init__(self, desc): <NEW_LINE> <INDENT> self.descs = {desc: True} <NEW_LINE> self.calltables = {} <NEW_LINE> self.total_calltable_size = 0 <NEW_LINE> <DEDENT> def update(self, other): <NEW_LINE> <INDENT> self.mo...
A family of Desc objects that could be called from common call sites. The call families are conceptually a partition of all (callable) Desc objects, where the equivalence relation is the transitive closure of 'd1~d2 if d1 and d2 might be called at the same call site'.
62598f880383005118f6d226
class AuthorizationAmountTooHigh(Exception): <NEW_LINE> <INDENT> pass
TODO: Try to automatically deal with?..
62598f88b57a9660fecd15a8
class Sequential(object): <NEW_LINE> <INDENT> _sequential_counter = 1 <NEW_LINE> def __init__(self, name_scope=None, **kwargs): <NEW_LINE> <INDENT> if name_scope is None: <NEW_LINE> <INDENT> name_scope = 'sequential' + str(Sequential._sequential_counter) <NEW_LINE> Sequential._sequential_counter += 1 <NEW_LINE> <DEDENT...
Sequential containers. attribute: layers: list containing layer instances. attribute: collections: list collected info of this sequential.
62598f886fb2d068a7693bc4
class Boom(TemplateView): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> raise(Exception("Boom!"))
A helper view to show us what a server error looks like
62598f88097d151d1a2c0b51
class VIEW3D_TP_Visual_Render_On_Off(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "tp_ops.mods_render" <NEW_LINE> bl_label = "Render" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> is_apply = True <NEW_LINE> message_a = "" <NEW_LINE> for mod in context.ac...
render on / off
62598f88f8510a7c17d7df0c
class Category(ndb.Model): <NEW_LINE> <INDENT> name = ndb.StringProperty() <NEW_LINE> category = ndb.BooleanProperty(default=False) <NEW_LINE> subcategory = ndb.BooleanProperty(default=False)
Category/Subcategory model class.
62598f8815fb5d323ce7e857
class WpUser(AbstractBaseUser): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True, db_column='ID' ) <NEW_LINE> user_login = models.CharField(max_length=180, unique=True) <NEW_LINE> user_pass = models.CharField(max_length=192) <NEW_LINE> user_nicename = models.CharField(max_length=150,null=True, blank=True) <NE...
This has been given a wp prefix, as contrib.user is so commonly imported name, and we do not want to namespace this everywhere.
62598f886aa9bd52df0d49ff
class PfcAsymBaseTest(ThriftInterfaceDataPlane): <NEW_LINE> <INDENT> EGRESS_DROP = 0 <NEW_LINE> INGRESS_DROP = 1 <NEW_LINE> TRANSMITTED_PKTS = 11 <NEW_LINE> STOP_PORT_MAX_RATE = 1 <NEW_LINE> RELEASE_PORT_MAX_RATE = 0 <NEW_LINE> PACKET_ECN = 1 <NEW_LINE> PACKET_TTL = 64 <NEW_LINE> PACKET_LEN = 72 <NEW_LINE> PACKET_NUM =...
Provides common logic for the asymmetric PFC test cases.
62598f88fbf16365ca793bd8
class CallPostmanTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_future(self): <NEW_LINE> <INDENT> pass
Unit tests for the call_postman function
62598f88656771135c4891a8
class InvalidPdepend(results.MetadataError): <NEW_LINE> <INDENT> _attr = 'pdepend'
Package has invalid PDEPEND.
62598f88004d5f362081ed8f
class TestSetup(TestCase): <NEW_LINE> <INDENT> def test_filename_to_object_bad_xml(self): <NEW_LINE> <INDENT> filename = get_path(fixtures, 'bad.zip') <NEW_LINE> result = filename_to_object(filename) <NEW_LINE> self.assertTrue(result[0] is not None) <NEW_LINE> self.assertTrue(isinstance(result[0], str)) <NEW_LINE> self...
defoe.fmp.setup tests.
62598f889b70327d1c57e8c9
class FixedValueMeterPort(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey('users.User') <NEW_LINE> value = models.BigIntegerField() <NEW_LINE> resolution_in_seconds = models.IntegerField() <NEW_LINE> created = models.DateTimeField(auto_now_add=True, db_index=True) <NEW_LINE> last_modified = models.DateTimeF...
A virtual meter port that is not associated with a meter and always gives a fixed value.
62598f8830dc7b766599f385
class TargetNodeForm(NodeEditForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Node <NEW_LINE> fields = ( "content", )
「接続先のノードを追加」するためのフォーム
62598f881d351010ab8f3663
class Child(InlineModelAdmin): <NEW_LINE> <INDENT> formset_child = PolymorphicFormSetChild <NEW_LINE> extra = 0 <NEW_LINE> def __init__(self, parent_inline): <NEW_LINE> <INDENT> self.parent_inline = parent_inline <NEW_LINE> super(PolymorphicInlineModelAdmin.Child, self).__init__(parent_inline.parent_model, parent_inlin...
The child inline; which allows configuring the admin options for the child appearance. Note that not all options will be honored by the parent, notably the formset options: * :attr:`extra` * :attr:`min_num` * :attr:`max_num` The model form options however, will all be read.
62598f8815baa72349461aab
class InsertDummyDsig(Chute): <NEW_LINE> <INDENT> def run(self, files): <NEW_LINE> <INDENT> return [self._process(file) for file in files] <NEW_LINE> <DEDENT> def _process(self, file): <NEW_LINE> <INDENT> Hellbox.info(f"Updating DSIG: {file.basename}") <NEW_LINE> copy = file.copy() <NEW_LINE> font = ttLib.TTFont(copy.c...
InsertDummyDsig adds a valid DSIG table with no signatures.
62598f8807f4c71912baef71
class FittableFeaturizer(BaseFeaturizer): <NEW_LINE> <INDENT> def fit(self, X, y=None, **fit_kwargs): <NEW_LINE> <INDENT> self._features = ['a', 'b', 'c'][:len(X)] <NEW_LINE> return self <NEW_LINE> <DEDENT> def featurize(self, x): <NEW_LINE> <INDENT> return [x + 3, x + 4, 2 * x][:len(self._features)] <NEW_LINE> <DEDENT...
This test featurizer tests fitting qualities of BaseFeaturizer, including refittability and different results based on different fits.
62598f8821a7993f00c65aa1
class CeleryQueue(BaseQueue): <NEW_LINE> <INDENT> settings_namespace = 'CELERY' <NEW_LINE> def __init__(self, app=None, broker=None, queue_name=''): <NEW_LINE> <INDENT> if not Celery: <NEW_LINE> <INDENT> raise ImproperlyConfigured('You need to install the celery library to use Celery queue.') <NEW_LINE> <DEDENT> if app...
Celery queue. :param app: app instance of Celery class. :param broker: broker connection url where Celery will attend the async reporting requests. :param queue_name: name of the queue being used by the Celery worker process.
62598f88d10714528d69d9fd
class AliasGroup(click.Group): <NEW_LINE> <INDENT> def __init__(self, name=None, commands=None, aliases=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(name, commands, **kwargs) <NEW_LINE> self.aliases = {} <NEW_LINE> if aliases: <NEW_LINE> <INDENT> for cmd_name, cmd_aliases in aliases.items(): <NEW_LINE> <INDENT...
A command group capable of using aliases for its members. Otherwise identical to click.Group.
62598f88097d151d1a2c0b53
class Parser: <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def format_word(word: str) -> str: <NEW_LINE> <INDENT> word = word.strip().lower() <NEW_LINE> regex = re.compile(r'[,\.!?;:]') <NEW_LINE> word = regex.sub('', word) <...
Parse chain states from a text file
62598f88d4950a0f3b110bcc
class AddonState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> INVALID = "Invalid" <NEW_LINE> CREATING = "Creating" <NEW_LINE> CREATED = "Created" <NEW_LINE> UPDATING = "Updating" <NEW_LINE> RECONFIGURING = "Reconfiguring" <NEW_LINE> FAILED = "Failed" <NEW_LINE> DELETING = "Deleting"
Addon Provisioning State
62598f886aa9bd52df0d4a00
class Solution: <NEW_LINE> <INDENT> def numIslands2(self, n, m, operators): <NEW_LINE> <INDENT> if n == 0 or m == 0: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> unionfind = UnionFind(n, m) <NEW_LINE> ans = [] <NEW_LINE> dx = [0, 1, 0, -1] <NEW_LINE> dy = [1, 0, -1, 0] <NEW_LINE> visited = set([]) <NEW_LINE> for o...
@param n: An integer @param m: An integer @param operators: an array of point @return: an integer array
62598f8807d97122c42167d4
class Options(ConvCnstrMODBase.Options): <NEW_LINE> <INDENT> defaults = copy.deepcopy(ConvCnstrMODBase.Options.defaults) <NEW_LINE> def __init__(self, opt=None): <NEW_LINE> <INDENT> if opt is None: <NEW_LINE> <INDENT> opt = {} <NEW_LINE> <DEDENT> ConvCnstrMODBase.Options.__init__(self, opt)
ConvCnstrMOD_IterSM algorithm options Options are the same as those defined in :class:`.ConvCnstrMODBase.Options`.
62598f8850485f2cf55daaa3
class Bidirectional(base.Layer): <NEW_LINE> <INDENT> def __init__(self, worker='rnn', **kwargs): <NEW_LINE> <INDENT> size = kwargs.pop('size') <NEW_LINE> name = kwargs.pop('name', 'layer{}'.format(base.Layer._count)) <NEW_LINE> if 'direction' in kwargs: <NEW_LINE> <INDENT> kwargs.pop('direction') <NEW_LINE> <DEDENT> de...
A bidirectional recurrent layer runs worker models forward and backward. The outputs of the forward and backward passes are combined using an affine transformation into the overall output for the layer. For an example specification of a bidirectional recurrent network, see A. Graves, N. Jaitly, and A. Mohamed, "Hybri...
62598f88a79ad16197769b91
class CommentDetailListViewset(mixins.ListModelMixin, mixins.CreateModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = CommentInfo.objects.all() <NEW_LINE> pagination_class = CustomeLimitOffsetPagination <NEW_LINE> filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter) <N...
List: 评论列表页
62598f88b7558d5895463162
class Generator(Context): <NEW_LINE> <INDENT> def __init__(self, markup='xhtml', **settings): <NEW_LINE> <INDENT> Context.__init__(self) <NEW_LINE> if markup == 'html': <NEW_LINE> <INDENT> self.xml = False <NEW_LINE> <DEDENT> elif markup in ('xhtml', 'xml'): <NEW_LINE> <INDENT> self.xml = True <NEW_LINE> <DEDENT> else:...
General XML/HTML tag generator
62598f8845492302aabfc003
class PreferencesViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> queryset = Preferences.objects.all() <NEW_LINE> serializer_class = PreferencesSerializer
Returns all the preferences and their IDs using given JWT token.
62598f888a43f66fc4bf1cb2
class Solution: <NEW_LINE> <INDENT> def searchBigSortedArray(self, reader, target): <NEW_LINE> <INDENT> index = 0 <NEW_LINE> while reader.get(index) < target: <NEW_LINE> <INDENT> index = index * 2 + 1 <NEW_LINE> <DEDENT> start, end = 0, index <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = int((start + end)...
@param: reader: An instance of ArrayReader. @param: target: An integer @return: An integer which is the first index of target. Definition of ArrayReader: class ArrayReader: def get(self, index): # this would return the number on the given index # return -1 if index is less than zero.
62598f8896565a6dacd2cd0f
class WeatherCog(commands.Cog): <NEW_LINE> <INDENT> def __init__(self, bot: commands.Bot) -> None: <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> self.weather_report = weather_query.Weather() <NEW_LINE> <DEDENT> @commands.command() <NEW_LINE> async def weather(self, ctx: commands.Context, city: str) -> None: <NEW_LINE> ...
adds command to allow to get current weather of a city
62598f883617ad0b5ee05c72
class UserCreateForm(UserInfoForm, EmailForm, PasswordForm): <NEW_LINE> <INDENT> submit = SubmitField('Add user') <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> FlaskForm.__init__(self, *args, **kwargs) <NEW_LINE> self.user = None <NEW_LINE> <DEDENT> def validate(self): <NEW_LINE> <INDENT> rv = Fla...
Registration form for new user. Consists of UserInfoForm, EmailForm, PasswordForm and personal submit button. Custom validation.
62598f8845492302aabfc004
class Currency: <NEW_LINE> <INDENT> def __init__(self, value=1, unit="MAD"): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.unit = unit <NEW_LINE> response = requests.get(yahoo_url) <NEW_LINE> try: <NEW_LINE> <INDENT> response.raise_for_status() <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> print("Problem fet...
Class Currency provides the currencies exchange rate for more than 180 currency. Currency instances accept operations addition '+' and substraction '-' x = Currency(6) y = Currency(45, "USD") x + y ==> result 6 MAD + 45 USD in MAD currency (the first operand currency takes precedance) we can also do: 1 + y ==> result ...
62598f888e05c05ec3f6ebdf
@cherrypy.popargs('lognum') <NEW_LINE> class LogsApi(RestResource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.count = _CountApi() <NEW_LINE> self.allowed_methods = ('GET', 'DELETE') <NEW_LINE> <DEDENT> def get(self, lognum=None): <NEW_LINE> <INDENT> return get_log_li...
Rest resource for handling the /api/logs path.
62598f88d7e4931a7ef3bbca
class AirSensor(AirQualityEntity): <NEW_LINE> <INDENT> def __init__(self, name, coordinates, forecast, session): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._api = metno.AirQualityData(coordinates, forecast, session) <NEW_LINE> <DEDENT> @property <NEW_LINE> def attribution(self) -> str: <NEW_LINE> <INDENT> re...
Representation of an Yr.no sensor.
62598f88a05bb46b3848a3a9
class NonConformanceActionValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> NON_CONFORMANCE_ACTION_UNSPECIFIED = 0 <NEW_LINE> DENY_AND_AUDIT_LOG = 1 <NEW_LINE> AUDIT_LOG_ONLY = 2
Required. The action when an image does not conform to this admission rule. Values: NON_CONFORMANCE_ACTION_UNSPECIFIED: Mandatory. DENY_AND_AUDIT_LOG: Deny the admission request with audit logging. AUDIT_LOG_ONLY: Audit logging only, as if the admission request specifies break-glass.
62598f88442bda511e95bf8b
class DHTSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, dht_client, sensor_type, temp_unit, name, temperature_offset, humidity_offset): <NEW_LINE> <INDENT> self.client_name = name <NEW_LINE> self._name = SENSOR_TYPES[sensor_type][0] <NEW_LINE> self.dht_client = dht_client <NEW_LINE> self.temp_unit = temp_unit <...
Implementation of the DHT sensor.
62598f881f037a2d8b9e3c06
class TestImageCacheManageSqlite(functional.FunctionalTest, BaseCacheManageMiddlewareTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> if getattr(self, 'disabled', False): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> if not getattr(self, 'inited', False): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> imp...
Functional tests that exercise the image cache management using the SQLite driver
62598f886fb2d068a7693bc6
class PMBGA (SGA) : <NEW_LINE> <INDENT> def clear_cache (self) : <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def post_init (self) : <NEW_LINE> <INDENT> self.crossover_count = 0 <NEW_LINE> self.parents = [] <NEW_LINE> self.last_gen = self.get_iteration () <NEW_LINE> self.file = sys.stdout <NEW_LINE> <DEDENT> def b...
Probabilistic model building GA This is a stub, it overrides the mutation to fit the model building / sampling into the framework of PGApy.
62598f8824f1403a92685645
class MitochondrialGenoTransmitter(GenoTransmitter): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> _simuPOP_ba.MitochondrialGenoTransmitter_s...
Details: This geno transmitter transmits the first homologous copy of a Mitochondrial chromosome. If no mitochondrial chromosome is present, it assumes that the first homologous copy of several (or all) Customized chromosomes are copies of mitochondrial chromosomes. This operator transmits the mito...
62598f88009cb60464d0105b
class TimeseriesMeanValueField(BasicValueField): <NEW_LINE> <INDENT> def __init__(self, label=None, attribute_matcher=None): <NEW_LINE> <INDENT> super().__init__(field_class=package_name_value + 'TimeseriesMeanValueField', label=label, attribute_matcher=attribute_matcher) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LIN...
Creates a TimeseriesMeanValueField Object Args: `attribute_matcher`: (Optional) accepts an object of AttributeMatcher type. `label`: (Optional) accepts a String value.
62598f8823e79379d538c02d
class getproxy(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.url = 'http://www.cnproxy.com/proxy1.html' <NEW_LINE> self.port_dict = { 'a': '2', 'c': '1', 'i': '7', 'm': '4', 'q': '0', 'r': '8', 'v': '3', 'l': '9', 'b': '5', 'w': '6'} <NEW_LINE> soup = BeautifulSoup(requests.get(self.url, hea...
Get Proxy list from http://www.cnproxy.com
62598f8807d97122c42167d6
class Recombinator(GenoTransmitter): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> _simuPOP_op.Recombinator_swiginit(self, _simuPOP_op.new_Re...
Details: A genotype transmitter (during-mating operator) that transmits parental chromosomes to offspring, subject to recombination and gene conversion. This can be used to replace MendelianGenoTransmitter and SelfingGenoTransmitter. It does not work in haplodiploid populations, although a customiz...
62598f88287bf620b62716e6
class BetterHtmlDiff(difflib.HtmlDiff): <NEW_LINE> <INDENT> def _format_line(self, side, flag, linenum, text): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> linenum = '%d' % linenum <NEW_LINE> id = ' id="%s%s"' % (self._prefix[side], linenum) <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> id = '' <NEW_LINE> <...
Modified version of HtmlDiff. * Replaces nowrap="nowrap" hard-coded style with a class * Only replaces every other consecutive space with a &nbsp; to allow for line wrapping. For producing HTML side by side comparison with change highlights. This class can be used to create an HTML table (or a complete HTML file c...
62598f88b830903b9686e20a
class ImageSlice(object): <NEW_LINE> <INDENT> def __init__(self, input_file_path, output_file_path): <NEW_LINE> <INDENT> self.images = FilesScanner(input_file_path).get_files() <NEW_LINE> self.output_path = output_file_path <NEW_LINE> <DEDENT> def get_slices(self): <NEW_LINE> <INDENT> done = [] <NEW_LINE> fail = [] <NE...
切图工具类
62598f888e71fb1e983bb5e0
class PcautoItem(scrapy.Item): <NEW_LINE> <INDENT> collection = scrapy.Field() <NEW_LINE> username = scrapy.Field() <NEW_LINE> pushtiem = scrapy.Field() <NEW_LINE> car_type = scrapy.Field() <NEW_LINE> buy_time = scrapy.Field() <NEW_LINE> buy_loca = scrapy.Field() <NEW_LINE> buy_shop = scrapy.Field() <NEW_LINE> buy_cost...
太平洋汽车网
62598f8863d6d428bbee22e9
class NoInversaModularError(ZeroDivisionError): <NEW_LINE> <INDENT> pass
El número no tiene inversa modular
62598f881d351010ab8f3666
class TestArticles(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_article = Articles('Richard','Tech is great','Advanced technology improving life','https://google.com','https://google.com/images','2018-05-12T13:31:03Z') <NEW_LINE> <DEDENT> def test_instance(self): <NEW_LINE> <IND...
Test class to test the behavior of the articles class
62598f883cc13d1c6d465298
class Field(np.ndarray): <NEW_LINE> <INDENT> def __new__(cls, input_array, domain=None): <NEW_LINE> <INDENT> obj = np.atleast_1d(input_array).view(cls) <NEW_LINE> if obj.shape == domain.shape: <NEW_LINE> <INDENT> obj.domain = domain <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> obj = np.transpo...
Custom class for climlab gridded quantities, called Field This class behaves exactly like numpy.ndarray but every object has an attribute called domain which is the domain associated with that field (e.g. state variables).
62598f8807f4c71912baef74
class LocationConfig(AppConfig): <NEW_LINE> <INDENT> name = __package__ <NEW_LINE> verbose_name = _("Location")
Django's location application configuration class.
62598f8815baa72349461aaf
class TelephoneLineBinarySensor(BinarySensorEntity): <NEW_LINE> <INDENT> def __init__(self, compal_config, line_index): <NEW_LINE> <INDENT> self._compal_config = compal_config <NEW_LINE> self._line_index = line_index <NEW_LINE> self._state = self.get_state() <NEW_LINE> self._on_hook = self.get_on_hook() <NEW_LINE> <DED...
Representation of a sensor.
62598f88be383301e025332c
class PassThroughStorySet(story.StorySet): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(PassThroughStorySet, self).__init__() <NEW_LINE> urls_list = [ 'http://check.googlezip.net/image.png', ] <NEW_LINE> for url in urls_list: <NEW_LINE> <INDENT> self.AddStory(PassThroughPage(url, self))
Chrome proxy test sites
62598f88711fe17d825e021c
class MXModel(object): <NEW_LINE> <INDENT> __metaclass__ = Singleton <NEW_LINE> model_loaded = False <NEW_LINE> mod = None <NEW_LINE> synsets = None <NEW_LINE> def __init__(self, sym_url, param_url, synset_url, batch_size): <NEW_LINE> <INDENT> (s_fname, p_fname, synset_fname) = self.download_model_files(sym_url, param_...
This is a singleton class that just holds the loaded mxnet model in the module object We don't want to load the model for every inference when called from the map method
62598f888e71fb1e983bb5e1
class VersionField(MultiPartField): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> MultiPartField.__init__( self, name, [ UInt8Field("major", 3), UInt8Field("minor", 0) ] )
The protocol version field. :param String name: Name of the field
62598f88e76e3b2f99fd855f
class ImagefapUserExtractor(Extractor): <NEW_LINE> <INDENT> category = "imagefap" <NEW_LINE> subcategory = "user" <NEW_LINE> categorytransfer = True <NEW_LINE> pattern = [(r"(?:https?://)?(?:www\.)?imagefap\.com/" r"profile(?:\.php\?user=|/)([^/]+)"), (r"(?:https?://)?(?:www\.)?imagefap\.com/" r"usergallery\.php\?useri...
Extractor for all galleries from a user at imagefap.com
62598f8871ff763f4b5e72a0
class BlenderWeightAnim(): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> raise RuntimeError("%s should not be instantiated" % cls) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def anim(gltf, anim_idx, node_idx): <NEW_LINE> <INDENT> node = gltf.data.nodes[node_idx] <NEW_LINE> obj = bpy.data....
Blender ShapeKey Animation.
62598f880383005118f6d22c
class CsvExportPlugin(ExportPlugin): <NEW_LINE> <INDENT> def export(self, gradebook): <NEW_LINE> <INDENT> if self.to == "": <NEW_LINE> <INDENT> dest = "grades.csv" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> dest = self.to <NEW_LINE> <DEDENT> self.log.info("Exporting grades to %s", dest) <NEW_LINE> fh = open(dest, "w...
CSV exporter plugin.
62598f886fb2d068a7693bc7
class Session(Edge): <NEW_LINE> <INDENT> _base_class = False <NEW_LINE> @classmethod <NEW_LINE> def get_or_create(cls, border, neighbor, **properties): <NEW_LINE> <INDENT> src_match = {'routerid': border, 'label': Border.__name__} <NEW_LINE> dst_match = {'routerid': neighbor, 'label': Neighbor.__name__} <NEW_LINE> retu...
Represent a BGP session between a Border and a Neighbor.
62598f88b57a9660fecd15ae
@fortran_class <NEW_LINE> class SplinedInitialPower(InitialPower): <NEW_LINE> <INDENT> _fortran_class_name_ = 'TSplinedInitialPower' <NEW_LINE> _fields_ = [ ('effective_ns_for_nonlinear', c_double, "Effective n_s to use for approximate non-linear correction models")] <NEW_LINE> _methods_ = [('HasTensors', [], c_int), (...
Object to store a generic primordial spectrum set from a set of sampled k_i, P(k_i) values
62598f88d99f1b3c44d051da
class StrToComposition(ConversionFeaturizer): <NEW_LINE> <INDENT> def __init__(self, reduce=False, target_col_id="composition", overwrite_data=False): <NEW_LINE> <INDENT> super().__init__(target_col_id, overwrite_data) <NEW_LINE> self.reduce = reduce <NEW_LINE> self._chunksize = 30 <NEW_LINE> <DEDENT> def featurize(sel...
Utility featurizer to convert a string to a Composition The expected input is a composition in string form (e.g. "Fe2O3"). Note that this Featurizer does not produce machine learning-ready features but instead can be applied to pre-process data or as part of a Pipeline. Args: reduce (bool): Whether to return a r...
62598f88287bf620b62716e8
class user_exists_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerat...
Attributes: - success
62598f88d6c5a102081e1c7c
class SystemInfo(dict): <NEW_LINE> <INDENT> def __init__(self, width, height, *args, **kwargs): <NEW_LINE> <INDENT> super(SystemInfo, self).__init__(*args, **kwargs) <NEW_LINE> self.width = width <NEW_LINE> self.height = height <NEW_LINE> <DEDENT> def chips(self): <NEW_LINE> <INDENT> return iter(self) <NEW_LINE> <DEDEN...
An enhanced :py:class:`dict` containing a lookup from chip coordinates, (x, y), to chip information, :py:class:`.ChipInfo`. This dictionary contains an entry for every working chip in a system and no entry for chips which are dead. In addition to normal dictionary functionality, a number of utility methods are provide...
62598f8823849d37ff850bf1
class AddrPublicationAddRsp(ResponsePacket): <NEW_LINE> <INDENT> def __init__(self, raw_data): <NEW_LINE> <INDENT> __data = {} <NEW_LINE> __data["address_handle"], = struct.unpack("<H", raw_data[0:2]) <NEW_LINE> super(AddrPublicationAddRsp, self).__init__("AddrPublicationAdd", 0xA4, __data)
Response to a(n) AddrPublicationAdd command.
62598f8838b623060ffa8bc9
class Enum(SinglePartCompilable): <NEW_LINE> <INDENT> value_map = None <NEW_LINE> def __init__(self, value): <NEW_LINE> <INDENT> SinglePartCompilable.__init__(self) <NEW_LINE> self.__value = self.value_map[value] <NEW_LINE> <DEDENT> def get_value(self): <NEW_LINE> <INDENT> return self.__value <NEW_LINE> <DEDENT> @class...
You need to sublass this and add mapping values.
62598f88baa26c4b54d4ede6
class Geolake(Geocoder): <NEW_LINE> <INDENT> structured_query_params = { 'country', 'state', 'city', 'zipcode', 'street', 'address', 'houseNumber', 'subNumber', } <NEW_LINE> api_path = '/v1/geocode' <NEW_LINE> def __init__( self, api_key, *, domain='api.geolake.com', scheme=None, timeout=DEFAULT_SENTINEL, proxies=DEFAU...
Geocoder using the Geolake API. Documentation at: https://geolake.com/docs/api Terms of Service at: https://geolake.com/terms-of-use
62598f8823e79379d538c030
class HTTPMessageDelegate(object): <NEW_LINE> <INDENT> def headers_received(self, start_line, headers): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def data_received(self, chunk): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finish(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def on_connection_close(self): ...
Implement this interface to handle an HTTP request or response. .. versionadded:: 3.3
62598f880383005118f6d22e
class lnC_normal(th.gof.Op): <NEW_LINE> <INDENT> itypes=[T.dvector] <NEW_LINE> otypes=[T.dvector] <NEW_LINE> __props__ = () <NEW_LINE> def __init__(self, nP, nS, *args, **kwargs): <NEW_LINE> <INDENT> super(lnC_normal, self).__init__(*args, **kwargs) <NEW_LINE> self.nP = nP <NEW_LINE> self.nS = nS <NEW_LINE> self.Ns = n...
Theano Op to define the priors over last state (logC in the model) as a repetitions (sum, really) of offset normals.
62598f88bde94217f3707400
@pytest.mark.usefixtures("aiida_env") <NEW_LINE> class TestAiida_spex_entrypoints: <NEW_LINE> <INDENT> def test_spex_calculation_entry_point(aiida_env): <NEW_LINE> <INDENT> from aiida.orm import CalculationFactory <NEW_LINE> spex_calculation = CalculationFactory('spex.spex') <NEW_LINE> assert spex_calculation is not No...
tests all the entry points of the aiida spex package. Therefore if the package is reconized by AiiDA and installed right.
62598f88c432627299fa2b04
class TestLuminanceToExposureValue(unittest.TestCase): <NEW_LINE> <INDENT> def test_luminance_to_exposure_value(self): <NEW_LINE> <INDENT> np.testing.assert_almost_equal( luminance_to_exposure_value( np.array([0.125, 0.250, 0.125]), np.array([100, 100, 100]), np.array([12.5, 12.5, 14]), ), np.array([0.00000000, 1.00000...
Define :func:`colour_hdri.exposure.common.luminance_to_exposure_value` definition unit tests methods.
62598f8807d97122c42167da
class TorTooOld(Exception): <NEW_LINE> <INDENT> pass
This exception is raised if onionshare needs to use a feature of Tor or stem (like stealth ephemeral onion services) but the version you have installed is too old.
62598f8850485f2cf55daaa8
class HandParser(object): <NEW_LINE> <INDENT> def __init__(self, file_name): <NEW_LINE> <INDENT> self.site_name = None <NEW_LINE> self.file_name = file_name <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def canParseFile( file_name ): <NEW_LINE> <INDENT> raise Exception('Not implemented') <NEW_LINE> <DEDENT> def moreHand...
Root hand parser class
62598f8866656f66f7d59f2b
class WeightElimination(WeightUpdateConfigurable): <NEW_LINE> <INDENT> decay_rate = BoundedProperty(default=0.1, minval=0) <NEW_LINE> zero_weight = BoundedProperty(default=1, minval=0) <NEW_LINE> def init_param_updates(self, layer, parameter): <NEW_LINE> <INDENT> updates = super(WeightElimination, self).init_param_upda...
Weight Elimination algorithm penalizes large weights and limits the freedom in network. The algorithm is able to solve one of the possible problems of network overfitting. Parameters ---------- decay_rate : float Controls the effect of penalties on the update network weights. Defaults to ``0.1``. zero_weight :...
62598f885f7d997b871f9173
class WebpNoAlphaConverter (ShellConverter): <NEW_LINE> <INDENT> profile_name = 'webp-noalpha' <NEW_LINE> dst_ext = '.webp' <NEW_LINE> src_formats = ('.png','.jpg','.jpeg','.gif') <NEW_LINE> def call_converter(self, src, dst, suffix): <NEW_LINE> <INDENT> command(['cwebp', '-preset', 'drawing', '-noalpha', '-q', str(sel...
convert to webp; discard alpha channel
62598f88925a0f43d25e7b69
class McnpInputFile: <NEW_LINE> <INDENT> def __init__(self, filename=""): <NEW_LINE> <INDENT> self.celldeck = McnpCellDeck() <NEW_LINE> self.surfdeck = McnpSurfDeck() <NEW_LINE> self.datadeck = McnpDataDeck() <NEW_LINE> self.auxdeck = McnpAuxDeck() <NEW_LINE> self.filename = filename <NEW_LINE> self.file = None <NEW_LI...
Represents an entire MCNP input data file
62598f88b7558d5895463168
class BfrfsEEPROM(object): <NEW_LINE> <INDENT> user_eeprom = {} <NEW_LINE> log = None <NEW_LINE> rev = None <NEW_LINE> slot_idx = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> assert self.user_eeprom <NEW_LINE> assert self.log is not None <NEW_LINE> assert self.rev is not None <NEW_LINE> assert self.slot_idx ...
Mixin class to give classes user-EEPROM capabilities.
62598f8863b5f9789fe84ca5
class GetHostedPageType(object): <NEW_LINE> <INDENT> swagger_types = { 'page_id': 'str', 'page_name': 'str', 'page_type': 'str', 'page_version': 'str' } <NEW_LINE> attribute_map = { 'page_id': 'pageId', 'page_name': 'pageName', 'page_type': 'pageType', 'page_version': 'pageVersion' } <NEW_LINE> def __init__(self, page_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f88ec188e330fdf83d3
class NwmExample(TethysAppBase): <NEW_LINE> <INDENT> name = 'Nwm Example' <NEW_LINE> index = 'nwm_example:home' <NEW_LINE> icon = 'nwm_example/images/icon.gif' <NEW_LINE> package = 'nwm_example' <NEW_LINE> root_url = 'nwm-example' <NEW_LINE> color = '#8e44ad' <NEW_LINE> description = 'Place a brief description of your ...
Tethys app class for Nwm Example.
62598f88711fe17d825e0220
class Movie(Video): <NEW_LINE> <INDENT> scores = {'format': 3, 'video_codec': 2, 'title': 13, 'imdb_id': 34, 'audio_codec': 1, 'year': 7, 'resolution': 2, 'release_group': 6, 'hash': 34} <NEW_LINE> def __init__(self, name, title, format=None, release_group=None, resolution=None, video_codec=None, audio_codec=None, imdb...
Movie :class:`Video` Scores are defined by a set of equations, see :func:`~subliminal.score.get_movie_equations` :param string title: title of the movie :param int year: year of the movie
62598f88d10714528d69da06
class CheckModelBackend(ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, username = None, password = None): <NEW_LINE> <INDENT> if username and password: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = User.objects.get(username = username) <NEW_LINE> if user and user.is_active and user.check_password(passw...
自定义用户验证方法,支持用户名登录
62598f88d53ae8145f917fc5
class MainWindow(QWidget): <NEW_LINE> <INDENT> def __init__(self, ui_file): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> ui_file = QFile(ui_file) <NEW_LINE> ui_file.open(QFile.ReadOnly) <NEW_LINE> loader = QUiLoader() <NEW_LINE> ui_interface = loader.load(ui_file, self) <NEW_LINE> ui_file.close() <NEW_LINE> self.b...
Subclass QWidget and create a widget reading from a given ui file
62598f88b57a9660fecd15b2
class DAA(Binary): <NEW_LINE> <INDENT> file_ext = "daa" <NEW_LINE> def __init__(self, **kwd): <NEW_LINE> <INDENT> Binary.__init__(self, **kwd) <NEW_LINE> self._magic = binascii.unhexlify("6be33e6d47530e3c") <NEW_LINE> <DEDENT> def sniff(self, filename): <NEW_LINE> <INDENT> with open(filename, 'rb') as f: <NEW_LINE> <IN...
Class describing an DAA (diamond alignment archive) file >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname('diamond.daa') >>> DAA().sniff(fname) True >>> fname = get_test_fname('interval.interval') >>> DAA().sniff(fname) False
62598f8823e79379d538c032
class Parser(BaseParser): <NEW_LINE> <INDENT> def __init__(self, manifest: ResourceManifest, resource_path: str): <NEW_LINE> <INDENT> self.resource = [] <NEW_LINE> self.manifest = manifest <NEW_LINE> try: <NEW_LINE> <INDENT> with open(resource_path, encoding='utf8') as f: <NEW_LINE> <INDENT> reader = csv.reader(f) <NEW...
Parse data for MTD. Skipheader in manifest skips first row :param ResourceManifest manifest: Manifest for parser
62598f88a8ecb03325870d36
class Equal(SetOp): <NEW_LINE> <INDENT> op = 'equal'
A filter that matches if its arguments are identical attribute sets.
62598f88596a8972361277a9
class PythonUnpackedSequence: <NEW_LINE> <INDENT> def __init__(self, expr, size): <NEW_LINE> <INDENT> self.expr = expr <NEW_LINE> self.size = size <NEW_LINE> self.variables = [ None ] * size <NEW_LINE> self.nested = False <NEW_LINE> self.parent = None <NEW_LINE> self.parent_index = None <NEW_LINE> <DEDENT> def bind(sel...
Internally used by the decompiler to represent an unpacked sequence.
62598f8826068e7796d4c493
class TestXmlNs0ArticulationOperation(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 testXmlNs0ArticulationOperation(self): <NEW_LINE> <INDENT> pass
XmlNs0ArticulationOperation unit test stubs
62598f88bde94217f3707401
class NumberOfPublicFunctions(Metric): <NEW_LINE> <INDENT> def countFunctions(self, node, *args): <NEW_LINE> <INDENT> node.NumberOfPublicFunctions = compiler.walk(node, PublicFunctionsCounter()).result <NEW_LINE> <DEDENT> def visitProject(self, node, *args): <NEW_LINE> <INDENT> self.countFunctions(node, *args) <NEW_LIN...
Number of public functions of a (Project, Module, Class) All functions in Python are public. The convention is that a method name starting with an '_' is private. Thus all methods not starting with a '_' is counted as public.
62598f88b5575c28eb712a63
class InternalServerError(JSONError): <NEW_LINE> <INDENT> code = 500
500 Internal Server Error Raise if an internal server error occurred. This is a good fallback if an unknown error occurred in the dispatcher.
62598f886aa9bd52df0d4a09
class AulaRetrieveView(generics.RetrieveAPIView): <NEW_LINE> <INDENT> lookup_field = 'slug' <NEW_LINE> queryset = models.Aula <NEW_LINE> serializer_class = serializers.AulaSerializer
Detalle de Aula
62598f88656771135c4891b2
class P4RuntimeUTest(P4RuntimeTest): <NEW_LINE> <INDENT> def add_to_t_mtr_0(self, ig_port, eg_port, meter_config=None): <NEW_LINE> <INDENT> req, _ = self.send_request_add_entry_to_action( "t_mtr_0", [self.Exact("sm.ingress_port", stringify(ig_port, 2))], "t_mtr_0_send", [("port", stringify(eg_port, 2))], meter_config=m...
@brief Base test class for all p4rt_utests PTF tests.
62598f888c0ade5d55dc3426