code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SetInstrument(): <NEW_LINE> <INDENT> def __init__(self, context, request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> rc = getToolByName(self.context, REFERENCE_CATALOG) <NEW_LINE> plone.protect.CheckAuthenticator(self.r...
The Instrument dropdown sets worksheet.Instrument immediately
62598ef038b623060ffa7873
class ProgressBar(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ProgressBar, self).__init__() <NEW_LINE> self.current = 0 <NEW_LINE> self.percent = 0 <NEW_LINE> self.total = 0 <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.current = 0 <NEW_LINE> self.total = 0 <NEW_LINE> <DED...
Affichage de l'avancée en %
62598ef0a8370b77170eebb9
class DatabaseView(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.View = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.View = params.get("View")
数据库视图信息
62598ef04428ac0f6e656d23
class RenaultHub: <NEW_LINE> <INDENT> def __init__(self, hass: HomeAssistant, locale: str) -> None: <NEW_LINE> <INDENT> self._hass = hass <NEW_LINE> self._client = RenaultClient( websession=async_get_clientsession(self._hass), locale=locale ) <NEW_LINE> self._account: RenaultAccount | None = None <NEW_LINE> self._vehic...
Handle account communication with Renault servers.
62598ef056ac1b37e63009c1
class Plugin(Source): <NEW_LINE> <INDENT> def __init__(self, name, search, username="", token=""): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.search = search <NEW_LINE> if username and token: <NEW_LINE> <INDENT> self.auth = (username, token) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.auth = None <NEW_...
Github Source Plugin
62598ef0d58c6744b42db6a0
class StructuralSectionCParallelFlange(StructuralSectionHotRolled,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseUnmanagedResources(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __enter__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDE...
Defines parameters for C-channel Parallel Flange structural section. StructuralSectionCParallelFlange(width: float,height: float,flangeThickness: float,webThickness: float,webFillet: float,centroidHorizontal: float,centroidVertical: float,principalAxesAngle: float,sectionArea: float,perimeter: float,nominalWeight: f...
62598ef066673b3332c2eb7f
class LxcSession(ShellSession): <NEW_LINE> <INDENT> name = "LxcSession" <NEW_LINE> def finalise(self): <NEW_LINE> <INDENT> self.disconnect("closing") <NEW_LINE> super(LxcSession, self).finalise() <NEW_LINE> <DEDENT> def disconnect(self, reason=''): <NEW_LINE> <INDENT> self.sendline('exit', disconnecting=True) <NEW_LINE...
Extends a ShellSession to include the ability to disconnect and finalise cleanly.
62598ef04e4d562566370bea
@tf_export('profiler.experimental.Trace', v1=[]) <NEW_LINE> class Trace(object): <NEW_LINE> <INDENT> def __init__(self, name, **kwargs): <NEW_LINE> <INDENT> if enabled: <NEW_LINE> <INDENT> self._traceme = _pywrap_traceme.TraceMe(name, **kwargs) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._traceme = None <NEW_LIN...
Context manager that generates a trace event in the profiler. A trace event will start when entering the context, and stop and save the result to the profiler when exiting the context. Open TensorBoard Profile tab and choose trace viewer to view the trace event in the timeline. Trace events are created only when the ...
62598ef0cc0a2c11144797db
@dataclass <NEW_LINE> class AccessTokenInfo: <NEW_LINE> <INDENT> header: dict <NEW_LINE> body: dict <NEW_LINE> signature: str <NEW_LINE> verification: Optional[dict] <NEW_LINE> def __init__(self, complete_decode, verification=Optional[dict]): <NEW_LINE> <INDENT> self.header = complete_decode.get("header", {}) <NEW_LINE...
Infos from a JWT access token
62598ef0627d3e7fe0e05660
class JointModel(Model): <NEW_LINE> <INDENT> class Config(ConfigBase): <NEW_LINE> <INDENT> representation: Union[ BiLSTMDocSlotAttention.Config, JointCNNRepresentation.Config ] = BiLSTMDocSlotAttention.Config() <NEW_LINE> output_layer: IntentSlotOutputLayer.Config = (IntentSlotOutputLayer.Config()) <NEW_LINE> decoder: ...
A joint intent-slot model. This is framed as a model to do document classification model and word tagging tasks where the embedding and text representation layers are shared for both tasks. The supported representation layers are based on bidirectional LSTM or CNN. It can be instantiated just like any other :class:`~...
62598ef07047854f4633dba7
class outputFileType(Enum): <NEW_LINE> <INDENT> _ascii = 1 <NEW_LINE> _binary = 2
Flag for type of output file entered
62598ef0bd1bec0571e144b5
class MessagePackDocument(HierDictDocument): <NEW_LINE> <INDENT> mime_type = 'application/x-msgpack' <NEW_LINE> type = set(HierDictDocument.type) <NEW_LINE> type.add('msgpack') <NEW_LINE> _decimal_as_string = True <NEW_LINE> _huge_numbers_as_string = True <NEW_LINE> def __init__(self, app=None, validator=None, mime_typ...
An integration class for the msgpack protocol.
62598ef0a05bb46b38489047
class PermutationInStringImplTwoPointersSimplify(PermutationInString): <NEW_LINE> <INDENT> def check_inclusion(self, s1, s2): <NEW_LINE> <INDENT> if not s1 or (not s2) or len(s1) > len(s2): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> window = defaultdict(int) <NEW_LINE> for c in s1: <NEW_LINE> <INDENT> window[...
这个题能简化的关键在于只有26个lower letters. 这个解法要背下来,稍更多的空间,但是写起来不容易错 用defaultdict无理由地只要动左指针就+, 只要动右指针就减 来自这个java答案 https://leetcode.com/problems/permutation-in-string/discuss/102642/Java-Solution-Two-pointers
62598ef0097d151d1a2bf7f5
class MediaBaseElement(atom.AtomBase): <NEW_LINE> <INDENT> _tag = '' <NEW_LINE> _namespace = MEDIA_NAMESPACE <NEW_LINE> _children = atom.AtomBase._children.copy() <NEW_LINE> _attributes = atom.AtomBase._attributes.copy() <NEW_LINE> def __init__(self, name=None, extension_elements=None, extension_attributes=None, text=N...
Base class for elements in the MEDIA_NAMESPACE. To add new elements, you only need to add the element tag name to self._tag
62598ef07d847024c075aba4
class ReflectionRealMeasurement(ReflectionMeasurement): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.angles = [] <NEW_LINE> self.detector_num = 0 <NEW_LINE> self.wavelength = 0 <NEW_LINE> self.distance = 0 <NEW_LINE> self.integrated = 0 <NEW_LINE> self.sigI = 1.0 <NEW_LINE> self.peak_width = 0 <NEW_...
Class holds info about a real peak measurement (loaded from an peaks or integrate file produced by ISAW).
62598ef056b00c62f0fb10a9
class IndexProcessor(Processor): <NEW_LINE> <INDENT> def __init__(self, ohlc_loc=None, metadata_loc=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.ohlc_location = ohlc_loc <NEW_LINE> self.metadata_json = read_json(metadata_loc) <NEW_LINE> self.metadata_loc = metadata_loc <NEW_LINE> self.proc_metadata_loc...
Derived class to represent a Index Processor ... Attributes ---------- ohlc_location : str Location of OHLC Cleaned data metadata_loc : str Location of Cleaned Metadata metadata_json: list[dict] JSON containing metadata of all the stocks proc_metadata_loc: str Location of Processed metadata to be stor...
62598ef0283ffb24f3cf2088
class PythonCompiledGenerator: <NEW_LINE> <INDENT> def __init__(self, code): <NEW_LINE> <INDENT> self.code = code
Internally used by the decompiler to represent a precompiled generator object.
62598ef0be8e80087fbbd827
class TableData: <NEW_LINE> <INDENT> def __init__(self, models_names: Tuple[str], headings: Tuple[str]): <NEW_LINE> <INDENT> self._models_names = models_names <NEW_LINE> self._headings = headings <NEW_LINE> self.__start_date = datetime.date(2012, 1, 1) <NEW_LINE> self.__end_date = datetime.date.today() <NEW_LINE> <DEDE...
Class for generating random data of table.
62598ef057b8e32f525074ef
class SignatureTemplateFieldsResult: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'templateId': 'str', 'fields': 'list[SignatureTemplateFieldInfo]' } <NEW_LINE> self.templateId = None <NEW_LINE> self.fields = None
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ef04f88993c371ef8d4
class SymbolTable(object): <NEW_LINE> <INDENT> def __init__(self, error, debug=False): <NEW_LINE> <INDENT> self.error = error <NEW_LINE> self.debug = debug <NEW_LINE> self.scopes = [] <NEW_LINE> <DEDENT> def begin_scope(self, tag): <NEW_LINE> <INDENT> self.scopes.append((tag, {})) <NEW_LINE> debug(self.debug, "New scop...
Symbol table. 'scopes' maintains a list of tables, one for each scope.
62598ef038b623060ffa7875
class A4Size: <NEW_LINE> <INDENT> w = 210 <NEW_LINE> h = 297
A4 paper size
62598ef03317a56b869bd951
class Movie(): <NEW_LINE> <INDENT> VALID_RATINGS = ["G", "PG", "PG-13", "R"] <NEW_LINE> def __init__(self, movie_title, movie_storyline, poster_image, trailer_youtube): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.storyline = movie_storyline <NEW_LINE> self.poster_image_url = poster_image <NEW_LINE> sel...
THIS CLASS PROVIDES A WAY TO STORE MOVIE RELATED INFORMATION
62598ef0cb5e8a47e493b564
class RegistroJ051(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'J051'), Campo(2, 'COD_CCUS'), Campo(3, 'COD_CTA_REF'), ]
Plano de Contas Referencial
62598ef044b2445a339b5d57
class CloseInstance(RestAction): <NEW_LINE> <INDENT> def RegisterFlags(self): <NEW_LINE> <INDENT> self.flags.AddString( name='instance', help='Name of the Kiji instance whose connection to close.', ) <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> assert (len(args) == 0), ('Unexpected arguments: %r' % args...
Close all REST connections to a Kiji instance.
62598ef04527f215b58e86d5
class SAPCARInvalidFileException(Exception): <NEW_LINE> <INDENT> pass
Exception to denote an invalid SAP CAR file
62598ef07d43ff24874267e7
class War_Game(BJ_Game): <NEW_LINE> <INDENT> def play(self): <NEW_LINE> <INDENT> if len(self.deck.cards) < 52: <NEW_LINE> <INDENT> self.deck.populate() <NEW_LINE> self.deck.shuffle() <NEW_LINE> <DEDENT> self.deck.deal(self.players + [self.dealer],per_hand = 1) <NEW_LINE> winner = [] <NEW_LINE> print(self.dealer) <NEW_L...
A War Game
62598ef03539df3088ecaa8a
class MelCloudDevice: <NEW_LINE> <INDENT> def __init__(self, device: Device): <NEW_LINE> <INDENT> self.device = device <NEW_LINE> self.name = device.name <NEW_LINE> self._available = True <NEW_LINE> <DEDENT> @Throttle(MIN_TIME_BETWEEN_UPDATES) <NEW_LINE> async def async_update(self, **kwargs): <NEW_LINE> <INDENT> try: ...
MELCloud Device instance.
62598ef0442bda511e95ac3a
class AgentNodeLiveConfigurations(Collection): <NEW_LINE> <INDENT> def __init__(self, client, location): <NEW_LINE> <INDENT> super(AgentNodeLiveConfigurations, self).__init__(client, location, 'node-live-configurations', AgentNodeLiveConfiguration)
Used to enumerate a agent node instance's live configuration :ivar `vas.shared.Security.Security` security: The resource's security
62598ef04e4d562566370bec
class Settings(Gio.Settings): <NEW_LINE> <INDENT> instance = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> Gio.Settings.__init__(self) <NEW_LINE> <DEDENT> def new(): <NEW_LINE> <INDENT> gsettings = Gio.Settings.new("com.github.bilelmoussaoui.AudioCutter") <NEW_LINE> gsettings.__class__ = Settings <NEW_LINE> r...
Gio.Settings handler.
62598ef0091ae356687033f0
@attr.s <NEW_LINE> class DataModel(object): <NEW_LINE> <INDENT> version = "1.0.0" <NEW_LINE> @classmethod <NEW_LINE> def from_dict(cls, **config): <NEW_LINE> <INDENT> return cls(**config) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_json(cls, file_path): <NEW_LINE> <INDENT> with file_path.open("r") as f: <NEW_L...
The interface of a data abstraction class.
62598ef032920d7e50bc4804
class TestBilling(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 testBilling(self): <NEW_LINE> <INDENT> pass
Billing unit test stubs
62598ef0e5267d203ee6a0e0
class CTxOut(ImmutableSerializable): <NEW_LINE> <INDENT> __slots__ = ['nValue', 'scriptPubKey'] <NEW_LINE> def __init__(self, nValue=-1, scriptPubKey=script.CScript()): <NEW_LINE> <INDENT> object.__setattr__(self, 'nValue', int(nValue)) <NEW_LINE> object.__setattr__(self, 'scriptPubKey', scriptPubKey) <NEW_LINE> <DEDEN...
An output of a transaction Contains the public key that the next input must be able to sign with to claim it.
62598ef023849d37ff84f891
class ProtobufAnalysisReportSerializer(interface.AnalysisReportSerializer): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def ReadSerializedObject(cls, proto): <NEW_LINE> <INDENT> analysis_report = event.AnalysisReport() <NEW_LINE> for proto_attribute, value in proto.ListFields(): <NEW_LINE> <INDENT> if proto_attribute.n...
Class that implements the protobuf analysis report serializer.
62598ef0f548e778e5969d63
class Distribution(Model): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> components = list() <NEW_LINE> for values in kw.get('components', {}): <NEW_LINE> <INDENT> cmpt = Component( dist=self, **values) <NEW_LINE> if values['name'] in components: <NEW_LINE> <INDENT> raise ValueError('Multiple compon...
A distribution - typically in pulp sense a repo
62598ef0be7bc26dc925124e
@inherit_doc <NEW_LINE> class RegressionEvaluator(JavaEvaluator, HasLabelCol, HasPredictionCol): <NEW_LINE> <INDENT> metricName = Param(Params._dummy(), "metricName", "metric name in evaluation (mse|rmse|r2|mae)") <NEW_LINE> @keyword_only <NEW_LINE> def __init__(self, predictionCol="prediction", labelCol="label", metri...
Evaluator for Regression, which expects two input columns: prediction and label. >>> scoreAndLabels = [(-28.98343821, -27.0), (20.21491975, 21.5), ... (-25.98418959, -22.0), (30.69731842, 33.0), (74.69283752, 71.0)] >>> dataset = sqlContext.createDataFrame(scoreAndLabels, ["raw", "label"]) ... >>> evaluator = Regres...
62598ef030dc7b766599e061
class LastThreeDays: <NEW_LINE> <INDENT> def __init__(self, rows, now): <NEW_LINE> <INDENT> print('recreating last three days') <NEW_LINE> self.y_max = None <NEW_LINE> self.now = now <NEW_LINE> self.rows = rows <NEW_LINE> self.rebuild_last_three() <NEW_LINE> <DEDENT> def rebuild_last_three(self): <NEW_LINE> <INDENT> al...
recreate last three days plot
62598ef03539df3088ecaa8b
class Permission(SubEntity): <NEW_LINE> <INDENT> collection = 'permissions' <NEW_LINE> resource = 'permission' <NEW_LINE> _relations = { } <NEW_LINE> _pull = { '_type': None, 'advertiser': None, 'agency': None, 'organization': None, 'edit_data_definition': int, 'view_data_definition': int, 'edit_segments': int, 'edit_c...
docstring for Permission.
62598ef08da39b475be01985
class KwapiClient(object): <NEW_LINE> <INDENT> def __init__(self, conf, url, token=None): <NEW_LINE> <INDENT> self.conf = conf <NEW_LINE> self.url = url <NEW_LINE> self.token = token <NEW_LINE> <DEDENT> def iter_probes(self): <NEW_LINE> <INDENT> probes_url = self.url + '/probes/' <NEW_LINE> headers = {} <NEW_LINE> if s...
Kwapi API client.
62598ef099fddb7c1ca621f0
class Output(Stmt): <NEW_LINE> <INDENT> fields = ('nodes',)
A node that holds multiple expressions which are then printed out. This is used both for the `print` statement and the regular template data.
62598ef03d592f4c4edb96c4
class RandomMapper: <NEW_LINE> <INDENT> def map_one(self, input_wh, colcoord, radius): <NEW_LINE> <INDENT> indices = [] <NEW_LINE> i = 0 <NEW_LINE> while i < radius*radius: <NEW_LINE> <INDENT> indices.append((randrange(0,input_wh[0]), randrange(0,input_wh[1]))) <NEW_LINE> i = i + 1 <NEW_LINE> <DEDENT> return indices <N...
Класс случайного маппера
62598ef056b00c62f0fb10ab
class UploadCommand(Command): <NEW_LINE> <INDENT> description = "Build and publish the package." <NEW_LINE> user_options = [] <NEW_LINE> @staticmethod <NEW_LINE> def status(s): <NEW_LINE> <INDENT> print("\033[1m{0}\033[0m".format(s)) <NEW_LINE> <DEDENT> def initialize_options(self): <NEW_LINE> <INDENT> self.install_dir...
Support setup.py upload.
62598ef076e4537e8c3edd8d
class DDQN(DQN): <NEW_LINE> <INDENT> def __init__(self, state_size, action_size): <NEW_LINE> <INDENT> print(self) <NEW_LINE> super(DDQN, self).__init__(state_size, action_size) <NEW_LINE> self.target_model = self._build_model_linear() <NEW_LINE> self.model = self._build_model_linear() <NEW_LINE> <DEDENT> def update_tar...
DDQN class based on DQN base class above
62598ef05fcc89381b265514
class Consumer(db.Model, BaseModel): <NEW_LINE> <INDENT> __tablename__ = "consumer" <NEW_LINE> id = db.Column(db.BigInteger, primary_key=True) <NEW_LINE> phone = db.Column(db.VARCHAR(20), db.ForeignKey("members.phone"), nullable=False, comment="会员手机号") <NEW_LINE> product_code = db.Column(db.VARCHAR(20), db.ForeignKey("...
会员消费记录
62598ef063d6d428bbee0fa6
class Location(BaseModel): <NEW_LINE> <INDENT> name = models.CharField(max_length=16, blank=False, null=False, unique=True)
Class representing the different locations that Bodega supports.
62598ef03317a56b869bd952
class SkusOperations(object): <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config <NEW_LINE> <DEDENT> @...
SkusOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.storage.v2019_06_01.models :param client: C...
62598ef0a8370b77170eebbc
class _lazy_use_expand: <NEW_LINE> <INDENT> def __init__( self, settings, unfiltered_use, use, usemask, iuse_effective, use_expand_split, use_expand_dict, ): <NEW_LINE> <INDENT> self._settings = settings <NEW_LINE> self._unfiltered_use = unfiltered_use <NEW_LINE> self._use = use <NEW_LINE> self._usemask = usemask <NEW_...
Lazily evaluate USE_EXPAND variables since they are only needed when an ebuild shell is spawned. Variables values are made consistent with the previously calculated USE settings.
62598ef0435de62698e9a5a9
class LinearCCDSensor: <NEW_LINE> <INDENT> def __init__(self, n, pixel_w_um, pixel_h_um, horizontal_spacing_um): <NEW_LINE> <INDENT> self.N = n <NEW_LINE> self.pixel_w_um = pixel_w_um <NEW_LINE> self.pixel_h_um = pixel_h_um <NEW_LINE> self.horizontal_spacing_um = horizontal_spacing_um <NEW_LINE> self.dx = pixel_w_um + ...
w h [][][][][][][][][][][][][]
62598ef0adb09d7d5dc08da2
class DateWidget(object): <NEW_LINE> <INDENT> def __init__(self, str_, dt_=date.today() - timedelta(days=1)): <NEW_LINE> <INDENT> defsize = 80 <NEW_LINE> curryear = dt_.year <NEW_LINE> pastyear = 2010 <NEW_LINE> yaerlist = list(range(pastyear, curryear + 1)) <NEW_LINE> yaerlist.reverse() <NEW_LINE> yearlist = list(map(...
DateWidget - 日付Widgetクラス[Date widget class]
62598ef0090684286d592acf
class PropertyState(TurtleState): <NEW_LINE> <INDENT> getpos = (lambda self: self._pos) <NEW_LINE> setpos = (lambda self, v: setattr(self, '_pos', vec(*v))) <NEW_LINE> pos = getsetter('pos') <NEW_LINE> getheading = (lambda self: self._heading) <NEW_LINE> setheading = (lambda self, v: setattr(self, '_heading', v)) <NEW_...
A Turtle state in which all attributes are properties that expose a getter/setter interface. This state class is used by the Tk implementation.
62598ef0d58c6744b42db6a2
class Dice(BotPlugin): <NEW_LINE> <INDENT> def activate(self): <NEW_LINE> <INDENT> super(Dice, self).activate() <NEW_LINE> <DEDENT> def deactivate(self): <NEW_LINE> <INDENT> super(Dice, self).deactivate() <NEW_LINE> <DEDENT> def get_configuration_template(self): <NEW_LINE> <INDENT> return {'EXAMPLE_KEY_1': "Example val...
throw a dice.
62598ef099cbb53fe682f687
class Broadcast(Address): <NEW_LINE> <INDENT> @property <NEW_LINE> def addrbyte(self): <NEW_LINE> <INDENT> return 0xfe <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_byte(cls,a): <NEW_LINE> <INDENT> if a==0xfe or a==0xff: return cls() <NEW_LINE> <DEDENT> def __eq__(self,other): <NEW_LINE> <INDENT> return isinstan...
All control gear connected to the network.
62598ef0009cb60464cffd28
class NumericTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def assertArraysClose(self, a, b, rtol=1e-05, atol=1e-08): <NEW_LINE> <INDENT> if not a.shape == b.shape: <NEW_LINE> <INDENT> msg = "The two arrays don't even have the same shape!\n" <NEW_LINE> msg += "The first array has {} shape.\n".format(a.shape) <NEW_LI...
Test case with assertions for numeric computing.
62598ef0a79ad161977687f9
class ethertype_entry(flow_entry): <NEW_LINE> <INDENT> def __init__(self, ethertype, action=flow_entry.NONE, priority = ofutil.PRIORITY['DEFAULT'], idle_timeout = DEFAULT_TIMEOUT, hard_timeout = pyof.OFP_FLOW_PERMANENT): <NEW_LINE> <INDENT> flow_entry.__init__(self, action) <NEW_LINE> self.match.wildcards = pyof.OFPFW_...
Flow entry that is based Ethertype @author ykk @date Feb 2011
62598ef067a9b606de5447a8
class Oper(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "oper" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.cpu_usage = [] <NEW_LINE> self.number_of_cpu = "" <NEW_LINE> self.current_time = "" <NEW_LINE> for keys, value in kwargs.ite...
This class does not support CRUD Operations please use parent. :param cpu_usage: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"cpu-id": {"type": "number", "format": "number"}, "30-sec": {"type": "number", "format": "number"}, "optional": true, "60-sec": {...
62598ef04e4d562566370bee
class VtOrderData(VtBaseData): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(VtOrderData, self).__init__() <NEW_LINE> self.symbol = EMPTY_STRING <NEW_LINE> self.exchange = EMPTY_STRING <NEW_LINE> self.name = EMPTY_STRING <NEW_LINE> self.orderID = EMPTY_STRING <NEW_LINE> self.vtOrderID = EMPTY_STRING...
订单数据类
62598ef03d592f4c4edb96c5
class ResizingCanvas(Canvas): <NEW_LINE> <INDENT> def __init__(self, parent, **kwargs): <NEW_LINE> <INDENT> Canvas.__init__(self, parent, **kwargs) <NEW_LINE> self.bind("<Configure>", self.on_resize) <NEW_LINE> self.height = self.winfo_reqheight() <NEW_LINE> self.width = self.winfo_reqwidth() <NEW_LINE> <DEDENT> def on...
a subclass of Canvas for dealing with resizing of windows http://stackoverflow.com/questions/22835289/how-to-get-tkinter-canvas-to-dynamically-resize-to-window-width
62598ef055399d3f05624cff
class MeasurementVariable(models.Model): <NEW_LINE> <INDENT> variable_name = models.CharField(max_length=50) <NEW_LINE> measurement_type = models.ForeignKey(Measurement, on_delete=models.CASCADE) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "{}".format(self.variable_name)
A MeasurementVariable is a specific variable name used to reference the MeasurementDataset in the MeasurementFile
62598ef0f548e778e5969d65
class TableInfoNew(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TableName = None <NEW_LINE> self.TableInstanceId = None <NEW_LINE> self.TableType = None <NEW_LINE> self.TableIdlType = None <NEW_LINE> self.ClusterId = None <NEW_LINE> self.ClusterName = None <NEW_LINE> self.TableGroupI...
Table details
62598ef030dc7b766599e063
class CCXTHistoricPriceHandler(AbstractBarPriceHandler, HistoricPriceHandler): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> async def create(cls, tickers, exchange, events_queue, timeframe='1m', start_date=None, end_date=None): <NEW_LINE> <INDENT> self = CCXTHistoricPriceHandler() <NEW_LINE> self.tickers = tickers <NEW_...
CCXTHistoricKlinesPriceHandler is designed to fetch historic price then produce a dataframe of cryptocurrency exchange Open-High-Low-Close-Volume (OHLCV) data for each requested financial instrument and stream those to the provided events queue as bar events. Attributes: tickers (List): tickers e.g. ['BTC/USDT'] ...
62598ef0bd1bec0571e144b7
class RequestAPIException(Exception): <NEW_LINE> <INDENT> pass
Exception class for any exceptions thrown by the RequestApi
62598ef016aa5153ce3fecd9
class DeviceBaseChannel(FunctionalChannel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.unreach = None <NEW_LINE> self.lowBat = None <NEW_LINE> self.routerModuleSupported = False <NEW_LINE> self.routerModuleEnabled = False <NEW_LINE> self.rssiDeviceValue = 0 <NEW_LINE>...
this is the representive of the DEVICE_BASE channel
62598ef0aad79263cf42cfe6
class Net(nn.Module): <NEW_LINE> <INDENT> def __init__(self, obs_size, act_size, hid_size=64): <NEW_LINE> <INDENT> super(Net, self).__init__() <NEW_LINE> self.mu = nn.Sequential( nn.Linear(obs_size, hid_size), nn.Tanh(), nn.Linear(hid_size, hid_size), nn.Tanh(), nn.Linear(hid_size, act_size), nn.Tanh(), ) <NEW_LINE> <D...
Return Policy network contains 3 layer obs_size * hidden_size hidden_size * hidden_size hidden_size * action_size The last layer is (dx, dy) which is the direction of agent should follow
62598ef08da39b475be01987
class SelectionSets(bpy.types.Panel): <NEW_LINE> <INDENT> bl_label = "Selection Sets" <NEW_LINE> bl_space_type = "VIEW_3D" <NEW_LINE> bl_region_type= "TOOLS" <NEW_LINE> bl_category = "Layers" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> sets = bpy.context.scene.selection_sets <NEW_LINE> layout = self.layout ...
A Custom Panel
62598ef07047854f4633dbac
class FileError(ChemError): <NEW_LINE> <INDENT> pass
Error when something illegal is done with files
62598ef032920d7e50bc4807
class RotateUserAgentMiddleware(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_crawler(cls, crawler): <NEW_LINE> <INDENT> return cls() <NEW_LINE> <DEDENT> async def process_request(self, request, spider): <NEW_LINE> <INDENT> if "http" not in request.url: <NEW_LINE> <INDENT> request.url = "http://" + requ...
:arg 随机请求头中间件
62598ef0236d856c2adc8803
@total_ordering <NEW_LINE> class Path(object): <NEW_LINE> <INDENT> def __init__(self, end, path_cost, parent = None): <NEW_LINE> <INDENT> self.end = end <NEW_LINE> self.path_cost = path_cost <NEW_LINE> self.parent = parent <NEW_LINE> self.id = next(c) <NEW_LINE> self.extracted_path = None <NEW_LINE> self.extracted_path...
Path represents a path through the search space
62598ef04a966d76dd5ed6b5
class AccountBackend(ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, child, parent): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> account = models.Account.objects.get_for_child(child) <NEW_LINE> <DEDENT> except models.Account.DoesNotExist: <NEW_LINE> <INDENT> params = {'child': child} <NEW_LINE> if parent.is_...
Base class for Account authentication backend. This allows multiple account sources to authenticate to a single user. Arguments: :child - a user object from any source :parent - the session user object (either authenticated or anonymous)
62598ef0283ffb24f3cf208c
class LanguageSchema(Schema): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> unknown = EXCLUDE <NEW_LINE> <DEDENT> id = SanitizedUnicode(required=True) <NEW_LINE> title = fields.Raw(dump_only=True) <NEW_LINE> description = fields.Raw(dump_only=True)
Language schema.
62598ef0dd821e528d6d7719
class UpdatePort(UpdateCommand): <NEW_LINE> <INDENT> resource = 'port' <NEW_LINE> log = logging.getLogger(__name__ + '.UpdatePort')
Update port's information Sample: update_port <port_id> --name=test --admin_state_up type=bool True
62598ef063b5f9789fe83937
class WizarWorld: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> print(self) <NEW_LINE> self.player_name = name <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return '\n\n\t---------Wizard World ---------' <NEW_LINE> <DEDENT> def make_character(self): <NEW_LINE> <INDENT> return Wizard(sel...
wizar world
62598ef0d486a94d0ba2a7a8
class ShowLldpInterfaceSchema(MetaParser): <NEW_LINE> <INDENT> schema = { 'interfaces': { Any(): { 'tx': str, 'rx': str, 'tx_state': str, 'rx_state': str, }, } }
Schema for show lldp interface [<WORD>]
62598ef01b99ca400228e8fb
class LMMaskPredictionHead(nn.Module): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.dense = nn.Linear(config.hidden_size, config.hidden_size) <NEW_LINE> self.transform_act_fn = ACT2FN[config.hidden_act] if isinstance(config.hidden_act, str) else config.hidd...
Replaced token prediction head
62598ef04a966d76dd5ed6b6
class Element(Node): <NEW_LINE> <INDENT> nodeType = Node.ELEMENT_NODE <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return '<%s element at 0x%s>' % (self.nodeName, id(self)) <NEW_LINE> <DEDENT> @property <NEW_LINE> def attributes(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self._dom_attributes <NEW_...
Element http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-745549614
62598ef04428ac0f6e656d28
class SpecialConstantCategory(Enum): <NEW_LINE> <INDENT> TBC_INFO = 1 <NEW_LINE> TCF_INFO = 2 <NEW_LINE> USER_DEFINED_REPORT = 3 <NEW_LINE> ALM_SETTING = 4 <NEW_LINE> REPORT_INFO = 5 <NEW_LINE> CONSTANT = 6
Enum zur Kategorisierung der speziellen Konstanten, welche in TEST-GUIDE separat angezeigt werden.
62598ef0adb09d7d5dc08da4
class cmake_build(Caffe2Command): <NEW_LINE> <INDENT> user_options = [ (str('jobs='), str('j'), str('Specifies the number of jobs to use with make or ninja')) ] <NEW_LINE> built = False <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> self.jobs = multiprocessing.cpu_count() <NEW_LINE> <DEDENT> def finalize_...
Compiles everything when `python setup.py build` is run using cmake. Custom args can be passed to cmake by specifying the `CMAKE_ARGS` environment variable. E.g. to build without cuda support run: `CMAKE_ARGS=-DUSE_CUDA=Off python setup.py build` The number of CPUs used by `make`/`ninja` can be specified by passi...
62598ef0cc40096d616195c6
class Encoder(tf.keras.Model): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Encoder, self).__init__() <NEW_LINE> self.feature_inceptionV3 = tf.keras.applications.ResNet50(include_top=False, weights='imagenet') <NEW_LINE> self.feature_conv = tf.keras.layers.Conv2D(16, (3, 3), padding='same', name='f...
编码器
62598ef0498bea3a75a5630d
class exp_blendmode_np(BlendMode): <NEW_LINE> <INDENT> default_channel_value = 165 <NEW_LINE> def __init__(self,scene): <NEW_LINE> <INDENT> self.scene = scene <NEW_LINE> self.last = module.timefunc() <NEW_LINE> <DEDENT> def frame(self,u, below, values, alphas, alpha): <NEW_LINE> <INDENT> return (((below**(values/100.0)...
Ads random variation, basically a random time varying gel
62598ef04527f215b58e86d9
class SubplotParams: <NEW_LINE> <INDENT> def __init__(self, left=None, bottom=None, right=None, top=None, wspace=None, hspace=None): <NEW_LINE> <INDENT> self.validate = True <NEW_LINE> self.update(left, bottom, right, top, wspace, hspace) <NEW_LINE> <DEDENT> def update(self,left=None, bottom=None, right=None, top=None,...
A class to hold the parameters for a subplot
62598ef0e5267d203ee6a0e3
class SSD(nn.Module): <NEW_LINE> <INDENT> def __init__(self, phase, size, Backbone, Neck, Head, cfg): <NEW_LINE> <INDENT> super(SSD, self).__init__() <NEW_LINE> self.phase = phase <NEW_LINE> self.cfg = cfg <NEW_LINE> self.priorbox = PriorBox(self.cfg) <NEW_LINE> self.priors = self.priorbox.forward() <NEW_LINE> self.siz...
Single Shot Multibox Architecture The network is composed of a base VGG network followed by the added multibox conv layers. Each multibox layer branches into 1) conv2d for class conf scores 2) conv2d for localization predictions 3) associated priorbox layer to produce default bounding boxes specific...
62598ef067a9b606de5447aa
class Platform(pg.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, sprite_sheet_data): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> sprite_sheet = SpriteSheet("png") <NEW_LINE> self.image = sprite_sheet.get_image(sprite_sheet_data[0], sprite_sheet_data[1], sprite_sheet_data[2], sprite_sheet_data[3]) <NEW_LIN...
this class creates stationary platforms that the user can move on
62598ef03d592f4c4edb96c7
class Active(State): <NEW_LINE> <INDENT> def on_event(self, event): <NEW_LINE> <INDENT> if event['command'] == 'open': <NEW_LINE> <INDENT> return open() <NEW_LINE> <DEDENT> elif event['command'] == 'close': <NEW_LINE> <INDENT> return close() <NEW_LINE> <DEDENT> elif event['command'] == 'stop': <NEW_LINE> <INDENT> retur...
The state which indicates the device is currently awake and active
62598ef0cc0a2c11144797e2
class MogamiPrefetchThread(MogamiDaemons): <NEW_LINE> <INDENT> def __init__(self, mogami_file): <NEW_LINE> <INDENT> MogamiDaemons.__init__(self) <NEW_LINE> self.mogami_file = mogami_file <NEW_LINE> self.p_channel = mogami_file.p_channel <NEW_LINE> MogamiLog.debug("** [prefetch thread] init OK") <NEW_LINE> <DEDENT> def ...
Class for the thread to recv data.
62598ef044b2445a339b5d59
class Operator(Techniques): <NEW_LINE> <INDENT> _Define = None <NEW_LINE> _Symbol = None <NEW_LINE> _OpList = list() <NEW_LINE> @staticmethod <NEW_LINE> def Action(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Precdc(self, Input): <NEW_LINE> <INDENT> for Op in self._OpList: <NEW_LINE> <INDENT...
Base Class of Operator
62598ef032920d7e50bc4808
class Sqs(NamedTuple): <NEW_LINE> <INDENT> bestsqs: Structure <NEW_LINE> objective_function: Union[float, str] <NEW_LINE> allsqs: List <NEW_LINE> directory: str
Return type for run_mcsqs.
62598ef023849d37ff84f895
class Populator(object): <NEW_LINE> <INDENT> def __init__(self, random): <NEW_LINE> <INDENT> self._random = random <NEW_LINE> <DEDENT> def _cycle(self, elements): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> for (weight, value) in elements: <NEW_LINE> <INDENT> for _ignore_i in range(weight): <NEW_LINE> <INDENT> ...
@ivar userPattern: A C{str} giving a formatting pattern to use to construct usernames. The string will be interpolated with a single integer, the incrementing counter of how many users have thus far been "used". @ivar passwordPattern: Similar to C{userPattern}, but for passwords.
62598ef02c8b7c6e89bd1f9d
class hour(xsc.Element): <NEW_LINE> <INDENT> xmlns = xmlns
Specifies an hour of the day. Should be an integer value between 0 and 23. See :class:`skipHours`.
62598ef030dc7b766599e065
class MultiShankProbe(Probe): <NEW_LINE> <INDENT> def get_SiteLoc(self, autochans=True): <NEW_LINE> <INDENT> sl = {} <NEW_LINE> for shanki, (shank, shankpos) in self.shanks.items(): <NEW_LINE> <INDENT> shanksl = shank.SiteLoc <NEW_LINE> nchans = len(shanksl) <NEW_LINE> for chan, coord in shanksl.items(): <NEW_LINE> <IN...
A collection of multiple Probes, with shanks at known locations relative to each other, stored in self.shanks. As for a normal Probe, self.SiteLoc maps probe chan id to spatial position (x, y) in um, while also taking into account shank location. Note that y coordinates designate depth from the top site, i.e. increasin...
62598ef0796e427e5384cf74
class Reference: <NEW_LINE> <INDENT> def __init__(self, word, synset_relations=dict()): <NEW_LINE> <INDENT> self.word = word <NEW_LINE> self.synset_relations = synset_relations <NEW_LINE> <DEDENT> def encode(self): <NEW_LINE> <INDENT> string = pickle.dumps((self.word, self.synset_relations), -1) <NEW_LINE> return base6...
A reference to a page that may be generated by page_word
62598ef0aad79263cf42cfe9
class ReplyModSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Reply <NEW_LINE> fields = ("id", "visible")
update
62598ef04f6381625f1988a9
class ResnetModel(model_lib.Model): <NEW_LINE> <INDENT> def __init__(self, model, layer_counts): <NEW_LINE> <INDENT> default_batch_sizes = { 'resnet50': 64, 'resnet101': 32, 'resnet152': 32, 'resnet50_v2': 64, 'resnet101_v2': 32, 'resnet152_v2': 32, } <NEW_LINE> batch_size = default_batch_sizes.get(model, 32) <NEW_LINE...
Resnet cnn network configuration.
62598ef0ff9c53063f518e3c
class BigMario(Mario, Shroom): <NEW_LINE> <INDENT> pass
Docstring for BigMario.
62598ef0d486a94d0ba2a7aa
class IronCrossPlayer(Player): <NEW_LINE> <INDENT> def __init__(self, bankroll=500): <NEW_LINE> <INDENT> super(IronCrossPlayer, self).__init__(bankroll) <NEW_LINE> <DEDENT> def strategy(self, table): <NEW_LINE> <INDENT> bet = self.bet <NEW_LINE> amount = table.minimum <NEW_LINE> if self.point is None: <NEW_LINE> <INDEN...
Iron Cross Player - Plays the field and places 5, 6, 8. Default : Takes all bets down after 5 hits
62598ef04f88993c371ef8d7
class Text(str): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_file(cls, filename, method='r'): <NEW_LINE> <INDENT> f = open(filename, method) <NEW_LINE> content = f.read() <NEW_LINE> f.close() <NEW_LINE> return cls(content) <NEW_LINE> <DEDENT> def split_by_line(self): <NEW_LINE> <INDENT> return self.split('\n')...
Extended str class, added few commonly usd function/source
62598ef038b623060ffa787b
class Bitmap(object): <NEW_LINE> <INDENT> def __init__(self, width, height, pixels=None): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.pixels = pixels or bytearray(width * height) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> rows = '' <NEW_LINE> for y in range(se...
A 2D bitmap image represented as a list of byte values. Each byte indicates the state of a single pixel in the bitmap. A value of 0 indicates that the pixel is `off` and any other value indicates that it is `on`.
62598ef0498bea3a75a56310
class ImageNetSegmentationTest(torch.utils.data.Dataset): <NEW_LINE> <INDENT> def __init__(self, images_path, transform=None): <NEW_LINE> <INDENT> self.transform = transform <NEW_LINE> self.images_dir = pathlib.Path(images_path) <NEW_LINE> set_data = self.images_dir.stem <NEW_LINE> self.images_list = pd.read_csv( os.pa...
ImageNet dataset for segmentation
62598ef010dbd63aa1c6f355
class z_w(object): <NEW_LINE> <INDENT> def __init__(self, h, hc, Np, s_w, Cs_w, zeta, Vtrans): <NEW_LINE> <INDENT> self.h = h <NEW_LINE> self.hc = hc <NEW_LINE> self.Np = Np <NEW_LINE> self.s_w = s_w <NEW_LINE> self.Cs_w = Cs_w <NEW_LINE> self.zeta = zeta <NEW_LINE> self.Vtrans = Vtrans <NEW_LINE> <DEDENT> def __getite...
return an object that can be indexed to return depths of w point z_w = z_w(h, hc, Np, s_w, Cs_w, zeta, Vtrans)
62598ef04e4d562566370bf2
@admin.register(models.User) <NEW_LINE> class CustomUserAdmin(UserAdmin): <NEW_LINE> <INDENT> inlines = (RoomInline,) <NEW_LINE> fieldsets = UserAdmin.fieldsets + ( ( "Custom Profile", { "fields": ( "avatar", "gender", "bio", "birthdate", "language", "currency", "superhost", ) }, ), ) <NEW_LINE> list_filter = UserAdmin...
Custom User Admin
62598ef03d592f4c4edb96c9
class Collection: <NEW_LINE> <INDENT> def __init__(self, resource_collection, name=""): <NEW_LINE> <INDENT> self.resource_collection = resource_collection <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def __set_name__(self, owner, name): <NEW_LINE> <INDENT> if not self.name: <NEW_LINE> <INDENT> self.name = name <NEW_...
Property to wrap an ResourceCollection. :param ResourceCollection resource_collection: the resource collection to wrap. :param str name: the name of the collection in the API (if not specified, the name of the attribute for the Collection is used).
62598ef0167d2b6e312b5777
class namespaces(object): <NEW_LINE> <INDENT> _names_version = 0 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._names = util.sortdict() <NEW_LINE> columns = templatekw.getlogcolumns() <NEW_LINE> bmknames = lambda repo: repo._bookmarks.keys() <NEW_LINE> bmknamemap = lambda repo, name: tolist(repo._bookmarks.ge...
provides an interface to register and operate on multiple namespaces. See the namespace class below for details on the namespace object.
62598ef07b180e01f3e48434
class lse(pcs.Packet): <NEW_LINE> <INDENT> _layout = pcs.Layout() <NEW_LINE> def __init__(self, bytes = None, timestamp = None, **kv): <NEW_LINE> <INDENT> label = pcs.Field("label", 20) <NEW_LINE> exp = pcs.Field("exp", 3) <NEW_LINE> s = pcs.Field("s", 1) <NEW_LINE> ttl = pcs.Field("ttl", 8) <NEW_LINE> pcs.Packet.__ini...
RFC 3032 MPLS label stack entry
62598ef060cbc95b06362b1d