code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Isb(Instruction): <NEW_LINE> <INDENT> sets_negative_bit = True <NEW_LINE> sets_zero_bit = True <NEW_LINE> @classmethod <NEW_LINE> def write(cls, cpu, memory_address, value): <NEW_LINE> <INDENT> updated_value = Inc.write(cpu, memory_address, value) <NEW_LINE> return Sbc.write(cpu, memory_address, updated_value) | inc then sbc
N Z C I D V
+ + - - - - | 62598fb75166f23b2e2434ed |
class SwitchMenuScreen(PygameScreen): <NEW_LINE> <INDENT> def __init__(self, menu): <NEW_LINE> <INDENT> PygameScreen.__init__(self) <NEW_LINE> self.menu = menu <NEW_LINE> self.menuView = SwitchMenuWidget(menu, self.width, self.height) <NEW_LINE> self.statViews = [] <NEW_LINE> width = self.width*.9/self.menu.columns <NE... | View for the Switch Menu Screen | 62598fb7aad79263cf42e8e5 |
class TestGameCreateForm: <NEW_LINE> <INDENT> @pytest.mark.parametrize('winner', ['white', 'black']) <NEW_LINE> @pytest.mark.parametrize('handicap', [0, 8]) <NEW_LINE> @pytest.mark.parametrize('komi', [0, 7]) <NEW_LINE> @pytest.mark.parametrize('season', [1]) <NEW_LINE> @pytest.mark.parametrize('episode', [1]) <NEW_LIN... | Game create form. | 62598fb791f36d47f2230f31 |
class MessageRegion (Region): <NEW_LINE> <INDENT> messages = None <NEW_LINE> @decorators.extends(Region.__init__) <NEW_LINE> def __init__ (self, *args, **kwargs): <NEW_LINE> <INDENT> super(MessageRegion, self).__init__(*args, **kwargs) <NEW_LINE> self.messages = [] <NEW_LINE> <DEDENT> def append (self, message): <NEW_L... | A message region is a buffer of strings contained within a list. The latest
strings are displayed at the bottom of the region, with older strings above
that, until it runs out of space; thus, you will always have the most
recent message on the screen. | 62598fb71b99ca400228f5b9 |
class DomainSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> owner = serializers.Field(source='owner.username') <NEW_LINE> app = serializers.SlugRelatedField(slug_field='id') <NEW_LINE> created = serializers.DateTimeField(format=settings.DEIS_DATETIME_FORMAT, read_only=True) <NEW_LINE> updated = serializers... | Serialize a :class:`~api.models.Domain` model. | 62598fb7851cf427c66b83c8 |
class ImageResizeLayer(Layer): <NEW_LINE> <INDENT> def __init__( self, incoming=None, scale=2, resize_method=tf.image.ResizeMethod.BILINEAR, name=None, make_logs=False, ): <NEW_LINE> <INDENT> self.incoming = incoming <NEW_LINE> self.scale = scale <NEW_LINE> self.resize_method = resize_method <NEW_LINE> self.name = name... | TODO | 62598fb7627d3e7fe0e06fc2 |
class MailListManager: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.path_to_lists = "" <NEW_LINE> self.maillists = [] <NEW_LINE> self.load() <NEW_LINE> <DEDENT> def create(self, list_name): <NEW_LINE> <INDENT> list_handler = MailListAdapter(list_name) <NEW_LINE> self.maillists.append((list_name, lis... | docstring for Interface def __init__(self, arg) | 62598fb75fc7496912d48304 |
class Slice(JSONPath): <NEW_LINE> <INDENT> def __init__(self, start=None, end=None, step=None): <NEW_LINE> <INDENT> self.start = start <NEW_LINE> self.end = end <NEW_LINE> self.step = step <NEW_LINE> <DEDENT> def find(self, datum): <NEW_LINE> <INDENT> datum = DatumInContext.wrap(datum) <NEW_LINE> if (isinstance(datum.v... | JSONPath matching a slice of an array.
Because of a mismatch between JSON and XML when schema-unaware,
this always returns an iterable; if the incoming data
was not a list, then it returns a one element list _containing_ that
data.
Consider these two docs, and their schema-unaware translation to JSON:
<a><b>hello</... | 62598fb763d6d428bbee28c1 |
class Runtime(context.Runtime): <NEW_LINE> <INDENT> @property <NEW_LINE> def Node(self): <NEW_LINE> <INDENT> from .graph import Node <NEW_LINE> return Node <NEW_LINE> <DEDENT> @property <NEW_LINE> def InfoTable(self): <NEW_LINE> <INDENT> from .graph import InfoTable <NEW_LINE> return InfoTable <NEW_LINE> <DEDENT> @prop... | Implementation of the runtime system interface for the Python backend. Used
by the Interpreter object. | 62598fb7d58c6744b42dc363 |
@optplan.register_node_type() <NEW_LINE> class FabricationConstraint(optplan.Function): <NEW_LINE> <INDENT> type = schema_utils.polymorphic_model_type( "function.fabrication_constraint") <NEW_LINE> minimum_curvature_diameter = types.FloatType() <NEW_LINE> minimum_gap = types.FloatType() <NEW_LINE> simulation_space = op... | Defines fabrication constraint penalty function.
Attributes:
type: Must be "function.fabrication_constraint"
minimum_curvature_diameter: Smallest allowed curvature.
minimum_gap: Smallest allowed gap.
simulation_space: Simulation space where the fabrication constraint is evaluated.
oversample: Overs... | 62598fb726068e7796d4ca6a |
class InvoiceCreateView(LoginRequiredMixin, libs_mixins.CompanyRequiredMixin, CreateView): <NEW_LINE> <INDENT> model = invoices_models.Invoice <NEW_LINE> template_name = 'invoice/invoice_create.html' <NEW_LINE> form_class = invoices_forms.InvoiceCreateForm <NEW_LINE> success_url = reverse_lazy('invoices:invoice_list') ... | View to create an invoice | 62598fb74527f215b58e9fe9 |
class EventRegistrationAnswer(models.Model): <NEW_LINE> <INDENT> _name = 'event.registration.answer' <NEW_LINE> _description = 'Event Registration Answer' <NEW_LINE> question_id = fields.Many2one( 'event.question', ondelete='restrict', required=True, domain="[('event_id', '=', event_id)]") <NEW_LINE> registration_id = ... | Represents the user input answer for a single event.question | 62598fb7009cb60464d01635 |
class UnreachableRule(object): <NEW_LINE> <INDENT> def __init__(self, rule): <NEW_LINE> <INDENT> self.rule = rule | A rule entry that can't be reached. | 62598fb771ff763f4b5e788a |
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 | 62598fb77047854f4633f4e9 |
class ToolGrid(_ToolGridBase): <NEW_LINE> <INDENT> description = 'Toggle major grids' <NEW_LINE> default_keymap = rcParams['keymap.grid'] <NEW_LINE> def _get_next_grid_states(self, ax): <NEW_LINE> <INDENT> if None in map(self._get_uniform_grid_state, [ax.xaxis.minorTicks, ax.yaxis.minorTicks]): <NEW_LINE> <INDENT> rais... | Tool to toggle the major grids of the figure | 62598fb74a966d76dd5eefeb |
class EmptyArray(MatrixUtilsError): <NEW_LINE> <INDENT> pass | Empty array can't be used | 62598fb7aad79263cf42e8e7 |
class Crc32: <NEW_LINE> <INDENT> def __init__(self, data=b''): <NEW_LINE> <INDENT> self.name = "crc32" <NEW_LINE> self.data = data <NEW_LINE> <DEDENT> def update(self, data=b''): <NEW_LINE> <INDENT> self.data += data <NEW_LINE> <DEDENT> def copy(self): <NEW_LINE> <INDENT> return Crc32(self.data) <NEW_LINE> <DEDENT> def... | This class is an api for the crc32 function that is compatible with mor | 62598fb77b180e01f3e490db |
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. | 62598fb75fdd1c0f98e5e0a2 |
class Dispatcher: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.manifest_manager = ManifestManager() <NEW_LINE> self.ip = self.manifest_manager.get_from_manifest("Ip") <NEW_LINE> self.topic = self.manifest_manager.get_from_manifest("Topic") <NEW_LINE> <DEDENT> def dispatch(self, formatted_messages_li... | Dispatcher Class | 62598fb7d7e4931a7ef3c1a9 |
class DescribeUHostInstanceSnapshotResponseSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "SnapshotSet": fields.List( models.UHostSnapshotSetSchema(), required=False, load_from="SnapshotSet", ), "UhostId": fields.Str(required=False, load_from="UhostId"), } | DescribeUHostInstanceSnapshot - 获取已经存在的UHost实例的存储快照列表。
| 62598fb7bd1bec0571e1514c |
class ClassProperty(property): <NEW_LINE> <INDENT> def __get__(self, obj, obj_type=None): <NEW_LINE> <INDENT> return super(ClassProperty, self).__get__(obj_type) <NEW_LINE> <DEDENT> def __set__(self, obj, value): <NEW_LINE> <INDENT> super(ClassProperty, self).__set__(type(obj), value) <NEW_LINE> <DEDENT> def __delete__... | Python doesn't have class properties (yet?), but this should do the trick.
We need this to keep track of known (previously seen) series. | 62598fb7d268445f26639c0e |
class BadCriteriaError(Exception): <NEW_LINE> <INDENT> pass | Failed to find results with given criteria | 62598fb7283ffb24f3cf399d |
class Deck(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.deck = [] <NEW_LINE> <DEDENT> def populateDeck(self): <NEW_LINE> <INDENT> for hoeveelheid in [1, 2, 3]: <NEW_LINE> <INDENT> for kleur in [1, 2, 3]: <NEW_LINE> <INDENT> for vorm in [1, 2, 3]: <NEW_LINE> <INDENT> for vulling in [1, 2, 3]: <NEW... | Een Deck bestaat uit 81 unique SetKaart-objecten. Als een kaart getrokken
wordt, wordt deze overgebracht naar het speelveld. | 62598fb73346ee7daa3376d2 |
class MCTS(object): <NEW_LINE> <INDENT> def __init__(self, policy_value_fn, c_puct=5, n_playout=10000): <NEW_LINE> <INDENT> self._root = TreeNode(None, 1.0) <NEW_LINE> self._policy = policy_value_fn <NEW_LINE> self._c_puct = c_puct <NEW_LINE> self._n_playout = n_playout <NEW_LINE> <DEDENT> def _playout(self, state): <N... | A simple implementation of Monte Carlo Tree Search. | 62598fb7dc8b845886d536cc |
class DiffKindChange(object): <NEW_LINE> <INDENT> def __init__(self, differs): <NEW_LINE> <INDENT> self.differs = differs <NEW_LINE> <DEDENT> def finish(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_diff_tree(klass, diff_tree): <NEW_LINE> <INDENT> return klass(diff_tree.differs) <... | Special differ for file kind changes.
Represents kind change as deletion + creation. Uses the other differs
to do this. | 62598fb73d592f4c4edbafd5 |
class Links(Region): <NEW_LINE> <INDENT> _security_log_link_locator = ( By.CSS_SELECTOR, '[href$=security_log]') <NEW_LINE> _oauth_application_link_locator = ( By.CSS_SELECTOR, '[href*=oauth]') <NEW_LINE> _fine_print_link_locator = ( By.CSS_SELECTOR, '[href$=fine_print]') <NEW_LINE> _accounts_api_link_locator = ( By.CS... | Accounts program links section. | 62598fb7009cb60464d01637 |
class FirewalldPnaicMode(APIView): <NEW_LINE> <INDENT> def get(self, request, format=None): <NEW_LINE> <INDENT> fm = FirewallManger() <NEW_LINE> panic_mode = fm.get_firewall_panic_mode() <NEW_LINE> return Response(panic_mode, status=status.HTTP_200_OK) <NEW_LINE> <DEDENT> def put(self, request, format=None): <NEW_LINE>... | Dynamic firewall configuration: runtime and permanent | 62598fb75fdd1c0f98e5e0a3 |
class MockSession: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def return_status_code(cls, status_code): <NEW_LINE> <INDENT> return MockResponse(status_code, text='Failed because test') <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def return_token_text(cls): <NEW_LINE> <INDENT> return MockResponse(200, ('{"access_token"... | Mock functions that return a MockResponse for mimicking
requests.Session. | 62598fb757b8e32f525081a7 |
class CMSAllinkBaseFormPlugin(CMSPluginBase): <NEW_LINE> <INDENT> form_class = None <NEW_LINE> url_name = None <NEW_LINE> def render(self, context, instance, placeholder): <NEW_LINE> <INDENT> context = super().render(context, instance, placeholder) <NEW_LINE> context.update({ 'form': self.form_class(), 'action': self.g... | Use this BasePlugin for plugins, which display a form.
example implementation:
class CMSLivingSignupPlugin(CMSAllinkBaseFormPlugin):
name = 'Living Signup Plugin'
model = LivingSignupPlugin
render_template = 'living/plugins/signup/content.html'
form_class = LivingSignupForm
url_name = 'signup' | 62598fb771ff763f4b5e788c |
@keras_export('keras.layers.experimental.preprocessing.Resizing') <NEW_LINE> class Resizing(PreprocessingLayer): <NEW_LINE> <INDENT> def __init__(self, height, width, interpolation='bilinear', **kwargs): <NEW_LINE> <INDENT> self.target_height = height <NEW_LINE> self.target_width = width <NEW_LINE> self.interpolation =... | Image resizing layer.
Resize the batched image input to target height and width. The input should
be a 4-D tensor in the format of NHWC.
Args:
height: Integer, the height of the output shape.
width: Integer, the width of the output shape.
interpolation: String, the interpolation method. Defaults to `bilinear`.
... | 62598fb7a8370b77170f04f3 |
class TrafficLightScenario(BasicScenario): <NEW_LINE> <INDENT> category = "TrafficLightScenario" <NEW_LINE> def __init__(self, world, ego_vehicle, config, randomize=False, debug_mode=False, timeout=35 * 60): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.debug = debug_mode <NEW_LINE> self.timeout = timeout <N... | This scenario controls traffic lights at intersection to create interesting situations, e.g.:
- vehicles running red lights
- yielding to traffic | 62598fb7f548e778e596b6ba |
class Sphere(Benchmark): <NEW_LINE> <INDENT> def __init__(self, dimensions=2): <NEW_LINE> <INDENT> Benchmark.__init__(self, dimensions) <NEW_LINE> self.bounder = ec.Bounder([-5.12] * self.dimensions, [5.12] * self.dimensions) <NEW_LINE> self.maximize = False <NEW_LINE> self.global_optimum = [0 for _ in range(self.dimen... | Defines the Sphere benchmark problem.
This class defines the Sphere global optimization problem, also called
the "first function of De Jong's" or "De Jong's F1." It is continuous,
convex, and unimodal, and it is defined as follows:
.. math::
f(x) = \sum_{i=1}^n x_i^2
Here, :math:`n` represents the number of dim... | 62598fb7cc0a2c111447b122 |
class BetaJobServiceServicer(object): <NEW_LINE> <INDENT> def CreateJob(self, request, context): <NEW_LINE> <INDENT> context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) <NEW_LINE> <DEDENT> def ListJobs(self, request, context): <NEW_LINE> <INDENT> context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) <NEW_LINE> <DED... | The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0. | 62598fb756b00c62f0fb29cf |
class ExpectimaxAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> return self.maximize(gameState, 1, 0)[1] <NEW_LINE> <DEDENT> def getNodeValue(self, gameState, currDepth, agentIndex): <NEW_LINE> <INDENT> if gameState.isWin() or gameState.isLose(): <NEW_LINE> <INDENT>... | Your expectimax agent (question 4) | 62598fb78a349b6b43686351 |
class PathEntry(SuccessEntry): <NEW_LINE> <INDENT> PATH_TYPES = ( ("device", "Device"), ("directory", "Directory"), ("hardlink", "Hard Link"), ("nonexistent", "Non Existent"), ("permissions", "Permissions"), ("symlink", "Symlink"), ) <NEW_LINE> DETAIL_UNUSED = 0 <NEW_LINE> DETAIL_DIFF = 1 <NEW_LINE> DETAIL_BINARY = 2 <... | reason why modified or bad entry did not verify, or changed. | 62598fb72ae34c7f260ab1f2 |
class Node(object): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> self._children = [] <NEW_LINE> <DEDENT> def AppendChild(self, child): <NEW_LINE> <INDENT> self._children.append(child) <NEW_LINE> <DEDENT> @property <NEW_LINE> def children(self): <NEW_LINE> <INDENT> return self._children | Represents a node in the suite tree structure. | 62598fb71b99ca400228f5bb |
class Settings(): <NEW_LINE> <INDENT> settings = None <NEW_LINE> def __init__(self, view): <NEW_LINE> <INDENT> settings_key = 'phpunit_skelgen.sublime-settings' <NEW_LINE> self.settings = sublime.load_settings(settings_key) <NEW_LINE> self.project_settings = {} <NEW_LINE> if sublime.active_window() is not None: <NEW_LI... | Class that loads the necessary setting for running the generate_test
command. | 62598fb755399d3f0562662b |
class Var(object): <NEW_LINE> <INDENT> def __init__(self, val=0): <NEW_LINE> <INDENT> self.__val = val <NEW_LINE> <DEDENT> @property <NEW_LINE> def val(self): <NEW_LINE> <INDENT> return self.__val <NEW_LINE> <DEDENT> @val.setter <NEW_LINE> def val(self, new_val): <NEW_LINE> <INDENT> self.__val = new_val | Generic variable type use in the Hylozoic 3 system
This provides a standard interface for all variables within the system.
This allows all variables, including those of immutable types, to be passed by refernce through this mutable object.
Parameters
------------
val (default = 0)
Value of the variable
Att... | 62598fb701c39578d7f12e90 |
class AttrVI_ATTR_RSRC_MANF_NAME(Attribute): <NEW_LINE> <INDENT> resources = AllSessionTypes <NEW_LINE> py_name = "resource_manufacturer_name" <NEW_LINE> visa_name = "VI_ATTR_RSRC_MANF_NAME" <NEW_LINE> visa_type = "ViString" <NEW_LINE> default = NotAvailable <NEW_LINE> read, write, local = True, False, False | Manufacturer name of the vendor that implemented the VISA library.
This attribute is not related to the device manufacturer attributes.
Note The value of this attribute is for display purposes only and not for
programmatic decisions, as the value can differ between VISA implementations
and/or revisions. | 62598fb78a43f66fc4bf2290 |
class Snapshot(MarketDataBase): <NEW_LINE> <INDENT> class UpdateType: <NEW_LINE> <INDENT> NONE = 0 <NEW_LINE> ORDER_BOOK = 1 <NEW_LINE> TRADES = 2 <NEW_LINE> <DEDENT> def __init__(self, exchange, instmt_name): <NEW_LINE> <INDENT> MarketDataBase.__init__(self) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def columns(is_... | Market price snapshot | 62598fb763d6d428bbee28c5 |
class Stack(object): <NEW_LINE> <INDENT> def __init__(self, limit = 10): <NEW_LINE> <INDENT> self.stack = [] <NEW_LINE> self.limit = limit <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return ' '.join([str(i) for i in self.stack]) <NEW_LINE> <DEDENT> def push(self, data): <NEW_LINE> <INDENT> if len(self.st... | Python implementation of Stack | 62598fb7cc40096d6161a264 |
class SeverityColumnGenerator(DiscreteColumnGenerator): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> names = ["severity", "importance"] <NEW_LINE> possible_values = ["minor", "normal", "major", "critical"] <NEW_LINE> super().__init__(names, possible_values, max_discrete_values=3) | A discrete data type representing a severity level. | 62598fb723849d37ff8511c9 |
class TagInfo(object): <NEW_LINE> <INDENT> def __init__(self, ref, revision, object_=None, message=None, tagger=None): <NEW_LINE> <INDENT> self.ref = ref <NEW_LINE> self.revision = revision <NEW_LINE> self.object_ = object_ <NEW_LINE> self.message = message <NEW_LINE> self.tagger = tagger <NEW_LINE> <DEDENT> @classmeth... | http://192.168.10.48/Documentation/rest-api-projects.html#tag-info
parsed output example:
{u'message': u'tag before change CXLite_H3713_HiOS2.0.0_N branch base to E31_H375_HiOS2.0.0_N_DEV.xml',
u'object': u'f448fedb534efc74501306cedc287d229479794c',
u'ref': u'refs/tags/CXLite_H3713_HiOS2.0.0_N_BEFORE_TAG_... | 62598fb797e22403b383b01c |
class RandomQuestion(ListAPIView): <NEW_LINE> <INDENT> serializer_class = QuestionSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> category = self.request.GET.get('category',None) <NEW_LINE> level = self.request.GET.get('level', None) <NEW_LINE> user = self.request.user <NEW_LINE> if user.is_anonymous(... | Returns a random question to the User | 62598fb7f548e778e596b6bb |
class RNN_ENCODER(nn.Module): <NEW_LINE> <INDENT> def __init__(self, ntoken, ninput=300, drop_prob=0.5, nhidden=128, nlayers=1, bidirectional=True): <NEW_LINE> <INDENT> super(RNN_ENCODER, self).__init__() <NEW_LINE> """What is the use and meaning of n_steps""" <NEW_LINE> self.n_steps = cfg.TEXT.WORDS_NUM <NEW_LINE> sel... | How is it working ?? | 62598fb7498bea3a75a57c38 |
class PopulationFilterBackend(OrderingFilter, DjangoFilterBackend): <NEW_LINE> <INDENT> def filter_queryset(self, request, queryset, view): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> filterable = getattr(view, 'filter_fields', []) <NEW_LINE> filters = dict([(k, v) for k, v in request.GET.items() if k in filterable]) ... | Extend L{DjangoFilterBackend} for filtering LD resources. | 62598fb73539df3088ecc3c3 |
class TestShardVertex(unittest.TestCase): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def setup_class(self): <NEW_LINE> <INDENT> if _cfg.server_backend == 'cassandra': <NEW_LINE> <INDENT> clear_graph() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> Gremlin().gremlin_post('graph.truncateBackend();') <NEW_LINE> <DEDENT> ... | 通过指定的分片信息批量查询顶点 | 62598fb732920d7e50bc6165 |
class Script: <NEW_LINE> <INDENT> def __init__(self, lines): <NEW_LINE> <INDENT> self.lines = lines <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_script(cls, stream): <NEW_LINE> <INDENT> lines = [] <NEW_LINE> for i, data in enumerate(stream.readlines()): <NEW_LINE> <INDENT> if i % 2 == 0: <NEW_LINE> <INDENT> com... | Contains the contents of a script ripped from a ROM | 62598fb760cbc95b06364455 |
class MockAppTestCase(tornado.testing.AsyncTestCase): <NEW_LINE> <INDENT> mockappargs = {} <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cla): <NEW_LINE> <INDENT> cla.app = MockApplication(**cla.mockappargs) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tearDownClass(cla): <NEW_LINE> <INDENT> cla.app.disconnect()... | Base class for Tworld test cases that need an Application to run in.
The mockappargs dict determines the setup parameters of the
MockApplication. | 62598fb75fdd1c0f98e5e0a5 |
class RestFulClient: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.app_logger = AppLogger.instance().logger <NEW_LINE> pass <NEW_LINE> <DEDENT> def delete(self, url, headers={}): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.app_logger.debug('request : {}'.format(url)) <NEW_LINE> response = reque... | This method will be helpful in executing the http requests | 62598fb7f9cc0f698b1c5358 |
class SourceVertexSet(collections.abc.MutableSet, GraphComponent): <NEW_LINE> <INDENT> def __init__(self, vid: VertexID, graph_store: GraphStore): <NEW_LINE> <INDENT> GraphComponent.__init__(self, graph_store) <NEW_LINE> self._vid = vid <NEW_LINE> <DEDENT> def __contains__(self, vertex: VertexOrID) -> bool: <NEW_LINE> ... | The set containing every vertex which is the source of an edge that shares the same given sink. | 62598fb755399d3f0562662d |
class Schaffer6(TestProblem): <NEW_LINE> <INDENT> def __init__(self, phenome_preprocessor=None, **kwargs): <NEW_LINE> <INDENT> self.num_variables = 2 <NEW_LINE> self._min_bounds = [-100.0, -100.0] <NEW_LINE> self._max_bounds = [100.0, 100.0] <NEW_LINE> bounds = (self.min_bounds, self.max_bounds) <NEW_LINE> self.bound_c... | Schaffer's test problem 6.
This problem is radially symmetric. Thus it does not possess a discrete
set of local optima. It was defined for two dimensions in
[Schaffer1989]_. The global optimum is the origin and the search space
is :math:`[-100, 100] \times [-100, 100]`.
References
----------
.. [Schaffer1989] Schaffe... | 62598fb7460517430c4320e9 |
class RboInput(TextInput): <NEW_LINE> <INDENT> defaultBackground = [.05, .05, .05, 1] <NEW_LINE> defaultForeground = [1, 1, 1, 1] <NEW_LINE> invalidForeground = [1, 0, 0, 1] <NEW_LINE> defaultHint = [.7, .7, .7, 1] <NEW_LINE> invalidHint = [.5, 0, 0, 1] <NEW_LINE> disabledForeground = [.6, .6, .6, 1] <NEW_LINE> disable... | Zone de saisie dans un formulaire de connexion ou de configuration, conforme au thème de l'appliction. | 62598fb7adb09d7d5dc0a6a5 |
class log_tpool(SolverLog): <NEW_LINE> <INDENT> min_args = 1 <NEW_LINE> def __init__(self, env): <NEW_LINE> <INDENT> from optparse import OptionGroup <NEW_LINE> super(log_tpool, self).__init__(env) <NEW_LINE> op = self.op <NEW_LINE> opg = OptionGroup(op, 'Show Tpool') <NEW_LINE> opg.add_option('-k', action='store', des... | Show output from TpoolStatAnchor. | 62598fb701c39578d7f12e92 |
class TestMain(unittest.TestCase): <NEW_LINE> <INDENT> def test_tp3_example(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> os.remove("output.txt") <NEW_LINE> <DEDENT> except OSError: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> main("input.txt", "output.txt") <NEW_LINE> data = open("output.txt").read().split('\n')... | Como para um programa feito em memoria eh algo muito simples, apenas um
teste geral eh suficiente. | 62598fb730dc7b766599f965 |
class classy(SlikPlugin): <NEW_LINE> <INDENT> name_mapping = { 'ombh2':'omega_b', 'omch2':'omega_cdm', 'omnuh2':'omega_ncdm', 'tau':'tau_reio', 'H0':'H0', 'massive_neutrinos':'N_ncdm', 'massless_neutrinos':'N_ur', 'Yp':'YHe', 'pivot_scalar':'k_pivot', 'Tcmb':'T_cmb', 'omk':'Omega_k', 'phi0':'custom1', 'm6':'custom2' } ... | Plugin for CLASS.
Credit: Brent Follin, Teresa Hamill, Andy Scacco | 62598fb79c8ee823130401ff |
class WebAPIResponse(HttpResponse): <NEW_LINE> <INDENT> def __init__(self, request, obj={}, stat='ok', api_format="json"): <NEW_LINE> <INDENT> if api_format == "json": <NEW_LINE> <INDENT> if request.FILES: <NEW_LINE> <INDENT> mimetype = "text/plain" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> mimetype = "application/... | An API response, formatted for the desired file format. | 62598fb77cff6e4e811b5b38 |
class CampusAdmin(admin.OSMGeoAdmin): <NEW_LINE> <INDENT> openlayers_url = '/static/feti/js/libs/OpenLayers-2.13.1/OpenLayers.js' <NEW_LINE> inlines = [AddressAdminInline] <NEW_LINE> list_display = ('id', 'campus', 'primary_institution', '_complete',) <NEW_LINE> list_filter = ['provider__primary_institution', '_complet... | Admin Class for Campus Model. | 62598fb72c8b7c6e89bd38dd |
class CommonEqualityMixin(object): <NEW_LINE> <INDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return (isinstance(other, self.__class__) and self.__dict__ == other.__dict__) <NEW_LINE> <DEDENT> def __ne__(self, other): <NEW_LINE> <INDENT> return not self.__eq__(other) | Enable subclasses of this class to do equality comparison.
Code taken from http://stackoverflow.com/questions/390250/elegant-ways-to-support-equivalence-equality-in-python-classes | 62598fb797e22403b383b01e |
class ButtonOne(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "scene.dostuff" <NEW_LINE> bl_label = "Calc Length" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> get_length(context) <NEW_LINE> return{'FINISHED'} | Defines a button | 62598fb766673b3332c304e7 |
class Intangible(Thing): <NEW_LINE> <INDENT> _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'read_link': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonly': True}, 'image': {'readonly': True}, 'description': {'readonly': True}, 'alternate_nam... | A utility class that serves as the umbrella for a number of 'intangible'
things such as quantities, structured values, etc.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: StructuredValue
Variables are only populated by the server, and will be ignored when
sending a reques... | 62598fb7009cb60464d0163b |
class ThreatsProperties(GroupsProperties): <NEW_LINE> <INDENT> def __init__(self, base_uri='v2', http_method=PropertiesAction.GET): <NEW_LINE> <INDENT> super(ThreatsProperties, self).__init__(base_uri, http_method) <NEW_LINE> self._resource_key = 'threat' <NEW_LINE> self._resource_pagination = True <NEW_LINE> self._res... | URIs:
/<api version>/groups/threats
/<api version>/indicators/<indicator type>/<value>/groups/threats
/<api version>/groups/adversaries/<ID>/groups/threats
/<api version>/groups/emails/<ID>/groups/threats
/<api version>/groups/incidents/<ID>/groups/threats
/<api version>/groups/signatures/<ID>/groups/threats
/<api vers... | 62598fb7167d2b6e312b708c |
class List(Container): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'List({!r})'.format(self._data) <NEW_LINE> <DEDENT> def _load_from_mongo(self, data): <NEW_LINE> <INDENT> self._data = [] <NEW_LINE> for item in data: <NEW_LINE> <INDENT> if hasattr(self._field.item_field, 'from_mongo'): <NEW_LINE... | Container for list
| 62598fb760cbc95b06364457 |
class InboundShipmentResponse(__BaseDictObject): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super().__init__(data) <NEW_LINE> if "payload" in data: <NEW_LINE> <INDENT> self.payload: InboundShipmentResult = self._get_value(InboundShipmentResult, "payload") <NEW_LINE> <DEDENT> else: <NEW_LINE> <IND... | The response schema for this operation. | 62598fb7fff4ab517ebcd900 |
class ViewTestCase(TestCase): <NEW_LINE> <INDENT> fixtures = ["sodes_tests.json"] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.sode = Sode.objects.get(pk=1) <NEW_LINE> self.client = Client() <NEW_LINE> self.test_user = User.objects.get(pk=1) <NEW_LINE> <DEDENT> def test_superuser_view_unpublished(self): <NEW_LI... | Test things in the views | 62598fb757b8e32f525081a9 |
class PublicIPAddressListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(PublicIPAddressListResult, self).__init__(**... | Response for ListPublicIpAddresses API service call.
:param value: A list of public IP addresses that exists in a resource group.
:type value: list[~azure.mgmt.network.v2018_08_01.models.PublicIPAddress]
:param next_link: The URL to get the next set of results.
:type next_link: str | 62598fb74428ac0f6e65863b |
class RegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.RegexField(regex=r'^\w+$', max_length=30, widget=forms.TextInput(attrs=attrs_dict), label=_("Username"), error_messages={'invalid': _("This value must contain only letters, numbers and underscores.")}) <NEW_LINE> email = forms.EmailField(widget=fo... | Form for registering a new user account.
Validates that the requested username is not already in use, and
requires the password to be entered twice to catch typos.
Subclasses should feel free to add any additional validation they
need, but should avoid defining a ``save()`` method -- the actual
saving of collected us... | 62598fb74f88993c371f0599 |
class PipeInput(Input): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._r, self._w = os.pipe() <NEW_LINE> <DEDENT> def fileno(self): <NEW_LINE> <INDENT> return self._r <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> return os.read(self._r) <NEW_LINE> <DEDENT> def send_text(self, data): <NEW_LI... | Input that is send through a pipe.
This is useful if we want to send the input programatically into the
interface, but still use the eventloop.
Usage::
input = PipeInput()
input.send('inputdata') | 62598fb74a966d76dd5eeff1 |
class ModelTests(TestCase): <NEW_LINE> <INDENT> def test_create_user_with_email_successful(self): <NEW_LINE> <INDENT> payload = {'email': 'pudgeinvonyx@gmail.com', 'password': '1111qqqq='} <NEW_LINE> user = get_user_model().objects.create_user( email=payload['email'], password=payload['password'] ) <NEW_LINE> self.asse... | Test creating a new user with an email is successful | 62598fb78a349b6b43686355 |
class ApplicationGatewayPrivateEndpointConnection(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'type': {'readonly': True}, 'private_endpoint': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'link_identifier': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key... | Private Endpoint connection on an application gateway.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:param name: Name of the private endpoint connection on an application gateway.
:type name: str
:ivar etag: A unique read-only string tha... | 62598fb7f548e778e596b6be |
class Myo(RapidAPI): <NEW_LINE> <INDENT> battery_level = Read(BATTERY_CHRC) <NEW_LINE> vibrate = Write(CONTROL_SERVICE, accept=[VIB_STRONG]) <NEW_LINE> set_mode = Write(CONTROL_SERVICE, accept=[EMG_MODE]) <NEW_LINE> subscribe_to_emg = Notify(ALL_EMG_CHRCS) | Myo armband API | 62598fb7236d856c2adc94cc |
class BrazilSerraCityTest(BrazilEspiritoSantoTest): <NEW_LINE> <INDENT> cal_class = BrazilSerraCity <NEW_LINE> test_include_immaculate_conception = True <NEW_LINE> def test_year_2017_city(self): <NEW_LINE> <INDENT> holidays = self.cal.holidays_set(2017) <NEW_LINE> self.assertIn(date(2017, 6, 29), holidays) <NEW_LINE> s... | Serra city is in the Espírito Santo state | 62598fb755399d3f0562662f |
class Singleton(type): <NEW_LINE> <INDENT> def __init__(cls, name, bases, dct): <NEW_LINE> <INDENT> cls.__instance = None <NEW_LINE> type.__init__(cls, name, bases, dct) <NEW_LINE> <DEDENT> def __call__(cls, *args, **kw): <NEW_LINE> <INDENT> if cls.__instance is None: <NEW_LINE> <INDENT> cls.__instance = type.__call__(... | Singleton metaclass. | 62598fb75fcc89381b2661d9 |
class Meta: <NEW_LINE> <INDENT> database = DB <NEW_LINE> table_name = 'proposals' <NEW_LINE> legacy_table_names = False | This is the meta class for OldTrans. | 62598fb73317a56b869be5da |
class ConfigurationForm(forms.Form): <NEW_LINE> <INDENT> name = forms.CharField( label=ugettext(u'Name'), ) <NEW_LINE> configuration_type = forms.ModelChoiceField( label=ugettext(u'Configuration type'), queryset=ConfigurationType.objects.all(), empty_label=None, ) <NEW_LINE> value_type = forms.ModelChoiceField( label=u... | Form for editing of annotations. | 62598fb797e22403b383b01f |
class Cc(Email): <NEW_LINE> <INDENT> pass | A cc email address with an optional name. | 62598fb7283ffb24f3cf39a1 |
class BBBLeNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, outputs, inputs): <NEW_LINE> <INDENT> super(BBBLeNet, self).__init__() <NEW_LINE> self.conv1 = BBBConv2d(inputs,6, 5, stride=1) <NEW_LINE> self.soft1 = nn.Softplus() <NEW_LINE> self.pool1 = nn.MaxPool2d(kernel_size=2, stride=2) <NEW_LINE> self.conv2 = BB... | The architecture of LeNet with Bayesian Layers | 62598fb763d6d428bbee28c8 |
class County(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=300) <NEW_LINE> slug = models.SlugField(null=True) <NEW_LINE> state = models.ForeignKey('State', null=True) <NEW_LINE> state_fips_code = models.CharField(max_length=2) <NEW_LINE> county_fips_code = models.CharField(max_length=3) <NEW_LIN... | An administrative unit created by one of our fine state governments. | 62598fb7cc40096d6161a266 |
class PKCS115_Cipher: <NEW_LINE> <INDENT> def __init__(self, key, randfunc): <NEW_LINE> <INDENT> self._key = key <NEW_LINE> self._randfunc = randfunc <NEW_LINE> <DEDENT> def can_encrypt(self): <NEW_LINE> <INDENT> return self._key.can_encrypt() <NEW_LINE> <DEDENT> def can_decrypt(self): <NEW_LINE> <INDENT> return self._... | This cipher can perform PKCS#1 v1.5 RSA encryption or decryption.
Do not instantiate directly. Use :func:`Cryptodome.Cipher.PKCS1_v1_5.new` instead. | 62598fb7bd1bec0571e1514f |
class IArticle(ArticleSchema, IBaseArticle, IImageScaleTraversable): <NEW_LINE> <INDENT> pass | Interface for content type: collective.cart.core.Article | 62598fb797e22403b383b020 |
class getStruct_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRUCT, 'success', (SharedStruct, SharedStruct.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBin... | Attributes:
- success | 62598fb792d797404e388bf0 |
class VtOrderReq(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.symbol = EMPTY_STRING <NEW_LINE> self.exchange = EMPTY_STRING <NEW_LINE> self.vtSymbol = EMPTY_STRING <NEW_LINE> self.price = EMPTY_FLOAT <NEW_LINE> self.volume = EMPTY_INT <NEW_LINE> self.priceType = EMPTY_STRING <NEW_LINE> self... | 发单时传入的对象类 | 62598fb710dbd63aa1c70cd2 |
class enumValue2Type(asn1.Enumerated): <NEW_LINE> <INDENT> class Value(asn1.Enumerated.Value): <NEW_LINE> <INDENT> NONE = None <NEW_LINE> truism = 0 <NEW_LINE> falsism = 1 <NEW_LINE> <DEDENT> __simple__ = Value <NEW_LINE> def init_value(self): <NEW_LINE> <INDENT> return self.Value.truism <NEW_LINE> <DEDENT> REQUIRED_BY... | Derived from Enumerated | 62598fb7d486a94d0ba2c0e7 |
class RMLightSource(lightsource.LightSource): <NEW_LINE> <INDENT> protocols.advise(instancesProvide=[ISceneItem, ribexport.ILightSource]) <NEW_LINE> def __init__(self, name = "RMLightSource", shader = None, **params): <NEW_LINE> <INDENT> lightsource.LightSource.__init__(self, name=name, **params) <NEW_LINE> if isinstan... | RenderMan light source.
Use this light source class if you want to write the RenderMan light shader
yourself in an external source file or if you want to use an external
shader that you will compile manually.
The shader source file (or only the shader name) is passed via a
RMShader instances as argument to the constr... | 62598fb7167d2b6e312b708e |
class MGTank(Tank): <NEW_LINE> <INDENT> name = "MGTank" <NEW_LINE> def FireGun(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> trigger = self.triggerIterator.next() <NEW_LINE> <DEDENT> except StopIteration: <NEW_LINE> <INDENT> self.triggerIterator = iter(self.triggers) <NEW_LINE> trigger = self.triggerIterator.next... | Machinegun Tank | 62598fb7796e427e5384e8af |
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount = 0.9, iterations = 100): <NEW_LINE> <INDENT> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_LINE> self.iterations = iterations <NEW_LINE> self.values = util.Counter() <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_... | * Please read learningAgents.py before reading this.*
A ValueIterationAgent takes a Markov decision process
(see mdp.py) on initialization and runs value iteration
for a given number of iterations using the supplied
discount factor. | 62598fb7fff4ab517ebcd902 |
class ShelfComments(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'shelf_comments' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> user_id = db.Column(db.Integer, db.ForeignKey('user.id')) <NEW_LINE> shelf_id = db.Column(db.Integer, db.ForeignKey('shelf.id')) <NEW_LINE> content = db.Column(db.Text) ... | 书架留言 | 62598fb7aad79263cf42e8ee |
class Watershed(Simple): <NEW_LINE> <INDENT> title = 'Binary Watershed 3D' <NEW_LINE> note = ['8-bit', 'stack3d'] <NEW_LINE> para = {'tor':2, 'con':False} <NEW_LINE> view = [(int, 'tor', (0,255), 0, 'tolerance', 'value'), (bool, 'con', 'full connectivity')] <NEW_LINE> def run(self, ips, imgs, para = None): <NEW_LINE> <... | Mark class plugin with events callback functions | 62598fb7379a373c97d99130 |
class AccountRequest(BaseAccountRequest): <NEW_LINE> <INDENT> objects = AccountRequestManager() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> proxy = True <NEW_LINE> <DEDENT> @property <NEW_LINE> def harvard_key(self): <NEW_LINE> <INDENT> result = self.getDataField('harvard_key') <NEW_LINE> if not result: <NEW_LINE> <INDE... | Account requests for {{project_name}} | 62598fb74527f215b58e9ff0 |
class Layout: <NEW_LINE> <INDENT> def __init__(self, layoutText): <NEW_LINE> <INDENT> rewards = [int(i) for i in layoutText[0].split()] <NEW_LINE> self.wall_punishment = rewards[0] <NEW_LINE> assert self.wall_punishment < 0, 'wall punishment must be negative' <NEW_LINE> self.outRange_punishment = rewards[1] <NEW_LINE> ... | A Layout manages the static information about the game board. | 62598fb7ff9c53063f51a769 |
class EncoderLayer(tf.keras.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, config, name="encoder_layer"): <NEW_LINE> <INDENT> super().__init__(name=name) <NEW_LINE> self.self_attention = MultiHeadAttention(config) <NEW_LINE> self.norm1 = tf.keras.layers.LayerNormalization(epsilon=config["layernorm_epsilon"]) <NE... | Encoder Layer Class | 62598fb744b2445a339b6a01 |
class TemporaryDirectory(object): <NEW_LINE> <INDENT> def __init__(self, suffix="", prefix=None, dir=None): <NEW_LINE> <INDENT> if "RAM_DISK" in os.environ: <NEW_LINE> <INDENT> import uuid <NEW_LINE> name = uuid.uuid4().hex <NEW_LINE> dir_name = os.path.join(os.environ["RAM_DISK"].strip(), name) <NEW_LINE> os.mkdir(dir... | Create and return a temporary directory. This has the same
behavior as mkdtemp but can be used as a context manager. For
example:
with TemporaryDirectory() as tmpdir:
...
Upon exiting the context, the directory and everything contained
in it are removed. | 62598fb799fddb7c1ca62e79 |
class GNNOGBPredictor(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_edge_feats, num_node_types=1, hidden_feats=300, n_layers=5, n_tasks=1, batchnorm=True, activation=F.relu, dropout=0., gnn_type='gcn', virtual_node=True, residual=False, jk=False, readout='mean'): <NEW_LINE> <INDENT> super(GNNOGBPredictor, self)... | Variant of GCN/GIN from `Open Graph Benchmark: Datasets for Machine Learning on Graphs
<https://arxiv.org/abs/2005.00687>`__ for graph property prediction
Parameters
----------
in_edge_feats : int
Number of input edge features.
num_node_types : int
Number of node types to embed. (Default: 1)
hidden_feats : int... | 62598fb767a9b606de5460ec |
class RafflePrizeTests(TransactionTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> test_utils.set_competition_round() <NEW_LINE> self.user = User.objects.create_user("user", "user@test.com", password="changeme") <NEW_LINE> image_path = os.path.join(settings.PROJECT_ROOT, "fixtures", "test_images", "t... | Tests the RafflePrize model. | 62598fb7adb09d7d5dc0a6a8 |
class InvalidField(BadRequest): <NEW_LINE> <INDENT> def __init__(self, errors: Any, *args: Any) -> None: <NEW_LINE> <INDENT> self.errors = errors <NEW_LINE> super().__init__(http.HTTPStatus.UNPROCESSABLE_ENTITY, *args) | A field in the request is invalid.
Represented by a 422 HTTP Response. Details of what fields were
invalid are stored in the errors attribute. | 62598fb799cbb53fe6830ff2 |
class NBytesSummary(RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> out = defaultdict(lambda: 0) <NEW_LINE> for k, v in self.server.data.items(): <NEW_LINE> <INDENT> out[key_split(k)] += sizeof(v) <NEW_LINE> <DEDENT> self.write(dict(out)) | Basic info about the worker | 62598fb756ac1b37e6302307 |
class Flatten(nn.Module): <NEW_LINE> <INDENT> def forward(self, input): <NEW_LINE> <INDENT> return input.view(input.size(0), -1) | Utility class for PyTorch models, please add this in place of any flattening you use in your model for use with LRP | 62598fb7442bda511e95c576 |
class BiosVfCbsCmnCpuSmee(ManagedObject): <NEW_LINE> <INDENT> consts = BiosVfCbsCmnCpuSmeeConsts() <NEW_LINE> naming_props = set([]) <NEW_LINE> mo_meta = { "classic": MoMeta("BiosVfCbsCmnCpuSmee", "biosVfCbsCmnCpuSmee", "cpu-smee", VersionMeta.Version421a, "InputOutput", 0x1f, [], ["admin"], ['biosPlatformDefaults', 'b... | This is BiosVfCbsCmnCpuSmee class. | 62598fb701c39578d7f12e96 |
class DomainExists(DnsMetricsNotificationBase): <NEW_LINE> <INDENT> event_types = ['%s.domain.exists' % SERVICE] <NEW_LINE> def process_notification(self, message): <NEW_LINE> <INDENT> period_start = timeutils.normalize_time(timeutils.parse_isotime( message['payload']['audit_period_beginning'])) <NEW_LINE> period_end =... | Handles DNS domain exists notification.
Emits a sample for a measurable audit interval. | 62598fb7627d3e7fe0e06fcc |
class GroupOptions_widget(OptionsWidget): <NEW_LINE> <INDENT> def __init__(self, groups, ui_js = bootstrap_select_min_js, ui_css = bootstrap_select_min_css): <NEW_LINE> <INDENT> if not ui_js in response.files: <NEW_LINE> <INDENT> response.files.append(ui_js) <NEW_LINE> <DEDENT> if not ui_css in response.files: <NEW_LIN... | An GroupOptions using BootStrap | 62598fb7cc40096d6161a267 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.