Skip to content

Commit

Permalink
FIX: ssl default
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Lacombe committed Nov 13, 2023
1 parent d7db261 commit 63d9c73
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from io import BytesIO
from typing import Any, Optional, Tuple
from urllib.request import urlopen
import ssl
from zipfile import ZipFile

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -68,6 +69,7 @@ def get_X_y() -> Tuple[NDArray, NDArray]:
zip_folder = "BlogFeedback.zip"
csv_file = "blogData_train.csv"
url = website + page + folder + zip_folder
ssl._create_default_https_context = ssl._create_unverified_context
resp = urlopen(url)
zipfile = ZipFile(BytesIO(resp.read()))
df = pd.read_csv(zipfile.open(csv_file)).to_numpy()
Expand Down

0 comments on commit 63d9c73

Please sign in to comment.