mirror of
https://github.com/pds-nest/nest.git
synced 2025-02-16 20:53:57 +00:00
Eliminato codice inutile
This commit is contained in:
parent
bdcca12de2
commit
0dda95e98c
1 changed files with 3 additions and 19 deletions
|
@ -5,10 +5,9 @@ import nltk
|
||||||
from nltk.corpus import stopwords
|
from nltk.corpus import stopwords
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ext.init_app(app=app)
|
ext.init_app(app=app)
|
||||||
|
|
||||||
|
|
||||||
def authenticate():
|
def authenticate():
|
||||||
c_k = "GEhtSyP9e98mzFeiOCSW0lvQX"
|
c_k = "GEhtSyP9e98mzFeiOCSW0lvQX"
|
||||||
c_s = "438cmYrl5xqaX2W7I2Bf5A9nF1pN5VtM9f77WYQnAXg1BwKJ27"
|
c_s = "438cmYrl5xqaX2W7I2Bf5A9nF1pN5VtM9f77WYQnAXg1BwKJ27"
|
||||||
|
@ -20,6 +19,7 @@ def authenticate():
|
||||||
api = tw.API(auth, wait_on_rate_limit=True)
|
api = tw.API(auth, wait_on_rate_limit=True)
|
||||||
return api
|
return api
|
||||||
|
|
||||||
|
|
||||||
def start_exploring():
|
def start_exploring():
|
||||||
api = authenticate()
|
api = authenticate()
|
||||||
most_popular_hashtags = dict()
|
most_popular_hashtags = dict()
|
||||||
|
@ -49,7 +49,7 @@ def start_exploring():
|
||||||
print(dict(sorted(most_popular_words.items(), key=lambda item: item[1])))
|
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()
|
repo = Repository.query.filter_by(id=repository_id).first()
|
||||||
conditions = [use.condition for use in repo.uses]
|
conditions = [use.condition for use in repo.uses]
|
||||||
conditions_type = dict()
|
conditions_type = dict()
|
||||||
|
@ -64,22 +64,6 @@ def search_repo_conditions(repository_id):
|
||||||
print(types, ":", conditions_type[types])
|
print(types, ":", conditions_type[types])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
search_repo_conditions()
|
|
||||||
#print(stopwords.words('italian'))
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
ext.create_all(app=app)
|
ext.create_all(app=app)
|
||||||
#start_exploring()
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue