code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class InvalidObjectException(TException): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'message', None, None, ), ) <NEW_LINE> def __init__(self, message=None,): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol....
Attributes: - message
6259903c8e05c05ec3f6f764
class SchoolGraph(models.Model): <NEW_LINE> <INDENT> school = models.OneToOneField(School, primary_key=True, related_name='graph') <NEW_LINE> up_votes = models.IntegerField(default=0) <NEW_LINE> down_votes = models.IntegerField(default=0) <NEW_LINE> coders_count = models.IntegerField(default=0) <NEW_LINE> updated_on = ...
School graph of user activaties, Separate graph allows faster loading while updates runs on this table
6259903c63b5f9789fe8637f
class GetOrderBook(View): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get(request, base_currency, relative_currency): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> pair = CurrencyPair.objects.get( base_currency__code__iexact=base_currency, relative_currency__code__iexact=relative_currency ) <NEW_LINE> <DEDENT> exce...
Show open and partial orders on the books for the supplied pair.
6259903c004d5f362081f8ee
class Element: <NEW_LINE> <INDENT> def setDegree(self, deg): <NEW_LINE> <INDENT> self.degree = deg <NEW_LINE> self.ndof = 1 <NEW_LINE> <DEDENT> def getBasisFunctions(self, x, y, bvals): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getBasisGradients(self, x, y, bgrvals): <NEW_LINE> <INDENT> pass
@brief Abstract class for a finite element with basis functions defined on the reference element. Members are nnodel: number of nodes in the element phynodes: locations of physical nodes
6259903c26238365f5fadd6a
class spinner(threading.Thread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if os.name == 'posix': <NEW_LINE> <INDENT> self.chars = (unicodedata.lookup('FIGURE DASH'),'\\ ','| ','/ ') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.chars = ('-','\\ ','| ','/ ') <NEW_LINE> <DEDENT> self.running = Tru...
Simple rotating spinner in the terminal.
6259903cb830903b9686ed83
class AdbShell(object): <NEW_LINE> <INDENT> def __init__(self, process, logger): <NEW_LINE> <INDENT> self.logger = logger <NEW_LINE> self.p = process <NEW_LINE> self.stdout_q = Queue() <NEW_LINE> self.stdout_stop = Event() <NEW_LINE> self.stdout_t = Thread(target=_enqueue_output, args=(self.p.stdout, self.stdout_q, sel...
AdbShell, offer easy write/read command for short adb shell process. It should be created by AdbWrapper.shell_unblock This class can only handle short shell communicate, all stdout/stderr will in memory
6259903c63f4b57ef008667e
class NestedIterator(object): <NEW_LINE> <INDENT> def __init__(self, nestedList): <NEW_LINE> <INDENT> self.stack = nestedList[::-1] <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> return self.stack.pop().getInteger() <NEW_LINE> <DEDENT> def hasNext(self): <NEW_LINE> <INDENT> while self.stack: <NEW_LINE> <INDENT...
[1,[4,[6]]] [[4,[6]], 1] 1 [[4,[6]]] [[6], 4] 4 [[6]] [6] 6
6259903c24f1403a926861d7
class NormalizationLayer(NeuralNetworkLayer): <NEW_LINE> <INDENT> def __init__(self, name = None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def initialize(self, network, previous): <NEW_LINE> <INDENT> self.name = create_name("normalize", self.name, network.name_context) <NEW_LINE> self.data_source = pre...
Data normalization layer. A normalization layer is used to make the input data zero-mean and unit-variance. When created, it reads the entire data set from the data source and computes the mean and variance, and applies a linear transformation to the data in order to make it zero mean and unit variance. Normalizatio...
6259903c94891a1f408ba001
class RegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.RegexField(regex=r'^\w+$', max_length=30, widget=forms.TextInput(attrs=attrs_dict), label=u'username') <NEW_LINE> email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=75)), label=u'email address') <NEW_LINE> password1 =...
Form for registering a new user account. Validates that the requested username is not already in use, and requires the password to be entered twice to catch typos. Subclasses should feel free to add any additional validation they need, but should either preserve the base ``save()`` or implement a ``save()`` which acc...
6259903c5e10d32532ce420d
class Migration(migrations.Migration): <NEW_LINE> <INDENT> dependencies = [ ('logger', '0015_add_delete_data_permission'), ] <NEW_LINE> operations = [ migrations.AlterModelOptions( name='xform', options={ 'ordering': ('id_string',), 'verbose_name': 'XForm', 'verbose_name_plural': 'XForms', 'permissions': ( ('report_xfo...
Re-apply parts of `0015_add_delete_data_permission.py` for upgrade of existing installations. See `0015_add_delete_data_permission.py` for details
6259903c0a366e3fb87ddbfa
class stateManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.parmDict = { 'Vk': 0.0, 'Inj_I': 0.0, 'Switch': 0, 'Tkm': 0.0, 'Flows': 0.0, 'Vm': 0.0, 'Ing_O': 0.0 } <NEW_LINE> self.memDict = { 'ff00': 0, 'ff01': 0, 'ff02': 0, 'ff03': 0, 'ff04': 0, 'ff05': 0, 'f...
Manager module to save the current system state. Add the parameter calculation formula in this class.
6259903c24f1403a926861d8
class APIResourceNotFoundError(APIError): <NEW_LINE> <INDENT> def __init__(self, field, message=''): <NEW_LINE> <INDENT> super(APIResourceNotFoundError, self).__init__('value:notfound', field, message)
Indicate the resources was not found. The data specifies the resource name.
6259903c26068e7796d4db5d
class ApiEndpointServiceServicer(object): <NEW_LINE> <INDENT> def Get(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> def List(self, ...
Missing associated documentation comment in .proto file.
6259903c8c3a8732951f776e
class ViewportMenu(wx.Menu): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> wx.Menu.__init__(self) <NEW_LINE> <DEDENT> def addItem(self, name, parent = None, call = None, id = None): <NEW_LINE> <INDENT> if id is None: id = wx.NewId() <NEW_LINE> if parent is None: parent = self <NEW_LINE> item = wx.MenuItem...
Represents a menu that appears when right-clicking a viewport.
6259903c287bf620b6272e02
class Host(object): <NEW_LINE> <INDENT> def __init__(self, name, fqdn, ssh_port, memberof_hostgroups): <NEW_LINE> <INDENT> self.fqdn = fqdn <NEW_LINE> self.name = name <NEW_LINE> self.ssh_port = ssh_port <NEW_LINE> self.hostgroups = memberof_hostgroups <NEW_LINE> <DEDENT> def equal(self, server): <NEW_LINE> <INDENT> if...
Class representing a single server entry, each Host/server has to be a member one or more hostgroup. Servers have the following attributes : Attributes fqdn: fully qualified domain name ssh_port: server ssh port , default is 22 hostgroups: list of hostgroups this server is part of
6259903cb57a9660fecd2c92
class Settings(dict): <NEW_LINE> <INDENT> def update(self, other): <NEW_LINE> <INDENT> _merge_dicts(self, other)
Special mergable dictionary for eve settings. Used as config keeper returned by method :func:`EveMongoengine.create_settings`. The difference between Settings object and default dict is that update() method in Settings does not overwrite the key when value is dictionary, but tries to merge inner dicts in an intelligen...
6259903c8e05c05ec3f6f766
class SessionUnitTests(unittest.TestCase): <NEW_LINE> <INDENT> ucs_session = UCSSession() <NEW_LINE> handle, err = ucs_session.login("admin", "nbv12345", "172.28.225.163") <NEW_LINE> def test_serverlist(self): <NEW_LINE> <INDENT> session = UCSSession() <NEW_LINE> msg = session.ensure_version(self.handle) <NEW_LINE> ass...
Tests for `ucs_server.py`.
6259903c63b5f9789fe86383
class Url(dbs.Model): <NEW_LINE> <INDENT> __tablename__ = 'url' <NEW_LINE> __table_args__ = ( dbs.UniqueConstraint( 'url' ), ) <NEW_LINE> id = dbs.Column(dbs.Integer, primary_key=True) <NEW_LINE> url = dbs.Column(dbs.String, nullable=False) <NEW_LINE> shortcode = dbs.relationship('Shortcode', uselist=False, back_popula...
This is the main logical entrypoint model for the url shortening application. As we want to prevent database pollution with multiple shortcodes for the same URL, the Url is the parent model for all underlying database models. For non time consuming development reasons, only One-to-One relations are set.
6259903cdc8b845886d547cc
class Dialog(QDialog): <NEW_LINE> <INDENT> def __init__(self, ui): <NEW_LINE> <INDENT> super(Dialog, self).__init__() <NEW_LINE> self.ui = ui <NEW_LINE> <DEDENT> def closeEvent(self, event): <NEW_LINE> <INDENT> reply = QMessageBox.question(self, 'TCP网络测试助手', "是否要退出应用程序?", QMessageBox.Yes | QMessageBox.No, QMessageBox.N...
对QDialog类重写,实现一些功能
6259903cd53ae8145f91967b
class RequestLog(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.status = 200 <NEW_LINE> self.response_size = None <NEW_LINE> self.end_time = None <NEW_LINE> self.app_logs = [] <NEW_LINE> self.finished = True
Simple mock of logservice.RequestLog.
6259903c6fece00bbacccbc5
class CSBoardManager: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.devices = [] <NEW_LINE> <DEDENT> def appendDevices(self, inputs): <NEW_LINE> <INDENT> self.devices = self.devices + inputs <NEW_LINE> <DEDENT> def setDevices(self, inputs): <NEW_LINE> <INDENT> self.devices = inputs <NEW_LINE> <DEDENT...
Base class for managing connection between the board and sensors, switches etc.
6259903c8a349b6b4368745c
class DrawCanvas(tk.Canvas): <NEW_LINE> <INDENT> def __init__(self, master=None, command=None, shape='rectangle', multiple=False, **kwargs): <NEW_LINE> <INDENT> super().__init__(master, **kwargs) <NEW_LINE> self.command = command <NEW_LINE> self.shape_cmds = { 'rectangle': self.create_rectangle, 'square': self.create_r...
A canvas that will let you draw a shape on it by clicking and dragging the mouse. The Canvas acts as a normal canvas in every other way. :shape='rectangle': Can be 'rectangle', 'oval', or 'line' :command=None: the function to call when the mouse is released. Will be passed the bounding box as an argument :multiple=F...
6259903cac7a0e7691f73700
class ClienteServicosUpdateView( LoginRequiredMixin, HasRoleMixin, SuccessMessageMixin, UpdateView ): <NEW_LINE> <INDENT> allowed_roles = ["oficial", "contador"] <NEW_LINE> model = models.ClienteServicos <NEW_LINE> form_class = forms.ClienteServicosForm <NEW_LINE> template_name = "cliente_servicos_edit.html" <NEW_LINE>...
Altera um serviço ao cliente
6259903c66673b3332c3160f
class ClozeQuery: <NEW_LINE> <INDENT> def __init__(self, context, start, end, answer, answer_word, candidates, support=None): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.start = start <NEW_LINE> self.end = end <NEW_LINE> self.answer = answer <NEW_LINE> self.answer_word = answer_word <NEW_LINE> self.candi...
Cloze-queries are fully defined by a a span-of-interest (start and end) within a certain context. Note, the qa model embeds a query by its surrounding context (everything outside the span). If you want the model to also encode the span itself, simply use the negative span, i.e. swap start and end. If answer is None, on...
6259903ccad5886f8bdc5988
class Fetcher(object): <NEW_LINE> <INDENT> def __init__(self, constr): <NEW_LINE> <INDENT> self.constr = constr <NEW_LINE> self.conerr = 'Fetcher: Cannot connect with the supplied Connection String.' <NEW_LINE> self.sqlerr = 'Fetcher: Error executing the supplied SQL.' <NEW_LINE> <DEDENT> def fetch(self, fetchsql): <NE...
Simple pyodbc-based SQL Server data grabber. Based off of fetchdata.py, except much simpler.
6259903cd4950a0f3b11174c
class QCellToolBar(QtGui.QToolBar): <NEW_LINE> <INDENT> def __init__(self, sheet): <NEW_LINE> <INDENT> QtGui.QToolBar.__init__(self,sheet) <NEW_LINE> self.setOrientation(QtCore.Qt.Horizontal) <NEW_LINE> self.sheet = sheet <NEW_LINE> self.row = -1 <NEW_LINE> self.col = -1 <NEW_LINE> self.layout().setMargin(0) <NEW_LINE>...
CellToolBar is inherited from QToolBar with some functionalities for interacting with CellHelpers
6259903c711fe17d825e15a8
class Mask(layers.Layer): <NEW_LINE> <INDENT> def call(self, inputs, **kwargs): <NEW_LINE> <INDENT> if type(inputs) is list: <NEW_LINE> <INDENT> assert len(inputs) == 2 <NEW_LINE> inputs, mask = inputs <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> x = K.sqrt(K.sum(K.square(inputs), -1)) <NEW_LINE> mask = K.one_hot(indi...
Mask a Tensor with shape=[None, num_capsule, dim_vector] either by the capsule with max length or by an additional input mask. Except the max-length capsule (or specified capsule), all vectors are masked to zeros. Then flatten the masked Tensor. For example: ``` x = keras.layers.Input(shape=[8, 3, 2]) # batch...
6259903c21a7993f00c67186
class AdminSalesByOrganizersList(ResourceList): <NEW_LINE> <INDENT> def query(self, _): <NEW_LINE> <INDENT> query_ = self.session.query(User) <NEW_LINE> query_ = query_.join(UsersEventsRoles).filter( or_(Role.name == 'organizer', Role.name == 'owner') ) <NEW_LINE> query_ = query_.join(Event).outerjoin(Order).outerjoin(...
Resource for sales by organizers. Joins organizers with events and orders and subsequently accumulates sales by status
6259903c8e05c05ec3f6f767
class FuncSource: <NEW_LINE> <INDENT> blank_rx = re.compile(r"^\s*finally:\s*(#.*)?$") <NEW_LINE> def __init__(self, fn): <NEW_LINE> <INDENT> self.fn = fn <NEW_LINE> self.filename = inspect.getsourcefile(fn) <NEW_LINE> self.sourcelines = {} <NEW_LINE> self.source = [] <NEW_LINE> self.firstlineno = self.firstcodelineno ...
Source code annotator for a function.
6259903c0a366e3fb87ddbfe
@pytest.mark.components <NEW_LINE> @pytest.allure.story('Clients') <NEW_LINE> @pytest.allure.feature('POST') <NEW_LINE> class Test_PFE_Components(object): <NEW_LINE> <INDENT> @pytest.allure.link('https://jira.qumu.com/browse/TC-43057') <NEW_LINE> @pytest.mark.Clients <NEW_LINE> @pytest.mark.POST <NEW_LINE> def test_TC_...
PFE Clients test cases.
6259903c23849d37ff8522d2
class AccessDescriptor(ImmutableRecord): <NEW_LINE> <INDENT> __slots__ = [ "identifier", "storage_axis_exprs", ]
.. attribute:: identifier An identifier under user control, used to connect this access descriptor to the access that generated it. Any Python value.
6259903cd99f1b3c44d068c0
class WeekendFilter (object): <NEW_LINE> <INDENT> def __init__ (self, timezone=None, weekend=None, weekstart=None): <NEW_LINE> <INDENT> self._timezone = pytz.timezone(timezone) <NEW_LINE> week_ordinal_map = dict(Monday=0, Tuesday=1, Wednesday=2, Thursday=3, Friday=4, Saturday=5, Sunday=6) <NEW_LINE> self._weekend_day =...
Filter ticks within the weekend boundary of a given timezone and market
6259903cbaa26c4b54d504c2
class RouterInterface(pulumi.CustomResource): <NEW_LINE> <INDENT> def __init__(__self__, __name__, __opts__=None, port_id=None, region=None, router_id=None, subnet_id=None): <NEW_LINE> <INDENT> if not __name__: <NEW_LINE> <INDENT> raise TypeError('Missing resource name argument (for URN creation)') <NEW_LINE> <DEDENT> ...
Manages a V2 router interface resource within OpenStack.
6259903c379a373c97d9a242
class OpError(Exception): <NEW_LINE> <INDENT> def __init__(self, node_def, op, message, error_code): <NEW_LINE> <INDENT> super(OpError, self).__init__() <NEW_LINE> self._message = message <NEW_LINE> self._node_def = node_def <NEW_LINE> self._op = op <NEW_LINE> self._error_code = error_code <NEW_LINE> <DEDENT> @property...
A generic error that is raised when TensorFlow execution fails. Whenever possible, the session will raise a more specific subclass of `OpError` from the `tf.errors` module. @@op @@node_def
6259903c287bf620b6272e05
class ParametersForm(param_forms.AdminParametersForm): <NEW_LINE> <INDENT> app = "modoboa_rspamd" <NEW_LINE> dkim_settings_sep = form_utils.SeparatorField( label=ugettext_lazy("DKIM signing settings")) <NEW_LINE> path_map_path = forms.CharField( label=ugettext_lazy("Path map path"), initial="", help_text=ugettext_lazy(...
Extension settings.
6259903c3c8af77a43b68849
class ContentFilter(object): <NEW_LINE> <INDENT> def __init__( self, workspace_id: int = None, parent_id: int = None, show_archived: int = 0, show_deleted: int = 0, show_active: int = 1, content_type: str = None, label: str = None, offset: int = None, limit: int = None, ) -> None: <NEW_LINE> <INDENT> self.parent_id = p...
Content filter model
6259903c94891a1f408ba004
class LocDict(object): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = dict() <NEW_LINE> self.locales = list() <NEW_LINE> if isinstance(data, dict): <NEW_LINE> <INDENT> self._init_with_dict(data) <NEW_LINE> <DEDENT> elif isinstance(data, (tuple, list)): <NEW_LINE> <INDENT> self._init_with_...
Localization Dictionary. Assumptions: 1. There's no duplicate words in single Locale. 2. There's no duplicate words globally in all Locales. :param data: a dict, key = locale code, value = bi-direction dict. key value definition for the bi-direction dict is, key = localized text, value = number index. :param...
6259903c15baa723494631ab
@attr.s(frozen=True, auto_attribs=True) <NEW_LINE> class Template: <NEW_LINE> <INDENT> string: str <NEW_LINE> _template: jinja2.Template = attr.ib(init=False, eq=False) <NEW_LINE> variables: FrozenSet[str] = attr.ib(init=False) <NEW_LINE> @_template.default <NEW_LINE> def __set_template(self): <NEW_LINE> <INDENT> retur...
A container for a Jinja2 template. Exposes the variables found in the template through the variables property.
6259903c004d5f362081f8f2
class WorkerError(Exception): <NEW_LINE> <INDENT> pass
Base class for all worker exceptions.
6259903c5e10d32532ce4210
class Vimball(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> if not os.path.exists(path): <NEW_LINE> <INDENT> raise ArchiveError(f"path doesn't exist: {path!r}") <NEW_LINE> <DEDENT> self.path = path <NEW_LINE> _filebase, ext = os.path.splitext(path) <NEW_LINE> if ext == ".gz": <NEW_LINE> <IN...
Vimball archive format.
6259903c1d351010ab8f4d37
class GameNumPy(BaseGameNumPy): <NEW_LINE> <INDENT> def _init(self): <NEW_LINE> <INDENT> super(GameNumPy, self)._init() <NEW_LINE> self.fates = np.zeros((self.width, self.height), dtype=np.int8) <NEW_LINE> self.fates.fill(Fate.StayDead) <NEW_LINE> self.ages = np.zeros((self.width, self.height), dtype=np.int64) <NEW_LIN...
Full-featured NumPy/SciPy-based implementation of the Game of Life.
6259903c6fece00bbacccbca
class Sinusoidal(VoltageSource): <NEW_LINE> <INDENT> def __init__(self, name, node_plus, node_minus, dc_offset=0, offset=0, amplitude=1, frequency=50, delay=0, damping_factor=0): <NEW_LINE> <INDENT> super(Sinusoidal, self).__init__(name, node_plus, node_minus) <NEW_LINE> self.dc_offset = dc_offset <NEW_LINE> self.offse...
SIN waveform:: SIN ( VO VA FREQ TD THETA )
6259903c15baa723494631ac
class TextAnalyticsAPIConfiguration(Configuration): <NEW_LINE> <INDENT> def __init__( self, azure_region, credentials): <NEW_LINE> <INDENT> if azure_region is None: <NEW_LINE> <INDENT> raise ValueError("Parameter 'azure_region' must not be None.") <NEW_LINE> <DEDENT> if credentials is None: <NEW_LINE> <INDENT> raise Va...
Configuration for TextAnalyticsAPI Note that all parameters used to create this instance are saved as instance attributes. :param azure_region: Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', ...
6259903c26238365f5fadd72
class noenvelope(Envelope): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> botslib.tryrunscript(self.userscript,self.scriptname,'ta_infocontent',ta_info=self.ta_info) <NEW_LINE> if len(self.ta_list) > 1: <NEW_LINE> <INDENT> tofile = botslib.opendata(self.ta_info['filename'],'wb',self.ta_info['charset']) <NEW_LI...
Only copies the input files to one output file.
6259903c24f1403a926861db
class SessionAttributeUtil: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get(request: HttpRequest, attr_name: SessionAttribute, default_value): <NEW_LINE> <INDENT> if attr_name.value not in request.session: <NEW_LINE> <INDENT> request.session[attr_name.value] = default_value <NEW_LINE> <DEDENT> return request.sessi...
Class created to force using SessionAttribute enum for naming session attributes
6259903c8c3a8732951f7774
class XiaoGimbutas(object): <NEW_LINE> <INDENT> def __init__(self, degree, symbolic=False): <NEW_LINE> <INDENT> self.name = "XG({})".format(degree) <NEW_LINE> this_dir = os.path.dirname(os.path.realpath(__file__)) <NEW_LINE> filename = "xg{:02d}.json".format(degree) <NEW_LINE> with open(os.path.join(this_dir, filename)...
Hong Xiao, Zydrunas Gimbutas, A numerical algorithm for the construction of efficient quadrature rules in two and higher dimensions, Computers & Mathematics with Applications, Volume 59, Issue 2, January 2010, Pages 663–676, <https://doi.org/10.1016/j.camwa.2009.10.027>. Abstract: We present a numerical algorithm for ...
6259903c3c8af77a43b6884a
class BackendAdapter(ConnectorUnit): <NEW_LINE> <INDENT> _model_name = None
Base Backend Adapter for the connectors
6259903cd4950a0f3b11174e
class ZFunction(SFunction): <NEW_LINE> <INDENT> def __init__(self,a=0.0,delta=1.0): <NEW_LINE> <INDENT> super(ZFunction, self).__init__(a,delta) <NEW_LINE> <DEDENT> def __call__(self,x): <NEW_LINE> <INDENT> return 1.0 - SFunction.__call__(self,x)
Realize a Z-shaped fuzzy set:: __ \ |\ | \ | |\ | | \__ | a | | | delta see also U{http://pyfuzzy.sourceforge.net/test/set/ZFunction.png} @ivar a: center of set. @type a: float @ivar delta: absolute distance between x-values for minimum ...
6259903c21bff66bcd723e86
class LogMetric(messages.Message): <NEW_LINE> <INDENT> description = messages.StringField(1) <NEW_LINE> filter = messages.StringField(2) <NEW_LINE> name = messages.StringField(3)
An object that describes a collected metric associated with a particular log. Each LogEntry that matches the filter in this metric will increase the value of the metric by 1. Fields: description: Description of this metric. filter: A filter that is applied to a LogEntry that determines whether the given LogEnt...
6259903c23e79379d538d71c
class DummyBot(interwikidata.IWBot): <NEW_LINE> <INDENT> def put_current(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def create_item(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def try_to_add(self): <NEW_LINE> <INDENT> return None
A dummy bot to prevent editing in production wikis.
6259903c82261d6c527307d2
class AbortError(Exception): <NEW_LINE> <INDENT> def __init__(self, msg, temp_file_path): <NEW_LINE> <INDENT> self.temp_file_path = temp_file_path <NEW_LINE> super(AbortError, self).__init__(msg)
Exception thrown when a renaming operation is been started but cannot be completed, and the image files have necessarily been left in an intermediate state. The temp_file_path member is the full path to the temporary folder which still contains isolated but un-renamed files.
6259903cd164cc6175822193
class Preferences(GObject.Object, PeasGtk.Configurable): <NEW_LINE> <INDENT> __gtype_name__ = 'RhythmwebPreferences' <NEW_LINE> object = GObject.property(type=GObject.Object) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.rhythmweb") <NEW_LINE> GObject.Objec...
Preferences for the Rhythmweb Plugin. It holds the settings for the plugin and also is the responsible of creating the preferences dialog.
6259903c8da39b475be0440c
class ControllerBase(object): <NEW_LINE> <INDENT> def __init__(self, driver): <NEW_LINE> <INDENT> self.driver = driver
Top-level class for controllers. :param driver: Instance of the driver instantiating this controller.
6259903ca4f1c619b294f796
@attrs.define(kw_only=True) <NEW_LINE> class ProfileComponent: <NEW_LINE> <INDENT> profiles: typing.Optional[profile.Profile] <NEW_LINE> profile_progression: typing.Optional[profile.ProfileProgression] <NEW_LINE> profile_currencies: typing.Optional[collections.Sequence[profile.ProfileItemImpl]] <NEW_LINE> profile_inven...
Represents a profile-only Bungie component. This includes all components that falls under the profile object. Included Components ------------------- - `Profiles` - `ProfileInventories` - `ProfileCurrencies` - `ProfileProgression`
6259903c66673b3332c31615
class ElasticFilterBackend(OrderingFilter, DjangoFilterBackend): <NEW_LINE> <INDENT> def filter_queryset(self, request, queryset, view): <NEW_LINE> <INDENT> q_size = view.paginator.get_limit(request) <NEW_LINE> q_from = view.paginator.get_offset(request) <NEW_LINE> filterable = getattr(view, 'filter_fields', []) <NEW_L...
Extend L{DjangoFilterBackend} for filtering elastic resources.
6259903c1d351010ab8f4d3a
class V1alpha1Policy(object): <NEW_LINE> <INDENT> openapi_types = { 'level': 'str', 'stages': 'list[str]' } <NEW_LINE> attribute_map = { 'level': 'level', 'stages': 'stages' } <NEW_LINE> def __init__(self, level=None, stages=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: ...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
6259903c45492302aabfd6f6
class PasswordResetForm(forms.Form): <NEW_LINE> <INDENT> username = forms.CharField(label=_("Username or email address")) <NEW_LINE> def clean(self): <NEW_LINE> <INDENT> username = self.cleaned_data.get("username") <NEW_LINE> username_or_email = Q(username=username) | Q(email=username) <NEW_LINE> try: <NEW_LINE> <INDEN...
Validates the user's username or email for sending a login token for authenticating to change their password.
6259903c07d97122c4217ebc
class StructA(TBase): <NEW_LINE> <INDENT> __slots__ = ( 's', ) <NEW_LINE> def __init__(self, s=None,): <NEW_LINE> <INDENT> self.s = s
Attributes: - s
6259903c21bff66bcd723e88
class SubnetAssociation(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> su...
Subnet and it's custom security rules. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Subnet ID. :vartype id: str :param security_rules: Collection of custom security rules. :type security_rules: list[~azure.mgmt.network.v2019_12_01.models.SecurityRule]
6259903c50485f2cf55dc1a2
class IPAddress(BASEV2, models.HasId, models.HasTenant): <NEW_LINE> <INDENT> __tablename__ = "quark_ip_addresses" <NEW_LINE> address_readable = sa.Column(sa.String(128), nullable=False) <NEW_LINE> address = sa.Column(custom_types.INET(), nullable=False) <NEW_LINE> subnet_id = sa.Column(sa.String(36), sa.ForeignKey("qua...
More closely emulate the melange version of the IP table. We always mark the record as deallocated rather than deleting it. Gives us an IP address owner audit log for free, essentially.
6259903cbaa26c4b54d504c7
class PageRank: <NEW_LINE> <INDENT> def __init__(self, adjacency_matrix=np.ndarray, alpha: float = None, converge: float = None, pickle=None): <NEW_LINE> <INDENT> if pickle is None: <NEW_LINE> <INDENT> self._matrix = adjacency_matrix <NEW_LINE> self._alpha = alpha <NEW_LINE> self._converge = converge <NEW_LINE> self._m...
Calculates the PageRank scores for the documents contained in the Adjacency Matrix adjacency_matrix = sparse matrix containing the weighted links between documents alpha = propapility for random teleports instead of following only links converge = threshold for the convergence of the PageRank algorithm
6259903c0fa83653e46f60fa
class DiskPlugin: <NEW_LINE> <INDENT> def __init__(self, pack_path): <NEW_LINE> <INDENT> self.all_plug = {} <NEW_LINE> self.pack_path = pack_path <NEW_LINE> self.git_config = [GetRemote("")] <NEW_LINE> self._list_remote_url(self._list_plug_dir()) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _walklevel(some_dir, lev...
This class allow to access the plugins locally installed on the pack path. Attributs: - all_plug (dict): key = <package_name>/{start|opt}/<plugin_name> value = remote_url, ex: https://path/to/repo - pack_path (str): package directory
6259903c63f4b57ef0086684
@register_command <NEW_LINE> class ContextCommand(StackCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def name(): <NEW_LINE> <INDENT> return '%s %s' % (VoidwalkerCommand.name(), 'context') <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> super(ContextCommand, self).__init__() <NEW_LINE> <DEDENT> def ...
Show the current context. If the current thread of the inferior is valid the context will be recorded and dumped. The contents of the context can be controlled using the (void)walker parameters
6259903d6e29344779b01872
@no_db_testcase <NEW_LINE> @tags(['unit']) <NEW_LINE> class TaskGetAbsoluteUrlTest(TestCase): <NEW_LINE> <INDENT> def test_should_return_task_absolute_url(self): <NEW_LINE> <INDENT> owner = UserFactory.build(pk=1) <NEW_LINE> task = TaskFactory.build(owner=owner, author=owner) <NEW_LINE> url = task.get_absolute_url() <N...
:py:meth:`tasks.models.Task.get_absolute_url`
6259903db5575c28eb7135d9
class _BaseHeterogeneousEnsemble(MetaEstimatorMixin, _BaseComposition, metaclass=ABCMeta): <NEW_LINE> <INDENT> _required_parameters = ['estimators'] <NEW_LINE> @property <NEW_LINE> def named_estimators(self): <NEW_LINE> <INDENT> return Bunch(**dict(self.estimators)) <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def __...
Base class for heterogeneous ensemble of learners. Parameters ---------- estimators : list of (str, estimator) tuples The ensemble of estimators to use in the ensemble. Each element of the list is defined as a tuple of string (i.e. name of the estimator) and an estimator instance. An estimator can be set t...
6259903db57a9660fecd2c9b
class Clip(Preprocessor): <NEW_LINE> <INDENT> def __init__(self, min, max): <NEW_LINE> <INDENT> super(Clip, self).__init__() <NEW_LINE> self.min = min <NEW_LINE> self.max = max <NEW_LINE> <DEDENT> def process(self, state): <NEW_LINE> <INDENT> return np.clip(state, self.min, self.max)
Clip by min/max.
6259903d16aa5153ce40170d
class ContainerProviderAddView(ProviderAddView): <NEW_LINE> <INDENT> prov_type = BootstrapSelect(id='ems_type') <NEW_LINE> @property <NEW_LINE> def is_displayed(self): <NEW_LINE> <INDENT> return (super(ProviderAddView, self).is_displayed and self.navigation.currently_selected == ['Compute', 'Containers', 'Providers'] a...
represents Container Provider Add View
6259903ddc8b845886d547d6
class TestCylinderAddObject(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> radius = 5 <NEW_LINE> length = 40 <NEW_LINE> density = 20 <NEW_LINE> self.ana = CylinderModel() <NEW_LINE> self.ana.setParam('scale', 1.0) <NEW_LINE> self.ana.setParam('background', 0.0) <NEW_LINE> self.ana.setParam...
Tests for oriented (2D) systems
6259903d30c21e258be99a2d
class OsidRuntimeProfile(abc_osid_managers.OsidRuntimeProfile, OsidProfile): <NEW_LINE> <INDENT> def supports_configuration(self): <NEW_LINE> <INDENT> raise errors.Unimplemented()
The ``OsidRuntimeProfile`` defines the service aspects of the OSID runtime service.
6259903d82261d6c527307d4
class TestFileQueue(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.directory_paths = ['2010-10-08-report.xlsx', '2020-07-09-report.xlsm', 'abcdef.txt', 'spam.csv', 'abcdef.xlsx', 'spam.xlsm', 'thisisadir/'] <NEW_LINE> self.correct_paths = [True, True, False, False, True, True, False] ...
Test Queueing functionality as xlsx/m files enter the directory.
6259903d8a43f66fc4bf33b0
class MMLLexer(object): <NEW_LINE> <INDENT> STC_MML_DEFAULT, STC_MML_KEYWORD, STC_MML_KEYWORD2, STC_MML_COMMENT, STC_MML_VARIABLE, STC_MML_VOICE_TOKEN = list( range(6) ) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(MMLLexer, self).__init__() <NEW_LINE> self.alpha = "abcdefghijklmnopqrstuvwxyz" <NEW_LINE> se...
Defines simple interface for custom lexer objects.
6259903dd99f1b3c44d068c8
class UnknowMimeType(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'MimeType is undefined for the file "'+self.value()+'"'
Exception throw if no mime type is found
6259903dbaa26c4b54d504c9
class CreateUserFollowingView(generics.ListCreateAPIView): <NEW_LINE> <INDENT> queryset = UserFollowing.objects.all() <NEW_LINE> serializer_class = UserFollowingSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticated,IsOwner) <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> data ...
This class defines the create behavior of our rest api.
6259903d30c21e258be99a2e
class TestUpdatePreviewDiff(TestCaseWithFactory): <NEW_LINE> <INDENT> layer = LaunchpadFunctionalLayer <NEW_LINE> def _updatePreviewDiff(self, merge_proposal): <NEW_LINE> <INDENT> diff_text = ( "=== modified file 'sample.py'\n" "--- sample\t2009-01-15 23:44:22 +0000\n" "+++ sample\t2009-01-29 04:10:57 +0000\n" "@@ -19,...
Test the updateMergeDiff method of BranchMergeProposal.
6259903d71ff763f4b5e89be
class EntitySet(Mapping, Generic[T]): <NEW_LINE> <INDENT> pprint.sorted = lambda v, key=None: v <NEW_LINE> def __init__(self, entities: Union[Iterable[T], Dict[str, T]]): <NEW_LINE> <INDENT> if type(entities) is dict: <NEW_LINE> <INDENT> self._map = entities <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._map = {e....
An immutable collection of entities, indexed by nickname.
6259903d287bf620b6272e0d
class SessionContext(InstanceContext): <NEW_LINE> <INDENT> def __init__(self, version, service_sid, sid): <NEW_LINE> <INDENT> super(SessionContext, self).__init__(version) <NEW_LINE> self._solution = {'service_sid': service_sid, 'sid': sid, } <NEW_LINE> self._uri = '/Services/{service_sid}/Sessions/{sid}'.format(**self...
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
6259903d21bff66bcd723e8c
class Rescale(object): <NEW_LINE> <INDENT> def __init__(self, output_size): <NEW_LINE> <INDENT> assert isinstance(output_size, (int, tuple)) <NEW_LINE> self.output_size = output_size <NEW_LINE> <DEDENT> def __call__(self, sample): <NEW_LINE> <INDENT> image, labels = sample['image'], sample['label'] <NEW_LINE> h, w = im...
Rescale the image in a sample to a given size. Args: output_size (tuple or int): Desired output size. If tuple, output is matched to output_size. If int, smaller of image edges is matched to output_size keeping aspect ratio the same.
6259903d21a7993f00c67190
class LinuxBannerDetector(DetectionMethod): <NEW_LINE> <INDENT> name = "linux" <NEW_LINE> LINUX_TEMPLATE = re.compile( r"Linux version (\d+\.\d+\.\d+[^ ]+)") <NEW_LINE> find_dtb_impl = linux_common.LinuxFindDTB <NEW_LINE> def Keywords(self): <NEW_LINE> <INDENT> return ["Linux version "] <NEW_LINE> <DEDENT> def DetectFr...
Detect a linux kernel from its banner text.
6259903ddc8b845886d547d8
class ReportModelSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> def check_job_answers(self, job): <NEW_LINE> <INDENT> questions = job.questions.all() <NEW_LINE> answers_list = [] <NEW_LINE> request = self.context["request"] <NEW_LINE> for question in questions: <NEW_LINE> <INDENT> category = question.cate...
Report Model Serializer
6259903dd10714528d69ef9d
class BroadcastServerFactory(WebSocketServerFactory): <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> WebSocketServerFactory.__init__(self, url) <NEW_LINE> self.clients = [] <NEW_LINE> self.tickcount = 0 <NEW_LINE> self.tick() <NEW_LINE> <DEDENT> def tick(self): <NEW_LINE> <INDENT> self.tickcount += 1 ...
Simple broadcast server broadcasting any message it receives to all currently connected clients.
6259903d6fece00bbacccbd2
class Employee (models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=256) <NEW_LINE> address = models.CharField(max_length=256) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.name + ' @' + self.address
A simple Person model
6259903dd6c5a102081e3349
class Client(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100, default='') <NEW_LINE> email = models.EmailField(max_length=70) <NEW_LINE> phone_number = models.TextField(max_length=9, blank=True) <NEW_LINE> newsletter_agreement = models.BooleanField(default=False, blank=True) <NEW_LINE> signup_...
Client/Customer class - atm created after filling signing up for training
6259903d07f4c71912bb0656
class TestCustomersApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = swagger_client.api.customers_api.CustomersApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_customer_by_id(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDE...
CustomersApi unit test stubs
6259903d23849d37ff8522dd
class UnbindIpsFromNatGatewayResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TaskId = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TaskId = params.get("TaskId") <NEW_LINE> self.RequestId = params.get("Request...
UnbindIpsFromNatGateway返回参数结构体
6259903d30c21e258be99a30
class CreatedByBaseAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> readonly_fields = ('created_by', 'created_date') <NEW_LINE> def save_formset(self, request, form, formset, change): <NEW_LINE> <INDENT> instances = formset.save(commit=False) <NEW_LINE> for instance in instances: <NEW_LINE> <INDENT> if not change: <NEW_LIN...
Base class for handling created by stuff
6259903d24f1403a926861df
class Transf_gen(distributions.rv_continuous): <NEW_LINE> <INDENT> def __init__(self, kls, func, funcinv, *args, **kwargs): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.funcinv = funcinv <NEW_LINE> self.numargs = kwargs.pop('numargs', 0) <NEW_LINE> name = kwargs.pop('name','transfdist') <NEW_LINE> longname = kw...
a class for non-linear monotonic transformation of a continuous random variable
6259903d63f4b57ef0086686
class TextPairParser(CorpusParser): <NEW_LINE> <INDENT> class Class(SamplePairClass): <NEW_LINE> <INDENT> UNSPECIFIED = -1 <NEW_LINE> DIFFERENT_AUTHORS = 0 <NEW_LINE> SAME_AUTHOR = 1 <NEW_LINE> <DEDENT> def __init__(self, chunk_tokenizer: Tokenizer, corpus_path: str = None): <NEW_LINE> <INDENT> super().__init__(chunk_t...
Parser for generating all possible combinations of text pairs and labeling them according to whether they were written by the same author or not. Expects a directory structure where there is one folder for each author containing at least two samples of their work. Example: + Ernest_Hemingway |__ + The_Torren...
6259903d94891a1f408ba009
class Model(model.Model): <NEW_LINE> <INDENT> def __init__(self, graph=None, embedding_size=1024): <NEW_LINE> <INDENT> super(Model, self).__init__(graph=graph, embedding_size=embedding_size) <NEW_LINE> <DEDENT> def make_embedding(self, x): <NEW_LINE> <INDENT> with self.graph.as_default(): <NEW_LINE> <INDENT> x = player...
Convolutional model for word embedded input.
6259903d21a7993f00c67192
class AttrDict(dict): <NEW_LINE> <INDENT> def __init__(self, init={}): <NEW_LINE> <INDENT> dict.__init__(self, init) <NEW_LINE> <DEDENT> def __getstate__(self): <NEW_LINE> <INDENT> return self.__dict__.items() <NEW_LINE> <DEDENT> def __setstate__(self, items): <NEW_LINE> <INDENT> for key, val in items: <NEW_LINE> <INDE...
A dictionary with attribute-style access. It maps attribute access to the real dictionary. Source: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473786
6259903ddc8b845886d547da
class PrintTagsPrimary(Primary): <NEW_LINE> <INDENT> def __call__(self, context): <NEW_LINE> <INDENT> path = context['path'] <NEW_LINE> tag_name = context.get('args', None) <NEW_LINE> verbosity = context.get('verbosity', 0) <NEW_LINE> try: <NEW_LINE> <INDENT> m = context['metadata'] <NEW_LINE> <DEDENT> except KeyError:...
Print all tags available in an image Always return context
6259903d23e79379d538d724
class LikeAPIView(LikeDislikeMixin): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> def post(self, request, **kwargs): <NEW_LINE> <INDENT> article = self.get_object() <NEW_LINE> article.like(request.user) <NEW_LINE> return Response( self.get_response('You like this article.'), status=status.HTTP...
This view enables liking and un-liking articles.
6259903db57a9660fecd2ca0
class ResolveDomainResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Data = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Data = params.get("Data") <NEW_LINE> self.RequestId = params.get("RequestId")
ResolveDomain返回参数结构体
6259903d379a373c97d9a24e
@method_decorator(csrf_exempt, name="dispatch") <NEW_LINE> class WebHook(View): <NEW_LINE> <INDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> body = smart_str(request.body) <NEW_LINE> data = json.loads(body) <NEW_LINE> if data['id'] == TEST_EVENT_ID: <NEW_LINE> <INDENT> logger.info("Test webhook rec...
A view used to handle webhooks.
6259903d596a897236128ec3
class TestPaymentsSurcharge(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 PaymentsSurch...
PaymentsSurcharge unit test stubs
6259903d24f1403a926861e0
class ETradeAlerts(object): <NEW_LINE> <INDENT> def __init__( self, client_key, client_secret, resource_owner_key, resource_owner_secret, dev=True, ): <NEW_LINE> <INDENT> self.client_key = client_key <NEW_LINE> self.client_secret = client_secret <NEW_LINE> self.resource_owner_key = resource_owner_key <NEW_LINE> self.re...
:description: Object to retrieve alerts :param client_key: Client key provided by Etrade :type client_key: str, required :param client_secret: Client secret provided by Etrade :type client_secret: str, required :param resource_owner_key: Resource key from :class:`pyetrade.authorization.ETradeOAuth` :type resource_owne...
6259903d287bf620b6272e12
class EnemiesFactory: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._enemies = {} <NEW_LINE> <DEDENT> def get_enemy(self, enemy_type, power): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> enemy = self._enemies[enemy_type] <NEW_LINE> enemy.set_power(power) <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE...
Generates enemies with different powers
6259903db5575c28eb7135dc
class AttemptEvent(models.Model): <NEW_LINE> <INDENT> time_created = models.DateTimeField(auto_now_add=True) <NEW_LINE> username = models.CharField(max_length=USERNAME_MAX_LENGTH) <NEW_LINE> ip_address = models.GenericIPAddressField(max_length=30) <NEW_LINE> user_agent = models.CharField(max_length=200, null=True, blan...
Authentication attempt events are created when credentials are validated through the authentication system.
6259903d21a7993f00c67194
class LCApplication(LCUtilityApplication): <NEW_LINE> <INDENT> def __init__(self, paramdict = None): <NEW_LINE> <INDENT> super(LCApplication, self).__init__(paramdict) <NEW_LINE> self.steeringFileVersion = "" <NEW_LINE> self.forgetAboutInput = False <NEW_LINE> self._importLocation = "ILCDIRAC.Workflow.Modules" <NEW_LIN...
LC specific implementation of the applications
6259903d004d5f362081f8f8
class EarlyStoppingMin(EarlyStopping): <NEW_LINE> <INDENT> def __init__(self, min_epochs=0, max_epochs=None, **kwargs): <NEW_LINE> <INDENT> super(EarlyStoppingMin, self).__init__(**kwargs) <NEW_LINE> if not isinstance(min_epochs, int) or min_epochs < 0: <NEW_LINE> <INDENT> raise ValueError('min_epochs must be an intege...
Extends the keras.callbacks.EarlyStopping class to provide the option to force training for a minimum number of epochs or restore the best weights after the maximum epochs have been reached.
6259903dbe383301e0254a3e
class Chrome(DumperTemplate): <NEW_LINE> <INDENT> procnames = ["chrome.exe"] <NEW_LINE> def run(self): <NEW_LINE> <INDENT> self.commands('chromehistory', 'chromevisits', 'chromedownloadchains', 'chromesearchterms', 'chromedownloads', 'chromecookies', options="--output=csv", failmode="warn")
Dumper for the common application Google Chrome.
6259903db57a9660fecd2ca2