code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class AddWatchesTest(APITestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user1 = User.objects.create(username='test_user', password='test_pass') <NEW_LINE> self.user2 = User.objects.create(username='another_user', password='pass_pass') <NEW_LINE> self.new_watch_data = { 'name': 'NewWatch', 'url'... | Test module for creating new Watches. | 62598f879b70327d1c57e8b0 |
class GetJob(Resource): <NEW_LINE> <INDENT> def get(self,id): <NEW_LINE> <INDENT> get_job = JobsModel.get_one(self,id) <NEW_LINE> if get_job: <NEW_LINE> <INDENT> return make_response(jsonify({"status": 200, "data": [{'message': 'jobs available', 'job':get_job}]}), 200) <NEW_LINE> <DEDENT> return abort(make_response(js... | Class with methods to get a book | 62598f8707d97122c42167b8 |
class Inception3(nn.Module): <NEW_LINE> <INDENT> def __init__(self, classes=1000, **kwargs): <NEW_LINE> <INDENT> super(Inception3, self).__init__(**kwargs) <NEW_LINE> self.features = nn.Sequential( _make_basic_conv(3, out_channels=32, kernel_size=3, stride=2), _make_basic_conv(32, out_channels=32, kernel_size=3), _make... | Inception v3 model from
`"Rethinking the Inception Architecture for Computer Vision"
<http://arxiv.org/abs/1512.00567>`_ paper.
Parameters
----------
classes : int, default 1000
Number of classification classes.
norm_layer : object
Normalization layer used (default: :class:`nn.BatchNorm`)
Can be :class:`nn... | 62598f8750485f2cf55daa87 |
class QuestionViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> queryset = Question.objects.all() <NEW_LINE> serializer_class = QuestionSerializer <NEW_LINE> filter_fields = ('question_type', 'active') <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDE... | API endpoint that allows Question models to be viewed or edited. | 62598f8776d4e153a661c727 |
class ClientSSLTemplateCreate(task.Task): <NEW_LINE> <INDENT> @axapi_client_decorator <NEW_LINE> def execute(self, cert_data, vthunder): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if self.axapi_client.slb.template.client_ssl.exists(name=cert_data.template_name): <NEW_LINE> <INDENT> self.axapi_client.slb.template.clie... | Task to create a client ssl template for a listener | 62598f87fbf16365ca793bbe |
class ThinAxes(Axes): <NEW_LINE> <INDENT> name = 'thin' <NEW_LINE> def _init_axis(self): <NEW_LINE> <INDENT> self.xaxis = NoTicksXAxis(self) <NEW_LINE> self.yaxis = NoTicksYAxis(self) <NEW_LINE> <DEDENT> def cla(self): <NEW_LINE> <INDENT> Axes.cla(self) <NEW_LINE> self.xaxis.set_minor_locator(NullLocator()) <NEW_LINE> ... | Thin axes without spines and ticks to accelerate axes creation | 62598f87ec188e330fdf83b1 |
class EnzymeReaction(LSQBenchmarkProblem): <NEW_LINE> <INDENT> INITIAL_GUESSES = [ np.array([2.5, 3.9, 4.15, 3.9]) * 1e-1 ] <NEW_LINE> def __init__(self, x0_ind): <NEW_LINE> <INDENT> super().__init__(4, 11, 3.075057e-04, x0_ind) <NEW_LINE> self.u = np.array([4.0, 2.0, 1.0, 5.0e-1, 2.5e-1, 1.67e-1, 1.25e-1, 1.0e-1, 8.33... | The problem of fitting kinetic parameters for an enzyme reaction, [1]_.
Number of variables --- 4, number of residuals --- 11, no bounds.
.. [1] Brett M. Averick et al. "The MINPACK-2 Test Problem Collection",
p. 29 | 62598f870a50d4780f704eeb |
class SimpleColor: <NEW_LINE> <INDENT> def __init__(self, colorcode): <NEW_LINE> <INDENT> self.colorcode = rgb_to_hex(*hex_to_rgb(colorcode)) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f'<{self.__class__.__name__}(colorcode="{self.colorcode}")>' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> ... | A color stored as just a hex colorcode | 62598f8710dbd63aa1c706c8 |
class State(): <NEW_LINE> <INDENT> def __init__(self, obs_items, focus, click, quit): <NEW_LINE> <INDENT> self.obs_items = obs_items <NEW_LINE> self.focus = focus <NEW_LINE> self.click = click <NEW_LINE> self.quit = quit <NEW_LINE> <DEDENT> def __eq__(a, b): <NEW_LINE> <INDENT> return a.__hash__() == b.__hash__() <NEW_... | State of MDP observed by the agent
Parameters
----------
obs_items : list of MenuItems
focus : Focus
click : Click
quit : Quit | 62598f876aa9bd52df0d49e6 |
class CaseDependentConfigParser(ConfigParser): <NEW_LINE> <INDENT> def optionxform(self, optionstr): <NEW_LINE> <INDENT> return optionstr | configparser.ConfigParser subclass that removes the case transform. | 62598f8773bcbd0ca4bc9d66 |
class SharedAccessSignature(object): <NEW_LINE> <INDENT> def __init__(self, account_name, account_key, x_ms_version=DEFAULT_X_MS_VERSION): <NEW_LINE> <INDENT> self.account_name = account_name <NEW_LINE> self.account_key = account_key <NEW_LINE> self.x_ms_version = x_ms_version <NEW_LINE> <DEDENT> def generate_account(s... | Provides a factory for creating account access
signature tokens with an account name and account key. Users can either
use the factory or can construct the appropriate service and use the
generate_*_shared_access_signature method directly. | 62598f873eb6a72ae038a144 |
class DNRActNeuron(DNRNeuron): <NEW_LINE> <INDENT> def __init__(self, layer, idx): <NEW_LINE> <INDENT> super(DNRActNeuron, self).__init__(layer, idx) <NEW_LINE> <DEDENT> def ylb(self): <NEW_LINE> <INDENT> return self.layer_.ylb_[self.idx_] <NEW_LINE> <DEDENT> def update_ylb(self, value, tol=1e-4): <NEW_LINE> <INDENT> i... | Class used to shape neural network's activation neurons
Therefore neurons with an activation function
Attributes
----------
layer_ : :obj:`eml.net.describe.DNRLayer`
Layer where the neuron is located
idx_ : int
Index of the neuron
Parameters
----------
layer : obj:`eml.net.describ... | 62598f87d10714528d69d9e3 |
class LoggedActivityApprovalAPI(Resource): <NEW_LINE> <INDENT> decorators = [token_required] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.LoggedActivity = kwargs['LoggedActivity'] <NEW_LINE> self.db = kwargs['db'] <NEW_LINE> <DEDENT> @roles_required(["success ops"]) <NEW_LINE> def put(self, logged_... | Allows success-ops to approve at least one Logged Activities. | 62598f87711fe17d825e01fe |
class StartHandler(LoggingHandler): <NEW_LINE> <INDENT> def post(self, game): <NEW_LINE> <INDENT> player_ids = self.get_arguments("players") <NEW_LINE> game_id = stratumgs.game.init_game_engine(game, player_ids=player_ids) <NEW_LINE> self.redirect("/games/tictactoe/view/{}".format(game_id)) | Starts a new game. | 62598f87be383301e025330f |
class TSimpleServer(TServer): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> TServer.__init__(self, *args) <NEW_LINE> self.closed = False <NEW_LINE> <DEDENT> def serve(self): <NEW_LINE> <INDENT> self.trans.listen() <NEW_LINE> while True: <NEW_LINE> <INDENT> client = self.trans.accept() <NEW_LINE> it... | Simple single-threaded server that just pumps around one transport. | 62598f878da39b475be02cfb |
class YearOfStudyForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = YearOfStudy <NEW_LINE> exclude = () <NEW_LINE> fields = ('year',) <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(YearOfStudyForm, self).__init__(*args, **kwargs) | Unrestricted form for the Year Of Study model which coordinators use to create a new year | 62598f878e71fb1e983bb5c4 |
class Base( object ): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> logger = None <NEW_LINE> def __init__( self ): <NEW_LINE> <INDENT> self.logger = logging.getLogger( self.logger_name ) <NEW_LINE> <DEDENT> @abc.abstractproperty <NEW_LINE> def logger_name( self ): <NEW_LINE> <INDENT> return "call to invali... | This is a ABC (Abstract Base Class) that if included in a classes inheritance tree will enable
using the python logger. It is required that your class define logger_name and that the name
be in the logger configuration file. Most of the currently used definitions can be found in::
lib/Constants.LogKeys
Set up logg... | 62598f8715baa72349461a92 |
class AuditLogger(object): <NEW_LINE> <INDENT> __lock = threading.Lock() <NEW_LINE> operlogger = None <NEW_LINE> syslogger = None <NEW_LINE> weblogger = None <NEW_LINE> stack_file = None <NEW_LINE> dblogger = None <NEW_LINE> @classmethod <NEW_LINE> def instance(cls): <NEW_LINE> <INDENT> AuditLogger.__lock.acquire() <NE... | 将审计日志记录到etcd中 | 62598f87462c4b4f79dbb517 |
class InsResNet18(nn.Module): <NEW_LINE> <INDENT> def __init__(self, width=1, pool_size=7): <NEW_LINE> <INDENT> super(InsResNet18, self).__init__() <NEW_LINE> self.encoder = resnet18(width=width, pool_size=pool_size) <NEW_LINE> self.encoder = nn.DataParallel(self.encoder) <NEW_LINE> <DEDENT> def forward(self, x, layer=... | Encoder for instance discrimination and MoCo | 62598f87d7e4931a7ef3bbb0 |
class BLAKE2b_Hash(object): <NEW_LINE> <INDENT> block_size = 64 <NEW_LINE> def __init__(self, data, key, digest_bytes, update_after_digest): <NEW_LINE> <INDENT> self.digest_size = digest_bytes <NEW_LINE> self._update_after_digest = update_after_digest <NEW_LINE> self._digest_done = False <NEW_LINE> if digest_bytes in (... | A BLAKE2b hash object.
Do not instantiate directly. Use the :func:`new` function.
:ivar oid: ASN.1 Object ID
:vartype oid: string
:ivar block_size: the size in bytes of the internal message block,
input to the compression function
:vartype block_size: integer
:ivar digest_size: the size in bytes of... | 62598f87dc8b845886d530cc |
class XAccelMiddleware: <NEW_LINE> <INDENT> def __init__(self, app, mapping): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> self.mapping = [(str(k), str(v)) for k, v in mapping.items()] <NEW_LINE> <DEDENT> def __call__(self, environ, start_response): <NEW_LINE> <INDENT> def _start_response(status, headers, exc_info=Non... | A WSGI Middleware that converts X-Sendfile headers to X-Accel-Redirect
headers if possible.
If the path is not mapped to a URI usable for X-Sendfile we abort with an
error since it likely means there is a misconfiguration. | 62598f87c432627299fa2ae5 |
class GreenForwardMixin: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def io_copy(dest, source, timeout, bufsize): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> dest.settimeout(timeout) <NEW_LINE> source.settimeout(timeout) <NEW_LINE> while 1: <NEW_LINE> <INDENT> data = source.recv(bufsize) <NEW_LINE> if not data: <NEW_... | green forward mixin | 62598f8773bcbd0ca4bc9d67 |
class ConnectionDialog(QDialog): <NEW_LINE> <INDENT> barParameters = pyqtSignal(str) <NEW_LINE> connectParameters = pyqtSignal(tuple) <NEW_LINE> def __init__(self, location): <NEW_LINE> <INDENT> QDialog.__init__(self) <NEW_LINE> self.location = location <NEW_LINE> self.__initUI(location) <NEW_LINE> self.connect_widget.... | Class defining the preferences dialog window. | 62598f8796565a6dacd2cd02 |
class Logger(object): <NEW_LINE> <INDENT> myname = os.path.basename(sys.argv[0]) <NEW_LINE> quiet = False <NEW_LINE> logfile = None <NEW_LINE> @classmethod <NEW_LINE> def announce(cls, logger, msg): <NEW_LINE> <INDENT> if not cls.quiet: <NEW_LINE> <INDENT> print(msg) <NEW_LINE> <DEDENT> logger.info(msg) <NEW_LINE> <DED... | Wrappers and configuration methods for the Python logger.
Attributes:
logfile (string): the path to the logfile if specified.
myname (string): name of the command being run.
quiet (bool): if True, don't print to stdout. | 62598f8707d97122c42167ba |
class Goodbye(Message): <NEW_LINE> <INDENT> MESSAGE_TYPE = 6 <NEW_LINE> DEFAULT_REASON = u"wamp.close.normal" <NEW_LINE> def __init__(self, reason=DEFAULT_REASON, message=None): <NEW_LINE> <INDENT> assert(type(reason) == six.text_type) <NEW_LINE> assert(message is None or type(message) == six.text_type) <NEW_LINE> Mess... | A WAMP ``GOODBYE`` message.
Format: ``[GOODBYE, Details|dict, Reason|uri]`` | 62598f875f7d997b871f9163 |
class UserSitesInline(admin.StackedInline): <NEW_LINE> <INDENT> model = ClientSite.users.through <NEW_LINE> verbose_name = 'Site' <NEW_LINE> verbose_name_plural = 'Associated Sites' | Show authorized ClientSites inline with user admin. | 62598f87656771135c489190 |
class Solution: <NEW_LINE> <INDENT> def lastRemaining(self, n): <NEW_LINE> <INDENT> left = True <NEW_LINE> head = 1 <NEW_LINE> step = 1 <NEW_LINE> while n > 1: <NEW_LINE> <INDENT> if left or (n&1): <NEW_LINE> <INDENT> head += step <NEW_LINE> <DEDENT> step *= 2 <NEW_LINE> n //= 2 <NEW_LINE> left = not left <NEW_LINE> <D... | @param n: a integer
@return: return a integer | 62598f87711fe17d825e0200 |
class Enum(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.val_map = {ind: a for ind, a in enumerate(args)} <NEW_LINE> self.val_map.update(zip(kwargs.values(), kwargs.keys())) <NEW_LINE> <DEDENT> def __call__(self, val): <NEW_LINE> <INDENT> return self.val_map.get(val, 'Unknow... | Map values to specific strings. | 62598f871f037a2d8b9e3bed |
class NumExprFilter(NumericalExpression, Filter): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def create(cls, expr, binds): <NEW_LINE> <INDENT> return cls(expr=expr, binds=binds, dtype=bool_dtype) <NEW_LINE> <DEDENT> def _compute(self, arrays, dates, assets, mask): <NEW_LINE> <INDENT> return super(NumExprFilter, self).... | A Filter computed from a numexpr expression. | 62598f8715baa72349461a94 |
class AstroVolumeSelfTestLogic: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def hasImageData(self,volumeNode): <NEW_LINE> <INDENT> if not volumeNode: <NEW_LINE> <INDENT> print('no volume node') <NEW_LINE> return False <NEW_LINE> <DEDENT> if volumeNode.GetImageData() is None: <NE... | This class should implement all the actual
computation done by your module. The interface
should be such that other python code can import
this class and make use of the functionality without
requiring an instance of the Widget | 62598f876aa9bd52df0d49e9 |
class MinionEvent(SaltEvent): <NEW_LINE> <INDENT> def __init__(self, opts, listen=True, io_loop=None, raise_errors=False): <NEW_LINE> <INDENT> super().__init__( "minion", sock_dir=opts.get("sock_dir"), opts=opts, listen=listen, io_loop=io_loop, raise_errors=raise_errors, ) | Warning! Use the get_event function or the code will not be
RAET compatible
Create a master event management object | 62598f8763b5f9789fe84c87 |
class BgppeeradminstatusEnum(Enum): <NEW_LINE> <INDENT> stop = 1 <NEW_LINE> start = 2 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _BGP4_MIB as meta <NEW_LINE> return meta._meta_table['Bgp4Mib.Bgppeertable.Bgppeerentry.BgppeeradminstatusEnum'] | BgppeeradminstatusEnum
The desired state of the BGP connection.
A transition from 'stop' to 'start' will
cause the BGP Start Event to be generated.
A transition from 'start' to 'stop' will
cause the BGP Stop Event to be generated.
This parameter can be used to restart BGP
peer connections. Care should be used i... | 62598f874e696a045264db8e |
class TestingConfig(Config): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> TESTING = True <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgres://postgres:postgres@database:5432/test_db' <NEW_LINE> TOKEN_TIME = 2 | Class for the testing configurations | 62598f8763d6d428bbee22cf |
class InvalidEntityReference(BaseEntityException): <NEW_LINE> <INDENT> def __init__(self, message="Invalid Entity Reference", entityReference=None): <NEW_LINE> <INDENT> super(InvalidEntityReference, self).__init__(message, entityReference) | Thrown whenever an Entity-based action is performed on a mal-formed or
unrecognised @ref entity_reference. | 62598f875f7d997b871f9164 |
class FlipUpCommand(Command): <NEW_LINE> <INDENT> def __init__(self,light): <NEW_LINE> <INDENT> self.__light = light <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> self.__light.turn_on() | The Command class for turning on the light | 62598f87656771135c489192 |
class SSH(AbstractUrl, SlaveRemote): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.remote_addr, inner_url = sup(self, path, '^((?:%s@)?%s):(.+)' % tuple([ r.pattern for r in (UserRX, HostRX) ])) <NEW_LINE> self.inner_rsc = parse_url(inner_url) <NEW_LINE> <DEDENT> def canonical_path(self): <NEW_... | scheme class for ssh:// urls
interface to remote slave on master side
implementing an ssh based proxy | 62598f873cc13d1c6d46527f |
class Rfc2307Database(LdapDatabase): <NEW_LINE> <INDENT> Config = Rfc2307Config <NEW_LINE> User = Rfc2307User <NEW_LINE> Group = Rfc2307Group | An RFC2307 user database | 62598f870fa83653e46f4a05 |
class TestPyfilter(TestCase): <NEW_LINE> <INDENT> def testFileHeaderCheck(self): <NEW_LINE> <INDENT> with NamedTemporaryFile(buffering=0) as f1, NamedTemporaryFile(buffering=0) as f2, NamedTemporaryFile(buffering=0) as f3: <NEW_LINE> <INDENT> f1.write(bytes("".join(chr(randint(0, 255)) for _ in range(51... | A test case for testing of the file header checking functionality. | 62598f8707d97122c42167bd |
class LogParser: <NEW_LINE> <INDENT> def __init__(self, file_name): <NEW_LINE> <INDENT> self.file_name = file_name <NEW_LINE> self.urls = {} <NEW_LINE> self.status_codes = {} <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def order_dict(dictionary): <NEW_LINE> <INDENT> return sorted(dictionary.items(), key=lambda kv: kv[... | Provides functionality to parse log files | 62598f87711fe17d825e0202 |
class GUI: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.debug = status.get("debug") == "true" <NEW_LINE> self.log = Logger(os.path.join(root_dir, "logs"), debug=self.debug) <NEW_LINE> self.last_hwconfig = status.get("last_hwconfig") <NEW_LINE> self.last_position = status.get("last_position") <NEW_LI... | Main GUI class | 62598f87d10714528d69d9e7 |
class DemoMind(service.PBMind): <NEW_LINE> <INDENT> def remote_receive(self, sender, recipient, message): <NEW_LINE> <INDENT> print('Woop', sender, recipient, message) | An utterly pointless PBMind subclass.
This notices messages received and prints them to stdout. Since
the bot never stays in a channel very long, it is exceedingly
unlikely this will ever do anything interesting. | 62598f87e76e3b2f99fd8548 |
class Qtr: <NEW_LINE> <INDENT> def __init__(self, w=1, x=0, y=0, z=0, ptr=None): <NEW_LINE> <INDENT> self._ptr = ptr or ffi.new('Qtr*') <NEW_LINE> if not ptr: <NEW_LINE> <INDENT> self.w = w <NEW_LINE> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.z = z <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def w(self): <... | Quaternion. | 62598f87d53ae8145f917fa7 |
class ProposalExtension(WorksProposal): <NEW_LINE> <INDENT> original_house: Type['smpa.models.work.WorkExtensionOriginalHouse'] = ModelType('smpa.models.work.WorkExtensionOriginalHouse') <NEW_LINE> incidental_buildings: Type['smpa.models.work.WorkExtensionIncidentalBuildings'] = ModelType('smpa.models.wor... | Summary
| 62598f8721a7993f00c65a8b |
class FitFail(Exception): <NEW_LINE> <INDENT> def __init__(self, message='', prin=PRIN): <NEW_LINE> <INDENT> if prin: <NEW_LINE> <INDENT> print("***ERROR***") <NEW_LINE> print("No fits to given fit window succeeded") <NEW_LINE> <DEDENT> super(FitFail, self).__init__(message) <NEW_LINE> self.message = message | Exception for bad jackknife distribution | 62598f8715baa72349461a96 |
class FunctionHandler(object): <NEW_LINE> <INDENT> PY2CTYPES = { bytes : ctypes.c_char_p, str : ctypes.c_char_p, int : ctypes.c_int, float : ctypes.c_float, bool : ctypes.c_int, None : ctypes.c_int, } <NEW_LINE> RETVAL_CONVERTERS = { None : int, int : int, float : float, bool : bool, str ... | Class for abstracting function calls via ctypes and handling Python 2/3 compatibility issues. | 62598f8724f1403a92685639 |
class StdoutCapture(callbacks.Plugin): <NEW_LINE> <INDENT> def __init__(self, irc): <NEW_LINE> <INDENT> super(StdoutCapture, self).__init__(irc) <NEW_LINE> self.StdoutBuffer = StdoutBuffer <NEW_LINE> sys.stdout = self.StdoutBuffer(sys.stdout) <NEW_LINE> sys.stderr = self.StdoutBuffer(sys.stderr) <NEW_LINE> for logger i... | Add the help for "@plugin help StdoutCapture" here
This should describe *how* to use this plugin. | 62598f87097d151d1a2c0b3d |
class Author(User): <NEW_LINE> <INDENT> objects = models.Manager() <NEW_LINE> published = AuthorPublishedManager() <NEW_LINE> def entries_published(self): <NEW_LINE> <INDENT> return entries_published(self.entries) <NEW_LINE> <DEDENT> def blog_entries_published(self): <NEW_LINE> <INDENT> return entries_published(self.bl... | Proxy Model around User | 62598f87bde94217f37073f2 |
class AdditionalFields(EditorFieldsTab): <NEW_LINE> <INDENT> def __init__(self, parent, behavior): <NEW_LINE> <INDENT> super().__init__(parent, behavior) <NEW_LINE> self.name = "Additional Fields" <NEW_LINE> self.FieldsSizer = wx.FlexGridSizer(2,gap=wx.Size(5,0)) <NEW_LINE> self.FieldsSizer.AddGrowableCol(1, 0) <NEW_LI... | Concrete class of the :class:`EditorFieldsTab`. | 62598f87c432627299fa2ae9 |
class SimulationParamsInput(Form): <NEW_LINE> <INDENT> t = IntegerField( label=sim_params[0], description=sim_unitlabels[0], default=365, validators=[InputRequired(), NumberRange(min=365, max=720, message='t ∈ [365, 720]')]) <NEW_LINE> n = IntegerField( label=sim_params[1], description=sim_unitlabels[1], default=3... | Web Form for simulation params input | 62598f87287bf620b62716ce |
class Path(LEMSBase): <NEW_LINE> <INDENT> def __init__(self, name, description = ''): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.description = description <NEW_LINE> self.value = None <NEW_LINE> <DEDENT> def toxml(self): <NEW_LINE> <INDENT> return '<Path name="{0}"'.format(self.name) + (' description... | Stores a path entry specification. | 62598f87dc8b845886d530d0 |
class Plot2dData: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def plot_data_2d(self, X, task, distribution, filename=None): <NEW_LINE> <INDENT> fig = plt.figure() <NEW_LINE> axs = fig.add_subplot(111) <NEW_LINE> if task == str(3): <NEW_LINE> <INDENT> axs.plot(X[0, :], X[1, :], '... | Plot 2d data points | 62598f873c8af77a43b67cc1 |
class LocationSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Location <NEW_LINE> fields = ('id', 'label', 'description', 'latitude', 'longitude', 'altitude', 'created', 'modified', 'dbpedia_link') | Serializes a location | 62598f8723849d37ff850bd7 |
class StructKeyword(Keyword): <NEW_LINE> <INDENT> pass | Represents a 'struct' keyword | 62598f870a50d4780f704eee |
class LibraryVersionMismatch(SNESException): <NEW_LINE> <INDENT> pass | The library version is one we don't recognise. | 62598f8710dbd63aa1c706ce |
class DeleteSSIDResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'is_error': 'bool', 'failure_reason': 'str', 'success_message': 'str' } <NEW_LINE> attribute_map = { 'is_error': 'isError', 'failure_reason': 'failureReason', 'success_message': 'successMessage' } <NEW_LINE> def __init__(self, is_error=None, failur... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f8773bcbd0ca4bc9d6c |
class Simulator(object): <NEW_LINE> <INDENT> def __init__(self, game, player): <NEW_LINE> <INDENT> super(Simulator, self).__init__() <NEW_LINE> self.game = game <NEW_LINE> self.player = player <NEW_LINE> self.init_duration = 250 <NEW_LINE> self.init_stake = 100 <NEW_LINE> self.samples = 50 <NEW_LINE> self.durations = [... | Simulator exercises the roulette simulation with a given Player placing
bets. It reports raw statistics on a number of sessions of play. | 62598f87baa26c4b54d4edcc |
class Sku(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'tier': {'key': 'tier', 'type': 'str'}, 'size': {'key': 'size', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'capacity': {'key': 'capacity', 'type': 'i... | An ARM Resource SKU.
All required parameters must be populated in order to send to Azure.
:param name: Required. The name of the SKU, typically, a letter + Number
code, e.g. P3.
:type name: str
:param tier: The tier of the particular SKU, e.g. Basic, Premium.
:type tier: str
:param size: Size of the particular SKU
:... | 62598f871f037a2d8b9e3bf1 |
class TestJsonNamedDescribedResourceReferenceImpl(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 testJsonNamedDescribedResourceReferenceImpl(self): <NEW_LINE> <INDENT> pass | JsonNamedDescribedResourceReferenceImpl unit test stubs | 62598f87d4950a0f3b110bc2 |
class ThrowerAnt(Ant): <NEW_LINE> <INDENT> name = 'Thrower' <NEW_LINE> implemented = True <NEW_LINE> damage = 1 <NEW_LINE> food_cost= 4 <NEW_LINE> min_range = 0 <NEW_LINE> max_range = float('inf') <NEW_LINE> def nearest_bee(self, hive): <NEW_LINE> <INDENT> location=self.place <NEW_LINE> current_range=0 <NEW_LINE> whil... | ThrowerAnt throws a leaf each turn at the nearest Bee in its range. | 62598f8721a7993f00c65a8d |
@zope.interface.implementer(IErrorDict) <NEW_LINE> class ErrorDict(dict): <NEW_LINE> <INDENT> global_key = '__after' | Provide a simple dict for validation errors.
| 62598f8715baa72349461a98 |
class GridActionEventMixin(object): <NEW_LINE> <INDENT> GridActionNewMsg, EVT_CMD_GRID_ACTION_NEW = new_command_event() <NEW_LINE> GridActionOpenMsg, EVT_CMD_GRID_ACTION_OPEN = new_command_event() <NEW_LINE> GridActionSaveMsg, EVT_CMD_GRID_ACTION_SAVE = new_command_event() <NEW_LINE> GridActionTableSwitchMsg, EVT_CMD_G... | Mixin class for grid action events | 62598f87d10714528d69d9ea |
class PetAction(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'action_response': {'key': 'actionResponse', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, action_response: Optional[str] = None, **kwargs ): <NEW_LINE> <INDENT> super(PetAction, self).__init__(**kwargs) <NEW_LINE> self.action_res... | PetAction.
:param action_response: action feedback.
:type action_response: str | 62598f87cad5886f8bdc4e17 |
@method_decorator(decorators, name="dispatch") <NEW_LINE> class RepresentativeUpdateView( SuccessMessageMixin, PermissionRequiredMixin, UpdateView ): <NEW_LINE> <INDENT> raise_exception = True <NEW_LINE> permission_denied_message = _( "You do not have permission to change representative." ) <NEW_LINE> permission_requir... | The view class for the updating a representative details. | 62598f87c432627299fa2aeb |
class LineSegmentROI(ROI): <NEW_LINE> <INDENT> def __init__(self, positions=(None, None), pos=None, handles=(None,None), **args): <NEW_LINE> <INDENT> if pos is None: <NEW_LINE> <INDENT> pos = [0,0] <NEW_LINE> <DEDENT> ROI.__init__(self, pos, [1,1], **args) <NEW_LINE> if len(positions) > 2: <NEW_LINE> <INDENT> raise Exc... | ROI subclass with two freely-moving handles defining a line. | 62598f8766656f66f7d59f11 |
class PerishableStockItem(StockItem): <NEW_LINE> <INDENT> def __init__(self, name, barcode, quantity, sellbydate): <NEW_LINE> <INDENT> super(PerishableStockItem, self).__init__(name, barcode, quantity) <NEW_LINE> self.sellbydate = sellbydate <NEW_LINE> <DEDENT> def toString(self): <NEW_LINE> <INDENT> message = super(Pe... | The perishable stock control system | 62598f87435de62698e9b90e |
class Year(DateObject): <NEW_LINE> <INDENT> length_in_seasons = len(Season.names) <NEW_LINE> length_in_spans = (length_in_seasons * Season.length_in_spans) + 1 <NEW_LINE> length_in_days = length_in_spans * Span.length_in_days <NEW_LINE> length_in_seconds = length_in_days * Day.length_in_seconds <NEW_LINE> def __init__(... | A year on the Telisaran calendar.
Class Attributes:
length_in_seasons (int): The length of a year in seasons
length_in_spans (int): The length of a year in spans
length_in_days (int): The length of a year in days
length_in_seconds (int): The length of a year in seconds
Instance Attributes:
era (Er... | 62598f874e696a045264db90 |
class Base(object, metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> def __init__(self, c: config.Config): <NEW_LINE> <INDENT> self._config = c <NEW_LINE> self._setup() <NEW_LINE> <DEDENT> def __init_subclass__(cls) -> None: <NEW_LINE> <INDENT> super().__init_subclass__() <NEW_LINE> for wrapper in logger.get_section_loggers(... | An abstract base class used to define the command interface. | 62598f87004d5f362081ed86 |
class MockKey(object): <NEW_LINE> <INDENT> def __init__(self, bucket=None, name=None): <NEW_LINE> <INDENT> self.bucket = bucket <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def read_mock_data(self): <NEW_LINE> <INDENT> if self.name in self.bucket.mock_state(): <NEW_LINE> <INDENT> return self.bucket.mock_state()[self... | Mock out boto.s3.Key | 62598f8707d97122c42167c0 |
class GBTRegressionModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable): <NEW_LINE> <INDENT> @property <NEW_LINE> @since("2.0.0") <NEW_LINE> def featureImportances(self): <NEW_LINE> <INDENT> return self._call_java("featureImportances") <NEW_LINE> <DEDENT> @property <NEW_LINE> @since("2.0.0") <NEW_LINE> def trees(s... | .. note:: Experimental
Model fitted by :class:`GBTRegressor`.
.. versionadded:: 1.4.0 | 62598f871d351010ab8f3650 |
class ReadFromKafka(ExternalTransform): <NEW_LINE> <INDENT> byte_array_deserializer = ( 'org.apache.kafka.common.serialization.ByteArrayDeserializer') <NEW_LINE> URN = 'beam:external:java:kafka:read:v1' <NEW_LINE> def __init__( self, consumer_config, topics, key_deserializer=byte_array_deserializer, value_deserializer=... | An external PTransform which reads from Kafka and returns a KV pair for
each item in the specified Kafka topics. If no Kafka Deserializer for
key/value is provided, then the data will be returned as a raw byte array.
Experimental; no backwards compatibility guarantees. | 62598f875f7d997b871f9166 |
class Info(collections.namedtuple('Info', ('client_ip',) + operation.Info._fields), operation.Info): <NEW_LINE> <INDENT> def __new__(cls, client_ip='', **kw): <NEW_LINE> <INDENT> op_info = operation.Info(**kw) <NEW_LINE> return super(Info, cls).__new__(cls, client_ip, **op_info._asdict()) <NEW_LINE> <DEDENT> def as_che... | Holds the information necessary to fill in CheckRequest.
In addition the attributes in :class:`operation.Info`, this has:
Attributes:
client_ip: the client IP address | 62598f8738b623060ffa8bb1 |
class CustomWebPage(QWebPage): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def userAgentForUrl(self, url): <NEW_LINE> <INDENT> config = Config() <NEW_LINE> return config.user_agent | 配置web页面属性 | 62598f8796565a6dacd2cd05 |
class ArtistSubscriptionViewSet( mixins.CreateModelMixin, mixins.DestroyModelMixin, GenericViewSet, ): <NEW_LINE> <INDENT> serializer_class = ArtistSubscriptionSerializer <NEW_LINE> def get_queryset(self) -> QuerySet[ArtistSubscription]: <NEW_LINE> <INDENT> return self.request.user.artist_subscriptions | Создает или удаляет подписку на исполнителя | 62598f87596a89723612778e |
class Distinct(Expr): <NEW_LINE> <INDENT> __slots__ = '_child', <NEW_LINE> @property <NEW_LINE> def dshape(self): <NEW_LINE> <INDENT> return self._child.dshape <NEW_LINE> <DEDENT> @property <NEW_LINE> def fields(self): <NEW_LINE> <INDENT> return self._child.fields <NEW_LINE> <DEDENT> @property <NEW_LINE> def _name(self... | Removes duplicate rows from the table, so every row is distinct
Examples
--------
>>> t = Symbol('t', 'var * {name: string, amount: int, id: int}')
>>> e = distinct(t)
>>> data = [('Alice', 100, 1),
... ('Bob', 200, 2),
... ('Alice', 100, 1)]
>>> from blaze.compute.python import compute
>>> sorted(c... | 62598f870a50d4780f704eef |
class CustomUserCreationForm(forms.ModelForm): <NEW_LINE> <INDENT> password1 = forms.CharField(label='Password', widget=forms.PasswordInput) <NEW_LINE> password2 = forms.CharField(label='Password confirmation', widget=forms.PasswordInput) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = CustomUser <NEW_LINE> fields =... | A form for creating new users. Includes all the required
fields, plus a repeated password. | 62598f8773bcbd0ca4bc9d6e |
class Figure(object): <NEW_LINE> <INDENT> def __init__(self, coords = [], rotatable = True, color = None): <NEW_LINE> <INDENT> self.coords = coords <NEW_LINE> self.rotatable = rotatable <NEW_LINE> self.color = color <NEW_LINE> self._compute_min_max_offsets() <NEW_LINE> <DEDENT> def copy(self): <NEW_LINE> <INDENT> retur... | Represents a Tetris figure.
Each figure has an implicit center at 0,0 and a list of
coordinates (2-tuples) which represent the blocks relative
to the center.
For example, suppose the list of coords is:
[(0,0), (-1,0), (0,-1), (1,-1)]
Then the figure is (o - block, O - central block):
oo
oO
Accessible ... | 62598f87b57a9660fecd1597 |
class SlipEchoServer: <NEW_LINE> <INDENT> server_data = { socket.AF_INET: (TCPServer, '127.0.0.1'), socket.AF_INET6: (type('TCPServerIPv6', (TCPServer,), {'address_family': socket.AF_INET6}), '::1'), } <NEW_LINE> def __init__(self, address_family, pipe): <NEW_LINE> <INDENT> server_class, localhost = self.server_data[ad... | Execution helper for the echo server. Sends the server address back over the pipe. | 62598f8716aa5153ce40001d |
class Engine: <NEW_LINE> <INDENT> def __init__(self, board): <NEW_LINE> <INDENT> self.board = board <NEW_LINE> self.solutions = [] <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.board.reset() <NEW_LINE> self.solutions = [] <NEW_LINE> <DEDENT> """Result output.""" <NEW_LINE> def output_solutions(self, tim... | Engine connects the elements of the environment required to execute a
strategy to solve the 8 queens problem. | 62598f876aa9bd52df0d49ee |
class OrderedListSerializer(serializers.ListSerializer): <NEW_LINE> <INDENT> def to_representation(self, data): <NEW_LINE> <INDENT> return super().to_representation(data.order_by('word__word')) | Subclass to insure that wordlist items are listed alphabetically by word__word. | 62598f87f8510a7c17d7df04 |
class UserProfileViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = serializers.UserProfileSerializer <NEW_LINE> queryset = models.UserProfile.objects.all() <NEW_LINE> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (permissions.UpdateOwnProfile,) <NEW_LINE> filter_ba... | Hadles creating, reading and updating profiles. | 62598f87d53ae8145f917fab |
class USqlAssembly(CatalogItem): <NEW_LINE> <INDENT> _attribute_map = { 'compute_account_name': {'key': 'computeAccountName', 'type': 'str'}, 'version': {'key': 'version', 'type': 'str'}, 'database_name': {'key': 'databaseName', 'type': 'str'}, 'name': {'key': 'assemblyName', 'type': 'str'}, 'clr_name': {'key': 'clrNam... | A Data Lake Analytics catalog U-SQL Assembly.
:param compute_account_name: the name of the Data Lake Analytics account.
:type compute_account_name: str
:param version: the version of the catalog item.
:type version: str
:param database_name: the name of the database.
:type database_name: str
:param name: the name of t... | 62598f8707f4c71912baef60 |
class Model(object): <NEW_LINE> <INDENT> def __init__(self, learning_rate, hidden1, hidden2): <NEW_LINE> <INDENT> self.learning_rate = learning_rate <NEW_LINE> self.hidden1 = hidden1 <NEW_LINE> self.hidden2 = hidden2 <NEW_LINE> <DEDENT> def build_graph(self, data_paths, batch_size, is_training): <NEW_LINE> <INDENT> ten... | TensorFlow model for the MNIST problem. | 62598f8721a7993f00c65a8f |
class Temp(models.Model): <NEW_LINE> <INDENT> sensor = models.ForeignKey(Sensor) <NEW_LINE> temp = models.FloatField() <NEW_LINE> time = models.DateTimeField() | Log of valid temperature readings | 62598f87009cb60464d01047 |
class export_security_rule(models.Model): <NEW_LINE> <INDENT> _name = "export.security.rule" <NEW_LINE> @api.one <NEW_LINE> def _get_log_ids(self): <NEW_LINE> <INDENT> self.log_ids = self.env['export.security.log'].search( [('model', '=', self.model_id.model)], order="create_date desc" ).ids <NEW_LINE> <DEDENT> model_i... | Règle de sécurité pour les exports, ajoutée au fields_view_get
| 62598f87e64d504609df913f |
class AdamHyperparameter(tpe.Protocol): <NEW_LINE> <INDENT> alpha = None <NEW_LINE> beta1 = None <NEW_LINE> beta2 = None <NEW_LINE> eps = None <NEW_LINE> weight_decay_rate = None | Protocol class for hyperparameter of RAdam.
This is only for PEP 544 compliant static type checkers. | 62598f87462c4b4f79dbb51f |
class MountPointMap(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'share_id': {'required': True}, 'role_id': {'readonly': True}, 'mount_point': {'readonly': True}, 'mount_type': {'readonly': True}, 'role_type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'share_id': {'key': 'shareId', 'type':... | The share mount point.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:param share_id: Required. ID of the share mounted to the role VM.
:type share_id: str
:ivar role_id: ID of the role to which share is mo... | 62598f8715fb5d323ce7e847 |
class FieldRegexValidator: <NEW_LINE> <INDENT> def __init__(self, regex, error_code, identifier): <NEW_LINE> <INDENT> self._regex = regex <NEW_LINE> self._error_code = error_code <NEW_LINE> self._identifier = identifier <NEW_LINE> <DEDENT> def __call__(self, value): <NEW_LINE> <INDENT> for entry in value["entries"]: <N... | Do Regex validation for form answer entries | 62598f87d10714528d69d9ec |
class DescribeResIpListRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Business = None <NEW_LINE> self.IdList = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Business = params.get("Business") <NEW_LINE> self.IdList = params.get("IdList") | DescribeResIpList request structure.
| 62598f876aa9bd52df0d49ef |
class AutoLink(SphinxRole): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> pyobj_role = self.env.get_domain('py').role('obj') <NEW_LINE> objects, errors = pyobj_role('obj', self.rawtext, self.text, self.lineno, self.inliner, self.options, self.content) <NEW_LINE> if errors: <NEW_LINE> <INDENT> return objects, e... | Smart linking role.
Expands to ':obj:`text`' if `text` is an object that can be imported;
otherwise expands to '*text*'. | 62598f877b25080760ed6fc4 |
class GraphicsEdgeDirect(GraphicsEdge): <NEW_LINE> <INDENT> def calcPath(self) -> QPainterPath: <NEW_LINE> <INDENT> path = QPainterPath(self._sourcePos) <NEW_LINE> path.lineTo(self._targetPos) <NEW_LINE> return path | Graphics Edge Direct class, with straight line path between
:attr:`~nodedge.graphics_edge.GraphicsEdge.sourcePos` and
:attr:`~nodedge.graphics_edge.GraphicsEdge.targetPos` | 62598f871f5feb6acb16274e |
class _TrajAtom(object): <NEW_LINE> <INDENT> def __init__(self, traj, index): <NEW_LINE> <INDENT> self.traj = traj <NEW_LINE> self.index = index <NEW_LINE> self.real_atom = self.traj.mol.atoms[self.index] <NEW_LINE> <DEDENT> @property <NEW_LINE> def position(self): <NEW_LINE> <INDENT> return self._arrayslice('positions... | A helper class for querying individual atoms' dynamics
| 62598f87379a373c97d98b2f |
class Employer: <NEW_LINE> <INDENT> pass | Okay this is the employer class documentation. | 62598f87c432627299fa2aed |
class TftpTimeout(TftpException): <NEW_LINE> <INDENT> pass | This class represents a timeout error waiting for a response from the
other end. | 62598f8707d97122c42167c2 |
@inside_glslc_testsuite('OptionTargetSpv') <NEW_LINE> class TestTargetSpv1p2WithShaderRequiringSpv1p3Fails(expect.ErrorMessageSubstr): <NEW_LINE> <INDENT> shader = FileShader(vulkan_compute_subgroup_shader(), '.comp') <NEW_LINE> glslc_args = ['--target-spv=spv1.2', '-c', shader] <NEW_LINE> expected_error_substr = ["err... | Tests that compiling a shader requiring SPIR-V 1.3 but targeting 1.2
should fail. | 62598f8738b623060ffa8bb3 |
class ClassicMutator(Mutator): <NEW_LINE> <INDENT> mutationImpact = "SMALL" <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "ClassicMutator" <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> s = "impact: %s" % (self.mutationImpact) <NEW_LINE> return s <NEW_LINE> <DEDENT> def mutate(self): <NEW_LINE> ... | Perform simple, classic mutation on a randomly selected gene
or on each gene individually. | 62598f8882261d6c5272fc63 |
class TestCommands(unittest.TestCase): <NEW_LINE> <INDENT> def test_command_creation(self): <NEW_LINE> <INDENT> cmd = Message(name="cmd1", target_guid="abc123") <NEW_LINE> self.assertEqual(cmd.name, "cmd1") <NEW_LINE> self.assertEqual(cmd.target_guid, "abc123") <NEW_LINE> self.assertEqual(cmd.sim_id, None) <NEW_LINE> s... | Tests the Message class. | 62598f88fb3f5b602db47f3f |
class TestContactRelations(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 testContactRelations(self): <NEW_LINE> <INDENT> pass | ContactRelations unit test stubs | 62598f88f8510a7c17d7df05 |
class TruncatedNormal(MultivariateNormal): <NEW_LINE> <INDENT> def __init__(self, D, eta_dist=None, a=-1e10, b=1e10): <NEW_LINE> <INDENT> super().__init__(D, eta_dist) <NEW_LINE> self.name = "TruncatedNormal" <NEW_LINE> self.has_support_map = True <NEW_LINE> self.a = a <NEW_LINE> self.b = b <NEW_LINE> self.constant_bas... | Truncated normal family. | 62598f88baa26c4b54d4edd0 |
class Strategy(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def calculate_signals(self): <NEW_LINE> <INDENT> raise NotImplementedError("Should implement calculate _signals()") | Strategy is an abstract base class providing an interface for all
subsequent (inherited) strategy handling objects.
Th goal of a (derived) Strategy object is to generate Signal objects for
particular symbol based on the inputs of Bars (OHLCV) generated by a
DataHandler object.
This is designed to work both with histo... | 62598f8807f4c71912baef62 |
class SV(TrainingAlgo): <NEW_LINE> <INDENT> def __init__(self, rec_params, REC_MODEL, batch_size=20, n_samples=1, filename=None, rng=None, use_patience=True): <NEW_LINE> <INDENT> super().__init__(rec_params,REC_MODEL, batch_size, n_samples, filename, rng, use_patience) <NEW_LINE> self.algo = 'Supervised' <NEW_LINE> sel... | Fully supervised training using the binary cross-entropy as loss. | 62598f8826068e7796d4c47b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.