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 | |
tabs = st.tabs(["metrics", "plots", "reports"]) | |
tab_metrics = tabs[0] | |
with tab_metrics: | |
st.metric("Precision", 0.85, delta=0.2) | |
st.metric("Recall", 0.60, delta=-0.1) |
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 | |
tabs = st.tabs(["metrics", "plots", "reports"]) |
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 os | |
import tweepy | |
from dotenv import load_dotenv | |
load_dotenv() | |
bearer_token = os.environ["BEARER_TOKEN"] | |
class MyStreamer(tweepy.StreamingClient): | |
def on_tweet(self, tweet): |
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
extracted_pages = [] | |
for page in tweepy.Cursor(api.search_tweets, | |
"Ukraine", | |
lang="en", | |
count=50).pages(5): | |
extracted_pages.append(page) | |
extracted_tweets_from_pages = [] |
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 os | |
import tweepy | |
from dotenv import load_dotenv | |
consumer_key = os.environ["API_KEY"] | |
consumer_secret = os.environ["API_KEY_SECRET"] | |
access_token = os.environ["ACCESS_TOKEN"] | |
access_token_secret = os.environ["ACCESS_TOKEN_SECRET"] | |
auth = tweepy.OAuth1UserHandler( |
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 os | |
import tweepy | |
from dotenv import load_dotenv | |
consumer_key = os.environ["API_KEY"] | |
consumer_secret = os.environ["API_KEY_SECRET"] | |
access_token = os.environ["ACCESS_TOKEN"] | |
access_token_secret = os.environ["ACCESS_TOKEN_SECRET"] | |
auth = tweepy.OAuth1UserHandler( |
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 os | |
import tweepy | |
from dotenv import load_dotenv | |
consumer_key = os.environ["API_KEY"] | |
consumer_secret = os.environ["API_KEY_SECRET"] | |
access_token = os.environ["ACCESS_TOKEN"] | |
access_token_secret = os.environ["ACCESS_TOKEN_SECRET"] | |
auth = tweepy.OAuth1UserHandler( |
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 flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello_world(): | |
return "<p>Hello, World!</p>" | |
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 python:3.7-slim-buster | |
WORKDIR /usr/src/app | |
COPY requirements.txt ./ | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . |
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 random | |
import numpy as np | |
import torch | |
random.seed(seed) | |
torch.manual_seed(0) | |
np.random.seed(0) | |
torch.backends.cudnn.deterministic = True | |
torch.backends.cudnn.benchmark = False |