code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@implementer(IOpenCLUnit, ICUDAUnit, INumpyUnit, IDistributable) <NEW_LINE> class DropoutBackward(GradientDescentBase, Dropout): <NEW_LINE> <INDENT> MAPPING = {"dropout"} <NEW_LINE> def __init__(self, workflow, **kwargs): <NEW_LINE> <INDENT> self.mask = None <NEW_LINE> super(DropoutBackward, self).__init__(workflow, **...
Backward propagation of droupout layer.
62598f7ee64d504609df90a8
class UserChangeForm(forms.ModelForm): <NEW_LINE> <INDENT> password = ReadOnlyPasswordHashField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Users <NEW_LINE> fields = ('__all__') <NEW_LINE> <DEDENT> def clean_password(self): <NEW_LINE> <INDENT> return self.initial["password"]
A form for updating users. Includes all the fields on the user, but replaces the password field with admin's password hash display field.
62598f7e26068e7796d4c34b
class Resource(object): <NEW_LINE> <INDENT> def __init__(self, request, head, *args, **kwargs): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> self.head = head <NEW_LINE> self.downloadable_file = False <NEW_LINE> self.path = None <NEW_LINE> self.filename = None <NEW_LINE> self.local_dir = None <NEW_LINE> self.or...
This represents a downloaded resource. It can be further [fetched] !or [archived]. The fetcher can automatically differentiate between requests and other already completed operations. Keep different [fetch]ed areas !or [snapshot] :locations {for Archival Purposes}
62598f7e8da39b475be02bd5
class Lazy(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self._func = func <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> log.debug('Lazy class called {!r}'.format(self)) <NEW_LINE> return self._func(*args, **kwargs)
A lazy loaded field
62598f7ea17c0f6771d5bc34
class DNFPlugin(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> plugin_name = "dnf" <NEW_LINE> profiles = ('system', 'packagemanager', 'sysmgmt') <NEW_LINE> files = ('/etc/dnf/dnf.conf',) <NEW_LINE> packages = ('dnf',) <NEW_LINE> option_list = [ ("history", "captures transaction history", "fast", False), ("history-info", "d...
dnf package manager
62598f7e097d151d1a2c0a18
class user_script(object): <NEW_LINE> <INDENT> def __init__(self, file_path): <NEW_LINE> <INDENT> self.file_path = file_path <NEW_LINE> self.info = {} <NEW_LINE> self.say = None <NEW_LINE> self.ready = False <NEW_LINE> (exit_code, raw_info) = self._run_script() <NEW_LINE> if exit_code == 0: <NEW_LINE> <INDENT> try: <NE...
Manage a single user script. If called without parameters, the script is expected to return via standard output, a JSON formatted dictionary object that describes the script. Keys are: "description" - optional text string giving the script function "keywords" - a list of words that trigger the script "bef...
62598f7e7c178a314d78ce9b
class IDeleteItemMessage(Interface): <NEW_LINE> <INDENT> pass
Marker interface for item deletion message
62598f7e4e696a045264daf9
class LocalAttn(nn.Module): <NEW_LINE> <INDENT> def __init__(self, hidden_size): <NEW_LINE> <INDENT> super(LocalAttn, self).__init__() <NEW_LINE> self.attn = Attn(hidden_size) <NEW_LINE> self.uw = nn.Parameter(torch.FloatTensor(1, hidden_size).uniform_(-1, 1)) <NEW_LINE> <DEDENT> def forward(self, encoder_outputs, sent...
The module for word-level attention.
62598f7e07f4c71912baee40
class TabbedPanelHeader(ToggleButton): <NEW_LINE> <INDENT> content = ObjectProperty(None, allownone=True) <NEW_LINE> def on_touch_down(self, touch): <NEW_LINE> <INDENT> if self.state == 'down': <NEW_LINE> <INDENT> for child in self.children: <NEW_LINE> <INDENT> child.dispatch('on_touch_down', touch) <NEW_LINE> <DEDENT>...
A Base for implementing a Tabbed Panel Head. A button intended to be used as a Heading/Tab for TabbedPanel widget. You can use this TabbedPanelHeader widget to add a new tab to TabbedPanel.
62598f7e9b70327d1c57e797
class Equivalence_Set(Base): <NEW_LINE> <INDENT> subclass_names = [] <NEW_LINE> use_names = ['Equivalence_Object', 'Equivalence_Object_List'] <NEW_LINE> def match(string): <NEW_LINE> <INDENT> if not string or string[0]+string[-1]!='()': return <NEW_LINE> line = string[1:-1].strip() <NEW_LINE> if not line: return <NEW_L...
<equivalence-set> = ( <equivalence-object> , <equivalence-object-list> )
62598f7e63f4b57ef0085a67
class sine_plotter(object): <NEW_LINE> <INDENT> def __init__(self, f, fs=100.0, T=1.0, amp=1.0): <NEW_LINE> <INDENT> self.f = f <NEW_LINE> self.fs = fs <NEW_LINE> self.T = T <NEW_LINE> self.amp = amp <NEW_LINE> <DEDENT> def build_tvect(self): <NEW_LINE> <INDENT> self.dt = 1.0/self.fs <NEW_LINE> t = arange(0,self.T,self...
Class for plotting sine waves
62598f7e26068e7796d4c34d
class CircleOfFifths: <NEW_LINE> <INDENT> def __init__(self, sound: Sounds = Sounds.C) -> None: <NEW_LINE> <INDENT> self.__sounds_order = [] <NEW_LINE> for i in range(12): <NEW_LINE> <INDENT> self.__sounds_order.append(sound.add(i*Intervals.PERFECT_FIFTH)) <NEW_LINE> <DEDENT> <DEDENT> def __getitem__(self, index): <NEW...
In music theory, the circle of fifths is a way of organizing the 12 chromatic pitches as a sequence of perfect fifths. If C is chosen as a starting point, the sequence is: C, G, D, A This collection represents Circle of fifths. You can access elements just like you were using list `Circle()[1]`. You can provide eac...
62598f7e5f7d997b871f90d1
class Suppliable(abc_osid_markers.Suppliable): <NEW_LINE> <INDENT> pass
A marker interface for OSID Provider-owned objects used to supply input from an OSID Consumer.
62598f7ea17c0f6771d5bc36
class KMeans(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def train( cls, rdd, k, maxIterations=100, initializationMode="k-means||", seed=None, initializationSteps=2, epsilon=1e-4, initialModel=None, distanceMeasure="euclidean", ): <NEW_LINE> <INDENT> clusterInitialModel = [] <NEW_LINE> if initialModel is not N...
K-means clustering. .. versionadded:: 0.9.0
62598f7e23849d37ff850ab0
class Panel(HasTraits): <NEW_LINE> <INDENT> pass
Draw one or more plots.
62598f7ee76e3b2f99fd8427
class Place(object): <NEW_LINE> <INDENT> def __init__(self, name, exit=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.exit = exit <NEW_LINE> self.bees = [] <NEW_LINE> self.ant = None <NEW_LINE> self.entrance = None <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_LINE> if self.exit != None: <NEW_LINE> <INDENT> exi...
A Place holds insects and has an exit to another Place.
62598f7e15baa72349461973
class HelixBoxView(views.APIView): <NEW_LINE> <INDENT> def get(self, request, entry_name=None): <NEW_LINE> <INDENT> if entry_name is not None: <NEW_LINE> <INDENT> p = Protein.objects.get(entry_name=entry_name) <NEW_LINE> return Response(str(p.get_helical_box()).split("\n"))
Get SVG source code for a protein's helix box plot /plot/helixbox/{entry_name}/ {entry_name} is a protein identifier from Uniprot, e.g. adrb2_human
62598f7e0383005118f6d0f5
class ReturnValueCollector: <NEW_LINE> <INDENT> checker_collect = 'statisticscollector.ReturnValueCheck' <NEW_LINE> checker_analyze = 'statisticsbased.UncheckedReturnValue' <NEW_LINE> def __init__(self, stats_min_sample_count, stats_relevance_threshold): <NEW_LINE> <INDENT> self.stats_min_sample_count = stats_min_sampl...
Collect return value statistics. This script lists functions of which the return value is mostly checked.
62598f7e711fe17d825e00dc
class AbstractConnectionPool(object): <NEW_LINE> <INDENT> def __init__(self, minconn, maxconn, *args, **kwargs): <NEW_LINE> <INDENT> self.minconn = int(minconn) <NEW_LINE> self.maxconn = int(maxconn) <NEW_LINE> self.closed = False <NEW_LINE> self._args = args <NEW_LINE> self._kwargs = kwargs <NEW_LINE> self._pool = [] ...
Generic key-based pooling code.
62598f7eec188e330fdf8293
class TaskConf: <NEW_LINE> <INDENT> def __init__(self, domain): <NEW_LINE> <INDENT> if domain: <NEW_LINE> <INDENT> domain = domain.lower() <NEW_LINE> if domain.startswith('https://'): <NEW_LINE> <INDENT> raise ValueError('Unsupported HTTPS link!') <NEW_LINE> <DEDENT> elif domain.startswith('http://'): <NEW_LINE> <INDEN...
A crawl task configuration object.
62598f7e1d351010ab8f3532
class OSDSettingNotAllowed(Exception): <NEW_LINE> <INDENT> pass
Error class for a disallowed setting.
62598f7ec432627299fa29c3
class Serve(Command): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(Serve, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( '--debug-server', action='store_true', help='Use debug mode') <NEW_LINE> return parser <NEW_LINE> <DEDENT> def take_action(self, parsed_args): ...
Run locally.
62598f7e50485f2cf55da966
class PermissionDenied(ZengineError): <NEW_LINE> <INDENT> pass
The user did not have permission to do that
62598f7e10dbd63aa1c705a5
class _VerbosityFlag(flags.Flag): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(_VerbosityFlag, self).__init__( flags.IntegerParser(), flags.ArgumentSerializer(), *args, **kwargs) <NEW_LINE> <DEDENT> @property <NEW_LINE> def value(self): <NEW_LINE> <INDENT> return self._value <NEW_L...
Flag class for -v/--verbosity.
62598f7e66673b3332c2fdb8
class DefaultColorMap(ColorMap): <NEW_LINE> <INDENT> def color_heatmap(self, dataset): <NEW_LINE> <INDENT> coord_data = dataset.by_coordinates(relative=True) <NEW_LINE> for y in range(dataset.bounds.height): <NEW_LINE> <INDENT> yield array('B', map(round, chain.from_iterable( (*((255 * coord_data[(x, y)],) * 3), 255) i...
The default greyscale colormap to use if no user-provided one exists.
62598f7e004d5f362081ecf5
class BaseGroupSerializer(HyperlinkedModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = BaseGroup <NEW_LINE> fields = ( 'url', 'members', 'name', 'description', ) <NEW_LINE> extra_kwargs = { 'url': {'view_name': 'basegroup-detail'}, 'members': {'view_name': 'userprofile-detail'}, }
Group model serializer
62598f7e07d97122c4216696
class ConfigurationValue(DictAttribute): <NEW_LINE> <INDENT> attributes = (("value", int), ("size", int))
Helper class for holding one configuration value
62598f7edc8b845886d52faa
class Experiment: <NEW_LINE> <INDENT> def __init__(self, name, description, num_hierarchy_levels, hierarchy_method, num_time_samples, time_step, time_step_unit): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.description = description <NEW_LINE> self.num_hierarchy_levels = num_hierarchy_levels <NEW_LINE> self.hie...
Class to store experiment attributes Args: name (str): Unique string to identify the experiment description (str): A short description of the experiment and what it contains num_hierarchy_levels (int): Number of levels in the zoom resolution hierarchy hierarchy_method (str): The style of down-sampling used to ...
62598f7e63b5f9789fe84b66
class StaticTzInfo(BaseTzInfo): <NEW_LINE> <INDENT> def fromutc(self, dt): <NEW_LINE> <INDENT> if dt.tzinfo is not None and dt.tzinfo is not self: <NEW_LINE> <INDENT> raise ValueError('fromutc: dt.tzinfo is not self') <NEW_LINE> <DEDENT> return (dt + self._utcoffset).replace(tzinfo=self) <NEW_LINE> <DEDENT> def utcoffs...
A timezone that has a constant offset from UTC These timezones are rare, as most locations have changed their offset at some point in their history
62598f7ea4f1c619b294dfe1
class templatefunc(_templateregistrarbase): <NEW_LINE> <INDENT> _getname = _funcregistrarbase._parsefuncdecl <NEW_LINE> def _extrasetup(self, name, func, argspec=None): <NEW_LINE> <INDENT> func._argspec = argspec
Decorator to register template function Usage:: templatefunc = registrar.templatefunc() @templatefunc('myfunc(arg1, arg2[, arg3])', argspec='arg1 arg2 arg3') def myfuncfunc(context, mapping, args): '''Explanation of this template function .... ''' pass The first string argument i...
62598f7e26068e7796d4c350
class DictNoNone(dict): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> dict.__init__(self, *args, **kwargs) <NEW_LINE> for key, val in self.items(): <NEW_LINE> <INDENT> if val is None: <NEW_LINE> <INDENT> dict.__delitem__(self, key) <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def __setitem__(sel...
Create a dict but don't set the item if a value is ``None``.
62598f7ed4950a0f3b110b2f
class KeyVaultSampleBase(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.config = KeyVaultSampleConfig() <NEW_LINE> self.credentials = None <NEW_LINE> self.keyvault_data_client = None <NEW_LINE> self.keyvault_mgmt_client = None <NEW_LINE> self.resource_mgmt_client = None <NEW_LINE> self._setup...
Base class for Key Vault samples, provides common functionality needed across Key Vault sample code :ivar config: Azure subscription id for the user intending to run the sample :vartype config: :class: `KeyVaultSampleConfig` :ivar credentials: Azure Active Directory credentials used to authenticate with Azure service...
62598f7ebe383301e02531ee
class Tag(Base): <NEW_LINE> <INDENT> __tablename__ = 'tags' <NEW_LINE> name = Column(String) <NEW_LINE> @property <NEW_LINE> def all_owners(self): <NEW_LINE> <INDENT> return list( itertools.chain(*[ getattr(self, attr) for attr in [a for a in dir(self) if a.endswith("_parents")] ]) ) <NEW_LINE> <DEDENT> def __repr__(se...
The Tag class. This represents all tag records in a single table.
62598f7ed53ae8145f917e8d
class ListVariablesResponse(_messages.Message): <NEW_LINE> <INDENT> nextPageToken = _messages.StringField(1) <NEW_LINE> variables = _messages.MessageField('Variable', 2, repeated=True)
Response for the `ListVariables()` method. Fields: nextPageToken: This token allows you to get the next page of results for list requests. If the number of results is larger than `pageSize`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list r...
62598f7e507cdc57c63a4781
class Device(BaseModel): <NEW_LINE> <INDENT> DO_TYPE_CHOICES = ( (0, "出库"), (1, "入库"), (2, "调拨"), (3, "报废"), ) <NEW_LINE> name = models.CharField(max_length=20, verbose_name="名称") <NEW_LINE> code = models.CharField(max_length=100, verbose_name="编码") <NEW_LINE> status = models.SmallIntegerField(choices=DO_TYPE_CHOICES, ...
保温箱设备
62598f7e30dc7b766599f24f
class Scene: <NEW_LINE> <INDENT> def render(self) -> Surface: <NEW_LINE> <INDENT> assert False <NEW_LINE> <DEDENT> def action(self, key: int) -> None: <NEW_LINE> <INDENT> assert False
Class to manage scene state.
62598f7ee76e3b2f99fd8429
class Canton(models.Model): <NEW_LINE> <INDENT> nombre = models.CharField(max_length=100, verbose_name="Cantón") <NEW_LINE> provincia = models.ForeignKey(Provincia) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return "%s, %s" % (self.nombre, self.provincia) <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> v...
Representa los cantones de las provincias del ecuador
62598f7e287bf620b62715a8
class CoffeeScriptLexer(RegexLexer): <NEW_LINE> <INDENT> name = 'CoffeeScript' <NEW_LINE> aliases = ['coffee-script', 'coffeescript'] <NEW_LINE> filenames = ['*.coffee'] <NEW_LINE> mimetypes = ['text/coffeescript'] <NEW_LINE> flags = re.DOTALL <NEW_LINE> tokens = { 'commentsandwhitespace': [ (r'\s+', Text), (r'#.*?\n',...
For `CoffeeScript`_ source code. .. _CoffeeScript: http://coffeescript.org *New in Pygments 1.3.*
62598f7e0383005118f6d0f7
@attr.s(frozen=True) <NEW_LINE> class Line3: <NEW_LINE> <INDENT> p1 = attr.ib(type=Point3) <NEW_LINE> p2 = attr.ib(type=Point3) <NEW_LINE> def p1p2(self): <NEW_LINE> <INDENT> return self.p1, self.p2
A line in three dimensions.
62598f7e16aa5153ce3ffef6
class makeData(): <NEW_LINE> <INDENT> def __init__(self,D,r): <NEW_LINE> <INDENT> self.D=D <NEW_LINE> self.tt_ratio = r <NEW_LINE> <DEDENT> def makeSingleArray(self): <NEW_LINE> <INDENT> X=[] <NEW_LINE> X=np.array(X) <NEW_LINE> X=X.reshape(0,39) <NEW_LINE> y=[] <NEW_LINE> y=np.array(y) <NEW_LINE> for d in self.D: <NEW_...
Superclass for cocatenating, normalizing, balancing and splitting data before classification DATA MEMBERS - D: list of tuples (X,y) where X is the input data(numpy array or list of numpy arrays) and y is the label(int) eg: In case of audio - list of numpy arrays - tt_ratio: ratio(train_data_s...
62598f7eb830903b9686e16c
class FetchResults_result(object): <NEW_LINE> <INDENT> thrift_spec = ( (0, TTType.STRUCT, 'success', (TFetchResultsResp, TFetchResultsResp.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if i...
Attributes: - success
62598f7e15fb5d323ce7e720
class NeutronBuyerLogin(Resource): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> phone_number = request.form["phone"] <NEW_LINE> password_hash = request.form["hash"] <NEW_LINE> if is_invalid_arguments_present(phone_number, password_hash): <NEW_LINE> <INDENT> abort( 400, INSUFFICIENT_PARAMETER ) <NEW_LINE> <DE...
API FOR BUYER LOGIN Methods Supported: POST ONLY :returns: JWT login token for the specifc buyer if something is wrong appropirate error message will be returned.
62598f7e07d97122c4216698
class ISchemaCreatedEvent(IObjectEvent): <NEW_LINE> <INDENT> object = Attribute("The object this event is for - always an instantiated schema")
Fires when a schema object has been created.
62598f7e8e71fb1e983bb4ae
class memory_error(runtime_error): <NEW_LINE> <INDENT> title = "Memory Error" <NEW_LINE> message_template = (RUNTIME_ERROR_MESSAGE_HEADER + "\n" + "A MemoryError means your program ran out of mental " "space.\n\n" "Suggestion: You might have an infinite loop. Or, you " "might not be filtering your data enough.")
Runtime MemoryError
62598f7e1f5feb6acb16262b
class TestReportsApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = api.reports_api.ReportsApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_report_cloud_recording(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_repo...
ReportsApi unit test stubs
62598f7e0383005118f6d0f8
class FrameworkSearchBucketInterface(Model): <NEW_LINE> <INDENT> def __init__(self, name: str=None, values: List[FrameworkSearchAggregationValueInterface]=None): <NEW_LINE> <INDENT> self.swagger_types = { 'name': str, 'values': List[FrameworkSearchAggregationValueInterface] } <NEW_LINE> self.attribute_map = { 'name': '...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f7e38b623060ffa8a8d
class BlogPost(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=200) <NEW_LINE> text = models.TextField() <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> owner = models.ForeignKey(User) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.title
个人博客
62598f7ea4f1c619b294dfe3
class BaseField(ABC): <NEW_LINE> <INDENT> def __init__(self, key, label, default=None, remember=True): <NEW_LINE> <INDENT> self.__default_value = default <NEW_LINE> self.__remember = remember <NEW_LINE> self.key = key <NEW_LINE> self.label = QLabel(label) <NEW_LINE> self.widget = self._widget() <NEW_LINE> self.set_valu...
A base class for input fields. Object of this class interface themself with Rynner through a key (or set of keys). The value(s) of the fields can be retrieved through the value() method.
62598f7e73bcbd0ca4bc9c47
class ResInitBlock(nn.Layer): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, data_format="channels_last", **kwargs): <NEW_LINE> <INDENT> super(ResInitBlock, self).__init__(**kwargs) <NEW_LINE> self.conv = conv7x7_block( in_channels=in_channels, out_channels=out_channels, strides=2, data_format=data_f...
ResNet specific initial block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. data_format : str, default 'channels_last' The ordering of the dimensions in tensors.
62598f7ed53ae8145f917e8f
class _ColumnAlias (object): <NEW_LINE> <INDENT> def __init__(self, base_column, alias_name): <NEW_LINE> <INDENT> assert isinstance(base_column, _ColumnWrapper) <NEW_LINE> super(_ColumnAlias, self).__init__() <NEW_LINE> self._name = alias_name <NEW_LINE> self._base_column = base_column <NEW_LINE> self._uname = urlquote...
Represents an (output) alias for a column instance in a datapath expression.
62598f7e23849d37ff850ab4
class UnitAbilities(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.button_abilities = [] <NEW_LINE> self.triggered_abilities = [] <NEW_LINE> self.dynamic_abilities = [] <NEW_LINE> <DEDENT> def list_buttons(self): <NEW_LINE> <INDENT> for i in self.button_abilities: <NEW_LINE> <INDENT> pass
Stores and runs ALL passives and abilities granted by the unit or their equipment.
62598f7e507cdc57c63a4783
class HighChartsBasicPlotView(View): <NEW_LINE> <INDENT> __regid__ = "highcharts-basic-plot" <NEW_LINE> paginable = False <NEW_LINE> div_id = "highcharts-basic-plot" <NEW_LINE> def rset_to_hist(self, rset): <NEW_LINE> <INDENT> data = [] <NEW_LINE> for element in rset.rows: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> d...
Create a basic plot using highcharts.
62598f7ed99f1b3c44d050a4
class _Code(str): <NEW_LINE> <INDENT> def __new__(cls, code): <NEW_LINE> <INDENT> return str.__new__(cls, code)
Wraps a ``str`` object as a _Code object providing the means to handle Javascript blob content. Used internally by the View object when codifying map and reduce Javascript content.
62598f7e16aa5153ce3ffef8
class EDIIS2SCFSolver(DIISSCFSolver): <NEW_LINE> <INDENT> def __init__(self, threshold=1e-6, maxiter=128, nvector=6, skip_energy=False, prune_old_states=False): <NEW_LINE> <INDENT> log.cite('kudin2002', 'the EDIIS method.') <NEW_LINE> DIISSCFSolver.__init__(self, EDIIS2History, threshold, maxiter, nvector, skip_energy,...
The EDIIS+DIIS SCF solver [kudin2002]_
62598f7e71ff763f4b5e7164
@base.ReleaseTracks(base.ReleaseTrack.ALPHA) <NEW_LINE> class CreateWithContainerAlpha(CreateWithContainer): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> _Args(parser, release_track=base.ReleaseTrack.ALPHA) <NEW_LINE> instances_flags.AddNetworkTierArgs(parser, instance=True) <NEW_L...
Alpha version of compute instances create-with-container command.
62598f7e1d351010ab8f3536
class account_partner_ledger(osv.osv_memory): <NEW_LINE> <INDENT> _name = 'account.partner.ledger' <NEW_LINE> _inherit = 'account.common.partner.report' <NEW_LINE> _description = 'Account Partner Ledger' <NEW_LINE> _columns = { 'initial_balance': fields.boolean('Include Initial Balances', help='If you selected to filte...
This wizard will provide the partner Ledger report by periods, between any two dates.
62598f7e097d151d1a2c0a1f
@enum.unique <NEW_LINE> class ChoiceEnum(enum.Enum): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def choices(cls) -> tuple: <NEW_LINE> <INDENT> return tuple((x.name, x.value) for x in cls)
Subclass of native python Enum class which can be used in Django models.
62598f7f30c21e258be98201
class Documentation(ElementRepresentative): <NEW_LINE> <INDENT> def __init__(self, xsdElement, parent): <NEW_LINE> <INDENT> ElementRepresentative.__init__(self, xsdElement, parent) <NEW_LINE> self.contType = self.getContainingType() <NEW_LINE> self.contType.__doc__ = xsdElement.text.strip() <NEW_LINE> <DEDENT> def getN...
The class for the Documentation tag. Subclass of *ElementRepresentative*.
62598f7f8e05c05ec3f6eb43
class CartesianBase(Vector3d): <NEW_LINE> <INDENT> def _applyHelmert(self, transform, inverse=False): <NEW_LINE> <INDENT> x, y, z = self.to3xyz() <NEW_LINE> return self.classof(*transform.transform(x, y, z, inverse)) <NEW_LINE> <DEDENT> def to3llh(self, datum=Datums.WGS84): <NEW_LINE> <INDENT> E = datum.ellipsoid <NEW_...
(INTERNAL) Base class for ellipsoidal I{Cartesian}.
62598f7fa79ad16197769a58
class LoggingEventHandler(PySpin.LoggingEventHandler): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(LoggingEventHandler, self).__init__() <NEW_LINE> <DEDENT> def OnLogEvent(self, logging_event_data): <NEW_LINE> <INDENT> print('--------Log Event Received----------') <NEW_LINE> print('Category: %s' %...
Although logging events are just as flexible and extensible as other events, they are generally only used for logging purposes, which is why a number of helpful functions that provide logging information have been added. Generally, if the purpose is not logging, one of the other event types is probably more appropriate...
62598f7f8e71fb1e983bb4b0
class Dispatcher: <NEW_LINE> <INDENT> def add_policies(self, sec, ptype, rules): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def remove_policies(self, sec, ptype, rules): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def remove_filtered_policy(self, sec, ptype, field_index, field_values): <NEW_LINE> <INDENT> pass <NEW_...
Dispatcher is the interface for pycasbin dispatcher
62598f7f3eb6a72ae038a03a
class fds_postfinance_historical_sepa(models.Model): <NEW_LINE> <INDENT> _name = 'fds.postfinance.historical.sepa' <NEW_LINE> fds_account_id = fields.Many2one( comodel_name='fds.postfinance.account', string='FDS account id', ondelete='restrict', readonly=True, help='file related to FDS account id' ) <NEW_LINE> payment_...
Add historical sepa to the model fds.postfinance.account
62598f7f91af0d3eaad39804
class NotPriceException(PriceServiceException): <NEW_LINE> <INDENT> pass
Исключение о том, что отсутсвует цена на розницу и опт
62598f7fd4950a0f3b110b31
class HomoskedasticWeightMatrix(object): <NEW_LINE> <INDENT> def __init__(self, center: bool = False, debiased: bool = False) -> None: <NEW_LINE> <INDENT> self._center = center <NEW_LINE> self._debiased = debiased <NEW_LINE> self._bandwidth: Optional[int] = 0 <NEW_LINE> <DEDENT> def weight_matrix( self, x: Float64Array...
Homoskedastic (unadjusted) weight estimation Parameters ---------- center : bool, optional Flag indicating whether to center the moment conditions by subtracting the mean before computing the weight matrix. debiased : bool, optional Flag indicating whether to use small-sample adjustments Notes ----- The w...
62598f7fd10714528d69d8c8
class ParentChooser(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, **kwargs): <NEW_LINE> <INDENT> _simuPOP_std.ParentChooser_swiginit(self, _simuPOP_std.new_ParentC...
Details: A parent chooser repeatedly chooses parent(s) from a parental population and pass them to an offspring generator. A parent chooser can select one or two parents, which should be matched by the offspring generator. This class is the base class of all parent choosers, and should not be used ...
62598f7fa4f1c619b294dfe6
class CheckboxSelectMultipleWithDataAttr_UserEdit(CheckboxSelectMultipleWithDataAttr): <NEW_LINE> <INDENT> def is_group_perm(self, checkbox): <NEW_LINE> <INDENT> if checkbox: <NEW_LINE> <INDENT> value = str(checkbox["value"]) <NEW_LINE> if value and int(value) in self.group_perms: <NEW_LINE> <INDENT> return True <NEW_L...
This is used for the UserForm. The permissions for the UserEdit form should only give the user the option to change user permissions and not group permissions. But at the same time we want the group permissions to show like it does in the User Detail (read only) view.
62598f7fe76e3b2f99fd842d
class List(Container, abc.MutableSequence): <NEW_LINE> <INDENT> def insert(self, index, item): <NEW_LINE> <INDENT> self._data.insert(index, self._prepare_item(index, item)) <NEW_LINE> self.__log__.append(ListInsert(index=index, value=item)) <NEW_LINE> <DEDENT> def append(self, item): <NEW_LINE> <INDENT> index = len(sel...
Container for list.
62598f7fd99f1b3c44d050a6
class Transaction(Printable): <NEW_LINE> <INDENT> def __init__(self, sender, recipient, signature, amount): <NEW_LINE> <INDENT> self.sender = sender <NEW_LINE> self.recipient = recipient <NEW_LINE> self.amount = amount <NEW_LINE> self.signature = signature <NEW_LINE> <DEDENT> def to_ordered_dict(self): <NEW_LINE> <INDE...
A transaction which can be added to a block in the blockchain. :argument: The sender of the coins. :argument: The recipient of the coins. :argument: The signature of the transaction. :argument: The amount of coins sent.
62598f7fc432627299fa29c8
class IGeotagSingleField(IField): <NEW_LINE> <INDENT> pass
The field interface
62598f7f30dc7b766599f253
class ConfigException(Exception): <NEW_LINE> <INDENT> pass
Configuration error.
62598f7fd99f1b3c44d050a7
class TypePagedQueryResponse(_BaseType): <NEW_LINE> <INDENT> limit: int <NEW_LINE> offset: int <NEW_LINE> count: int <NEW_LINE> total: typing.Optional[int] <NEW_LINE> results: typing.List["Type"] <NEW_LINE> def __init__( self, *, limit: int, offset: int, count: int, total: typing.Optional[int] = None, results: typing.L...
[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [Types](ctp:api:type:Type).
62598f7fec188e330fdf8299
class CheckBox(Control): <NEW_LINE> <INDENT> CMD = cmds.checkBox <NEW_LINE> _ATTRIBS = ['recomputeSize', 'align', 'editable', 'value', 'label'] <NEW_LINE> _CALLBACKS = ['changeCommand', 'offCommand', 'onCommand'] <NEW_LINE> _BIND_TRIGGER = 'changeCommand' <NEW_LINE> _BIND_SRC = 'value' <NEW_LINE> _BIND_TGT = 'value'
Wrapper class for cmds.checkBox
62598f7f07d97122c421669c
class TestChains(unittest.TestCase): <NEW_LINE> <INDENT> def test_dictsource(self): <NEW_LINE> <INDENT> from pymads.sources.dict import DictSource <NEW_LINE> hostname = 'example.com' <NEW_LINE> ip_addr = '9.9.9.9' <NEW_LINE> record = Record(hostname, ip_addr) <NEW_LINE> source = DictSource({hostname: [record]}) <NEW...
Test various aspects of chains.
62598f7fa79ad16197769a5a
class DescStatsSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = DescStats <NEW_LINE> fields = '__all__'
Serializer for hardware description
62598f7fdc8b845886d52fb0
class EDTestSuitePluginsExecuteMatrix(EDTestSuite): <NEW_LINE> <INDENT> def process(self): <NEW_LINE> <INDENT> self.addTestCaseFromName("EDTestCasePluginExecuteExecMatrixWritev1_0") <NEW_LINE> self.addTestCaseFromName("EDTestCasePluginExecuteExecMatrixReadv1_0") <NEW_LINE> self.addTestCaseFromName("EDTestCasePluginExec...
This is the test suite for EDNA plugin MatrixReadv1_0 It will run subsequently all unit tests and execution tests.
62598f7f1d351010ab8f3539
class ListRepliesResponse: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'result': 'ListRepliesResult', 'status': 'str', 'error_message': 'str', 'composedOn': 'long' } <NEW_LINE> self.result = None <NEW_LINE> self.status = None <NEW_LINE> self.error_message = None <NEW_LINE> self.com...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f7ff8510a7c17d7de75
class TestPaginatedResultsOfEvaluation(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return Pa...
PaginatedResultsOfEvaluation unit test stubs
62598f7f30c21e258be98204
class StaffViewToggleTest(CourseWithoutContentGroupsTest): <NEW_LINE> <INDENT> def test_instructor_tab_visibility(self): <NEW_LINE> <INDENT> course_page = self._goto_staff_page() <NEW_LINE> self.assertTrue(course_page.has_tab('Instructor')) <NEW_LINE> course_page.set_staff_view_mode('Student') <NEW_LINE> self.assertEqu...
Tests for the staff view toggle button.
62598f7f73bcbd0ca4bc9c4b
class Sinusoidal(Projection): <NEW_LINE> <INDENT> def __init__(self, central_longitude=0.0, false_easting=0.0, false_northing=0.0, globe=None): <NEW_LINE> <INDENT> proj4_params = [('proj', 'sinu'), ('lon_0', central_longitude), ('x_0', false_easting), ('y_0', false_northing)] <NEW_LINE> super(Sinusoidal, self).__init__...
A Sinusoidal projection. This projection is equal-area.
62598f7fa17c0f6771d5bc3e
class SettingsGroup(): <NEW_LINE> <INDENT> def __init__(self, *settings): <NEW_LINE> <INDENT> self.key_list = list(settings) <NEW_LINE> <DEDENT> def apply(self, view, *values): <NEW_LINE> <INDENT> if len(values) != len(self.key_list): <NEW_LINE> <INDENT> raise IndexError("Expected %d settings" % len(self.key_list)) <NE...
A simple utility class for applying, removing, fetching and testing a group of settings in a view when all settings must be applied together to take effect.
62598f7fbaa26c4b54d4ecae
class TreeClimber(object): <NEW_LINE> <INDENT> def __init__(self,seed,sibling_depth=100): <NEW_LINE> <INDENT> self.logger = logging.getLogger(type(self).__name__) <NEW_LINE> try: <NEW_LINE> <INDENT> wikipedia.page(seed) <NEW_LINE> self.seed = seed <NEW_LINE> <DEDENT> except wikipedia.PageError: <NEW_LINE> <INDENT> self...
Traverse wiki tree, grabbing parents and children
62598f7f66656f66f7d59def
class QwebCollector(Collector): <NEW_LINE> <INDENT> name = 'qweb' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.events = [] <NEW_LINE> def hook(event, sql_log_count, **kwargs): <NEW_LINE> <INDENT> self.events.append((event, kwargs, sql_log_count, time.time())) <NEW_LINE> <DEDENT>...
Record qweb execution with directive trace.
62598f7fa4f1c619b294dfe8
class AllNodesReadyEventModel(BaseDriverEventModel): <NEW_LINE> <INDENT> event: Literal["all nodes ready"]
Model for `all nodes ready` event data.
62598f7fec188e330fdf829b
class _StatsLoggingClient(statsd.StatsClient): <NEW_LINE> <INDENT> def __init__(self, host=None, port=None, prefix=None, maxudpsize=512): <NEW_LINE> <INDENT> self._addr = (host, port,) <NEW_LINE> self._logger = logging.getLogger(STATS_LOGGER_NAME) <NEW_LINE> self._prefix = prefix <NEW_LINE> self._maxudpsize = maxudpsiz...
This provides the same interface as statsd.StatsClient to make a logging compatible version of the statistics capturing methods.
62598f7fa05bb46b3848a277
class UnlimitedGame(game_regular.RegularGame): <NEW_LINE> <INDENT> GAME_NAME = "Unlimited" <NEW_LINE> def __init__(self, size=(8, 8), types=4, min_group=3, animation=True, autofill=True): <NEW_LINE> <INDENT> super().__init__(size=size, types=types, min_group=min_group, animation=animation, autofill=autofill) <NEW_LINE>...
Unlimited Lolo game. The goal of the game is to form the largest possible tile.
62598f7fbde94217f3707364
class DocParse: <NEW_LINE> <INDENT> def __init__(self, chemin): <NEW_LINE> <INDENT> l = list() <NEW_LINE> tree = minidom.parse(chemin) <NEW_LINE> root = tree.documentElement <NEW_LINE> docno = "" <NEW_LINE> fileid = "" <NEW_LINE> first = "" <NEW_LINE> second = "" <NEW_LINE> for current in root.getElementsByTagName("DOC...
Parse les documents initialement en xml
62598f7f004d5f362081ecf9
class VoiceListener(PySide2.QtCore.QObject): <NEW_LINE> <INDENT> @PySide2.QtCore.Slot() <NEW_LINE> def on_start_listen(self): <NEW_LINE> <INDENT> LOGGER.info("Listening for command") <NEW_LINE> <DEDENT> @PySide2.QtCore.Slot() <NEW_LINE> def on_google_api_not_understand(self): <NEW_LINE> <INDENT> LOGGER.info("Google Spe...
Class which contains the slots for the demo application
62598f7f7b25080760ed6ea0
class ViafProvider(BaseProvider): <NEW_LINE> <INDENT> pid_type = 'viaf' <NEW_LINE> pid_identifier = ViafIdentifier.__tablename__ <NEW_LINE> pid_provider = None <NEW_LINE> default_status = PIDStatus.REGISTERED
VIAF identifier provider.
62598f7f8e05c05ec3f6eb45
class Match(models.Model): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return f'{self.date} ({self.team_a} - {self.team_b})' <NEW_LINE> <DEDENT> date = models.DateField(auto_now=True) <NEW_LINE> stadium = models.ForeignKey(Field, on_delete=models.CASCADE) <NEW_LINE> team_a = models.ForeignKey(Team, on_de...
Details for a single match
62598f7fa79ad16197769a5c
class PacketCaptureResult(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'target': {'required': True}, 'storage_location': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'etag': {'key': 'e...
Information about packet capture session. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the packet capture session. :vartype name: str :ivar id: ID of the packet capture operation. :vartype id: str :param etag: Default value: "A unique read-only string th...
62598f7f8c3a8732951f5f43
class Amenity(BaseModel): <NEW_LINE> <INDENT> name = "" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs)
Amenity class attributes and initialization
62598f7f8da39b475be02be1
class OpportunityHandler(SaleCommonHandler): <NEW_LINE> <INDENT> model = Opportunity <NEW_LINE> form = OpportunityForm <NEW_LINE> fields = ('id',) + OpportunityForm._meta.fields <NEW_LINE> @staticmethod <NEW_LINE> def resource_uri(): <NEW_LINE> <INDENT> return ('api_sales_opportunities', ['id']) <NEW_LINE> <DEDENT> def...
Entrypoint for Opportunity model.
62598f7f45492302aabfbedb
class Display(editwindow.EditWindow): <NEW_LINE> <INDENT> def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.CLIP_CHILDREN | wx.SUNKEN_BORDER, static=False): <NEW_LINE> <INDENT> editwindow.EditWindow.__init__(self, parent, id, pos, size, style) <NEW_LINE> self.SetReadOnly(True) <NEW...
STC used to display an object using Pretty Print.
62598f7f097d151d1a2c0a23
class UnionFind: <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> self.parent_tracker = list(range(size)) <NEW_LINE> self.component_size = [1] * size <NEW_LINE> <DEDENT> def find(self, x): <NEW_LINE> <INDENT> parent = x <NEW_LINE> while parent != self.parent_tracker[parent]:...
List implementation of a union find data structure. The data structure tracks the parents of a list of elements and component size of each union. Args: size (int): total number of nodes. They will be numbered 0 to size-1.
62598f7f7c178a314d78cea7
class TestImage(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testImage(self): <NEW_LINE> <INDENT> pass
Image unit test stubs
62598f7f596a89723612766e
class Error(exceptions.Error): <NEW_LINE> <INDENT> pass
Base exception for all sql errors.
62598f7f5f7d997b871f90d6
class TitleViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Title.objects.all().annotate(rating=Avg("reviews__score")) <NEW_LINE> permission_classes = [AdminPermission | ReadOnlyPermission] <NEW_LINE> http_method_names = ["get", "post", "delete", "patch"] <NEW_LINE> filterset_class = TitleFilter <NEW_LINE...
Класс для работы с произведениями.
62598f7f23e79379d538bef6
class warn_deprecated(object): <NEW_LINE> <INDENT> def __init__(self, message, deprecation_class): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> self.deprecation_class = deprecation_class <NEW_LINE> <DEDENT> def __call__(self, f): <NEW_LINE> <INDENT> def wrapped(*args, **kwargs): <NEW_LINE> <INDENT> warnings.wa...
Simple decorator to mark a function deprecated. To actually see the messages you have to enable them in python either through the cmd line python -Wd or programmatically through import warnings warnings.simplefilter('default', deprecation_class)
62598f7f21bff66bcd722665
class Solution: <NEW_LINE> <INDENT> def hashCode(self, key, HASH_SIZE): <NEW_LINE> <INDENT> aa = list(key) <NEW_LINE> aa.reverse() <NEW_LINE> value = ord(aa[0]) <NEW_LINE> base = 1 <NEW_LINE> for i in range(1, len(key)): <NEW_LINE> <INDENT> number = ord(aa[i]) <NEW_LINE> value = value + (33 * base * number) <NEW_LINE> ...
@param key: A string you should hash @param HASH_SIZE: An integer @return: An integer
62598f7fa4f1c619b294dfea
class FactTable(object): <NEW_LINE> <INDENT> def __init__(self, name, keyrefs, measures=(), targetconnection=None): <NEW_LINE> <INDENT> if targetconnection is None: <NEW_LINE> <INDENT> targetconnection = pygrametl.getdefaulttargetconnection() <NEW_LINE> <DEDENT> self.targetconnection = targetconnection <NEW_LINE> self....
A class for accessing a fact table in the DW.
62598f7fe76e3b2f99fd8431