code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class DataWriterHDF5Ext(DataWriter, ModuleDataWriterHDF5Ext): <NEW_LINE> <INDENT> import pyre.inventory <NEW_LINE> filename = pyre.inventory.str("filename", default="output.h5") <NEW_LINE> filename.meta['tip'] = "Name of HDF5 file." <NEW_LINE> def __init__(self, name="datawriterhdf5"): <NEW_LINE> <INDENT> DataWriter.__... | @brief Python object for writing finite-element data to HDF5 file
with datasets stored in external binary files.
Inventory
Properties
@li filename Name of HDF5 file.
Facilities
@li None | 62598eee32920d7e50bc47c4 |
class Layout(Component): <NEW_LINE> <INDENT> @_explicitize_args <NEW_LINE> def __init__(self, children=None, banner=Component.UNDEFINED, basepath=Component.UNDEFINED, **kwargs): <NEW_LINE> <INDENT> self._prop_names = ['children', 'banner', 'basepath'] <NEW_LINE> self._type = 'Layout' <NEW_LINE> self._namespace = 'webvi... | A Layout component.
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional): The content of the layout. Ideally a list of pages or a single page
- banner (optional): The banner is optional and is only the front page.
If you wish to have a banner provide dict containing a col... | 62598eee38b623060ffa7835 |
class link(object): <NEW_LINE> <INDENT> updating = False <NEW_LINE> def __init__(self, source, target): <NEW_LINE> <INDENT> _validate_link(source, target) <NEW_LINE> self.source, self.target = source, target <NEW_LINE> try: <NEW_LINE> <INDENT> setattr(target[0], target[1], getattr(source[0], source[1])) <NEW_LINE> <DED... | Link traits from different objects together so they remain in sync.
Parameters
----------
source : (object / attribute name) pair
target : (object / attribute name) pair
Examples
--------
>>> c = link((src, 'value'), (tgt, 'value'))
>>> src.value = 5 # updates other objects as well | 62598eee4c34283577618a7d |
class ReportedCases(models.Model): <NEW_LINE> <INDENT> case_id = models.CharField(max_length=30) <NEW_LINE> case_user = models.CharField(max_length=15) <NEW_LINE> case_date = models.DateTimeField <NEW_LINE> case_vector = models.CharField(max_length=10) <NEW_LINE> case_vec_num = models.PositiveSmallIntegerField <NEW_LIN... | Model representing reported cases | 62598eeecc0a2c111447979e |
class Downloader(object): <NEW_LINE> <INDENT> def get(self, url, **kwargs): <NEW_LINE> <INDENT> return "I'm a useless downloader :_" | Base downloader object | 62598eee56ac1b37e6300984 |
class Conv3dLayer(Layer): <NEW_LINE> <INDENT> def __init__( self, layer = None, act = tf.identity, shape = [2, 2, 2, 64, 128], strides=[1, 2, 2, 2, 1], padding='SAME', W_init = tf.truncated_normal_initializer(stddev=0.02), b_init = tf.constant_initializer(value=0.0), W_init_args = {}, b_init_args = {}, name ='cnn3d_lay... | The :class:`Conv3dLayer` class is a 3D CNN layer, see `tf.nn.conv3d <https://www.tensorflow.org/versions/master/api_docs/python/nn.html#conv3d>`_.
Parameters
----------
layer : a :class:`Layer` instance
The `Layer` class feeding into this layer.
act : activation function
The function that is applied to the lay... | 62598eeea8370b77170eeb7d |
class WFG4(WFGBaseProblem): <NEW_LINE> <INDENT> def __init__(self, num_objectives, num_variables, k, **kwargs): <NEW_LINE> <INDENT> WFGBaseProblem.__init__(self, self.objective_function, num_objectives, num_variables, k, **kwargs) <NEW_LINE> assert k % (num_objectives - 1) == 0 <NEW_LINE> self.shape = self.WFG4Shape() ... | The WFG4 problem. | 62598eee4527f215b58e8697 |
class VectorTable: <NEW_LINE> <INDENT> def __init__(self, dimensions, seed=None, logTableSize=None): <NEW_LINE> <INDENT> if not logTableSize: <NEW_LINE> <INDENT> logTableSize = 10 <NEW_LINE> <DEDENT> self.size = 1 << logTableSize <NEW_LINE> self.dimensions = dimensions <NEW_LINE> self.table = randomVectors((self.size, ... | A table of random unit vectors generated from a seed.
A seed of None uses the current system time.
The size is specified as the base 2 logarithm of the actual size, since
it must be a power of two. This is to avoid division in the get() function
when it's necessary to constrain the input vector hash to the table size... | 62598eee379a373c97d9778f |
class CLICommand(object): <NEW_LINE> <INDENT> def __call__(self, args, parsed_globals): <NEW_LINE> <INDENT> pass | Interface for a CLI command.
This class represents a top level CLI command
(``aws ec2``, ``aws s3``, ``aws config``). | 62598eee23849d37ff84f851 |
class PinTransactionAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ( 'date', 'processed', 'succeeded', 'environment', 'amount', 'currency', 'email_address', 'pin_response', 'ip_address', 'transaction_token', ) <NEW_LINE> search_fields = ( 'email_address', 'ip_address', 'card_token', 'transaction_token', ) ... | Inspect transactions from here | 62598eee26068e7796d4b0f5 |
class SerialCommunication(): <NEW_LINE> <INDENT> def __init__(self, serial_port, delay=1): <NEW_LINE> <INDENT> self.serial_port = serial_port <NEW_LINE> self.delay = delay <NEW_LINE> <DEDENT> def start_serial(self): <NEW_LINE> <INDENT> ser = serial.Serial(self.serial_port[0], self.serial_port[1], timeout=None) <NEW_LIN... | Class for handling serial communication | 62598eee57b8e32f525074d0 |
class PageMainPane (MainPane): <NEW_LINE> <INDENT> def _createPanel (self): <NEW_LINE> <INDENT> return CurrentPagePanel(self.parent, -1) <NEW_LINE> <DEDENT> def _createConfig (self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @property <NEW_LINE> def caption (self): <NEW_LINE> <INDENT> return _(u"Note") <NEW_L... | Класс для работы с панелью с контентом страницы | 62598eee16aa5153ce3fec98 |
class Store(IRStmt): <NEW_LINE> <INDENT> __slots__ = ['addr', 'data', 'end'] <NEW_LINE> tag = 'Ist_Store' <NEW_LINE> def __init__(self, addr, data, end): <NEW_LINE> <INDENT> self.addr = addr <NEW_LINE> self.data = data <NEW_LINE> self.end = end <NEW_LINE> <DEDENT> @property <NEW_LINE> def endness(self): <NEW_LINE> <IND... | Write a value to memory.. | 62598eeea17c0f6771d5a9ed |
class Interval: <NEW_LINE> <INDENT> def __init__(self, start: int, stop: int): <NEW_LINE> <INDENT> if start < 0: <NEW_LINE> <INDENT> raise PulseError("Cannot create Interval with negative starting value") <NEW_LINE> <DEDENT> if stop < 0: <NEW_LINE> <INDENT> raise PulseError("Cannot create Interval with negative stoppin... | Time interval. | 62598eeee1aae11d1e7cdc0c |
class OwnMaterial(AMaterial): <NEW_LINE> <INDENT> def __init__(self, name, price, density, f): <NEW_LINE> <INDENT> super(OwnMaterial, self,).__init__(name, float(price), float(density), f) | database for ownmaterials. the values must given the
constructor. the own-material get a random-color | 62598eeed268445f26638f5b |
class UserAuthType(Enum): <NEW_LINE> <INDENT> FILE = 'file' <NEW_LINE> LDAP_CONNECT = 'ldap_connect' <NEW_LINE> RADIUS_CONNECT = 'radius_connect' <NEW_LINE> @classmethod <NEW_LINE> def from_string( cls, user_auth_type: Optional[str], ) -> Optional["UserAuthType"]: <NEW_LINE> <INDENT> if not user_auth_type: <NEW_LINE> <... | Enum for Sources allowed for authentication for the user | 62598eee63b5f9789fe838f7 |
class BaseDataset_CLS(Dataset, metaclass=ABCMeta): <NEW_LINE> <INDENT> CLASSES = None <NEW_LINE> def __init__(self, data_prefix, pipeline, ann_file, is_train=True): <NEW_LINE> <INDENT> super(BaseDataset_CLS, self).__init__() <NEW_LINE> self.data_prefix = data_prefix <NEW_LINE> self.transform = transforms.Compose(pipeli... | Base dataset for classification task
Args:
data_prefix (str): the prefix of data path
pipeline (list): a list of transform
Example:
>>> pipeline = [
>>> transforms.RandomCrop(224, padding=4),
>>> transforms.R... | 62598eee5166f23b2e241b73 |
class VIEW3D_OT_cursor_to_origin(Operator): <NEW_LINE> <INDENT> bl_idname = "view3d.cursor_to_origin" <NEW_LINE> bl_label = "Move to world origin" <NEW_LINE> bl_options = {'REGISTER'} <NEW_LINE> def modal(self, context, event): <NEW_LINE> <INDENT> return {'FINISHED'} <NEW_LINE> <DEDENT> def execute(self, context): <NEW... | Move to world origin | 62598eeed486a94d0ba2a767 |
class SG(Net): <NEW_LINE> <INDENT> def hybrid_forward(self, F, center, context, center_words): <NEW_LINE> <INDENT> negatives = [] <NEW_LINE> mask = [] <NEW_LINE> for _ in range(self._kwargs['num_negatives']): <NEW_LINE> <INDENT> negatives.append(self.negatives_sampler(center_words)) <NEW_LINE> mask_ = negatives[-1] != ... | SkipGram network | 62598eee851cf427c66b6a64 |
class CreateUserFormWithVestingOrg(CreateUserForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> registrar_id = False <NEW_LINE> if 'registrar_id' in kwargs: <NEW_LINE> <INDENT> registrar_id = kwargs.pop('registrar_id') <NEW_LINE> <DEDENT> super(CreateUserFormWithVestingOrg, self).__init... | stripped down user reg form
This is mostly a django.contrib.auth.forms.UserCreationForm | 62598eee01c39578d7f1153e |
class GetBlocksMsg(NamedTuple): <NEW_LINE> <INDENT> from_blockid: str <NEW_LINE> CHUNK_SIZE = 50 <NEW_LINE> def handle(self, sock, peer_hostname): <NEW_LINE> <INDENT> logger.debug(f"[p2p] recv getblocks from {peer_hostname}") <NEW_LINE> _, height, _ = locate_block(self.from_blockid, active_chain) <NEW_LINE> height = he... | See https://bitcoin.org/en/developer-guide#blocks-first | 62598eee21bff66bcd7213ef |
class ArcanumLevel(Enum): <NEW_LINE> <INDENT> ZERO = 0 <NEW_LINE> MILD = 1 <NEW_LINE> MODERATE = 2 <NEW_LINE> SEVERE = 3 <NEW_LINE> COMPLETE = 4 | An enumeration of levels of area's arcanum corruption. | 62598eeebe7bc26dc925122f |
class ResourceItem(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'Link': 'Link', 'Uid': 'int', 'Id': 'int', 'Name': 'str' } <NEW_LINE> self.attributeMap = { 'Link': 'Link','Uid': 'Uid','Id': 'Id','Name': 'Name'} <NEW_LINE> self.Link = None <NEW_LINE> self.Uid = None <NEW_LIN... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598eee60cbc95b06362ad9 |
class CustomRadioFieldRenderer(RadioFieldRenderer): <NEW_LINE> <INDENT> def render(self): <NEW_LINE> <INDENT> row_list = [] <NEW_LINE> for w in self: <NEW_LINE> <INDENT> cat = Category.objects.filter(name=w.choice_label)[0] <NEW_LINE> row_attrs = {'class': 'box col %s' % cat.slug} <NEW_LINE> row_list.append(u'<li %s>%s... | Mainly duplicated from django.forms.widgets
Adds extra attributes to the markup | 62598eee7d43ff24874267c9 |
class NetworkSecurityGroup(Resource): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, 'default_security_rules': {'readonly': True}, 'network_interfaces': {'readonly': True}, 'subnets': {'readonly': True}, 'flow_logs': {'readonly': True}, 'resource_... | NetworkSecurityGroup resource.
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
:param tags: ... | 62598eee283ffb24f3cf204b |
class TrainingSetViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = TrainingSetSerializer <NEW_LINE> http_method_names = ["get"] <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> if getattr(self, "swagger_fake_view", False): <NEW_LINE> <INDENT> return TrainingSet.objects.none() <NEW_LINE> <DEDE... | Defines a view set for the TrainingSet module.
Inherits from `viewsets.ModelViewSet` and defines queryset
and serializers. | 62598eee3317a56b869bd933 |
@provider(IFormFieldProvider) <NEW_LINE> class IEmptyRichTextBehavior(model.Schema): <NEW_LINE> <INDENT> dexteritytextindexer.searchable('foo') <NEW_LINE> foo = schema.TextLine(title=u'Foo') <NEW_LINE> dexteritytextindexer.searchable('empty_richtext_field') <NEW_LINE> empty_richtext_field = RichText( title=u'Body text'... | Behavior with a rich-text field without a default value.
| 62598eee7b25080760ed5c35 |
class Animated(object): <NEW_LINE> <INDENT> def __init__(self, animateMe=True): <NEW_LINE> <INDENT> if Preferences: <NEW_LINE> <INDENT> self.__animateMe = animateMe <NEW_LINE> self.prevAnimationSpeed = Preferences.animationSpeed <NEW_LINE> if not animateMe: <NEW_LINE> <INDENT> Preferences.animationSpeed = 99 <NEW_LINE>... | a helper class for moving tiles with or without animation | 62598eeeaad79263cf42cfa7 |
class XapianTextIndexer(object): <NEW_LINE> <INDENT> def __init__(self, fieldname, params): <NEW_LINE> <INDENT> self.fieldname = fieldname <NEW_LINE> self.tg = xapian.TermGenerator() <NEW_LINE> self.store = bool(params.get('store', True)) <NEW_LINE> self.prefix = str(params.get('prefix', '')) <NEW_LINE> self.weight = i... | Indexer for a text field.
Accepts the following parameters:
- store: boolean. If True, store the field values in the document data.
- prefix: string. The prefix to insert before terms. Should follow
Xapian conventions (ie, be composed of upper case ascii characters, and
start with X if more than one charac... | 62598eee92d797404e387f48 |
class Adapter(object): <NEW_LINE> <INDENT> def __init__(self, chatbot, **kwargs): <NEW_LINE> <INDENT> self.chatbot = chatbot <NEW_LINE> <DEDENT> class AdapterMethodNotImplementedError(NotImplementedError): <NEW_LINE> <INDENT> def __init__(self, message='This method must be overridden in a subclass method.'): <NEW_LINE>... | A superclass for all adapter classes.
:param chatbot: A ChatBot instance. | 62598eee442bda511e95abfd |
class UserSettingsForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = UserSettings <NEW_LINE> fields = ['font_size', 'color_scheme'] | User settings form | 62598eee44b2445a339b5d38 |
class VpnDeviceScriptParameters(Model): <NEW_LINE> <INDENT> _attribute_map = { 'vendor': {'key': 'vendor', 'type': 'str'}, 'device_family': {'key': 'deviceFamily', 'type': 'str'}, 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(VpnDevic... | Vpn device configuration script generation parameters.
:param vendor: The vendor for the vpn device.
:type vendor: str
:param device_family: The device family for the vpn device.
:type device_family: str
:param firmware_version: The firmware version for the vpn device.
:type firmware_version: str | 62598eeef9cc0f698b1c469c |
class Command(BaseCommand): <NEW_LINE> <INDENT> args = '[name] [optional destination directory]' <NEW_LINE> help = "Create wcmb consumer project" <NEW_LINE> if LEGACY_MODE: <NEW_LINE> <INDENT> from optparse import make_option <NEW_LINE> option_list = BaseCommand.option_list + ( ) <NEW_LINE> <DEDENT> def add_arguments(s... | If Django version <1.8, it use option_list to add additional options
If Django version >=1.8, it use add_parse() function to add additional options | 62598eee91f36d47f2230271 |
class MongoShellContext(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.db_address = None <NEW_LINE> self.global_context = {} | The context for a mongo shell execution.
Tests using the shell can only have APIs provided by injecting them into the shell when it
starts - generally as global variables.
Shell options and global variables are specified using this structure. | 62598eeef548e778e5969d26 |
class Actor(nn.Module): <NEW_LINE> <INDENT> def __init__(self, state_size, action_size, seed, fc1_units=96, fc2_units=96): <NEW_LINE> <INDENT> super(Actor, self).__init__() <NEW_LINE> self.seed = torch.manual_seed(seed) <NEW_LINE> self.fc1 = nn.Linear(state_size, fc1_units) <NEW_LINE> self.fc2 = nn.Linear(fc1_units, fc... | Actor (Policy) Model. | 62598eeea17c0f6771d5a9ef |
class ProtectedFileField(BaseFileField): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs.update({ 'storage': protected_storage, }) <NEW_LINE> return super(ProtectedFileField, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def deconstruct(self): <NEW_LINE> <INDENT> name, path, ar... | Store files in a private dir. | 62598eee167d2b6e312b5734 |
class CompExprNode(ExprNode): <NEW_LINE> <INDENT> def __init__(self, A, B, comp_type, clone=None): <NEW_LINE> <INDENT> super().__init__(clone) <NEW_LINE> self.comp_type = comp_type <NEW_LINE> self.nodes = { 'A': A, 'B': B } <NEW_LINE> <DEDENT> def clone(self): <NEW_LINE> <INDENT> node_clone = CompExprNode(self.nodes['... | TIR Addition Expression Node
exression A, B : A ? B, comp_type : 0(==), 1(!=), 2(>), 3(<) | 62598eee67a9b606de54476a |
class SectionFeed(DigestFeed): <NEW_LINE> <INDENT> section = 'all' <NEW_LINE> def items(self): <NEW_LINE> <INDENT> section = Section.objects.filter(title=self.section) <NEW_LINE> if self.section == 'all' or len(section) != 1: <NEW_LINE> <INDENT> result = Item.objects.filter(status='active', activated_at__lte=datetime.d... | Лента с категориями новостей. | 62598eee097d151d1a2bf7b9 |
class Batch(BatchQuery): <NEW_LINE> <INDENT> def __init__(self, batch_type=None, timestamp=None, batch_size=100, atomic_inserts=False): <NEW_LINE> <INDENT> self.batch_inserts = defaultdict(list) <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.atomic_inserts = False <NEW_LINE> super(Batch, self).__init__(batch_t... | Batch class which inherits from cqlengine.BatchQuery and adds speed ups
for inserts | 62598eeeb7558d5895461de2 |
class Factory: <NEW_LINE> <INDENT> def produce_fries(self, flavor): <NEW_LINE> <INDENT> if flavor == 'nosalt': <NEW_LINE> <INDENT> return NoSalt("no salt") <NEW_LINE> <DEDENT> if flavor == 'original': <NEW_LINE> <INDENT> return Default("default") | where to make fries | 62598eee5fdd1c0f98e5c73d |
class Platform(object): <NEW_LINE> <INDENT> platform_name = None <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> <DEDENT> def get_image(self, img_conf): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def destroy(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DE... | Base class for platforms | 62598eeebaa26c4b54d4da69 |
@ddt.ddt <NEW_LINE> class XBlockGetParentTest(LmsXBlockMixinTestCase): <NEW_LINE> <INDENT> MODULESTORE = TEST_DATA_MIXED_TOY_MODULESTORE <NEW_LINE> @ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.xml) <NEW_LINE> def test_parents(self, modulestore_type): <NEW_LINE> <INDENT> with se... | Test that XBlock.get_parent returns correct results with each modulestore
backend. | 62598eee7047854f4633db6f |
class Scaling(nn.Module): <NEW_LINE> <INDENT> def __init__(self, dim): <NEW_LINE> <INDENT> super(Scaling, self).__init__() <NEW_LINE> self.scale = nn.Parameter( torch.zeros((1, dim)), requires_grad=True) <NEW_LINE> self.eps = 1e-5 <NEW_LINE> <DEDENT> def forward(self, x, reverse=False): <NEW_LINE> <INDENT> log_det_J = ... | Log-scaling layer. | 62598eeed7e4931a7ef3a83c |
class VIEW3D_OT_edit_mesh_extrude_move(Operator): <NEW_LINE> <INDENT> bl_label = "Extrude and Move on Normals" <NEW_LINE> bl_idname = "view3d.edit_mesh_extrude_move_normal" <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> workspace = context.workspace <NEW_LINE> obj = context.active_object... | Extrude and move along normals | 62598eee090684286d592ab0 |
class feBlend(feComponentTransfer): <NEW_LINE> <INDENT> def __init__(self, in2=None, mode=None, **kwargs): <NEW_LINE> <INDENT> BaseElement.__init__(self, 'feBlend') <NEW_LINE> self.set_in2(in2) <NEW_LINE> self.set_mode(mode) <NEW_LINE> self.setKWARGS(**kwargs) <NEW_LINE> <DEDENT> def set_in2(self, in2): <NEW_LINE> <IND... | Class representing the feBlend element of an svg doc. | 62598eeebe7bc26dc9251230 |
class AuthenticationError(Exception): <NEW_LINE> <INDENT> pass | Authentication failed | 62598eeef548e778e5969d27 |
class TestCalcClimatologyYear(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.lat = np.array([10, 12, 14, 16, 18]) <NEW_LINE> self.lon = np.array([100, 102, 104, 106, 108]) <NEW_LINE> self.time = np.array([datetime.datetime(2000, 1, 1) + relativedelta(months = x) for x in range(24)]) <... | Testing function 'calc_climatology_year' from ocw.utils.py | 62598eee32920d7e50bc47c9 |
class LiteratureMapperDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = LiteratureMapperDialog(None) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.dialog = None <NEW_LINE> <DEDENT> def test_dialog_ok(self): <NEW_LINE> <INDENT> button = self.dialog.b... | Test dialog works. | 62598eee2c8b7c6e89bd1f5e |
class FunctionCall(collections.namedtuple( 'FunctionCall', ['func', 'args', 'type']), Expression): <NEW_LINE> <INDENT> pass | Expression representing a call to a built-in function.
Fields:
func: A runtime.Function for the function to call.
args: A list of expressions to pass in as the function's arguments.
type: The result type of the expression. | 62598eeeeab8aa0e5d30a519 |
class CascadeModelFormMixin(EntangledModelFormMixin): <NEW_LINE> <INDENT> def _clean_form(self): <NEW_LINE> <INDENT> internal_fields = ['cascade_element', 'id', DELETION_FIELD_NAME] <NEW_LINE> internal_cleaned_data = {key: val for key, val in self.cleaned_data.items() if key in internal_fields} <NEW_LINE> super()._clea... | Classes inheriting from InlineAdmin and defining their own `form` shall use this special
variant of an `EntangledModelForm`, otherwise deletion of inlined elements does not work. | 62598eee460517430c430c25 |
class PerfZeroBenchmark(tf.test.Benchmark): <NEW_LINE> <INDENT> local_flags = None <NEW_LINE> def __init__(self, output_dir=None): <NEW_LINE> <INDENT> if os.getenv('BENCHMARK_OUTPUT_DIR'): <NEW_LINE> <INDENT> self.output_dir = os.getenv('BENCHMARK_OUTPUT_DIR') <NEW_LINE> <DEDENT> elif output_dir: <NEW_LINE> <INDENT> se... | Common methods used in PerfZero Benchmarks.
Handles the resetting of flags between tests. PerfZero (OSS) runs each test
in a separate process reducing some need to reset the flags. | 62598eee92d797404e387f49 |
class Qdisc(Tc): <NEW_LINE> <INDENT> def __init__(self, obj=None): <NEW_LINE> <INDENT> netlink.Object.__init__(self, 'route/qdisc', 'qdisc', obj) <NEW_LINE> self._module_path = 'netlink.route.qdisc.' <NEW_LINE> self._rtnl_qdisc = self._obj2type(self._nl_object) <NEW_LINE> self._rtnl_tc = capi.obj2tc(self._nl_object) <N... | Queueing discipline | 62598eee442bda511e95abff |
class _BackingOffContextWrapper(_ContextWrapper): <NEW_LINE> <INDENT> _METHOD_TIMEOUTS = _get_default_method_timeouts() <NEW_LINE> _max_timeout = None <NEW_LINE> @classmethod <NEW_LINE> def reset_timeouts(cls): <NEW_LINE> <INDENT> cls._METHOD_TIMEOUTS = _get_default_method_timeouts() <NEW_LINE> cls._max_timeout = None ... | Wraps oslo messaging contexts to set the timeout for calls.
This intercepts RPC calls and sets the timeout value to the globally
adapting value for each method. An oslo messaging timeout results in
a doubling of the timeout value for the method on which it timed out.
There currently is no logic to reduce the timeout s... | 62598eeee5267d203ee6a0a4 |
class RectilinearGrid(DataSet): <NEW_LINE> <INDENT> def __init__(self, grid): <NEW_LINE> <INDENT> if len(grid) != 3: <NEW_LINE> <INDENT> raise ValueError('Grid must have three axes') <NEW_LINE> <DEDENT> self.grid = grid <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_field(cls, field): <NEW_LINE> <INDENT> return c... | Class to represent a vtkRectilinearGrid | 62598eee71ff763f4b5e5efb |
class ShiftToMult(ast.NodeTransformer): <NEW_LINE> <INDENT> def visit_BinOp(self, node): <NEW_LINE> <INDENT> if not isinstance(node.op, ast.LShift): <NEW_LINE> <INDENT> return self.generic_visit(node) <NEW_LINE> <DEDENT> if isinstance(node.right, ast.Num): <NEW_LINE> <INDENT> self.generic_visit(node) <NEW_LINE> return ... | Transform all left shifts of a constant in multiplications. | 62598eee30bbd722464683d2 |
class Git: <NEW_LINE> <INDENT> def __init__(self, repo=None): <NEW_LINE> <INDENT> if repo is None: <NEW_LINE> <INDENT> self.git_dir = None <NEW_LINE> self.git_cmd = GIT_CMD + [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> if os.path.exists(os.path.join(repo, '.git')): <NEW_LINE> <INDENT> self.git_dir = os.path.join(r... | A git repository | 62598eeecc40096d616195a7 |
class ReferenceEncoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> K = len(hparams.ref_enc_filters) <NEW_LINE> filters = [1] + hparams.ref_enc_filters <NEW_LINE> convs = [nn.Conv2d(in_channels=filters[i], out_channels=filters[i + 1], kernel_size=(3, 3), stride=(... | inputs --- [N, Ty/r, n_mels*r] mels
outputs --- [N, ref_enc_gru_size] | 62598eee67a9b606de54476c |
class VideoFields(object): <NEW_LINE> <INDENT> display_name = String( display_name="Display Name", help="This name appears in the horizontal navigation at the top of the page.", scope=Scope.settings, default="Video" ) <NEW_LINE> data = String( help="XML data for the problem", default='', scope=Scope.content ) <NEW_LINE... | Fields for `VideoModule` and `VideoDescriptor`. | 62598eeeb7558d5895461de4 |
class CustomBackend(ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, username=None, password=None, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = UserProfile.objects.get(Q(username=username)|Q(email=username)) <NEW_LINE> if user.check_password(password): <NEW_LINE> <INDENT> return user <NEW_LIN... | 继承ModelBackend类,使用这个类的authenticate方法验证
思路:并集查询数据库,找到查询结果后,验证用户密码,有异常,就返回none,没有异常,返回对象 | 62598eeed58c6744b42db684 |
class GearDeleteView(GearMixin, DeleteView): <NEW_LINE> <INDENT> template_name = 'gear/delete.html' | Delete a gear item from a user | 62598eee4428ac0f6e656ceb |
class TimeoutAlert(Alert): <NEW_LINE> <INDENT> def __init__(self, timeout=5, **kwargs): <NEW_LINE> <INDENT> Alert.__init__(self, **kwargs) <NEW_LINE> self._timeout = timeout <NEW_LINE> icon = Icon(icon_name='dialog-cancel') <NEW_LINE> self.add_button(Gtk.ResponseType.CANCEL, _('Cancel'), icon) <NEW_LINE> icon.show() <N... | This is a ready-made two button (Cancel,Continue) alert
It times out with a positive response after the given amount of seconds.
Examples
--------
.. code-block:: python
from sugar3.graphics.alert import TimeoutAlert
...
#### Method: _alert_timeout, create a Timeout alert (with ok and cancel
... | 62598eee5fdd1c0f98e5c73e |
class Base64ImageField(serializers.ImageField): <NEW_LINE> <INDENT> def to_internal_value(self, data): <NEW_LINE> <INDENT> from django.core.files.base import ContentFile <NEW_LINE> import base64 <NEW_LINE> import six <NEW_LINE> import uuid <NEW_LINE> if isinstance(data, six.string_types): <NEW_LINE> <INDENT> if 'data:'... | A Django REST framework field for handling image-uploads through raw post data.
It uses base64 for encoding and decoding the contents of the file.
Heavily based on
https://github.com/tomchristie/django-rest-framework/pull/1268
Updated for Django REST framework 3. | 62598eee1b99ca400228e8dc |
class CxOsaVulnerabilityComment(object): <NEW_LINE> <INDENT> def __init__(self, user_name, time_stamp, content): <NEW_LINE> <INDENT> self.user_name = user_name <NEW_LINE> self.time_stamp = time_stamp <NEW_LINE> self.content = content <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return """CxOsaVulnerabilit... | vulnerability comment | 62598eeefff4ab517ebcbf75 |
@pytest.mark.usefixtures("base_fixture") <NEW_LINE> class TestContentsTypesEndpoint(object): <NEW_LINE> <INDENT> def test_api__get_content_types__ok_200__nominal_case( self, web_testapp, content_type_list, app_config ): <NEW_LINE> <INDENT> web_testapp.authorization = ("Basic", ("admin@admin.admin", "admin@admin.admin")... | Tests for /api/system/content_types | 62598eeebe7bc26dc9251231 |
class HasColorTemperature(object): <NEW_LINE> <INDENT> _capability_name = 'has_color_temp' <NEW_LINE> _commands = ('set_color_temp',) <NEW_LINE> @property <NEW_LINE> def color_temp(self) -> int: <NEW_LINE> <INDENT> raise NotImplementedError() | Color Temperature devices are devices that have the "color temperature"
property. The color temperature is expressed in Kelvins and can take integer
values from 1000 to 10000 including. The color temperature of light source
or other Actuator can be set with ``set_color_temp`` command.
If the Thing doesn't support spec... | 62598eee091ae356687033b6 |
class Team(models.Model): <NEW_LINE> <INDENT> competition = models.ForeignKey(Competition, related_name="teams", on_delete=models.CASCADE) <NEW_LINE> members = models.ManyToManyField(User, related_name="teams") <NEW_LINE> solved = models.ManyToManyField(Problem, blank=True, related_name="solvers") <NEW_LINE> name = mod... | A team registered with the CTF.
Teams track unique identity as well as progression throughout the
current competition. Teams do contain have a defined reference to
team member profile models; these can be accessed instead by
reverse calls to the members attribute. | 62598eeef548e778e5969d29 |
class Jos_CBFields(get_declarative_base()): <NEW_LINE> <INDENT> __tablename__ = "jos_comprofiler" <NEW_LINE> user_id = Column(Integer, ForeignKey("jos_users.id"), primary_key=True) <NEW_LINE> lastupdatedate = Column(DateTime, onupdate=datetime.now) <NEW_LINE> cb_streetaddress = Column(String(255)) <NEW_LINE> cb_postalc... | User fields used in the Community Builder Joomla module. | 62598eeecb5e8a47e493b548 |
class NGramExtractor(core, BaseTransform, TransformerMixin): <NEW_LINE> <INDENT> @trace <NEW_LINE> def __init__( self, ngram_length=2, all_lengths=True, skip_length=0, max_num_terms=[10000000], weighting='Tf', columns=None, **params): <NEW_LINE> <INDENT> if columns: <NEW_LINE> <INDENT> params['columns'] = columns <NEW_... | **Description**
Produces a bag of counts of n-grams (sequences of consecutive values of length 1-n) in a given vector of keys. It does so by building a dictionary of n-grams and using the id in the dictionary as the index in the bag.
:param columns: see `Columns </nimbusml/concepts/columns>`_.
:param ngram_length... | 62598eeebd1bec0571e14499 |
class UdpSocketServer(EventHandler): <NEW_LINE> <INDENT> def __init__(self, port, ip="0.0.0.0", maxconn=1000, process=None, **kwargs): <NEW_LINE> <INDENT> self.server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) <NEW_LINE> self.server.bind((ip, port)) <NEW_LINE> logger.info(f"[USS] Server Listening: {ip}:{port}")... | process: a callback function
| 62598eee379a373c97d97795 |
class _BoundMethodProxy: <NEW_LINE> <INDENT> def __init__(self, cb): <NEW_LINE> <INDENT> self._hash = hash(cb) <NEW_LINE> self._destroy_callbacks = [] <NEW_LINE> try: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.inst = ref(cb.__self__, self._destroy) <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> self.i... | Our own proxy object which enables weak references to bound and unbound
methods and arbitrary callables. Pulls information about the function,
class, and instance out of a bound method. Stores a weak reference to the
instance to support garbage collection.
@organization: IBM Corporation
@copyright: Copyright (c) 2005, ... | 62598eeed58c6744b42db685 |
class WMExceptionTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> logging.basicConfig(level=logging.NOTSET, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='%s.log' % __file__, filemode='w') <NEW_LINE> self.logger = logging.getLogger('WMExce... | A test of a generic exception class | 62598eee5166f23b2e241b79 |
class TestBaseNeoContainerTypes(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.base = BaseNeo() <NEW_LINE> <DEDENT> def test_python_list(self): <NEW_LINE> <INDENT> value = [None, 10, 9.2, complex(23, 11), ['this is a test', bytes('1,2,3,4,5')], [Fraction(13, 21), Decimal("3.14")]] <NE... | TestCase to make sure annotations are properly checked for data type
inside python built-in container types | 62598eeefff4ab517ebcbf77 |
class Dataframable: <NEW_LINE> <INDENT> @property <NEW_LINE> @abc.abstractmethod <NEW_LINE> def dataframe(self) -> pandas.DataFrame: <NEW_LINE> <INDENT> return pandas.DataFrame() | This mixin class naively converts a child class to a :class:`pandas.Dataframe`. | 62598eeedc8b845886d51d64 |
class SH2Signal(nn.Module): <NEW_LINE> <INDENT> def __init__(self, sh_order, gradients): <NEW_LINE> <INDENT> super(SH2Signal, self).__init__() <NEW_LINE> self.sh_order = sh_order <NEW_LINE> self.num_gradients = gradients.shape[0] <NEW_LINE> self.num_coefficients = int((self.sh_order + 1) * (self.sh_order / 2 + 1)) <NEW... | SH2Signal(dwi_sh) -> dwi
Computes the corresponding dwi signal for each gradient
Args:
x_in (5D tensor): input spherical harmonic tensor
x_in.size(): (Batchsize x Number of shells*Number of coefficients x DimX x DimY x DimZ)
y (5D tensor): corresponding dwi tensor
y.size(): (Batchsize x Number of shel... | 62598eee7047854f4633db73 |
class NYCDOTBulkOrder(models.Model): <NEW_LINE> <INDENT> communityboard = models.ForeignKey(CommunityBoard) <NEW_LINE> user = models.ForeignKey(User) <NEW_LINE> date = models.DateTimeField(auto_now=True) <NEW_LINE> organization = models.CharField(max_length=128, blank=False, null=True) <NEW_LINE> rationale = models.Tex... | bulk orders for NYC bike racks | 62598eee2c8b7c6e89bd1f61 |
class Interval(Component): <NEW_LINE> <INDENT> @_explicitize_args <NEW_LINE> def __init__(self, id=Component.UNDEFINED, interval=Component.UNDEFINED, disabled=Component.UNDEFINED, n_intervals=Component.UNDEFINED, max_intervals=Component.UNDEFINED, **kwargs): <NEW_LINE> <INDENT> self._prop_names = ['id', 'interval', 'di... | An Interval component.
A component that repeatedly increments a counter `n_intervals`
with a fixed time delay between each increment.
Interval is good for triggering a component on a recurring basis.
The time delay is set with the property "interval" in milliseconds.
Keyword arguments:
- id (string; optional): The ID ... | 62598eee851cf427c66b6a69 |
class DispatcherAspect(AbstractAspect): <NEW_LINE> <INDENT> def __init__(self, pointcut, rules): <NEW_LINE> <INDENT> AbstractAspect.__init__(self, pointcut) <NEW_LINE> self.rules = rules <NEW_LINE> <DEDENT> def around(self, wobj, context, *args, **kwargs): <NEW_LINE> <INDENT> met_name = context['method_name'] <NEW_LINE... | Dispatcher aspect allows use of multimethods in Python
| 62598eee851cf427c66b6a6a |
class MaskTransform(object): <NEW_LINE> <INDENT> def __call__(self, masks, pad_shape, scale_factor, flip=False): <NEW_LINE> <INDENT> masks = [ mmcv.imrescale(mask, scale_factor, interpolation='nearest') for mask in masks ] <NEW_LINE> if flip: <NEW_LINE> <INDENT> masks = [mask[:, ::-1] for mask in masks] <NEW_LINE> <DED... | Preprocess masks.
1. resize masks to expected size and stack to a single array
2. flip the masks (if needed)
3. pad the masks (if needed) | 62598eeeadb09d7d5dc08d69 |
class CppUTestClear(gdb.Command): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> gdb.Command.__init__(self, "cppu clear", gdb.COMMAND_USER, gdb.COMPLETE_NONE) <NEW_LINE> <DEDENT> def invoke(self, arg, from_tty): <NEW_LINE> <INDENT> breakpoints = gdb.execute('info breakpoints', False, True) <NEW_LINE> for l... | Clear breakpoints at the beginning of unit tests | 62598eee10dbd63aa1c6f317 |
class NotLoadedType(object): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return unicode(self).decode('utf-8') <NEW_LINE> <DEDENT> def __copy__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __deepcopy__(self, memo): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __unicode__(self)... | NotLoaded is a constant to use on not loaded fields.
When you use :func:`weboob.tools.backend.BaseBackend.fillobj` on a object based on :class:`CapBaseObject`,
it will request all fields with this value. | 62598eee44b2445a339b5d3b |
class MusicUrl(models.Model): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True) <NEW_LINE> musicId = models.IntegerField(unique=True) <NEW_LINE> url = models.URLField() <NEW_LINE> isPlay = models.BooleanField(max_length=1, choices=((0, 'False'), (1, 'True')), default=1) <NEW_LINE> def __str__(self): <NEW_LINE... | 歌曲Url | 62598eee92d797404e387f4b |
class TestGLS(unittest.TestCase): <NEW_LINE> <INDENT> def test_get_data_with_id(self): <NEW_LINE> <INDENT> expected_output = { "id": "1", "content": "tip on first div", "selector": "#id_1", "next": "2" } <NEW_LINE> res = get_data_with_id(1) <NEW_LINE> self.assertEqual(res, expected_output) <NEW_LINE> res = get_data_wit... | Our basic test class | 62598eeea8370b77170eeb85 |
class TaskInfo (object): <NEW_LINE> <INDENT> taskID = None <NEW_LINE> status = None <NEW_LINE> taskType = None <NEW_LINE> startTime = 0 <NEW_LINE> finishTime = 0 <NEW_LINE> attempts = {} <NEW_LINE> def __init__ (self, taskID): <NEW_LINE> <INDENT> self.taskID = taskID <NEW_LINE> self.attempts = {} <NEW_LINE> <DEDENT> de... | Information about job's task | 62598eeee5267d203ee6a0a8 |
class AgentMetadata: <NEW_LINE> <INDENT> def __init__(self, index: int, name: str, team: int, pids: set, helper_process_request: HelperProcessRequest = None): <NEW_LINE> <INDENT> self.index = index <NEW_LINE> self.name = name <NEW_LINE> self.team = team <NEW_LINE> self.pids = pids <NEW_LINE> self.helper_process_request... | This class is used for storing and passing around the information about a single agent.
TODO: Currently overlaps with the information that `BotManager` has. | 62598eee4a966d76dd5ed67c |
class TimeStampDBMixinTestCase(TimeStampChangedsinceTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TimeStampDBMixinTestCase, self).setUp() <NEW_LINE> <DEDENT> def _save_network(self, network_id): <NEW_LINE> <INDENT> ctx = context.get_admin_context() <NEW_LINE> with ctx.session.begin(subtransa... | Test timestamp_db.TimeStamp_db_mixin() | 62598eeee1aae11d1e7cdc10 |
class Decoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self, layer, N): <NEW_LINE> <INDENT> super(Decoder, self).__init__() <NEW_LINE> self.layers = encoder.clones(layer, N) <NEW_LINE> self.norm = encoder.LayerNorm(layer.size) <NEW_LINE> <DEDENT> def forward(self, x, memory, src_mask, tgt_mask): <NEW_LINE> <INDENT>... | Generic N layer decoder with masking. | 62598eeedd821e528d6d76e0 |
class UserInputError(NgraphError): <NEW_LINE> <INDENT> pass | User provided unexpected input. | 62598eeea17c0f6771d5a9f5 |
class Book(SAFRSBase, db.Model): <NEW_LINE> <INDENT> __tablename__ = 'Books' <NEW_LINE> id = Column(String, primary_key=True) <NEW_LINE> name = Column(String, default='') <NEW_LINE> user_id = Column(String, ForeignKey('Users.id')) <NEW_LINE> user = db.relationship('User', back_populates='books') | description: Book description | 62598eee23849d37ff84f85a |
class StoryChild(TimeStampedModel): <NEW_LINE> <INDENT> objects = ElementQuerySet.as_manager() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> ordering = ['index'] <NEW_LINE> <DEDENT> ordering = models.SmallIntegerField( default=0, blank=True, null=True, help_text=_('Internal order within placemen... | Models that are placed somewhere inside an article | 62598eee442bda511e95ac03 |
class cache(dict): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> self.__swap__ = null_archive() <NEW_LINE> self.__archive__ = kwds.pop('archive', null_archive()) <NEW_LINE> dict.__init__(self, *args, **kwds) <NEW_LINE> return <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> archi... | dictionary augmented with an archive backend | 62598eeeb7558d5895461de8 |
class ResnetXtBottleneck(nn.Module): <NEW_LINE> <INDENT> def __init__(self, inplanes, outplanes, stride=1, widen_factor=1, has_shortcut=False, cardinality=1, base_width=64): <NEW_LINE> <INDENT> super(ResnetXtBottleneck, self).__init__() <NEW_LINE> D = cardinality*base_width*(2**(widen_factor-1)) <NEW_LINE> self.conv1 =... | Resnet50 == ResnetXt50(1*64d)
conv2:
->[64], 56*56
nn.Sequential(
ResnetXtBottleneck(64, 256, 1, 1, True, 1, 64), -> [256], 56*56
ResnetXtBottleneck(256, 256, 1, 1, False, 1, 64), -> [256], 56*56
ResnetXtBottleneck(256, 256, 1, 1, False, 1, 64), -> [256], 56*56
)
conv3:
->[256], ... | 62598eeed58c6744b42db686 |
class Settings: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.screen_width = 1200 <NEW_LINE> self.screen_height = 800 <NEW_LINE> self.bg_color = (230, 230, 230) <NEW_LINE> self.ship_speed_factor = 1.5 <NEW_LINE> self.ship_limit = 3 <NEW_LINE> self.bullet_speed_factor = 3 <NEW_LINE> self.bullet_width ... | 存储游戏所有设置的类 | 62598eeeff9c53063f518e06 |
class TestPetController(BaseTestCase): <NEW_LINE> <INDENT> def test_add_pet(self): <NEW_LINE> <INDENT> body = Pet() <NEW_LINE> response = self.client.open( '/v2/pet', method='POST', data=json.dumps(body), content_type='application/json') <NEW_LINE> self.assert200(response, 'Response body is : ' + response.data.decode('... | PetController integration test stubs | 62598eee3346ee7daa336a38 |
class ResolveHostname: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def resolve(hostname): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> socket.gethostbyname(hostname) <NEW_LINE> return True <NEW_LINE> <DEDENT> except socket.error: <NEW_LINE> <INDENT> return | Check if hostname is resolvable or not
from core.helpers.misc import ResolveHostname
resolve = ResolveHostname.resolve
resolve("google.com") | 62598eeefff4ab517ebcbf79 |
class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["ExpressRouteCircuitPeering"]] = Non... | Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit.
:param value: The peerings in an express route circuit.
:type value: list[~azure.mgmt.network.v2020_06_01.models.ExpressRouteCircuitPeering]
:param next_link: The URL to get the next set of results.
:type next_link:... | 62598eee627d3e7fe0e0562c |
class ImageSize(Enum): <NEW_LINE> <INDENT> X_SMALL = "X_SMALL" <NEW_LINE> SMALL = "SMALL" <NEW_LINE> MEDIUM = "MEDIUM" <NEW_LINE> LARGE = "LARGE" <NEW_LINE> X_LARGE = "X_LARGE" <NEW_LINE> def to_dict(self): <NEW_LINE> <INDENT> result = {self.name: self.value} <NEW_LINE> return result <NEW_LINE> <DEDENT> def to_str(self... | Allowed enum values: [X_SMALL, SMALL, MEDIUM, LARGE, X_LARGE] | 62598eee4527f215b58e86a0 |
class Problem(O): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> O.__init__(self) <NEW_LINE> self.decisions = (Decision('r', 0, 10), Decision('h', 0, 20)) <NEW_LINE> self.objectives = (Objective("S"), Objective("T")) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def evaluate(point): <NEW_LINE> <INDENT> [r, ... | Class representing the cone problem. | 62598eee2c8b7c6e89bd1f63 |
class TagResource(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TagKey = None <NEW_LINE> self.TagValue = None <NEW_LINE> self.ResourceId = None <NEW_LINE> self.TagKeyMd5 = None <NEW_LINE> self.TagValueMd5 = None <NEW_LINE> self.ServiceType = None <NEW_LINE> <DEDENT> def _deserialize(s... | Tag key-value pair and resource ID.
| 62598eee9c8ee8231303f52b |
class ViewServerError(Exception): <NEW_LINE> <INDENT> pass | exception raised by view server | 62598eee01c39578d7f11546 |
class State(Base): <NEW_LINE> <INDENT> __tablename__ = 'states' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> resource = Column(String(40), ForeignKey('resources.uid')) <NEW_LINE> state = Column(String(40)) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<State(state='{}'>".format(self.state) | Table for resources current states. | 62598eee32920d7e50bc47cf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.