code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestCandidateFlagsPage(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return CandidateFla...
CandidateFlagsPage unit test stubs
62599063435de62698e9d51d
class VnfOnboardingReply(Model): <NEW_LINE> <INDENT> def __init__(self, onboarded_vnf_pkg_info_id: str=None, vnfd_id: str=None): <NEW_LINE> <INDENT> self.swagger_types = { "onboarded_vnf_pkg_info_id": str, "vnfd_id": str } <NEW_LINE> self.attribute_map = { "onboarded_vnf_pkg_info_id": "onboardedVnfPkgInfoId", "vnfd_id"...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62599063d6c5a102081e3839
class ParamType(object): <NEW_LINE> <INDENT> PRIMPAR_LABEL = 0x20 <NEW_LINE> HND = 0x10 <NEW_LINE> ADR = 0x08 <NEW_LINE> LCS = 0x84 <NEW_LINE> LAB1 = 0xA0 <NEW_LINE> LC0 = 0x00 <NEW_LINE> LC1 = 0x81 <NEW_LINE> LC2 = 0x82 <NEW_LINE> LC4...
Parameter types that are used by the VM.
62599063be8e80087fbc079c
class ValidateRigControlsDefaults(pyblish.api.InstancePlugin): <NEW_LINE> <INDENT> order = colorbleed.api.ValidateContentsOrder + 0.05 <NEW_LINE> label = "Rig Controls Defaults" <NEW_LINE> hosts = ["maya"] <NEW_LINE> families = ["colorbleed.rig"] <NEW_LINE> actions = [colorbleed.api.RepairAction, colorbleed.maya.action...
Validate rig controller default values. Controls must have the transformation attributes on their default values of translate zero, rotate zero and scale one when they are unlocked attributes.
6259906301c39578d7f142bf
class DNSServerIDL(object): <NEW_LINE> <INDENT> thrift_spec = (None, (1, TType.STRUCT, 'addr', (Shared.ttypes.NetworkAddressIDL, Shared.ttypes.NetworkAddressIDL.thrift_spec), None), (2, TType.I32, 'primary', None, None), (3, TType.STRING, 'vrfName', None, None)) <NEW_LINE> def __init__(self, addr = None, primary = None...
DNS Server IDL Attributes: - addr - primary - vrfName
625990634f6381625f19a02e
class CmdUnconnectedConnect(COMMAND_DEFAULT_CLASS): <NEW_LINE> <INDENT> key = 'connect' <NEW_LINE> aliases = ['conn', 'con', 'co'] <NEW_LINE> locks = 'cmd:all()' <NEW_LINE> arg_regex = r'\s.*?|$' <NEW_LINE> def func(self): <NEW_LINE> <INDENT> session = self.caller <NEW_LINE> if _throttle(session, maxlim=5, timeout=5 * ...
connect to the game Usage (at login screen): connect accountname password connect "account name" "pass word" Use the create command to first create an account before logging in. If you have spaces in your name, enclose it in double quotes.
62599063009cb60464d02c4c
class InvalidRequestError(Error): <NEW_LINE> <INDENT> pass
The request was invalid.
6259906399cbb53fe68325f8
@attr.s <NEW_LINE> class EntityCollections(object): <NEW_LINE> <INDENT> _parent = attr.ib(repr=False, cmp=False, hash=False) <NEW_LINE> _availiable_collections = attr.ib(repr=False, cmp=False, hash=False) <NEW_LINE> _filters = attr.ib(cmp=False, hash=False, default=attr.Factory(dict)) <NEW_LINE> _collection_cache = att...
Caches instances of collection objects for use by the collections accessor The appliance object has a ``collections`` attribute. This attribute is an instance of this class. It is initialized with an appliance object and locally stores a cache of all known good collections.
625990638e7ae83300eea7a2
class SearchCondition(object): <NEW_LINE> <INDENT> EQUAL = 0 <NEW_LINE> LIKE = 1 <NEW_LINE> FULL_TEXT = 2 <NEW_LINE> GTE = 3 <NEW_LINE> LTE = 4 <NEW_LINE> NOT = 5 <NEW_LINE> _VALUES_TO_NAMES = { 0: "EQUAL", 1: "LIKE", 2: "FULL_TEXT", 3: "GTE", 4: "LTE", 5: "NOT", } <NEW_LINE> _NAMES_TO_VALUES = { "EQUAL": 0, "LIKE": 1,...
<p>Different search operators that can be used with the entity search fields</p> <li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li> <li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li> <li>FULL_TEXT : Does a full text search. Only applicab...
62599063009cb60464d02c4d
class MultiAgentSearchAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, evalFn = 'scoreEvaluationFunction', depth = '2'): <NEW_LINE> <INDENT> self.index = 0 <NEW_LINE> self.evaluationFunction = util.lookup(evalFn, globals()) <NEW_LINE> self.depth = int(depth) <NEW_LINE> <DEDENT> def isTerminal(self, state, depth, ag...
This class provides some common elements to all of your multi-agent searchers. Any methods defined here will be available to the MinimaxPacmanAgent, AlphaBetaPacmanAgent & ExpectimaxPacmanAgent. You *do not* need to make any changes here, but you can if you want to add functionality to all your adversarial search age...
6259906363d6d428bbee3e13
class UserBan( Base ): <NEW_LINE> <INDENT> __tablename__ = 'user_bans' <NEW_LINE> __table_args__ = {'extend_existing': True} <NEW_LINE> id = Column( Integer, primary_key = True ) <NEW_LINE> id_user = Column( Integer, ForeignKey( 'users.id') ) <NEW_LINE> date_ban = Column( Date ) <NEW_LINE> reason =...
Describe columns in table UserBans
625990634e4d562566373b1c
class PostDevelopCommand(develop): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> develop.run(self) <NEW_LINE> copyfile()
Post-installation for development mode.
6259906376e4537e8c3f0c98
class ModalTimerOperator(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "wm.implicit_event_loop" <NEW_LINE> bl_label = "Event Loop For Noodle Node Editor" <NEW_LINE> _timer = None <NEW_LINE> def modal(self, context, event): <NEW_LINE> <INDENT> global jobs <NEW_LINE> if event.type in {'ESC'}: <NEW_LINE> <INDENT> s...
Operator which runs its self from a timer
625990637d847024c075daec
class PublicKeyAlgorithm(Sequence): <NEW_LINE> <INDENT> _fields = [ ('algorithm', PublicKeyAlgorithmId), ('parameters', Any, {'optional': True}), ] <NEW_LINE> _oid_pair = ('algorithm', 'parameters') <NEW_LINE> _oid_specs = { 'rsa': Null, 'dsa': DSAParams, 'ec': ECDomainParameters, }
Original Name: AlgorithmIdentifier Source: https://tools.ietf.org/html/rfc5280#page-18
625990634e4d562566373b1d
class Application(object): <NEW_LINE> <INDENT> instance = None <NEW_LINE> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if Application.instance is None: <NEW_LINE> <INDENT> Application.instance = object.__new__(cls) <NEW_LINE> <DEDENT> return Application.instance <NEW_LINE> <DEDENT> def __init__(self, size, na...
Base Application
62599063435de62698e9d51e
class Runnable(object): <NEW_LINE> <INDENT> thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> raise AttributeError("No constructor defined - class is abstract") <NEW_LINE> <DEDENT> __repr__ = _swig_repr <...
Proxy of C++ sys::Runnable class.
625990633539df3088ecd9b4
class Button(pygame.sprite.Sprite): <NEW_LINE> <INDENT> __press = pygame.mixer.Sound('sounds\\button.wav') <NEW_LINE> def __init__(self, num): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.__font = pygame.font.Font('fonts\\Square.ttf', 30) <NEW_LINE> self.__text = ('START', 'CONTROLS', 'QUIT',...
button class
625990642ae34c7f260ac7fd
class ProtocolFileRole(str, Enum): <NEW_LINE> <INDENT> MAIN = "main" <NEW_LINE> LABWARE = "labware"
The purpose of a given file in a protocol. Args: MAIN: The protocol's main file. In a JSON protocol, this is will be the JSON file. In a Python protocol, this is the file that exports the main `run` method. LABWARE: A labware definition file, loadable by a Python file in the same protoc...
6259906438b623060ffaa3dc
class LabelingTaskOrderingFilter(OrderingFilter): <NEW_LINE> <INDENT> REPLACE_REQUEST_FIELDS = { 'labeler': 'labeler_name', } <NEW_LINE> def get_ordering(self, request, queryset, view): <NEW_LINE> <INDENT> ordering = super().get_ordering(request, queryset, view) <NEW_LINE> return [self._replace_request_field(field) for...
To keep the API query names consistent with the `LabelingTaskFilterSet`, the ordering must be applied to the different field that is requested.
62599064d6c5a102081e383b
class ClientConnectorStatistics(ConnectorStatistics): <NEW_LINE> <INDENT> def init(self): <NEW_LINE> <INDENT> self._stats = { 'created_at': 0, 'last_received_pdu_at': 0, 'last_sent_pdu_at': 0, 'last_received_elink_at': 0, 'last_sent_elink_at': 0, 'last_seqNum_at': 0, 'last_seqNum': None, 'connected_at': 0, 'bound_at': ...
One client connector statistics holder
62599064d7e4931a7ef3d710
class TestUtilsPrune(unittest.TestCase): <NEW_LINE> <INDENT> pass
:param m: number of instances / samples :param L: number of labels / classes :param T: number of individual classifiers in the original ensemble :param H: size of the pruned sub-ensemble, number of individual classifiers
625990642ae34c7f260ac7fe
class TaskPanelHeightsPage(TaskPanelPage): <NEW_LINE> <INDENT> def getForm(self): <NEW_LINE> <INDENT> return FreeCADGui.PySideUic.loadUi(":/panels/PageHeightsEdit.ui") <NEW_LINE> <DEDENT> def initPage(self, obj): <NEW_LINE> <INDENT> self.safeHeight = PathGui.QuantitySpinBox(self.form.safeHeight, obj, 'SafeHeight') <NEW...
Page controller for heights.
6259906497e22403b383c623
class networkgen(): <NEW_LINE> <INDENT> def __init__(self,**kwargs): <NEW_LINE> <INDENT> self.net_params = {} <NEW_LINE> for k,v in kwargs.items(): <NEW_LINE> <INDENT> self.net_params[k] = v <NEW_LINE> <DEDENT> self.data = pd.read_csv(self.net_params['protein_nodes_file']) <NEW_LINE> self.data.columns = ['uniprot_id','...
A class to generate a network of protein based on their p-value from tanimoto score
62599064e64d504609df9f59
class icCellAddressInvalidError(Exception): <NEW_LINE> <INDENT> def __init__(self, args=None, user=None): <NEW_LINE> <INDENT> self.args = args
Ошибка некорректного адреса ячейки.
62599064a17c0f6771d5d731
class Tabular(object): <NEW_LINE> <INDENT> def __init__(self, columns, toprule=False, bottomrule=False): <NEW_LINE> <INDENT> self.header = r'\begin{tabular}{' + columns + r'}' <NEW_LINE> self.numcols = len(re.findall('l|c|r|p{.*?}', columns)) <NEW_LINE> self.rows = [] <NEW_LINE> self.footer = r'\end{tabular}' <NEW_LINE...
Simple LaTeX tabular generator.
62599064627d3e7fe0e085a2
class UserEvent(object): <NEW_LINE> <INDENT> def __init__(self, event_context, user_id, visitor_attributes, bot_filtering=None): <NEW_LINE> <INDENT> self.event_context = event_context <NEW_LINE> self.user_id = user_id <NEW_LINE> self.visitor_attributes = visitor_attributes <NEW_LINE> self.bot_filtering = bot_filtering ...
Class respresenting User Event.
625990640a50d4780f70694b
class Resolver: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._cache = {} <NEW_LINE> <DEDENT> def __call__(self, what): <NEW_LINE> <INDENT> if hasattr(what, '__iter__'): <NEW_LINE> <INDENT> result = [] <NEW_LINE> for host in what: <NEW_LINE> <INDENT> result.extend(self(host)) <NEW_LINE> <DEDENT> resu...
Implement a simple domain name to address resolver. Use the an instance as a function to resolve host names.
62599064a219f33f346c7f1e
class AbortError(Exception): <NEW_LINE> <INDENT> pass
Any fatal errors that would prevent handroll from proceeding should signal with the ``AbortError`` exception.
62599064f548e778e596cca1
class RequestMetadata(proto.Message): <NEW_LINE> <INDENT> domain = proto.Field( proto.STRING, number=1, ) <NEW_LINE> session_id = proto.Field( proto.STRING, number=2, ) <NEW_LINE> user_id = proto.Field( proto.STRING, number=3, ) <NEW_LINE> allow_missing_ids = proto.Field( proto.BOOL, number=4, ) <NEW_LINE> device_info ...
Meta information related to the job searcher or entity conducting the job search. This information is used to improve the performance of the service. Attributes: domain (str): Required if [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] is unset or ``false``. ...
6259906467a9b606de54762e
class ConstantLeaf: <NEW_LINE> <INDENT> def __init__(self, v): <NEW_LINE> <INDENT> self.v = v <NEW_LINE> <DEDENT> def to_str(self, indent="", feature_names=None): <NEW_LINE> <INDENT> return indent + "Constant(" + str(self.v) + ")" <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.to_str() <NEW_LINE...
Decision tree node which always predicts the same value.
62599064435de62698e9d520
class DescribeCdnDataResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Interval = None <NEW_LINE> self.Data = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Interval = params.get("Interval") <NEW_LINE> if params....
DescribeCdnData response structure.
62599064379a373c97d9a736
class Dao(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def db_2_file(db_helper, table, dst_file, column=0): <NEW_LINE> <INDENT> data = Dao.read_all(db_helper, table) <NEW_LINE> with codecs.open(dst_file, 'wb') as dst_fp: <NEW_LINE> <INDENT> for d...
数据库访问对象
62599064442bda511e95d8e6
class ISliderPage(Interface): <NEW_LINE> <INDENT> pass
marker interface for a page that implements a slider
6259906416aa5153ce401bf5
@dataclass <NEW_LINE> class ScaleByYogi(GradientTransformation[GenericGradientState, Weights], Generic[Weights]): <NEW_LINE> <INDENT> b1: RealNumeric = 0.9 <NEW_LINE> b2: RealNumeric = 0.999 <NEW_LINE> eps: RealNumeric = 1e-3 <NEW_LINE> eps_root: RealNumeric = 0.0 <NEW_LINE> initial_accumulator_value: RealNumeric = 1e-...
Rescale updates according to the Yogi algorithm. References: [Zaheer et al, 2018](https://papers.nips.cc/paper/2018/hash/90365351ccc7437a1309dc64e4db32a3-Abstract.html) # noqa, pylint: disable=line-too-long Args: b1: decay rate for the exponentially weighted average of grads. b2: decay rate for the expone...
6259906499cbb53fe68325fc
class Url(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = "Url" <NEW_LINE> verbose_name_plural = "Urls" <NEW_LINE> <DEDENT> uuid = models.UUIDField( verbose_name="UUID", default=uuid.uuid4, editable=False, unique=True) <NEW_LINE> url = models.URLField( unique=False, verbose_name="URL",...
Url Model
625990641b99ca40022900c2
class Stack: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.store = [] <NEW_LINE> <DEDENT> def push(self, item): <NEW_LINE> <INDENT> self.store.append(item) <NEW_LINE> <DEDENT> def pop(self): <NEW_LINE> <INDENT> return self.store.pop() <NEW_LINE> <DEDENT> def isempty(self): <NEW_LINE> <INDENT> return ...
implementation of a stack
625990648e7ae83300eea7a6
class SubTaskError(AppError): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> message = ''.join(['Sub task error: ', message]) <NEW_LINE> super().__init__(message)
This class describe error which appear when user try to work with incorrect sub task
625990648e7ae83300eea7a7
class Bullet_two(GameSprite): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__('/home/guobin/图片/bullet2.png',-2) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> self.rect.y += self.speed <NEW_LINE> if self.rect.bottom ...
子弹精灵
625990647047854f46340ad3
class BRAINSAlignMSP(SEMLikeCommandLine): <NEW_LINE> <INDENT> input_spec = BRAINSAlignMSPInputSpec <NEW_LINE> output_spec = BRAINSAlignMSPOutputSpec <NEW_LINE> _cmd = " BRAINSAlignMSP " <NEW_LINE> _outputs_filenames = { "OutputresampleMSP": "OutputresampleMSP.nii", "resultsDir": "resultsDir", } <NEW_LINE> _redirect_x =...
title: Align Mid Saggital Brain (BRAINS) category: Utilities.BRAINS description: Resample an image into ACPC alignement ACPCDetect
62599064a219f33f346c7f20
class StackMixin(BaseEvaluator): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self._stack = [0] <NEW_LINE> <DEDENT> def _check_stack(self, var): <NEW_LINE> <INDENT> idx = int(var[1]) <NEW_LINE> stack_size = len(self._stack) <NEW_LINE> if stack...
This mixin manages the stack of a program.
62599064627d3e7fe0e085a4
class HttpJsonRequest: <NEW_LINE> <INDENT> def __init__(self, url, encoding): <NEW_LINE> <INDENT> self._encoding = encoding <NEW_LINE> self._http = urlopen(url) <NEW_LINE> self._data_str = None <NEW_LINE> self._data = None <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f'<HttpJsonRequest: {self.url}...
Class for handling HTTP/JSON requests. Use `HttpJsonClient` to create an instance.
62599064462c4b4f79dbd120
class DatacenterHAFullTopo( Topo ): <NEW_LINE> <INDENT> def build( self, numRacks=4, numHostsPerRack=4, numHASwitches=2 ): <NEW_LINE> <INDENT> if numHASwitches >= 16: <NEW_LINE> <INDENT> raise Exception( "Please use less than 16 HA switches" ) <NEW_LINE> <DEDENT> self.racks = [] <NEW_LINE> rootSwitches = [] <NEW_LINE> ...
Configurable Datacenter Topology
62599064f548e778e596cca3
class SalesforceAutomaticFields(SalesforceBaseTest): <NEW_LINE> <INDENT> start_date = (datetime.now() + timedelta(days=-1)).strftime("%Y-%m-%dT00:00:00Z") <NEW_LINE> @staticmethod <NEW_LINE> def expected_sync_streams(): <NEW_LINE> <INDENT> return { 'Account', 'Contact', 'Lead', 'Opportunity', 'User', } <NEW_LINE> <DED...
Test that with no fields selected for a stream automatic fields are still replicated
62599064e5267d203ee6cf4b
class Solution: <NEW_LINE> <INDENT> def rotate(self, matrix): <NEW_LINE> <INDENT> n = len(matrix) <NEW_LINE> for i in range(n / 2): <NEW_LINE> <INDENT> for j in range(n): <NEW_LINE> <INDENT> matrix[i][j], matrix[n - 1 - i][j] = matrix[n - 1 - i][j], matrix[i][j] <NEW_LINE> <DEDENT> <DEDENT> for i in range(n): <NEW_LINE...
@param matrix: A list of lists of integers @return: Nothing
6259906444b2445a339b74ed
class Meta: <NEW_LINE> <INDENT> model = Notification <NEW_LINE> fields = ('id', 'timestamp', 'unread', 'description')
Defines fields to be returned to user
62599064435de62698e9d522
class UserRegisterForm(UserCreationForm): <NEW_LINE> <INDENT> email = forms.EmailField(required=False) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ['username', 'email', 'password1', 'password2']
Form to create new user
62599064435de62698e9d523
class TestObserverEvents(TestCase, RegexTestCase): <NEW_LINE> <INDENT> def test_on_newtab_changed(self): <NEW_LINE> <INDENT> patterns = ( 'Services.obs.addObserver(NewTabObserver, "newtab-url-changed", false);', ( 'var foo = Cc["foo"].getService(Ci.nsIObserverService);' 'foo.addObserver(NewTabObserver, "newtab-url-chan...
Tests that code related to observer events trigger warnings.
6259906438b623060ffaa3de
class CmdlineTest(Test): <NEW_LINE> <INDENT> def __init__(self, input_idx): <NEW_LINE> <INDENT> Test.__init__(self, input_idx) <NEW_LINE> self.fio = (None, None, None) <NEW_LINE> <DEDENT> def cmd(self): <NEW_LINE> <INDENT> c = [] <NEW_LINE> if self.prefix != None: <NEW_LINE> <INDENT> c.extend(self.prefix) <NEW_LINE> <D...
Represents cmdline tests. The input format is a tuple (A, I) in which A is a list of arguments and I is a tuple of standard I/O files (stdin, stdout, stderr). (None means using default)
62599064d7e4931a7ef3d712
class FixedWithPts(Mortgage): <NEW_LINE> <INDENT> def __init__(self, loan, r, months, pts): <NEW_LINE> <INDENT> Mortgage.__init__(self, loan, r, months) <NEW_LINE> self.pts = pts <NEW_LINE> self.paid = [loan * (pts/100)] <NEW_LINE> self.legend = 'Fixed, ' + str(round(r*100, 2)) + '%, ' + str(pts) + ' points'
先支付贷款总额的pts%,剩下的部分可以享受低利率
6259906492d797404e3896ea
class PageContext(object): <NEW_LINE> <INDENT> def __init__(self, course, repo, commit_sha, flow_session, in_sandbox=False, page_uri=None): <NEW_LINE> <INDENT> self.course = course <NEW_LINE> self.repo = repo <NEW_LINE> self.commit_sha = commit_sha <NEW_LINE> self.flow_session = flow_session <NEW_LINE> self.in_sandbox ...
.. attribute:: course .. attribute:: repo .. attribute:: commit_sha .. attribute:: flow_session May be None. .. attribute:: page_uri Note that this is different from :class:`course.utils.FlowPageContext`, which is used internally by the flow views.
62599064be8e80087fbc07a2
class User(Resource): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> response = Response() <NEW_LINE> request_validators = [ {'payload': {'data': json.loads(request.data), 'schema': UserCreatePayloadSchema}}, ] <NEW_LINE> ValidateRequest.validate(response, request_validators) <NEW_LINE> if response.errors: <NE...
This resource will handle all operations on User
625990643617ad0b5ee0786b
class RevResBottleneck(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, stride, preactivate, bottleneck_factor=4): <NEW_LINE> <INDENT> super(RevResBottleneck, self).__init__() <NEW_LINE> mid_channels = out_channels // bottleneck_factor <NEW_LINE> if preactivate: <NEW_LINE> <INDENT> self.con...
RevNet bottleneck block for residual path in RevNet unit. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. stride : int or tuple/list of 2 int Strides of the convolution. preactivate : bool Whether use pre-activation for the first convolut...
625990645fdd1c0f98e5f69e
class T85(Modular_joint): <NEW_LINE> <INDENT> def __init__(self, id, eds_file): <NEW_LINE> <INDENT> self.__reduction_ratio = 188.24 <NEW_LINE> Modular_joint.__init__(self, id, eds_file, self.__reduction_ratio)
T85 control base on the canopen
625990643d592f4c4edbc5f8
class PageCyclerV2Top10Mobile(_PageCyclerV2): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def Name(cls): <NEW_LINE> <INDENT> return 'page_cycler_v2.top_10_mobile' <NEW_LINE> <DEDENT> def CreateStorySet(self, options): <NEW_LINE> <INDENT> return page_sets.Top10MobilePageSet(run_no_page_interactions=True, cache_temperatu...
Page load time benchmark for the top 10 mobile web pages. Runs against pages recorded in November, 2013.
62599064cb5e8a47e493cd12
class UserModelForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('first_name', 'middle_name', 'last_name', 'phone', 'city', 'photo', 'position' ) <NEW_LINE> widgets = { 'first_name': widgets.TextInput(attrs={ 'placeholder': _('First name') }), 'middl...
...
625990647047854f46340ad4
class Token(object): <NEW_LINE> <INDENT> __slots__ = ('type', 'value', 'directive', 'end_of_context') <NEW_LINE> def __init__(self, type, value=None, directive=None, end_of_context=False): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> self.value = value <NEW_LINE> self.directive = directive <NEW_LINE> self.end_of_con...
A token prepresents a part of a document with references to a directive that processes that token.
625990644e4d562566373b22
class GlobalG(GlobalGCore): <NEW_LINE> <INDENT> def __init__(self, log=False): <NEW_LINE> <INDENT> GlobalGCore.__init__(self, log) <NEW_LINE> <DEDENT> def __getattribute__(self, name='x', *l): <NEW_LINE> <INDENT> if name.startswith('__') and name.endswith('__') or name in dir(GlobalGCore): <NEW_LINE> <INDENT> return Gl...
TODO: for dev-tips: after every operating in IPython@spyder, will read this instance 10+ times some times will read attr like "__xx__" but not in dir(object): in this case don't return anything just raise the Exception if is instance.__getattribute__(name) try to use getattr(instance, name) in...
62599064f548e778e596cca5
class UserInfoResponse: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'result': 'UserInfoResult', 'status': 'str', 'error_message': 'str', 'composedOn': 'long' } <NEW_LINE> self.result = None <NEW_LINE> self.status = None <NEW_LINE> self.error_message = None <NEW_LINE> self.composedO...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259906445492302aabfdbf7
class MicrosoftAzureTestUrl(object): <NEW_LINE> <INDENT> def __init__( self, credentials, subscription_id, api_version='2014-04-01-preview', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None): <NEW_LINE> <INDENT> self.config = MicrosoftAzureT...
Some cool documentation. :ivar config: Configuration for client. :vartype config: MicrosoftAzureTestUrlConfiguration :ivar group: Group operations :vartype group: .operations.GroupOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials ...
6259906432920d7e50bc7762
class Inventory: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.items = {} <NEW_LINE> self.types = {} <NEW_LINE> self.total_count = 0 <NEW_LINE> for data in ItemTypes: <NEW_LINE> <INDENT> self.types[data.slot] = data <NEW_LINE> self.items[data.slot] = 0 <NEW_LINE> <DEDENT> <DEDENT> def set_item(self, ...
Inventory holds dictory of item counts where key is the item type and value is the count
625990644e4d562566373b23
class ROISelector(object): <NEW_LINE> <INDENT> def __init__(self, image): <NEW_LINE> <INDENT> self.__image = image.copy() <NEW_LINE> <DEDENT> def SelectArea(self, winName="Select an area", winPos=(400, 400)): <NEW_LINE> <INDENT> self.__ResetPoints() <NEW_LINE> self.__winName = winName <NEW_LINE> cv2.namedWindow(winName...
This class returns the corners of the selected area as: [(UpperLeftcorner), (LowerRightCorner)]. Use the Right Mouse Button to set upper left hand corner and the Left Mouse Button to set the lower right corner. Click on the image to set the area Keys: Enter/SPACE - OK ESC/q - Exit (Cancel)
62599064adb09d7d5dc0bc86
class ValloxStateProxy: <NEW_LINE> <INDENT> def __init__(self, hass, client): <NEW_LINE> <INDENT> self._hass = hass <NEW_LINE> self._client = client <NEW_LINE> self._metric_cache = {} <NEW_LINE> self._profile = None <NEW_LINE> self._valid = False <NEW_LINE> <DEDENT> def fetch_metric(self, metric_key): <NEW_LINE> <INDEN...
Helper class to reduce websocket API calls.
625990643539df3088ecd9ba
class Meta: <NEW_LINE> <INDENT> fields = ['trigger_conditions', 'end_conditions', 'task_templates']
This class contains the serializer metadata.
625990649c8ee82313040d16
class ArrayType(TypeDecorator): <NEW_LINE> <INDENT> impl = String <NEW_LINE> def process_bind_param(self, value, dialect): <NEW_LINE> <INDENT> return json.dumps(value) <NEW_LINE> <DEDENT> def process_result_value(self, value, dialect): <NEW_LINE> <INDENT> return json.loads(value) <NEW_LINE> <DEDENT> def copy(self, **kw...
Sqlite-like does not support arrays. Let's use a custom type decorator. See http://docs.sqlalchemy.org/en/latest/core/types.html#sqlalchemy.types.TypeDecorator
625990643cc13d1c6d466e5f
class SynapseSite(Site): <NEW_LINE> <INDENT> def __init__(self, logger_name, site_tag, config, resource, *args, **kwargs): <NEW_LINE> <INDENT> Site.__init__(self, resource, *args, **kwargs) <NEW_LINE> self.site_tag = site_tag <NEW_LINE> proxied = config.get("x_forwarded", False) <NEW_LINE> self.requestFactory = Synapse...
Subclass of a twisted http Site that does access logging with python's standard logging
6259906476e4537e8c3f0c9f
class ZincArtifactFactory(object): <NEW_LINE> <INDENT> def __init__(self, workdir, context, zinc_utils): <NEW_LINE> <INDENT> self._workdir = workdir <NEW_LINE> self.context = context <NEW_LINE> self.zinc_utils = zinc_utils <NEW_LINE> self._classes_dirs_base = os.path.join(self._workdir, 'classes') <NEW_LINE> self._anal...
Creates objects representing zinc artifacts.
62599064379a373c97d9a73a
class LogisticNormal(TransformedDistribution): <NEW_LINE> <INDENT> arg_constraints = {'loc': constraints.real, 'scale': constraints.positive} <NEW_LINE> support = constraints.simplex <NEW_LINE> has_rsample = True <NEW_LINE> def __init__(self, loc, scale, validate_args=None): <NEW_LINE> <INDENT> base_dist = Normal(loc, ...
Creates a logistic-normal distribution parameterized by :attr:`loc` and :attr:`scale` that define the base `Normal` distribution transformed with the `StickBreakingTransform` such that:: X ~ LogisticNormal(loc, scale) Y = log(X / (1 - X.cumsum(-1)))[..., :-1] ~ Normal(loc, scale) Args: loc (float or Tenso...
6259906491f36d47f2231a1d
class MobileDetectionMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> if request.GET.get('cordova', None): <NEW_LINE> <INDENT> if request.GET.get('cordova') == 'true': <NEW_LINE> <INDENT> request.session['cordova'] = True <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> reque...
Useful middleware to detect if the user is on a mobile device. http://djangosnippets.org/snippets/2001/
625990642ae34c7f260ac804
class Restaurant(): <NEW_LINE> <INDENT> def __init__(self, restaurant_name, cuisine_type): <NEW_LINE> <INDENT> self.restaurant_name = restaurant_name <NEW_LINE> self.cuisine_type = cuisine_type <NEW_LINE> <DEDENT> def describe_restaurant(self): <NEW_LINE> <INDENT> print(self.restaurant_name.title() + " serves delicious...
class to define attributes for restaurant instances and indicate if they're open or not
6259906456ac1b37e6303875
class _IsString(object): <NEW_LINE> <INDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return isinstance(other, basestring)
Helper class to be used when checking equality when you don't what the ID is but you want to check that it's an ID
6259906499cbb53fe6832600
class FeatureParser(object): <NEW_LINE> <INDENT> def __init__(self, debug_level=0, use_fuzziness=1, feature_cleaner=FeatureValueCleaner()): <NEW_LINE> <INDENT> self._scanner = GenBankScanner(debug_level) <NEW_LINE> self.use_fuzziness = use_fuzziness <NEW_LINE> self._cleaner = feature_cleaner <NEW_LINE> <DEDENT> def par...
Parse GenBank files into Seq + Feature objects (OBSOLETE). Direct use of this class is discouraged, and may be deprecated in a future release of Biopython. Please use Bio.SeqIO.parse(...) or Bio.SeqIO.read(...) instead.
6259906416aa5153ce401bf9
class DataProblem: <NEW_LINE> <INDENT> def __init__(self, json_file_path): <NEW_LINE> <INDENT> self._depot_ = 0 <NEW_LINE> self._json_path = json_file_path <NEW_LINE> self.data = DataTransformItem(self._json_path) <NEW_LINE> <DEDENT> def fit(self): <NEW_LINE> <INDENT> self.data.transform() <NEW_LINE> return self <NEW_L...
init data for vrp problem, vehicle, nodes, locations, demand etc.
6259906497e22403b383c629
class IpClusterBackend(object): <NEW_LINE> <INDENT> def __init__(self, ctx): <NEW_LINE> <INDENT> self.ctx = ctx <NEW_LINE> <DEDENT> def run(self, loop, mapPlugin): <NEW_LINE> <INDENT> from IPython import parallel <NEW_LINE> client = parallel.Client() <NEW_LINE> view = client.load_balanced_view() <NEW_LINE> try: <NEW_LI...
Backend based on IPython cluster. Will distribute the workload among the available engines.
625990641b99ca40022900c4
class RunNoWorries(Run): <NEW_LINE> <INDENT> def __init__(self, cmd, **kwargs): <NEW_LINE> <INDENT> super(RunNoWorries, self).__init__(cmd, **kwargs) <NEW_LINE> self._post_exitcode_log_failure = self.log.debug
When the exitcode is >0, log.debug instead of log.error
6259906421bff66bcd724382
class LinearDeformation(odl.Operator): <NEW_LINE> <INDENT> def __init__(self, fspace, vspace, grid, sigma): <NEW_LINE> <INDENT> self.grid = grid <NEW_LINE> self.sigma = sigma <NEW_LINE> super().__init__(odl.ProductSpace(fspace, vspace), fspace, False) <NEW_LINE> <DEDENT> def _call(self, x): <NEW_LINE> <INDENT> f, alpha...
A linear deformation given by: ``g(x) = f(x + v(x))`` Where ``f(x)`` is the input template and ``v(x)`` is the translation at point ``x``. ``v(x)`` is computed using gaussian kernels with midpoints at ``grid``.
62599064cb5e8a47e493cd13
class FileHandler(object): <NEW_LINE> <INDENT> def __init__(self, rootdir, default_file): <NEW_LINE> <INDENT> logging.debug("fh: user specified rootdir: %s", rootdir) <NEW_LINE> rootdir = os.path.abspath(os.path.realpath(os.path.abspath(rootdir))) <NEW_LINE> logging.debug("fh: absolute rootdir is: %s", rootdir) <NEW_LI...
File handler class
625990640a50d4780f70694e
class ParticalTree(object): <NEW_LINE> <INDENT> def __init__(self,root,df,momentumScale = 1): <NEW_LINE> <INDENT> self.tree = Treeview(root) <NEW_LINE> self.df = df <NEW_LINE> self.ms = momentumScale <NEW_LINE> fieldnames = list(self.df.columns.values) <NEW_LINE> self.tree['columns'] = fieldnames <NEW_LINE> self.tree.c...
description of class
625990647d847024c075daf4
class QualificationDegree(ModelSQL, ModelView): <NEW_LINE> <INDENT> __name__ = 'rrhh.qualification.degree' <NEW_LINE> name = fields.Char('Name', required=True, translate=True) <NEW_LINE> active = fields.Boolean('Active') <NEW_LINE> @staticmethod <NEW_LINE> def default_active(): <NEW_LINE> <INDENT> return True
Qualification degree
625990643539df3088ecd9bb
class Plugin(GlancesPlugin): <NEW_LINE> <INDENT> def __init__(self, args=None, config=None): <NEW_LINE> <INDENT> super(Plugin, self).__init__(args=args, config=config) <NEW_LINE> self.display_curse = True <NEW_LINE> self.reset() <NEW_LINE> self.OPENSTACK = ThreadOpenStack() <NEW_LINE> self.OPENSTACK.start() <NEW_LINE> ...
Glances' cloud plugin. The goal of this plugin is to retrieve additional information concerning the datacenter where the host is connected. See https://github.com/nicolargo/glances/issues/1029 stats is a dict
625990643539df3088ecd9bc
class OutboundRule(SubResource): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, 'frontend_ip_configurations': {'key': 'prop...
Outbound rule of the load balancer. :param id: Resource ID. :type id: str :param name: The name of the resource that is unique within a resource group. This name can be used to access the resource. :type name: str :param etag: A unique read-only string that changes whenever the resource is updated. :type etag: str :p...
625990641f5feb6acb164309
class List(ZenityBase): <NEW_LINE> <INDENT> def __init__(self, items, **kwargs): <NEW_LINE> <INDENT> self.dialog = 'list' <NEW_LINE> self.items = items <NEW_LINE> self.columns = [] <NEW_LINE> try: <NEW_LINE> <INDENT> kwargs['print-column'] = kwargs.pop('print_column') <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <IN...
List dialog
62599064d7e4931a7ef3d714
class Plugin: <NEW_LINE> <INDENT> def __init__(self, iface): <NEW_LINE> <INDENT> self.iface = iface <NEW_LINE> self.plugin_dir = os.path.dirname(__file__) <NEW_LINE> self.auto_curve_enabled = False <NEW_LINE> <DEDENT> def initGui(self): <NEW_LINE> <INDENT> self.toolbar = self.iface.addToolBar("Autocurve") <NEW_LINE> se...
QGIS Plugin Implementation.
6259906476e4537e8c3f0ca1
class stopwatch: <NEW_LINE> <INDENT> def __init__(self, name = "stopwatch"): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.startTime = time.time() <NEW_LINE> self.elapsedTime = 0.0 <NEW_LINE> self.running = False <NEW_LINE> self.lap = {} <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> if not self.runnin...
Implements a timer with multiple named lap timers. A newly created timer is NOT running. Use start() and stop() to begin/end. Check boolean '.running'. A lap timer is created on reference.
625990642ae34c7f260ac805
class Rar( Archive ): <NEW_LINE> <INDENT> def scan_files( self, ext = 'nds' ): <NEW_LINE> <INDENT> list_archive = subprocess.Popen( [ 'unrar', 'lb', self.path ], stdout = subprocess.PIPE, stderr = subprocess.PIPE ) <NEW_LINE> for filename in list_archive.stdout.readlines(): <NEW_LINE> <INDENT> filename = filename.rstri...
Rar archive handler
62599064498bea3a75a5918f
class QmlRepresentationMode(six.with_metaclass(EnumMetaclass, QObject)): <NEW_LINE> <INDENT> pass
A QML ready version of rtneuron.RepresentationMode
62599064a8370b77170f1aed
class TestTestClass(unittest.TestCase): <NEW_LINE> <INDENT> def test_answer(self): <NEW_LINE> <INDENT> t = TestClass() <NEW_LINE> sa, a = t.answer_me("Why?") <NEW_LINE> self.failUnless(a == 42)
Test class tester
6259906456ac1b37e6303876
class TipoHabitacion(models.Model): <NEW_LINE> <INDENT> objects = TipoHabitacionManager() <NEW_LINE> slug = models.SlugField(max_length=20, unique=True) <NEW_LINE> descripcion = models.CharField(max_length=100) <NEW_LINE> minimo = models.PositiveSmallIntegerField(default=2, help_text = "Ocupación mínima Adultos") <NEW...
Define los tipos de habitacion posibles. Una habitación se define por su ocupación mínima y máxima. Si una habitación es de un tipo base indica que habrá un contrato con cupo y precios especiales para este tipo de habitación
6259906416aa5153ce401bfb
class RawMeasurements(GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (DjangoModelPermissionsOrAnonReadOnly,) <NEW_LINE> queryset = RawMeasurement.objects.none() <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> tide_gauge = TideGauge.objects.get(slug=self.kwargs['tide_gauge_slug']) <NE...
Store raw measurements for a tide gauge. Predictions must be given in a JSON array. Note that any bad prediction in the list will cause the entire batch to be dropped.
625990648e71fb1e983bd1ea
class SilverServiceTaxi(Car): <NEW_LINE> <INDENT> def __init__(self, name, fuel, fancy): <NEW_LINE> <INDENT> super().__init__(name, fuel) <NEW_LINE> self.price_per_km = 1.20 <NEW_LINE> self.current_fare_distance = 0 <NEW_LINE> self.fanciness = fancy*self.price_per_km <NEW_LINE> self.flagfall = float(4.50) <NEW_LINE> se...
specialised version of a Car that includes fare costs
625990647cff6e4e811b7165
class Cat(Pet): <NEW_LINE> <INDENT> def sound(self): <NEW_LINE> <INDENT> print('Мяу!')
Кошка - является Домашним Животным
625990648e7ae83300eea7ac
class Extractor(object): <NEW_LINE> <INDENT> def __init__(self, dataset, imgs_per_gpu, workers_per_gpu, dist_mode=False): <NEW_LINE> <INDENT> from openselfsup import datasets <NEW_LINE> if isinstance(dataset, Dataset): <NEW_LINE> <INDENT> self.dataset = dataset <NEW_LINE> <DEDENT> elif isinstance(dataset, dict): <NEW_L...
Feature extractor. Args: dataset (Dataset | dict): A PyTorch dataset or dict that indicates the dataset. imgs_per_gpu (int): Number of images on each GPU, i.e., batch size of each GPU. workers_per_gpu (int): How many subprocesses to use for data loading for each GPU. dist_mode (...
62599064f548e778e596cca8
class Settings: <NEW_LINE> <INDENT> def __init__(self, default=True): <NEW_LINE> <INDENT> self.default = default <NEW_LINE> self.authenPath = self.getPath("authen") <NEW_LINE> accounts = self.setupAccounts() <NEW_LINE> self.hotmailAcc = accounts[0] <NEW_LINE> self.gmailAcc = accounts[1] <NEW_LINE> self.unknownAcc = acc...
Get and set all of the basic required information neccessary for the email app to work.
625990645fdd1c0f98e5f6a2
@registry.register_module('dataset') <NEW_LINE> class ConcatDataset(_ConcatDataset): <NEW_LINE> <INDENT> def __init__(self, datasets): <NEW_LINE> <INDENT> super(ConcatDataset, self).__init__(datasets) <NEW_LINE> self.CLASSES = datasets[0].CLASSES <NEW_LINE> if hasattr(datasets[0], 'flag'): <NEW_LINE> <INDENT> flags = [...
A wrapper of concatenated dataset. Same as :obj:`torch.utils.data.dataset.ConcatDataset`, but concat the group flag for image aspect ratio. Args: datasets (list[:obj:`Dataset`]): A list of datasets.
625990643d592f4c4edbc5fc
class QDesignerTaskMenuExtension(): <NEW_LINE> <INDENT> def preferredEditAction(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def taskActions(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self, QDesignerTaskMenuExtension=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> __weakref__ = property...
QDesignerTaskMenuExtension() QDesignerTaskMenuExtension(QDesignerTaskMenuExtension)
62599064ac7a0e7691f73c04
class DeclaredOn(Relationship): <NEW_LINE> <INDENT> pass
Describes the relationship between a type and the properties that instances of that type can have.
6259906463d6d428bbee3e18
class RecipesManagerException(RuntimeError): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.parameter = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.parameter)
RecipesManager Error
625990644e4d562566373b26
class EventProposer_C(pymc.Metropolis): <NEW_LINE> <INDENT> def __init__(self, stochastic, *args, **kwargs): <NEW_LINE> <INDENT> return super(self.__class__, self).__init__(stochastic, *args, **kwargs) <NEW_LINE> <DEDENT> def propose(self): <NEW_LINE> <INDENT> tau = 1./(self.adaptive_scale_factor * self.proposal_sd)**2...
Simple proposal distribution for Event objects for use in Metropolis samplers.
62599064627d3e7fe0e085aa
class BayModel(cluster_template.ClusterTemplate): <NEW_LINE> <INDENT> SSH_AUTHORIZED_KEY = 'ssh_authorized_key' <NEW_LINE> deprecate_msg = _('Please use OS::Magnum::ClusterTemplate instead.') <NEW_LINE> support_status = support.SupportStatus( status=support.HIDDEN, message=deprecate_msg, version='11.0.0', previous_stat...
A resource for the BayModel in Magnum. This resource has been deprecated by ClusterTemplate. BayModel is an object that stores template information about the bay which is used to create new bays consistently.
62599064b7558d5895464abe
class TokenizedTweet: <NEW_LINE> <INDENT> SEPARATOR_CHARS = "" <NEW_LINE> STRIP_CHARS = "" <NEW_LINE> def __init__(self, tweet, sender, extra=None): <NEW_LINE> <INDENT> self.tweet = tweet <NEW_LINE> self.sender = sender <NEW_LINE> self.extra = extra
Represents one tokenized tweet. Given a raw tweet and associated data, use this class to tokenize it and hold the resulting files. Has fields for the tweet's sender, its original author (if a retweet), the retweet type (RT, MT), length apart from the retweet header, and a field for extra data specific to a source.
625990648da39b475be04909
class UserProfileInfo(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, on_delete=models.CASCADE) <NEW_LINE> portfolio_site = models.URLField(blank=True) <NEW_LINE> profile_pic = models.ImageField(upload_to='profile_pics', blank=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.user...
Model class to add additional information that the django.contrib.auth.models.User class doesn't have. We don't directly inherit from that User class, as it may cause the DB to think that there are multiple instances of the User class. Instead we use a one-to-one field relationship.
62599064460517430c432be4