-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
73 lines (56 loc) · 3.15 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from datetime import datetime
from enum import Enum
import pandas as pd
# Status class for showing what the watcher is currently doing
class WatcherStatus(Enum):
COLLECTING_PEOPLE = 0
COLLECTING_TWEETS = 1
CATCHING_UP_KEYWORDS = 2
CATCHING_UP_PEOPLE = 3
WAITING_FOR_RATE_LIMIT = 4
CALCULATING_BOT_AVERAGES = 5
COLLECTION_FINISHED = 6
status = 0
# Timestep class for figuring out how much the watcher should collect in one go
class TimeSteps(Enum):
NO_STEPS = 0
MONTHS = 1
WEEKS = 2
DAYS = 3
start_date = datetime(2022, 2, 21)
end_date = datetime(2023, 1, 16)
time_step_size = TimeSteps.NO_STEPS
using_bearer_from_file = False
bearer = "" # TODO: Maybe have the User be able to put this into a file somewhere, otherwise just put the option into the server
do_sentiment_analysis = False # TODO: Set to True
do_bot_detection = True
collection_running = False
stop_collection = False
#TODO: Save these as well?
removed_people = None #pd.DataFrame({"Name": ["Mai Mercado","Pia Olsen Dyhr"], "WikidataID": ["Q12325752","Q531614"], "TwitterHandle": ["_MaiMercado","PiaOlsen"]})
added_people = None #pd.DataFrame({"Name": ["Miloš Zeman"], "WikidataID": ["Q29032"], "TwitterHandle": ["MZemanOficialni"]})
added_filters = None #{"emojis": ["🇩🇰"], "keywords": ["Leopard"], "hashtags": [], "handles": ["general_pavel"]}
removed_filters = None #{"emojis": ["🇩🇰"], "keywords": ["Leopard"], "hashtags": [], "handles": ["general_pavel"]}
catch_up_date = datetime(2022, 10, 16)
db_connection = None
db_process = None
people = pd.DataFrame()
tweetEmojis = None #("🇺🇦,🇷🇺").split(",")
tweetWords = None \
# ("Zelenskyy,Zelensky,Zelenski,Putin,Ukrain,Ukraine,Ucrania,Ucraina,Ucraino,Ukrainian,Ukrajina,Russia,"
# "Russland,Rusland,Rusia,Russa,Russian,Rusk,Ruska,Rusko,ruso,rusa,Donetsk,Isjum,Ucraina,Kyiv,Kiev,"
# "Moscow,Kramatorsk,Krim,Crimea,Sevastopol,Bakhmut,Cherson,Kherson,Kakhovka,Mariupol,Kharkiv,Asow,Asov,"
# "Kreml,Kremlin,Western Media,Special Military,Schoigu,Lapin,Kadyrov,Surovikin,Donbass,Donetsk,Luhansk,"
# "Lugansk,Donbas,Nord Stream,Druschba,Jamal,Jagal,Dugin,Douguin,HIMARS").split(",")
tweetWordsAmbiguous = None \
# ("NATO,Missiles").split(",")
tweetHashtags = None \
# ("#RussiaTerroristState,#RussiaIsATerroristState,#UkraineRussianWar,#Ukraine,#Kyiv,#kyiv,#Russia,"
# "#Moscow,#RecoveryofUkraine,#Borodyanka,#Ivankiv,#SlavaUkraini,#SlavaUkraïni,#Kreml,#Kremlin,"
# "#ArmUkraineNow,#FreeTheLeopards,#Butscha,#RussianUkrainianWar,#UkraineRussianWar,#RussiaIsLosing,"
# "#SpecialMilitaryOperation,#Roscosmos,#Rogozin,#Putin,#Kadyrov,#Chechen,#RussianArmy,#HeroesZ,"
# "#Surovikin,#WarCriminalPutin,#UkraineWar,#Donbass,#Donbas,#Donetsk,#Lugansk,#SMO,#Moscow,"
# "#UkranianAgony,#sanctions,#NordStream,#NordStreamSabotage,#Russie,#trainingmission").split(",")
tweetHandles = None \
# ("@AndriyYermak,@ZelenskyyUa,@DefenceU,@Denys_Shmyhal,@EmbEspKyiv,@DmytroKuleba,@jensstoltenberg,"
# "@KremlinRussia_E,@KremlinRussia,@mod_russia,@MelnykAndrij,@Makeiev").split(",")