b1cfbe458c0bf123591348c54973d49297fd55ab,tools/alignments/jobs.py,Rename,_rename_faces,#Rename#Any#,1013
Before Change
rename_count = 0
for src, dst in tqdm(filename_mappings, desc="Renaming Faces"):
if src == dst:
logger.debug("Skipping rename of "%s" as destination name is same as souce", src)
continue
old = os.path.join(self._faces.folder, src)
new = os.path.join(self._faces.folder, dst)
if os.path.exists(new):
// This should never happen, but is a safety measure to prevent deletion of faces
After Change
os.rename(old, new)
rename_count += 1
if conflicts:
for old in tqdm(conflicts, desc="Renaming Faces"):
new = old[:-4] // Remove .tmp extension
if os.path.exists(new):
// This should only be running on faces. If there is still a conflict
// then the user has done something stupid, so we will delete the file and
// replace. They can always re-extract :/
os.remove(new)
logger.verbose("Renaming "%s" to "%s"", old, new)
os.rename(old, new)
return rename_count
class Sort():
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: deepfakes/faceswap
Commit Name: b1cfbe458c0bf123591348c54973d49297fd55ab
Time: 2021-02-14
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/alignments/jobs.py
Class Name: Rename
Method Name: _rename_faces
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: c17c92d84ec9216b781ecfbc25c6df225e2fd4f1
Time: 2020-11-11
Author: M.N.Tran@ibm.com
File Name: art/defences/preprocessor/audio_filter_pytorch.py
Class Name: AudioFilterPyTorch
Method Name: __call__
Project Name: deepfakes/faceswap
Commit Name: 9ebc0abc8e85a2fa722aaaf75f8c8793e95ea12f
Time: 2019-12-15
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/sort.py
Class Name: Sort
Method Name: sort_face
Project Name: deepfakes/faceswap
Commit Name: 86ac59678486f4584b02dd561db826b903346e19
Time: 2021-03-18
Author: dmiszkiewicz@users.noreply.github.com
File Name: tools/sort/sort.py
Class Name: Sort
Method Name: sort_face_yaw