code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Analysis_class_test(AnalysisTestCase): <NEW_LINE> <INDENT> def test_regional_boxplot(self): <NEW_LINE> <INDENT> self.assertTrue('boxplot_' + str(self.test_analysis.year) in self.files) <NEW_LINE> self.assertEqual(len(self.boxplotresults['boxes']), 6) <NEW_LINE> <DEDENT> def test_regional_distributions(self): <NEW... | Verifies that create_regional_boxplot and create_regional_distributions successfully create files | 625990883617ad0b5ee07d0e |
class ExpressRouteServiceProvider(Resource): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': '... | A ExpressRouteResourceProvider object.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Resource location.
:type location: str
:para... | 6259908871ff763f4b5e936a |
class CreateServiceAccountKeyRequest(_messages.Message): <NEW_LINE> <INDENT> class PrivateKeyTypeValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> TYPE_UNSPECIFIED = 0 <NEW_LINE> TYPE_PKCS12_FILE = 1 <NEW_LINE> TYPE_GOOGLE_CREDENTIALS_FILE = 2 <NEW_LINE> <DEDENT> privateKeyType = _messages.EnumField('PrivateKeyTypeV... | The service account key create request.
Enums:
PrivateKeyTypeValueValuesEnum: The type of the private key requested.
GOOGLE_CREDENTIALS is the default key type.
Fields:
privateKeyType: The type of the private key requested. GOOGLE_CREDENTIALS
is the default key type. | 625990885fcc89381b266f3c |
class light_speed(temporary_env): <NEW_LINE> <INDENT> def __init__(self, c): <NEW_LINE> <INDENT> temporary_env.__init__(self, param, LIGHT_SPEED=c) <NEW_LINE> self.c = c <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> temporary_env.__enter__(self) <NEW_LINE> return self.c | Within the context of this macro, the environment varialbe LIGHT_SPEED
can be customized.
Examples:
>>> with light_speed(15.):
... print(lib.param.LIGHT_SPEED)
15.
>>> print(lib.param.LIGHT_SPEED)
137.03599967994 | 62599088e1aae11d1e7cf5f2 |
class ELSTD: <NEW_LINE> <INDENT> def __init__(self, num_features=None, epsilon=0): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> self.reset(epsilon) <NEW_LINE> <DEDENT> def reset(self, epsilon=0): <NEW_LINE> <INDENT> self.z = np.zeros(self.n) <NEW_LINE> self.A = np.eye(self.n) * epsilon <NEW_LINE> self.b = np.zeros(self.n)... | Emphatic least-squares temporal difference learning.
Attributes
----------
n : int
The number of features (and therefore the length of the weight vector).
z : Vector[float]
The eligibility trace vector.
A : Matrix[float]
A matrix with shape `(n, n)` that acts like a potential matrix.
b : Vector[float]
... | 62599088bf627c535bcb3091 |
class IntentData(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._examples = [] <NEW_LINE> <DEDENT> def addExample(self, example): <NEW_LINE> <INDENT> self._examples.append(example) <NEW_LINE> <DEDENT> def getExamples(self): <NEW_LINE> <INDENT> return self._examples | Represents a single intent. | 625990887047854f46340f73 |
class Code(Terminal): <NEW_LINE> <INDENT> def __init__(self, *codes): <NEW_LINE> <INDENT> self.codes = set(map(assetcode.normalise, codes)) <NEW_LINE> <DEDENT> def match_single(self, inv_node): <NEW_LINE> <INDENT> return inv_node.code in self.codes <NEW_LINE> <DEDENT> def sexpr(self): <NEW_LINE> <INDENT> return f"(Code... | An AST node representing a 'code' check.
:param codes: A list of valid codes.
:type codes: list of str | 6259908826068e7796d4e500 |
class CardArgumentError(Exception): <NEW_LINE> <INDENT> pass | Exception raised when arguments to the Card class
initializer are mismatched or missing. | 625990884a966d76dd5f0aa4 |
class MAVLink_serial_udb_extra_f5_message(MAVLink_message): <NEW_LINE> <INDENT> def __init__(self, sue_YAWKP_AILERON, sue_YAWKD_AILERON, sue_ROLLKP, sue_ROLLKD, sue_YAW_STABILIZATION_AILERON, sue_AILERON_BOOST): <NEW_LINE> <INDENT> MAVLink_message.__init__(self, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5, 'SERIAL_UDB_EXTRA_F5'... | Backwards compatible version of SERIAL_UDB_EXTRA F5: format | 625990885fc7496912d4904a |
class RA_coord(object): <NEW_LINE> <INDENT> ra_expr = re.compile(r'(\d{1,2})[: ](\d{1,2})[: ](\d{1,2}(\.\d+)?)') <NEW_LINE> def __init__(self,h,m,s): <NEW_LINE> <INDENT> if isinstance(s,float): <NEW_LINE> <INDENT> s = "{0:.2}".format(s) <NEW_LINE> <DEDENT> self.h = abs(int(h)) <NEW_LINE> self.m = abs(int(m)) <NEW_LINE>... | A coordinate in RA | 625990887b180e01f3e49e44 |
class GeloPluginManager(PluginManager.PluginManager): <NEW_LINE> <INDENT> def __init__(self, plugin_locator=None): <NEW_LINE> <INDENT> if plugin_locator is None: <NEW_LINE> <INDENT> plugin_locator = PluginFileLocator.PluginFileAnalyzerWithInfoFile( "GeloPluginAnalyzer", extensions="gelo-plugin" ) <NEW_LINE> <DEDENT> su... | Load Gelo plugins (just override the method that instantiates plugins).
| 6259908899fddb7c1ca63bbb |
class RLimsolve(RPackage): <NEW_LINE> <INDENT> homepage = "https://cloud.r-project.org/package=limSolve" <NEW_LINE> url = "https://cloud.r-project.org/src/contrib/limSolve_1.5.6.tar.gz" <NEW_LINE> list_url = "https://cloud.r-project.org/src/contrib/Archive/limSolve" <NEW_LINE> version('1.5.6', sha256='b97ea9930383... | Solving Linear Inverse Models
Functions that (1) find the minimum/maximum of a linear or quadratic
function: min or max (f(x)), where f(x) = ||Ax-b||^2 or f(x) = sum(a_i*x_i)
subject to equality constraints Ex=f and/or inequality constraints Gx>=h,
(2) sample an underdetermined- or overdetermined system Ex=f subject t... | 62599088adb09d7d5dc0c119 |
class Meta: <NEW_LINE> <INDENT> unique_together = ( ('name', 'slave'), ( 'source_path', 'destination_path', 'slave', 'source_type', 'destination_type', ), ) | Meta class | 62599088e1aae11d1e7cf5f3 |
class AddInstance(base.Command): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parser.add_argument( 'resource', nargs='+', help='Resources to add to the resource view.') <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> zone_views_client = self.context['zoneViewsClient'] ... | Adds resources to a resource view by resource name. | 62599088656771135c48ae10 |
class RectangularController(BaseController): <NEW_LINE> <INDENT> def __init__(self, width, height=1, reverse_x=False, reverse_y=False, a=10): <NEW_LINE> <INDENT> self.WIDTH = width <NEW_LINE> self.HEIGHT = height <NEW_LINE> self.REVERSE_X = reverse_x <NEW_LINE> self.REVERSE_Y = reverse_y <NEW_LINE> config = { 'a': a, '... | An interface to control a strip of RGB LEDs arranged in a rectangle.
| 625990884c3428357761be7b |
class CiscoAsaSSH(CiscoSSHConnection): <NEW_LINE> <INDENT> def session_preparation(self): <NEW_LINE> <INDENT> self._test_channel_read() <NEW_LINE> self.set_base_prompt() <NEW_LINE> if self.secret: <NEW_LINE> <INDENT> self.enable() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.asa_login() <NEW_LINE> <DEDENT> self.d... | Subclass specific to Cisco ASA. | 62599088aad79263cf43037b |
class TrailEditForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Trail <NEW_LINE> fields = [ 'title', 'region', 'country', 'description', 'trackfile', 'distance', 'ascent', 'calories', 'duration', 'geocaches', 'public', 'trail_type', 'activity_type', 'difficulty', 'season', 'directions'... | User edits one of their trails. | 62599088be7bc26dc9252c36 |
class EmailBackend(object): <NEW_LINE> <INDENT> def authenticate(self, username=None, password=None, **kwargs): <NEW_LINE> <INDENT> UserModel = get_user_model() <NEW_LINE> if username is None: <NEW_LINE> <INDENT> username = kwargs.get('email') <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> user = UserModel._default_manag... | Authenticates against settings.AUTH_USER_MODEL. | 62599088d8ef3951e32c8c3e |
class PacketLoggerOpts(TypedDict, total=False): <NEW_LINE> <INDENT> enabled: Optional[bool] <NEW_LINE> fileNumberLimit: Optional[int] <NEW_LINE> logFileSizeInHours: Optional[float] <NEW_LINE> compressSpecifications: Optional[bool] <NEW_LINE> compressPrices: Optional[bool] | Packet logger options. | 62599088dc8b845886d5517a |
class Calculator(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.choices_cmd = ['add', 'sub', 'mul', 'div', 'pow', 'mod', 'floor'] <NEW_LINE> <DEDENT> def add(self, op1, op2): <NEW_LINE> <INDENT> return op1 + op2 <NEW_LINE> <DEDENT> def sub(self, op1, op2): <NEW_LINE> <INDENT> return op1 - op2 <NEW_... | A basic calculator, little more than a wrapper for some basic arithmetic operators. | 6259908871ff763f4b5e936e |
class Command(BaseCommand): <NEW_LINE> <INDENT> help = "Notifies job alert subscribers of new matches" <NEW_LINE> def handle(self, *args, **options): <NEW_LINE> <INDENT> task = JobAlertNotificationTask.objects.create() <NEW_LINE> try: <NEW_LINE> <INDENT> start_time = ( JobAlertNotificationTask.objects.filter(is_success... | This checks job alert subscriptions, and sends messages about new matches.
Any further documentation for this feature is at docs/recruitment-site.md | 62599088a05bb46b3848bf07 |
class PQ(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Q = [] <NEW_LINE> self.length = 0 <NEW_LINE> <DEDENT> def push(self, item, priority = 0): <NEW_LINE> <INDENT> heapq.heappush(self.Q, (priority, item)) <NEW_LINE> self.length += 1 <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_LINE> <INDENT>... | Priority queue. | 62599088e1aae11d1e7cf5f4 |
class Bowtie2_MapError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message | Exception raised when bowtie2-map fails | 62599088283ffb24f3cf5462 |
class H5TelstateSensorData(RecordSensorData): <NEW_LINE> <INDENT> def __init__(self, data, name=None): <NEW_LINE> <INDENT> super(H5TelstateSensorData, self).__init__(data, name) <NEW_LINE> self.dtype = None <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> if key == 'timestamp': <NEW_LINE> <INDENT> re... | Raw (uninterpolated) sensor data in HDF5 TelescopeState recarray form.
This wraps the telstate sensors stored in recent HDF5 files. It differs
in two ways from the normal HDF5 sensors: no 'status' field and values
encoded by katsdptelstate.
TODO: This is a temporary fix to get at missing sensors in telstate and
shoul... | 625990882c8b7c6e89bd53a8 |
class WhatIsVocabQuestion(QuestionTemplate): <NEW_LINE> <INDENT> regex1 = Lemma("who") + Lemma("be") + Vocabulary() <NEW_LINE> regex2 = Lemma("what") + Lemma("be") + Vocabulary() <NEW_LINE> regex = (regex1 | regex2) + Question(Pos(".")) <NEW_LINE> def interpret(self, match): <NEW_LINE> <INDENT> desc = dsl.DefinitionOf(... | Regex for questions like "What is foaf"
Ex: "What is dcterms" | 625990885fc7496912d4904c |
class PwmanCli(cmd.Cmd, BaseCommands): <NEW_LINE> <INDENT> undoc_header = "Aliases:" <NEW_LINE> def __init__(self, db, hasxsel, callback, config_parser, **kwargs): <NEW_LINE> <INDENT> super(PwmanCli, self).__init__(**kwargs) <NEW_LINE> self.intro = "%s %s (c) visit: %s" % (appname, version, website) <NEW_LINE> self._hi... | Inherit from the BaseCommands and Aliases | 6259908871ff763f4b5e9370 |
class Page(models.Model): <NEW_LINE> <INDENT> content_type = models.ForeignKey(ContentType) <NEW_LINE> object_id = models.PositiveIntegerField() <NEW_LINE> content_object = generic.GenericForeignKey('content_type', 'object_id') <NEW_LINE> @property <NEW_LINE> def title(self): <NEW_LINE> <INDENT> return self.cont... | Page is a catch-all model that encompasses plain text pages,
exercises, etc.
For each content type, remember to connect it to Page via
post_save and create_page (see example below) | 62599088e1aae11d1e7cf5f5 |
class Logo(LogoType_): <NEW_LINE> <INDENT> c_tag = 'Logo' <NEW_LINE> c_namespace = NAMESPACE <NEW_LINE> c_children = LogoType_.c_children.copy() <NEW_LINE> c_attributes = LogoType_.c_attributes.copy() <NEW_LINE> c_child_order = LogoType_.c_child_order[:] <NEW_LINE> c_cardinality = LogoType_.c_cardinality.copy() | The urn:oasis:names:tc:SAML:metadata:ui:Logo element | 625990885fdd1c0f98e5fb3d |
class TemporalAttachmentMetamorphosisGeomGradientGradZetaPenalized(Operator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(functional.domain, functional.domain, linear=False) <NEW_LINE> <DEDENT> def _call(self, X): <NEW_LINE> <INDENT> zeta_list=X[1] <NEW_LINE> grad = functional.gradient(... | The gradient operator of the TemporalAttachmentMetmorphosisGeom
functional when zeta is also penalized by the norm of
its gradient. | 625990887047854f46340f79 |
class JudgeConfig(AppConfig): <NEW_LINE> <INDENT> name = 'judge' <NEW_LINE> verbose_name = _("Judge") | Config class used for app name and its translation. | 62599088aad79263cf43037e |
class ObjectBase(ObjectGen): <NEW_LINE> <INDENT> def __init__(self, name='', createFunction = None, model = None, models= [], anims = [], animNames = [], animDict = {}, properties={}, movable = True, actor = False, named=False, updateModelFunction = None, orderedProperties=[], propertiesMask={}): <NEW_LINE> <INDENT> Ob... | Base class for obj definitions | 6259908850812a4eaa6219a7 |
class RLaplacesdemon(RPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/LaplacesDemonR/LaplacesDemon" <NEW_LINE> url = "https://cloud.r-project.org/src/contrib/LaplacesDemon_16.0.1.tar.gz" <NEW_LINE> list_url = "https://cloud.r-project.org/src/contrib/Archive/LaplacesDemon" <NEW_LINE> version('16.1.4', ... | Complete Environment for Bayesian Inference
Provides a complete environment for Bayesian inference using a variety of
different samplers (see ?LaplacesDemon for an overview). The README
describes the history of the package development process. | 62599088aad79263cf43037f |
class IndexedSlices(_TensorLike): <NEW_LINE> <INDENT> def __init__(self, values, indices, dense_shape=None): <NEW_LINE> <INDENT> _get_graph_from_inputs([values, indices, dense_shape]) <NEW_LINE> self._values = values <NEW_LINE> self._indices = indices <NEW_LINE> self._dense_shape = dense_shape <NEW_LINE> <DEDENT> @prop... | A sparse representation of a set of tensor slices at given indices.
This class is a simple wrapper for a pair of `Tensor` objects:
* `values`: A `Tensor` of any dtype with shape `[D0, D1, ..., Dn]`.
* `indices`: A 1-D integer `Tensor` with shape `[D0]`.
An `IndexedSlices` is typically used to represent a subset of a... | 62599088dc8b845886d5517e |
class Signup(FlexibleSchema): <NEW_LINE> <INDENT> username = UniqueUsername(not_empty=True) <NEW_LINE> email = UniqueEmail(resolve_domain=True, not_empty=True) <NEW_LINE> password = Password(not_empty=True) <NEW_LINE> confirm = Password(not_empty=True) <NEW_LINE> chained_validators = [ validators.FieldsMatch( 'password... | Form fields to render and validate for signup. | 62599088ad47b63b2c5a9417 |
@debtcollector.removals.removed_class("OpportunisticTestCase") <NEW_LINE> class OpportunisticTestCase(DbTestCase): <NEW_LINE> <INDENT> pass | Placeholder for backwards compatibility. | 62599088adb09d7d5dc0c11f |
class Cfc: <NEW_LINE> <INDENT> def __init__(self, grafo): <NEW_LINE> <INDENT> self.grafo = grafo <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> dfs = BuscaProfundidade(self.grafo) <NEW_LINE> dfs.busca() <NEW_LINE> tt = TempoTermino(self.grafo.n_vertices) <NEW_LINE> for u in range(self.grafo.n_vertices): <NEW_LI... | Busca por componentes fortemente conectados | 62599088a05bb46b3848bf09 |
class Scheme: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass | A Scheme class
The scheme class is responsible for the following:
Gen: A generator that produces a list of candidate tag sequences that is defined over the entire sentence structure.
Dec: A search algorithm that finds the highest scoring tag sequence from the list provided by the generator.
Enc: ... | 62599088283ffb24f3cf5466 |
class RequestFailed(IOError): <NEW_LINE> <INDENT> pass | The metadata endpoint returned an unexpected status code. | 62599088aad79263cf430380 |
class TestLongestCommonPrefix(unittest.TestCase): <NEW_LINE> <INDENT> def test_longest_common_prefix(self): <NEW_LINE> <INDENT> s = SolutionF() <NEW_LINE> self.assertEqual('fl', s.longestCommonPrefix(["flower", "flow", "flight"])) <NEW_LINE> self.assertEqual('', s.longestCommonPrefix(["flower", "flow", ""])) <NEW_LINE>... | Test q014_longest_common_prefix.py | 625990888a349b6b43687e24 |
class DataTarget(_LocalPathTarget): <NEW_LINE> <INDENT> def load(self, fun, cached=False, **kwargs): <NEW_LINE> <INDENT> if self.exists(): <NEW_LINE> <INDENT> if not cached or not settings.cached or self.path not in cache: <NEW_LINE> <INDENT> opts = {**{},**kwargs} <NEW_LINE> df = fun(self.path, **opts) <NEW_LINE> if c... | Local target which saves in-memory data (eg dataframes) to persistent storage (eg files) and loads from storage to memory
This is an abstract class that you should extend. | 6259908826068e7796d4e508 |
class KeyboardInterface(USBInterface): <NEW_LINE> <INDENT> name : str = "USB keyboard interface" <NEW_LINE> class_number : int = 3 <NEW_LINE> class KeyEventEndpoint(USBEndpoint): <NEW_LINE> <INDENT> number : int = 3 <NEW_LINE> direction : USBDirection = USBDirection.IN <NEW_LINE> trans... | Core HID interface for our keyboard. | 62599088a8370b77170f1f93 |
class Action(models.IntegerChoices): <NEW_LINE> <INDENT> CONTINUE = 0 <NEW_LINE> RECHECK = 1 <NEW_LINE> PAUSE = 2 <NEW_LINE> CHANGE = 3 <NEW_LINE> EMERGENCY = 4 <NEW_LINE> INACTIVATE = 5 | Class to describe Lab.action field choices and action taken on abnormal Lab.
Will be set by process_high() or process_low() method. | 62599088656771135c48ae14 |
class Customer(Person): <NEW_LINE> <INDENT> def __init__(self, company_name="", **kwargs): <NEW_LINE> <INDENT> super(Customer, self).__init__(**kwargs) <NEW_LINE> self.company_name = company_name | A subclass of Person that represents a customer. | 62599088ec188e330fdfa475 |
class TwoLayerNet(object): <NEW_LINE> <INDENT> def __init__(self, input_dim=3*32*32, hidden_dim=100, num_classes=10, weight_scale=1e-3, reg=0.0): <NEW_LINE> <INDENT> self.params = {} <NEW_LINE> self.reg = reg <NEW_LINE> self.params['W1'] = np.random.normal(scale=weight_scale, size=(input_dim, hidden_dim)) <NEW_LINE> se... | A two-layer fully-connected neural network with ReLU nonlinearity and
softmax loss that uses a modular layer design. We assume an input dimension
of D, a hidden dimension of H, and perform classification over C classes.
The architecure should be affine - relu - affine - softmax.
Note that this class does not implemen... | 6259908826068e7796d4e50a |
class Clinic(models.Model): <NEW_LINE> <INDENT> TYPE_CHIOCES = ( ('primary', 'Primary Healthcare Facility'), ('general', 'General Hospital'), ) <NEW_LINE> name = models.CharField(max_length=100, unique=True) <NEW_LINE> slug = models.SlugField(unique=True) <NEW_LINE> type = models.CharField(max_length=16, null=True, cho... | A health clinic. | 6259908863b5f9789fe86d31 |
class BF3TestCase(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> from b3.parsers.frostbite2.abstractParser import AbstractParser <NEW_LINE> from b3.fake import FakeConsole <NEW_LINE> AbstractParser.__bases__ = (FakeConsole,) <NEW_LINE> <DEDENT> def tearDown(self... | Test case that is suitable for testing BF3 parser specific features | 62599088d486a94d0ba2db7e |
class RecordsSource(ReadOnlySource): <NEW_LINE> <INDENT> fields = [params.RECORDS] <NEW_LINE> targets = (params.INPUT,) <NEW_LINE> actions = (params.READ_ACTION,) <NEW_LINE> def __init__(self, records): <NEW_LINE> <INDENT> self.records = records <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> from pyexcel.u... | A list of dictionaries as data source
The dictionaries should have identical fields. | 6259908855399d3f056280dd |
class ListDisplayVideo360AdvertiserLinksAsyncPager: <NEW_LINE> <INDENT> def __init__( self, method: Callable[ ..., Awaitable[analytics_admin.ListDisplayVideo360AdvertiserLinksResponse] ], request: analytics_admin.ListDisplayVideo360AdvertiserLinksRequest, response: analytics_admin.ListDisplayVideo360AdvertiserLinksResp... | A pager for iterating through ``list_display_video360_advertiser_links`` requests.
This class thinly wraps an initial
:class:`google.analytics.admin_v1alpha.types.ListDisplayVideo360AdvertiserLinksResponse` object, and
provides an ``__aiter__`` method to iterate through its
``display_video_360_advertiser_links`` field... | 62599088dc8b845886d55182 |
class ChannelNet(Chain): <NEW_LINE> <INDENT> def __init__(self, channels, block_names, merge_types, dropout_rate=0.0001, multi_blocks=2, groups=2, in_channels=3, in_size=(224, 224), classes=1000): <NEW_LINE> <INDENT> super(ChannelNet, self).__init__() <NEW_LINE> self.in_size = in_size <NEW_LINE> self.classes = classes ... | ChannelNet model from 'ChannelNets: Compact and Efficient Convolutional Neural Networks via Channel-Wise
Convolutions,' https://arxiv.org/abs/1809.01330.
Parameters:
----------
channels : list of list of list of int
Number of output channels for each unit.
block_names : list of list of list of str
Names of blo... | 62599088fff4ab517ebcf3e0 |
class Notebook: <NEW_LINE> <INDENT> def __init__(self, master=None): <NEW_LINE> <INDENT> self.root = master <NEW_LINE> self.notebook = ttk.Notebook(self.root) <NEW_LINE> s = ttk.Style() <NEW_LINE> s.configure('Red.TLabelframe.Label', background='blue') <NEW_LINE> <DEDENT> def addTab(self, title): <NEW_LINE> <INDENT> se... | Create a notebook | 625990883346ee7daa338447 |
class TowerChainsaw(Tower): <NEW_LINE> <INDENT> def find_target(self, creeps): <NEW_LINE> <INDENT> self.target = [] <NEW_LINE> for creep in creeps: <NEW_LINE> <INDENT> if (abs(creep.row - self.row) <= self.range and abs(creep.col - self.col) <= self.range): <NEW_LINE> <INDENT> self.target.append(creep) <NEW_LINE> <DEDE... | Chainsaw tower damage multiple creeps at once. | 625990885fdd1c0f98e5fb43 |
class ManualGrowDialog(QDialog): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.water_spinbox = QSpinBox() <NEW_LINE> self.light_spinbox = QSpinBox() <NEW_LINE> self.water_spinbox.setRange(0,10) <NEW_LINE> self.light_spinbox.setRange(0,10) <NEW_LINE> self.water_spinbox.se... | This class provides a dialog window to ask for light and water | 625990885fcc89381b266f43 |
class Meta: <NEW_LINE> <INDENT> handler_class = HANDLER_CLASS <NEW_LINE> message_type = DELETE_ROUTES <NEW_LINE> schema_class = "DeleteRoutesSchema" | DeleteRoutes metadata. | 62599088dc8b845886d55184 |
class NumericField(forms.CharField): <NEW_LINE> <INDENT> def to_python(self, raw_value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> raw_value = re.sub('\D', '', raw_value) <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> return super(NumericField, self).to_python(raw_value) | field to ignore everything except digits - dashes, spaces etc | 62599088283ffb24f3cf546b |
class ProviderUserInfo(UserInfo): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super(ProviderUserInfo, self).__init__() <NEW_LINE> if not isinstance(data, dict): <NEW_LINE> <INDENT> raise ValueError('Invalid data argument: {0}. Must be a dictionary.'.format(data)) <NEW_LINE> <DEDENT> if not data.ge... | Contains metadata regarding how a user is known by a particular identity provider. | 625990887b180e01f3e49e4a |
class CategoryFunctionalMode(GenericCategory): <NEW_LINE> <INDENT> def parse(self, string): <NEW_LINE> <INDENT> self.set_value(string) | This category contains the name of the functional mode
0. name
1. wakeup time from this mode in seconds | 62599088adb09d7d5dc0c125 |
class Meta: <NEW_LINE> <INDENT> model = NPC | Bind model to factory. | 62599088f9cc0f698b1c60b1 |
class ImprovedDisplay(Plugin): <NEW_LINE> <INDENT> enabled = True <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ImprovedDisplay, self).__init__(*args, **kwargs) <NEW_LINE> self.color_verbose = self.enabled <NEW_LINE> self.easy_copy = self.enabled <NEW_LINE> self.replace_input = self.enabled ... | Make regression test descriptions easier to read and use. | 625990882c8b7c6e89bd53b2 |
class VirtualMachineScaleSetNetworkConfiguration(SubResource): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, 'ip_configurations': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'ty... | Describes a virtual machine scale set network profile's network
configurations.
:param id: Resource Id
:type id: str
:param name: The network configuration name.
:type name: str
:param primary: Whether this is a primary NIC on a virtual machine.
:type primary: bool
:param ip_configurations: The virtual machine scale s... | 62599088656771135c48ae16 |
class Formatter(FormatterBase): <NEW_LINE> <INDENT> DEFAULT_REPLACE = [ (r'\s+' , r' ' ), (r'\s*([^\w\s]+)\s*' , r'\1' ), (r'([,.?!])(\w)' , r'\1 \2' ), (r'([\w,.?!])([[({<])', r'\1 \2' ), (r'([])}>])(\w)' , r'\1 \2' ), (r'(\w)([-+*]+)(\w)' , r'\1 \2 \3'), ] <NEW_LINE> def __i... | Default formatter.
Attributes
----------
case : `markovchain.text.util.CharCase`
Character case.
replace : `list` of (_sre.SRE_Pattern, `str`, `int`)
List of regular expressions to replace.
end_chars : `str`
Sentence ending characters.
default_end : `None` or `str`
Default sentence ending character. | 625990884c3428357761be86 |
class NopClaim(object): <NEW_LINE> <INDENT> def __init__(self, migration=None): <NEW_LINE> <INDENT> self.migration = migration <NEW_LINE> <DEDENT> @property <NEW_LINE> def disk_gb(self): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> @property <NEW_LINE> def memory_mb(self): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <D... | For use with compute drivers that do not support resource tracking | 625990888a349b6b43687e2a |
class EB_CBLAS(ConfigureMake): <NEW_LINE> <INDENT> def configure_step(self): <NEW_LINE> <INDENT> copy_file('Makefile.LINUX', 'Makefile.in') <NEW_LINE> if not self.cfg['buildopts']: <NEW_LINE> <INDENT> self.cfg.update('buildopts', 'all') <NEW_LINE> <DEDENT> self.cfg.update('buildopts', 'CC="%s"' % os.getenv('CC')) <NEW_... | Support for building CBLAS (BLAS C interface),
inspired by instructions to build CBLAS for ACML, see https://wiki.fysik.dtu.dk/gpaw/install/Linux/vsc.univie.html | 625990884a966d76dd5f0ab2 |
class CourseAccessRole(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, on_delete=models.CASCADE) <NEW_LINE> org = models.CharField(max_length=64, db_index=True, blank=True) <NEW_LINE> course_id = CourseKeyField(max_length=255, db_index=True, blank=True) <NEW_LINE> role = models.CharField(max_length=64... | Maps users to org, courses, and roles. Used by student.roles.CourseRole and OrgRole.
To establish a user as having a specific role over all courses in the org, create an entry
without a course_id. | 62599088a8370b77170f1f99 |
class Member(models.Model): <NEW_LINE> <INDENT> COLLEGES = ( 'McMurtry', 'Martel', 'Brown', 'Duncan', 'Jones', 'Lovett', 'Will Rice', 'Hanzen', 'Sid Rich', 'Baker', 'Wiess' ) <NEW_LINE> first_name = models.CharField(max_length=30) <NEW_LINE> last_name = models.CharField(max_length=30) <NEW_LINE> email = models.EmailFie... | This is a model that represent a member in the club. | 625990895fc7496912d49051 |
class TSCrawler(object): <NEW_LINE> <INDENT> def __init__(self, proxy_host=None): <NEW_LINE> <INDENT> self.browser = mechanize.Browser() <NEW_LINE> if proxy_host is not None: <NEW_LINE> <INDENT> self.browser.set_proxies({"http": proxy_host}) <NEW_LINE> <DEDENT> self.cookie = cookielib.LWPCookieJar() <NEW_LINE> self.bro... | Transparence sante crawler | 6259908992d797404e389943 |
class UnifyModifiersSizeOperator(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.unify_modifiers_operator" <NEW_LINE> bl_label = "Unify modifiers" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> use_names: bpy.props.BoolProperty(name="Use names", default=False) <NEW_LINE> copy_all: bpy.props.BoolPr... | Unify modifiers | 62599089d486a94d0ba2db84 |
class TemporaryWebserver(object): <NEW_LINE> <INDENT> def start(self, repopath): <NEW_LINE> <INDENT> self.httpd = SocketServer.ThreadingTCPServer(("", 0), RequestHandler) <NEW_LINE> self.httpd._cwd = repopath <NEW_LINE> server_thread = threading.Thread(target=self.httpd.serve_forever) <NEW_LINE> server_thread.daemon = ... | This class is used to control a temporary webserver which is used
by the installer and imagefactory rpm-ostree-toolbox subcommands to get
content from the from the host to the builds | 62599089167d2b6e312b837e |
class RepetitionUnit(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> ordering = [ "name", ] <NEW_LINE> <DEDENT> name = models.CharField(max_length=100, verbose_name=_('Name')) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def get_owner_object(self): <NEW_LINE>... | Setting unit, used in combination with an amount such as '10 reps', '5 km' | 625990895fc7496912d49052 |
class AGMetricsTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_risk(self): <NEW_LINE> <INDENT> ag = testAGs() <NEW_LINE> self.assertTrue(ag[0].risk == 20) <NEW_LINE> self.assertTrue(ag[1].risk == 25) <NEW_LINE> self.assertTrue(ag[2].risk == 25) <NEW_LINE> <DEDENT> def test_cost(self): <NEW_LINE> <INDENT> ag =... | Tests for metrics implemented in attackgraph.py | 62599089ad47b63b2c5a9421 |
class Nonce(models.Model): <NEW_LINE> <INDENT> nonce = models.CharField("NONCE", max_length=16, null=True, blank=True) <NEW_LINE> timestamp = models.DateTimeField("Timestamp", default=current_utc_time) <NEW_LINE> credentials = models.ForeignKey(Credentials) <NEW_LINE> def save(self, *args, **kwargs): <NEW_LINE> <INDENT... | Keeps track of any NONCE combinations that we have used | 62599089e1aae11d1e7cf5fb |
class UserCancelled(TUIException): <NEW_LINE> <INDENT> pass | This class is raised when the user presses ^D in the TUI | 62599089fff4ab517ebcf3e6 |
class VisAttDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, folder='~/proj/visatt/data/out/'): <NEW_LINE> <INDENT> super(MyDataset, self).__init__() <NEW_LINE> self.folder = folder <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return self.b - self.a + 1 <NEW_LINE> <DEDENT> def __getitem__(self, in... | This dataset contains a list of numbers in the range [a,b] inclusive | 62599089099cdd3c636761e2 |
class TensorBoardLogger(object): <NEW_LINE> <INDENT> def __init__(self, model_dir=None, initial_iter=0, tensorboard_every_n=0, **_unused): <NEW_LINE> <INDENT> self.tensorboard_every_n = tensorboard_every_n <NEW_LINE> self.summary_dir = get_latest_subfolder( os.path.join(model_dir, 'logs'), create_new=initial_iter == 0)... | This class handles iteration events to log summaries to
the TensorBoard log. | 62599089656771135c48ae18 |
class Square(Shape): <NEW_LINE> <INDENT> all_squares =[] <NEW_LINE> def __init__(self, x =0, y =0, side =2): <NEW_LINE> <INDENT> super().__init__(x,y) <NEW_LINE> self.side = side <NEW_LINE> self.__class__.all_squares.append(self) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def total_area(cls): <NEW_LINE> <INDENT> cummu... | This class describes about the Shape which forms the is a relationship with Shape | 62599089aad79263cf43038a |
class HtmlPrinter(PrettyPrinter): <NEW_LINE> <INDENT> def __init__(self, file_handle, go_to_url = "#", style = _DEFAULT_STYLE): <NEW_LINE> <INDENT> self.handle = file_handle <NEW_LINE> self.go_to_url = go_to_url <NEW_LINE> self.style = style <NEW_LINE> <DEDENT> def write_tag(self, tag, text, attrs = None): <NEW_LINE> <... | Prints found enrichments to html file. | 625990893617ad0b5ee07d22 |
class Array(Node): <NEW_LINE> <INDENT> icons = {16: images.array_16, 64: images.array_64} <NEW_LINE> @property <NEW_LINE> def shape(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @property <NEW_LINE> def dtype(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def ... | Represents a NumPy-style regular, rectangular array.
Subclasses will be displayed in a spreadsheet-style viewer. | 62599089091ae35668706813 |
class ZeroExpectedError(ValueError): <NEW_LINE> <INDENT> pass | Class for handling tests where an expected value was zero. | 6259908955399d3f056280e5 |
class ILSLocalizerDeviation1500To1000FtMax(KeyPointValueNode): <NEW_LINE> <INDENT> name = 'ILS Localizer Deviation 1500 To 1000 Ft Max' <NEW_LINE> units = ut.DOTS <NEW_LINE> def derive(self, ils_localizer=P('ILS Localizer'), alt_aal=P('Altitude AAL For Flight Phases'), ils_ests=S('ILS Localizer Established')): <NEW_LIN... | Determine maximum deviation from the localizer between 1500 and 1000 ft.
Find where the maximum (absolute) deviation occured and store the actual
value. We can do abs on the statistics to normalise this, but retaining the
sign will make it possible to look for direction of errors at specific
airports. | 6259908923849d37ff852c8b |
class Helper(web.Helper): <NEW_LINE> <INDENT> def is_task(self, task_id, tasks): <NEW_LINE> <INDENT> for t in tasks: <NEW_LINE> <INDENT> if t.id == task_id: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> <DEDENT> return False <NEW_LINE> <DEDENT> def is_unique(self, id, items): <NEW_LINE> <INDENT> copies = 0 <NEW_L... | Class to help testing the scheduler | 62599089fff4ab517ebcf3e8 |
class MessageHandler(BaseHandler): <NEW_LINE> <INDENT> @CheckPermission(5) <NEW_LINE> async def get(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> limit = self.get_argument('limit', 5) <NEW_LINE> page = self.get_argument('page', 1) <NEW_LINE> total = self.get_argument('total', 0) <NEW_LINE> <DEDENT> except Missing... | 系统通知 | 6259908950812a4eaa6219ae |
class IBountyProgramSubmission(Interface): <NEW_LINE> <INDENT> mission = schema.Text( title=_(u"Bounty mission"), required=True, description=_(u"Bounty mission trac ticket #"), ) <NEW_LINE> email = schema.TextLine( title=_(u"Email address"), required=False, ) <NEW_LINE> organization = schema.TextLine( title=_(u"Organiz... | Information for Bounty Program Submission | 62599089aad79263cf43038c |
class TransportProtocolFactory(object): <NEW_LINE> <INDENT> def __init__(self, portal): <NEW_LINE> <INDENT> self.portal = portal <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return TelnetTransport(AuthenticatingTelnetProtocol, self.portal) | Glues together a portal along with the :class:`TelnetTransport` and
:class:`AuthenticatingTelnetProtocol` objects. This class is instanced
onto the ``protocol`` attribute of the :class:`ServerFactory` class
in :func:`build_manhole`. | 6259908963b5f9789fe86d3b |
class value_set: <NEW_LINE> <INDENT> def available_as_dot_raw_value(self): <NEW_LINE> <INDENT> a = Argument('a') <NEW_LINE> a.value = 'foo' <NEW_LINE> eq_(a.raw_value, 'foo') <NEW_LINE> <DEDENT> def untransformed_appears_as_dot_value(self): <NEW_LINE> <INDENT> a = Argument('a', kind=str) <NEW_LINE> a.value = 'foo' <NEW... | value= | 62599089d486a94d0ba2db88 |
class KafkaConsumer: <NEW_LINE> <INDENT> def __init__( self, topic_name_pattern, message_handler, is_avro=True, offset_earliest=False, sleep_secs=1.0, consume_timeout=0.1, ): <NEW_LINE> <INDENT> self.topic_name_pattern = topic_name_pattern <NEW_LINE> self.message_handler = message_handler <NEW_LINE> self.sleep_secs = s... | Defines the base kafka consumer class | 62599089fff4ab517ebcf3ea |
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> objects = User... | Request a userfile | 625990892c8b7c6e89bd53ba |
class TestV1AttachedVolume(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 testV1AttachedVolume(self): <NEW_LINE> <INDENT> pass | V1AttachedVolume unit test stubs | 6259908999fddb7c1ca63bc6 |
class CT_TextField(BaseOxmlElement): <NEW_LINE> <INDENT> rPr = ZeroOrOne('a:rPr', successors=('a:pPr', 'a:t')) <NEW_LINE> t = ZeroOrOne('a:t', successors=()) <NEW_LINE> @property <NEW_LINE> def text(self): <NEW_LINE> <INDENT> t = self.t <NEW_LINE> if t is None: <NEW_LINE> <INDENT> return u'' <NEW_LINE> <DEDENT> text = ... | <a:fld> field element, for either a slide number or date field | 62599089d8ef3951e32c8c48 |
class ActiveSensing(Message): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.byte_1 = 0xfe <NEW_LINE> self.byte_2 = 0 <NEW_LINE> self.byte_3 = 0 | This message is intended to be sent repeatedly to tell the receiver that
a connection is alive. Use of this message is optional. When initially
received, the receiver will expect to receive another Active Sensing
message each 300ms (max), and if it does not then it will assume that the
connection has been terminated. A... | 62599089dc8b845886d5518e |
class NotMatch(BaseFn): <NEW_LINE> <INDENT> METHOD_SIG = re.compile(r'notmatch\((.+),\s+(.+)\)') <NEW_LINE> def __init__(self, method=None): <NEW_LINE> <INDENT> args = self.get_args(method) <NEW_LINE> self.term = args[0] <NEW_LINE> self.null = args[1] <NEW_LINE> self.method = method <NEW_LINE> <DEDENT> def _do(self, ob... | usage: `notmatch({match_term}, {null_value})`
! White space after commas is required!
result is : True, False or None | 625990894527f215b58eb78a |
class GameManagerTerminal(GameManager): <NEW_LINE> <INDENT> def play(self): <NEW_LINE> <INDENT> print("\n") <NEW_LINE> user_input = "" <NEW_LINE> while user_input.lower() != "q": <NEW_LINE> <INDENT> if self.is_playing: <NEW_LINE> <INDENT> print("\n") <NEW_LINE> if user_input.lower() == "left": <NEW_LINE> <INDENT> self.... | Launches only if the game is played in
terminal mode. | 62599089091ae35668706819 |
class Normalize(object): <NEW_LINE> <INDENT> def __init__(self, normalize_file): <NEW_LINE> <INDENT> self.spoken_normal = {} <NEW_LINE> data_file = open(normalize_file, mode='r', encoding='utf8') <NEW_LINE> reader = csv.reader(data_file) <NEW_LINE> for line in reader: <NEW_LINE> <INDENT> line = line[0].split('\t') <NEW... | 人工对标注得到的症状进行了部分归一。 | 6259908955399d3f056280eb |
class PiecewiseLinearPDFNode(Node): <NEW_LINE> <INDENT> def __init__(self, var, x_range, y_range, norm=1): <NEW_LINE> <INDENT> Node.__init__(self, frozenset({var})) <NEW_LINE> self.var = var <NEW_LINE> self._x_pieces = x_range <NEW_LINE> self._y_pieces = y_range <NEW_LINE> if norm is None: <NEW_LINE> <INDENT> self._Z =... | WRITEME | 62599089dc8b845886d55190 |
class ThrowerAnt(Ant): <NEW_LINE> <INDENT> name = 'Thrower' <NEW_LINE> implemented = True <NEW_LINE> damage = 1 <NEW_LINE> food_cost = 3 <NEW_LINE> min_range = 0 <NEW_LINE> max_range = float('inf') <NEW_LINE> def nearest_bee(self, hive): <NEW_LINE> <INDENT> place = self.place <NEW_LINE> transit = 0 <NEW_LINE> while pla... | ThrowerAnt throws a leaf each turn at the nearest Bee in its range. | 625990893346ee7daa33844e |
class _HitObject(_Object, _DetIdStrAdaptor): <NEW_LINE> <INDENT> def __init__(self, tree, index, prefix): <NEW_LINE> <INDENT> super(_HitObject, self).__init__(tree, index, prefix) <NEW_LINE> <DEDENT> def ntracks(self): <NEW_LINE> <INDENT> self._checkIsValid() <NEW_LINE> return getattr(self._tree, self._prefix+"_trkIdx"... | Adaptor class for pixel/strip hit objects. | 625990895fdd1c0f98e5fb51 |
class IP(TypeDecorator): <NEW_LINE> <INDENT> impl = TypeEngine <NEW_LINE> def load_dialect_impl(self, dialect): <NEW_LINE> <INDENT> if dialect.name == 'postgresql': <NEW_LINE> <INDENT> return dialect.type_descriptor(INET()) <NEW_LINE> <DEDENT> elif dialect.name == 'oracle': <NEW_LINE> <INDENT> return dialect.type_descr... | A type to wrap IP addresses to and from the DB | 6259908992d797404e389948 |
class StubPercentileGetter(object): <NEW_LINE> <INDENT> def __init__(self, performer_percentiles, baseline_percentiles): <NEW_LINE> <INDENT> self._pp = performer_percentiles <NEW_LINE> self._bp = baseline_percentiles <NEW_LINE> <DEDENT> def get_performer_percentiles(self): <NEW_LINE> <INDENT> return self._pp <NEW_LINE>... | This is a stub percentile getter class intended only for use with these
unit tests. | 6259908963b5f9789fe86d41 |
class PCAProjectionSolver(object): <NEW_LINE> <INDENT> def __init__(self, e, K_inst_cacher, K_th, regul=.1): <NEW_LINE> <INDENT> self.e = e <NEW_LINE> self.q, self.nl = e.shape <NEW_LINE> self.K_inst_cacher = K_inst_cacher <NEW_LINE> self.K_th = K_th <NEW_LINE> self.eTe = e.T @ e <NEW_LINE> self.inv_eTe = spla_chol_inv... | projects data down onto PCs | 62599089d486a94d0ba2db8e |
class BahdanauDecoder(Decoder): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> super(BahdanauDecoder, self).__init__(config) <NEW_LINE> self.output_size = config.get("n_classes", 32) <NEW_LINE> self.character_distribution = nn.Linear(self.hidden_size, self.output_size) <NEW_LINE> <DEDENT> def forwa... | Corresponds to BahdanauAttnDecoderRNN in Pytorch tutorial | 62599089aad79263cf430393 |
class _callable_dict(dict): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> return self.get('T') | Class used with Timer - for returning elapsed time | 62599089dc8b845886d55192 |
class ParameterSearch: <NEW_LINE> <INDENT> def __init__(self, search_config, trainer_config): <NEW_LINE> <INDENT> self.search_config = None <NEW_LINE> self.trainer_config = None <NEW_LINE> self.behavior_name = '' <NEW_LINE> self.hyperparameters = [] <NEW_LINE> self.hyperparameter_sets = [] <NEW_LINE> self.set_search_co... | Object that facilitates performing hyperparameter searches. | 625990893617ad0b5ee07d2c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.