text_prompt stringlengths 157 13.1k | code_prompt stringlengths 7 19.8k ⌀ |
|---|---|
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def db_dp004(self, value=None):
""" Corresponds to IDD Field `db_dp004` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 0.4% annua... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `db_dp004`'.format(value))
self._db_dp004 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dp010(self, value=None):
""" Corresponds to IDD Field `dp010` Dew-point temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: val... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dp010`'.format(value))
self._dp010 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def hr_dp010(self, value=None):
""" Corresponds to IDD Field `hr_dp010` humidity ratio corresponding to Dew-point temperature corresponding to 1.0,% annual cumul... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `hr_dp010`'.format(value))
self._hr_dp010 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def db_dp010(self, value=None):
""" Corresponds to IDD Field `db_dp010` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 1.0% annua... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `db_dp010`'.format(value))
self._db_dp010 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dp020(self, value=None):
""" Corresponds to IDD Field `dp020` Dew-point temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: val... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dp020`'.format(value))
self._dp020 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def hr_dp020(self, value=None):
""" Corresponds to IDD Field `hr_dp020` humidity ratio corresponding to Dew-point temperature corresponding to 2.0% annual cumula... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `hr_dp020`'.format(value))
self._hr_dp020 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def db_dp020(self, value=None):
""" Corresponds to IDD Field `db_dp020` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 2.0% annua... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `db_dp020`'.format(value))
self._db_dp020 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def en004(self, value=None):
""" Corresponds to IDD Field `en004` mean coincident dry-bulb temperature to Enthalpy corresponding to 0.4% annual cumulative freque... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `en004`'.format(value))
self._en004 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def db_en004(self, value=None):
""" Corresponds to IDD Field `db_en004` mean coincident dry-bulb temperature to Enthalpy corresponding to 0.4% annual cumulative ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `db_en004`'.format(value))
self._db_en004 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def en010(self, value=None):
""" Corresponds to IDD Field `en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative freque... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `en010`'.format(value))
self._en010 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def db_en010(self, value=None):
""" Corresponds to IDD Field `db_en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `db_en010`'.format(value))
self._db_en010 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def en020(self, value=None):
""" Corresponds to IDD Field `en020` mean coincident dry-bulb temperature to Enthalpy corresponding to 2.0% annual cumulative freque... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `en020`'.format(value))
self._en020 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def db_en020(self, value=None):
""" Corresponds to IDD Field `db_en020` mean coincident dry-bulb temperature to Enthalpy corresponding to 2.0% annual cumulative ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `db_en020`'.format(value))
self._db_en020 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def design_stat_extremes(self, value="Extremes"):
"""Corresponds to IDD Field `design_stat_extremes` Args: value (str):
value for IDD Field `design_stat_extreme... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `design_stat_extremes`'.format(value))
if ',' in value:
ra... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def ws010(self, value=None):
""" Corresponds to IDD Field `ws010` Wind speed corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float):... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `ws010`'.format(value))
self._ws010 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def ws025(self, value=None):
""" Corresponds to IDD Field `ws025` Wind speed corresponding to 2.5% annual cumulative frequency of occurrence Args: value (float):... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `ws025`'.format(value))
self._ws025 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def ws050(self, value=None):
""" Corresponds to IDD Field `ws050` Wind speed corresponding 5.0% annual cumulative frequency of occurrence Args: value (float):
v... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `ws050`'.format(value))
self._ws050 = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def wbmax(self, value=None):
""" Corresponds to IDD Field `wbmax` Extreme maximum wet-bulb temperature Args: value (float):
value for IDD Field `wbmax` Unit: C ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `wbmax`'.format(value))
self._wbmax = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmin_mean(self, value=None):
""" Corresponds to IDD Field `dbmin_mean` Mean of extreme annual minimum dry-bulb temperature Args: value (float):
value for I... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmin_mean`'.format(value))
self._dbmin_mean = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmax_mean(self, value=None):
""" Corresponds to IDD Field `dbmax_mean` Mean of extreme annual maximum dry-bulb temperature Args: value (float):
value for I... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmax_mean`'.format(value))
self._dbmax_mean = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmin_stddev(self, value=None):
""" Corresponds to IDD Field `dbmin_stddev` Standard deviation of extreme annual minimum dry-bulb temperature Args: value (fl... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmin_stddev`'.format(value))
self._dbmin_stddev = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmax_stddev(self, value=None):
""" Corresponds to IDD Field `dbmax_stddev` Standard deviation of extreme annual maximum dry-bulb temperature Args: value (fl... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmax_stddev`'.format(value))
self._dbmax_stddev = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmin05years(self, value=None):
""" Corresponds to IDD Field `dbmin05years` 5-year return period values for minimum extreme dry-bulb temperature Args: value ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmin05years`'.format(value))
self._dbmin05years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmax05years(self, value=None):
""" Corresponds to IDD Field `dbmax05years` 5-year return period values for maximum extreme dry-bulb temperature Args: value ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmax05years`'.format(value))
self._dbmax05years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmin10years(self, value=None):
""" Corresponds to IDD Field `dbmin10years` 10-year return period values for minimum extreme dry-bulb temperature Args: value... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmin10years`'.format(value))
self._dbmin10years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmax10years(self, value=None):
""" Corresponds to IDD Field `dbmax10years` 10-year return period values for maximum extreme dry-bulb temperature Args: value... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmax10years`'.format(value))
self._dbmax10years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmin20years(self, value=None):
""" Corresponds to IDD Field `dbmin20years` 20-year return period values for minimum extreme dry-bulb temperature Args: value... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmin20years`'.format(value))
self._dbmin20years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmax20years(self, value=None):
""" Corresponds to IDD Field `dbmax20years` 20-year return period values for maximum extreme dry-bulb temperature Args: value... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmax20years`'.format(value))
self._dbmax20years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmin50years(self, value=None):
""" Corresponds to IDD Field `dbmin50years` 50-year return period values for minimum extreme dry-bulb temperature Args: value... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmin50years`'.format(value))
self._dbmin50years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dbmax50years(self, value=None):
""" Corresponds to IDD Field `dbmax50years` 50-year return period values for maximum extreme dry-bulb temperature Args: value... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `dbmax50years`'.format(value))
self._dbmax50years = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def typical_or_extreme_period_name(self, value=None):
"""Corresponds to IDD Field `typical_or_extreme_period_name` Args: value (str):
value for IDD Field `typic... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `typical_or_extreme_period_name`'.format(value))
if ',' in value:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def typical_or_extreme_period_type(self, value=None):
"""Corresponds to IDD Field `typical_or_extreme_period_type` Args: value (str):
value for IDD Field `typic... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `typical_or_extreme_period_type`'.format(value))
if ',' in value:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def period_start_day(self, value=None):
"""Corresponds to IDD Field `period_start_day` Args: value (str):
value for IDD Field `period_start_day` if `value` is N... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError('value {} need to be of type str '
'for field `period_start_day`'.format(value))
if ',' in value:
raise ValueErr... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def period_end_day(self, value=None):
"""Corresponds to IDD Field `period_end_day` Args: value (str):
value for IDD Field `period_end_day` if `value` is None it... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError('value {} need to be of type str '
'for field `period_end_day`'.format(value))
if ',' in value:
raise ValueError... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def ground_temperature_depth(self, value=None):
"""Corresponds to IDD Field `ground_temperature_depth` Args: value (float):
value for IDD Field `ground_temperat... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `ground_temperature_depth`'.format(value))
self._ground_temperature_depth... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_soil_conductivity(self, value=None):
"""Corresponds to IDD Field `depth_soil_conductivity` Args: value (float):
value for IDD Field `depth_soil_conduc... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_soil_conductivity`'.format(value))
self._depth_soil_conductivity =... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_soil_density(self, value=None):
"""Corresponds to IDD Field `depth_soil_density` Args: value (float):
value for IDD Field `depth_soil_density` Unit: k... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_soil_density`'.format(value))
self._depth_soil_density = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_soil_specific_heat(self, value=None):
"""Corresponds to IDD Field `depth_soil_specific_heat` Args: value (float):
value for IDD Field `depth_soil_spec... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_soil_specific_heat`'.format(value))
self._depth_soil_specific_heat... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_january_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_january_average_ground_temperature` Args: value (float):
valu... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_january_average_ground_temperature`'.format(value))
self._depth_ja... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_february_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_february_average_ground_temperature` Args: value (float):
va... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_february_average_ground_temperature`'.format(value))
self._depth_f... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_march_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_march_average_ground_temperature` Args: value (float):
value fo... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_march_average_ground_temperature`'.format(value))
self._depth_marc... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_april_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_april_average_ground_temperature` Args: value (float):
value fo... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_april_average_ground_temperature`'.format(value))
self._depth_apri... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_may_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_may_average_ground_temperature` Args: value (float):
value for ID... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_may_average_ground_temperature`'.format(value))
self._depth_may_av... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_june_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_june_average_ground_temperature` Args: value (float):
value for ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_june_average_ground_temperature`'.format(value))
self._depth_june_... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_july_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_july_average_ground_temperature` Args: value (float):
value for ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_july_average_ground_temperature`'.format(value))
self._depth_july_... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_august_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_august_average_ground_temperature` Args: value (float):
value ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_august_average_ground_temperature`'.format(value))
self._depth_aug... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_september_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_september_average_ground_temperature` Args: value (float):
... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_september_average_ground_temperature`'.format(value))
self._depth_... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_october_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_october_average_ground_temperature` Args: value (float):
valu... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_october_average_ground_temperature`'.format(value))
self._depth_oc... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_november_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_november_average_ground_temperature` Args: value (float):
va... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_november_average_ground_temperature`'.format(value))
self._depth_n... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def depth_december_average_ground_temperature(self, value=None):
"""Corresponds to IDD Field `depth_december_average_ground_temperature` Args: value (float):
va... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `depth_december_average_ground_temperature`'.format(value))
self._depth_d... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def holiday_name(self, value=None):
"""Corresponds to IDD Field `holiday_name` Args: value (str):
value for IDD Field `holiday_name` if `value` is None it will ... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError('value {} need to be of type str '
'for field `holiday_name`'.format(value))
if ',' in value:
raise ValueError('... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def holiday_day(self, value=None):
"""Corresponds to IDD Field `holiday_day` Args: value (str):
value for IDD Field `holiday_day` if `value` is None it will not... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError('value {} need to be of type str '
'for field `holiday_day`'.format(value))
if ',' in value:
raise ValueError('v... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def daylight_saving_start_day(self, value=None):
"""Corresponds to IDD Field `daylight_saving_start_day` Args: value (str):
value for IDD Field `daylight_saving... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `daylight_saving_start_day`'.format(value))
if ',' in value:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def daylight_saving_end_day(self, value=None):
"""Corresponds to IDD Field `daylight_saving_end_day` Args: value (str):
value for IDD Field `daylight_saving_end... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `daylight_saving_end_day`'.format(value))
if ',' in value:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def comments_1(self, value=None):
"""Corresponds to IDD Field `comments_1` Args: value (str):
value for IDD Field `comments_1` if `value` is None it will not be... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError('value {} need to be of type str '
'for field `comments_1`'.format(value))
if ',' in value:
raise ValueError('va... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def comments_2(self, value=None):
"""Corresponds to IDD Field `comments_2` Args: value (str):
value for IDD Field `comments_2` if `value` is None it will not be... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError('value {} need to be of type str '
'for field `comments_2`'.format(value))
if ',' in value:
raise ValueError('va... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def number_of_records_per_hour(self, value=None):
"""Corresponds to IDD Field `number_of_records_per_hour` Args: value (int):
value for IDD Field `number_of_rec... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError(
'value {} need to be of type int '
'for field `number_of_records_per_hour`'.format(value))
self._number_of_records_per_hour... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def data_period_name_or_description(self, value=None):
"""Corresponds to IDD Field `data_period_name_or_description` Args: value (str):
value for IDD Field `dat... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `data_period_name_or_description`'.format(value))
if ',' in value:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def data_period_start_day_of_week(self, value=None):
"""Corresponds to IDD Field `data_period_start_day_of_week` Args: value (str):
value for IDD Field `data_pe... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `data_period_start_day_of_week`'.format(value))
if ',' in value:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def data_period_start_day(self, value=None):
"""Corresponds to IDD Field `data_period_start_day` Args: value (str):
value for IDD Field `data_period_start_day` ... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `data_period_start_day`'.format(value))
if ',' in value:
r... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def data_period_end_day(self, value=None):
"""Corresponds to IDD Field `data_period_end_day` Args: value (str):
value for IDD Field `data_period_end_day` if `va... |
if value is not None:
try:
value = str(value)
except ValueError:
raise ValueError(
'value {} need to be of type str '
'for field `data_period_end_day`'.format(value))
if ',' in value:
rai... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def year(self, value=None):
"""Corresponds to IDD Field `year` Args: value (int):
value for IDD Field `year` if `value` is None it will not be checked against t... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError('value {} need to be of type int '
'for field `year`'.format(value))
self._year = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def month(self, value=None):
"""Corresponds to IDD Field `month` Args: value (int):
value for IDD Field `month` value >= 1 value <= 12 if `value` is None it wil... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError('value {} need to be of type int '
'for field `month`'.format(value))
if value < 1:
raise ValueError('value need... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def day(self, value=None):
"""Corresponds to IDD Field `day` Args: value (int):
value for IDD Field `day` value >= 1 value <= 31 if `value` is None it will not ... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError('value {} need to be of type int '
'for field `day`'.format(value))
if value < 1:
raise ValueError('value need t... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def hour(self, value=None):
"""Corresponds to IDD Field `hour` Args: value (int):
value for IDD Field `hour` value >= 1 value <= 24 if `value` is None it will n... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError('value {} need to be of type int '
'for field `hour`'.format(value))
if value < 1:
raise ValueError('value need ... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def minute(self, value=None):
"""Corresponds to IDD Field `minute` Args: value (int):
value for IDD Field `minute` value >= 0 value <= 60 if `value` is None it ... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError('value {} need to be of type int '
'for field `minute`'.format(value))
if value < 0:
raise ValueError('value nee... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dry_bulb_temperature(self, value=99.9):
"""Corresponds to IDD Field `dry_bulb_temperature` Args: value (float):
value for IDD Field `dry_bulb_temperature` U... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `dry_bulb_temperature`'.format(value))
if value <= -70.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def dew_point_temperature(self, value=99.9):
"""Corresponds to IDD Field `dew_point_temperature` Args: value (float):
value for IDD Field `dew_point_temperature... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `dew_point_temperature`'.format(value))
if value <= -70.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def relative_humidity(self, value=999):
"""Corresponds to IDD Field `relative_humidity` Args: value (int):
value for IDD Field `relative_humidity` value >= 0 va... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError('value {} need to be of type int '
'for field `relative_humidity`'.format(value))
if value < 0:
raise ValueError... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def atmospheric_station_pressure(self, value=999999):
"""Corresponds to IDD Field `atmospheric_station_pressure` Args: value (int):
value for IDD Field `atmosph... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError(
'value {} need to be of type int '
'for field `atmospheric_station_pressure`'.format(value))
if value <= 31000:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def extraterrestrial_horizontal_radiation(self, value=9999.0):
"""Corresponds to IDD Field `extraterrestrial_horizontal_radiation` Args: value (float):
value fo... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `extraterrestrial_horizontal_radiation`'.format(value))
if value < 0.0... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def extraterrestrial_direct_normal_radiation(self, value=9999.0):
"""Corresponds to IDD Field `extraterrestrial_direct_normal_radiation` Args: value (float):
va... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `extraterrestrial_direct_normal_radiation`'.format(value))
if value < ... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def horizontal_infrared_radiation_intensity(self, value=9999.0):
"""Corresponds to IDD Field `horizontal_infrared_radiation_intensity` Args: value (float):
valu... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `horizontal_infrared_radiation_intensity`'.format(value))
if value < 0... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def global_horizontal_radiation(self, value=9999.0):
"""Corresponds to IDD Field `global_horizontal_radiation` Args: value (float):
value for IDD Field `global_... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `global_horizontal_radiation`'.format(value))
if value < 0.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def direct_normal_radiation(self, value=9999.0):
"""Corresponds to IDD Field `direct_normal_radiation` Args: value (float):
value for IDD Field `direct_normal_r... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `direct_normal_radiation`'.format(value))
if value < 0.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def diffuse_horizontal_radiation(self, value=9999.0):
"""Corresponds to IDD Field `diffuse_horizontal_radiation` Args: value (float):
value for IDD Field `diffu... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `diffuse_horizontal_radiation`'.format(value))
if value < 0.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def global_horizontal_illuminance(self, value=999999.0):
""" Corresponds to IDD Field `global_horizontal_illuminance` will be missing if >= 999900 Args: value (f... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `global_horizontal_illuminance`'.format(value))
if value < 0.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def direct_normal_illuminance(self, value=999999.0):
""" Corresponds to IDD Field `direct_normal_illuminance` will be missing if >= 999900 Args: value (float):
... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `direct_normal_illuminance`'.format(value))
if value < 0.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def diffuse_horizontal_illuminance(self, value=999999.0):
""" Corresponds to IDD Field `diffuse_horizontal_illuminance` will be missing if >= 999900 Args: value ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `diffuse_horizontal_illuminance`'.format(value))
if value < 0.0:
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def zenith_luminance(self, value=9999.0):
""" Corresponds to IDD Field `zenith_luminance` will be missing if >= 9999 Args: value (float):
value for IDD Field `z... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `zenith_luminance`'.format(value))
if value < 0.0:
raise Value... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def wind_direction(self, value=999.0):
"""Corresponds to IDD Field `wind_direction` Args: value (float):
value for IDD Field `wind_direction` Unit: degrees valu... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `wind_direction`'.format(value))
if value < 0.0:
raise ValueEr... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def wind_speed(self, value=999.0):
"""Corresponds to IDD Field `wind_speed` Args: value (float):
value for IDD Field `wind_speed` Unit: m/s value >= 0.0 value <... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `wind_speed`'.format(value))
if value < 0.0:
raise ValueError(... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def present_weather_codes(self, value=None):
"""Corresponds to IDD Field `present_weather_codes` Args: value (int):
value for IDD Field `present_weather_codes` ... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError(
'value {} need to be of type int '
'for field `present_weather_codes`'.format(value))
self._present_weather_codes = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def precipitable_water(self, value=999.0):
"""Corresponds to IDD Field `precipitable_water` Args: value (float):
value for IDD Field `precipitable_water` Unit: ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `precipitable_water`'.format(value))
self._precipitable_water = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def aerosol_optical_depth(self, value=0.999):
"""Corresponds to IDD Field `aerosol_optical_depth` Args: value (float):
value for IDD Field `aerosol_optical_dept... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `aerosol_optical_depth`'.format(value))
self._aerosol_optical_depth = val... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def snow_depth(self, value=999.0):
"""Corresponds to IDD Field `snow_depth` Args: value (float):
value for IDD Field `snow_depth` Unit: cm Missing value: 999.0 ... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `snow_depth`'.format(value))
self._snow_depth = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def days_since_last_snowfall(self, value=99):
"""Corresponds to IDD Field `days_since_last_snowfall` Args: value (int):
value for IDD Field `days_since_last_sno... |
if value is not None:
try:
value = int(value)
except ValueError:
raise ValueError(
'value {} need to be of type int '
'for field `days_since_last_snowfall`'.format(value))
self._days_since_last_snowfall = v... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def albedo(self, value=999.0):
"""Corresponds to IDD Field `albedo` Args: value (float):
value for IDD Field `albedo` Missing value: 999.0 if `value` is None it... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError('value {} need to be of type float '
'for field `albedo`'.format(value))
self._albedo = value |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def liquid_precipitation_depth(self, value=999.0):
"""Corresponds to IDD Field `liquid_precipitation_depth` Args: value (float):
value for IDD Field `liquid_pre... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `liquid_precipitation_depth`'.format(value))
self._liquid_precipitation_d... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def liquid_precipitation_quantity(self, value=99.0):
"""Corresponds to IDD Field `liquid_precipitation_quantity` Args: value (float):
value for IDD Field `liqui... |
if value is not None:
try:
value = float(value)
except ValueError:
raise ValueError(
'value {} need to be of type float '
'for field `liquid_precipitation_quantity`'.format(value))
self._liquid_precipitatio... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def add_weatherdata(self, data):
"""Appends weather data. Args: data (WeatherData):
weather data object """ |
if not isinstance(data, WeatherData):
raise ValueError('Weather data need to be of type WeatherData')
self._data["WEATHER DATA"].append(data) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def _create_datadict(cls, internal_name):
"""Creates an object depending on `internal_name` Args: internal_name (str):
IDD name Raises: ValueError: if `internal... |
if internal_name == "LOCATION":
return Location()
if internal_name == "DESIGN CONDITIONS":
return DesignConditions()
if internal_name == "TYPICAL/EXTREME PERIODS":
return TypicalOrExtremePeriods()
if internal_name == "GROUND TEMPERATURES":
... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def read(self, path):
"""Read EPW weather data from path. Args: path (str):
path to read weather data from """ |
with open(path, "r") as f:
for line in f:
line = line.strip()
match_obj_name = re.search(r"^([A-Z][A-Z/ \d]+),", line)
if match_obj_name is not None:
internal_name = match_obj_name.group(1)
if internal_name in s... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def display_plots(filebase, directory=None, width=700, height=500, **kwargs):
"""Display a series of plots controlled by sliders. The function relies on Python s... |
def show_figure(filebase, directory, **kwargs):
"""Helper function to load in the relevant plot for display."""
filename = filebase.format(**kwargs)
if directory is not None:
filename = directory + '/' + filename
display(HTML("<img src='{filename}'>".format(filename=file... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def answer(part, module='mlai2014.json'):
"""Returns the answers to the lab classes.""" |
marks = json.load(open(os.path.join(data_directory, module), 'rb'))
return marks['Lab ' + str(part+1)] |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def latex(self):
"""Gives a latex representation of the assessment.""" |
output = self.latex_preamble
output += self._repr_latex_()
output += self.latex_post
return output |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def html(self):
"""Gives an html representation of the assessment.""" |
output = self.html_preamble
output += self._repr_html_()
output += self.html_post
return output |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def marksheet(self):
"""Returns an pandas empty dataframe object containing rows and columns for marking. This can then be passed to a google doc that is distrib... |
columns=['Number', 'Question', 'Correct (a fraction)', 'Max Mark', 'Comments']
mark_sheet = pd.DataFrame()
for qu_number, question in enumerate(self.answers):
part_no = 0
for number, part in enumerate(question):
if number>0:
if part[2... |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def total_marks(self):
"""Compute the total mark for the assessment.""" |
total = 0
for answer in self.answers:
for number, part in enumerate(answer):
if number>0:
if part[2]>0:
total+=part[2]
return total |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
| def permute(num):
"Permutation for randomizing data order."
if permute_data:
return np.random.permutation(num)
else:
logging.warning("Warning not permuting data")
return np.arange(num) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.