-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
61 lines (55 loc) · 1.46 KB
/
setup.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
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
from matplotlib.ticker import FuncFormatter
import seaborn as sns
import seaborn
import matplotlib.cm as cm
import requests
import json
import pandas as pd
import time
import datetime
import os
import math
import scipy.stats
from unidecode import unidecode
import sys
import glob
import re
import random
import pickle
import copy
import nltk
import itertools
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from IPython.display import Image
import collections
import warnings
warnings.filterwarnings('ignore')
from bs4 import BeautifulSoup
import wikipedia
from tqdm import tqdm
from sklearn.preprocessing import MinMaxScaler
# Similarity
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.neighbors import NearestNeighbors
# This should only be 'y' if the preprocessing.ipynb should be runned.
ChangeFolder = input("Do you want to change the folder? (y/n) ")
if ChangeFolder == "y":
# check if a folder exists
filepaths = ["G:/My Drive/Thesis/Data", "G:\Mit drev\Thesis\Data"]
try:
os.chdir(filepaths[0])
i = 0
except FileNotFoundError:
try:
os.chdir(filepaths[1])
i = 1
except:
print("No valid filepath found")
filepath = filepaths[i]
# Path to save figures in my dropbox folder
image_path = r'C:\Users\verga\Dropbox\Apps\Overleaf\Thesis\Pictures\\'