code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class UnionFind: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.weights = {} <NEW_LINE> self.parents = {} <NEW_LINE> <DEDENT> def __getitem__(self, object): <NEW_LINE> <INDENT> if object not in self.parents: <NEW_LINE> <INDENT> self.parents[object] = object <NEW_LINE> self.weights[object] = 1 <NEW_LIN...
Union Find data structure. Modified from Josiah Carlson's code, http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215912 to allow arbitrarily many arguments in unions, use [] syntax for finds, and eliminate unnecessary code.
62598ef5f9cc0f698b1c4706
class SpecLoader(object): <NEW_LINE> <INDENT> def __init__(self, loader=None): <NEW_LINE> <INDENT> if loader is None: <NEW_LINE> <INDENT> loader = Loader() <NEW_LINE> <DEDENT> self.loader = loader <NEW_LINE> <DEDENT> def _find_relative(self, spec): <NEW_LINE> <INDENT> if spec.template_rel_path is not None: <NEW_LINE> <...
Supports loading custom-specified template (from TemplateSpec instances).
62598ef5be7bc26dc9251299
class YearEnd(DateOffset, CacheableOffset): <NEW_LINE> <INDENT> def __init__(self, n=1, **kwds): <NEW_LINE> <INDENT> self.month = kwds.get('month', 12) <NEW_LINE> if self.month < 1 or self.month > 12: <NEW_LINE> <INDENT> raise Exception('Month must go from 1 to 12') <NEW_LINE> <DEDENT> DateOffset.__init__(self, n=n, **...
DateOffset increments between calendar year ends
62598ef55fcc89381b26555f
class GemCheckUsesMacros(GemCheckBase): <NEW_LINE> <INDENT> def __init__(self, base): <NEW_LINE> <INDENT> GemCheckBase.__init__(self, base) <NEW_LINE> self.url = _gl_fmt_uri({'section': 'Macros'}) <NEW_LINE> self.text = 'Specfile should use macros from rubygem-devel package.' <NEW_LINE> self.automatic = True <NEW_LINE>...
Check if spec files uses proper macros instead of hardcoding
62598ef591f36d47f22302db
class ExtendingGenerator(PrependedGenerator): <NEW_LINE> <INDENT> def __init__(self, startarea, endarea, steps): <NEW_LINE> <INDENT> super(ExtendingGenerator, self).__init__(*startarea) <NEW_LINE> self.n = 0 <NEW_LINE> self.steps = steps <NEW_LINE> self.diff = (array(endarea) - array(startarea)) / float(steps) <NEW_LIN...
Extending the target area for each generated point
62598ef557b8e32f5250753b
class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy): <NEW_LINE> <INDENT> BASE_RPC_API_VERSION = '2.0' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(SchedulerAPI, self).__init__(topic=CONF.scheduler_topic, default_version=self.BASE_RPC_API_VERSION) <NEW_LINE> <DEDENT> def run_instance(self, ctxt, req...
Client side of the scheduler rpc API. API version history: 1.0 - Initial version. 1.1 - Changes to prep_resize(): - remove instance_uuid, add instance - remove instance_type_id, add instance_type - remove topic, it was unused 1.2 - Remove topic from run_instance, it was...
62598ef5091ae35668703487
class afterfx(parser.parser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> parser.parser.__init__(self) <NEW_LINE> self.str_error = [ 'aerender Error', 'After Effects error', 'Unable to Render'] <NEW_LINE> self.firstframe = True <NEW_LINE> self.data_all = '' <NEW_LINE> <DEDENT> def do(self, data, mode): ...
Adobe After Effects
62598ef57b180e01f3e4847d
class EvalMetric(object): <NEW_LINE> <INDENT> def __init__(self, name, num=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.num = num <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> def update(self, labels, preds): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <I...
Base class for all evaluation metrics. .. note:: This is a base class that provides common metric interfaces. One should not use this class directly, but instead create new metric classes that extend it.
62598ef560cbc95b06362ba5
class Resource(models.Model): <NEW_LINE> <INDENT> meta_species = models.CharField(max_length=150, null=True, blank=True) <NEW_LINE> region = models.CharField(max_length=150, null=True, blank=True) <NEW_LINE> hydro_interception_dbh = models.TextField(null=True, blank=True) <NEW_LINE> aq_ozone_dep_dbh = models.TextField(...
For use in STRATUM - a Resource can have many species, and has different values for each dbh/resource combo.
62598ef592d797404e387fb3
class DecryptOperation(CryptoOperation): <NEW_LINE> <INDENT> keyname = 'private' <NEW_LINE> description = ('Decrypts a file. The original file must be shorter than ' 'the key length in order to have been encrypted.') <NEW_LINE> operation = 'decrypt' <NEW_LINE> operation_past = 'decrypted' <NEW_LINE> operation_progressi...
Decrypts a file.
62598ef5adb09d7d5dc08e2e
class SCSP: <NEW_LINE> <INDENT> def __init__(self, name, vars=[]): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.vars = [] <NEW_LINE> self.cons = [] <NEW_LINE> self.scons = [] <NEW_LINE> self.vars_to_scons = dict() <NEW_LINE> self.vars_to_cons = dict() <NEW_LINE> for v in vars: <NEW_LINE> <INDENT> self.add_var(v...
Class for packing up a set of variables into a soft CSP problem. Contains various utility routines for accessing the problem. The variables of the CSP can be added later or on initialization. The constraints must be added later
62598ef5377c676e912f6199
class GenieGraphic(ConverterObject): <NEW_LINE> <INDENT> __slots__ = ('exists', 'subgraphics', '_refs', 'data') <NEW_LINE> def __init__(self, graphic_id, full_data_set, members=None): <NEW_LINE> <INDENT> super().__init__(graphic_id, members=members) <NEW_LINE> self.data = full_data_set <NEW_LINE> self.exists = True <NE...
Graphic definition from a .dat file.
62598ef5bf627c535bcafcdf
class ErrorExpression(Expression): <NEW_LINE> <INDENT> init_arg_names = ("message",) <NEW_LINE> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> def __getinitargs__(self): <NEW_LINE> <INDENT> return (self.message,) <NEW_LINE> <DEDENT> mapper_method = intern("map_error_expressi...
An expression that, if evaluated, causes an error with the supplied *message*. .. automethod:: __init__
62598ef5e1aae11d1e7cdc78
class UserCase(PersonCase, MailInstalled): <NEW_LINE> <INDENT> model = "res.users" <NEW_LINE> context = {"default_login": "user@example.com"} <NEW_LINE> def tearDown(self): <NEW_LINE> <INDENT> if not self.mail_installed(): <NEW_LINE> <INDENT> super(UserCase, self).tearDown()
Test ``res.users``.
62598ef567a9b606de54483e
class Po2Accumulator(FixedPointAccumulator): <NEW_LINE> <INDENT> def __init__( self, kernel_shape, multiplier: multiplier_impl.IMultiplier, use_bias=True ): <NEW_LINE> <INDENT> super().__init__(kernel_shape, multiplier, use_bias) <NEW_LINE> assert multiplier.output.is_po2 <NEW_LINE> (bits_from_po2multiplier, int_bits_f...
accumulator for po2.
62598ef57d847024c075ac3d
class Sin: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def evaluation_at(sub_expr1, val_dict): <NEW_LINE> <INDENT> return np.sin(sub_expr1.evaluation_at(val_dict)) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def derivative_at(sub_expr1, var, val_dict, order=1): <NEW_LINE> <INDENT> if order == 1: <NEW_LINE> <INDENT>...
This is a class to wrap up static method related to sin operation
62598ef52c8b7c6e89bd2033
class CSVReplicataPluginAbstract(object): <NEW_LINE> <INDENT> def __init__(self, replicator, context): <NEW_LINE> <INDENT> self.replicator = replicator <NEW_LINE> self.context = context <NEW_LINE> if not getattr(self, 'prefix', False): <NEW_LINE> <INDENT> self.prefix = 'ReplicataPlugin_%s_%s_' % ( self.__module__.repla...
.
62598ef571ff763f4b5e5fcf
class LR_Updater(Callback): <NEW_LINE> <INDENT> def __init__(self, init_lrs): <NEW_LINE> <INDENT> self.init_lrs = init_lrs <NEW_LINE> <DEDENT> def on_train_begin(self, logs=None): <NEW_LINE> <INDENT> self.update_lr() <NEW_LINE> <DEDENT> def on_batch_end(self, batch, logs=None): <NEW_LINE> <INDENT> self.update_lr() <NEW...
Abstract class where all Learning Rate updaters inherit from. (e.g., CircularLR) Calculates and updates new learning rate and momentum at the end of each batch. Have to be extended.
62598ef501c39578d7f11612
class CurrencyMod(loader.Module): <NEW_LINE> <INDENT> strings = {'name': 'CurrencyConverter'} <NEW_LINE> async def currcmd(self, message): <NEW_LINE> <INDENT> state = utils.get_args_raw(message) <NEW_LINE> await message.edit("<b>Получаем информацию...</b>") <NEW_LINE> chat = '@exchange_rates_vsk_bot' <NEW_LINE> async w...
CurrencyConverter
62598ef555399d3f05624d95
@endpoints.api(name='helloworldendpoints', version='v1') <NEW_LINE> class HelloWorldApi(remote.Service): <NEW_LINE> <INDENT> @endpoints.method(message_types.VoidMessage, Hello, path = "sayHello", http_method='GET', name = "sayHello") <NEW_LINE> def say_hello(self, request): <NEW_LINE> <INDENT> return Hello(message="Hel...
Helloworld API v1.
62598ef54f6381625f1988f4
class ExpressionDictOperationPop3(ExpressionChildrenHavingBase): <NEW_LINE> <INDENT> kind = "EXPRESSION_DICT_OPERATION_POP3" <NEW_LINE> named_children = ("dict_arg", "key", "default") <NEW_LINE> __slots__ = ("known_hashable_key",) <NEW_LINE> def __init__(self, dict_arg, key, default, source_ref): <NEW_LINE> <INDENT> as...
This operation represents d.pop(key, default).
62598ef521bff66bcd7214c6
class TestIssue2492(TestCase, WagtailTestUtils): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.root_page = Page.objects.get(id=2) <NEW_LINE> child_page = SingleEventPage( title="Test Event", slug="test-event", location="test location", cost="10", date_from=datetime.datetime.now(), audience=EVENT_AUDIENC...
The publication submission message generation was performed using the Page class, as opposed to the specific_class for that Page. This test ensures that the specific_class url method is called when the 'view live' message button is created.
62598ef5be7bc26dc925129a
class FunctionTester: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__error_count = self.__total_count = 0 <NEW_LINE> print("+---------------------------------------") <NEW_LINE> print("| Testing ") <NEW_LINE> print("+---------------------------------------") <NEW_LINE> <DEDE...
Provides support for testing simple Python functions.
62598ef591f36d47f22302dc
class OODictField(ObjectField): <NEW_LINE> <INDENT> front_types, back_types = [obj_type], [dict]
Field subtype that is stored as a dict in the backend and handled as an OODict in the frontend.
62598ef516aa5153ce3fed72
class DescribeDatabasesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.Items = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.get("TotalCount") <NEW_LINE> s...
DescribeDatabases返回参数结构体
62598ef532920d7e50bc489d
class NeedleOpera(NeedleWebDriverMixin, Opera): <NEW_LINE> <INDENT> pass
The same as Selenium's Opera WebDriver, but with NeedleWebDriverMixin's functionality.
62598ef560cbc95b06362ba6
class OpenBSDHardware(Hardware): <NEW_LINE> <INDENT> platform = 'OpenBSD' <NEW_LINE> def populate(self): <NEW_LINE> <INDENT> self.sysctl = self.get_sysctl() <NEW_LINE> self.get_memory_facts() <NEW_LINE> self.get_processor_facts() <NEW_LINE> self.get_device_facts() <NEW_LINE> self.get_mount_facts() <NEW_LINE> return sel...
OpenBSD-specific subclass of Hardware. Defines memory, CPU and device facts: - memfree_mb - memtotal_mb - swapfree_mb - swaptotal_mb - processor (a list) - processor_cores - processor_count - processor_speed - devices
62598ef557b8e32f5250753c
class Display(JSONStruct): <NEW_LINE> <INDENT> keys: str <NEW_LINE> letters: str <NEW_LINE> pages_by_ref: DisplayPageDict <NEW_LINE> default_page: DisplayPage
Contains a translation and graphical data for its entire analysis.
62598ef57d43ff2487426833
class Seasons(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Season_1 = 0 <NEW_LINE> Season_2 = 1 <NEW_LINE> Season_3 = 2 <NEW_LINE> Season_4 = 3
As passed to :func:`~ekmmeters.Meter.assignSeasonSchedule`. V3 and V4 Omnimeters. assign* methods use a zero based index for seasons. You may set a season using one of these constants or fill and iterate over range(Extents.Seaons). ======== = Season_1 0 Season_2 1 Season_3 2 Season_4 3 ======== =
62598ef53539df3088ecab1d
class UpdateCostPriceShowMove(ModelView): <NEW_LINE> <INDENT> __name__ = 'product.update_cost_price.show_move' <NEW_LINE> price_difference = fields.Numeric('Price Difference', readonly=True, digits=(16, 4)) <NEW_LINE> amount = fields.Numeric('Amount', readonly=True, digits=(16, Eval('currency_digits', 2)), depends=['cu...
Update Cost Price Show Move
62598ef5a05bb46b384890e3
class SharedSegment: <NEW_LINE> <INDENT> def __init__(self, param_list): <NEW_LINE> <INDENT> assert type(param_list) == list <NEW_LINE> assert len(param_list) == 15 <NEW_LINE> self.indivID1 = param_list[1] <NEW_LINE> self.indivID2 = param_list[3] <NEW_LINE> self.chrom = int(param_list[4]) <NEW_LINE> self.bpStart = int(...
Structure that stores named values for a matchfile line, see "Output" from http://www1.cs.columbia.edu/~gusev/germline/ Parameters ---------- param_list : list[str] list of strings in the order of a germline matchfile. Notes ----- SharedSegments are ordered by the length parameter.
62598ef5dc8b845886d51e36
class StringPathSet(set): <NEW_LINE> <INDENT> def iterStartsWith(self, startseq): <NEW_LINE> <INDENT> for sp in self: <NEW_LINE> <INDENT> if seqStartsWith(sp, startseq): <NEW_LINE> <INDENT> yield sp <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def listStartsWith(self, startseq): <NEW_LINE> <INDENT> return list(self.iterStarts...
A string path is a tuple of (uni-)strings. A StringPathSet is a set of those pathes with basic set functionality and a function to find all pathes in set which start with a given tuple of strings.
62598ef5cc0a2c1114479872
class CrawlMode: <NEW_LINE> <INDENT> SIMPLE = 0 <NEW_LINE> STORAGE = 1
Crawler work mode: SIMPLE - just crawl but does not store pages. STORAGE - crawl and storage page content.
62598ef5283ffb24f3cf2119
class RoleForm(FlaskForm): <NEW_LINE> <INDENT> name = StringField('name', validators=[DataRequired()]) <NEW_LINE> description = StringField('description', validators=[DataRequired()]) <NEW_LINE> submit = SubmitField('save')
Form for admin to add or edit a role
62598ef55fdd1c0f98e5c814
class ParameterError(Error): <NEW_LINE> <INDENT> def __init__(self, parameter, message): <NEW_LINE> <INDENT> self.parameter = parameter <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> msg = "" <NEW_LINE> if self.parameter is not None: <NEW_LINE> <INDENT> msg += "Parameter {0...
Exception for parameter errors. Attributes: name -- name of the parameter message -- explanation message of the error
62598ef5956e5f7376df4ab1
class Problem: <NEW_LINE> <INDENT> def __init__(self, u, p, cost): <NEW_LINE> <INDENT> self.__u = u <NEW_LINE> self.__p = p <NEW_LINE> self.__cost = cost <NEW_LINE> self.__u_constraints = NoConstraints() <NEW_LINE> self.__alm_mapping_f1 = None <NEW_LINE> self.__alm_set_c = None <NEW_LINE> self.__alm_set_y = None <NEW_L...
Definition of an optimization problem Provides the cost function, constraints and additional ALM/penalty-type constraints.
62598ef591f36d47f22302dd
class InlineResponse20010Metrics(object): <NEW_LINE> <INDENT> swagger_types = { 'content': 'InlineResponse20010MetricsContent', 'scans': 'InlineResponse20010MetricsScans', 'findings': 'InlineResponse2003DetailsFindings', 'history': 'InlineResponse20010MetricsHistory' } <NEW_LINE> attribute_map = { 'content': 'content',...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ef58da39b475be01a21
class ConvBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, c_in, c_out, k_size = 3, k_pad = 1): <NEW_LINE> <INDENT> super(ConvBlock, self).__init__() <NEW_LINE> self.block = nn.Sequential( nn.Conv2d(c_in, c_out, kernel_size = k_size, padding = k_pad, stride = 1), nn.GroupNorm(8, c_out), nn.ReLU(inplace=True), n...
A convolution block
62598ef5a8370b77170eec56
class Summary: <NEW_LINE> <INDENT> data = {} <NEW_LINE> def addDataPoint(self, quantum: int, dispatch: int, average: float) -> None: <NEW_LINE> <INDENT> if quantum in self.data.keys(): <NEW_LINE> <INDENT> self.data[quantum][dispatch] = average <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.data[quantum] = {dispatch...
A simple object to store summary data from the test runs of rrsim. Stores the average time for each scenario run of a quantum and dispatch setting. Used for average wait time or average turnaround time of a process.
62598ef54f6381625f1988f5
class UpsilonTurns(object): <NEW_LINE> <INDENT> def __init__(self, upsilon_frames, midbody_distance, fps): <NEW_LINE> <INDENT> self.value = getTurnEventsFromSignedFrames(upsilon_frames, midbody_distance, fps) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def create(upsilon_frames, midbody_distance, fps): <NEW_LINE> <IND...
Represents the Omega turn events Notes --------------------------------------- Formerly this was not implemented as a class.
62598ef563b5f9789fe839d0
class Page(Base): <NEW_LINE> <INDENT> __tablename__ = 'pages' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(255), nullable=False, unique=True) <NEW_LINE> title = Column(Text) <NEW_LINE> subtitle = Column(Text) <NEW_LINE> data = Column(Text, nullable=False) <NEW_LINE> creator_id = Col...
The SQLAlchemy declarative model class for a Page object.
62598ef54a966d76dd5ed74c
class ByteRangeReader(object): <NEW_LINE> <INDENT> def __init__(self, client, bundle_uuid, timeout=60, max_num_chunks=100, chunk_size=None): <NEW_LINE> <INDENT> if chunk_size is None: <NEW_LINE> <INDENT> chunk_size = 1 * 1000 * 1000 <NEW_LINE> <DEDENT> self.chunk_size = chunk_size <NEW_LINE> self.max_num_chunks = max_n...
Manages Byte Ranges for BundleFuse and operates like a cache, fetching via the client to refresh or obtain new byte ranges through the REST api whenever it needs to. One reader for one bundle at a time (same as BundleFuse)
62598ef567a9b606de544842
class _const: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def __repr__(self) -> str: <NEW_LINE> <INDENT> return '[' + self.name + ']' <NEW_LINE> <DEDENT> def __bytes__(self): <NEW_LINE> <INDENT> return ('[' + self.name + ']').encode("ascii")
@ivar name: A string naming this constant
62598ef5be383301e025204f
class ThemeStyle(object): <NEW_LINE> <INDENT> def __init__(self, fg, bg, renderer, ansi_reset): <NEW_LINE> <INDENT> self.fg = fg <NEW_LINE> self.bg = bg <NEW_LINE> self._renderer = renderer <NEW_LINE> self._ansi_reset = ansi_reset <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'Style(fg={}, bg={})'....
Style holds foreground and background colors for a single style in a palette. style = Style(fg=Color(), bg=Color()) style("text")
62598ef54428ac0f6e656dc0
class Role(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'roles' <NEW_LINE> id = db.Column( 'id', db.Integer, primary_key=True) <NEW_LINE> name = db.Column( 'name', db.String(32), unique=True, nullable=False) <NEW_LINE> is_admin_role = db.Column( 'is_admin_role', db.Boolean, nullable=False) <NEW_LINE> priority = db.Co...
Model for Role
62598ef5adb09d7d5dc08e32
class BaseOverpassAPI(CustomOverpass): <NEW_LINE> <INDENT> _query = None <NEW_LINE> def fetch(self): <NEW_LINE> <INDENT> return self.query(self._query) <NEW_LINE> <DEDENT> def fetch_from_json_backup(self): <NEW_LINE> <INDENT> backup = self._fetch_from_backup(self.json_path) <NEW_LINE> return overpy.Result.from_json(dat...
Abstract class for Overpass API communication
62598ef51f5feb6acb1614c6
class PlayersError(ValueError): <NEW_LINE> <INDENT> pass
Exception raised for invalid :class:`Players` objects.
62598ef516aa5153ce3fed74
class MedicalOperation(ModelSQL, ModelView): <NEW_LINE> <INDENT> __name__ = 'gnuhealth.operation' <NEW_LINE> name = fields.Many2One('gnuhealth.surgery', 'Surgery') <NEW_LINE> procedure = fields.Many2One( 'gnuhealth.procedure', 'Code', required=True, select=True, help="Procedure Code, for example ICD-10-PCS Code 7-chara...
Operation - Surgical Procedures
62598ef54a966d76dd5ed74d
class _binarywrap(object): <NEW_LINE> <INDENT> def __init__ (self, f, fx=None, fy=None, inp=False): <NEW_LINE> <INDENT> self.f = f <NEW_LINE> self.fx = fx <NEW_LINE> self.fy = fy <NEW_LINE> self.inp = inp <NEW_LINE> self.obj = None <NEW_LINE> <DEDENT> def __get__(self, obj, objtype=None): <NEW_LINE> <INDENT> self.o...
Wrapper class for two-argument maths functions (add, mul, div, etc) of the form z = f(x, y). When called, returns a new Dvect object with the result of the specified operation applied to the two inputs. The errors are usually combined assuming that the errors of the two inputs are independent except for the special c...
62598ef5d268445f26638fc9
class Knob: <NEW_LINE> <INDENT> def set_knob(self, value): <NEW_LINE> <INDENT> pass
---- Taken from the Matplotlib gallery Knob - simple class with a "setKnob" method. A Knob instance is attached to a Param instance, e.g., param.attach(knob) Base class is for documentation purposes.
62598ef54527f215b58e8773
class IlluminaBasecallsToSamSheet(AnnotationSheet): <NEW_LINE> <INDENT> _file_type = 'excel-tab' <NEW_LINE> _header_line = True <NEW_LINE> _field_names = [ 'OUTPUT', 'SAMPLE_ALIAS', 'LIBRARY_NAME', 'BARCODE_1', 'BARCODE_2', ] <NEW_LINE> _test_methods: Dict[str, List[Callable[[int, Dict[str, str], str], str]]] = dict() ...
The C{bsf.analyses.picard.IlluminaBasecallsToSamSheet} class represents a Tab-Separated Value (TSV) table of library information for the C{bsf.analyses.picard.ExtractIlluminaBarcodes} C{bsf.analysis.Analysis}.
62598ef57d43ff2487426834
class SMB2CreateAppInstanceId(Structure): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.fields = OrderedDict([ ('structure_size', IntField( size=2, default=20 )), ('reserved', IntField(size=2)), ('app_instance_id', BytesField(size=16)) ]) <NEW_LINE> super(SMB2CreateAppInstanceId, self).__init__()
[MS-SMB2] 2.2.13.2.13 SMB2_CREATE_APP_INSTANCE_ID Used by the client when supplying an identifier provided by an application. Valid for the SMB 3.x family and should also have an durable handle on the create request.
62598ef521bff66bcd7214ca
class WgetHTTPRequestHandler (BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def get_rule_list (self, name): <NEW_LINE> <INDENT> r_list = self.rules.get (name) if name in self.rules else None <NEW_LINE> return r_list
Define methods for handling Test Checks.
62598ef55fcc89381b265562
class Online(HttpRunner): <NEW_LINE> <INDENT> config = ( Config("模拟设备上线") .variables(**{ "cid": None, "sku": None, "server_url": None }) ) <NEW_LINE> teststeps = [ Step( RunRequest("${getattr($api, name)}") .with_variables(**{"api": "${get_api_from_orm_by_name(online)}"}) .setup_hook("${online($request, $sku, $server_u...
Call api 'online' to connect device to MQTT. Config Variables: - cid (str): required - sku (Sku): required - server_url (str): required
62598ef58a349b6b43684ab4
class MultiParamSequential(Sequential): <NEW_LINE> <INDENT> def forward(self, *inputs): <NEW_LINE> <INDENT> for module in self._modules.values(): <NEW_LINE> <INDENT> if type(inputs) == tuple: <NEW_LINE> <INDENT> inputs = module(*inputs) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> inputs = module(inputs) <NEW_LINE> <D...
Sequential variant accepting multiple arguments.
62598ef54527f215b58e8774
class SectionizerLight: <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.data = open(filename, 'rb').read() <NEW_LINE> if self.data[:3] == b'TPZ': <NEW_LINE> <INDENT> self.ident = 'TPZ' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.palmheader = self.data[:78] <NEW_LINE> self.ident = self....
Stolen from Mobi_Unpack and slightly modified.
62598ef566656f66f7d58c58
class RNN(RNNBase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if 'nonlinearity' in kwargs: <NEW_LINE> <INDENT> if kwargs['nonlinearity'] == 'tanh': <NEW_LINE> <INDENT> mode = 'RNN_TANH' <NEW_LINE> <DEDENT> elif kwargs['nonlinearity'] == 'relu': <NEW_LINE> <INDENT> mode = 'RNN_RELU' <N...
Applies a multi-layer Elman RNN with tanh or ReLU non-linearity to an input sequence. For each element in the input sequence, each layer computes the following function: .. math:: h_t = \tanh(w_{ih} * x_t + b_{ih} + w_{hh} * h_{(t-1)} + b_{hh}) where :math:`h_t` is the hidden state at time `t`, and :math:`x_...
62598ef591f36d47f22302de
class ReplaygainLimiter(ElementBin): <NEW_LINE> <INDENT> index = 80 <NEW_LINE> name = "rglimiter" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> ElementBin.__init__(self, name=self.name) <NEW_LINE> self.rglimit = Gst.ElementFactory.make("rglimiter", None) <NEW_LINE> self.elements[50] = self.rglimit <NEW_LINE> self....
Implements clipping protection. Placed at 80 in the pipeline so that other elements can come before it if necessary.
62598ef571ff763f4b5e5fd3
class ToDoItem (object): <NEW_LINE> <INDENT> def __init__ (self, name, date): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._date = date <NEW_LINE> if as_datetime(date) == None: <NEW_LINE> <INDENT> raise ToDoError ('Invalid date: '+"'{}'".format(date)) <NEW_LINE> <DEDENT> else : True <NEW_LINE> <DEDENT> def get...
ToDoItem class that takes two strings a task and a date to create a ToDoItem object
62598ef5bf627c535bcafce5
class Moffat2D(Fittable2DModel): <NEW_LINE> <INDENT> amplitude = Parameter(default=1) <NEW_LINE> x_0 = Parameter(default=0) <NEW_LINE> y_0 = Parameter(default=0) <NEW_LINE> gamma = Parameter(default=1) <NEW_LINE> alpha = Parameter(default=1) <NEW_LINE> @property <NEW_LINE> def fwhm(self): <NEW_LINE> <INDENT> return 2.0...
Two dimensional Moffat model. Parameters ---------- amplitude : float Amplitude of the model. x_0 : float x position of the maximum of the Moffat model. y_0 : float y position of the maximum of the Moffat model. gamma : float Core width of the Moffat model. alpha : float Power index of the Moffat m...
62598ef556ac1b37e6300a61
class EdFloat(EdText): <NEW_LINE> <INDENT> def __init__(self, minval, maxval, **kwargs): <NEW_LINE> <INDENT> self.minval=-sys.float_info.max if minval is None else float(minval) <NEW_LINE> self.maxval=sys.float_info.max if maxval is None else float(maxval) <NEW_LINE> super().__init__(**kwargs) <NEW_LINE> <DEDENT> def c...
EdText specialised for floating point numbers
62598ef5e1aae11d1e7cdc7b
class MessageType(Enum): <NEW_LINE> <INDENT> PASS = 0 <NEW_LINE> REQUEST = 1 <NEW_LINE> RECEIVED = 2
Type of message passed between processes. PASS: Just passing token forward. REQUEST: Requesting to enter critical region. RECEIVED: Received access to critical region.
62598ef5ff9c53063f518ed6
class ToTensor(object): <NEW_LINE> <INDENT> def __call__(self, sample): <NEW_LINE> <INDENT> image, label = sample['image'], sample['label'] <NEW_LINE> tensorimage = torch.from_numpy(image) <NEW_LINE> tensorimage = tensorimage.type(torch.FloatTensor) <NEW_LINE> return tensorimage
Convert ndarrays in sample to Tensors.
62598ef57047854f4633dc3c
class TestBaseAnalysis(TestCase): <NEW_LINE> <INDENT> TEST_OUTPUT_FOLDER_PATH = 'output/test_analysis' <NEW_LINE> TEST_LOG_FILE_PATH = 'logs/log.txt' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> if os.path.exists(self.TEST_OUTPUT_FOLDER_PATH): <NEW_LIN...
Unit test for analysis
62598ef544b2445a339b5da7
class SearchCopyAsNewSelector(TeamMemberOrHigherMixin, FormView): <NEW_LINE> <INDENT> template_name = "lit/search_copy_selector.html" <NEW_LINE> form_class = forms.SearchSelectorForm <NEW_LINE> def get_assessment(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return get_object_or_404(Assessment, pk=self.kwargs.ge...
Select an existing search and copy-as-new
62598ef567a9b606de544843
class WildcardMatch(BessModule): <NEW_LINE> <INDENT> def __init__( self, fields: List[Field] = ..., name: str = ... ): <NEW_LINE> <INDENT> ... <NEW_LINE> <DEDENT> def get_initial_arg( self ): <NEW_LINE> <INDENT> ... <NEW_LINE> <DEDENT> def get_runtime_config( self ) -> WildcardMatchConfig: <NEW_LINE> <INDENT> ... <NEW_...
Multi-field classifier with a wildcard match table The WildcardMatch module matches over multiple fields in a packet and pushes packets that do match out a specified gate, and those that don't out a default gate. WildcardMatch is initialized with the fields it should inspect over, rules are added via the `add(...)` fu...
62598ef5796e427e5384d00e
class serial: <NEW_LINE> <INDENT> def write(self, s): <NEW_LINE> <INDENT> print(s) <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> return 1
Here we make a class which emulates the serial port virtually
62598ef5097d151d1a2bf896
class KazooRetry(object): <NEW_LINE> <INDENT> RETRY_EXCEPTIONS = ( ConnectionLoss, OperationTimeoutError, ForceRetryError ) <NEW_LINE> EXPIRED_EXCEPTIONS = ( SessionExpiredError, ) <NEW_LINE> def __init__(self, max_tries=1, delay=0.1, backoff=2, max_jitter=0.8, max_delay=3600, ignore_expire=True, sleep_func=time.sleep)...
Helper for retrying a method in the face of retry-able exceptions
62598ef5283ffb24f3cf211d
class RemoteOrganization(models.Model): <NEW_LINE> <INDENT> pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True) <NEW_LINE> modified_date = models.DateTimeField(_('Modified date'), auto_now=True) <NEW_LINE> users = models.ManyToManyField(User, verbose_name=_('Users'), related_name='oauth_organizati...
Organization from remote service This encapsulates both Github and Bitbucket
62598ef53d592f4c4edb9761
class MAVLink_servo_output_raw_message(MAVLink_message): <NEW_LINE> <INDENT> def __init__(self, time_usec, port, servo1_raw, servo2_raw, servo3_raw, servo4_raw, servo5_raw, servo6_raw, servo7_raw, servo8_raw): <NEW_LINE> <INDENT> MAVLink_message.__init__(self, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, 'SERVO_OUTPUT_RAW') <NEW_L...
The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.
62598ef5fff4ab517ebcc04c
class TestSayHello(unittest.TestCase): <NEW_LINE> <INDENT> def test_say_hello(self): <NEW_LINE> <INDENT> self.assertEqual(say_hello('Mr. Spock'), 'Hello, Mr. Spock') <NEW_LINE> self.assertEqual(say_hello('Captain Kirk'), 'Hello, Captain Kirk') <NEW_LINE> self.assertEqual(say_hello('Liutenant Uhura'), 'Hello, Liutenant ...
Class to test 'say_hello' function
62598ef54527f215b58e8775
class Drag: <NEW_LINE> <INDENT> def __init__(self, drag=0): <NEW_LINE> <INDENT> self._validate(drag) <NEW_LINE> self.entry = self._formatTLE() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Drag <{}>'.format(self.entry) <NEW_LINE> <DEDENT> def _validate(self, drag): <NEW_LINE> <INDENT> assert isinst...
B-star drag term
62598ef5a219f33f346c50a5
class CandidateMaskingTestCase(lsst.utils.tests.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.catalog = makeEmptyCatalog() <NEW_LINE> self.x, self.y = 123, 45 <NEW_LINE> self.exposure = afwImage.ExposureF(256, 256) <NEW_LINE> self.exposure.variance.set(0.01) <NEW_LINE> <DEDENT> def tearDown(s...
Testing masking around PSF candidates.
62598ef55fdd1c0f98e5c818
class Email(metaclass=Singleton): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._timeout = False <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> raise TypeError("Can't instantiate directly") <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def ...
base class for emails it is a singleton by design.
62598ef5bf627c535bcafce6
class MockTimelineLog: <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.timestamp = datetime.strptime(kwargs.pop('timestamp')[0:-6], '%Y-%m-%dT%H:%M:%S.%f') <NEW_LINE> for key, value in kwargs.items(): <NEW_LINE> <INDENT> setattr(self, key, value) <NEW_LINE> <DEDENT> <DEDENT> def get_message(s...
The template used for the Childminder audit log, application_action.txt, usually requires a TimelineLog object. This has a method get_message() that returns the message to be rendered. Given that the Nanny Gateway returns dict objects, we need to create from this an object with the properties of the TimelineLog object....
62598ef5442bda511e95acd9
class Boolean(Literal): <NEW_LINE> <INDENT> type_hint = TypeHint.Boolean <NEW_LINE> def _render(self): <NEW_LINE> <INDENT> return 'true' if self.value else 'false'
Boolean literal.
62598ef5f548e778e5969e02
class TestRefactoredMDSLocal(MDSAcqTestCase): <NEW_LINE> <INDENT> def test_local_access(self): <NEW_LINE> <INDENT> shot = -1 <NEW_LINE> debug_(pyfusion.DEBUG, level=3, key='local_access',msg='enter test_local_access') <NEW_LINE> tree_path = os.path.join(TEST_DATA_PATH, 'test_tree') <NEW_LINE> from pyfusion.acquisition....
Test local data access with the refactored MDS interface. The refactored MDSplus package uses the same acquisition and fetcher classes for the different MDSplus access modes (local, thin client and thick client). The local data access test is in a separate class so we can flag it with net=False, with the other ...
62598ef5a17c0f6771d5aacb
class ConfigurationMissing(Exception): <NEW_LINE> <INDENT> pass
Warn the user that an optional configuration is missing.
62598ef51b99ca400228e949
class IdVgCurves(HemtCurves): <NEW_LINE> <INDENT> def __init__(self, metadata: Dict[str, Any], table: Dict[str, Any]): <NEW_LINE> <INDENT> super(IdVgCurves, self).__init__(metadata, table, "Drain") <NEW_LINE> <DEDENT> def get_id_mA(self, curve_num: int): <NEW_LINE> <INDENT> return self.get_array(curve_num, "DrainI", mu...
Class containing the data read from a HEMT Id/Vd test file. This class is used only to produce a few plots to include in the report. It is not used for the tuning itself, as this is the duty of :class:`IdVdCurves`.
62598ef5379a373c97d9786d
class NullSerial(TkBaseSerial): <NEW_LINE> <INDENT> def __init__ (self): <NEW_LINE> <INDENT> TkBaseSerial.__init__(self, portName = "None", state = self.Closed, ) <NEW_LINE> self._reason = "This is an instance of NullSerial" <NEW_LINE> <DEDENT> def read(self, *args, **kargs): <NEW_LINE> <INDENT> raise RuntimeError("Can...
Null connection. Forbids read, write and setting a new state callback. Close is OK and the state is always Closed.
62598ef5ec188e330fdf711e
class MSE: <NEW_LINE> <INDENT> def compute_loss(self, y, y_hat): <NEW_LINE> <INDENT> return 0.5 * np.power((y - y_hat), 2) <NEW_LINE> <DEDENT> def find_gradient(self, y, y_hat): <NEW_LINE> <INDENT> return -(y - y_hat) <NEW_LINE> <DEDENT> def get_acc_score(self, y, y_hat): <NEW_LINE> <INDENT> return 0
Computes loss as a sum of squared distances between the target variable and the predicted values
62598ef5377c676e912f619d
class HttpSensor(BaseSensorOperator): <NEW_LINE> <INDENT> template_fields = ('endpoint', 'request_params') <NEW_LINE> @apply_defaults <NEW_LINE> def __init__(self, endpoint, http_conn_id='http_default', method='GET', request_params=None, headers=None, response_check=None, extra_options=None, *args, **kwargs): <NEW_LINE...
Executes a HTTP get statement and returns False on failure: 404 not found or response_check function returned False :param http_conn_id: The connection to run the sensor against :type http_conn_id: string :param method: The HTTP request method to use :type method: string :param endpoint: The relative part of the f...
62598ef599cbb53fe682f725
class loggraph_output (xtriage_output) : <NEW_LINE> <INDENT> gui_output = True <NEW_LINE> def __init__ (self, out) : <NEW_LINE> <INDENT> assert hasattr(out, "write") and hasattr(out, "flush") <NEW_LINE> self.out = out <NEW_LINE> <DEDENT> def show_header (self, text) : pass <NEW_LINE> def show_sub_header (self, title) :...
Output class for displaying 'loggraph' format (from ccp4i) as plain text.
62598ef567a9b606de544845
@attrs_event <NEW_LINE> class PollVoted(ThreadEvent): <NEW_LINE> <INDENT> poll = attr.ib(type="_models.Poll") <NEW_LINE> added_ids = attr.ib(type=Sequence[str]) <NEW_LINE> removed_ids = attr.ib(type=Sequence[str]) <NEW_LINE> at = attr.ib(type=datetime.datetime) <NEW_LINE> @classmethod <NEW_LINE> def _parse(cls, session...
Somebody voted in a group poll.
62598ef54428ac0f6e656dc5
class ConstantFloat(Node): <NEW_LINE> <INDENT> def __init__(self, floatval, index): <NEW_LINE> <INDENT> self.floatval = floatval <NEW_LINE> self.index = index <NEW_LINE> <DEDENT> def compile(self, ctx): <NEW_LINE> <INDENT> ctx.emit('LOAD_CONSTANT', self.index) <NEW_LINE> <DEDENT> def str(self): <NEW_LINE> <INDENT> retu...
Represent a constant
62598ef5fff4ab517ebcc04e
class NearlyReadOnlyAdmin(django_admin.ModelAdmin): <NEW_LINE> <INDENT> def get_readonly_fields(self, request, obj=None): <NEW_LINE> <INDENT> if request.user.is_superuser: <NEW_LINE> <INDENT> return self.readonly_fields <NEW_LINE> <DEDENT> if self.declared_fieldsets: <NEW_LINE> <INDENT> fields = flatten_fieldsets(self....
borrowed from https://code.djangoproject.com/ticket/17295 with enhancements from http://stackoverflow.com/a/12923739/654755
62598ef576e4537e8c3ede2e
class Merger(ReportContainer, parser.ToJunitXmlBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Merger, self).__init__() <NEW_LINE> self.suites = [] <NEW_LINE> <DEDENT> def add_report(self, filename): <NEW_LINE> <INDENT> if os.path.isfile(filename): <NEW_LINE> <INDENT> report = parser.Junit(file...
Utility class to create a merged junix xml report
62598ef5bf627c535bcafce8
class TutorSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> author = MyUserInfoSerializer() <NEW_LINE> certification = CertificationSerializer(many=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Tutor <NEW_LINE> fields = ( 'pk', 'cert_type', 'school', 'major', 'status_type', 'author', 'certificati...
튜터 정보 조회, 수정, 삭제
62598ef55fc7496912d476ae
class MLP(chainer.Chain): <NEW_LINE> <INDENT> def __init__(self, hidden_dim, out_dim, n_layers=2, activation=relu): <NEW_LINE> <INDENT> super(MLP, self).__init__() <NEW_LINE> if n_layers <= 0: <NEW_LINE> <INDENT> raise ValueError('n_layers must be positive integer, but set {}' .format(n_layers)) <NEW_LINE> <DEDENT> lay...
Basic implementation for MLP Args: hidden_dim (int): dimension of feature vector associated to each atom out_dim (int): dimension of output feature vector n_layers (int): number of layers activation (chainer.functions): activation function
62598ef5283ffb24f3cf2120
class TestLoggingSetup(utils.TestCase): <NEW_LINE> <INDENT> def test_logging_default_info(self): <NEW_LINE> <INDENT> config = {} <NEW_LINE> with mock.patch.dict(config, {'logconfig': None}): <NEW_LINE> <INDENT> logging.init_logging(config) <NEW_LINE> self.assertEqual(stdlib_logging.getLogger().level, stdlib_logging.INF...
Logging Setup tests.
62598ef5009cb60464cffdc8
class MongoEngine(object): <NEW_LINE> <INDENT> def __init__(self, conn_write, conn_read, tracker=None): <NEW_LINE> <INDENT> self._conn_write = conn_write <NEW_LINE> self._conn_read = conn_read <NEW_LINE> self._tracker = tracker <NEW_LINE> <DEDENT> def save(self, db_name, table_name, data): <NEW_LINE> <INDENT> return se...
mongodb operation
62598ef526068e7796d4b1d3
class ProfileForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.Profile <NEW_LINE> fields = ('dark_mode',)
Form for eidting a profile.
62598ef54f6381625f1988f8
class NodeEnricher(UtteranceProcessor): <NEW_LINE> <INDENT> def load(self): <NEW_LINE> <INDENT> self.target_nodes = self.config.get('target_nodes', '//') <NEW_LINE> self.input_attribute = self.config.get('input_attribute', 'text') <NEW_LINE> self.output_attribute = self.config.get('output_attribute', 'some_attribute') ...
Refines UtteranceProcessor to enrich the target nodes of the utterance to which it is applied by taking the target node's input_attribute, performing some enriching_function on it, and writing the result to the target node's output_attribute. The enriching_function should be provided to subclasses.
62598ef5d486a94d0ba2a840
class TestConnector(Bcfg2TestCase): <NEW_LINE> <INDENT> def test_get_additional_groups(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_additional_data(self): <NEW_LINE> <INDENT> pass
placeholder
62598ef560cbc95b06362bae
class TranslateSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Translate <NEW_LINE> fields = ("id", "name")
翻译list用此Serializer
62598ef5ec188e330fdf7120
class Driver(InstrumentDriver.InstrumentWorker): <NEW_LINE> <INDENT> def performSetValue(self, quant, value, sweepRate=0.0, options={}): <NEW_LINE> <INDENT> if quant.name == 'Set value': <NEW_LINE> <INDENT> newValue = self.getValueFromUserDialog(value, title='User input - Set value') <NEW_LINE> return newValue <NEW_LIN...
This class implements a user input driver
62598ef51f5feb6acb1614cb
class Plan(api_types.Base): <NEW_LINE> <INDENT> artifacts = [Artifact] <NEW_LINE> services = [ServiceReference] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> if 'artifacts' in kwargs: <NEW_LINE> <INDENT> kwargs['artifacts'] = [Artifact(**art) for art in kwargs.get('artifacts', [])] <NEW_LINE> <DEDENT> if...
Representation of an Plan file. The Plan resource is a representation of a Plan file. Plans are used to create Assembly resources. A Plan resource may be used to create an arbitrary number of Assembly instances. They use artifacts and services to indicate what will be used to generate the plan, and what services Solum...
62598ef5bd1bec0571e14507
class SequenceLikelihood(object): <NEW_LINE> <INDENT> NEGATIVE = 0 <NEW_LINE> UNLIKELY = 1 <NEW_LINE> LIKELY = 2 <NEW_LINE> POSITIVE = 3 <NEW_LINE> @classmethod <NEW_LINE> def get_num_categories(cls): <NEW_LINE> <INDENT> return 4
This enum represents the likelihood of a character following the previous one.
62598ef501c39578d7f1161c
class AlterField(Operation): <NEW_LINE> <INDENT> def __init__(self, model_name, name, field, preserve_default=True): <NEW_LINE> <INDENT> self.model_name = model_name <NEW_LINE> self.name = name <NEW_LINE> self.field = field <NEW_LINE> self.preserve_default = preserve_default <NEW_LINE> <DEDENT> def state_forwards(self,...
Alters a field's database column (e.g. null, max_length) to the provided new field
62598ef5ff9c53063f518eda
class CalendarWeeklyDetailedView(DisplayEventsMixin, DailyMixin, AjaxRequiredMixin, TemplateView): <NEW_LINE> <INDENT> template_name = 'calendars/large_week.html' <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> year = int(kwargs['year']) <NEW_LINE> month = int(kwargs['month']) <NEW_LINE> day = i...
The view of a week, including Events
62598ef567a9b606de544848