Skip to content

Instantly share code, notes, and snippets.

View michaelgorkow's full-sized avatar

Michael Gorkow michaelgorkow

View GitHub Profile
@michaelgorkow
michaelgorkow / azure_create_custom_kernel.sh
Created February 14, 2023 07:53
azure_create_custom_kernel.sh
conda create -y --name pysnowpark python=3.8
conda activate pysnowpark
conda install -y pip ipykernel
python -m ipykernel install --user --name snowpark_demo --display-name "snowpark_demo"
pip install "snowflake-snowpark-python[pandas]" azureml-mlflow
pip install git+https://github.com/Snowflake-Labs/mlflow-snowflake.git
@michaelgorkow
michaelgorkow / llm_plotting_streamlit_app.py
Created April 19, 2024 21:02
llm_driven_plotting_in_streamlit_in_snowflake.
# Make sure to add all requirements to Streamlit in Snowflake via the package selection!
# snowflake-ml-python, plotly, matplotlib, seaborn
# Import python packages
import streamlit as st
st.set_option('deprecation.showPyplotGlobalUse', False)
st.set_page_config(layout="wide")
import re
from snowflake.snowpark import functions as F
from snowflake.core import Root
from snowflake.cortex import Complete
##### CHANGE THIS TO YOUR LOCATION OF SEMANTIC VIEW #####
SEMANTIC_VIEW_DB = "HACKATHON"
SEMANTIC_VIEW_SCHEMA = "CALL_CENTER"
SEMANTIC_VIEW_NAME = "CALL_CENTER_DATA"
#########################################################
SEMANTIC_VIEW = f"{SEMANTIC_VIEW_DB}.{SEMANTIC_VIEW_SCHEMA}.{SEMANTIC_VIEW_NAME}."
"""