code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SgUnit(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.SgId = None <NEW_LINE> self.SgName = None <NEW_LINE> self.SgRemark = None <NEW_LINE> self.CreateTime = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.SgId = params.get("SgId") <NEW_LINE> self...
安全组基础信息
62598fd155399d3f05626993
class TraceSelection(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.trace_selection" <NEW_LINE> bl_label = "Setup Mirror Canvas" <NEW_LINE> bl_options = { 'REGISTER', 'UNDO' } <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> scene = context.scene <NEW_LINE> bpy.ops.gpencil.convert(type='CURVE', ...
Convert gpencil to CURVE
62598fd13d592f4c4edbb330
class DeviceNotFoundError(DeviceError): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta
An exception indicating that no :class:`Device` was found. .. versionchanged:: 0.5 Rename from ``NoSuchDeviceError`` to its current name.
62598fd1cc40096d6161a414
class DevelopementConfig(Config): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> DEBUG_TB_INTERCEPT_REDIRECTS = False
This class configures the development environment properties
62598fd160cbc95b063647b7
class Protocol_Dns(Resource, CheckExistenceMixin): <NEW_LINE> <INDENT> def __init__(self, protocol_dns_s): <NEW_LINE> <INDENT> super(Protocol_Dns, self).__init__(protocol_dns_s) <NEW_LINE> self._meta_data['required_json_kind'] = 'tm:security:dos:profile:protocol-dns:protocol-dnsstate' <NEW_LINE> self.tmos_ve...
BIG-IP® Dos Profile Protocol Dns resource
62598fd1adb09d7d5dc0a9f5
class CookieStorage(BaseStorage): <NEW_LINE> <INDENT> cookie_name = 'messages' <NEW_LINE> max_cookie_size = 2048 <NEW_LINE> not_finished = '__messagesnotfinished__' <NEW_LINE> key_salt = 'django.contrib.messages' <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_...
Store messages in a cookie.
62598fd1dc8b845886d53a38
class ModelExport(object): <NEW_LINE> <INDENT> def __init__(self, model, input_names, output_names): <NEW_LINE> <INDENT> assert isinstance(input_names, list) <NEW_LINE> assert isinstance(output_names, list) <NEW_LINE> assert isinstance(model, ModelDescBase) <NEW_LINE> self.model = model <NEW_LINE> self.output_names = o...
Wrapper for tf.saved_model
62598fd150812a4eaa620e21
class ILazyableBehaviorLayer(Interface): <NEW_LINE> <INDENT> pass
mark items so they can be lazyloaded
62598fd17b180e01f3e4928d
class MultiPeerConnectivityLink(threading.Thread, VirtualLink): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise NotImplementedError()
This link sends traffic over Bluetooth to Apple devices using the MultiPeerConnectivity framework introduced in iOS 7.
62598fd1d8ef3951e32c8099
class TAB_Visual(wx.PyPanel): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> wx.PyPanel.__init__(self, parent, id=-1) <NEW_LINE> self.cfg = RConfig() <NEW_LINE> self._layout() <NEW_LINE> self.SetInitialSize() <NEW_LINE> self.cancel.Bind(wx.EVT_BUTTON, self.OnCancel) <NEW_LINE> self.save.Bind(wx.EVT...
Creates the "Visual" option menu @todo: Prettify
62598fd14527f215b58ea34a
class TRexRunFailedError(TRexException): <NEW_LINE> <INDENT> code = -14 <NEW_LINE> _default_message = ''
Indicates that TRex has failed due to some reason. This Exception is used when TRex process itself terminates due to unknown reason
62598fd2ad47b63b2c5a7cd8
class StatusBase(Exception): <NEW_LINE> <INDENT> def __init__(self, status_code, error_code, log_message): <NEW_LINE> <INDENT> self.status_code = status_code <NEW_LINE> self.error_code = error_code <NEW_LINE> self.log_message = log_message <NEW_LINE> <DEDENT> def emit(self, request_handler): <NEW_LINE> <INDENT> request...
Error base function
62598fd2377c676e912f6fb7
class ForgetPwdView(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> return render(request, get_temp('forgetpwd.html', temp_dir_p)) <NEW_LINE> <DEDENT> def post(self, request): <NEW_LINE> <INDENT> forget_form = users_forms.ForgetForm(request.POST) <NEW_LINE> if forget_form.is_valid(): <NEW_LINE> <...
忘记密码发送邮件
62598fd2ec188e330fdf8d13
class EuclideanDistance(SquaredEuclideanDistance): <NEW_LINE> <INDENT> def __init__(self, metric: String = "Euclidean Distance") -> Void: <NEW_LINE> <INDENT> super().__init__(metric) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def compute(self, P: NumpyArray, Q: NumpyArray) -> NumpyArray: <NEW_LINE> <INDENT> return np....
The L2 norm distance, aka the euclidean Distance.
62598fd297e22403b383b387
class Result(object): <NEW_LINE> <INDENT> def __init__(self, result, status, message=None): <NEW_LINE> <INDENT> self.result = result <NEW_LINE> self.status = status <NEW_LINE> self.message = message
Result that store result and some info about it.
62598fd2377c676e912f6fb8
class PspAdapter(models.Model): <NEW_LINE> <INDENT> psp = models.ForeignKey(PaymentServiceProvider, on_delete=models.PROTECT) <NEW_LINE> port = models.IntegerField(null=True) <NEW_LINE> local = models.BooleanField(default=True) <NEW_LINE> up = models.BooleanField(default=False)
PspAdapter contains the id, the PSP it is used for, the port on which it is currently listening for incoming payment data and a state flag.
62598fd2fbf16365ca79453c
class L2(Penalty): <NEW_LINE> <INDENT> def __init__(self, weights=1.): <NEW_LINE> <INDENT> super().__init__(weights) <NEW_LINE> <DEDENT> def func(self, params): <NEW_LINE> <INDENT> return np.sum(self.weights * self.alpha * params**2) <NEW_LINE> <DEDENT> def deriv(self, params): <NEW_LINE> <INDENT> return 2 * self.weigh...
The L2 (ridge) penalty.
62598fd2be7bc26dc9252098
class AssemblageSampledName(str): <NEW_LINE> <INDENT> def __init__(self, o=""): <NEW_LINE> <INDENT> if len(o) > 50: <NEW_LINE> <INDENT> raise ValueError( "AssemblageSampledName must be between 0 and 50 " "characters." )
An association of interacting populations of organisms in a given waterbody.
62598fd28a349b6b436866c0
class NotificationException(DiplomacyException): <NEW_LINE> <INDENT> pass
Unknown notification.
62598fd24a966d76dd5ef358
class TestLandingPageView(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> file_mock = mock.MagicMock(spec=File, name='FileMock') <NEW_LINE> file_mock.name = 'test1.png' <NEW_LINE> self.user = ProfileUser.objects.create( username="username", password="password", email="somemail@o2.pl", avatar=file_mo...
Tests for LandingPageView
62598fd250812a4eaa620e24
class OutputFormat(object): <NEW_LINE> <INDENT> JSON = 'json' <NEW_LINE> CSV = 'csv'
An enum used to list the valid output formats for API calls.
62598fd23346ee7daa337887
class BodyguardAnt(Ant): <NEW_LINE> <INDENT> name = 'Bodyguard' <NEW_LINE> implemented = False <NEW_LINE> container = True <NEW_LINE> food_cost = 4 <NEW_LINE> damage = 0 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> Ant.__init__(self, 2) <NEW_LINE> self.ant = None <NEW_LINE> <DEDENT> def contain_ant(self, ant): <N...
BodyguardAnt provides protection to other Ants.
62598fd2956e5f7376df58be
class DadoPoker(Dado): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__("Negro", "Rojo", "J", "Q", "K", "As")
Simulará un dado de póquer
62598fd20fa83653e46f5369
class IsindexControl(ScalarControl): <NEW_LINE> <INDENT> def __init__(self, type, name, attrs, index=None): <NEW_LINE> <INDENT> ScalarControl.__init__(self, type, name, attrs, index) <NEW_LINE> if self._value is None: <NEW_LINE> <INDENT> self._value = "" <NEW_LINE> <DEDENT> <DEDENT> def is_of_kind(self, kind): return k...
ISINDEX control. ISINDEX is the odd-one-out of HTML form controls. In fact, it isn't really part of regular HTML forms at all, and predates it. You're only allowed one ISINDEX per HTML document. ISINDEX and regular form submission are mutually exclusive -- either submit a form, or the ISINDEX. Having said this, sinc...
62598fd29f28863672818abe
class TicketCreateView(CreateView): <NEW_LINE> <INDENT> model = Ticket <NEW_LINE> fields = ["title", "description"] <NEW_LINE> @method_decorator(login_required) <NEW_LINE> def dispatch(self, *args, **kwargs): <NEW_LINE> <INDENT> return super(TicketCreateView, self).dispatch(*args, **kwargs) <NEW_LINE> <DEDENT> def form...
Create ticket
62598fd2377c676e912f6fba
class FundingRateRecord(object): <NEW_LINE> <INDENT> openapi_types = {'t': 'int', 'r': 'str'} <NEW_LINE> attribute_map = {'t': 't', 'r': 'r'} <NEW_LINE> def __init__(self, t=None, r=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_vars_configuratio...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598fd2fbf16365ca794540
class NetworkAlreadyExistsException(MCVirtException): <NEW_LINE> <INDENT> pass
Network already exists with the same name.
62598fd2956e5f7376df58bf
class AceQLExecUpdateApi(object): <NEW_LINE> <INDENT> __debug = False <NEW_LINE> def __init__(self, aceQLHttpApi: 'AceQLHttpApi'): <NEW_LINE> <INDENT> if aceQLHttpApi is None: <NEW_LINE> <INDENT> raise TypeError("aceQLHttpApi is null!") <NEW_LINE> <DEDENT> self.__aceQLHttpApi = aceQLHttpApi <NEW_LINE> self.__url = aceQ...
AceQL HTTP wrapper for /execute_update API. Takes care of all HTTP calls and operations.
62598fd2ad47b63b2c5a7ce0
class GarbageCollectionCasesPageSet(page_set_module.PageSet): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(GarbageCollectionCasesPageSet, self).__init__( archive_data_file='data/garbage_collection_cases.json', bucket=page_set_module.PARTNER_BUCKET) <NEW_LINE> self.AddPage(SpinningBallsPage(self))
Description: GC test cases
62598fd29f28863672818abf
class update_until_result(object): <NEW_LINE> <INDENT> def __init__(self, error=None,): <NEW_LINE> <INDENT> self.error = error <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: <NE...
Attributes: - error
62598fd2adb09d7d5dc0a9ff
@admin.register(BankAccount) <NEW_LINE> class BankAccountAdmin( child_redirect_mixin("bankaccount"), unit_admin_mixin_generator("administrative_unit"), MoneyAccountChildAdmin, ): <NEW_LINE> <INDENT> base_model = BankAccount <NEW_LINE> show_in_index = True <NEW_LINE> list_display = ( "__str__", "id", "bank_account", "ba...
bank account polymorphic admin model child class
62598fd2a219f33f346c6c8b
class RF(Classifier): <NEW_LINE> <INDENT> def __init__(self, n, d): <NEW_LINE> <INDENT> self.estimator_ = RandomForestClassifier() <NEW_LINE> self.param_grid_ = {"n_estimators": np.arange(1,52,10), "max_depth": np.arange(1,min(12,n),2), "max_features": np.arange(1,min(12,d),2)}
A Random Forest classifier.
62598fd24527f215b58ea354
class TagList(models.Model): <NEW_LINE> <INDENT> pass
This dummy model is used to allow exporting a /module/taglist as a ViewSet, without having to write a metric ton of custom code. No instances of it are ever created.
62598fd2283ffb24f3cf3d06
class MidiController: <NEW_LINE> <INDENT> def __init__(self, channel: int): <NEW_LINE> <INDENT> self.channel = channel <NEW_LINE> self.port = None <NEW_LINE> self.note_tasks = {} <NEW_LINE> <DEDENT> def _set_port(self, port: mido.ports.BaseOutput): <NEW_LINE> <INDENT> self.port = port <NEW_LINE> <DEDENT> def reset(self...
Trigger note and other CC parameter events on a particular MIDI channel. Use as a standalone or connect to a `Sequencer` instance via the `Sequencer.register` method. Args: channel: the MIDI channel to send messages on.
62598fd2cc40096d6161a41a
class Action(object): <NEW_LINE> <INDENT> def __init__(self, project, name, index, *arg, **kwarg): <NEW_LINE> <INDENT> self.project = Project.objects.get(name=project) <NEW_LINE> self.name = name <NEW_LINE> self.index = index <NEW_LINE> self.outputs = {} <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> re...
Represents one of a series of actions that may be performed after a commit.
62598fd2a05bb46b3848acf0
class Quota(dbmodels.DatabaseModelBase): <NEW_LINE> <INDENT> _data_fields = ['created', 'updated', 'tenant_id', 'resource', 'hard_limit'] <NEW_LINE> _table_name = 'quotas' <NEW_LINE> def __init__(self, tenant_id, resource, hard_limit, id=utils.generate_uuid(), created=timeutils.utcnow(), update=timeutils.utcnow()): <NE...
Defines the base model class for a quota.
62598fd2099cdd3c63675622
class ReturnEnvelope: <NEW_LINE> <INDENT> __slots__ = ('reply_code', 'reply_text', 'exchange_name', 'routing_key') <NEW_LINE> def __init__(self, reply_code, reply_text, exchange_name, routing_key): <NEW_LINE> <INDENT> self.reply_code = reply_code <NEW_LINE> self.reply_text = reply_text <NEW_LINE> self.exchange_name = e...
Class for basic return message fields
62598fd27b180e01f3e49293
class LogitSplittedSampler(Sampler): <NEW_LINE> <INDENT> def __init__(self, keys, executed_iterations, weights=None): <NEW_LINE> <INDENT> self.keys = keys <NEW_LINE> if weights is None: <NEW_LINE> <INDENT> self.weights = torch.tensor([1.0/float(len(self.keys))]*len(self.keys), dtype=torch.double) <NEW_LINE> <DEDENT> el...
Sample on a list of keys that was previously splitted weights for sampling are logits and have to be softmaxed
62598fd2377c676e912f6fbc
class ToTensor(object): <NEW_LINE> <INDENT> def __call__(self, sample): <NEW_LINE> <INDENT> new_sample = {} <NEW_LINE> for key in sample.keys(): <NEW_LINE> <INDENT> new_sample[key] = torch.from_numpy(sample[key]) <NEW_LINE> <DEDENT> return new_sample
Convert ndarrays in sample to Tensors.
62598fd23617ad0b5ee065cf
class ShowMribVrfRouteSummarySchema(MetaParser): <NEW_LINE> <INDENT> schema = { 'vrf': { Any(): { 'address_family': { Any(): { 'no_group_ranges': int, 'no_g_routes': int, 'no_s_g_routes': int, 'no_route_x_interfaces': int, 'total_no_interfaces': int, } } }, }, }
Schema for show mrib vrf <vrf> <address-family> route summary
62598fd29f28863672818ac1
class Datasheet(object): <NEW_LINE> <INDENT> def __init__(self, instance=None): <NEW_LINE> <INDENT> if instance is None: <NEW_LINE> <INDENT> data = {} <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> data = instance.__datasheets__.get(self.__id__) <NEW_LINE> if data is None: <NEW_LINE> <INDENT> data = OOBTree() <NEW_LINE>...
>>> from zope import interface, schema >>> class IMyDatasheet1(interface.Interface): ... title = schema.TextLine(title = u'Title', default=u'Unset') ... >>> class IMyDatasheet2(interface.Interface): ... title = schema.TextLine(title = u'Title') >>> DatasheetClass1 = DatasheetType( ... 'mydatasheet1', IMyDatash...
62598fd2ff9c53063f51aad4
class UrlMapping(models.Model): <NEW_LINE> <INDENT> url = models.URLField(unique=True) <NEW_LINE> sha_hash = models.CharField(max_length=40, unique=True) <NEW_LINE> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> def get_absolute_url(self): <NEW_LINE> <INDENT> return 'http://sha1.us/%s' % self.sha_hash <NE...
maps from a SHA hash to a URL
62598fd27b180e01f3e49294
class IscsiCableDiagChannelResults(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'channel_status': 'int', 'cable_length': 'int' } <NEW_LINE> self.attribute_map = { 'channel_status': 'channelStatus', 'cable_length': 'cableLength' } <NEW_LINE> self._channel_status = None <NEW...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fd2656771135c489afa
class Answer(models.Model): <NEW_LINE> <INDENT> question = models.ForeignKey(Question, on_delete=models.CASCADE,related_name='answers') <NEW_LINE> description = models.TextField(blank=True, null=False, default=None) <NEW_LINE> is_right = models.BooleanField(default=False) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verb...
Answers for Questions
62598fd255399d3f056269a3
class RegistroK230(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'K230'), CampoData(2, 'DT_INI_OP'), CampoData(3, 'DT_FIN_OP'), Campo(4, 'COD_DOC_OP'), Campo(5, 'COD_ITEM'), CampoNumerico(6, 'QTD_ENC'), ] <NEW_LINE> nivel = 3
ITENS PRODUZIDOS
62598fd27cff6e4e811b5eb2
class CommandsTest(TestCase): <NEW_LINE> <INDENT> def test_build(self): <NEW_LINE> <INDENT> s = ShellProtocol() <NEW_LINE> build_response = {'uid': 'something'} <NEW_LINE> s.hub = FakeHub(build=build_response) <NEW_LINE> sendLine_called = [] <NEW_LINE> s.sendLine = sendLine_called.append <NEW_LINE> s.cmd_build('project...
I test specific commands
62598fd2ab23a570cc2d4fb2
class RunningMeanStd(): <NEW_LINE> <INDENT> def __init__(self, epsilon=1e-4, shape=(), norm_dim=(0,), a_min=-5., a_max=5.): <NEW_LINE> <INDENT> assert epsilon > 0. <NEW_LINE> self.shape = shape <NEW_LINE> self.mean = torch.zeros(shape, dtype=torch.float) <NEW_LINE> self.var = torch.ones(shape, dtype=torch.float) <NEW_L...
Modified from Baseline Assumes shape to be (number of inputs, input_shape)
62598fd297e22403b383b392
class FilterReviewListSerializer(serializers.ListSerializer): <NEW_LINE> <INDENT> def to_representation(self, data): <NEW_LINE> <INDENT> data = data.filter(parent=None) <NEW_LINE> return super().to_representation(data)
Фильтр комментариев без родителей
62598fd23617ad0b5ee065d1
class CirrOSImageProvider(ImageProviderBase): <NEW_LINE> <INDENT> name = 'CirrOS' <NEW_LINE> def __init__(self, version=r'[0-9]+\.[0-9]+\.[0-9]+', build=None, arch=DEFAULT_ARCH): <NEW_LINE> <INDENT> super().__init__(version=version, build=build, arch=arch) <NEW_LINE> self.url_versions = 'https://download.cirros-cloud.n...
CirrOS Image Provider CirrOS is a Tiny OS that specializes in running on a cloud.
62598fd29f28863672818ac2
class TeamPinkBasePredictor(IPredictor): <NEW_LINE> <INDENT> def __init__(self, nn_filename: str): <NEW_LINE> <INDENT> self.model = load_keras_sequential(RELATIVE_PATH, nn_filename) <NEW_LINE> assert self.model is not None <NEW_LINE> <DEDENT> def doPredict(self, data: StockData) -> float: <NEW_LINE> <INDENT> return 0.0
Predictor based on an already trained neural network.
62598fd2ff9c53063f51aad6
class VirtualMachineSizeListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'}, } <NEW_LINE> def __init__( self, *, aml_compute: Optional[List["VirtualMachineSize"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(VirtualMachineS...
The List Virtual Machine size operation response. :param aml_compute: The list of virtual machine sizes supported by AmlCompute. :type aml_compute: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize]
62598fd297e22403b383b394
class DeepCopyMagicMock(mock.MagicMock): <NEW_LINE> <INDENT> def _mock_call(self, *args, **kwargs): <NEW_LINE> <INDENT> return super()._mock_call(*copy.deepcopy(args), **copy.deepcopy(kwargs))
A magic mock class that deep-copies the method arguments to check the state of mutable objects at call time
62598fd23617ad0b5ee065d3
class ListMonitoredResourceDescriptorsResponse(_messages.Message): <NEW_LINE> <INDENT> nextPageToken = _messages.StringField(1) <NEW_LINE> resourceDescriptors = _messages.MessageField('MonitoredResourceDescriptor', 2, repeated=True)
Result returned from ListMonitoredResourceDescriptors. Fields: nextPageToken: If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. resourceDescriptors: ...
62598fd260cbc95b063647ca
class TagFilter(WorkflowProcessor): <NEW_LINE> <INDENT> def __init__(self, tag): <NEW_LINE> <INDENT> self.tag = tag <NEW_LINE> <DEDENT> def process(self, workflow): <NEW_LINE> <INDENT> foreigners = set() <NEW_LINE> for task in reversed(DFSLinearizer().linearize(workflow)): <NEW_LINE> <INDENT> tag = workflow[task].annot...
A workflow processor that filters out tasks that do not affect tasks with the given tag. A task gets removed from the workflow iff its tag differs from the given one and it has no followers with the given tag. By default every task has a $None tag. Attributes: tag (Optional[String]) - the tag value to filter by
62598fd2377c676e912f6fbf
class UnsupportedOnNativeFieldError(FieldError): <NEW_LINE> <INDENT> pass
Exception raised whenever someone tries to perform an operation that is not supported on a "native" field.
62598fd23d592f4c4edbb344
class NodeAccessorMixin(object): <NEW_LINE> <INDENT> def node_accessor(self, root, root_label): <NEW_LINE> <INDENT> self.assertEqual(root.label, root_label) <NEW_LINE> return NodeAccessor(root)
Mix in to tests to setup and test a root
62598fd2ff9c53063f51aada
class XMLParser(BaseParser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> BaseParser.__init__(self) <NEW_LINE> <DEDENT> @try_except <NEW_LINE> def serialise(self, fileinput): <NEW_LINE> <INDENT> self.parse_data(fileinput) <NEW_LINE> xwriter = XMLWriter() <NEW_LINE> root = xwriter.create_element(name="roo...
XMLParser Given a file path, parse the file for serialisation and deserialisation.
62598fd250812a4eaa620e2b
class LAParams: <NEW_LINE> <INDENT> def __init__(self, line_overlap=0.5, char_margin=2.0, line_margin=0.5, word_margin=0.1, boxes_flow=0.5, detect_vertical=False, all_texts=False): <NEW_LINE> <INDENT> self.line_overlap = line_overlap <NEW_LINE> self.char_margin = char_margin <NEW_LINE> self.line_margin = line_margin <N...
Parameters for layout analysis :param line_overlap: If two characters have more overlap than this they are considered to be on the same line. The overlap is specified relative to the minimum height of both characters. :param char_margin: If two characters are closer together than this margin they are consi...
62598fd2ab23a570cc2d4fb5
class GameObject(metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, classname = "none", *args, **kwargs): <NEW_LINE> <INDENT> super(GameObject, self).__init__(*args, **kwargs) <NEW_LINE> self._classname = classname <NEW_LINE> self._dirty = False <NEW_LINE> <DEDENT> def dirty(self): <NEW_LINE> <INDENT> self._dir...
represents a game object which is written to disk by the storage class
62598fd20fa83653e46f5377
class lfunc(gdb.Command): <NEW_LINE> <INDENT> def __init__ (self): <NEW_LINE> <INDENT> super (lfunc, self).__init__("lfunc", gdb.COMMAND_USER) <NEW_LINE> <DEDENT> def invoke (self, args, from_tty): <NEW_LINE> <INDENT> argv = gdb.string_to_argv(args) <NEW_LINE> if len(argv) != 2: <NEW_LINE> <INDENT> raise gdb.GdbError("...
This command prints out all the Lua functions (the GCfunc* pointers) filtered by the file name and file line number where the function is defined. Usage: lfunc file lineno
62598fd2d8ef3951e32c80a3
class PrintH(Print): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> Print.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> def process(self, x): <NEW_LINE> <INDENT> print >>self.file_, self.prefix, round(x.posterior_score,3), round(x.prior,3), roun...
Fancier printing for hypotheses
62598fd2ad47b63b2c5a7cec
class KittiOdometryVelodyneData(RNGDataFlow): <NEW_LINE> <INDENT> def __init__(self, base_path: str, sequence: str, shuffle: bool = False): <NEW_LINE> <INDENT> self.data = pykitti.odometry(base_path, sequence) <NEW_LINE> self.calib = self.data.calib.T_cam0_velo <NEW_LINE> self.shuffle = shuffle <NEW_LINE> <DEDENT> def ...
Read velodyne clouds and poses directly from KITTI odometry data.
62598fd2dc8b845886d53a4e
class product_product(oe_lx, osv.osv): <NEW_LINE> <INDENT> _inherit = 'product.product' <NEW_LINE> def write(self, cr, uid, ids, values, context=None): <NEW_LINE> <INDENT> res = super(product_product, self).write(cr, uid, ids, values, context=context) <NEW_LINE> if any([field for field in lx_product.required_fields if ...
Trigger upload on create, and on write if fields we are interested in have been touched Also provide upload all functionality, and helper method to determine if product is a delivery product
62598fd2a219f33f346c6c97
class CompanyRepCreateView(CreateView): <NEW_LINE> <INDENT> form_class = CompanyRepCreationForm <NEW_LINE> success_url = reverse_lazy('companies:list') <NEW_LINE> template_name = 'companies/create_rep.html' <NEW_LINE> object = None <NEW_LINE> @method_decorator(login_required) <NEW_LINE> @method_decorator( permission_re...
View for creating a new account for a company representative. Upon successful completion of the creation form, an email is sent to the company representative to allow them to set the password for their account.
62598fd2fbf16365ca79454e
class ARMA: <NEW_LINE> <INDENT> def __init__(self, P, RHO, ma_weights, T=None, epsilon=None): <NEW_LINE> <INDENT> if epsilon is None: <NEW_LINE> <INDENT> epsilon = normal(0, 1, (T,)) <NEW_LINE> <DEDENT> elif T is None: <NEW_LINE> <INDENT> raise ValueError("You must provide T or epsilon.") <NEW_LINE> <DEDENT> self.epsil...
Generates and represents the evoluation of a ARMA(P, Q) through time. Returns $X$ such that, for $t \in {0, \ldots, T-1}$, \[ X_t = \sum_{k=1}^P ho_k X_{t-k} + \sum_{k=1}^Q lpha_k \epsilon_{t-k} + \epsilon_t \] where $ ho_k = ho^k$ (for now) and $lpha_k = ma_weights[k-1]$ and $epsilon$ denotes ...
62598fd27cff6e4e811b5eba
class HingeLoss(Loss): <NEW_LINE> <INDENT> __slots__ = ['penalty_type', 'reduction', 'penalty_direction'] <NEW_LINE> fancy_name = "Hinge Loss" <NEW_LINE> def __init__(self, reduction=DEFAULT["hingeloss"]['reduction'], penalty_type=DEFAULT["hingeloss"]['penalty_type'], penalty_direction=DEFAULT["hingeloss"]['penalty_dir...
Hinge Loss
62598fd2ab23a570cc2d4fb6
class DataSet(object): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self._d_size = len(data) <NEW_LINE> self._data = data <NEW_LINE> self._epochs_completed = 0 <NEW_LINE> self._i_in_epoch = 0 <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return self._d_size <NEW_LINE>...
Basic DataSet class.
62598fd2956e5f7376df58c6
class BookmarkSummaryView(Adapter): <NEW_LINE> <INDENT> implements(inevow.IRenderer, ISummaryView) <NEW_LINE> def rend(self, data): <NEW_LINE> <INDENT> return T.div(_class="summaryView bookmark")[ T.a(href=self.original.url)[self.original.name] ]
Render a summary of a Person.
62598fd2be7bc26dc92520a1
class DeviceNameTestCase(unittest.TestCase): <NEW_LINE> <INDENT> @patch.object(StorageDevice, "status", return_value=True) <NEW_LINE> @patch.object(StorageDevice, "update_sysfs_path", return_value=None) <NEW_LINE> @patch.object(StorageDevice, "read_current_size", return_value=None) <NEW_LINE> def test_storage_device(se...
Test device name validation
62598fd2283ffb24f3cf3d12
class Logger: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.successfulPackets = 0 <NEW_LINE> self.timeOuts = 0 <NEW_LINE> self.totalPackets = 0 <NEW_LINE> self.packetToSuccess = [] <NEW_LINE> <DEDENT> def resetTimeOutCounter(self): <NEW_LINE> <INDENT> self.timeOuts = 0
Records relevant information, used to print information about the run.
62598fd2dc8b845886d53a50
class TimeoutException(Exception): <NEW_LINE> <INDENT> pass
Exception, if a timeout happens
62598fd255399d3f056269ad
class TestDrain(TestCase): <NEW_LINE> <INDENT> def test_consumes_all_items(self): <NEW_LINE> <INDENT> iterations = [] <NEW_LINE> inputs = make_list() <NEW_LINE> Stream(generate(inputs, iterations)).drain() <NEW_LINE> self.assertEqual(iterations, inputs)
Tests for `drain`.
62598fd24527f215b58ea362
class Trace(base.Trace): <NEW_LINE> <INDENT> def _initialize(self, chain, length): <NEW_LINE> <INDENT> if self._getfunc is None: <NEW_LINE> <INDENT> self._getfunc = self.db.model._funs_to_tally[self.name] <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> self._shape = np.shape(self._getfunc()) <NEW_LINE> <DEDENT> except Typ...
SQLite Trace class.
62598fd297e22403b383b39c
class BaseCliModule(object): <NEW_LINE> <INDENT> def __init__(self, usage): <NEW_LINE> <INDENT> self.parser = OptionParser(usage) <NEW_LINE> self.config = None <NEW_LINE> self.options = None <NEW_LINE> self.user_config = read_user_config() <NEW_LINE> self._add_common_options() <NEW_LINE> <DEDENT> def _add_common_option...
Common code used amongst all CLI modules.
62598fd29f28863672818ac7
class Student: <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def to_json(self, attrs=None): <NEW_LINE> <INDENT> if attrs is not None and all(isinstance(x, str) for x...
Student class
62598fd2adb09d7d5dc0aa0f
class ShearY(Affine): <NEW_LINE> <INDENT> def __init__(self, shear=(-30, 30), order=1, cval=0, mode="constant", fit_output=False, backend="auto", seed=None, name=None, random_state="deprecated", deterministic="deprecated"): <NEW_LINE> <INDENT> super(ShearY, self).__init__( shear={"y": shear}, order=order, cval=cval, mo...
Apply affine shear on the y-axis to input data. This is a wrapper around :class:`Affine`. Added in 0.4.0. **Supported dtypes**: See :class:`~imgaug.augmenters.geometric.Affine`. Parameters ---------- shear : number or tuple of number or list of number or imgaug.parameters.StochasticParameter, optional Analogou...
62598fd260cbc95b063647d2
class Round3Score(RoboticsScore): <NEW_LINE> <INDENT> items = RoboticsScore.items + ('passengers',) <NEW_LINE> passengers = 0 <NEW_LINE> def __init__(self, total_time=0, passengers=0): <NEW_LINE> <INDENT> super(Round3Score, self).__init__(total_time) <NEW_LINE> self.passengers = passengers <NEW_LINE> <DEDENT> @classmet...
Concrete score sub-class for round 3. It counts: - the number of passengers correctly transported
62598fd2a219f33f346c6c9b
class PageLayoutElement(models.Model): <NEW_LINE> <INDENT> page_type = models.ForeignKey(PageType, verbose_name=_("page type")) <NEW_LINE> region = models.CharField( max_length=50, db_index=True, verbose_name=_("region"), help_text=_('A hard coded region name that is rendered in template index and also used in ' '<a hr...
Page Layout Element Model: a set of these records define the layout for each page type
62598fd2656771135c489b06
class TokenFinish(Parsing.Token): <NEW_LINE> <INDENT> pass
%token finish
62598fd24527f215b58ea364
class SymbioticTool(BaseTool, SymbioticBaseTool): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> SymbioticBaseTool.__init__(self, opts) <NEW_LINE> <DEDENT> def executable(self): <NEW_LINE> <INDENT> return util.find_executable('ikos') <NEW_LINE> <DEDENT> def version(self, executable): <NEW_LINE> <INDE...
Tool info for CPAchecker. It has additional features such as building CPAchecker before running it if executed within a source checkout. It also supports extracting data from the statistics output of CPAchecker for adding it to the result tables.
62598fd27cff6e4e811b5ebe
class LinkSearch(BaseFieldSearch): <NEW_LINE> <INDENT> _tag = 'linkto:' <NEW_LINE> _field_to_search = 'linkto' <NEW_LINE> costs = 5000 <NEW_LINE> def __init__(self, pattern, use_re=False, case=True): <NEW_LINE> <INDENT> super(LinkSearch, self).__init__(pattern, use_re, case) <NEW_LINE> self._textpattern = '(' + pattern...
Search the term in the pagelinks
62598fd2091ae356687050b1
class SearchTaskAPI(APIView): <NEW_LINE> <INDENT> renderer_classes = (JSONRenderer, XMLRenderer) <NEW_LINE> parser_classes = (JSONParser, XMLParser) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> if 'q' not in request.query_params: <NEW_LINE> <INDENT> return Response({'error': 'Parámetros insuficientes', 'q': '...
API para la petición de búsqueda de tareas por descripción y/o estatus
62598fd2ab23a570cc2d4fb8
class DynamicDocument(Document): <NEW_LINE> <INDENT> my_metaclass = TopLevelDocumentMetaclass <NEW_LINE> __metaclass__ = TopLevelDocumentMetaclass <NEW_LINE> _dynamic = True <NEW_LINE> def __delattr__(self, *args, **kwargs): <NEW_LINE> <INDENT> field_name = args[0] <NEW_LINE> if field_name in self._dynamic_fields: <NEW...
A Dynamic Document class allowing flexible, expandable and uncontrolled schemas. As a :class:`~mongoengine.Document` subclass, acts in the same way as an ordinary document but has expando style properties. Any data passed or set against the :class:`~mongoengine.DynamicDocument` that is not a field is automatically co...
62598fd29f28863672818ac8
class LoginView(BaseView, TemplateView): <NEW_LINE> <INDENT> template_name = 'home/login.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> info = { 'info': { 'title': 'Login Page - NMS', }, } <NEW_LINE> context.update(info) <NEW_LINE> retu...
docstring for LoginView
62598fd23d592f4c4edbb34c
class Photo(models.Model): <NEW_LINE> <INDENT> image = models.ImageField(upload_to='images/photomodels', verbose_name='Изображение') <NEW_LINE> photomodel = models.ForeignKey(Photomodel, verbose_name='Фотомодель') <NEW_LINE> def image_tag(self): <NEW_LINE> <INDENT> return u'<img height="100px" src="%s" />' % (settings....
Фотографии фотомодели
62598fd2dc8b845886d53a54
class Host: <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._host = jenkinsapi.jenkins.Jenkins(*args, **kwargs) <NEW_LINE> <DEDENT> def list_jobs(self): <NEW_LINE> <INDENT> return self._host.get_jobs() <NEW_LINE> <DEDENT> def change_job(self, name, xml): <NEW_LINE> <INDENT> job = self....
A Jenkins host to operate on.
62598fd250812a4eaa620e2f
class Posts(db.Model): <NEW_LINE> <INDENT> url = db.StringProperty(required=True) <NEW_LINE> title = db.StringProperty(required=True) <NEW_LINE> created = db.DateTimeProperty(auto_now_add=True)
Database Model to store each update/notification.
62598fd2a219f33f346c6c9d
class NodeHandler(tornado.websocket.WebSocketHandler): <NEW_LINE> <INDENT> node_dict = {} <NEW_LINE> def initialize(self, comms_handler,verbose=True): <NEW_LINE> <INDENT> self.__comms_handler = comms_handler <NEW_LINE> self.verbose = verbose <NEW_LINE> <DEDENT> def open(self): <NEW_LINE> <INDENT> self.id = uuid.uuid4()...
Class that handles the communication via websockets with the slave nodes.
62598fd2656771135c489b08
class Proxy: <NEW_LINE> <INDENT> def __init__(self, layer, url=None, provider_name=None): <NEW_LINE> <INDENT> if url: <NEW_LINE> <INDENT> self.provider = ModestMaps.Providers.TemplatedMercatorProvider(url) <NEW_LINE> <DEDENT> elif provider_name: <NEW_LINE> <INDENT> if provider_name in ModestMaps.builtinProviders: <NEW_...
Proxy provider, to pass through and cache tiles from other places. This provider is identified by the name "proxy" in the TileStache config. Additional arguments: - url (optional) URL template for remote tiles, for example: "http://tile.openstreetmap.org/{Z}/{X}/{Y}.png" - provider (optional) Provider na...
62598fd28a349b6b436866d8
class Gaussian_UCB_5_Continuous_Policy(Policy): <NEW_LINE> <INDENT> def __init__(self, exploitation_over_exploration_ratio=None): <NEW_LINE> <INDENT> super(Gaussian_UCB_5_Continuous_Policy, self).__init__() <NEW_LINE> self.exploitation_over_exploration_ratio = exploitation_over_exploration_ratio <NEW_LINE> <DEDENT> def...
must have array_rewards
62598fd2ad47b63b2c5a7cf4
class CharacterConfig(models.Model): <NEW_LINE> <INDENT> character = models.OneToOneField(Character, unique=True, primary_key=True, related_name='config') <NEW_LINE> is_public = models.BooleanField(default=False) <NEW_LINE> show_implants = models.BooleanField(default=False) <NEW_LINE> show_skill_queue = models.BooleanF...
Character configuration information
62598fd25fdd1c0f98e5e424
class FiniteStateMachineLoggingTests(TestCase): <NEW_LINE> <INDENT> def test_logger(self): <NEW_LINE> <INDENT> fsm = constructFiniteStateMachine( Input, Output, MoreState, TRANSITIONS, MoreState.amber, [Gravenstein], {Output.aardvark: IFood}, MethodSuffixOutputer(AnimalWorld([]))) <NEW_LINE> self.assertIsInstance(fsm.l...
Tests for logging behavior of the L{IFiniteStateMachine} returned by L{constructFiniteStateMachine}.
62598fd2adb09d7d5dc0aa13
class Sunacoop(CachedModel): <NEW_LINE> <INDENT> pst = models.ForeignKey('Pst') <NEW_LINE> numero = models.IntegerField(null=True) <NEW_LINE> fecha = models.DateField(blank=True) <NEW_LINE> archivo_comprobante = ContentTypeRestrictedFileField( upload_to=RUTA_DOCUMENTOS, content_types='application/pdf', blank=True, max_...
Modelo Sunacoop Contiene el registro de la superintendencia nacional de cooperativas para cada prestador de servicio turístico que sean de tipo juririco y tambien cooperativas
62598fd24527f215b58ea368
class Semester: <NEW_LINE> <INDENT> def __init__(self, year: int, semester: int): <NEW_LINE> <INDENT> self.year = year <NEW_LINE> self.semester = semester <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> if isinstance(other, Semester): <NEW_LINE> <INDENT> if self.year == other.year: <NEW_LINE> <INDENT> ...
Represents a semester in which the university offers a course semester = 1 -> First semester semester = 2 -> Second semester semester = 3 -> Summer semester semester > 3 -> Other (eg. trimesters etc.)
62598fd2ab23a570cc2d4fba
class SearchQueryBuilder(object): <NEW_LINE> <INDENT> def __init__(self, language=None): <NEW_LINE> <INDENT> self.terms = [] <NEW_LINE> self.language = language <NEW_LINE> <DEDENT> def add_term(self, term): <NEW_LINE> <INDENT> if not isinstance(term, InputSearchTerm) and not isinstance(term, OutputSearchTerm): <...
Clarifai Image Search Query Builder This builder is for advanced search use ONLY. If you are looking for simple concept search, or simple image similarity search, you should use one of the existing functions ``search_by_annotated_concepts``, ``search_by_predicted_concepts``, ``search_by_image`` or ``search_by_metadat...
62598fd2956e5f7376df58ca
class ColorGame(Base): <NEW_LINE> <INDENT> __tablename__ = 'game' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> done = Column(Boolean, default=False) <NEW_LINE> pattern_id = Column(Integer, ForeignKey('pattern.id')) <NEW_LINE> pattern = relationship('ColorPattern', backref=backref('game', order_by=id))
Represents a color game that is stored in the database. A game is linked to a pattern that is the correct solution to the game.
62598fd2283ffb24f3cf3d1a
class Fetcher: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.adapter = HTTPAdapter(max_retries=5) <NEW_LINE> self.fetchers = [] <NEW_LINE> <DEDENT> def fetch(self) -> dict: <NEW_LINE> <INDENT> fetcher_results = [fetcher.fetch() for fetcher in self.fetchers] <NEW_LINE> results = {key: val for result_d...
All data fetchers inherit from this class.
62598fd2fbf16365ca794558
class Meta: <NEW_LINE> <INDENT> abstract = True
SettingsMixin Meta class
62598fd2bf627c535bcb1949
class APIRequestError(Exception): <NEW_LINE> <INDENT> pass
Exception for handling error during HTTP requests
62598fd3656771135c489b0e
class UpdateCacheMiddleware(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS <NEW_LINE> self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX <NEW_LINE> self.cache_anonymous_only = getattr(settings, 'CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False) <NE...
Response-phase cache middleware that updates the cache if the response is cacheable. Must be used as part of the two-part update/fetch cache middleware. UpdateCacheMiddleware must be the first piece of middleware in MIDDLEWARE_CLASSES so that it'll get called last during the response phase.
62598fd3a219f33f346c6ca3