cb560e17278530c14b74b06fa3f3c718e25c9616,examples/testscript.py,,,#,16

Before Change


vname="brief"
newvideo=os.path.join(cfg["project_path"],"videos",vname+".mp4")
try: //you need ffmpeg command line interface
    subprocess.call(["ffmpeg","-i",video[0],"-ss","00:00:00","-to","00:00:00.4","-c","copy",newvideo])
except:
    //for windows:
    from moviepy.editor import VideoFileClip,VideoClip

After Change


try: //you need ffmpeg command line interface
    //subprocess.call(["ffmpeg","-i",video[0],"-ss","00:00:00","-to","00:00:00.4","-c","copy",newvideo])
    newvideo=deeplabcut.ShortenVideo(video[0],start="00:00:00",stop="00:00:00.4",outsuffix="short",outpath=os.path.join(cfg["project_path"],"videos"))
    vname=Path(newvideo).stem
except: // if ffmpeg is broken
    vname="brief"
    newvideo=os.path.join(cfg["project_path"],"videos",vname+".mp4")
    from moviepy.editor import VideoFileClip,VideoClip
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: AlexEMG/DeepLabCut
Commit Name: cb560e17278530c14b74b06fa3f3c718e25c9616
Time: 2019-09-20
Author: amathis@fas.harvard.edu
File Name: examples/testscript.py
Class Name:
Method Name:


Project Name: pytorch/benchmark
Commit Name: 5f1f52b07ff387bef8daf6ea1b378548de9ccab4
Time: 2020-09-14
Author: zdevito@fb.com
File Name: torchbenchmark/models/BERT_pytorch/__init__.py
Class Name: Model
Method Name: __init__


Project Name: NTMC-Community/MatchZoo
Commit Name: 53a93d8af5d041f6c5dfdef2fb763f8419e3023d
Time: 2019-01-19
Author: i@uduse.com
File Name: matchzoo/datasets/snli/load_data.py
Class Name:
Method Name: load_data