From c0944ae5e3ffb233e1aacd0a79e2817280319d6e Mon Sep 17 00:00:00 2001 From: Jeremiah Hansen <53843050+sfc-gh-jhansen@users.noreply.github.com> Date: Fri, 8 Sep 2023 02:56:01 +0000 Subject: [PATCH] first commit from codespaces --- steps/05_fahrenheit_to_celsius_udf/app.py | 3 ++- steps/05_fahrenheit_to_celsius_udf/requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/steps/05_fahrenheit_to_celsius_udf/app.py b/steps/05_fahrenheit_to_celsius_udf/app.py index e52520c..a42cf9a 100644 --- a/steps/05_fahrenheit_to_celsius_udf/app.py +++ b/steps/05_fahrenheit_to_celsius_udf/app.py @@ -10,9 +10,10 @@ # SNOWFLAKE ADVANTAGE: SnowCLI (PuPr) import sys +from scipy.constants import convert_temperature def main(temp_f: float) -> float: - return (float(temp_f) - 32) * (5/9) + return convert_temperature(float(temp_f), 'F', 'C') # For local debugging diff --git a/steps/05_fahrenheit_to_celsius_udf/requirements.txt b/steps/05_fahrenheit_to_celsius_udf/requirements.txt index e69de29..9a635b9 100644 --- a/steps/05_fahrenheit_to_celsius_udf/requirements.txt +++ b/steps/05_fahrenheit_to_celsius_udf/requirements.txt @@ -0,0 +1 @@ +scipy