code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@registry.register_problem <NEW_LINE> class GymWrappedBreakoutRandom(GymDiscreteProblem): <NEW_LINE> <INDENT> @property <NEW_LINE> def env_name(self): <NEW_LINE> <INDENT> return "T2TBreakoutWarmUp20RewSkip500Steps-v1" <NEW_LINE> <DEDENT> @property <NEW_LINE> def min_reward(self): <NEW_LINE> <INDENT> return -1 <NEW_LINE...
Pong game, random actions.
625990602c8b7c6e89bd4e9a
class SetBookmark(MarkerAction): <NEW_LINE> <INDENT> name = "Set Bookmark" <NEW_LINE> default_menu = (("Tools/Bookmarks", 260), 100) <NEW_LINE> key_bindings = {'emacs': 'C-c C-b C-s'} <NEW_LINE> def action(self, index=-1, multiplier=1): <NEW_LINE> <INDENT> line = self.mode.GetCurrentLine() <NEW_LINE> self.mode.MarkerAd...
Set a bookmark on the current line in the buffer.
625990603539df3088ecd948
class SetupDirectories(PipelineTask): <NEW_LINE> <INDENT> def init(self,dirs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> for dirn in self.args.dirs: <NEW_LINE> <INDENT> dirn = os.path.abspath(dirn) <NEW_LINE> if os.path.exists(dirn): <NEW_LINE> <INDENT> print("%s: already exists"...
Create directories Given a list of directories, check for and if necessary create each one
6259906007f4c71912bb0ae9
class EditorItemWidget(QtGui.QWidget): <NEW_LINE> <INDENT> def __init__(self, parent=None, ei=None): <NEW_LINE> <INDENT> super(EditorItemWidget, self).__init__(parent) <NEW_LINE> self.item = ei
Wrapper class for :class:`EditorItem` so that an :class:`EditorItem` can be configured and automatically used with :class:`EditorItemDelegate`
6259906099cbb53fe683258d
class Building(): <NEW_LINE> <INDENT> def __init__(self, x_point, y_point, width, height, color): <NEW_LINE> <INDENT> self.x_point = x_point <NEW_LINE> self.y_point= y_point <NEW_LINE> self.width= width <NEW_LINE> self.height= height <NEW_LINE> self.color= color <NEW_LINE> <DEDENT> def draw(self): <NEW_LINE> <INDENT> p...
This class will be used to create the building objects. It takes: x_point - an integer that represents where along the x-axis the building will be drawn y_point - an integer that represents where along the y-axis the building will be drawn Together the x_point and y_point represent the top, left corner of the bu...
6259906055399d3f05627bcb
class GpsFix(object): <NEW_LINE> <INDENT> def __init__(self, timestamp=None, latitude=None, longitude=None, altitude=None, heading=None, velocity=None): <NEW_LINE> <INDENT> self.timestamp = timestamp <NEW_LINE> self.latitude = latitude <NEW_LINE> self.longitude = longitude <NEW_LINE> self.altitude = altitude <NEW_LINE>...
Contains info from a GPS position
6259906015baa7234946363f
class Rubric(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, db_index=True, unique=True, verbose_name='Название') <NEW_LINE> order = models.IntegerField(default=0, db_index=True, verbose_name='Порядок') <NEW_LINE> super_rubric = models.ForeignKey('SuperRubric', on_delete=models.PROTECT, null=T...
Модель рубрик
62599060097d151d1a2c271b
class MapsOperationsValueItemPaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[MapsOperationsValueItem]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(MapsOperationsValueItemPaged, self).__init_...
A paging container for iterating over a list of :class:`MapsOperationsValueItem <azure.mgmt.maps.models.MapsOperationsValueItem>` object
62599060462c4b4f79dbd0b1
class VideoViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Video.objects.all() <NEW_LINE> serializer_class = VideoSerializer <NEW_LINE> permission_classes = (IsAuthenticatedOrReadOnly, IsSystemUserOrReadOnly, ) <NEW_LINE> filter_backends = (DjangoFilterBackend, filters.OrderingFilter, filters.SearchFilte...
用于进行 game管理。 对应 Game 模型,通过过滤器对不同的软件提供不同的接口。 提供返回某一apk的版本,或者返回某一apk的最新版本。 只有systemuser可以增加、修改、删除apk版本信息。 其他普通用户和未登录用户只有查看权限。
625990604428ac0f6e659bdf
class hr_attendance(osv.Model): <NEW_LINE> <INDENT> _inherit = 'hr.attendance' <NEW_LINE> _columns = { 'working_id': fields.many2one( 'hr.working.template', 'Working Template', help='Working Template'), 'contract_id': fields.many2one( 'hr.contract', 'Contract', help='Contract'), }
Inherit the hr.attendance model.
62599060be8e80087fbc0732
class flea(PowerUp): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(flea, self).__init__((255,255,0), (0,0), 20, 0, pygame.image.load(os.path.join('.', 'images', 'flea.png')), 'flea') <NEW_LINE> self.sizeScale = settings.jayhawk.image.get_width() <NEW_LINE> <DEDENT> def effect(self): <NEW_LINE> <INDE...
You become a flea and jump really high
62599060379a373c97d9a6d0
class GKEStartPodOperator(KubernetesPodOperator): <NEW_LINE> <INDENT> template_fields = {'project_id', 'location', 'cluster_name'} | set(KubernetesPodOperator.template_fields) <NEW_LINE> @apply_defaults <NEW_LINE> def __init__( self, *, location: str, cluster_name: str, use_internal_ip: bool = False, project_id: Option...
Executes a task in a Kubernetes pod in the specified Google Kubernetes Engine cluster This Operator assumes that the system has gcloud installed and has configured a connection id with a service account. The **minimum** required to define a cluster to create are the variables ``task_id``, ``project_id``, ``location``...
62599060f548e778e596cc35
class itkMaximumProjectionImageFilterIUS2IUS2_Superclass(itkImageToImageFilterAPython.itkImageToImageFilterIUS2IUS2): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No const...
Proxy of C++ itkMaximumProjectionImageFilterIUS2IUS2_Superclass class
6259906032920d7e50bc76f2
class RedisOptions(DataStoreOptions): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(geowave_pkg.datastore.redis.config.RedisOptions()) <NEW_LINE> <DEDENT> def set_address(self, address): <NEW_LINE> <INDENT> self._java_ref.setAddress(address) <NEW_LINE> <DEDENT> def get_address(self): <NEW...
Redis data store options.
625990600c0af96317c578b5
class ViewCityCodeTotals(APIView): <NEW_LINE> <INDENT> daily_totals = PiecesPerMeterLocation.city_code_totals.all() <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> pieces = self.daily_totals <NEW_LINE> def make_dict(self,a): <NEW_LINE> <INDENT> new={} <NEW_LINE> for element in a: <NEW_LINE> <IND...
Returns an array of city code total objects. Each object contains the total count for the MLW codes indentified within a city limit: [{ "location": "Montreux", //name of the city "results": [ { "code": "G100", "total": 185 }, { "code": "G11", "to...
62599060796e427e5384fe23
class S3EmailProviderModel(S3Model): <NEW_LINE> <INDENT> names = ("setup_email", "setup_email_id", ) <NEW_LINE> def model(self): <NEW_LINE> <INDENT> T = current.T <NEW_LINE> db = current.db <NEW_LINE> email_types = Storage(setup_google_email = T("Google"), ) <NEW_LINE> tablename = "setup_email" <NEW_LINE> self.super_en...
Email Providers (we just use Groups currently) - super-entity
625990608e71fb1e983bd178
class Reduction(Enum): <NEW_LINE> <INDENT> SUM = 'sum' <NEW_LINE> SUM_OVER_BATCH_SIZE = 'sum_over_batch_size' <NEW_LINE> WEIGHTED_MEAN = 'weighted_mean'
Types of metrics reduction. Contains the following values: * `SUM`: Scalar sum of weighted values. * `SUM_OVER_BATCH_SIZE`: Scalar sum of weighted values divided by number of elements. * `WEIGHTED_MEAN`: Scalar sum of weighted values divided by sum of weights.
62599060442bda511e95d8b0
class PropertyOptionHandler(OptionHandler): <NEW_LINE> <INDENT> availableOptions = { 'islink': False, }
Class holding options for a param-property pair.
625990601f5feb6acb164298
class CompactBlocksConnectionTest(BitcoinTestFramework): <NEW_LINE> <INDENT> def set_test_params(self): <NEW_LINE> <INDENT> self.setup_clean_chain = True <NEW_LINE> self.num_nodes = 6 <NEW_LINE> <DEDENT> def peer_info(self, from_node, to_node): <NEW_LINE> <INDENT> for peerinfo in self.nodes[from_node].getpeerinfo(): <N...
Test class for verifying selection of HB peer connections.
62599060e5267d203ee6cf16
class SampledFromConverter(Converter): <NEW_LINE> <INDENT> def __init__(self, choices): <NEW_LINE> <INDENT> self.choices = tuple(choices) <NEW_LINE> <DEDENT> def to_basic(self, value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return real_index(self.choices, value) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <...
A SampledFrom instance is simply stored as an integer index into the list of values sampled from.
62599060ac7a0e7691f73b91
class SpaceFiller(object): <NEW_LINE> <INDENT> name = "space" <NEW_LINE> def __call__(self, N): <NEW_LINE> <INDENT> return ' ' * N
fill random spaces with spaces ;)
625990608e7ae83300eea73b
class char(Command): <NEW_LINE> <INDENT> args = 'char:Number' <NEW_LINE> def invoke(self, tex): <NEW_LINE> <INDENT> return tex.textTokens(chr(self.parse(tex)['char']))
\char
62599060097d151d1a2c271d
class AuthTokenSerializer(serializers.Serializer): <NEW_LINE> <INDENT> name = serializers.CharField() <NEW_LINE> password = serializers.CharField( style={'input_type': 'password'}, trim_whitespace=False ) <NEW_LINE> def validate(self, attrs): <NEW_LINE> <INDENT> name = attrs.get('name') <NEW_LINE> password = attrs.get(...
Serializer para el objeto de autenticación
6259906038b623060ffaa3a7
class ProgressBar(object): <NEW_LINE> <INDENT> def __init__(self, minValue=0, maxValue=10, totalWidth=None): <NEW_LINE> <INDENT> self._progBar = "[]" <NEW_LINE> self._oldProgBar = "" <NEW_LINE> self._min = int(minValue) <NEW_LINE> self._max = int(maxValue) <NEW_LINE> self._span = self._max - self._min <NEW_LINE> self._...
This class defines methods to update and draw a progress bar
62599060f548e778e596cc36
class UpgradeRPC(BMCManagerServerCommand): <NEW_LINE> <INDENT> oob_method = "firmware_upgrade_rpc" <NEW_LINE> all_stages = range(1, 11) <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super().get_parser(prog_name) <NEW_LINE> parser.add_argument( "--timeout", type=int, default=60, help="advanced...
perform firmware upgrade using RPC
6259906076e4537e8c3f0c3b
class TCPHandler(tornado_util.TCPHandler, ForwardHandler): <NEW_LINE> <INDENT> def __init__(self, sock, addr): <NEW_LINE> <INDENT> super(TCPHandler, self).__init__(sock) <NEW_LINE> self._init_handler() <NEW_LINE> self.addr = addr <NEW_LINE> <DEDENT> def name(self): <NEW_LINE> <INDENT> return "TCPSocketProxy:%s:%s" % (s...
Event driven TCP handler.
62599060f548e778e596cc37
class TeamFolderCreateArg(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_name_value', '_sync_setting_value', ] <NEW_LINE> _has_required_fields = True <NEW_LINE> def __init__(self, name=None, sync_setting=None): <NEW_LINE> <INDENT> self._name_value = bb.NOT_SET <NEW_LINE> self._sync_setting_value = bb.NOT_SET <NEW_LINE...
:ivar team.TeamFolderCreateArg.name: Name for the new team folder. :ivar team.TeamFolderCreateArg.sync_setting: The sync setting to apply to this team folder. Only permitted if the team has team selective sync enabled.
625990601f037a2d8b9e53c2
class Row(BoxLayout): <NEW_LINE> <INDENT> txt = StringProperty() <NEW_LINE> def __init__(self, row, **kwargs): <NEW_LINE> <INDENT> super(Row, self).__init__(**kwargs) <NEW_LINE> self.txt = row
Row for each Label in the Table (from above class)
6259906091f36d47f22319e6
class Site(LazyWsgi): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.channel = channel <NEW_LINE> <DEDENT> def setup(self, environ): <NEW_LINE> <INDENT> cfg = environ['pulsar.cfg'] <NEW_LINE> self.store = create_store(cfg.data_store) <NEW_LINE> pubsub = self.store.pubsub() <NEW_LINE> return W...
A simple web site for displaying tweets
62599060d268445f2663a6b4
class ReviewResource(BaseReviewResource): <NEW_LINE> <INDENT> uri_object_key = 'review_id' <NEW_LINE> model_parent_key = 'review_request' <NEW_LINE> item_child_resources = [ resources.review_diff_comment, resources.review_reply, resources.review_screenshot_comment, resources.review_file_attachment_comment, ] <NEW_LINE>...
Provides information on reviews made on a review request. Each review can contain zero or more comments on diffs, screenshots or file attachments. It may also have text preceding the comments (the ``body_top`` field), and text following the comments (``body_bottom``). If the ``text_type`` field is set to ``markdown``...
625990604e4d562566373ab6
class AlexOutputBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, classes): <NEW_LINE> <INDENT> super(AlexOutputBlock, self).__init__() <NEW_LINE> mid_channels = 4096 <NEW_LINE> self.fc1 = AlexDense( in_channels=in_channels, out_channels=mid_channels) <NEW_LINE> self.fc2 = AlexDense( in_channels=mid...
AlexNet specific output block. Parameters: ---------- in_channels : int Number of input channels. classes : int Number of classification classes.
6259906097e22403b383c5bb
class BandwidthXHRTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> Bandwidth.objects.all().delete() <NEW_LINE> self.b = Bandwidth.objects.create(link=1, time=1., rx=1, tx=1) <NEW_LINE> <DEDENT> def test_xhr_request(self): <NEW_LINE> <INDENT> from django.core.urlresolvers import reverse <NEW_LINE...
Test XMLHttpRequests
6259906067a9b606de5475f9
class SetStaticRewardsDialog(wx.Dialog): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> wx.Dialog.__init__( self, None, title="Praemien setzen", size=(230, 770)) <NEW_LINE> sizer = wx.BoxSizer(wx.VERTICAL) <NEW_LINE> self.ticker_ctrls = {} <NEW_LINE> ticker_items = [] <NEW_LINE> for i in range(18): <NEW_LI...
Class for static reward dialog.
62599060fff4ab517ebceed6
class MultilayerPerceptronClassificationModel(_JavaProbabilisticClassificationModel, _MultilayerPerceptronParams, JavaMLWritable, JavaMLReadable, HasTrainingSummary): <NEW_LINE> <INDENT> @property <NEW_LINE> @since("2.0.0") <NEW_LINE> def weights(self): <NEW_LINE> <INDENT> return self._call_java("weights") <NEW_LINE> <...
Model fitted by MultilayerPerceptronClassifier. .. versionadded:: 1.6.0
6259906099cbb53fe6832591
class UserStore(Timestamp): <NEW_LINE> <INDENT> store = models.ForeignKey(Store, on_delete=models.CASCADE) <NEW_LINE> user = models.ForeignKey(User, on_delete=models.CASCADE) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return f"{self.user} -- {self.store}"
This model is mapping the relation between the store manager and the restaurant, hotel store.
625990602ae34c7f260ac796
class DeclarativeDocumenter(EnamlDocstringSignatureMixin, EnamlComponentDocumenter): <NEW_LINE> <INDENT> objtype = 'enaml_decl' <NEW_LINE> member_order = 35 <NEW_LINE> @classmethod <NEW_LINE> def can_document_member(cls, member, membername, isattr, parent): <NEW_LINE> <INDENT> return isinstance(member, Declarative) <NE...
Specialized Documenter subclass for Enaml declarations.
62599060097d151d1a2c271f
class L1Loss(HybridBlock): <NEW_LINE> <INDENT> def __init__(self, weight=None, batch_axis=0, **kwargs): <NEW_LINE> <INDENT> super(L1Loss, self).__init__(**kwargs) <NEW_LINE> self._weight = weight <NEW_LINE> self._batch_axis = batch_axis <NEW_LINE> <DEDENT> def hybrid_forward(self, F, output, label, sample_weight=None):...
Calculate the mean absolute error between output and label: .. math:: L = \frac{1}{2}\sum_i \vert {output}_i - {label}_i \vert. output and label must have the same shape. Parameters ---------- weight : float or None global scalar weight for loss sample_weight : Symbol or None per sample weighting. Must b...
62599060097d151d1a2c2720
class Group(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=250, unique=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ['name'] <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def _get_dictionary(self): <NEW_LINE> <INDENT> return { '...
Group of feeds.
625990604428ac0f6e659be3
class Line(object): <NEW_LINE> <INDENT> def __init__(self, p1, p2): <NEW_LINE> <INDENT> self.p1 = p1 <NEW_LINE> self.p2 = p2 <NEW_LINE> if p1.x == p2.x: <NEW_LINE> <INDENT> self.slope = None <NEW_LINE> self.intercept = None <NEW_LINE> self.vertical = True <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.slope = float...
Definition of a line in 2-D Cartesian space.
625990606e29344779b01cff
class TemplateManager(object): <NEW_LINE> <INDENT> def list_templates(self): <NEW_LINE> <INDENT> return loader.list_template_dirs() <NEW_LINE> <DEDENT> def get_template_detail(self,template_name): <NEW_LINE> <INDENT> parallel_file = loader.get_parallel_file(template_name) <NEW_LINE> data = None <NEW_LINE> if parallel_f...
A facade to access the ``metadata.Template```functionalities.
625990600fa83653e46f6598
class DiffableQuery(Diffable): <NEW_LINE> <INDENT> def __init__(self, name, diffable_targets, threshold): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.threshold = threshold <NEW_LINE> self.diffable_targets = diffable_targets <NEW_LINE> <DEDENT> def _measure_non_equal_pts_percentage( self, diffable_targets1, dif...
DiffableQuery.
62599060009cb60464d02be7
class E1_Results(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.irf_stderr = np.array([[[.125, 0.546, 0.664 ], [0.032, 0.139, 0.169], [0.026, 0.112, 0.136]], [[0.129, 0.547, 0.663], [0.032, 0.134, 0.163], [0.026, 0.108, 0.131]], [[0.084, .385, .479], [.016, .079, .095], [.016, .078, .103]]]) ...
Results from Lutkepohl (2005) using E2 dataset
625990600c0af96317c578b7
class SetVolume(command.Command): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(SetVolume, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'volume', metavar='<volume>', help='Volume to change (name or ID)', ) <NEW_LINE> parser.add_argument( '--name', metavar='<name>...
Set volume properties
625990603539df3088ecd94d
class XSBCompileError(Exception): <NEW_LINE> <INDENT> pass
Exception raised if loaded module has compile errors.
62599060d268445f2663a6b5
class PrivateUserApiTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> self.user = create_user(email="hippolyte.leveque@gmail.com", password="test123", name="Hippo") <NEW_LINE> self.client.force_authenticate(user=self.user) <NEW_LINE> <DEDENT> def test_retrieve...
Test API requests that require authentication
62599060a8ecb033258728c8
class UserProfile(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, unique=True) <NEW_LINE> phone = models.CharField(max_length=14, null=True) <NEW_LINE> mobile_phone = models.CharField(max_length=14, null=True) <NEW_LINE> home_address = models.CharField(max_length=255, null=True) <NEW_LINE> home_addres...
User profile
6259906099cbb53fe6832592
class ImportanceTracker: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.mean = 0 <NEW_LINE> self.sum_squares = 0 <NEW_LINE> self.N = 0 <NEW_LINE> <DEDENT> def update(self, scores, num_samples=None): <NEW_LINE> <INDENT> if num_samples is None: <NEW_LINE> <INDENT> self.N += len(scores) <NEW_LINE> diff =...
For tracking feature importance using a dynamic average.
625990604a966d76dd5f05a4
class LiveRailAuth(AuthBase): <NEW_LINE> <INDENT> def __init__(self, token): <NEW_LINE> <INDENT> self.token = token <NEW_LINE> <DEDENT> def __call__(self, request): <NEW_LINE> <INDENT> url = request.url.split('?') <NEW_LINE> if request.body: <NEW_LINE> <INDENT> request.body += "&token={}".format(self.token) <NEW_LINE> ...
Does the authentication for Console requests.
62599060d486a94d0ba2d679
class PrimaryPathBTreeFolder2(BTreeFolder2): <NEW_LINE> <INDENT> def _setObject(self, id, obj, roles=None, user=None, set_owner=1): <NEW_LINE> <INDENT> obj.__primary_parent__ = aq_base(self) <NEW_LINE> return ObjectManager._setObject(self, id, obj, roles, user, set_owner) <NEW_LINE> <DEDENT> def _delObject(self, id, dp...
BTreeFolder2 PrimaryPathObjectManager.
62599060435de62698e9d4b8
class PageScreenDialog(QDialog, Ui_PageScreenDialog): <NEW_LINE> <INDENT> def __init__(self, view, visibleOnly=False, parent=None): <NEW_LINE> <INDENT> super(PageScreenDialog, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.setWindowFlags(Qt.Window) <NEW_LINE> self.__view = view <NEW_LINE> self.__c...
Class documentation goes here.
62599060442bda511e95d8b2
class FloatField(BaseField): <NEW_LINE> <INDENT> def __init__(self, required=True, default=None, label=None, value=None): <NEW_LINE> <INDENT> self.required, self.default, self.label, self.value = required, default, label, value <NEW_LINE> if self.default is not None: <NEW_LINE> <INDENT> self.value = self.default <NEW_L...
Class to generate Float field types.
625990603c8af77a43b68a9a
class BTNotificationDebugParams(object): <NEW_LINE> <INDENT> openapi_types = { 'debug_submitted': 'bool' } <NEW_LINE> attribute_map = { 'debug_submitted': 'debugSubmitted' } <NEW_LINE> def __init__(self, debug_submitted=None): <NEW_LINE> <INDENT> self._debug_submitted = None <NEW_LINE> self.discriminator = None <NEW_LI...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62599060adb09d7d5dc0bc1c
class ViewFeedback(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> base = Container() <NEW_LINE> mh.set_language_from_settings(request) <NEW_LINE> base.form = forms.FeedbackForm() <NEW_LINE> base.form.action_url_name = "feedback_page" <NEW_LINE> base.utc_comment = "utc_empty_FeedBackForm" <NEW_LI...
Show and Process the Feedback-Form
62599060e64d504609df9f27
class VendingMachine(object): <NEW_LINE> <INDENT> def __init__(self, name, product_price): <NEW_LINE> <INDENT> self.stock = 0 <NEW_LINE> self.price = product_price <NEW_LINE> self.balance = 0 <NEW_LINE> self.change = 0 <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def restock(self, amount): <NEW_LINE> <INDENT> self.s...
A vending machine that vends some product for some price. >>> v = VendingMachine('candy', 10) >>> v.vend() 'Machine is out of stock.' >>> v.restock(2) 'Current candy stock: 2' >>> v.vend() 'You must deposit $10 more.' >>> v.deposit(7) 'Current balance: $7' >>> v.vend() 'You must deposit $3 more.' >>> v.deposit(5) 'Cur...
625990604428ac0f6e659be4
class DynamicWidget(object): <NEW_LINE> <INDENT> def __init__(self, default): <NEW_LINE> <INDENT> self.default = default <NEW_LINE> <DEDENT> def connectValueChanged(self, callback, *args): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def setWidgetValue(self, value): <NEW_LINE> <INDENT> raise NotImp...
An interface which provides a uniform way to get, set, and observe widget properties
6259906038b623060ffaa3a9
class MarshmallowMongoengineError(Exception): <NEW_LINE> <INDENT> pass
Base exception class from which all exceptions related to marshmallow-mongoengine inherit.
6259906063d6d428bbee3de1
class ShiftPaned(gtk.VBox): <NEW_LINE> <INDENT> _state = SHOW_BOTH <NEW_LINE> _left_args = () <NEW_LINE> _left_kwargs = {} <NEW_LINE> _right_args = () <NEW_LINE> _right_kwargs = {} <NEW_LINE> left_widget = None <NEW_LINE> right_widget = None <NEW_LINE> def has_both_widgets(self): <NEW_LINE> <INDENT> return self.right_w...
A ShiftPaned is a gtk.Paned that can hide one of its child widgets, therefore hiding the pane division.
6259906045492302aabfdb8c
class KAR_030a: <NEW_LINE> <INDENT> play = Summon(CONTROLLER, "KAR_030")
Pantry Spider
6259906076e4537e8c3f0c3f
class MessageAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> model = Message <NEW_LINE> list_display = ('url', 'subject') <NEW_LINE> search_display = ('url', 'subject') <NEW_LINE> fields = ('url', 'subject', 'email_body', 'slack_body')
Admin for the Message model.
625990604f6381625f199ffc
class TestViewExamcreate(TestCase): <NEW_LINE> <INDENT> expected_status_code = 200 <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.res = self.client.get(reverse("choice:exam-create")) <NEW_LINE> <DEDENT> def test_should_return_expected_return_code(self): <NEW_LINE> <INDENT> self.assertEqual(self.res.status_code, s...
Test view choice:exam-create
62599060a8370b77170f1a80
@attr('shard_2') <NEW_LINE> class TestCheckoutWithEcommerceService(ModuleStoreTestCase): <NEW_LINE> <INDENT> @httpretty.activate <NEW_LINE> @override_settings(ECOMMERCE_API_URL=TEST_API_URL, ECOMMERCE_API_SIGNING_KEY=TEST_API_SIGNING_KEY) <NEW_LINE> def test_create_basket(self): <NEW_LINE> <INDENT> user = UserFactory.c...
Ensures correct behavior in the function `checkout_with_ecommerce_service`.
62599060435de62698e9d4b9
class WReN(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_channels: int = 32, use_object_triples: bool = False, use_layer_norm: bool = False): <NEW_LINE> <INDENT> super(WReN, self).__init__() <NEW_LINE> if use_object_triples: <NEW_LINE> <INDENT> self.group_objects = GroupObjectsIntoTriples(num_objects=8) <NEW_L...
Wild Relation Network (WReN) [1] for solving Raven's Progressive Matrices. The originally proposed model uses a Relation Network (RN) [2] which works on object pairs. This implementation allows to extend the RN to work on object triples (by setting use_object_triples=True). Using larger tuples is impractical, as the me...
6259906024f1403a92686427
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> filename = 'rich_string12.xlsx' <NEW_LINE> test_dir = 'xlsxwriter/test/comparison/' <NEW_LINE> self.got_filename = test_dir + '_test_' + filename <NEW_LINE> self.exp_filename = test_d...
Test file created by XlsxWriter against a file created by Excel.
625990608e71fb1e983bd17d
class IssueViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Issue.objects.all() <NEW_LINE> serializer_class = IssueSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticatedOrReadOnly,) <NEW_LINE> def create(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if(request.query_params): <NEW_L...
This viewset automatically provides `list`, `create`, `retrieve`, `update` and `destroy` actions.
625990607cff6e4e811b70f8
class JSONParser(Parser): <NEW_LINE> <INDENT> options = [ 'property', ] <NEW_LINE> def __init__(self, loader, force_parse=False, property=None): <NEW_LINE> <INDENT> self.__loader = loader <NEW_LINE> self.__property = property <NEW_LINE> self.__force_parse = force_parse <NEW_LINE> self.__extended_rows = None <NEW_LINE> ...
Parser to parse JSON data format.
625990600a50d4780f706918
class CurrentSiteThemeMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> request.site_theme = SiteTheme.get_theme(request.site)
Middleware that sets `site_theme` attribute to request object.
6259906099cbb53fe6832594
class GrokUILayout(grok.Layout): <NEW_LINE> <INDENT> grok.context(IGrokUIRealm) <NEW_LINE> title = u"Grok User Interface" <NEW_LINE> def update(self): <NEW_LINE> <INDENT> resource.grok_css.need() <NEW_LINE> resource.favicon.need() <NEW_LINE> self.baseurl = absoluteURL(self.context, self.request) + '/'
The general layout for the administration
6259906001c39578d7f1428e
class IOSampleReceived(XBeeEvent): <NEW_LINE> <INDENT> pass
This event is fired when a XBee receives an IO packet. This includes: 1. IO data sample RX indicator packet. 2. RX IO 16 packet. 3. RX IO 64 packet. The callbacks that handle this event will receive the following arguments: 1. io_sample (:class:`.IOSample`): the received IO sample. 2. sender (:class:`.Remote...
625990602ae34c7f260ac799
class DecryptResource: <NEW_LINE> <INDENT> def on_post(self, req, resp): <NEW_LINE> <INDENT> data = req.media['data'] <NEW_LINE> password = req.media['password'] <NEW_LINE> result = decryptData(data, password) <NEW_LINE> resp.media = { "OK": "true", "result": { "decrypted": json.loads(result['decrypted']), "timeMs": re...
handles decryption
6259906067a9b606de5475fb
class camera_list(authorized_event): <NEW_LINE> <INDENT> pass
A new camera event has been generated by the client
62599060004d5f362081fb49
class DocumentsUnit(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.documents_unit={ "_id":"", "title":"", "court":"", "url":"", "content":"", "criminal":"", "date":"" }
the class in define a dict of userinfo,include:
6259906007f4c71912bb0af1
class AggregateOutputs(luigi.Task): <NEW_LINE> <INDENT> task_namespace = 'output' <NEW_LINE> host = luigi.Parameter() <NEW_LINE> job = luigi.Parameter() <NEW_LINE> launch_id = luigi.Parameter() <NEW_LINE> state = luigi.Parameter() <NEW_LINE> outputs = luigi.ListParameter() <NEW_LINE> def requires(self): <NEW_LINE> <IND...
Takes the results of the ordered series of checkpoints/crawl stages and builds versioned aggregated packages from them.
6259906066673b3332c31ab0
class Dataset(object): <NEW_LINE> <INDENT> data_model = None <NEW_LINE> def __init__(self, queryset, context): <NEW_LINE> <INDENT> self.queryset = queryset <NEW_LINE> self.context = context <NEW_LINE> self.models = [] <NEW_LINE> for item in queryset: <NEW_LINE> <INDENT> self.models.append(self.data_model(item))
Dataset is a class to gather relative items into a group.
625990618da39b475be0489c
class Request: <NEW_LINE> <INDENT> def to_bytes(self): <NEW_LINE> <INDENT> result = io.BytesIO() <NEW_LINE> result.write(ServerIO.HEADER) <NEW_LINE> ServerIO.write_bytes(result, ServerIO.PROTOCOL_VERSION) <NEW_LINE> return result.getvalue() <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def create_from_bytes(bytes_): <NE...
A parsed object representation of a request payload.
62599061baa26c4b54d50956
class UniformSpaceSampler(SpaceSampler): <NEW_LINE> <INDENT> with_zero_values = Bool(False) <NEW_LINE> def generate_space_sample(self, **kwargs): <NEW_LINE> <INDENT> yield from self._get_sample_point() <NEW_LINE> <DEDENT> def _get_sample_point(self): <NEW_LINE> <INDENT> n_combinations = self.resolution <NEW_LINE> if no...
UniformSpaceSampler provides all possible combinations of weights adding to 1, such that the sampling points are uniformly distributed along each axis. For example, a dimension 3 will give all combinations (x, y, z), where $ x + y + z = 1.0, and (x, y, z) can realise only specified equidistant values. The `resolution`...
62599061379a373c97d9a6d8
class PyAssocCObject(object): <NEW_LINE> <INDENT> def __new__(cls): <NEW_LINE> <INDENT> raise Exception('This class just for typing, can not be instanced!')
An internal class.
6259906124f1403a92686428
class BDPC_Sensor(vw.vw_Base): <NEW_LINE> <INDENT> def __init__(self, master, model, sensor, **kwargs): <NEW_LINE> <INDENT> vw.vw_Base.__init__(self, master, 8, 2) <NEW_LINE> self.instr = model <NEW_LINE> self.sensor = sensor <NEW_LINE> name = self.instr.getSensorDescription(sensor) <NEW_LINE> units = self.instr.getSen...
ICP Sensor Class is a specific type of register for sensors. TODO: Add Calibration editor
62599061dd821e528d6da4db
class StackedResidual(Model): <NEW_LINE> <INDENT> INCEPT_TYPE = 'incept' <NEW_LINE> STACKED_CONV_TYPE = 'stacked_conv' <NEW_LINE> @configurable(get_configs_view(), with_name=True) <NEW_LINE> def __init__(self, name, input_tensor, *, nb_layers=None, block_type=None, **config): <NEW_LINE> <INDENT> super().__init__(name, ...
Sub model name: sub_{0..nb_layers}
62599061460517430c432bad
class Product(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String(100), unique=True) <NEW_LINE> description = db.Column(db.String(200)) <NEW_LINE> price = db.Column(db.Float) <NEW_LINE> qty = db.Column(db.Integer)
class to hold product data
6259906132920d7e50bc76fa
class Match(object): <NEW_LINE> <INDENT> @property <NEW_LINE> def match(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @match.setter <NEW_LINE> def match(self, value): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self...
Represent match action in a route map
6259906132920d7e50bc76fb
class DKPro: <NEW_LINE> <INDENT> def __init__(self, jar, xms="4g"): <NEW_LINE> <INDENT> self.jar = jar <NEW_LINE> self.xms = xms <NEW_LINE> self._check() <NEW_LINE> <DEDENT> def process(self, **parameters): <NEW_LINE> <INDENT> return dkpro.core.call(self.jar, self.xms, **parameters) <NEW_LINE> <DEDENT> def _check(self)...
DARIAH DKPro-Wrapper.
62599061a219f33f346c7ebb
class FmtFontsize(TableFormatter): <NEW_LINE> <INDENT> def __init__(self, fontsize, format='px', rows=None, columns=None, apply_to_header_and_index=True): <NEW_LINE> <INDENT> super(FmtFontsize, self).__init__(rows, columns) <NEW_LINE> self.fontsize = fontsize <NEW_LINE> self.format = format <NEW_LINE> return <NEW_LINE>...
Set fontsize in table cells.
6259906107f4c71912bb0af2
class Selector(ABC, Generic[AnyStr]): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def __call__(self, _entry: "os.DirEntry[AnyStr]") -> bool: <NEW_LINE> <INDENT> ... <NEW_LINE> <DEDENT> def __or__(self, other: "Selector") -> "SelectAny": <NEW_LINE> <INDENT> parts: List[Selector] = [] <NEW_LINE> for s in [self, other]...
.. versionadded:: 0.3.0 Base class for selectors
625990614f88993c371f1079
class LongitudinalCE: <NEW_LINE> <INDENT> def __init__(self, model_files, labels=None): <NEW_LINE> <INDENT> self.models = [kenlm.Model(f) for f in model_files] <NEW_LINE> self.labels = labels or range(len(self.models)) <NEW_LINE> <DEDENT> def score(self, sent): <NEW_LINE> <INDENT> return [cross_entropy(model.score(sent...
Pass a list of strings, each a filepath to a kenlm model
625990614a966d76dd5f05a8
class SmoothedValue(object): <NEW_LINE> <INDENT> def __init__(self, window_size): <NEW_LINE> <INDENT> self.deque = deque(maxlen=window_size) <NEW_LINE> <DEDENT> def add_value(self, value): <NEW_LINE> <INDENT> self.deque.append(value) <NEW_LINE> <DEDENT> def get_median_value(self): <NEW_LINE> <INDENT> return np.median(s...
Track a series of values and provide access to smoothed values over a window or the global series average.
625990615166f23b2e244a87
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> objects = User...
Database model for users in the system
62599061ac7a0e7691f73b99
class UnicastDnsSdClientProtocol(asyncio.Protocol): <NEW_LINE> <INDENT> def __init__(self, services: typing.List[str], host: str, timeout: int): <NEW_LINE> <INDENT> self.queries = create_service_queries(services, QueryType.PTR) <NEW_LINE> self.host = host <NEW_LINE> self.timeout = timeout <NEW_LINE> self.transport = No...
Protocol to make unicast requests.
62599061adb09d7d5dc0bc20
class TextUnitProperty(TimeStampedModel): <NEW_LINE> <INDENT> created_date = models.DateTimeField(auto_now_add=True) <NEW_LINE> modified_date = models.DateTimeField(auto_now=True) <NEW_LINE> created_by = models.ForeignKey(User, related_name="created_%(class)s_set", null=True, blank=True, db_index=False, on_delete=SET_N...
TextUnitProperty object model TextUnitProperty is a flexible class for creating key-value properties for a :class:`TextUnit<apps.document.models.TextUnit>`. Each TextUnit can have zero or more TextUnitProperty records, which may be used either at document ingestion to store metadata, such as Track Changes or annotati...
6259906155399d3f05627bd5
class Doublet2D(object): <NEW_LINE> <INDENT> def __init__(self, location, strength): <NEW_LINE> <INDENT> self.flow_type = 'doublet' <NEW_LINE> self.location = location <NEW_LINE> self.strength = strength <NEW_LINE> <DEDENT> @property <NEW_LINE> def xs(self): <NEW_LINE> <INDENT> return self.location[0] <NEW_LINE> <DEDEN...
Class method for modeling 2D doublet potential flow singularities.
625990614428ac0f6e659be8
class CosReduce(GATReduce): <NEW_LINE> <INDENT> def __init__(self, attn_drop, aggregator=None): <NEW_LINE> <INDENT> super(CosReduce, self).__init__(attn_drop, aggregator) <NEW_LINE> <DEDENT> def forward(self, nodes): <NEW_LINE> <INDENT> a1 = torch.unsqueeze(nodes.data['a1'], 1) <NEW_LINE> a2 = nodes.mailbox['a2'] <NEW_...
used in Gaan
62599061cb5e8a47e493cce0
class Fitting(Boolean): <NEW_LINE> <INDENT> def Delete(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Insert(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Modify(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Select(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Plane = property(lambda ...
Fitting()
62599061d6c5a102081e37da
class IThemeSpecific(IDefaultPloneLayer): <NEW_LINE> <INDENT> pass
Marker interface that defines a Zope 3 browser layer.
6259906163d6d428bbee3de3
class Boolean(_Type): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> super(Boolean, self).__init__(type_="boolean", **kw)
Json-schema integer type
625990616e29344779b01d05
class NachosTime(TimeMeasurement): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> TimeMeasurement.__init__(self, 'tsc', value, 'Nachos', 0, 0)
NachosTime is a specific case of the Data Streams Post Processing TimeMeasurement class. The specificity to Nachos is NachosTime is always measured in Ticks, it is generated by Nachos, and because of the nature of Nachos, there is not any error associated with it.
625990614e4d562566373abd
class RawMem: <NEW_LINE> <INDENT> encoding = "" <NEW_LINE> cont = [] <NEW_LINE> hash = None <NEW_LINE> """ Abstract class RawMem """ <NEW_LINE> def __init__(self, buf=None, rawASCII=False): <NEW_LINE> <INDENT> this_buf = [] if buf is None else buf <NEW_LINE> self.msgs = this_buf <NEW_LINE> self.hash = dict() <NEW_LINE>...
Raw Memory class
62599061435de62698e9d4bd
class FileHandler(object): <NEW_LINE> <INDENT> def __init__(self, mode): <NEW_LINE> <INDENT> self.file_name = "ProblemAndAnswer.txt" <NEW_LINE> self.mode = mode <NEW_LINE> self.file_object = open(self.file_name, self.mode) <NEW_LINE> <DEDENT> def mod_string(self): <NEW_LINE> <INDENT> defined_string = self.file_object.r...
Class that handles reading and writing to file
625990613d592f4c4edbc593
class bmcRouter(DirectRouter): <NEW_LINE> <INDENT> def _getFacade(self): <NEW_LINE> <INDENT> return Zuul.getFacade('BMCAdapter', self.context) <NEW_LINE> <DEDENT> def routerbs(self, deviceip, bootsequence, cfgboottype): <NEW_LINE> <INDENT> facade = self._getFacade() <NEW_LINE> devobject = self.context <NEW_LINE> succes...
BMC Router
625990617cff6e4e811b70fc
class StoneEncoderInterface(object): <NEW_LINE> <INDENT> def encode(self, validator, value): <NEW_LINE> <INDENT> raise NotImplementedError
Interface defining a stone object encoder.
62599061cc0a2c111447c62a
class TestFillNan(unittest.TestCase): <NEW_LINE> <INDENT> def test_fill_nan(self): <NEW_LINE> <INDENT> a = np.array([0.1, 0.2, np.nan, 0.4, 0.5]) <NEW_LINE> np.testing.assert_almost_equal( fill_nan(a), np.array([0.1, 0.2, 0.3, 0.4, 0.5]), decimal=7 ) <NEW_LINE> np.testing.assert_almost_equal( fill_nan(a, method="Consta...
Define :func:`colour.utilities.array.fill_nan` definition unit tests methods.
6259906191af0d3eaad3b4de
class Rq(): <NEW_LINE> <INDENT> def __init__(self,inid,name,pid,pname): <NEW_LINE> <INDENT> self.inid=0 <NEW_LINE> self.name=u'' <NEW_LINE> self.pid=0 <NEW_LINE> self.pname=u'' <NEW_LINE> self.cgid=0 <NEW_LINE> self.cgname=u'' <NEW_LINE> self.sb={} <NEW_LINE> <DEDENT> def addSb(self,tid,tname): <NEW_LINE> <INDENT> self...
殖民入侵记录表
625990613eb6a72ae038bd16