Have a column "address" which is combination of city, region and postal code like.
Format is : city<comma><space>region<space>postal code
abc, xyz 123456
All these three city, region and postal code are not mandatory. There can be any one of the above. In that case a nell... (2 Replies)
hey guys...
Im looking to do the following:
1
2
3
4
5
6
7
8
9
Change to:
1 4 7
2 5 8
3 6 9
Did use | perl -lpe'$\=$.%3?$":"\n"' , but it doesnt give me the matrix i want. (3 Replies)
Hey everyone,
I have an issue with a client that is passing me a list of values in one column, and occasionally the combination of all the values results in more than an 255 character string. My DB has a 255 character limit, so I am looking to take the column (comma delimited file), and if it... (1 Reply)
Hi,
I need help to split a long text in a column which is separated by ; and i need to print them out in multiple columns. My input file is tab-delimited and has 11 columns as below:-
aRg02004 21452 asdfwf 21452 21452 4.6e-29 5e-29 -1 3 50 ffg|GGD|9009 14101.10 High class -node. ; ffg|GGD|969... (3 Replies)
Hi, all.
How can I split all columns into multiple columns separated by tab?
Input:
qq ee TT 12 m1
aa gg GG 34 2u
zz dd hh 56 4h
ww cc JJ 78 5y
ss ff kk 90 j8
xx pp mm 13 p0
Output:
q q e e T T 1 2 m 1
a a g g G G 3 4 2 u
z z d d h h 5 6 4 h
w w c c J J 7 8 5 y (8 Replies)
Hi,
I have a text file 'Item_List.txt' containing only 1 column. This column lists different products, each separated by the same generic string header "NEW PRODUCT, VERSION 1.1". After this the name of the product is given, then a delimiter string "PRODUCT FIELD", and then the name of the... (11 Replies)
I want to split this with every 5 or 50 depend on how much data the file will have. And remove the comma on the end
Source file will have
001,0002,0003,004,005,0006,0007,007A,007B,007C,007E,007F,008A,008C
Need Output from every 5 tab and remove the comma from end of each row
... (4 Replies)
I have requirement to split below file (sample.csv) into multiple files by using the unique columns (first 3 are unique columns)
sample.csv
123|22|56789|ABCDEF|12AB34|2019-07-10|2019-07-10|443.3400|1|1
123|12|5679|BCDEFG|34CD56|2019-07-10|2019-07-10|896.7200|1|2... (3 Replies)
Hi,
I am trying to split the following output into two columns, where each column has Source: Destination:
OUTPUT TO FILTER
$ tshark -r Capture_without_mtr.pcap -V | awk '/ (Source|Destination): /' | more
Source: x.x.x.x
Destination: x.x.x.x
Source:... (2 Replies)
Discussion started by: sand1234
2 Replies
LEARN ABOUT DEBIAN
numm.spectral-analysis
spectral-analysis(7) Numm Tutorials spectral-analysis(7)NAME
spectral analysis - perform realtime spectral analysis
SYNOPSIS
numm-run FILE
DESCRIPTION
Frequency makes for a meaningful description of many audio signals. We can use numpy's fourier analysis to compute spectra from the micro-
phone and display the results visually. We will break down the process into smaller parts: baby steps...
First, create and save a skeletal file that moves a line across the screen:
idx = 0
def video_out(a):
global idx
a[:,idx] = 255
idx = (idx + 1) % a.shape[1]
def audio_in(a):
pass
Save this snippet and run it with numm-run.
We will use the numpy.fft module for our analysis. First we define a function to get a particular frequency from the fourier transform:
import numpy as np
def get_freq(fourier, frequency):
freqs = np.fft.fftfreq(len(fourier), 1/44100.0)
nearest = (abs(freqs - frequency)).argmin()
return abs(fourier[nearest])
Next, we hook up this function to audio input from the microphone. A frequency bin is chosen on a log scale for each row on the screen to
display a spectogram. In total:
import numpy as np
idx = 0
recent_audio = np.zeros(4096, np.int16)
recent_video = np.zeros((240,320,3), np.uint8)
freq_bins = np.exp2(np.linspace(np.log2(27000),np.log2(27),240))
def get_freq(fourier, frequency):
freqs = np.fft.fftfreq(len(fourier), 1/44100.0)
nearest = (abs(freqs - frequency)).argmin()
return abs(fourier[nearest])
def video_out(a):
global idx
fourier=np.fft.fft(recent_audio)
values =np.array([get_freq(fourier,X) for X in freq_bins])
recent_video[:,idx,1] = (values/10000).clip(0,255)
idx = (idx + 1) % a.shape[1]
a[:] = np.roll(recent_video, -idx, axis=1)
def audio_in(a):
recent_audio[:] = np.roll(recent_audio, len(a))
recent_audio[:len(a)] = a.mean(axis=1)
SEE ALSO numm-run(1), numm.getting-started(7), numm.one-bit-instrument(7)numm February 2012 spectral-analysis(7)