code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Node: <NEW_LINE> <INDENT> def __init__(self,x,y,father,g_value,h_value,f_value): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.father = father <NEW_LINE> self.g_value = g_value <NEW_LINE> self.h_value = h_value <NEW_LINE> self.f_value = f_value <NEW_LINE> <DEDENT> def equal(self,other): <NE... | Each position in matrix-map is a node | 62598f996aa9bd52df0d4c12 |
class AppResetPasswordRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.AccessToken = None <NEW_LINE> self.OldPassword = None <NEW_LINE> self.NewPassword = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.AccessToken = params.get("AccessToken") <NE... | AppResetPassword请求参数结构体
| 62598f99f7d966606f747d2c |
class wrapper(beanstalk_job): <NEW_LINE> <INDENT> def __init__(instance): <NEW_LINE> <INDENT> super(wrapper, instance).__init__(f) <NEW_LINE> <DEDENT> def __call__(instance, arg): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> data = json.loads(arg) <NEW_LINE> attempt = int(data.pop(u'__attempt', 0)) <NEW_LINE> <DEDENT> ... | A retryable beanstalk job.
Like a normal beanstalk job, except that it will attempt to retry
the job for a max number of retries using an exponential backoff
algorithm when BeanstalkRetry exceptions are thrown.
It also forces the wrapped function to take a dictionary vs a
string. The job is still created with a strin... | 62598f9915baa72349461cc8 |
class DiagnosticsCommand(Command): <NEW_LINE> <INDENT> def __init__(self, device_name, configuration, plugin_manager, logger=None, **kwargs): <NEW_LINE> <INDENT> Command.__init__(self, device_name, configuration, plugin_manager, logger, **kwargs) <NEW_LINE> self.plugin_name = None <NEW_LINE> self.plugin_manager = plugi... | "Diagnostics command interfaces | 62598f9926068e7796d4c6a8 |
class StandardizedDescription(object): <NEW_LINE> <INDENT> openapi_types = { 'sections': 'list[DescriptionSection]' } <NEW_LINE> attribute_map = { 'sections': 'sections' } <NEW_LINE> def __init__(self, sections=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <IN... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598f99a05bb46b3848a5c5 |
class Config(GObject.GObject, PeasGtk.Configurable): <NEW_LINE> <INDENT> __gtype_name__ = 'LastfmplaycountConfig' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._parse_username() <NEW_LINE> self.settings = Gio.Settings(DCONF_DIR) <NEW_LINE> <DEDENT> def do_create_configure_widget(self): <NEW_LINE> <INDENT> pri... | Read and write configuration data for Last.fm playcount sync plugin | 62598f99d53ae8145f9181d3 |
class ExitCode(enum.IntEnum): <NEW_LINE> <INDENT> OK = 0 <NEW_LINE> TESTS_FAILED = 1 <NEW_LINE> TESTS_ERROR = 2 <NEW_LINE> REQUEST_ERROR = 3 <NEW_LINE> USAGE_ERROR = 4 <NEW_LINE> INTERNAL_ERROR = 5 | Encodes the valid exit codes by ScanAPI. | 62598f99be383301e0253542 |
class TORSchema(base_schema.BaseSchema): <NEW_LINE> <INDENT> _schema_name = "HardwareGateway" <NEW_LINE> def __init__(self, py_dict=None): <NEW_LINE> <INDENT> super(TORSchema, self).__init__() <NEW_LINE> self.set_data_type('xml') <NEW_LINE> self.objectId = None <NEW_LINE> self.name = None <NEW_LINE> self.thumbprint = N... | This schema is not used for configuration
This will be filled in during GET calls | 62598f998e7ae83300ee8de3 |
class ListNode: <NEW_LINE> <INDENT> def __init__(self, val: Any = 0, next: Optional[ListNode] = None): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> self.next = next <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(listize(self)) | Node for singly-linked list | 62598f997cff6e4e811b5766 |
class XmlElement(object): <NEW_LINE> <INDENT> def __init__(self, name: str, value: Any = None, datatype: str = None, comment: str = None, literal: str = None) -> None: <NEW_LINE> <INDENT> if datatype == XmlDataTypes.BOOLEAN and value is not None: <NEW_LINE> <INDENT> value = str(value).lower() <NEW_LINE> <DEDENT> self.n... | Represents XML data in a tree. | 62598f9944b2445a339b680f |
@_set_msg_type(ofproto.OFPT_METER_MOD) <NEW_LINE> class OFPMeterMod(MsgBase): <NEW_LINE> <INDENT> def __init__(self, datapath, command=ofproto.OFPMC_ADD, flags=ofproto.OFPMF_KBPS, meter_id=1, bands=None): <NEW_LINE> <INDENT> bands = bands if bands else [] <NEW_LINE> super(OFPMeterMod, self).__init__(datapath) <NEW_LINE... | Meter modification message
The controller sends this message to modify the meter.
================ ======================================================
Attribute Description
================ ======================================================
command One of the following values.
... | 62598f9963d6d428bbee2504 |
class Rook(Piece): <NEW_LINE> <INDENT> def __init__(self, player: object, row: int, column: int): <NEW_LINE> <INDENT> super().__init__(player=player, row=row, column=column, name='rook', evaluation=5) <NEW_LINE> <DEDENT> def legal_moves(self, board: object, pins: list = ()) -> list[object]: <NEW_LINE> <INDENT> unprepar... | It is the second strongest piece after the 'Queen' and moves as far as it wants in a straight line
(horizontally or vertically). It has the same number of moves from any square, at least when the board is empty,
so it doesn't mind being on the edge or in the corner. | 62598f9924f1403a92685755 |
class SphinxThread(QThread): <NEW_LINE> <INDENT> error_msg = Signal(str) <NEW_LINE> html_ready = Signal(str) <NEW_LINE> def __init__(self, html_text_no_doc='', css_path=CSS_PATH): <NEW_LINE> <INDENT> super(SphinxThread, self).__init__() <NEW_LINE> self.doc = None <NEW_LINE> self.context = None <NEW_LINE> self.html_text... | A worker thread for handling rich text rendering.
Parameters
----------
doc : str or dict
A string containing a raw rst text or a dict containing
the doc string components to be rendered.
See spyder.utils.dochelpers.getdoc for description.
context : dict
A dict containing the substitution variables for ... | 62598f9994891a1f408b9594 |
class PTKIMQGorhamMackey(PTKernel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def eval(self, X, Y): <NEW_LINE> <INDENT> sumx2 = torch.sum(X**2, 1).reshape(-1, 1) <NEW_LINE> sumy2 = torch.sum(Y**2, 1).reshape(1, -1) <NEW_LINE> D2 = sumx2 - 2.0*X.mm(Y.t()) - sumy2 <NEW_LINE> K =... | The inverse multiquadric (IMQ) kernel studied in
Measure Sample Quality with Kernels
Jackson Gorham, Lester Mackey
k(x,y) = (1 + ||x-y||^2)^(-0.5) | 62598f9907f4c71912baf193 |
class LocalReadOnlyFileSystem(object): <NEW_LINE> <INDENT> def __init__(self, logical_home_folder=None, physical_home_folder=None): <NEW_LINE> <INDENT> self._logical_home_folder = AbstractFileSystem.normpath( logical_home_folder) <NEW_LINE> self._physical_home_folder = AbstractFileSystem.normpath( physical_home_folder)... | A read-only file system serving only local files. | 62598f99925a0f43d25e7d83 |
class ClassVisitor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def visit(self, typeDecl): <NEW_LINE> <INDENT> pass | A class visitor that is triggered for all encountered ``TypeDeclaration``.
Example, listing all types declared in the bytecode::
class TypeDeclVisitor(ClassVisitor):
def __init__(self):
ClassVisitor.__init__(self)
def visit(self, typeDecl):
print "New type: %s (parentDecl=%s)" \
% (... | 62598f99a8ecb03325870f51 |
class PublicIngredientsApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_login_required(self): <NEW_LINE> <INDENT> res = self.client.get(INGREDIENTS_URL) <NEW_LINE> self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED) | Test the publicly available ingredients API | 62598f99d6c5a102081e1e8b |
class Solution: <NEW_LINE> <INDENT> def lowestCommonAncestor(self, root, A, B): <NEW_LINE> <INDENT> s_path=[] <NEW_LINE> marked = {} <NEW_LINE> s_path.append(root) <NEW_LINE> A_path = [] <NEW_LINE> B_path = [] <NEW_LINE> while len(A_path)==0 or len(B_path)==0: <NEW_LINE> <INDENT> if (not A_path) and s_path[-1]==A: <NEW... | @param root: The root of the binary search tree.
@param A and B: two nodes in a Binary.
@return: Return the least common ancestor(LCA) of the two nodes. | 62598f99460517430c431efd |
class ValidationError(Exception): <NEW_LINE> <INDENT> def __init__(self, messages): <NEW_LINE> <INDENT> if not isinstance(messages, (tuple, list)): <NEW_LINE> <INDENT> messages = [messages] <NEW_LINE> <DEDENT> self.messages = tuple(messages) <NEW_LINE> super(ValidationError, self).__init__("\n".join(self.messages)) <NE... | Raised when model validation failed in some way | 62598f995f7d997b871f9281 |
class Block(collections.namedtuple('Block', ['scope', 'unit_fn', 'args'])): <NEW_LINE> <INDENT> pass | A named tuple describing a ResNet block.
Its parts are:
scope: The scope of the `Block`.
unit_fn: The ShuffleNet V2 unit function which takes as input a `Tensor` and
returns another `Tensor` with the output of the ShuffleNet V2 unit.
args: A list of length equal to the number of units in the `Block`. The lis... | 62598f990a50d4780f705120 |
class Index(object): <NEW_LINE> <INDENT> pass | Base index class representing either an integer, a slice, an ellipsis | 62598f999b70327d1c57eaea |
class RequestRevoke(ShellCommand, RequestShellUI, ChangeStateOptions): <NEW_LINE> <INDENT> cmd = 'revoke' <NEW_LINE> func = call(RequestShellUI.controller.change_request_state) <NEW_LINE> func_defaults = {'method': 'revoke'} | Revoke a specific request.
If no message is specified $EDITOR is opened.
Example:
revoke [--message MESSAGE] | 62598f9932920d7e50bc5d9e |
class Logger: <NEW_LINE> <INDENT> LOG_PATH = None <NEW_LINE> VERBOSE_MODE = False <NEW_LINE> def __init__(self, verbose=False, path=None): <NEW_LINE> <INDENT> self.VERBOSE_MODE = verbose <NEW_LINE> self.LOG_PATH = path <NEW_LINE> <DEDENT> def log(self, message): <NEW_LINE> <INDENT> print(message) <NEW_LINE> if self.LOG... | Provides a logging "singleton" instance that can be passed around as needed | 62598f9932920d7e50bc5d9f |
class CodeArticleSerializer(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.CodeArticleModel <NEW_LINE> exclude = [] | Serializer for the Code Article model. | 62598f998da39b475be02f2c |
class TaskPriority(object): <NEW_LINE> <INDENT> def validator(self): <NEW_LINE> <INDENT> from flexget import validator <NEW_LINE> return validator.factory('integer') <NEW_LINE> <DEDENT> def on_process_start(self, task, config): <NEW_LINE> <INDENT> task.priority = task.config.get('priority', 65535) | Set task priorities | 62598f992c8b7c6e89bd3518 |
class PendingListView(LoginRequiredMixin, ListView): <NEW_LINE> <INDENT> model = Headword <NEW_LINE> paginate_by = 1000 <NEW_LINE> context_object_name = 'senses' <NEW_LINE> template_name = 'core/pending.html' <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if request.is_ajax(): <NEW_LINE> <INDEN... | Show roots of senses that do not have their own entries as headwords. | 62598f9971ff763f4b5e74c1 |
@python_2_unicode_compatible <NEW_LINE> class Insights(models.Model): <NEW_LINE> <INDENT> METRICS = None <NEW_LINE> GRAPH_ID_FIELD = 'graph_id' <NEW_LINE> RELATED_OBJECT_FIELD = None <NEW_LINE> REMOVE_PREFIX = True <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> def __init__(self, *args, ... | The base class for all models storing Facebook Insights metrics. | 62598f9963d6d428bbee2506 |
class Colormesh: <NEW_LINE> <INDENT> def __init__(self, field, x_basis='x', y_basis='z', remove_mean=False, remove_x_mean=False, remove_y_mean=False, divide_x_mean=False, cmap='RdBu_r', pos_def=False, polar=False, meridional=False, mollweide=False, ortho=False, vmin=None, vmax=None, log=False, vector_ind=None, label=No... | A struct containing information about a slice colormesh plot
# Attributes
field (str) :
The profile task name
x_basis, y_basis (strs) :
The dedalus basis names that the profile spans in the x- and y- direction of the plot
remove_mean (bool) :
If True, remove the mean value of the pr... | 62598f9924f1403a92685756 |
class RandomUniform(Initializer): <NEW_LINE> <INDENT> def __init__(self, minval=-0.05, maxval=0.05): <NEW_LINE> <INDENT> self.minval = minval <NEW_LINE> self.maxval = maxval <NEW_LINE> <DEDENT> def __call__(self, shape, dtype=np.float32): <NEW_LINE> <INDENT> return np.random.uniform( self.minval, self.maxval,shape, siz... | Initializer that generates tensors with a uniform distribution.
# Arguments
minval: A python scalar or a scalar tensor. Lower bound of the range
of random values to generate.
maxval: A python scalar or a scalar tensor. Upper bound of the range
of random values to generate. Defaults to 1 for float ... | 62598f993539df3088ecbfff |
class Connection(object): <NEW_LINE> <INDENT> def __init__(self, mail): <NEW_LINE> <INDENT> self.mail = mail <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> if self.mail.suppress: <NEW_LINE> <INDENT> self.host = None <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.host = self.configure_host() <NEW_LINE>... | Handles connection to host. | 62598f99d58c6744b42dc175 |
class BackGround(GameSprite): <NEW_LINE> <INDENT> def __init__(self, is_alt=False): <NEW_LINE> <INDENT> super().__init__("./images/background1.png") <NEW_LINE> if is_alt: <NEW_LINE> <INDENT> self.rect.y = -self.rect.height <NEW_LINE> <DEDENT> <DEDENT> def update(self): <NEW_LINE> <INDENT> super().update() <NEW_LINE> if... | 游戏背景精灵 | 62598f9999cbb53fe6830c1a |
class LDAPCryptConverter(Converter): <NEW_LINE> <INDENT> orig_prefix = "{CRYPT}" | Base class for all ``{CRYPT}`` converter. | 62598f998c0ade5d55dc3533 |
class ScaleMgr: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.scale_class_list = [] <NEW_LINE> <DEDENT> def addScaleClass(self, name, colour): <NEW_LINE> <INDENT> self.scale_class_list.append(ScaleClass(name, colour)) <NEW_LINE> <DEDENT> def addScale(self, name, colour, scale): <NEW_LINE> <INDENT> se... | Container for scale classes (contains ScaleClass objects)
| 62598f99009cb60464d0126e |
class ExclusionPersistence(ModelPersistence): <NEW_LINE> <INDENT> def __init__( self, model_class, limit_to_attributes, filter_query, target_dir=None, lookup_field='id', ): <NEW_LINE> <INDENT> super(ExclusionPersistence, self).__init__( model_class=model_class, lookup_field=lookup_field, sequence_name=None, target_dir=... | Specialized persistence for exclusive handling
Manages exclusive details needed when replacing settings from one
database to another. For example, prior to pulling a fresh copy
of production, one retains the configuration of the staging interventions
such that they'll continue to function as previously configured for... | 62598f99ac7a0e7691f72255 |
@dataclass <NEW_LINE> class Transfer(Model): <NEW_LINE> <INDENT> _collection = 'organizations/%s/transfers' <NEW_LINE> status: str = '' <NEW_LINE> departed_at: datetime = datetime.now() <NEW_LINE> arrived_at: datetime = datetime.now() <NEW_LINE> transfer_type: str = '' <NEW_LINE> sample_count: int = 0 <NEW_LINE> sender... | A group of samples or inventory being transferred between
two organizations. | 62598f993eb6a72ae038a387 |
class Timer(object): <NEW_LINE> <INDENT> def __init__(self, callback, interval, limit=None, start=False): <NEW_LINE> <INDENT> self.thread = threading.Thread(target=self._run, daemon=True) <NEW_LINE> self.callback = callback <NEW_LINE> self.interval = float(interval) <NEW_LINE> self.limit = limit <NEW_LINE> self._last_c... | Timer for making scheduled callbacks in a new thread.
Parameters
----------
callback : callable
Any callable object to be called on a timed schedule. Will be called
from a new thread, so this must be a thread-safe callable such as an
ObjectProxy.
interval : float
Minimum time to wait between callback i... | 62598f99a8ecb03325870f53 |
class processRoomRequest_args(object): <NEW_LINE> <INDENT> def __init__(self, chatroomId=None, userId=None, memberId=None,): <NEW_LINE> <INDENT> self.chatroomId = chatroomId <NEW_LINE> self.userId = userId <NEW_LINE> self.memberId = memberId <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_... | Attributes:
- chatroomId
- userId
- memberId | 62598f99e64d504609df925c |
class JournalListAPIView(generics.ListAPIView): <NEW_LINE> <INDENT> serializer_class = JournalSerializer <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> pagination_class = JournalPagination <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return Journal.objects.filter(user=self.request.user) | Журнал
Пользователь может смотреть только свой журнал | 62598f99f548e778e596b2f4 |
class USEquityPricingLoader(PipelineLoader): <NEW_LINE> <INDENT> def __init__(self, raw_price_loader, adjustments_loader): <NEW_LINE> <INDENT> self.raw_price_loader = raw_price_loader <NEW_LINE> self.adjustments_loader = adjustments_loader <NEW_LINE> self._calendar = default_nyse_schedule.all_execution_days <NEW_LINE> ... | PipelineLoader for US Equity Pricing data
Delegates loading of baselines and adjustments. | 62598f99a79ad16197769dac |
class GreedyMatchingProblem(MatchingProblem): <NEW_LINE> <INDENT> def __init__(self, elements, containing_sets, elements_by_sets): <NEW_LINE> <INDENT> self.elements = elements <NEW_LINE> self.containing_sets = containing_sets <NEW_LINE> self.elements_by_sets = elements_by_sets | Matching problem to be used with greedy solving of set cover. | 62598f99c432627299fa2d1f |
class _CanFindParentLink(object): <NEW_LINE> <INDENT> def _get_parent_link(self, object_id): <NEW_LINE> <INDENT> parent_link_data = {} <NEW_LINE> if hasattr(self, 'parent_link'): <NEW_LINE> <INDENT> parent_link = getattr(self.model, self.parent_link) <NEW_LINE> instance = self.model.objects.get(pk=object_id) <NEW_LINE>... | Adds function to find a link to a parent model | 62598f995f7d997b871f9282 |
class SchemaDisagreementException(Exception): <NEW_LINE> <INDENT> thrift_spec = ( ) <NEW_LINE> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not Non... | schemas are not in agreement across all nodes | 62598f99460517430c431efe |
class CustomIndexDashboard(Dashboard): <NEW_LINE> <INDENT> def init_with_context(self, context): <NEW_LINE> <INDENT> site_name = get_admin_site_name(context) <NEW_LINE> self.children.append(modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to... | Custom index dashboard for htdocs. | 62598f99adb09d7d5dc0a2d2 |
@attr.s(auto_attribs=True, init=False) <NEW_LINE> class ImportedProject(model.Model): <NEW_LINE> <INDENT> name: Optional[str] = None <NEW_LINE> url: Optional[str] = None <NEW_LINE> ref: Optional[str] = None <NEW_LINE> is_remote: Optional[bool] = None <NEW_LINE> def __init__( self, *, name: Optional[str] = None, url: Op... | Attributes:
name: Dependency name
url: Url for a remote dependency
ref: Ref for a remote dependency
is_remote: Flag signifying if a dependency is remote or local | 62598f99f8510a7c17d7e01c |
class BaseModel(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> app_label = 'user_profile' | BaseModel class. | 62598f9967a9b606de545d1e |
class LinearMap(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> <DEDENT> def add(self, k, v): <NEW_LINE> <INDENT> self.items.append() <NEW_LINE> <DEDENT> def get(self, k): <NEW_LINE> <INDENT> for ky, val in self.items: <NEW_LINE> <INDENT> if ky == k: <NEW_LINE> <INDENT> r... | A simple implementation of a hash table as a list of tuples | 62598f998da39b475be02f2d |
class RegisterIdentifier(GenericORMModel): <NEW_LINE> <INDENT> table = 'myidprovider' <NEW_LINE> @staticmethod <NEW_LINE> def user(value): <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def request_time(value): <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> ... | A service used to provide identifiers to drafts and published documents | 62598f99d7e4931a7ef3bde2 |
class MPLSPop(BessModule): <NEW_LINE> <INDENT> def __init__( self, remove_eth_header: bool = ..., next_eth_type: uint32 = ..., name: str = ... ): <NEW_LINE> <INDENT> ... <NEW_LINE> <DEDENT> def set( self, remove_eth_header: bool = ..., next_eth_type: uint32 = ... ): <NEW_LINE> <INDENT> ... | Pop MPLS label
The MPLS pop module removes MPLS labels
__Input Gates__: 1
__Output Gates__: 2 | 62598f9926068e7796d4c6ac |
class SysCtlINotify: <NEW_LINE> <INDENT> inotify_attrs = {'max_user_instances': 1, 'max_user_watches': 2, 'max_queued_events': 3} <NEW_LINE> def __init__(self, attrname, inotify_wrapper): <NEW_LINE> <INDENT> assert ctypes <NEW_LINE> self._attrname = attrname <NEW_LINE> self._inotify_wrapper = inotify_wrapper <NEW_LINE>... | Access (read, write) inotify's variables through sysctl. Usually it
requires administrator rights to update them.
Examples:
- Read max_queued_events attribute: myvar = max_queued_events.value
- Update max_queued_events attribute: max_queued_events.value = 42 | 62598f9955399d3f0562626a |
class IntervalLengthVsPeakValue(cpgTracker): <NEW_LINE> <INDENT> mPattern = "_macs_merged_intervals$" <NEW_LINE> def __call__(self, track, slice=None): <NEW_LINE> <INDENT> data = self.get( "SELECT length, peakval FROM %(track)s_macs_merged_intervals" % locals()) <NEW_LINE> return odict(zip(("length", "peakval"), zip(*d... | Length vs peak value | 62598f99498bea3a75a5786a |
class Mono(AutotoolsPackage): <NEW_LINE> <INDENT> homepage = "http://www.mono-project.com/" <NEW_LINE> url = "https://download.mono-project.com/sources/mono/mono-5.0.1.1.tar.bz2" <NEW_LINE> variant('patch-folder-path', default=False, description='Point SpecialFolder.CommonApplicationData folder ' 'into Spack insta... | Mono is a software platform designed to allow developers to easily
create cross platform applications. It is an open source
implementation of Microsoft's .NET Framework based on the ECMA
standards for C# and the Common Language Runtime. | 62598f99be383301e0253545 |
class GetModelInContextMixin( object ): <NEW_LINE> <INDENT> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> context['model'] = self.model <NEW_LINE> if hasattr( self, 'parent' ): <NEW_LINE> <INDENT> context['parent'] = self.parent <NEW_LINE> <DEDENT> ret... | more DRY, move some copied and pasted code here | 62598f9991af0d3eaad39b53 |
class Todo(sjb.common.base.Item): <NEW_LINE> <INDENT> def __init__(self, text, priority=None, tags=None, finished=None, created_date=None, finished_date=None, oid=None): <NEW_LINE> <INDENT> super().__init__(oid) <NEW_LINE> self.text = text <NEW_LINE> if priority is not None: <NEW_LINE> <INDENT> self.priority = priority... | Simple class representing a todo item. | 62598f991f5feb6acb16296c |
class LoadMediaAction(media_action.MediaAction): <NEW_LINE> <INDENT> def __init__(self, selector=None, timeout_in_seconds=0, event_to_await='canplaythrough'): <NEW_LINE> <INDENT> super(LoadMediaAction, self).__init__() <NEW_LINE> self._selector = selector or '' <NEW_LINE> self._timeout_in_seconds = timeout_in_seconds <... | For calling load() on media elements and waiting for an event to fire.
| 62598f990c0af96317c560ce |
class JustStrategy(SearchStrategy): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> SearchStrategy.__init__(self) <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'JustStrategy(value=%r)' % (self.value,) <NEW_LINE> <DEDENT> def do_draw(self, data): <NEW... | A strategy which simply returns a single fixed value with probability 1. | 62598f99fff4ab517ebcd538 |
class CertSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Certificate <NEW_LINE> fields = ('url', 'title', 'subt',) | Сериализация сертификата. | 62598f993c8af77a43b67de2 |
class QuasiRNN(snt.AbstractModule): <NEW_LINE> <INDENT> def __init__(self, filter_width, num_hidden, pool_type='fo', zone_out=0.0, name="quasi_rnn"): <NEW_LINE> <INDENT> super(QuasiRNN, self).__init__(name=name) <NEW_LINE> self._filter_width = filter_width <NEW_LINE> self._num_hidden = num_hidden <NEW_LINE> assert pool... | Implementation of Quasi-Recurrent Neural Network | 62598f99bd1bec0571e14f69 |
class MaintenanceControlPanelFunctionalTest(unittest.TestCase): <NEW_LINE> <INDENT> layer = PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.app = self.layer['app'] <NEW_LINE> self.request = self.layer['request'] <NEW_LINE> self.portal = self.layer['portal'] <NEW_LINE> self.port... | Test that changes in the maintenance control panel are actually
stored in the registry. | 62598f994527f215b58e9c2f |
class CreateUserView(View): <NEW_LINE> <INDENT> def get(self,request,*args,**kwargs): <NEW_LINE> <INDENT> obj = forms.RegisterCreateUser() <NEW_LINE> return render(request,'user/createuser.html',{'obj':obj}) <NEW_LINE> <DEDENT> def post(self,request): <NEW_LINE> <INDENT> print(request.POST) <NEW_LINE> ret = {'status':0... | 添加用户 | 62598f992ae34c7f260aae2c |
class NotSupportedWarning(ModuleParserWarning): <NEW_LINE> <INDENT> pass | Warning for pybindgen GccxmlParser, to report something pybindgen does not support. | 62598f992ae34c7f260aae2b |
class Element: <NEW_LINE> <INDENT> def __init__(self, driver, *locator): <NEW_LINE> <INDENT> self.driver = driver <NEW_LINE> self.locator = locator <NEW_LINE> <DEDENT> def click(self): <NEW_LINE> <INDENT> self.driver.find_element(*self.locator).click() <NEW_LINE> <DEDENT> def enter_text(self, text): <NEW_LINE> <INDENT>... | Docstring | 62598f99a79ad16197769dae |
class Transaction: <NEW_LINE> <INDENT> deep = False <NEW_LINE> def __init__(self, *targets): <NEW_LINE> <INDENT> self.targets = targets <NEW_LINE> self.Commit() <NEW_LINE> <DEDENT> def Commit(self): <NEW_LINE> <INDENT> self.states = [Memento(target, self.deep) for target in self.targets] <NEW_LINE> <DEDENT> def Rollbac... | A transaction guard. This is really just
syntactic suggar arount a memento closure. | 62598f994428ac0f6e658276 |
class WordCount(luigi.Task): <NEW_LINE> <INDENT> input_file = luigi.Parameter() <NEW_LINE> output_file = luigi.Parameter(default='/tmp/wordcount') <NEW_LINE> def requires(self): <NEW_LINE> <INDENT> return InputFile(self.input_file) <NEW_LINE> <DEDENT> def output(self): <NEW_LINE> <INDENT> return luigi.LocalTarget(self.... | A task that counts the number of words in a file | 62598f993cc13d1c6d4654b7 |
class TestHBaselineExamples(unittest.TestCase): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def run_exp(env_name, multiagent): <NEW_LINE> <INDENT> train_h_baselines( env_name=env_name, args=[ env_name, "--initial_exploration_steps", "1", "--total_steps", "10" ], multiagent=multiagent, ) <NEW_LINE> <DEDENT> def test_si... | Tests the functionality of the h-baselines features in train.py.
This is done by running a set of experiments for 10 time-steps and
confirming that it runs. | 62598f9910dbd63aa1c70902 |
class DemoView(views.generic.DetailView): <NEW_LINE> <INDENT> model = Question <NEW_LINE> template_name = 'polls/demo.html' <NEW_LINE> def get_order(self, ctx): <NEW_LINE> <INDENT> other_user_responses = self.object.response_set.reverse() <NEW_LINE> default_order = ctx['object'].item_set.all() <NEW_LINE> return default... | Define demo poll, which is not used. Need more work on this. | 62598f99004d5f362081eea2 |
class IEditor(IViewer): <NEW_LINE> <INDENT> pass | Interface implemented by the editor classes capable of editing the
IProperty.
Implementing this interface means that the IProperty serving as the data
source of the editor can be modified through the editor. It does not
restrict the editor from editing the IProperty internally, though if the
IProperty is in a read-onl... | 62598f99f8510a7c17d7e01d |
class NSpellathon: <NEW_LINE> <INDENT> central_index = -1 <NEW_LINE> letters = '' <NEW_LINE> def __init__(self, word, central): <NEW_LINE> <INDENT> self.letters = word <NEW_LINE> self.central_index = central <NEW_LINE> <DEDENT> def get_puzzle(self): <NEW_LINE> <INDENT> return self.letters <NEW_LINE> <DEDENT> def get_ce... | Defines a spellathon puzzle.
Includes the letters of the word in the puzzle,
and the index of the letter in the array of letters
to use as the central letter in the puzzle. | 62598f998da39b475be02f2f |
class Model224InputSensorUnits(IntEnum): <NEW_LINE> <INDENT> KELVIN = 1 <NEW_LINE> CELSIUS = 2 <NEW_LINE> SENSOR = 3 | Enumeration for the preferred units of an input sensor. | 62598f99a79ad16197769daf |
class Question(models.Model): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True) <NEW_LINE> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> topic = models.CharField(choices=TOPICS_CHOICES, default='General', max_length=100) <NEW_LINE> word = models.TextField() <NEW_LINE> question = models.TextFiel... | this class represents a question object | 62598f9960cbc95b06364096 |
@ROI_HEADS_REGISTRY.register() <NEW_LINE> class StandardROIHeadsWithSubClass(StandardROIHeads): <NEW_LINE> <INDENT> def __init__(self, cfg, input_shape): <NEW_LINE> <INDENT> super().__init__(cfg, input_shape) <NEW_LINE> self.subclass_on = cfg.MODEL.SUBCLASS.SUBCLASS_ON <NEW_LINE> if not self.subclass_on: <NEW_LINE> <IN... | A Standard ROIHeads which contains an addition of subclass head. | 62598f9916aa5153ce400249 |
class phi1DTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.prior_seterr = numpy.seterr(divide='raise') <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> numpy.seterr(**self.prior_seterr) <NEW_LINE> <DEDENT> xx = dadi.Numerics.default_grid(20) <NEW_LINE> def test_snm(... | Test routines for generating input phi's.
These tests are primarily motivated by the desire to avoid divide by
zero warnings. | 62598f99dd821e528d6d8c80 |
class MetricAggregation(resource.Resource): <NEW_LINE> <INDENT> resource_key = 'datapoints' <NEW_LINE> resources_key = 'datapoints' <NEW_LINE> base_path = '/metric-data' <NEW_LINE> service = cloud_eye_service.CloudEyeService() <NEW_LINE> allow_list = True <NEW_LINE> _query_mapping = QueryParameters('namespace', 'metric... | CloudEye metric data aggregation resource | 62598f9921a7993f00c65ccd |
class CreateStandaloneGatewayRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.EnvId = None <NEW_LINE> self.GatewayAlias = None <NEW_LINE> self.VpcId = None <NEW_LINE> self.SubnetIds = None <NEW_LINE> self.GatewayDesc = None <NEW_LINE> self.PackageVersion = None <NEW_LINE> <DEDENT... | CreateStandaloneGateway请求参数结构体
| 62598f991f5feb6acb16296e |
class ItemShippingPackageRequirement(object): <NEW_LINE> <INDENT> swagger_types = { 'package_name': 'str', 'package_oid': 'int' } <NEW_LINE> attribute_map = { 'package_name': 'package_name', 'package_oid': 'package_oid' } <NEW_LINE> def __init__(self, package_name=None, package_oid=None): <NEW_LINE> <INDENT> self._pack... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f99596a8972361279cc |
class Corpus(list): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_tsv(this_class, stream, print_sent_confidence): <NEW_LINE> <INDENT> stream = iter(stream) <NEW_LINE> corpus = this_class() <NEW_LINE> for line in stream: <NEW_LINE> <INDENT> if not print_sent_confidence: <NEW_LINE> <INDENT> (ident, subj, pred, obj... | Inherits from list. Corpus parses the ClausIE output and stores
a list of Triple. | 62598f9971ff763f4b5e74c5 |
class Takeoff: <NEW_LINE> <INDENT> def __init__(self, target_z=10., runtime=5.): <NEW_LINE> <INDENT> self.runtime = runtime <NEW_LINE> self.init_sim() <NEW_LINE> self.action_repeat = 3 <NEW_LINE> self.state_size = self.action_repeat * 6 <NEW_LINE> self.action_low = 0 <NEW_LINE> self.action_high = 900 <NEW_LINE> self.ac... | Task (environment) that defines the goal and provides feedback to the agent. | 62598f990c0af96317c560d0 |
class TestRoundStream(RoundwaredTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(type(self), TestRoundStream).setUp(self) <NEW_LINE> self.project1 = mommy.make(Project, name='Project One', ordering=1, recording_radius=16) <NEW_LINE> self.session1 = mommy.make(Session, project=self.project1, lan... | Exercise methods and instances of RoundStream
| 62598f9985dfad0860cbf91a |
class FallbackToBackend(Exception): <NEW_LINE> <INDENT> def __init__(self, backend): <NEW_LINE> <INDENT> self.backend = backend | Raised when configuration should fallback to another backend | 62598f99d99f1b3c44d053fd |
class Unit(models.Model): <NEW_LINE> <INDENT> code = models.CharField( max_length=20, null=True, blank=True, unique=True, verbose_name=_("Code") ) <NEW_LINE> description = models.TextField( blank=True, null=True, verbose_name=_("Description") ) <NEW_LINE> dimension = models.CharField( max_length=32, null=True, blank=Tr... | Units for measures
This model must be synchronized with the Aquo domain table 'Eenheid'.
http://www.idsw.nl/Aquo/uitwisselmodellen/index.htm?goto=6:192 | 62598f99d58c6744b42dc177 |
class MaskedArrowTrainingWorkflow(Workflow): <NEW_LINE> <INDENT> WORKFLOW_NAME = "MaskedArrowTraining" <NEW_LINE> CONDITION_TABLE_TYPE = MaskedResequencingConditionTable <NEW_LINE> SMRTPIPE_PRESETS = ("extras/pbsmrtpipe-mappings-preset.xml",) <NEW_LINE> R_SCRIPTS = ("R/arrowTraining.R", "R/Bauhaus2.R") <NEW_... | Map subreads to the reference and train an arrow model from the
resulting alignments, filtering out reads that overlap with
masked regions. | 62598f994527f215b58e9c31 |
class HostSpec: <NEW_LINE> <INDENT> __slots__ = ('num_workers', 'is_ssh', 'host', 'port') <NEW_LINE> def __init__(self, url): <NEW_LINE> <INDENT> front, ssh, back, = url.partition('ssh://') <NEW_LINE> h_p, *nw = (back if ssh else front).split('/') <NEW_LINE> if not h_p: <NEW_LINE> <INDENT> raise ValueError(f'Bad server... | Remote host specification. | 62598f998c0ade5d55dc3535 |
class BaseChecker(object): <NEW_LINE> <INDENT> def __init__(self, storage=None): <NEW_LINE> <INDENT> self.storage = storage <NEW_LINE> <DEDENT> def tester(self): <NEW_LINE> <INDENT> raise NotImplementedError( "Please implement a tester() method in your class") <NEW_LINE> <DEDENT> def create_template(self): <NEW_LINE> <... | BaseChecker should be inherited in all the checkers subclasses | 62598f99507cdc57c63a4ae2 |
class issueRequestTokenForAutoLogin_result(object): <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), (1, TType.STRUCT, 'e', (ChannelException, ChannelException.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None, e=None,): <NEW_LINE> <INDENT> self.success = success <NEW_... | Attributes:
- success
- e | 62598f99851cf427c66b8014 |
class Unit: <NEW_LINE> <INDENT> def __init__( self, unit_name, leader, hp, lp, mp, atk, defense, skl, pry, tags, primary_class, secondary_class, tertiary_class): <NEW_LINE> <INDENT> self.unit_name = unit_name <NEW_LINE> self.leader = leader <NEW_LINE> self.base_max_hp = hp <NEW_LINE> self.base_max_lp = lp <NEW_LINE> se... | A team-member who uses abilities and shields the team when active. | 62598f9907f4c71912baf199 |
@urls.register <NEW_LINE> class Flavor(generic.View): <NEW_LINE> <INDENT> url_regex = r'nova/flavors/(?P<flavor_id>[^/]+)/$' <NEW_LINE> @rest_utils.ajax() <NEW_LINE> def get(self, request, flavor_id): <NEW_LINE> <INDENT> get_extras = self.extract_boolean(request, 'get_extras') <NEW_LINE> get_access_list = self.extract_... | API for retrieving a single flavor
| 62598f99a79ad16197769db0 |
class TestingRecipe(BaseRecipe): <NEW_LINE> <INDENT> release_filenames = {'10.0': 'blob-%s.tgz'} <NEW_LINE> nightly_filenames = {'10.0rc1c': '10.0%s.tar.gz'} <NEW_LINE> release_dl_url = {'10.0': 'http://release.odoo.test/src/'} | A subclass with just enough few defaults for unit testing. | 62598f99097d151d1a2c0d71 |
class CompositeSampler(sampler.Sampler): <NEW_LINE> <INDENT> def __init__(self, samplers): <NEW_LINE> <INDENT> self.samplers = samplers <NEW_LINE> <DEDENT> def sample(self, operation_name, trace_id, duration): <NEW_LINE> <INDENT> if not self.samplers: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> for a_sampler in... | Tracing span composite sampler. | 62598f990a50d4780f705125 |
class HeightAboveTerrain(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, HeightAboveTerrain, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, HeightAboveTerrain, name) <NEW_LINE>... | Proxy of C++ osgSim::HeightAboveTerrain class | 62598f9960cbc95b06364098 |
class UpdateNewScheduledMessage(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = ["message"] <NEW_LINE> ID = 0x39a51dfb <NEW_LINE> QUALNAME = "types.UpdateNewScheduledMessage" <NEW_LINE> def __init__(self, *, message: "raw.base.Message") -> None: <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> @stat... | This object is a constructor of the base type :obj:`~pyrogram.raw.base.Update`.
Details:
- Layer: ``122``
- ID: ``0x39a51dfb``
Parameters:
message: :obj:`Message <pyrogram.raw.base.Message>` | 62598f99b7558d589546337c |
class ExternalAppTraverser(DefaultPublishTraverse): <NEW_LINE> <INDENT> adapts(IExternalApp, IRequest) <NEW_LINE> def publishTraverse(self, request, name): <NEW_LINE> <INDENT> if name not in PLONE_PATHS: <NEW_LINE> <INDENT> if request['TraversalRequestNameStack']: <NEW_LINE> <INDENT> request['TraversalRequestNameStack'... | Traversal adapter for External Application sub-requests | 62598f99435de62698e9bb42 |
class OrgTeacherView(View): <NEW_LINE> <INDENT> def get(self,request,org_id): <NEW_LINE> <INDENT> course_org = CourseOrg.objects.get(id=int(org_id)) <NEW_LINE> all_teachers = course_org.teacher_set.all() <NEW_LINE> has_fav = False <NEW_LINE> if request.user.is_authenticated(): <NEW_LINE> <INDENT> if UserFavorite.object... | 机构教师 | 62598f99dd821e528d6d8c82 |
class Accountlog(models.Model): <NEW_LINE> <INDENT> logId = models.AutoField(primary_key=True) <NEW_LINE> user = models.ForeignKey(User, db_column='userId') <NEW_LINE> accountTime = models.DateTimeField() <NEW_LINE> accountType = models.SmallIntegerField() <NEW_LINE> money = models.DecimalField(max_digits=20, decimal_p... | 账单表 | 62598f99097d151d1a2c0d72 |
class SpotifyAuthorization: <NEW_LINE> <INDENT> def __init__(self, client_id, client_secret, redirect_uri, scope): <NEW_LINE> <INDENT> self.client_id = client_id <NEW_LINE> self.client_secret = client_secret <NEW_LINE> self.redirect_uri = redirect_uri <NEW_LINE> self.scope = scope <NEW_LINE> self.refresh_token = None <... | Authorize your application.
After authorize, 'refresh token' code writes to 'refresh_token.txt' for refreshing 'access token'
Example use of:
- a = SpotifyAuthorization(client_id, client_secret, redirect_uri, scope)
- a.main() | 62598f999b70327d1c57eaf0 |
class LongTabu(TabularBase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> packages = [Package('tabu'), Package('longtable')] <NEW_LINE> super().__init__(*args, packages=packages, **kwargs) | A class that represents a longtabu (more flexible multipage table). | 62598f991f5feb6acb162970 |
class MCASDataConnectorDataTypes(AlertsDataTypeOfDataConnector): <NEW_LINE> <INDENT> _attribute_map = { 'alerts': {'key': 'alerts', 'type': 'DataConnectorDataTypeCommon'}, 'discovery_logs': {'key': 'discoveryLogs', 'type': 'DataConnectorDataTypeCommon'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> ... | The available data types for MCAS (Microsoft Cloud App Security) data connector.
:param alerts: Alerts data type connection.
:type alerts: ~azure.mgmt.securityinsight.models.DataConnectorDataTypeCommon
:param discovery_logs: Discovery log data type connection.
:type discovery_logs: ~azure.mgmt.securityinsight.models.D... | 62598f9932920d7e50bc5da4 |
class ReplayGain(object): <NEW_LINE> <INDENT> def __init__(self, track_gain, track_peak, album_gain, album_peak): <NEW_LINE> <INDENT> self.track_gain = float(track_gain) <NEW_LINE> self.track_peak = float(track_peak) <NEW_LINE> self.album_gain = float(album_gain) <NEW_LINE> self.album_peak = float(album_peak) <NEW_LINE... | a container for ReplayGain data | 62598f99596a8972361279ce |
class Species(object): <NEW_LINE> <INDENT> def __init__(self, key, generation): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.created = generation <NEW_LINE> self.last_improved = generation <NEW_LINE> self.representative = None <NEW_LINE> self.members = {} <NEW_LINE> self.fitness = None <NEW_LINE> self.adjusted_fi... | 各種族のクラス
種族のキーや代表者やメンバー
おそらく平均の適応度などを保存する | 62598f992c8b7c6e89bd351e |
class Solution: <NEW_LINE> <INDENT> def bestRotation(self, A): <NEW_LINE> <INDENT> n = len(A) <NEW_LINE> scores = [1] * n <NEW_LINE> for i in range(n): <NEW_LINE> <INDENT> scores[(i - A[i] + 1 + n) % n] -= 1 <NEW_LINE> <DEDENT> for i in range(1, n): <NEW_LINE> <INDENT> scores[i] += scores[i - 1] <NEW_LINE> <DEDENT> ret... | @param A: an array
@return: the smallest index K that corresponds to the highest score we could receive | 62598f9932920d7e50bc5da5 |
class Menu(engine.Module): <NEW_LINE> <INDENT> def __init__(self, _engine, _buttons): <NEW_LINE> <INDENT> super(Menu, self).__init__(_engine) <NEW_LINE> self.image = utils.loadImage('data/gfx/menu.jpg') <NEW_LINE> self.logo = utils.loadImage('data/gfx/logo.png', alpha = True) <NEW_LINE> self._resx, self._resy = self._e... | Menu główne. | 62598f99462c4b4f79dbb758 |
class TestNew(TestService): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> TestService.setUp(self) <NEW_LINE> self.session = mock.MagicMock(spec=Session) <NEW_LINE> <DEDENT> @given( text(), text(), dictionaries(text(), text()), dictionaries(text(), text()) ) <NEW_LINE> def test_creating_new_services( self, na... | Contains unit tests for :meth:`topchef.models.Service.new` | 62598f99596a8972361279cf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.