code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class DeviceSelection(object): <NEW_LINE> <INDENT> _supported_filters = [ "paths", "size", "vendor", "model", "rotational", "limit", "all" ] <NEW_LINE> def __init__(self, paths=None, model=None, size=None, rotational=None, limit=None, vendor=None, all=False, ): <NEW_LINE> <INDENT> self.paths = [] if paths is None else ...
Used within :class:`ceph.deployment.drive_group.DriveGroupSpec` to specify the devices used by the Drive Group. Any attributes (even none) can be included in the device specification structure.
62598ef19c8ee8231303f561
class InterceptResolver(BaseResolver): <NEW_LINE> <INDENT> def __init__(self, upstream, upstream_port, address, blacklist, block_answer): <NEW_LINE> <INDENT> self.upstream = upstream <NEW_LINE> self.upstream_port = upstream_port <NEW_LINE> self.address = address <NEW_LINE> self.blacklist = blacklist <NEW_LINE> self.blo...
InterceptResolver - proxy requests to upstream server (optionally intercepting)
62598ef132920d7e50bc483a
class RefEqualsAltError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value)
An Error class for rare cases where REF == ALT (seen in ClinVar XML)
62598ef1baa26c4b54d4dadb
class simulation_class(object): <NEW_LINE> <INDENT> def __init__(self, name, mar_env, corr): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.pricing_date = mar_env.pricing_date <NEW_LINE> self.initial_value = mar_env.get_constant('initial_value') <NEW_LINE> self.volatility = mar_env.get_constant('volatility') <NEW...
Providing base methods for simulation classes. Attributes ========== name: str name of the object mar_env: instance of market_environment market environment data for simulation corr: bool True if correlated with other model object Methods ======= generate_time_grid: returns time grid for simulation get_...
62598ef1283ffb24f3cf20c0
class GSuiteSAML(ComponentResource): <NEW_LINE> <INDENT> def __init__(self, name: str, args: GSuiteSAMLArgs, opts: ResourceOptions = None): <NEW_LINE> <INDENT> super().__init__("custom:app:gsuiteSaml", name, {}, opts) <NEW_LINE> child_opts = ResourceOptions(parent=self) <NEW_LINE> app_settings_json = json.dumps({ "doma...
Component Resource for Okta OIN GSuite App Configuration. This class creates Okta OIN based GSuite Application with SAML authentication.
62598ef13d592f4c4edb96fb
class DelimitedTextConfiguration(Model): <NEW_LINE> <INDENT> _validation = { 'column_separator': {'required': True}, 'field_quote': {'required': True}, 'record_separator': {'required': True}, 'escape_char': {'required': True}, 'headers_present': {'required': True}, } <NEW_LINE> _attribute_map = { 'column_separator': {'...
delimited text configuration. All required parameters must be populated in order to send to Azure. :param column_separator: Required. column separator :type column_separator: str :param field_quote: Required. field quote :type field_quote: str :param record_separator: Required. record separator :type record_separator...
62598ef1f548e778e5969d9a
class FileBrowseUploadField(_charfield_base_class): <NEW_LINE> <INDENT> description = "FileBrowseUploadField" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.site = kwargs.pop('site', site) <NEW_LINE> self.directory = kwargs.pop('directory', '') <NEW_LINE> self.extensions = kwargs.pop('extensio...
Model field which renders with an option to browse site.directory as well as upload a file to a temporary folder (you still need to somehow move that temporary file to an actual location when the model is being saved).
62598ef15fdd1c0f98e5c7b1
class MyThreadedHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): <NEW_LINE> <INDENT> timeout = 1 <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> BaseHTTPServer.HTTPServer.__init__(self,*args) <NEW_LINE> self.keep_running = True <NEW_LINE> <DEDENT> def serve_forever(self): <NEW_LINE> <INDENT...
Handle requests in a separate thread.
62598ef1627d3e7fe0e0569a
class Model(base.BaseModel): <NEW_LINE> <INDENT> def __init__(self, name='Model'): <NEW_LINE> <INDENT> super(Model, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.layers = [] <NEW_LINE> model_vars = set(tf.get_collection(tf.GraphKeys.MODEL_VARIABLES)) <NEW_LINE> trainable_vars = set(tf.trainable_variables...
An abstraction of a Neural Network model. It simplifies layer management and supports train/test modes. To define a new model, derive a class and overload the _build method, which should be responsible for constructing the model, e.g.: class MLP(object): def _build(self): self.inpt = tf.place...
62598ef14f88993c371ef8f1
class find_all_alternates (object) : <NEW_LINE> <INDENT> def __init__ (self, residues, pdb_hierarchy, fmodel, restraints_manager, params, nproc=Auto, verbose=False, debug=None, log=sys.stdout) : <NEW_LINE> <INDENT> adopt_init_args(self, locals()) <NEW_LINE> nproc = easy_mp.get_processes(nproc) <NEW_LINE> print >> log, ...
Wrapper for parallelizing calls to find_alternate_residue.
62598ef226068e7796d4b16c
class actions_server(osv.Model): <NEW_LINE> <INDENT> _name = 'ir.actions.server' <NEW_LINE> _inherit = ['ir.actions.server'] <NEW_LINE> def _get_states(self, cr, uid, context=None): <NEW_LINE> <INDENT> res = super(actions_server, self)._get_states(cr, uid, context=context) <NEW_LINE> res.insert(0, ('email', 'Send Email...
Add email option in server actions.
62598ef24527f215b58e870e
class e_user_authority(IntEnum): <NEW_LINE> <INDENT> user = 1, <NEW_LINE> admin = 2
The user authority defines the administrative rights of a user over the particular cutecasa instance.
62598ef201c39578d7f115b3
class ClusterDetail(generics.RetrieveAPIView): <NEW_LINE> <INDENT> queryset = Cluster.objects.all() <NEW_LINE> serializer_class = ClusterDetailSerializer <NEW_LINE> pagination_class = ObjectPageNumberPagination
get: Returns a cluster given its id along with the orgs under it.
62598ef2dd821e528d6d774e
class Translator(object): <NEW_LINE> <INDENT> def __init__(self, variable_formats, pipeline_spec): <NEW_LINE> <INDENT> self.vartok = VariableTokenizer(variable_formats) <NEW_LINE> self.pipeline_spec = pipeline_spec <NEW_LINE> self._pipeline = convert_pipeline(self.pipeline_spec) <NEW_LINE> <DEDENT> def translate_string...
Translates a string using the specified pipeline
62598ef256ac1b37e63009fc
class CalligraphicThicknessShader(ThicknessBlenderMixIn, ScalarBlendModifier): <NEW_LINE> <INDENT> def __init__(self, thickness_position, thickness_ratio, blend_type, influence, orientation, thickness_min, thickness_max): <NEW_LINE> <INDENT> ThicknessBlenderMixIn.__init__(self, thickness_position, thickness_ratio) <NEW...
Thickness modifier for achieving a calligraphy-like effect.
62598ef27d847024c075abdf
class TableFunctionSource(UnaryOp): <NEW_LINE> <INDENT> def __init__(self, function, alias=None): <NEW_LINE> <INDENT> super(TableFunctionSource, self).__init__(function) <NEW_LINE> self.function = function <NEW_LINE> self.alias = alias <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> raise Exception("TableFu...
Scaffold for a table UDF function that outputs a relation. Not implemented.
62598ef29c8ee8231303f562
class TimeWindow(object): <NEW_LINE> <INDENT> def __init__(self, earliest=None, latest=None): <NEW_LINE> <INDENT> self.swagger_types = { 'earliest': 'int', 'latest': 'int' } <NEW_LINE> self.attribute_map = { 'earliest': 'earliest', 'latest': 'latest' } <NEW_LINE> self._earliest = earliest <NEW_LINE> self._latest = late...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ef299fddb7c1ca6220c
class HalfStepTrill(Trill): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.size = interval.Interval('m2') <NEW_LINE> self._setAccidentalFromKeySig = False
A trill confined to half steps. >>> halfTrill = expressions.HalfStepTrill() >>> halfTrill.placement 'above' >>> halfTrill.size <music21.interval.Interval m2> Here the key signature of 2 sharps will not affect the trill: >>> n = note.Note('B4', type='eighth') >>> m = stream.Measure() >>> m.insert(0, key.KeySignature(...
62598ef2f9cc0f698b1c46d7
class ScipyFMIN(IFitterBase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> IFitterBase.__init__(self) <NEW_LINE> self._allowedKWs = ["xtol", "ftol", "maxiter", "maxfun", "disp", "retall", "callback"] <NEW_LINE> self.name = "scipy.optimize.fmin" <NEW_LINE> <DEDENT> def fit(self, miniFunc,...
Wrapper around scipy.optimize.fmin.
62598ef27b25080760ed5cac
class test_fixZauthHealthCheck(unittest.TestCase, common.ServiceMigrationTestCase): <NEW_LINE> <INDENT> initial_servicedef = 'zenoss-resmgr-5.0.6_1.json' <NEW_LINE> expected_servicedef = 'zenoss-resmgr-5.0.6_1-fixZauthHealthCheck.json' <NEW_LINE> migration_module_name = 'fixZauthHealthCheck' <NEW_LINE> migration_class_...
Test that the Zauth has a new healcheck.
62598ef2d268445f26638f97
class _Authenticator: <NEW_LINE> <INDENT> def __init__(self, mechinst): <NEW_LINE> <INDENT> self.mech = mechinst <NEW_LINE> <DEDENT> def process(self, data): <NEW_LINE> <INDENT> ret = self.mech(self.decode(data)) <NEW_LINE> if ret is None: <NEW_LINE> <INDENT> return '*' <NEW_LINE> <DEDENT> return self.encode(ret) <NEW_...
Private class to provide en/decoding for base64-based authentication conversation.
62598ef232920d7e50bc483d
class Doc(object): <NEW_LINE> <INDENT> def __init__(self, bas, diffs): <NEW_LINE> <INDENT> self.base = bas <NEW_LINE> self.diffs = diffs <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "%s \\ (%s)" % (self.base, ", ".join(map(str, self.diffs))) <NEW_LINE> <DEDENT> def __eq__(self, x): <NEW_LINE> <IND...
Difference of cubes
62598ef276e4537e8c3eddc7
class VIEW3D_MT_materialutilities_clean_slots(bpy.types.Menu): <NEW_LINE> <INDENT> bl_idname = "VIEW3D_MT_materialutilities_clean_slots" <NEW_LINE> bl_label = "Clean Slots" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> layout.label <NEW_LINE> layout.operator(VIEW3D_OT_materialu...
Menu for cleaning up the material slots
62598ef24428ac0f6e656d5e
class UtilsTestCase(TestCase): <NEW_LINE> <INDENT> def test_mungeBranch(self): <NEW_LINE> <INDENT> self.assertEqual(mungeBranch('trunk'), 'trunk') <NEW_LINE> self.assertEqual(mungeBranch('/trunk'), 'trunk') <NEW_LINE> self.assertEqual(mungeBranch(''), 'trunk') <NEW_LINE> self.assertEqual(mungeBranch('/branches/destroy-...
Tests for branch-name inspecting functions.
62598ef2bd1bec0571e144d3
class GraphHistogram(Graph): <NEW_LINE> <INDENT> def __init__(self, *args, **keywords): <NEW_LINE> <INDENT> Graph.__init__(self, *args, **keywords) <NEW_LINE> self.axisKeys = ['x', 'y'] <NEW_LINE> self._axisInit() <NEW_LINE> if 'binWidth' in keywords: <NEW_LINE> <INDENT> self.binWidth = keywords['binWidth'] <NEW_LINE> ...
Graph the count of a single element. Data set is simply a list of x and y pairs, where there is only one of each x value, and y value is the count or magnitude of that value >>> import random >>> #_DOCS_SHOW g = graph.GraphHistogram() >>> g = graph.GraphHistogram(doneAction=None) #_DOCS_HIDE >>> data = [(x, random.c...
62598ef266673b3332c2ebbb
class ConsumerBasedOAuth(BaseOAuth): <NEW_LINE> <INDENT> AUTHORIZATION_URL = '' <NEW_LINE> REQUEST_TOKEN_URL = '' <NEW_LINE> ACCESS_TOKEN_URL = '' <NEW_LINE> @property <NEW_LINE> def unauthorized_token_name(self): <NEW_LINE> <INDENT> return self.SERVICE + '_unauthorized_token_name' <NEW_LINE> <DEDENT> def auth_url(self...
Consumer based mechanism OAuth authentication, fill the needed parameters to communicate properly with authentication service. @AUTHORIZATION_URL Authorization service url @REQUEST_TOKEN_URL Request token URL @ACCESS_TOKEN_URL Access token URL
62598ef27b180e01f3e4844e
class InventoryMinimumModel(S3Model): <NEW_LINE> <INDENT> names = ("inv_minimum", ) <NEW_LINE> def model(self): <NEW_LINE> <INDENT> T = current.T <NEW_LINE> auth = current.auth <NEW_LINE> WAREHOUSE = T(current.deployment_settings.get_inv_facility_label()) <NEW_LINE> tablename = "inv_minimum" <NEW_LINE> self.define_tabl...
Manage Minimum Stock levels for Sites Used by: RMS
62598ef255399d3f05624d37
class Transaction(): <NEW_LINE> <INDENT> def __init__(self, sender_wallet, recipient_address, amount): <NEW_LINE> <INDENT> self.id = generate_uuid() <NEW_LINE> self.output = self.make_output(sender_wallet, recipient_address, amount) <NEW_LINE> self.input = self.make_input(sender_wallet, self.output) <NEW_LINE> <DEDENT>...
Document of an exchange in currency from a sender to one or more recipients
62598ef2be383301e0251fec
class AddonsConfigProperty(GCPProperty): <NEW_LINE> <INDENT> props = { 'horizontalPodAutoscaling': (HorizontalPodAutoscalingProperty, False), 'httpLoadBalancing': (HttpLoadBalancingProperty, False) }
Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality.
62598ef2d7e4931a7ef3a8ac
class SimpleLeafletMapView(BrowserView): <NEW_LINE> <INDENT> def __init__(self,context,request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> def flip(self,data): <NEW_LINE> <INDENT> return data[::-1] <NEW_LINE> <DEDENT> def collective_geo_to_leaflet(self, intype, int...
this will return a leaflet featureGroup, if the current object is georeferenced
62598ef27047854f4633dbe2
class TaskFailedSilent(TaskBase): <NEW_LINE> <INDENT> def getDisplayName(self): <NEW_LINE> <INDENT> return "Failed"
Task execution failed (silently)
62598ef24527f215b58e8710
class PolyHashPolidrome: <NEW_LINE> <INDENT> def _compute_polyhashes(self): <NEW_LINE> <INDENT> forward = ord(self._string[0]) <NEW_LINE> backward = ord(self._string[0]) <NEW_LINE> poly = [1]*self._length <NEW_LINE> for i in range(1, self._length): <NEW_LINE> <INDENT> c = ord(self._string[i]) <NEW_LINE> poly[i] = (poly...
Define a polyhash polidrome object.
62598ef201c39578d7f115b5
class DeleteVPNEndpointRemoteSite(CommandResource): <NEW_LINE> <INDENT> resource = 'vpnendpointremotesites' <NEW_LINE> cmd_columns = _COMMAND_COLUMNS <NEW_LINE> http_resource = _HTTP_RESOURCE <NEW_LINE> @staticmethod <NEW_LINE> def add_known_arguments(parser): <NEW_LINE> <INDENT> parser.add_argument( 'id', metavar='VPN...
Delete a given VPNEndpointRemoteSite
62598ef267a9b606de5447df
class UDBSlaveInstanceSetSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "AdminUser": fields.Str(required=False, load_from="AdminUser"), "BackupBeginTime": fields.Int( required=False, load_from="BackupBeginTime" ), "BackupBlacklist": fields.Str( required=False, load_from="BackupBlacklist" ), "BackupCount"...
UDBSlaveInstanceSet - DescribeUDBSlaveInstance
62598ef27d847024c075abe1
class ReactForm(BaseReactForm): <NEW_LINE> <INDENT> function_choices = [ ("reload", "Reload"), ("restart", "Restart"), ("start", "Start"), ("stop", "Stop") ] <NEW_LINE> matcher_choices = [ ("glob", "Hostname Glob"), ("pcre", "Hostname PCRE"), ("list", "List"), ("grain", "Grains"), ("grain_pcre", "Grains PCRE"), ("pilla...
Class that creates a Saltstack Reaction form for the dashboard
62598ef24f6381625f1988c4
class Watch(Command): <NEW_LINE> <INDENT> SYNOPSIS = (None, 'eventlog/watch', None, None) <NEW_LINE> ORDER = ('Internals', 9) <NEW_LINE> IS_USER_ACTIVITY = False <NEW_LINE> CONFIG_REQUIRED = False <NEW_LINE> def command(self): <NEW_LINE> <INDENT> config = self.session.config <NEW_LINE> unregister = False <NEW_LINE> sel...
Watch the events fly by
62598ef2f9cc0f698b1c46d8
class JoinGameServerSessionResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PlayerSession = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("PlayerSession") is not None: <NEW_LINE> <INDENT> self.PlayerSe...
JoinGameServerSession response structure.
62598ef291f36d47f22302ad
class Resume(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> fname = models.CharField(max_length=255, verbose_name='first name') <NEW_LINE> lname = models.CharField(max_length=255, verbose_name='last name') <NEW_LINE> street = models.CharField(max_length=255, null=True, blank=True)...
it's a resume
62598ef2fff4ab517ebcbfea
class JsonField(TextField): <NEW_LINE> <INDENT> empty_strings_allowed = False <NEW_LINE> default_validators = [validate_json]
TextField with json validation.
62598ef27b25080760ed5cae
class KineticScheme(LEMSBase): <NEW_LINE> <INDENT> def __init__(self, name, nodes, state_variable, edges, edge_source, edge_target, forward_rate, reverse_rate): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.nodes = nodes <NEW_LINE> self.state_variable = state_variable <NEW_LINE> self.edges = edges <NEW_LINE> sel...
Kinetic scheme specifications.
62598ef223849d37ff84f8cd
class ValidDataset(data.Dataset): <NEW_LINE> <INDENT> def __init__(self, opt): <NEW_LINE> <INDENT> super(ValidDataset, self).__init__() <NEW_LINE> self.opt = opt <NEW_LINE> self.normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) <NEW_LINE> self.dataset_name = self.opt['name'] <NEW_L...
Read LR images only in the test phase.
62598ef244b2445a339b5d75
class RejectedSustainingMemberList( LoginRequiredMixin, SponsorMixin, PaginationMixin, ListView): <NEW_LINE> <INDENT> context_object_name = 'sustaining_members' <NEW_LINE> template_name = 'sponsor/rejected-list.html' <NEW_LINE> paginate_by = 10 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(RejectedSustaining...
List view for pending Sustaining Members.
62598ef2e5267d203ee6a11b
class PerformerDescription(AbstractStub): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = _("Performer Description") <NEW_LINE> verbose_name_plural = _("Performer Descriptions") <NEW_LINE> <DEDENT> performer = models.ForeignKey( 'Performer', verbose_name=_('Performer'), related_name='descriptions', o...
Stores performer data.
62598ef25fc7496912d4767b
class ExactInference(InferenceModule): <NEW_LINE> <INDENT> def initializeUniformly(self, gameState): <NEW_LINE> <INDENT> self.beliefs = DiscreteDistribution() <NEW_LINE> for p in self.legalPositions: <NEW_LINE> <INDENT> self.beliefs[p] = 1.0 <NEW_LINE> <DEDENT> self.beliefs.normalize() <NEW_LINE> <DEDENT> def observeUp...
The exact dynamic inference module should use forward algorithm updates to compute the exact belief function at each time step.
62598ef25166f23b2e241beb
@dataclass <NEW_LINE> class Date(Literal): <NEW_LINE> <INDENT> pass
Store information about a date literal
62598ef2f548e778e5969d9e
class XmlrpcTypeConvertor(TypeConvertor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> TypeConvertor.__init__(self) <NEW_LINE> <DEDENT> def external_convert(self, obj): <NEW_LINE> <INDENT> if isinstance(obj, DynamicObject): <NEW_LINE> <INDENT> return dict(obj) <NEW_LINE> <DEDENT> if isinstance(obj, Decim...
Ice type convertor.
62598ef2091ae3566870342c
class variable_matcher_t( declaration_matcher_t ): <NEW_LINE> <INDENT> def __init__( self, name=None, type=None, header_dir=None, header_file=None ): <NEW_LINE> <INDENT> declaration_matcher_t.__init__( self , name=name , decl_type=variable.variable_t , header_dir=header_dir , header_file=header_file ) <NEW_LINE> self.t...
Instance of this class will match variables by next criteria: - :class:`declaration_matcher_t` criteria - variable type. Example: :class:`int_t` or 'int'
62598ef271ff763f4b5e5f72
class EmbeddingLayer(object): <NEW_LINE> <INDENT> def __init__(self, classes, size, initializer=None, dtype=tf.float32, reuse=None): <NEW_LINE> <INDENT> self.__classes = classes <NEW_LINE> self.__size = size <NEW_LINE> self.__initializer = initializer <NEW_LINE> self.__dtype = dtype <NEW_LINE> self.__reuse = reuse <NEW...
Embedding Layer
62598ef2bd1bec0571e144d4
class TestOlderVersionOfAzFuncDependencyIsolationOnDedicated( testutils.WebHostTestCase): <NEW_LINE> <INDENT> function_name = 'dependency_isolation_functions' <NEW_LINE> package_name = '.python_packages_azf_older_version' <NEW_LINE> project_root = testutils.E2E_TESTS_ROOT / function_name <NEW_LINE> customer_deps = proj...
Test the dependency manager E2E scenario via Http Trigger. The following E2E tests ensures the dependency manager is behaving as expected. They are tested against the dependency_isolation_functions/ folder which contain a dummy .python_packages_azf_older_version folder. This testcase checks if the customers older libr...
62598ef25fcc89381b265532
class MysqlPipeline(object): <NEW_LINE> <INDENT> def __init__(self, host, database, user, password, port): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.database = database <NEW_LINE> self.user = user <NEW_LINE> self.password = password <NEW_LINE> self.port = port <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def ...
docstring for MongoPipeline
62598ef23539df3088ecaac6
class UserNotEscolaClienteTeste(ClienteTeste): <NEW_LINE> <INDENT> def get_client(self): <NEW_LINE> <INDENT> client = Client() <NEW_LINE> client.login(username='cazuza', password='senha1234') <NEW_LINE> return client
Cliente que acessa o site, estando logado, mas não possuindo nenhuma possição no site
62598ef2be7bc26dc925126c
class RemoveAll(Modification): <NEW_LINE> <INDENT> def __init__(self, regex_type): <NEW_LINE> <INDENT> self.regex_type = regex_type <NEW_LINE> <DEDENT> def __call__(self, value): <NEW_LINE> <INDENT> matches = match_regex_substr(self.regex_type, value) <NEW_LINE> for match in matches: <NEW_LINE> <INDENT> value = value.r...
Remove all occurences of regex match.
62598ef255399d3f05624d39
class Listing(Container): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super().__init__(data) <NEW_LINE> Parser.tokenize_attributes(self, 'manufacturer', 'title') <NEW_LINE> self.result_data = data.copy() <NEW_LINE> del self.result_data['id'] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDEN...
Contains a listing's raw data and tokens for use in matching.
62598ef28a43f66fc4bf0988
class RandomWalk(): <NEW_LINE> <INDENT> def __init__(self, num_points=5000): <NEW_LINE> <INDENT> self.num_points = num_points <NEW_LINE> self.x_values = [0] <NEW_LINE> self.y_values = [0] <NEW_LINE> <DEDENT> def fill_walk(self): <NEW_LINE> <INDENT> while len(self.x_values) < self.num_points: <NEW_LINE> <INDENT> x_direc...
一个生成随机漫步数据的类
62598ef2d7e4931a7ef3a8ae
class H2OUseCloud: <NEW_LINE> <INDENT> def __init__(self, cloud_num, use_ip, use_port): <NEW_LINE> <INDENT> self.cloud_num = cloud_num <NEW_LINE> self.use_ip = use_ip <NEW_LINE> self.use_port = use_port <NEW_LINE> self.nodes = [] <NEW_LINE> node = H2OUseCloudNode(self.use_ip, self.use_port) <NEW_LINE> self.nodes.append...
A class representing an H2O cloud which was specified by the user. Don't try to build or tear down this kind of cloud.
62598ef256b00c62f0fb10e7
class Config: <NEW_LINE> <INDENT> configParser = ConfigParser() <NEW_LINE> @classmethod <NEW_LINE> def __init__(self, path='config.ini'): <NEW_LINE> <INDENT> self.configParser.read(os.path.join(os.getcwd(), path)) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def gwb(self, key): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDEN...
Interact with configuration variables.
62598ef2442bda511e95ac76
class ShippingAddress(models.Model): <NEW_LINE> <INDENT> customer = models.ForeignKey(Customer, on_delete=models.SET_NULL, blank=True, null=True) <NEW_LINE> order = models.ForeignKey(Order, on_delete=models.SET_NULL, blank=True, null=True) <NEW_LINE> address = models.CharField(max_length=255, null=True) <NEW_LINE> city...
add order information and address
62598ef28e7ae83300ee78a3
class CommitSignal(Signal): <NEW_LINE> <INDENT> pass
Called on transaction commit
62598ef2dd821e528d6d7751
class UserList(PRAWListing): <NEW_LINE> <INDENT> CHILD_ATTRIBUTE = 'children' <NEW_LINE> def _convert(self, reddit_session, data): <NEW_LINE> <INDENT> retval = Redditor(reddit_session, data['name'], fetch=False) <NEW_LINE> retval.id = data['id'].split('_')[1] <NEW_LINE> return retval
A list of Redditors. Works just like a regular list.
62598ef21b99ca400228e918
class RecordWriter(object): <NEW_LINE> <INDENT> def __init__(self, filepath, level="frame"): <NEW_LINE> <INDENT> super(RecordWriter, self).__init__() <NEW_LINE> assert level == "frame" or level == "frame", "yt8m-level must be `frame` or `video`" <NEW_LINE> self.filepath = filepath <NEW_LINE> self.level = lev...
RecordWriter for Youtube-8M dataset.
62598ef27d847024c075abe2
class WebSocketHandlerForTests(WebSocketHandler): <NEW_LINE> <INDENT> def initialize(self, websocket, close_future, compression_options=None): <NEW_LINE> <INDENT> super(WebSocketHandlerForTests, self).initialize(websocket) <NEW_LINE> self.close_future = close_future <NEW_LINE> self.compression_options = compression_opt...
Base class for testing handlers that exposes the on_close event. This allows for deterministic cleanup of the associated socket.
62598ef2a219f33f346c5047
class MyClass: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "" <NEW_LINE> print("MyClass") <NEW_LINE> <DEDENT> def getName(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def setName(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def __del__(self): <NEW_...
A sinple example class
62598ef24a966d76dd5ed6ef
class ExtraExtension(Extension): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.config = kwargs <NEW_LINE> <DEDENT> def extendMarkdown(self, md, md_globals): <NEW_LINE> <INDENT> md.registerExtensions(extensions, self.config) <NEW_LINE> md.preprocessors['html_block'].markdown_in_raw = True <N...
Add various extensions to Markdown class.
62598ef223849d37ff84f8cf
class UpdateTeamDiscussionCommentInput(sgqlc.types.Input): <NEW_LINE> <INDENT> __schema__ = github_schema <NEW_LINE> __field_names__ = ('id', 'body', 'body_version', 'client_mutation_id') <NEW_LINE> id = sgqlc.types.Field(sgqlc.types.non_null(ID), graphql_name='id') <NEW_LINE> body = sgqlc.types.Field(sgqlc.types.non_n...
Autogenerated input type of UpdateTeamDiscussionComment
62598ef271ff763f4b5e5f74
class DataFrameToCsvString(Tool): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(DataFrameToCsvString, self).__init__() <NEW_LINE> <DEDENT> @check_input_stream_count(1) <NEW_LINE> def _execute(self, sources, alignment_stream, interval): <NEW_LINE> <INDENT> for time, data in sources[0].window(interval...
Converts the value part of the stream instances to json format
62598ef24c34283577618afb
class ProviderPayerSetupEditForm(BaseForm): <NEW_LINE> <INDENT> company = StringField('Name', validators=[Required()]) <NEW_LINE> payer_type = SelectField('Type', validators=[Required()], choices=[('Insurer', 'Insurer'), ('TPA', 'TPA'), ('Corporate', 'Corporate')]) <NEW_LINE> pic_email = StringField('Email 1', validato...
Edit payer from provider form
62598ef27b180e01f3e48450
class InlineResponse20017(object): <NEW_LINE> <INDENT> def __init__(self, status=None, decimal_price=None): <NEW_LINE> <INDENT> self.swagger_types = { 'status': 'str', 'decimal_price': 'str' } <NEW_LINE> self.attribute_map = { 'status': 'status', 'decimal_price': 'decimal_price' } <NEW_LINE> self._status = status <NEW_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ef267a9b606de5447e3
class DummyConn(object): <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> self.response = DummyResponse() <NEW_LINE> self.name = name <NEW_LINE> self.httpConn = DummyHttpConn(self.response) <NEW_LINE> self.cookie = None <NEW_LINE> self.ishttps = False <NEW_LINE> <DEDENT> def request(self, method, ...
classdocs
62598ef2236d856c2adc8821
class SignatureExpired(BadTimeSignature): <NEW_LINE> <INDENT> pass
Raised if a signature timestamp is older than ``max_age``. This is a subclass of :exc:`BadTimeSignature`.
62598ef201c39578d7f115b9
class GenerativeCell(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_size, hidden_size, error_init_size=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.input_size = input_size <NEW_LINE> self.hidden_size = hidden_size <NEW_LINE> self.error_init_size = error_init_size <NEW_LINE> self.memory = Conv...
Single generative layer
62598ef2a8370b77170eebfa
class RotationalGTensor(rhf_g.RotationalGTensor): <NEW_LINE> <INDENT> dia = dia <NEW_LINE> get_fock = rks_nmr.get_fock <NEW_LINE> solve_mo1 = rks_nmr.solve_mo1
Rotational g-tensors for RKS
62598ef29c8ee8231303f565
class UserSelect2View(Select2View): <NEW_LINE> <INDENT> def check_all_permissions(self, request, *args, **kwargs): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> if not user.is_authenticated(): <NEW_LINE> <INDENT> raise PermissionDenied <NEW_LINE> <DEDENT> <DEDENT> def get_groups(self, user, term): <NEW_LINE> <INDE...
This view is used as API backend to serve the suggestions for the message recipient field.
62598ef2167d2b6e312b57b0
class ProcessingAlgFactoryException(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(ProcessingAlgFactoryException, self).__init__(message)
Exception raised when using @alg on a function.
62598ef2f9cc0f698b1c46da
class ScaleZip(ZipProcessor): <NEW_LINE> <INDENT> for filename in self.temp_directory.iterdir(): <NEW_LINE> <INDENT> im = Image.open(str(filename)) <NEW_LINE> scaled = im.resize((640,480)) <NEW_LINE> scaled.save(str(filename))
Scale each image in the diretory to 640x480
62598ef2bf627c535bcafc87
class NotTrainedError(ValueError, AttributeError): <NEW_LINE> <INDENT> pass
raise exceptions if model is used before fitting. This class inherits from both ValueError and AttributeError to help with exception handling and backward compatibility. Examples -------- >>> from sklearn.svm import LinearSVC >>> from sklearn.exceptions import NotFittedError >>> try: ... LinearSVC().predict([[1, ...
62598ef2e1aae11d1e7cdc4c
class IndexPageInfo: <NEW_LINE> <INDENT> def __init__(self, current, is_first, is_last): <NEW_LINE> <INDENT> self.current = current <NEW_LINE> self.is_first = is_first <NEW_LINE> self.is_last = is_last <NEW_LINE> self.pre = current - 1 <NEW_LINE> self.next = current + 1
分页信息
62598ef2b7558d5895461e5e
class test_cell_manipulation(ut.TestCase): <NEW_LINE> <INDENT> def test_add_atom_on_graphene(self): <NEW_LINE> <INDENT> a = 5.2 <NEW_LINE> _latt = [[a/2, 0.0, 0.0], [-a/2, a/2*np.sqrt(3.0), 0.0], [0.0, 0.0, 15.0]] <NEW_LINE> _atoms = ["C", "C", ] <NEW_LINE> _pos = [[0.0, 0.0, 0.5], [1.0/3, 2.0/3, 0.5], ] <NEW_LINE> gp ...
Test manipulation methods for lattice and atoms
62598ef2bd1bec0571e144d6
class _BaseCmd(command.BaseCmd): <NEW_LINE> <INDENT> def __getattr__(self, attr_name): <NEW_LINE> <INDENT> if attr_name.startswith('_'): <NEW_LINE> <INDENT> return command.BaseCmd.__getattr__(self, attr_name) <NEW_LINE> <DEDENT> not_existing_attrs = [] <NEW_LINE> hasattr_ = partial(Sfn(hasattr), self) <NEW_LINE> for i,...
Class providing mechanism to perform several method calls specifying one call This class intended to be subclassed only in current module. The behavior is mostly inherited from command.BaseCmd class except __getattr__ method which is extended comparing to the parent class to provide build commandline capabilities Exa...
62598ef2cc0a2c1114479817
class SensorViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.Sensor.objects.all() <NEW_LINE> serializer_class = serializers.SensorSerializer <NEW_LINE> permission_classes = [permissions.IsAuthenticated]
ViewSet for the Sensor class
62598ef2d7e4931a7ef3a8b2
class Sum(AggregationPrimitive): <NEW_LINE> <INDENT> name = "sum" <NEW_LINE> input_types = [Numeric] <NEW_LINE> return_type = Numeric <NEW_LINE> stack_on_self = False <NEW_LINE> stack_on_exclude = [Count] <NEW_LINE> default_value = 0 <NEW_LINE> def get_function(self): <NEW_LINE> <INDENT> return np.sum
Sums elements of a numeric or boolean feature.
62598ef256ac1b37e6300a03
class ArticleEditLock(object): <NEW_LINE> <INDENT> def __init__(self, title, request, message_template=None): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.user_ip = get_real_ip(request) <NEW_LINE> self.created_at = datetime.now() <NEW_LINE> if message_template is None: <NEW_LINE> <INDENT> message_template = (...
A soft lock to edting an article.
62598ef256b00c62f0fb10eb
class TestIndex(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.b1_hg19 = GATestHelper.b1_hg19 <NEW_LINE> self.ga_maf1 = GATestHelper.maf1 <NEW_LINE> self.b2_hg19 = GATestHelper.b2_hg19 <NEW_LINE> <DEDENT> @mock.patch('__builtin__.open') <NEW_LINE> def test_index_genome_alig(self, mock...
Unit tests for the index script.
62598ef226068e7796d4b174
class OptionInt(Option): <NEW_LINE> <INDENT> type = "integer" <NEW_LINE> def parse(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return int(self.value) <NEW_LINE> <DEDENT> except (ValueError, TypeError): <NEW_LINE> <INDENT> return 0
Option type Integer Example: port = 1234
62598ef2e5267d203ee6a120
class BadRequestException(JanusException): <NEW_LINE> <INDENT> def __init__(self, detail=None, code=-1, meta = None): <NEW_LINE> <INDENT> JanusException. __init__(self, title="The web server was unable to understand the request and process it.", detail=detail, status=400, code=code, meta=meta)
represents a Bad Request exception (HTTP 400)
62598ef21b99ca400228e91a
class Style: <NEW_LINE> <INDENT> def __init__(self, point_size=10, point_color="#FFFF00", show_path=True, path_width=2, path_color="#00FF00", path_seconds_ahead=60 * 45, path_seconds_behind=60 * 10, show_sensor=True, sensor_line_width=1, sensor_color="#00FFFF", sensor_fill=False, sensor_fill_alpha=0.2, ): <NEW_LINE> <I...
Visual style for an object in the Dashboard.
62598ef201c39578d7f115bb
class run_ruby(Task.Task): <NEW_LINE> <INDENT> run_str = '${RUBY} ${RBFLAGS} -I ${SRC[0].parent.abspath()} ${SRC}'
Task to run ruby files detected by file extension .rb:: def options(opt): opt.load('ruby') def configure(ctx): ctx.check_ruby_version() def build(bld): bld.env.RBFLAGS = '-e puts "hello world"' bld(source='a_ruby_file.rb')
62598ef232920d7e50bc4844
@tvm._ffi.register_object("relay.LoweredOutput") <NEW_LINE> class LoweredOutput(Object): <NEW_LINE> <INDENT> def __init__(self, outputs, implement): <NEW_LINE> <INDENT> self.__init_handle_by_constructor__(_backend._make_LoweredOutput, outputs, implement)
Lowered output
62598ef2a17c0f6771d5aa6c
@dataclass <NEW_LINE> class InputFeature: <NEW_LINE> <INDENT> input_ids: List[int] <NEW_LINE> attention_mask: List[int] <NEW_LINE> token_type_ids: Optional[List[int]] = None <NEW_LINE> label_ids: Union[List[int], List[List[int]], None] = None
A single set of features of data. Property names are the same names as the corresponding inputs to a model.
62598ef21f5feb6acb16146b
class UserFilter(FilterBase): <NEW_LINE> <INDENT> title = 'user' <NEW_LINE> parameter_name = 'user_id' <NEW_LINE> def lookups(self, request, model_admin): <NEW_LINE> <INDENT> return tuple((u.id, u.email) for u in VokoUser.objects.filter( pk__in=LogEntry.objects.values_list('user_id').distinct()) )
Use this filter to only show current users, who appear in the log.
62598ef2956e5f7376df4a84
class Armc5(Arm): <NEW_LINE> <INDENT> NAME = 'Make-ARMc5' <NEW_LINE> TOOLCHAIN = "ARM" <NEW_LINE> PREPROCESS_ASM = True
ARM Compiler 5 (armcc) specific makefile target
62598ef2ff9c53063f518e78
class Field(object): <NEW_LINE> <INDENT> def __init__(self, name, data_type, mode='NULLABLE', description=''): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.data_type = data_type <NEW_LINE> self.mode = mode <NEW_LINE> self.description = description <NEW_LINE> <DEDENT> def _repr_sql_(self): <NEW_LINE> <INDENT> re...
Represents a single field in a Table schema. This has the properties: - name: the flattened, full-qualified name of the field. - data_type: the type of the field as a string ('INTEGER', 'BOOLEAN', 'FLOAT', 'STRING' or 'TIMESTAMP'). - mode: the mode of the field; 'NULLABLE' by default. - description: a description ...
62598ef2f9cc0f698b1c46db
class TestParser: <NEW_LINE> <INDENT> GOOD_QUESTION = "Salut Papy ! Tu sais où est la Tour Eiffel ?" <NEW_LINE> BAD_QUESTION = "Salut !" <NEW_LINE> PLACE = "tour eiffel" <NEW_LINE> def test_init(self): <NEW_LINE> <INDENT> parser = Parser(self.GOOD_QUESTION) <NEW_LINE> assert type(parser.question) == type(self.GOOD_QUES...
Class Parser parse the phrase given to PapyBot. This parser extract from the phrase : - the place
62598ef25fdd1c0f98e5c7ba
class ImporterTestCheckInterpreteWithLineAsTreeElements(TreeTestBase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._conf = TestConfigurationSet. retrieve_test_configuration_data_as_treeelements() <NEW_LINE> self.tree_instance = Tree(self._conf) <NEW_LINE> self.test_set = TestConfigurationSe...
Tests simple tree structure with data lines as own tree elements (lowest level)
62598ef28a43f66fc4bf098d
class DescribeCustomHeaderResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RuleId = None <NEW_LINE> self.Headers = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RuleId = params.get("RuleId") <NEW_LINE> if param...
DescribeCustomHeader返回参数结构体
62598ef25fc7496912d4767e
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> def __str__(self): <NEW_LINE> <INDENT> if len(self.text) <= 49: <NEW_LINE> <INDENT> return self.text <...
Информация, изученная пользователем по теме
62598ef22c8b7c6e89bd1fdb
class AnonymousSolution(DraftContent): <NEW_LINE> <INDENT> parent = models.ForeignKey(Post, related_name='anonymous_solutions') <NEW_LINE> def publish(self, user): <NEW_LINE> <INDENT> added_at = datetime.datetime.now() <NEW_LINE> Post.objects.create_new_solution( thread=self.parent.thread, author=user, added_at=added_a...
Todo: re-route the foreign key to ``Thread``
62598ef2e1aae11d1e7cdc4d
class ReadOnlyCapableSQLDictStorage(SQLDictStorage): <NEW_LINE> <INDENT> def __init__(self, context, session): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.session = session <NEW_LINE> self.readonly = is_in_readonly_mode() <NEW_LINE> <DEDENT> def __setitem__(self, key, value): <NEW_LINE> <INDENT> if self....
DictStorage that reads from, but doesn't write to SQL when instance is in readonly mode.
62598ef221bff66bcd72146e
class Address(BaseModel, Base): <NEW_LINE> <INDENT> __tablename__ = "address" <NEW_LINE> user_id = Column(Integer, ForeignKey("user_info.id"), nullable=False) <NEW_LINE> link_name = Column(String(20), nullable=False) <NEW_LINE> link_phone = Column(String(12), nullable=False) <NEW_LINE> link_email = Column(String(64)) <...
通讯录
62598ef24428ac0f6e656d66
class LoggingThreadTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self) -> None: <NEW_LINE> <INDENT> self.q = mp.Queue() <NEW_LINE> self.t = threading.Thread(target=ga._logging_thread, kwargs={'logging_queue': self.q}) <NEW_LINE> self.t.start() <NEW_LINE> <DEDENT> def tearDown(self) -> None: <NEW_LINE> <IND...
Test _logging_thread function.
62598ef2f548e778e5969da5
class ITemplateDossierProperties(ITemplateFolderProperties): <NEW_LINE> <INDENT> pass
XXX Legacy interface from rename TemplateFolder to TemplateDossier. Do not remove this interface until each GEVER-installation is updated to the version containing this change.
62598ef255399d3f05624d3f