partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | opensearch_dispatch | OpenSearch wrapper | hypermap/search/views.py | def opensearch_dispatch(request):
"""OpenSearch wrapper"""
ctx = {
'shortname': settings.REGISTRY_PYCSW['metadata:main']['identification_title'],
'description': settings.REGISTRY_PYCSW['metadata:main']['identification_abstract'],
'developer': settings.REGISTRY_PYCSW['metadata:main']['co... | def opensearch_dispatch(request):
"""OpenSearch wrapper"""
ctx = {
'shortname': settings.REGISTRY_PYCSW['metadata:main']['identification_title'],
'description': settings.REGISTRY_PYCSW['metadata:main']['identification_abstract'],
'developer': settings.REGISTRY_PYCSW['metadata:main']['co... | [
"OpenSearch",
"wrapper"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/search/views.py#L73-L87 | [
"def",
"opensearch_dispatch",
"(",
"request",
")",
":",
"ctx",
"=",
"{",
"'shortname'",
":",
"settings",
".",
"REGISTRY_PYCSW",
"[",
"'metadata:main'",
"]",
"[",
"'identification_title'",
"]",
",",
"'description'",
":",
"settings",
".",
"REGISTRY_PYCSW",
"[",
"'... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | ESHypermap.good_coords | passed a string array | hypermap/aggregator/elasticsearch_client.py | def good_coords(coords):
""" passed a string array """
if (len(coords) != 4):
return False
for coord in coords[0:3]:
try:
num = float(coord)
if (math.isnan(num)):
return False
if (math.isinf(num)):
... | def good_coords(coords):
""" passed a string array """
if (len(coords) != 4):
return False
for coord in coords[0:3]:
try:
num = float(coord)
if (math.isnan(num)):
return False
if (math.isinf(num)):
... | [
"passed",
"a",
"string",
"array"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/aggregator/elasticsearch_client.py#L36-L49 | [
"def",
"good_coords",
"(",
"coords",
")",
":",
"if",
"(",
"len",
"(",
"coords",
")",
"!=",
"4",
")",
":",
"return",
"False",
"for",
"coord",
"in",
"coords",
"[",
"0",
":",
"3",
"]",
":",
"try",
":",
"num",
"=",
"float",
"(",
"coord",
")",
"if",... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | ESHypermap.clear_es | Clear all indexes in the es core | hypermap/aggregator/elasticsearch_client.py | def clear_es():
"""Clear all indexes in the es core"""
# TODO: should receive a catalog slug.
ESHypermap.es.indices.delete(ESHypermap.index_name, ignore=[400, 404])
LOGGER.debug('Elasticsearch: Index cleared') | def clear_es():
"""Clear all indexes in the es core"""
# TODO: should receive a catalog slug.
ESHypermap.es.indices.delete(ESHypermap.index_name, ignore=[400, 404])
LOGGER.debug('Elasticsearch: Index cleared') | [
"Clear",
"all",
"indexes",
"in",
"the",
"es",
"core"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/aggregator/elasticsearch_client.py#L221-L225 | [
"def",
"clear_es",
"(",
")",
":",
"# TODO: should receive a catalog slug.",
"ESHypermap",
".",
"es",
".",
"indices",
".",
"delete",
"(",
"ESHypermap",
".",
"index_name",
",",
"ignore",
"=",
"[",
"400",
",",
"404",
"]",
")",
"LOGGER",
".",
"debug",
"(",
"'E... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | ESHypermap.create_indices | Create ES core indices | hypermap/aggregator/elasticsearch_client.py | def create_indices(catalog_slug):
"""Create ES core indices """
# TODO: enable auto_create_index in the ES nodes to make this implicit.
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation
# http://support.searchly.com/customer/en/portal/quest... | def create_indices(catalog_slug):
"""Create ES core indices """
# TODO: enable auto_create_index in the ES nodes to make this implicit.
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation
# http://support.searchly.com/customer/en/portal/quest... | [
"Create",
"ES",
"core",
"indices"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/aggregator/elasticsearch_client.py#L228-L247 | [
"def",
"create_indices",
"(",
"catalog_slug",
")",
":",
"# TODO: enable auto_create_index in the ES nodes to make this implicit.",
"# https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation",
"# http://support.searchly.com/customer/en/portal/questions/",
"# ... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | kill_process | kill WSGI processes that may be running in development | pavement.py | def kill_process(procname, scriptname):
"""kill WSGI processes that may be running in development"""
# from http://stackoverflow.com/a/2940878
import signal
import subprocess
p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
out, err = p.communicate()
for line in out.decode().sp... | def kill_process(procname, scriptname):
"""kill WSGI processes that may be running in development"""
# from http://stackoverflow.com/a/2940878
import signal
import subprocess
p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
out, err = p.communicate()
for line in out.decode().sp... | [
"kill",
"WSGI",
"processes",
"that",
"may",
"be",
"running",
"in",
"development"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/pavement.py#L50-L64 | [
"def",
"kill_process",
"(",
"procname",
",",
"scriptname",
")",
":",
"# from http://stackoverflow.com/a/2940878",
"import",
"signal",
"import",
"subprocess",
"p",
"=",
"subprocess",
".",
"Popen",
"(",
"[",
"'ps'",
",",
"'aux'",
"]",
",",
"stdout",
"=",
"subproce... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | populate_initial_services | Populate a fresh installed Hypermap instances with basic services. | hypermap/aggregator/populate_database.py | def populate_initial_services():
"""
Populate a fresh installed Hypermap instances with basic services.
"""
services_list = (
(
'Harvard WorldMap',
'Harvard WorldMap open source web geospatial platform',
'Hypermap:WorldMap',
'http://worldmap.harvar... | def populate_initial_services():
"""
Populate a fresh installed Hypermap instances with basic services.
"""
services_list = (
(
'Harvard WorldMap',
'Harvard WorldMap open source web geospatial platform',
'Hypermap:WorldMap',
'http://worldmap.harvar... | [
"Populate",
"a",
"fresh",
"installed",
"Hypermap",
"instances",
"with",
"basic",
"services",
"."
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/aggregator/populate_database.py#L10-L65 | [
"def",
"populate_initial_services",
"(",
")",
":",
"services_list",
"=",
"(",
"(",
"'Harvard WorldMap'",
",",
"'Harvard WorldMap open source web geospatial platform'",
",",
"'Hypermap:WorldMap'",
",",
"'http://worldmap.harvard.edu'",
")",
",",
"(",
"'NYPL MapWarper'",
",",
... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | elasticsearch | https://www.elastic.co/guide/en/elasticsearch/reference/current/_the_search_api.html
:param serializer:
:return: | hypermap/search_api/views.py | def elasticsearch(serializer, catalog):
"""
https://www.elastic.co/guide/en/elasticsearch/reference/current/_the_search_api.html
:param serializer:
:return:
"""
search_engine_endpoint = "{0}/{1}/_search".format(SEARCH_URL, catalog.slug)
q_text = serializer.validated_data.get("q_text")
... | def elasticsearch(serializer, catalog):
"""
https://www.elastic.co/guide/en/elasticsearch/reference/current/_the_search_api.html
:param serializer:
:return:
"""
search_engine_endpoint = "{0}/{1}/_search".format(SEARCH_URL, catalog.slug)
q_text = serializer.validated_data.get("q_text")
... | [
"https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"_the_search_api",
".",
"html",
":",
"param",
"serializer",
":",
":",
"return",
":"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/search_api/views.py#L32-L361 | [
"def",
"elasticsearch",
"(",
"serializer",
",",
"catalog",
")",
":",
"search_engine_endpoint",
"=",
"\"{0}/{1}/_search\"",
".",
"format",
"(",
"SEARCH_URL",
",",
"catalog",
".",
"slug",
")",
"q_text",
"=",
"serializer",
".",
"validated_data",
".",
"get",
"(",
... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | solr | Search on solr endpoint
:param serializer:
:return: | hypermap/search_api/views.py | def solr(serializer):
"""
Search on solr endpoint
:param serializer:
:return:
"""
search_engine_endpoint = serializer.validated_data.get("search_engine_endpoint")
q_time = serializer.validated_data.get("q_time")
q_geo = serializer.validated_data.get("q_geo")
q_text = serializer.valid... | def solr(serializer):
"""
Search on solr endpoint
:param serializer:
:return:
"""
search_engine_endpoint = serializer.validated_data.get("search_engine_endpoint")
q_time = serializer.validated_data.get("q_time")
q_geo = serializer.validated_data.get("q_geo")
q_text = serializer.valid... | [
"Search",
"on",
"solr",
"endpoint",
":",
"param",
"serializer",
":",
":",
"return",
":"
] | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/search_api/views.py#L364-L573 | [
"def",
"solr",
"(",
"serializer",
")",
":",
"search_engine_endpoint",
"=",
"serializer",
".",
"validated_data",
".",
"get",
"(",
"\"search_engine_endpoint\"",
")",
"q_time",
"=",
"serializer",
".",
"validated_data",
".",
"get",
"(",
"\"q_time\"",
")",
"q_geo",
"... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | parse_get_params | parse all url get params that contains dots in a representation of
serializer field names, for example: d.docs.limit to d_docs_limit.
that makes compatible an actual API client with django-rest-framework
serializers.
:param request:
:return: QueryDict with parsed get params. | hypermap/search_api/views.py | def parse_get_params(request):
"""
parse all url get params that contains dots in a representation of
serializer field names, for example: d.docs.limit to d_docs_limit.
that makes compatible an actual API client with django-rest-framework
serializers.
:param request:
:return: QueryDict with ... | def parse_get_params(request):
"""
parse all url get params that contains dots in a representation of
serializer field names, for example: d.docs.limit to d_docs_limit.
that makes compatible an actual API client with django-rest-framework
serializers.
:param request:
:return: QueryDict with ... | [
"parse",
"all",
"url",
"get",
"params",
"that",
"contains",
"dots",
"in",
"a",
"representation",
"of",
"serializer",
"field",
"names",
"for",
"example",
":",
"d",
".",
"docs",
".",
"limit",
"to",
"d_docs_limit",
".",
"that",
"makes",
"compatible",
"an",
"a... | cga-harvard/Hypermap-Registry | python | https://github.com/cga-harvard/Hypermap-Registry/blob/899a5385b15af7fba190ab4fae1d41e47d155a1b/hypermap/search_api/views.py#L576-L594 | [
"def",
"parse_get_params",
"(",
"request",
")",
":",
"get",
"=",
"request",
".",
"GET",
".",
"copy",
"(",
")",
"new_get",
"=",
"request",
".",
"GET",
".",
"copy",
"(",
")",
"for",
"key",
"in",
"get",
".",
"iterkeys",
"(",
")",
":",
"if",
"key",
"... | 899a5385b15af7fba190ab4fae1d41e47d155a1b |
train | main | For testing purpose | pycec/tcp.py | def main():
"""For testing purpose"""
tcp_adapter = TcpAdapter("192.168.1.3", name="HASS", activate_source=False)
hdmi_network = HDMINetwork(tcp_adapter)
hdmi_network.start()
while True:
for d in hdmi_network.devices:
_LOGGER.info("Device: %s", d)
time.sleep(7) | def main():
"""For testing purpose"""
tcp_adapter = TcpAdapter("192.168.1.3", name="HASS", activate_source=False)
hdmi_network = HDMINetwork(tcp_adapter)
hdmi_network.start()
while True:
for d in hdmi_network.devices:
_LOGGER.info("Device: %s", d)
time.sleep(7) | [
"For",
"testing",
"purpose"
] | konikvranik/pyCEC | python | https://github.com/konikvranik/pyCEC/blob/acf42a842d8a912ed68d63d8d6b653e6c405b29b/pycec/tcp.py#L143-L152 | [
"def",
"main",
"(",
")",
":",
"tcp_adapter",
"=",
"TcpAdapter",
"(",
"\"192.168.1.3\"",
",",
"name",
"=",
"\"HASS\"",
",",
"activate_source",
"=",
"False",
")",
"hdmi_network",
"=",
"HDMINetwork",
"(",
"tcp_adapter",
")",
"hdmi_network",
".",
"start",
"(",
"... | acf42a842d8a912ed68d63d8d6b653e6c405b29b |
train | compare_hexdigests | Compute difference in bits between digest1 and digest2
returns -127 to 128; 128 is the same, -127 is different | nilsimsa/deprecated/_deprecated_nilsimsa.py | def compare_hexdigests( digest1, digest2 ):
"""Compute difference in bits between digest1 and digest2
returns -127 to 128; 128 is the same, -127 is different"""
# convert to 32-tuple of unsighed two-byte INTs
digest1 = tuple([int(digest1[i:i+2],16) for i in range(0,63,2)])
digest2 = tuple([int(di... | def compare_hexdigests( digest1, digest2 ):
"""Compute difference in bits between digest1 and digest2
returns -127 to 128; 128 is the same, -127 is different"""
# convert to 32-tuple of unsighed two-byte INTs
digest1 = tuple([int(digest1[i:i+2],16) for i in range(0,63,2)])
digest2 = tuple([int(di... | [
"Compute",
"difference",
"in",
"bits",
"between",
"digest1",
"and",
"digest2",
"returns",
"-",
"127",
"to",
"128",
";",
"128",
"is",
"the",
"same",
"-",
"127",
"is",
"different"
] | diffeo/py-nilsimsa | python | https://github.com/diffeo/py-nilsimsa/blob/c652f4bbfd836f7aebf292dcea676cc925ec315a/nilsimsa/deprecated/_deprecated_nilsimsa.py#L196-L205 | [
"def",
"compare_hexdigests",
"(",
"digest1",
",",
"digest2",
")",
":",
"# convert to 32-tuple of unsighed two-byte INTs",
"digest1",
"=",
"tuple",
"(",
"[",
"int",
"(",
"digest1",
"[",
"i",
":",
"i",
"+",
"2",
"]",
",",
"16",
")",
"for",
"i",
"in",
"range"... | c652f4bbfd836f7aebf292dcea676cc925ec315a |
train | Nilsimsa.tran3 | Get accumulator for a transition n between chars a, b, c. | nilsimsa/deprecated/_deprecated_nilsimsa.py | def tran3(self, a, b, c, n):
"""Get accumulator for a transition n between chars a, b, c."""
return (((TRAN[(a+n)&255]^TRAN[b]*(n+n+1))+TRAN[(c)^TRAN[n]])&255) | def tran3(self, a, b, c, n):
"""Get accumulator for a transition n between chars a, b, c."""
return (((TRAN[(a+n)&255]^TRAN[b]*(n+n+1))+TRAN[(c)^TRAN[n]])&255) | [
"Get",
"accumulator",
"for",
"a",
"transition",
"n",
"between",
"chars",
"a",
"b",
"c",
"."
] | diffeo/py-nilsimsa | python | https://github.com/diffeo/py-nilsimsa/blob/c652f4bbfd836f7aebf292dcea676cc925ec315a/nilsimsa/deprecated/_deprecated_nilsimsa.py#L117-L119 | [
"def",
"tran3",
"(",
"self",
",",
"a",
",",
"b",
",",
"c",
",",
"n",
")",
":",
"return",
"(",
"(",
"(",
"TRAN",
"[",
"(",
"a",
"+",
"n",
")",
"&",
"255",
"]",
"^",
"TRAN",
"[",
"b",
"]",
"*",
"(",
"n",
"+",
"n",
"+",
"1",
")",
")",
... | c652f4bbfd836f7aebf292dcea676cc925ec315a |
train | Nilsimsa.update | Add data to running digest, increasing the accumulators for 0-8
triplets formed by this char and the previous 0-3 chars. | nilsimsa/deprecated/_deprecated_nilsimsa.py | def update(self, data):
"""Add data to running digest, increasing the accumulators for 0-8
triplets formed by this char and the previous 0-3 chars."""
for character in data:
if PY3:
ch = character
else:
ch = ord(character)
se... | def update(self, data):
"""Add data to running digest, increasing the accumulators for 0-8
triplets formed by this char and the previous 0-3 chars."""
for character in data:
if PY3:
ch = character
else:
ch = ord(character)
se... | [
"Add",
"data",
"to",
"running",
"digest",
"increasing",
"the",
"accumulators",
"for",
"0",
"-",
"8",
"triplets",
"formed",
"by",
"this",
"char",
"and",
"the",
"previous",
"0",
"-",
"3",
"chars",
"."
] | diffeo/py-nilsimsa | python | https://github.com/diffeo/py-nilsimsa/blob/c652f4bbfd836f7aebf292dcea676cc925ec315a/nilsimsa/deprecated/_deprecated_nilsimsa.py#L121-L145 | [
"def",
"update",
"(",
"self",
",",
"data",
")",
":",
"for",
"character",
"in",
"data",
":",
"if",
"PY3",
":",
"ch",
"=",
"character",
"else",
":",
"ch",
"=",
"ord",
"(",
"character",
")",
"self",
".",
"count",
"+=",
"1",
"# incr accumulators for triple... | c652f4bbfd836f7aebf292dcea676cc925ec315a |
train | Nilsimsa.digest | Get digest of data seen thus far as a list of bytes. | nilsimsa/deprecated/_deprecated_nilsimsa.py | def digest(self):
"""Get digest of data seen thus far as a list of bytes."""
total = 0 # number of triplets seen
if self.count == 3: # 3 chars = 1 triplet
total = 1
elif self.count == 4: # 4 chars = 4 triplets
... | def digest(self):
"""Get digest of data seen thus far as a list of bytes."""
total = 0 # number of triplets seen
if self.count == 3: # 3 chars = 1 triplet
total = 1
elif self.count == 4: # 4 chars = 4 triplets
... | [
"Get",
"digest",
"of",
"data",
"seen",
"thus",
"far",
"as",
"a",
"list",
"of",
"bytes",
"."
] | diffeo/py-nilsimsa | python | https://github.com/diffeo/py-nilsimsa/blob/c652f4bbfd836f7aebf292dcea676cc925ec315a/nilsimsa/deprecated/_deprecated_nilsimsa.py#L147-L164 | [
"def",
"digest",
"(",
"self",
")",
":",
"total",
"=",
"0",
"# number of triplets seen",
"if",
"self",
".",
"count",
"==",
"3",
":",
"# 3 chars = 1 triplet",
"total",
"=",
"1",
"elif",
"self",
".",
"count",
"==",
"4",
":",
"# 4 chars = 4 triplets",
"total",
... | c652f4bbfd836f7aebf292dcea676cc925ec315a |
train | Nilsimsa.from_file | Update running digest with content of named file. | nilsimsa/deprecated/_deprecated_nilsimsa.py | def from_file(self, filename):
"""Update running digest with content of named file."""
f = open(filename, 'rb')
while True:
data = f.read(10480)
if not data:
break
self.update(data)
f.close() | def from_file(self, filename):
"""Update running digest with content of named file."""
f = open(filename, 'rb')
while True:
data = f.read(10480)
if not data:
break
self.update(data)
f.close() | [
"Update",
"running",
"digest",
"with",
"content",
"of",
"named",
"file",
"."
] | diffeo/py-nilsimsa | python | https://github.com/diffeo/py-nilsimsa/blob/c652f4bbfd836f7aebf292dcea676cc925ec315a/nilsimsa/deprecated/_deprecated_nilsimsa.py#L174-L182 | [
"def",
"from_file",
"(",
"self",
",",
"filename",
")",
":",
"f",
"=",
"open",
"(",
"filename",
",",
"'rb'",
")",
"while",
"True",
":",
"data",
"=",
"f",
".",
"read",
"(",
"10480",
")",
"if",
"not",
"data",
":",
"break",
"self",
".",
"update",
"("... | c652f4bbfd836f7aebf292dcea676cc925ec315a |
train | Nilsimsa.compare | Compute difference in bits between own digest and another.
returns -127 to 128; 128 is the same, -127 is different | nilsimsa/deprecated/_deprecated_nilsimsa.py | def compare(self, otherdigest, ishex=False):
"""Compute difference in bits between own digest and another.
returns -127 to 128; 128 is the same, -127 is different"""
bits = 0
myd = self.digest()
if ishex:
# convert to 32-tuple of unsighed two-byte INTs
... | def compare(self, otherdigest, ishex=False):
"""Compute difference in bits between own digest and another.
returns -127 to 128; 128 is the same, -127 is different"""
bits = 0
myd = self.digest()
if ishex:
# convert to 32-tuple of unsighed two-byte INTs
... | [
"Compute",
"difference",
"in",
"bits",
"between",
"own",
"digest",
"and",
"another",
".",
"returns",
"-",
"127",
"to",
"128",
";",
"128",
"is",
"the",
"same",
"-",
"127",
"is",
"different"
] | diffeo/py-nilsimsa | python | https://github.com/diffeo/py-nilsimsa/blob/c652f4bbfd836f7aebf292dcea676cc925ec315a/nilsimsa/deprecated/_deprecated_nilsimsa.py#L184-L194 | [
"def",
"compare",
"(",
"self",
",",
"otherdigest",
",",
"ishex",
"=",
"False",
")",
":",
"bits",
"=",
"0",
"myd",
"=",
"self",
".",
"digest",
"(",
")",
"if",
"ishex",
":",
"# convert to 32-tuple of unsighed two-byte INTs",
"otherdigest",
"=",
"tuple",
"(",
... | c652f4bbfd836f7aebf292dcea676cc925ec315a |
train | jdout | JD Output function. Does quick pretty printing of a CloudGenix Response body. This function returns a string
instead of directly printing content.
**Parameters:**
- **api_response:** A CloudGenix-attribute extended `requests.Response` object
**Returns:** Pretty-formatted text of the Response body | cloudgenix/__init__.py | def jdout(api_response):
"""
JD Output function. Does quick pretty printing of a CloudGenix Response body. This function returns a string
instead of directly printing content.
**Parameters:**
- **api_response:** A CloudGenix-attribute extended `requests.Response` object
**Returns:** Prett... | def jdout(api_response):
"""
JD Output function. Does quick pretty printing of a CloudGenix Response body. This function returns a string
instead of directly printing content.
**Parameters:**
- **api_response:** A CloudGenix-attribute extended `requests.Response` object
**Returns:** Prett... | [
"JD",
"Output",
"function",
".",
"Does",
"quick",
"pretty",
"printing",
"of",
"a",
"CloudGenix",
"Response",
"body",
".",
"This",
"function",
"returns",
"a",
"string",
"instead",
"of",
"directly",
"printing",
"content",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L159-L180 | [
"def",
"jdout",
"(",
"api_response",
")",
":",
"try",
":",
"# attempt to output the cgx_content. should always be a Dict if it exists.",
"output",
"=",
"json",
".",
"dumps",
"(",
"api_response",
".",
"cgx_content",
",",
"indent",
"=",
"4",
")",
"except",
"(",
"TypeE... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | jdout_detailed | JD Output Detailed function. Meant for quick DETAILED pretty-printing of CloudGenix Request and Response
objects for troubleshooting. This function returns a string instead of directly printing content.
**Parameters:**
- **api_response:** A CloudGenix-attribute extended `requests.Response` object
... | cloudgenix/__init__.py | def jdout_detailed(api_response, sensitive=False):
"""
JD Output Detailed function. Meant for quick DETAILED pretty-printing of CloudGenix Request and Response
objects for troubleshooting. This function returns a string instead of directly printing content.
**Parameters:**
- **api_response:** ... | def jdout_detailed(api_response, sensitive=False):
"""
JD Output Detailed function. Meant for quick DETAILED pretty-printing of CloudGenix Request and Response
objects for troubleshooting. This function returns a string instead of directly printing content.
**Parameters:**
- **api_response:** ... | [
"JD",
"Output",
"Detailed",
"function",
".",
"Meant",
"for",
"quick",
"DETAILED",
"pretty",
"-",
"printing",
"of",
"CloudGenix",
"Request",
"and",
"Response",
"objects",
"for",
"troubleshooting",
".",
"This",
"function",
"returns",
"a",
"string",
"instead",
"of"... | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L201-L266 | [
"def",
"jdout_detailed",
"(",
"api_response",
",",
"sensitive",
"=",
"False",
")",
":",
"try",
":",
"# try to be super verbose.",
"output",
"=",
"\"REQUEST: {0} {1}\\n\"",
".",
"format",
"(",
"api_response",
".",
"request",
".",
"method",
",",
"api_response",
".",... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.notify_for_new_version | Check for a new version of the SDK on API constructor instantiation. If new version found, print
Notification to STDERR.
On failure of this check, fail silently.
**Returns:** No item returned, directly prints notification to `sys.stderr`. | cloudgenix/__init__.py | def notify_for_new_version(self):
"""
Check for a new version of the SDK on API constructor instantiation. If new version found, print
Notification to STDERR.
On failure of this check, fail silently.
**Returns:** No item returned, directly prints notification to `sys.stderr`.
... | def notify_for_new_version(self):
"""
Check for a new version of the SDK on API constructor instantiation. If new version found, print
Notification to STDERR.
On failure of this check, fail silently.
**Returns:** No item returned, directly prints notification to `sys.stderr`.
... | [
"Check",
"for",
"a",
"new",
"version",
"of",
"the",
"SDK",
"on",
"API",
"constructor",
"instantiation",
".",
"If",
"new",
"version",
"found",
"print",
"Notification",
"to",
"STDERR",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L446-L503 | [
"def",
"notify_for_new_version",
"(",
"self",
")",
":",
"# broad exception clause, if this fails for any reason just return.",
"try",
":",
"recommend_update",
"=",
"False",
"update_check_resp",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"update_info_url",
",",
"timeou... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.ssl_verify | Modify ssl verification settings
**Parameters:**
- ssl_verify:
- True: Verify using builtin BYTE_CA_BUNDLE.
- False: No SSL Verification.
- Str: Full path to a x509 PEM CA File or bundle.
**Returns:** Mutates API object in place, no return. | cloudgenix/__init__.py | def ssl_verify(self, ssl_verify):
"""
Modify ssl verification settings
**Parameters:**
- ssl_verify:
- True: Verify using builtin BYTE_CA_BUNDLE.
- False: No SSL Verification.
- Str: Full path to a x509 PEM CA File or bundle.
**Returns:... | def ssl_verify(self, ssl_verify):
"""
Modify ssl verification settings
**Parameters:**
- ssl_verify:
- True: Verify using builtin BYTE_CA_BUNDLE.
- False: No SSL Verification.
- Str: Full path to a x509 PEM CA File or bundle.
**Returns:... | [
"Modify",
"ssl",
"verification",
"settings"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L505-L546 | [
"def",
"ssl_verify",
"(",
"self",
",",
"ssl_verify",
")",
":",
"self",
".",
"verify",
"=",
"ssl_verify",
"# if verify true/false, set ca_verify_file appropriately",
"if",
"isinstance",
"(",
"self",
".",
"verify",
",",
"bool",
")",
":",
"if",
"self",
".",
"verify... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.modify_rest_retry | Modify retry parameters for the SDK's rest call object.
Parameters are directly from and passed directly to `urllib3.util.retry.Retry`, and get applied directly to
the underlying `requests.Session` object.
Default retry with total=8 and backoff_factor=0.705883:
- Try 1, 0 delay (0 tot... | cloudgenix/__init__.py | def modify_rest_retry(self, total=8, connect=None, read=None, redirect=None, status=None,
method_whitelist=urllib3.util.retry.Retry.DEFAULT_METHOD_WHITELIST, status_forcelist=None,
backoff_factor=0.705883, raise_on_redirect=True, raise_on_status=True,
... | def modify_rest_retry(self, total=8, connect=None, read=None, redirect=None, status=None,
method_whitelist=urllib3.util.retry.Retry.DEFAULT_METHOD_WHITELIST, status_forcelist=None,
backoff_factor=0.705883, raise_on_redirect=True, raise_on_status=True,
... | [
"Modify",
"retry",
"parameters",
"for",
"the",
"SDK",
"s",
"rest",
"call",
"object",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L548-L604 | [
"def",
"modify_rest_retry",
"(",
"self",
",",
"total",
"=",
"8",
",",
"connect",
"=",
"None",
",",
"read",
"=",
"None",
",",
"redirect",
"=",
"None",
",",
"status",
"=",
"None",
",",
"method_whitelist",
"=",
"urllib3",
".",
"util",
".",
"retry",
".",
... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.view_rest_retry | View current rest retry settings in the `requests.Session()` object
**Parameters:**
- **url:** URL to use to determine retry methods for. Defaults to 'https://'
**Returns:** Dict, Key header, value is header value. | cloudgenix/__init__.py | def view_rest_retry(self, url=None):
"""
View current rest retry settings in the `requests.Session()` object
**Parameters:**
- **url:** URL to use to determine retry methods for. Defaults to 'https://'
**Returns:** Dict, Key header, value is header value.
"""
... | def view_rest_retry(self, url=None):
"""
View current rest retry settings in the `requests.Session()` object
**Parameters:**
- **url:** URL to use to determine retry methods for. Defaults to 'https://'
**Returns:** Dict, Key header, value is header value.
"""
... | [
"View",
"current",
"rest",
"retry",
"settings",
"in",
"the",
"requests",
".",
"Session",
"()",
"object"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L606-L618 | [
"def",
"view_rest_retry",
"(",
"self",
",",
"url",
"=",
"None",
")",
":",
"if",
"url",
"is",
"None",
":",
"url",
"=",
"\"https://\"",
"return",
"vars",
"(",
"self",
".",
"_session",
".",
"get_adapter",
"(",
"url",
")",
".",
"max_retries",
")"
] | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.view_cookies | View current cookies in the `requests.Session()` object
**Returns:** List of Dicts, one cookie per Dict. | cloudgenix/__init__.py | def view_cookies(self):
"""
View current cookies in the `requests.Session()` object
**Returns:** List of Dicts, one cookie per Dict.
"""
return_list = []
for cookie in self._session.cookies:
return_list.append(vars(cookie))
return return_list | def view_cookies(self):
"""
View current cookies in the `requests.Session()` object
**Returns:** List of Dicts, one cookie per Dict.
"""
return_list = []
for cookie in self._session.cookies:
return_list.append(vars(cookie))
return return_list | [
"View",
"current",
"cookies",
"in",
"the",
"requests",
".",
"Session",
"()",
"object"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L662-L672 | [
"def",
"view_cookies",
"(",
"self",
")",
":",
"return_list",
"=",
"[",
"]",
"for",
"cookie",
"in",
"self",
".",
"_session",
".",
"cookies",
":",
"return_list",
".",
"append",
"(",
"vars",
"(",
"cookie",
")",
")",
"return",
"return_list"
] | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.set_debug | Change the debug level of the API
**Returns:** No item returned. | cloudgenix/__init__.py | def set_debug(self, debuglevel):
"""
Change the debug level of the API
**Returns:** No item returned.
"""
if isinstance(debuglevel, int):
self._debuglevel = debuglevel
if self._debuglevel == 1:
logging.basicConfig(level=logging.INFO,
... | def set_debug(self, debuglevel):
"""
Change the debug level of the API
**Returns:** No item returned.
"""
if isinstance(debuglevel, int):
self._debuglevel = debuglevel
if self._debuglevel == 1:
logging.basicConfig(level=logging.INFO,
... | [
"Change",
"the",
"debug",
"level",
"of",
"the",
"API"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L674-L708 | [
"def",
"set_debug",
"(",
"self",
",",
"debuglevel",
")",
":",
"if",
"isinstance",
"(",
"debuglevel",
",",
"int",
")",
":",
"self",
".",
"_debuglevel",
"=",
"debuglevel",
"if",
"self",
".",
"_debuglevel",
"==",
"1",
":",
"logging",
".",
"basicConfig",
"("... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API._subclass_container | Call subclasses via function to allow passing parent namespace to subclasses.
**Returns:** dict with subclass references. | cloudgenix/__init__.py | def _subclass_container(self):
"""
Call subclasses via function to allow passing parent namespace to subclasses.
**Returns:** dict with subclass references.
"""
_parent_class = self
class GetWrapper(Get):
def __init__(self):
self._parent_cla... | def _subclass_container(self):
"""
Call subclasses via function to allow passing parent namespace to subclasses.
**Returns:** dict with subclass references.
"""
_parent_class = self
class GetWrapper(Get):
def __init__(self):
self._parent_cla... | [
"Call",
"subclasses",
"via",
"function",
"to",
"allow",
"passing",
"parent",
"namespace",
"to",
"subclasses",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L710-L753 | [
"def",
"_subclass_container",
"(",
"self",
")",
":",
"_parent_class",
"=",
"self",
"class",
"GetWrapper",
"(",
"Get",
")",
":",
"def",
"__init__",
"(",
"self",
")",
":",
"self",
".",
"_parent_class",
"=",
"_parent_class",
"class",
"PostWrapper",
"(",
"Post",... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.rest_call | Generic REST call worker function
**Parameters:**
- **url:** URL for the REST call
- **method:** METHOD for the REST call
- **data:** Optional DATA for the call (for POST/PUT/etc.)
- **sensitive:** Flag if content request/response should be hidden from logging functions... | cloudgenix/__init__.py | def rest_call(self, url, method, data=None, sensitive=False, timeout=None, content_json=True,
retry=None, max_retry=None, retry_sleep=None):
"""
Generic REST call worker function
**Parameters:**
- **url:** URL for the REST call
- **method:** METHOD for the... | def rest_call(self, url, method, data=None, sensitive=False, timeout=None, content_json=True,
retry=None, max_retry=None, retry_sleep=None):
"""
Generic REST call worker function
**Parameters:**
- **url:** URL for the REST call
- **method:** METHOD for the... | [
"Generic",
"REST",
"call",
"worker",
"function"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L755-L890 | [
"def",
"rest_call",
"(",
"self",
",",
"url",
",",
"method",
",",
"data",
"=",
"None",
",",
"sensitive",
"=",
"False",
",",
"timeout",
"=",
"None",
",",
"content_json",
"=",
"True",
",",
"retry",
"=",
"None",
",",
"max_retry",
"=",
"None",
",",
"retry... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API._cleanup_ca_temp_file | Function to clean up ca temp file for requests.
**Returns:** Removes TEMP ca file, no return | cloudgenix/__init__.py | def _cleanup_ca_temp_file(self):
"""
Function to clean up ca temp file for requests.
**Returns:** Removes TEMP ca file, no return
"""
if os.name == 'nt':
if isinstance(self.ca_verify_filename, (binary_type, text_type)):
# windows requires file to be c... | def _cleanup_ca_temp_file(self):
"""
Function to clean up ca temp file for requests.
**Returns:** Removes TEMP ca file, no return
"""
if os.name == 'nt':
if isinstance(self.ca_verify_filename, (binary_type, text_type)):
# windows requires file to be c... | [
"Function",
"to",
"clean",
"up",
"ca",
"temp",
"file",
"for",
"requests",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L892-L904 | [
"def",
"_cleanup_ca_temp_file",
"(",
"self",
")",
":",
"if",
"os",
".",
"name",
"==",
"'nt'",
":",
"if",
"isinstance",
"(",
"self",
".",
"ca_verify_filename",
",",
"(",
"binary_type",
",",
"text_type",
")",
")",
":",
"# windows requires file to be closed for acc... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.parse_auth_token | Break auth_token up into it's constituent values.
**Parameters:**
- **auth_token:** Auth_token string
**Returns:** dict with Auth Token constituents | cloudgenix/__init__.py | def parse_auth_token(self, auth_token):
"""
Break auth_token up into it's constituent values.
**Parameters:**
- **auth_token:** Auth_token string
**Returns:** dict with Auth Token constituents
"""
# remove the random security key value from the front of the a... | def parse_auth_token(self, auth_token):
"""
Break auth_token up into it's constituent values.
**Parameters:**
- **auth_token:** Auth_token string
**Returns:** dict with Auth Token constituents
"""
# remove the random security key value from the front of the a... | [
"Break",
"auth_token",
"up",
"into",
"it",
"s",
"constituent",
"values",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L906-L931 | [
"def",
"parse_auth_token",
"(",
"self",
",",
"auth_token",
")",
":",
"# remove the random security key value from the front of the auth_token",
"auth_token_cleaned",
"=",
"auth_token",
".",
"split",
"(",
"'-'",
",",
"1",
")",
"[",
"1",
"]",
"# URL Decode the Auth Token",
... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.update_region_to_controller | Update the controller string with dynamic region info.
Controller string should end up as `<name[-env]>.<region>.cloudgenix.com`
**Parameters:**
- **region:** region string.
**Returns:** No return value, mutates the controller in the class namespace | cloudgenix/__init__.py | def update_region_to_controller(self, region):
"""
Update the controller string with dynamic region info.
Controller string should end up as `<name[-env]>.<region>.cloudgenix.com`
**Parameters:**
- **region:** region string.
**Returns:** No return value, mutates the ... | def update_region_to_controller(self, region):
"""
Update the controller string with dynamic region info.
Controller string should end up as `<name[-env]>.<region>.cloudgenix.com`
**Parameters:**
- **region:** region string.
**Returns:** No return value, mutates the ... | [
"Update",
"the",
"controller",
"string",
"with",
"dynamic",
"region",
"info",
".",
"Controller",
"string",
"should",
"end",
"up",
"as",
"<name",
"[",
"-",
"env",
"]",
">",
".",
"<region",
">",
".",
"cloudgenix",
".",
"com"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L933-L997 | [
"def",
"update_region_to_controller",
"(",
"self",
",",
"region",
")",
":",
"# default region position in a list",
"region_position",
"=",
"1",
"# Check for a global \"ignore region\" flag",
"if",
"self",
".",
"ignore_region",
":",
"# bypass",
"api_logger",
".",
"debug",
... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.parse_region | Return region from a successful login response.
**Parameters:**
- **login_response:** requests.Response from a successful login.
**Returns:** region name. | cloudgenix/__init__.py | def parse_region(self, login_response):
"""
Return region from a successful login response.
**Parameters:**
- **login_response:** requests.Response from a successful login.
**Returns:** region name.
"""
auth_token = login_response.cgx_content['x_auth_token']
... | def parse_region(self, login_response):
"""
Return region from a successful login response.
**Parameters:**
- **login_response:** requests.Response from a successful login.
**Returns:** region name.
"""
auth_token = login_response.cgx_content['x_auth_token']
... | [
"Return",
"region",
"from",
"a",
"successful",
"login",
"response",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L999-L1012 | [
"def",
"parse_region",
"(",
"self",
",",
"login_response",
")",
":",
"auth_token",
"=",
"login_response",
".",
"cgx_content",
"[",
"'x_auth_token'",
"]",
"auth_token_dict",
"=",
"self",
".",
"parse_auth_token",
"(",
"auth_token",
")",
"auth_region",
"=",
"auth_tok... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.reparse_login_cookie_after_region_update | Sometimes, login cookie gets sent with region info instead of api.cloudgenix.com. This function
re-parses the original login request and applies cookies to the session if they now match the new region.
**Parameters:**
- **login_response:** requests.Response from a non-region login.
... | cloudgenix/__init__.py | def reparse_login_cookie_after_region_update(self, login_response):
"""
Sometimes, login cookie gets sent with region info instead of api.cloudgenix.com. This function
re-parses the original login request and applies cookies to the session if they now match the new region.
**Parameters:... | def reparse_login_cookie_after_region_update(self, login_response):
"""
Sometimes, login cookie gets sent with region info instead of api.cloudgenix.com. This function
re-parses the original login request and applies cookies to the session if they now match the new region.
**Parameters:... | [
"Sometimes",
"login",
"cookie",
"gets",
"sent",
"with",
"region",
"info",
"instead",
"of",
"api",
".",
"cloudgenix",
".",
"com",
".",
"This",
"function",
"re",
"-",
"parses",
"the",
"original",
"login",
"request",
"and",
"applies",
"cookies",
"to",
"the",
... | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L1014-L1038 | [
"def",
"reparse_login_cookie_after_region_update",
"(",
"self",
",",
"login_response",
")",
":",
"login_url",
"=",
"login_response",
".",
"request",
".",
"url",
"api_logger",
".",
"debug",
"(",
"\"ORIGINAL REQUEST URL = %s\"",
",",
"login_url",
")",
"# replace old contr... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API._catch_nonjson_streamresponse | Validate a streamed response is JSON. Return a Python dictionary either way.
**Parameters:**
- **rawresponse:** Streamed Response from Requests.
**Returns:** Dictionary | cloudgenix/__init__.py | def _catch_nonjson_streamresponse(rawresponse):
"""
Validate a streamed response is JSON. Return a Python dictionary either way.
**Parameters:**
- **rawresponse:** Streamed Response from Requests.
**Returns:** Dictionary
"""
# attempt to load response for re... | def _catch_nonjson_streamresponse(rawresponse):
"""
Validate a streamed response is JSON. Return a Python dictionary either way.
**Parameters:**
- **rawresponse:** Streamed Response from Requests.
**Returns:** Dictionary
"""
# attempt to load response for re... | [
"Validate",
"a",
"streamed",
"response",
"is",
"JSON",
".",
"Return",
"a",
"Python",
"dictionary",
"either",
"way",
"."
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L1041-L1069 | [
"def",
"_catch_nonjson_streamresponse",
"(",
"rawresponse",
")",
":",
"# attempt to load response for return.",
"try",
":",
"response",
"=",
"json",
".",
"loads",
"(",
"rawresponse",
")",
"except",
"(",
"ValueError",
",",
"TypeError",
")",
":",
"if",
"rawresponse",
... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | API.url_decode | URL Decode function using REGEX
**Parameters:**
- **url:** URLENCODED text string
**Returns:** Non URLENCODED string | cloudgenix/__init__.py | def url_decode(url):
"""
URL Decode function using REGEX
**Parameters:**
- **url:** URLENCODED text string
**Returns:** Non URLENCODED string
"""
return re.compile('%([0-9a-fA-F]{2})', re.M).sub(lambda m: chr(int(m.group(1), 16)), url) | def url_decode(url):
"""
URL Decode function using REGEX
**Parameters:**
- **url:** URLENCODED text string
**Returns:** Non URLENCODED string
"""
return re.compile('%([0-9a-fA-F]{2})', re.M).sub(lambda m: chr(int(m.group(1), 16)), url) | [
"URL",
"Decode",
"function",
"using",
"REGEX"
] | CloudGenix/sdk-python | python | https://github.com/CloudGenix/sdk-python/blob/1b2f92582b6a19769134914793bfd00e4caa074b/cloudgenix/__init__.py#L1072-L1082 | [
"def",
"url_decode",
"(",
"url",
")",
":",
"return",
"re",
".",
"compile",
"(",
"'%([0-9a-fA-F]{2})'",
",",
"re",
".",
"M",
")",
".",
"sub",
"(",
"lambda",
"m",
":",
"chr",
"(",
"int",
"(",
"m",
".",
"group",
"(",
"1",
")",
",",
"16",
")",
")",... | 1b2f92582b6a19769134914793bfd00e4caa074b |
train | blksize | Get optimal file system buffer size (in bytes) for I/O calls. | duplicate/utils/fs/nt.py | def blksize(path):
"""
Get optimal file system buffer size (in bytes) for I/O calls.
"""
diskfreespace = win32file.GetDiskFreeSpace
dirname = os.path.dirname(fullpath(path))
try:
cluster_sectors, sector_size = diskfreespace(dirname)[:2]
size = cluster_sectors * sector_size
e... | def blksize(path):
"""
Get optimal file system buffer size (in bytes) for I/O calls.
"""
diskfreespace = win32file.GetDiskFreeSpace
dirname = os.path.dirname(fullpath(path))
try:
cluster_sectors, sector_size = diskfreespace(dirname)[:2]
size = cluster_sectors * sector_size
e... | [
"Get",
"optimal",
"file",
"system",
"buffer",
"size",
"(",
"in",
"bytes",
")",
"for",
"I",
"/",
"O",
"calls",
"."
] | deplicate/deplicate | python | https://github.com/deplicate/deplicate/blob/9975502571d1d024a990f5cb304d01b63c0d7717/duplicate/utils/fs/nt.py#L28-L44 | [
"def",
"blksize",
"(",
"path",
")",
":",
"diskfreespace",
"=",
"win32file",
".",
"GetDiskFreeSpace",
"dirname",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"fullpath",
"(",
"path",
")",
")",
"try",
":",
"cluster_sectors",
",",
"sector_size",
"=",
"diskfre... | 9975502571d1d024a990f5cb304d01b63c0d7717 |
train | _Avatars.gravatar | Pass email hash, return Gravatar URL. You can get email hash like this::
import hashlib
avatar_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
Visit https://en.gravatar.com/site/implement/images/ for more information.
:param hash: The email hash used to generate ... | flask_avatars/__init__.py | def gravatar(hash, size=100, rating='g', default='identicon', include_extension=False, force_default=False):
"""Pass email hash, return Gravatar URL. You can get email hash like this::
import hashlib
avatar_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
Visit htt... | def gravatar(hash, size=100, rating='g', default='identicon', include_extension=False, force_default=False):
"""Pass email hash, return Gravatar URL. You can get email hash like this::
import hashlib
avatar_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
Visit htt... | [
"Pass",
"email",
"hash",
"return",
"Gravatar",
"URL",
".",
"You",
"can",
"get",
"email",
"hash",
"like",
"this",
"::"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L27-L50 | [
"def",
"gravatar",
"(",
"hash",
",",
"size",
"=",
"100",
",",
"rating",
"=",
"'g'",
",",
"default",
"=",
"'identicon'",
",",
"include_extension",
"=",
"False",
",",
"force_default",
"=",
"False",
")",
":",
"if",
"include_extension",
":",
"hash",
"+=",
"'... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | _Avatars.social_media | Return avatar URL at social media.
Visit https://avatars.io for more information.
:param username: The username of the social media.
:param platform: One of facebook, instagram, twitter, gravatar.
:param size: The size of avatar, one of small, medium and large. | flask_avatars/__init__.py | def social_media(username, platform='twitter', size='medium'):
"""Return avatar URL at social media.
Visit https://avatars.io for more information.
:param username: The username of the social media.
:param platform: One of facebook, instagram, twitter, gravatar.
:param size: The... | def social_media(username, platform='twitter', size='medium'):
"""Return avatar URL at social media.
Visit https://avatars.io for more information.
:param username: The username of the social media.
:param platform: One of facebook, instagram, twitter, gravatar.
:param size: The... | [
"Return",
"avatar",
"URL",
"at",
"social",
"media",
".",
"Visit",
"https",
":",
"//",
"avatars",
".",
"io",
"for",
"more",
"information",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L63-L72 | [
"def",
"social_media",
"(",
"username",
",",
"platform",
"=",
"'twitter'",
",",
"size",
"=",
"'medium'",
")",
":",
"return",
"'https://avatars.io/{platform}/{username}/{size}'",
".",
"format",
"(",
"platform",
"=",
"platform",
",",
"username",
"=",
"username",
","... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | _Avatars.jcrop_css | Load jcrop css file.
:param css_url: The custom CSS URL. | flask_avatars/__init__.py | def jcrop_css(css_url=None):
"""Load jcrop css file.
:param css_url: The custom CSS URL.
"""
if css_url is None:
if current_app.config['AVATARS_SERVE_LOCAL']:
css_url = url_for('avatars.static', filename='jcrop/css/jquery.Jcrop.min.css')
else:
... | def jcrop_css(css_url=None):
"""Load jcrop css file.
:param css_url: The custom CSS URL.
"""
if css_url is None:
if current_app.config['AVATARS_SERVE_LOCAL']:
css_url = url_for('avatars.static', filename='jcrop/css/jquery.Jcrop.min.css')
else:
... | [
"Load",
"jcrop",
"css",
"file",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L84-L94 | [
"def",
"jcrop_css",
"(",
"css_url",
"=",
"None",
")",
":",
"if",
"css_url",
"is",
"None",
":",
"if",
"current_app",
".",
"config",
"[",
"'AVATARS_SERVE_LOCAL'",
"]",
":",
"css_url",
"=",
"url_for",
"(",
"'avatars.static'",
",",
"filename",
"=",
"'jcrop/css/j... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | _Avatars.jcrop_js | Load jcrop Javascript file.
:param js_url: The custom JavaScript URL.
:param with_jquery: Include jQuery or not, default to ``True``. | flask_avatars/__init__.py | def jcrop_js(js_url=None, with_jquery=True):
"""Load jcrop Javascript file.
:param js_url: The custom JavaScript URL.
:param with_jquery: Include jQuery or not, default to ``True``.
"""
serve_local = current_app.config['AVATARS_SERVE_LOCAL']
if js_url is None:
... | def jcrop_js(js_url=None, with_jquery=True):
"""Load jcrop Javascript file.
:param js_url: The custom JavaScript URL.
:param with_jquery: Include jQuery or not, default to ``True``.
"""
serve_local = current_app.config['AVATARS_SERVE_LOCAL']
if js_url is None:
... | [
"Load",
"jcrop",
"Javascript",
"file",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L97-L119 | [
"def",
"jcrop_js",
"(",
"js_url",
"=",
"None",
",",
"with_jquery",
"=",
"True",
")",
":",
"serve_local",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_SERVE_LOCAL'",
"]",
"if",
"js_url",
"is",
"None",
":",
"if",
"serve_local",
":",
"js_url",
"=",
"url_... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | _Avatars.crop_box | Create a crop box.
:param endpoint: The endpoint of view function that serve avatar image file.
:param filename: The filename of the image that need to be crop. | flask_avatars/__init__.py | def crop_box(endpoint=None, filename=None):
"""Create a crop box.
:param endpoint: The endpoint of view function that serve avatar image file.
:param filename: The filename of the image that need to be crop.
"""
crop_size = current_app.config['AVATARS_CROP_BASE_WIDTH']
... | def crop_box(endpoint=None, filename=None):
"""Create a crop box.
:param endpoint: The endpoint of view function that serve avatar image file.
:param filename: The filename of the image that need to be crop.
"""
crop_size = current_app.config['AVATARS_CROP_BASE_WIDTH']
... | [
"Create",
"a",
"crop",
"box",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L122-L134 | [
"def",
"crop_box",
"(",
"endpoint",
"=",
"None",
",",
"filename",
"=",
"None",
")",
":",
"crop_size",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_CROP_BASE_WIDTH'",
"]",
"if",
"endpoint",
"is",
"None",
"or",
"filename",
"is",
"None",
":",
"url",
"=",... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | _Avatars.preview_box | Create a preview box.
:param endpoint: The endpoint of view function that serve avatar image file.
:param filename: The filename of the image that need to be crop. | flask_avatars/__init__.py | def preview_box(endpoint=None, filename=None):
"""Create a preview box.
:param endpoint: The endpoint of view function that serve avatar image file.
:param filename: The filename of the image that need to be crop.
"""
preview_size = current_app.config['AVATARS_CROP_PREVIEW_SIZE'... | def preview_box(endpoint=None, filename=None):
"""Create a preview box.
:param endpoint: The endpoint of view function that serve avatar image file.
:param filename: The filename of the image that need to be crop.
"""
preview_size = current_app.config['AVATARS_CROP_PREVIEW_SIZE'... | [
"Create",
"a",
"preview",
"box",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L137-L154 | [
"def",
"preview_box",
"(",
"endpoint",
"=",
"None",
",",
"filename",
"=",
"None",
")",
":",
"preview_size",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_CROP_PREVIEW_SIZE'",
"]",
"or",
"current_app",
".",
"config",
"[",
"'AVATARS_SIZE_TUPLE'",
"]",
"[",
"... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | _Avatars.init_jcrop | Initialize jcrop.
:param min_size: The minimal size of crop area. | flask_avatars/__init__.py | def init_jcrop(min_size=None):
"""Initialize jcrop.
:param min_size: The minimal size of crop area.
"""
init_x = current_app.config['AVATARS_CROP_INIT_POS'][0]
init_y = current_app.config['AVATARS_CROP_INIT_POS'][1]
init_size = current_app.config['AVATARS_CROP_INIT_SIZE'... | def init_jcrop(min_size=None):
"""Initialize jcrop.
:param min_size: The minimal size of crop area.
"""
init_x = current_app.config['AVATARS_CROP_INIT_POS'][0]
init_y = current_app.config['AVATARS_CROP_INIT_POS'][1]
init_size = current_app.config['AVATARS_CROP_INIT_SIZE'... | [
"Initialize",
"jcrop",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L157-L226 | [
"def",
"init_jcrop",
"(",
"min_size",
"=",
"None",
")",
":",
"init_x",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_CROP_INIT_POS'",
"]",
"[",
"0",
"]",
"init_y",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_CROP_INIT_POS'",
"]",
"[",
"1",
"]",
"... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Avatars.resize_avatar | Resize an avatar.
:param img: The image that needs to be resize.
:param base_width: The width of output image. | flask_avatars/__init__.py | def resize_avatar(self, img, base_width):
"""Resize an avatar.
:param img: The image that needs to be resize.
:param base_width: The width of output image.
"""
w_percent = (base_width / float(img.size[0]))
h_size = int((float(img.size[1]) * float(w_percent)))
img... | def resize_avatar(self, img, base_width):
"""Resize an avatar.
:param img: The image that needs to be resize.
:param base_width: The width of output image.
"""
w_percent = (base_width / float(img.size[0]))
h_size = int((float(img.size[1]) * float(w_percent)))
img... | [
"Resize",
"an",
"avatar",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L278-L287 | [
"def",
"resize_avatar",
"(",
"self",
",",
"img",
",",
"base_width",
")",
":",
"w_percent",
"=",
"(",
"base_width",
"/",
"float",
"(",
"img",
".",
"size",
"[",
"0",
"]",
")",
")",
"h_size",
"=",
"int",
"(",
"(",
"float",
"(",
"img",
".",
"size",
"... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Avatars.save_avatar | Save an avatar as raw image, return new filename.
:param image: The image that needs to be saved. | flask_avatars/__init__.py | def save_avatar(self, image):
"""Save an avatar as raw image, return new filename.
:param image: The image that needs to be saved.
"""
path = current_app.config['AVATARS_SAVE_PATH']
filename = uuid4().hex + '_raw.png'
image.save(os.path.join(path, filename))
retu... | def save_avatar(self, image):
"""Save an avatar as raw image, return new filename.
:param image: The image that needs to be saved.
"""
path = current_app.config['AVATARS_SAVE_PATH']
filename = uuid4().hex + '_raw.png'
image.save(os.path.join(path, filename))
retu... | [
"Save",
"an",
"avatar",
"as",
"raw",
"image",
"return",
"new",
"filename",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L289-L297 | [
"def",
"save_avatar",
"(",
"self",
",",
"image",
")",
":",
"path",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_SAVE_PATH'",
"]",
"filename",
"=",
"uuid4",
"(",
")",
".",
"hex",
"+",
"'_raw.png'",
"image",
".",
"save",
"(",
"os",
".",
"path",
".",... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Avatars.crop_avatar | Crop avatar with given size, return a list of file name: [filename_s, filename_m, filename_l].
:param filename: The raw image's filename.
:param x: The x-pos to start crop.
:param y: The y-pos to start crop.
:param w: The crop width.
:param h: The crop height. | flask_avatars/__init__.py | def crop_avatar(self, filename, x, y, w, h):
"""Crop avatar with given size, return a list of file name: [filename_s, filename_m, filename_l].
:param filename: The raw image's filename.
:param x: The x-pos to start crop.
:param y: The y-pos to start crop.
:param w: The crop widt... | def crop_avatar(self, filename, x, y, w, h):
"""Crop avatar with given size, return a list of file name: [filename_s, filename_m, filename_l].
:param filename: The raw image's filename.
:param x: The x-pos to start crop.
:param y: The y-pos to start crop.
:param w: The crop widt... | [
"Crop",
"avatar",
"with",
"given",
"size",
"return",
"a",
"list",
"of",
"file",
"name",
":",
"[",
"filename_s",
"filename_m",
"filename_l",
"]",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/__init__.py#L299-L349 | [
"def",
"crop_avatar",
"(",
"self",
",",
"filename",
",",
"x",
",",
"y",
",",
"w",
",",
"h",
")",
":",
"x",
"=",
"int",
"(",
"x",
")",
"y",
"=",
"int",
"(",
"y",
")",
"w",
"=",
"int",
"(",
"w",
")",
"h",
"=",
"int",
"(",
"h",
")",
"sizes... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon.get_image | Byte representation of a PNG image | flask_avatars/identicon.py | def get_image(self, string, width, height, pad=0):
"""
Byte representation of a PNG image
"""
hex_digest_byte_list = self._string_to_byte_list(string)
matrix = self._create_matrix(hex_digest_byte_list)
return self._create_image(matrix, width, height, pad) | def get_image(self, string, width, height, pad=0):
"""
Byte representation of a PNG image
"""
hex_digest_byte_list = self._string_to_byte_list(string)
matrix = self._create_matrix(hex_digest_byte_list)
return self._create_image(matrix, width, height, pad) | [
"Byte",
"representation",
"of",
"a",
"PNG",
"image"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L72-L78 | [
"def",
"get_image",
"(",
"self",
",",
"string",
",",
"width",
",",
"height",
",",
"pad",
"=",
"0",
")",
":",
"hex_digest_byte_list",
"=",
"self",
".",
"_string_to_byte_list",
"(",
"string",
")",
"matrix",
"=",
"self",
".",
"_create_matrix",
"(",
"hex_diges... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon._get_pastel_colour | Create a pastel colour hex colour string | flask_avatars/identicon.py | def _get_pastel_colour(self, lighten=127):
"""
Create a pastel colour hex colour string
"""
def r():
return random.randint(0, 128) + lighten
return r(), r(), r() | def _get_pastel_colour(self, lighten=127):
"""
Create a pastel colour hex colour string
"""
def r():
return random.randint(0, 128) + lighten
return r(), r(), r() | [
"Create",
"a",
"pastel",
"colour",
"hex",
"colour",
"string"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L87-L93 | [
"def",
"_get_pastel_colour",
"(",
"self",
",",
"lighten",
"=",
"127",
")",
":",
"def",
"r",
"(",
")",
":",
"return",
"random",
".",
"randint",
"(",
"0",
",",
"128",
")",
"+",
"lighten",
"return",
"r",
"(",
")",
",",
"r",
"(",
")",
",",
"r",
"("... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon._luminance | Determine the liminanace of an RGB colour | flask_avatars/identicon.py | def _luminance(self, rgb):
"""
Determine the liminanace of an RGB colour
"""
a = []
for v in rgb:
v = v / float(255)
if v < 0.03928:
result = v / 12.92
else:
result = math.pow(((v + 0.055) / 1.055), 2.4)
... | def _luminance(self, rgb):
"""
Determine the liminanace of an RGB colour
"""
a = []
for v in rgb:
v = v / float(255)
if v < 0.03928:
result = v / 12.92
else:
result = math.pow(((v + 0.055) / 1.055), 2.4)
... | [
"Determine",
"the",
"liminanace",
"of",
"an",
"RGB",
"colour"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L95-L108 | [
"def",
"_luminance",
"(",
"self",
",",
"rgb",
")",
":",
"a",
"=",
"[",
"]",
"for",
"v",
"in",
"rgb",
":",
"v",
"=",
"v",
"/",
"float",
"(",
"255",
")",
"if",
"v",
"<",
"0.03928",
":",
"result",
"=",
"v",
"/",
"12.92",
"else",
":",
"result",
... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon._string_to_byte_list | Creates a hex digest of the input string given to create the image,
if it's not already hexadecimal
Returns:
Length 16 list of rgb value range integers
(each representing a byte of the hex digest) | flask_avatars/identicon.py | def _string_to_byte_list(self, data):
"""
Creates a hex digest of the input string given to create the image,
if it's not already hexadecimal
Returns:
Length 16 list of rgb value range integers
(each representing a byte of the hex digest)
"""
byte... | def _string_to_byte_list(self, data):
"""
Creates a hex digest of the input string given to create the image,
if it's not already hexadecimal
Returns:
Length 16 list of rgb value range integers
(each representing a byte of the hex digest)
"""
byte... | [
"Creates",
"a",
"hex",
"digest",
"of",
"the",
"input",
"string",
"given",
"to",
"create",
"the",
"image",
"if",
"it",
"s",
"not",
"already",
"hexadecimal"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L110-L126 | [
"def",
"_string_to_byte_list",
"(",
"self",
",",
"data",
")",
":",
"bytes_length",
"=",
"16",
"m",
"=",
"self",
".",
"digest",
"(",
")",
"m",
".",
"update",
"(",
"str",
".",
"encode",
"(",
"data",
")",
")",
"hex_digest",
"=",
"m",
".",
"hexdigest",
... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon._bit_is_one | Check if the n (index) of hash_bytes is 1 or 0. | flask_avatars/identicon.py | def _bit_is_one(self, n, hash_bytes):
"""
Check if the n (index) of hash_bytes is 1 or 0.
"""
scale = 16 # hexadecimal
if not hash_bytes[int(n / (scale / 2))] >> int(
(scale / 2) - ((n % (scale / 2)) + 1)) & 1 == 1:
return False
return True | def _bit_is_one(self, n, hash_bytes):
"""
Check if the n (index) of hash_bytes is 1 or 0.
"""
scale = 16 # hexadecimal
if not hash_bytes[int(n / (scale / 2))] >> int(
(scale / 2) - ((n % (scale / 2)) + 1)) & 1 == 1:
return False
return True | [
"Check",
"if",
"the",
"n",
"(",
"index",
")",
"of",
"hash_bytes",
"is",
"1",
"or",
"0",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L128-L138 | [
"def",
"_bit_is_one",
"(",
"self",
",",
"n",
",",
"hash_bytes",
")",
":",
"scale",
"=",
"16",
"# hexadecimal",
"if",
"not",
"hash_bytes",
"[",
"int",
"(",
"n",
"/",
"(",
"scale",
"/",
"2",
")",
")",
"]",
">>",
"int",
"(",
"(",
"scale",
"/",
"2",
... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon._create_image | Generates a PNG byte list | flask_avatars/identicon.py | def _create_image(self, matrix, width, height, pad):
"""
Generates a PNG byte list
"""
image = Image.new("RGB", (width + (pad * 2),
height + (pad * 2)), self.bg_colour)
image_draw = ImageDraw.Draw(image)
# Calculate the block width and ... | def _create_image(self, matrix, width, height, pad):
"""
Generates a PNG byte list
"""
image = Image.new("RGB", (width + (pad * 2),
height + (pad * 2)), self.bg_colour)
image_draw = ImageDraw.Draw(image)
# Calculate the block width and ... | [
"Generates",
"a",
"PNG",
"byte",
"list"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L140-L167 | [
"def",
"_create_image",
"(",
"self",
",",
"matrix",
",",
"width",
",",
"height",
",",
"pad",
")",
":",
"image",
"=",
"Image",
".",
"new",
"(",
"\"RGB\"",
",",
"(",
"width",
"+",
"(",
"pad",
"*",
"2",
")",
",",
"height",
"+",
"(",
"pad",
"*",
"2... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon._create_matrix | This matrix decides which blocks should be filled fg/bg colour
True for fg_colour
False for bg_colour
hash_bytes - array of hash bytes values. RGB range values in each slot
Returns:
List representation of the matrix
[[True, True, True, True],
[False,... | flask_avatars/identicon.py | def _create_matrix(self, byte_list):
"""
This matrix decides which blocks should be filled fg/bg colour
True for fg_colour
False for bg_colour
hash_bytes - array of hash bytes values. RGB range values in each slot
Returns:
List representation of the matrix
... | def _create_matrix(self, byte_list):
"""
This matrix decides which blocks should be filled fg/bg colour
True for fg_colour
False for bg_colour
hash_bytes - array of hash bytes values. RGB range values in each slot
Returns:
List representation of the matrix
... | [
"This",
"matrix",
"decides",
"which",
"blocks",
"should",
"be",
"filled",
"fg",
"/",
"bg",
"colour",
"True",
"for",
"fg_colour",
"False",
"for",
"bg_colour"
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L169-L203 | [
"def",
"_create_matrix",
"(",
"self",
",",
"byte_list",
")",
":",
"# Number of rows * cols halfed and rounded",
"# in order to fill opposite side",
"cells",
"=",
"int",
"(",
"self",
".",
"rows",
"*",
"self",
".",
"cols",
"/",
"2",
"+",
"self",
".",
"cols",
"%",
... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Identicon.generate | Generate and save avatars, return a list of file name: [filename_s, filename_m, filename_l].
:param text: The text used to generate image. | flask_avatars/identicon.py | def generate(self, text):
"""Generate and save avatars, return a list of file name: [filename_s, filename_m, filename_l].
:param text: The text used to generate image.
"""
sizes = current_app.config['AVATARS_SIZE_TUPLE']
path = current_app.config['AVATARS_SAVE_PATH']
suf... | def generate(self, text):
"""Generate and save avatars, return a list of file name: [filename_s, filename_m, filename_l].
:param text: The text used to generate image.
"""
sizes = current_app.config['AVATARS_SIZE_TUPLE']
path = current_app.config['AVATARS_SAVE_PATH']
suf... | [
"Generate",
"and",
"save",
"avatars",
"return",
"a",
"list",
"of",
"file",
"name",
":",
"[",
"filename_s",
"filename_m",
"filename_l",
"]",
"."
] | greyli/flask-avatars | python | https://github.com/greyli/flask-avatars/blob/13eca90342349c58962fef0ec541edcb1b009c70/flask_avatars/identicon.py#L205-L221 | [
"def",
"generate",
"(",
"self",
",",
"text",
")",
":",
"sizes",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_SIZE_TUPLE'",
"]",
"path",
"=",
"current_app",
".",
"config",
"[",
"'AVATARS_SAVE_PATH'",
"]",
"suffix",
"=",
"{",
"sizes",
"[",
"0",
"]",
"... | 13eca90342349c58962fef0ec541edcb1b009c70 |
train | Location.read | Read values.
Args:
vals (list): list of strings representing values | pyepw/epw.py | def read(self, vals):
"""Read values.
Args:
vals (list): list of strings representing values
"""
i = 0
if len(vals[i]) == 0:
self.city = None
else:
self.city = vals[i]
i += 1
if len(vals[i]) == 0:
self.stat... | def read(self, vals):
"""Read values.
Args:
vals (list): list of strings representing values
"""
i = 0
if len(vals[i]) == 0:
self.city = None
else:
self.city = vals[i]
i += 1
if len(vals[i]) == 0:
self.stat... | [
"Read",
"values",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L35-L87 | [
"def",
"read",
"(",
"self",
",",
"vals",
")",
":",
"i",
"=",
"0",
"if",
"len",
"(",
"vals",
"[",
"i",
"]",
")",
"==",
"0",
":",
"self",
".",
"city",
"=",
"None",
"else",
":",
"self",
".",
"city",
"=",
"vals",
"[",
"i",
"]",
"i",
"+=",
"1"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.city | Corresponds to IDD Field `city`
Args:
value (str): value for IDD Field `city`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `value` is not a valid value | pyepw/epw.py | def city(self, value=None):
"""Corresponds to IDD Field `city`
Args:
value (str): value for IDD Field `city`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `... | def city(self, value=None):
"""Corresponds to IDD Field `city`
Args:
value (str): value for IDD Field `city`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `... | [
"Corresponds",
"to",
"IDD",
"Field",
"city"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L100-L122 | [
"def",
"city",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type str '",
"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.state_province_region | Corresponds to IDD Field `state_province_region`
Args:
value (str): value for IDD Field `state_province_region`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `value... | pyepw/epw.py | def state_province_region(self, value=None):
"""Corresponds to IDD Field `state_province_region`
Args:
value (str): value for IDD Field `state_province_region`
if `value` is None it will not be checked against the
specification and is assumed to be a missing ... | def state_province_region(self, value=None):
"""Corresponds to IDD Field `state_province_region`
Args:
value (str): value for IDD Field `state_province_region`
if `value` is None it will not be checked against the
specification and is assumed to be a missing ... | [
"Corresponds",
"to",
"IDD",
"Field",
"state_province_region"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L135-L158 | [
"def",
"state_province_region",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.country | Corresponds to IDD Field `country`
Args:
value (str): value for IDD Field `country`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `value` is not a valid value | pyepw/epw.py | def country(self, value=None):
"""Corresponds to IDD Field `country`
Args:
value (str): value for IDD Field `country`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueEr... | def country(self, value=None):
"""Corresponds to IDD Field `country`
Args:
value (str): value for IDD Field `country`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueEr... | [
"Corresponds",
"to",
"IDD",
"Field",
"country"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L171-L193 | [
"def",
"country",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type str '",
... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.source | Corresponds to IDD Field `source`
Args:
value (str): value for IDD Field `source`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `value` is not a valid value | pyepw/epw.py | def source(self, value=None):
"""Corresponds to IDD Field `source`
Args:
value (str): value for IDD Field `source`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError... | def source(self, value=None):
"""Corresponds to IDD Field `source`
Args:
value (str): value for IDD Field `source`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError... | [
"Corresponds",
"to",
"IDD",
"Field",
"source"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L206-L228 | [
"def",
"source",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type str '",
... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.wmo | Corresponds to IDD Field `wmo` usually a 6 digit field. Used as
alpha in EnergyPlus.
Args:
value (str): value for IDD Field `wmo`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
... | pyepw/epw.py | def wmo(self, value=None):
"""Corresponds to IDD Field `wmo` usually a 6 digit field. Used as
alpha in EnergyPlus.
Args:
value (str): value for IDD Field `wmo`
if `value` is None it will not be checked against the
specification and is assumed to be a ... | def wmo(self, value=None):
"""Corresponds to IDD Field `wmo` usually a 6 digit field. Used as
alpha in EnergyPlus.
Args:
value (str): value for IDD Field `wmo`
if `value` is None it will not be checked against the
specification and is assumed to be a ... | [
"Corresponds",
"to",
"IDD",
"Field",
"wmo",
"usually",
"a",
"6",
"digit",
"field",
".",
"Used",
"as",
"alpha",
"in",
"EnergyPlus",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L241-L264 | [
"def",
"wmo",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type str '",
"'... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.latitude | Corresponds to IDD Field `latitude`
+ is North, - is South, degree minutes represented in decimal (i.e. 30 minutes is .5)
Args:
value (float): value for IDD Field `latitude`
Unit: deg
Default value: 0.0
value >= -90.0
value <=... | pyepw/epw.py | def latitude(self, value=0.0):
"""Corresponds to IDD Field `latitude`
+ is North, - is South, degree minutes represented in decimal (i.e. 30 minutes is .5)
Args:
value (float): value for IDD Field `latitude`
Unit: deg
Default value: 0.0
... | def latitude(self, value=0.0):
"""Corresponds to IDD Field `latitude`
+ is North, - is South, degree minutes represented in decimal (i.e. 30 minutes is .5)
Args:
value (float): value for IDD Field `latitude`
Unit: deg
Default value: 0.0
... | [
"Corresponds",
"to",
"IDD",
"Field",
"latitude"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L277-L308 | [
"def",
"latitude",
"(",
"self",
",",
"value",
"=",
"0.0",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float ... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.longitude | Corresponds to IDD Field `longitude`
- is West, + is East, degree minutes represented in decimal (i.e. 30 minutes is .5)
Args:
value (float): value for IDD Field `longitude`
Unit: deg
Default value: 0.0
value >= -180.0
value <... | pyepw/epw.py | def longitude(self, value=0.0):
"""Corresponds to IDD Field `longitude`
- is West, + is East, degree minutes represented in decimal (i.e. 30 minutes is .5)
Args:
value (float): value for IDD Field `longitude`
Unit: deg
Default value: 0.0
... | def longitude(self, value=0.0):
"""Corresponds to IDD Field `longitude`
- is West, + is East, degree minutes represented in decimal (i.e. 30 minutes is .5)
Args:
value (float): value for IDD Field `longitude`
Unit: deg
Default value: 0.0
... | [
"Corresponds",
"to",
"IDD",
"Field",
"longitude"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L321-L352 | [
"def",
"longitude",
"(",
"self",
",",
"value",
"=",
"0.0",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.timezone | Corresponds to IDD Field `timezone` Time relative to GMT.
Args:
value (float): value for IDD Field `timezone`
Unit: hr - not on standard units list???
Default value: 0.0
value >= -12.0
value <= 12.0
if `value` is None i... | pyepw/epw.py | def timezone(self, value=0.0):
"""Corresponds to IDD Field `timezone` Time relative to GMT.
Args:
value (float): value for IDD Field `timezone`
Unit: hr - not on standard units list???
Default value: 0.0
value >= -12.0
value <=... | def timezone(self, value=0.0):
"""Corresponds to IDD Field `timezone` Time relative to GMT.
Args:
value (float): value for IDD Field `timezone`
Unit: hr - not on standard units list???
Default value: 0.0
value >= -12.0
value <=... | [
"Corresponds",
"to",
"IDD",
"Field",
"timezone",
"Time",
"relative",
"to",
"GMT",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L365-L394 | [
"def",
"timezone",
"(",
"self",
",",
"value",
"=",
"0.0",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float ... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.elevation | Corresponds to IDD Field `elevation`
Args:
value (float): value for IDD Field `elevation`
Unit: m
Default value: 0.0
value >= -1000.0
value < 9999.9
if `value` is None it will not be checked against the
... | pyepw/epw.py | def elevation(self, value=0.0):
"""Corresponds to IDD Field `elevation`
Args:
value (float): value for IDD Field `elevation`
Unit: m
Default value: 0.0
value >= -1000.0
value < 9999.9
if `value` is None it will ... | def elevation(self, value=0.0):
"""Corresponds to IDD Field `elevation`
Args:
value (float): value for IDD Field `elevation`
Unit: m
Default value: 0.0
value >= -1000.0
value < 9999.9
if `value` is None it will ... | [
"Corresponds",
"to",
"IDD",
"Field",
"elevation"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L407-L436 | [
"def",
"elevation",
"(",
"self",
",",
"value",
"=",
"0.0",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | Location.export | Exports object to its string representation.
Args:
top (bool): if True appends `internal_name` before values.
All non list objects should be exported with value top=True,
all list objects, that are embedded in as fields inlist objects
should be expor... | pyepw/epw.py | def export(self, top=True):
"""Exports object to its string representation.
Args:
top (bool): if True appends `internal_name` before values.
All non list objects should be exported with value top=True,
all list objects, that are embedded in as fields inlist ... | def export(self, top=True):
"""Exports object to its string representation.
Args:
top (bool): if True appends `internal_name` before values.
All non list objects should be exported with value top=True,
all list objects, that are embedded in as fields inlist ... | [
"Exports",
"object",
"to",
"its",
"string",
"representation",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L451-L476 | [
"def",
"export",
"(",
"self",
",",
"top",
"=",
"True",
")",
":",
"out",
"=",
"[",
"]",
"if",
"top",
":",
"out",
".",
"append",
"(",
"self",
".",
"_internal_name",
")",
"out",
".",
"append",
"(",
"self",
".",
"_to_str",
"(",
"self",
".",
"city",
... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.read | Read values.
Args:
vals (list): list of strings representing values | pyepw/epw.py | def read(self, vals):
"""Read values.
Args:
vals (list): list of strings representing values
"""
i = 0
if len(vals[i]) == 0:
self.title_of_design_condition = None
else:
self.title_of_design_condition = vals[i]
i += 1
i... | def read(self, vals):
"""Read values.
Args:
vals (list): list of strings representing values
"""
i = 0
if len(vals[i]) == 0:
self.title_of_design_condition = None
else:
self.title_of_design_condition = vals[i]
i += 1
i... | [
"Read",
"values",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L559-L906 | [
"def",
"read",
"(",
"self",
",",
"vals",
")",
":",
"i",
"=",
"0",
"if",
"len",
"(",
"vals",
"[",
"i",
"]",
")",
"==",
"0",
":",
"self",
".",
"title_of_design_condition",
"=",
"None",
"else",
":",
"self",
".",
"title_of_design_condition",
"=",
"vals",... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.title_of_design_condition | Corresponds to IDD Field `title_of_design_condition`
Args:
value (str): value for IDD Field `title_of_design_condition`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: i... | pyepw/epw.py | def title_of_design_condition(self, value=None):
"""Corresponds to IDD Field `title_of_design_condition`
Args:
value (str): value for IDD Field `title_of_design_condition`
if `value` is None it will not be checked against the
specification and is assumed to b... | def title_of_design_condition(self, value=None):
"""Corresponds to IDD Field `title_of_design_condition`
Args:
value (str): value for IDD Field `title_of_design_condition`
if `value` is None it will not be checked against the
specification and is assumed to b... | [
"Corresponds",
"to",
"IDD",
"Field",
"title_of_design_condition"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L919-L942 | [
"def",
"title_of_design_condition",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to b... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.unkown_field | Corresponds to IDD Field `unkown_field` Empty field in data.
Args:
value (str): value for IDD Field `unkown_field`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `va... | pyepw/epw.py | def unkown_field(self, value=None):
"""Corresponds to IDD Field `unkown_field` Empty field in data.
Args:
value (str): value for IDD Field `unkown_field`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
... | def unkown_field(self, value=None):
"""Corresponds to IDD Field `unkown_field` Empty field in data.
Args:
value (str): value for IDD Field `unkown_field`
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
... | [
"Corresponds",
"to",
"IDD",
"Field",
"unkown_field",
"Empty",
"field",
"in",
"data",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L955-L977 | [
"def",
"unkown_field",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type str... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.design_stat_heating | Corresponds to IDD Field `design_stat_heating`
Args:
value (str): value for IDD Field `design_stat_heating`
Accepted values are:
- Heating
Default value: Heating
if `value` is None it will not be checked against the
... | pyepw/epw.py | def design_stat_heating(self, value="Heating"):
"""Corresponds to IDD Field `design_stat_heating`
Args:
value (str): value for IDD Field `design_stat_heating`
Accepted values are:
- Heating
Default value: Heating
if `valu... | def design_stat_heating(self, value="Heating"):
"""Corresponds to IDD Field `design_stat_heating`
Args:
value (str): value for IDD Field `design_stat_heating`
Accepted values are:
- Heating
Default value: Heating
if `valu... | [
"Corresponds",
"to",
"IDD",
"Field",
"design_stat_heating"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L990-L1021 | [
"def",
"design_stat_heating",
"(",
"self",
",",
"value",
"=",
"\"Heating\"",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to ... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.coldestmonth | Corresponds to IDD Field `coldestmonth`
Args:
value (int): value for IDD Field `coldestmonth`
value >= 1
value <= 12
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Rais... | pyepw/epw.py | def coldestmonth(self, value=None):
"""Corresponds to IDD Field `coldestmonth`
Args:
value (int): value for IDD Field `coldestmonth`
value >= 1
value <= 12
if `value` is None it will not be checked against the
specification and... | def coldestmonth(self, value=None):
"""Corresponds to IDD Field `coldestmonth`
Args:
value (int): value for IDD Field `coldestmonth`
value >= 1
value <= 12
if `value` is None it will not be checked against the
specification and... | [
"Corresponds",
"to",
"IDD",
"Field",
"coldestmonth"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1034-L1061 | [
"def",
"coldestmonth",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"int",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type int... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db996 | Corresponds to IDD Field `db996`
Dry-bulb temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db996`
Unit: C
if `value` is None it will not be checked against the
... | pyepw/epw.py | def db996(self, value=None):
""" Corresponds to IDD Field `db996`
Dry-bulb temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db996`
Unit: C
if `value` is N... | def db996(self, value=None):
""" Corresponds to IDD Field `db996`
Dry-bulb temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db996`
Unit: C
if `value` is N... | [
"Corresponds",
"to",
"IDD",
"Field",
"db996",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"99",
".",
"6%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"cold",
"conditions",
")"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1074-L1095 | [
"def",
"db996",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db990 | Corresponds to IDD Field `db990`
Dry-bulb temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db990`
Unit: C
if `value` is None it will not be checked against the
... | pyepw/epw.py | def db990(self, value=None):
""" Corresponds to IDD Field `db990`
Dry-bulb temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db990`
Unit: C
if `value` is N... | def db990(self, value=None):
""" Corresponds to IDD Field `db990`
Dry-bulb temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db990`
Unit: C
if `value` is N... | [
"Corresponds",
"to",
"IDD",
"Field",
"db990",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"90",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"cold",
"conditions",
")"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1108-L1129 | [
"def",
"db990",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.dp996 | Corresponds to IDD Field `dp996`
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `dp996`
Unit: C
if `value` is None it will not be checked against the
... | pyepw/epw.py | def dp996(self, value=None):
""" Corresponds to IDD Field `dp996`
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `dp996`
Unit: C
if `value` is ... | def dp996(self, value=None):
""" Corresponds to IDD Field `dp996`
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `dp996`
Unit: C
if `value` is ... | [
"Corresponds",
"to",
"IDD",
"Field",
"dp996",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"99",
".",
"6%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"cold",
"conditions",
")"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1142-L1163 | [
"def",
"dp996",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.hr_dp996 | Corresponds to IDD Field `hr_dp996`
humidity ratio, calculated at standard atmospheric pressure
at elevation of station, corresponding to
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): val... | pyepw/epw.py | def hr_dp996(self, value=None):
""" Corresponds to IDD Field `hr_dp996`
humidity ratio, calculated at standard atmospheric pressure
at elevation of station, corresponding to
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
... | def hr_dp996(self, value=None):
""" Corresponds to IDD Field `hr_dp996`
humidity ratio, calculated at standard atmospheric pressure
at elevation of station, corresponding to
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
... | [
"Corresponds",
"to",
"IDD",
"Field",
"hr_dp996",
"humidity",
"ratio",
"calculated",
"at",
"standard",
"atmospheric",
"pressure",
"at",
"elevation",
"of",
"station",
"corresponding",
"to",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"99",
".",
"6%",
... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1176-L1198 | [
"def",
"hr_dp996",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_dp996 | Corresponds to IDD Field `db_dp996`
mean coincident drybulb temperature corresponding to
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db_dp996`
Unit: C
... | pyepw/epw.py | def db_dp996(self, value=None):
""" Corresponds to IDD Field `db_dp996`
mean coincident drybulb temperature corresponding to
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD F... | def db_dp996(self, value=None):
""" Corresponds to IDD Field `db_dp996`
mean coincident drybulb temperature corresponding to
Dew-point temperature corresponding to 99.6% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD F... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_dp996",
"mean",
"coincident",
"drybulb",
"temperature",
"corresponding",
"to",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"99",
".",
"6%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"cold"... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1211-L1233 | [
"def",
"db_dp996",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.dp990 | Corresponds to IDD Field `dp990`
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `dp990`
Unit: C
if `value` is None it will not be checked against the
... | pyepw/epw.py | def dp990(self, value=None):
""" Corresponds to IDD Field `dp990`
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `dp990`
Unit: C
if `value` is ... | def dp990(self, value=None):
""" Corresponds to IDD Field `dp990`
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `dp990`
Unit: C
if `value` is ... | [
"Corresponds",
"to",
"IDD",
"Field",
"dp990",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"90",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"cold",
"conditions",
")"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1246-L1267 | [
"def",
"dp990",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.hr_dp990 | Corresponds to IDD Field `hr_dp990`
humidity ratio, calculated at standard atmospheric pressure
at elevation of station, corresponding to
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): val... | pyepw/epw.py | def hr_dp990(self, value=None):
""" Corresponds to IDD Field `hr_dp990`
humidity ratio, calculated at standard atmospheric pressure
at elevation of station, corresponding to
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
... | def hr_dp990(self, value=None):
""" Corresponds to IDD Field `hr_dp990`
humidity ratio, calculated at standard atmospheric pressure
at elevation of station, corresponding to
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
... | [
"Corresponds",
"to",
"IDD",
"Field",
"hr_dp990",
"humidity",
"ratio",
"calculated",
"at",
"standard",
"atmospheric",
"pressure",
"at",
"elevation",
"of",
"station",
"corresponding",
"to",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"90",
".",
"0%",
... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1280-L1302 | [
"def",
"hr_dp990",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_dp990 | Corresponds to IDD Field `db_dp990`
mean coincident drybulb temperature corresponding to
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD Field `db_dp990`
Unit: C
... | pyepw/epw.py | def db_dp990(self, value=None):
""" Corresponds to IDD Field `db_dp990`
mean coincident drybulb temperature corresponding to
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD F... | def db_dp990(self, value=None):
""" Corresponds to IDD Field `db_dp990`
mean coincident drybulb temperature corresponding to
Dew-point temperature corresponding to 90.0% annual cumulative
frequency of occurrence (cold conditions)
Args:
value (float): value for IDD F... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_dp990",
"mean",
"coincident",
"drybulb",
"temperature",
"corresponding",
"to",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"90",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"cold"... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1315-L1337 | [
"def",
"db_dp990",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.ws004c | Corresponds to IDD Field `ws004c`
Args:
value (float): value for IDD Field `ws004c`
Unit: m/s
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Raises:
ValueError: if `value` ... | pyepw/epw.py | def ws004c(self, value=None):
"""Corresponds to IDD Field `ws004c`
Args:
value (float): value for IDD Field `ws004c`
Unit: m/s
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Ra... | def ws004c(self, value=None):
"""Corresponds to IDD Field `ws004c`
Args:
value (float): value for IDD Field `ws004c`
Unit: m/s
if `value` is None it will not be checked against the
specification and is assumed to be a missing value
Ra... | [
"Corresponds",
"to",
"IDD",
"Field",
"ws004c"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1350-L1370 | [
"def",
"ws004c",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_ws004c | Corresponds to IDD Field `db_ws004c`
Mean coincident dry-bulb temperature to wind speed corresponding to 0.40% cumulative frequency for coldest month
Args:
value (float): value for IDD Field `db_ws004c`
Unit: C
if `value` is None it will not be checked agains... | pyepw/epw.py | def db_ws004c(self, value=None):
""" Corresponds to IDD Field `db_ws004c`
Mean coincident dry-bulb temperature to wind speed corresponding to 0.40% cumulative frequency for coldest month
Args:
value (float): value for IDD Field `db_ws004c`
Unit: C
if... | def db_ws004c(self, value=None):
""" Corresponds to IDD Field `db_ws004c`
Mean coincident dry-bulb temperature to wind speed corresponding to 0.40% cumulative frequency for coldest month
Args:
value (float): value for IDD Field `db_ws004c`
Unit: C
if... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_ws004c",
"Mean",
"coincident",
"dry",
"-",
"bulb",
"temperature",
"to",
"wind",
"speed",
"corresponding",
"to",
"0",
".",
"40%",
"cumulative",
"frequency",
"for",
"coldest",
"month"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1383-L1403 | [
"def",
"db_ws004c",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type floa... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.ws010c | Corresponds to IDD Field `ws010c`
Wind speed corresponding to 1.0% cumulative frequency
of occurrence for coldest month;
Args:
value (float): value for IDD Field `ws010c`
Unit: m/s
if `value` is None it will not be checked against the
... | pyepw/epw.py | def ws010c(self, value=None):
""" Corresponds to IDD Field `ws010c`
Wind speed corresponding to 1.0% cumulative frequency
of occurrence for coldest month;
Args:
value (float): value for IDD Field `ws010c`
Unit: m/s
if `value` is None it will ... | def ws010c(self, value=None):
""" Corresponds to IDD Field `ws010c`
Wind speed corresponding to 1.0% cumulative frequency
of occurrence for coldest month;
Args:
value (float): value for IDD Field `ws010c`
Unit: m/s
if `value` is None it will ... | [
"Corresponds",
"to",
"IDD",
"Field",
"ws010c",
"Wind",
"speed",
"corresponding",
"to",
"1",
".",
"0%",
"cumulative",
"frequency",
"of",
"occurrence",
"for",
"coldest",
"month",
";"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1416-L1437 | [
"def",
"ws010c",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_ws010c | Corresponds to IDD Field `db_ws010c`
Mean coincident dry-bulb temperature to wind speed corresponding to 1.0% cumulative frequency for coldest month
Args:
value (float): value for IDD Field `db_ws010c`
Unit: C
if `value` is None it will not be checked against... | pyepw/epw.py | def db_ws010c(self, value=None):
""" Corresponds to IDD Field `db_ws010c`
Mean coincident dry-bulb temperature to wind speed corresponding to 1.0% cumulative frequency for coldest month
Args:
value (float): value for IDD Field `db_ws010c`
Unit: C
if ... | def db_ws010c(self, value=None):
""" Corresponds to IDD Field `db_ws010c`
Mean coincident dry-bulb temperature to wind speed corresponding to 1.0% cumulative frequency for coldest month
Args:
value (float): value for IDD Field `db_ws010c`
Unit: C
if ... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_ws010c",
"Mean",
"coincident",
"dry",
"-",
"bulb",
"temperature",
"to",
"wind",
"speed",
"corresponding",
"to",
"1",
".",
"0%",
"cumulative",
"frequency",
"for",
"coldest",
"month"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1450-L1470 | [
"def",
"db_ws010c",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type floa... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.ws_db996 | Corresponds to IDD Field `ws_db996`
Mean wind speed coincident with 99.6% dry-bulb temperature
Args:
value (float): value for IDD Field `ws_db996`
Unit: m/s
if `value` is None it will not be checked against the
specification and is assumed to ... | pyepw/epw.py | def ws_db996(self, value=None):
""" Corresponds to IDD Field `ws_db996`
Mean wind speed coincident with 99.6% dry-bulb temperature
Args:
value (float): value for IDD Field `ws_db996`
Unit: m/s
if `value` is None it will not be checked against the
... | def ws_db996(self, value=None):
""" Corresponds to IDD Field `ws_db996`
Mean wind speed coincident with 99.6% dry-bulb temperature
Args:
value (float): value for IDD Field `ws_db996`
Unit: m/s
if `value` is None it will not be checked against the
... | [
"Corresponds",
"to",
"IDD",
"Field",
"ws_db996",
"Mean",
"wind",
"speed",
"coincident",
"with",
"99",
".",
"6%",
"dry",
"-",
"bulb",
"temperature"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1483-L1503 | [
"def",
"ws_db996",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wd_db996 | Corresponds to IDD Field `wd_db996`
most frequent wind direction corresponding to mean wind speed coincident with 99.6% dry-bulb temperature
degrees from north (east = 90 deg)
Args:
value (float): value for IDD Field `wd_db996`
Unit: deg
if `value` is... | pyepw/epw.py | def wd_db996(self, value=None):
""" Corresponds to IDD Field `wd_db996`
most frequent wind direction corresponding to mean wind speed coincident with 99.6% dry-bulb temperature
degrees from north (east = 90 deg)
Args:
value (float): value for IDD Field `wd_db996`
... | def wd_db996(self, value=None):
""" Corresponds to IDD Field `wd_db996`
most frequent wind direction corresponding to mean wind speed coincident with 99.6% dry-bulb temperature
degrees from north (east = 90 deg)
Args:
value (float): value for IDD Field `wd_db996`
... | [
"Corresponds",
"to",
"IDD",
"Field",
"wd_db996",
"most",
"frequent",
"wind",
"direction",
"corresponding",
"to",
"mean",
"wind",
"speed",
"coincident",
"with",
"99",
".",
"6%",
"dry",
"-",
"bulb",
"temperature",
"degrees",
"from",
"north",
"(",
"east",
"=",
... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1516-L1537 | [
"def",
"wd_db996",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.design_stat_cooling | Corresponds to IDD Field `design_stat_cooling`
Args:
value (str): value for IDD Field `design_stat_cooling`
Accepted values are:
- Cooling
Default value: Cooling
if `value` is None it will not be checked against the
... | pyepw/epw.py | def design_stat_cooling(self, value="Cooling"):
"""Corresponds to IDD Field `design_stat_cooling`
Args:
value (str): value for IDD Field `design_stat_cooling`
Accepted values are:
- Cooling
Default value: Cooling
if `valu... | def design_stat_cooling(self, value="Cooling"):
"""Corresponds to IDD Field `design_stat_cooling`
Args:
value (str): value for IDD Field `design_stat_cooling`
Accepted values are:
- Cooling
Default value: Cooling
if `valu... | [
"Corresponds",
"to",
"IDD",
"Field",
"design_stat_cooling"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1550-L1581 | [
"def",
"design_stat_cooling",
"(",
"self",
",",
"value",
"=",
"\"Cooling\"",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"str",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to ... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.dbr | Corresponds to IDD Field `dbr` Daily temperature range for hottest
month.
[defined as mean of the difference between daily maximum
and daily minimum dry-bulb temperatures for hottest month]
Args:
value (float): value for IDD Field `dbr`
Unit: C
... | pyepw/epw.py | def dbr(self, value=None):
"""Corresponds to IDD Field `dbr` Daily temperature range for hottest
month.
[defined as mean of the difference between daily maximum
and daily minimum dry-bulb temperatures for hottest month]
Args:
value (float): value for IDD Field `dbr`... | def dbr(self, value=None):
"""Corresponds to IDD Field `dbr` Daily temperature range for hottest
month.
[defined as mean of the difference between daily maximum
and daily minimum dry-bulb temperatures for hottest month]
Args:
value (float): value for IDD Field `dbr`... | [
"Corresponds",
"to",
"IDD",
"Field",
"dbr",
"Daily",
"temperature",
"range",
"for",
"hottest",
"month",
"."
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1634-L1658 | [
"def",
"dbr",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '",
... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db004 | Corresponds to IDD Field `db004`
Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db004`
Unit: C
if `value` is None it will not be checked against the
... | pyepw/epw.py | def db004(self, value=None):
""" Corresponds to IDD Field `db004`
Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db004`
Unit: C
if `value` is None it wi... | def db004(self, value=None):
""" Corresponds to IDD Field `db004`
Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db004`
Unit: C
if `value` is None it wi... | [
"Corresponds",
"to",
"IDD",
"Field",
"db004",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"0",
".",
"4%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"warm",
"conditions",
")"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1671-L1691 | [
"def",
"db004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wb_db004 | Corresponds to IDD Field `wb_db004`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db004`
Unit: C
if `value` i... | pyepw/epw.py | def wb_db004(self, value=None):
""" Corresponds to IDD Field `wb_db004`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db004`
... | def wb_db004(self, value=None):
""" Corresponds to IDD Field `wb_db004`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db004`
... | [
"Corresponds",
"to",
"IDD",
"Field",
"wb_db004",
"mean",
"coincident",
"wet",
"-",
"bulb",
"temperature",
"to",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"0",
".",
"4%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"warm",
"con... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1704-L1725 | [
"def",
"wb_db004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db010 | Corresponds to IDD Field `db010`
Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db010`
Unit: C
if `value` is None it will not be checked against the
... | pyepw/epw.py | def db010(self, value=None):
""" Corresponds to IDD Field `db010`
Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db010`
Unit: C
if `value` is None it wi... | def db010(self, value=None):
""" Corresponds to IDD Field `db010`
Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db010`
Unit: C
if `value` is None it wi... | [
"Corresponds",
"to",
"IDD",
"Field",
"db010",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"1",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"warm",
"conditions",
")"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1738-L1758 | [
"def",
"db010",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wb_db010 | Corresponds to IDD Field `wb_db010`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db010`
Unit: C
if `value` i... | pyepw/epw.py | def wb_db010(self, value=None):
""" Corresponds to IDD Field `wb_db010`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db010`
... | def wb_db010(self, value=None):
""" Corresponds to IDD Field `wb_db010`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db010`
... | [
"Corresponds",
"to",
"IDD",
"Field",
"wb_db010",
"mean",
"coincident",
"wet",
"-",
"bulb",
"temperature",
"to",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"1",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"warm",
"con... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1771-L1792 | [
"def",
"wb_db010",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db020 | Corresponds to IDD Field `db020`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db020`
Unit: C
if `value` is None... | pyepw/epw.py | def db020(self, value=None):
""" Corresponds to IDD Field `db020`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db020`
... | def db020(self, value=None):
""" Corresponds to IDD Field `db020`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `db020`
... | [
"Corresponds",
"to",
"IDD",
"Field",
"db020",
"mean",
"coincident",
"wet",
"-",
"bulb",
"temperature",
"to",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"2",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"warm",
"condit... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1805-L1826 | [
"def",
"db020",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wb_db020 | Corresponds to IDD Field `wb_db020`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db020`
Unit: C
if `value` i... | pyepw/epw.py | def wb_db020(self, value=None):
""" Corresponds to IDD Field `wb_db020`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db020`
... | def wb_db020(self, value=None):
""" Corresponds to IDD Field `wb_db020`
mean coincident wet-bulb temperature to
Dry-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence (warm conditions)
Args:
value (float): value for IDD Field `wb_db020`
... | [
"Corresponds",
"to",
"IDD",
"Field",
"wb_db020",
"mean",
"coincident",
"wet",
"-",
"bulb",
"temperature",
"to",
"Dry",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"2",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence",
"(",
"warm",
"con... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1839-L1860 | [
"def",
"wb_db020",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wb004 | Corresponds to IDD Field `wb004`
Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb004`
Unit: C
if `value` is None it will not be checked against the
specification ... | pyepw/epw.py | def wb004(self, value=None):
""" Corresponds to IDD Field `wb004`
Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb004`
Unit: C
if `value` is None it will not be checked ... | def wb004(self, value=None):
""" Corresponds to IDD Field `wb004`
Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb004`
Unit: C
if `value` is None it will not be checked ... | [
"Corresponds",
"to",
"IDD",
"Field",
"wb004",
"Wet",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"0",
".",
"4%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1873-L1893 | [
"def",
"wb004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_wb004 | Corresponds to IDD Field `db_wb004`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb004`
Unit: C
if `value` is None it will not... | pyepw/epw.py | def db_wb004(self, value=None):
""" Corresponds to IDD Field `db_wb004`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb004`
Unit: C
... | def db_wb004(self, value=None):
""" Corresponds to IDD Field `db_wb004`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb004`
Unit: C
... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_wb004",
"mean",
"coincident",
"dry",
"-",
"bulb",
"temperature",
"to",
"Wet",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"0",
".",
"4%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1906-L1927 | [
"def",
"db_wb004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wb010 | Corresponds to IDD Field `wb010`
Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb010`
Unit: C
if `value` is None it will not be checked against the
specification ... | pyepw/epw.py | def wb010(self, value=None):
""" Corresponds to IDD Field `wb010`
Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb010`
Unit: C
if `value` is None it will not be checked ... | def wb010(self, value=None):
""" Corresponds to IDD Field `wb010`
Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb010`
Unit: C
if `value` is None it will not be checked ... | [
"Corresponds",
"to",
"IDD",
"Field",
"wb010",
"Wet",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"1",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1940-L1960 | [
"def",
"wb010",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_wb010 | Corresponds to IDD Field `db_wb010`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb010`
Unit: C
if `value` is None it will not... | pyepw/epw.py | def db_wb010(self, value=None):
""" Corresponds to IDD Field `db_wb010`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb010`
Unit: C
... | def db_wb010(self, value=None):
""" Corresponds to IDD Field `db_wb010`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb010`
Unit: C
... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_wb010",
"mean",
"coincident",
"dry",
"-",
"bulb",
"temperature",
"to",
"Wet",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"1",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L1973-L1994 | [
"def",
"db_wb010",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wb020 | Corresponds to IDD Field `wb020`
Wet-bulb temperature corresponding to 02.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb020`
Unit: C
if `value` is None it will not be checked against the
specification... | pyepw/epw.py | def wb020(self, value=None):
""" Corresponds to IDD Field `wb020`
Wet-bulb temperature corresponding to 02.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb020`
Unit: C
if `value` is None it will not be checked... | def wb020(self, value=None):
""" Corresponds to IDD Field `wb020`
Wet-bulb temperature corresponding to 02.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `wb020`
Unit: C
if `value` is None it will not be checked... | [
"Corresponds",
"to",
"IDD",
"Field",
"wb020",
"Wet",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"02",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L2007-L2027 | [
"def",
"wb020",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.db_wb020 | Corresponds to IDD Field `db_wb020`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb020`
Unit: C
if `value` is None it will not... | pyepw/epw.py | def db_wb020(self, value=None):
""" Corresponds to IDD Field `db_wb020`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb020`
Unit: C
... | def db_wb020(self, value=None):
""" Corresponds to IDD Field `db_wb020`
mean coincident dry-bulb temperature to
Wet-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `db_wb020`
Unit: C
... | [
"Corresponds",
"to",
"IDD",
"Field",
"db_wb020",
"mean",
"coincident",
"dry",
"-",
"bulb",
"temperature",
"to",
"Wet",
"-",
"bulb",
"temperature",
"corresponding",
"to",
"2",
".",
"0%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L2040-L2061 | [
"def",
"db_wb020",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.ws_db004 | Corresponds to IDD Field `ws_db004`
Mean wind speed coincident with 0.4% dry-bulb temperature
Args:
value (float): value for IDD Field `ws_db004`
Unit: m/s
if `value` is None it will not be checked against the
specification and is assumed to b... | pyepw/epw.py | def ws_db004(self, value=None):
""" Corresponds to IDD Field `ws_db004`
Mean wind speed coincident with 0.4% dry-bulb temperature
Args:
value (float): value for IDD Field `ws_db004`
Unit: m/s
if `value` is None it will not be checked against the
... | def ws_db004(self, value=None):
""" Corresponds to IDD Field `ws_db004`
Mean wind speed coincident with 0.4% dry-bulb temperature
Args:
value (float): value for IDD Field `ws_db004`
Unit: m/s
if `value` is None it will not be checked against the
... | [
"Corresponds",
"to",
"IDD",
"Field",
"ws_db004",
"Mean",
"wind",
"speed",
"coincident",
"with",
"0",
".",
"4%",
"dry",
"-",
"bulb",
"temperature"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L2074-L2094 | [
"def",
"ws_db004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.wd_db004 | Corresponds to IDD Field `wd_db004`
corresponding most frequent wind direction
Mean wind speed coincident with 0.4% dry-bulb temperature
degrees true from north (east = 90 deg)
Args:
value (float): value for IDD Field `wd_db004`
Unit: deg
if `... | pyepw/epw.py | def wd_db004(self, value=None):
""" Corresponds to IDD Field `wd_db004`
corresponding most frequent wind direction
Mean wind speed coincident with 0.4% dry-bulb temperature
degrees true from north (east = 90 deg)
Args:
value (float): value for IDD Field `wd_db004`
... | def wd_db004(self, value=None):
""" Corresponds to IDD Field `wd_db004`
corresponding most frequent wind direction
Mean wind speed coincident with 0.4% dry-bulb temperature
degrees true from north (east = 90 deg)
Args:
value (float): value for IDD Field `wd_db004`
... | [
"Corresponds",
"to",
"IDD",
"Field",
"wd_db004",
"corresponding",
"most",
"frequent",
"wind",
"direction",
"Mean",
"wind",
"speed",
"coincident",
"with",
"0",
".",
"4%",
"dry",
"-",
"bulb",
"temperature",
"degrees",
"true",
"from",
"north",
"(",
"east",
"=",
... | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L2107-L2129 | [
"def",
"wd_db004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.dp004 | Corresponds to IDD Field `dp004`
Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `dp004`
Unit: C
if `value` is None it will not be checked against the
specification... | pyepw/epw.py | def dp004(self, value=None):
""" Corresponds to IDD Field `dp004`
Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `dp004`
Unit: C
if `value` is None it will not be checked... | def dp004(self, value=None):
""" Corresponds to IDD Field `dp004`
Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `dp004`
Unit: C
if `value` is None it will not be checked... | [
"Corresponds",
"to",
"IDD",
"Field",
"dp004",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"0",
".",
"4%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L2142-L2162 | [
"def",
"dp004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float '"... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
train | DesignCondition.hr_dp004 | Corresponds to IDD Field `hr_dp004`
humidity ratio corresponding to
Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `hr_dp004`
if `value` is None it will not be checked against the
... | pyepw/epw.py | def hr_dp004(self, value=None):
""" Corresponds to IDD Field `hr_dp004`
humidity ratio corresponding to
Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `hr_dp004`
if `value` is No... | def hr_dp004(self, value=None):
""" Corresponds to IDD Field `hr_dp004`
humidity ratio corresponding to
Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence
Args:
value (float): value for IDD Field `hr_dp004`
if `value` is No... | [
"Corresponds",
"to",
"IDD",
"Field",
"hr_dp004",
"humidity",
"ratio",
"corresponding",
"to",
"Dew",
"-",
"point",
"temperature",
"corresponding",
"to",
"0",
".",
"4%",
"annual",
"cumulative",
"frequency",
"of",
"occurrence"
] | rbuffat/pyepw | python | https://github.com/rbuffat/pyepw/blob/373d4d3c8386c8d35789f086ac5f6018c2711745/pyepw/epw.py#L2175-L2195 | [
"def",
"hr_dp004",
"(",
"self",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"try",
":",
"value",
"=",
"float",
"(",
"value",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"'value {} need to be of type float... | 373d4d3c8386c8d35789f086ac5f6018c2711745 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.