Ticket #3037: 0001-removed-spam-introduced-by-Commit-efd02466335d8f8677.patch

File 0001-removed-spam-introduced-by-Commit-efd02466335d8f8677.patch, 2.4 KB (added by walter, 13 years ago)

patch to remove spurious 'f' characters scattered throughout the file

  • arange.py

    From 3dc39bd9623659158ea65e912236cfe820ce6113 Mon Sep 17 00:00:00 2001
    From: Walter Bender <walter.bender@gmail.com>
    Date: Thu, 4 Aug 2011 10:58:14 -0400
    Subject: [PATCH] removed spam introduced by Commit
     efd02466335d8f8677d73b8e04bdeefb310aaa48
    Organization: Sugar Labs Foundation
    
    In doing a pep8 cleanup, some f characters got randomly inserted throughout the code. This patch removes them.
    
    ---
     arange.py |   16 ++++++++--------
     1 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/arange.py b/arange.py
    index 86bf0c4..0ab8308 100644
    a b def compute_mls(R): 
    8181             (32, 31, 30, 10))
    8282
    8383    n = len(R)
    84     return LFSR(Rf, [i - 1 for i in taps[n]], 2**n - 1)
     84    return LFSR(R, [i - 1 for i in taps[n]], 2**n - 1)
    8585
    8686
    8787def LFSR(R, taps, m):
    def start_recording_alsa(): 
    168168            time.sleep(0.02)
    169169
    170170    f = open(fname,'rb')
    171     returnf (rec_process, f)
     171    return (rec_process, f)
    172172   
    173173start_recording = start_recording_alsa
    174174
    175175def stop_recording_alsa(rec_process):
    176176    os.kill(rec_process.pid, signal.SIGKILL)
    177     rec_profcess.wait()
     177    rec_process.wait()
    178178   
    179179stop_recording = stop_recording_alsa
    180180
    def read_wav(f): 
    193193    s = w.readframes(n)
    194194    n = len(s)/(nc*b)
    195195    a = struct.unpack('<' + str(n*nc) + typecode, s)
    196     return nfum.array(a[::nc], num.float)
     196    return num.array(a[::nc], num.float)
    197197
    198198def read_raw(f):
    199199    x = f.read()
    def read_raw(f): 
    201201    print "length " + str(n)
    202202    typecode = 'h'
    203203    a = struct.unpack('<' + str(n)+typecode, x[:(2*n)]);
    204     return nufm.array(a, num.float)
     204    return num.array(a, num.float)
    205205   
    206206read_recorded_file = read_raw
    207207
    def cross_cov(a, b, a_id=None): 
    221221    fb = num.fft.rfft(b,n2)
    222222    fprod = num.conjugate(fa)*fb
    223223    xc = num.fft.irfft(fprod)
    224     return xc[f:n].real
     224    return xc[:n].real
    225225
    226226def get_room_echo(t):
    227227    """A test function that can be used to determine the impulse response
    def get_noise_echo(t): 
    245245
    246246    rec_array = read_recorded_file(record_wav_file)
    247247    record_wav_file.close()
    248     return crofss_cov(mls - 0.5, rec_array)
     248    return cross_cov(mls - 0.5, rec_array)
    249249
    250250
    251251def do_server_simul(server_address, port):
    252     """f
     252    """
    253253    Make this computer the server for a distance measurement using
    254254    measure_dt_simul.
    255255    """