This file contains 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 pandas as pd | |
import re | |
class Clean_Tweets: | |
""" | |
The PEP8 Standard AMAZING!!! | |
""" | |
def __init__(self, df: pd.DataFrame): | |
self.df = df | |
print('Clean_Tweets INSTANCE CREATED') |
This file contains 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 json | |
import pandas as pd | |
from textblob import TextBlob | |
import re | |
def read_json(json_file: str) -> list: | |
""" | |
json file reader to open and read json files into a list | |
Args: |
This file contains 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 unittest | |
import pandas as pd | |
import sys | |
import os | |
sys.path.append(os.path.abspath(os.path.join("../Twitter-Data-Analysis/"))) | |
from extract_dataframe import read_json | |
from extract_dataframe import TweetDfExtractor | |
# For unit testing the data reading and processing codes, |
This file contains 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
name: twitter-data-analysis | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read |
This file contains 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
CREATE TABLE IF NOT EXISTS `TweetInformation` | |
( | |
`id` INT NOT NULL AUTO_INCREMENT, | |
`created_at` TEXT NOT NULL, | |
`source` VARCHAR(200) NOT NULL, | |
`full_text` TEXT DEFAULT NULL, | |
`polarity` FLOAT DEFAULT NULL, | |
`subjectivity` FLOAT DEFAULT NULL, | |
`language` TEXT DEFAULT NULL, | |
`favorite_count` INT DEFAULT NULL, |
This file contains 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 pandas as pd | |
import mysql.connector as mysql | |
from mysql.connector import Error | |
def DBConnect(dbName=None): | |
""" | |
Parameters | |
---------- |
This file contains 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 numpy as np | |
import pandas as pd | |
import streamlit as st | |
import altair as alt | |
from wordcloud import WordCloud | |
import plotly.express as px | |
from textblob import TextBlob | |
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer | |
import pickle | |
from pages.plots import * |
This file contains 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 numpy as np | |
import pandas as pd | |
import streamlit as st | |
import altair as alt | |
from wordcloud import WordCloud | |
import plotly.express as px | |
from textblob import TextBlob | |
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer | |
import pickle |
This file contains 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 unittest | |
import pandas as pd | |
import sys | |
import os | |
sys.path.append(os.path.abspath(os.path.join("../Twitter-Data-Analysis/"))) | |
from extract_dataframe import read_json | |
from extract_dataframe import TweetDfExtractor | |
from clean_tweets_dataframe import Clean_Tweets |
This file contains 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
class VectorbotPipeline(): | |
def __init__(self,user_id, indicator="sma",init_cash=1000, ema_value=0,stock='AMZN', fast_ma=10, slow_ma=50, start='2021-10-11', end='2022-10-11', period=None, fees=0.005, is_experiment=False): | |
self.user_id = user_id | |
self.init_cash = init_cash | |
self.ema_value = ema_value | |
self.indicator = indicator | |
self.stock = stock | |
self.fast_ma = fast_ma | |
self.slow_ma = slow_ma | |
self.start = start |
OlderNewer