From 0dda95e98cec0b5eac159d6bce0566ebcfe6c370 Mon Sep 17 00:00:00 2001 From: "g.minoccari" Date: Mon, 17 May 2021 10:22:14 +0200 Subject: [PATCH] Eliminato codice inutile --- nest_backend/tweet_explorer/__main__.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/nest_backend/tweet_explorer/__main__.py b/nest_backend/tweet_explorer/__main__.py index 6fd0186..d0e9f2f 100644 --- a/nest_backend/tweet_explorer/__main__.py +++ b/nest_backend/tweet_explorer/__main__.py @@ -5,10 +5,9 @@ import nltk from nltk.corpus import stopwords - - ext.init_app(app=app) + def authenticate(): c_k = "GEhtSyP9e98mzFeiOCSW0lvQX" c_s = "438cmYrl5xqaX2W7I2Bf5A9nF1pN5VtM9f77WYQnAXg1BwKJ27" @@ -20,6 +19,7 @@ def authenticate(): api = tw.API(auth, wait_on_rate_limit=True) return api + def start_exploring(): api = authenticate() most_popular_hashtags = dict() @@ -49,7 +49,7 @@ def start_exploring(): print(dict(sorted(most_popular_words.items(), key=lambda item: item[1]))) -def search_repo_conditions(repository_id): +def search_repo_conditions(repository_id, all_or): repo = Repository.query.filter_by(id=repository_id).first() conditions = [use.condition for use in repo.uses] conditions_type = dict() @@ -64,22 +64,6 @@ def search_repo_conditions(repository_id): print(types, ":", conditions_type[types]) - - - - - - - - - - - - - if __name__ == "__main__": - search_repo_conditions() - #print(stopwords.words('italian')) with app.app_context(): ext.create_all(app=app) - #start_exploring()