Search is not available for this dataset
text stringlengths 75 104k |
|---|
def reduce(func):
"""Wrap a reduce function to Pipe object. Reduce function is a function
with at least two arguments. It works like built-in reduce function.
It takes first argument for accumulated result, second argument for
the new data to process. A keyword-based argument named 'init... |
def stopper(func):
"""Wrap a conditoinal function(stopper function) to Pipe object.
wrapped function should return boolean value. The cascading pipe will
stop the execution if wrapped function return True.
Stopper is useful if you have unlimited number of input data.
:param fu... |
def _list_networks():
"""Return a dictionary of network name to active status bools.
Sample virsh net-list output::
Name State Autostart
-----------------------------------------
default active yes
juju-test inactive no
foobar ... |
def flush(self, line):
"""flush the line to stdout"""
# TODO -- maybe use echo?
sys.stdout.write(line)
sys.stdout.flush() |
def execute(self, arg_str='', **kwargs):
"""runs the passed in arguments and returns an iterator on the output of
running command"""
cmd = "{} {} {}".format(self.cmd_prefix, self.script, arg_str)
expected_ret_code = kwargs.pop('code', 0)
# any kwargs with all capital letters sho... |
def get_request_subfields(root):
"""Build a basic 035 subfield with basic information from the OAI-PMH request.
:param root: ElementTree root node
:return: list of subfield tuples [(..),(..)]
"""
request = root.find('request')
responsedate = root.find('responseDate')
subs = [("9", request... |
def strip_xml_namespace(root):
"""Strip out namespace data from an ElementTree.
This function is recursive and will traverse all
subnodes to the root element
@param root: the root element
@return: the same root element, minus namespace
"""
try:
root.tag = root.tag.split('}')[1]
... |
def element_tree_collection_to_records(tree):
"""Take an ElementTree and converts the nodes into BibRecord records.
This function is for a tree root of collection as such:
<collection>
<record>
<!-- MARCXML -->
</record>
<record> ... </record>
</collection>
"""
... |
def element_tree_oai_records(tree, header_subs=None):
"""Take an ElementTree and converts the nodes into BibRecord records.
This expects a clean OAI response with the tree root as ListRecords
or GetRecord and record as the subtag like so:
<ListRecords|GetRecord>
<record>
<header>
... |
def run(app=None,
server='wsgiref',
host='127.0.0.1',
port=8080,
interval=1,
reloader=False,
quiet=False,
plugins=None,
debug=None, **kargs):
""" Start a server instance. This method blocks until the server terminates.
:param app: WSGI applica... |
def load_dict(self, source, namespace=''):
""" Load values from a dictionary structure. Nesting can be used to
represent namespaces.
>>> c = ConfigDict()
>>> c.load_dict({'some': {'namespace': {'key': 'value'} } })
{'some.namespace.key': 'value'}
"""
... |
def json(request, *args, **kwargs):
"""
The oembed endpoint, or the url to which requests for metadata are passed.
Third parties will want to access this view with URLs for your site's
content and be returned OEmbed metadata.
"""
# coerce to dictionary
params = dict(request.GET.items())
... |
def consume_json(request):
"""
Extract and return oembed content for given urls.
Required GET params:
urls - list of urls to consume
Optional GET params:
width - maxwidth attribute for oembed content
height - maxheight attribute for oembed content
template_dir - templat... |
def oembed_schema(request):
"""
A site profile detailing valid endpoints for a given domain. Allows for
better auto-discovery of embeddable content.
OEmbed-able content lives at a URL that maps to a provider.
"""
current_domain = Site.objects.get_current().domain
url_schemes = [] # a list ... |
def find_meta(*meta_file_parts, meta_key):
"""Extract __*meta*__ from meta_file."""
meta_file = read(*meta_file_parts)
meta_match = re.search(r"^__{}__ = ['\"]([^'\"]*)['\"]".format(meta_key),
meta_file, re.M)
if meta_match:
return meta_match.group(1)
raise Runtime... |
def main(path):
'''scan path directory and any subdirectories for valid captain scripts'''
basepath = os.path.abspath(os.path.expanduser(str(path)))
echo.h2("Available scripts in {}".format(basepath))
echo.br()
for root_dir, dirs, files in os.walk(basepath, topdown=True):
for f in fnmatch.f... |
def get_rate(self, zipcode, city=None, state=None, multiple_rates=False):
"""
Finds sales tax for given info.
Returns Decimal of the tax rate, e.g. 8.750.
"""
data = self.make_request_data(zipcode, city, state)
r = requests.get(self.url, params=data)
resp = r.jso... |
def make_request_data(self, zipcode, city, state):
""" Make the request params given location data """
data = {'key': self.api_key,
'postalcode': str(zipcode),
'city': city,
'state': state
}
data = ZipTaxClient._clean_request_data(data)
... |
def process_response(self, resp, multiple_rates):
""" Get the tax rate from the ZipTax response """
self._check_for_exceptions(resp, multiple_rates)
rates = {}
for result in resp['results']:
rate = ZipTaxClient._cast_tax_rate(result['taxSales'])
rates[result['geo... |
def _check_for_exceptions(self, resp, multiple_rates):
""" Check if there are exceptions that should be raised """
if resp['rCode'] != 100:
raise exceptions.get_exception_for_code(resp['rCode'])(resp)
results = resp['results']
if len(results) == 0:
raise exceptio... |
def get_all_text(node):
"""Recursively extract all text from node."""
if node.nodeType == node.TEXT_NODE:
return node.data
else:
text_string = ""
for child_node in node.childNodes:
text_string += get_all_text(child_node)
return text_string |
def _extract_packages(self):
"""
Extract a package in a new temporary directory.
"""
self.path_unpacked = mkdtemp(prefix="scoap3_package_",
dir=CFG_TMPSHAREDDIR)
for path in self.retrieved_packages_unpacked:
scoap3utils_extract_pac... |
def register(self, provider_class):
"""
Registers a provider with the site.
"""
if not issubclass(provider_class, BaseProvider):
raise TypeError('%s is not a subclass of BaseProvider' % provider_class.__name__)
if provider_class in self._registered_providers:... |
def unregister(self, provider_class):
"""
Unregisters a provider from the site.
"""
if not issubclass(provider_class, BaseProvider):
raise TypeError('%s must be a subclass of BaseProvider' % provider_class.__name__)
if provider_class not in self._registered_p... |
def populate(self):
"""
Populate the internal registry's dictionary with the regexes for each
provider instance
"""
self._registry = {}
for provider_class in self._registered_providers:
instance = provider_class()
self._registry[instance] ... |
def provider_for_url(self, url):
"""
Find the right provider for a URL
"""
for provider, regex in self.get_registry().items():
if re.match(regex, url) is not None:
return provider
raise OEmbedMissingEndpoint('No endpoint matches URL: %s' % url... |
def invalidate_stored_oembeds(self, sender, instance, created, **kwargs):
"""
A hook for django-based oembed providers to delete any stored oembeds
"""
ctype = ContentType.objects.get_for_model(instance)
StoredOEmbed.objects.filter(
object_id=instance.pk,
... |
def embed(self, url, **kwargs):
"""
The heart of the matter
"""
try:
# first figure out the provider
provider = self.provider_for_url(url)
except OEmbedMissingEndpoint:
raise
else:
try:
# check the database f... |
def autodiscover(self, url):
"""
Load up StoredProviders from url if it is an oembed scheme
"""
headers, response = fetch_url(url)
if headers['content-type'].split(';')[0] in ('application/json', 'text/javascript'):
provider_data = json.loads(response)
ret... |
def store_providers(self, provider_data):
"""
Iterate over the returned json and try to sort out any new providers
"""
if not hasattr(provider_data, '__iter__'):
raise OEmbedException('Autodiscovered response not iterable')
provider_pks = []
... |
def request_resource(self, url, **kwargs):
"""
Request an OEmbedResource for a given url. Some valid keyword args:
- format
- maxwidth
- maxheight
"""
params = kwargs
params['url'] = url
params['format'] = 'json'
if '?' i... |
def _image_field(self):
"""
Try to automatically detect an image field
"""
for field in self.model._meta.fields:
if isinstance(field, ImageField):
return field.name |
def _date_field(self):
"""
Try to automatically detect an image field
"""
for field in self.model._meta.fields:
if isinstance(field, (DateTimeField, DateField)):
return field.name |
def _build_regex(self):
"""
Performs a reverse lookup on a named view and generates
a list of regexes that match that object. It generates
regexes with the domain name included, using sites provided
by the get_sites() method.
>>> regex = provider.regex
>... |
def provider_from_url(self, url):
"""
Given a URL for any of our sites, try and match it to one, returning
the domain & name of the match. If no match is found, return current.
Returns a tuple of domain, site name -- used to determine 'provider'
"""
domain = get... |
def get_params(self, url):
"""
Extract the named parameters from a url regex. If the url regex does not contain
named parameters, they will be keyed _0, _1, ...
* Named parameters
Regex:
/photos/^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<object_id>\d... |
def get_object(self, url):
"""
Fields to match is a mapping of url params to fields, so for
the photos example above, it would be:
fields_to_match = { 'object_id': 'id' }
This procedure parses out named params from a URL and then uses
the fields_to_match... |
def render_html(self, obj, context=None):
"""
Generate the 'html' attribute of an oembed resource using a template.
Sort of a corollary to the parser's render_oembed method. By default,
the current mapping will be passed in as the context.
OEmbed templates are stored in... |
def map_attr(self, mapping, attr, obj):
"""
A kind of cheesy method that allows for callables or attributes to
be used interchangably
"""
if attr not in mapping and hasattr(self, attr):
if not callable(getattr(self, attr)):
mapping[attr] = getattr(self... |
def get_image(self, obj):
"""
Return an ImageFileField instance
"""
if self._meta.image_field:
return getattr(obj, self._meta.image_field) |
def resize(self, image_field, new_width=None, new_height=None):
"""
Resize an image to the 'best fit' width & height, maintaining
the scale of the image, so a 500x500 image sized to 300x400
will actually be scaled to 300x300.
Params:
image: ImageFieldFile to be r... |
def map_to_dictionary(self, url, obj, **kwargs):
"""
Build a dictionary of metadata for the requested object.
"""
maxwidth = kwargs.get('maxwidth', None)
maxheight = kwargs.get('maxheight', None)
provider_url, provider_name = self.provider_from_url(url)
... |
def request_resource(self, url, **kwargs):
"""
Request an OEmbedResource for a given url. Some valid keyword args:
- format
- maxwidth
- maxheight
"""
obj = self.get_object(url)
mapping = self.map_to_dictionary(url, obj, **kwargs)
... |
def get_object(self, url, month_format='%b', day_format='%d'):
"""
Parses the date from a url and uses it in the query. For objects which
are unique for date.
"""
params = self.get_params(url)
try:
year = params[self._meta.year_part]
month = param... |
def get_record(self):
"""Override the base."""
self.recid = self.get_recid()
self.remove_controlfields()
self.update_system_numbers()
self.add_systemnumber("Inspire", recid=self.recid)
self.add_control_number("003", "SzGeCERN")
self.update_collections()
se... |
def update_oai_info(self):
"""Add the 909 OAI info to 035."""
for field in record_get_field_instances(self.record, '909', ind1="C", ind2="O"):
new_subs = []
for tag, value in field[0]:
if tag == "o":
new_subs.append(("a", value))
... |
def update_cnum(self):
"""Check if we shall add cnum in 035."""
if "ConferencePaper" not in self.collections:
cnums = record_get_field_values(self.record, '773', code="w")
for cnum in cnums:
cnum_subs = [
("9", "INSPIRE-CNUM"),
... |
def update_hidden_notes(self):
"""Remove hidden notes and tag a CERN if detected."""
if not self.tag_as_cern:
notes = record_get_field_instances(self.record,
tag="595")
for field in notes:
for dummy, value in field[0]... |
def update_system_numbers(self):
"""035 Externals."""
scn_035_fields = record_get_field_instances(self.record, '035')
new_fields = []
for field in scn_035_fields:
subs = field_get_subfields(field)
if '9' in subs:
if subs['9'][0].lower() == "cds" an... |
def update_collections(self):
"""Try to determine which collections this record should belong to."""
for value in record_get_field_values(self.record, '980', code='a'):
if 'NOTE' in value.upper():
self.collections.add('NOTE')
if 'THESIS' in value.upper():
... |
def update_notes(self):
"""Remove INSPIRE specific notes."""
fields = record_get_field_instances(self.record, '500')
for field in fields:
subs = field_get_subfields(field)
for sub in subs.get('a', []):
sub = sub.strip() # remove any spaces before/after
... |
def update_title_to_proceeding(self):
"""Move title info from 245 to 111 proceeding style."""
titles = record_get_field_instances(self.record,
tag="245")
for title in titles:
subs = field_get_subfields(title)
new_subs = []
... |
def update_experiments(self):
"""Experiment mapping."""
# 693 Remove if 'not applicable'
for field in record_get_field_instances(self.record, '693'):
subs = field_get_subfields(field)
acc_experiment = subs.get("e", [])
if not acc_experiment:
ac... |
def update_reportnumbers(self):
"""Update reportnumbers."""
report_037_fields = record_get_field_instances(self.record, '037')
for field in report_037_fields:
subs = field_get_subfields(field)
for val in subs.get("a", []):
if "arXiv" not in val:
... |
def update_authors(self):
"""100 & 700 punctuate author names."""
author_names = record_get_field_instances(self.record, '100')
author_names.extend(record_get_field_instances(self.record, '700'))
for field in author_names:
subs = field_get_subfields(field)
for idx... |
def update_isbn(self):
"""Remove dashes from ISBN."""
isbns = record_get_field_instances(self.record, '020')
for field in isbns:
for idx, (key, value) in enumerate(field[0]):
if key == 'a':
field[0][idx] = ('a', value.replace("-", "").strip()) |
def update_dois(self):
"""Remove duplicate BibMatch DOIs."""
dois = record_get_field_instances(self.record, '024', ind1="7")
all_dois = {}
for field in dois:
subs = field_get_subfield_instances(field)
subs_dict = dict(subs)
if subs_dict.get('a'):
... |
def update_journals(self):
"""773 journal translations."""
for field in record_get_field_instances(self.record, '773'):
subs = field_get_subfield_instances(field)
new_subs = []
volume_letter = ""
journal_name = ""
for idx, (key, value) in enume... |
def update_thesis_supervisors(self):
"""700 -> 701 Thesis supervisors."""
for field in record_get_field_instances(self.record, '701'):
subs = list(field[0])
subs.append(("e", "dir."))
record_add_field(self.record, '700', subfields=subs)
record_delete_fields(se... |
def update_thesis_information(self):
"""501 degree info - move subfields."""
fields_501 = record_get_field_instances(self.record, '502')
for field in fields_501:
new_subs = []
for key, value in field[0]:
if key == 'b':
new_subs.append((... |
def update_pagenumber(self):
"""300 page number."""
pages = record_get_field_instances(self.record, '300')
for field in pages:
for idx, (key, value) in enumerate(field[0]):
if key == 'a':
field[0][idx] = ('a', "{0} p".format(value)) |
def update_date(self):
"""269 Date normalization."""
dates_269 = record_get_field_instances(self.record, '269')
for idx, field in enumerate(dates_269):
new_subs = []
old_subs = field[0]
for code, value in old_subs:
if code == "c":
... |
def update_date_year(self):
"""260 Date normalization."""
dates = record_get_field_instances(self.record, '260')
for field in dates:
for idx, (key, value) in enumerate(field[0]):
if key == 'c':
field[0][idx] = ('c', value[:4])
elif ... |
def is_published(self):
"""Check fields 980 and 773 to see if the record has already been published.
:return: True is published, else False
"""
field773 = record_get_field_instances(self.record, '773')
for f773 in field773:
if 'c' in field_get_subfields(f773):
... |
def update_links_and_ffts(self):
"""FFT (856) Dealing with files."""
for field in record_get_field_instances(self.record,
tag='856',
ind1='4'):
subs = field_get_subfields(field)
newsub... |
def update_languages(self):
"""041 Language."""
language_fields = record_get_field_instances(self.record, '041')
language = "eng"
record_delete_fields(self.record, "041")
for field in language_fields:
subs = field_get_subfields(field)
if 'a' in subs:
... |
def pathjoin(*args, **kwargs):
"""
Arguments:
args (list): *args list of paths
if len(args) == 1, args[0] is not a string, and args[0] is iterable,
set args to args[0].
Basically::
joined_path = u'/'.join(
[args[0].rstrip('/')] +
[a.strip('/'... |
def generate_dirlist_html(FS, filepath):
"""
Generate directory listing HTML
Arguments:
FS (FS): filesystem object to read files from
filepath (str): path to generate directory listings for
Keyword Arguments:
list_dir (callable: list[str]): list file names in a directory
... |
def git_static_file(filename,
mimetype='auto',
download=False,
charset='UTF-8'):
""" This method is derived from bottle.static_file:
Open [a file] and return :exc:`HTTPResponse` with status
code 200, 305, 403 or 404. The ``Content-Type``, ... |
def check_pkgs_integrity(filelist, logger, ftp_connector,
timeout=120, sleep_time=10):
"""
Checks if files are not being uploaded to server.
@timeout - time after which the script will register an error.
"""
ref_1 = []
ref_2 = []
i = 1
print >> sys.stdout, "\nChe... |
def normalize_query(query_string, terms=TERMS, norm_space=NORM_SPACE):
"""
Example:
>>> normalize_query(' some random words "with quotes " and spaces')
['some', 'random', 'words', 'with quotes', 'and', 'spaces']
"""
return [
norm_space(' ', (t[0] or t[1]).strip()) for t in terms(q... |
def collapse_initials(name):
""" Removes the space between initials.
eg T. A. --> T.A."""
if len(name.split()) > 1:
name = re.sub(r'([A-Z]\.) +(?=[A-Z]\.)', r'\1', name)
return name |
def fix_name_capitalization(lastname, givennames):
""" Converts capital letters to lower keeps first letter capital. """
lastnames = lastname.split()
if len(lastnames) == 1:
if '-' in lastname:
names = lastname.split('-')
names = map(lambda a: a[0] + a[1:].lower(), names)
... |
def extract_oembeds(self, text, maxwidth=None, maxheight=None, resource_type=None):
"""
Scans a block of text and extracts oembed data on any urls,
returning it in a list of dictionaries
"""
parser = text_parser()
urls = parser.extract_urls(text)
return self.handl... |
def strip(self, text, *args, **kwargs):
"""
Try to maintain parity with what is extracted by extract since strip
will most likely be used in conjunction with extract
"""
if OEMBED_DEFAULT_PARSE_HTML:
extracted = self.extract_oembeds_html(text, *args, **kwargs)
... |
def autodiscover():
"""
Automatically build the provider index.
"""
import imp
from django.conf import settings
for app in settings.INSTALLED_APPS:
try:
app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__
except AttributeError:
continue
... |
def select(options=None):
""" pass in a list of options, promt the user to select one, and return the selected option or None """
if not options:
return None
width = len(str(len(options)))
for x,option in enumerate(options):
sys.stdout.write('{:{width}}) {}\n'.format(x+1,option, width=wi... |
def main():
argparser = ArgumentParser()
subparsers = argparser.add_subparsers(dest='selected_subparser')
all_parser = subparsers.add_parser('all')
elsevier_parser = subparsers.add_parser('elsevier')
oxford_parser = subparsers.add_parser('oxford')
springer_parser = subparsers.add_parser('sprin... |
def get_record(self, record):
""" Reads a dom xml element in oaidc format and
returns the bibrecord object """
self.document = record
rec = create_record()
language = self._get_language()
if language and language != 'en':
record_add_field(rec, '041', subfi... |
def progress(length, **kwargs):
"""display a progress that can update in place
example --
total_length = 1000
with echo.progress(total_length) as p:
for x in range(total_length):
# do something crazy
p.update(x)
length -- int -- the total size o... |
def increment(itr, n=1, format_msg="{}. "):
"""Similar to enumerate but will set format_msg.format(n) into the prefix on
each iteration
:Example:
for v in increment(["foo", "bar"]):
echo.out(v) # 1. foo\n2. bar
:param itr: iterator, any iterator you want to set a numeric prefix on ... |
def err(format_msg, *args, **kwargs):
'''print format_msg to stderr'''
exc_info = kwargs.pop("exc_info", False)
stderr.warning(str(format_msg).format(*args, **kwargs), exc_info=exc_info) |
def out(format_msg="", *args, **kwargs):
'''print format_msg to stdout, taking into account --quiet setting'''
logmethod = kwargs.get("logmethod", stdout.info)
if format_msg != "":
if Prefix.has():
if isinstance(format_msg, basestring):
format_msg = Prefix.get() + format... |
def verbose(format_msg="", *args, **kwargs):
'''print format_msg to stdout, taking into account --verbose flag'''
kwargs["logmethod"] = stdout.debug
out(format_msg, *args, **kwargs) |
def banner(*lines, **kwargs):
"""prints a banner
sep -- string -- the character that will be on the line on the top and bottom
and before any of the lines, defaults to *
count -- integer -- the line width, defaults to 80
"""
sep = kwargs.get("sep", "*")
count = kwargs.get("width", globa... |
def table(*columns, **kwargs):
"""
format columned data so we can easily print it out on a console, this just takes
columns of data and it will format it into properly aligned columns, it's not
fancy, but it works for most type of strings that I need it for, like server name
lists.
other format... |
def prompt(question, choices=None):
"""echo a prompt to the user and wait for an answer
question -- string -- the prompt for the user
choices -- list -- if given, only exit when prompt matches one of the choices
return -- string -- the answer that was given by the user
"""
if not re.match("\s$... |
def get_records(self, url):
"""
Returns the records listed in the webpage given as
parameter as a xml String.
@param url: the url of the Journal, Book, Protocol or Reference work
"""
page = urllib2.urlopen(url)
pages = [BeautifulSoup(page)]
#content sprea... |
def inject_quiet(levels):
"""see --quiet flag help for what this does"""
loggers = list(Logger.manager.loggerDict.items())
loggers.append(("root", getLogger()))
level_filter = LevelFilter(levels)
for logger_name, logger in loggers:
for handler in getattr(logger, "handlers", []):
... |
def connect(self):
"""Logs into the specified ftp server and returns connector."""
for tried_connection_count in range(CFG_FTP_CONNECTION_ATTEMPTS):
try:
self.ftp = FtpHandler(self.config.OXFORD.URL,
self.config.OXFORD.LOGIN,
... |
def _extract_packages(self):
"""
Extract a package in a new directory.
"""
if not hasattr(self, "retrieved_packages_unpacked"):
self.retrieved_packages_unpacked = [self.package_name]
for path in self.retrieved_packages_unpacked:
package_name = basename(pat... |
def _crawl_oxford_and_find_main_xml(self):
"""
A package contains several subdirectory corresponding to each article.
An article is actually identified by the existence of a main.pdf and
a main.xml in a given directory.
"""
self.found_articles = []
def visit(arg,... |
def get_data(self):
"""
Fetch/refresh the current instance's data from the NuHeat API
"""
params = {
"serialnumber": self.serial_number
}
data = self._session.request(config.THERMOSTAT_URL, params=params)
self._data = data
self.heating = data... |
def schedule_mode(self, mode):
"""
Set the thermostat mode
:param mode: The desired mode integer value.
Auto = 1
Temporary hold = 2
Permanent hold = 3
"""
modes = [config.SCHEDULE_RUN, config.SCHEDULE_TEMPORARY_HOLD,... |
def set_target_fahrenheit(self, fahrenheit, mode=config.SCHEDULE_HOLD):
"""
Set the target temperature to the desired fahrenheit, with more granular control of the
hold mode
:param fahrenheit: The desired temperature in F
:param mode: The desired mode to operate in
"""
... |
def set_target_celsius(self, celsius, mode=config.SCHEDULE_HOLD):
"""
Set the target temperature to the desired celsius, with more granular control of the hold
mode
:param celsius: The desired temperature in C
:param mode: The desired mode to operate in
"""
tempe... |
def set_target_temperature(self, temperature, mode=config.SCHEDULE_HOLD):
"""
Updates the target temperature on the NuHeat API
:param temperature: The desired temperature in NuHeat format
:param permanent: Permanently hold the temperature. If set to False, the schedule will
... |
def set_data(self, post_data):
"""
Update (patch) the current instance's data on the NuHeat API
"""
params = {
"serialnumber": self.serial_number
}
self._session.request(config.THERMOSTAT_URL, method="POST", data=post_data, params=params) |
def load_config(filename=None, section_option_dict={}):
"""
This function returns a Bunch object from the stated config file.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NOTE:
The values are not evaluated by default.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... |
def authenticate(self):
"""
Authenticate against the NuHeat API
"""
if self._session_id:
_LOGGER.debug("Using existing NuHeat session")
return
_LOGGER.debug("Creating NuHeat session")
post_data = {
"Email": self.username,
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.