text stringlengths 81 112k |
|---|
the current packet size.
:return: the current packet size based on the enabled registers.
def getPacketSize(self):
"""
the current packet size.
:return: the current packet size based on the enabled registers.
"""
size = 0
if self.isAccelerometerEnabled():
... |
performs initialisation of the device
:param batchSize: the no of samples that each provideData call should yield
:return:
def initialiseDevice(self):
"""
performs initialisation of the device
:param batchSize: the no of samples that each provideData call should yield
:r... |
Specifies the device should write acceleration values to the FIFO, is not applied until enableFIFO is called.
:return:
def enableAccelerometer(self):
"""
Specifies the device should write acceleration values to the FIFO, is not applied until enableFIFO is called.
:return:
"""
... |
Specifies the device should NOT write acceleration values to the FIFO, is not applied until enableFIFO is
called.
:return:
def disableAccelerometer(self):
"""
Specifies the device should NOT write acceleration values to the FIFO, is not applied until enableFIFO is
called.
... |
Specifies the device should write gyro values to the FIFO, is not applied until enableFIFO is called.
:return:
def enableGyro(self):
"""
Specifies the device should write gyro values to the FIFO, is not applied until enableFIFO is called.
:return:
"""
logger.debug("Enab... |
Specifies the device should NOT write gyro values to the FIFO, is not applied until enableFIFO is called.
:return:
def disableGyro(self):
"""
Specifies the device should NOT write gyro values to the FIFO, is not applied until enableFIFO is called.
:return:
"""
logger.de... |
Specifies the device should write temperature values to the FIFO, is not applied until enableFIFO is called.
:return:
def enableTemperature(self):
"""
Specifies the device should write temperature values to the FIFO, is not applied until enableFIFO is called.
:return:
"""
... |
Specifies the device should NOT write temperature values to the FIFO, is not applied until enableFIFO is called.
:return:
def disableTemperature(self):
"""
Specifies the device should NOT write temperature values to the FIFO, is not applied until enableFIFO is called.
:return:
... |
Sets the gyro sensitivity to 250, 500, 1000 or 2000 according to the given value (and implicitly disables the
self
tests)
:param value: the target sensitivity.
def setGyroSensitivity(self, value):
"""
Sets the gyro sensitivity to 250, 500, 1000 or 2000 according to the given val... |
Sets the accelerometer sensitivity to 2, 4, 8 or 16 according to the given value. Throws an ArgumentError if
the value provided is not valid.
:param value: the target sensitivity.
def setAccelerometerSensitivity(self, value):
"""
Sets the accelerometer sensitivity to 2, 4, 8 or 16 accor... |
Sets the internal sample rate of the MPU-6050, this requires writing a value to the device to set the sample
rate as Gyroscope Output Rate / (1 + SMPLRT_DIV) where the gryoscope outputs at 8kHz and the peak sampling rate
is 1kHz. The target sample rate is therefore capped at 1kHz.
:param target... |
Resets the FIFO by first disabling the FIFO then sending a FIFO_RESET and then re-enabling the FIFO.
:return:
def resetFifo(self):
"""
Resets the FIFO by first disabling the FIFO then sending a FIFO_RESET and then re-enabling the FIFO.
:return:
"""
logger.debug("Resettin... |
Enables the FIFO, resets it and then sets which values should be written to the FIFO.
:return:
def enableFifo(self):
"""
Enables the FIFO, resets it and then sets which values should be written to the FIFO.
:return:
"""
logger.debug("Enabling FIFO")
self.i2c_io.w... |
gets the amount of data available on the FIFO right now.
:return: the number of bytes available on the FIFO which will be proportional to the number of samples available
based on the values the device is configured to sample.
def getFifoCount(self):
"""
gets the amount of data available... |
reads the specified number of bytes from the FIFO, should be called after a call to getFifoCount to ensure there
is new data available (to avoid reading duplicate data).
:param bytesToRead: the number of bytes to read.
:return: the bytes read.
def getDataFromFIFO(self, bytesToRead):
"""... |
reads a batchSize batch of data from the FIFO while attempting to optimise the number of times we have to read
from the device itself.
:return: a list of data where each item is a single sample of data converted into real values and stored as a
dict.
def provideData(self):
"""
r... |
unpacks a single sample of data (where sample length is based on the currently enabled sensors).
:param rawData: the data to convert
:return: a converted data set.
def unpackSample(self, rawData):
"""
unpacks a single sample of data (where sample length is based on the currently enabled... |
Like :func:`textwrap.wrap` but preserves existing newlines which
:func:`textwrap.wrap` does not otherwise handle well.
See Also
--------
:func:`textwrap.wrap`
def wrap(text, width, *args, **kwargs):
"""
Like :func:`textwrap.wrap` but preserves existing newlines which
:func:`textwrap.wrap` ... |
Outputs line-wrapped text wrapped in a box drawn with a repeated (usually
ASCII) character.
For example:
>>> print(textbox('Text to wrap', width=16))
################
# #
# Text to wrap #
# #
################
Parameters
-------... |
Entrypoint function.
def main():
"""Entrypoint function."""
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--username',
help='Hydro Quebec username')
parser.add_argument('-p', '--password',
help='Password')
parser.add_argument('-j', '--... |
Calculate western easter
def easter(year):
'''Calculate western easter'''
# formula taken from http://aa.usno.navy.mil/faq/docs/easter.html
c = trunc(year / 100)
n = year - 19 * trunc(year / 19)
k = trunc((c - 17) / 25)
i = c - trunc(c / 4) - trunc((c - k) / 3) + (19 * n) + 15
i = i - 30 ... |
July 4th
def independence_day(year, observed=None):
'''July 4th'''
day = 4
if observed:
if calendar.weekday(year, JUL, 4) == SAT:
day = 3
if calendar.weekday(year, JUL, 4) == SUN:
day = 5
return (year, JUL, day) |
in USA: 2nd Monday in Oct
Elsewhere: Oct 12
def columbus_day(year, country='usa'):
'''in USA: 2nd Monday in Oct
Elsewhere: Oct 12'''
if country == 'usa':
return nth_day_of_month(2, MON, OCT, year)
else:
return (year, OCT, 12) |
USA: last Thurs. of November, Canada: 2nd Mon. of October
def thanksgiving(year, country='usa'):
'''USA: last Thurs. of November, Canada: 2nd Mon. of October'''
if country == 'usa':
if year in [1940, 1941]:
return nth_day_of_month(3, THU, NOV, year)
elif year == 1939:
re... |
Parameters
----------
y: 1D numpy array
The data to be fitted
x: 1D numpy array
The x values of the y array. x and y must
have the same shape.
weights: 1D numpy array, must have the same shape as x and y
weight values
Examples
--------
>>> import numpy as N... |
Analyses the measurement with the given parameters
:param measurementId:
:return:
def get(self, measurementId):
"""
Analyses the measurement with the given parameters
:param measurementId:
:return:
"""
logger.info('Analysing ' + measurementId)
mea... |
compares the current device state against the targetStateProvider and issues updates as necessary to ensure the
device is
at that state.
:param md:
:param targetState: the target state.
:param httpclient: the http client
:return:
def _applyTargetState(targetState, md, httpclient):
"""
c... |
Updates the target state on the specified device.
:param targetState: the target state to reach.
:param device: the device to update.
:return:
def updateDeviceState(self, device):
"""
Updates the target state on the specified device.
:param targetState: the target state ... |
Updates the system target state and propagates that to all devices.
:param newState:
:return:
def updateTargetState(self, newState):
"""
Updates the system target state and propagates that to all devices.
:param newState:
:return:
"""
self._targetStatePro... |
Input ASCII trailer file "input" will be read.
The contents will then be written out to a FITS file in the same format
as used by 'stwfits' from IRAF.
Parameters
===========
input : str
Filename of input ASCII trailer file
width : int
Number of characters wide to use for defin... |
An example function that will turn a nested dictionary of results
(as returned by ``ConfigObj.validate``) into a flat list.
``cfg`` is the ConfigObj instance being checked, ``res`` is the results
dictionary returned by ``validate``.
(This is a recursive function, so you shouldn't use the ``levels`` or... |
Find all the values and sections not in the configspec from a validated
ConfigObj.
``get_extra_values`` returns a list of tuples where each tuple represents
either an extra section, or an extra value.
The tuples contain two values, a tuple representing the section the value
is in and the name of t... |
Helper function to fetch values from owning section.
Returns a 2-tuple: the value, and the section where it was found.
def _fetch(self, key):
"""Helper function to fetch values from owning section.
Returns a 2-tuple: the value, and the section where it was found.
"""
# switch ... |
'D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If key is not found, d is returned if given, otherwise KeyError is raised'
def pop(self, key, default=MISSING):
"""
'D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If key is not fou... |
Pops the first (key,val)
def popitem(self):
"""Pops the first (key,val)"""
sequence = (self.scalars + self.sections)
if not sequence:
raise KeyError(": 'popitem(): dictionary is empty'")
key = sequence[0]
val = self[key]
del self[key]
return key, val |
A version of clear that also affects scalars/sections
Also clears comments and configspec.
Leaves other attributes alone :
depth/main/parent are not affected
def clear(self):
"""
A version of clear that also affects scalars/sections
Also clears comments and configsp... |
D.items() -> list of D's (key, value) pairs, as 2-tuples
def items(self):
"""D.items() -> list of D's (key, value) pairs, as 2-tuples"""
return list(zip((self.scalars + self.sections), list(self.values()))) |
Return a deepcopy of self as a dictionary.
All members that are ``Section`` instances are recursively turned to
ordinary dictionaries - by calling their ``dict`` method.
>>> n = a.dict() # doctest: +SKIP
>>> n == a # doctest: +SKIP
1
>>> n is a # doctest: +SKIP
... |
A recursive update - useful for merging config files.
>>> a = '''[section1]
... option1 = True
... [[subsection]]
... more_options = False
... # end of file'''.splitlines()
>>> b = '''# File is user.ini
... [section1]
... option1 =... |
Change a keyname to another, without changing position in sequence.
Implemented so that transformations can be made on keys,
as well as on values. (used by encode and decode)
Also renames comments.
def rename(self, oldkey, newkey):
"""
Change a keyname to another, without chan... |
Walk every member and call a function on the keyword and value.
Return a dictionary of the return values
If the function raises an exception, raise the errror
unless ``raise_errors=False``, in which case set the return value to
``False``.
Any unrecognised keyword arguments you... |
Accepts a key as input. The corresponding value must be a string or
the objects (``True`` or 1) or (``False`` or 0). We allow 0 and 1 to
retain compatibility with Python 2.2.
If the string is one of ``True``, ``On``, ``Yes``, or ``1`` it returns
``True``.
If the string is one ... |
A convenience method which fetches the specified value, guaranteeing
that it is a list.
>>> a = ConfigObj()
>>> a['a'] = 1
>>> a.as_list('a')
[1]
>>> a['a'] = (1,)
>>> a.as_list('a')
[1]
>>> a['a'] = [1]
>>> a.as_list('a')
[1]
def... |
Restore (and return) default value for the specified key.
This method will only work for a ConfigObj that was created
with a configspec and has been validated.
If there is no default value for this key, ``KeyError`` is raised.
def restore_default(self, key):
"""
Restore (and r... |
Recursively restore default values to all members
that have them.
This method will only work for a ConfigObj that was created
with a configspec and has been validated.
It doesn't delete or modify entries without default values.
def restore_defaults(self):
"""
Recursive... |
Handle any BOM, and decode if necessary.
If an encoding is specified, that *must* be used - but the BOM should
still be removed (and the BOM attribute set).
(If the encoding is wrongly specified, then a BOM for an alternative
encoding won't be discovered or removed.)
If an enc... |
Decode infile to unicode. Using the specified encoding.
if is a string, it also needs converting to a list.
def _decode(self, infile, encoding):
"""
Decode infile to unicode. Using the specified encoding.
if is a string, it also needs converting to a list.
"""
if isins... |
Decode element to unicode if necessary.
def _decode_element(self, line):
"""Decode element to unicode if necessary."""
if not self.encoding:
return line
if isinstance(line, str) and self.default_encoding:
return line.decode(self.default_encoding)
return line |
Actually parse the config file.
def _parse(self, infile):
"""Actually parse the config file."""
temp_list_values = self.list_values
if self.unrepr:
self.list_values = False
comment_list = []
done_start = False
this_section = self
maxline = len(infile... |
Given a section and a depth level, walk back through the sections
parents to see if the depth level matches a previous section.
Return a reference to the right section,
or raise a SyntaxError.
def _match_depth(self, sect, depth):
"""
Given a section and a depth level, walk back... |
Handle an error according to the error settings.
Either raise the error or store it.
The error will have occured at ``cur_index``
def _handle_error(self, text, ErrorClass, infile, cur_index):
"""
Handle an error according to the error settings.
Either raise the error or store ... |
Return an unquoted version of a value
def _unquote(self, value):
"""Return an unquoted version of a value"""
if not value:
# should only happen during parsing of lists
raise SyntaxError
if (value[0] == value[-1]) and (value[0] in ('"', "'")):
value = value[1:... |
Return a safely quoted version of a value.
Raise a ConfigObjError if the value cannot be safely quoted.
If multiline is ``True`` (default) then use triple quotes
if necessary.
* Don't quote values that don't need it.
* Recursively quote members of a list and return a comma join... |
Given a value string, unquote, remove comment,
handle lists. (including empty and single member lists)
def _handle_value(self, value):
"""
Given a value string, unquote, remove comment,
handle lists. (including empty and single member lists)
"""
if self._inspec:
... |
Extract the value, where we are in a multiline situation.
def _multiline(self, value, infile, cur_index, maxline):
"""Extract the value, where we are in a multiline situation."""
quot = value[:3]
newvalue = value[3:]
single_line = self._triple_quote[quot][0]
multi_line = self._t... |
Parse the configspec.
def _handle_configspec(self, configspec):
"""Parse the configspec."""
# FIXME: Should we check that the configspec was created with the
# correct settings ? (i.e. ``list_values=False``)
if not isinstance(configspec, ConfigObj):
try:
... |
Called by validate. Handles setting the configspec on subsections
including sections to be validated by __many__
def _set_configspec(self, section, copy):
"""
Called by validate. Handles setting the configspec on subsections
including sections to be validated by __many__
"""
... |
Write an individual line, for the write method
def _write_line(self, indent_string, entry, this_entry, comment):
"""Write an individual line, for the write method"""
# NOTE: the calls to self._quote here handles non-StringType values.
if not self.unrepr:
val = self._decode_element(s... |
Write a section marker line
def _write_marker(self, indent_string, depth, entry, comment):
"""Write a section marker line"""
return '%s%s%s%s%s' % (indent_string,
self._a_to_u('[' * depth),
self._quote(self._decode_element(entry), multiline=... |
Deal with a comment.
def _handle_comment(self, comment):
"""Deal with a comment."""
if not comment:
return ''
start = self.indent_type
if not comment.startswith('#'):
start += self._a_to_u(' # ')
return (start + comment) |
Write the current ConfigObj as a file
tekNico: FIXME: use StringIO instead of real files
>>> filename = a.filename # doctest: +SKIP
>>> a.filename = 'test.ini' # doctest: +SKIP
>>> a.write() # doctest: +SKIP
>>> a.filename = filename # doctest: +SKIP
>>> a == Con... |
Test the ConfigObj against a configspec.
It uses the ``validator`` object from *validate.py*.
To run ``validate`` on the current ConfigObj, call: ::
test = config.validate(validator)
(Normally having previously passed in the configspec when the ConfigObj
was created - you... |
Clear ConfigObj instance and restore to 'freshly created' state.
def reset(self):
"""Clear ConfigObj instance and restore to 'freshly created' state."""
self.clear()
self._initialise()
# FIXME: Should be done by '_initialise', but ConfigObj constructor (and reload)
# requ... |
Reload a ConfigObj from file.
This method raises a ``ReloadError`` if the ConfigObj doesn't have
a filename attribute pointing to a file.
def reload(self):
"""
Reload a ConfigObj from file.
This method raises a ``ReloadError`` if the ConfigObj doesn't have
a filename a... |
A dummy check method, always returns the value unchanged.
def check(self, check, member, missing=False):
"""A dummy check method, always returns the value unchanged."""
if missing:
raise self.baseErrorClass()
return member |
Get the command line arguments
Parameters: NONE
Returns:
files list of file specifications to be converted
outputFileNames list of output file specifications
(one per input file)
Default: a list of None value... |
Verify that the input HDUList is for a waivered FITS file.
Parameters:
waiveredHdul HDUList object to be verified
Returns: None
Exceptions:
ValueError Input HDUList is not for a waivered FITS file
def _verify(waiveredHdul):
"""
Verify that the in... |
Convert the input waivered FITS object to a multi-extension FITS
HDUList object. Generate an output multi-extension FITS file if
requested.
Parameters:
waiveredObject input object representing a waivered FITS file;
either a astroyp.io.fits.HDUList object, ... |
Convert the input waivered FITS object to various formats. The
default conversion format is multi-extension FITS. Generate an output
file in the desired format if requested.
Parameters:
waiveredObject input object representing a waivered FITS file;
either... |
Determine Julian day from Persian date
def to_jd(year, month, day):
'''Determine Julian day from Persian date'''
if year >= 0:
y = 474
else:
y = 473
epbase = year - y
epyear = 474 + (epbase % 2820)
if month <= 7:
m = (month - 1) * 31
else:
m = (month - 1) *... |
Calculate Persian date from Julian day
def from_jd(jd):
'''Calculate Persian date from Julian day'''
jd = trunc(jd) + 0.5
depoch = jd - to_jd(475, 1, 1)
cycle = trunc(depoch / 1029983)
cyear = (depoch % 1029983)
if cyear == 1029982:
ycycle = 2820
else:
aux1 = trunc(cyear /... |
Initializes capture of stdout/stderr, Python warnings, and exceptions;
redirecting them to the loggers for the modules from which they originated.
def setup_global_logging():
"""
Initializes capture of stdout/stderr, Python warnings, and exceptions;
redirecting them to the loggers for the modules from ... |
Disable global logging of stdio, warnings, and exceptions.
def teardown_global_logging():
"""Disable global logging of stdio, warnings, and exceptions."""
global global_logging_started
if not global_logging_started:
return
stdout_logger = logging.getLogger(__name__ + '.stdout')
stderr_log... |
Do basic configuration for the logging system. Similar to
logging.basicConfig but the logger ``name`` is configurable and both a file
output and a stream output can be created. Returns a logger object.
The default behaviour is to create a logger called ``name`` with a null
handled, and to use the "%(le... |
Set the stream that this logger is meant to replace. Usually this will
be either `sys.stdout` or `sys.stderr`, but can be any object with
`write()` and `flush()` methods, as supported by
`logging.StreamHandler`.
def set_stream(self, stream):
"""
Set the stream that this logger ... |
Buffers each message until a newline is reached. Each complete line is
then published to the logging system through ``self.log()``.
def write(self, message):
"""
Buffers each message until a newline is reached. Each complete line is
then published to the logging system through ``self.... |
Returns the full-qualified module name, full pathname, line number, and
function in which `StreamTeeLogger.write()` was called. For example,
if this instance is used to replace `sys.stdout`, this will return the
location of any print statement.
def find_actual_caller(self):
"""
... |
Deserialize ``fp`` (a ``.read()``-supporting file-like object
containing a XPORT document) to a Python object.
def load(fp):
'''
Deserialize ``fp`` (a ``.read()``-supporting file-like object
containing a XPORT document) to a Python object.
'''
reader = reading.Reader(fp)
keys = reader.field... |
Go to the login page.
def _get_login_page(self):
"""Go to the login page."""
try:
raw_res = yield from self._session.get(HOME_URL,
timeout=self._timeout)
except OSError:
raise PyHydroQuebecError("Can not connect to login... |
Login to HydroQuebec website.
def _post_login_page(self, login_url):
"""Login to HydroQuebec website."""
data = {"login": self.username,
"_58_password": self.password}
try:
raw_res = yield from self._session.post(login_url,
... |
Get id of consumption profile.
def _get_p_p_id_and_contract(self):
"""Get id of consumption profile."""
contracts = {}
try:
raw_res = yield from self._session.get(PROFILE_URL,
timeout=self._timeout)
except OSError:
... |
Get contract number when we have only one contract.
def _get_lonely_contract(self):
"""Get contract number when we have only one contract."""
contracts = {}
try:
raw_res = yield from self._session.get(MAIN_URL,
timeout=self._timeout... |
Get all balances.
.. todo::
IT SEEMS balances are shown (MAIN_URL) in the same order
that contracts in profile page (PROFILE_URL).
Maybe we should ensure that.
def _get_balances(self):
"""Get all balances.
.. todo::
IT SEEMS balances are shown... |
Load the profile page of a specific contract when we have multiple contracts.
def _load_contract_page(self, contract_url):
"""Load the profile page of a specific contract when we have multiple contracts."""
try:
yield from self._session.get(contract_url,
... |
Get annual data.
def _get_annual_data(self, p_p_id):
"""Get annual data."""
params = {"p_p_id": p_p_id,
"p_p_lifecycle": 2,
"p_p_state": "normal",
"p_p_mode": "view",
"p_p_resource_id": "resourceObtenirDonneesConsommationAnnuelles"... |
Get monthly data.
def _get_monthly_data(self, p_p_id):
"""Get monthly data."""
params = {"p_p_id": p_p_id,
"p_p_lifecycle": 2,
"p_p_resource_id": ("resourceObtenirDonnees"
"PeriodesConsommation")}
try:
raw_res... |
Get Hourly Data.
def _get_hourly_data(self, day_date, p_p_id):
"""Get Hourly Data."""
params = {"p_p_id": p_p_id,
"p_p_lifecycle": 2,
"p_p_state": "normal",
"p_p_mode": "view",
"p_p_resource_id": "resourceObtenirDonneesConsommation... |
Get detailled energy use from a specific contract.
def fetch_data_detailled_energy_use(self, start_date=None, end_date=None):
"""Get detailled energy use from a specific contract."""
if start_date is None:
start_date = datetime.datetime.now(HQ_TIMEZONE) - datetime.timedelta(days=1)
... |
Get the latest data from HydroQuebec.
def fetch_data(self):
"""Get the latest data from HydroQuebec."""
# Get http session
yield from self._get_httpsession()
# Get login page
login_url = yield from self._get_login_page()
# Post login page
yield from self._post_lo... |
Return collected data.
def get_data(self, contract=None):
"""Return collected data."""
if contract is None:
return self._data
if contract in self._data.keys():
return {contract: self._data[contract]}
raise PyHydroQuebecError("Contract {} not found".format(contrac... |
Posts the current state of each device to the server and schedules the next call in n seconds.
:param serverURL:
:return:
def ping(self):
"""
Posts the current state of each device to the server and schedules the next call in n seconds.
:param serverURL:
:return:
... |
Posts the current state to the server.
:param serverURL: the URL to ping.
:return:
def sendHeartbeat(self):
"""
Posts the current state to the server.
:param serverURL: the URL to ping.
:return:
"""
for name, md in self.cfg.recordingDevices.items():
... |
Schedules the next ping.
:param nextRun: when we should run next.
:param serverURL: the URL to ping.
:return:
def scheduleNextHeartbeat(self, nextRun):
"""
Schedules the next ping.
:param nextRun: when we should run next.
:param serverURL: the URL to ping.
... |
Validate a type or matcher argument to the constructor.
def _validate_argument(self, arg):
"""Validate a type or matcher argument to the constructor."""
if arg is None:
return arg
if isinstance(arg, type):
return InstanceOf(arg)
if not isinstance(arg, BaseMatche... |
Initiaize the mapping matcher with constructor arguments.
def _initialize(self, *args, **kwargs):
"""Initiaize the mapping matcher with constructor arguments."""
self.items = None
self.keys = None
self.values = None
if args:
if len(args) != 2:
raise ... |
Build the docs and show them in default web browser.
def docs(ctx, output='html', rebuild=False, show=True, verbose=True):
"""Build the docs and show them in default web browser."""
sphinx_build = ctx.run(
'sphinx-build -b {output} {all} {verbose} docs docs/_build'.format(
output=output,
... |
Upload the package to PyPI.
def upload(ctx, yes=False):
"""Upload the package to PyPI."""
import callee
version = callee.__version__
# check the packages version
# TODO: add a 'release' to automatically bless a version as release one
if version.endswith('-dev'):
fatal("Can't upload a d... |
Log an error message and exit.
Following arguments are keyword-only.
:param exitcode: Optional exit code to use
:param cause: Optional Invoke's Result object, i.e.
result of a subprocess invocation
def fatal(*args, **kwargs):
"""Log an error message and exit.
Following argument... |
This is the "atomic" function looped by other functions
def rungtd1d(time: Union[datetime, str, np.ndarray],
altkm: np.ndarray,
glat: float, glon: float) -> xarray.Dataset:
"""
This is the "atomic" function looped by other functions
"""
time = todt64(time)
# %% get solar p... |
Call `form.save()` and super itself.
def form_valid(self, form):
""" Call `form.save()` and super itself. """
form.save()
return super(SubscriptionView, self).form_valid(form) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.