adityajain07 commited on
Commit
bf8de12
·
verified ·
1 Parent(s): 0db7cc1

Delete split_verification_list.py

Browse files
Files changed (1) hide show
  1. split_verification_list.py +0 -32
split_verification_list.py DELETED
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env python
2
- # coding: utf-8
3
-
4
- """Split the image verification list to multiple parts"""
5
-
6
- import os
7
- from pathlib import Path
8
-
9
- # System packages
10
- import pandas as pd
11
-
12
- # 3rd party packages
13
- from dotenv import load_dotenv
14
-
15
- # Load secrets and config from optional .env file
16
- load_dotenv()
17
-
18
- # Load the list
19
- img_verf_df = pd.read_csv(os.getenv("VERIFICATION_RESULTS"))
20
- img_verf_lstage_nan_df = img_verf_df[img_verf_df.lifeStage.isnull()].copy()
21
-
22
- # Slice the list
23
- num_entries = img_verf_lstage_nan_df.shape[0]
24
- half = int(num_entries / 2)
25
- img_verf_lstage_nan_p1 = img_verf_lstage_nan_df.iloc[:half, :].copy()
26
- img_verf_lstage_nan_p2 = img_verf_lstage_nan_df.iloc[half:, :].copy()
27
-
28
- # Save the scripts
29
- save_dir = os.getenv("GLOBAL_MODEL_DIR")
30
- fname = Path(os.getenv("VERIFICATION_RESULTS")).stem
31
- img_verf_lstage_nan_p1.to_csv(Path(save_dir) / str(fname + "_p1" + ".csv"), index=False)
32
- img_verf_lstage_nan_p2.to_csv(Path(save_dir) / str(fname + "_p2" + ".csv"), index=False)