code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestOFPQueueStatsReply(unittest.TestCase): <NEW_LINE> <INDENT> class Datapath(object): <NEW_LINE> <INDENT> ofproto = ofproto <NEW_LINE> ofproto_parser = ofproto_v1_0_parser <NEW_LINE> <DEDENT> c = OFPQueueStatsReply(Datapath) <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(se...
Test case for ofproto_v1_0_parser.OFPQueueStatsReply
62598fb5f548e778e596b680
class ID(DBFormatter): <NEW_LINE> <INDENT> def execute(self, groupname, conn = None, trans = False): <NEW_LINE> <INDENT> self.sql = "SELECT group_id FROM reqmgr_group " <NEW_LINE> self.sql += "WHERE group_name=:groupname" <NEW_LINE> binds = {"groupname": groupname} <NEW_LINE> result = self.dbi.processData(self.sql, bin...
_ID_ Get a group ID from the group name
62598fb5796e427e5384e871
class Value(object): <NEW_LINE> <INDENT> multiple = False <NEW_LINE> late_binding = False <NEW_LINE> environ_required = False <NEW_LINE> @property <NEW_LINE> def value(self): <NEW_LINE> <INDENT> value = self.default <NEW_LINE> if not hasattr(self, '_value') and self.environ_name: <NEW_LINE> <INDENT> self.setup(self.env...
A single settings value that is able to interpret env variables and implements a simple validation scheme.
62598fb597e22403b383afe2
class TrafficControllerRFC2544(TrafficController, IResults): <NEW_LINE> <INDENT> def __init__(self, traffic_gen_class): <NEW_LINE> <INDENT> super(TrafficControllerRFC2544, self).__init__(traffic_gen_class) <NEW_LINE> self._type = 'rfc2544' <NEW_LINE> self._tests = int(settings.getValue('TRAFFICGEN_RFC2544_TESTS')) <NEW...
Traffic controller for RFC2544 traffic Used to setup and control a traffic generator for an RFC2544 deployment traffic scenario.
62598fb5460517430c4320cb
class NlmconfiglogoperstatusEnum(Enum): <NEW_LINE> <INDENT> disabled = 1 <NEW_LINE> operational = 2 <NEW_LINE> noFilter = 3 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _NOTIFICATION_LOG_MIB as meta <NEW_LINE> return meta._meta_table['NotificationLo...
NlmconfiglogoperstatusEnum The operational status of this log\: disabled administratively disabled operational administratively enabled and working noFilter administratively enabled but either nlmConfigLogFilterName is zero length or does not name an existing entry in snmpNotif...
62598fb5cc0a2c111447b0f0
class WellConnectionPort(Enum): <NEW_LINE> <INDENT> Top = "port" <NEW_LINE> LeftAnnulus = "left_annulus_port" <NEW_LINE> RightAnnulus = "right_annulus_port"
Available ports for connecting to a Well node.
62598fb599fddb7c1ca62e59
class ParseError(AuthenticatorError): <NEW_LINE> <INDENT> pass
Exception raised on parse error.
62598fb526068e7796d4ca34
class RegistroY800(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'Y800'), Campo(2, 'ARQ_RTF'), Campo(3, 'IND_FIM_RTF'), ]
Outras Informações
62598fb53539df3088ecc38a
class BounceSearchResponse(object): <NEW_LINE> <INDENT> def __init__(self, total_count=None, bounces=None): <NEW_LINE> <INDENT> self.swagger_types = { 'total_count': 'int', 'bounces': 'list[BounceInfoResponse]' } <NEW_LINE> self.attribute_map = { 'total_count': 'TotalCount', 'bounces': 'Bounces' } <NEW_LINE> self._tota...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fb5851cf427c66b8394
class NetworkConfiguration(ConfigurationObject): <NEW_LINE> <INDENT> driver = CP(default='bridge') <NEW_LINE> driver_options = CP(dict) <NEW_LINE> internal = CP(default=False, input_func=bool_if_set) <NEW_LINE> create_options = CP(dict) <NEW_LINE> DOCSTRINGS = { 'driver': "The network driver name.", 'driver_options': "...
Configuration class for networks.
62598fb54c3428357761a398
class EightRoomSensor(EightSleepUserEntity): <NEW_LINE> <INDENT> def __init__(self, name, eight, sensor, units): <NEW_LINE> <INDENT> super().__init__(eight) <NEW_LINE> self._sensor = sensor <NEW_LINE> self._mapped_name = NAME_MAP.get(self._sensor, self._sensor) <NEW_LINE> self._name = '{} {}'.format(name, self._mapped_...
Representation of an eight sleep room sensor.
62598fb5be8e80087fbbf145
class Solution: <NEW_LINE> <INDENT> def mergeSortedArray(self, A, m, B, n): <NEW_LINE> <INDENT> last, i, j = m + n - 1, m - 1, n - 1 <NEW_LINE> while i >= 0 and j >= 0: <NEW_LINE> <INDENT> if A[i] > B[j]: <NEW_LINE> <INDENT> A[last] = A[i] <NEW_LINE> last, i = last - 1, i - 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDEN...
@param A: sorted integer array A which has m elements, but size of A is m+n @param B: sorted integer array B which has n elements @return: void
62598fb55fdd1c0f98e5e06c
class UniqueTermManager(TermManagerBase): <NEW_LINE> <INDENT> def __init__(self, max_terminals=None, **kwargs): <NEW_LINE> <INDENT> super(UniqueTermManager, self).__init__(**kwargs) <NEW_LINE> self.max_terminals = max_terminals <NEW_LINE> <DEDENT> def get_terminal(self, term_name=None): <NEW_LINE> <INDENT> if self.max_...
Give each websocket a unique terminal to use.
62598fb53d592f4c4edbaf9f
class ElmOracleListener(sublime_plugin.EventListener): <NEW_LINE> <INDENT> def on_selection_modified_async(self, view): <NEW_LINE> <INDENT> sel = view.sel()[0] <NEW_LINE> region = join_qualified(view.word(sel), view) <NEW_LINE> scope = view.scope_name(region.b) <NEW_LINE> if scope.find('source.elm') != -1: <NEW_LINE> <...
An event listener to load and search through data from elm oracle.
62598fb567a9b606de5460ae
class ExternalRedundancyFailureTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_external_redundancy_failure(self): <NEW_LINE> <INDENT> external_redundancy_failure_obj = ExternalRedundancyFailure() <NEW_LINE> self.assertNotEqual(external_redundancy_failure_obj, None)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fb59c8ee823130401e2
class ConfigurationError(BaseException): <NEW_LINE> <INDENT> pass
missing or incorrect codevalidator configuration
62598fb5d486a94d0ba2c0b0
class LevelShowHandler(BaseHandler): <NEW_LINE> <INDENT> @tornado.web.authenticated <NEW_LINE> def get(self, id): <NEW_LINE> <INDENT> if self.group != '1': <NEW_LINE> <INDENT> self.render("404.html", username=self.username, group=self.group) <NEW_LINE> <DEDENT> level_info = get_level_info_by_id(self.session, id) <NEW_L...
Show the detail information of some level.
62598fb5009cb60464d01601
class CsvOutputter: <NEW_LINE> <INDENT> def __init__(self, filename, header_vars): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.attributes = [''] * len(header_vars) <NEW_LINE> <DEDENT> def write(self): <NEW_LINE> <INDENT> self.fref.write(','.join(self.attributes) + "\n") <NEW_LINE> <DEDENT> def open(sel...
Class that wraps some of the code that must be used in order to provide triggers that writes into a csv file during parsing.
62598fb58a349b6b4368631b
class image: <NEW_LINE> <INDENT> class encode: <NEW_LINE> <INDENT> def img_base64(byte_string): <NEW_LINE> <INDENT> output = str(base64.b64encode(byte_string))[2:-1] <NEW_LINE> output = f'["data:image/png;base64,{output}"]' <NEW_LINE> return output <NEW_LINE> <DEDENT> <DEDENT> class process: <NEW_LINE> <INDENT> def jso...
Jina image search
62598fb5d486a94d0ba2c0b1
class GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(_messages.Message): <NEW_LINE> <INDENT> class FeaturesValueListEntryValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> FEATURE_UNSPECIFIED = 0 <NEW_LINE> LABEL_DETECTION = 1 <NEW_LINE> SHOT_CHANGE_DETECTION = 2 <NEW_LINE> <DEDENT> features = _messages.EnumField...
Video annotation request. Enums: FeaturesValueListEntryValuesEnum: Fields: features: Requested video annotation features. inputContent: The video data bytes. Encoding: base64. If unset, the input video(s) should be specified via `input_uri`. If set, `input_uri` should be unset. inputUri: Input video l...
62598fb5adb09d7d5dc0a66c
class Group: <NEW_LINE> <INDENT> def __init__(self, host): <NEW_LINE> <INDENT> self.people = {host.name: host} <NEW_LINE> self.recipes = {} <NEW_LINE> self.phase = "voting" <NEW_LINE> self.group_id = None <NEW_LINE> <DEDENT> def add_person(self, person_id): <NEW_LINE> <INDENT> if person_id in self.people: <NEW_LINE> <I...
Main group class, handles calls between different objects.
62598fb54f6381625f199530
class ConfigMerger(object): <NEW_LINE> <INDENT> def __init__(self, resolver=defaultMergeResolve): <NEW_LINE> <INDENT> self.resolver = resolver <NEW_LINE> <DEDENT> def merge(self, merged, mergee): <NEW_LINE> <INDENT> self.mergeMapping(merged, mergee) <NEW_LINE> <DEDENT> def mergeMapping(self, map1, map2): <NEW_LINE> <IN...
This class is used for merging two configurations. If a key exists in the merge operand but not the merge target, then the entry is copied from the merge operand to the merge target. If a key exists in both configurations, then a resolver (a callable) is called to decide how to handle the conflict.
62598fb526068e7796d4ca36
class TestSameSymbol(unittest.TestCase): <NEW_LINE> <INDENT> def test_signs(self): <NEW_LINE> <INDENT> self.assertNotEqual(same_symbol_check("$", "£"), ("$", "£")) <NEW_LINE> <DEDENT> def test_three_letters(self): <NEW_LINE> <INDENT> self.assertEqual(same_symbol_check("EUR", "AUD"), ("EUR", "AUD"))
Test for currencies with same symbol. Input needed.
62598fb51f5feb6acb162cfe
class RedisCache(RedisBackend, BaseCache): <NEW_LINE> <INDENT> def __init__(self, serializer=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self.serializer = serializer or JsonSerializer() <NEW_LINE> <DEDENT> def _build_key(self, key, namespace=None): <NEW_LINE> <INDENT> if namespace is not ...
Redis cache implementation with the following components as defaults: - serializer: :class:`aiocache.serializers.JsonSerializer` - plugins: [] Config options are: :param serializer: obj derived from :class:`aiocache.serializers.BaseSerializer`. :param plugins: list of :class:`aiocache.plugins.BasePlugin` deri...
62598fb510dbd63aa1c70c96
class TestPositionalsActionAppend(ParserTestCase): <NEW_LINE> <INDENT> parser_signature = Sig(add_config=False, add_debug=False) <NEW_LINE> argument_signatures = [ Sig('spam', action='append'), Sig('spam', action='append', nargs=2), ] <NEW_LINE> failures = ['', '--foo', 'a', 'a b', 'a b c d'] <NEW_LINE> successes = [ (...
Test the 'append' action
62598fb55fc7496912d482eb
class SoftmaxRegressor(Classifier): <NEW_LINE> <INDENT> def _fit(self, X, t, max_iter=100, learning_rate=0.1): <NEW_LINE> <INDENT> self.n_classes = np.max(t) + 1 <NEW_LINE> T = np.eye(self.n_classes)[t] <NEW_LINE> W = np.zeros((np.size(X, 1), self.n_classes)) <NEW_LINE> for _ in range(max_iter): <NEW_LINE> <INDENT> W_p...
Softmax regression model aka multinomial logistic regression, multiclass logistic regression, or maximum entropy classifier. y = softmax(X @ W) t ~ Categorical(t|y)
62598fb5ec188e330fdf8970
class ResultIterator(): <NEW_LINE> <INDENT> def __init__(self, query, interface, results='substanzas', amount=10, start=None, reverse=False): <NEW_LINE> <INDENT> self.query = query <NEW_LINE> self.amount = amount <NEW_LINE> self.start = start <NEW_LINE> self.interface = interface <NEW_LINE> self.results = results <NEW_...
An iterator for Result Set Managment
62598fb5b7558d589546370d
class Category(Base): <NEW_LINE> <INDENT> __tablename__ = 'category' <NEW_LINE> name = Column(String(80), nullable=False) <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> @property <NEW_LINE> def serialize(self): <NEW_LINE> <INDENT> return { 'name': self.name, 'id': self.id }
A category class mapping to our category table Args: Base: the parent class doing the mapping by sqlalchemy
62598fb57d847024c075c49c
class Test_vxlan(unittest.TestCase): <NEW_LINE> <INDENT> vni = 0x123456 <NEW_LINE> buf = ( b'\x08\x00\x00\x00' b'\x12\x34\x56\x00' b'test_payload' ) <NEW_LINE> pkt = vxlan.vxlan(vni) <NEW_LINE> jsondict = { 'vxlan': { 'vni': vni } } <NEW_LINE> def test_init(self): <NEW_LINE> <INDENT> eq_(self.vni, self.pkt.vni) <NEW_LI...
Test case for VXLAN (RFC 7348) header encoder/decoder class.
62598fb523849d37ff851193
class QuestObject_(QuestObject, _ComparisonMixin): <NEW_LINE> <INDENT> pass
A QuestObject that implements the == and != operators.
62598fb5f9cc0f698b1c533c
class IRhaptosSwordContentSelectionLens(Interface): <NEW_LINE> <INDENT> pass
Mark a lense as an object that can accept an atom entry POST.
62598fb54c3428357761a39a
class ParameterError(DKIMException): <NEW_LINE> <INDENT> pass
Input parameter error.
62598fb5097d151d1a2c1110
class _ComputeInstancesRepository( repository_mixins.AggregatedListQueryMixin, repository_mixins.ListQueryMixin, _base_repository.GCPRepository): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(_ComputeInstancesRepository, self).__init__( component='instances', **kwargs) <NEW_LINE> <DEDENT> ...
Implementation of Compute Instances repository.
62598fb5f548e778e596b684
class StudentInsertView(LoginRequiredMixin, PermissionMixin, ObjectRedirectView): <NEW_LINE> <INDENT> template_name = 'students/users.html' <NEW_LINE> permissions_required = [ 'change_own_discipline' ] <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> discipline = get_object_or_404( Discipline, slug=self.kwargs.get(...
Insert a student or monitor inside discipline by teacher.
62598fb57c178a314d78d57e
class RuntimeStore(Singleton): <NEW_LINE> <INDENT> database_path = "" <NEW_LINE> database_file = None <NEW_LINE> last_etag = None <NEW_LINE> data_dir = "" <NEW_LINE> home_data_dir = "" <NEW_LINE> storage = None <NEW_LINE> conf = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> import def...
Handles one-shot configuration that is not stored between sessions
62598fb59c8ee823130401e3
class HttpFacadeTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_base(self): <NEW_LINE> <INDENT> http_facade = HttpFacade("tst") <NEW_LINE> self.assertEquals("tst", http_facade.url) <NEW_LINE> self.assertEquals("tst", http_facade.url_to.domain) <NEW_LINE> http_facade = HttpFacade("www.uol.com.br") <NEW_LINE> self....
Http Facade Class Tests
62598fb58a43f66fc4bf225a
class NearestNeighbourResampler(ImageResampler): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(NearestNeighbourResampler, self).__init__(order=0)
Set to nearest neighbourhood resampling
62598fb5cc0a2c111447b0f4
class WriterToMongoDB(): <NEW_LINE> <INDENT> def __init__(self, logger=None): <NEW_LINE> <INDENT> if logger is None: <NEW_LINE> <INDENT> logger = logging.getLogger() <NEW_LINE> <DEDENT> self.logger = logger <NEW_LINE> self.ctx = zmq.Context() <NEW_LINE> self.sock = self.ctx.socket(zmq.SUB) <NEW_LINE> self.sock.connect(...
Writes incoming data to the MongoDB for storage
62598fb57d43ff2487427473
class VRPQuelle: <NEW_LINE> <INDENT> def __init__(self, js_quelle, parent_name): <NEW_LINE> <INDENT> self.name = parent_name <NEW_LINE> self.pfad = js_quelle['pfad'] <NEW_LINE> self.qml = None <NEW_LINE> self.statistik = False <NEW_LINE> self.attribut = None <NEW_LINE> self.filter = None <NEW_LINE> self.text = None <NE...
Data source
62598fb5283ffb24f3cf396e
class CrossEntropyWithSoftmax(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def fun(y_hat, y): <NEW_LINE> <INDENT> yr_hot = CrossEntropyWithSoftmax.softmax(y_hat) * y <NEW_LINE> return np.average(- np.log(np.sum(yr_hot, 1))) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def diff(y_hat, y): <NEW_LINE> <INDENT> re...
带softmax的交叉熵损失函数
62598fb57b180e01f3e490c1
class Dog: <NEW_LINE> <INDENT> def __init__(self, name, age): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def sit(self): <NEW_LINE> <INDENT> print(f"{self.name} is now sitting.") <NEW_LINE> <DEDENT> def roll_over(self): <NEW_LINE> <INDENT> print(f"{self.name} rolled over!")
A simple attempt to model a dog
62598fb59f288636728188a5
class ValidateChangeAddressForm(FormValidationAction): <NEW_LINE> <INDENT> def name(self) -> Text: <NEW_LINE> <INDENT> return "validate_change_address_form" <NEW_LINE> <DEDENT> async def validate_address_state( self, slot_value: Text, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any] ) -> Dict...
Validates the user has filled out the change of address form correctly.
62598fb5bd1bec0571e15133
class XGenCreator(avalon.maya.Creator): <NEW_LINE> <INDENT> label = "XGen" <NEW_LINE> family = "reveries.xgen" <NEW_LINE> icon = "paw" <NEW_LINE> defaults = [ "legacy", "interactive", ] <NEW_LINE> def process(self): <NEW_LINE> <INDENT> variant = None <NEW_LINE> for var in self.defaults: <NEW_LINE> <INDENT> prefix = "xg...
Maya XGen Legacy or Interactive Grooming
62598fb5d7e4931a7ef3c176
class EnhancedTextField(JTextField): <NEW_LINE> <INDENT> def __init__(self, text, columns): <NEW_LINE> <INDENT> JTextField.__init__(self, text, columns) <NEW_LINE> self.focusGained=lambda e: e.getSource().selectAll() <NEW_LINE> self.focusLost=lambda e: e.getSource().select(0,0)
A JTextField that selects and unselects the text according to the focus
62598fb526068e7796d4ca38
class RureForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model=rure_master <NEW_LINE> exclude =('rure_id', 'rure_name')
ルアーフォーム
62598fb5aad79263cf42e8b6
class FunctionMixin(PyobjMixin): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> if inspect.ismethod(self.obj): <NEW_LINE> <INDENT> name = 'setup_method' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> name = 'setup_function' <NEW_LINE> <DEDENT> if isinstance(self.parent, Instance): <NEW_LINE> <INDENT> obj = sel...
mixin for the code common to Function and Generator.
62598fb523849d37ff851195
class ResourceNotFoundError(Fault): <NEW_LINE> <INDENT> def __init__(self, fault_object, fault_string="Requested resource %r not found"): <NEW_LINE> <INDENT> Fault.__init__(self, 'Client.ResourceNotFound', fault_string % fault_object)
Raised when requested resource is not found.
62598fb5be383301e02538dd
class TestEquiv_basic_APIError(HttpEquivalenceTest, HttpTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> HttpTest.setUp(self) <NEW_LINE> @rest.rest_call('GET', '/some_error', Schema({})) <NEW_LINE> def some_error(): <NEW_LINE> <INDENT> self.api_call() <NEW_LINE> <DEDENT> <DEDENT> def api_call(self): <NEW...
Basic test to make sure the APIError handling code is excercised.
62598fb563b5f9789fe8524e
class WorkflowTrigger(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Type = None <NEW_LINE> self.CosFileUploadTrigger = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Type = params.get("Type") <NEW_LINE> if params.get("CosFileUploadTrigger") is not No...
Input rule. If an uploaded video hits the rule, the workflow will be triggered.
62598fb55fcc89381b2661bd
class LimitedSpeedNHLIntegrator(MultipleTimeScaleIntegrator): <NEW_LINE> <INDENT> def __init__(self, stepSize, loops, temperature, timeScale, frictionConstant, **kwargs): <NEW_LINE> <INDENT> L = kwargs.pop('L', 1) <NEW_LINE> move = propagators.LimitedSpeedNHLPropagator(temperature, timeScale, frictionConstant, L, 'move...
Parameters ---------- stepSize : unit.Quantity The largest time step for numerically integrating the system of equations. loops : list(int) See description in :class:`MultipleTimeScaleIntegrator`. temperature : unit.Quantity The temperature to which the configurational sampling shoul...
62598fb532920d7e50bc6136
class BladeConfig(object): <NEW_LINE> <INDENT> def __init__(self, current_source_dir): <NEW_LINE> <INDENT> self.current_source_dir = current_source_dir <NEW_LINE> self.configs = { 'cc_test_config' : { 'dynamic_link' : False, 'heap_check' : '', 'gperftools_lib' : '#tcmalloc', 'gperftools_debug_lib' : '#tcmalloc_debug', ...
BladeConfig. A configuration parser class.
62598fb5498bea3a75a57c03
class linear_interpolated_rv_2D(object): <NEW_LINE> <INDENT> def __init__(self, x, y, distribution): <NEW_LINE> <INDENT> self._x = x[:,0] <NEW_LINE> self._y = y[0,:] <NEW_LINE> area_under_curve = trapz(trapz(distribution, axis=1), axis=0) <NEW_LINE> self._pdf = distribution / area_under_curve <NEW_LINE> self._ycdf = cu...
Contrtuct a 2D distribution assuming linear interpolation from discrete data.
62598fb566656f66f7d5a4d3
class SpkirAbjCsppInstrumentDataParticle(DataParticle): <NEW_LINE> <INDENT> def _build_parsed_values(self): <NEW_LINE> <INDENT> results = [] <NEW_LINE> results.append(self._encode_value(SpkirAbjCsppParserDataParticleKey.PROFILER_TIMESTAMP, self.raw_data.group(DataMatchesGroupNumber.PROFILER_TIMESTAMP), numpy.float)) <N...
Base Class for building a spkir_abj_cspp instrument data particle
62598fb556ac1b37e63022cd
class OrderedDict(Dict): <NEW_LINE> <INDENT> pass
An (ordered) dictionary of objects
62598fb597e22403b383afe8
class UpdateProductRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ProductId = None <NEW_LINE> self.Name = None <NEW_LINE> self.Description = None <NEW_LINE> self.DataTemplate = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.ProductId = params....
UpdateProduct请求参数结构体
62598fb57c178a314d78d580
class MainnetDAOValidatorVM(HomesteadVM): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def validate_header(cls, header: BlockHeader, previous_header: BlockHeader, check_seal: bool=True) -> None: <NEW_LINE> <INDENT> super().validate_header(header, previous_header, check_seal) <NEW_LINE> dao_fork_at = cls.get_dao_fork_blo...
Only on mainnet, TheDAO fork is accompanied by special extra data. Validate those headers
62598fb5a79ad1619776a14f
class PDAConfiguration(collections.namedtuple( 'PDAConfiguration', ['state', 'remaining_input', 'stack'] )): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return '\n{}(\'{}\', \'{}\', {})'.format( self.__class__.__name__, self.state, self.remaining_input, self.stack )
A configuration is a triple of current state, remaining input and stack. It represents the complete runtime state of a PDA. It is hashable and immutable.
62598fb57cff6e4e811b5b02
class OneClassSVM(BaseLibSVM): <NEW_LINE> <INDENT> def __init__(self, kernel='rbf', degree=3, gamma=0.0, coef0=0.0, tol=1e-3, nu=0.5, shrinking=True, cache_size=200, verbose=False, max_iter=-1, random_state=None): <NEW_LINE> <INDENT> super(OneClassSVM, self).__init__( 'one_class', kernel, degree, gamma, coef0, tol, 0.,...
Unsupervised Outliers Detection. Estimate the support of a high-dimensional distribution. The implementation is based on libsvm. Parameters ---------- kernel : string, optional (default='rbf') Specifies the kernel type to be used in the algorithm. It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'prec...
62598fb557b8e32f5250818e
class AddonPremium(amo.models.ModelBase): <NEW_LINE> <INDENT> addon = models.OneToOneField('addons.Addon') <NEW_LINE> price = models.ForeignKey(Price, blank=True, null=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'addons_premium' <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return u'Pre...
Additions to the Addon model that only apply to Premium add-ons.
62598fb57047854f4633f4be
class TransporterParser(object): <NEW_LINE> <INDENT> line_pattern = re.compile(r"(\S*)(?:\s*([\d\.]*))?(?:\s*co\((\S*)\))?") <NEW_LINE> name_pattern = re.compile(r"[^_]*_([^_]*)_") <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.clear() <NEW_LINE> <DEDENT> def clear(self): <NEW_LINE> <INDENT> self.transporters ...
Parser for transporter files. It reads lines of the format <name> [<factor>] [co(<name>)] into a list. Lines beginning with a # sign are ignored
62598fb53346ee7daa3376b9
class BaseHandlerI18NTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.options = {} <NEW_LINE> mock_request = Mock() <NEW_LINE> mock_request.options = self.options <NEW_LINE> mock_request.environ = {"route_args": {}} <NEW_LINE> self.handler = handler_factory(BaseHandler, mock_re...
Test the ``BaseHandler`` i18n.
62598fb510dbd63aa1c70c9a
class TestCoprsWorkerCreate(Base): <NEW_LINE> <INDENT> expected_title = "copr.worker.create" <NEW_LINE> expected_subti = "a new worker was created" <NEW_LINE> expected_packages = set([]) <NEW_LINE> expected_usernames = set([]) <NEW_LINE> expected_objects = set([ 'coprs/worker.create', ]) <NEW_LINE> msg = { u'username':...
`Copr <https://fedorahosted.org/copr/>`_ publishes these messages when a new worker is spun up.
62598fb5ec188e330fdf8974
class VerificationCodeModifyPassword(FactoryBase): <NEW_LINE> <INDENT> title = '吃货商城用户密码修改提醒' <NEW_LINE> content = '亲爱的【吃货商城】用户,您正在为您的账户修改密码,您的修改密码的短信验证码为%(code)s,' '有效期10分钟,如非本人操作,请勿理睬!' <NEW_LINE> def post(self, request): <NEW_LINE> <INDENT> serializer = self.get_serializer(data=request.data) <NEW_LINE> ...
手机验证
62598fb5aad79263cf42e8b8
class DownloaderActor(pykka.gevent.GeventActor): <NEW_LINE> <INDENT> def __init__(self, librarian): <NEW_LINE> <INDENT> super(DownloaderActor, self).__init__() <NEW_LINE> self.librarian = librarian <NEW_LINE> <DEDENT> def download_song(self, song): <NEW_LINE> <INDENT> base_filepath = self.librarian.get_base_filepath(so...
Given a URL where a music video can be watched, downloads the video file. This implementation uses the rather excellent YoutubeDL.
62598fb55fc7496912d482ed
class ApiError(Exception): <NEW_LINE> <INDENT> def __init__(self, error, data='', message=''): <NEW_LINE> <INDENT> super(ApiError, self).__init__(message) <NEW_LINE> self.error = error <NEW_LINE> self.data = data <NEW_LINE> self.message = message
the base ApiError which contains error(required), data(optional) and message(optional)
62598fb5b7558d5895463711
class UbuntuOneLauncherUnity(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.entry = Unity.LauncherEntry.get_for_desktop_id(U1_DOTDESKTOP) <NEW_LINE> <DEDENT> def show_progressbar(self): <NEW_LINE> <INDENT> self.entry.set_property('progress_visible', True) <NEW_LINE> <DEDENT> def hide_progress...
The Magicicada launcher icon.
62598fb53539df3088ecc390
class CalendarViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Calendar.objects.all() <NEW_LINE> serializer_class = CalendarSerializer
API endpoint that allows calendars to be viewed or edited.
62598fb523849d37ff851197
class Preorder: <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def _leq(self, set1, set2): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def compare(self, set1, set2): <NEW_LINE> <INDENT> if set1 == set2: <NEW_LINE> <INDENT> return OrderResult.EQUAL <NEW_LINE> <DEDENT> if self._leq(set1, set2): <NEW_LINE> <INDENT> i...
Represents an abstract preorder
62598fb5f9cc0f698b1c533e
class MockRenewer(RenewingAuthorizer): <NEW_LINE> <INDENT> def __init__(self, token_data, **kwargs): <NEW_LINE> <INDENT> self.token_data = token_data <NEW_LINE> self.token_response = mock.Mock() <NEW_LINE> super().__init__(**kwargs) <NEW_LINE> <DEDENT> def _get_token_response(self): <NEW_LINE> <INDENT> return self.toke...
Class that implements RenewingAuthorizer so that _get_token_response and _extract_token_data can return known values for testing
62598fb5627d3e7fe0e06f94
class CashOnDeliveryLineBuilder(Component): <NEW_LINE> <INDENT> _name = 'ecommerce.order.line.builder.cod' <NEW_LINE> _inherit = 'ecommerce.order.line.builder' <NEW_LINE> _usage = 'order.line.builder.cod' <NEW_LINE> def __init__(self, work_context): <NEW_LINE> <INDENT> super(CashOnDeliveryLineBuilder, self).__init__(wo...
Return values for a Cash on Delivery line
62598fb55fdd1c0f98e5e072
class AddCourseDetailsModel(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_course_page_title(): <NEW_LINE> <INDENT> return page_identifier['identifier'].get('web_page_title') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_fullname_field_xpath(): <NEW_LINE> <INDENT> return fields['full_name'].get('x...
Allows the framework to add the details of the course to the input fields. This done using the classes public methods.
62598fb55166f23b2e2434c0
class CredentialManager: <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getcredentials(self, host, login=None): <NEW_LINE> <INDENT> return self.badcredentials(host, login) <NEW_LINE> <DEDENT> def badcredentials(self, host, login=None): <NEW_LINE> <INDENT> print...
Base class for a PasswordManager, that always asks
62598fb59c8ee823130401e5
class PQ(object): <NEW_LINE> <INDENT> def __init__(self, capacity): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @property <NEW_LINE> def N(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_LINE> <INDENT> return self.N == 0 <NEW_LINE> <DEDENT> def insert(self, x): <NEW_L...
abstract class of PQ
62598fb5460517430c4320cf
class AirBrushTool(DataTool): <NEW_LINE> <INDENT> only2d = False <NEW_LINE> def __init__(self, parent, plot): <NEW_LINE> <INDENT> super().__init__(parent, plot) <NEW_LINE> self.__timer = QTimer(self, interval=50) <NEW_LINE> self.__timer.timeout.connect(self.__timout) <NEW_LINE> self.__count = itertools.count() <NEW_LIN...
Add points with an 'air brush'.
62598fb5d486a94d0ba2c0b6
class EntryList(Resource): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> parser = reqparse.RequestParser() <NEW_LINE> parser.add_argument( 'title', type=str, required=True, help='Entry title required please!') <NEW_LINE> parser.add_argument( 'notes', type=str, required=True, ) <NEW_LINE> args = parser.parse_a...
Handles operations on an Entry
62598fb5377c676e912f6de1
class Native (Decl, DeclRepoId): <NEW_LINE> <INDENT> def __init__(self, file, line, mainFile, pragmas, comments, identifier, scopedName, repoId): <NEW_LINE> <INDENT> Decl.__init__(self, file, line, mainFile, pragmas, comments) <NEW_LINE> DeclRepoId.__init__(self, identifier, scopedName, repoId) <NEW_LINE> <DEDENT> def ...
Native declaration (Decl, DeclRepoId) Native should not be used in normal IDL. No non-inherited functions.
62598fb5d486a94d0ba2c0b7
class Scheduler(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def valid_cookie(cycle=settings.CYCLE): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> print ('Cookies检测进程开始') <NEW_LINE> try: <NEW_LINE> <INDENT> for website, cls in settings.TESTER_MAP.items(): <NEW_LINE> <INDENT> tester = eval(cls+'(website="...
调度策略
62598fb5cc0a2c111447b0f8
class RegionalQuotaCapability(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'region_name': {'key': 'regionName', 'type': 'str'}, 'cores_used': {'key': 'coresUsed', 'type': 'long'}, 'cores_available': {'key': 'coresAvailable', 'type': 'long'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE>...
The regional quota capacity. :param region_name: The region name. :type region_name: str :param cores_used: The number of cores used in the region. :type cores_used: long :param cores_available: The number of cores available in the region. :type cores_available: long
62598fb599fddb7c1ca62e5d
class TreeBuilder(object): <NEW_LINE> <INDENT> def __init__(self, object_store): <NEW_LINE> <INDENT> self.object_store = object_store <NEW_LINE> self.items = {} <NEW_LINE> <DEDENT> def __setitem__(self, lookup_key, value): <NEW_LINE> <INDENT> self.items[lookup_key] = value <NEW_LINE> <DEDENT> def _make_subtree(self, it...
Builder for a key-value Merkle tree. :param object_store: Object store You can add items using a dict-like interface: >>> from .store import Sha256DictStore >>> store = Sha256DictStore() >>> builder = TreeBuilder(store) >>> builder['foo'] = b'bar' >>> builder['baz'] = b'zez' >>> tree = builder.commit() >>> 'foo' in ...
62598fb5167d2b6e312b7058
class PayMilitary(Effect): <NEW_LINE> <INDENT> def __init__(self, arg): <NEW_LINE> <INDENT> super(PayMilitary, self).__init__()
Player may place non-Alien military as non-military with -1 cost One of a few effects that may be broken apart into more general effects for clarity's sake
62598fb54527f215b58e9fbb
class Thesaurus(models.Model): <NEW_LINE> <INDENT> id = models.AutoField( null=False, blank=False, unique=True, primary_key=True) <NEW_LINE> identifier = models.CharField( max_length=255, null=False, blank=False, unique=True) <NEW_LINE> title = models.CharField(max_length=255, null=False, blank=False) <NEW_LINE> date =...
Loadable thesaurus containing keywords in different languages
62598fb510dbd63aa1c70c9c
class LongTermRetentionPolicy(RetentionPolicy): <NEW_LINE> <INDENT> _validation = { 'retention_policy_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, 'weekly_s...
Long term retention policy. All required parameters must be populated in order to send to Azure. :ivar retention_policy_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :vartype retention_policy_type: str :iva...
62598fb5a17c0f6771d5c31b
class OrderWidget(QWidget): <NEW_LINE> <INDENT> def __init__(self,connection): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.connection = connection <NEW_LINE> self.product_model = self.connection.current_products() <NEW_LINE> self.order_details = None <NEW_LINE> self.product_table = QTableView() <NEW_LINE> se...
provides a widget that enables you to create an order full of products
62598fb5dc8b845886d5369d
class UseDatabase: <NEW_LINE> <INDENT> def __init__(self, config: dict) -> None: <NEW_LINE> <INDENT> self.configuration = config <NEW_LINE> <DEDENT> """Настройка подключение к базе""" <NEW_LINE> def __enter__(self) -> 'cursor': <NEW_LINE> <INDENT> self.conn = mysql.connector.connect(**self.configuration) <NEW_LINE> sel...
Инициализация конфиг файла
62598fb53539df3088ecc392
class DateTime(Date): <NEW_LINE> <INDENT> _represents = datetime <NEW_LINE> format = '%Y-%m-%dT%H:%M:%S' <NEW_LINE> @classmethod <NEW_LINE> def default_offset(cls): <NEW_LINE> <INDENT> return -mktime(datetime(1970, 1, 1).timetuple()) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_offset(cls, value): <NEW_LINE> <IN...
Represents datetime values, simplified form is ``datetime``, default ``none_value`` is ``None``.
62598fb563b5f9789fe85252
class APIQueryErrorException(): <NEW_LINE> <INDENT> def __init__(self, code, message): <NEW_LINE> <INDENT> self.code = code <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return "%s (Error Code: %s)" % (self.message, self.code) <NEW_LINE> <DEDENT> def __str__(self): <NE...
This is an error returned by the EVE API. See the URL at the top of this module for how to get an up to date list.
62598fb5baa26c4b54d4f39e
class RoutineAddr : <NEW_LINE> <INDENT> def __init__(self, addr) : <NEW_LINE> <INDENT> self.addr = addr <NEW_LINE> <DEDENT> def __repr__(self) : <NEW_LINE> <INDENT> return "RoutineAddr(0x%x)" % self.addr
for showing pointers to methods.
62598fb521bff66bcd722d4e
class VerificationIPFlowResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'access': {'key': 'access', 'type': 'str'}, 'rule_name': {'key': 'ruleName', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(VerificationIPFlowResult, self).__init__(**kwargs) <NEW_L...
Results of IP flow verification on the target resource. :param access: Indicates whether the traffic is allowed or denied. Possible values include: "Allow", "Deny". :type access: str or ~azure.mgmt.network.v2019_04_01.models.Access :param rule_name: Name of the rule. If input is not matched against any security rule,...
62598fb5498bea3a75a57c07
class _HashedCategoricalColumn( _CategoricalColumn, collections.namedtuple('_HashedCategoricalColumn', ['key', 'hash_bucket_size', 'dtype'])): <NEW_LINE> <INDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self.key <NEW_LINE> <DEDENT> @property <NEW_LINE> def _parse_example_spec(self): <NEW_LINE> <...
see `categorical_column_with_hash_bucket`.
62598fb52c8b7c6e89bd38ab
class Shape(Circle): <NEW_LINE> <INDENT> def render2(self) : <NEW_LINE> <INDENT> glCallList(self.z+1) <NEW_LINE> <DEDENT> def render(self) : <NEW_LINE> <INDENT> rad = 8 <NEW_LINE> inner = 6 <NEW_LINE> glNewList(self.z+1, GL_COMPILE) <NEW_LINE> glPushMatrix() <NEW_LINE> glTranslatef(self.x, self.y, -self.z) <NEW_LINE> g...
compiles a list and calls it from render. this should be far more eficient but shape remains static
62598fb5cc0a2c111447b0f9
class OrderMapUtils: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def order_map_to_dataframe(cls, order_map): <NEW_LINE> <INDENT> index = cls.build_order_map_index(order_map) <NEW_LINE> dk = list(order_map.keys())[0]; <NEW_LINE> pk = list(order_map[dk].keys())[0] <NEW_LINE> colnames = order_map[dk][pk][0].__dict__.keys(...
Utilities for order map
62598fb571ff763f4b5e785b
class Component(type): <NEW_LINE> <INDENT> count = 0 <NEW_LINE> def __new__(cls, name, bases, dct): <NEW_LINE> <INDENT> component_class = super().__new__(cls, name, bases, dct) <NEW_LINE> component_class.component_id = cls.count <NEW_LINE> cls.count += 1 <NEW_LINE> return component_class
A generic component class
62598fb556ac1b37e63022d1
class TrackSetHandler(PickleableMethodCaller): <NEW_LINE> <INDENT> def __init__(self, force: bool = False, gain_type: str = "auto", dry_run: bool = False, verbose: bool = False) -> None: <NEW_LINE> <INDENT> super(TrackSetHandler, self).__init__( "do_gain", force = force, gain_type = gain_type, verbose = verbose, dry_ru...
Pickleable callable for multiprocessing.Pool.imap
62598fb55166f23b2e2434c2
class BadgeCategory(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=250, unique=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def get_user_value(self, user): <NEW_LINE> <INDENT> from sport.models import SportSession <NEW_LINE> sessions = SportSess...
Group badges by categories
62598fb544b2445a339b69e6
class ParagraphNode(HeadingNode): <NEW_LINE> <INDENT> def __init__(self, io, options, argument): <NEW_LINE> <INDENT> super().__init__(io, 'paragraph', options, argument) <NEW_LINE> <DEDENT> def get_command(self): <NEW_LINE> <INDENT> return 'paragraph' <NEW_LINE> <DEDENT> def is_block_command(self): <NEW_LINE> <INDENT> ...
SDoc2 node for paragraphs.
62598fb59c8ee823130401e6
class testcase_98_kernel_parameter(Testcase): <NEW_LINE> <INDENT> tags = [] <NEW_LINE> stages = ['stage0'] <NEW_LINE> def test(self, connection, params): <NEW_LINE> <INDENT> prod = params['product'].upper() <NEW_LINE> ver = params['version'] <NEW_LINE> if 'kernelparams' in params: <NEW_LINE> <INDENT> self.get_return_va...
Add specific kernel parameters
62598fb5d486a94d0ba2c0b8
class Parser(object): <NEW_LINE> <INDENT> ChunkClasses = () <NEW_LINE> Timeout = 60 <NEW_LINE> def __init__(self, fp, total_length=None): <NEW_LINE> <INDENT> if isinstance(fp, FilePtr): <NEW_LINE> <INDENT> self.fp = fp <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.fp = FilePtr(fp, total_length) <NEW_LINE> <DEDENT>...
Parse chunks from file or streaming. - In file mode, :attr:`total_length` can be left None and will be read from file system. - In streaming mode, you **must** provide :attr:`total_length` to specify the end of the stream. :param fp: File object to be read from. :param total_length: Total length of the source. :t...
62598fb5460517430c4320d0
class SiteConfigurationHistoryAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('site', 'enabled', 'created', 'modified') <NEW_LINE> search_fields = ('site__domain', 'values', 'created', 'modified') <NEW_LINE> ordering = ['-created'] <NEW_LINE> class Meta(object): <NEW_LINE> <INDENT> model = SiteConfiguratio...
Admin interface for the SiteConfigurationHistory object.
62598fb5377c676e912f6de2
@dataclasses.dataclass(slots=True) <NEW_LINE> class RewriteRestFilledCommand(Command): <NEW_LINE> <INDENT> spelling: Spelling = Spelling() <NEW_LINE> def __post_init__(self): <NEW_LINE> <INDENT> Command.__post_init__(self) <NEW_LINE> assert isinstance(self.spelling, Spelling) <NEW_LINE> <DEDENT> def __call__(self, voic...
Rewrite rest-filled command.
62598fb57cff6e4e811b5b06
class OrderItemForm(models.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = OrderItemModel <NEW_LINE> exclude = () <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if 'instance' in kwargs: <NEW_LINE> <INDENT> kwargs.setdefault('initial', {}) <NEW_LINE> deliver_quantity...
This form handles an ordered item, but adds a number field to modify the number of items to deliver.
62598fb5009cb60464d01609