code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class CryptoPrice: <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> self.url = "https://coinmarketcap.com/" <NEW_LINE> self.session = aiohttp.ClientSession() <NEW_LINE> <DEDENT> def __unload(self): <NEW_LINE> <INDENT> self.session.close() <NEW_LINE> <DEDENT> @commands.command()... | Fetches cryptocurrency information | 6259900621a7993f00c66abe |
class BoundedWString(AbstractWString): <NEW_LINE> <INDENT> __slots__ = ('maximum_size', ) <NEW_LINE> def __init__(self, maximum_size: int): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.maximum_size = maximum_size <NEW_LINE> <DEDENT> def has_maximum_size(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDEN... | A 16-bit string type. | 62599006bf627c535bcb1ff0 |
class ActionGroupResourcePaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[ActionGroupResource]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ActionGroupResourcePaged, self).__init__(*args, **k... | A paging container for iterating over a list of :class:`ActionGroupResource <azure.mgmt.monitor.models.ActionGroupResource>` object | 62599006462c4b4f79dbc54a |
class Media(Segment): <NEW_LINE> <INDENT> ui_name = "Unknown media" <NEW_LINE> extra_serializable_attributes = [] <NEW_LINE> def __init__(self, container, signature=None, force=False): <NEW_LINE> <INDENT> container.header = self.calc_header(container) <NEW_LINE> size = len(container) - container.header_length <NEW_LINE... | Base class for what is typically the root segment in a Container,
describing the type of media the data represents: floppy disk image,
cassette image, cartridge, etc.
Media can contain a filesystem, which is used to further subdivide the data
from the container into segments to represent each logical section in the
fi... | 625990060a366e3fb87dd535 |
class PhantomJSDriver(Process): <NEW_LINE> <INDENT> def __init__(self, exe_path='phantomjs', extra_args=None, params=None): <NEW_LINE> <INDENT> script_path = wpull.util.get_package_filename('driver/phantomjs.js') <NEW_LINE> self._config_file = tempfile.NamedTemporaryFile( prefix='tmp-wpull-', suffix='.json', delete=Fal... | PhantomJS processing.
Args:
exe_path (str): Path of the PhantomJS executable.
extra_args (list): Additional arguments for PhantomJS. Most likely,
you'll want to pass proxy settings for capturing traffic.
params (:class:`PhantomJSDriverParams`): Parameters for controlling
the processing pipe... | 62599006bf627c535bcb1ff2 |
class ExactMatchingPolicy(NameMatchingPolicy): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def match(self, name): <NEW_LINE> <INDENT> return self.name == name | Tests that name exact match to argument. | 6259900615fb5d323ce7f887 |
class TerrainManager: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._terrains = {} <NEW_LINE> self._point_table = {} <NEW_LINE> <DEDENT> def __contains__(self, code): <NEW_LINE> <INDENT> return code in self._terrains <NEW_LINE> <DEDENT> def __getitem__(self, code): <NEW_LINE> <INDENT> return self._te... | A manager for terrain types. | 62599007d164cc6175821ac3 |
class PackageFactory(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def incoming(cls, format, zip_path=None, metadata_files=None): <NEW_LINE> <INDENT> formats = app.config.get("PACKAGE_HANDLERS", {}) <NEW_LINE> cname = formats.get(format) <NEW_LINE> if cname is None: <NEW_LINE> <INDENT> msg = "No handler for pack... | Factory which provides methods for accessing specific PackageHandler implementations | 62599007627d3e7fe0e079e4 |
class LinuxVXLANDataplaneDriver(dp_drivers.DataplaneDriver): <NEW_LINE> <INDENT> dataplane_instance_class = LinuxVXLANEVIDataplane <NEW_LINE> type = consts.EVPN <NEW_LINE> required_kernel = "3.11.0" <NEW_LINE> encaps = [exa.Encapsulation(exa.Encapsulation.Type.VXLAN)] <NEW_LINE> driver_opts = [ cfg.IntOpt("vxlan_dst_po... | E-VPN Dataplane driver relying on Linux kernel linuxbridge VXLAN | 6259900721a7993f00c66ac4 |
class NumpyToPILConvertor(NumpyPILConvertor): <NEW_LINE> <INDENT> def __call__(self, img): <NEW_LINE> <INDENT> return self.numpyToPIL(img) | ===================
NumpyToPILConvertor
===================
A numpy to PIL image convertor | 6259900715fb5d323ce7f88b |
class PlaySound(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> <DEDENT> def run(self, command): <NEW_LINE> <INDENT> cmd = [ 'aplay', self.path, ] <NEW_LINE> player = subprocess.call(cmd) | Play a wav file from the given path. | 625990070a366e3fb87dd53b |
class Data(object): <NEW_LINE> <INDENT> KELVIN_NULL = 273.15 <NEW_LINE> KM_MILES = 1.609344 <NEW_LINE> conditions = {'NCT' : 'no clouds detected', 'NSC' : 'nil signifant cloud', 'SKC' : 'clear sky', 'CLR' : 'clear sky', 'FEW' :'few clouds','OVC' : 'overcast clouds', 'BKN' : 'broken clouds', 'CAVOK' : 'ceiling and visib... | absolute zero point | 62599007462c4b4f79dbc552 |
class TGPlugin: <NEW_LINE> <INDENT> def __init__(self, extra_vars_func=None, options=None, extension="mak"): <NEW_LINE> <INDENT> self.extra_vars_func = extra_vars_func <NEW_LINE> self.extension = extension <NEW_LINE> if not options: <NEW_LINE> <INDENT> options = {} <NEW_LINE> <DEDENT> lookup_options = {} <NEW_LINE> for... | TurboGears compatible Template Plugin. | 625990070a366e3fb87dd53d |
class StaticMessageQueue(MessageQueue): <NEW_LINE> <INDENT> def __init__(self, value, name = 'distortos::StaticMessageQueue'): <NEW_LINE> <INDENT> super().__init__(value, name) | Print `distortos::StaticMessageQueue`. | 62599007462c4b4f79dbc554 |
class FifeAgent(Base): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Base.__init__(self, layer=object, behaviour=object, instance=object) <NEW_LINE> <DEDENT> @property <NEW_LINE> def saveable_fields(self): <NEW_LINE> <INDENT> fields = list(self.fields.keys()) <NEW_LINE> fields.remove("layer") <NEW_LINE> f... | Component that stores the values for a fife agent
Fields:
layer: The layer the agent is on
behaviour: The behaviour object of this agent
instance: The FIFE instance of this agent. | 6259900715fb5d323ce7f88f |
class bi(Device): <NEW_LINE> <INDENT> attrs = ('INP', 'ZNAM', 'ONAM', 'RVAL', 'VAL', 'EGU', 'HOPR', 'LOPR', 'PREC', 'NAME', 'DESC', 'DTYP') <NEW_LINE> def __init__(self, prefix, **kwargs): <NEW_LINE> <INDENT> if prefix.endswith('.'): <NEW_LINE> <INDENT> prefix = prefix[:-1] <NEW_LINE> <DEDENT> Device.__init__(self, pre... | Simple binary input device | 62599007d164cc6175821acc |
class Template(object): <NEW_LINE> <INDENT> def __init__(self, template_string, name="<string>", loader=None, compress_whitespace=None, autoescape=_UNSET): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> if compress_whitespace is None: <NEW_LINE> <INDENT> compress_whitespace = name.endswith(".html") or n... | A compiled template.
We compile into Python from the given template_string. You can generate
the template from variables with generate(). | 62599007462c4b4f79dbc558 |
class TripResponse(object): <NEW_LINE> <INDENT> def __init__(self, trips=None): <NEW_LINE> <INDENT> self.swagger_types = { 'trips': 'list[TripResponseTrips]' } <NEW_LINE> self.attribute_map = { 'trips': 'trips' } <NEW_LINE> self._trips = trips <NEW_LINE> <DEDENT> @property <NEW_LINE> def trips(self): <NEW_LINE> <INDENT... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259900715fb5d323ce7f895 |
class LEDNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, nclass, backbone='', aux=False, jpu=False, pretrained_base=True, **kwargs): <NEW_LINE> <INDENT> super(LEDNet, self).__init__() <NEW_LINE> self.encoder = nn.Sequential( Downsampling(3, 32), SSnbt(32, **kwargs), SSnbt(32, **kwargs), SSnbt(32, **kwargs), Down... | LEDNet
Parameters
----------
nclass : int
Number of categories for the training dataset.
backbone : string
Pre-trained dilated backbone network type (default:'resnet50'; 'resnet50',
'resnet101' or 'resnet152').
norm_layer : object
Normalization layer used in backbone network (default: :class:`nn.BatchN... | 6259900721a7993f00c66ad4 |
class MultiSelect(object): <NEW_LINE> <INDENT> def __call__(self, field, **kwargs): <NEW_LINE> <INDENT> kwargs.setdefault('id', field.id) <NEW_LINE> src_list, dst_list = [], [] <NEW_LINE> for val, label, selected in field.iter_choices(): <NEW_LINE> <INDENT> if selected: <NEW_LINE> <INDENT> dst_list.append({'label':labe... | Renders a megalist-multiselect widget.
The field must provide an `iter_choices()` method which the widget will
call on rendering; this method must yield tuples of
`(value, label, selected)`. | 62599007d164cc6175821ad4 |
class PageScope(BaseScope): <NEW_LINE> <INDENT> pattern = r'pageid:' <NEW_LINE> def __init__(self, request): <NEW_LINE> <INDENT> self._request = request <NEW_LINE> <DEDENT> def lookup(self, scope_name): <NEW_LINE> <INDENT> pageid_scope = scope_name[len('pageid:'):] <NEW_LINE> scope_segments = self._pageid_to_namespace(... | The current page ID.
Pageid scopes are written as 'pageid:' + the pageid to match. Pageids
are treated as a namespace with : and # delimiters.
For example, the scope 'pageid:Foo' will be active on pages with pageids:
Foo
Foo:Bar
Foo#quux | 62599007462c4b4f79dbc560 |
class RenamedTemporaryFile(object): <NEW_LINE> <INDENT> def __init__(self, final_path, **kwargs): <NEW_LINE> <INDENT> tmpfile_dir = kwargs.pop('dir', None) <NEW_LINE> if tmpfile_dir is None: <NEW_LINE> <INDENT> tmpfile_dir = os.path.dirname(final_path) <NEW_LINE> <DEDENT> self.tmpfile = tempfile.NamedTemporaryFile(dir=... | Input/output file handle manager.
RenamedTemporyFile takes care of file handle creation and tear down.
Handy if you just want to write to a file in a particular directory
without having to worry about boring (yawn) file details.
.. note::
Your nominated directory must exist. Otherwise, file will just be
creat... | 62599007627d3e7fe0e079f6 |
class NgramTests(unittest.TestCase): <NEW_LINE> <INDENT> items = ['sdafaf','asfwef','asdfawe','adfwe', 'askfjwehiuasdfji'] <NEW_LINE> def test_ngram_search(self): <NEW_LINE> <INDENT> idx = NGram(self.items) <NEW_LINE> self.assertEqual(idx.search('askfjwehiuasdfji'), [('askfjwehiuasdfji', 1.0), ('asdfawe', 0.17391304347... | Tests of the ngram class | 62599007462c4b4f79dbc562 |
class Parameters: <NEW_LINE> <INDENT> axes = DatasetParameter('reference network shapefile', type='input') <NEW_LINE> length_min = LiteralParameter('minimum axis length') <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.axes = dict( key='network-cartography-ready', tiled=False) <NEW_LINE> self.length_min = 50e3 | Axis selection parameters | 625990070a366e3fb87dd54f |
class DeadlineExceededError(BaseException): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return ('The overall deadline for responding to the HTTP request ' 'was exceeded.') | Exception raised when the request reaches its overall time limit.
This exception will be thrown by the original thread handling the request,
shortly after the request reaches its deadline. Since the exception is
asynchronously set on the thread by the App Engine runtime, it can appear
to originate from any line of cod... | 6259900721a7993f00c66ada |
class TableauResource(BasicResource): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> return tableau_services.get_growth_of_unit() | docstring for UserResource | 62599007d164cc6175821ad9 |
class Base: <NEW_LINE> <INDENT> REFTAG_RESOURCE = RESOURCES_BY_TAG <NEW_LINE> @property <NEW_LINE> def CONCRETE_MAP(self): <NEW_LINE> <INDENT> if not hasattr(self, "_CONCRETE_MAP"): <NEW_LINE> <INDENT> self._CONCRETE_MAP = { concrete: res for (res, concrete) in self.RESOURCE_MAP.items() } <NEW_LINE> <DEDENT> return sel... | Backend base class.
Do NOT extend this directly when implementing a new backend, instead
extend Interface below. | 62599007bf627c535bcb200c |
class TestClef(object): <NEW_LINE> <INDENT> def test_invalid_clef(self): <NEW_LINE> <INDENT> l_time = {'ly_type': '', 'type': ''} <NEW_LINE> m_staffdef = etree.Element(mei.STAFF_DEF) <NEW_LINE> with pytest.raises(exceptions.LilyPondError): <NEW_LINE> <INDENT> lilypond.set_clef(l_time, m_staffdef) <NEW_LINE> <DEDENT> <D... | Setting the clef. | 625990073cc13d1c6d4662a9 |
class Solution: <NEW_LINE> <INDENT> def isIdentical(self, a, b): <NEW_LINE> <INDENT> if not (a or b): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> if a and b: <NEW_LINE> <INDENT> if a.val == b.val: <NEW_LINE> <INDENT> return self.isIdentical(a.left, b.left) and self.isIdentical(a.right, b.right) <NEW_LINE> <DEDE... | @param a, b, the root of binary trees.
@return true if they are identical, or false. | 62599007462c4b4f79dbc56a |
class TestHealthCheckAPI(ApiTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestHealthCheckAPI, self).setUp() <NEW_LINE> self.cluster_id = 1 <NEW_LINE> self.url = '/clusters/%s/healthreports' % self.cluster_id <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> super(TestHealthCheckAPI... | Test health check api. | 6259900856b00c62f0fb342c |
class ScrapeConfig: <NEW_LINE> <INDENT> def __init__(self, review_type, start, end): <NEW_LINE> <INDENT> self.review_type = review_type <NEW_LINE> self.start = start <NEW_LINE> self.end = end <NEW_LINE> <DEDENT> @property <NEW_LINE> def ul_selector(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT... | 리뷰 스크래핑에 관련한 설정을 추상화하는 클래스입니다.
서점의 특정 리뷰, Pagination 을 설정할 수 있고,
서점 리뷰페이지의 url, 파싱을 하기 위한 xpath selector 를 알고 있습니다. | 62599008d164cc6175821ae7 |
class TestAI(unittest.TestCase): <NEW_LINE> <INDENT> def assertMove(self, player, ideal, board, func='assertEqual'): <NEW_LINE> <INDENT> g = tttg.Game(board) <NEW_LINE> ai = tttai.AI(player) <NEW_LINE> move = ai.choose_move(g) <NEW_LINE> getattr(self, func)(move, ideal) <NEW_LINE> <DEDENT> def testPlacesToWinX(self): <... | 1. Win: If AI has two in a row, place a third to win.
2. Block. If opponent has two in a row, play the block.
3. Fork: Create two non-blocked lines of 2.
4. Block a fork:
1. Create two in a row to force opponent into defending as long as defense does not create a fork.
2. If the opponent can fork, block the for... | 62599008462c4b4f79dbc574 |
class Star: <NEW_LINE> <INDENT> type = "star" <NEW_LINE> m = 0 <NEW_LINE> x = 0 <NEW_LINE> y = 0 <NEW_LINE> Vx = 0 <NEW_LINE> Vy = 0 <NEW_LINE> Fx = 0 <NEW_LINE> Fy = 0 <NEW_LINE> R = 5 <NEW_LINE> color = "red" <NEW_LINE> image = None | Тип данных, описывающий звезду.
Содержит массу, координаты, скорость звезды,
а также визуальный радиус звезды в пикселах и её цвет. | 6259900856b00c62f0fb342e |
class Logger: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = str(name) <NEW_LINE> <DEDENT> @property <NEW_LINE> def level(self): <NEW_LINE> <INDENT> level = settings.log_level <NEW_LINE> return getattr(logging, level.upper()) <NEW_LINE> <DEDENT> def _print(self, msg): <NEW_LINE> <INDENT> ... | Sublime Console Logger. | 625990080a366e3fb87dd560 |
class SiteNameIdVisiteurMapper: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.corrupt_line_counter = 0 <NEW_LINE> self.counter_name = 'CORRUPT_LINES' <NEW_LINE> <DEDENT> def process_line(self, line): <NEW_LINE> <INDENT> kv = line.split(kv_sep) <NEW_LINE> try: <NEW_LINE> <INDENT> print(kv_sep.join([kv... | Emit "(site <tab> id_visitor <tab> 1>)" tuples. Emit means: print to standard output. | 62599008d164cc6175821aeb |
class RawBitProcessor(object): <NEW_LINE> <INDENT> def process_bits(self, data: str) -> str: <NEW_LINE> <INDENT> return data | An identity bit processor. | 6259900856b00c62f0fb3432 |
class Kin_results(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.error = None <NEW_LINE> self.V = 0.0 <NEW_LINE> self.Km = 0.0 <NEW_LINE> self.SS = 0.0 <NEW_LINE> self.v_hat = None | Object that holds data from a computation, supporting dot access.
Mandatory members are:
name - Name of the method used (str).
error - None by default, str describing error in computation
V - limiting rate (float)
Km - Michaelis constant (float)
SS - sum of squares of residuals to the Michelis-Menten equation (float)... | 62599008bf627c535bcb2021 |
class Transport(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> from suds.transport.options import Options <NEW_LINE> self.options = Options() <NEW_LINE> <DEDENT> def open(self, request): <NEW_LINE> <INDENT> raise Exception('not-implemented') <NEW_LINE> <DEDENT> def send(self, request): <NEW_LINE> ... | The transport I{interface}. | 6259900815fb5d323ce7f8b7 |
class MiFloraSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, poller, parameter, name, unit, force_update, median): <NEW_LINE> <INDENT> self.poller = poller <NEW_LINE> self.parameter = parameter <NEW_LINE> self._unit = unit <NEW_LINE> self._name = name <NEW_LINE> self._state = None <NEW_LINE> self.data = [] <NEW_... | Implementing the MiFlora sensor. | 6259900815fb5d323ce7f8bb |
class AllBucketLists(Resource): <NEW_LINE> <INDENT> @auth.user_is_login <NEW_LINE> def get(self): <NEW_LINE> <INDENT> params = request.args.to_dict() <NEW_LINE> limit = int(params.get('limit', 20)) <NEW_LINE> limit = 100 if int(limit) > 100 else limit <NEW_LINE> search_by = params.get('q', '') <NEW_LINE> page = int(par... | Manage responses to bucketlists requests by a user.
URL:
/api/v1/bucketlists/
Methods:
GET, POST | 6259900856b00c62f0fb343a |
class BacktestingStrategy(BaseStrategy): <NEW_LINE> <INDENT> def __init__(self, barFeed, cash=1000000): <NEW_LINE> <INDENT> broker = pyalgotrade.broker.backtesting.Broker(cash, barFeed) <NEW_LINE> BaseStrategy.__init__(self, barFeed, broker) | Base class for backtesting strategies.
:param barFeed: The bar feed to use to backtest the strategy.
:type barFeed: :class:`pyalgotrade.barfeed.BarFeed`.
:param cash: The amount of cash available.
:type cash: int/float.
.. note::
This is a base class and should not be used directly. | 625990080a366e3fb87dd56c |
class _Multiprocessor: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _wrapper(func, queue, args, kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> from openff.evaluator.workflow.plugins import registered_workflow_protocols <NEW_LINE> if "registered_workflow_protocols" in kwargs: <NEW_LINE> <INDENT> protocols_to_... | A temporary utility class which runs a given
function in a separate process. | 62599008d164cc6175821af5 |
class TestLookasideLegacy(Base): <NEW_LINE> <INDENT> expected_title = "git.lookaside.texlive.new" <NEW_LINE> expected_subti = 'jnovy uploaded pst-diffraction.doc.tar.xz for texlive' <NEW_LINE> expected_icon = "https://apps.fedoraproject.org/img/icons/git-logo.png" <NEW_LINE> expected_secondary_icon = "https://seccdn.li... | Support oldschool lookaside messages. :( | 6259900821a7993f00c66af8 |
class RingBuffer: <NEW_LINE> <INDENT> def __init__(self, maxBuffSz, pktSz): <NEW_LINE> <INDENT> self.maxBuffSz = maxBuffSz <NEW_LINE> self.Q = deque([], maxBuffSz) <NEW_LINE> assert pktSz >0, "Packet size to be a positive integer" <NEW_LINE> self.pktSize = pktSz <NEW_LINE> <DEDENT> def size(self): <NEW_LINE> <INDENT> r... | RingBuffer class implements a buffer that allows push, pop and other basic queue operations | 62599008d164cc6175821af7 |
class Score(object): <NEW_LINE> <INDENT> def __init__(self, score_name, implementation): <NEW_LINE> <INDENT> self._score_name = score_name <NEW_LINE> self._implementation = implementation <NEW_LINE> <DEDENT> def calculate(self, references, predictions): <NEW_LINE> <INDENT> avg_score, scores = self._implementation.compu... | A subclass of this class is an adapter of pycocoevalcap. | 62599008462c4b4f79dbc584 |
class BorrowedBooks(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'borrowed_books' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> book_borrower = db.Column(db.String, nullable=False) <NEW_LINE> book_name = db.Column(db.String, nullable=False, index=True) <NEW_LINE> borrow_date = db.Column(db.Date, ... | This class creates borrowed_books database table instance
and sets table field names | 625990083cc13d1c6d4662c7 |
class Supervisor: <NEW_LINE> <INDENT> def __init__(self, protected): <NEW_LINE> <INDENT> self.protected = list(protected) <NEW_LINE> <DEDENT> def validate(self, fgraph): <NEW_LINE> <INDENT> if not hasattr(fgraph, 'destroyers'): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> for r in self.protected + list(fgraph.ou... | Listener for FunctionGraph events which makes sure that no
operation overwrites the contents of protected Variables. The
outputs of the FunctionGraph are protected by default. | 62599008d164cc6175821af9 |
class PostFlairWidget(Widget, BaseList): <NEW_LINE> <INDENT> CHILD_ATTRIBUTE = "order" | Class to represent a post flair widget.
Find an existing one:
.. code-block:: python
post_flair_widget = None
widgets = reddit.subreddit("redditdev").widgets
for widget in widgets.sidebar:
if isinstance(widget, praw.models.PostFlairWidget):
post_flair_widget = widget
break... | 62599008462c4b4f79dbc586 |
class UserChangeView(SuccessMessageMixin, UpdateView): <NEW_LINE> <INDENT> template_name = 'accounts/update.html' <NEW_LINE> model = Person <NEW_LINE> form_class = UserCreateForm <NEW_LINE> success_url = '/' <NEW_LINE> success_message = "%(first_name)s %(last_name)s successfully updated." <NEW_LINE> def form_valid(self... | Author: Farzana Yasmin.
Purpose: Update the specific user.
Pre condition: N/A.
Post condition: N/A.
Library dependency: N/A.
Database Interaction: accounts.models.Person will be hit to update the specified users and
also hit accounts.models.Address for creating/updating address details.
File Locat... | 625990083cc13d1c6d4662c9 |
class MimedFileFactory(log.Loggable): <NEW_LINE> <INDENT> logCategory = LOG_CATEGORY <NEW_LINE> defaultType = "application/octet-stream" <NEW_LINE> def __init__(self, httpauth, mimeToResource=None, rateController=None, requestModifiers=None, metadataProvider=None): <NEW_LINE> <INDENT> self._httpauth = httpauth <NEW_LIN... | I create File subclasses based on the mime type of the given path. | 6259900821a7993f00c66afc |
class Video(JavaScriptObject): <NEW_LINE> <INDENT> @java.init <NEW_LINE> def __init__(self, *a, **kw): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @java.protected <NEW_LINE> @__init__.register <NEW_LINE> @java.typed() <NEW_LINE> def __init__(self, ): <NEW_LINE> <INDENT> self.__init__._super() <NEW_LINE> <DEDENT> @java... | Represents a video object in facebook | 6259900821a7993f00c66afe |
class PrivateIngredientsApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = get_user_model().objects.create_user( 'do@gmail.com', 'testpass') <NEW_LINE> self.client = APIClient() <NEW_LINE> self.client.force_authenticate(user=self.user) <NEW_LINE> <DEDENT> def test_retrieve_ingredie... | Test the authorized user ingredients API | 62599008d164cc6175821afd |
class PageTestCase(BaseTestCase): <NEW_LINE> <INDENT> def test_index_page(self): <NEW_LINE> <INDENT> response = self.client.get("/") <NEW_LINE> self.assert200(response) <NEW_LINE> <DEDENT> def test_secret_page(self): <NEW_LINE> <INDENT> response = self.client.get("/secret") <NEW_LINE> self.assert401(response) | A pages test case | 62599008462c4b4f79dbc58a |
class MarketEvent(Event): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.type = 'MARKET' | Обрабатывает событие получние нового обновления рыночной информации с соответствущими барами. | 6259900856b00c62f0fb3444 |
class SyncDataError(Exception): <NEW_LINE> <INDENT> def __init__(self, error): <NEW_LINE> <INDENT> self.error = error <NEW_LINE> self.severity = 'warning' <NEW_LINE> self.status_code = http_code.HTTP_400_BAD_REQUEST | This is for sync data error | 6259900856b00c62f0fb3446 |
class WeekOfMonth(DateOffset): <NEW_LINE> <INDENT> _adjust_dst = True <NEW_LINE> def __init__(self, n=1, normalize=False, **kwds): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> self.normalize = normalize <NEW_LINE> self.weekday = kwds['weekday'] <NEW_LINE> self.week = kwds['week'] <NEW_LINE> if self.n == 0: <NEW_LINE> <IND... | Describes monthly dates like "the Tuesday of the 2nd week of each month"
Parameters
----------
n : int
week : {0, 1, 2, 3, ...}
0 is 1st week of month, 1 2nd week, etc.
weekday : {0, 1, ..., 6}
0: Mondays
1: Tuesdays
2: Wednesdays
3: Thursdays
4: Fridays
5: Saturdays
6: Sundays | 625990080a366e3fb87dd578 |
class WhitelistRule(CompareRule): <NEW_LINE> <INDENT> _schema_file = 'schemas/ruletype-whitelist.yaml' <NEW_LINE> def __init__(self, locator: str, hash_str: str, conf: dict): <NEW_LINE> <INDENT> super().__init__(locator, hash_str, conf) <NEW_LINE> self.expand_entries('whitelist') <NEW_LINE> <DEDENT> def prepare(self, e... | A CompareRule where the compare function checks a given key against a whitelist. | 62599008d164cc6175821b01 |
class StoreSerializers(serializers.ModelSerializer): <NEW_LINE> <INDENT> business = serializers.SerializerMethodField() <NEW_LINE> retailer_id = serializers.SerializerMethodField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Store <NEW_LINE> fields = ('id', 'name', 'address1', 'address2', 'town', 'postcode', 'co... | Store Serializer | 6259900915fb5d323ce7f8c9 |
class ScraperFactory(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def create_scraper(url, type): <NEW_LINE> <INDENT> if type == ScraperType.ORCID: <NEW_LINE> <INDENT> return OrcIdScraper(url, type) <NEW_LINE> <DEDENT> if type == ScraperType.RESEARCHID: <NEW_LINE> <INDENT> return ResearchIdScraper(url, type) <N... | Returns a scraper made for the URL you feed it | 6259900956b00c62f0fb3448 |
class Error(Exception): <NEW_LINE> <INDENT> pass | Errors common to model data interface. | 6259900921a7993f00c66b04 |
class SimplifiedOpenvpnData: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._config = SimplifiedOpenvpnConfig() <NEW_LINE> self._db = sqlite3.connect(self._config.container + 'sovpn.sqlite') <NEW_LINE> sql = self.read_sql_file('create_table_clients.sql') <NEW_LINE> self._db.cursor().execute(sql) <NEW_... | Class that contains methods that deal with database. | 62599009627d3e7fe0e07a24 |
class WXUserRegSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> openId = serializers.CharField(label="微信openid", help_text="微信openid", required=True, allow_blank=False, validators=[UniqueValidator(queryset=User.objects.all(), message="用户已经存在")]) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_L... | 微信用户注册 | 62599009bf627c535bcb2037 |
class _Node: <NEW_LINE> <INDENT> __slots__ = '_element', '_next' <NEW_LINE> def __init__(self, element, next): <NEW_LINE> <INDENT> self._element = element <NEW_LINE> self._next = next | Lightweight,nonpublic class for storing a singly linked node. | 62599009462c4b4f79dbc590 |
class MultipleChoiceField(models.CharField): <NEW_LINE> <INDENT> def clean_choices(self, values): <NEW_LINE> <INDENT> for value in values: <NEW_LINE> <INDENT> exists = False <NEW_LINE> for choice, label in self.choices: <NEW_LINE> <INDENT> if choice == value: <NEW_LINE> <INDENT> exists = True <NEW_LINE> break <NEW_LINE... | Field that can take a set of string values
and store them in a charfield using a delimiter
This needs to be compatible with django-rest-framework's
multiple choice field. | 625990093cc13d1c6d4662d3 |
class HelmCmd(object): <NEW_LINE> <INDENT> def parse(self, argv): <NEW_LINE> <INDENT> args = docopt(__doc__, argv=argv) <NEW_LINE> logger.debug("opendc helm - args:\n{}".format(args)) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> call_ansible(os.path.realpath(os.path.join(os.path.curdir, 'playbooks/helm.yaml')... | Install kubectl and helm clients locally. | 62599009627d3e7fe0e07a26 |
@tf_export(v1=['layers.Conv2D']) <NEW_LINE> class Conv2D(keras_layers.Conv2D, base.Layer): <NEW_LINE> <INDENT> def __init__(self, filters, kernel_size, strides=(1, 1), padding='valid', data_format='channels_last', dilation_rate=(1, 1), activation=None, use_bias=True, kernel_initializer=None, bias_initializer=init_ops.z... | 2D convolution layer (e.g. spatial convolution over images).
This layer creates a convolution kernel that is convolved
(actually cross-correlated) with the layer input to produce a tensor of
outputs. If `use_bias` is True (and a `bias_initializer` is provided),
a bias vector is created and added to the outputs. Finall... | 6259900921a7993f00c66b0a |
class ABTransition(ActionBundle): <NEW_LINE> <INDENT> def __init__(self, parser): <NEW_LINE> <INDENT> self.parser = parser <NEW_LINE> log.info(self.__class__.__name__ + " initialized") <NEW_LINE> try: <NEW_LINE> <INDENT> k = parser.options.key <NEW_LINE> s = parser.options.status <NEW_LINE> jira = jira_authenticate(par... | classdocs. | 62599009462c4b4f79dbc596 |
class ContaineranalysisProjectsOccurrencesCreateRequest(_messages.Message): <NEW_LINE> <INDENT> name = _messages.StringField(1) <NEW_LINE> occurrence = _messages.MessageField('Occurrence', 2) <NEW_LINE> parent = _messages.StringField(3, required=True) | A ContaineranalysisProjectsOccurrencesCreateRequest object.
Fields:
name: The name of the project. Should be of the form
"projects/{project_id}". @deprecated
occurrence: A Occurrence resource to be passed as the request body.
parent: This field contains the projectId for example:
"projects/{project_id}" | 625990090a366e3fb87dd582 |
class ProjectsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'projects' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(BigtableadminV2.ProjectsService, self).__init__(client) <NEW_LINE> self._upload_configs = { } | Service class for the projects resource. | 62599009462c4b4f79dbc598 |
class Yaml(ReportService): <NEW_LINE> <INDENT> def run(self, selected): <NEW_LINE> <INDENT> options = self.get_option(selected) <NEW_LINE> report = {"instances": [i.to_dict() for i in selected], "option": options} <NEW_LINE> print(safe_dump(report, indent=2)) <NEW_LINE> return report | YAML reporter implementation. | 62599009462c4b4f79dbc59c |
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/tmp/tmpiTHi4xx... | Complex type [anonymous] with content type ELEMENT_ONLY | 6259900956b00c62f0fb3456 |
class UserAssignForm(FlaskForm): <NEW_LINE> <INDENT> career = QuerySelectField(query_factory=lambda: Career.query.all(), get_label="name") <NEW_LINE> role = QuerySelectField(query_factory=lambda: Role.query.all(), get_label="name") <NEW_LINE> submit = SubmitField('Submit') | Form for admin to assign departments and roles to employees | 62599009d164cc6175821b13 |
class Organization(ModelMixin, BaseModel): <NEW_LINE> <INDENT> __tablename__ = 'organization' <NEW_LINE> organizationId = Column('organization_id', Integer, unique=True) <NEW_LINE> externalId = Column('external_id', String(80), nullable=False) <NEW_LINE> displayName = Column('display_name', String(255), nullable=False)... | An organization, under an awardee/HPO, and containing sites. | 62599009507cdc57c63a5938 |
class AttrDict(dict): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AttrDict, self).__init__(*args, **kwargs) <NEW_LINE> self.__dict__ = self | A dict subclass that allows keys to be accessed as attributes | 6259900956b00c62f0fb345a |
class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'result_type': {'required': True}, 'name': {'readonly': True}, 'job_category': {'readonly': True}, 'is_enabled': {'readonly': True}, 'job_owner': {'readonly': True}, '... | AgentJob level output for the task that validates connection to SQL Server
and also validates source server requirements.
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 id: Result identifier
:vartype i... | 6259900921a7993f00c66b19 |
class GUI_Application_Feature(ttk.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, argument): <NEW_LINE> <INDENT> ttk.Frame.__init__(self, parent) <NEW_LINE> self.pack(expand=Y, fill=BOTH) <NEW_LINE> self.master.title(TITLE_1) <NEW_LINE> self.create_feature_widgets(argument) <NEW_LINE> <DEDENT> def create_feature... | Main GUI for the featured functionality | 62599009462c4b4f79dbc5a4 |
class EpsilonGreedyPolicy(BasePolicy): <NEW_LINE> <INDENT> def __init__(self, eps=0.05, rand=None): <NEW_LINE> <INDENT> self.eps = eps <NEW_LINE> self.rand = rand if rand else random <NEW_LINE> self.do_annealing = False <NEW_LINE> <DEDENT> def choose_action(self, task, value_function, state): <NEW_LINE> <INDENT> action... | Choose explore action in probability epsilon else choose best action
If you want to decaly epsilon (most of the case it's good idea) during training,
call "set_eps_annealing" before start training.
Properties:
eps : the probability to select explore action
rand : used when multiple actions are candidate of ch... | 6259900956b00c62f0fb345e |
class BookRepo(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.books = {} <NEW_LINE> <DEDENT> def add_book(self, book): <NEW_LINE> <INDENT> self.books[book.Id] = book <NEW_LINE> <DEDENT> def get_book(self, book_id): <NEW_LINE> <INDENT> return self.books[book_id] <NEW_LINE> <DEDENT> def get_book_name... | persists the BookModel instances into an in-memory dictionary
with methods to retrieve, insert, update and delete books | 62599009627d3e7fe0e07a3c |
class TicketViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Ticket.objects.all() <NEW_LINE> serializer_class = TicketSerializer | retrieve:
Boleto por ID.
list:
Lista de boletos.
create:
Crea un nuevo boleto.
update:
Actualiza los valores de un boleto
delete:
Borra un boleto | 62599009bf627c535bcb2051 |
class Mixin(object): <NEW_LINE> <INDENT> def __init__(self, *mixins): <NEW_LINE> <INDENT> self.mixins = mixins <NEW_LINE> <DEDENT> def __call__(self, cls): <NEW_LINE> <INDENT> dct = {} <NEW_LINE> mcls = type(cls) <NEW_LINE> name = cls.__name__ <NEW_LINE> bases = cls.__mro__ <NEW_LINE> for mix in reversed(self.mixins): ... | A class decorator which allows you
to mix in the properties of other
classes without inheriting directly.
**ONLY WORKS ON NEW STYLE CLASSES***
Method resolution order is just like
multiple inheritence. Left takes
precedence over right.
Mixins are added to the class directly,
so they take precedence over any regular... | 62599009925a0f43d25e8be2 |
class CapabilityNetworkLimits(ManagedObject): <NEW_LINE> <INDENT> consts = CapabilityNetworkLimitsConsts() <NEW_LINE> naming_props = set([]) <NEW_LINE> mo_meta = MoMeta("CapabilityNetworkLimits", "capabilityNetworkLimits", "network-limits", VersionMeta.Version211a, "InputOutput", 0x1f, [], ["read-only"], [u'topSysDefau... | This is CapabilityNetworkLimits class. | 6259900956b00c62f0fb3464 |
class DataFrameWrapper: <NEW_LINE> <INDENT> def __init__(self, connection_string: str): <NEW_LINE> <INDENT> self.engine = create_engine(connection_string) <NEW_LINE> self.file_name_generator = FileNameGenerator() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def snowflake( cls, username: str, password: str, snowflake_acc... | Class that facilitates running a query in a database via a Pandas Dataframe and then writing the data to files.
A number of formats are supported including png, html and text files. | 625990093cc13d1c6d4662ed |
class ProductEntityBaseParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'description': {'max_length': 1000, 'min_length': 0}, } <NEW_LINE> _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'terms': {'key': 'terms', 'type': 'str'}, 'subscription_required': {'key': 'subsc... | Product Entity Base Parameters.
:ivar description: Product description. May include HTML formatting tags.
:vartype description: str
:ivar terms: Product terms of use. Developers trying to subscribe to the product will be
presented and required to accept these terms before they can complete the subscription process.
:... | 62599009bf627c535bcb2053 |
class IpamsvcUpdateIpamHostResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'result': 'IpamsvcIpamHost' } <NEW_LINE> attribute_map = { 'result': 'result' } <NEW_LINE> def __init__(self, result=None): <NEW_LINE> <INDENT> self._result = None <NEW_LINE> self.discriminator = None <NEW_LINE> if result is not None: <N... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259900915fb5d323ce7f8e7 |
class NetworkCapacity(base.Scenario): <NEW_LINE> <INDENT> __scenario_type__ = "NetworkCapacity" <NEW_LINE> TARGET_SCRIPT = "networkcapacity.bash" <NEW_LINE> def __init__(self, scenario_cfg, context_cfg): <NEW_LINE> <INDENT> self.scenario_cfg = scenario_cfg <NEW_LINE> self.context_cfg = context_cfg <NEW_LINE> self.setup... | Measure Network capacity and scale.
This scenario reads network status including number of connections,
number of frames sent/received. | 62599009d164cc6175821b21 |
class Serializer(object): <NEW_LINE> <INDENT> internal_use_only = False <NEW_LINE> def serialize(self, queryset, **options): <NEW_LINE> <INDENT> self.options = options <NEW_LINE> self.stream = options.get("stream", StringIO()) <NEW_LINE> self.selected_fields = options.get("fields") <NEW_LINE> self.start_serialization()... | Abstract serializer base class. | 62599009462c4b4f79dbc5ae |
class AnchorHealthV4(CDPDataItem): <NEW_LINE> <INDENT> type = 0x0125 <NEW_LINE> definition = [DISerialNumberAttr('serial_number'), DIUInt8Attr('interface_id'), DIUInt32Attr('ticks_reported'), DIUInt32Attr('timed_rxs_reported'), DIUInt32Attr('beacons_reported'), DIUInt32Attr('beacons_discarded'), DIUInt16Attr('average_q... | CDP Data Item: Ciholas Data Protocol Anchor Health Data Item Definition | 6259900a3cc13d1c6d4662f3 |
class WordNode(ABC, Serializable): <NEW_LINE> <INDENT> def __init__(self, surface, part, part_detail1, part_detail2, part_detail3, stem_type, stem_form, word, kana, pronunciation): <NEW_LINE> <INDENT> self.surface = surface <NEW_LINE> self.part = part <NEW_LINE> self.part_detail1 = part_detail1 <NEW_LINE> self.part_det... | Base class of parsed word
Attributes
----------
surface : str
Surface of word
part : str
Part of the word
part_detail1 : str
Detail1 of part
part_detail2 : str
Detail2 of part
part_detail3 : str
Detail3 of part
stem_type : str
Stem type
stem_form : str
Stem form
word : str
Word itself
k... | 6259900abf627c535bcb2059 |
class memorize(dict): <NEW_LINE> <INDENT> def __init__(self, function): <NEW_LINE> <INDENT> self.function = function <NEW_LINE> <DEDENT> def __call__(self, *args): <NEW_LINE> <INDENT> return self[args] <NEW_LINE> <DEDENT> def __missing__(self, key): <NEW_LINE> <INDENT> result = self[key] = self.function(*key) <NEW_LINE... | cache decorator
| 6259900a627d3e7fe0e07a46 |
class Person(DomainResource): <NEW_LINE> <INDENT> resource_type = Field("Person", const=True) <NEW_LINE> active: fhirtypes.Boolean = Field( None, alias="active", title="Type `Boolean`", description="This person's record is in active use.", ) <NEW_LINE> purpose: fhirtypes.CodeableConceptType = Field( None, alias="purpos... | A generic person record.
Demographics and administrative information about a person independent of a
specific health-related context. | 6259900a462c4b4f79dbc5b2 |
class TestEzsignfolderGetListV1ResponseMPayload(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 testEzsignfolderGetListV1ResponseMPayload(self): <NEW_LINE> <INDENT> pass | EzsignfolderGetListV1ResponseMPayload unit test stubs | 6259900a3cc13d1c6d4662f5 |
class PyadrTooManyProposedAdrError(PyadrError): <NEW_LINE> <INDENT> pass | Too many proposed ADR found | 6259900a15fb5d323ce7f8ef |
class BinomialDeviance(ClassificationLossFunction): <NEW_LINE> <INDENT> def __init__(self, n_classes): <NEW_LINE> <INDENT> if n_classes != 2: <NEW_LINE> <INDENT> raise ValueError("{0:s} requires 2 classes.".format( self.__class__.__name__)) <NEW_LINE> <DEDENT> super(BinomialDeviance, self).__init__(1) <NEW_LINE> <DEDEN... | Binomial deviance loss function for binary classification.
Binary classification is a special case; here, we only need to
fit one tree instead of ``n_classes`` trees. | 6259900ad164cc6175821b2b |
class PLSpider(CrawlSpider): <NEW_LINE> <INDENT> name = 'PL' <NEW_LINE> allowed_domains = ['parlamentnilisty.cz'] <NEW_LINE> start_urls = ['https://www.parlamentnilisty.cz/zpravy'] <NEW_LINE> rules = ( Rule( LinkExtractor( allow=('/.*/.*/.*',), restrict_css=('.articles-list',) ), callback='parse_item', ), Rule( LinkExt... | PLSpider is the crawler that crawl thourgh the www.parlamentnilisty.cz wesite
and downloads the articles defined by the rules.
The server local data is cleaned (converted) here.
The local data is the date and article format. | 6259900a507cdc57c63a5950 |
class BoundedExecutor: <NEW_LINE> <INDENT> def __init__(self, bound, max_workers): <NEW_LINE> <INDENT> self._delegate = ThreadPoolExecutor(max_workers=max_workers) <NEW_LINE> self._semaphore = BoundedSemaphore(bound + max_workers) <NEW_LINE> <DEDENT> def submit(self, fn, *args, **kwargs): <NEW_LINE> <INDENT> self._sema... | BoundedExecutor behaves as a ThreadPoolExecutor which will block on
calls to submit() once the limit given as "bound" work items are queued for
execution.
:param bound: Integer - the maximum number of items in the work queue
:param max_workers: Integer - the size of the thread pool | 6259900a462c4b4f79dbc5b8 |
class DummyFakerWithoutReplacers(ModelFaker): <NEW_LINE> <INDENT> FAKER_FOR = models.FakerTestA | A dummy faker to test behavior when no replacer is not provided | 6259900a15fb5d323ce7f8f3 |
class IntentConfidenceCheckFailedEvent(Event): <NEW_LINE> <INDENT> pass | event | 6259900a627d3e7fe0e07a4c |
class EventProcessor(Observable): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(EventProcessor, self).__init__() <NEW_LINE> self.subscribers = [] <NEW_LINE> <DEDENT> def subscribe_publisher(self, publisher): <NEW_LINE> <INDENT> self.subscribe(publisher) <NEW_LINE> <DEDENT> def process_event(self, **... | Class that processes the events sent by all the HammerCloud code. Stores
logs and publishes them to the appropriate services. | 6259900abf627c535bcb2061 |
class Meta(object): <NEW_LINE> <INDENT> db_table = 'ingest_event' | meta information for the db | 6259900a0a366e3fb87dd5a6 |
class TestDeviceModelData(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> globals = {} <NEW_LINE> locals = {} <NEW_LINE> execfile("data/model_data.py", globals, locals) <NEW_LINE> self.data = locals['DEVICE_MODEL_DATA'] <NEW_LINE> <DEDENT> def test_DeviceModelData(self): <NEW_LINE> <INDENT>... | Test the device model data files are valid. | 6259900a56b00c62f0fb3474 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.