November 2019
Intermediate to advanced
346 pages
9h 36m
English
In the following steps, we will read in a dataset of passwords, along with labels for their strength, and build a classifier to assess password strength. Let's get started:
import pandas as pddf = pd.read_csv( "passwordDataset.csv", dtype={"password": "str", "strength": "int"}, index_col=None)
df = df.sample(frac=1)
l = len(df.index)train_df = df.head(int(l * 0.8))test_df = df.tail(int(l * 0.2))
y_train = train_df.pop("strength").valuesy_test = test_df.pop("strength").valuesX_train = train_df.values.flatten() ...