code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@admin.register(Post) <NEW_LINE> class PostAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('title', 'slug', 'author', 'publish', 'status') <NEW_LINE> list_filter = ('status', 'created', 'publish', 'author') <NEW_LINE> search_fields = ('title', 'body') <NEW_LINE> prepopulated_fields = {'slug': ('title',)} <...
Model registered using custom class that inherits from ModelAdmin.
62598edd8c0ade5d55dc293b
class AuthorViewSet(MixinCheckServer, RetrieveAPIView): <NEW_LINE> <INDENT> serializer_class = serializers.AuthorAltSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> server = self.request.META.get("HTTP_AUTHORIZATION") <NEW_LINE> if not self.checkserver(server): <NEW_LINE> <INDENT> return [] <NEW_LINE> ...
Returns a single author.
62598eddd53ae8145f9169fa
class TestAdapters(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.factory = RequestFactory() <NEW_LINE> <DEDENT> def test_account_adapter(self): <NEW_LINE> <INDENT> request = self.factory.get('') <NEW_LINE> result = AccountAdapter().is_open_for_signup(request) <NEW_LINE> self.assertTrue(result...
Tests the adapters.
62598edd56b00c62f0fb0e3f
class Profile(BaseModel): <NEW_LINE> <INDENT> def __init__(self, id=None, user=None ,first_name=None, last_name=None, email=None): <NEW_LINE> <INDENT> super(Profile, self).__init__(id) <NEW_LINE> self._first_name = first_name <NEW_LINE> self._last_name = last_name <NEW_LINE> self._email = email <NEW_LINE> self._user = ...
User which will be querying resources from the API.
62598edd925a0f43d25e659d
class SetLearningRate: <NEW_LINE> <INDENT> def __init__(self, layer, lamb, is_ada=True): <NEW_LINE> <INDENT> self.layer = layer <NEW_LINE> self.lamb = lamb <NEW_LINE> self.is_ada = is_ada <NEW_LINE> <DEDENT> def __call__(self, inputs): <NEW_LINE> <INDENT> with K.name_scope(self.layer.name): <NEW_LINE> <INDENT> if not s...
层的一个包装,用来设置当前层的学习率
62598eddc432627299fa1525
class DataSourceTag(models.Model): <NEW_LINE> <INDENT> tag = models.ForeignKey(Tag) <NEW_LINE> source = models.ForeignKey(DataSource) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return u'%s: %s' %(self.source.name, self.tag.name) <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> unique_together = ['tag', 's...
Data source tag
62598edd10dbd63aa1c6f0e0
class Component(db.Model): <NEW_LINE> <INDENT> __tablename__ = "components" <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String(255), nullable=False, unique=True) <NEW_LINE> description = db.Column(db.Text) <NEW_LINE> link = db.Column(db.Text) <NEW_LINE> status = db.Column(db.I...
Using a create a component [description] Extends: db.Model Variables: __tablename__ {str} -- [table name in database] id {[int]} -- [the id of a component] name {[string(255)]} -- [the name of a component] description {[text]} -- [Description of the component] link {[text]} -- [A hyperlink to...
62598eddd7e4931a7ef3a60c
class SenderReceiverLimits(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(SenderReceiverLimits, cls).setUpClass() <NEW_LINE> policy_config_path = os.path.join(DIR, 'policy-3') <NEW_LINE> config = Qdrouterd.Config([ ('router', {'mode': 'standalone', 'id': 'QDR.Polic...
Verify that policy can limit senders and receivers by count.
62598edd462c4b4f79db9f69
class SuperGSLType(object): <NEW_LINE> <INDENT> def eval(self) -> 'SuperGSLType': <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def print(self) -> str: <NEW_LINE> <INDENT> return str(self) <NEW_LINE> <DEDENT> @property <NEW_LINE> def help(cls) -> Optional[str]: <NEW_LINE> <INDENT> return getdoc(cls) <NEW_LINE> <D...
Base class defining types available in SuperGSL.
62598edd5fdd1c0f98e5c51d
class InvalidSessionIdException(WebDriverException): <NEW_LINE> <INDENT> pass
Occurs if the given session id is not in the list of active sessions, meaning the session either does not exist or that it's not active.
62598edd3eb6a72ae0388bb0
class MyHTMLWidget(forms.widgets.Widget): <NEW_LINE> <INDENT> def render(self, name, value, attrs=None): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> return format_html(value)
Widget that display (non-editably) arbitrary html.
62598edd7d847024c075a93f
class TablesValueListEntry(_messages.Message): <NEW_LINE> <INDENT> friendlyName = _messages.StringField(1) <NEW_LINE> id = _messages.StringField(2) <NEW_LINE> kind = _messages.StringField(3, default=u'bigquery#table') <NEW_LINE> tableReference = _messages.MessageField('TableReference', 4) <NEW_LINE> type = _messages.St...
A TablesValueListEntry object. Fields: friendlyName: The user-friendly name for this table. id: An opaque ID of the table kind: The resource type. tableReference: A reference uniquely identifying the table. type: The type of table. Possible values are: TABLE, VIEW.
62598edd63b5f9789fe836e1
class IActivityServiceStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.GetActivityPaging = channel.unary_unary( '/app.IActivityService/GetActivityPaging', request_serializer=GetActivityPagingRequest.SerializeToString, response_deserializer=GetActivityPagingResponse.FromString, )
慢钱宝app精彩活动服务api
62598edd63d6d428bbee0d42
class NeuralNetworkConfig: <NEW_LINE> <INDENT> def __init__(self, num_layers=1): <NEW_LINE> <INDENT> self.learning_rate = 0.05 <NEW_LINE> self.momentum = 0.1 <NEW_LINE> self.num_steps = 5000 <NEW_LINE> self.batch_size = 256 <NEW_LINE> self.activations = {"encoder": [], "decoder": []} <NEW_LINE> self.dropout_rates = {"e...
Configuration for the neural network and the training process. Attributes: learnins_rate: Learning Rate momentum: Momentum num_steps: Number of steps for each training session batch_size: Number of samples for each training step activations: Dictionary of activation functions. Separated into ...
62598edd23849d37ff84f62a
class NodeState(object): <NEW_LINE> <INDENT> def __init__(self, state=None, reason=None): <NEW_LINE> <INDENT> self.swagger_types = { 'state': 'str', 'reason': 'str' } <NEW_LINE> self.attribute_map = { 'state': 'state', 'reason': 'reason' } <NEW_LINE> self._state = state <NEW_LINE> self._reason = reason <NEW_LINE> <DEDE...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edd21a7993f00c644dc
class WebsiteSeoMetadata(models.Model): <NEW_LINE> <INDENT> _inherit = 'website.seo.metadata' <NEW_LINE> seo_url = fields.Char( string='SEO Url', translate=True, help='If you fill out this field ' 'manually the allowed characters are a-z, A-Z, 0-9, - and _.') <NEW_LINE> seo_url_redirect = fields.Char(string='SEO Url Re...
Add additional SEO fields which can be used by other models.
62598eddf7d966606f746560
class Data(): <NEW_LINE> <INDENT> def __init__(self, url, filename): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.filename = filename
Stores url and filenames
62598eddeab8aa0e5d30a2e8
class Demo(ChrisApp): <NEW_LINE> <INDENT> PACKAGE = __package__ <NEW_LINE> TITLE = 'COVID-Net inference for chest x-ray' <NEW_LINE> CATEGORY = '' <NEW_LINE> TYPE = 'ds' <NEW_LINE> ICON = '' <NEW_LINE> MAX_NUMBER_OF_WORKERS = 1 <NEW...
demo
62598edd01c39578d7f11318
class CayenneMessage: <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> topic_tokens = msg.topic.split('/') <NEW_LINE> self.client_id = topic_tokens[3] <NEW_LINE> self.topic = topic_tokens[4] <NEW_LINE> self.channel = int(topic_tokens[5]) <NEW_LINE> if isinstance(msg.payload, str): <NEW_LINE> <INDENT> pa...
This is a class that describes an incoming Cayenne message. It is passed to the on_message callback as the message parameter. Members: client_id : String. Client ID that the message was published on. topic : String. Topic that the message was published on. channel : Int. Channel that the message was published on. msg...
62598edda17c0f6771d5a7cc
class NSNitroNserrReadCert(NSNitroGentoolErrors): <NEW_LINE> <INDENT> pass
Nitro error code 1629 Error in reading input certficate file
62598edd7cff6e4e811b3f5f
class SpecPostunRenderer(SpecSectionRenderer): <NEW_LINE> <INDENT> obj = SpecStPostun
%changelog renderer @cvar obj: sections rendered by this renderer
62598eddbd1bec0571e14384
class replicatedSharedIntervals(cpgTracker): <NEW_LINE> <INDENT> mPattern = "_replicated_shared_intervals$" <NEW_LINE> def __call__(self, track, slice=None): <NEW_LINE> <INDENT> data = self.getFirstRow( "SELECT COUNT(*) as number, round(AVG(stop-start),0) as length FROM %(track)s_replicated_shared_intervals" % locals()...
Summary stats of intervals called by the peak finder.
62598edd236d856c2adc86cc
class RXlconnect(Package): <NEW_LINE> <INDENT> homepage = "http://miraisolutions.wordpress.com/" <NEW_LINE> url = "https://cran.r-project.org/src/contrib/XLConnect_0.2-11.tar.gz" <NEW_LINE> list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnect" <NEW_LINE> version('0.2-11', '9d1769a103cda05665df399cc...
Provides comprehensive functionality to read, write and format Excel data.
62598edd56b00c62f0fb0e41
class PlatformAdd(LoginRequiredMixin, CreateView): <NEW_LINE> <INDENT> model = platform <NEW_LINE> form_class = PlatformForm <NEW_LINE> template_name = 'base_info/platform/platform-add-update.html' <NEW_LINE> success_url = reverse_lazy('base_info:platform_list')
增加
62598edd498bea3a75a560a7
class SQLiteDBMS(AbstractDBMS) : <NEW_LINE> <INDENT> conn_parm_names = {"create" : parse_bool, "filename" : str, "write" : parse_bool} <NEW_LINE> def __init__(self, filename, create = False, write = True) : <NEW_LINE> <INDENT> self.conn = sqlite.Connection ( filename, flags = (sqlite.SQLITE_OPEN_READONLY, sqli...
handles connections to SQLite databases.
62598eddb5575c28eb711f89
class RecursiveDepthError(AddressLookupError): <NEW_LINE> <INDENT> pass
Raised when there are too many recursive calls to calculate the fingerprint.
62598edd2c8b7c6e89bd1d31
class QuestionBag(BaseQuestion): <NEW_LINE> <INDENT> title = 'something from a bag' <NEW_LINE> @classmethod <NEW_LINE> def variation_count(cls): <NEW_LINE> <INDENT> return sum([b.variation_count() for b in cls.questions]) <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> questions = self.__class__.questions <...
A random question from a list of question classes
62598edd56ac1b37e630075e
class STATe(SCPINode, SCPIBool): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "STATe" <NEW_LINE> args = ["1", "ON", "OFF"]
AMPLitude:OUT:STATe Arguments: 1, ON, OFF
62598edd1f037a2d8b9e2677
class getFailureReason(Handler): <NEW_LINE> <INDENT> def setup(self, user_id): <NEW_LINE> <INDENT> self.user_id = user_id
info method class.
62598eddac7a0e7691f70a84
class UnknownProcessNodeError(Error): <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.msg)
Exception raised for ProcessNodes types that are unknown or unsupported. Attributes: expr -- input expression in which the error occurred msg -- explanation of the error
62598edd596a8972361261d1
class ESCCCField(RegexField): <NEW_LINE> <INDENT> default_error_messages = { 'invalid': _('Please enter a valid bank account number in format XXXX-XXXX-XX-XXXXXXXXXX.'), 'checksum': _('Invalid checksum for bank account number.'), } <NEW_LINE> def __init__(self, max_length=None, min_length=None, *args, **kwargs): <NEW_L...
A form field that validates its input as a Spanish bank account or CCC (Codigo Cuenta Cliente). Spanish CCC is in format EEEE-OOOO-CC-AAAAAAAAAA where: E = entity O = office C = checksum A = account It's also valid to use a space as delimiter, or to use no delimiter. Firs...
62598eddbe8e80087fbbd5be
class graphSLAM: <NEW_LINE> <INDENT> def __init__(self, measurement_noise=2, motion_noise=2): <NEW_LINE> <INDENT> self.Omega = np.zeros((3,3)) <NEW_LINE> self.Xi = np.zeros((3,1)) <NEW_LINE> self.measurement_noise = measurement_noise <NEW_LINE> self.motion_noise = motion_noise <NEW_LINE> <DEDENT> def process(self, meas...
Implementation of a graph-based Simultaneous Localization and Mapping (SLAM) algorithm. Reference: http://robots.stanford.edu/papers/thrun.graphslam.pdf
62598edd379a373c97d9756c
class Linear(nn.Linear, QuantedLayer): <NEW_LINE> <INDENT> def __init__(self, in_features: int, out_features: int, bias: bool = False, quantize: bool = False, bitness: int = 0): <NEW_LINE> <INDENT> super(Linear, self).__init__(in_features, out_features, bias) <NEW_LINE> self.quant = Quantizer(quantize, bitness) <NEW_LI...
Overwritten pytorch Linear layer with adding quantizing attributes and methods
62598edd57b8e32f525073c0
class MultiMediaTooLong(BadRequest): <NEW_LINE> <INDENT> ID = "MULTI_MEDIA_TOO_LONG" <NEW_LINE> MESSAGE = __doc__
The album contains more than 10 items
62598edd009cb60464cffac3
class Base(object): <NEW_LINE> <INDENT> TIMEOUT = 200 <NEW_LINE> RETRIES = 10 <NEW_LINE> verbose = True <NEW_LINE> gradebookid = None <NEW_LINE> def __init__( self, cert, urlbase='https://learning-modules.mit.edu:8443/', ): <NEW_LINE> <INDENT> self.cert = cert <NEW_LINE> self.urlbase = urlbase <NEW_LINE> if not urlbase...
Base provides the transport for accessing the MIT Learning Modules (LMod). The Base class implements the functions that underlie the HTTP calls to the MIT Learning Modules (LMod) Web service. It shouldn't be instantiated directly as it is inherited by the classes that implement the API. Attributes: cert (unicode...
62598edd85dfad0860cbed23
class PersonType(DjangoObjectType): <NEW_LINE> <INDENT> full_name = graphene.String() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> interfaces = (graphene.relay.Node,) <NEW_LINE> model = Person <NEW_LINE> filter_fields = { 'id': ('exact',), 'forename': ('icontains',), 'surname': ('icontains',), 'memberships__period__perio...
Parliament Person type
62598edd498bea3a75a560a8
class PageStatData(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'PageNumber': 'int', 'WordCount': 'int', 'ParagraphCount': 'int' } <NEW_LINE> self.attributeMap = { 'PageNumber': 'PageNumber','WordCount': 'WordCount','ParagraphCount': 'ParagraphCount'} <NEW_LINE> self.PageNu...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edd67a9b606de544540
class COORD(Structure): <NEW_LINE> <INDENT> _fields_ = [ ('X', SHORT), ('Y', SHORT), ]
struct in wincon.h
62598edd07f4c71912bad9d1
class Sma(Indicator): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def create_indicator(cls, klines: pd.DataFrame, periode: int = 20 ): <NEW_LINE> <INDENT> sma = btalib.sma(klines.copy(), period=periode) <NEW_LINE> sma.df.columns = [f"sma{periode}"] <NEW_LINE> return sma.df <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> de...
SMA indicator
62598eddcad5886f8bdc3871
class Diedometer(object): <NEW_LINE> <INDENT> def __init__(self, dice): <NEW_LINE> <INDENT> self._dice = dice <NEW_LINE> self._meter = [] <NEW_LINE> self._maximums = [] <NEW_LINE> for die in self._dice: <NEW_LINE> <INDENT> self._meter.append(1) <NEW_LINE> self._maximums.append(die.sides) <NEW_LINE> <DEDENT> self._meter...
Iterates through all possible combinations of the dice in a set of dice. Works in the same way an odometer iterates through all combinations of the numbers on its dials. Attributes: _dice: a list of Die objects containing the dice assigned to the diedometer. _maximums: a list of the maximum values of each...
62598edd4e4d56256637098b
class InconsistentExitError(StaticAnalysisError): <NEW_LINE> <INDENT> pass
The type context differs at two different exit points of the routine.
62598eddd6c5a102081e06a2
@_lockfile_metadata_version(2) <NEW_LINE> @dataclass(frozen=True) <NEW_LINE> class LockfileMetadataV2(LockfileMetadata): <NEW_LINE> <INDENT> requirements: set[Requirement] <NEW_LINE> @classmethod <NEW_LINE> def _from_json_dict( cls: Type[LockfileMetadataV2], json_dict: dict[Any, Any], lockfile_description: str, error_s...
Lockfile version that permits specifying a requirements as a set rather than a digest. Validity is tested by the set of requirements strings being the same in the user requirements as those in the stored requirements.
62598edd23849d37ff84f62c
class SliceDetail(generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> model = Slice <NEW_LINE> serializer_class = SliceSerializer <NEW_LINE> renderer_classes = [SliceProfileRenderer, BrowsableAPIRenderer] <NEW_LINE> ctl = [ Renew, Reset, make_upload_file(Slice, 'data', 'data'), ] <NEW_LINE> def put(self, reques...
**Media type:** [`application/json; profile="http://confine-project.eu/schema/registry/v1/slice"`]( http://wiki.confine-project.eu/arch:rest-api#slice_at_registry) This resource describes a slice in the testbed, including its [slivers]( http://wiki.confine-project.eu/arch:rest-api#sliver_at_registry) with ...
62598edd21a7993f00c644de
class CaseInsensitiveAuth: <NEW_LINE> <INDENT> def authenticate(self, username_or_email=None, password=None): <NEW_LINE> <INDENT> users=User.objects.filter(Q(username__iexact=username_or_email) | Q(email__iexact=username_or_email)) <NEW_LINE> if not users: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> user = user...
Authenticate a of User by using a case-insensitive query to check a combination of the supplied email/username and password. To avoid the risk of having two users with similar usernames, distinguished only by letter case (e.g. 'john' and 'John'), consider updateing your User model to save usernames as lower case entri...
62598edd7047854f4633d955
class CSV(DelimitedFormat): <NEW_LINE> <INDENT> delimiter = "," <NEW_LINE> @staticmethod <NEW_LINE> def detect(stream): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> csv.Sniffer().sniff(stream, delimiters=",") <NEW_LINE> return True <NEW_LINE> <DEDENT> except (csv.Error, TypeError): <NEW_LINE> <INDENT> return False
CSV format. Assumes each row is of the form ``text,label``. :: Today is a good day,pos I hate this car.,pos
62598edd67a9b606de544541
class ReturnValueNotSet(object): <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "RETURN_VALUE_NOT_SET"
Special object to indicate methods without return values
62598eddcc0a2c1114479574
class Stock(models.Model): <NEW_LINE> <INDENT> commodity = models.ForeignKey(Commodity, verbose_name=_('Commodity')) <NEW_LINE> color = models.ForeignKey(Color, verbose_name=_('Color'), blank=True, null=True) <NEW_LINE> size = models.ForeignKey(Size, verbose_name=_('Size')) <NEW_LINE> color_extra = models.CharField(_('...
Represents a sub-item of the :model:`catalog.Commodity` with different color, size and amount.
62598edd090684286d592998
class Telefoon(HybridSat): <NEW_LINE> <INDENT> class Types(HybridSat.Types): <NEW_LINE> <INDENT> thuis = 'thuis' <NEW_LINE> tijdelijk = 'tijdelijk' <NEW_LINE> zakelijk = 'zakelijk' <NEW_LINE> mobiel = 'mobiel' <NEW_LINE> pieper = 'pieper' <NEW_LINE> <DEDENT> nummer = Columns.TextColumn()
NummerSoortCodeLijst https://decor.nictiz.nl/art-decor/decor-valuesets--zib1bbr-?id=2.16.840.1.113883.2.4.3.11.60.40.2.3.1.1
62598edd01c39578d7f1131a
class ValidateCollectionsInBackground(jsfile.JSHook): <NEW_LINE> <INDENT> IS_BACKGROUND = True <NEW_LINE> def __init__(self, hook_logger, fixture, shell_options=None): <NEW_LINE> <INDENT> description = "Run background collection validation against all mongods while a test is running" <NEW_LINE> js_filename = os.path.jo...
A hook to run background collection validation against test servers while a test is running.
62598edd8e7ae83300ee7603
class UserFactory(Factory): <NEW_LINE> <INDENT> email = LazyAttribute(lambda m: '{0}@example.com'.format(m.first_name)) <NEW_LINE> first_name = Sequence(lambda n: 'User{0}'.format(n)) <NEW_LINE> last_name = 'Smith' <NEW_LINE> token = Sequence(lambda n: 'Validation{0}'.format(n)) <NEW_LINE> class Meta: <NEW_LINE> <INDEN...
Base User Factory
62598edd498bea3a75a560a9
class LintingFlake8: <NEW_LINE> <INDENT> name = "good-smell" <NEW_LINE> version = __version__ <NEW_LINE> def __init__(self, tree: ast.AST, filename: str): <NEW_LINE> <INDENT> self.tree = tree <NEW_LINE> self.filename = filename <NEW_LINE> <DEDENT> def run(self) -> Generator[Tuple[int, int, str, str], None, None]: <NEW_...
Entry point good smell to be used as a flake8 linting plugin
62598eddd53ae8145f9169fe
class RHVersionCheck(RHAdminBase): <NEW_LINE> <INDENT> def _check_version(self, distribution, current_version=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> response = requests.get(f'https://pypi.org/pypi/{distribution}/json') <NEW_LINE> <DEDENT> except requests.RequestException as exc: <NEW_LINE> <INDENT> Logger....
Check the installed indico version against pypi.
62598edda219f33f346c4dab
class SpecialDetailInputSet(InputSet): <NEW_LINE> <INDENT> def set_ClientID(self, value): <NEW_LINE> <INDENT> super(SpecialDetailInputSet, self)._set_input('ClientID', value) <NEW_LINE> <DEDENT> def set_ClientSecret(self, value): <NEW_LINE> <INDENT> super(SpecialDetailInputSet, self)._set_input('ClientSecret', value) <...
An InputSet with methods appropriate for specifying the inputs to the SpecialDetail Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598edd01c39578d7f1131b
class Mode(Enum): <NEW_LINE> <INDENT> on = "ON" <NEW_LINE> off = "OFF"
Heroku maintenance modes.
62598edddd821e528d6d74bb
class EditPetForm(FlaskForm): <NEW_LINE> <INDENT> photo_url = StringField("Photo URL", validators=[Optional(), URL()]) <NEW_LINE> notes = StringField("Notes") <NEW_LINE> available = BooleanField("Available?")
Form for editing pets.
62598edde1aae11d1e7cdaf8
class PaginateMaxListAPIView(PaginateByMaxMixin, generics.ListAPIView): <NEW_LINE> <INDENT> max_paginate_by = MAX_ITEMS
ListApiView which allows ?limit=max to show all records.
62598eddcb5e8a47e493b433
class CheckConfirmTest(helpers.ExtendedTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> helpers.patch(self, ['clusterfuzz.common.confirm']) <NEW_LINE> <DEDENT> def test_answer_yes(self): <NEW_LINE> <INDENT> self.mock.confirm.return_value = True <NEW_LINE> common.check_confirm('Question?') <NEW_LINE> ...
Tests the check_confirm method.
62598edd5fdd1c0f98e5c521
@Car.register("sportscar_value") <NEW_LINE> class SportsCar(Car): <NEW_LINE> <INDENT> doors = Field[int](int, default=2) <NEW_LINE> type = Field[str](str, default="sportscar_value") <NEW_LINE> def drive(self) -> bool: <NEW_LINE> <INDENT> return True
Alternate car
62598edd009cb60464cffac4
class ValkyrieApi(object): <NEW_LINE> <INDENT> app = MimicApp() <NEW_LINE> def __init__(self, core): <NEW_LINE> <INDENT> self.core = core <NEW_LINE> <DEDENT> @app.route('/login', methods=['POST']) <NEW_LINE> def login(self, request): <NEW_LINE> <INDENT> return self.core.valkyrie_store.create_token(request) <NEW_LINE> <...
Rest endpoints for the Valkyrie API.
62598edd627d3e7fe0e053fb
class Tab(wx.Panel): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> wx.Panel.__init__(self, parent) <NEW_LINE> self.figure = Figure() <NEW_LINE> self.axes = self.figure.add_subplot(111) <NEW_LINE> self.canvas = FigCanvas(self, -1, self.figure) <NEW_LINE> self.axes.set_xlabel("Time") <NEW_LINE> self...
Stupid tab for test
62598edd3539df3088eca826
class Distribution(object): <NEW_LINE> <INDENT> def __init__(self, edition=None, version=None): <NEW_LINE> <INDENT> edition = edition.lower() if edition else "community" <NEW_LINE> if edition in editions: <NEW_LINE> <INDENT> self.edition = edition <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise ValueError("Unknown ...
Represents a Neo4j archive.
62598edd7d847024c075a943
class TableToDsrc(synode.Node): <NEW_LINE> <INDENT> author = 'Greger Cronquist <greger.cronquist@sysess.org>' <NEW_LINE> copyright = '(c) 2013 System Engineering Software Society' <NEW_LINE> version = '1.0' <NEW_LINE> icon = 'table2dsrc.svg' <NEW_LINE> name = 'Table to Datasources' <NEW_LINE> description = ('Convert a ...
Exportation of data from Table to Datasources. :Ref. nodes: :ref:`Datasources to table`
62598edd442bda511e95a9db
class Experiment: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.parser = self.create_parser() <NEW_LINE> <DEDENT> def define_task(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def define_agent(self, width, height, num_actions): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def define_goal(self, ...
Experiment in which agent tries to complete given task in environment.
62598edd6fb2d068a76930db
class AsciiArmored(object): <NEW_LINE> <INDENT> def __init__(self, data=None, type_=None, headers=None): <NEW_LINE> <INDENT> self.data = binary.ByteArray(data) if data else binary.ByteArray() <NEW_LINE> self.type = type_ or "PGP MESSAGE" <NEW_LINE> self.headers = headers or [] <NEW_LINE> <DEDENT> @classmethod <NEW_LINE...
ASCII Armored data (http://tools.ietf.org/html/rfc2440#section-6.2) .type defaults to "PGP MESSAGE". "PUBLIC KEY" is also popular. .headers is a list of (name, value) tuples. .data is a binary.ByteArray(). AsciiArmored.loads(s) reads a string. AsciiArmored().dumps() writes a string.
62598edd45492302aabfaa28
class FormEntry(models.Model): <NEW_LINE> <INDENT> form_wizard_entry = models.ForeignKey( FormWizardEntry, verbose_name=_("Form wizard"), null=True, blank=True ) <NEW_LINE> user = models.ForeignKey(AUTH_USER_MODEL, verbose_name=_("User")) <NEW_LINE> name = models.CharField(_("Name"), max_length=255) <NEW_LINE> slug = A...
Form entry. :Properties: - `user` (django.contrib.auth.models.User: User owning the plugin. - `wizard` (str): Form wizard to which the form entry belongs to. - `name` (str): Form name. - `slug` (str): Form slug. - `description` (str): Form description. - `is_public` (bool): If set to True, is ...
62598edd3c8af77a43b671ec
class KojiKernelUrlTests(SynchronousTestCase): <NEW_LINE> <INDENT> def test_success(self): <NEW_LINE> <INDENT> kernel = Kernel( version='3.16.6', release='203', distribution='fc20', architecture='x86_64' ) <NEW_LINE> expected_url = b'https://kojipkgs.fedoraproject.org/packages/kernel/3.16.6/203.fc20/x86_64/kernel-3.16....
Tests for ``koji_kernel_url``.
62598edd1b99ca400228e7c7
class Token(models.Model): <NEW_LINE> <INDENT> client = models.ForeignKey(Client) <NEW_LINE> request_token = models.CharField(max_length=64, unique=True) <NEW_LINE> auth_token = models.CharField(max_length=64, unique=True) <NEW_LINE> user = models.ForeignKey('auth.User', null=True) <NEW_LINE> created = models.DateTimeF...
An auth token used to authenticate a user.
62598edd9c8ee8231303f412
class HRInsuranceModel(S3Model): <NEW_LINE> <INDENT> names = ("hrm_insurance", ) <NEW_LINE> def model(self): <NEW_LINE> <INDENT> T = current.T <NEW_LINE> insurance_types = {"SOCIAL": T("Social Insurance"), "HEALTH": T("Health Insurance"), } <NEW_LINE> tablename = "hrm_insurance" <NEW_LINE> self.define_table(tablename, ...
Data Model to track insurance information of staff members
62598edda79ad16197768591
class TestDiveAir20m30min(TestDiveAir, TMethodsMixin): <NEW_LINE> <INDENT> params = ((20, 30), )
Test air 20m 30min.
62598edd4a966d76dd5ed459
class TwitterClient(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> consumer_key = 'Enter your consumer key' <NEW_LINE> consumer_secret = 'Enter your consumer secret' <NEW_LINE> access_token = 'Enter your acces token' <NEW_LINE> access_token_secret = 'Enter your acces token secret' <NEW_LINE> try: ...
Generic Twitter Class for sentiment analysis.
62598edd8da39b475be0171f
class CreatePlaylistForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Playlist <NEW_LINE> fields = [ 'name', ] <NEW_LINE> widgets = { 'name': forms.TextInput(attrs={'class': 'form-control'}) }
Form class to create playlists
62598eddadb09d7d5dc08b3c
class SettingsComponentTest(BaseTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(SettingsComponentTest, self).setUp() <NEW_LINE> super(SettingsComponentTest, self).set_context() <NEW_LINE> LoginPage(self.driver).Login(self.args.server_url, self.args.email, self.args.password) <NEW_LINE> settings_co...
Test settings component and flows. This could be part of the setup page tests, but is abstracted away for now in case we ever decide to make the settings component its own page or move it off of setup.
62598edd851cf427c66b6847
class UnitTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.base_dir = "test/integration" <NEW_LINE> self.config_dir = os.path.join(self.base_dir, "config") <NEW_LINE> self.config_name = "mysql_cfg" <NEW_LINE> cfg = gen_libs.load_module(self.config_name, self.config_dir) <NEW_LINE> ...
Class: UnitTest Description: Class which is a representation of a unit testing. Methods: setUp -> Initialize testing environment. test_fetch_tbl_dict -> Test fetch_tbl_dict function.
62598edd0a50d4780f70391e
class ParsingError(Exception): <NEW_LINE> <INDENT> pass
Parsing error exception
62598edd596a8972361261d5
class HTTPError(HTTPFetchingError): <NEW_LINE> <INDENT> pass
This exception is raised by the C{L{CurlHTTPFetcher}} when it encounters an exceptional situation fetching a URL.
62598edd5fdd1c0f98e5c523
class StaticConfLoader(ConfLoader): <NEW_LINE> <INDENT> conf_path = '../options.yaml' <NEW_LINE> def __init__(self, conf_path=None): <NEW_LINE> <INDENT> super().__init__(conf_path) <NEW_LINE> self.static_conf_path = conf_path or StaticConfLoader.conf_path <NEW_LINE> data = load(open(self.static_conf_path)) <NEW_LINE> s...
Loads static configuration settings. This class contains all settings. Some of these settings can be overridden from other sources, such as user interface.
62598edd99cbb53fe682f428
class SingleLinkClustering(Kruskal): <NEW_LINE> <INDENT> def __init__(self, nbNodes, weightedEdges): <NEW_LINE> <INDENT> self.nbNodes = nbNodes <NEW_LINE> Kruskal.__init__(self,weightedEdges) <NEW_LINE> <DEDENT> def getCurrentSpacing(self): <NEW_LINE> <INDENT> for u,v,w in self.weightedEdges: <NEW_LINE> <INDENT> if sel...
to get the maximum spacing k-clusterings
62598edd7d847024c075a945
class CartProfileLoginRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'cart': 'Cart', 'customer_profile_oid': 'int', 'password': 'str' } <NEW_LINE> attribute_map = { 'cart': 'cart', 'customer_profile_oid': 'customer_profile_oid', 'password': 'password' } <NEW_LINE> def __init__(self, cart=None, customer_profile_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edd57b8e32f525073c2
class BaseException(Exception): <NEW_LINE> <INDENT> def __init__(self, message=None): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self.message) or self.__class__.__doc__
An error occurred.
62598edd097d151d1a2bf594
class xnat_query_scans(object): <NEW_LINE> <INDENT> def __init__(self,cookie,url_base,project,subject,session): <NEW_LINE> <INDENT> self.cookie=cookie <NEW_LINE> self.url_base=url_base <NEW_LINE> self.subject=subject <NEW_LINE> self.session=session <NEW_LINE> self.project=project <NEW_LINE> <DEDENT> def get_scans(self)...
get the scans from a particular session
62598edd63b5f9789fe836e7
class Deserializer: <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> raise SerializerDoesNotExist("annotation_list is a serialization-only serializer")
Deserialize IIIF Annotation List :raises SerializerDoesNotExist: Not yet implemented.
62598edd16aa5153ce3fea71
class RoutesDebugPanel(DebugPanel): <NEW_LINE> <INDENT> name = 'Routes' <NEW_LINE> has_content = True <NEW_LINE> def __init__(self, request): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> self.mapper = request.registry.queryUtility(IRoutesMapper) <NEW_LINE> if self.mapper is None: <NEW_LINE> <INDENT> self.has_c...
A panel to display the routes used by your Pyramid application.
62598eddd6c5a102081e06a6
class AlphabeticalBatching(Batching): <NEW_LINE> <INDENT> grok.adapts(Interface, IAlphabeticalBatch, IHTTPRequest) <NEW_LINE> @property <NEW_LINE> def batch(self): <NEW_LINE> <INDENT> for letter in self._batch.all(): <NEW_LINE> <INDENT> current_item = (letter == self._batch.start) <NEW_LINE> style = current_item and 'c...
View object on batched elements.
62598edd45492302aabfaa2a
class RenderSystem: <NEW_LINE> <INDENT> def __init__(self, surface: Surface, factory: RendererFactory) -> None: <NEW_LINE> <INDENT> self._entities: List[Entity] = [] <NEW_LINE> self._factory = factory <NEW_LINE> self._surface = surface <NEW_LINE> <DEDENT> def renderer_factory(self) -> RendererFactory: <NEW_LINE> <INDEN...
Class for rendering system.
62598edde64d504609df867b
class Port(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required = [ "port_number","protocol"] <NEW_LINE> self.b_key = "port" <NEW_LINE> self.a10_url="/axapi/v3/cgnv6/dns64-virtualserver/{name}/port/{port_number}+{protocol}" <NEW_LINE> self.Dev...
Class Description:: Virtual Port. Class port supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param protocol: {"optional": false, "enum": ["dns-udp"], "type": "string", "description": "'dns-udp': DNS service over UDP; ", "format": "enum"} :param p...
62598edd4f6381625f198778
class InstituteShortSerializer(AllInstituteSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Institute <NEW_LINE> fields = ('id', 'name', 'parent', 'institute_type', 'url', 'address', 'like', 'institute_url', 'established_date')
To get single institute details
62598edd3cc13d1c6d463ce1
class DocumentStatistics(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'characters_count': {'required': True}, 'transactions_count': {'required': True}, } <NEW_LINE> _attribute_map = { 'characters_count': {'key': 'charactersCount', 'type': 'int'}, 'transactions_count': {'key': 'transactionsCount', 't...
if showStats=true was specified in the request this field will contain information about the document payload. All required parameters must be populated in order to send to Azure. :ivar characters_count: Required. Number of text elements recognized in the document. :vartype characters_count: int :ivar transactions_co...
62598edd29b78933be26938a
class Liquid_SMIRNOFF(Liquid): <NEW_LINE> <INDENT> def __init__(self,options,tgt_opts,forcefield): <NEW_LINE> <INDENT> self.set_option(tgt_opts,'force_cuda',forceprint=True) <NEW_LINE> self.set_option(tgt_opts,'mts_integrator',forceprint=True) <NEW_LINE> self.set_option(options,'rpmd_beads',forceprint=True) <NEW_LINE> ...
Condensed phase property matching using OpenMM.
62598edd2eb69b55b15a0644
class Misclassification(Metric): <NEW_LINE> <INDENT> def __init__(self, steps=1): <NEW_LINE> <INDENT> self.preds = self.be.iobuf((1, steps), persist_values=False) <NEW_LINE> self.hyps = self.be.iobuf((1, steps), persist_values=False) <NEW_LINE> self.outputs = self.preds <NEW_LINE> self.metric_names = ['Top1Misclass'] <...
Misclassification error metric.
62598edd32920d7e50bc45a4
class UserViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = User.objects.all().order_by('-date_joined') <NEW_LINE> serializer_class = UserSerializer
API endpoint that allows usre to be viewed or edited.
62598edd23849d37ff84f631
class TextMiner(object): <NEW_LINE> <INDENT> def get_cluster_terms(self, query, documents): <NEW_LINE> <INDENT> prediction_list = [] <NEW_LINE> vectorizer = TfidfVectorizer( stop_words="english" ) <NEW_LINE> X = vectorizer.fit_transform( documents ) <NEW_LINE> true_k = len(documents) <NEW_LINE> print(true_k) <NEW_LINE>...
Gets related words based on a list of texts and the query KMeans normally works with numbers only: we need to have numbers. To get numbers, we do a common step known as feature extraction. The feature used is TF-IDF, a numerical statistic. This statistic uses term frequency and inverse document frequency. In short:...
62598eddd7e4931a7ef3a613
class Entry(models.Model): <NEW_LINE> <INDENT> topic = models.ForeignKey(Topic, on_delete=models.CASCADE) <NEW_LINE> text = models.TextField() <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name_plural = 'entries' <NEW_LINE> <DEDENT> def __str__(self):...
Информация, изученная пользователем по теме
62598edd1b99ca400228e7c8
class GGCMFileFortbinMHD(openggcm.GGCMFileFortran): <NEW_LINE> <INDENT> _detector = r"^\s*(.*)\.(p[xyz]_[0-9]+|3df)" r"\.([0-9]{6}).b\s*$" <NEW_LINE> _fwrapper_type = GGCMFortbinFileWrapper <NEW_LINE> _data_item_templates = None <NEW_LINE> _def_fld_center = "Cell" <NEW_LINE> def __init__(self, filename, ...
Binary files
62598edd460517430c430a00
class TemperatureUnit(object): <NEW_LINE> <INDENT> def __init__(self, amt, ufrom, uto): <NEW_LINE> <INDENT> self.amt = amt <NEW_LINE> self.ufrom = ufrom <NEW_LINE> self.uto = uto <NEW_LINE> <DEDENT> def _getuval(self, argument): <NEW_LINE> <INDENT> function = '_unit_{0}'.format(str(argument)) <NEW_LINE> function = geta...
Initialize a TemperatureUnit to return the results of doconvert(), for the purpose of converting one temperature unit to another temperature unit :param amt: float, amount to convert from :param ufrom: string, unit to convert from :param uto: string, unit to convert to
62598edd99cbb53fe682f429
class Beam(Item): <NEW_LINE> <INDENT> event = None
A [ or ].
62598edd8e7ae83300ee7607
class StackTrace(object): <NEW_LINE> <INDENT> def __init__(self, stack_frames=None, stack_trace_hash_id=None): <NEW_LINE> <INDENT> if stack_frames is None: <NEW_LINE> <INDENT> stack_frames = [] <NEW_LINE> <DEDENT> if stack_trace_hash_id is None: <NEW_LINE> <INDENT> stack_trace_hash_id = generate_hash_id() <NEW_LINE> <D...
A call stack appearing in a trace. :type stack_frames: list :param stack_frames: Stack frames in this stack trace. A maximum of 128 frames are allowed. :type stack_trace_hash_id: str :param stack_trace_hash_id: The hash ID is used to conserve network bandwidth for dupl...
62598edd7d43ff24874266b7
class Adapter: <NEW_LINE> <INDENT> def __init__(self, obj, **adapted_methods): <NEW_LINE> <INDENT> self.obj = obj <NEW_LINE> for key, val in adapted_methods.items(): <NEW_LINE> <INDENT> setattr(self, key, val) <NEW_LINE> <DEDENT> <DEDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> return getattr(self.obj, attr) <...
Adapts an object by replacing methods. Usage: motorCycle = MotorCycle() motorCycle = Adapter(motorCycle, wheels = motorCycle.TwoWheeler)
62598edd01c39578d7f1131f
class SystemTopicsListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[SystemTopic]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["SystemTopic"]] = None, next_link: Optional[str] = None, **kwargs...
Result of the List System topics operation. :ivar value: A collection of system Topics. :vartype value: list[~azure.mgmt.eventgrid.models.SystemTopic] :ivar next_link: A link for the next page of topics. :vartype next_link: str
62598edd6e29344779afeba4
class LossScaler: <NEW_LINE> <INDENT> def __init__(self, scale=1): <NEW_LINE> <INDENT> self.cur_scale = scale <NEW_LINE> <DEDENT> def has_overflow(self, params): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def _has_inf_or_nan(x): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def update_scale(self, overf...
Class that manages a static loss scale. This class is intended to interact with :class:`FP16_Optimizer`, and should not be directly manipulated by the user. Use of :class:`LossScaler` is enabled via the ``static_loss_scale`` argument to :class:`FP16_Optimizer`'s constructor. Args: scale (float, optional, default=1...
62598edddd821e528d6d74bf
class Tune(base.Frame): <NEW_LINE> <INDENT> __annotations__: typing.Dict[str, object] = { 'channel_max': int, 'frame_max': int, 'heartbeat': int } <NEW_LINE> __slots__: typing.List[str] = [ 'channel_max', 'frame_max', 'heartbeat' ] <NEW_LINE> frame_id = 30 <NEW_LINE> index = 0x000A001E <NEW_LINE> name = 'Connection.Tun...
Propose connection tuning parameters This method proposes a set of connection configuration values to the client. The client can accept and/or adjust these. :param channel_max: Proposed maximum channels - Default: ``0`` :param frame_max: Proposed maximum frame size - Default: ``0`` :param heartbeat: Desired h...
62598eddfbf16365ca79261a