code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ChangeEmail(generic.UpdateView): <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ["email"] <NEW_LINE> template_name = "user/email_change_form.html" <NEW_LINE> def get_success_url(self): <NEW_LINE> <INDENT> return reverse("user:email_change_done") <NEW_LINE> <DEDENT> def get_object(self, queryset=None): <NEW_...
Change or add user email.
625990704e4d562566373cbd
class Sfixed32Field(Field): <NEW_LINE> <INDENT> type = 15 <NEW_LINE> cpp_type = 1 <NEW_LINE> default_value = 0
sfixed32类型
6259907066673b3332c31cb5
class PanelRendu(bpy.types.Panel): <NEW_LINE> <INDENT> bl_label = "Setup render" <NEW_LINE> bl_idname = "OBJECT_PT_Créer_Des_trous" <NEW_LINE> bl_space_type = 'PROPERTIES' <NEW_LINE> bl_region_type = 'WINDOW' <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> layout.prop(context.sce...
Ce Panel contient l'Operator qui crée un trou sur une sélection
6259907099cbb53fe68327a1
class NotWellFormedOSMDataException(Exception): <NEW_LINE> <INDENT> pass
OSM data structure is not well-formed.
62599070627d3e7fe0e0873f
class GoString(object): <NEW_LINE> <INDENT> def __init__(self, color, stones, liberties): <NEW_LINE> <INDENT> self.color = color <NEW_LINE> self.stones = set(stones) <NEW_LINE> self.liberties = set(liberties) <NEW_LINE> <DEDENT> def remove_liberty(self, point): <NEW_LINE> <INDENT> self.liberties.remove(point) <NEW_LINE...
Stones that are linked by a chain of connected stones of the same color.
6259907071ff763f4b5e9060
class precision(layer): <NEW_LINE> <INDENT> def __init__(self, name="precision", **kwargs): <NEW_LINE> <INDENT> super(precision, self).__init__(name=name, **kwargs) <NEW_LINE> self.tp = true_positive(**kwargs) <NEW_LINE> self.fp = false_positive(**kwargs) <NEW_LINE> <DEDENT> def reset_states(self): <NEW_LINE> <INDENT> ...
Create a metric for model's precision calculation. Precision measures proportion of positives identifications that were actually correct.
6259907092d797404e3897b7
class ExecutableRuntimeError(Exception): <NEW_LINE> <INDENT> def __init__(self, cmd, err): <NEW_LINE> <INDENT> message = "Command '%s' failed with error:\n%s" % (cmd, err) <NEW_LINE> super(ExecutableRuntimeError, self).__init__(message)
Exception raised when an executable call throws a runtime error.
62599070bf627c535bcb2d84
class Eq_21(SoftwoodVolumeEquation): <NEW_LINE> <INDENT> def calc_cvts(self, dbh, ht): <NEW_LINE> <INDENT> cvts = (0.005454154 * (0.30708901 + 0.00086157622 * ht - 0.0037255243 * dbh * ht / (ht - 4.5)) * dbh**2 * ht * (ht / (ht - 4.5))**2).clip(0,) <NEW_LINE> cvts[np.logical_or(dbh <= 0, ht <= 0)] = 0 <NEW_LINE> return...
Western juniper (CHITTESTER,1984) Chittester, Judith and Colin MacLean. 1984. Cubic-foot tree-volume equations and tables for western juniper. Research Note, PNW-420. Pacific Northwest Forest and Range Experiment Station. Portland, Oregon. 8p.
625990702ae34c7f260ac9a2
class Variable(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> @trace <NEW_LINE> def eval(self,env): <NEW_LINE> <INDENT> print(self.name) <NEW_LINE> print('var called env') <NEW_LINE> return env[self.name]
变量符号类
62599070e5267d203ee6d019
class BLOG_NOT_FOUND(Exception): <NEW_LINE> <INDENT> def __init__(*args, **kwargs): <NEW_LINE> <INDENT> Exception.__init__(*args, **kwargs)
- **API Code** : 1202 - **API Message** : ``Unknown``
625990707047854f46340c70
class User(object): <NEW_LINE> <INDENT> def __init__(self, email, name=None, login=None): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise RuntimeError( "Email required for user initialization.") <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> parts = EMAIL_REGEXP.search(email) <NEW_LINE> self.email = parts.gr...
User info
62599070aad79263cf43006e
class account_tax(osv.osv): <NEW_LINE> <INDENT> _inherit = 'account.tax' <NEW_LINE> _columns = { 'tax_discount': fields.boolean('Discount this Tax in Prince', help="Mark it for (ICMS, PIS e etc.)."), 'base_reduction': fields.float('Redution', required=True, digits=0, help="Um percentual decimal em % entre 0-1."), 'amou...
Add fields used to define some brazilian taxes
62599070ec188e330fdfa15b
class TextUnit: <NEW_LINE> <INDENT> def __init__(self, text, italicized=False, bold=False): <NEW_LINE> <INDENT> if isinstance(text, Node): <NEW_LINE> <INDENT> self.text = text.name <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.text = text <NEW_LINE> <DEDENT> self.italic = italicized <NEW_LINE> self.bold = bold
A unit of text with formatting.
6259907038b623060ffaa4b0
class SharedMessageDialog() : <NEW_LINE> <INDENT> def showError(self, title, message): <NEW_LINE> <INDENT> QMessageBox.critical(self, title, message) <NEW_LINE> <DEDENT> def showErrors(self, title, errors): <NEW_LINE> <INDENT> errors = self.flatten(errors) <NEW_LINE> errors = "\n".join(errors) <NEW_LINE> self.showError...
Prototype for a shared message dialog system
625990707d847024c075dc91
class res_municipios(osv.osv): <NEW_LINE> <INDENT> _name = 'res.municipios' <NEW_LINE> _rec_name = 'municipio' <NEW_LINE> _columns = { 'municipio': fields.char('Municipio', size=50, required=True, help='Nombre del Municipio'), 'codigo': fields.char('Codigo', size=3, required=True, help='Codigo del Municipio'), 'estado...
Nombre de los Municipios
62599070796e427e53850031
class AbstractBoard(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.matrix = None <NEW_LINE> self.parent = None <NEW_LINE> self.M = None <NEW_LINE> self.N = None <NEW_LINE> <DEDENT> def create_matrix(self, rows, cols): <NEW_LINE> <INDENT> self.M = rows <NEW_LINE> self.N = cols <NEW_LINE> self....
Abstract board representation
6259907099fddb7c1ca63a2f
class MusicAlbumSchema(SchemaObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.schema = 'MusicAlbum'
Schema Mixin for MusicAlbum Usage: place after django model in class definition, schema will return the schema.org url for the object A collection of music tracks.
62599070be8e80087fbc0948
class PickupObject(object): <NEW_LINE> <INDENT> def __init__(self, ): <NEW_LINE> <INDENT> self.pickup_client = None <NEW_LINE> <DEDENT> def activate(self): <NEW_LINE> <INDENT> self.pickup_client = actionlib.SimpleActionClient('/object_manipulator/object_manipulator_pickup', PickupAction) <NEW_LINE> self.pickup_client.w...
Pickup a given object, this class is instantiated in the SrPickupObjectStateMachine.
62599070a05bb46b3848bd88
class ExpressRouteCircuitRoutesTable(Model): <NEW_LINE> <INDENT> _validation = { 'next_hop_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, 'next_hop_ip': {'key': 'nextHopIP', 'type': 'str'}, 'as...
The routes table associated with the ExpressRouteCircuit. :param address_prefix: Gets AddressPrefix. :type address_prefix: str :param next_hop_type: Gets NextHopType. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None' :type next_hop_type: str or ~azure.mgmt.network...
6259907023849d37ff85296f
class CommunityTagsColumn(TextColumn): <NEW_LINE> <INDENT> def __init__(self, col_name, key, model_class=None, model_tag_association_class=None, filterable=None, grid_name=None): <NEW_LINE> <INDENT> GridColumn.__init__(self, col_name, key=key, model_class=model_class, nowrap=True, filterable=filterable, sortable=False)...
Column that supports community tags.
625990704e4d562566373cbf
class Write(Command): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.finished = False <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> if self.finished: <NEW_LINE> <INDENT> self.character.lower_arm() <NEW_LINE> return self <NEW_LINE> <DEDENT> self.finished = self.character.write()
Command that controls Eric while he's writing on a blackboard.
62599070f548e778e596ce46
class WNLITask(AbstractGlueTask): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> is_pair = True <NEW_LINE> class_labels = ['0', '1'] <NEW_LINE> metric = Accuracy() <NEW_LINE> super(WNLITask, self).__init__(class_labels, metric, is_pair) <NEW_LINE> <DEDENT> def get_dataset(self, segment='train'): <NEW_LINE>...
The Winograd NLI task on GLUE benchmark.
6259907066673b3332c31cb7
class Recurrent_block(Model): <NEW_LINE> <INDENT> def __init__(self, out_ch, t=2): <NEW_LINE> <INDENT> super(Recurrent_block, self).__init__() <NEW_LINE> self.t = t <NEW_LINE> self.out_ch = out_ch <NEW_LINE> self.conv = Sequential([ Conv2D(out_ch, kernel_size=(3, 3), strides=1, padding='same'), BatchNormalization(), Ac...
Recurrent Block for R2Unet_CNN
625990701f037a2d8b9e54c7
class Search(CategoryRegion, ListView): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> queryset = Hike.objects.filter(title__icontains=self.request.GET.get("search"), draft=False) <NEW_LINE> return queryset.values('title', 'tagline', 'url', 'image') <NEW_LINE> <DEDENT> def get_context_data(self, *args,...
Search for hikes
6259907097e22403b383c7bd
class NumericInput(Component): <NEW_LINE> <INDENT> @_explicitize_args <NEW_LINE> def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, size=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, disabled=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosi...
A NumericInput component. A numeric input component that can be set to a value between some range. Keyword arguments: - id (string; optional): The ID used to identify this compnent in Dash callbacks. - className (string; optional): Class to apply to the root component element. - disabled (boolean; optional)...
62599070d268445f2663a7ba
class Reward(object): <NEW_LINE> <INDENT> def __init__(self, base_reward_elements: Tuple, shaping_reward_elements: Tuple): <NEW_LINE> <INDENT> self.base_reward_elements = base_reward_elements <NEW_LINE> self.shaping_reward_elements = shaping_reward_elements <NEW_LINE> if not self.base_reward_elements: <NEW_LINE> <INDEN...
Immutable class storing an RL reward. We decompose rewards into tuples of component values, reflecting contributions from different goals. Separate tuples are maintained for the assessment (non-shaping) components and the shaping components. It is intended that the Scalar reward values are retrieved by calling .rewar...
6259907067a9b606de547700
class JSONEncoder(json.JSONEncoder): <NEW_LINE> <INDENT> def default(self, o): <NEW_LINE> <INDENT> if isinstance(o, datetime.datetime): <NEW_LINE> <INDENT> r = o.isoformat() <NEW_LINE> if o.microsecond: <NEW_LINE> <INDENT> r = r[:23] + r[26:] <NEW_LINE> <DEDENT> if r.endswith('+00:00'): <NEW_LINE> <INDENT> r = r[:-6] +...
JSONEncoder subclass that knows how to encode date/time, decimal types and UUIDs.
62599070460517430c432cb4
class SimpleReportedForm(GAErrorReportingMixin, TestForm): <NEW_LINE> <INDENT> ga_tracking_id = settings.GOOGLE_ANALYTICS_ID
Minimal form - sets the tracking ID class-wide
625990708e7ae83300eea94b
class Condition22(Condition): <NEW_LINE> <INDENT> def check(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( str(self)))
Message->Sent->On any message to peer Parameters: 0: Subchannel (-1 for any) (EXPRESSION, ExpressionParameter)
62599070aad79263cf430070
class AdditionalProperty(messages.Message): <NEW_LINE> <INDENT> key = messages.StringField(1) <NEW_LINE> value = messages.MessageField('DisksScopedList', 2)
An additional property for a ItemsValue object. Fields: key: Name of the additional property. value: A DisksScopedList attribute.
625990708da39b475be04aa9
class FlowControlMessage(DepecheMessage): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> DepecheMessage.__init__(self) <NEW_LINE> self.type = None <NEW_LINE> <DEDENT> def serialize(self, d={}): <NEW_LINE> <INDENT> return DepecheMessage.serialize(self, d)
This is the superclass of all flow control messages needed to regulate the message exchange process. Flow control messages should never require persistence, and should only be used during the message exchange sequence to regulate flow of data/files between the nodes.
62599070796e427e53850033
class ConsoleOutputNoLegacyNoScopePolicyTest(ConsoleOutputPolicyTest): <NEW_LINE> <INDENT> without_deprecated_rules = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(ConsoleOutputNoLegacyNoScopePolicyTest, self).setUp() <NEW_LINE> self.project_member_authorized_contexts = [ self.project_admin_context, self.p...
Test Server Console Output APIs policies with no legacy deprecated rule and no scope check.
62599070be8e80087fbc094a
class ExecutionFSA(): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def is_valid(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def is_in_action(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def world_state(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DED...
Abstract class for an FSA that can execute various actions.
625990705fdd1c0f98e5f842
class gr_check_counting_s_sptr(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> this = _gnuradio_core_general.new_gr_check_counting_s_sptr(*args)...
Proxy of C++ boost::shared_ptr<(gr_check_counting_s)> class
6259907076e4537e8c3f0e3a
class Plugin: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def headbar(self, context): <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> def links(self, context): <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> def sidebar(self, context): <NEW_LINE> <INDENT> return '' <NEW_LINE...
Base class for every plugin for sweetter. It provides default behavior for all the hooks the sweetter core calls. For adding behavior, just define the methods you want to hook in in the plugin class.
62599070283ffb24f3cf5164
class ResultsView(generic.DetailView): <NEW_LINE> <INDENT> model = Question <NEW_LINE> template_name = 'polls/results.html'
View for results page.
625990704e4d562566373cc1
class OptDir(Seqable): <NEW_LINE> <INDENT> pass
Only allowed as the last parser (in linear terms). Allows an optional trailing slash on a URI.
62599070ad47b63b2c5a9109
class RatingRule(UrlRule.UrlRule): <NEW_LINE> <INDENT> def __init__(self, sid=None, titles=None, descriptions=None, disable=0, matchurls=None, nomatchurls=None, use_extern=0): <NEW_LINE> <INDENT> super(RatingRule, self).__init__(sid=sid, titles=titles, descriptions=descriptions, disable=disable, matchurls=matchurls, no...
Holds a rating to match against when checking for allowance of the rating system. Also stored is the url to display should a rating deny a page. The use_extern flag determines if the filters should parse and use external rating data from HTTP headers or HTML <meta> tags.
625990707047854f46340c72
class DataProcessor(object): <NEW_LINE> <INDENT> def get_train_examples(self, data_dir): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def get_dev_examples(self, data_dir): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def get_labels(self): <NEW_LINE> <INDENT> raise NotImplem...
Base class for data converters for sequence classification data sets.
6259907055399d3f05627dd4
class CalendarLink(ContactsBase): <NEW_LINE> <INDENT> _tag = 'calendarLink' <NEW_LINE> _children = ContactsBase._children.copy() <NEW_LINE> _attributes = ContactsBase._attributes.copy() <NEW_LINE> _attributes['href'] = 'href' <NEW_LINE> _attributes['label'] = 'label' <NEW_LINE> _attributes['primary'] = 'primary' <NEW_L...
The gContact:calendarLink element.
625990708e7ae83300eea94c
@register_class <NEW_LINE> class WorldCup25Id1(WorldCup25): <NEW_LINE> <INDENT> relations_involved = [['场上'], None, ['球员', '球星', '队员', '人'], ['离婚'], ['次数'], ['最'], ['多']] <NEW_LINE> selects = []
场上哪个球员离婚次数最多
6259907092d797404e3897b9
class Map(BinaryOperator): <NEW_LINE> <INDENT> operator = "/@" <NEW_LINE> precedence = 620 <NEW_LINE> grouping = "Right" <NEW_LINE> options = { "Heads": "False", } <NEW_LINE> def apply_invalidlevel(self, f, expr, ls, evaluation, options={}): <NEW_LINE> <INDENT> evaluation.message("Map", "level", ls) <NEW_LINE> <DEDENT>...
<dl> <dt>'Map[$f$, $expr$]' or '$f$ /@ $expr$' <dd>applies $f$ to each part on the first level of $expr$. <dt>'Map[$f$, $expr$, $levelspec$]' <dd>applies $f$ to each level specified by $levelspec$ of $expr$. </dl> >> f /@ {1, 2, 3} = {f[1], f[2], f[3]} >> #^2& /@ {1, 2, 3, 4} = {1, 4, 9, 16} Map $f$ on the ...
62599070a17c0f6771d5d808
class CodeBreakpoint (Breakpoint): <NEW_LINE> <INDENT> typeName = 'code breakpoint' <NEW_LINE> if win32.arch in (win32.ARCH_I386, win32.ARCH_AMD64): <NEW_LINE> <INDENT> bpInstruction = b'\xCC' <NEW_LINE> <DEDENT> def __init__(self, address, condition = True, action = None): <NEW_LINE> <INDENT> if win32.arch not in (win...
Code execution breakpoints (using an int3 opcode). @see: L{Debug.break_at} @type bpInstruction: str @cvar bpInstruction: Breakpoint instruction for the current processor.
6259907067a9b606de547701
class AsyncExecutor(): <NEW_LINE> <INDENT> DEFAULT_WORKERS = utils.get_env_as('STREAMLINE_WORKER_COUNT', int, default=20) <NEW_LINE> def __init__(self, executor=None, workers=DEFAULT_WORKERS, loop=None): <NEW_LINE> <INDENT> self.executor = executor <NEW_LINE> self.output_queue = asyncio.Queue() <NEW_LINE> self.worker_c...
:: Worker-oriented event loop processor Workers are no longer a necessary concept in an asynchronous world. However, the concept can still be very helpful for controlling resource usage on the host machine or remote systems used by the job. For this reason I'm re-implementing a worker-style executor pool which could b...
625990701f5feb6acb1644ae
class Character(Enum): <NEW_LINE> <INDENT> MARIO = 0x00 <NEW_LINE> FOX = 0x01 <NEW_LINE> CPTFALCON = 0x02 <NEW_LINE> DK = 0x03 <NEW_LINE> KIRBY = 0x04 <NEW_LINE> BOWSER = 0x05 <NEW_LINE> LINK = 0x06 <NEW_LINE> SHEIK = 0x07 <NEW_LINE> NESS = 0x08 <NEW_LINE> PEACH = 0x09 <NEW_LINE> POPO = 0x0a <NEW_LINE> NANA = 0x0b <NEW...
A Melee character ID. Note: Numeric values are 'internal' IDs.
625990704c3428357761bb71
class ListEnv(cli.CLI): <NEW_LINE> <INDENT> name = 'list' <NEW_LINE> def setup_parser(self, parser): <NEW_LINE> <INDENT> parser.add_argument( 'filters', help='Environment filters like --name="My*".', nargs=argparse.REMAINDER, ) <NEW_LINE> <DEDENT> def parse_filters(self, filters): <NEW_LINE> <INDENT> pattern = ( r'-{1,...
List available Environments. Environments are like Aliases for a list of module requirements. They can be Activated using a single name rather than providing a full list of module requirements.
62599070796e427e53850035
class DetailedUserSchema(BaseUserSchema): <NEW_LINE> <INDENT> class Meta(BaseUserSchema.Meta): <NEW_LINE> <INDENT> fields = BaseUserSchema.Meta.fields + ( User.email.key, User.created.key, User.updated.key, User.is_active.fget.__name__, User.is_readonly.fget.__name__, User.is_admin.fget.__name__, )
Detailed user schema exposes all useful fields.
62599070d486a94d0ba2d87b
class CnnL2h128(DnaModel): <NEW_LINE> <INDENT> def __init__(self, nb_hidden=128, *args, **kwargs): <NEW_LINE> <INDENT> super(CnnL2h128, self).__init__(*args, **kwargs) <NEW_LINE> self.nb_hidden = nb_hidden <NEW_LINE> <DEDENT> def __call__(self, inputs): <NEW_LINE> <INDENT> x = inputs[0] <NEW_LINE> kernel_regularizer = ...
CNN with two convolutional and one fully-connected layer with 128 units. .. code:: Parameters: 4,100,000 Specification: conv[128@11]_mp[4]_conv[256@3]_mp[2]_fc[128]_do
62599070ac7a0e7691f73da5
class ArrayDataset: <NEW_LINE> <INDENT> def __init__(self, dataset_name): <NEW_LINE> <INDENT> data = np.load(dataset_name) <NEW_LINE> self.items = data["imgs"], data['gtLandmarks'] <NEW_LINE> <DEDENT> def __call__(self, batch_size, shuffle, repeat_num): <NEW_LINE> <INDENT> imgs, gt = self.items <NEW_LINE> img_dataset =...
Creates an instance of tf.data.Dataset from numpy Array in a npz file generated by DAN's ImageServer See https://github.com/MarekKowalski/DeepAlignmentNetwork/blob/master/DeepAlignmentNetwork/ImageServer.py
62599070fff4ab517ebcf0d7
class AddressCandidates(list): <NEW_LINE> <INDENT> last_processed = None <NEW_LINE> def sort_by_correctness_precision(self): <NEW_LINE> <INDENT> self.sort(lambda a, b: cmp(b.correctness_rank + b.precision_rank, a.correctness_rank + a.precision_rank)) <NEW_LINE> AddressCandidates.last_processed = self <NEW_LINE> <DEDENT...
List of address candidates extrated from source string.
6259907055399d3f05627dd5
class BaseConfig(object): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> TESTING = False <NEW_LINE> SECRET_KEY = os.environ.get( 'SECRET_KEY', '\xa6TQ5\xc9\xf942\x9cx\x9b\xed\xa4\xc7\x95\xcc\xfd\xb8Q\xa1\x80\x99Z%') <NEW_LINE> WTF_CSRF_SECRET_KEY = os.environ.get( 'WTF_CSRF_SECRET_KEY', '\xc9\xcc\x91{\xd9\x9a\x18\x92\xaa...
BaseConfig holds the default configuration for myapp Use environmental variables, consider autoenv export APP_SETTINGS="config.DevConfig" app.config.from_object(os.environ['APP_SETTINGS']) http://flask.pocoo.org/docs/0.12/config/
6259907091f36d47f2231aed
class UI(): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> self.keep_running = True <NEW_LINE> <DEDENT> def startEventLoop(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> while self.keep_running: <NEW_LINE> <INDENT> self.client.tick() <NEW_LINE> time.sleep(0.1) <...
Headless implementation of the UI interface.
625990701f037a2d8b9e54c9
class Solution: <NEW_LINE> <INDENT> def checkValidString(self, s): <NEW_LINE> <INDENT> return self.dfs(s, 0, 0) <NEW_LINE> <DEDENT> def dfs(self, s, idx, left_count): <NEW_LINE> <INDENT> if left_count < 0: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if idx == len(s): <NEW_LINE> <INDENT> return left_count == 0 ...
@param s: the given string @return: whether this string is valid
625990700a50d4780f706a20
class TLoopPerspective(Perspective): <NEW_LINE> <INDENT> name = 'Time Loop' <NEW_LINE> enabled = True <NEW_LINE> show_editor_area = True <NEW_LINE> TLOOPMNGR_VIEW = 'ibvpy.plugins.tloop_service.tloop_service' <NEW_LINE> contents = [ PerspectiveItem(id=TLOOPMNGR_VIEW, position='left'), ]
An default perspective for the app.
6259907197e22403b383c7c1
class ComReadAndxResponse(Payload): <NEW_LINE> <INDENT> PAYLOAD_STRUCT_FORMAT = '<BBHHHHHHHHHHH' <NEW_LINE> PAYLOAD_STRUCT_SIZE = struct.calcsize(PAYLOAD_STRUCT_FORMAT) <NEW_LINE> def decode(self, message): <NEW_LINE> <INDENT> assert message.command == SMB_COM_READ_ANDX <NEW_LINE> if not message.status.hasError: <NEW_L...
References: =========== - [MS-CIFS]: 2.2.4.42.2 - [MS-SMB]: 2.2.4.2.2
62599071dd821e528d6da5e0
class FcNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_dim, hidden_dims, output_dim, stdv=None, dropout_p=0.0): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.input_dim = input_dim <NEW_LINE> self.hidden_dims = hidden_dims <NEW_LINE> self.output_dim = output_dim <NEW_LINE> self.dropout_p = dropout...
Fully connected network for MNIST classification
625990717b25080760ed8942
class TargetedPlacer(Placer): <NEW_LINE> <INDENT> def check(self): <NEW_LINE> <INDENT> self.requireTarget() <NEW_LINE> validators.validate_data(self.metadata, 'file.json', 'input', 'POST', optional=True) <NEW_LINE> <DEDENT> def process_file_field(self, field, file_attrs): <NEW_LINE> <INDENT> if self.metadata: <NEW_LINE...
A placer that can accept 1 file to a specific container (acquisition, etc).
62599071a17c0f6771d5d809
class RedisDict(BaseStorage): <NEW_LINE> <INDENT> def __init__(self, namespace: str, collection_name: str = None, connection=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> connection_kwargs = get_valid_kwargs(Redis, kwargs) <NEW_LINE> self.connection = connection or StrictRedis(**connection_...
A dictionary-like interface for Redis operations. **Notes:** * All keys will be encoded as bytes, and all values will be serialized * Supports TTL
62599071435de62698e9d6c4
class fast: <NEW_LINE> <INDENT> iden = None <NEW_LINE> comment = None <NEW_LINE> seq = None <NEW_LINE> qual = []
This class contains the string values for identity, comment and bases of an individual sequence. Quality scores of the sequence are kept in a list, maintaining order of corresponding bases
62599071d268445f2663a7bc
class UndoGenericQtmacsScintilla(QtmacsUndoCommand): <NEW_LINE> <INDENT> @type_check <NEW_LINE> def __init__(self, qteWidget): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.qteWidget = qteWidget <NEW_LINE> self.baseClass = super(type(qteWidget), qteWidget) <NEW_LINE> self.textAfter = None <NEW_LINE> line, col ...
Generic undo-object to revert an arbitrary change in the document. This undo command takes snapshot of the current document state (including style) at instantiation, and a second snapshot at the time it is pushed onto the stack. Example:: # Instantiate the undo object to get a snapshot. undoObj = UndoGeneric...
625990718a43f66fc4bf3a52
class ContainsTests(TestCase): <NEW_LINE> <INDENT> def test_returns_true_if_first_value_contains_second_value(self): <NEW_LINE> <INDENT> self.assertTrue(fl.contains('go team', 'team')) <NEW_LINE> <DEDENT> def test_returns_true_if_first_list_contains_second_list(self): <NEW_LINE> <INDENT> self.assertTrue(fl.contains([1,...
FieldLookup.contains()
625990718e7ae83300eea94f
class ArgManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.parser = argparse.ArgumentParser( description="Manage apollo data recording.") <NEW_LINE> self.parser.add_argument('--start', default=False, action="store_true", help='Start recorder. It is the default ' 'action if no other actio...
Arguments manager.
62599071ec188e330fdfa161
class StdCellTemplate(StdCellBase): <NEW_LINE> <INDENT> def __init__(self, temp_db, lib_name, params, used_names, **kwargs): <NEW_LINE> <INDENT> StdCellBase.__init__(self, temp_db, lib_name, params, used_names, **kwargs) <NEW_LINE> self._sch_params = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def sch_params(self): <...
A template wrapper around a standard cell block. Parameters ---------- temp_db : TemplateDB the template database. lib_name : str the layout library name. params : Dict[str, Any] the parameter values. used_names : Set[str] a set of already used cell names. **kwargs : dictionary of optional paramete...
62599071baa26c4b54d50b69
class EncryptionServices(Model): <NEW_LINE> <INDENT> _validation = { 'table': {'readonly': True}, 'queue': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'blob': {'key': 'blob', 'type': 'EncryptionService'}, 'file': {'key': 'file', 'type': 'EncryptionService'}, 'table': {'key': 'table', 'type': 'EncryptionService'...
A list of services that support encryption. Variables are only populated by the server, and will be ignored when sending a request. :param blob: The encryption function of the blob storage service. :type blob: ~azure.mgmt.storage.v2018_03_01_preview.models.EncryptionService :param file: The encryption function of th...
6259907132920d7e50bc7905
class DataMyneSplitDateTimeWidget(MultiWidget): <NEW_LINE> <INDENT> def __init__(self, attrs=None, date_format=None, time_format=None): <NEW_LINE> <INDENT> date_class = attrs['date_class'] <NEW_LINE> time_class = attrs['time_class'] <NEW_LINE> del attrs['date_class'] <NEW_LINE> del attrs['time_class'] <NEW_LINE> time_a...
based on: http://copiesofcopies.org/webl/2010/04/26/a-better-datetime-widget-for-django/
625990715fdd1c0f98e5f846
class SingleCycleLinkList(object): <NEW_LINE> <INDENT> def __init__(self, node=None): <NEW_LINE> <INDENT> self.__head = node <NEW_LINE> <DEDENT> def is_empty(self): <NEW_LINE> <INDENT> return self.__head is None <NEW_LINE> <DEDENT> def length(self): <NEW_LINE> <INDENT> if self.is_empty(): <NEW_LINE> <INDENT> return 0 <...
单向循环链表
62599071f9cc0f698b1c5f2a
class ZMQInteractiveShell(InteractiveShell): <NEW_LINE> <INDENT> displayhook_class = Type(ZMQShellDisplayHook) <NEW_LINE> display_pub_class = Type(ZMQDisplayPublisher) <NEW_LINE> colors_force = CBool(True) <NEW_LINE> readline_use = CBool(False) <NEW_LINE> autoindent = CBool(False) <NEW_LINE> exiter = Instance(ZMQExitAu...
A subclass of InteractiveShell for ZMQ.
62599071460517430c432cb6
class Product(models.Model): <NEW_LINE> <INDENT> sub_category_child = models.ForeignKey(SubCategoryChild,null=False,blank=False) <NEW_LINE> title = models.CharField(max_length=120,null=False, blank=False) <NEW_LINE> image = models.ImageField(upload_to='products/images',default="",blank=False,null=False) <NEW_LINE> desc...
Product class.
625990714527f215b58eb5ff
class PublishManifestListsStep(publish_step.UnitModelPluginStep): <NEW_LINE> <INDENT> def __init__(self, repo_content_unit_q=None): <NEW_LINE> <INDENT> super(PublishManifestListsStep, self).__init__( step_type=constants.PUBLISH_STEP_MANIFEST_LISTS, model_classes=[models.ManifestList], repo_content_unit_q=repo_content_u...
Publish ManifestLists.
625990711b99ca4002290195
class Airport: <NEW_LINE> <INDENT> prop_names = ('id', 'name', 'city', 'country', 'iata', 'icao', 'lat', 'long', 'alt', 'utc_offset', 'dst_rule', 'tz', 'type', 'source') <NEW_LINE> def __init__(self, csv_entry): <NEW_LINE> <INDENT> assert len(csv_entry) == len(Airport.prop_names) <NEW_LINE> self.__dict__.update(dict(zi...
Airport as represented in airports.dat
62599071ad47b63b2c5a910d
class assert_subnet(Assert): <NEW_LINE> <INDENT> def wrap(self, testcase, *args, **kwargs): <NEW_LINE> <INDENT> name = self.func.__name__[5:] <NEW_LINE> alias = self.translator.ALIASES_REVMAP.get(name) <NEW_LINE> for item in (name, alias): <NEW_LINE> <INDENT> if item is None: <NEW_LINE> <INDENT> continue <NEW_LINE> <DE...
Test an IPv4 or IPv6 subnet
6259907166673b3332c31cbd
class Courselist(ModelViewSet): <NEW_LINE> <INDENT> queryset = models.Course.objects.all() <NEW_LINE> serializer_class = CourseSerializer
课程类的API
625990712ae34c7f260ac9a9
class TrackerResponse: <NEW_LINE> <INDENT> def __init__(self, response: dict): <NEW_LINE> <INDENT> self.response_raw = response <NEW_LINE> self.peers = self._generate_peer_list(response.get(b'peers', "")) <NEW_LINE> <DEDENT> @property <NEW_LINE> def failure(self): <NEW_LINE> <INDENT> if b'failure reason' in self.respon...
Represents a tracker response for a torrent.
625990717d43ff2487428072
class Permutation(Function): <NEW_LINE> <INDENT> def __init__(self, params, dims): <NEW_LINE> <INDENT> if not len(params) == 1: <NEW_LINE> <INDENT> raise Exception("Number of parameters does not equal 1.") <NEW_LINE> <DEDENT> beta = np.array(params.beta) <NEW_LINE> if np.isscalar(beta): <NEW_LINE> <INDENT> raise Except...
beta is a non-negative parameter. The smaller beta, the more difficult problem becomes since the global minimum is difficult to distinguish from local minima near permuted solutions. For beta=0, every permuted solution is a global minimum, too. This problem therefore appear useful to test the ability of a global minimi...
62599071fff4ab517ebcf0da
class InteractionType(enum.IntEnum): <NEW_LINE> <INDENT> INTERACTION_TYPE_UNSPECIFIED = 0 <NEW_LINE> DISCUSSION = 1 <NEW_LINE> PRESENTATION = 2 <NEW_LINE> PHONE_CALL = 3 <NEW_LINE> VOICEMAIL = 4 <NEW_LINE> PROFESSIONALLY_PRODUCED = 5 <NEW_LINE> VOICE_SEARCH = 6 <NEW_LINE> VOICE_COMMAND = 7 <NEW_LINE> DICTATION = 8
Use case categories that the audio recognition request can be described by. Attributes: INTERACTION_TYPE_UNSPECIFIED (int): Use case is either unknown or is something other than one of the other values below. DISCUSSION (int): Multiple people in a conversation or discussion. For example in a meeting with two o...
6259907197e22403b383c7c3
class TitleCreator(BaseEstimator, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def fit(self, X): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def transform(self, X): <NEW_LINE> <INDENT> df = X.copy() <NEW_LINE> df['Title'] = df.Name.str.extract(' ...
Generates Title column
62599071dd821e528d6da5e1
class SharezoneFormTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.content = { "name" : "Test Sharezone", "description" : "Test description", } <NEW_LINE> <DEDENT> def test_standard_valid(self): <NEW_LINE> <INDENT> form = SharezoneForm(self.content) <NEW_LINE> self.assertTrue(form.is_valid...
Tests to make sure the SharezoneForm is valid if a name is given or if a name AND description is given.
6259907155399d3f05627dd8
class SuiteInfoClient(PyroClient): <NEW_LINE> <INDENT> target_server_object = PYRO_INFO_OBJ_NAME <NEW_LINE> def get_info(self, *args): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.call_server_func("get", *args) <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> command = back_compat[args[0]] <NEW_LINE...
Client-side suite information interface.
625990713317a56b869bf1a4
class VibratoTypeSequenceEvent(SequenceEvent): <NEW_LINE> <INDENT> dataLength = 2 <NEW_LINE> class Value(enum.IntEnum): <NEW_LINE> <INDENT> PITCH = 0 <NEW_LINE> VOLUME = 1 <NEW_LINE> PAN = 2 <NEW_LINE> <DEDENT> def __init__(self, value): <NEW_LINE> <INDENT> super().__init__(0xCC) <NEW_LINE> self.value = self.Value(valu...
A sequence event that sets the current vibrato type. This is sequence event type 0xCC.
625990718a43f66fc4bf3a54
class EmuCompassCommand(PebbleCommand): <NEW_LINE> <INDENT> command = 'emu-compass' <NEW_LINE> valid_connections = {'qemu', 'emulator'} <NEW_LINE> def __call__(self, args): <NEW_LINE> <INDENT> super(EmuCompassCommand, self).__call__(args) <NEW_LINE> calibrated = QemuCompass.Calibration.Complete <NEW_LINE> if args.uncal...
Sets the emulated compass heading and calibration state.
625990718e7ae83300eea951
class WordRecallTest(Widget): <NEW_LINE> <INDENT> option_length = fields.PositiveSmallIntegerField(default=5) <NEW_LINE> @classmethod <NEW_LINE> def new(cls, start_msg, option_length): <NEW_LINE> <INDENT> return cls._new(start_msg = start_msg, option_length = option_length) <NEW_LINE> <DEDENT> @property <NEW_LINE> def ...
This simple widget presents the subject a list of options where they can recall the words they rememember.
625990711f5feb6acb1644b2
class Person(dict): <NEW_LINE> <INDENT> def __init__(self, job, _id, name, character, url, thumb): <NEW_LINE> <INDENT> self['job'] = job <NEW_LINE> self['id'] = _id <NEW_LINE> self['name'] = name <NEW_LINE> self['character'] = character <NEW_LINE> self['url'] = url <NEW_LINE> self['thumb'] = thumb <NEW_LINE> <DEDENT> d...
Stores information about a specific member of cast
625990717d847024c075dc99
class componentSettings(MayaQWidgetDockableMixin, guide.componentMainSettings): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> self.toolName = TYPE <NEW_LINE> pyqt.deleteInstances(self, MayaQDockWidget) <NEW_LINE> super(self.__class__, self).__init__(parent=parent) <NEW_LINE> self.settingsTab ...
Create the component setting window
6259907132920d7e50bc7907
class _FixupStream(object): <NEW_LINE> <INDENT> def __init__(self, stream): <NEW_LINE> <INDENT> self._stream = stream <NEW_LINE> self._prevent_close = False <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> return getattr(self._stream, name) <NEW_LINE> <DEDENT> def close(self): <NEW_LINE> <INDENT> if...
The new io interface needs more from streams than streams traditionally implement. As such this fixup stuff is necessary in some circumstances.
62599071e1aae11d1e7cf46d
class Node(object): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.next = None <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<Node object. Data: %s; Next: %s>" % ( self.data, self.next.data if self.next else None, )
Node in a linked list.
625990713d592f4c4edbc7a2
class NumpyState(base.Trackable): <NEW_LINE> <INDENT> def _lookup_dependency(self, name): <NEW_LINE> <INDENT> value = super(NumpyState, self)._lookup_dependency(name) <NEW_LINE> if value is None: <NEW_LINE> <INDENT> value = _NumpyWrapper(numpy.array([])) <NEW_LINE> new_reference = base.TrackableReference(name=name, ref...
A trackable object whose NumPy array attributes are saved/restored. Example usage: ```python arrays = tf.contrib.checkpoint.NumpyState() checkpoint = tf.train.Checkpoint(numpy_arrays=arrays) arrays.x = numpy.zeros([3, 4]) save_path = checkpoint.save("/tmp/ckpt") arrays.x[1, 1] = 4. checkpoint.restore(save_path) asser...
6259907156b00c62f0fb4190
class FSStatus(object): <NEW_LINE> <INDENT> def __init__(self, mon_manager): <NEW_LINE> <INDENT> self.mon = mon_manager <NEW_LINE> self.map = json.loads(self.mon.raw_cluster_cmd("fs", "dump", "--format=json")) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return json.dumps(self.map, indent = 2, sort_keys =...
Operations on a snapshot of the FSMap.
62599071ac7a0e7691f73da9
class CloudNetworkClient(BaseClient): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(CloudNetworkClient, self).__init__(*args, **kwargs) <NEW_LINE> self.name = "Cloud Networks" <NEW_LINE> self.PUBLIC_NET_ID = PUBLIC_NET_ID <NEW_LINE> self.SERVICE_NET_ID = SERVICE_NET_ID <NEW_LINE> se...
This is the base client for creating and managing Cloud Networks.
62599071f9cc0f698b1c5f2b
class BigFontToken (BlockToken): <NEW_LINE> <INDENT> def __init__ (self, parser): <NEW_LINE> <INDENT> BlockToken.__init__ (self, parser) <NEW_LINE> <DEDENT> def getToken (self): <NEW_LINE> <INDENT> return Regex (r"\[(?P<count>\+{1,5})(?P<text>.*?)\1\]", re.MULTILINE | re.UNICODE | re.DOTALL).setParseAction (self.__pars...
Токен для крупного шрифта
62599071e76e3b2f99fda2c3
class SingleObjectPermissionMixin: <NEW_LINE> <INDENT> permission = None <NEW_LINE> on_fail = permission_denied <NEW_LINE> class KeeperCBVPermissionDenied(Exception): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return super().di...
Mixin to check permission for get_object method. This Mixin can be used with DetailView, UpdateView, DeleteView and so on. ``` class MyUpdateView(SingleObjectPermissionMixin, UpdateView): permission = 'edit' on_fail = not_found ... ```
625990714f6381625f19a109
class Answer(ndb.Model): <NEW_LINE> <INDENT> text = ndb.StringProperty() <NEW_LINE> more_info_enabled = ndb.BooleanProperty() <NEW_LINE> placeholder_text = ndb.StringProperty() <NEW_LINE> @classmethod <NEW_LINE> def create(cls, text, more_info_enabled=False, placeholder_text=None): <NEW_LINE> <INDENT> if bool(more_info...
Database model representing a survey question_text's answer. Attributes: text: str, The text to be displayed for the answer. more_info_enabled: bool, Indicating whether or not more info can be provided for this answer. placeholder_text: str, The text to be displayed in the more info box as a place ho...
6259907116aa5153ce401d9a
class UploadCoverage(ShellCommand): <NEW_LINE> <INDENT> flunkOnFailure = True <NEW_LINE> description = ["upload cov"] <NEW_LINE> name = "upload cov" <NEW_LINE> def __init__(self, upload_furlfile=None, *args, **kwargs): <NEW_LINE> <INDENT> kwargs['command'] = 'flappclient --furlfile %s upload-file cov-*.tar.bz2' ...
Use the 'flappclient' tool to upload the coverage archive.
6259907199fddb7c1ca63a33
class TaskCreateView(LoginRequiredMixin, CreateView): <NEW_LINE> <INDENT> form_class = TaskForm <NEW_LINE> template_name = 'tasks/create_or_update_task.html' <NEW_LINE> success_url = reverse_lazy('tasks_list')
Форма создания задачи.
62599071f548e778e596ce4e
class ReadStdoutGitProxy(GitProxy): <NEW_LINE> <INDENT> __call__ = GitProxy._read_output
A proxy object to wrap calls to git. Calls to git return the stdout of git and raise an error on a non-zero exit code. Output to stderr is supressed. EXAMPLES:: sage: dev.git.status() # not tested
62599071fff4ab517ebcf0dc
class Solution: <NEW_LINE> <INDENT> def partition(self, s): <NEW_LINE> <INDENT> result = [] <NEW_LINE> if s is None or len(s) == 0: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> subset = [] <NEW_LINE> index = 0 <NEW_LINE> self.dfs(result, subset, index, s) <NEW_LINE> return result <NEW_LINE> <DEDENT> def dfs(self, ...
@param: s: A string @return: A list of lists of string
625990715fc7496912d48ec9
class Display: <NEW_LINE> <INDENT> def setMode(self, mode, w, h): <NEW_LINE> <INDENT> _psp.displaySetMode(mode, w, h) <NEW_LINE> <DEDENT> def getMode(self): <NEW_LINE> <INDENT> return _psp.displayGetMode() <NEW_LINE> <DEDENT> def getVcount(self): <NEW_LINE> <INDENT> return _psp.displayGetVcount() <NEW_LINE> <DEDENT> de...
Display interface
625990719c8ee82313040de8
class BaseHandler(tornado.web.RequestHandler, TemplateRendering): <NEW_LINE> <INDENT> def initializa(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_json(self): <NEW_LINE> <INDENT> args = json.load(self.request.body) <NEW_LINE> return args if args else None <NEW_LINE> <DEDENT> def get_json_argument(self, na...
定义公共函数
625990713317a56b869bf1a5
class LatexIncrementalDecoder(LatexIncrementalLexer): <NEW_LINE> <INDENT> inputenc = "ascii" <NEW_LINE> def __init__(self, errors: str = 'strict') -> None: <NEW_LINE> <INDENT> super(LatexIncrementalDecoder, self).__init__(errors) <NEW_LINE> self.decoder = codecs.getincrementaldecoder(self.inputenc)(errors) <NEW_LINE> <...
Simple incremental decoder. Transforms lexed LaTeX tokens into unicode. To customize decoding, subclass and override :meth:`get_unicode_tokens`.
625990714f88993c371f1181
class EditSpecificationSubscription(AuthorizationBase): <NEW_LINE> <INDENT> permission = 'launchpad.Edit' <NEW_LINE> usedfor = ISpecificationSubscription <NEW_LINE> def checkAuthenticated(self, user): <NEW_LINE> <INDENT> if self.obj.specification.goal is not None: <NEW_LINE> <INDENT> if user.isOneOfDrivers(self.obj.spe...
The subscriber, and people related to the spec or the target of the spec can determine who is essential.
625990714a966d76dd5f07ac
class RegistrationTemplateView(TemplateView): <NEW_LINE> <INDENT> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(RegistrationTemplateView, self).get_context_data( **kwargs ) <NEW_LINE> context['title'] = _('User registration') <NEW_LINE> return context
Class for rendering registration pages.
6259907144b2445a339b75bf