code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Feed(Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> ext_url = db.Column(db.Unicode, unique=True) <NEW_LINE> errors = db.Column(db.Integer, default=0) <NEW_LINE> created_at = db.Column(db.DateTime, default=datetime.utcnow) <NEW_LINE> updated_at = db.Column(db.DateTime, default=... | A particular feed for a source,
from which articles can be collected. | 62598f8ab5575c28eb712a7f |
class Cat(Pet): <NEW_LINE> <INDENT> def make_voice(self): <NEW_LINE> <INDENT> print('%s: 喵...喵...喵...' % self._nickname) | 猫 | 62598f8aa05bb46b3848a3e8 |
class BankBranch(Base.Base,Serializer.Serializer): <NEW_LINE> <INDENT> branchId = None <NEW_LINE> __tablename__ = 'bankBranch' <NEW_LINE> __public__ = ['branchId', 'name', 'location', 'descrption','address'] <NEW_LINE> branchId = Column(Integer, Sequence('branch_id_seq'), primary_key=True) <NEW_LINE> name=Column(String... | classdocs | 62598f8a23e79379d538c06b |
class ActivitySearchEngineTest(APITestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.initial_price = 50000 <NEW_LINE> self.final_price = 100000 <NEW_LINE> <DEDENT> def test_filter_query_price_ranges(self): <NEW_LINE> <INDENT> query_params = { 'cost_start': self.initial_price, 'cost_end': settings.... | Class for testing the ActivitySearchEngine | 62598f8a15baa72349461aec |
class MergeColumn(sources.Column): <NEW_LINE> <INDENT> source = MergeSource <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._merge_all = None <NEW_LINE> self._merge_columns = [] <NEW_LINE> if len(args) == 1 and '.' not in args[0]: <NEW_LINE> <INDENT> self._merge_all = args[0] <NEW_LINE> <DEDENT... | Base class for merge report columns.
All merge columns take the same positional arguments to specify which
columns from sub-reports should be combined into this one merged column,
as follows.
If no column name is provided, it will be assumed to be the same as the
name of this merged report column on all sub-reports.
... | 62598f8a0fa83653e46f4a5c |
class CampaignManager(models.Manager): <NEW_LINE> <INDENT> def get_running_campaign(self): <NEW_LINE> <INDENT> kwargs = build_kwargs_runnning_campaign() <NEW_LINE> return Campaign.objects.filter(**kwargs) <NEW_LINE> <DEDENT> def get_expired_campaign(self): <NEW_LINE> <INDENT> kwargs = {} <NEW_LINE> kwargs['expirationda... | Campaign Manager | 62598f8abde94217f370741d |
class CodeBlockDirective(Directive): <NEW_LINE> <INDENT> has_content = True <NEW_LINE> required_arguments = 0 <NEW_LINE> optional_arguments = 1 <NEW_LINE> final_argument_whitespace = False <NEW_LINE> option_spec = { 'linenos': directives.flag, } <NEW_LINE> def run(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> lan... | Directive for a code block with special highlighting or line numbering
settings.
Unabashedly borrowed from the Sphinx source. | 62598f8a50485f2cf55daae2 |
class _GrpcTargetSystemProvider(TargetSystemProvider): <NEW_LINE> <INDENT> channel: Optional[grpc.Channel] <NEW_LINE> def __init__(self, server_address: str) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.channel = grpc.insecure_channel(server_address) <NEW_LINE> <DEDENT> def close_channel(self): <NEW_... | TargetSystemProvider implementation using the target_system_provider gRPC protocol
for forwarding of requests to a remote service. | 62598f8a8da39b475be02d56 |
class t(WordprocessingMLElement): <NEW_LINE> <INDENT> def checkSpace(self): <NEW_LINE> <INDENT> if self.text and self.text != self.text.strip(): <NEW_LINE> <INDENT> self.ensurePreserveSpace() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.ensureNoPreserveSpace() <NEW_LINE> <DEDENT> <DEDENT> def ensurePreserveSpace(... | This element specifies that this run contains literal text which shall be displayed in the document.
The t element shall be used for all text runs which is not: Part of a region of text that is contained
in a deleted region using the del element; Part of a region of text that is contained within a field code
Parent el... | 62598f8a7cff6e4e811b557f |
class MultSpinner(QHBoxLayout): <NEW_LINE> <INDENT> def __init__(self, label, multiplier): <NEW_LINE> <INDENT> QHBoxLayout.__init__(self) <NEW_LINE> self._multiplier = multiplier <NEW_LINE> self.addWidget(QLabel(label)) <NEW_LINE> self._spinner = QSpinBox() <NEW_LINE> self.addWidget(self._spinner) <NEW_LINE> <DEDENT> d... | An HBox with a label and a numeric spinner control whose value is
multiplied by <multiplier> | 62598f8a23849d37ff850c2c |
class Robot: <NEW_LINE> <INDENT> def __init__(self, n_joints, j_max, a_max, v_max): <NEW_LINE> <INDENT> if n_joints <= 0: <NEW_LINE> <INDENT> raise ValueError("Robot number of joints should be greater than zero") <NEW_LINE> <DEDENT> if j_max <= 0: <NEW_LINE> <INDENT> raise ValueError("Robot jerk limit should be greater... | define a robot with certain kinematic limits to be used when constructing a trajectory profile | 62598f8ad7e4931a7ef3bc0a |
class Pathway(Base): <NEW_LINE> <INDENT> __tablename__ = NETWORK_TABLE_NAME <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(255), nullable=False, index=True, doc='Pathway name') <NEW_LINE> resource_name = Column(String(255), nullable=False, index=True, doc='Database of origin') <NEW_LI... | Represents a pathway network in BEL format harmonized by ComPath | 62598f8acad5886f8bdc4e42 |
class ShowIpv6VrfAllInterfaceSchema(MetaParser): <NEW_LINE> <INDENT> schema = { Any(): {'oper_status': str, 'int_status': str, 'vrf': str, 'vrf_id': str, 'enabled': bool, 'ipv6_enabled': bool, Optional('ipv6'): {Any(): {Optional('ipv6'): str, Optional('ipv6_prefix_length'): str, Optional('ipv6_status'): str, Optional('... | Schema for show ipv6 vrf all interface | 62598f8a7b25080760ed7018 |
class StatusValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> ROLLOUT_STATUS_UNSPECIFIED = 0 <NEW_LINE> IN_PROGRESS = 1 <NEW_LINE> SUCCESS = 2 <NEW_LINE> CANCELLED = 3 <NEW_LINE> FAILED = 4 <NEW_LINE> PENDING = 5 <NEW_LINE> FAILED_ROLLED_BACK = 6 | The status of this rollout. Readonly. In case of a failed rollout,
the system will automatically rollback to the current Rollout version.
Readonly.
Values:
ROLLOUT_STATUS_UNSPECIFIED: No status specified.
IN_PROGRESS: The Rollout is in progress.
SUCCESS: The Rollout has completed successfully.
CANCELLED: The R... | 62598f8ae64d504609df9169 |
class FlowRef(FlowBase): <NEW_LINE> <INDENT> def Get(self): <NEW_LINE> <INDENT> args = api_pb2.ApiGetFlowArgs( client_id=self.client_id, flow_id=self.flow_id) <NEW_LINE> data = self._context.SendRequest("GetFlow", args) <NEW_LINE> return Flow(data=data, context=self._context) | Ref to a flow. | 62598f8a6e29344779b001c3 |
class StyleGuide: <NEW_LINE> <INDENT> def __init__( self, options: argparse.Namespace, formatter: base_formatter.BaseFormatter, stats: statistics.Statistics, filename: Optional[str] = None, decider: Optional[DecisionEngine] = None, ): <NEW_LINE> <INDENT> self.options = options <NEW_LINE> self.formatter = formatter <NEW... | Manage a Flake8 user's style guide. | 62598f8a462c4b4f79dbb571 |
class Tag(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=200, primary_key=True) <NEW_LINE> reviews = models.ManyToManyField(Review, null=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ['name'] <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return self.name | Model for a user's tag for a course. | 62598f8af7d966606f747b4d |
class RangeInput(Input): <NEW_LINE> <INDENT> input_type = "range" <NEW_LINE> def __init__(self, step=None): <NEW_LINE> <INDENT> self.step = step <NEW_LINE> <DEDENT> def __call__(self, field, **kwargs): <NEW_LINE> <INDENT> if self.step is not None: <NEW_LINE> <INDENT> kwargs.setdefault("step", self.step) <NEW_LINE> <DED... | Renders an input with type "range". | 62598f8aa05bb46b3848a3e9 |
class AttackInstance: <NEW_LINE> <INDENT> def __init__(self, packet_list = []): <NEW_LINE> <INDENT> self.packetList = packet_list | This class contains the data for a single attack within a larger event.
Arguments:
packet_list - a list of AttackPacket objects | 62598f8a15baa72349461aee |
class Head(Element): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> open_tag = "<head>" <NEW_LINE> close_tag = "</head>" <NEW_LINE> Element.__init__(self, open_tag, close_tag) | Head subclass of Element. Changes tags to 'head' tags. | 62598f8ad4950a0f3b110bed |
class DummyPublisher(Publisher): <NEW_LINE> <INDENT> async def publish( self, since: Optional[datetime] = None, force: bool = False, ) -> None: <NEW_LINE> <INDENT> pass | A dummy publisher. | 62598f8a50485f2cf55daae4 |
class UpsampleConvLayer(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, upsample=None): <NEW_LINE> <INDENT> super(UpsampleConvLayer, self).__init__() <NEW_LINE> self.upsample = upsample <NEW_LINE> reflection_padding = kernel_size // 2 <NEW_LINE> self.reflection_pad... | UpsampleConvLayer
Upsamples the input and then does a convolution. This method gives better results
compared to ConvTranspose2d.
ref: http://distill.pub/2016/deconv-checkerboard/ | 62598f8aa4f1c619b294e156 |
class RunParams: <NEW_LINE> <INDENT> SOURCE = 'source' <NEW_LINE> SOURCE_SEP = 'separator' <NEW_LINE> SOURCE_ATTRS = 'str_attrs' <NEW_LINE> NFL = 'attrs_first_line' <NEW_LINE> TARGET = 'source' <NEW_LINE> TARGET_SEP = 'separator' <NEW_LINE> TARGET_OBJECTS = 'str_objects' <NEW_LINE> RELATION_NAME = 'relation_name' <NEW_... | Parameters which are used for runing app | 62598f8a7cff6e4e811b5581 |
class IsInDiaryValue(Inf_IsInDiaryValue): <NEW_LINE> <INDENT> def __init__(self, argument): <NEW_LINE> <INDENT> super().__init__(argument) <NEW_LINE> self._namespace = "http://www.knora.org/ontology/kuno-raeber" <NEW_LINE> self._name = "isInDiaryValue" | Relating a diary entry by Kuno Raeber to a reification statement of the relation between the diary entry and the diary it is in. | 62598f8ad6c5a102081e1cb1 |
class ROSListener(Thread): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> Thread.__init__(self) <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> rospy.ready(self.name, anonymous=True) <NEW_LINE> rospy.spin() | Creates a thread that handles ros communications. | 62598f8a76d4e153a661c785 |
class ElectricDipole(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._x = None <NEW_LINE> self._y = None <NEW_LINE> self._z = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def x(self): <NEW_LINE> <INDENT> return self._x <NEW_LINE> <DEDENT> @x.setter <NEW_LINE> def x(self,value): <NEW_LINE> <IN... | An ElectricDipole object contains the x, y, and z electric dipole
components
Attributes:
x: x component of the electric dipole
y: y component of the electric dipole
z: z component of the electric dipole | 62598f8a26068e7796d4c4cd |
class HParams(object): <NEW_LINE> <INDENT> def __init__(self, **init_hparams): <NEW_LINE> <INDENT> object.__setattr__(self, 'keyvals', init_hparams) <NEW_LINE> <DEDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> return self.keyvals.get(key) <NEW_LINE> <DEDENT> def __setattr__(self, key, value): <NEW_LINE> <INDENT>... | Creates an object for passing around hyperparameter values.
Use the parse method to overwrite the default hyperparameters with values
passed in as a string representation of a Python dictionary mapping
hyperparameters to values.
Ex.
hparams = tf_lib.HParams(batch_size=128, hidden_size=256)
hparams.parse('{"hidden_size... | 62598f8a925a0f43d25e7ba5 |
class Cfg(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "name" <NEW_LINE> self.sid = "sid" <NEW_LINE> self.user = "user" <NEW_LINE> self.japd = None <NEW_LINE> self.serv_os = "Linux" <NEW_LINE> self.host = "hostname" <NEW_LINE> self.port = 3306 <NEW_LINE> self.cfg_file = "cfg_file" <N... | Class: Cfg
Description: Stub holder for configuration file.
Methods:
__init__ -> Class initialization. | 62598f8a9b70327d1c57e90d |
class Transition(object): <NEW_LINE> <INDENT> LEFT_ARC = 'LEFTARC' <NEW_LINE> RIGHT_ARC = 'RIGHTARC' <NEW_LINE> SHIFT = 'SHIFT' <NEW_LINE> REDUCE = 'REDUCE' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> raise ValueError('Do not construct this object!') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def left_arc(conf... | This class defines a set of transitions which are applied to a
configuration to get the next configuration. | 62598f8a91af0d3eaad3996d |
class Hand(Deck): <NEW_LINE> <INDENT> def __init__(self, cards, label=None): <NEW_LINE> <INDENT> self._cards = cards <NEW_LINE> self.label = label <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "Hand({_cards}, label={label})".format(**self.__dict__) | Represents a hand of playing cards. | 62598f8adc8b845886d53127 |
class AuxDataWdg(BaseTableElementWdg): <NEW_LINE> <INDENT> def get_display(self): <NEW_LINE> <INDENT> aux_data = self.get_current_aux_data() <NEW_LINE> if aux_data: <NEW_LINE> <INDENT> return aux_data.get(self.name) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> <DEDENT> def get_simple_disp... | a widget that assumes having its aux data, a list of dict, set | 62598f8ab57a9660fecd15ed |
class BaseObject(object): <NEW_LINE> <INDENT> _repr_these = [] <NEW_LINE> def dump(self, f=None, header=None, footer=None, indent=0): <NEW_LINE> <INDENT> if f is None: <NEW_LINE> <INDENT> f = sys.stderr <NEW_LINE> <DEDENT> if hasattr(self, "__slots__"): <NEW_LINE> <INDENT> alist = [] <NEW_LINE> for attr in self.__slots... | Parent of almost all other classes in the package. Defines a common
:meth:`dump` method for debugging. | 62598f8acad5886f8bdc4e43 |
class HttpHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def data_received(self, chunk: bytes) -> Optional[Awaitable[None]]: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get(self, path=None) -> None: <NEW_LINE> <INDENT> if (SIMULATION or self.application.get('simulation')) and path == 'simulation': <NEW_L... | Handles open request to / and /simulation | 62598f8a0a50d4780f704f3e |
class SampleClass: <NEW_LINE> <INDENT> name = "sample class" <NEW_LINE> age = 100 | Sample class | 62598f8a63d6d428bbee2329 |
class Info(_BaseTable): <NEW_LINE> <INDENT> key, value = None, None <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> name = self.__class__.__name__ <NEW_LINE> fields = ['%s=%s' % (getattr(self, 'key', '?'), getattr(self, 'value', '?'))] <NEW_LINE> return "<%s(%s)>" % (name, ', '.join(fields)) | general information table (versions, etc) | 62598f8ad10714528d69da41 |
class CalcPrelimDisp(BasePrimitive): <NEW_LINE> <INDENT> def __init__(self, action, context): <NEW_LINE> <INDENT> BasePrimitive.__init__(self, action, context) <NEW_LINE> self.logger = context.pipeline_logger <NEW_LINE> <DEDENT> def _perform(self): <NEW_LINE> <INDENT> y_binning = self.action.args.ybinsize <NEW_LINE> pr... | Calculate dispersion based on configuration parameters.
The parameters of the grating equation are calculates as:
alpha = grating_angle - 13 - adjustment_ange (180 for BH, RH and
0 for all other gratings)
beta = camera_angle - alpha
dispersion = cos(beta)/rho/focal_length x (pixel_scale x binning) * 1.e4 | 62598f8a6aa9bd52df0d4a43 |
class ShareCreateView(MyCreateView): <NEW_LINE> <INDENT> model = Share <NEW_LINE> form_class = ShareForm <NEW_LINE> object_name = 'share' <NEW_LINE> def get_initial(self): <NEW_LINE> <INDENT> self.initial.update({'resume': self.kwargs.get('resume_pk', None)}) <NEW_LINE> return self.initial | Widok tworzenia nowego wspoludzialu. | 62598f8a8a349b6b43685db6 |
class StdoutDelegate(SVNRepositoryDelegate): <NEW_LINE> <INDENT> def __init__(self, total_revs): <NEW_LINE> <INDENT> self.total_revs = total_revs <NEW_LINE> <DEDENT> def start_commit(self, revnum, revprops): <NEW_LINE> <INDENT> logger.verbose("=" * 60) <NEW_LINE> logger.normal("Starting Subversion r%d / %d" % (revnum, ... | Makes no changes to the disk, but writes out information to
STDOUT about what is happening in the SVN output. Of course, our
print statements will state that we're doing something, when in
reality, we aren't doing anything other than printing out that we're
doing something. Kind of zen, really. | 62598f8a66656f66f7d59f67 |
class _JS(): <NEW_LINE> <INDENT> def __init__(self, sdl_index, sdl_id, name): <NEW_LINE> <INDENT> self.axes = [] <NEW_LINE> self.buttons = [] <NEW_LINE> self.name = MODULE_NAME <NEW_LINE> self._j = None <NEW_LINE> self._id = sdl_id <NEW_LINE> self._index = sdl_index <NEW_LINE> self._name = name <NEW_LINE> self._event_q... | Wrapper for one input device | 62598f8a442bda511e95bfcd |
class MplCanvas(FigureCanvas): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.fig = Figure() <NEW_LINE> self.ax = self.fig.gca() <NEW_LINE> self.ax = self.fig.add_subplot(111) <NEW_LINE> FigureCanvas.__init__(self, self.fig) <NEW_LINE> FigureCanvas.setSizePolicy(self, QtGui.QSizePolicy.Expanding, QtGu... | Class to represent the FigureCanvas widget | 62598f8a38b623060ffa8c06 |
class Web3Provider(BaseGaspriceProvider): <NEW_LINE> <INDENT> title = "web3" <NEW_LINE> secret_env_var_title: str = "ETHGASPRICE_WEB3_SECRET" <NEW_LINE> def _init_web3(self) -> Optional["Web3"]: <NEW_LINE> <INDENT> web_provider = self.get_secret() <NEW_LINE> if not web_provider: <NEW_LINE> <INDENT> return None <NEW_LIN... | Provider for Web3 RPC. | 62598f8ae76e3b2f99fd859f |
class PythonSuite3(pythonv.PythonVerifier): <NEW_LINE> <INDENT> def __init__(self, methodName='runTest'): <NEW_LINE> <INDENT> pythonv.PythonVerifier.__init__(self, methodName) <NEW_LINE> if self.reporter is not None: <NEW_LINE> <INDENT> self.reporter.addSuite(self, "Python Functional Test Suite") <NEW_LINE> <DEDENT> <D... | A set of test cases testing functionalities based on StateMachines | 62598f8a73bcbd0ca4bc9dbf |
class EntityContext(object): <NEW_LINE> <INDENT> def __init__(self, classname, db=None): <NEW_LINE> <INDENT> self.classname = classname <NEW_LINE> self.db = db <NEW_LINE> self.pool = [] <NEW_LINE> self.cls = None <NEW_LINE> <DEDENT> def _get_instance(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.pool.... | Context manager for entity objects.
Will make sure clear is called for objects, and only creates
new instances when needed. | 62598f8abaa26c4b54d4ee24 |
@api.route('/') <NEW_LINE> class TodoList(Resource): <NEW_LINE> <INDENT> @api.doc('list_todos') <NEW_LINE> @api.header('Authorization', 'JWT Token', required=True) <NEW_LINE> @api.marshal_list_with(todo) <NEW_LINE> def get(self): <NEW_LINE> <INDENT> return Models.Todo.query.all() <NEW_LINE> <DEDENT> @api.doc('create_to... | Shows a list of all todos, and lets you POST to add new tasks | 62598f8ad53ae8145f918001 |
class MovieCreateView(CreateView): <NEW_LINE> <INDENT> pass | Create a new movie. | 62598f8a5f7d997b871f9191 |
class LeavePOut(_PartitionIterator): <NEW_LINE> <INDENT> def __init__(self, n, p, indices=None): <NEW_LINE> <INDENT> super(LeavePOut, self).__init__(n, indices) <NEW_LINE> self.p = p <NEW_LINE> <DEDENT> def _iter_test_indices(self): <NEW_LINE> <INDENT> for comb in combinations(range(self.n), self.p): <NEW_LINE> <INDENT... | Leave-P-Out cross validation iterator
Provides train/test indices to split data in train test sets. This results
in testing on all distinct samples of size p, while the remaining n - p
samples form the training set in each iteration.
Note: ``LeavePOut(n, p)`` is NOT equivalent to ``KFold(n, n_folds=n // p)``
which cr... | 62598f8ad4950a0f3b110bee |
class NewStyleClass(object): <NEW_LINE> <INDENT> pass | Not an exception. | 62598f8a0fa83653e46f4a60 |
class TestAgreementModel(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 testAgreementModel(self): <NEW_LINE> <INDENT> pass | AgreementModel unit test stubs | 62598f8a50485f2cf55daae6 |
class MasterEngine(Engine): <NEW_LINE> <INDENT> typeof = "master_engine" <NEW_LINE> @classmethod <NEW_LINE> def create( cls, name, master_type, mgmt_ip, mgmt_network, mgmt_interface=0, log_server_ref=None, zone_ref=None, domain_server_address=None, enable_gti=False, enable_antivirus=False, comment=None, extra_opts=None... | Creates a master engine in a firewall role. Layer3VirtualEngine should be used
to add each individual instance to the Master Engine. | 62598f8a8da39b475be02d59 |
class TransportError(IOError): <NEW_LINE> <INDENT> pass | Anything to do with the connection to Shotgun. | 62598f8a0c0af96317c55efd |
class CompartmentAnnotation(AnnotationMixin, Base): <NEW_LINE> <INDENT> __tablename__ = "compartment_annotations" <NEW_LINE> compartment_id: int = Column(Integer, ForeignKey("compartments.id"), nullable=False) <NEW_LINE> __table_args__ = (UniqueConstraint("compartment_id", "namespace_id", "identifier"),) <NEW_LINE> def... | Define a compartment annotation ORM model.
Attributes
----------
compartment_id : int
The compartment being annotated. | 62598f8ad6c5a102081e1cb3 |
class ManagedHsmResource(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type... | Managed HSM resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The Azure Resource Manager resource ID for the managed HSM Pool.
:vartype id: str
:ivar name: The name of the managed HSM Pool.
:vartype name: str
:ivar type: The resource type of the managed HSM Po... | 62598f8a925a0f43d25e7ba7 |
class ProcessCommandInput( abcProcessInput ): <NEW_LINE> <INDENT> devices = {} <NEW_LINE> @property <NEW_LINE> def logger_name( self ): <NEW_LINE> <INDENT> return Constants.LogKeys.INPUT_COMMANDS <NEW_LINE> <DEDENT> def __init__( self, devices ): <NEW_LINE> <INDENT> super( ProcessCommandInput, self ).__init__() <NEW_LI... | This class will receive a command from some external source
and load it into the system for further processing. | 62598f8a15fb5d323ce7e89e |
class FileMetadataCannotBeAdded(BackendException): <NEW_LINE> <INDENT> def __init__(self, values=[], reasons={}, message='File metadata could not be added'): <NEW_LINE> <INDENT> self.reasons = reasons <NEW_LINE> super(FileMetadataCannotBeAdded, self).__init__(values, message) | This exception is thrown when an attempt to add
metadata to a file fails for some reason. | 62598f8a15baa72349461af1 |
class Token(object): <NEW_LINE> <INDENT> def __init__(self, s, f_ch, l_ch, typ): <NEW_LINE> <INDENT> self.tok = s <NEW_LINE> self.f_ch = f_ch <NEW_LINE> self.l_ch = l_ch <NEW_LINE> self.typ = typ <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "%s : [%s - %s], %s" % (self.tok, self.f_ch, self.l_ch, s... | A token with its string, start, end positions and type | 62598f8a45492302aabfc046 |
class IsmUrls(): <NEW_LINE> <INDENT> def __init__(self, aws_profile=None, aws_access_key_id=None, aws_secret_access_key=None): <NEW_LINE> <INDENT> self.aws_profile = aws_profile <NEW_LINE> self.aws_access_key_id = aws_access_key_id <NEW_LINE> self.aws_secret_access_key = aws_secret_access_key <NEW_LINE> <DEDENT> def __... | Lists Keys from S3-Bucket
| 62598f8a3eb6a72ae038a1a5 |
class GCEDiskDefinition(ResourceDefinition): <NEW_LINE> <INDENT> config: GceDiskOptions <NEW_LINE> @classmethod <NEW_LINE> def get_type(cls): <NEW_LINE> <INDENT> return "gce-disk" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_resource_type(cls): <NEW_LINE> <INDENT> return "gceDisks" <NEW_LINE> <DEDENT> def __init... | Definition of a GCE Persistent Disk | 62598f8a1f037a2d8b9e3c4b |
class TagInstance(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Key = None <NEW_LINE> self.Value = None <NEW_LINE> self.InstanceSum = None <NEW_LINE> self.ServiceType = None <NEW_LINE> self.RegionId = None <NEW_LINE> self.BindingStatus = None <NEW_LINE> self.TagStatus = None <NEW_LINE... | 策略列表详情标签返回体
| 62598f8a10dbd63aa1c70729 |
class get_gateway_ip_result(object): <NEW_LINE> <INDENT> def __init__( self, success=None, ): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if ( iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is n... | Attributes:
- success | 62598f8a097d151d1a2c0b98 |
class EpochSampler(object): <NEW_LINE> <INDENT> def __init__(self, rand, dataset, repeat=False): <NEW_LINE> <INDENT> self._rand = rand <NEW_LINE> self._dataset = dataset <NEW_LINE> self._repeat = repeat <NEW_LINE> <DEDENT> def dataset(self): <NEW_LINE> <INDENT> return self._dataset <NEW_LINE> <DEDENT> def sample(self):... | Standard sampler for a finite dataset. | 62598f8a379a373c97d98b86 |
class CitationReferenceTransform(SphinxTransform): <NEW_LINE> <INDENT> default_priority = 619 <NEW_LINE> def apply(self, **kwargs: Any) -> None: <NEW_LINE> <INDENT> domain = cast(CitationDomain, self.env.get_domain('citation')) <NEW_LINE> for node in self.document.findall(nodes.citation_reference): <NEW_LINE> <INDENT> ... | Replace citation references by pending_xref nodes before the default
docutils transform tries to resolve them. | 62598f8a8e05c05ec3f6ec01 |
class MultimodalModel(EntityRelationEmbeddingModel): <NEW_LINE> <INDENT> pass | A multimodal KGE model. | 62598f8abaa26c4b54d4ee26 |
class _UnreadVariable(ResourceVariable): <NEW_LINE> <INDENT> def __init__(self, handle, dtype, shape, in_graph_mode, deleter, parent_op, unique_id): <NEW_LINE> <INDENT> self._trainable = False <NEW_LINE> self._save_slice_info = None <NEW_LINE> self._graph_key = ops.get_default_graph()._graph_key <NEW_LINE> self._in_gra... | Represents a future for a read of a variable.
Pretends to be the tensor if anyone looks. | 62598f8a23e79379d538c071 |
class Card: <NEW_LINE> <INDENT> suit_names = ["Clubs", "Diamonds", "Hearts", "Spades"] <NEW_LINE> rank_names = [None, "Ace", 2, 3, 4, 5, 6, 7, 8, 9, 10, "Jack", "Queen", "King"] <NEW_LINE> def __init__(self, suit = 0, rank = 2): <NEW_LINE> <INDENT> if suit < 0 or suit > 3: <NEW_LINE> <INDENT> print("wrong suit, please ... | 一张牌,属性为rank和suit
rank:
2~10
Ace --> 1
Jack --> 11
Queen --> 12
King --> 13
suit:
Spades --> 3
Hearts --> 2
Diamonds --> 1
Clubs --> 0 | 62598f8ab7558d58954631a6 |
class ScoreForm(messages.Message): <NEW_LINE> <INDENT> user_name = messages.StringField(1, required=True) <NEW_LINE> date = messages.StringField(2, required=True) <NEW_LINE> won = messages.BooleanField(3, required=True) <NEW_LINE> guesses = messages.IntegerField(4, required=True) <NEW_LINE> score = messages.IntegerFiel... | ScoreForm for outbound Score information | 62598f8afb3f5b602db47f6a |
class Entity(pg.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, ge): <NEW_LINE> <INDENT> pg.sprite.Sprite.__init__(self) <NEW_LINE> self.ge = ge <NEW_LINE> self.pos = (0, 0) <NEW_LINE> <DEDENT> def set_pos(self, x, y, center=False): <NEW_LINE> <INDENT> self.pos = (x, y) <NEW_LINE> try: <NEW_LINE> <INDENT> if cen... | Entity
The base class for handling the data for each individual entity present
within the whole game runtime. | 62598f8ad99f1b3c44d0521c |
class EmulateEfuseController(EmulateEfuseControllerBase): <NEW_LINE> <INDENT> CHIP_NAME = "ESP32-S3(beta2)" <NEW_LINE> mem = None <NEW_LINE> debug = False <NEW_LINE> Blocks = EfuseDefineBlocks <NEW_LINE> Fields = EfuseDefineFields <NEW_LINE> REGS = EfuseDefineRegisters <NEW_LINE> def __init__(self, efuse_file=None... | The class for virtual ESP32-S3(beta2) operation. Using for HOST_TEST.
| 62598f8a07f4c71912baefb8 |
class Dissector(object): <NEW_LINE> <INDENT> def __init__(self, limit=0, ignore=None): <NEW_LINE> <INDENT> self.limit = limit if limit > 0 else float('inf') <NEW_LINE> self.ignore = Ignore(ignore) <NEW_LINE> self.path = [] <NEW_LINE> self.diffs = [] <NEW_LINE> <DEDENT> def report(self, diff, a, b): <NEW_LINE> <INDENT> ... | Compares stuctured data recursively and reports on differences. | 62598f8a07f4c71912baefb7 |
class USResident(Person): <NEW_LINE> <INDENT> def __init__(self, name, status): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.status = status <NEW_LINE> <DEDENT> def getStatus(self): <NEW_LINE> <INDENT> possibilities = ['citizen', 'legal_resident', 'illegal_resident'] <NEW_LINE> if self.status not in possibiliti... | A Person who resides in the US. | 62598f8a656771135c4891ee |
class DataSubSet(DataSet): <NEW_LINE> <INDENT> def __init__(self, complete_data_set, data_key=None, data_indices=None, **kwargs): <NEW_LINE> <INDENT> self.data_key = data_key <NEW_LINE> self.data_indices = data_indices if data_indices is not None else list(range(len(complete_data_set) - 1)) <NEW_LINE> self.complete_dat... | Class that wraps a DataSet in order to retrieve only part of it, reusing its main functionality.
This is particularly useful to retrieve inputs or labels separately in order to build an ArrayDataSet. | 62598f8a7cff6e4e811b5585 |
class AutomaticMaps(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = 'object.map_generation' <NEW_LINE> bl_label = 'Automatic Normal & AO' <NEW_LINE> bl_options = {'REGISTER'} <NEW_LINE> def execute(self,context): <NEW_LINE> <INDENT> GeneratePlane() <NEW_LINE> UVUnwrapActive() <NEW_LINE> mapImage = CreateImage() <N... | Automated Normal & AO Map Generation Operator | 62598f8af8510a7c17d7df30 |
class color: <NEW_LINE> <INDENT> GREEN = '\033[92m' <NEW_LINE> RED = '\033[91m' | change test color | 62598f8a0c0af96317c55eff |
class ValueCondition(Condition): <NEW_LINE> <INDENT> def __init__(self,attribute,value): <NEW_LINE> <INDENT> Condition.__init__(self,attribute) <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Condition for attribute %s with value %s"%(self.attribute,str(self.value)) | This takes exact one value to compare | 62598f8a9b70327d1c57e911 |
class ExtractVolumeRefTask(flow_utils.CinderTask): <NEW_LINE> <INDENT> default_provides = 'volume_ref' <NEW_LINE> def __init__(self, db, host): <NEW_LINE> <INDENT> super(ExtractVolumeRefTask, self).__init__(addons=[ACTION]) <NEW_LINE> self.db = db <NEW_LINE> self.host = host <NEW_LINE> <DEDENT> def execute(self, contex... | Extracts volume reference for given volume id. | 62598f8a925a0f43d25e7ba9 |
class CLOSEST_IF_BOTH(Rounding): <NEW_LINE> <INDENT> pass | Get the item which has a value closest to the specified value.
Before it returns the item, it checks if there also exists an item which is
"on the other side" of the specified value. e.g. if the closest item is
higher than the specified item, it will confirm that there exists an item
*below* the specified value. (And ... | 62598f8a23849d37ff850c32 |
class Snap(object): <NEW_LINE> <INDENT> def __init__(self, size, tolerance, list): <NEW_LINE> <INDENT> self.tolerance = tolerance <NEW_LINE> self.horizontal = set() <NEW_LINE> self.vertical = set() <NEW_LINE> for i in list: <NEW_LINE> <INDENT> self.vertical.add(i[0].left) <NEW_LINE> self.vertical.add(i[0].left+i[1].wid... | Snap-to-edges manager | 62598f8aa8ecb03325870d75 |
class BlogComment(Comment): <NEW_LINE> <INDENT> blog = models.ForeignKey(Blog, verbose_name=u'所属博客') <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return '来自用户 {0} 对 {1} 的评论'.format(self.username or self.ip_address, self.blog.title) <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = u'博客评论' <NEW... | 博客评论 Model,继承自通用评论 | 62598f8a3eb6a72ae038a1a7 |
class NetReg(mode): <NEW_LINE> <INDENT> def __enter__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __exit__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def do_next(self): <NEW_LINE> <INDENT> netregklass = self.device.custom.netrklass <NEW_LINE> netregsm = netregklass(self.device) <NEW_LINE> d = netre... | NetReg tries to register with the network and do the right thing. | 62598f8a15fb5d323ce7e8a0 |
class WxException(Exception): <NEW_LINE> <INDENT> def __init__(self, message, code): <NEW_LINE> <INDENT> super(WxException, self).__init__(message) <NEW_LINE> self.code = code | Weixin error.
| 62598f8adc8b845886d5312b |
class PageOfSoftware(object): <NEW_LINE> <INDENT> swagger_types = { 'links': 'list[Link]', 'page': 'PageInfo', 'resources': 'list[Software]' } <NEW_LINE> attribute_map = { 'links': 'links', 'page': 'page', 'resources': 'resources' } <NEW_LINE> def __init__(self, links=None, page=None, resources=None): <NEW_LINE> <INDEN... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f8a45492302aabfc048 |
class VupErrorNoVersionFilesProvided(VupError): <NEW_LINE> <INDENT> def __init__(self, subcmd): <NEW_LINE> <INDENT> msg = ERROR_HEAD + "no version files provided" <NEW_LINE> msg = msg.format(subcmd=subcmd) <NEW_LINE> super().__init__(msg) | Thrown when no version files have been specified | 62598f8a82261d6c5272fc8f |
class BringCupState(State): <NEW_LINE> <INDENT> def handle(self, machine_context): <NEW_LINE> <INDENT> print("Bringing a cup") <NEW_LINE> machine_context.state = ApplyCoffeeState() | Define's the State where a cup is bring | 62598f8a0a50d4780f704f42 |
class MaxPoolBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, block_dict): <NEW_LINE> <INDENT> super(MaxPoolBlock, self).__init__() <NEW_LINE> self.block_dict = block_dict <NEW_LINE> self.n = block_dict['layer_num'] <NEW_LINE> self.type = block_dict['type'] <NEW_LINE> self.kernel_size = block_dict['kernel_size'... | max pooling block
a block of the network that performs max pooling.
--- args ---
block_dict : dict
the dictionary that describes this max pooling block. should contain
keys like 'kernel_size', 'stride', and 'padding'. | 62598f8a4e696a045264dbbe |
class SearchResult(db.Model): <NEW_LINE> <INDENT> SearchTerm = db.ReferenceProperty(SearchTerm) <NEW_LINE> SearchProvider = db.ReferenceProperty(SearchProvider) <NEW_LINE> Added_On = db.DateTimeProperty(auto_now_add = True) <NEW_LINE> Last_Accessed = db.DateTimeProperty(auto_now = True) <NEW_LINE> Result = db.TextPrope... | A Search Result for a given search term | 62598f8a6fb2d068a7693be9 |
class PGaussianMean(GaussianMean): <NEW_LINE> <INDENT> def compute(self, values, pressure_values): <NEW_LINE> <INDENT> if self._check_compute_input(values, pressure_values, pressure_required=True) == False: <NEW_LINE> <INDENT> return np.array(values) <NEW_LINE> <DEDENT> l = len(values) <NEW_LINE> values = np.array(valu... | Gaussian weighted against pressure moving average helper object
This class extends GaussianMean and modifies the way the weights are
computed taking into account the pressure values. First the weights are
computed like the ones used in GaussianMean, then a distance vector is
computed for the samples in the current int... | 62598f8ae64d504609df916c |
class HardwareResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'items': 'list[Hardware]' } <NEW_LINE> attribute_map = { 'items': 'items' } <NEW_LINE> required_args = { } <NEW_LINE> def __init__( self, items=None, ): <NEW_LINE> <INDENT> if items is not None: <NEW_LINE> <INDENT> self.items = items <NEW_LINE> <DEDE... | Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62598f8a8a349b6b43685dba |
class MinosError(Process): <NEW_LINE> <INDENT> def __init__(self, roo_min, argset): <NEW_LINE> <INDENT> super(MinosError, self).__init__() <NEW_LINE> self.roo_min = roo_min <NEW_LINE> self.argset = argset <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.roo_min.minos(self.argset) | TODO: write description | 62598f8a442bda511e95bfd1 |
class AddInstanceCommand(UndoCommand): <NEW_LINE> <INDENT> def __init__(self, document: DocT, cnobj: CNObject): <NEW_LINE> <INDENT> super(AddInstanceCommand, self).__init__("add instance") <NEW_LINE> self._document = document <NEW_LINE> self._cnobj = cnobj <NEW_LINE> self._obj_instance = ObjectInstance(cnobj) <NEW_LINE... | Undo ready command for adding an instance.
Args:
document (Document): m
cnobj (CNObject): Object instance to add to Document | 62598f8a8e05c05ec3f6ec02 |
class TestImportDsc(ComponentTestBase): <NEW_LINE> <INDENT> def test_debian_import(self): <NEW_LINE> <INDENT> def _dsc(version): <NEW_LINE> <INDENT> return os.path.join(DEB_TEST_DATA_DIR, 'dsc-native', 'git-buildpackage_%s.dsc' % version) <NEW_LINE> <DEDENT> dsc = _dsc('0.4.14') <NEW_LINE> assert import_dsc(['arg0', ds... | Test importing of debian source packages | 62598f8a73bcbd0ca4bc9dc3 |
class BaseGallery(BaseObject): <NEW_LINE> <INDENT> title = StringField('Title of gallery') <NEW_LINE> description = StringField('Description of gallery') <NEW_LINE> cardinality = IntField('Cardinality of gallery') <NEW_LINE> date = DateField('Date of gallery') <NEW_LINE> rating = FloatField(... | Represents a gallery.
This object has to be inherited to specify how to calculate the URL of the gallery from its ID. | 62598f8ad53ae8145f918005 |
class AssociativeMapTestCase(unittest.TestCase): <NEW_LINE> <INDENT> pass | Test Map data objects. | 62598f8ab830903b9686e22c |
class CreateChildSkaterView(LoginRequiredMixin, CreateView): <NEW_LINE> <INDENT> model = ChildSkater <NEW_LINE> form_class = forms.CreateChildSkaterForm <NEW_LINE> template_name = 'accounts/create_my_skater_form.html' <NEW_LINE> def form_valid(self, form): <NEW_LINE> <INDENT> self.object = form.save(commit=False) <NEW_... | Displays page where user can add child or dependent skaters. | 62598f8a5f7d997b871f9193 |
class G0(LineMove): <NEW_LINE> <INDENT> pass | Rapid Move. | 62598f8a462c4b4f79dbb577 |
class VecEnv(ABC): <NEW_LINE> <INDENT> def __init__(self, num_envs, observation_space, action_space): <NEW_LINE> <INDENT> self.num_envs = num_envs <NEW_LINE> self.observation_space = observation_space <NEW_LINE> self.action_space = action_space <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def reset(self): <NEW_LINE> ... | An abstract asynchronous, vectorized environment. | 62598f8a94891a1f408b94a9 |
class Folder: <NEW_LINE> <INDENT> def __init__(self, endpoint, bucket, access_key, secret_key, location, database, **_): <NEW_LINE> <INDENT> self.client = minio.Minio(endpoint, access_key=access_key, secret_key=secret_key, secure=False) <NEW_LINE> self.bucket = bucket <NEW_LINE> self.remote_path = '/'.join((location.ls... | A Folder instance manipulates a flat folder of objects within an S3-compatible object store | 62598f8a4428ac0f6e658099 |
class CheckPointGaiaSSH(BaseConnection): <NEW_LINE> <INDENT> def session_preparation(self): <NEW_LINE> <INDENT> self._test_channel_read() <NEW_LINE> self.set_base_prompt() <NEW_LINE> self.disable_paging(command="set clienv rows 0") <NEW_LINE> time.sleep(0.3 * self.global_delay_factor) <NEW_LINE> self.clear_buffer() <NE... | Implements methods for communicating with Check Point Gaia
firewalls. | 62598f8a23e79379d538c073 |
class PostForm(FlaskForm): <NEW_LINE> <INDENT> title = StringField("Title", validators=[DataRequired(), Length(max=64)]) <NEW_LINE> body = TextAreaField("Write Your Post", validators=[DataRequired()]) <NEW_LINE> submit = SubmitField("Submit") | Form for posts | 62598f8abde94217f3707421 |
class TransformResult(object): <NEW_LINE> <INDENT> def __init__(self, applied_ptransform, uncommitted_output_bundles, unprocessed_bundles, counters, keyed_watermark_holds, undeclared_tag_values=None): <NEW_LINE> <INDENT> self.transform = applied_ptransform <NEW_LINE> self.uncommitted_output_bundles = uncommitted_output... | Result of evaluating an AppliedPTransform with a TransformEvaluator. | 62598f8a498bea3a75a57699 |
class JSONPicklerIO(BasePicklerIO): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def dump(self, obj: Any, stream: IO[bytes], **kwargs): <NEW_LINE> <INDENT> utf8_stream = io.TextIOWrapper(stream, "utf-8") <NEW_LINE> json.dump(obj, utf8_stream, **kwargs) <NEW_LINE> ut... | A PicklerIO class that wraps ``json.dump`` and ``json.load``. | 62598f8a07f4c71912baefba |
class GameView: <NEW_LINE> <INDENT> def __init__(self, state, strategy): <NEW_LINE> <INDENT> player = input('Type c if you wish the computer to play first ') <NEW_LINE> if player == 'c': <NEW_LINE> <INDENT> p = 'p2' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> p = 'p1' <NEW_LINE> <DEDENT> self.state = state(p, interac... | A game view for a two-player, sequential move, zero-sum,
perfect-information game. | 62598f8a656771135c4891f0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.