code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class FileSystemAccess(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = self.__init_path(path) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __init_path(path): <NEW_LINE> <INDENT> if not isinstance(path, str) or len(path) == 0: <NEW_LINE> <INDENT> raise ValueError("path must be ... | A class for providing access to the mycroft FS sandbox. Intended to be
attached to skills at initialization time to provide a skill-specific
namespace. | 6259902e3eb6a72ae038b6c6 |
class RSAX931Verifier(object): <NEW_LINE> <INDENT> def __init__(self, pubdata): <NEW_LINE> <INDENT> self._bio = libcrypto.BIO_new_mem_buf(pubdata, len(pubdata)) <NEW_LINE> self._rsa = c_void_p(libcrypto.RSA_new()) <NEW_LINE> if not libcrypto.PEM_read_bio_RSA_PUBKEY(self._bio, pointer(self._rsa), None, None): <NEW_LINE>... | Verify ANSI X9.31 RSA signatures using OpenSSL libcrypto | 6259902ed164cc6175821fd2 |
class DHCPOffer (Event): <NEW_LINE> <INDENT> def __init__ (self, p): <NEW_LINE> <INDENT> super(DHCPOffer,self).__init__() <NEW_LINE> self.offer = p <NEW_LINE> self.address = p.yiaddr <NEW_LINE> self.server = p.siaddr <NEW_LINE> o = p.options.get(p.SERVER_ID_OPT) <NEW_LINE> if o: self.server = o.addr <NEW_LINE> o = p.op... | Fired when an offer has been received
If you want to immediately accept it, do accept().
If you want to reject it, do reject().
If you want to defer acceptance, do nothing. | 6259902ee76e3b2f99fd9a6d |
class AddPrintableRingOperator68(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "addongen.add_printable_ring_operator68" <NEW_LINE> bl_label = "Add 21.89mm (12 1/2)" <NEW_LINE> bl_options = {'REGISTER'} <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> basicRingFor3DPrint('ring', 64, 21.89) <NEW_LINE> re... | Add 21.89mm (US 12 1/2 | British Z | French 68 3/4 | German 21 3/4 | Japanese 26 | Swiss 28 3/4) | 6259902ea4f1c619b294f657 |
class Policy(Resource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'marketplace_purchases': {'key... | A policy.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Resource Id.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param marketplace_purchases: The policy that controls whether Azure marketplace purchas... | 6259902eb57a9660fecd2ae4 |
class NoSuchProjectError(Exception): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(NoSuchProjectError, self).__init__() <NEW_LINE> self.name = name | If a project cannot be found in the LDAP. | 6259902e50485f2cf55dbfdd |
class V1PersistentVolume(object): <NEW_LINE> <INDENT> def __init__(self, kind=None, apiVersion=None, metadata=None, spec=None, status=None): <NEW_LINE> <INDENT> self.swagger_types = { 'kind': 'str', 'apiVersion': 'str', 'metadata': 'V1ObjectMeta', 'spec': 'V1PersistentVolumeSpec', 'status': 'V1PersistentVolumeStatus' }... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259902e26238365f5fadbb3 |
class GObjectXpraClient(XpraClientBase, gobject.GObject): <NEW_LINE> <INDENT> INSTALL_SIGNAL_HANDLERS = True <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> gobject.GObject.__init__(self) <NEW_LINE> XpraClientBase.__init__(self) <NEW_LINE> <DEDENT> def init(self, opts): <NEW_LINE> <INDENT> XpraClientBase.init(self, ... | Utility superclass for GObject clients | 6259902f925a0f43d25e90aa |
class Network: <NEW_LINE> <INDENT> def __init__(self, genotype): <NEW_LINE> <INDENT> self.nodes = [] <NEW_LINE> self.input_nodes = [] <NEW_LINE> self.output_nodes = [] <NEW_LINE> nodes_dict = dict() <NEW_LINE> for node_id in genotype.input_nodes: <NEW_LINE> <INDENT> node = Node(activation='') <NEW_LINE> self.input_node... | Neural Network
nodes - list of all network nodes
input_nodes - list of input layer nodes, same as in nodes
output_nodes - list of output layer nodes, same sa in nodes | 6259902f0a366e3fb87dda4a |
class ClubMembership(models.Model): <NEW_LINE> <INDENT> club = models.ForeignKey( 'annuaire.Club', verbose_name=_('club'), related_name='memberships', ) <NEW_LINE> member = models.ForeignKey( Person, verbose_name=_('member'), related_name='club_memberships', editable=False, ) <NEW_LINE> fonction = models.CharField( ver... | Club membership for a person | 6259902f21bff66bcd723cc7 |
class USResident(Person): <NEW_LINE> <INDENT> def __init__(self, name, status): <NEW_LINE> <INDENT> Person.__init__(self, name) <NEW_LINE> self.status = status <NEW_LINE> if not (status == "citizen" or status == "legal_resident" or status == "illegal_resident"): <NEW_LINE> <INDENT> raise ValueError("illegal status") <N... | A Person who resides in the US. | 6259902fd6c5a102081e3189 |
class ShareForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta(object): <NEW_LINE> <INDENT> model = Share <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.request = kwargs.pop('request', None) <NEW_LINE> super(ShareForm, self).__init__(*args, **kwargs) <NEW_LINE> choices = Resume.obje... | Formularz tworzenia i edycji `Share`. | 6259902f5166f23b2e24443a |
class Tick: <NEW_LINE> <INDENT> def __init__(self, v=Vector(), p=Vector()): <NEW_LINE> <INDENT> self.velocity = v <NEW_LINE> self.position = p | Tick object describing the state of a vehicle at a moment in time.
velocity: Vector
position: Vector | 6259902fec188e330fdf98f6 |
class IS_EMPTY_OR(Validator): <NEW_LINE> <INDENT> def __init__(self, other, null=None, empty_regex=None): <NEW_LINE> <INDENT> (self.other, self.null) = (other, null) <NEW_LINE> if empty_regex is not None: <NEW_LINE> <INDENT> self.empty_regex = re.compile(empty_regex) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.e... | Dummy class for testing IS_EMPTY_OR::
>>> IS_EMPTY_OR(IS_EMAIL())('abc@def.com')
('abc@def.com', None)
>>> IS_EMPTY_OR(IS_EMAIL())(' ')
(None, None)
>>> IS_EMPTY_OR(IS_EMAIL(), null='abc')(' ')
('abc', None)
>>> IS_EMPTY_OR(IS_EMAIL(), null='abc', empty_regex='def')('def')
('abc', N... | 6259902f1d351010ab8f4b7b |
class InternalLinks(_TypedList): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> super(_TypedList,self).__init__(*args) <NEW_LINE> self.memberType = Relation <NEW_LINE> self.parent = (1, 'INTERNAL_LINKS') | List of links
| 6259902f26238365f5fadbb5 |
class MySentences(object): <NEW_LINE> <INDENT> def __init__(self, dirname, start=0, subfix='.txt',bigramword=False,trainfilename=False): <NEW_LINE> <INDENT> self.dirname = dirname <NEW_LINE> self.start=start <NEW_LINE> self.subfix=subfix <NEW_LINE> self.bigram=bigramword <NEW_LINE> self.trainfname=trainfilename <NEW_LI... | 根据分好词的文件生成句子序列,用于word2vec训练
dirname:分好词的文件路径,可以是单个文件路径也可以是文件夹地址,文件以txt结尾
start:从一行的第几个元素开始算词。因为有的文件每行第一个元素是用户id,则start=1用于略过id, | 6259902f30c21e258be9986f |
class ManagerNamespace(NWManager): <NEW_LINE> <INDENT> def __init__(self, id, workgroup): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.workgroup = workgroup <NEW_LINE> <DEDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> return self.getItem(key) <NEW_LINE> <DEDENT> def __setattr__(self, key, value): <NEW_LINE> ... | A class that inherits :py:class:`NWManager` but adds :py:meth:`__getattr__`
and :py:meth:`__setattr__` methods that enable it to behave like an
object containing shared variables which might be more comfortable
than using :py:meth:`getItem <NWManager.getItem>` and
:py:meth:`setItem <NWManager.setItem>` methods of th... | 6259902f287bf620b6272c4b |
class CalcE(MultiColumnAction): <NEW_LINE> <INDENT> colXx = Field(doc="The column name to get the xx shape component from.", dtype=str, default="ixx") <NEW_LINE> colYy = Field(doc="The column name to get the yy shape component from.", dtype=str, default="iyy") <NEW_LINE> colXy = Field(doc="The column name to get the xy... | Calculate a complex value representation of the ellipticity
This is a shape measurement used for doing QA on the ellipticity
of the sources.
The complex ellipticity is typically defined as
E = ((ixx - iyy) + 1j*(2*ixy))/(ixx + iyy) = |E|exp(i*2*theta).
For plotting purposes we might want to plot |E|*exp(i*theta).
If... | 6259902f3eb6a72ae038b6ca |
class DoublyLinkedList: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.start_node = None <NEW_LINE> <DEDENT> '''@helpDescription(__str__ method is automatically called when the print() function is invoked. This method prints the contents of the linked list in a readable format instead of the SLinkedLi... | @helpDescription(The linked list is initialized with a start node (currently None).) | 6259902f66673b3332c31455 |
class AdminTools(system.Container): <NEW_LINE> <INDENT> __image__ = "images/admintools.gif" <NEW_LINE> __slots__ = () | Administrative Tools Folder
===========================
This folder contains the users, the policies and
the installed applications containers. | 6259902f4e696a045264e654 |
class Solution4(object): <NEW_LINE> <INDENT> pass | TODO
two pointer solution | 6259902f1d351010ab8f4b7d |
class chmod(Command): <NEW_LINE> <INDENT> def execute(self): <NEW_LINE> <INDENT> mode_str = self.rest(1) <NEW_LINE> if not mode_str: <NEW_LINE> <INDENT> if self.quantifier is None: <NEW_LINE> <INDENT> self.fm.notify("Syntax: chmod <octal number> " "or specify a quantifier", bad=True) <NEW_LINE> return <NEW_LINE> <DEDEN... | :chmod <octal number>
Sets the permissions of the selection to the octal number.
The octal number is between 0 and 777. The digits specify the
permissions for the user, the group and others.
A 1 permits execution, a 2 permits writing, a 4 permits reading.
Add those numbers to combine them. So a 7 permits everything. | 6259902fec188e330fdf98f8 |
class NPTBerendsen(NVTBerendsen): <NEW_LINE> <INDENT> def __init__(self, atoms, timestep, temperature, taut=0.5e3 * units.fs, pressure=1.01325, taup=1e3 * units.fs, compressibility=4.57e-5, fixcm=True, trajectory=None, logfile=None, loginterval=1, append_trajectory=False): <NEW_LINE> <INDENT> NVTBerendsen.__init__(self... | Berendsen (constant N, P, T) molecular dynamics.
This dynamics scale the velocities and volumes to maintain a constant
pressure and temperature. The shape of the simulation cell is not
altered, if that is desired use Inhomogenous_NPTBerendsen.
Usage: NPTBerendsen(atoms, timestep, temperature, taut, pressure, taup)
... | 6259902f8a43f66fc4bf31eb |
class Writer(Base): <NEW_LINE> <INDENT> __tablename__ = "writer" <NEW_LINE> id = Column('id', Integer, primary_key=True) <NEW_LINE> episode_id = Column(Integer, ForeignKey('episode.id')) <NEW_LINE> name = Column('name', String) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<Writer('%s', '%s')>" % (self.id,... | This class stores information about a writer of an episode. | 6259902fd53ae8145f9194c9 |
class EventDeleteView(LoginRequiredMixin, DeleteView): <NEW_LINE> <INDENT> model = Event <NEW_LINE> success_url = reverse_lazy('event-list') | Delete an event from the system. | 6259902fac7a0e7691f73550 |
class Name(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'name': 'int', 'snake_case': 'int', '_property': 'str', '_123_number': 'int' } <NEW_LINE> self.attribute_map = { 'name': 'name', 'snake_case': 'snake_case', '_property': 'property', '_123_number': '123Number' } <NEW_L... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259902f6e29344779b016b7 |
class ListFavoritePrescription(ListView): <NEW_LINE> <INDENT> template_name = 'list_favorite_prescriptions.html' <NEW_LINE> context_object_name = 'list_favorite_prescriptions' <NEW_LINE> model = Prescription <NEW_LINE> paginate_by = 20 <NEW_LINE> ordering = ['-date_created'] <NEW_LINE> @method_decorator(login_required)... | View for list favorite prescriptions in database. | 6259902f96565a6dacd2d7c2 |
class Article(abc.ABC): <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> if url is None or url == '': <NEW_LINE> <INDENT> raise ArticleException('ArticleException: Invalid URL') <NEW_LINE> <DEDENT> self.url = url <NEW_LINE> self.title = '' <NEW_LINE> self.description = '' <NEW_LINE> self.authors = '' <N... | Abstract Article base class.
Base class for newspaper articles. Download method is standard,
while parse and as_dict must be redefined in child classes.
Attributes
----------
url: str
The URL at which the article can be found.
title: str
The title of the article.
description: str
Article's summary/incipit... | 6259902f8a43f66fc4bf31ed |
class JtagError(Exception): <NEW_LINE> <INDENT> pass | Generic JTAG error | 6259902f5e10d32532ce4137 |
class BASEHEADER(Structure): <NEW_LINE> <INDENT> _fields_ = [('version', c_ushort, 2), ('flags', c_ushort, 8), ('length', c_ushort, 6), ('md_type', c_ubyte), ('next_protocol', c_ubyte), ('service_path', c_uint, 24), ('service_index', c_uint, 8)] <NEW_LINE> def __init__(self, service_path=1, service_index=255, version=N... | Represent a NSH base header | 6259902f5166f23b2e24443e |
class NinthPageExecution(UtilityPage): <NEW_LINE> <INDENT> def enter_date(self, **kwargs): <NEW_LINE> <INDENT> mon = self.driver.find_element_by_css_selector("input[aria-label='Month']") <NEW_LINE> mon.send_keys(Keys.BACKSPACE) <NEW_LINE> mon.send_keys(kwargs.get('fist_value')) <NEW_LINE> self.driver.find_element_by_cs... | Execute Ninth page which is about to select dates | 6259902f8c3a8732951f75c0 |
class LocationModelAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ['location_name', 'latitude', 'longitude', 'elevation', 'site_type', 'last_update', 'modified_by'] <NEW_LINE> list_display_links = ['location_name', 'latitude', 'longitude'] <NEW_LINE> list_filter = ['location_name', 'site_type', 'last_updat... | Location model admin settings | 6259902fd10714528d69eebf |
class RAMONVolume(RAMONBase): <NEW_LINE> <INDENT> def __init__(self, xyz_offset=(0, 0, 0), resolution=0, cutout=None, voxels=None, id=DEFAULT_ID, confidence=DEFAULT_CONFIDENCE, kvpairs=DEFAULT_DYNAMIC_METADATA, status=DEFAULT_STATUS, author=DEFAULT_AUTHOR): <NEW_LINE> <INDENT> self.xyz_offset = xyz_offset <NEW_LINE> se... | RAMONVolume Object for storing neuroscience data with a voxel volume | 6259902f3eb6a72ae038b6ce |
class DbSNP(models.Model): <NEW_LINE> <INDENT> rsid = models.CharField(max_length=16, unique=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.rsid | Contains dbSNP information.
dbSNP IDs are a separate class with a many-to-many mapping because
(1) some variants have multiple dbSNP IDs mapped to the same
location, (2) dbSNP IDs refer to a position and some have more
than two alleles (e.g. triallelic)
Data attributes:
rsid: dbSNP identifier (CharField, unique) | 6259902fd18da76e235b7982 |
class PageType(object): <NEW_LINE> <INDENT> def __init__(self, name, index): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.index = index | PageType class maintaining page where module type resides. | 6259902f63f4b57ef00865a7 |
class LoggerMixin(object): <NEW_LINE> <INDENT> def __init__(self, logger, *args, **kwargs): <NEW_LINE> <INDENT> super(LoggerMixin, self).__init__(*args, **kwargs) <NEW_LINE> self.attach_logger(logger) <NEW_LINE> <DEDENT> def attach_logger(self, logger): <NEW_LINE> <INDENT> self.logger = logger <NEW_LINE> self.log = log... | Use as a parent class (or one of them) when you want to "attach" methods of a given
logger to class' instances.
:param ContextAdapter logger: logger to propagate. | 6259902fa8ecb03325872287 |
class CholeskySampler(object): <NEW_LINE> <INDENT> def __init__(self, mean, cov, dist=None): <NEW_LINE> <INDENT> self.mean = numpy.array(mean, ndmin=1) <NEW_LINE> self.cov = numpy.array(cov, ndmin=2) <NEW_LINE> if dist is None: <NEW_LINE> <INDENT> dist = numpy.random.randn <NEW_LINE> <DEDENT> self.dist = dist <NEW_LINE... | sample a multivariate covariant distribution using cholesky decomposition
example
-------
means=[20.0, 40.0]
cov=[[1.0,0.5],[0.5,2.0]]
cs=CholeskySampler(means,cov)
n=100000
rand=cs.sample(n)
s.mean(axis=0)
array([ 20.00139558, 50.00419912])
s.var(axis=0)
array([ 1.00076388, 2.00251013])
mm=s.mean(axis=0)
( (s[:... | 6259902f30c21e258be99875 |
class RewriteAction(BaseAction): <NEW_LINE> <INDENT> action_spec = dict( source_directory=REQUIRED_ACTION_KWD, destination_directory=REQUIRED_ACTION_KWD ) <NEW_LINE> action_type = "rewrite" <NEW_LINE> staging = STAGING_ACTION_NONE <NEW_LINE> def __init__(self, path, file_lister=None, source_directory=None, destination_... | This actin indicates the LWR server should simply rewrite the path
to the specified file. | 6259902f8a43f66fc4bf31ef |
class testcaseSuite(object): <NEW_LINE> <INDENT> def __init__(self, testsWordDir, simCmd, simulator_if): <NEW_LINE> <INDENT> self._dir = testsWordDir <NEW_LINE> self._simCmd = simCmd <NEW_LINE> self._test = os.path.basename(testsWordDir) <NEW_LINE> self.name = os.path.basename(testsWordDir) <NEW_LINE> self._run = TestR... | A test case to be run in an independent simulation | 6259902f1f5feb6acb163c5a |
class FreeAtHomeBinarySensor(BinarySensorEntity): <NEW_LINE> <INDENT> _name = '' <NEW_LINE> binary_device = None <NEW_LINE> _state = None <NEW_LINE> _hass = None <NEW_LINE> def __init__(self, device, hass): <NEW_LINE> <INDENT> self.binary_device = device <NEW_LINE> self._name = self.binary_device.name <NEW_LINE> self._... | Interface to the binary devices of Free@Home | 6259902fd53ae8145f9194cd |
class ProvisionStart(Page, ProvisionFormButtonMixin): <NEW_LINE> <INDENT> _page_title = "CloudForms Management Engine: Virtual Machines" <NEW_LINE> _template_list_locator = ( By.CSS_SELECTOR, "div#pre_prov_div > fieldset > table > tbody") <NEW_LINE> def click_on_continue(self): <NEW_LINE> <INDENT> self.continue_button.... | Page representing the start of the Provision VMs "wizard" | 6259902f66673b3332c3145b |
class Hook: <NEW_LINE> <INDENT> def __init__(self, callback, timeoutMilliseconds = 0, *callback_args): <NEW_LINE> <INDENT> self.callback = callback <NEW_LINE> self.callback_args = callback_args <NEW_LINE> self.timeoutMilliseconds = timeoutMilliseconds <NEW_LINE> self.ready_time = datetime.now() <NEW_LINE> <DEDENT> def ... | Event handler that invokes an arbitrary callback when invoked.
If the timeoutMilliseconds argument is greater than 0,
the hook will be suspended for n milliseconds after it's being invoked. | 6259902f21bff66bcd723ccf |
class FixedDepthDecisionMaker(BaseDecisionMaker): <NEW_LINE> <INDENT> def __init__(self, search_context, logger, depth): <NEW_LINE> <INDENT> super(FixedDepthDecisionMaker, self).__init__(search_context, logger) <NEW_LINE> self.__depth = depth <NEW_LINE> <DEDENT> def decide(self): <NEW_LINE> <INDENT> if self._search_con... | A concrete implementation of a decision maker.
Returns True iif the depth at which a user is in a SERP is less than a predetermined value. | 6259902fd6c5a102081e3191 |
@requires_toolkit([ToolkitName.qt]) <NEW_LINE> class TestStickyDialog(unittest.TestCase): <NEW_LINE> <INDENT> def test_sticky_dialog_with_parent(self): <NEW_LINE> <INDENT> obj = ObjectWithNumber() <NEW_LINE> obj2 = ObjectWithNumber() <NEW_LINE> parent_view = View(Item("number"), title="Parent") <NEW_LINE> nested = View... | Test _StickyDialog used by the UI's Qt backend. | 6259902fec188e330fdf98fe |
class HelloWorldRenderer(Renderer): <NEW_LINE> <INDENT> def render(self, messages, receiver_id): <NEW_LINE> <INDENT> for message in self.convert(messages): <NEW_LINE> <INDENT> print('--> {}'.format(message.payload)) <NEW_LINE> <DEDENT> <DEDENT> def convert(self, messages): <NEW_LINE> <INDENT> return messages | Stdout renderer | 6259902fbe8e80087fbc00e7 |
class MeanFrameOverTime: <NEW_LINE> <INDENT> def __init__(self, buffer_size=5): <NEW_LINE> <INDENT> assert buffer_size > 1, 'Buffer size must be > 1' <NEW_LINE> self.buffer_size = buffer_size <NEW_LINE> self.buffer = None <NEW_LINE> <DEDENT> def process(self, img: np.ndarray) -> np.ndarray: <NEW_LINE> <INDENT> if self.... | Calculates a mean frame over specified time-buffer | 6259902f5166f23b2e244442 |
class Tablefy(cli.Application): <NEW_LINE> <INDENT> _log_builder = p_logging.ProsperLogger( ME, LOG_PATH ) <NEW_LINE> debug = cli.Flag( ['d', '--debug'], help='Debug mode, no production db, headless mode' ) <NEW_LINE> @cli.switch( ['-v', '--verbose'], help='Enable verbose messaging' ) <NEW_LINE> def enable_verbose(self... | Plumbum CLI application to help pre-process tinyDB data into more regular table shape | 6259902fe76e3b2f99fd9a79 |
class BlockHeader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.version = 0 <NEW_LINE> self.prev_block = 0 <NEW_LINE> self.merkle_root = 0 <NEW_LINE> self.timestamp = 0 <NEW_LINE> self.bits = 0 <NEW_LINE> self.nonce = 0 <NEW_LINE> self.txns_count = 0 <NEW_LINE> <DEDENT> def calculate_hash(se... | The header of the block. | 6259902f4e696a045264e658 |
class SpiderLogHandler(BaseHandler): <NEW_LINE> <INDENT> async def get(self, host_id, project_name, spider_name, spider_id): <NEW_LINE> <INDENT> host_info = await self.application.objects.get(Host, id_=host_id) <NEW_LINE> scrapyd = scrapyd_object(host_info, timeout=1) <NEW_LINE> try: <NEW_LINE> <INDENT> code = await sc... | get spider log file
:GET param host_id: server id
:GET param project_name: project name
:GET param spider_name: spider name
:GET param spider_id: scrapyd spider id | 6259902f1d351010ab8f4b84 |
class PublicIPPrefixListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[PublicIPPrefix]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(PublicIPPrefixListResult, self).__init__(**kwa... | Response for ListPublicIpPrefixes API service call.
:param value: A list of public IP prefixes that exists in a resource group.
:type value: list[~azure.mgmt.network.v2019_08_01.models.PublicIPPrefix]
:param next_link: The URL to get the next set of results.
:type next_link: str | 6259902f50485f2cf55dbfea |
class PrintRunner(Runner): <NEW_LINE> <INDENT> def _handleNextDate(self, date): <NEW_LINE> <INDENT> print('Reminders for %s' % date.isoformat()) <NEW_LINE> <DEDENT> def _executeReminder(self, reminder, date): <NEW_LINE> <INDENT> reminder.execute(date) | Наследник класса L{Runner}, подходящий для обработки текстовых
напоминателей (таких, что связанные с ними действия выполняют печать
сообщения в поток вывода). | 6259902fac7a0e7691f73555 |
class StoredCallableWrapper(Generator): <NEW_LINE> <INDENT> def __init__(self, key, function, **parameters): <NEW_LINE> <INDENT> self._function = function <NEW_LINE> self._param_keys = list(parameters.keys()) <NEW_LINE> super(StoredCallableWrapper, self).__init__(key, function=function, **parameters) <NEW_LINE> <DEDENT... | Generator for callables using that stores results.
| 6259902f96565a6dacd2d7c5 |
class Post(models.Model): <NEW_LINE> <INDENT> NORMAL, CLOSED, MODDED, EDITED = 0, 1, 2, 3 <NEW_LINE> HIDDEN = 99 <NEW_LINE> POST_STATUS = ( (NORMAL,"normal"), (CLOSED,"closed"), (MODDED,"modded"), (EDITED,"edited"), (HIDDEN,"hidden"), ) <NEW_LINE> topic = models.ForeignKey(Topic) <NEW_LINE> creator = models.ForeignKey(... | Represents a post made on gameefaqs | 6259902f91af0d3eaad3ae9a |
class Element(object): <NEW_LINE> <INDENT> __slots__ = ( 'pos', 'plane', 'special_sector', 'flags', 'elements', 'area', 'connection', 'index' ) <NEW_LINE> DIR_UP = 0 <NEW_LINE> DIR_RIGHT = 1 <NEW_LINE> DIR_DOWN = 2 <NEW_LINE> DIR_LEFT = 3 <NEW_LINE> DIR_RANGE = [DIR_UP, DIR_RIGHT, DIR_DOWN, DIR_LEFT] <NEW_LINE> FLAG_DA... | A single square grid element on a map that the player can stand at. | 6259902f287bf620b6272c56 |
class WinerySerializer(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Models.Winery <NEW_LINE> fields = ('url', 'id', 'winery_name', 'winery_addr', 'winery_phn') | 6259902fd18da76e235b7985 | |
class BRAINSLinearModelerEPCA(SlicerCommandLine): <NEW_LINE> <INDENT> input_spec = BRAINSLinearModelerEPCAInputSpec <NEW_LINE> output_spec = BRAINSLinearModelerEPCAOutputSpec <NEW_LINE> _cmd = " BRAINSLinearModelerEPCA " <NEW_LINE> _outputs_filenames = {} | title: Landmark Linear Modeler (BRAINS)
category: Utilities.BRAINS
description:
Training linear model using EPCA. Implementation based on my MS thesis, "A METHOD FOR AUTOMATED LANDMARK CONSTELLATION DETECTION USING EVOLUTIONARY PRINCIPAL COMPONENTS AND STATISTICAL SHAPE MODELS"
version: 1.0
documentati... | 6259902f50485f2cf55dbfec |
class Meta: <NEW_LINE> <INDENT> model = Project <NEW_LINE> fields = ('id', 'title', 'description', 'skills', 'author') | Maps the project model to json | 6259902fac7a0e7691f73557 |
class PrimaryKeyConstraint(UniqueConstraint): <NEW_LINE> <INDENT> _SYMBOL = 'pk' <NEW_LINE> _IMPORT = 'from %(constraints)s import PrimaryKey as %(pk)s' | Primary Key constraint | 6259902f63f4b57ef00865aa |
class Crypto_AES_GCM__AES_SIV(Crypto_AES_CBC_HMAC__AES_SIV): <NEW_LINE> <INDENT> _cryptoScheme = '3' <NEW_LINE> _cryptoName = 'AES-GCM/AES-SIV/scrypt' <NEW_LINE> def __init__(self, password, client=None, fsencoding=sys.getfilesystemencoding()): <NEW_LINE> <INDENT> super().__init__(password, client, fsencoding) <NEW_L... | Improved crypto scheme.
Still uses AES-256 GCM for encryption and authentication
Uses ASE-256 SIV encryption and authentaction for files | 6259902fd99f1b3c44d06713 |
class CsvManager(object): <NEW_LINE> <INDENT> def __init__(self, working_dir, timespan, vars, points, filename): <NEW_LINE> <INDENT> self.collector = {} <NEW_LINE> self.filename = filename <NEW_LINE> self.workingDir = working_dir <NEW_LINE> self.datesStrings = self.__dateFormatter(timespan) <NEW_LINE> self.__initFileFr... | Class for managing csv functionalities like initializing,
formatting, inserting values and writing output files for
spotty data (e.g. statistics of user defined points). | 6259902f1f5feb6acb163c60 |
class Firewall (object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.banned_ports = {} <NEW_LINE> for line in fileinput.input('/root/pox/ext/banned-ports.txt'): <NEW_LINE> <INDENT> portNumber = int(line) <NEW_LINE> self.banned_ports[portNumber] = True <NEW_LINE> <DEDENT> log.debug("Firewall initial... | Firewall class.
Extend this to implement some firewall functionality.
Don't change the name or anything -- the eecore component
expects it to be firewall.Firewall. | 6259902f8e05c05ec3f6f693 |
class Pagination: <NEW_LINE> <INDENT> def __init__(self, query, per_page, page, link): <NEW_LINE> <INDENT> self.query = query <NEW_LINE> self.per_page = per_page <NEW_LINE> self.page = page <NEW_LINE> self.link = link <NEW_LINE> self._count = None <NEW_LINE> <DEDENT> @cached_property <NEW_LINE> def entries(self): <NEW_... | Paginate a SQLAlchemy query object. | 6259902fd10714528d69eec3 |
class DonationTest(seldom.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> page = ServicePage(Seldom.driver) <NEW_LINE> menubar = DonationPage(Seldom.driver) <NEW_LINE> page.get("https://sit.1177tech.com.tw/SSO/external/login.jsp") <NEW_LINE> page.userid_input = "ad21@shar... | 快速捐款建立 | 6259902f30c21e258be9987d |
class Provider_Activities(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'provider_activities' <NEW_LINE> id_provider_activities = db.Column(db.Integer, primary_key=True) <NEW_LINE> id_provider = db.Column(db.Integer, db.ForeignKey('provider.id_provider')) <NEW_LINE> id_provider_practice_location = db.Column(db.Integer... | Create a Provider Activities table | 6259902fa8ecb0332587228f |
class TestBasket(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 testBasket(self): <NEW_LINE> <INDENT> pass | Basket unit test stubs | 6259902fd99f1b3c44d06715 |
class EngineSourceMapper(SourceMapper): <NEW_LINE> <INDENT> def __init__(self, scheduler): <NEW_LINE> <INDENT> self._scheduler = scheduler <NEW_LINE> <DEDENT> def _unique_dirs_for_sources(self, sources): <NEW_LINE> <INDENT> seen = set() <NEW_LINE> for source in sources: <NEW_LINE> <INDENT> source_dir = os.path.dirname(... | A v2 engine backed SourceMapper that supports pre-`BuildGraph` cache warming in the daemon. | 6259902f96565a6dacd2d7c7 |
class IonEntry(PDEntry): <NEW_LINE> <INDENT> def __init__(self, ion, energy, name=None): <NEW_LINE> <INDENT> self.energy = energy <NEW_LINE> self.ion = ion <NEW_LINE> self.composition = ion.composition <NEW_LINE> self.name = name if name else self.ion.reduced_formula <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from... | Object similar to PDEntry, but contains an Ion object instead of a
Composition object.
Args:
comp: Ion object
energy: Energy for composition.
name: Optional parameter to name the entry. Defaults to the
chemical formula.
.. attribute:: name
A name for the entry. This is the string shown in the... | 6259902f30c21e258be9987e |
class SVGPage(object): <NEW_LINE> <INDENT> def __init__(self, net_regex=NET_REGEX_ALL, airwires=2, pins_to_skip=[], max_pin_count=None, context=global_context): <NEW_LINE> <INDENT> self.net_regex = re.compile(net_regex) <NEW_LINE> self.airwires = airwires <NEW_LINE> self.context = context <NEW_LINE> self.max_pin_count ... | Represents single .svg page | 6259902f73bcbd0ca4bcb303 |
class linux_vma_cache(linux_common.AbstractLinuxCommand): <NEW_LINE> <INDENT> def __init__(self, config, *args, **kwargs): <NEW_LINE> <INDENT> linux_common.AbstractLinuxCommand.__init__(self, config, *args, **kwargs) <NEW_LINE> self._config.add_option('UNALLOCATED', short_option = 'u', default = False, help = 'Show una... | Gather VMAs from the vm_area_struct cache | 6259902f0a366e3fb87dda5a |
class Player1326State(): <NEW_LINE> <INDENT> def __init__(self, player): <NEW_LINE> <INDENT> self.player = player <NEW_LINE> self.betMultiplier = int() <NEW_LINE> <DEDENT> def currentBet(self): <NEW_LINE> <INDENT> self.player.nextBet = self.player.initialBet * self.betMultiplier <NEW_LINE> <DEDENT> def nextWon(self): <... | This is the superclass of all Player1326 states.
currentBet(obj:bet): set the amount to be betted by the current
state of the bet strategy. | 6259902f21bff66bcd723cd7 |
class ErrorTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_noMessageValidStatus(self): <NEW_LINE> <INDENT> e = error.Error(b"200") <NEW_LINE> self.assertEqual(e.message, b"OK") <NEW_LINE> <DEDENT> def test_noMessageInvalidStatus(self): <NEW_LINE> <INDENT> e = error.Error(b"InvalidCode") <NEW_LINE> self.assertEqu... | Tests for how L{Error} attributes are initialized. | 6259902fe76e3b2f99fd9a7f |
class DeleteSubnetPool(command.Command): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(DeleteSubnetPool, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'subnet_pool', metavar='<subnet-pool>', help=_("Subnet pool to delete (name or ID)") ) <NEW_LINE> return parser <... | Delete subnet pool | 6259902f56b00c62f0fb3934 |
class SpeedIndexMetric(Metric): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SpeedIndexMetric, self).__init__() <NEW_LINE> self._impl = None <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def CustomizeBrowserOptions(cls, options): <NEW_LINE> <INDENT> options.AppendExtraBrowserArgs('--disable-infobars'... | The speed index metric is one way of measuring page load speed.
It is meant to approximate user perception of page load speed, and it
is based on the amount of time that it takes to paint to the visual
portion of the screen. It includes paint events that occur after the
onload event, and it doesn't include time loadin... | 6259902fb57a9660fecd2af6 |
class ReadConfig(): <NEW_LINE> <INDENT> def __init__(self, cfg_array): <NEW_LINE> <INDENT> self.uname = cfg_array['0']['value'] <NEW_LINE> self.email = cfg_array['1']['value'] <NEW_LINE> self.msgprefs = cfg_array['2']['value'] <NEW_LINE> self.mv_folder = cfg_array['3']['value'] <NEW_LINE> self.tv_folder = cfg_array['4'... | Returns a usable array of configuration options
:param cfg_array: raw json array from ./config.json
.uname
.email
.tv_folder
.mv_folder | 6259902f50485f2cf55dbfef |
class JobDecoder(json.JSONDecoder): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> env = kwargs.pop('env') <NEW_LINE> super(JobDecoder, self).__init__( object_hook=self.object_hook, *args, **kwargs ) <NEW_LINE> assert env <NEW_LINE> self.env = env <NEW_LINE> <DEDENT> def object_hook(self, ... | Decode json, recomposing recordsets | 6259902fac7a0e7691f7355b |
class UserAccountsTestMixin(object): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(UserAccountsTestMixin, self).setUp() <NEW_LINE> self.package = SourcePackageName.objects.create(name='dummy-package') <NEW_LINE> self.password = 'asdf' <NEW_LINE> self.user = User.objects.create_user( main_email='user@do... | Defines some common methods for all user account tests. | 6259902fa4f1c619b294f668 |
class SAE(Loss): <NEW_LINE> <INDENT> def loss(self, predicted: Tensor, actual: Tensor) -> float: <NEW_LINE> <INDENT> return np.sum(np.abs(predicted - actual)) <NEW_LINE> <DEDENT> def grad(self, predicted: Tensor, actual: Tensor) -> float: <NEW_LINE> <INDENT> return np.sign(actual - predicted) | SAE is sum absolute error
sae = |A - B| | 6259902fa8ecb03325872291 |
class HealthHandler(RequestHandler): <NEW_LINE> <INDENT> def initialize(self, settings): <NEW_LINE> <INDENT> self._settings = settings <NEW_LINE> <DEDENT> @tornado.gen.coroutine <NEW_LINE> def get(self): <NEW_LINE> <INDENT> ok = True <NEW_LINE> if not ok: <NEW_LINE> <INDENT> raise APIServerError("Service is in the RED ... | Check system"s health status. | 6259902f8a43f66fc4bf31f9 |
class PurpleAirMonitor(StdService): <NEW_LINE> <INDENT> def __init__(self, engine, config_dict): <NEW_LINE> <INDENT> super(PurpleAirMonitor, self).__init__(engine, config_dict) <NEW_LINE> loginf("service version is %s" % WEEWX_PURPLEAIR_VERSION) <NEW_LINE> self.config_dict = config_dict.get('PurpleAirMonitor', {}) <NEW... | Collect Purple Air air quality measurements. | 6259902fbe8e80087fbc00ef |
class Meta: <NEW_LINE> <INDENT> ordering = ['name'] <NEW_LINE> verbose_name = "provincia" <NEW_LINE> verbose_name_plural = "provincias" | Meta class. | 6259902f91af0d3eaad3aea0 |
class IsochroneResponsePolygonProperties(object): <NEW_LINE> <INDENT> swagger_types = { 'bucket': 'int' } <NEW_LINE> attribute_map = { 'bucket': 'bucket' } <NEW_LINE> def __init__(self, bucket=None): <NEW_LINE> <INDENT> self._bucket = None <NEW_LINE> self.discriminator = None <NEW_LINE> if bucket is not None: <NEW_LINE... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259902f5166f23b2e24444a |
class BigramWordCandidateProvider(object): <NEW_LINE> <INDENT> def __init__(self, corpus): <NEW_LINE> <INDENT> _bigrams = bigrams(corpus) <NEW_LINE> self._cfd = ConditionalFreqDist(_bigrams) <NEW_LINE> <DEDENT> def candidates(self, word_sequence): <NEW_LINE> <INDENT> word = word_sequence[-1] <NEW_LINE> candidates = [ c... | Provides candidate next words given a word using a bigram model. | 6259902fd53ae8145f9194d7 |
class WrappedMesh(Mesh): <NEW_LINE> <INDENT> def init(self, mesh_with_shell, data={}): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.with_shell = mesh_with_shell <NEW_LINE> self._interpolators = {} <NEW_LINE> <DEDENT> def cut(self, f, **kwargs): <NEW_LINE> <INDENT> element = f.function_space().ufl_element(... | This class represents a mesh with a certain submesh and defines
methods for the fast interpolation between the two meshes. | 6259902fd10714528d69eec5 |
class TestDestinyDefinitionsDestinyUnlockDefinition(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 testDestinyDefinitionsDestinyUnlockDefinition(self): <NEW_LINE> <INDENT> pass | DestinyDefinitionsDestinyUnlockDefinition unit test stubs | 6259902f66673b3332c31465 |
class KeepLeft(Parser): <NEW_LINE> <INDENT> def __init__(self, left, right): <NEW_LINE> <INDENT> super(KeepLeft, self).__init__() <NEW_LINE> self.set_children([left, right]) <NEW_LINE> <DEDENT> def process(self, pos, data, ctx): <NEW_LINE> <INDENT> left, right = self.children <NEW_LINE> pos, res = left.process(pos, dat... | KeepLeft takes two parsers. It requires them both to succeed but only
returns results for the first one. It consumes input for both.
.. code-block:: python
a = Char("a")
q = Char('"')
aq = a << q # like a + q except only the result of a is
# returned
... | 6259902f0a366e3fb87dda5c |
class StoreHandle(c_size_t): <NEW_LINE> <INDENT> def __repr__(self) -> str: <NEW_LINE> <INDENT> return f"{self.__class__.__name__}({self.value})" <NEW_LINE> <DEDENT> async def close(self): <NEW_LINE> <INDENT> if not getattr(self, "_closed", False): <NEW_LINE> <INDENT> await do_call_async("askar_store_close", self) <NEW... | Index of an active Store instance. | 6259902f9b70327d1c57fdf9 |
class FMFAbstractCheck(AbstractCheck): <NEW_LINE> <INDENT> metadata = None <NEW_LINE> name: Optional[str] = None <NEW_LINE> fmf_metadata_path = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if not self.metadata: <NEW_LINE> <INDENT> if not self.fmf_metadata_path: <NEW_LINE> <INDENT> logger.info( "setting self.... | Abstract class for checks and loading metadata from FMF format | 6259902f21bff66bcd723cd9 |
class SoftDTWBarycenter(EuclideanBarycenter): <NEW_LINE> <INDENT> def __init__(self, gamma=1.0, weights=None, method="L-BFGS-B", tol=1e-3, max_iter=50, init=None): <NEW_LINE> <INDENT> EuclideanBarycenter.__init__(self, weights=weights) <NEW_LINE> self.method = method <NEW_LINE> self.tol = tol <NEW_LINE> self.gamma = ga... | Compute barycenter (time series averaging) under the soft-DTW
geometry.
Parameters
----------
gamma: float
Regularization parameter.
Lower is less smoothed (closer to true DTW).
weights: None or array
Weights of each X[i]. Must be the same size as len(X).
method: string
Optimization method, passed to `... | 6259902fd6c5a102081e319b |
class DropPipeline(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.re_drop = re.compile(r'redirectUrl') <NEW_LINE> <DEDENT> def process_item(self, item, spider): <NEW_LINE> <INDENT> if item['content']: <NEW_LINE> <INDENT> if self.re_drop.search(item['content']): <NEW_LINE> <INDENT> raise DropI... | docstring for DropPipeline | 6259902f1d351010ab8f4b8d |
class ResultNVT(ScanConfigNVT): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> default_resolver = text_resolver <NEW_LINE> <DEDENT> version = graphene.String(description='Version of the NVT used in the scan') <NEW_LINE> @staticmethod <NEW_LINE> def resolve_version(root, _info): <NEW_LINE> <INDENT> return get_text_... | NVT to which result applies. | 6259902fec188e330fdf9908 |
class DefaultNumericArgs(NumericArgsBuilder): <NEW_LINE> <INDENT> def __init__(self, data=None): <NEW_LINE> <INDENT> super(DefaultNumericArgs, self).__init__(data) <NEW_LINE> self.set_contribution('all') <NEW_LINE> self.set_electron_ion_collisions(True) <NEW_LINE> self.set_force_viscosity_regime(0) <NEW_LINE> self.set_... | Default numerical arguments. | 6259902fa4f1c619b294f66a |
class TestBC(unittest.TestCase): <NEW_LINE> <INDENT> def testBoundCond(self): <NEW_LINE> <INDENT> self.assertFalse(boundary.bcsImposed(1)) <NEW_LINE> <DEDENT> def testSinglePoint(self): <NEW_LINE> <INDENT> boundary.addSinglePointBC(17, 0.0) <NEW_LINE> self.assertTrue(boundary.singlePointBC(17)) <NEW_LINE> self.assertFa... | test BC() | 6259902f96565a6dacd2d7c9 |
class AutoRestParameterizedHostTestClient(object): <NEW_LINE> <INDENT> def __init__( self, credentials, host, accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, filepath=None): <NEW_LINE> <INDENT> self.config = AutoRestParameterizedHostTestClientConfiguration(credentials,... | Test Infrastructure for AutoRest
:ivar config: Configuration for client.
:vartype config: AutoRestParameterizedHostTestClientConfiguration
:ivar paths: Paths operations
:vartype paths: .operations.PathsOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A ms... | 6259902f15baa7234946300e |
class MeasDCVoltageTask(InstrumentTask): <NEW_LINE> <INDENT> wait_time = Float().tag(pref=True) <NEW_LINE> database_entries = set_default({'voltage': 1.0}) <NEW_LINE> wait = set_default({'activated': True, 'wait': ['instr']}) <NEW_LINE> def perform(self): <NEW_LINE> <INDENT> sleep(self.wait_time) <NEW_LINE> value = sel... | Measure a dc voltage.
Wait for any parallel operation before execution and then wait the
specified time before perfoming the measure. | 6259902f91af0d3eaad3aea2 |
class VirusForm(URLRedirectBaseForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Virus <NEW_LINE> fields = ['sid', 'tax_id', 'subtype', "isolation_country", "collection_date", "strain", "link_db", "comment"] | Form for virus.
collection_date = forms.DateField(widget=forms.TextInput(attrs=
{
'class': 'datepicker'
})) | 6259902f30c21e258be99882 |
@urls.register <NEW_LINE> class Images(generic.View): <NEW_LINE> <INDENT> url_regex = r'glance/images/$' <NEW_LINE> @rest_utils.ajax() <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> filters, kwargs = rest_utils.parse_filters_kwargs(request, CLIENT_KEYWORDS) <NEW_LINE> images, has_more_data, has_prev_data = api.... | API for Glance images. | 6259902f5166f23b2e24444c |
class Linear(equations_scientific.LinearScientific, equations_framework.LinearFramework, TemporalApplicableEquation): <NEW_LINE> <INDENT> pass | This class brings together the scientific and framework methods that are
associated with the Linear datatypes.
::
LinearData
|
/ \
LinearFramework LinearScientific
\ /
... | 6259902f287bf620b6272c5d |
class Scalar: <NEW_LINE> <INDENT> def __init__(self, name: str, schema_name: str = "default") -> None: <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self._implementation = None <NEW_LINE> self._schema_name = schema_name <NEW_LINE> <DEDENT> def bake(self, schema: "GraphQLSchema") -> None: <NEW_LINE> <INDENT> if not se... | This decorator allows you to link a GraphQL Scalar to a Scalar class.
For example, for the following SDL:
scalar DateTime
Use the Scalar decorator the following way:
@Scalar("DateTime")
class ScalarDateTime:
def coerce_output(self, value):
return value.isoformat()
def coerce... | 6259902f66673b3332c31467 |
class BamAutoQcReport(Step): <NEW_LINE> <INDENT> spec = { "name": "BamAutoQcReport", "version": "0.1", "descr": [ "Create an HTML report based on the auto_qc results" ], "args": { "inputs": [ { "name" : "input_files", "type" : "file", "descr" : "the auto_qc reports", } ], "outputs": [ { "name" : "html_report", "type... | Create the auto_qc final report | 6259902fd18da76e235b7989 |
class Batch(object): <NEW_LINE> <INDENT> def __init__(self, extension='mp4', resolution='highest', path='.'): <NEW_LINE> <INDENT> self.extension = extension <NEW_LINE> self.resolution = resolution <NEW_LINE> self.path = path <NEW_LINE> <DEDENT> def download_by_url_list(self, url_list): <NEW_LINE> <INDENT> for url in ur... | Class representation of a batch operation | 6259902fd6c5a102081e319d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.