This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import streamlit as st | |
| import pandas as pd | |
| import seaborn as sns | |
| import matplotlib.pyplot as plt | |
| # --- 1. Page Configuration --- | |
| st.set_page_config(page_title="Titanic Dashboard", page_icon="🚢", layout="wide") | |
| # --- 2. Load Data --- | |
| @st.cache_data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from delta.tables import DeltaTable | |
| # === Variables for catalog & schema === | |
| m_catalog = "mihaly-orsos-catalog" | |
| m_schema = "data" | |
| m_table = f"{m_catalog}.{m_schema}.delta_demo" | |
| m_table_quoted = f"`{m_catalog}`.`{m_schema}`.`delta_demo`" | |
| # === 1) Create initial Delta table === | |
| data = [("a", 10), ("b", 20), ("c", 30)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import streamlit as st | |
| import pandas as pd | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import plotly.express as px | |
| import io | |
| st.set_page_config( | |
| page_title="RabbitEars Data Explorer", | |
| page_icon="📺", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import streamlit as st | |
| import pandas as pd | |
| def update_index(): | |
| st.session_state.current_index = int(df[df['Display Name'] == st.session_state.sstock].index[0]) | |
| # Sample data | |
| data = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # get channel id-s | |
| response = client.conversations_list() | |
| # Print channel names and IDs | |
| for channel in response["channels"]: | |
| print(f"Channel Name: {channel['name']}, Channel ID: {channel['id']}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| top200['DVD'] = top200['DVD'].str.replace('°', '') | |
| top200['DVD'] = pd.to_datetime(top200['DVD'], format='%B/%Y/%d', errors='coerce') | |
| top50['DVD'] = pd.to_datetime(top50['DVD'], format='%d %b %Y', errors='coerce') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('hello2') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print("hello CEU") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !pip install goldhand chart-studio | |
| from goldhand import * | |
| import chart_studio | |
| import chart_studio.plotly as py | |
| username='' | |
| api_key='' | |
| chart_studio.tools.set_credentials_file(username=username, api_key=api_key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !pip install pyTelegramBotAPI | |
| import os | |
| import telebot | |
| #BOT_TOKEN = os.environ.get('BOT_TOKEN') | |
| BOT_TOKEN = "80..." | |
| bot = telebot.TeleBot(BOT_TOKEN) |
NewerOlder