code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Reference: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.number = "" <NEW_LINE> self.authors = "" <NEW_LINE> self.citation = ""
Holds information from a Prodoc citation. Attributes: - number Number of the reference. (string) - authors Names of the authors. - citation Describes the citation.
62599045d99f1b3c44d069e4
class RelayCommand(BaseCommand): <NEW_LINE> <INDENT> daemonizable = True <NEW_LINE> name = 'fedmsg-relay' <NEW_LINE> relay_consumer = RelayConsumer <NEW_LINE> def run(self): <NEW_LINE> <INDENT> moksha_options = dict( zmq_subscribe_endpoints=",".join(list(iterate( self.config['relay_inbound'] ))), zmq_subscribe_method="...
Relay connections from active loggers to the bus. ``fedmsg-relay`` is a service which binds to two ports, listens for messages on one and emits them on the other. ``fedmsg-logger`` requires that an instance of ``fedmsg-relay`` be running *somewhere* and that it's inbound address be listed in the config as one of the ...
62599045d6c5a102081e3460
class S3BucketUploadJob(MashJob): <NEW_LINE> <INDENT> def post_init(self): <NEW_LINE> <INDENT> self.cloud = 'ec2' <NEW_LINE> self._image_size = 0 <NEW_LINE> self._total_bytes_transferred = 0 <NEW_LINE> self._last_percentage_logged = 0 <NEW_LINE> self._percentage_log_step = 20 <NEW_LINE> try: <NEW_LINE> <INDENT> self.ac...
Implements raw image upload to Amazon S3 bucket
62599045507cdc57c63a60e2
class TestWriteCCFull(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> cdl_convert.ColorCorrection.members = {} <NEW_LINE> self.cdl = cdl_convert.ColorCorrection("014_xf_seqGrade_v01", '') <NEW_LINE> self.cdl.desc = [ 'CC description 1', 'CC description 2', 'CC description 3', 'CC descriptio...
Tests full writing of CC XML
6259904515baa723494632d7
class Literal: <NEW_LINE> <INDENT> def __init__(self, lstr): <NEW_LINE> <INDENT> self.lstr = lstr <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.lstr <NEW_LINE> <DEDENT> def escape(self, escape_func): <NEW_LINE> <INDENT> return escape_func(self.lstr) <NEW_LINE> <DEDENT> def for_signature(self): ...
A wrapper for a string. If you use this object wrapped around a string, then it will be interpreted as literal. When passed to the command interpreter, all special characters will be escaped.
62599046097d151d1a2c23b1
class ComplexArrayVarArray(VarArray): <NEW_LINE> <INDENT> def __init__(self, field, base, arraysize, config={}, pos=None): <NEW_LINE> <INDENT> VarArray.__init__(self, field, base, arraysize, config, pos) <NEW_LINE> <DEDENT> def parse(self, value, config={}, pos=None): <NEW_LINE> <INDENT> if value.strip() == '': <NEW_LI...
Handles an array of variable-length arrays of complex numbers.
6259904682261d6c52730868
class Multiselect(Region): <NEW_LINE> <INDENT> _book_list_arrow_icon_locator = ( By.CSS_SELECTOR, 'i.fa') <NEW_LINE> _book_list_toggle_locator = ( By.CSS_SELECTOR, '[type=button]') <NEW_LINE> _book_title_bar_locator = ( By.CSS_SELECTOR, '.result') <NEW_LINE> @property <NEW_LINE> def books(self) -> List[CompleteYourProf...
A book multi-selection widget.
6259904630dc7b76659a0b78
class ABCTopoSwitched( Topo ): <NEW_LINE> <INDENT> def __init__( self ): <NEW_LINE> <INDENT> Topo.__init__( self ) <NEW_LINE> leftHost = self.addHost( 'h1' ) <NEW_LINE> middleHost = self.addHost( 'h2' ) <NEW_LINE> rightHost = self.addHost( 'h3' ) <NEW_LINE> leftSwitch = self.addSwitch( 's1' ) <NEW_LINE> rightSwitch = s...
Simple topology example.
625990463c8af77a43b688e0
class OrderDefault(BaseMixinsModel): <NEW_LINE> <INDENT> __tablename__ = "p_order_default" <NEW_LINE> create_date = Column(DateTime(), default=datetime.now, comment=u"添加时间") <NEW_LINE> num = Column(Integer(), default=0, comment=u"数量") <NEW_LINE> status = Column(Boolean(), default=True, comment=u"True进货,False出货") <NEW_L...
物料订单
6259904615baa723494632d8
class PCE: <NEW_LINE> <INDENT> version = None <NEW_LINE> def _get_device(self): <NEW_LINE> <INDENT> device = usb.core.find(idVendor=ID_VENDOR, idProduct=ID_PRODUCT) <NEW_LINE> if device is None: <NEW_LINE> <INDENT> raise DeviceNotFound('FS20 PCE not found.') <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> device.get_activ...
Handles I/O of FS20 PCE. Attributes: version: Holds the firmware version of FS20 PCE.
62599046462c4b4f79dbcd45
class CapImage(CapFile): <NEW_LINE> <INDENT> def search_image(self, pattern, sortby=CapFile.SEARCH_RELEVANCE, nsfw=False): <NEW_LINE> <INDENT> return self.search_file(pattern, sortby) <NEW_LINE> <DEDENT> def get_image(self, _id): <NEW_LINE> <INDENT> return self.get_file(_id)
Image file provider
6259904623e79379d538d844
class CustomDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, csv_file, root_dir, transform=None): <NEW_LINE> <INDENT> self.data_frame = pd.read_csv(csv_file) <NEW_LINE> self.root_dir = root_dir <NEW_LINE> self.transform = transform <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.data_...
Face Landmarks dataset.
6259904607d97122c4217fe7
class Browser: <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.init() <NEW_LINE> <DEDENT> def init(self): <NEW_LINE> <INDENT> self.session = requests.Session() <NEW_LINE> self.session.proxies = { 'http': PROXY, 'https': PROXY } <NEW_LINE> self.session.verify = False <NEW_...
Wrapper around requests.
62599046be383301e0254b5f
class TranslationCapturer(TokenTranslator): <NEW_LINE> <INDENT> def handle_conversion(self, s, translation): <NEW_LINE> <INDENT> return s <NEW_LINE> <DEDENT> def get_order_preserving_anonymizer(self): <NEW_LINE> <INDENT> generated_translations = dict(self._translations) <NEW_LINE> for k in self._word_map.keys(): <NEW_L...
Captures strings that need anonymizing, but doesn't actually anonymize them. Useful when we need the anonymized strings to be in the same dictionary order as the strings they replace: We capture all strings that need anonymizing in one pass, and then anonymize in a second pass.
62599046d53ae8145f9197a6
class SpiralTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> output_filename = os.path.join("Graphics","spiral_test.pdf") <NEW_LINE> self.c = Canvas(output_filename, pagesize=A4) <NEW_LINE> self.x_0, self.y_0 = 0.5 * A4[0], 0.5 * A4[1] <NEW_LINE> <DEDENT> def test_colorlist(self): <NEW_...
Construct and draw ColorSpiral colours placed on HSV spiral.
6259904663b5f9789fe864b3
class MultiElement(CompoundElement, ButtonElementMixin): <NEW_LINE> <INDENT> class ProxiedInterface(CompoundElement.ProxiedInterface): <NEW_LINE> <INDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> found = find_if(lambda x: x is not None, imap(lambda c: getattr(c.proxied_interface, name, None), self.outer.nested_...
Makes several elements behave as single one. Useful when it is desired to map several buttons to single one.
62599046287bf620b6272f2f
class NotFoundError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(NotFoundError, self).__init__(message) <NEW_LINE> self.message = message
Raised when a resource is not found.
62599046e64d504609df9d74
class TeacherListView(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> all_teachers = Teacher.objects.all() <NEW_LINE> sorted_teacher = all_teachers.order_by('-click_nums')[:3] <NEW_LINE> search_keywords = request.GET.get('keywords', '') <NEW_LINE> if search_keywords: <NEW_LINE> <INDENT> all_teach...
课程讲师列表页
62599046c432627299fa42a6
class AddressView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> address = Address.objects.get_default_address(user=request.user) <NEW_LINE> return render(request, 'user_center_site.html', {'address': address}) <NEW_LINE> <DEDENT> def post(self, request): <NEW_LINE> <INDENT> ...
用户中心-地址页
6259904615baa723494632d9
class Animal: <NEW_LINE> <INDENT> def __init__(self, age): <NEW_LINE> <INDENT> self.age = age <NEW_LINE> self.name = None <NEW_LINE> <DEDENT> def get_age(self): <NEW_LINE> <INDENT> return self.age <NEW_LINE> <DEDENT> def get_name(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def set_age(self, new_age)...
Basic class.
62599046498bea3a75a58e66
class TestVerifySublayouts(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(self): <NEW_LINE> <INDENT> self.working_dir = os.getcwd() <NEW_LINE> demo_files = os.path.join( os.path.dirname(os.path.realpath(__file__)), "demo_files") <NEW_LINE> self.test_dir = os.path.realpath(tempfile.mkdtem...
Tests verifylib.verify_sublayouts(layout, reduced_chain_link_dict). Call with one-step super layout that has a sublayout (demo layout).
6259904607f4c71912bb077a
class build_clib(orig.build_clib): <NEW_LINE> <INDENT> def build_libraries(self, libraries): <NEW_LINE> <INDENT> for (lib_name, build_info) in libraries: <NEW_LINE> <INDENT> sources = build_info.get('sources') <NEW_LINE> if sources is None or not isinstance(sources, (list, tuple)): <NEW_LINE> <INDENT> raise DistutilsSe...
Override the default build_clib behaviour to do the following: 1. Implement a rudimentary timestamp-based dependency system so 'compile()' doesn't run every time. 2. Add more keys to the 'build_info' dictionary: * obj_deps - specify dependencies for each object compiled. this should be a dictio...
62599046d10714528d69f031
class GoodsDetailView(DetailView): <NEW_LINE> <INDENT> model = Goods <NEW_LINE> template_name = 'goods/goods.html'
Show goods details
6259904623849d37ff852404
class SqueezeTransform(Transform): <NEW_LINE> <INDENT> codomain = constraints.real <NEW_LINE> bijective = True <NEW_LINE> event_dim = 3 <NEW_LINE> volume_preserving = True <NEW_LINE> def __init__(self, factor=2): <NEW_LINE> <INDENT> super().__init__(cache_size=1) <NEW_LINE> self.factor = factor <NEW_LINE> <DEDENT> def ...
A transformation defined for image data that trades spatial dimensions for channel dimensions, i.e. "squeezes" the inputs along the channel dimensions. Implementation adapted from https://github.com/pclucas14/pytorch-glow and https://github.com/chaiyujin/glow-pytorch. Reference: > L. Dinh et al., Density estimation usi...
62599046379a373c97d9a373
class Command(BaseCommand): <NEW_LINE> <INDENT> def add_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument("args", nargs=2) <NEW_LINE> parser.add_argument( "--no-refresh", action="store_false", dest="refresh", default=True, help="Do not refresh Solr after the import", ) <NEW_LINE> <DEDENT> help = ( "Usage...
Import a folio mapping (CSV file) Save that mapping to both django and Solr (through signals) Usage: See 'help' below
62599046a79ad1619776b3c8
class BaseUp(DefaultChildrenMixin, BaseTitle): <NEW_LINE> <INDENT> main_text = models.CharField(verbose_name=_('Main text'), max_length=1000, blank=True, default='Main Text') <NEW_LINE> main_text_color = HexColorField(blank=True) <NEW_LINE> main_text_is_raw_html = models.BooleanField( verbose_name=_('Is main text raw H...
abstract widget to support 2-Up and 3-Up widget patterns, MSP Member Materials
6259904626238365f5fadea4
class HomematicipLightMeasuring(HomematicipLight): <NEW_LINE> <INDENT> @property <NEW_LINE> def current_power_w(self): <NEW_LINE> <INDENT> return self._device.currentPowerConsumption <NEW_LINE> <DEDENT> @property <NEW_LINE> def today_energy_kwh(self): <NEW_LINE> <INDENT> if self._device.energyCounter is None: <NEW_LINE...
MomematicIP measuring light device.
6259904630c21e258be99b4f
class FieldSchema(object): <NEW_LINE> <INDENT> def __init__(self, name=None, type=None, comment=None,): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.type = type <NEW_LINE> self.comment = comment <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot...
Attributes: - name - type - comment
625990463617ad0b5ee07484
class PresentInput(Process): <NEW_LINE> <INDENT> inputs = NdarrayParam(shape=('...',)) <NEW_LINE> presentation_time = NumberParam(low=0, low_open=True) <NEW_LINE> def __init__(self, inputs, presentation_time): <NEW_LINE> <INDENT> self.inputs = inputs <NEW_LINE> self.presentation_time = presentation_time <NEW_LINE> supe...
Present a series of inputs, each for the same fixed length of time. Parameters ---------- inputs : array_like Inputs to present, where each row is an input. Rows will be flattened. presentation_time : float Show each input for `presentation_time` seconds.
6259904663b5f9789fe864b5
class OSSM_Hyd_Reader(OSSM_ReaderClass): <NEW_LINE> <INDENT> Type = "OSSM_Hyd" <NEW_LINE> TimeZone = None <NEW_LINE> Fields = { "Discharge": 0, } <NEW_LINE> Units = {} <NEW_LINE> def IsType(self, FileName): <NEW_LINE> <INDENT> return self.CheckHeader(FileName, 3) <NEW_LINE> <DEDENT> def LoadData(self, FileName): <NEW_L...
Reader for the OSSM "Hydrology" format -- usually used for river flow data
62599046ec188e330fdf9be5
class UserManager(BaseUserManager): <NEW_LINE> <INDENT> def _create_user(self, username, email, password, is_superuser, **extra_fields): <NEW_LINE> <INDENT> now = timezone.now() <NEW_LINE> if not username: <NEW_LINE> <INDENT> raise ValueError('The given username must be set') <NEW_LINE> <DEDENT> email = self.normalize_...
Pootle User manager. This manager hides the 'nobody' and 'default' users for normal queries, since they are special users. Code that needs access to these users should use the methods get_default_user and get_nobody_user.
6259904645492302aabfd820
class SessionDataStore(oauth.OAuthStore): <NEW_LINE> <INDENT> def _get_chrome_app(self, consumer_key): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return models.MachineApp.objects.get(consumer_key = consumer_key, app_type='chrome') <NEW_LINE> <DEDENT> except models.MachineApp.DoesNotExist: <NEW_LINE> <INDENT> return N...
Layer between Python OAuth and Django database. An oauth-server for in-RAM chrome-app user-specific tokens
62599046baa26c4b54d505f3
class Cpu(models.Model): <NEW_LINE> <INDENT> Asset = models.OneToOneField(Assets, on_delete=models.CASCADE) <NEW_LINE> cpu_model = models.CharField( verbose_name='cpu型号', max_length=128, null=True, blank=True ) <NEW_LINE> cpu_count = models.PositiveSmallIntegerField( verbose_name='cpu数量', default=1 ) <NEW_LINE> cpu_cor...
cpu info
625990468a43f66fc4bf34de
class RecipeViewSet(BaseRecipeAttrViewSet): <NEW_LINE> <INDENT> serializer_class = serializers.RecipeSerializer <NEW_LINE> queryset = Recipe.objects.all()
recipe view set
62599046004d5f362081f98b
class Car: <NEW_LINE> <INDENT> def __init__(self, price_of_car=None, type_of_car=None, time_of_renting=None): <NEW_LINE> <INDENT> self.price = price_of_car <NEW_LINE> self.type = type_of_car <NEW_LINE> self.time = time_of_renting <NEW_LINE> <DEDENT> def car_info(self, type_of_car=None): <NEW_LINE> <INDENT> selection = ...
This class is created for customers to check the information of car.
62599046097d151d1a2c23b5
class CertificateProfile(VersionedPanObject): <NEW_LINE> <INDENT> ROOT = Root.PANORAMA_VSYS <NEW_LINE> SUFFIX = ENTRY <NEW_LINE> CHILDTYPES = ("device.CertificateProfileCaCertificate",) <NEW_LINE> def _setup(self): <NEW_LINE> <INDENT> self._xpaths.add_profile(value="/certificate-profile") <NEW_LINE> params = [] <NEW_LI...
Certificate profile object. Args: name (str): The name username_field (str): The username field. Valid values are "subject", "subject-alt", or "none". username_field_value (str): The value for the given `username_field`. domain (str): The domain. use_crl (bool): Use CRL. use_ocsp (bool...
6259904630dc7b76659a0b7c
class NamedEntities(AnnotationLayerWithIDs): <NEW_LINE> <INDENT> element = 'namedEntities' <NEW_LINE> def __init__(self, type): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.type = type <NEW_LINE> <DEDENT> @property <NEW_LINE> def tcf(self): <NEW_LINE> <INDENT> element = super().tcf <NEW_LINE> element.set('typ...
The namedEntities annotation layer. It holds a sequence of :class:`NamedEntity` objects.
62599046d53ae8145f9197a9
class ExtendPygments(Pygments): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> self.assert_has_content() <NEW_LINE> try: <NEW_LINE> <INDENT> lexer = get_lexer_by_name(self.arguments[0]) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <INDENT> lexer = TextLexer() <NEW_LINE> <DEDENT> if pys.PYGMENTS_RST_OPTIONS...
Adapt Pygments comportement to Ace_editor.
625990463c8af77a43b688e2
class NewHostHandler(BaseHandler): <NEW_LINE> <INDENT> async def post(self, *args, **kwargs): <NEW_LINE> <INDENT> host = self.get_argument('host_id') <NEW_LINE> if 'http' in host: <NEW_LINE> <INDENT> host = host.split('http://')[-1] <NEW_LINE> <DEDENT> isrun = await self.ping(url='http://{}:{}'.format(host, self.get_ar...
new link scrapyd server
6259904621a7993f00c672b3
class MotorDifferentor: <NEW_LINE> <INDENT> def __init__(self, plforward, plbackward, prforward, prbackward): <NEW_LINE> <INDENT> self.logger = logging.getLogger(__name__) <NEW_LINE> self.logger.info( "MotorDifferentor(lf:%d, lb:%d, rf:%d, rb:%d) created.", plforward, plbackward, prforward, prbackward ) <NEW_LINE> self...
For controlling 2 motor with v+-deltav deltav direction + right - left
62599046d10714528d69f032
class DefinitionListTreeNode(TreeNode): <NEW_LINE> <INDENT> canonical_tag_name = 'dl' <NEW_LINE> alias_tag_names = () <NEW_LINE> render_html_template = '<dl>{inner_html}</dl>\n' <NEW_LINE> def render_html(self, inner_html, **kwargs): <NEW_LINE> <INDENT> return self.render_html_template.format(inner_html=inner_html) <NE...
Definitions list tree node class.
6259904607d97122c4217fec
class VirtualNetworkGatewayListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value...
Response for the ListVirtualNetworkGateways API service call. Variables are only populated by the server, and will be ignored when sending a request. :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. :type value: list[~azure.mgmt.network.v2018_01_01.models.VirtualNetworkGat...
6259904623849d37ff852406
class sorted_merge(object): <NEW_LINE> <INDENT> pass
description of class
6259904626068e7796d4dc91
class IdentityInterface(IOBase): <NEW_LINE> <INDENT> input_spec = DynamicTraitedSpec <NEW_LINE> output_spec = DynamicTraitedSpec <NEW_LINE> def __init__(self, fields=None, **inputs): <NEW_LINE> <INDENT> super(IdentityInterface, self).__init__(**inputs) <NEW_LINE> if fields is None or not fields: <NEW_LINE> <INDENT> rai...
Basic interface class generates identity mappings Examples -------- >>> from nipype.interfaces.utility import IdentityInterface >>> ii = IdentityInterface(fields=['a','b']) >>> ii.inputs.a <undefined> >>> ii.inputs.a = 'foo' >>> out = ii._outputs() >>> out.a <undefined> >>> out = ii.run() >>> out.outputs.a 'foo'
625990468da39b475be0453a
class Subscription(six.with_metaclass(abc.ABCMeta)): <NEW_LINE> <INDENT> @enum.unique <NEW_LINE> class Kind(enum.Enum): <NEW_LINE> <INDENT> NONE = 'none' <NEW_LINE> TERMINATION_ONLY = 'termination only' <NEW_LINE> FULL = 'full'
Describes customer code's interest in values from the other side. Attributes: kind: A Kind value describing the overall kind of this value. termination_callback: A callable to be passed the Outcome associated with the operation after it has terminated. Must be non-None if kind is Kind.TERMINATION_ONLY. Mus...
6259904626238365f5fadea6
class GetInfo(object): <NEW_LINE> <INDENT> def get_current_activity(self): <NEW_LINE> <INDENT> cur_act = driver.current_activity <NEW_LINE> return cur_act <NEW_LINE> <DEDENT> def get_device_name(self): <NEW_LINE> <INDENT> b = os.popen('adb devices') <NEW_LINE> device_name = b.readlines()[1].split()[0] <NEW_LINE> return...
信息获取
6259904630c21e258be99b51
class ContentManager(models.Manager, ModeratedQuerySetMixin, SEIndexQuerySetMixin): <NEW_LINE> <INDENT> def post(self, authors, category, title, body, visible=True, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> [kwargs.pop(name, None) for name in ['authors', 'category', 'title', 'body', 'visible']] <NEW_LINE>...
Manager des contenus
6259904696565a6dacd2d92f
class RegisterSkyMap(AdminOperation): <NEW_LINE> <INDENT> def __init__(self, skymap_name: str) -> None: <NEW_LINE> <INDENT> super().__init__(f"skymaps-{skymap_name}") <NEW_LINE> self.skymap_name = skymap_name <NEW_LINE> self.config_uri = f"resource://lsst.gen3_shared_repo_admin/config/skymaps/{skymap_name}.py" <NEW_LIN...
A concrete `AdminOperation` that calls `BaseSkyMap.register`, using configuration packaged within `gen3_shared_repo_admin` itself. Parameters ---------- skymap_name : `str` Name for the skymap dimension record; also used as the filename (without extension) for the config file, and the operation name (with ...
62599046b830903b9686ee20
class Describe(base_classes.GlobalRegionalDescriber): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> cli = Describe.GetCLIGenerator() <NEW_LINE> base_classes.GlobalRegionalDescriber.Args(parser, 'forwardingRules', cli, 'compute.forwarding-rules') <NEW_LINE> <DEDENT> @property <NEW_LI...
Display detailed information about a forwarding rule.
62599046b57a9660fecd2dc8
class GlobalId(BaseGlobalId): <NEW_LINE> <INDENT> pass
An Id which is globally unique
6259904650485f2cf55dc2d3
class ConstantFeeModel(FeeModel, IFeeModel): <NEW_LINE> <INDENT> def GetOrderFee(self, parameters): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self, *args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __new__(self, fee, currency): <NEW_LINE> <INDENT> pass
Provides an order fee model that always returns the same order fee. ConstantFeeModel(fee: Decimal, currency: str)
62599046004d5f362081f98c
class RemoveClothOperator(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "fracture.cloth_remove" <NEW_LINE> bl_label = "Remove Cloth" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> if context.object is None: <NEW_LINE> <INDENT> return {'CANCELLED'} <NEW_LINE> <DEDENT> if has_cloth(self, context): <NEW...
Removes the Cloth setup from the object
62599046d10714528d69f033
class School(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> slug = models.SlugField(max_length=150, null=True) <NEW_LINE> location = models.CharField(max_length=255, blank=True, null=True) <NEW_LINE> url = models.URLField(max_length=511, blank=True) <NEW_L...
A grouping that contains many courses
6259904623e79379d538d84a
class DuellingMLP(hk.Module): <NEW_LINE> <INDENT> def __init__( self, num_actions: int, hidden_sizes: Sequence[int], ): <NEW_LINE> <INDENT> super().__init__(name='duelling_q_network') <NEW_LINE> self._value_mlp = hk.nets.MLP([*hidden_sizes, 1]) <NEW_LINE> self._advantage_mlp = hk.nets.MLP([*hidden_sizes, num_actions]) ...
A Duelling MLP Q-network.
62599046d53ae8145f9197ac
class CommonBaseTree(tree.Node): <NEW_LINE> <INDENT> AND = 'AND' <NEW_LINE> OR = 'OR' <NEW_LINE> default = AND <NEW_LINE> query = None <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(CommonBaseTree, self).__init__(children=list(args) + kwargs.items()) <NEW_LINE> <DEDENT> def _combine(self, oth...
Encapsulates filters as objects that can then be combined logically (using & and |).
62599046be383301e0254b65
class TiledObject(TiledElement): <NEW_LINE> <INDENT> def __init__(self, parent, node): <NEW_LINE> <INDENT> TiledElement.__init__(self) <NEW_LINE> self.parent = parent <NEW_LINE> self.id = 0 <NEW_LINE> self.name = None <NEW_LINE> self.type = None <NEW_LINE> self.x = 0 <NEW_LINE> self.y = 0 <NEW_LINE> self.width = 0 <NEW...
Represents a any Tiled Object Supported types: Box, Ellipse, Tile Object, Polyline, Polygon
62599046b5575c28eb71366f
class TopK(PytorchMetric): <NEW_LINE> <INDENT> def __init__(self, k: int, train: bool = True, evaluate: bool = True): <NEW_LINE> <INDENT> super().__init__(self._compute, f"Top-{k}", train, evaluate) <NEW_LINE> self.k = k <NEW_LINE> <DEDENT> def _compute(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.T...
TopK metric. A prediction is valid if the true target is in the top k. (Multiclass classification)
6259904626068e7796d4dc93
class Test_SDL_Event(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.ev = SDL_Event() <NEW_LINE> <DEDENT> def test_cannot_subclass(self): <NEW_LINE> <INDENT> self.assertRaises(TypeError, type, 'TestSubclass', (SDL_Event,), {}) <NEW_LINE> <DEDENT> def test_weakref(self): <NEW_LINE> <IND...
Tests csdl2.SDL_Event
625990464e696a045264e7c7
class Buy_error(Exception): <NEW_LINE> <INDENT> pass
For shop issues.
62599046b57a9660fecd2dca
class BotoReadFileHandle(object): <NEW_LINE> <INDENT> def __init__(self, scheme, key): <NEW_LINE> <INDENT> self._scheme = scheme <NEW_LINE> self._key = key <NEW_LINE> self._closed = False <NEW_LINE> self._offset = 0 <NEW_LINE> <DEDENT> def close(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self._key.close(fast=T...
Read-only file handle-like object exposing a subset of file methods. Returned by BotoFileReader's open() method.
62599046baa26c4b54d505f7
class MotorFrame(wx.Frame): <NEW_LINE> <INDENT> def __init__(self, mx_database, motors, shape, timer=True, *args, **kwargs): <NEW_LINE> <INDENT> wx.Frame.__init__(self, *args, **kwargs) <NEW_LINE> self.mx_database = mx_database <NEW_LINE> self.mx_timer = wx.Timer() <NEW_LINE> self.mx_timer.Bind(wx.EVT_TIMER, self._on_m...
A lightweight motor frame designed to hold an arbitrary number of motors in an arbitrary grid pattern.
625990461f5feb6acb163f43
class LightSchema: <NEW_LINE> <INDENT> CONF_STATE_ADDRESS = CONF_STATE_ADDRESS <NEW_LINE> CONF_BRIGHTNESS_ADDRESS = "brightness_address" <NEW_LINE> CONF_BRIGHTNESS_STATE_ADDRESS = "brightness_state_address" <NEW_LINE> CONF_COLOR_ADDRESS = "color_address" <NEW_LINE> CONF_COLOR_STATE_ADDRESS = "color_state_address" <NEW_...
Voluptuous schema for KNX lights.
6259904682261d6c5273086c
class RequestLog(AbstractRequestLog): <NEW_LINE> <INDENT> category = models.CharField( max_length=100, help_text=_lazy("Used to filter / group logs.") ) <NEW_LINE> label = models.CharField( max_length=100, help_text=_lazy("Used to identify individual logs.") ) <NEW_LINE> objects = RequestLogManager() <NEW_LINE> def __s...
Concrete implementation of a request log.
62599046d7e4931a7ef3d3c4
class CassetteAgent(object): <NEW_LINE> <INDENT> def __init__(self, agent, cassette_path, preserve_exact_body_bytes=False): <NEW_LINE> <INDENT> self.agent = agent <NEW_LINE> self.recording = True <NEW_LINE> self.cassette_path = cassette_path <NEW_LINE> self.preserve_exact_body_bytes = preserve_exact_body_bytes <NEW_LIN...
A Twisted Web `Agent` that reconstructs a `Response` object from a recorded HTTP response in JSON-serialized VCR cassette format, or records a new cassette if none exists.
6259904615baa723494632e0
class CompanyFactory(factory.django.DjangoModelFactory): <NEW_LINE> <INDENT> company_name = factory.Faker("name") <NEW_LINE> fantasy_name = factory.Faker("name") <NEW_LINE> state = uf(n=1)[0] <NEW_LINE> cnpj = cnpj(formatting=True) <NEW_LINE> user_created = factory.SubFactory(UserFactory) <NEW_LINE> class Meta: <NEW_LI...
Generates an new Company object for testing purposes.
6259904610dbd63aa1c71f29
class InstanceTypeFilteringTest(test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(InstanceTypeFilteringTest, self).setUp() <NEW_LINE> self.context = context.get_admin_context() <NEW_LINE> <DEDENT> def assertFilterResults(self, filters, expected): <NEW_LINE> <INDENT> inst_types = objects.Fla...
Test cases for the filter option available for instance_type_get_all.
625990468da39b475be0453e
class CircularBeam(Beam): <NEW_LINE> <INDENT> def __init__(self, studyId, groupName, groupGeomObj, parameters, name = Beam.DEFAULT_NAME, color = None): <NEW_LINE> <INDENT> if color is None: <NEW_LINE> <INDENT> if parameters.has_key("R1"): <NEW_LINE> <INDENT> color = LIGHT_RED <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDEN...
This class defines a beam with a circular section. It can be full or hollow, and its radius and thickness can vary from one end of the beam to the other. The valid parameters for circular beams are: * "R1" or "R": radius at the first end of the beam. * "R2" or "R": radius at the other end of the beam. * "EP1" or "EP" ...
6259904673bcbd0ca4bcb5db
class SingletonMixin(object): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> lock = None <NEW_LINE> if not hasattr(cls, '_singleton_instances'): <NEW_LINE> <INDENT> lock = threading.Lock() <NEW_LINE> with lock: <NEW_LINE> <INDENT> if not hasattr(cls, '_singleton_instances'): <NEW_LINE> <INDE...
Provides a singleton of an object per thread. Usage: class ObjectYouWantSingletoned(SingletonMixin): # implementation instance = ObjectYouWantSingletoned()
62599046b5575c28eb713670
class ConfabFileSystemLoader(FileSystemLoader): <NEW_LINE> <INDENT> def get_source(self, environment, template): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return super(ConfabFileSystemLoader, self).get_source(environment, template) <NEW_LINE> <DEDENT> except UnicodeDecodeError: <NEW_LINE> <INDENT> pass <NEW_LINE> <D...
Adds support for binary templates when loading an environment from the file system. Binary config files cannot be loaded as Jinja templates by default, but since confab's model is built around Jinja environments we need to make sure we can still represent them as jinja Templates. Since confab only renders templates f...
6259904616aa5153ce40183c
class InputObjectDependencyAttribute(Attribute): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def __new__(self, Type): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Type = property(lambda self: object(), lambda self, v: None, lambda self: None)
InputObjectDependencyAttribute(Type: InputObjectDependency) InputObjectDependencyAttribute(Type: int)
6259904607f4c71912bb0781
class CertificateItem(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'attributes': {'key': 'attributes', 'type': 'CertificateAttributes'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'x509_thumbprint': {'key': 'x5t', 'type': 'base64'}, } <NEW_LINE> def __init__( se...
The certificate item containing certificate metadata. :param id: Certificate identifier. :type id: str :param attributes: The certificate management attributes. :type attributes: ~azure.keyvault.v7_3_preview.models.CertificateAttributes :param tags: A set of tags. Application specific metadata in the form of key-value...
62599046d99f1b3c44d069ee
class GoodBroyden(QuasiNewton): <NEW_LINE> <INDENT> def update_hessian(self, x_next, x_k): <NEW_LINE> <INDENT> delta_k = x_next - x_k <NEW_LINE> gamma_k = self.gradient(x_next) - self.gradient(x_k) <NEW_LINE> H_km1 = self.inverted_hessian <NEW_LINE> u = H_km1@delta_k <NEW_LINE> nominator = (delta_k - H_km1@delta_k) @ u...
Uses simple Broyden rank-1 update of the Hessian G and applies Sherman-Morisson's formula, see sections 3.15-3.17
6259904629b78933be26aa6a
class HOConv2d(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_shape, out_channel, kernel_size=(3, 2, 2), **kwargs): <NEW_LINE> <INDENT> super(HOConv2d, self).__init__() <NEW_LINE> self.regressor = KernelRegressor(input_shape, out_channel, kernel_size) <NEW_LINE> self.kwargs = kwargs <NEW_LINE> <DEDENT> def fo...
Higher order Conv2d, the convolution has no parameters, the kernel are computed by a neural net
6259904623e79379d538d84d
class Kind(object): <NEW_LINE> <INDENT> MAPPING = None <NEW_LINE> SCALAR = None <NEW_LINE> SEQUENCE = None <NEW_LINE> _name = None <NEW_LINE> def __init__(self, name): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self._name
YAML raw object type.
62599046baa26c4b54d505f9
class AffineHypersurface(AlgebraicScheme_subscheme_affine): <NEW_LINE> <INDENT> def __init__(self, poly, ambient=None): <NEW_LINE> <INDENT> if not is_MPolynomial(poly): <NEW_LINE> <INDENT> raise TypeError("Defining polynomial (= %s) must be a multivariate polynomial"%poly) <NEW_LINE> <DEDENT> if ambient is None: <NEW_L...
The affine hypersurface defined by the given polynomial. EXAMPLES:: sage: A.<x, y, z> = AffineSpace(ZZ, 3) sage: AffineHypersurface(x*y-z^3, A) Affine hypersurface defined by -z^3 + x*y in Affine Space of dimension 3 over Integer Ring :: sage: A.<x, y, z> = QQ[] sage: AffineHypersurface(x*y-z^3)...
625990461d351010ab8f4e6a
class Database(collections.MutableMapping): <NEW_LINE> <INDENT> def __init__(self, top_source_dir, top_build_dir): <NEW_LINE> <INDENT> self.top_source_dir = top_source_dir <NEW_LINE> self.top_build_dir = top_build_dir <NEW_LINE> self.board = None <NEW_LINE> self.genimage = None <NEW_LINE> self.kernel = None <NEW_LINE> ...
The Database class holds the SBXG configuration. It is an aggregation of data models and can be accessed in the same fashion than a dictionary. This allows this class to be passed directly to the jinja templating engine flawlessly.
625990460fa83653e46f622c
class Mod349PartnerRecord(orm.Model): <NEW_LINE> <INDENT> _name = 'l10n.es.aeat.mod349.partner_record' <NEW_LINE> _description = 'AEAT 349 Model - Partner record' <NEW_LINE> _order = 'operation_key asc' <NEW_LINE> def get_record_name(self, cr, uid, ids, field_name, args, context=None): <NEW_LINE> <INDENT> result = {} <...
AEAT 349 Model - Partner record Shows total amount per operation key (grouped) for each partner
6259904607d97122c4217ff1
class TableDoesNotExistException(Exception): <NEW_LINE> <INDENT> pass
Raise this exception when google fusiontables table does not exist.
6259904607d97122c4217ff2
class Algorithm(enum.IntEnum): <NEW_LINE> <INDENT> XCP_ADD_11 = 1 <NEW_LINE> XCP_ADD_12 = 2 <NEW_LINE> XCP_ADD_14 = 3 <NEW_LINE> XCP_ADD_22 = 4 <NEW_LINE> XCP_ADD_24 = 5 <NEW_LINE> XCP_ADD_44 = 6 <NEW_LINE> XCP_CRC_16 = 7 <NEW_LINE> XCP_CRC_16_CITT = 8 <NEW_LINE> XCP_CRC_32 = 9 <NEW_LINE> XCP_USER_DEFINED = 10
Enumerates available checksum algorithms
625990468da39b475be04540
class CategoryLink(pages_models.Page): <NEW_LINE> <INDENT> blog_category = models.ForeignKey(blog_models.BlogCategory) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = _('Category link') <NEW_LINE> verbose_name_plural = _('Category links') <NEW_LINE> <DEDENT> def get_absolute_url(self): <NEW_LINE> <INDENT> cat...
Link to blog category
6259904607f4c71912bb0783
class UnderlayConnectivity(Case): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(UnderlayConnectivity, self).__init__() <NEW_LINE> <DEDENT> def test_connectivity(self, nodes_src, nodes_dst): <NEW_LINE> <INDENT> for src in nodes_src: <NEW_LINE> <INDENT> for dst in nodes_dst: <NEW_LINE> <INDENT> if not...
UnderlayConnectivity : the case to detect underlay connectivity problem.
62599046711fe17d825e1646
class OptionGroup(JsonObject): <NEW_LINE> <INDENT> attributes = {} <NEW_LINE> label_max_length = 75 <NEW_LINE> options_max_length = 100 <NEW_LINE> logger = logging.getLogger(__name__) <NEW_LINE> def __init__( self, *, label: Optional[Union[str, dict, TextObject]] = None, options: Sequence[Union[dict, Option]], **others...
JSON must be retrieved with an explicit option_type - the Slack API has different required formats in different situations
6259904623e79379d538d84f
class RHChangeEventType(RHManageEventBase): <NEW_LINE> <INDENT> def _process(self): <NEW_LINE> <INDENT> type_ = EventType[request.form['type']] <NEW_LINE> update_event_type(self.event, type_) <NEW_LINE> flash(_('The event type has been changed to {}.').format(type_.title), 'success') <NEW_LINE> return jsonify_data(flas...
Change the type of an event.
6259904676d4e153a661dc1e
class DisplayException(Exception): <NEW_LINE> <INDENT> pass
Base exception for all rich output-related exceptions. EXAMPLES:: sage: from sage.repl.rich_output.display_manager import DisplayException sage: raise DisplayException('foo') Traceback (most recent call last): ... DisplayException: foo
625990468a43f66fc4bf34e6
class Invitacion(BaseModel): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> id_arquero = db.Column(db.Integer, db.ForeignKey('arquero.id'), nullable=False) <NEW_LINE> codigo = db.Column(db.String(10), nullable=False, unique=True) <NEW_LINE> usada = db.Column(db.Boolean, nullable=False, defa...
Como los arqueros normalmente solo se pueden registrar mediante una invitacion, esto registra a todas las personas a quienes se les envio una invitacion. :param int id: un identificador autogenerado. :param int id_arquero: el identificador del arquero a quien se le envio el email para que se cr...
6259904673bcbd0ca4bcb5de
class CeleryMockMixin(): <NEW_LINE> <INDENT> def mock_celery(self): <NEW_LINE> <INDENT> self._celery_patcher = patch('absortium.celery.base.DBTask', new=DBTask) <NEW_LINE> self.mock_dbtask = self._celery_patcher.start() <NEW_LINE> <DEDENT> def unmock_celery(self): <NEW_LINE> <INDENT> self._celery_patcher.stop()
CeleryMockMixin substitute original DBTask in order to close db connections
625990468e71fb1e983bce21
class SignUp(CreateView): <NEW_LINE> <INDENT> model = User <NEW_LINE> template_name = "sign_up.html" <NEW_LINE> form_class = SignUpForm <NEW_LINE> success_url = "/index/"
Страница регистрации
62599046d10714528d69f036
class Revision(object): <NEW_LINE> <INDENT> CACHE_KEY = 'pootle:revision' <NEW_LINE> INITIAL = 0 <NEW_LINE> @classmethod <NEW_LINE> def initialize(cls, force=False): <NEW_LINE> <INDENT> if force: <NEW_LINE> <INDENT> return cls.set(cls.INITIAL) <NEW_LINE> <DEDENT> return cls.add(cls.INITIAL) <NEW_LINE> <DEDENT> @classme...
Wrapper around the revision counter stored in Redis.
62599046435de62698e9d157
class TextDialog(Dialog): <NEW_LINE> <INDENT> def __init__(self, parent, *args, **kwargs): <NEW_LINE> <INDENT> super(TextDialog, self).__init__(parent, *args, **kwargs) <NEW_LINE> self._validateFunction = None <NEW_LINE> self.setMainWidget(QLineEdit()) <NEW_LINE> self.lineEdit().setFocus() <NEW_LINE> <DEDENT> def lineE...
A dialog with text string input and validation.
6259904663b5f9789fe864bf
class VectorSchema(object): <NEW_LINE> <INDENT> swagger_types = { 'x': 'float', 'y': 'float', 'z': 'float' } <NEW_LINE> attribute_map = { 'x': 'x', 'y': 'y', 'z': 'z' } <NEW_LINE> def __init__(self, x=None, y=None, z=None): <NEW_LINE> <INDENT> self._x = None <NEW_LINE> self._y = None <NEW_LINE> self._z = None <NEW_LINE...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259904694891a1f408ba09f
class Action12(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( self.__class__.__name__))
On Draw Changes->Set X Offset... Parameters: 0: Enter X Offset (EXPRESSION, ExpressionParameter)
625990464e696a045264e7ca
class Hub(object): <NEW_LINE> <INDENT> def __init__(self, ip: str, secret: str, main_light: int, lights: list): <NEW_LINE> <INDENT> self.last_changed = datetime.datetime.now(); <NEW_LINE> self.ip = ip <NEW_LINE> self.secret = secret <NEW_LINE> self.lights_selected = lights <NEW_LINE> self.main_light = main_light
Generic hub class
62599046711fe17d825e1647
class DescribeDailyCallDurationRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(DescribeDailyCallDurationRequest, self).__init__( '/describeDailyCallDuration', 'GET', header, version) <NEW_LINE> self.parameters = parameters
获取近7天通讯时长
6259904615baa723494632e5
class DNSServer(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._check_localhost() <NEW_LINE> self._requests = [] <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> try: <NEW_LINE> <INDENT> self._socket = socket._orig_socket(socket.AF_INET, socket.SOCK_DGRAM) <NEW_LINE> <DEDENT> except Attrib...
Used for making fake DNS resolution responses based on received raw request Reference(s): http://code.activestate.com/recipes/491264-mini-fake-dns-server/ https://code.google.com/p/marlon-tools/source/browse/tools/dnsproxy/dnsproxy.py
62599046498bea3a75a58e72
class AddCoords(tf.keras.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, with_r=False): <NEW_LINE> <INDENT> super(AddCoords, self).__init__() <NEW_LINE> self.with_r = with_r <NEW_LINE> <DEDENT> def call(self, input_tensor): <NEW_LINE> <INDENT> batch_size_tensor, x_dim, y_dim = tf.shape(input_tensor)[:3] <NEW_LINE...
Add Coord to tensor Alternate implementation, use tf.tile instead of tf.matmul, and x_dim, y_dim is got directly from input_tensor
62599046dc8b845886d5490e
class RootIterator(object): <NEW_LINE> <INDENT> def __init__(self, o): <NEW_LINE> <INDENT> if hasattr(o,'Class') and o.Class().InheritsFrom('TIterator'): <NEW_LINE> <INDENT> self.iter = o <NEW_LINE> <DEDENT> elif hasattr(o,'createIterator'): <NEW_LINE> <INDENT> self.iter = o.createIterator() <NEW_LINE> <DEDENT> elif ha...
A wrapper around the ROOT iterator so that it can be used in python
625990460fa83653e46f6230
class HistogramPlot(StandardStyle): <NEW_LINE> <INDENT> def __init__(self, values): <NEW_LINE> <INDENT> StandardStyle.__init__(self) <NEW_LINE> self.values = values <NEW_LINE> self.parameters["num_bins"] = 30.0 <NEW_LINE> <DEDENT> def plot(self): <NEW_LINE> <INDENT> self.axis.hist(self.values,bins=self.num_bins,edgecol...
This function plots the histogram of list of value lists, coloring each independently. Parameters ---------- values : list List of numpy arrays objects. The top level list corresponds to different sets of values that will be plotted together. Each set will be co...
6259904645492302aabfd826
class DBStoreWizardHandlerPlugin(FormWizardHandlerPlugin): <NEW_LINE> <INDENT> uid = UID <NEW_LINE> name = _("DB store") <NEW_LINE> allow_multiple = False <NEW_LINE> def run(self, form_wizard_entry, request, form_list, form_wizard, form_element_entries=None): <NEW_LINE> <INDENT> if not form_element_entries: <NEW_LINE> ...
DB store form wizard handler plugin. Can be used only once per form.
6259904624f1403a92686277
class Invert(Query): <NEW_LINE> <INDENT> def __init__(self, subquery): <NEW_LINE> <INDENT> self.subquery = subquery <NEW_LINE> <DEDENT> def _execute_query(self, instance): <NEW_LINE> <INDENT> part = self.subquery._execute_query(instance) <NEW_LINE> return QueryResult(self, not part.result, [ part ] ) <NEW_LINE> <DEDENT...
Implementation of the invert operator
6259904694891a1f408ba0a0
class ExampleNameChooser(NameChooser): <NEW_LINE> <INDENT> def chooseName(self, name, obj): <NEW_LINE> <INDENT> self.checkName(unicode(self.context._count + 1), obj) <NEW_LINE> return unicode(self.context._count + 1)
A name chooser for example objects in the container context.
62599046711fe17d825e1648