2edd1fe70a43b5b646662ef6603f579275141fae,examples/utils/tf_records_generation.py,,main,#,96
Before Change
if not op.isdir(test_dir):
makedirs(test_dir)
for tile in list(tf_train[:,1]):
tile_dir = op.join(tiles_dir, tile)
shutil.copy(tile_dir, train_dir)
After Change
column_name = ["filename", "width", "height", "class", "xmin", "ymin", "xmax", "ymax"]
df = pd.DataFrame(tf_tiles_info, columns=column_name)
//shuffle the dataframe
df = df.sample(frac=1)
train_df = df[:split_index]
test_df = df[split_index:]
print("You have {} training tiles and {} test tiles ready".format(
len(set(train_df["filename"])), len(set(test_df["filename"]))))
// train_df.to_csv("train_df.csv")
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: developmentseed/label-maker
Commit Name: 2edd1fe70a43b5b646662ef6603f579275141fae
Time: 2018-01-30
Author: geospatialanalystyi@gmail.com
File Name: examples/utils/tf_records_generation.py
Class Name:
Method Name: main
Project Name: chartbeat-labs/textacy
Commit Name: eaaf2bad32af4bda1a98d434530926bb6a001230
Time: 2019-08-23
Author: burtdewilde@gmail.com
File Name: textacy/augmentation/transformations.py
Class Name:
Method Name: insert_synonyms
Project Name: openai/gym
Commit Name: f6209d4e17c0ebc9f95771e2ccdfe5959e66e9ac
Time: 2019-06-07
Author: hartikainen@berkeley.edu
File Name: gym/envs/mujoco/mujoco_env.py
Class Name: MujocoEnv
Method Name: __init__
Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 18022693482182082f178cd73fa3a3cfdecc160a
Time: 2018-05-02
Author: ikostrikov@gmail.com
File Name: model.py
Class Name: Policy
Method Name: act