code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class GenerateReportsTests(TestCase): <NEW_LINE> <INDENT> def test_valid_data(self): <NEW_LINE> <INDENT> rubric = baker.make("Rubric") <NEW_LINE> f = GenerateReports({ 'year':2019, 'rubric': rubric.pk }) <NEW_LINE> self.assertTrue(f.is_valid()) <NEW_LINE> <DEDENT> def test_invalid_data_no_rub(self): <NEW_LINE> <INDENT>...
Tests forms related to generating reports
62598f1750812a4eaa620253
@inherit_docs <NEW_LINE> class _CountSketch_estimator(BasicEstimator): <NEW_LINE> <INDENT> def __init__(self, k, uhash_h, uhash_g): <NEW_LINE> <INDENT> self.k = k <NEW_LINE> self.C = [0 for i in range(self.k)] <NEW_LINE> self.h = uhash_h.pickHash() <NEW_LINE> self.g = uhash_g.pickHash() <NEW_LINE> <DEDENT> def process(...
Basic estimator for Count Sketch
62598f17adb09d7d5dc09273
class AutoremoteSetKeyFromUrl(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self, url=None): <NEW_LINE> <INDENT> self.window.show_input_panel('AutoRemote URL:', url or '', self.on_done, None, None) <NEW_LINE> <DEDENT> def on_done(self, url): <NEW_LINE> <INDENT> if not url: <NEW_LINE> <INDENT> msg = "No URL...
Set AutoRemote key. Command string: autoremote_set_key_from_url (WindowCommand)
62598f1797e22403b3839bb1
class CPUState(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.flag_mask = {'C': 0, 'Z': 1, 'N': 2, 'OFF': 4, 'V': 8} <NEW_LINE> self.regs = CPURegs() <NEW_LINE> self.memory = bytearray([0x00 for i in xrange(0xffff)]) <NEW_LINE> <DEDENT> def GetRegNames(self): <NEW_LINE> <INDENT> retur...
container class to update registers and memory
62598f17d8ef3951e32c74bc
class Source(object): <NEW_LINE> <INDENT> _sources = {} <NEW_LINE> def __init__(self, root): <NEW_LINE> <INDENT> self._root = root <NEW_LINE> <DEDENT> def path_to_uri(self, path): <NEW_LINE> <INDENT> uri = path.split(self._root)[-1][:-len(SOURCE_SUFFIX)] <NEW_LINE> if uri[0] == '/': <NEW_LINE> <INDENT> return uri[1:] <...
Looks for updates in source files (.md).
62598f170fa83653e46f3bb5
class ExportGLTF2_GLTF(bpy.types.Operator, ExportHelper, ExportGLTF2_Base): <NEW_LINE> <INDENT> bl_idname = 'export_scene.gltf' <NEW_LINE> bl_label = 'Export glTF 2.0' <NEW_LINE> filename_ext = '.gltf' <NEW_LINE> filter_glob = StringProperty(default='*.gltf', options={'HIDDEN'}) <NEW_LINE> export_format = 'ASCII'
Export scene as glTF 2.0 file
62598f17c4546d3d9def68ce
class TimeoutError(Exception): <NEW_LINE> <INDENT> pass
Raised if wait event timeout occurred
62598f17956e5f7376df4ce5
class FabricAuthenticator(oauthenticator.CILogonOAuthenticator): <NEW_LINE> <INDENT> async def authenticate(self, handler, data=None): <NEW_LINE> <INDENT> userdict = await super(FabricAuthenticator, self).authenticate(handler, data) <NEW_LINE> user_email = userdict["auth_state"]["cilogon_user"]["email"] <NEW_LINE> if n...
The FabricAuthenticator inherits from CILogonAuthenticator.
62598f17656771135c48835d
class ButterworthHighpassD(BiquadCascadeD): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [BiquadCascadeD]: <NEW_LINE> <INDENT> __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) <NEW_LINE> <DEDENT> __setattr__ = lambda self, name, value: _swig_setattr(self, ButterworthHighpassD, nam...
Proxy of C++ Seiscomp::Math::Filtering::IIR::ButterworthHighpass<(double)> class.
62598f1731939e2706ed10cb
class TestBestConstantRebalancedPortfolio(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> project_path = os.path.dirname(__file__) <NEW_LINE> data_path = project_path + '/test_data/stock_prices.csv' <NEW_LINE> self.data = pd.read_csv(data_path, parse_dates=True, index_col="Date").dropna(axis=1) <NEW...
Tests different functions of the Best Constant Rebalanced Portfolio class.
62598f1797e22403b3839bb5
class Dir(HtmlTag): <NEW_LINE> <INDENT> pass
Not supported in HTML5. Use <ul> instead.
62598f178a349b6b43684f18
class ListNode(object): <NEW_LINE> <INDENT> def __init__(self, x): <NEW_LINE> <INDENT> self.val = x <NEW_LINE> self.next = None
ListNode has a next pointer and a val field.
62598f17283ffb24f3cf257b
class TaskInstanceCollection(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> return { 'task_instances': ([task_instance.TaskInstan...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Attributes: allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the a...
62598f17091ae356687038df
class RedisConsumer(RedisTemplate): <NEW_LINE> <INDENT> def __init__(self, settings: OverhaveRedisSettings, stream_name: RedisStream): <NEW_LINE> <INDENT> super().__init__(settings) <NEW_LINE> self._stream_name = stream_name <NEW_LINE> <DEDENT> @property <NEW_LINE> def _consumer_group(self) -> walrus.ConsumerGroup: <NE...
Class for consuming tasks from Redis stream ```stream_name```.
62598f173617ad0b5ee04e05
class CryptoBinary (pyxb.binding.datatypes.base64Binary): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'CryptoBinary') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/PyNFe/xmldsig-core-schema20020212.xsd', 34, 0) <NEW_LINE> _Documentation = None
An atomic simple type.
62598f17956e5f7376df4ce8
class Operator(object): <NEW_LINE> <INDENT> def __init__(self, key, display, field_type, hint=None): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.display = display <NEW_LINE> self.field_type = field_type <NEW_LINE> self.hint = hint <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.key =...
Filter operator representing name and potential inputs. See webgrid.filters.ops for a collection of predefined operators. Args: key (str): Internal identifier to be used in code and in request args. display (str): Label for rendering the operator. field_type (str): Input field spec. Can be: - None: ...
62598f177cff6e4e811b46c3
class WikiForm(ModelForm): <NEW_LINE> <INDENT> content = forms.CharField(label=u'wiki', widget=MarkDownInput( attrs={'class': 'form-control', 'placeholder': u'wiki', 'required': ''}) ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Wiki <NEW_LINE> fields = ('content',)
--------------------------------------- 功能说明:Wiki分类表单 --------------------------------------- 时间: 2015-04-19 ---------------------------------------
62598f17656771135c488363
class TestUDP(VppTestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(TestUDP, cls).setUpClass() <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestUDP, self).setUp() <NEW_LINE> self.vapi.session_enable_disable(is_enabled=1) <NEW_LINE> self.create_loopbac...
UDP Test Case
62598f17956e5f7376df4ce9
class Uwu(commands.Cog): <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> self.channels = {} <NEW_LINE> <DEDENT> @commands.command() <NEW_LINE> async def uwu(self, ctx, *, message: str): <NEW_LINE> <INDENT> dictionary = {'you': 'yuw', 'and': 'awnd', 'lol': 'lawl', 'is': 'ish', ...
uwuify a message
62598f17d8ef3951e32c74c1
class ValueRepr: <NEW_LINE> <INDENT> def __init__(self, max_len=100, max_items=6, max_levels=2, placeholder='...') -> None: <NEW_LINE> <INDENT> self.max_len = max_len <NEW_LINE> self.max_items = max_items <NEW_LINE> self.max_levels = max_levels <NEW_LINE> self.placeholder = placeholder <NEW_LINE> self._levels_left = 0 ...
Computes string values of Python objects for display in a node tree.
62598f177cff6e4e811b46c5
class Validator(object): <NEW_LINE> <INDENT> def __init__(self, strategy): <NEW_LINE> <INDENT> self._strategy = strategy <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> self._strategy.do()
策略验证的调用者
62598f17656771135c488365
class NSNitroNserrDnsInvalRevdomnameSyntax(NSNitroGslbErrors): <NEW_LINE> <INDENT> pass
Nitro error code 1908 Invalid reverse domain name syntax
62598f179f288636728174d3
class Switch(Actor): <NEW_LINE> <INDENT> @manage([]) <NEW_LINE> def init(self): <NEW_LINE> <INDENT> self.switch = None <NEW_LINE> self.setup() <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.switch = calvinsys.open(self, "io.switch") <NEW_LINE> <DEDENT> def will_migrate(self): <NEW_LINE> <INDENT> calvinsy...
Creates a on/off switch. Output: state : 0/1 according to switch state
62598f17656771135c488367
class StartprojectCommand(BaseCommand): <NEW_LINE> <INDENT> options = [ ('-b', '--base-path', { 'dest': 'base_path', 'help': 'Directory where the project should be created.'}), ] <NEW_LINE> def call(self, *args, **options): <NEW_LINE> <INDENT> self._options = options <NEW_LINE> self.base_path = 'base_path' in options...
Create a new project from scratch.
62598f17283ffb24f3cf2581
class NamespaceKeyApplicator(Applicator): <NEW_LINE> <INDENT> namespace_key = "_grainy" <NEW_LINE> remove_namespace_key = True <NEW_LINE> denied = object() <NEW_LINE> def apply(self, data, **kwargs): <NEW_LINE> <INDENT> if isinstance(data, list): <NEW_LINE> <INDENT> return self.apply_list(data) <NEW_LINE> <DEDENT> elif...
Applicator that looks for permission namespaces from a specified field in the dict it is scanning
62598f1897e22403b3839bbf
class Grp70No180(base_tests.SimpleDataPlane): <NEW_LINE> <INDENT> @wireshark_capture <NEW_LINE> def runTest(self): <NEW_LINE> <INDENT> logging = get_logger() <NEW_LINE> logging.info("Running Grp70No180 Modify_L2_Dst test") <NEW_LINE> of_ports = config["port_map"].keys() <NEW_LINE> of_ports.sort() <NEW_LINE> self.assert...
ModifyL2SDSt :Modify the dest MAC address
62598f18d8ef3951e32c74c3
class PlayerOpponentSplits(_PlayerDashboard): <NEW_LINE> <INDENT> _endpoint = 'playerdashboardbyopponent' <NEW_LINE> def by_conference(self): <NEW_LINE> <INDENT> return _api_scrape(self.json, 1) <NEW_LINE> <DEDENT> def by_division(self): <NEW_LINE> <INDENT> return _api_scrape(self.json, 2) <NEW_LINE> <DEDENT> def by_op...
Contains stats pertaining to player stats vs certain opponents by division, conference, and by specific team opponent Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure stati...
62598f187cff6e4e811b46c9
class BaseTestEnvironment(object): <NEW_LINE> <INDENT> def __init__(self, chrome_version='HEAD'): <NEW_LINE> <INDENT> self._chrome_version = chrome_version <NEW_LINE> <DEDENT> def GetOS(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def GlobalSetUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <D...
Manages the environment java tests require to run.
62598f1826238365f5fab867
class TestOrdersApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = kinow_client.apis.orders_api.OrdersApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_customer_orders(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def t...
OrdersApi unit test stubs
62598f1831939e2706ed10d1
class CassController(object): <NEW_LINE> <INDENT> def __init__(self, hosts=None, keyspace=None): <NEW_LINE> <INDENT> if not hosts: <NEW_LINE> <INDENT> hosts = ['localhost'] <NEW_LINE> <DEDENT> self.cluster = Cluster(hosts) <NEW_LINE> self.keyspace = keyspace <NEW_LINE> self.session = self.cluster.connect(self.keyspace)...
Controller for interacting with a cassandra database.
62598f189f288636728174d8
class ComponentMetaJS(ComponentMeta): <NEW_LINE> <INDENT> __repr__ = meta_repr <NEW_LINE> def __init__(cls, name, *args): <NEW_LINE> <INDENT> name = name.encode() if sys.version_info[0] == 2 else name <NEW_LINE> return super().__init__(name, *args)
Meta class for autogenerated classes intended for JavaScript: Proxy PyComponent and local JsComponents.
62598f183617ad0b5ee04e0d
class Config: <NEW_LINE> <INDENT> no_config_err = "No such config variable {}" <NEW_LINE> def __init__(self, name, fallback): <NEW_LINE> <INDENT> from importlib import import_module <NEW_LINE> from os import listdir <NEW_LINE> from os.path import dirname <NEW_LINE> self.config_path = dirname(__file__) <NEW_LINE> self.n...
Configuration management entity. Args: name (str): Name of config environment. fallback (bool): Indicate if configuration should fallback to base.
62598f180fa83653e46f3bc5
class ICallbackTimer(ITimer): <NEW_LINE> <INDENT> callback = Callable <NEW_LINE> args = Tuple() <NEW_LINE> kwargs = Dict()
Interface for timers which call a callback periodically.
62598f18ab23a570cc2d43dc
class SortedQuerysetNode(template.Node): <NEW_LINE> <INDENT> def __init__(self, queryset): <NEW_LINE> <INDENT> self.queryset_var = queryset <NEW_LINE> self.queryset = template.Variable(queryset) <NEW_LINE> <DEDENT> def render(self, context): <NEW_LINE> <INDENT> queryset = self.queryset.resolve(context) <NEW_LINE> if "r...
Sorted Queryset Node class.
62598f18099cdd3c63674a46
class AssetResolver( Package ): <NEW_LINE> <INDENT> def resolve( self, spec ): <NEW_LINE> <INDENT> if isabs(spec): return FSAssetDescriptor(spec) <NEW_LINE> path = spec <NEW_LINE> if ':' in path: <NEW_LINE> <INDENT> package_name, path = spec.split(':', 1) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> package_name = sel...
Resolve :term:`asset specification` to :term:`asset descriptor`. The ``package`` is used when a relative asset specification is supplied to the :meth:`pluggdapps.asset.AssetResolver.resolve` method. An asset specification without a colon in it is treated as relative. If the value ``None`` is supplied as the ``package...
62598f18adb09d7d5dc09284
class CacheStatTracker(BaseCache): <NEW_LINE> <INDENT> requests_limit = 5000 <NEW_LINE> def __init__(self, location, params): <NEW_LINE> <INDENT> custom_params = params.copy() <NEW_LINE> options = custom_params['OPTIONS'].copy() <NEW_LINE> custom_params['BACKEND'] = options.pop('ACTUAL_BACKEND') <NEW_LINE> custom_param...
A small class used to track cache calls.
62598f18fbf16365ca792d7f
class Gaussian2DKernel(Kernel2D): <NEW_LINE> <INDENT> _separable = True <NEW_LINE> _is_bool = False <NEW_LINE> def __init__(self, width, **kwargs): <NEW_LINE> <INDENT> self._model = models.Gaussian2DModel(1. / (2 * np.pi * width ** 2), 0, 0, width, width) <NEW_LINE> self._default_size = _round_up_to_odd_integer(8 * wid...
2D Gaussian filter kernel. The Gaussian filter is a filter with great smoothing properties. It is isotropic and does not produce artifacts. Parameters ---------- width : number Width of the filter kernel. x_size : odd int, optional Size in x direction of the kernel array. Default = 8 * width. y_size : odd int...
62598f189f288636728174d9
class CategoryAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ( "id", "name", )
list of Categories in Admin panel
62598f180fa83653e46f3bc7
class Manager(Cli): <NEW_LINE> <INDENT> def a(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def b(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> foo = Foo <NEW_LINE> lorem = Lorem
Hello World!
62598f18656771135c48836d
class History(): <NEW_LINE> <INDENT> def __init__(self, file, atom_list): <NEW_LINE> <INDENT> self.file = file <NEW_LINE> if os.path.isfile(self.file) is False: <NEW_LINE> <INDENT> raise ValueError("File does not exist") <NEW_LINE> <DEDENT> self.atom_list = atom_list <NEW_LINE> self.data_type = "DL_POLY HISTORY" <NEW_L...
The :py:class:`polypy.read.Trajectory` class evaluates the positions of all atoms in the simulation. Args: atom_list (:py:class:`list`): List of unique atom names in trajectory. datatype (:py:attr:`str`): Datatype of the original dataset e.g. DL_POLY HISTORY.
62598f189f288636728174dc
class DummyDevice: <NEW_LINE> <INDENT> blocking = True <NEW_LINE> used_data_keys = ("data", "classes") <NEW_LINE> targets = None <NEW_LINE> output_index = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.num_frames = NumbersDict(0) <NEW_LINE> self.y = {} <NEW_LINE> self.j = {} <NEW_LINE> <DEDENT> def alloc_...
Behave like Device. Only needed for assign_dev_data.
62598f18d8ef3951e32c74c6
class Focus(Move): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def resolve(self): <NEW_LINE> <INDENT> if self.player.halted == 0: <NEW_LINE> <INDENT> self.player.focus_target = self.target <NEW_LINE> self.player.focus_expiring = 2 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self....
If you use an (Attack) card on target player next turn, you deal twice your normal damage, plus one. (Damage-reducing effects apply after Focus is applied.)
62598f18ab23a570cc2d43de
class NetExit2Part2L(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_classes=NUM_CLASSES): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.conv1 = nn.Conv2d(in_channels=3, out_channels=64, kernel_size=5, padding=2, stride=1) <NEW_LINE> self.relu = nn.ReLU() <NEW_LINE> self.norm = nn.LocalResponseNorm(size...
AlexNet Exit at branch 2 and part at point 2, left part
62598f18656771135c48836f
class TestImportDirectivesBuildHierarchyImport(TestLocalBranchImport): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> self.create_repo('data/snapcraft-test') <NEW_LINE> self.repo.add_directive('docs/debug.md', 'a/b/c/d') <NEW_LINE> self.repo.add_directive('docs/intro.md', 'a/b') <NEW_LINE> self.repo.add_dir...
Build a article tree structure from files in the snapcraft tree. Make sure the top-most articles (in the tree hierarchy) are imported first, so the tree looks like this: a +-- b +------ c | +-- d | | +-- e | | +-- f +-- c2 | +-- d2 Files in the import directive...
62598f18c4546d3d9def68d8
class ThetaFormatterShiftPi(GeoAxes.ThetaFormatter): <NEW_LINE> <INDENT> extrapi = False <NEW_LINE> def __init__(self, *a, **aa): <NEW_LINE> <INDENT> if "extrapi" in aa: <NEW_LINE> <INDENT> self.extrapi = aa["extrapi"] <NEW_LINE> <DEDENT> del aa["extrapi"] <NEW_LINE> super(ThetaFormatterShiftPi, self).__init__(*a, **aa...
Shifts labelling by pi Shifts labelling from -180,180 to 0-360
62598f18283ffb24f3cf2589
class InfluxLoggerThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, data_queue, config): <NEW_LINE> <INDENT> super(InfluxLoggerThread, self).__init__() <NEW_LINE> self.data_queue = data_queue <NEW_LINE> self.update_period = config.get('update_period', 5) <NEW_LINE> self.influx = InfluxDBClient(**config['...
Post data to Influx DB in batches
62598f1860cbc95b06363015
class KeeperForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Keeper <NEW_LINE> fields = tItemFields
using a form to validate incoming info from ebay
62598f189f288636728174dd
class ManhattanDistanceHeuristic(Heuristic): <NEW_LINE> <INDENT> def __init__(self, N): <NEW_LINE> <INDENT> self._solved_indexes = Board(N=N).pebble_indexes()[1:] <NEW_LINE> <DEDENT> def set_goal(self, board): <NEW_LINE> <INDENT> self._solved_indexes = board.pebble_indexes()[1:] <NEW_LINE> <DEDENT> def estimate_cost(se...
A manhattan distance (MD) heuristic.
62598f1831939e2706ed10d4
class TestPredictBayesianEstimator: <NEW_LINE> <INDENT> def test_predictions_are_based_on_probabilities_dbeu( self, bn, train_data_discrete, test_data_c_discrete ): <NEW_LINE> <INDENT> bn.fit_cpds( train_data_discrete, method="BayesianEstimator", bayes_prior="BDeu", equivalent_sample_size=5, ) <NEW_LINE> predictions = ...
Test behaviour of predict using BE
62598f18283ffb24f3cf258b
class RecipeViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = RecipeSerializer <NEW_LINE> queryset = Recipe.objects.all() <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> name_filter = self.request.query_params.get('name') <NEW_LINE> queryset = self.queryset <NEW_LINE> if name_filter: <NEW_LI...
Manage recipes requests
62598f183617ad0b5ee04e15
class SpecProvider(FilesystemProvider): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> from jsonspec.misc import __file__ as misc <NEW_LINE> base = os.path.realpath(os.path.dirname(misc)) <NEW_LINE> src = os.path.join(base, 'schemas/') <NEW_LINE> prefix = 'http://json-schema.org/' <NEW_LINE> super(SpecProv...
Provides specs of http://json-schema.org/
62598f1850812a4eaa620260
class SubMultCompareLayer(object): <NEW_LINE> <INDENT> def __init__(self, dense_dim, sequence_length=0, input_dim=0, dropout=0): <NEW_LINE> <INDENT> self.sequence_length = sequence_length <NEW_LINE> self.input_dim = input_dim <NEW_LINE> self.dense_dim = dense_dim <NEW_LINE> model = Sequential() <NEW_LINE> model.add(Den...
Compare operation using subtraction and multiplication followed by an NN layer. # Input shape two tensors with shape: (batch_size, timesteps, dim) # Output shape (batch_size, timesteps, dim * 2) # References A compare-aggregate model for matching text sequences
62598f18099cdd3c63674a4a
class WortverbundCreator(tk.Frame): <NEW_LINE> <INDENT> def __init__(self, master, project): <NEW_LINE> <INDENT> tk.Frame.__init__(self) <NEW_LINE> tk.Button(self, font='Arial 16', text='Back', width=7, command=self.__del__).pack() <NEW_LINE> tk.Label(self, font='Arial 16', text='Enter a name (signifier) for the new wo...
GUI-frame to create a new wortverbund in an existing project.
62598f18ad47b63b2c5a64f7
class EditView(LoginRequiredMixin, views.generic.UpdateView): <NEW_LINE> <INDENT> fields = ['title', 'type', 'image', 'description'] <NEW_LINE> model = Project <NEW_LINE> template_name = 'edit.html' <NEW_LINE> def get_success_url(self): <NEW_LINE> <INDENT> pk = Project.objects.all().last().id <NEW_LINE> return reverse_...
edit the selected project
62598f18c4546d3d9def68da
class InvenioConfigDefault(object): <NEW_LINE> <INDENT> def __init__(self, app=None): <NEW_LINE> <INDENT> if app: <NEW_LINE> <INDENT> self.init_app(app) <NEW_LINE> <DEDENT> <DEDENT> def init_app(self, app): <NEW_LINE> <INDENT> SECRET_KEY = app.config.get('SECRET_KEY') <NEW_LINE> if SECRET_KEY is None: <NEW_LINE> <INDEN...
Load configuration from module. .. versionadded:: 1.0.0
62598f189f288636728174e2
class ApplicationGatewayPrivateEndpointConnectionListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["A...
Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for an application gateway. :param value: List of private endpoint connections on an application gateway. :type value: list[~azure.mgmt.network.v2020_07_01.models.ApplicationGatewayPrivateEndpointConne...
62598f18099cdd3c63674a4b
class Quadrature(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sin = [] <NEW_LINE> self.weight = [] <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> for i in range(len(self.sin)): <NEW_LINE> <INDENT> yield (self.sin[i], self.weight[i]) <NEW_LINE> <DEDENT> <DEDENT> def __len__(self...
Polar quadrature used for method of characteristics. Right now the only options are to use the Leonard optimized quadrature of the Tabuchi-Yamamoto quadrature. Attributes: sin = sin of the polar angle (measured from z-axis) weight = corresponding polar weight Methods: TabuchiYamamoto = set quadrature to a TY...
62598f180fa83653e46f3bd1
class Counter(Metric): <NEW_LINE> <INDENT> def add(self, value, source=None, **params): <NEW_LINE> <INDENT> return self.connection.send_counter_value(self.name, value, source, **params) <NEW_LINE> <DEDENT> def what_am_i(self): <NEW_LINE> <INDENT> return 'counters'
Librato Counter metric
62598f18187af65679d2927b
class Message: <NEW_LINE> <INDENT> def __init__(self, id, peer_id, text): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.peer_id = peer_id <NEW_LINE> self.text = text
class that represents a message
62598f18656771135c488376
class ManifestDeleteView(LoginRequiredMixin, DeleteView): <NEW_LINE> <INDENT> model = Manifest <NEW_LINE> login_url = reverse_lazy('users_app:login') <NEW_LINE> template_name = 'recepcion/manifest/delete.html' <NEW_LINE> success_url = reverse_lazy('recepcion_app:manifest-list') <NEW_LINE> def get(self, request, *args, ...
metodo para eliminar o poner manifiesto en eliminado
62598f18ad47b63b2c5a64fb
class Solution: <NEW_LINE> <INDENT> def twoSum7(self, nums, target): <NEW_LINE> <INDENT> if nums is None or len(nums) == 0: <NEW_LINE> <INDENT> return [-1, -1] <NEW_LINE> <DEDENT> nums.sort() <NEW_LINE> if target < 0: <NEW_LINE> <INDENT> target = -target <NEW_LINE> <DEDENT> right = 1 <NEW_LINE> for left in range(len(nu...
@param nums: an array of Integer @param target: an integer @return: [index1 + 1, index2 + 1] (index1 < index2) reduce space complexity to O(1)
62598f18091ae356687038f5
class TimeBlock(BaseBlock): <NEW_LINE> <INDENT> def __init__(self, block_name): <NEW_LINE> <INDENT> BaseBlock.__init__(self, block_name, [], ["OUT1"]) <NEW_LINE> <DEDENT> def compute(self, curIteration): <NEW_LINE> <INDENT> self.appendToSignal(self.getClock().getTime())
Outputs the current time of the simulation
62598f18ec188e330fdf75a3
class SuccessfulTaskCollectionHandler(TopicHandler): <NEW_LINE> <INDENT> _GET_method = 'get_successful_Tasks_list' <NEW_LINE> _POST_method = None
Get a list of Tasks which have been stopped successfully.
62598f18187af65679d2927c
class AssociationViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Association.objects.all() <NEW_LINE> serializer_class = AssociationsSerializer <NEW_LINE> action_serializers = { 'retrieve': AssociationsSerializer, 'list': AssociationsShortSerializer, } <NEW_LINE> def get_serializer_class(self): <NEW_LINE...
API endpoint that allows association to be viewed or edited.
62598f1860cbc95b0636301f
class AuthInterface(object): <NEW_LINE> <INDENT> def wrap_request(self, request_params): <NEW_LINE> <INDENT> return request_params <NEW_LINE> <DEDENT> def wrap_body_tree(self, tree): <NEW_LINE> <INDENT> return tree <NEW_LINE> <DEDENT> def get_url_by_name(self, name): <NEW_LINE> <INDENT> raise NotImplemented
Интерфейс аунтефикации
62598f1831939e2706ed10d9
class ExpressRouteCircuitConnectionListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCircuitConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ExpressRouteCirc...
Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. :param value: The global reach connection associated with Private Peering in an ExpressRoute Circuit. :type value: list[~azure.mgmt.network.v2021_02_01.models.ExpressRoute...
62598f18ad47b63b2c5a64fe
class UserCreationForm(forms.ModelForm): <NEW_LINE> <INDENT> password1 = forms.CharField(label='Password', widget=forms.PasswordInput) <NEW_LINE> password2 = forms.CharField(label='Password confirmation', widget=forms.PasswordInput) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = models.user.User <NEW_LINE> fields =...
A form for creating new users. Includes all the required fields, plus a repeated password.
62598f1850812a4eaa620264
class MemoryMeasurementPage(page_module.Page): <NEW_LINE> <INDENT> _PHASE = NotImplemented <NEW_LINE> def __init__(self, story_set, name, url): <NEW_LINE> <INDENT> super(MemoryMeasurementPage, self).__init__( page_set=story_set, name=name, url=url, shared_page_state_class=Top10MobileSharedState, grouping_keys={'phase':...
Abstract class for measuring memory on a story unit.
62598f18ad47b63b2c5a64ff
class CrabSchedule(CronTab): <NEW_LINE> <INDENT> def __init__(self, specifier, timezone): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> item = CronTab.__init__(self, specifier) <NEW_LINE> <DEDENT> except ValueError as err: <NEW_LINE> <INDENT> raise CrabError('Failed to parse cron time specifier ' + specifier + ' reason:...
Class handling the schedule of a cron job.
62598f189f288636728174e9
class IsExpiredError(Exception): <NEW_LINE> <INDENT> def __init__(self, value=''): <NEW_LINE> <INDENT> self.value = TEXT_REQUEST_IS_EXPIRED + value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value)
Error class for expired link objects
62598f1826238365f5fab87b
class BuildTrajectory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.save_path = os.path.join(rospy.get_param("~save_path"), time.strftime("%Y-%m-%d-%H-%M-%S") + ".traj") <NEW_LINE> self.trajectory = LineTrajectory("/built_trajectory") <NEW_LINE> self.publish_point_sub = rospy.Subscriber("/cl...
Listens for points published by RViz and uses them to build a trajectory. Saves the output to the file system.
62598f18283ffb24f3cf2596
class HookManager(DynamicImport): <NEW_LINE> <INDENT> def __init__(self, folder, excluded_files=None, setup_hook='setup'): <NEW_LINE> <INDENT> super().__init__(folder, excluded_files) <NEW_LINE> self._exec_setup = setup_hook <NEW_LINE> <DEDENT> def load(self, *args, **kwargs): <NEW_LINE> <INDENT> super().load() <NEW_LI...
Takes the modules loaded from `DynamicImport`, then aggregates them into a single "load" function
62598f18c4546d3d9def68df
class OWDiscreteLegend(Legend): <NEW_LINE> <INDENT> def set_domain(self, domain): <NEW_LINE> <INDENT> class_var = domain.class_var <NEW_LINE> if not class_var.is_discrete: <NEW_LINE> <INDENT> raise AttributeError('[OWDiscreteLegend] The class var provided ' 'was not discrete.') <NEW_LINE> <DEDENT> self.set_items(zip(cl...
Discrete legend. See Also -------- Legend OWContinuousLegend
62598f180fa83653e46f3bd9
class ConfigServiceV2GrpcTransport(object): <NEW_LINE> <INDENT> _OAUTH_SCOPES = ( "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read", "https://www.googleapis.com/aut...
gRPC transport class providing stubs for google.logging.v2 ConfigServiceV2 API. The transport provides access to the raw gRPC stubs, which can be used to take advantage of advanced features of gRPC.
62598f187cff6e4e811b46df
class Linear(Layer): <NEW_LINE> <INDENT> def __init__(self, input_size: int, output_size: int) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.input_size = input_size <NEW_LINE> self.output_size = output_size <NEW_LINE> self.params["w"] = np.random.rand(input_size, output_size) <NEW_LINE> self.params["b...
Linear layer. A linear layer propagates the inputs forward via a linear function.
62598f18283ffb24f3cf2598
class AllStats(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.frequent_packages = kwargs.get('frequent_packages', None) <NEW_LINE> self.package_names = kwargs.get('package_names', None) <NEW_LINE> self.frequent_devices = kwargs.get('frequent_devices', None) <NEW_LINE> self.device_na...
Model for CDRouter All Results Stats. :param frequent_packages: (optional) :class:`results.PackageCount <results.PackageCount>` list :param package_names: (optional) :class:`results.PackageCount <results.PackageCount>` list :param frequent_devices: (optional) :class:`results.DeviceCount <results.DeviceCount>` list :pa...
62598f189f288636728174ee
class LineCap(enum.Enum): <NEW_LINE> <INDENT> BUTT = 0 <NEW_LINE> ROUND = 1 <NEW_LINE> SQUARE = 2
Enumeration of line ending styles.
62598f1860cbc95b06363025
class ArrayQueue: <NEW_LINE> <INDENT> DEFAULT_CAPACITY = 10 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._data = [None] * ArrayQueue.DEFAULT_CAPACITY <NEW_LINE> self._purchase_price = [None] * ArrayQueue.DEFAULT_CAPACITY <NEW_LINE> self._shares_bought = 0 <NEW_LINE> self._size = 0 <NEW_LINE> self._front = 0 ...
FIFO queue implementation using a Python list as underlying storage. Code source: Data Structures and Algorithms in Python, pg. 243.
62598f18ec188e330fdf75ad
class GcLogging: <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self.gConfig = config.config <NEW_LINE> try: <NEW_LINE> <INDENT> self.logger = logging.getLogger(self.gConfig['LOGGING']['logger_name']) <NEW_LINE> self.logger.setLevel(self.gConfig['LOGGING']['logging_level']) <NEW_LINE> self.handler ...
This class features: -handle logging and error handling of the application
62598f187cff6e4e811b46e3
class InlineObject6(object): <NEW_LINE> <INDENT> openapi_types = { 'logins': 'object', 'key': 'object', 'settings': 'object' } <NEW_LINE> attribute_map = { 'logins': 'logins', 'key': 'key', 'settings': 'settings' } <NEW_LINE> def __init__(self, logins=None, key=None, settings=None): <NEW_LINE> <INDENT> self._logins = N...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598f18ab23a570cc2d43e8
class StringError(BaseError, TypeError): <NEW_LINE> <INDENT> pass
Subclassed to BaseError and TypeError
62598f18091ae35668703901
class StatusCounters: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def name(status): <NEW_LINE> <INDENT> return "{}_count".format(status.value) <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> for status in Status.stopped(): <NEW_LINE> <INDENT> self.set(status, 0) <NEW_LINE> <DEDENT> <DEDENT> def get(self, s...
Hold test counters for each possible status.
62598f187cff6e4e811b46e5
class UpSampling2D(Layer): <NEW_LINE> <INDENT> def __init__(self, size=(2,2), input_shape=None): <NEW_LINE> <INDENT> self.prev_shape = None <NEW_LINE> self.trainable = True <NEW_LINE> self.size = size <NEW_LINE> self.input_shape = input_shape <NEW_LINE> <DEDENT> def forward_pass(self, X, training=True): <NEW_LINE> <IND...
Nearest neighbor up sampling of the input. Repeats the rows and columns of the data by size[0] and size[1] respectively. Parameters: ----------- size: tuple (size_y, size_x) - The number of times each axis will be repeated.
62598f18656771135c488384
class Node: <NEW_LINE> <INDENT> def __init__(self, value: Any, next_: Optional['Node'] = None): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.next = next_ <NEW_LINE> <DEDENT> @property <NEW_LINE> def next(self): <NEW_LINE> <INDENT> return self.__next <NEW_LINE> <DEDENT> @next.setter <NEW_LINE> def next(self, n...
Внутренний класс, класса LinkedList. Пользователь напрямую не работает с узлами списка, узлами оперирует список.
62598f18ab23a570cc2d43e9
class ProductImageAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('image_data', 'image', 'ordering')
ProductImage Structure
62598f18c4546d3d9def68e3
class ActiveEntityManager(AllEntityManager): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> return EntityQuerySet(self.model).active()
The default 'objects' on the Entity model. This manager restricts all Entity queries to happen over active entities.
62598f180fa83653e46f3be1
class ToolComboEntry(ValueToolItem): <NEW_LINE> <INDENT> __gtype_name__ = "ToolComboEntry" <NEW_LINE> def _create_widget(self, items, editable, shortlist=True, validator=None): <NEW_LINE> <INDENT> self.set_border_width(2) <NEW_LINE> self.set_homogeneous(False) <NEW_LINE> self.set_expand(False) <NEW_LINE> combo = Shortl...
Tool bar item containing a ShortlistComboEntry widget.
62598f18ab23a570cc2d43ea
class CS_domainname(object): <NEW_LINE> <INDENT> thrift_spec = (None, (1, TType.STRING, 'domainname', None, None)) <NEW_LINE> def __init__(self, domainname = None): <NEW_LINE> <INDENT> self.domainname = domainname <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBina...
Attributes: - domainname
62598f1826238365f5fab886
class CriticNetwork(object): <NEW_LINE> <INDENT> def __init__(self, sess, state_dim, action_dim, learning_rate, tau, gamma, num_actor_vars): <NEW_LINE> <INDENT> self.sess = sess <NEW_LINE> self.s_dim = state_dim <NEW_LINE> self.a_dim = action_dim <NEW_LINE> self.learning_rate = learning_rate <NEW_LINE> self.tau = tau <...
Input to the network is the state and action, output is Q(s,a). The action must be obtained from the output of the Actor network.
62598f19d8ef3951e32c74d3
class WarehouseTask(BasePage): <NEW_LINE> <INDENT> def __init__(self, driver): <NEW_LINE> <INDENT> BasePage.__init__(self, driver, __file__) <NEW_LINE> self.driver = driver <NEW_LINE> self.picking_locator = None <NEW_LINE> self.sorting_locator = None <NEW_LINE> self.packing_locator = None <NEW_LINE> self.deposit_locato...
库内作业卡片
62598f197cff6e4e811b46e9
class DllMemInspector(collections.Mapping): <NEW_LINE> <INDENT> def __init__(self, sim, mem): <NEW_LINE> <INDENT> self._aw = mem.addrwidth <NEW_LINE> bw = mem.bitwidth <NEW_LINE> self._limbs = limbs = sim._limbs(mem) <NEW_LINE> self._vn = vn = sim.varname[mem] <NEW_LINE> if bw <= 8: <NEW_LINE> <INDENT> scalar = ctypes....
Dictionary-like access to a memory array in a CompiledSimulation.
62598f19187af65679d29284
class ParticleFilter(InferenceModule): <NEW_LINE> <INDENT> def __init__(self, ghostAgent, numParticles=300): <NEW_LINE> <INDENT> InferenceModule.__init__(self, ghostAgent); <NEW_LINE> self.setNumParticles(numParticles) <NEW_LINE> <DEDENT> def setNumParticles(self, numParticles): <NEW_LINE> <INDENT> self.numParticles = ...
A particle filter for approximately tracking a single ghost. Useful helper functions will include random.choice, which chooses an element from a list uniformly at random, and util.sample, which samples a key from a Counter by treating its values as probabilities.
62598f19c4546d3d9def68e5
class InvalidSchema(RequestException, ValueError): <NEW_LINE> <INDENT> pass
The URL scheme provided is either invalid or unsupported.
62598f19091ae35668703907
class SystemNsPlugin(ServicePlugin): <NEW_LINE> <INDENT> _name = 'system-ns.com' <NEW_LINE> _oneliner = 'Updates on https://system-ns.com' <NEW_LINE> _apihost = 'https://system-ns.com/api' <NEW_LINE> _url = '{0}?type=dynamic&domain={1}&command=set&token={2}' <NEW_LINE> def register(self, log, hostname, ip, options): <N...
Update a dns entry on system-ns.com. As usual, any host updated must first be defined in the web UI. Supports most address plugins including default-web-ip, default-if and ip-disabled. ipv6 is not supported. Access to the service requires an API token. This is available in the website account. netrc: Use a line like...
62598f199f288636728174f7
class HMMERRunner(): <NEW_LINE> <INDENT> def __init__(self, mode="dom", prefix=''): <NEW_LINE> <INDENT> checkForHMMER() <NEW_LINE> if mode == "dom": <NEW_LINE> <INDENT> self.mode = 'domtblout' <NEW_LINE> <DEDENT> elif mode == "tbl": <NEW_LINE> <INDENT> self.mode = 'tblout' <NEW_LINE> <DEDENT> elif mode == 'align': <NEW...
Wrapper for running HMMER3
62598f199f288636728174f8
class WebSocketTransport(object): <NEW_LINE> <INDENT> implements(interfaces.ITransport) <NEW_LINE> _handler = None <NEW_LINE> def __init__(self, request): <NEW_LINE> <INDENT> self._request = request <NEW_LINE> self._request.notifyFinish().addErrback(self._connectionLost) <NEW_LINE> <DEDENT> def _attachHandler(self, han...
Transport abstraction over WebSocket, providing classic Twisted methods and callbacks.
62598f19099cdd3c63674a56
class DocumentsPage(BasePage): <NEW_LINE> <INDENT> PAGE_TITLE = "//h2[contains(text(),'Ihre Anfrage')]" <NEW_LINE> NOTIFICATION = "//div[contains(@class, 'Notification')]" <NEW_LINE> DOCUMENTS_LIST = "//button[contains(@class, 'uploadButton')]" <NEW_LINE> def __init__(self, driver): <NEW_LINE> <INDENT> super().__init__...
On documents page user can see summary of the selected offer, list of documents, and if he didn't confirm his email notifiaction massage about that
62598f19c4546d3d9def68e6
class ADLSGen1FolderDataSet(DataSet): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'account_name': {'required': True}, 'data_set_id': {'readonly': True}, 'folder_path': {'required': Tr...
An ADLS Gen 1 folder data set. 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 resource id of the azure resource. :vartype id: str :ivar name: Name of the azure resource. :vartype name: str :iva...
62598f19adb09d7d5dc092a5
class TestSpawnWorkers(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUp(cls): <NEW_LINE> <INDENT> fake_container1 = MagicMock() <NEW_LINE> fake_container1.name = 'vlab_onefs-api_1' <NEW_LINE> fake_container2 = MagicMock() <NEW_LINE> fake_container2.name = 'vlab_dns_1' <NEW_LINE> cls.fake_client...
A suite of test cases for the ``spawn_workers`` function
62598f19ec188e330fdf75b7
class GenomeDomainData(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "KBaseGenomes.GenomeDomainData" <NEW_LINE> class v3_0(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "KBaseGenomes.GenomeDomainData-3.0"
GenomeDomainData type
62598f193617ad0b5ee04e2f