code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class StatMonitor(object): <NEW_LINE> <INDENT> def __init__(self, files, on_change=None, interval=0.5): <NEW_LINE> <INDENT> self._files = files <NEW_LINE> self._interval = interval <NEW_LINE> self._on_change = on_change <NEW_LINE> self._modify_times = defaultdict(int) <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <IN... | File change monitor based on `stat` system call | 6259904896565a6dacd2d959 |
class MetadataSolutionRelated(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'tables': {'required': True}, } <NEW_LINE> _attribute_map = { 'tables': {'key': 'tables', 'type': '[str]'}, 'functions': {'key': 'functions', 'type': '[str]'}, 'categories': {'key': 'categories', 'type': '[str]'}, 'queries': ... | The related metadata items for the Log Analytics solution.
All required parameters must be populated in order to send to Azure.
:param tables: Required. The tables related to the Log Analytics solution.
:type tables: list[str]
:param functions: The functions related to the Log Analytics solution.
:type functions: lis... | 62599048287bf620b6272f88 |
class InfoPC(DebuggerSubcommand): <NEW_LINE> <INDENT> min_abbrev = 2 <NEW_LINE> max_args = 0 <NEW_LINE> need_stack = True <NEW_LINE> short_help = "Show Program Counter or Instruction Offset information" <NEW_LINE> def run(self, args): <NEW_LINE> <INDENT> mainfile = self.core.filename(None) <NEW_LINE> if self.core.is_ru... | **info pc**
List the current program counter or bytecode offset,
and disassemble the instructions around that.
See also:
---------
`info line`, `info program` | 625990488e71fb1e983bce64 |
class TestCustomer(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(self): <NEW_LINE> <INDENT> self.customer = Customer('Mike Mead', 'yourmomshouse', 'nashville', 'TN', 37075, '615-200-1919') <NEW_LINE> <DEDENT> def test_create_customer(self): <NEW_LINE> <INDENT> self.assertEqual(self.cust... | Set up and test a new customer | 6259904821a7993f00c67309 |
class Char(Node): <NEW_LINE> <INDENT> def __init__(self, c, state): <NEW_LINE> <INDENT> Node.__init__(self) <NEW_LINE> self.c = c <NEW_LINE> self.font_output = state.font_output <NEW_LINE> assert isinstance(state.font, (str, int)) <NEW_LINE> self.font = state.font <NEW_LINE> self.font_class = state.font_class <NEW_LINE... | Represents a single character. Unlike TeX, the font information
and metrics are stored with each :class:`Char` to make it easier
to lookup the font metrics when needed. Note that TeX boxes have
a width, height, and depth, unlike Type1 and Truetype which use a
full bounding box and an advance in the x-direction. The ... | 62599048d4950a0f3b111812 |
class PiglitCLTest(PiglitBaseTest): <NEW_LINE> <INDENT> def __init__(self, command, run_concurrent=CL_CONCURRENT, **kwargs): <NEW_LINE> <INDENT> super(PiglitCLTest, self).__init__(command, run_concurrent, **kwargs) | OpenCL specific Test class.
Set concurrency based on CL requirements. | 6259904815baa72349463331 |
class LinkedList(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._begin = None <NEW_LINE> <DEDENT> def insert(self, x): <NEW_LINE> <INDENT> self._begin = [x, self._begin] <NEW_LINE> <DEDENT> def pop(self): <NEW_LINE> <INDENT> assert self._begin is not None, "List is empty" <NEW_LINE> x = self._begin... | Класс описывающи связный список.
>>> A = LinkedList()
>>> print(A.is_empty())
True
>>> A.insert(5)
>>> print(A.is_empty())
False
>>> A.insert(10)
>>> print(A.pop())
10
>>> print(A.is_empty())
False
>>> print(A.pop())
5
>>> print(A.is_empty())
True | 6259904826068e7796d4dce4 |
class FineTuningLR(LearningRateScheduler, LRVisualizer): <NEW_LINE> <INDENT> def __init__(self, lr_start=0.00001, lr_max=0.00005, lr_min=0.00001, lr_rampup_epochs=5, lr_sustain_epochs=0, lr_exp_decay=.8, verbose=0): <NEW_LINE> <INDENT> self.lr_start = lr_start <NEW_LINE> self.lr_max = lr_max <NEW_LINE> self.lr_min = lr... | Starts small (to not ruin delicate pre-trained weights),
increases, then decays exponentially.
# Arguments:
lr_start: the initial learning rate
lr_max: the peak learning rate
lr_min: the lowest learning rate at the end
lr_rampup_epochs: number of epochs before peak
lr_sustain_epochs: number of epoc... | 6259904824f1403a9268629d |
class PomoSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> owner = serializers.ReadOnlyField(source='owner.username') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Pomo <NEW_LINE> fields = ('id', 'name', 'observation', 'start', 'end', 'owner') | Serializer to map the Model instance into JSON format. | 62599048d7e4931a7ef3d417 |
class dummyfile_document(document): <NEW_LINE> <INDENT> contexts = [] <NEW_LINE> lines = [] | A totally fake document. | 6259904829b78933be26aa93 |
class PseudoScreen: <NEW_LINE> <INDENT> def __init__(self, x, y, width, height): <NEW_LINE> <INDENT> self.x, self.y, self.width, self.height = x, y, width, height | This may be a Xinerama screen or a RandR CRTC, both of which are
rectagular sections of an actual Screen. | 62599048435de62698e9d1a7 |
class SpeedTestResult(object): <NEW_LINE> <INDENT> def __init__(self, download, startTime, ping=None, upload=None, endTime=None): <NEW_LINE> <INDENT> super(SpeedTestResult, self).__init__() <NEW_LINE> self.download = download <NEW_LINE> self.upload = upload <NEW_LINE> self.ping = ping <NEW_LINE> self.startTime = startT... | Represents the results of a test performed by a SpeedTester. | 62599048d10714528d69f05e |
class RandomCrop(): <NEW_LINE> <INDENT> def __init__(self, out_size): <NEW_LINE> <INDENT> assert isinstance(out_size, (int, tuple)) <NEW_LINE> if isinstance(out_size, int): <NEW_LINE> <INDENT> self.out_size = (out_size, out_size) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> assert len(out_size) == 2 <NEW_LINE> self.ou... | 随机裁剪制定大小的图片 | 62599048287bf620b6272f8a |
class Redis(MakefilePackage): <NEW_LINE> <INDENT> homepage = "https://redis.io" <NEW_LINE> url = "http://download.redis.io/releases/redis-5.0.3.tar.gz" <NEW_LINE> version('5.0.3', sha256='e290b4ddf817b26254a74d5d564095b11f9cd20d8f165459efa53eb63cd93e02') <NEW_LINE> version('5.0.2', sha256='937dde6164001c083e87316aa... | Redis is an open source (BSD licensed), in-memory data structure store,
used as a database, cache and message broker.
It supports data structures such as strings, hashes, lists, sets, sorted
sets with range queries, bitmaps, hyperloglogs, geospatial indexes with
radius queries and streams. Redis has built-in replicati... | 6259904807f4c71912bb07d4 |
class Gift(Advert, Location): <NEW_LINE> <INDENT> gift_type = models.ForeignKey(GiftType, on_delete=models.CASCADE, verbose_name=_('gift type')) <NEW_LINE> image = models.ImageField(upload_to=user_directory_path, null=True, blank=True) <NEW_LINE> favourites = models.ManyToManyField(User, related_name='favourite_gifts',... | handmade
free classes
free ticket
volunteering
pet
items | 62599048ec188e330fdf9c3f |
class TestGridPointLinkToParticles(amusetest.TestCase): <NEW_LINE> <INDENT> def test1(self): <NEW_LINE> <INDENT> grid = datamodel.Grid(2,3) <NEW_LINE> grid.rho = [[2,3,4],[5,6,7]] | units.kg / units.m**3 <NEW_LINE> particles = datamodel.Particles(3) <NEW_LINE> particles.mass = [2,3,4] | units.kg <NEW_LINE> grid[0][0].p... | Tests One-to-Many relation between gridpoints and particles | 625990488a349b6b436875ef |
class ConfigServiceV2Servicer(object): <NEW_LINE> <INDENT> def ListSinks(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> def GetSink(... | Service for configuring sinks used to export log entries outside of
Stackdriver Logging. | 62599048e76e3b2f99fd9dae |
class DelayedSymval(DelayedSymbol): <NEW_LINE> <INDENT> def callback(self, value: gdb.Symbol) -> None: <NEW_LINE> <INDENT> symval = value.value() <NEW_LINE> if symval.type.code == gdb.TYPE_CODE_FUNC: <NEW_LINE> <INDENT> symval = symval.address <NEW_LINE> <DEDENT> self.value = symval <NEW_LINE> <DEDENT> def __str__(self... | A :obj:`DelayedSymbol` that returns the :obj:`gdb.Value`
associated with the symbol.
Args:
name: The name of the symbol. | 62599048d6c5a102081e34bf |
class InspectRaw(LoggingMixin, Command): <NEW_LINE> <INDENT> def __init__(self, app, app_args): <NEW_LINE> <INDENT> super().__init__(app, app_args) <NEW_LINE> <DEDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super().get_parser(prog_name) <NEW_LINE> parser.add_argument("--basedir", type=Path, requi... | Display information about a data set that has not yet been imported | 62599048379a373c97d9a3cd |
class HeadlessTarget(Target): <NEW_LINE> <INDENT> clientURL = None <NEW_LINE> def show(self, variable=None): <NEW_LINE> <INDENT> super(HeadlessTarget, self).show(variable) <NEW_LINE> if not(self.server.alive()): <NEW_LINE> <INDENT> self.clientURL = 'http://localhost:' + str(self.server.get_port()) + "/index.html" <NEW_... | An interactive visualization canvas. | 625990481f5feb6acb163f98 |
class ConfFake(object): <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> self.__dict__ = params <NEW_LINE> for k, v in self.__dict__.items(): <NEW_LINE> <INDENT> if isinstance(v, unicode): <NEW_LINE> <INDENT> self.__dict__[k] = v.encode('utf-8') <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def __repr__(self... | minimal fake config object to replace oslo with controlled params | 6259904882261d6c52730897 |
class TestIpamsvcUtilization(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testIpamsvcUtilization(self): <NEW_LINE> <INDENT> pass | IpamsvcUtilization unit test stubs | 6259904829b78933be26aa94 |
@EnableDebugWindow <NEW_LINE> class SearchAddress(Transform): <NEW_LINE> <INDENT> input_type = Location <NEW_LINE> def do_transform(self, request, response, config): <NEW_LINE> <INDENT> location = request.entity <NEW_LINE> fields = location.fields <NEW_LINE> if fields.get("streetaddress"): <NEW_LINE> <INDENT> name = fi... | Gathers people from TruePeopleSearch | 62599048d53ae8145f919803 |
class Dependency(object): <NEW_LINE> <INDENT> def __init__(self, name, libs, check_headers): <NEW_LINE> <INDENT> self.build = True <NEW_LINE> self.name = name <NEW_LINE> self.libs = libs <NEW_LINE> self.check_headers = check_headers <NEW_LINE> for x in VALID_FIELDS: <NEW_LINE> <INDENT> self.__setattr__(x, None) | A dependency for the OXSX build, contains build locations, flags etc
Effectively a python dict where the possible attributes are limited to the above | 6259904815baa72349463334 |
@register_type <NEW_LINE> class Template(object): <NEW_LINE> <INDENT> type_id = 3 <NEW_LINE> __slots__ = ["parts", "id"] <NEW_LINE> def __init__(self, parts): <NEW_LINE> <INDENT> if type(parts) is str: <NEW_LINE> <INDENT> parts = parts.split("{}") <NEW_LINE> <DEDENT> self.parts = parts <NEW_LINE> self.id = intern.inter... | A representation of the term template with list of parts [parts]
and unique idenfitier [id]. | 62599048cad5886f8bdc5a50 |
class ICustomerSubscriptionDeletedEvent(BaseWebhookEvent): <NEW_LINE> <INDENT> pass | Occurs whenever a customer ends their subscription. | 62599048d99f1b3c44d06a3e |
class Ilastik05ImportDeserializer(AppletSerializer): <NEW_LINE> <INDENT> def __init__(self, topLevelOperator): <NEW_LINE> <INDENT> super(Ilastik05ImportDeserializer, self).__init__("") <NEW_LINE> self.mainOperator = topLevelOperator <NEW_LINE> <DEDENT> def serializeToHdf5(self, hdf5Group, projectFilePath): <NEW_LINE> <... | Special (de)serializer for importing ilastik 0.5 projects.
For now, this class is import-only. Only the deserialize function is implemented.
If the project is not an ilastik0.5 project, this serializer does nothing. | 625990488e71fb1e983bce68 |
class ExactlyOnceResultsChecker: <NEW_LINE> <INDENT> def __init__(self, topology_name, expected_results_handler, actual_results_handler): <NEW_LINE> <INDENT> self.topology_name = topology_name <NEW_LINE> self.expected_results_handler = expected_results_handler <NEW_LINE> self.actual_results_handler = actual_results_han... | Compares what results we found against what was expected. Verifies and exact match | 625990487cff6e4e811b6ddd |
@registry.register_problem <NEW_LINE> class TranslateEncsWmt32k(TranslateProblem): <NEW_LINE> <INDENT> @property <NEW_LINE> def targeted_vocab_size(self): <NEW_LINE> <INDENT> return 2 ** 15 <NEW_LINE> <DEDENT> @property <NEW_LINE> def vocab_name(self): <NEW_LINE> <INDENT> return "vocab.encs" <NEW_LINE> <DEDENT> def gen... | Problem spec for WMT English-Czech translation. | 62599048d4950a0f3b111814 |
class AbstractFunctor(metaclass=ABCMeta): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def __or__(self, func: Callable) -> "AbstractFunctor": <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @enrichFunction <NEW_LINE> def fmap(self, func: Callable) -> "AbstractFunctor": <NEW_LINE> <INDENT> return self.__or__(func) | An abstract class which represents a Functor conception.
| 625990488a43f66fc4bf3539 |
class ExplorationStatisticsHandler(EditorHandler): <NEW_LINE> <INDENT> @require_editor <NEW_LINE> def get(self, exploration_id): <NEW_LINE> <INDENT> self.render_json({ 'num_visits': stats_services.get_exploration_visit_count( exploration_id), 'num_completions': stats_services.get_exploration_completed_count( exploratio... | Returns statistics for an exploration. | 62599048baa26c4b54d5064e |
class DelimitedTextConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'column_separator': {'key': 'ColumnSeparator', 'type': 'str', 'xml': {'name': 'ColumnSeparator'}}, 'field_quote': {'key': 'FieldQuote', 'type': 'str', 'xml': {'name': 'FieldQuote'}}, 'record_separator': {'key': 'RecordS... | Groups the settings used for interpreting the blob data if the blob is delimited text formatted.
:param column_separator: The string used to separate columns.
:type column_separator: str
:param field_quote: The string used to quote a specific field.
:type field_quote: str
:param record_separator: The string used to se... | 62599048462c4b4f79dbcda4 |
class Category(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=200, help_text='Enter a book category (e.g. Best seller)') <NEW_LINE> book = models.ForeignKey('Book', on_delete=models.SET_NULL, null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return f'{self.book.book_id}, {self.book.tit... | Model representing a book category. | 62599048596a897236128f81 |
class Takeoff(BaseTask): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> cube_size = 300.0 <NEW_LINE> self.observation_space = spaces.Box( np.array([- cube_size / 2, - cube_size / 2, 0.0, -1.0, -1.0, -1.0, -1.0]), np.array([ cube_size / 2, cube_size / 2, cube_size, 1.0, 1.0, 1.0, 1.0])) <NEW_LI... | Simple task where the goal is to lift off the ground and reach a target height. | 62599048097d151d1a2c2411 |
class SimplePandasDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, pd, transform=None): <NEW_LINE> <INDENT> self.pd_frame = pd.copy() <NEW_LINE> self.transform = transform <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.pd_frame) <NEW_LINE> <DEDENT> def __getitem__(self, idx): <NEW_LI... | Pandas dataset. | 625990488e05c05ec3f6f82d |
class ResultSet(list): <NEW_LINE> <INDENT> pass | A list like object that holds results from a Musixmatch API query. | 62599048d53ae8145f919805 |
class ItemList(list): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> if isinstance(index, int): <NEW_LINE> <INDENT> return super(ItemList, self).__getitem__(index) <NEW_LINE> <DEDENT> for item in self: <NEW_LINE> <IND... | List with keys
Raises:
KeyError is item is not in list
Example:
>>> Obj = type("Object", (object,), {})
>>> obj = Obj()
>>> obj.name = "Test"
>>> l = ItemList(key="name")
>>> l.append(obj)
>>> l[0] == obj
True
>>> l["Test"] == obj
True
>>> try:
... l["NotInList"]
... | 62599048a8ecb033258725b7 |
class GameUnit: <NEW_LINE> <INDENT> def __init__(self, unitinfo, sprite, team, position): <NEW_LINE> <INDENT> self.unitinfo = unitinfo <NEW_LINE> self.name = unitinfo["name"] <NEW_LINE> self.maxHealth = unitinfo["stats"][0] <NEW_LINE> self.currentHealth = self.maxHealth <NEW_LINE> self.attack = unitinfo["stats"][1] <NE... | base class for a generic unit
buildings have 0 speed for reasons
:parameter unitinfo: the basic stats and info for the units
:parameter sprite (Surface): the sprite of the unit, preferably pixel art
:parameter team (Team()): what team this unit is on
:parameter position (int[y, x]): the position of the unit on the boa... | 6259904807f4c71912bb07d9 |
class ClearDbView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def post(self, request): <NEW_LINE> <INDENT> return JsonResponse({"code": 1, "msg": "this operation not allow!", "data": ""}) <NEW_LINE> data = {"code": 0, "msg": "successful", "data": ""} <NEW_LINE> redis_name = request.POST.get("redis_name", None) <NEW_... | 清空DB | 6259904863b5f9789fe86513 |
class KeyAuthorizationAnnotatedChallenge(AnnotatedChallenge): <NEW_LINE> <INDENT> __slots__ = ('challb', 'domain', 'account_key') <NEW_LINE> def response_and_validation(self): <NEW_LINE> <INDENT> return self.challb.chall.response_and_validation(self.account_key) | Client annotated `KeyAuthorizationChallenge` challenge. | 62599048ec188e330fdf9c43 |
class ExtendedMessage(object): <NEW_LINE> <INDENT> template = None <NEW_LINE> html = None <NEW_LINE> msg = None <NEW_LINE> status = None <NEW_LINE> def __init__(self, template, status, **kwds): <NEW_LINE> <INDENT> self.html = template % kwds <NEW_LINE> self.msg = kwds['msg'] <NEW_LINE> self.status = status <NEW_LINE> <... | An string to be rendered as HTML
It holds metadata about the contained information | 625990488a349b6b436875f3 |
@dataclass <NEW_LINE> class BoxAnnotation(Annotation): <NEW_LINE> <INDENT> label: str <NEW_LINE> x: Union[float, int] <NEW_LINE> y: Union[float, int] <NEW_LINE> width: Union[float, int] <NEW_LINE> height: Union[float, int] <NEW_LINE> reference_id: str <NEW_LINE> annotation_id: Optional[str] = None <NEW_LINE> metadata: ... | A bounding box annotation.
::
from nucleus import BoxAnnotation
box = BoxAnnotation(
label="car",
x=0,
y=0,
width=10,
height=10,
reference_id="image_1",
annotation_id="image_1_car_box_1",
metadata={"vehicle_color": "red"}
)
Parameters:
... | 6259904873bcbd0ca4bcb634 |
class ExocrineStage8(_CaseInsensitiveEnum): <NEW_LINE> <INDENT> n0 = 'N0' <NEW_LINE> n1 = 'N1' <NEW_LINE> n2 = 'N2' <NEW_LINE> nx = 'NX' <NEW_LINE> unknown = 'Unknown' | Extent of the regional lymph node involvement for exocrine pancreatic
carcinoma based on clinical stage information combined with operative
findings, and evidence obtained from pathology review when surgery is
the first definitive therapy, using AJCC Ed. 8 criteria. Yikes. | 62599048462c4b4f79dbcda6 |
class BaseCartItem(models.Model): <NEW_LINE> <INDENT> cart = models.ForeignKey(get_model_string('Cart'), related_name="items") <NEW_LINE> quantity = models.IntegerField() <NEW_LINE> product = models.ForeignKey(get_model_string('Product')) <NEW_LINE> class Meta(object): <NEW_LINE> <INDENT> abstract = True <NEW_LINE> app... | This is a holder for the quantity of items in the cart and, obviously, a
pointer to the actual Product being purchased :) | 62599048a79ad1619776b427 |
class CustomFieldWidgetVisibility(object): <NEW_LINE> <INDENT> implements(IATWidgetVisibility) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.sort = 10 <NEW_LINE> self.hidden_fields = ['AdHoc', 'Composite', 'InvoiceExclude'] <NEW_LINE> self.random = 4 <NEW_LINE> <DEDE... | Forces a set of AnalysisRequest fields to be invisible depending on
some arbitrary condition. | 62599048d7e4931a7ef3d41d |
class PostDetail(DetailView): <NEW_LINE> <INDENT> template_name = 'post/detail.html' <NEW_LINE> context_object_name = 'post' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> content_type_obj = ContentType.objects.get_for_model(self.model) <NEW_... | Blog and News detail view | 62599048379a373c97d9a3d1 |
class TestSnrAntenna(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> nants = 5 <NEW_LINE> self.shape = (2, 10, 2, nants*(nants-1)//2) <NEW_LINE> self.vis = np.ones(self.shape, np.complex64) <NEW_LINE> self.weights = np.ones(self.shape, np.float32) <NEW_LINE> self.bls_lookup = np.array([ (0,... | Tests for :func:`katsdpcal.calprocs.snr_antenna` | 6259904816aa5153ce401894 |
class TestQueryFunction(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestQueryFunction, self).setUp() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> super(TestQueryFunction, self).tearDown() <NEW_LINE> <DEDENT> def _test_init(self, value): <NEW_LINE> <INDENT> if (isinstance(val... | A test suite for the QueryFunction class.
Since QueryFunction is a simple wrapper for the Enumeration primitive,
only a few tests pertaining to construction are needed. | 625990481f5feb6acb163f9c |
@dbus_interface(DISK_INITIALIZATION.interface_name) <NEW_LINE> class DiskInitializationInterface(KickstartModuleInterfaceTemplate): <NEW_LINE> <INDENT> def connect_signals(self): <NEW_LINE> <INDENT> super().connect_signals() <NEW_LINE> self.watch_property("InitializationMode", self.implementation.initialization_mode_ch... | DBus interface for the disk initialization module. | 6259904810dbd63aa1c71f82 |
class Tube: <NEW_LINE> <INDENT> def __init__(self, server): <NEW_LINE> <INDENT> self.incoming = os.path.join('/tmp', '{}.in'.format(server)) <NEW_LINE> self.outgoing = os.path.join('/tmp', '{}.out'.format(server)) <NEW_LINE> <DEDENT> def identify(self, nick, gecos): <NEW_LINE> <INDENT> with open(self.outgoing, 'w', enc... | Object for interacting with tubes. | 62599048009cb60464d028dc |
class V1beta1ResourceAttributes(object): <NEW_LINE> <INDENT> def __init__(self, namespace=None, verb=None, group=None, version=None, resource=None, subresource=None, name=None): <NEW_LINE> <INDENT> self.swagger_types = { 'namespace': 'str', 'verb': 'str', 'group': 'str', 'version': 'str', 'resource': 'str', 'subresourc... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259904823e79379d538d8a5 |
class ModInt(object): <NEW_LINE> <INDENT> def __init__(self, x, n): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.n = n <NEW_LINE> <DEDENT> def __add__(self, m): <NEW_LINE> <INDENT> if isinstance(m, ModInt): <NEW_LINE> <INDENT> assert self.n == m.n <NEW_LINE> return ModInt((self.x + m.x) % self.n, self.n) <NEW_LINE> <... | A number in Z/nZ, i.e., modulo n.
Variables:
* x = number modulo n
* n
Implemented: additions and subtraction.
N.B.: not a very useful class. | 6259904807f4c71912bb07da |
class VertexAStar(Vertex): <NEW_LINE> <INDENT> DEFAULT_MOVE_COST = 10 <NEW_LINE> def __init__(self, coords, father=None): <NEW_LINE> <INDENT> super(VertexAStar).__init__(coords, father) <NEW_LINE> if father: <NEW_LINE> <INDENT> self.g = father.g + self.DEFAULT_MOVE_COST <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> sel... | Vertex for A* algorithm must implement 3 new fields:
g - length from start vertex to current vertex. Initially it will be equals to 0,
On each loop iteration it will be equals to father.g + cost of move from
previous point to current point. For vertical and horizontal moves cost will be 10.
For diagonal mov... | 62599048d99f1b3c44d06a42 |
class DummyMaker: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.levels = None <NEW_LINE> <DEDENT> def fit(self, categorical_array): <NEW_LINE> <INDENT> u, indices = np.unique(categorical_array, return_inverse=True) <NEW_LINE> self.levels = [u, indices] <NEW_LINE> <DEDENT> def transform(self, categori... | Class takes a categorical variable and returns a DataFrame with a column
for each category having values of 0 or 1 for each row. | 6259904863d6d428bbee3b71 |
class _CommandRemove: <NEW_LINE> <INDENT> def GetResources(self): <NEW_LINE> <INDENT> return {'Pixmap' : 'Arch_Remove', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Arch_Remove","Remove component"), 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Arch_Remove","Remove the selected components from their parents, or create a hole in a com... | the Arch Add command definition | 6259904830dc7b76659a0bda |
class TestBuildsystem(unittest.TestCase): <NEW_LINE> <INDENT> def test_raises_not_implemented(self): <NEW_LINE> <INDENT> bs = buildsys.Buildsystem() <NEW_LINE> for method in ( bs.getBuild, bs.getLatestBuilds, bs.moveBuild, bs.ssl_login, bs.listBuildRPMs, bs.listTags, bs.listTagged, bs.taskFinished, bs.tagBuild, bs.unta... | This test class contains tests for the Buildsystem class. | 6259904815baa72349463339 |
class AverageVariabilityOfTimeBetweenAttacksForEachVoiceFeature( featuresModule.FeatureExtractor): <NEW_LINE> <INDENT> id = 'R25' <NEW_LINE> def __init__(self, dataOrStream=None, *arguments, **keywords): <NEW_LINE> <INDENT> featuresModule.FeatureExtractor.__init__(self, dataOrStream=dataOrStream, *arguments, **keyword... | Average standard deviation, in seconds, of time between Note On events on individual
channels that contain at least one note.
>>> s = corpus.parse('bwv66.6')
>>> fe = features.jSymbolic.AverageVariabilityOfTimeBetweenAttacksForEachVoiceFeature(s)
>>> f = fe.extract()
>>> f.vector
[0.1773926...] | 62599049ec188e330fdf9c45 |
class Amenity(AbstractItem): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name_plural = "amenities" | Amenity Model Definition | 62599049baa26c4b54d50652 |
class MediafoneTransport(HttpRpcTransport): <NEW_LINE> <INDENT> transport_type = 'sms' <NEW_LINE> EXPECTED_FIELDS = set(['to', 'from', 'sms']) <NEW_LINE> def setup_transport(self): <NEW_LINE> <INDENT> self._username = self.config['username'] <NEW_LINE> self._password = self.config['password'] <NEW_LINE> self._outbound_... | HTTP transport for Mediafone Cameroun.
:param str web_path:
The HTTP path to listen on.
:param int web_port:
The HTTP port
:param str transport_name:
The name this transport instance will use to create its queues
:param str username:
Mediafone account username.
:param str password:
Mediafone accoun... | 625990498a349b6b436875f5 |
class LessVariableDetail(LessVariableMixin, CreateModelMixin, generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> lookup_field = 'name' <NEW_LINE> lookup_url_kwarg = 'name' <NEW_LINE> serializer_class = LessVariableSerializer <NEW_LINE> def delete(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return supe... | Retrieves a css variable
**Examples
.. code-block:: http
GET /api/themes/sitecss/variables/primary-color/ HTTP/1.1
responds
.. code-block:: json
{
"name": "primary-color",
"value": "#0000ff"
} | 62599049e76e3b2f99fd9db4 |
class TripletLoss(nn.Module): <NEW_LINE> <INDENT> def __init__(self, margin=0.3): <NEW_LINE> <INDENT> super(TripletLoss, self).__init__() <NEW_LINE> self.margin = margin <NEW_LINE> if margin == 0.: <NEW_LINE> <INDENT> self.ranking_loss = nn.SoftMarginLoss() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.ranking_los... | Triplet loss with hard positive/negative mining.
Reference:
Hermans et al. In Defense of the Triplet Loss for Person Re-Identification. arXiv:1703.07737.
Imported from `<https://github.com/Cysu/open-reid/blob/master/reid/loss/triplet.py>`_.
Args:
margin (float, optional): margin for triplet. Default is 0.3. | 62599049009cb60464d028de |
class c_ic_na_1(): <NEW_LINE> <INDENT> pass | class for IEC 104 interrogation command
QOI information element
IOA=0
CoT <control>: 6 or 8 | 62599049d53ae8145f919809 |
@api.resource('/list') <NEW_LINE> class ListAllAirports(Resource): <NEW_LINE> <INDENT> @swagger.operation( notes='Biggest first' ) <NEW_LINE> @cache.cached() <NEW_LINE> def get(self): <NEW_LINE> <INDENT> all_airports = Airports.query.all() <NEW_LINE> result = airports_schema.dump(all_airports) <NEW_LINE> return jsonify... | Retrieve all airports, sorted by number of passengers | 62599049d10714528d69f062 |
class SampleRate(object): <NEW_LINE> <INDENT> def __init__(self, frequency, duration): <NEW_LINE> <INDENT> if frequency.astype(np.int) <= 0: <NEW_LINE> <INDENT> raise ValueError('frequency must be positive') <NEW_LINE> <DEDENT> if duration.astype(np.int) <= 0: <NEW_LINE> <INDENT> raise ValueError('duration must be posi... | `SampleRate` describes the constant frequency at which samples are taken
from a continuous signal, and the duration of each sample.
Instances of this class could describe an audio sampling rate (e.g. 44.1kHz)
or the strided windows often used in short-time fourier transforms
Args:
frequency (numpy.timedelta64): T... | 6259904996565a6dacd2d95e |
class TestEnabledQuirks(TestEnabled): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.purge() <NEW_LINE> self.quirks = True | Test enabled selectors with quirks. | 6259904907f4c71912bb07dc |
class Debug(enum.IntEnum): <NEW_LINE> <INDENT> NEXT_ARGS = (1 << 0) <NEW_LINE> EXTRACT = (1 << 1) <NEW_LINE> UPDATE_POS = (1 << 2) <NEW_LINE> NONE = 0 <NEW_LINE> ALL = (NEXT_ARGS | EXTRACT | UPDATE_POS) | Flags that enable/disable various debug logs in the tokeninzer. | 625990498e71fb1e983bce6e |
class INCRement(SCPINode, SCPIQuery, SCPISet): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "INCRement" <NEW_LINE> args = ["1"] | SOURce:POWer:STARt:STEP:INCRement
Arguments: 1 | 625990497cff6e4e811b6de3 |
class InvalidResolution(Error): <NEW_LINE> <INDENT> pass | The resolution is not valid because it is not listed within the
resolutionlist for the checklist item. | 62599049d4950a0f3b111817 |
@register('second') <NEW_LINE> class SecondSubfield(Subfield): <NEW_LINE> <INDENT> def run(self, val): <NEW_LINE> <INDENT> if val.precision >= 14: <NEW_LINE> <INDENT> return QuantityValue(amount=val.parsed.second) | >>> SecondSubfield()(TimeValue(time="+1996-03-17T04:15:08Z", precision=14))
QuantityValue(amount=8)
>>> SecondSubfield()(TimeValue(time="+1996-03-17T04:15:00Z", precision=13))
UndefinedValue() | 6259904945492302aabfd87c |
class PageManager(PublisherManager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return PageQuerySet(self.model) <NEW_LINE> <DEDENT> def drafts(self): <NEW_LINE> <INDENT> return super(PageManager, self).drafts().exclude( publisher_state=self.model.PUBLISHER_STATE_DELETE ) <NEW_LINE> <DEDENT> def pu... | Use draft() and public() methods for accessing the corresponding
instances. | 6259904915baa7234946333b |
class CollegeJiaowuBase(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.session = requests.session() <NEW_LINE> <DEDENT> def get_encoding_from_reponse(self, r): <NEW_LINE> <INDENT> encoding = requests.utils.get_encodings_from_content(r.text) <NEW_LINE> return encoding[0] if encoding else reque... | 基类
| 62599049a8ecb033258725bc |
class ServiceContext(InstanceContext): <NEW_LINE> <INDENT> def __init__(self, version, sid): <NEW_LINE> <INDENT> super(ServiceContext, self).__init__(version) <NEW_LINE> self._solution = {'sid': sid, } <NEW_LINE> self._uri = '/Services/{sid}'.format(**self._solution) <NEW_LINE> self._sessions = None <NEW_LINE> self._ph... | PLEASE NOTE that this class contains beta products that are subject to
change. Use them with caution. | 6259904926068e7796d4dcee |
class ServerVirtualInterfaceController(wsgi.Controller): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.compute_api = compute.API() <NEW_LINE> self.network_api = network.API() <NEW_LINE> super(ServerVirtualInterfaceController, self).__init__() <NEW_LINE> <DEDENT> def _items(self, req, server_id, entit... | The instance VIF API controller for the OpenStack API.
This API is deprecated from the Microversion '2.44'. | 62599049d6c5a102081e34c6 |
class TPLinkWR740NDv1(cgm_devices.DeviceBase): <NEW_LINE> <INDENT> identifier = 'tp-wr740ndv1' <NEW_LINE> name = "WR740ND (v1)" <NEW_LINE> manufacturer = "TP-Link" <NEW_LINE> url = 'http://www.tp-link.com/' <NEW_LINE> architecture = 'ar71xx' <NEW_LINE> radios = [ cgm_devices.IntegratedRadio('wifi0', _("Integrated wirel... | TP-Link WR740NDv1 device descriptor. | 6259904976d4e153a661dc4b |
class NFVIPoP(Model): <NEW_LINE> <INDENT> def __init__(self, id=None, location=None, gw_ip_address=None, capabilities=None, available_capabilities=None, failure_rate=None, internal_latency=None): <NEW_LINE> <INDENT> self.swagger_types = { 'id': str, 'location': Location, 'gw_ip_address': str, 'capabilities': NFVIPoPCap... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259904971ff763f4b5e8b4f |
class PortletRenderer(ColumnPortletManagerRenderer): <NEW_LINE> <INDENT> adapts(Interface, IDefaultBrowserLayer, IBrowserView, IPortletManager) <NEW_LINE> template = ViewPageTemplateFile('templates/renderer.pt') | A renderer for the content portlets | 62599049d7e4931a7ef3d421 |
class Course(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=64, unique=True) <NEW_LINE> price = models.PositiveSmallIntegerField() <NEW_LINE> period = models.PositiveSmallIntegerField(verbose_name='Period(Month)') <NEW_LINE> outline = models.TextField() <NEW_LINE> def __str__(self): <NEW_LINE> <I... | Course Table | 6259904973bcbd0ca4bcb638 |
class EditCustomLanguagePackInfo(Object): <NEW_LINE> <INDENT> ID = "editCustomLanguagePackInfo" <NEW_LINE> def __init__(self, info, extra=None, **kwargs): <NEW_LINE> <INDENT> self.extra = extra <NEW_LINE> self.info = info <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "EditCustomLanguagePackIn... | Edits information about a custom local language pack in the current localization target. Can be called before authorization
Attributes:
ID (:obj:`str`): ``EditCustomLanguagePackInfo``
Args:
info (:class:`telegram.api.types.languagePackInfo`):
New information about the custom local language pack
Retu... | 6259904982261d6c5273089b |
class ComputeLogFileData( NamedTuple( "ComputeLogFileData", [ ("path", str), ("data", Optional[str]), ("cursor", int), ("size", int), ("download_url", Optional[str]), ], ) ): <NEW_LINE> <INDENT> def __new__( cls, path: str, data: Optional[str], cursor: int, size: int, download_url: Optional[str] ): <NEW_LINE> <INDENT> ... | Representation of a chunk of compute execution log data | 62599049d6c5a102081e34c7 |
class Underlying(Base): <NEW_LINE> <INDENT> __tablename__ = 'underlying' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> wordtype_id = Column(Integer, ForeignKey('wordtype.id')) <NEW_LINE> segmenttype_id = Column(Integer, ForeignKey('segmenttype.id')) <NEW_LINE> segmenttype = relationship("SegmentType", ba... | Many-to-many relation between word types and their underlying/canonical
segments. | 6259904907d97122c421804d |
class PositiveSumConstraint(ArrayConstraint): <NEW_LINE> <INDENT> def __init__(self, sum_constraint): <NEW_LINE> <INDENT> if sum_constraint is None: <NEW_LINE> <INDENT> raise ValueError("Sum may not be None.") <NEW_LINE> <DEDENT> if math.isclose(sum_constraint, 0): <NEW_LINE> <INDENT> raise ValueError("Sum may not be 0... | Constrain a decision-mutable array so that all elements sum to a given value.
All elements will be positive. | 6259904915baa7234946333c |
class ApplicationGatewayPrivateEndpointConnection(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'type': {'readonly': True}, 'private_endpoint': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'link_identifier': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key... | Private Endpoint connection on an application gateway.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:param name: Name of the private endpoint connection on an application gateway.
:type name: str
:ivar etag: A unique read-only string tha... | 6259904923e79379d538d8a9 |
class Course(models.Model): <NEW_LINE> <INDENT> CourseID = models.AutoField(primary_key=True) <NEW_LINE> Faculty = models.ForeignKey(Faculty, on_delete=models.SET_NULL, null=True) <NEW_LINE> CourseName = models.CharField(max_length=60) | Course Model
- Courses added manually at the this point in time | 625990490a366e3fb87ddd91 |
class EventForwarder(object): <NEW_LINE> <INDENT> def __init__(self, hass, restrict_origin=None): <NEW_LINE> <INDENT> self.hass = hass <NEW_LINE> self.restrict_origin = restrict_origin <NEW_LINE> self.logger = logging.getLogger(__name__) <NEW_LINE> self._targets = {} <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> ... | Listens for events and forwards to specified APIs. | 6259904996565a6dacd2d95f |
class ConflictError(ClientError): <NEW_LINE> <INDENT> def __init__(self, location): <NEW_LINE> <INDENT> self.location = location <NEW_LINE> super(ConflictError, self).__init__() | Error for when the server returns a 409 (Conflict) HTTP status.
In the version of ACME implemented by Boulder, this is used to find an
account if you only have the private key, but don't know the account URL. | 6259904907f4c71912bb07de |
class Accomplishment(TimeStampedModel): <NEW_LINE> <INDENT> user = models.ForeignKey(Reader, on_delete=models.CASCADE) <NEW_LINE> challenge = models.ForeignKey(Challenge, on_delete=models.CASCADE) <NEW_LINE> books = models.ManyToManyField(Book) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return '{0} has accom... | Accomplishment class is the definition for model returning short summary of challenge completed by user and with what book.
This model contains 3 attributes namely user, challenge and books. | 62599049287bf620b6272f94 |
class FTSRankCd(FTSRank): <NEW_LINE> <INDENT> sql_function = 'ts_rank_cd' <NEW_LINE> name = 'FTSRankCd' | Interface for PostgreSQL ts_rank_cd
Provides a interface for
:pg_docs:`12.3.3. Ranking Search Results *ts_rank_cd*
<textsearch-controls.html#TEXTSEARCH-RANKING>`
:param fieldlookup: required
:param normalization: list or tuple of integers PostgreSQL normalization
values
:returns: rank_cd
:raises: exc... | 6259904915baa7234946333d |
class BaseCallbackDispatcher(object): <NEW_LINE> <INDENT> def on_callback(self, callback, *args): <NEW_LINE> <INDENT> raise NotImplementedError | Base callback dispatcher class.
Inherit from this class and override the :func:`on_callback` method to
change how callbacks are dispatched. | 6259904923e79379d538d8aa |
class SelfAssessmentTest(OpenAssessmentTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp('self_only') <NEW_LINE> <DEDENT> @retry() <NEW_LINE> @pytest.mark.acceptance <NEW_LINE> def test_self_assessment(self): <NEW_LINE> <INDENT> self.do_self_assessment() <NEW_LINE> <DEDENT> @retry() <NEW_LIN... | Test the self-assessment flow. | 62599049be383301e0254bc5 |
class StackAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> form = StackAdminForm <NEW_LINE> list_display = ("name", "course_id", "status", "provider", "launch_timestamp",) <NEW_LINE> list_filter = ("course_id", "status", "provider",) <NEW_LINE> list_editable = ("status", "provider") <NEW_LINE> list_select_related = True <... | Custom stack admin class. Uses a custom form, enables searching and
filtering, and totally excludes fields used by the XBlock solely to
communicate with tasks or jobs. Of the remaining fields, only `status` and
`provider` should be editable.
Adding stacks manually is forbidden, but deleting records is allowed. A
cu... | 6259904926068e7796d4dcf0 |
class Generator(object): <NEW_LINE> <INDENT> def __init__(self, adapter, buddy_id, q_messages): <NEW_LINE> <INDENT> self.adapter = adapter <NEW_LINE> self.buddy_id = buddy_id <NEW_LINE> self.q_messages = q_messages <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> buddy = Buddy.get(... | Simplisim Generator class. | 62599049d6c5a102081e34c8 |
class AbstractCommand(PasswordPromptMixin, Command): <NEW_LINE> <INDENT> log = logging.getLogger(__name__) <NEW_LINE> save_strategy = SaveStrategy <NEW_LINE> get_strategy = GetStrategy <NEW_LINE> delete_strategy = SoftDeleteStrategy <NEW_LINE> skip_fields = ['remote_instance'] <NEW_LINE> def __init__(self, app, app_arg... | Abstract Command with log. | 6259904924f1403a926862a3 |
class TestRunme(unittest.TestCase): <NEW_LINE> <INDENT> def test_main_on_sample_in(self): <NEW_LINE> <INDENT> with io.StringIO() as target_output_stream: <NEW_LINE> <INDENT> sys.stdout, old_stdout = target_output_stream, sys.stdout <NEW_LINE> runme.main('sample.in') <NEW_LINE> from_main = target_output_stream.getvalue(... | Simple tests for the Safety in Numbers problem
for Google Code Jam 2012
Round 1B | 62599049d7e4931a7ef3d423 |
class UploadToPathAndRenameTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.upload_to_path_and_rename = utils.UploadToPathAndRename('test') <NEW_LINE> self.instance = DummyInstance() <NEW_LINE> <DEDENT> def test_extension_preserved(self): <NEW_LINE> <INDENT> result = self.upload_to_path... | Tests for utils.UploadToPathAndRename | 6259904910dbd63aa1c71f88 |
class TestRead: <NEW_LINE> <INDENT> def test_read_slack(self, testfs_ntfs_stable1): <NEW_LINE> <INDENT> for img_path in testfs_ntfs_stable1: <NEW_LINE> <INDENT> with open(img_path, 'rb+') as img: <NEW_LINE> <INDENT> ntfs = MftSlack(img_path, img) <NEW_LINE> teststring = "This is a simple write test." <NEW_LINE> with io... | Test reading slackspace | 62599049a79ad1619776b42d |
class Menu(models.Model): <NEW_LINE> <INDENT> name = models.CharField(unique=True, max_length=32, verbose_name="菜单名") <NEW_LINE> url_type = models.SmallIntegerField(choices=((0, 'relative_name'), (1, 'absolute_url')), verbose_name="菜单类型") <NEW_LINE> url_name = models.CharField(unique=True, max_length=128) <NEW_LINE> cl... | 动态菜单 | 6259904915baa7234946333e |
class OpenUvEntity(Entity): <NEW_LINE> <INDENT> def __init__(self, openuv): <NEW_LINE> <INDENT> self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION} <NEW_LINE> self._name = None <NEW_LINE> self.openuv = openuv <NEW_LINE> <DEDENT> @property <NEW_LINE> def device_state_attributes(self): <NEW_LINE> <INDENT> return self._... | Define a generic OpenUV entity. | 62599049b57a9660fecd2e29 |
class ChimeraStats(object): <NEW_LINE> <INDENT> pass | stats used to assess quality of chimera | 6259904930c21e258be99bb3 |
class ASTProcessor(object, metaclass=ASTProcessorMeta): <NEW_LINE> <INDENT> def __call__(self, node, **kw): <NEW_LINE> <INDENT> return getattr(self, node.__class__.__name__)(node, **kw) | The class hides the need to specify ASTProcessorMeta metaclass | 62599049287bf620b6272f96 |
class HipchatAlerter(base.AlerterBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._async_client = None <NEW_LINE> <DEDENT> def _get_client(self): <NEW_LINE> <INDENT> if not self._async_client: <NEW_LINE> <INDENT> self._async_client = httpclient.AsyncHTTPClient() <NEW_LINE> log.debug('Generating a... | Send a notification to a HipChat room.
For more details read the AlerterBase documentation.
Expects the following configured alerter:
>>> /services/food/barn
alerter:
hipchat:
- room: Engineering
- from: zk_monitor
- token: <token>
children: 1
The "from" parameter wil... | 6259904926238365f5fadf0a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.