code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SchedulingService(Service): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.coop = Cooperator(started=False) <NEW_LINE> <DEDENT> def addIterator(self, iterator): <NEW_LINE> <INDENT> return self.coop.coiterate(iterator) <NEW_LINE> <DEDENT> def startService(self): <NEW_LINE> <INDENT> self.coop.star...
Simple L{IService} implementation.
62598fc5dc8b845886d538ae
class Grammar: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.rules = defaultdict(list) <NEW_LINE> self.starting_symbol = None <NEW_LINE> <DEDENT> def add(self, rule): <NEW_LINE> <INDENT> self.rules[rule.lhs].append(rule) <NEW_LINE> <DEDENT> def __getitem__(self, nt): <NEW_LINE> <INDENT> return self.r...
Represents a CFG.
62598fc5ad47b63b2c5a7b4b
class Entj(Extrovert): <NEW_LINE> <INDENT> attrs = AttributeMatrix( strength=0, endurance=0, defense=0, intelligence=0, agility=0, charisma=0, wisdom=0, willpower=0, perception=0, luck=0, ) <NEW_LINE> def interact_with(self, neighbor): <NEW_LINE> <INDENT> super(Entj, self).interact_with(neighbor)
A Meyer-Briggs personality type indicator. Frank, decisive, assume leadership readily. Quickly see illogical and inefficient procedures and policies, develop and implement comprehensive systems to solve organizational problems. Enjoy long-term planning and goal setting. Usually well informed, well read, enjoy expandin...
62598fc5656771135c489962
class EditarAccionista(View): <NEW_LINE> <INDENT> def post(self, request): <NEW_LINE> <INDENT> accionista = None <NEW_LINE> try: <NEW_LINE> <INDENT> filter = Storage( pk = int(request.POST['pk_element']), pst = Pst.objects.get(user=request.user), cached = True ) <NEW_LINE> accionista = Accionista.objects.get(**filter) ...
Clase para para editar el Accionista
62598fc5d8ef3951e32c7fd5
class BuildExt(build_ext): <NEW_LINE> <INDENT> c_opts = { 'msvc': ['/EHsc'], 'unix': [], } <NEW_LINE> if sys.platform == 'darwin': <NEW_LINE> <INDENT> c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.8'] <NEW_LINE> <DEDENT> def build_extensions(self): <NEW_LINE> <INDENT> ct = self.compiler.compiler_type <N...
A custom build extension for adding compiler-specific options.
62598fc550812a4eaa620d5e
class BTNode(object): <NEW_LINE> <INDENT> def __init__(self, value, left=None, right=None): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.left = left <NEW_LINE> self.right = right <NEW_LINE> self.depth = 0 <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self._str_helper("") <NEW_LINE> <DEDENT...
A node in a binary tree.
62598fc5aad79263cf42eac8
class DagsterUnknownResourceError(DagsterError, AttributeError): <NEW_LINE> <INDENT> def __init__(self, resource_name, *args, **kwargs): <NEW_LINE> <INDENT> self.resource_name = check.str_param(resource_name, "resource_name") <NEW_LINE> msg = ( "Unknown resource `{resource_name}`. Specify `{resource_name}` as a require...
Indicates that an unknown resource was accessed in the body of an execution step. May often happen by accessing a resource in the compute function of an op without first supplying the op with the correct `required_resource_keys` argument.
62598fc576e4537e8c3ef898
class WeightNorm(KernelNorm): <NEW_LINE> <INDENT> NAME = "weight_norm" <NEW_LINE> def __init__(self, scale=True, axis=-1, epsilon=1e-5, name=None): <NEW_LINE> <INDENT> super().__init__(name=name) <NEW_LINE> self.use_scale = scale <NEW_LINE> self.axis = axis <NEW_LINE> self.epsilon = epsilon <NEW_LINE> self.g = None <NE...
Weight Normalization class.
62598fc54428ac0f6e658819
@dataclass_json <NEW_LINE> @dataclass <NEW_LINE> class Sampler(Property): <NEW_LINE> <INDENT> input: Optional[int] = None <NEW_LINE> interpolation: Optional[str] = None <NEW_LINE> output: Optional[int] = None <NEW_LINE> magFilter: Optional[int] = None <NEW_LINE> minFilter: Optional[int] = None <NEW_LINE> wrapS: Optiona...
Samplers are stored in the samplers array of the asset. Each sampler specifies filter and wrapping options corresponding to the GL types
62598fc6aad79263cf42eac9
class DictOutputMethod(OutputMethod): <NEW_LINE> <INDENT> def __init__(self, *engines, filename=None): <NEW_LINE> <INDENT> OutputMethod.__init__(self, *engines) <NEW_LINE> self.results = {} <NEW_LINE> self.filename = filename <NEW_LINE> <DEDENT> def _update(self, engine, results): <NEW_LINE> <INDENT> try: <NEW_LINE> <I...
DictOutputMethod is an OutputMethod that will store inside a dict the results from its tracked engines (for each output_step). For each engine tracked, a key is added to the PickleOuputMethod, containing a sub-dict. For each output_step, a key is added inside the sub-dict corresponding to each engine. in the end: pi...
62598fc663b5f9789fe85468
class DatasetLike(Like[xarray.Dataset]): <NEW_LINE> <INDENT> TYPE = Optional[Union[xarray.Dataset, pandas.DataFrame]] <NEW_LINE> @classmethod <NEW_LINE> def convert(cls, value: Any) -> Optional[xarray.Dataset]: <NEW_LINE> <INDENT> from cate.core.opimpl import adjust_temporal_attrs_impl <NEW_LINE> if value is None: <NEW...
Accepts xarray.Dataset, pandas.DataFrame and converts to xarray.Dataset.
62598fc6fff4ab517ebcdadc
class BashMalformedKoji(TestKoji): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> TestKoji.setUp(self) <NEW_LINE> self.rpm.add_installed_file( "/usr/share/data/invalid_bash.sh", rpmfluff.SourceFile("invalid_bash.sh", invalid_bash), ) <NEW_LINE> self.inspection = "shellsyntax" <NEW_LINE> self.result = "BAD" <N...
Invalid /bin/bash script is BAD for Koji build
62598fc63317a56b869be6cb
class MainUserManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, phone, password): <NEW_LINE> <INDENT> if not phone or not password: <NEW_LINE> <INDENT> raise ValueError('Users must have an phone and password') <NEW_LINE> <DEDENT> user = self.model(phone=phone.lower()) <NEW_LINE> user.set_password(pass...
Custom user manager.
62598fc6851cf427c66b85aa
class TerminalSkin: <NEW_LINE> <INDENT> def __init__(self, chords=()): <NEW_LINE> <INDENT> self.traceback = None <NEW_LINE> self.reply = TerminalReplyOut() <NEW_LINE> self.cursor_style = _VIEW_CURSOR_STYLE_ <NEW_LINE> self.keyboard = None <NEW_LINE> self.chord_ints_ahead = list(chords) <NEW_LINE> self.nudge = TerminalN...
Form a Skin out of keyboard Input Chords and an Output Reply
62598fc65fdd1c0f98e5e288
class PaletteColormap: <NEW_LINE> <INDENT> def __init__(self, *colors, intervals=None): <NEW_LINE> <INDENT> self.colors = tmap(RGBA, colors) <NEW_LINE> self.cmap = SequenceColormap(*tmap(ConstantColormap, self.colors), intervals=intervals) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "PaletteColor...
A matplotlib colormap generated from constant colors and optional spacing intervals. Can also be used as a discrete cycling colormap.
62598fc64428ac0f6e65881b
class JSONDecoder(object): <NEW_LINE> <INDENT> _scanner = Scanner(ANYTHING) <NEW_LINE> __all__ = ['__init__', 'decode', 'raw_decode'] <NEW_LINE> def __init__(self, encoding=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True): <NEW_LINE> <INDENT> self.encoding = encoding <NEW_LINE...
Simple JSON <http://json.org> decoder Performs the following translations in decoding by default: +---------------+-------------------+ | JSON | Python | +===============+===================+ | object | dict | +---------------+-------------------+ | array | list ...
62598fc65fdd1c0f98e5e289
class Job(models.Model): <NEW_LINE> <INDENT> last_updated = models.DateTimeField(auto_now_add=True, auto_now=True) <NEW_LINE> update_on = models.DateTimeField(blank=True, null=True) <NEW_LINE> active = models.BooleanField(default=False) <NEW_LINE> language = models.ForeignKey(Language, db_index=True) <NEW_LINE> package...
In [1]: languages = Language.objects.all() In [2]: packages = Package.objects.all() In [3]: for package in packages: for language in languages: (job, created) = Job.objects.get_or_create(language=language, package=package) ....: job.save() ....:
62598fc6091ae35668704f1f
class Net: <NEW_LINE> <INDENT> def __init__(self, inputs, dropout_rate=None, reuse=tf.AUTO_REUSE, training=True, scope='description'): <NEW_LINE> <INDENT> self.loss = None <NEW_LINE> self.train = None <NEW_LINE> self.validation = None <NEW_LINE> self.scope = scope <NEW_LINE> with tf.variable_scope(scope, reuse=reuse): ...
Adapted HardNet (Working hard to know your neighbor's margins: Local descriptor learning loss, 2017) model. Differs from HardNet in its loss function, using instead triplet semi-hard loss (FaceNet: A Unified Embedding for Face Recognition and Clustering, 2015). Net.descriptors is the model's output op. It has shape [...
62598fc65fcc89381b2662c8
class ClassificationScore: <NEW_LINE> <INDENT> def __init__(self, true_positive=0, false_negative=0, false_positive=0): <NEW_LINE> <INDENT> self.true_positive = true_positive <NEW_LINE> self.false_negative = false_negative <NEW_LINE> self.false_positive = false_positive <NEW_LINE> <DEDENT> def get_iou(self): <NEW_LINE>...
Used to store and compute metric scores
62598fc63617ad0b5ee0643e
class CreateTopicRuleRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RuleName = None <NEW_LINE> self.TopicRulePayload = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RuleName = params.get("RuleName") <NEW_LINE> if params.get("TopicRulePayload"...
CreateTopicRule请求参数结构体
62598fc6ad47b63b2c5a7b4f
@admin.register(User) <NEW_LINE> class UserAdmin(UserBaseAdmin): <NEW_LINE> <INDENT> ordering = ("email",) <NEW_LINE> list_display = ("email", "is_staff", "is_admin", "is_active") <NEW_LINE> list_per_page = 10 <NEW_LINE> list_display_links = ("email",) <NEW_LINE> search_fields = ("email",) <NEW_LINE> add_fieldsets = ( ...
User admin, which to use for mange User data
62598fc6ff9c53063f51a944
class LMThdu(object): <NEW_LINE> <INDENT> def __init__(self, data=None, header=None, filename=None): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.header = header <NEW_LINE> self.filename = filename <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> if self.filename: <NEW_LINE> <INDENT> return "HDU for ...
The LMThdu is a class that contains the basic Header-Data Unit. This is meant to be similar to pyfits HDU. The two main attributes are the header and data. In addition, there can be a filename attribute that contains the name of the file from which the data was read
62598fc6d8ef3951e32c7fd7
class HRDisciplinaryActionModel(S3Model): <NEW_LINE> <INDENT> names = ("hrm_disciplinary_type", "hrm_disciplinary_action", ) <NEW_LINE> def model(self): <NEW_LINE> <INDENT> T = current.T <NEW_LINE> define_table = self.define_table <NEW_LINE> tablename = "hrm_disciplinary_type" <NEW_LINE> define_table(tablename, self.or...
Data model for staff disciplinary record
62598fc6aad79263cf42eacd
class SceneQuit(Exception): <NEW_LINE> <INDENT> pass
Wyjście z ekranu gry.
62598fc663b5f9789fe8546c
class ISheetBackReferenceModified(IObjectEvent): <NEW_LINE> <INDENT> object = Attribute('The referenced resource') <NEW_LINE> isheet = Attribute('The referenced sheet.') <NEW_LINE> reference = Attribute('The Reference with `object` as target.') <NEW_LINE> registry = Attribute('The pyramid registry')
An event type sent when a sheet back reference was added/removed. See Subtypes for more detailed semantic.
62598fc6cc40096d6161a354
class TestHiveClientCase(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> @patch('ppytools.hiveclient.hive.connect') <NEW_LINE> def setUpClass(cls, mock_hive_conn): <NEW_LINE> <INDENT> mock_hive_conn.return_value = mock.Mock(autospec=True) <NEW_LINE> cls.hc = HiveClient('127.0.0.1', 10000, 'hive', 'defau...
TestHiveClientCase
62598fc697e22403b383b1fc
class GradientHardClipping(object): <NEW_LINE> <INDENT> name = 'GradientHardClipping' <NEW_LINE> def __init__(self, lower_bound, upper_bound): <NEW_LINE> <INDENT> self.lower_bound = lower_bound <NEW_LINE> self.upper_bound = upper_bound <NEW_LINE> <DEDENT> def __call__(self, opt): <NEW_LINE> <INDENT> xp = opt.target.xp ...
Optimizer hook function for gradient clipping. This hook function clips all gradient arrays to be within a lower and upper bound. Args: lower_bound (float): The lower bound of the gradient value. upper_bound (float): The upper bound of the gradient value. Attributes: lower_bound (float): The lower bound ...
62598fc68a349b6b43686537
class OneTimePassword(SmartModel): <NEW_LINE> <INDENT> key = models.CharField( verbose_name=_('key'), max_length=128, unique=True, db_index=True, null=False, blank=False ) <NEW_LINE> expires_at = models.DateTimeField( verbose_name=_('expires at'), null=True, blank=True, ) <NEW_LINE> slug = models.SlugField( verbose_nam...
Specific verification tokens that can be send via e-mail, SMS or another transmission medium to check user authorization (example password reset)
62598fc666673b3332c306ce
class Area3_3_LeftInnerArea(area_base.Area): <NEW_LINE> <INDENT> def __init__(self: "Area", window_width: int = 500, window_height: int = 500, player_obj: "Snake"=None, enemies: "Group"=None): <NEW_LINE> <INDENT> area_base.Area.__init__(self, window_width, window_height, player_obj, enemies) <NEW_LINE> self.is_checkpoi...
A class to represent a left inner Area of Area3_3
62598fc64527f215b58ea1c8
class ModelChannel(BaseFrontendChannel): <NEW_LINE> <INDENT> BackendChannel = ForwardBackendChannel <NEW_LINE> namespace = 'model' <NEW_LINE> def __init__(self, session, endpoint=None): <NEW_LINE> <INDENT> super(ModelChannel, self).__init__(session, endpoint) <NEW_LINE> self.resources = { } <NEW_LINE> <DEDENT> def on_e...
REST over Socket.io.
62598fc65fcc89381b2662c9
class TearDownHandler(webapp.RequestHandler): <NEW_LINE> <INDENT> @decorator.oauth_required <NEW_LINE> def get(self): <NEW_LINE> <INDENT> ComputeEngineController(decorator.credentials).TearDownCluster() <NEW_LINE> LoadInfo.RemoveAllInstancesAndServers()
URL handler class for cluster shut down.
62598fc6a219f33f346c6b00
class QueueHandler(logging.Handler): <NEW_LINE> <INDENT> def __init__(self, queue): <NEW_LINE> <INDENT> logging.Handler.__init__(self) <NEW_LINE> self.queue = queue <NEW_LINE> <DEDENT> def enqueue(self, record): <NEW_LINE> <INDENT> self.queue.put_nowait(record) <NEW_LINE> <DEDENT> def prepare(self, record): <NEW_LINE> ...
This handler sends events to a queue. Typically, it would be used together with a multiprocessing Queue to centralise logging to file in one process (in a multi-process application), so as to avoid file write contention between processes. This code is new in Python 3.2, but this class can be copy pasted into user code...
62598fc6ad47b63b2c5a7b51
class RibbonTableaux(Parent, UniqueRepresentation): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def __classcall_private__(cls, shape=None, weight=None, length=None): <NEW_LINE> <INDENT> if shape is None and weight is None and length is None: <NEW_LINE> <INDENT> return super(RibbonTableaux, cls).__classcall__(cls) <NEW...
Ribbon tableaux. A ribbon tableau is a skew tableau whose skew shape ``shape`` is tiled by ribbons of length ``length``. The weight ``weight`` is calculated from the labels on the ribbons. .. NOTE:: Here we inpose the condition that the ribbon tableaux are semistandard. INPUT(Optional): - ``shape`` -- skew sh...
62598fc67c178a314d78d798
@app_utils.singleton <NEW_LINE> class ActivityManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._parent = None <NEW_LINE> self._activitylist = [] <NEW_LINE> <DEDENT> def set_parent(self, parentwidget): <NEW_LINE> <INDENT> self._parent = parentwidget <NEW_LINE> <DEDENT> def init_activitie...
The activity manager is used to set up available activites.
62598fc655399d3f05626811
class RemBertEmbeddings(nn.Module): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.word_embeddings = nn.Embedding( config.vocab_size, config.input_embedding_size, padding_idx=config.pad_token_id ) <NEW_LINE> self.position_embeddings = nn.Embedding(config.max_posit...
Construct the embeddings from word, position and token_type embeddings.
62598fc6956e5f7376df57fa
class IDesignerSerializationManager(IServiceProvider): <NEW_LINE> <INDENT> def AddSerializationProvider(self,provider): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def CreateInstance(self,type,arguments,name,addToContainer): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetInstance(self,name): <NEW_LINE> <INDENT> p...
Provides an interface that can manage design-time serialization.
62598fc67cff6e4e811b5d1f
class SessionHighlightsForm(messages.Message): <NEW_LINE> <INDENT> highlights = messages.StringField(1)
SessionHighlightsForm -- get sessions that have a given highlight
62598fc64c3428357761a5b6
class Solver: <NEW_LINE> <INDENT> def solve(self, env, timeout=None, vf=False): <NEW_LINE> <INDENT> info = env.get_solver_info() <NEW_LINE> return self._solve(env, timeout, info, vf) <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def _solve(self, env, timeout=None, info=None, vf=False): <NEW_LINE> <INDENT> raise No...
Base class for a solver.
62598fc6bf627c535bcb17a1
class Life(): <NEW_LINE> <INDENT> def __init__(self, dimensions, pattern = None): <NEW_LINE> <INDENT> self.grid = [] <NEW_LINE> self.rows, self.cols = dimensions <NEW_LINE> if pattern == None: <NEW_LINE> <INDENT> r.seed() <NEW_LINE> for i in range(self.rows): <NEW_LINE> <INDENT> self.grid.append([]) <NEW_LINE> for j in...
Class to simulate Conways game of Life
62598fc6aad79263cf42eace
class API: <NEW_LINE> <INDENT> def __init__(self, app_root=None, cgroup_prefix=None): <NEW_LINE> <INDENT> reader = engine.CgroupReader(app_root, cgroup_prefix) <NEW_LINE> def system(path, *paths): <NEW_LINE> <INDENT> return reader.read_system(path, *paths) <NEW_LINE> <DEDENT> def service(svc): <NEW_LINE> <INDENT> retur...
Treadmill Cgroup REST api.
62598fc63d592f4c4edbb1ab
class ProductProductDocnaet(orm.Model): <NEW_LINE> <INDENT> _inherit = 'product.product.docnaet' <NEW_LINE> _columns = { 'docnaet_id': fields.integer('Docnaet ID migration'), }
Object product.product.docnaet
62598fc676e4537e8c3ef89e
class CharmstoreRepoDownloader(CharmstoreDownloader): <NEW_LINE> <INDENT> EXTRA_INFO_URL = CharmstoreDownloader.STORE_URL + '/meta/extra-info' <NEW_LINE> def fetch(self, dir_): <NEW_LINE> <INDENT> url = self.EXTRA_INFO_URL.format(self.entity) <NEW_LINE> repo_url = get(url).json().get('bzr-url') <NEW_LINE> if repo_url: ...
Clones a charm's bzr repo. If the a bzr repo is not set, falls back to :class:`fetchers.CharmstoreDownloader`.
62598fc65fc7496912d483f7
class IteratorResourceDeleter(object): <NEW_LINE> <INDENT> __slots__ = ["_deleter", "_handle", "_eager_mode"] <NEW_LINE> def __init__(self, handle, deleter): <NEW_LINE> <INDENT> self._deleter = deleter <NEW_LINE> self._handle = handle <NEW_LINE> self._eager_mode = context.executing_eagerly() <NEW_LINE> <DEDENT> def __d...
An object which cleans up an iterator resource handle. An alternative to defining a __del__ method on an object. Even if the parent object is part of a reference cycle, the cycle will be collectable.
62598fc6be7bc26dc9251fd8
class WaterContent(object): <NEW_LINE> <INDENT> __slots__ = ("minimum", "maximum", "residual", "wilting", "field_cap") <NEW_LINE> def __init__(self, minimum: float = 0.08, maximum: float = 0.30, residual: float = 0.05, wilting: float = -1500.0, field_cap: float = 340.0): <NEW_LINE> <INDENT> self.minimum = WaterContent....
This class represents Water content, or soil moisture content.
62598fc663b5f9789fe8546e
class FloatSchema(NumberSchema): <NEW_LINE> <INDENT> __data_types__ = [float] <NEW_LINE> default = 0.
Float Schema.
62598fc6ad47b63b2c5a7b53
class KeywordEvaluator: <NEW_LINE> <INDENT> TXT_FILE_LINE_SEPARATOR = '\n' <NEW_LINE> def __init__(self, kw_filename): <NEW_LINE> <INDENT> self.keywords_list = [] <NEW_LINE> kw_file = None <NEW_LINE> try: <NEW_LINE> <INDENT> print('Reading keyword file: {}...'.format(kw_filename)) <NEW_LINE> with open(kw_filename, 'r')...
A simple class to evaluate files for occurrences of defined keywords - originally designed to review your resume against a defined set of keywords. You can create multiple keyword definition files and evaluate your file against any set. You could use a file for general keywords and another file for keywords you have de...
62598fc67c178a314d78d79a
class ProjectMember(models.Model): <NEW_LINE> <INDENT> project = models.ForeignKey("Project", related_name="members", verbose_name=u"项目") <NEW_LINE> member = models.ForeignKey("tcis_base.User", verbose_name=u"项目成员") <NEW_LINE> position = models.ForeignKey('tcis_base.Position', verbose_name=u"职位", null=True, blank=True)...
项目成员
62598fc67b180e01f3e491cd
class QuestionQueryFormatKind(Enum): <NEW_LINE> <INDENT> listen = 1 <NEW_LINE> watch = 2 <NEW_LINE> read = 3
问询形式: 暂不用
62598fc6bf627c535bcb17a3
class Ackley(Benchmark): <NEW_LINE> <INDENT> def __init__(self, dim): <NEW_LINE> <INDENT> Benchmark.__init__(self, name='Ackley', dim=dim, fitness_min=0.0, lower_bound=-30.0, upper_bound=30.0, lower_init=15.0, upper_init=30.0) <NEW_LINE> <DEDENT> def fitness(self, x, limit=np.Infinity): <NEW_LINE> <INDENT> value = np.e...
The Ackley benchmark problem.
62598fc62c8b7c6e89bd3abe
class Card: <NEW_LINE> <INDENT> def __init__(self, ident, cardType, text, numAnswers, expansion): <NEW_LINE> <INDENT> self.ident = ident <NEW_LINE> self.cardType = cardType <NEW_LINE> self.text = text <NEW_LINE> self.numAnswers = numAnswers <NEW_LINE> self.expansion = expansion <NEW_LINE> <DEDENT> def __str__(self): <N...
Card object to hold induvidual cards. Attributes: ident (int): unique ID (probably not needed) cardType (str): Q for question cards, A for answer cards text (str): Card main text numAnswers (int): Number of answers needed for question card expansion (str): Expansion set the card is found in
62598fc660cbc95b06364639
class Archive(lzma.LZMAFile): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Archive, self).__init__(*args, **kwargs) <NEW_LINE> self.compressed = True <NEW_LINE> <DEDENT> def _proxy(self, method, *args, **kwargs): <NEW_LINE> <INDENT> if not self.compressed: <NEW_LINE> <INDENT> retur...
file-object wrapper for decompressing xz compressed tar archives This class wraps a file-object that contains tar archive data. The data will be optionally decompressed with lzma/xz if found to be a compressed archive. The file-object itself must be seekable.
62598fc6ec188e330fdf8b90
class Explicit_RK5(Runge_Kutta): <NEW_LINE> <INDENT> def __init__(self, u0, T, tau, function): <NEW_LINE> <INDENT> super().__init__(u0, T, tau, function) <NEW_LINE> self.A = np.array( [ [0, 0, 0, 0, 0, 0], [1 / 3, 0, 0, 0, 0, 0], [4 / 25, 6 / 25, 0, 0, 0, 0], [1 / 4, -3, 15 / 4, 0, 0, 0], [2 / 27, 10 / 9, -50 / 81, 8 /...
Subclass implementing the Runge Kutta method of order 5.
62598fc6aad79263cf42ead1
class Instruction(ndb.Model): <NEW_LINE> <INDENT> instruction = msgprop.MessageProperty(rpc_messages.Instruction) <NEW_LINE> state = ndb.StringProperty(choices=InstructionStates)
Datastore representation of an instruction for a machine. Standalone instances should not be present in the datastore.
62598fc65166f23b2e2436de
class Prelu(Activation): <NEW_LINE> <INDENT> __extra_registration_keys__ = ['leaky-relu'] <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Prelu, self).__init__(*args, **kwargs) <NEW_LINE> self.leak = theano.shared( np.ones((self.layer.size, ), FLOAT) * 0.1, name=self.layer._fmt('leak')) <NEW_L...
Parametric rectified linear activation with learnable leak rate. This activation is characterized by two linear pieces joined at the origin. For negative inputs, the unit response is a linear function of the input with slope :math:`r` (the "leak rate"). For positive inputs, the unit response is the identity function: ...
62598fc6091ae35668704f25
class BERTRegression(Block): <NEW_LINE> <INDENT> def __init__(self, bert, dropout=0.0, prefix=None, params=None): <NEW_LINE> <INDENT> super(BERTRegression, self).__init__(prefix=prefix, params=params) <NEW_LINE> self.bert = bert <NEW_LINE> with self.name_scope(): <NEW_LINE> <INDENT> self.regression = nn.HybridSequentia...
Model for sentence (pair) regression task with BERT. The model feeds token ids and token type ids into BERT to get the pooled BERT sequence representation, then apply a Dense layer for regression. Parameters ---------- bert: BERTModel Bidirectional encoder with transformer. dropout : float or None, default 0.0. ...
62598fc6f9cc0f698b1c5450
class ParamExample: <NEW_LINE> <INDENT> def __init__(self, link_uri): <NEW_LINE> <INDENT> self._ed = Espdrone(rw_cache='./cache') <NEW_LINE> self._ed.connected.add_callback(self._connected) <NEW_LINE> self._ed.disconnected.add_callback(self._disconnected) <NEW_LINE> self._ed.connection_failed.add_callback(self._connect...
Simple logging example class that logs the Stabilizer from a supplied link uri and disconnects after 5s.
62598fc6099cdd3c63675560
class Libxml2Seeker(Seeker): <NEW_LINE> <INDENT> NAME = 'libxml2' <NEW_LINE> def searchLib(self, logger): <NEW_LINE> <INDENT> extra_parts = ['CVS', 'SVN', 'GIT'] <NEW_LINE> key_string = ": program compiled against libxml %d using older %d\n" <NEW_LINE> key_indices = [] <NEW_LINE> for idx, bin_str in enumerate(self._all...
Seeker (Identifier) for the libxml(2) open source library.
62598fc62c8b7c6e89bd3ac0
class UnicodeRegex(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> punctuation = self.property_chars("P") <NEW_LINE> self.nondigit_punct_re = re.compile(r"([^\d])([" + punctuation + r"])") <NEW_LINE> self.punct_nondigit_re = re.compile(r"([" + punctuation + r"])([^\d])") <NEW_LINE> self.symbol_re =...
Ad-hoc hack to recognize all punctuation and symbols.
62598fc6aad79263cf42ead2
class PlanNutrients(object): <NEW_LINE> <INDENT> def __init__(self, plan): <NEW_LINE> <INDENT> self.plan = plan <NEW_LINE> self.price = 0 <NEW_LINE> self.keys = [] <NEW_LINE> self.quantities = {} <NEW_LINE> for product in self.plan['products']: <NEW_LINE> <INDENT> print('product:', product) <NEW_LINE> quantity = produc...
provides nutrient amounts of a product
62598fc64a966d76dd5ef1d3
class KNearestNeighbor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def train(self, X, y): <NEW_LINE> <INDENT> self.X_train = X <NEW_LINE> self.y_train = y <NEW_LINE> <DEDENT> def predict(self, X, k=1, num_loops=0): <NEW_LINE> <INDENT> if num_loops == 0: <NEW_LINE> <INDE...
a kNN classifier with L2 distance
62598fc63d592f4c4edbb1af
class URLSafetyHandler(urlreq.BaseHandler): <NEW_LINE> <INDENT> def __init__(self, check_func=check_url_safety): <NEW_LINE> <INDENT> self.check_url = check_func <NEW_LINE> <DEDENT> def default_open(self, req, *args, **kwargs): <NEW_LINE> <INDENT> self.check_url(req.get_full_url())
urllib handler to safety check all URLs. This is a simple handler that will pass all URLs through a safety check function before opening it. You can instantiate this class with the safety check function to use as an argument; by default, it uses this module's check_url_safety function. Each time a request is passed ...
62598fc676e4537e8c3ef8a2
class ManagedClusterUpgradeProfile(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'control_plane_profile': {'required': True}, 'agent_pool_profiles': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id'...
The list of available upgrades for compute pools. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: The ID of the upgrade profile. :vartype id: str :ivar name: The name of the upgrade profile. :vartyp...
62598fc60fa83653e46f51e4
class ProduceFilter(ResultFilter): <NEW_LINE> <INDENT> allow_multiple = False <NEW_LINE> def __init__(self, *content_types, order=-1): <NEW_LINE> <INDENT> super().__init__(order) <NEW_LINE> self.content_type = ';'.join(content_types) <NEW_LINE> <DEDENT> def on_result_execution(self, context, next_filter): <NEW_LINE> <I...
A filter that specifies the supported response content types. :param content_types: The list of content types. :param int order: The order in which the filter is executed.
62598fc69f288636728189fb
class Server: <NEW_LINE> <INDENT> def __init__(self, host, port) -> None: <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.repositories = {} <NEW_LINE> self.identifyRepositories() <NEW_LINE> <DEDENT> def get_databases(self): <NEW_LINE> <INDENT> client = pymongo.MongoClient(self.uri) <NEW...
A Mongodb server for databroker.
62598fc65fcc89381b2662cc
class IPersonalPreferences(Interface): <NEW_LINE> <INDENT> visible_ids = Bool( title=_( u'label_edit_short_names', default=u'Allow editing of Short Names' ), description=_( u'help_display_names', default=(u'Determines if Short Names (also known ' u'as IDs) are changable when editing items. If Short ' u'Names are not di...
Provide schema for personalize form.
62598fc67b180e01f3e491cf
class SaveImage(Task): <NEW_LINE> <INDENT> def __init__(self, sequence, trigger: Trigger, file_writer, plotting_function, name): <NEW_LINE> <INDENT> super().__init__(sequence, trigger) <NEW_LINE> self.file_writer = file_writer <NEW_LINE> self.plotting_function = plotting_function <NEW_LINE> self.im = tf.placeholder(tf....
Store and display matplotlib images
62598fc6ff9c53063f51a94c
class Player(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.width = 75 <NEW_LINE> self.height = 15 <NEW_LINE> self.image = pygame.Surface([self.width, self.height]) <NEW_LINE> self.image.fill((white)) <NEW_LINE> self.rect = self.image.get_rect() <NE...
This class represents the bar at the bottom that the player controls.
62598fc64c3428357761a5bc
class AIPSImage(_AIPSData): <NEW_LINE> <INDENT> def __init__(self, name, klass, disk, seq): <NEW_LINE> <INDENT> self.desc = _AIPSDataDesc(name, klass, AIPS.disks[disk].disk, seq) <NEW_LINE> self.proxy = AIPS.disks[disk].proxy() <NEW_LINE> self.disk = disk <NEW_LINE> self.url = AIPS.disks[disk].url <NEW_LINE...
This class describes an AIPS image.
62598fc67d847024c075c6bc
class Dom(object): <NEW_LINE> <INDENT> def __init__(self, root=None): <NEW_LINE> <INDENT> self.set_root(root) <NEW_LINE> <DEDENT> def get_tags(self, root, recursive=True): <NEW_LINE> <INDENT> tags = [] <NEW_LINE> for child in root.children: <NEW_LINE> <INDENT> tags.append(child) <NEW_LINE> if recursive: <NEW_LINE> <IND...
Document Object Model class. Contains root of the HTML tag tree.
62598fc6d8ef3951e32c7fdb
class UnrecognizedApiHttpError(UnrecognizedApiError): <NEW_LINE> <INDENT> def __init__(self, exc: googleapiclient.errors.HttpError) -> None: <NEW_LINE> <INDENT> self.response: httplib2.Response = exc.resp <NEW_LINE> self.response_content: bytes = exc.content <NEW_LINE> self.request_uri: str = exc.uri <NEW_LINE> self.er...
Unrecognized Google API ``HttpError``.
62598fc65fc7496912d483fa
class TranslatableModelForm(compat.with_metaclass(TranslatableModelFormMetaclass, TranslatableModelFormMixin, forms.ModelForm)): <NEW_LINE> <INDENT> pass
The model form to use for translated models.
62598fc6adb09d7d5dc0a87b
class Photo(DB.Model): <NEW_LINE> <INDENT> object_id = DB.Column( DB.Integer(), primary_key=True, nullable=False ) <NEW_LINE> filename = DB.Column( DB.Unicode(50), nullable=False ) <NEW_LINE> full_url = DB.Column( DB.Unicode(250), nullable=False ) <NEW_LINE> thumb_url = DB.Column( DB.Unicode(250), nullable=False ) <NEW...
Model for representing a photo stored on S3.
62598fc65fdd1c0f98e5e293
class GxToolset(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{4A7874DE-0020-4F35-8955-CB414813FE78}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{ADC7DE29-DC0B-448E-BBF6-27E4E34CF2EC}', 10, 2)
Catalog object corresponding to toolsets.
62598fc666673b3332c306d6
class WMLParser(SGMLParser): <NEW_LINE> <INDENT> PARSE_TAGS = SGMLParser.TAGS_WITH_URLS.union({'go', 'postfield', 'setvar', 'input', 'select', 'option'}) <NEW_LINE> def __init__(self, http_response): <NEW_LINE> <INDENT> self._select_tag_name = '' <NEW_LINE> self._source_url = http_response.get_url() <NEW_LINE> SGMLPars...
This class is a WML parser. WML is used in cellphone "web" pages. :author: Andres Riancho (andres.riancho@gmail.com)
62598fc6377c676e912f6ef5
class people: <NEW_LINE> <INDENT> eat='喜欢吃饭喜欢睡觉' <NEW_LINE> def __init__(self,name,age,sex): <NEW_LINE> <INDENT> self.name=name <NEW_LINE> self.age=age <NEW_LINE> self.sex=sex <NEW_LINE> print('这是一个初始化方法!') <NEW_LINE> <DEDENT> def getinfo(self): <NEW_LINE> <INDENT> print('这个人叫%s,然后年纪是%d,最后呢性别竟然是%s'%(self.name,self.age,...
这个类是一个人类,实例属性包含name,age,sex
62598fc6fff4ab517ebcdae8
class RouteViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> def list(self, request): <NEW_LINE> <INDENT> queryset = [] <NEW_LINE> serializer = RouteSerializer(queryset, many=True) <NEW_LINE> return Response(serializer.data) <NEW_LINE> <DEDENT> def retrieve(self, request, pk=None): <NEW_LINE> <INDENT> ds = str(pk) <NEW_LI...
The Route namespace is for querying positions in batch, as a route
62598fc65fdd1c0f98e5e294
class OAuthCreateAppTestCase(TestCase): <NEW_LINE> <INDENT> def test_command_output(self): <NEW_LINE> <INDENT> out = StringIO() <NEW_LINE> call_command('oauth_create_app', stdout=out) <NEW_LINE> self.assertIn('Successfully created application', out.getvalue()) <NEW_LINE> exception = False <NEW_LINE> try: <NEW_LINE> <IN...
oauth_create_app test case
62598fc67047854f4633f6d5
class CleanController(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._controller = None <NEW_LINE> <DEDENT> async def __aenter__(self): <NEW_LINE> <INDENT> self._controller = Controller() <NEW_LINE> await self._controller.connect() <NEW_LINE> return self._controller <NEW_LINE> <DEDENT> async def __...
Context manager that automatically connects and disconnects from the currently active controller. Note: Unlike CleanModel, this will not create a new controller for you, and an active controller must already be available.
62598fc67c178a314d78d7a2
class RestThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, url: str, method: str, params: Optional[dict], data: Optional[str], headers: Optional[dict]): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.url = url <NEW_LINE> self.method = method <NEW_LINE> self.params = params <NEW_LINE...
A class used to easily send asynchronous calls to the REST API. After constructing the call, the response can be read with the response property.
62598fc6656771135c489972
class FRBHost(FRBGalaxy): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def by_frb(cls, frb, **kwargs): <NEW_LINE> <INDENT> if frb.frb_name[0:3] == 'FRB': <NEW_LINE> <INDENT> name = frb.frb_name[3:] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> name = frb.frb_name <NEW_LINE> <DEDENT> path = os.path.join(resource_filename...
Child of FRBGalaxy specific for an FRB host Args: ra (float): RA in deg dec (float): DEC in deg FRB (frb.FRB):
62598fc623849d37ff8513b6
class NotChecker(checkers.BaseChecker): <NEW_LINE> <INDENT> __implements__ = (interfaces.IAstroidChecker,) <NEW_LINE> msgs = { "C0113": ( 'Consider changing "%s" to "%s"', "unneeded-not", "Used when a boolean expression contains an unneeded negation.", ) } <NEW_LINE> name = "refactoring" <NEW_LINE> reverse_op = { "<": ...
Checks for too many not in comparison expressions. - "not not" should trigger a warning - "not" followed by a comparison should trigger a warning
62598fc64c3428357761a5c0
class TaskContainer(dict, t.MutableMapping[str, Task]): <NEW_LINE> <INDENT> def __iter__(self) -> t.Iterator[Task]: <NEW_LINE> <INDENT> return iter(self.values())
A container for task objects.
62598fc6f548e778e596b8a0
class StaySerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> review = ReviewSerializer(read_only=True) <NEW_LINE> customer = BaseUserSerializer(read_only=True) <NEW_LINE> hotel = HotelDetailsSerializer(read_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Stay <NEW_LINE> fields = ("id", "start_da...
Serializer to represent the Stay model
62598fc650812a4eaa620d66
class JobRuntimeSpec: <NEW_LINE> <INDENT> def __init__( self, args: List[str], env_vars: Optional[Dict[str, str]] = None, gcs_mounts: Optional[Dict[str, str]] = None, gcs_target: Optional[Dict[str, str]] = None, ): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.env_vars = env_vars or {} <NEW_LINE> self.gcs_mounts...
Specifies runtime properties of jobs
62598fc65fc7496912d483fc
class ChoiceParser(AbstractParser): <NEW_LINE> <INDENT> def __init__(self, this, that): <NEW_LINE> <INDENT> self.expected = merge_expected(this, that, " or ") <NEW_LINE> self.parsers = merge_parser_lists(this, that, ChoiceParser) <NEW_LINE> <DEDENT> def scan(self, text, start=0): <NEW_LINE> <INDENT> for this in self.pa...
A parser that matches any of a list of choices. Backtracks to the beginning of consumption in case of failure.
62598fc6be7bc26dc9251fdd
class Cxt(Format): <NEW_LINE> <INDENT> suffix = '.cxt' <NEW_LINE> dumps_rstrip = False <NEW_LINE> symbols = SYMBOLS <NEW_LINE> values = {s: b for b, s in symbols.items()} <NEW_LINE> @classmethod <NEW_LINE> def loadf(cls, file): <NEW_LINE> <INDENT> source = file.read().strip() <NEW_LINE> b, yx, table = source.split('\n\...
Formal context in the classic CXT format.
62598fc63617ad0b5ee0644c
@mock.patch('adefa.cli.print_api_response') <NEW_LINE> class TestList(TestCase): <NEW_LINE> <INDENT> def test_list(self, mocked_print): <NEW_LINE> <INDENT> items = ['devices', 'projects', 'groups', 'uploads', 'runs', 'jobs'] <NEW_LINE> for pos, item in enumerate(items): <NEW_LINE> <INDENT> cli.client = mock.MagicMock()...
Unit test class to test get list of data.
62598fc6d486a94d0ba2c2d6
class BooleanSetting(Setting): <NEW_LINE> <INDENT> YES_VALUES = ('yes', 'true', '1', 1, True) <NEW_LINE> NO_VALUES = ('no', 'false', '0', 0, False) <NEW_LINE> def __init__(self, default=False): <NEW_LINE> <INDENT> super(BooleanSetting, self).__init__(default) <NEW_LINE> <DEDENT> def validate(self, new_value): <NEW_LINE...
A boolean value.
62598fc623849d37ff8513b8
class MissingInputDataException(Exception): <NEW_LINE> <INDENT> rc = 103
Raised when a script can't run because some information is missing
62598fc6167d2b6e312b727c
class EnvironmentResource(CommonResource): <NEW_LINE> <INDENT> class Meta(CommonMeta): <NEW_LINE> <INDENT> queryset = models.Environment.objects.all() <NEW_LINE> filtering = { 'uuid': ('exact',), 'name': ('exact', 'in',)}
API Resource for 'Environment' model.
62598fc64a966d76dd5ef1db
class NeighborsClassifier(BaseEstimator, ClassifierMixin): <NEW_LINE> <INDENT> def __init__(self, n_neighbors=5, algorithm='auto', window_size=1): <NEW_LINE> <INDENT> self.n_neighbors = n_neighbors <NEW_LINE> self.window_size = window_size <NEW_LINE> self.algorithm = algorithm <NEW_LINE> <DEDENT> def fit(self, X, y, **...
Classifier implementing k-Nearest Neighbor Algorithm. Parameters ---------- n_neighbors : int, optional Default number of neighbors. Defaults to 5. window_size : int, optional Window size passed to BallTree algorithm : {'auto', 'ball_tree', 'brute', 'brute_inplace'}, optional Algorithm used to compute th...
62598fc62c8b7c6e89bd3ac8
class AbstractItem(core_models.AbstractTimeStamped): <NEW_LINE> <INDENT> name = models.CharField(max_length=80) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.name
Abstract Item
62598fc6aad79263cf42eada
class DummyObject: <NEW_LINE> <INDENT> def __init__(self, base=None): <NEW_LINE> <INDENT> if base is not None: <NEW_LINE> <INDENT> if hasattr(base, "location"): <NEW_LINE> <INDENT> self.pos = Vec3(base.location.x, base.location.y, base.location.z) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.pos = Vec3(base.pos) ...
Holds a position and velocity. The base can be either a physics object from the rlbot framework or any object that has a pos and vel attribute.
62598fc65fc7496912d483fd
class Weather(models.Model): <NEW_LINE> <INDENT> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> longitude = models.FloatField() <NEW_LINE> latitude = models.FloatField() <NEW_LINE> temperature = models.FloatField() <NEW_LINE> humidity = models.FloatField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> orderi...
A model for the weather datas.
62598fc65166f23b2e2436e8
class CustomListener(StreamListener): <NEW_LINE> <INDENT> def __init__(self, fname): <NEW_LINE> <INDENT> safe_fname = format_filename(fname) <NEW_LINE> self.outfile = "stream_%s.jsonl" % safe_fname <NEW_LINE> <DEDENT> def on_data(self, data): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> with open(self.outfile, 'a') as ...
Custom StreamListener for streaming Twitter data.
62598fc68a349b6b43686545
class RGensa(RPackage): <NEW_LINE> <INDENT> homepage = "https://cloud.r-project.org/package=GenSA" <NEW_LINE> url = "https://cloud.r-project.org/src/contrib/GenSA_1.1.7.tar.gz" <NEW_LINE> list_url = "https://cloud.r-project.org/src/contrib/Archive/GenSA/" <NEW_LINE> version('1.1.7', sha256='9d99d3d0a4b7770c3c3a6de...
GenSA: Generalized Simulated Annealing Performs search for global minimum of a very complex non-linear objective function with a very large number of optima.
62598fc666673b3332c306dc
class NewLinkViewSelectWdg(BaseRefreshWdg): <NEW_LINE> <INDENT> def init(my): <NEW_LINE> <INDENT> web = WebContainer.get_web() <NEW_LINE> my.search_type = web.get_form_value('search_type') <NEW_LINE> my.refresh = web.get_form_value('is_refresh')=='true' <NEW_LINE> <DEDENT> def get_display(my): <NEW_LINE> <INDENT> widge...
A widget for the view select when creating a new link
62598fc6283ffb24f3cf3b8b
class Const(WireVector): <NEW_LINE> <INDENT> _code = 'C' <NEW_LINE> def __init__(self, val, bitwidth=None, name='', signed=False, block=None): <NEW_LINE> <INDENT> self._validate_bitwidth(bitwidth) <NEW_LINE> from .helperfuncs import infer_val_and_bitwidth <NEW_LINE> num, bitwidth = infer_val_and_bitwidth(val, bitwidth,...
A WireVector representation of a constant value. Converts from bool, integer, or Verilog-style strings to a constant of the specified bitwidth. If the bitwidth is too short to represent the specified constant, then an error is raised. If a positive integer is specified, the bitwidth can be inferred from the constant...
62598fc623849d37ff8513ba
class ErrorMonitor(BasicMonitor): <NEW_LINE> <INDENT> def __init__(self, mainEngine, eventEngine, parent=None): <NEW_LINE> <INDENT> super(ErrorMonitor, self).__init__(mainEngine, eventEngine, parent) <NEW_LINE> d = OrderedDict() <NEW_LINE> d['errorTime'] = {'chinese':u'错误时间', 'cellType':BasicCell} <NEW_LINE> d['errorI...
错误监控
62598fc6956e5f7376df5801
class RemarksInLatex: <NEW_LINE> <INDENT> def __init__(self, project_db): <NEW_LINE> <INDENT> self.project_db = project_db <NEW_LINE> self.remark_re = re.compile( ''.join([r"(?ms)^\\begin{(?P<type>remark)}", r"(\\label{(?P<label>.*?)})(?P<remark>.+?)", r"\\end{(?P=type)}"])) <NEW_LINE> self.owner_re = re.compile(r"\\ow...
Класс присоединяется к проектной БД, и при запуске обработки загружает туда заметки из заданного файла.
62598fc67cff6e4e811b5d2d