code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SliceTiming(SPMCommand): <NEW_LINE> <INDENT> input_spec = SliceTimingInputSpec <NEW_LINE> output_spec = SliceTimingOutputSpec <NEW_LINE> _jobtype = 'temporal' <NEW_LINE> _jobname = 'st' <NEW_LINE> def _format_arg(self, opt, spec, val): <NEW_LINE> <INDENT> if opt == 'in_files': <NEW_LINE> <INDENT> return scans_for...
Use spm to perform slice timing correction. http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=19 Examples -------- >>> from nipype.interfaces.spm import SliceTiming >>> st = SliceTiming() >>> st.inputs.in_files = 'functional.nii' >>> st.inputs.num_slices = 32 >>> st.inputs.time_repetition = 6.0 >>> st.inputs.time...
6259905494891a1f408ba182
class TreillisBar: <NEW_LINE> <INDENT> def __init__(self, model, nodes, lenght, alpha=0): <NEW_LINE> <INDENT> self.material = model.material <NEW_LINE> self.lenght = lenght <NEW_LINE> self.nodes = nodes <NEW_LINE> self.alpha = alpha <NEW_LINE> self.A = np.matrix([[np.cos(self.alpha)**2, np.cos(self.alpha) * np.sin(self...
Element barre pour les treillis.
625990543cc13d1c6d466c56
class TailViewStartCommand(sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def is_enabled(self): <NEW_LINE> <INDENT> if not plugin.is_enabled(): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> tail_view = get_tail_view(sublime_view=self.view) <NEW_LINE> if not tail_view: <NEW_LINE> <INDENT> return False <NEW_LINE...
Sublime Text text command ``tail_view_start``. Starts tailing in a Tail view. Buffer contents will be preserved and configured sources will be tailed from their current position.
625990548da39b475be04703
class Factory(object): <NEW_LINE> <INDENT> def __init__(self, channel_name, api_data_source_factory, api_list_data_source_factory, intro_data_source_factory, samples_data_source_factory, sidenav_data_source_factory, compiled_fs_factory, ref_resolver_factory, public_template_path, private_template_path): <NEW_LINE> <IND...
A factory to create lightweight TemplateDataSource instances bound to individual Requests.
6259905438b623060ffaa2db
class Address(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = "Address" <NEW_LINE> verbose_name_plural = "Addresses" <NEW_LINE> <DEDENT> address_line = models.CharField(max_length=256) <NEW_LINE> postcode = models.CharField(max_length=10) <NEW_LINE> def __str__(self): <NEW_LINE> <INDEN...
Address model.
6259905499cbb53fe6832403
class QueryJobForm(Form): <NEW_LINE> <INDENT> name = StringField('Name', render_kw={ 'placeholder': 'Your job name' }, validators=[ validators.DataRequired() ]) <NEW_LINE> annotation = TextAreaField('Annotation', render_kw={ 'placeholder': 'Job\'s annotation' }) <NEW_LINE> connection_id = SelectField('Connection', coer...
Used to create/edit data getting jobs.
625990544e4d56256637391f
class MedicalPathology(models.Model): <NEW_LINE> <INDENT> _inherit = 'medical.pathology' <NEW_LINE> carepoint_bind_ids = fields.One2many( comodel_name='carepoint.medical.pathology', inverse_name='odoo_id', string='Carepoint Bindings', )
Adds the ``one2many`` relation to the Carepoint bindings (``carepoint_bind_ids``)
625990542ae34c7f260ac5ff
class Dummy(object): <NEW_LINE> <INDENT> def __init__(self, write_function): <NEW_LINE> <INDENT> self.write = write_function
a dummy class that has the required fields to be used in the write method call below
625990540fa83653e46f63fd
class BrokerConnection(object): <NEW_LINE> <INDENT> def __init__(self, host, port, buffer_size=1024 * 1024, source_host='', source_port=0): <NEW_LINE> <INDENT> self._buff = bytearray(buffer_size) <NEW_LINE> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self._socket = None <NEW_LINE> self.source_host = source_...
BrokerConnection thinly wraps a `socket.create_connection` call and handles the sending and receiving of data that conform to the kafka binary protocol over that socket.
6259905491af0d3eaad3b341
class InventoryEntry(Base): <NEW_LINE> <INDENT> __tablename__ = 'inventory_items' <NEW_LINE> entry_id = Column(INTEGER, autoincrement=True, primary_key=True) <NEW_LINE> owner = Column(BigInteger, ForeignKey('accounts.id')) <NEW_LINE> item_type = Column(types.Enum(ItemType)) <NEW_LINE> item_info = Column(MutableList.as_...
An inventory class
6259905407f4c71912bb0953
class Accumulator: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.count = 0 <NEW_LINE> self.accum = None <NEW_LINE> <DEDENT> def __call__(self, x): <NEW_LINE> <INDENT> self.count += 1 <NEW_LINE> if self.accum is None: <NEW_LINE> <INDENT> self.accum = np.array(x) <NEW_LINE> <DEDENT> else: <NEW_LINE> <I...
This is for testing callbacks.
62599054097d151d1a2c2589
class RandomRIR(object): <NEW_LINE> <INDENT> def __init__(self, sampling_rate, max_rt_60=0.5, min_room_dim=3, max_room_dim=5): <NEW_LINE> <INDENT> self.sampling_rate = sampling_rate <NEW_LINE> self.max_rt_60 = max_rt_60 <NEW_LINE> self.max_room_dim = max_room_dim <NEW_LINE> self.min_room_dim = min_room_dim <NEW_LINE> <...
Generate a random room, microphone and source position and generate the corresponding RIR. # Arguments sampling_rate: Sampling rate of the RIR max_rt_60: Maximum value of RT60 in seconds. Actual RT60 is random between [0.1, max_rt_60] min_room_di, max_room_dim: Min and Maximum value of the room dim. ...
62599054b57a9660fecd2f94
class LinkAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('name', 'link_url', )
How to display the Link object in the Admin UI
62599054a79ad1619776b54a
class ServiceEndpointPolicyDefinitionListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ServiceEndpointPolicyDefinition]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["ServiceEndpointPolicyDefi...
Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. :param value: The service endpoint policy definition in a service endpoint policy. :type value: list[~azure.mgmt.network.v2020_07_01.models.ServiceEndpointPolic...
625990547d847024c075d8f5
class LiveUpdate(FullnameMixin, RedditBase): <NEW_LINE> <INDENT> STR_FIELD = "id" <NEW_LINE> _kind = "LiveUpdate" <NEW_LINE> @cachedproperty <NEW_LINE> def contrib(self) -> _LiveUpdateContribution: <NEW_LINE> <INDENT> return LiveUpdateContribution(self) <NEW_LINE> <DEDENT> @property <NEW_LINE> def thread(self) -> LiveT...
An individual :class:`.LiveUpdate` object. **Typical Attributes** This table describes attributes that typically belong to objects of this class. Since attributes are dynamically provided (see :ref:`determine-available-attributes-of-an-object`), there is not a guarantee that these attributes will always be present, n...
625990543539df3088ecd7c0
class Layout(object): <NEW_LINE> <INDENT> def __init__(self, *fields): <NEW_LINE> <INDENT> self.fields = list(fields) <NEW_LINE> <DEDENT> def render(self, form, form_style, context): <NEW_LINE> <INDENT> form.rendered_fields = [] <NEW_LINE> html = "" <NEW_LINE> for field in self.fields: <NEW_LINE> <INDENT> html += rende...
Form Layout. It is conformed by Layout objects: `Fieldset`, `Row`, `Column`, `MultiField`, `HTML`, `ButtonHolder`, `Button`, `Hidden`, `Reset`, `Submit` and fields. Form fields have to be strings. Layout objects `Fieldset`, `Row`, `Column`, `MultiField` and `ButtonHolder` can hold other Layout objects within. Though...
6259905499cbb53fe6832405
class FileMemberActionIndividualResult(bb.Union): <NEW_LINE> <INDENT> _catch_all = None <NEW_LINE> @classmethod <NEW_LINE> def success(cls, val): <NEW_LINE> <INDENT> return cls('success', val) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def member_error(cls, val): <NEW_LINE> <INDENT> return cls('member_error', val) <NE...
This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar Optional[sharing.AccessLevel] sharing.FileMemberActionIndividualResult.success: Member was successfully removed from this fil...
6259905407d97122c42181c4
class WarningValue(_messages.Message): <NEW_LINE> <INDENT> class CodeValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> CLEANUP_FAILED = 0 <NEW_LINE> DEPRECATED_RESOURCE_USED = 1 <NEW_LINE> DISK_SIZE_LARGER_THAN_IMAGE_SIZE = 2 <NEW_LINE> FIELD_VALUE_OVERRIDEN = 3 <NEW_LINE> INJECTED_KERNELS_DEPRECATED = 4 <NEW_LINE> ...
[Output Only] Informational warning which replaces the list of operations when the list is empty. Enums: CodeValueValuesEnum: [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. Messages: DataValueListEntry: A DataVal...
62599054462c4b4f79dbcf1f
class CrosstalkConfig(Config): <NEW_LINE> <INDENT> minPixelToMask = Field( dtype=float, doc="Set crosstalk mask plane for pixels over this value.", default=45000 ) <NEW_LINE> crosstalkMaskPlane = Field( dtype=str, doc="Name for crosstalk mask plane.", default="CROSSTALK" ) <NEW_LINE> crosstalkBackgroundMethod = ChoiceF...
Configuration for intra-detector crosstalk removal.
62599054d53ae8145f91997c
class TextCoderView(LoginRequiredMixin, generic.DetailView): <NEW_LINE> <INDENT> template_name = 'textcoder.html' <NEW_LINE> pk_url_kwarg = 'dictionary_pk' <NEW_LINE> default_dictionary_pk = 1 <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return enhance_models.Dictionary.objects.all() <NEW_LINE> <DEDENT> def g...
The view for the visualization tool.
6259905424f1403a9268635c
class LogoutView(authviews.LogoutView): <NEW_LINE> <INDENT> url = reverse_lazy('home') <NEW_LINE> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> auth.logout(self.request) <NEW_LINE> messages.success(self.request, "Your successfully log-out") <NEW_LINE> return super(LogoutView, self).get(*args, **kwargs)
User logout view
62599054f7d966606f749345
class Cookies(object): <NEW_LINE> <INDENT> def __init__(self, template, output_factory): <NEW_LINE> <INDENT> self._template = template <NEW_LINE> self._output_factory = output_factory <NEW_LINE> self._counter = 0 <NEW_LINE> <DEDENT> def _new_output_dir(self): <NEW_LINE> <INDENT> dirname = 'bake{:02d}'.format(self._coun...
Class to provide convenient access to the cookiecutter API.
625990540fa83653e46f63ff
class ApplicationGatewayProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> HTTP = "Http" <NEW_LINE> HTTPS = "Https"
Protocol.
6259905463b5f9789fe8668c
class Decoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self, vocab_size, inputsize=opt_model_options.rnn_size, hidden_dim=opt_model_options.rnn_size, embedding_dim=300, vectors=None): <NEW_LINE> <INDENT> super(Decoder, self).__init__() <NEW_LINE> self.hidden_dim, self.embedding_dim, self.vocab_size = int(hidden_dim...
TODO: Base paper (https://arxiv.org/pdf/1704.04368.pdf) might want us to use same embedding in enc, dec. Tie them up in that case.
62599054be8e80087fbc059c
class TransactionPolicy_two: <NEW_LINE> <INDENT> def __init__(self, policy_data, **extra_data): <NEW_LINE> <INDENT> self._data = {**policy_data} <NEW_LINE> self._data.update(**extra_data) <NEW_LINE> <DEDENT> def change_in_policy(self, customer_id, **new_policy_data): <NEW_LINE> <INDENT> self._data[customer_id].update(*...
컴포지션을 활용한 해결책 ( TransactionPolicy 자체가 사전이 되는 것이 아니라 사전을 활용하는 것. ) 1. 사전을 private 속성에 저장 ( _data ) 2. __getitem()__ 으로 사전의 프록시를 만들고 3. 필요한 public 메서드를 추가적으로 구현
62599054b5575c28eb713759
class CreatingMetricSourceException(Exception): <NEW_LINE> <INDENT> pass
Metric creation task hasn't completed yet
6259905476e4537e8c3f0aa6
class ZCheckerTools(CMakePackage): <NEW_LINE> <INDENT> homepage = "https://github.com/CODARcode/z-checker-installer" <NEW_LINE> url = "https://github.com/CODARcode/z-checker-installer/archive/refs/tags/0.7.0.tar.gz" <NEW_LINE> git = "https://github.com/CODARcode/z-checker-installer" <NEW_LINE> maintainers = [...
A collection of analysis tools that build upon z-checker
62599054dd821e528d6da3fa
class MovieAPI(API): <NEW_LINE> <INDENT> @login_required <NEW_LINE> def _put(self, movie_id: int) -> dict: <NEW_LINE> <INDENT> logger.debug("Updating Movie.") <NEW_LINE> title = request.json.get(constants.Movie.TITLE) <NEW_LINE> released_at = request.json.get(constants.Movie.RELEASED_AT) <NEW_LINE> is_active = request....
Movie API.
625990540c0af96317c577ed
class PlaceholderNode(template.Node): <NEW_LINE> <INDENT> def __init__(self, name, plugins=None): <NEW_LINE> <INDENT> self.name = name.lower() <NEW_LINE> if plugins: <NEW_LINE> <INDENT> self.plugins = plugins <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.plugins = [] <NEW_LINE> <DEDENT> <DEDENT> def render(self, c...
This template node is used to output page content and is also used in the admin to dynamicaly generate input fields. eg: {% placeholder content-type-name page-object widget-name %} Keyword arguments: content-type-name -- the content type you want to show/create page-object -- the page object widget-name -- the widget...
62599054e5267d203ee6ce0a
class NannyState(object): <NEW_LINE> <INDENT> DEFAULT_TIMEOUT = 10 <NEW_LINE> ZK_TREE_ROOT = '/monitor/hosts' <NEW_LINE> def __init__(self, zk_hosts='localhost:2181', suffix=None): <NEW_LINE> <INDENT> self._suffix = suffix <NEW_LINE> self._zk = kazoo.client.KazooClient(hosts=zk_hosts, timeout=NannyState.DEFAULT_TIMEOUT...
Base abstract class to attach a server process to a monitoring ZooKeeper instance
6259905416aa5153ce401a00
class NotifyEditForm(EditForm): <NEW_LINE> <INDENT> form_fields = form.FormFields(INotifyAction) <NEW_LINE> label = _(u"Edit Notify Action") <NEW_LINE> description = _(u"A notify action can show a message to the user.") <NEW_LINE> form_name = _(u"Configure element")
An edit form for notify rule actions. Formlib does all the magic here.
625990548e7ae83300eea5b3
class ImageCSSPlugin(Plugin): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ImageCSSPlugin, self).__init__(*args, **kwargs) <NEW_LINE> random.seed(12001) <NEW_LINE> self._random_state = random.getstate() <NEW_LINE> <DEDENT> def text_resource_complete(self, resource, text): <NEW_LINE...
Add some CSS class to images and rotate them.
62599054fff4ab517ebced3e
@Predictor.register('textual-entailment') <NEW_LINE> class DecomposableAttentionPredictor(Predictor): <NEW_LINE> <INDENT> def predict(self, premise: str, hypothesis: str) -> JsonDict: <NEW_LINE> <INDENT> return self.predict_json({"premise" : premise, "hypothesis": hypothesis}) <NEW_LINE> <DEDENT> @overrides <NEW_LINE> ...
Predictor for the :class:`~allennlp.models.bidaf.DecomposableAttention` model.
6259905482261d6c52730957
class SecurityDoor(Door): <NEW_LINE> <INDENT> color = 'gray' <NEW_LINE> locked = True <NEW_LINE> def open(self): <NEW_LINE> <INDENT> if self.locked: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> super().open()
Inherit from Door class.
625990544a966d76dd5f040b
class DeclineParticipantSerializer(serializers.Serializer): <NEW_LINE> <INDENT> def update(self, instance, data): <NEW_LINE> <INDENT> now = timezone.now().date() <NEW_LINE> if instance.fair.date_init >= now: <NEW_LINE> <INDENT> raise serializers.ValidationError('Ongoing fair cannot be modified.') <NEW_LINE> <DEDENT> us...
decline participant user_description serializer. Handle the decline join request to fair. Fair object must be provide in the context
6259905416aa5153ce401a01
class ShowNotify(View): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> notification = Notification.objects.filter(user=user).order_by('-date') <NEW_LINE> Notification.objects.filter(user=user, is_seen=False).update(is_seen=True) <NEW_LINE> return render(r...
Display notification
625990544e696a045264e8b0
class ABC(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta
Base class for abstract base classes. Completely unecessary, but makes ABCs slightly more convenient.
6259905423e79379d538da17
class UnrolledGradientDescent(UnrolledOptimizer): <NEW_LINE> <INDENT> def __init__(self, lr): <NEW_LINE> <INDENT> self._lr = lr <NEW_LINE> <DEDENT> def _apply_gradients(self, grads, x, optim_state): <NEW_LINE> <INDENT> new_x = [None] * len(x) <NEW_LINE> for i in xrange(len(x)): <NEW_LINE> <INDENT> new_x[i] = x[i] - sel...
Vanilla Gradient Descent UnrolledOptimizer.
62599054498bea3a75a59042
class IDManyRelatedField(relations.ManyRelatedField): <NEW_LINE> <INDENT> field_name_suffix = '_ids' <NEW_LINE> def bind(self, field_name, parent): <NEW_LINE> <INDENT> self.source = field_name[:-len(self.field_name_suffix)] <NEW_LINE> super().bind(field_name, parent)
Many-to-many field that appends an '_ids' suffix to the field name.
6259905471ff763f4b5e8ccb
class quaternion: <NEW_LINE> <INDENT> def __init__(self, real=None, img=None, R=None): <NEW_LINE> <INDENT> self.real = 0. <NEW_LINE> self.img = zeros(3) <NEW_LINE> if R is not None: <NEW_LINE> <INDENT> self.real, self.img = rot2quat(R) <NEW_LINE> <DEDENT> if real is not None: <NEW_LINE> <INDENT> self.real = real <NEW_L...
The class for the quaternion functions: normalize: normalize the quaternion norm: give the norm of the quaternion to_rot: convert the quaternion into a 3x3 rotation matrix C: give the conjugate of the instance quaternion: q(real, -img) inv: give the inverse of the instance quaternion: q.C/q.norm()
62599054435de62698e9d31f
class Tool(object): <NEW_LINE> <INDENT> def __init__(self, command_executor, filenames=set()): <NEW_LINE> <INDENT> self.executor = command_executor <NEW_LINE> self.filenames = filenames <NEW_LINE> <DEDENT> def get_configs(self): <NEW_LINE> <INDENT> return list() <NEW_LINE> <DEDENT> def invoke(self, dirname, filenames=s...
Tool represents a program that runs over source code. It returns a nested dictionary structure like: {'relative_filename': {'line_number': [error1, error2]}} eg: {'imhotep/app.py': {'103': ['line too long']}}
625990544e4d562566373923
class ButtonMenu(tk.Menubutton): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> l_args = {'text': u"\u25be" + self.get_text()} <NEW_LINE> super().__init__(parent, **l_args) <NEW_LINE> self.menu = tk.Menu(self, tearoff=False) <NEW_LINE> self['menu'] = self.menu <NEW_LINE> <DEDENT> @abstractmethod <N...
Base class for a top menu button (with a dropdown)
625990548a43f66fc4bf36a9
class Icmp: <NEW_LINE> <INDENT> ICMP_Data = namedtuple('ICMP_Data', 'type code checksum id seq payload') <NEW_LINE> @staticmethod <NEW_LINE> def pack(*, id_, seq, size): <NEW_LINE> <INDENT> _type, _code = 8, 0 <NEW_LINE> v_id = int(id_) & 0xffff <NEW_LINE> v_seq = int(seq) & 0xffff <NEW_LINE> v_data = ('x' * size).e...
The ICMP header structure: ICMP Header (8 bytes) & ICMP Payload +--------+--------+----------------+ | type | code | checksum | +--------+--------+----------------+ | identifier | sequence | +-----------------+----------------+ | payload | +--------------------------------...
6259905424f1403a9268635d
class SeekAheadThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, seek_ahead_iterator, cancel_event, status_queue): <NEW_LINE> <INDENT> super(SeekAheadThread, self).__init__() <NEW_LINE> self.status_queue = status_queue <NEW_LINE> self.seek_ahead_iterator = seek_ahead_iterator <NEW_LINE> self.cancel_event...
Thread to estimate total work to be performed by all processes and threads. Because the ProducerThread can only buffer a certain number of tasks on the global task queue, it cannot reliably provide the total count or size of iterated results for operations involving many iterated arguments until it nears the end of it...
62599054f7d966606f749346
class FourierExpansionWrapper : <NEW_LINE> <INDENT> def fourier_expansion(self, cache = True) : <NEW_LINE> <INDENT> try : <NEW_LINE> <INDENT> return self.__fourier_expansion <NEW_LINE> <DEDENT> except AttributeError : <NEW_LINE> <INDENT> if cache : <NEW_LINE> <INDENT> self.__fourier_expansion = self.pa...
Abstract class for elements, which do not represent Fourier expansions on their own, but encapsulate one. SEE: :class:~`fourier_expansion_framework.gradedexpansions.GradedExpansion_class`.
625990542ae34c7f260ac603
class TestProcessChecker(AbstractServer): <NEW_LINE> <INDENT> def tearDown(self, annotate=True): <NEW_LINE> <INDENT> super(TestProcessChecker, self).tearDown(annotate=annotate) <NEW_LINE> if self.process: <NEW_LINE> <INDENT> self.process.terminate() <NEW_LINE> <DEDENT> <DEDENT> def setUp(self, annotate=True): <NEW_LINE...
A test class for the ProcessChecker which checks if the Tribler Core is already running.
6259905491af0d3eaad3b345
class MainPage(Handler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> blogs = Blogs.all().order("-created") <NEW_LINE> self.render("/index.html", blogs=blogs, auth_user=self.user)
Renders home page with blog posts
62599054097d151d1a2c258b
class Date(Property): <NEW_LINE> <INDENT> def __init__(self, default=datetime.date.today()): <NEW_LINE> <INDENT> super(Date, self).__init__(default=default) <NEW_LINE> <DEDENT> def validate(self, value): <NEW_LINE> <INDENT> super(Date, self).validate(value) <NEW_LINE> if not (value is None or isinstance(value, (datetim...
Date (not datetime) type property.
62599054baa26c4b54d507c1
class FCM: <NEW_LINE> <INDENT> __version__ = "0.2" <NEW_LINE> def __init__(self, title="FCM Example"): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.graph = nx.MultiDiGraph() <NEW_LINE> self.ActivationFunction = lambda x: 1*(x >= 0.5) <NEW_LINE> return <NEW_LINE> <DEDENT> def add_edges(self, edge_lst): <NEW_LI...
Fuzzy Cognitive Map (FCM) class. Version 0.2 Does both FCM representation, manipulation, and visualization. Representation: FCM's are inherently directed graphs (digraphs). Using networkx graphs as base. [OO-NB: consider inheriting nx.Digraph directly] Manipulation: Can evolve FCM from input state to either one-step ...
6259905416aa5153ce401a02
class Foo(): <NEW_LINE> <INDENT> _i = 97 <NEW_LINE> def get_i(self): <NEW_LINE> <INDENT> return type(self)._i <NEW_LINE> <DEDENT> def set_i(self, val): <NEW_LINE> <INDENT> type(self)._i = val <NEW_LINE> <DEDENT> i = property(get_i, set_i)
demo static data member of a python class
6259905429b78933be26ab53
class PalletViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Pallet.objects.all() <NEW_LINE> serializer_class = PalletSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticatedOrReadOnly, IsStaff,) <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDENT> serializer.save(create_use...
This viewset automatically provides `list`, `create`, `retrieve`, `update` and `destroy` actions.
6259905416aa5153ce401a03
class Notification(object): <NEW_LINE> <INDENT> def __init__(self, interval=60.0): <NEW_LINE> <INDENT> super(Notification, self).__init__() <NEW_LINE> self.interval = interval <NEW_LINE> self.t_notify = 0.0 <NEW_LINE> self.muted = False <NEW_LINE> <DEDENT> def notify(self, ap, alarm): <NEW_LINE> <INDENT> raise ValueErr...
Notification base class for an alarm.
6259905415baa723494634b0
class Sensor(Device): <NEW_LINE> <INDENT> def get_value(self): <NEW_LINE> <INDENT> raise NotImplementedError()
Base sensor class
62599054cc0a2c111447c50a
class Agent: <NEW_LINE> <INDENT> def __init__(self, board, heuristic_f, display=None, ): <NEW_LINE> <INDENT> self.board = board <NEW_LINE> self.display = display <NEW_LINE> self.heuristic_f = heuristic_f <NEW_LINE> <DEDENT> def step(self): <NEW_LINE> <INDENT> direction = int(input("0: left, 1: down, 2: right, 3: up = "...
Agent Base.
62599054b7558d58954649b9
class PintJSONEncoder(DjangoJSONEncoder): <NEW_LINE> <INDENT> def default(self, obj): <NEW_LINE> <INDENT> if isinstance(obj, ureg.Quantity): <NEW_LINE> <INDENT> return to_raw_magnitude(obj) <NEW_LINE> <DEDENT> return super(PintJSONEncoder, self).default(obj)
Converts pint Quantity objects for Angular's benefit. # TODO handle unit conversion on the server per-org
6259905410dbd63aa1c72100
class PowerTool: <NEW_LINE> <INDENT> def __init__(self, config, system, api, force_user=None, force_pass=None, logger=None): <NEW_LINE> <INDENT> self.system = system <NEW_LINE> self.config = config <NEW_LINE> self.settings = config.settings() <NEW_LINE> self.api = api <NEW_LINE> self.logger = self.api.logger <NEW_LINE>...
Handles conversion of internal state to the tftpboot tree layout
625990548da39b475be04709
class PlanetViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Planet.objects.all() <NEW_LINE> serializer_class = PlanetSerializer
A simple ViewSet for listing or retrieving planets.
62599054cb5e8a47e493cc16
class NetcatTransferIntegrityError(NetcatError): <NEW_LINE> <INDENT> def __init__(self, output): <NEW_LINE> <INDENT> super().__init__("Transfer integrity failed", output)
Remote error related to transfer integrity failure using netcat.
6259905499cbb53fe6832409
class BI_append(LightBuiltIn, Function): <NEW_LINE> <INDENT> def evalObj(self, subj, queue, bindings, proof, query): <NEW_LINE> <INDENT> if not isinstance(subj, NonEmptyList): return None <NEW_LINE> r = [] <NEW_LINE> for x in subj: <NEW_LINE> <INDENT> if not isinstance(x, List): return None <NEW_LINE> r.extend([a for a...
Takes a list of lists, and appends them together.
62599054d53ae8145f919980
class Texto(models.Model): <NEW_LINE> <INDENT> valor = models.CharField(max_length=300) <NEW_LINE> id_item = models.IntegerField() <NEW_LINE> nombre_atributo = models.CharField(max_length=20) <NEW_LINE> longitud = models.IntegerField() <NEW_LINE> obligatorio = models.BooleanField(default=False)
La clase Texto almacenara los valores para tipos de datos "Texto" en el tipo de atributo @author: Francisco Velloso
62599054adb09d7d5dc0ba88
class AbsoluteMagnitudeConvertor: <NEW_LINE> <INDENT> name = "absolute_magnitude_little_h" <NEW_LINE> def __init__(self, attr, cosmo_data, cosmo_out): <NEW_LINE> <INDENT> if not isinstance(attr, str): <NEW_LINE> <INDENT> raise ValueError("Attribute '{}' must be of a str type" .format(attr)) <NEW_LINE> <DEDENT> self.att...
An absolute magnitude little h convertor. Transforms the absolute magnitude from survey's choice of little h to the user's choice of little h. Parameters ---------- attr : str Selector's absolute magnitude atribute to be "little h" converted. cosmo_data : `astropy.cosmology` object Data cosmology. cosmo_out : ...
625990547b25080760ed876e
@python_2_unicode_compatible <NEW_LINE> class Provider(UuidAuditedModel): <NEW_LINE> <INDENT> objects = ProviderManager() <NEW_LINE> PROVIDERS = ( ('ec2', 'Amazon Elastic Compute Cloud (EC2)'), ('mock', 'Mock Reference Provider'), ('rackspace', 'Rackspace Open Cloud'), ('static', 'Static Node'), ('digitalocean', 'Digit...
Cloud provider settings for a user. Available as `user.provider_set`.
625990544e4d562566373926
class OccurrenceSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> location = LocationSerializer() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Occurrence <NEW_LINE> fields = ( 'id', 'location', 'basket',)
Serializer for occurrence gives full location and document information, but no basket information. Mostly for use on basket detail pages
62599054097d151d1a2c258c
class BaseTenkPlayer(Player): <NEW_LINE> <INDENT> def filename(self, ai: BaseTenkAi) -> str: <NEW_LINE> <INDENT> return "./Q/%s_%s_%i.pickle" % (ai.__class__.__name__, self.TAG, self.games) <NEW_LINE> <DEDENT> def __init__( self, ais: List[BaseTenkAi], tag: str = "", load: Optional[int] = None, save: Optional[int] = No...
Base ai TenK player implementation.
6259905401c39578d7f141c7
class ObjectSeriesSpecs(SeriesSpecs): <NEW_LINE> <INDENT> data: pd.Series <NEW_LINE> def __init__( self, data: pd.Series, name: str, original_tz: Optional[tzinfo] = None, feature_transformation: Optional[ReversibleTransformation] = None, post_load_processing: Optional[Transformation] = None, resampling_config: Dict[str...
Spec for a pd.Series object that is being passed in and is stored directly in the specs.
62599054b5575c28eb71375b
class InsufficientItemsError(FunctionExecutionError): <NEW_LINE> <INDENT> def __init__(self, number_required, msg=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.number_required = number_required <NEW_LINE> self.msg = msg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if self.msg: <NEW_LINE> <...
Raised directly by operations functions that request the entire stack to indicate not enough items are on the stack to finish their work, or by the menu logic when an operation requests more parameters than items on the stack. Functions may use the simplified form of the exception, providing an int describing the numb...
6259905463d6d428bbee3cf2
class AbstractBootstrapper(QtCore.QObject): <NEW_LINE> <INDENT> PASSED_KEY = "passed" <NEW_LINE> ERROR_KEY = "error" <NEW_LINE> def __init__(self, bypass_checks=False): <NEW_LINE> <INDENT> QtCore.QObject.__init__(self) <NEW_LINE> leap_assert(self._gui_errback.im_func == AbstractBootstrapper._gui_errback.im_func, "Canno...
Abstract Bootstrapper that implements the needed deferred callbacks
62599054d486a94d0ba2d4e7
class InlineHiliteExtension(Extension): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.inlinehilite = [] <NEW_LINE> self.config = { 'style_plain_text': [ False, "Process inline code even when a language is not specified " "or langauge is specified as 'text'. " "When 'False', no classe...
Add inline highlighting extension to Markdown class.
625990547cff6e4e811b6f60
class DataSourceMixin(ShowFieldTypeAndContent, PolymorphicModel): <NEW_LINE> <INDENT> PRIORITY_REALTIME = 30 <NEW_LINE> PRIORITY_DAILY = 20 <NEW_LINE> PRIORITY_LOW = 10 <NEW_LINE> priority = models.IntegerField(default=PRIORITY_DAILY) <NEW_LINE> @classmethod <NEW_LINE> def is_higher_priority(cls, old, new): <NEW_LINE> ...
A mixin class for retrieving data in a well-defined format. Just need to override a function that grabs the data.
6259905415baa723494634b2
class SubscriptionCreateFormTestCase(TestCase): <NEW_LINE> <INDENT> longMessage = True <NEW_LINE> def test_save(self): <NEW_LINE> <INDENT> user = mixer.blend('auth.User') <NEW_LINE> dummy = mixer.blend('test_app.DummyModel') <NEW_LINE> form = SubscriptionCreateForm(user=user, content_object=dummy, data={}) <NEW_LINE> s...
Tests for the ``SubscriptionCreateForm`` form class.
62599054498bea3a75a59046
class KeyboardInput: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.stdscr = curses.initscr() <NEW_LINE> curses.noecho() <NEW_LINE> curses.cbreak() <NEW_LINE> self.stdscr.keypad(True) <NEW_LINE> self.q = Queue() <NEW_LINE> self.p = Process(target=self._read_events) <NEW_LINE> self.p.start() <NEW_LINE>...
Uses Curses module to read input keys directly
625990548e71fb1e983bcfe9
class ColumnStyle(TableLayoutStyle): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def __new__(self,sizeType=None,width=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Width=property(lambda self: object(),lambda self,v: None,lambda self: None)
Represents the look and feel of a column in a table layout. ColumnStyle(sizeType: SizeType,width: Single) ColumnStyle() ColumnStyle(sizeType: SizeType)
6259905473bcbd0ca4bcb7b1
class McPrimaryKeyColumnException(McDatabaseHandlerException): <NEW_LINE> <INDENT> pass
primary_key_column() exception.
625990548e71fb1e983bcfea
@python_2_unicode_compatible <NEW_LINE> class HLSPlaybackEnabledFlag(ConfigurationModel): <NEW_LINE> <INDENT> enabled_for_all_courses = BooleanField(default=False) <NEW_LINE> @classmethod <NEW_LINE> def feature_enabled(cls, course_id): <NEW_LINE> <INDENT> if not HLSPlaybackEnabledFlag.is_enabled(): <NEW_LINE> <INDENT> ...
Enables HLS Playback across the platform. When this feature flag is set to true, individual courses must also have HLS Playback enabled for this feature to take effect. .. no_pii: .. toggle_name: HLSPlaybackEnabledFlag.enabled_for_all_courses .. toggle_implementation: ConfigurationModel .. toggle_default: False .. to...
6259905407f4c71912bb095b
class FLOIPRenderer(JSONRenderer): <NEW_LINE> <INDENT> media_type = 'application/vnd.org.flowinterop.results+json' <NEW_LINE> format = 'json' <NEW_LINE> charset = 'utf-8' <NEW_LINE> def render(self, data, accepted_media_type=None, renderer_context=None): <NEW_LINE> <INDENT> request = renderer_context['request'] <NEW_LI...
FLOIP Results data renderer.
62599054e76e3b2f99fd9f1f
class WarehousesMock(Warehouses): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(None) <NEW_LINE> self.load_by_name = pass_ <NEW_LINE> self.load_by_tvd = pass_ <NEW_LINE> self.update = pass_ <NEW_LINE> self.update_one = pass_ <NEW_LINE> self.update_request_body = pass_
Мок коллекции складов в БД
62599054a219f33f346c7d25
class NotFoundError(APIClientError): <NEW_LINE> <INDENT> pass
Wrapper for HTTP 400 Bad Request error.
6259905463d6d428bbee3cf4
class BaseChunkedUpload(models.Model): <NEW_LINE> <INDENT> upload_id = models.CharField(max_length=32, unique=True, editable=False, default=generate_upload_id) <NEW_LINE> file = models.FileField(max_length=255, upload_to=UPLOAD_PATH, storage=STORAGE) <NEW_LINE> filename = models.CharField(max_length=255) <NEW_LINE> off...
Base chunked upload model. This model is abstract (doesn't create a table in the database). Inherit from this model to implement your own.
62599054ac7a0e7691f73a02
class TaskWithArgs(object): <NEW_LINE> <INDENT> argv = [] <NEW_LINE> kwargs = {} <NEW_LINE> arg_prompt = None <NEW_LINE> def os_path_split_asunder(self, path): <NEW_LINE> <INDENT> parts = [] <NEW_LINE> while True: <NEW_LINE> <INDENT> newpath, tail = os.path.split(path) <NEW_LINE> if newpath == path: <NEW_LINE> <INDENT>...
Task decorator This gathers info about the task and stores it into the HerringApp.HerringTasks dictionary. The decorator does not run the task. The task will be invoked via the HerringApp.HerringTasks dictionary.
625990546e29344779b01b6b
class CartAdd(View): <NEW_LINE> <INDENT> def post(self, request): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> if not user.is_authenticated(): <NEW_LINE> <INDENT> return JsonResponse({'res': 0, 'msg': '请先登陆'}) <NEW_LINE> <DEDENT> count = request.POST.get('count') <NEW_LINE> sku_id = request.POST.get('sku_id') <NE...
将商品添加到购物车
625990543eb6a72ae038bb81
class vertex(topological_representation_item): <NEW_LINE> <INDENT> def __init__( self , inherited0__name , ): <NEW_LINE> <INDENT> topological_representation_item.__init__(self , inherited0__name , )
Entity vertex definition.
62599054d6c5a102081e3640
class _InterProcessLock(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.lockfile = None <NEW_LINE> self.fname = name <NEW_LINE> <DEDENT> def acquire(self): <NEW_LINE> <INDENT> basedir = os.path.dirname(self.fname) <NEW_LINE> if not os.path.exists(basedir): <NEW_LINE> <INDENT> fileutils.e...
Lock implementation which allows multiple locks, working around issues like bugs.debian.org/cgi-bin/bugreport.cgi?bug=632857 and does not require any cleanup. Since the lock is always held on a file descriptor rather than outside of the process, the lock gets dropped automatically if the process crashes, even if __exit...
625990543617ad0b5ee07669
class People(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> with open('people.json') as people_fp: <NEW_LINE> <INDENT> self.people = json.load(people_fp)['people'] <NEW_LINE> <DEDENT> <DEDENT> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> self.set_header("Content-Type",...
Send the list of people to the client. NOTE: It would be nice to flatten the data a bit.
6259905423e79379d538da1d
class PostgressDatabase(): <NEW_LINE> <INDENT> dataSourceClassName = 'org.postgresql.ds.PGSimpleDataSource' <NEW_LINE> connectionPort = 5432 <NEW_LINE> connectionUrl = 'jdbc:postgresql://0.0.0.0:%d/corda' <NEW_LINE> username = 'postgresuser' <NEW_LINE> password = 'secretpassword' <NEW_LINE> driver = 'postgresql-42.2.5....
PostgreSQL database static configuration.
6259905423849d37ff8525e6
class PINN_TC(Elasticity2D): <NEW_LINE> <INDENT> def net_uv(self, x, y): <NEW_LINE> <INDENT> X = tf.concat([x, y], 1) <NEW_LINE> uv = self.neural_net(X,self.weights,self.biases) <NEW_LINE> u = x*uv[:, 0:1] <NEW_LINE> v = y*uv[:, 1:2] <NEW_LINE> return u, v
Class including (symmetry) boundary conditions for the thick cylinder problem
62599054e64d504609df9e61
class OrcSystemException(OrcException): <NEW_LINE> <INDENT> code = OrcException.code + exc_grade(0x2, 0x1) <NEW_LINE> def __init__(self, code, info=None): <NEW_LINE> <INDENT> self.code += code <NEW_LINE> self.info = info or "System exception."
System Exception 01
62599054435de62698e9d325
@xnmt.require_dynet <NEW_LINE> class MomentumSGDTrainer(XnmtOptimizerDynet, Serializable): <NEW_LINE> <INDENT> yaml_tag = '!MomentumSGDTrainer' <NEW_LINE> @serializable_init <NEW_LINE> def __init__(self, e0: numbers.Real = 0.01, mom: numbers.Real = 0.9, skip_noisy: bool = False, rescale_grads: numbers.Real = 5.0) -> No...
Stochastic gradient descent with momentum This is a modified version of the SGD algorithm with momentum to stablize the gradient trajectory. Args: e0: Initial learning rate mom: Momentum skip_noisy: keep track of a moving average and a moving standard deviation of the log of the gradient norm ...
625990544e4d562566373929
class Box(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.coord = (None, None) <NEW_LINE> self.big = False <NEW_LINE> self.big_color = None <NEW_LINE> self.big_rad = 80 <NEW_LINE> self.med = False <NEW_LINE> self.med_color = None <NEW_LINE> self.med_rad = 50 <NEW_LINE> self.small = False <NEW_LINE> ...
Contains all relevant info for each box in board grid
62599054f7d966606f749349
class ResetPassword(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def post(self, request): <NEW_LINE> <INDENT> pass
Reset a new password. **Workflow:** 1] User enters in new password, confirms password, and submits. 2] Application registers the new password and the User can progress with their brand new password. **Required arguments:** new_password, re_new_password **Model(s):** User **Validation:** 1] ...
625990544e4d56256637392a
class DummyModel(HasStrictTraits): <NEW_LINE> <INDENT> name = Str() <NEW_LINE> children = List(This)
Dummy model with children.
6259905491af0d3eaad3b34b
class Collection(Sum): <NEW_LINE> <INDENT> def __init__(self, level=logging.NOTSET, default=[], op=operator.add): <NEW_LINE> <INDENT> Sum.__init__(self, level=level, default=default, op=op) <NEW_LINE> <DEDENT> def getvalue(self, record): <NEW_LINE> <INDENT> return [Sum.getvalue(self, record)]
A collection of records values.
625990543c8af77a43b689d1
class Solution: <NEW_LINE> <INDENT> def findSubtree(self, root): <NEW_LINE> <INDENT> self.subtreeSum = sys.maxsize <NEW_LINE> self.result = None <NEW_LINE> self.helper(root) <NEW_LINE> return self.result <NEW_LINE> <DEDENT> def helper(self, root): <NEW_LINE> <INDENT> if root is None: <NEW_LINE> <INDENT> return 0 <NEW_L...
@param root: the root of binary tree @return: the root of the minimum subtree
6259905401c39578d7f141c9
class SizeCheckWrapper: <NEW_LINE> <INDENT> def __init__(self, rfile, maxlen): <NEW_LINE> <INDENT> self.rfile = rfile <NEW_LINE> self.maxlen = maxlen <NEW_LINE> self.bytes_read = 0 <NEW_LINE> <DEDENT> def _check_length(self): <NEW_LINE> <INDENT> if self.maxlen and self.bytes_read > self.maxlen: <NEW_LINE> <INDENT> rais...
Wraps a file-like object, raising MaxSizeExceeded if too large. :param rfile: ``file`` of a limited size :param int maxlen: maximum length of the file being read
62599054b5575c28eb71375d
class ConfigurationTest(unittest2.TestCase): <NEW_LINE> <INDENT> def test_defaults(self): <NEW_LINE> <INDENT> self.assertEqual('br-int', cfg.CONF.OVS.integration_bridge) <NEW_LINE> self.assertEqual('sqlite://', cfg.CONF.DATABASE.sql_connection) <NEW_LINE> self.assertEqual(-1, cfg.CONF.DATABASE.sql_max_retries) <NEW_LIN...
Configuration file Tests
62599054dd821e528d6da402
class WarningLog(OnceLogger): <NEW_LINE> <INDENT> def __init__(self, btlevels=10, btdefault=False, maxcount=1, *args, **kwargs): <NEW_LINE> <INDENT> OnceLogger.__init__(self, *args, **kwargs) <NEW_LINE> self.__btlevels = btlevels <NEW_LINE> self.__btdefault = btdefault <NEW_LINE> self.__maxcount = maxcount <NEW_LINE> s...
Logging class of messsages to be printed just once per each message
62599054b830903b9686ef0f
class EnergyLargestClusterFilter(Filter): <NEW_LINE> <INDENT> def __init__(self, energy=0): <NEW_LINE> <INDENT> self.criteria = "BE_LC" <NEW_LINE> Filter.__init__(self, self.criteria) <NEW_LINE> self.energyF = EnergyFilter(energy=energy) <NEW_LINE> <DEDENT> def filter(self, docking, rms=2.0): <NEW_LINE> <INDENT> d = do...
class for object to screen docking results based on the magnitude of best energy and whether that conf is in the largest cluster input: an AutoDock docking output: whether the docking passes these criteria
62599054596a897236129041
class AvgTimesList(ListBox): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> super(AvgTimesList, self).__init__(SimpleListWalker([])) <NEW_LINE> self.key = key <NEW_LINE> <DEDENT> def add_data(self, data): <NEW_LINE> <INDENT> while len(self.body): <NEW_LINE> <INDENT> self.body.pop(0) <NEW_LINE> <DEDENT...
Average times block :type key: str
62599054be383301e0254d1e
class Astar: <NEW_LINE> <INDENT> def __init__(self, startPoint, endPoint, blockList, size): <NEW_LINE> <INDENT> self.__start=startPoint[:] <NEW_LINE> self.__end=endPoint[:] <NEW_LINE> self.__closelist = blockList[:] <NEW_LINE> self.__size=size[:] <NEW_LINE> self.__openlist = [] <NEW_LINE> self.shortestPath=[] <NEW_LINE...
Perform A* algorithm to find the shortest path. find the shortest path from __start point to __end point blockSet are the points that cannot be positioned size is the window size
6259905416aa5153ce401a09
class _Appsrc(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._signals = _Signals() <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.prepare(None, None, None, None) <NEW_LINE> <DEDENT> def prepare(self, caps, need_data, enough_data, seek_data): <NEW_LINE> <...
Helper class for dealing with appsrc based playback.
62599054a17c0f6771d5d633
class KerasClassifier(BaseWrapper): <NEW_LINE> <INDENT> def fit(self, x, y, **kwargs): <NEW_LINE> <INDENT> y = np.array(y) <NEW_LINE> if len(y.shape) != 1: <NEW_LINE> <INDENT> self.classes_ = np.arange(y.shape[1]) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.classes_ = np.unique(y) <NEW_LINE> y = np.searchsorted(...
Implementation of the scikit-learn classifier API for Keras.
6259905415baa723494634b6