code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Image(IResource): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [IResource]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, Image, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> for _s in [IRe... | Proxy of C++ FIFE::Image class | 62598fa36fb2d068a7693d7d |
class ServiceTestCase(test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ServiceTestCase, self).setUp() <NEW_LINE> self.host = 'foo' <NEW_LINE> self.binary = 'nova-fake' <NEW_LINE> self.topic = 'fake' <NEW_LINE> self.mox.StubOutWithMock(service, 'db') <NEW_LINE> <DEDENT> def test_create(self... | Test cases for Services | 62598fa344b2445a339b68b6 |
class OpenIdConnectBackend(ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, **kwargs): <NEW_LINE> <INDENT> user = None <NEW_LINE> if not kwargs or 'sub' not in kwargs.keys(): <NEW_LINE> <INDENT> return user <NEW_LINE> <DEDENT> UserModel = get_user_model() <NEW_LINE> username = self.clean_username(kwargs['sub']... | This backend checks a previously performed OIDC authentication.
If it is OK and the user already exists in the database, it is returned.
If it is OK and user does not exist in the database, it is created and returned unless setting
OIDC_CREATE_UNKNOWN_USER is False.
In all other cases, None is returned. | 62598fa3097d151d1a2c0ebc |
class TypedSYMbolReference(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'component_type': 'str', 'symbol_ref': 'str' } <NEW_LINE> self.attribute_map = { 'component_type': 'componentType', 'symbol_ref': 'symbolRef' } <NEW_LINE> self._component_type = None <NEW_LINE> self._s... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa39c8ee823130400b7 |
class Formatter(logging.Formatter): <NEW_LINE> <INDENT> def format(self, record): <NEW_LINE> <INDENT> style = '' <NEW_LINE> if record.levelno == logging.ERROR: <NEW_LINE> <INDENT> style = colorama.Fore.RED + colorama.Style.BRIGHT <NEW_LINE> <DEDENT> elif record.levelno == logging.WARNING: <NEW_LINE> <INDENT> style = co... | Caterpillar logging formatter.
Adds color to the logged information. | 62598fa30a50d4780f70526c |
class UnassignIpv6AddressesRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.NetworkInterfaceId = None <NEW_LINE> self.Ipv6Addresses = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.NetworkInterfaceId = params.get("NetworkInterfaceId") <NEW_LINE>... | UnassignIpv6Addresses请求参数结构体
| 62598fa3d7e4931a7ef3bf2b |
class _NumberedMarginTokenCache(dict): <NEW_LINE> <INDENT> def __missing__(self, key): <NEW_LINE> <INDENT> width, line_number = key <NEW_LINE> if line_number is not None: <NEW_LINE> <INDENT> tokens = [(Token.LineNumber, u'%%%si ' % width % (line_number + 1))] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> tokens = [(Tok... | Cache for numbered margins.
Maps (width, line_number) to a list of tokens. | 62598fa3ac7a0e7691f7239c |
class MovingAverage(Baseline): <NEW_LINE> <INDENT> def __init__(self,config,b=0.4): <NEW_LINE> <INDENT> self.meanRewards = np.zeros(config.max_length) <NEW_LINE> self.b = b <NEW_LINE> self.max_length = config.max_length <NEW_LINE> <DEDENT> def fit(self,rewards): <NEW_LINE> <INDENT> pad = self.max_length - len(rewards) ... | time-dependent moving average baseline | 62598fa397e22403b383ad9d |
class AccountErrorsModule(UIModule): <NEW_LINE> <INDENT> def render(self, errors): <NEW_LINE> <INDENT> return self.render_string("modules/account/errors.html", errors=errors) | エラー処理用のモジュール
| 62598fa3fbf16365ca793f4d |
class ConnectionSharedKeyResult(Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': 'str'}, } <NEW_LINE> def __init__(self, *, value: str=None, **kwargs) -> None: <NEW_LINE> <INDENT> super(ConnectionSharedKeyResult, self).__init__(**kwargs) <NEW_LINE> self.value = value | Response for CheckConnectionSharedKey Api servive call.
:param value: The virtual network connection shared key value
:type value: str | 62598fa38da39b475be03072 |
class Failed(FinalReply): <NEW_LINE> <INDENT> def __init__(self, document): <NEW_LINE> <INDENT> AsyncReply.__init__(self, document) <NEW_LINE> reply = Return(document.result) <NEW_LINE> self.exval = RemoteException.instance(reply) <NEW_LINE> self.xmodule = reply.xmodule, <NEW_LINE> self.xclass = reply.xclass <NEW_LINE>... | Failed reply to asynchronous operation. This reply
indicates an exception was raised.
:ivar exval: The returned exception.
:type exval: object
:see: Failed.throw | 62598fa3656771135c489515 |
class CmdGive(MuxCommand): <NEW_LINE> <INDENT> key = "give" <NEW_LINE> locks = "cmd:all()" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> caller = self.caller <NEW_LINE> if not self.args or not self.rhs: <NEW_LINE> <INDENT> caller.msg("Usage: give <inventory object> = <target>") <NEW_LINE> return <NEW_LINE> <DEDENT> to... | give away something to someone
Usage:
give <inventory obj> = <target>
Gives an items from your inventory to another character,
placing it in their inventory. | 62598fa32c8b7c6e89bd3657 |
@benchmark.Owner(emails=['yukishiino@chromium.org', 'bashi@chromium.org', 'haraken@chromium.org']) <NEW_LINE> class DromaeoJslibAttrJquery(_BaseDromaeoBenchmark): <NEW_LINE> <INDENT> tag = 'jslibattrjquery' <NEW_LINE> query_param = 'jslib-attr-jquery' <NEW_LINE> @classmethod <NEW_LINE> def Name(cls): <NEW_LINE> <INDENT... | Dromaeo JSLib attr jquery JavaScript benchmark.
Tests setting and getting DOM node attributes using the jQuery JavaScript
Library. | 62598fa30c0af96317c56213 |
class S3EventActivityModel(S3Model): <NEW_LINE> <INDENT> names = ["event_activity"] <NEW_LINE> def model(self): <NEW_LINE> <INDENT> if not current.deployment_settings.has_module("project"): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> tablename = "event_activity" <NEW_LINE> table = self.define_table(tablename, s... | Link Activities to Events | 62598fa391f36d47f2230deb |
class use_field_name_or_array(object): <NEW_LINE> <INDENT> def __init__(self, at_element): <NEW_LINE> <INDENT> self._at = at_element <NEW_LINE> <DEDENT> def __call__(self, func): <NEW_LINE> <INDENT> @wraps(func) <NEW_LINE> def _wrapped(grid, vals, *args, **kwds): <NEW_LINE> <INDENT> if isinstance(vals, six.string_types... | Decorate a function so that it accepts a field name or array.
Parameters
----------
func : function
A function that accepts a grid and array as arguments.
at_element : str
The element type that the field is defined on ('node', 'cell',
etc.)
Returns
-------
func
A wrapped function that accepts a grid a... | 62598fa324f1403a926857fc |
class UserResource(BaseResource, UserMixin): <NEW_LINE> <INDENT> __mts_route__ = [('/r/users', 'list')] <NEW_LINE> preparer = FieldsPreparer(fields={ 'id': 'id', 'email': 'email', }) <NEW_LINE> @gen.coroutine <NEW_LINE> def create(self): <NEW_LINE> <INDENT> u = User( email=self.r_handler.json_args.get('email'), passwor... | User resource | 62598fa36e29344779b004ee |
class BotApprover(Verifier): <NEW_LINE> <INDENT> async def verify_member(self, ctx): <NEW_LINE> <INDENT> if ctx.member.bot: <NEW_LINE> <INDENT> ctx.add_approval_reason( 'User is an OAuth2 bot that can only be manually added.') | A override level verifier that approves other bots. | 62598fa3be383301e025368a |
class MessagesView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> from_messages = user.from_messages.exclude(banned=True).order_by('-created_at') <NEW_LINE> to_messages = user.to_messages.exclude(banned=True).order_by('-created_at') <NEW_LINE> c... | Display user messages | 62598fa356b00c62f0fb2744 |
class ReorderSourceFilter(Baserequests): <NEW_LINE> <INDENT> def __init__(self, sourceName, filterName, newIndex): <NEW_LINE> <INDENT> Baserequests.__init__(self) <NEW_LINE> self.name = 'ReorderSourceFilter' <NEW_LINE> self.dataout['sourceName'] = sourceName <NEW_LINE> self.dataout['filterName'] = filterName <NEW_LINE>... | Move a filter in the chain (absolute index positioning)
:Arguments:
*sourceName*
type: String
Name of the source to which the filter belongs
*filterName*
type: String
Name of the filter to reorder
*newIndex*
type: Integer
Desired position of the filter in the ch... | 62598fa330dc7b766599f6e0 |
class FilterOperator(object): <NEW_LINE> <INDENT> Equals = 0 <NEW_LINE> IsNull = 1 <NEW_LINE> GreaterThan = 2 <NEW_LINE> LessThan = 3 <NEW_LINE> GreaterThanOrEqual = 4 <NEW_LINE> LessThanOrEqual = 5 <NEW_LINE> Like = 6 <NEW_LINE> Not = 7 <NEW_LINE> Between = 8 <NEW_LINE> InList = 9 <NEW_LINE> And = 10 <NEW_LINE> Or = 1... | :ivar Equals:
:vartype Equals: 0
:ivar IsNull:
:vartype IsNull: 1
:ivar GreaterThan:
:vartype GreaterThan: 2
:ivar LessThan:
:vartype LessThan: 3
:ivar GreaterThanOrEqual:
:vartype GreaterThanOrEqual: 4
:ivar LessThanOrEqual:
:vartype LessThanOrEqual: 5
:ivar Like:
:vartype Like: 6
:ivar Not:
:vartype No... | 62598fa3097d151d1a2c0ebe |
class ServiceList(_kuber_definitions.Collection): <NEW_LINE> <INDENT> def __init__( self, items: typing.List["Service"] = None, metadata: "ListMeta" = None, ): <NEW_LINE> <INDENT> super(ServiceList, self).__init__(api_version="core/v1", kind="ServiceList") <NEW_LINE> self._properties = { "items": items if items is not ... | ServiceList holds a list of services. | 62598fa30a50d4780f70526e |
class Group(DeclarativeBase): <NEW_LINE> <INDENT> __tablename__ = 'tg_group' <NEW_LINE> group_id = Column(Integer, autoincrement=True, primary_key=True) <NEW_LINE> group_name = Column(Unicode(16), unique=True, nullable=False) <NEW_LINE> group_description = Column(Unicode(100), nullable=True) <NEW_LINE> codproyecto = Co... | Group definition for :mod:`repoze.what`.
Only the ``group_name`` column is required by :mod:`repoze.what`. | 62598fa3462c4b4f79dbb89f |
class ShardingSetup(object): <NEW_LINE> <INDENT> def __init__(self, context, uniresis): <NEW_LINE> <INDENT> self._ctx = context <NEW_LINE> self._uniresis = uniresis <NEW_LINE> self._logger = context.logger_setup.logger <NEW_LINE> <DEDENT> @gen.coroutine <NEW_LINE> def get_state_route(self): <NEW_LINE> <INDENT> fallback... | Provides sharding environment routes. | 62598fa366656f66f7d5a283 |
class HalloweenClock: <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> <DEDENT> @commands.command() <NEW_LINE> async def halloween(self): <NEW_LINE> <INDENT> now = datetime.datetime.now() <NEW_LINE> today = date(now.year, now.month, now.day) <NEW_LINE> year = now.year <NEW_LINE... | Simple display of days left until next halloween | 62598fa3379a373c97d98ea4 |
class ConflictError: <NEW_LINE> <INDENT> def __init__(self, message=None, object=None, oid=None, serials=None, data=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_oid(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_class_name(self)... | Two transactions tried to modify the same object at once.
This transaction should be resubmitted.
Instance attributes:
oid : string
the OID (8-byte packed string) of the object in conflict
class_name : string
the fully-qualified name of that object's class
message : string
a human-readable explanati... | 62598fa3cb5e8a47e493c0c0 |
class TypeManager(stevedore.named.NamedExtensionManager): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.drivers = {} <NEW_LINE> LOG.info(_("Configured type driver names: %s"), cfg.CONF.ml2.type_drivers) <NEW_LINE> super(TypeManager, self).__init__('neutron.ml2.type_drivers', cfg.CONF.ml2.type_drivers... | Manage network segment types using drivers. | 62598fa31f5feb6acb162ab5 |
class CF_spot4take5_f_Reader(Reader): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Reader.__init__(self) <NEW_LINE> <DEDENT> def get_maskname(self, filename): <NEW_LINE> <INDENT> if type(filename) == list: <NEW_LINE> <INDENT> mask_filename = [] <NEW_LINE> for elem in filename: <NEW_LINE> <INDENT> dirname... | reader module for the spot4take5_f dataset
'_f' = means located at hard disk
'_w' = means accessible via WCS service | 62598fa3fbf16365ca793f4f |
class WebSocketConnection(WebSocketServerProtocol): <NEW_LINE> <INDENT> def onOpen(self): <NEW_LINE> <INDENT> log.info("Opened new connection") <NEW_LINE> self.protocol = ETGProtocol(self.factory.service, self.factory.simulation, Sender(self)) <NEW_LINE> self.factory.service.add_protocol(self.protocol) <NEW_LINE> <DEDE... | The class that does all the reading and writing to and from the websockets. | 62598fa3b7558d58954634c2 |
class Rotation(object): <NEW_LINE> <INDENT> def __call__(self, sample): <NEW_LINE> <INDENT> image, key_pts = sample['image'], sample['keypoints'] <NEW_LINE> image_copy = np.copy(image) <NEW_LINE> key_pts_copy = np.copy(key_pts) <NEW_LINE> image = cv2.cvtColor(image_copy, cv2.COLOR_BGR2RGB) <NEW_LINE> rows,cols,_ = imag... | Randomly rotate to 0,45,90,180,270 degrees. | 62598fa301c39578d7f12c13 |
class Message(six.text_type): <NEW_LINE> <INDENT> def __new__(cls, msgid, msgtext=None, params=None, domain='magnetodb', *args): <NEW_LINE> <INDENT> if not msgtext: <NEW_LINE> <INDENT> msgtext = Message._translate_msgid(msgid, domain) <NEW_LINE> <DEDENT> msg = super(Message, cls).__new__(cls, msgtext) <NEW_LINE> msg.ms... | A Message object is a unicode object that can be translated.
Translation of Message is done explicitly using the translate() method.
For all non-translation intents and purposes, a Message is simply unicode,
and can be treated as such. | 62598fa3009cb60464d013b9 |
class UserStory22Test(unittest.TestCase): <NEW_LINE> <INDENT> def test_userStory22_1(self): <NEW_LINE> <INDENT> resultsList = userStory22("InputGedFiles/UserStory22_GED/testUserStory22-1.ged") <NEW_LINE> self.assertEqual([], resultsList) <NEW_LINE> <DEDENT> def test_userStor22_2(self): <NEW_LINE> <INDENT> resultsList =... | Test the User Story 22 function | 62598fa30c0af96317c56216 |
class Convert(): <NEW_LINE> <INDENT> def __init__(self, dest_file_path, src_file_path, start_time, end_time): <NEW_LINE> <INDENT> command = self.build_command(dest_file_path, src_file_path, start_time, end_time) <NEW_LINE> print(command) <NEW_LINE> self.execute_command(command) <NEW_LINE> self.remove_original(src_file_... | Use ffmpeg to convert a media file | 62598fa324f1403a926857fd |
class TLSError(BaseTLSException): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self) | Base class for all TLS Lite exceptions. | 62598fa363d6d428bbee2646 |
class TransactionType(Enum): <NEW_LINE> <INDENT> ITEM_PURCHASE = 1 <NEW_LINE> CUSTOM_PAYMENT = 2 <NEW_LINE> ADMIN_CHANGE = 3 | Types of payment | 62598fa36e29344779b004f0 |
class ExpectimaxAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> legalActions = gameState.getLegalActions(0) <NEW_LINE> valueActionList = [(float("-inf"), None)] <NEW_LINE> for action in legalActions: <NEW_LINE> <INDENT> successor = gameState.generateSuccessor(0, act... | Your expectimax agent (question 4) | 62598fa356b00c62f0fb2746 |
class MainModelViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.MainModel.objects.all() <NEW_LINE> serializer_class = serializers.MainModelSerializer | A simple ViewSet for viewing and editing accounts. | 62598fa3e76e3b2f99fd88ca |
@public <NEW_LINE> @implementer(IAutoResponseRecord) <NEW_LINE> class AutoResponseRecord(Model): <NEW_LINE> <INDENT> __tablename__ = 'autoresponserecord' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> address_id = Column(Integer, ForeignKey('address.id'), index=True) <NEW_LINE> address = relationship('Add... | See `IAutoResponseRecord`. | 62598fa30a50d4780f705270 |
class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): <NEW_LINE> <INDENT> _validation = { 'errors': {'readonly': True}, 'state': {'readonly': True}, 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'errors': {'key': 'errors', 'typ... | Properties for the task that migrates on-prem SQL Server databases to Azure
SQL Database.
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 errors: Array of errors. This is ignored if submitted.
:vartype ... | 62598fa3aad79263cf42e674 |
class MultiBuffer: <NEW_LINE> <INDENT> def __init__(self, scoring: Callable[[T], int], items: Iterable[T] = None): <NEW_LINE> <INDENT> self._scoring = scoring <NEW_LINE> self._buffers: dict[int, list[T]] = {} <NEW_LINE> self._items_count = 0 <NEW_LINE> if items is not None: <NEW_LINE> <INDENT> self.extend(items) <NEW_L... | Multiple buffers by given criteria.
For example by length:
>>> mb = MultiBuffer(len)
>>> mb.append('dog')
>>> mb.extend(['cat', 'monkey', 'antelope', 'ox', 'spider'])
>>> len(mb)
6
Give me the shortest:
>>> mb.pop_min()
'ox'
>>> mb.pop_min()
'cat'
>>> len(mb)
4
Give me t... | 62598fa356ac1b37e6302081 |
class ExtraDjangoSorter(DjangoSorter): <NEW_LINE> <INDENT> def _get_order_string(self): <NEW_LINE> <INDENT> return LOOKUP_SEP.join(chain(('extra_order',), self.identifiers)) <NEW_LINE> <DEDENT> def update_queryset(self, qs): <NEW_LINE> <INDENT> raise NotImplementedError | Special type of sorter that updates queryset using annotate or extra queryset method.
For this purpose must be implement updated_queryset method which returns queryset with new column
that is used for ordering. | 62598fa3cb5e8a47e493c0c1 |
class Teensy(object): <NEW_LINE> <INDENT> teensy_names = ["Teensy1", "Teensy2"] <NEW_LINE> def __init__(self, address, baud=38400): <NEW_LINE> <INDENT> self.address = address <NEW_LINE> self.baud = baud <NEW_LINE> self.serial = None <NEW_LINE> self.name = None <NEW_LINE> <DEDENT> def connect(self): <NEW_LINE> <INDENT> ... | Teensy micro-controller connection object class. | 62598fa33317a56b869be494 |
class AdvertisementOptions: <NEW_LINE> <INDENT> NO_ENCRYPTION = 0 <NEW_LINE> NULL_KEY = 1 <NEW_LINE> USER_KEY = 2 <NEW_LINE> DEVICE_KEY = 3 <NEW_LINE> _NULL_KEY = bytes(16) <NEW_LINE> _MAX_VOLTAGE_V1 = 0xFFFF <NEW_LINE> _MAX_BATTERY_LEVEL_V2 = 0xFF <NEW_LINE> _MAX_BROADCAST_ID = 7 <NEW_LINE> _MAX_UPDATE_COUNT = 31 <NEW... | Options to control how an advertisement is generated.
This class can be used for v1 and v2 advertisements. Not all options are
supported on both advertisement types. | 62598fa32ae34c7f260aaf76 |
class MLSDisabled(PolicyrepException): <NEW_LINE> <INDENT> pass | Exception when MLS is disabled. | 62598fa3442bda511e95c2f0 |
class SlotNotEmptyError(Error): <NEW_LINE> <INDENT> def __init__(self, slot, record, msg): <NEW_LINE> <INDENT> self.slot = slot <NEW_LINE> self.record = record <NEW_LINE> self.msg = msg | Exception raised for errors in the SlotNotEmptyError.
Attributes:
slot -- slot information
record -- explanation of the record
msg -- slot not available | 62598fa330bbd722464698c2 |
class SampledMeanBinaryCrossEntropy(DefaultDataSpecsMixin, Cost): <NEW_LINE> <INDENT> def __init__(self, L1, ratio): <NEW_LINE> <INDENT> self.random_stream = RandomStreams(seed=1) <NEW_LINE> self.L1 = L1 <NEW_LINE> self.one_ratio = ratio <NEW_LINE> <DEDENT> @wraps(Cost.expr) <NEW_LINE> def expr(self, model, data, ** kw... | .. todo::
WRITEME properly
CE cost that goes with sparse autoencoder with L1 regularization on
activations
For theory:
Y. Dauphin, X. Glorot, Y. Bengio. ICML2011
Large-Scale Learning of Embeddings with Reconstruction Sampling
Parameters
----------
L1 : WRITEME
ratio : WRITEME | 62598fa399cbb53fe6830d69 |
class PlaylistViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.Playlist.objects.all() <NEW_LINE> serializer_class = serializers.PlaylistSerializer | API endpoint that allows Playlist to be viewed or edited. | 62598fa35fdd1c0f98e5de2d |
class PolynomialRecursiveNodesElementGroup(_MassMatrixQuadratureElementGroup): <NEW_LINE> <INDENT> def __init__(self, mesh_el_group, order, family, index=None): <NEW_LINE> <INDENT> super().__init__(mesh_el_group, order, index=index) <NEW_LINE> self.family = family <NEW_LINE> <DEDENT> @property <NEW_LINE> @memoize_metho... | Elemental discretization with a number of nodes matching the number of
polynomials in :math:`P^k`, hence usable for differentiation and
interpolation. Interpolation nodes edge-clustered for avoidance of Runge
phenomena. Depending on the *family* argument, nodes may be present on the
boundary of the simplex. See [Isaac2... | 62598fa3fbf16365ca793f51 |
class SensorProcessedDataHeaders(Enum): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self.value) <NEW_LINE> <DEDENT> ID = 'SENSOR_ID' <NEW_LINE> ACTIVITY = 'ACTIVITY' <NEW_LINE> START = 'START' <NEW_LINE> END = 'END' | This enumerable contains the headers (columns) of the processed sensors.csv file | 62598fa30c0af96317c56217 |
class Company(AbstractBaseModel): <NEW_LINE> <INDENT> name = models.CharField('Name', max_length=100) <NEW_LINE> about = models.TextField('About') <NEW_LINE> address = models.CharField('Address', max_length=200) <NEW_LINE> country = models.CharField('Country', max_length=100) <NEW_LINE> city = models.CharField('Distric... | Recruiter | 62598fa385dfad0860cbf9bf |
class SelectClause(object): <NEW_LINE> <INDENT> def __init__(self, select_items): <NEW_LINE> <INDENT> self.items = select_items <NEW_LINE> self.distinct = False <NEW_LINE> <DEDENT> @property <NEW_LINE> def basic_items(self): <NEW_LINE> <INDENT> return SelectItemSubList(self.items, lambda item: item.is_basic) <NEW_LINE>... | This encapsulates the SELECT part of a query. It is convenient to separate
non-agg items from agg items so that it is simple to know if the query
is an agg query or not. | 62598fa3627d3e7fe0e06d42 |
class STBMSAELoss(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, spatial_weights = [1,2,5,10,30], thresholds = [20,30,40,50,80],time_weight_gap = 1, mse_w = 1,mae_w = 1): <NEW_LINE> <INDENT> super(STBMSAELoss,self).__init__() <NEW_LINE> assert len(spatial_weights) == len(thresholds) <NEW_LINE> scale = max(thr... | func: MSE和MAE损失中给强回波处的误差更大的权重,同时将BMSE 和 BMAE按照不同权重累加起来
Parameter
---------
weights: list
default [1,2,5,10,30].权重列表,给不同的回波强度处对应的像素点的损失不同的权重
thresholds: list
阈值列表,即将回波强度按照范围分为若干段,不同段给与不同的损失权重
default [20,30,40,50,80].对应0~1之间的输入为: [0.25, 0.375, 0.5, 0.625, 1.0]
mse_w: float
mse权重, default 1
mae_w: float
... | 62598fa363d6d428bbee2647 |
class Signal(_Value): <NEW_LINE> <INDENT> def __init__(self, bits_sign=None, name=None, variable=False, reset=0, name_override=None, min=None, max=None, related=None): <NEW_LINE> <INDENT> from migen.fhdl.bitcontainer import bits_for <NEW_LINE> _Value.__init__(self) <NEW_LINE> if bits_sign is None: <NEW_LINE> <INDENT> i... | A `_Value` that can change
The `Signal` object represents a value that is expected to change
in the circuit. It does exactly what Verilog's `wire` and
`reg` and VHDL's `signal` do.
A `Signal` can be indexed to access a subset of its bits. Negative
indices (`signal[-1]`) and the extended Python slicing notation
(`sign... | 62598fa3adb09d7d5dc0a420 |
class SearchDomainsRequest(proto.Message): <NEW_LINE> <INDENT> query = proto.Field( proto.STRING, number=1, ) <NEW_LINE> location = proto.Field( proto.STRING, number=2, ) | Request for the ``SearchDomains`` method.
Attributes:
query (str):
Required. String used to search for available
domain names.
location (str):
Required. The location. Must be in the format
``projects/*/locations/*``. | 62598fa3a8370b77170f026f |
class Window(object): <NEW_LINE> <INDENT> COLOR_ORANGE = 0 <NEW_LINE> spacing = 0 <NEW_LINE> total_columns = 0 <NEW_LINE> width = 0 <NEW_LINE> window = None <NEW_LINE> def __init__(self, refresh_interval, total_columns): <NEW_LINE> <INDENT> self.total_columns = total_columns <NEW_LINE> self.window = curses.initscr() <N... | Wrapper for the curses module. | 62598fa32c8b7c6e89bd365b |
class ItemRemoveRequest(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 { 'access_token': (str,), 'client_id': (str,), 'sec... | 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... | 62598fa3796e427e5384e62a |
class ConnectionMonitorResult(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, 'source': {'required': True}, 'destination': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type':... | Information about the connection monitor.
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 name: Name of the connection monitor.
:vartype name: str
:ivar id: ID of the connection monitor.
:vartype id: st... | 62598fa3eab8aa0e5d30bc1e |
class TestSorting(unittest.TestCase): <NEW_LINE> <INDENT> def test_empty(self): <NEW_LINE> <INDENT> argument = is_sorted([]) <NEW_LINE> expected = True <NEW_LINE> self.assertEqual(expected, argument, "The list is empty.") <NEW_LINE> <DEDENT> def test_running_one_item(self): <NEW_LINE> <INDENT> argument = is_sorted([5])... | Tests for is is_sorted. | 62598fa3e64d504609df9304 |
class EdgeType(): <NEW_LINE> <INDENT> label = 'EdgeType' <NEW_LINE> label_belongs = 'EdgeBelongsTo' <NEW_LINE> label_key = '_uniq_key' | Node describing :EdgeType in N4J | 62598fa3d6c5a102081e1fdd |
class BackToBpy(ApiNavigator, bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "api_navigator.back_to_bpy" <NEW_LINE> bl_label = "Back to bpy" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> fill_filter_mem() <NEW_LINE> if not bpy.context.window_manager.api_nav_props.path: <NEW_LINE> <INDENT> bpy.context... | go back to module bpy | 62598fa34f88993c371f0455 |
class Policy: <NEW_LINE> <INDENT> def apply(self, context, global_section, patterns): <NEW_LINE> <INDENT> pass | Basic Policy skeleton. | 62598fa30a50d4780f705271 |
class AuthenticatedUserRelationshipView(APIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> authentication_classes = (BasicAuthentication, TokenAuthentication) <NEW_LINE> def get(self, request, uuid): <NEW_LINE> <INDENT> auth_user = request.user.profile <NEW_LINE> if str(auth_user.uuid) == ... | returns the UserRelationship object with the current user and a specified user | 62598fa37047854f4633f26e |
class PostTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> user = User(password='potatoes', username='zach', email='zach@example.com') <NEW_LINE> user.save() <NEW_LINE> post = Post(body='The body of a post.', user=user) <NEW_LINE> post.save() <NEW_LINE> like = Like(post=post, user=user) <NEW_LIN... | Test the post functionality. | 62598fa356ac1b37e6302082 |
class DeleteSecurityRulesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId") | DeleteSecurityRules返回参数结构体
| 62598fa399fddb7c1ca62d33 |
class itkThinPlateR2LogRSplineKernelTransformD3(itkKernelTransformPython.itkKernelTransformD3): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_... | Proxy of C++ itkThinPlateR2LogRSplineKernelTransformD3 class | 62598fa3e5267d203ee6b7a3 |
class Schema(marshmallow.Schema): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.additional_fields = kwargs.pop('fields', None) <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> if self.additional_fields: <NEW_LINE> <INDENT> self.declared_fields.update(copy.deepcopy(self.additio... | Extends `Schema`.
This allows for dynamic creation of a schema which is needed to validate
arguments within scales. | 62598fa37047854f4633f26f |
class Frames(feature_computer.FeatureComputer): <NEW_LINE> <INDENT> def comp_feat(self, sig, rate): <NEW_LINE> <INDENT> sig = snip(sig, rate, float(self.conf['winlen']), float(self.conf['winstep'])) <NEW_LINE> if 'scipy' in self.conf and self.conf['scipy'] == 'True': <NEW_LINE> <INDENT> feat = base.frames_scipy(sig, ra... | the feature computer class to compute frames | 62598fa355399d3f056263b9 |
class PreprocessData: <NEW_LINE> <INDENT> def preprocess(self,df): <NEW_LINE> <INDENT> df.drop(['Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4'], axis=1, inplace=True) <NEW_LINE> df['label'] = df['class'].map( {'ham': 0, 'spam': 1}) <NEW_LINE> return df | Module for preprocessing data | 62598fa38a43f66fc4bf2013 |
class Function: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.result = Result(result_obj={}) <NEW_LINE> <DEDENT> def execute(self, input_result=Result(result_obj={}), globals_dict={}): <NEW_LINE> <INDENT> self.result = Result(result_obj={}) <NEW_LINE> raise Exception("This must be overriden by your i... | Base class for Function implementation. You need to override the execute() method and set self.result | 62598fa3d7e4931a7ef3bf31 |
class Unit(metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._health = MAX_UNIT_HEALTH <NEW_LINE> self._recharge = random.choice(UNIT_RECHARGE_RANGE) <NEW_LINE> self._next_attack_time = FIRST_ATTACK_TIME <NEW_LINE> self._armor = 0 <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def do_... | Abstract Unit class | 62598fa37cff6e4e811b58bd |
class SystemInstall(models.Model): <NEW_LINE> <INDENT> ip = models.CharField(max_length=20, verbose_name=u'待装机IP') <NEW_LINE> hostname = models.CharField(max_length=30, verbose_name=u'主机名') <NEW_LINE> macaddress = models.CharField(max_length=50, verbose_name=u'MAC地址') <NEW_LINE> system_version = models.CharField(max_le... | System Install Manage | 62598fa32ae34c7f260aaf77 |
class SupplierOrder(models.Model): <NEW_LINE> <INDENT> supplier = models.ForeignKey(Organization, verbose_name=_('Supplier')) <NEW_LINE> date_created = models.DateField(_("Date Created")) <NEW_LINE> order_sub_total = models.DecimalField(_("Subtotal"), max_digits=6, decimal_places=2) <NEW_LINE> order_shipping = models.D... | An order the store owner places to a supplier for a raw good. | 62598fa3fff4ab517ebcd67b |
class mutateRow_result(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, io=None, ia=None,): <NEW_LINE> <INDENT> self.io = io <NEW_LINE> self... | Attributes:
- io
- ia | 62598fa3d58c6744b42dc21f |
class ImportNameDeligate(qt4.QItemDelegate): <NEW_LINE> <INDENT> def __init__(self, parent, datanodes): <NEW_LINE> <INDENT> qt4.QItemDelegate.__init__(self, parent) <NEW_LINE> self.datanodes = datanodes <NEW_LINE> <DEDENT> def createEditor(self, parent, option, index): <NEW_LINE> <INDENT> w = qt4.QComboBox(parent) <NEW... | This class is for choosing the import name. | 62598fa34428ac0f6e6583c2 |
class List2TestCase(SimTestCase): <NEW_LINE> <INDENT> _MENU = ["--propagate", "blockdev", "list"] <NEW_LINE> _POOLNAME = "deadpool" <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> command_line = ["pool", "create"] + [self._POOLNAME] + _DEVICE_STRATEGY() <NEW_LINE> RUNNER(command_line) <NEW_LI... | Test listing devices in an existing pool. | 62598fa301c39578d7f12c16 |
class DiskUid(basestring): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_api_name(): <NEW_LINE> <INDENT> return "disk-uid" | Disk Unique Identifier | 62598fa3cb5e8a47e493c0c2 |
class ContactForm(forms.Form): <NEW_LINE> <INDENT> name = forms.CharField(max_length=100, label=_(u'Your name')) <NEW_LINE> email = forms.EmailField(max_length=200, label=_(u'Your email address')) <NEW_LINE> body = forms.CharField(widget=forms.Textarea, label=_(u'Your message')) <NEW_LINE> from_email = settings.DEFAULT... | The base contact form class from which all contact form classes
should inherit. | 62598fa397e22403b383ada3 |
class TestJobAbort(object): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> print('\n***** TestJobAbort *****') <NEW_LINE> <DEDENT> def assert_job_phase(self, jobid, phase): <NEW_LINE> <INDENT> url = '/rest/' + jobname + '/' + jobid + '/phase' <NEW_LINE> response = test_app.get(url) <NEW_LINE> assert (response... | Test abort command on jobs (COMPLETED jobs cannot be aborted) | 62598fa330bbd722464698c3 |
class Model(object): <NEW_LINE> <INDENT> def __init__(self, model_id, model_name, mesh, metadata=None): <NEW_LINE> <INDENT> self._model_id = model_id <NEW_LINE> self._model_name = model_name <NEW_LINE> self._mesh = mesh <NEW_LINE> if metadata is None: <NEW_LINE> <INDENT> metadata = {} <NEW_LINE> <DEDENT> self._metadata... | A single model from a Thingiverse Thing.
| 62598fa30c0af96317c56219 |
class MasterMinion(object): <NEW_LINE> <INDENT> def __init__( self, opts, returners=True, states=True, rend=True, matcher=True, whitelist=None, ignore_config_errors=True): <NEW_LINE> <INDENT> self.opts = salt.config.minion_config( opts['conf_file'], ignore_config_errors=ignore_config_errors, role='master' ) <NEW_LINE> ... | Create a fully loaded minion function object for generic use on the
master. What makes this class different is that the pillar is
omitted, otherwise everything else is loaded cleanly. | 62598fa367a9b606de545e62 |
class TextGlobal: <NEW_LINE> <INDENT> defaults = {"stroke":"none", "fill":"black", "font-size":5} <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<TextGlobal %s at (%s, %s) %s>" % (repr(self.d), str(self.x), str(self.y), self.attr) <NEW_LINE> <DEDENT> def __init__(self, x, y, d, **attr): <NEW_LINE> <INDENT> ... | Draws at text string at a specified point in global coordinates.
x, y required location of the point in global coordinates
d required text/Unicode string
attribute=value pairs keyword list SVG attributes | 62598fa385dfad0860cbf9c0 |
class WilliamsRIndicator(IndicatorMixin): <NEW_LINE> <INDENT> def __init__( self, high: pd.Series, low: pd.Series, close: pd.Series, lbp: int = 14, fillna: bool = False, ): <NEW_LINE> <INDENT> self._high = high <NEW_LINE> self._low = low <NEW_LINE> self._close = close <NEW_LINE> self._lbp = lbp <NEW_LINE> self._fillna ... | Williams %R
Developed by Larry Williams, Williams %R is a momentum indicator that is
the inverse of the Fast Stochastic Oscillator. Also referred to as %R,
Williams %R reflects the level of the close relative to the highest high
for the look-back period. In contrast, the Stochastic Oscillator reflects
the level of the... | 62598fa3009cb60464d013bc |
class ProjectPluginNames(object): <NEW_LINE> <INDENT> IMAGES = "Images" <NEW_LINE> MESHES = "Meshes" <NEW_LINE> MODELS = "Models" <NEW_LINE> PATHS = "Paths" <NEW_LINE> SEGMENTATIONS = "Segmentations" <NEW_LINE> SIMULATIONS = "Simulations" <NEW_LINE> names = [ IMAGES, MESHES, MODELS, PATHS, SEGMENTATIONS, SIMULATIONS ] | This class stores the names of SV plugin categories.
| 62598fa3a8370b77170f0272 |
class Color(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'A': 'int', 'R': 'int', 'G': 'int', 'B': 'int' } <NEW_LINE> self.attributeMap = { 'A': 'A','R': 'R','G': 'G','B': 'B'} <NEW_LINE> self.A = None <NEW_LINE> self.R = None <NEW_LINE> self.G = None <NEW_LINE> self.B = Non... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa3627d3e7fe0e06d43 |
class Border(object): <NEW_LINE> <INDENT> def __init__(self, use_unicode=True): <NEW_LINE> <INDENT> if use_unicode: <NEW_LINE> <INDENT> self.border_color = ANSI.fg('darkgrey') <NEW_LINE> self.color_off = ANSI.reset() <NEW_LINE> self.dash = '─' <NEW_LINE> self.thickdash = '─' <NEW_LINE> self.doubledash = '═' <NEW_LINE> ... | Holds border symbols.
Some unicode characters: '─' '┄' '╌' '═' '━' '─' | 62598fa338b623060ffa8f2c |
class Jabber(Channel): <NEW_LINE> <INDENT> def __init__(self, name, user_id, password, recipient_id, server, port, tls=False, ssl=True, reattempt=False): <NEW_LINE> <INDENT> super(Jabber, self).__init__(name) <NEW_LINE> self._logger = logging.getLogger(self.__class__.__name__) <NEW_LINE> self.user = user_id <NEW_LINE> ... | Models a channel for Jabber. | 62598fa391af0d3eaad39ca5 |
class BangoTracker(object): <NEW_LINE> <INDENT> zope.interface.implements(IMobileTracker) <NEW_LINE> def __init__(self, context, request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> def track(self, trackingId, debug): <NEW_LINE> <INDENT> referer = self.request.get_h... | Bango tracking code generator.
https://bango.com
Bango inserts a hidden image which contains the page URI and referer.
Set "Page tracking code" given by Bango to mobile_properties.
Example::
<%
//********** Bango Page tracking code - JSP **********
//Specify the unique page name variable
//CHANGE ... | 62598fa3d53ae8145f918324 |
class SerialServer(): <NEW_LINE> <INDENT> def __init__(self, writerq, portT, stopEv , mailerFunc, bd = 1000000, to = None): <NEW_LINE> <INDENT> self.port = portT <NEW_LINE> self.stopEvent = stopEv <NEW_LINE> self.baudrate = bd <NEW_LINE> self.timeout = to <NEW_LINE> self.outQ = queue.Queue() <NEW... | Implent the serving of the serial port,
reads blocks of 900 bytes, i.e. 100 structs and enqueues them for the helper thread to process | 62598fa392d797404e388ab1 |
class PGV(CaseTable, TableBase): <NEW_LINE> <INDENT> __tablename__ = 'pgv' <NEW_LINE> is_root = True <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> court_system = Column(String, enum=True) <NEW_LINE> case_description = Column(String) <NEW_LINE> case_type = Column(String, enum=True) <NEW_LINE> filing_date ... | Prince George's County Circuit Court Civil Cases | 62598fa3dd821e528d6d8dcd |
class TestDecorator(TransactionCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.AccountAccount = self.env["account.account"] <NEW_LINE> self.AccountJournal = self.env["account.journal"] <NEW_LINE> self.user_accountant = self.env.ref("fiscal_company_base.user_accountant") <... | Tests for Account Fiscal Company Module (Decorator) | 62598fa310dbd63aa1c70a48 |
class AnacondaDisableLinting(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> if self.window.active_view().file_name() is not None: <NEW_LINE> <INDENT> ANACONDA['DISABLED'].append(self.window.active_view().file_name()) <NEW_LINE> <DEDENT> erase_lint_marks(self.window.active_view()) ... | Disable the linting for the current buffer
| 62598fa3e76e3b2f99fd88ce |
class SmtpServerHarness(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setup_class(cls): <NEW_LINE> <INDENT> smtp_server = config.get('test_smtp_server') or config['smtp_server'] <NEW_LINE> if ':' in smtp_server: <NEW_LINE> <INDENT> host, port = smtp_server.split(':') <NEW_LINE> <DEDENT> else: <NEW_LINE> <IN... | Derive from this class to run MockSMTP - a test harness that
records what email messages are requested to be sent by it. | 62598fa344b2445a339b68ba |
class CommunicationProblem(StandardError): <NEW_LINE> <INDENT> def __init__(self, proc): <NEW_LINE> <INDENT> StandardError.__init__(self) <NEW_LINE> self.proc = proc | Wrap a Process that wants to talk.
| 62598fa301c39578d7f12c18 |
class UpdatePasswordAPI(generics.GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (permissions.IsAuthenticated, ) <NEW_LINE> serializer_class = ChangePasswordSerializer <NEW_LINE> def get_object(self, queryset=None): <NEW_LINE> <INDENT> return self.request.user <NEW_LINE> <DEDENT> def put(self, request, *args,... | API endpoint for changing password. | 62598fa3be8e80087fbbeefa |
class EndpointInfo(DeviceInfo): <NEW_LINE> <INDENT> implements(IEndpointInfo) <NEW_LINE> adapts(Endpoint) <NEW_LINE> pool_count = RelationshipLengthProperty('pools') <NEW_LINE> host_count = RelationshipLengthProperty('hosts') <NEW_LINE> sr_count = RelationshipLengthProperty('srs') <NEW_LINE> network_count = Relationshi... | API Info adapter factory for Datacenter. | 62598fa33539df3088ecc14d |
class EmotionPlugin(Analyser, models.EmotionPlugin): <NEW_LINE> <INDENT> minEmotionValue = 0 <NEW_LINE> maxEmotionValue = 1 <NEW_LINE> _terse_keys = Analyser._terse_keys + ['minEmotionValue', 'maxEmotionValue'] | Emotion plugins provide emotion annotation (using Onyx) | 62598fa367a9b606de545e64 |
class CallGraphNode(object): <NEW_LINE> <INDENT> def __init__(self, goal): <NEW_LINE> <INDENT> self.goal = goal <NEW_LINE> self.clear() <NEW_LINE> <DEDENT> def clear(self): <NEW_LINE> <INDENT> self.requires = set() <NEW_LINE> self.requiredby = set() <NEW_LINE> self.numrequiredby = 0 <NEW_LINE> <DEDENT> def __repr__(sel... | Represents a node in a graph of dependencies among subexpressions in an :py:class:`Expr <histbook.expr.Expr>`. | 62598fa3a8ecb033258710a8 |
class ObjectCache(object): <NEW_LINE> <INDENT> def __init__(self, cfg=None, directory=None, fileformat="{dir}/{key}.tmp"): <NEW_LINE> <INDENT> self.config = cfg <NEW_LINE> self.fileformat = fileformat <NEW_LINE> if directory: <NEW_LINE> <INDENT> self.directory = directory <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> s... | Handle caching for objects using picklet | 62598fa363d6d428bbee264b |
class MyCodec(object): <NEW_LINE> <INDENT> FORMAT = '>Hl8s' <NEW_LINE> def encode(self, is_originating, uri, args=None, kwargs=None): <NEW_LINE> <INDENT> payload = struct.pack(self.FORMAT, args[0], args[1], args[2]) <NEW_LINE> return EncodedPayload(payload, 'mqtt') <NEW_LINE> <DEDENT> def decode(self, is_originating, u... | Our codec to encode/decode our custom binary payload. This is needed
in "payload transparency mode" (a WAMP AP / Crossbar.io feature), so
the app code is shielded, so you can write your code as usual in Autobahn/WAMP. | 62598fa307f4c71912baf2dd |
class SQLAlchemyError(Exception): <NEW_LINE> <INDENT> code = None <NEW_LINE> def __init__(self, *arg, **kw): <NEW_LINE> <INDENT> code = kw.pop("code", None) <NEW_LINE> if code is not None: <NEW_LINE> <INDENT> self.code = code <NEW_LINE> <DEDENT> super(SQLAlchemyError, self).__init__(*arg, **kw) <NEW_LINE> <DEDENT> def ... | Generic error class. | 62598fa316aa5153ce40039b |
class JSBeautifier(BeautifierBase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _reindenting(cls, js, indent=2, srcIndent=2): <NEW_LINE> <INDENT> firstLine = js.split('\n', 1)[0] <NEW_LINE> offset = len(firstLine) - len(firstLine.lstrip()) <NEW_LINE> result = [] <NEW_LINE> lastLevel = 0 <NEW_LINE> for line in js.sp... | A Javascript Beautifier that pretty print Javascript | 62598fa385dfad0860cbf9c1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.