idx int64 0 63k | question stringlengths 61 4.03k | target stringlengths 6 1.23k |
|---|---|---|
2,500 | 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 ' 'for field `dp004`' . format ( value ) ) self . _dp004 = value | Corresponds to IDD Field dp004 Dew - point temperature corresponding to 0 . 4% annual cumulative frequency of occurrence |
2,501 | 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 ' 'for field `hr_dp004`' . format ( value ) ) self . _hr_dp004 = value | Corresponds to IDD Field hr_dp004 humidity ratio corresponding to Dew - point temperature corresponding to 0 . 4% annual cumulative frequency of occurrence |
2,502 | def db_dp004 ( self , value = None ) : 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 | Corresponds to IDD Field db_dp004 mean coincident dry - bulb temperature to Dew - point temperature corresponding to 0 . 4% annual cumulative frequency of occurrence |
2,503 | def dp010 ( self , value = None ) : 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 | Corresponds to IDD Field dp010 Dew - point temperature corresponding to 1 . 0% annual cumulative frequency of occurrence |
2,504 | def hr_dp010 ( self , value = None ) : 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 | Corresponds to IDD Field hr_dp010 humidity ratio corresponding to Dew - point temperature corresponding to 1 . 0 % annual cumulative frequency of occurrence calculated at the standard atmospheric pressure at elevation of station |
2,505 | def db_dp010 ( self , value = None ) : 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 | Corresponds to IDD Field db_dp010 mean coincident dry - bulb temperature to Dew - point temperature corresponding to 1 . 0% annual cumulative frequency of occurrence |
2,506 | def dp020 ( self , value = None ) : 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 | Corresponds to IDD Field dp020 Dew - point temperature corresponding to 2 . 0% annual cumulative frequency of occurrence |
2,507 | def hr_dp020 ( self , value = None ) : 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 | Corresponds to IDD Field hr_dp020 humidity ratio corresponding to Dew - point temperature corresponding to 2 . 0% annual cumulative frequency of occurrence calculated at the standard atmospheric pressure at elevation of station |
2,508 | def db_dp020 ( self , value = None ) : 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 | Corresponds to IDD Field db_dp020 mean coincident dry - bulb temperature to Dew - point temperature corresponding to 2 . 0% annual cumulative frequency of occurrence |
2,509 | def en004 ( self , value = None ) : 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 | Corresponds to IDD Field en004 mean coincident dry - bulb temperature to Enthalpy corresponding to 0 . 4% annual cumulative frequency of occurrence |
2,510 | def db_en004 ( self , value = None ) : 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 | Corresponds to IDD Field db_en004 mean coincident dry - bulb temperature to Enthalpy corresponding to 0 . 4% annual cumulative frequency of occurrence |
2,511 | def en010 ( self , value = None ) : 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 | Corresponds to IDD Field en010 mean coincident dry - bulb temperature to Enthalpy corresponding to 1 . 0% annual cumulative frequency of occurrence |
2,512 | def db_en010 ( self , value = None ) : 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 | Corresponds to IDD Field db_en010 mean coincident dry - bulb temperature to Enthalpy corresponding to 1 . 0% annual cumulative frequency of occurrence |
2,513 | def en020 ( self , value = None ) : 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 | Corresponds to IDD Field en020 mean coincident dry - bulb temperature to Enthalpy corresponding to 2 . 0% annual cumulative frequency of occurrence |
2,514 | def db_en020 ( self , value = None ) : 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 | Corresponds to IDD Field db_en020 mean coincident dry - bulb temperature to Enthalpy corresponding to 2 . 0% annual cumulative frequency of occurrence |
2,515 | def design_stat_extremes ( self , value = "Extremes" ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `design_stat_extremes`' ) vals = set ( ) vals . add ( "Extremes" ) if value not in vals : raise ValueError ( 'value {} is not an accepted value for ' 'field `design_stat_extremes`' . format ( value ) ) self . _design_stat_extremes = value | Corresponds to IDD Field design_stat_extremes |
2,516 | def ws010 ( self , value = None ) : 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 | Corresponds to IDD Field ws010 Wind speed corresponding to 1 . 0% annual cumulative frequency of occurrence |
2,517 | def ws025 ( self , value = None ) : 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 | Corresponds to IDD Field ws025 Wind speed corresponding to 2 . 5% annual cumulative frequency of occurrence |
2,518 | def ws050 ( self , value = None ) : 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 | Corresponds to IDD Field ws050 Wind speed corresponding 5 . 0% annual cumulative frequency of occurrence |
2,519 | def wbmax ( self , value = None ) : 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 | Corresponds to IDD Field wbmax Extreme maximum wet - bulb temperature |
2,520 | def dbmin_mean ( self , value = None ) : 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 | Corresponds to IDD Field dbmin_mean Mean of extreme annual minimum dry - bulb temperature |
2,521 | def dbmax_mean ( self , value = None ) : 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 | Corresponds to IDD Field dbmax_mean Mean of extreme annual maximum dry - bulb temperature |
2,522 | def dbmin_stddev ( self , value = None ) : 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 | Corresponds to IDD Field dbmin_stddev Standard deviation of extreme annual minimum dry - bulb temperature |
2,523 | def dbmax_stddev ( self , value = None ) : 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 | Corresponds to IDD Field dbmax_stddev Standard deviation of extreme annual maximum dry - bulb temperature |
2,524 | def dbmin05years ( self , value = None ) : 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 | Corresponds to IDD Field dbmin05years 5 - year return period values for minimum extreme dry - bulb temperature |
2,525 | def dbmax05years ( self , value = None ) : 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 | Corresponds to IDD Field dbmax05years 5 - year return period values for maximum extreme dry - bulb temperature |
2,526 | def dbmin10years ( self , value = None ) : 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 | Corresponds to IDD Field dbmin10years 10 - year return period values for minimum extreme dry - bulb temperature |
2,527 | def dbmax10years ( self , value = None ) : 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 | Corresponds to IDD Field dbmax10years 10 - year return period values for maximum extreme dry - bulb temperature |
2,528 | def dbmin20years ( self , value = None ) : 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 | Corresponds to IDD Field dbmin20years 20 - year return period values for minimum extreme dry - bulb temperature |
2,529 | def dbmax20years ( self , value = None ) : 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 | Corresponds to IDD Field dbmax20years 20 - year return period values for maximum extreme dry - bulb temperature |
2,530 | def dbmin50years ( self , value = None ) : 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 | Corresponds to IDD Field dbmin50years 50 - year return period values for minimum extreme dry - bulb temperature |
2,531 | def dbmax50years ( self , value = None ) : 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 | Corresponds to IDD Field dbmax50years 50 - year return period values for maximum extreme dry - bulb temperature |
2,532 | def typical_or_extreme_period_name ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `typical_or_extreme_period_name`' ) self . _typical_or_extreme_period_name = value | Corresponds to IDD Field typical_or_extreme_period_name |
2,533 | def typical_or_extreme_period_type ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `typical_or_extreme_period_type`' ) self . _typical_or_extreme_period_type = value | Corresponds to IDD Field typical_or_extreme_period_type |
2,534 | def period_start_day ( self , value = None ) : 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 ValueError ( 'value should not contain a comma ' 'for field `period_start_day`' ) self . _period_start_day = value | Corresponds to IDD Field period_start_day |
2,535 | def period_end_day ( self , value = None ) : 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 ( 'value should not contain a comma ' 'for field `period_end_day`' ) self . _period_end_day = value | Corresponds to IDD Field period_end_day |
2,536 | def ground_temperature_depth ( self , value = None ) : 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 = value | Corresponds to IDD Field ground_temperature_depth |
2,537 | def depth_soil_conductivity ( self , value = None ) : 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 = value | Corresponds to IDD Field depth_soil_conductivity |
2,538 | def depth_soil_density ( self , value = None ) : 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 | Corresponds to IDD Field depth_soil_density |
2,539 | def depth_soil_specific_heat ( self , value = None ) : 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 = value | Corresponds to IDD Field depth_soil_specific_heat |
2,540 | def depth_january_average_ground_temperature ( self , value = None ) : 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_january_average_ground_temperature = value | Corresponds to IDD Field depth_january_average_ground_temperature |
2,541 | def depth_february_average_ground_temperature ( self , value = None ) : 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_february_average_ground_temperature = value | Corresponds to IDD Field depth_february_average_ground_temperature |
2,542 | def depth_march_average_ground_temperature ( self , value = None ) : 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_march_average_ground_temperature = value | Corresponds to IDD Field depth_march_average_ground_temperature |
2,543 | def depth_april_average_ground_temperature ( self , value = None ) : 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_april_average_ground_temperature = value | Corresponds to IDD Field depth_april_average_ground_temperature |
2,544 | def depth_may_average_ground_temperature ( self , value = None ) : 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_average_ground_temperature = value | Corresponds to IDD Field depth_may_average_ground_temperature |
2,545 | def depth_june_average_ground_temperature ( self , value = None ) : 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_average_ground_temperature = value | Corresponds to IDD Field depth_june_average_ground_temperature |
2,546 | def depth_july_average_ground_temperature ( self , value = None ) : 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_average_ground_temperature = value | Corresponds to IDD Field depth_july_average_ground_temperature |
2,547 | def depth_august_average_ground_temperature ( self , value = None ) : 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_august_average_ground_temperature = value | Corresponds to IDD Field depth_august_average_ground_temperature |
2,548 | def depth_september_average_ground_temperature ( self , value = None ) : 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_september_average_ground_temperature = value | Corresponds to IDD Field depth_september_average_ground_temperature |
2,549 | def depth_october_average_ground_temperature ( self , value = None ) : 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_october_average_ground_temperature = value | Corresponds to IDD Field depth_october_average_ground_temperature |
2,550 | def depth_november_average_ground_temperature ( self , value = None ) : 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_november_average_ground_temperature = value | Corresponds to IDD Field depth_november_average_ground_temperature |
2,551 | def depth_december_average_ground_temperature ( self , value = None ) : 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_december_average_ground_temperature = value | Corresponds to IDD Field depth_december_average_ground_temperature |
2,552 | def holiday_name ( self , value = None ) : 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 ( 'value should not contain a comma ' 'for field `holiday_name`' ) self . _holiday_name = value | Corresponds to IDD Field holiday_name |
2,553 | def holiday_day ( self , value = None ) : 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 ( 'value should not contain a comma ' 'for field `holiday_day`' ) self . _holiday_day = value | Corresponds to IDD Field holiday_day |
2,554 | def daylight_saving_start_day ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `daylight_saving_start_day`' ) self . _daylight_saving_start_day = value | Corresponds to IDD Field daylight_saving_start_day |
2,555 | def daylight_saving_end_day ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `daylight_saving_end_day`' ) self . _daylight_saving_end_day = value | Corresponds to IDD Field daylight_saving_end_day |
2,556 | def comments_1 ( self , value = None ) : 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 ( 'value should not contain a comma ' 'for field `comments_1`' ) self . _comments_1 = value | Corresponds to IDD Field comments_1 |
2,557 | def comments_2 ( self , value = None ) : 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 ( 'value should not contain a comma ' 'for field `comments_2`' ) self . _comments_2 = value | Corresponds to IDD Field comments_2 |
2,558 | def number_of_records_per_hour ( self , value = None ) : 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 = value | Corresponds to IDD Field number_of_records_per_hour |
2,559 | def data_period_name_or_description ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `data_period_name_or_description`' ) self . _data_period_name_or_description = value | Corresponds to IDD Field data_period_name_or_description |
2,560 | def data_period_start_day_of_week ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `data_period_start_day_of_week`' ) vals = set ( ) vals . add ( "Sunday" ) vals . add ( "Monday" ) vals . add ( "Tuesday" ) vals . add ( "Wednesday" ) vals . add ( "Thursday" ) vals . add ( "Friday" ) vals . add ( "Saturday" ) if value not in vals : raise ValueError ( 'value {} is not an accepted value for ' 'field `data_period_start_day_of_week`' . format ( value ) ) self . _data_period_start_day_of_week = value | Corresponds to IDD Field data_period_start_day_of_week |
2,561 | def data_period_start_day ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `data_period_start_day`' ) self . _data_period_start_day = value | Corresponds to IDD Field data_period_start_day |
2,562 | def data_period_end_day ( self , value = None ) : 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 : raise ValueError ( 'value should not contain a comma ' 'for field `data_period_end_day`' ) self . _data_period_end_day = value | Corresponds to IDD Field data_period_end_day |
2,563 | def year ( self , value = None ) : 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 | Corresponds to IDD Field year |
2,564 | def month ( self , value = None ) : 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 to be greater or equal 1 ' 'for field `month`' ) if value > 12 : raise ValueError ( 'value need to be smaller 12 ' 'for field `month`' ) self . _month = value | Corresponds to IDD Field month |
2,565 | def day ( self , value = None ) : 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 to be greater or equal 1 ' 'for field `day`' ) if value > 31 : raise ValueError ( 'value need to be smaller 31 ' 'for field `day`' ) self . _day = value | Corresponds to IDD Field day |
2,566 | def hour ( self , value = None ) : 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 to be greater or equal 1 ' 'for field `hour`' ) if value > 24 : raise ValueError ( 'value need to be smaller 24 ' 'for field `hour`' ) self . _hour = value | Corresponds to IDD Field hour |
2,567 | def minute ( self , value = None ) : 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 need to be greater or equal 0 ' 'for field `minute`' ) if value > 60 : raise ValueError ( 'value need to be smaller 60 ' 'for field `minute`' ) self . _minute = value | Corresponds to IDD Field minute |
2,568 | def dry_bulb_temperature ( self , value = 99.9 ) : 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 : raise ValueError ( 'value need to be greater -70.0 ' 'for field `dry_bulb_temperature`' ) if value >= 70.0 : raise ValueError ( 'value need to be smaller 70.0 ' 'for field `dry_bulb_temperature`' ) self . _dry_bulb_temperature = value | Corresponds to IDD Field dry_bulb_temperature |
2,569 | def dew_point_temperature ( self , value = 99.9 ) : 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 : raise ValueError ( 'value need to be greater -70.0 ' 'for field `dew_point_temperature`' ) if value >= 70.0 : raise ValueError ( 'value need to be smaller 70.0 ' 'for field `dew_point_temperature`' ) self . _dew_point_temperature = value | Corresponds to IDD Field dew_point_temperature |
2,570 | def relative_humidity ( self , value = 999 ) : 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 ( 'value need to be greater or equal 0 ' 'for field `relative_humidity`' ) if value > 110 : raise ValueError ( 'value need to be smaller 110 ' 'for field `relative_humidity`' ) self . _relative_humidity = value | Corresponds to IDD Field relative_humidity |
2,571 | def atmospheric_station_pressure ( self , value = 999999 ) : 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 : raise ValueError ( 'value need to be greater 31000 ' 'for field `atmospheric_station_pressure`' ) if value >= 120000 : raise ValueError ( 'value need to be smaller 120000 ' 'for field `atmospheric_station_pressure`' ) self . _atmospheric_station_pressure = value | Corresponds to IDD Field atmospheric_station_pressure |
2,572 | def extraterrestrial_horizontal_radiation ( self , value = 9999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `extraterrestrial_horizontal_radiation`' ) self . _extraterrestrial_horizontal_radiation = value | Corresponds to IDD Field extraterrestrial_horizontal_radiation |
2,573 | def extraterrestrial_direct_normal_radiation ( self , value = 9999.0 ) : 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 < 0.0 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `extraterrestrial_direct_normal_radiation`' ) self . _extraterrestrial_direct_normal_radiation = value | Corresponds to IDD Field extraterrestrial_direct_normal_radiation |
2,574 | def horizontal_infrared_radiation_intensity ( self , value = 9999.0 ) : 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.0 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `horizontal_infrared_radiation_intensity`' ) self . _horizontal_infrared_radiation_intensity = value | Corresponds to IDD Field horizontal_infrared_radiation_intensity |
2,575 | def global_horizontal_radiation ( self , value = 9999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `global_horizontal_radiation`' ) self . _global_horizontal_radiation = value | Corresponds to IDD Field global_horizontal_radiation |
2,576 | def direct_normal_radiation ( self , value = 9999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `direct_normal_radiation`' ) self . _direct_normal_radiation = value | Corresponds to IDD Field direct_normal_radiation |
2,577 | def diffuse_horizontal_radiation ( self , value = 9999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `diffuse_horizontal_radiation`' ) self . _diffuse_horizontal_radiation = value | Corresponds to IDD Field diffuse_horizontal_radiation |
2,578 | def global_horizontal_illuminance ( self , value = 999999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `global_horizontal_illuminance`' ) self . _global_horizontal_illuminance = value | Corresponds to IDD Field global_horizontal_illuminance will be missing if > = 999900 |
2,579 | def direct_normal_illuminance ( self , value = 999999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `direct_normal_illuminance`' ) self . _direct_normal_illuminance = value | Corresponds to IDD Field direct_normal_illuminance will be missing if > = 999900 |
2,580 | def diffuse_horizontal_illuminance ( self , value = 999999.0 ) : 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 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `diffuse_horizontal_illuminance`' ) self . _diffuse_horizontal_illuminance = value | Corresponds to IDD Field diffuse_horizontal_illuminance will be missing if > = 999900 |
2,581 | def zenith_luminance ( self , value = 9999.0 ) : 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 ValueError ( 'value need to be greater or equal 0.0 ' 'for field `zenith_luminance`' ) self . _zenith_luminance = value | Corresponds to IDD Field zenith_luminance will be missing if > = 9999 |
2,582 | def wind_direction ( self , 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 `wind_direction`' . format ( value ) ) if value < 0.0 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `wind_direction`' ) if value > 360.0 : raise ValueError ( 'value need to be smaller 360.0 ' 'for field `wind_direction`' ) self . _wind_direction = value | Corresponds to IDD Field wind_direction |
2,583 | def wind_speed ( self , 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 `wind_speed`' . format ( value ) ) if value < 0.0 : raise ValueError ( 'value need to be greater or equal 0.0 ' 'for field `wind_speed`' ) if value > 40.0 : raise ValueError ( 'value need to be smaller 40.0 ' 'for field `wind_speed`' ) self . _wind_speed = value | Corresponds to IDD Field wind_speed |
2,584 | def present_weather_codes ( self , value = None ) : 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 | Corresponds to IDD Field present_weather_codes |
2,585 | def precipitable_water ( self , 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 `precipitable_water`' . format ( value ) ) self . _precipitable_water = value | Corresponds to IDD Field precipitable_water |
2,586 | def aerosol_optical_depth ( self , value = 0.999 ) : 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 = value | Corresponds to IDD Field aerosol_optical_depth |
2,587 | def snow_depth ( self , 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 | Corresponds to IDD Field snow_depth |
2,588 | def days_since_last_snowfall ( self , value = 99 ) : 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 = value | Corresponds to IDD Field days_since_last_snowfall |
2,589 | def albedo ( self , 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 `albedo`' . format ( value ) ) self . _albedo = value | Corresponds to IDD Field albedo |
2,590 | def liquid_precipitation_depth ( self , 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 `liquid_precipitation_depth`' . format ( value ) ) self . _liquid_precipitation_depth = value | Corresponds to IDD Field liquid_precipitation_depth |
2,591 | def liquid_precipitation_quantity ( self , value = 99.0 ) : 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_precipitation_quantity = value | Corresponds to IDD Field liquid_precipitation_quantity |
2,592 | def add_weatherdata ( self , data ) : if not isinstance ( data , WeatherData ) : raise ValueError ( 'Weather data need to be of type WeatherData' ) self . _data [ "WEATHER DATA" ] . append ( data ) | Appends weather data . |
2,593 | def _create_datadict ( cls , internal_name ) : 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" : return GroundTemperatures ( ) if internal_name == "HOLIDAYS/DAYLIGHT SAVINGS" : return HolidaysOrDaylightSavings ( ) if internal_name == "COMMENTS 1" : return Comments1 ( ) if internal_name == "COMMENTS 2" : return Comments2 ( ) if internal_name == "DATA PERIODS" : return DataPeriods ( ) raise ValueError ( "No DataDictionary known for {}" . format ( internal_name ) ) | Creates an object depending on internal_name |
2,594 | def read ( self , path ) : 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 self . _data : self . _data [ internal_name ] = self . _create_datadict ( internal_name ) data_line = line [ len ( internal_name ) + 1 : ] vals = data_line . strip ( ) . split ( ',' ) self . _data [ internal_name ] . read ( vals ) else : wd = WeatherData ( ) wd . read ( line . strip ( ) . split ( ',' ) ) self . add_weatherdata ( wd ) | Read EPW weather data from path . |
2,595 | def display_plots ( filebase , directory = None , width = 700 , height = 500 , ** kwargs ) : def show_figure ( filebase , directory , ** kwargs ) : filename = filebase . format ( ** kwargs ) if directory is not None : filename = directory + '/' + filename display ( HTML ( "<img src='{filename}'>" . format ( filename = filename ) ) ) interact ( show_figure , filebase = fixed ( filebase ) , directory = fixed ( directory ) , ** kwargs ) | Display a series of plots controlled by sliders . The function relies on Python string format functionality to index through a series of plots . |
2,596 | def answer ( part , module = 'mlai2014.json' ) : marks = json . load ( open ( os . path . join ( data_directory , module ) , 'rb' ) ) return marks [ 'Lab ' + str ( part + 1 ) ] | Returns the answers to the lab classes . |
2,597 | def latex ( self ) : output = self . latex_preamble output += self . _repr_latex_ ( ) output += self . latex_post return output | Gives a latex representation of the assessment . |
2,598 | def html ( self ) : output = self . html_preamble output += self . _repr_html_ ( ) output += self . html_post return output | Gives an html representation of the assessment . |
2,599 | def marksheet ( self ) : 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 ] > 0 : part_no += 1 index = str ( qu_number + 1 ) + '_' + str ( part_no ) frame = pd . DataFrame ( columns = columns , index = [ index ] ) frame . loc [ index ] [ 'Number' ] = index frame . loc [ index ] [ 'Question' ] = part [ 0 ] frame . loc [ index ] [ 'Max Mark' ] = part [ 2 ] mark_sheet = mark_sheet . append ( frame ) return mark_sheet . sort ( columns = 'Number' ) | Returns an pandas empty dataframe object containing rows and columns for marking . This can then be passed to a google doc that is distributed to markers for editing with the mark for each section . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.