5ca403cee17ee1e2a704e03bf06d47f2ce9ba222,examples/audio.py,,,#,33

Before Change


sine_wave = note(frequency, duration, amplitude, sampling_rate)

f = wave.open("sound.wav", "w")
f.setparams((nchannels, sampwidth, int(sampling_rate), nframes, comptype, compname))

x.text("Converting wave...")
f.writeframes(sine_wave)

After Change


    return out


avdir = os.path.expanduser("~")
audiofiles = get_audio_files_in_dir(avdir)

if len(audiofiles) == 0:
    st.write(
        "Put some audio files in your home directory (%s) to activate this player."
        % avdir
    )

else:
    filename = st.selectbox(
        "Select an audio file from your home directory (%s) to play" % avdir,
        audiofiles,
        0,
    )
    audiopath = os.path.join(avdir, filename)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: streamlit/streamlit
Commit Name: 5ca403cee17ee1e2a704e03bf06d47f2ce9ba222
Time: 2020-02-06
Author: naomi@nthmost.com
File Name: examples/audio.py
Class Name:
Method Name:


Project Name: streamlit/streamlit
Commit Name: 5ca403cee17ee1e2a704e03bf06d47f2ce9ba222
Time: 2020-02-06
Author: naomi@nthmost.com
File Name: examples/video.py
Class Name:
Method Name:


Project Name: dmlc/gluon-nlp
Commit Name: 297e14732849f2b8025de6e2bf80ac05cab82b44
Time: 2019-11-27
Author: lausen@amazon.com
File Name: src/gluonnlp/data/corpora/google_billion_word.py
Class Name: GBWStream
Method Name: __init__