I tried running the command svm-scale -l 0 -u 1 -s range data.data > data_scaled.data but I get the error: SyntaxError: invalid syntax. Please find details in the picture below.
I am running the command in a Windows command shell using a Python interface. Is my command format wrong?
I assume, that you use the original LIBSVM (as mentioned in the title of your question) package from here.
There the call should be svm-scale -l 0 -u 1 -s scaledParameters.txt input.data
According to the code, it will print the scaled output to your terminal. The -s option will write down the ranges of your feature values, e.g.
x
0 1
1 63375 13454352
2 1 10
3 1 10
4 1 10
5 1 10
6 1 10
7 1 10
8 1 10
9 1 10
10 1 10
If you just want to scale your data, you have to adapt the LIBSVM scale code to write the scaled data into a file.
Related
I am following the following post to display the WEP key using Wireshark 3.0.1 on Windows
Multiple WEP keys which can be retrieved from the Pcap file
However, I am not able to see the WEP key although I see WEP related parameters like IV and ICV
https://imgur.com/KdnVmXG
How can I get the WEP key of the Wireless Access Point?
I also tried tshark on the command line with the following command
tshark -R wlan.wep.key -2 -Tfields -eframe.number -r file.pcap
But I get the following (showing last few lines of the output of the above command but all look like this)
19401 0
19402 0
19403 0
19404 0
19405 0
19406 0
19407 0
19408 0
19409 0
19410 0
Actually it turns out the you can use aircrack-ng to do this. Here is the command that I ran to extract the WEP key from pcap file. The command can be run on Kali Linux or Ubuntu
aircrack-ng -z filename.pcap
Here is the output of the above command
Aircrack-ng 1.1
[00:00:09] Tested 4138 keys (got 15273 IVs)
KB depth byte(vote)
0 1/ 5 6B(21760) 0B(19968) CF(19968) B5(19712) 98(19200) E8(19200) 37(18688)
1 0/ 2 F7(23808) 17(21760) 19(20224) 10(19968) BB(19968) 9F(19712) 68(19456)
2 1/ 7 F7(21760) 60(20992) 1B(20480) 0E(20224) 98(20224) 61(19456) 6E(18944)
3 6/ 14 3F(19456) E8(19456) C3(19200) E6(19200) 1A(19200) 8C(18944) B2(18944)
4 3/ 5 67(20224) 94(19968) BE(19456) C2(19456) 2A(19200) 8D(19200) 6F(18944)
KEY FOUND! [ AA:BB:CC:DD:EE ]
Decrypted correctly: 100%
I am following this link and trying to implement the scenarios there.
So I need to generate a data for MANET nodes representing their location in this format:
Current time - latest x – latest y – latest update time – previous x –previous y – previous update time
with the use of setdest tool with these options:
1500 by 300 grid, ran for 300 seconds and used pause times of 20s and maximum velocities of 2.5 m/s.
so I come up with this command
./setdest -v 2 -n 10 -s 2.5 -m 10 -M 50 -t 300 -p 20 -x 1500 -y 300 > test1.tcl
which worked and generated a tcl file, but I don't know how can I obtain the data in the required format.
setdest -v 2 -n 10 -s 2.5 -m 10 -M 50 -t 300 -p 20 -x 1500 -y 300 > test1.tcl
Not a tcl file : Is a "scen" / scenario file with 1,700 "ns" commands. Your file was renamed to "test1.scen", and is now used in the manet examples, in the simulation example aodv-manet-20.tcl :
set val(cp) "test1.scen" ;#Connection Pattern
Please be aware that time settings are maximum time. "Long time settings" were useful ~20 years ago when computers were slow. (Though there are complex simulations lasting half an hour to one hour.)
Link, manet-examples-1.tar.gz https://drive.google.com/file/d/0B7S255p3kFXNR05CclpEdVdvQm8/view?usp=sharing
Edit: New example added → manet0-16-nam.tcl → → https://drive.google.com/file/d/0B7S255p3kFXNR0ZuQ1l6YnlWRGc/view?usp=sharing
Hi I am trying to create samples using opencv_createsamples.exe but it crashes every time. I've checked different builds, opencv2 and opencv3. I don't know how to overcome this. My command looks like this
opencv_createsamples.exe -img C:/Users/dpach/Pictures/Interfejsy/img/1.jpg -maxxangle 15 -maxyangle 15 -maxzangle 1 -w 80 -h 40 -vec test.vec -bgtresh 0 -bgcolor 0 -show
The windows to show samples is opening but after that I receive info that program is not responding. Any ideas ?
// EDIT
I've tried to start it from a pseudo unix bash and I receive then Segmentation fault
// EDIT2
It crush after that Create training samples from single image applying distortions...
I am trying hard to get the output as I Like.
Current Output:
###Server1###
2
###Server2###
0
###Server3###
5
###Server4###
0
Required Output:
###Server1###
2
###Server3###
5
All I am looking is to grep and ignore any line and the previous line that containts 0 (zero) in any place of the line. I am using bash shell.
This is a possible approach:
$ grep -B 1 "^\s*[1-9]$" file
###Server1###
2
--
###Server3###
5
To get rid of the group separator, we can also do:
$ grep --no-group-separator -B 1 "^\s*[1-9]$" file
###Server1###
2
###Server3###
5
Explanation
Instead of using grep -v to find the inverse, I think it is easier to look for the lines having a single digit value not being 0. This is done with the "^\s*[1-9]$" expression, that allows spaces before the digit.
With -B 1 we make it print also the line before the matched one.
Code for GNU sed:
sed '$!N;/\s*\b0\b\s*/d' file
$ sed '$!N;/\s*\b0\b\s*/d' file
###Server1###
2
###Server3###
5
I'm trying to efficiently parse vmstat output preferably in awk or sed, it also should work on both linux and hp-ux. For example I would like to cut cpu idle % ("92" in this case) from the following output:
$ vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
11 0 385372 101696 61704 650716 0 1 5 9 6 12 5 2 92 0
unfortunately the vmstat output can differ on different linux distributions and hp-ux, also columns can vary in length and can be presented in other order.
I tried to write some nice awk oneliner, but eventually ended with python solution:
$ vmstat | python -c 'import sys; print dict(zip(*map(str.split, sys.stdin)[-2:])).get("id")'
92
Do you know better way to parse mentioned output, to get number values of desired column name?
using awk you can do:
vmstat | awk '(NR==2){for(i=1;i<=NF;i++)if($i=="id"){getline; print $i}}'
This should get value of "id" column on Linux as well as on HP-UX or any other standard unix system.
Tested on Linux, HP-UX and Solaris.
$ vmstat | python -c 'import sys; print sys.stdin.readlines()[-1].split()[-2]'
95