Hello I have 5 computers with windows exporter .
The metrics are working on all of them and I have a script which is generating a .prom file which is working only on 3 on them.
I really cant figure why... the only difference would be that on those 2 which is not working they are having 2 Program files dir ( a normal one and a Program files(x86) ones..
The .prom files are almost identical on those which work and which not work( only the value differ..). I've move the windows_exporter dir to the x86 one too .. but same I can not see the variables I have inside the prom ..
Related
I have a Julia program that inputs a csv and transforms the data via a bunch of functions, and outputs a csv file. I want to turn this into a binary so that I can run on different machines without having the source code on different machines.
I am looking at PackageCompiler.jl, but I can't find any understandable documentation for creating a binary app. I am trying:
using PackageCompiler
#time create_app("JuliaPrograms", "test"; precompile_execution_file="script.jl")
The file that contains all my code is script.jl and it lives in the dir JuliaPrograms, and I want the compiled binary to be named test.
When I run julia script.jl it performs as I want. I want to be able to run ./test with the same result.
However, I get this error:
ERROR: could not find project at "/Users/userx/JuliaPrograms/"
What am I doing wrong? Do I need some special project directory?
Per the docs here: https://julialang.github.io/PackageCompiler.jl/dev/apps.html#Creating-an-app-1 you need to make sure you define:
function julia_main()::Cint
# do something based on ARGS?
return 0 # if things finished successfully
end
a function called julia_main as the entry point to the app. You can find an example app here: https://github.com/JuliaLang/PackageCompiler.jl/tree/master/examples/MyApp
You may also want to check the location of the code itself. Is it being saved at "/Users/userx/JuliaPrograms/"? You can switch your directory in the Julia Reply by typing ; which will enter you into shell mode and then you can cd into the directory where your code is.
I use apktool_2.5.0.jar b The_App_v0.1.apk to decompile. I edit names in few files. Im not sure if it requires making a change to mainfest.xml but neither worked. Then I do apktool_2.5.0.jar b The_App_v0.1 , all I see is a build\ folder is created in which I see some classes.dex file being made, no apk no dist folder ??
Then I cant even rename the folder or anything because it is used by some process.. the only process can be java which I dont see running.. This APKtool is GARBAGE
As it often happens, one day waste hours for nothing, the next day it works from first time.
Possible solution: apktool_2.5.0.jar b "The_App_v0.1"
... the quotes I read somewhere it cant recognize paths and doesnt know what it's doing
Possible solution: apktool_2.5.0.jar b "The_App_v0.1" ... the quotes I read somewhere it cant recognize paths or maybe space or even dots and doesnt know what it's doing
compilation
I recently replicated a SEGAN experiment based on TensorFlow0.12.1.The author provides a shell script for testing (clean_wav.sh), as shown in the figure below:
This is the original version provided by the author. According to the path of my test data, the modified version is as follows:
Noisy_testset_wav_16k is my test data folder, but running the script system will report an error:
This folder is a directory, but when I change the path to:
NOISY_WAVNAME='/home/zyf/SEGAN/ SEGAN/segan-master1/noisy_testset_wav_16k/p232_023.wav'
the script runs normally and the program function can also be achieved.
However, only one audio file can be processed at a time and cannot be processed in batches.Hope everybody knows reason or have opinion, can give me give advice or two, thank very much.
The code is written in the way it only processes file, you can add a loop in shell script to process all files in the folder:
for f in $NOISY_WAVDIR/*.wav; do
python main.py --init_noise_std 0. --save_path segan_v1.1 \
--batch_size 100 --g_nl prelu --weights SEGAN-41700 \
--preemph 0.95 --bias_deconv True \
--bias_downconv True --bias_D_conv True \
--test_wav $f --save_clean_path $SAVE_PATH
done
but that would not be optimal use of the GPU since you do not process audio in batch. Ideally you'd want to modify python code to process audio in batches but that would not be a trivial task.
Maybe this can be a silly question but I don't figure out how to search in google why in some code I read, it is used to write this way: \\progra~1
What does ~ and 1 mean?
I tried executing in Windows Run the same path but changing numbers and these are the results:
C:\progra~1 -> Opens Program Files
C:\progra~2 -> Opens Program Files(x86)
C:\progra~3 -> Opens ProgramData
C:\progra~4 -> Opens ProgramDevices, a folder I created in C:\
Why? Is this like a Match or something in the Folder names list?
For example a regex like "progra" and then to show the ~1 (First) match in some X order or ~2 (Second) ... etc?
It's a compatability mode with the old (really old) windows 8.3 naming convention. The ~n represents the instance of the name that has the same root characters.
In your example:
Program Files and Program Files(x86) have the same root characters Progra.
Hence one gets progra~1, the next progra~2 etc.
8.3 compatability can be turned off for a disk partition.
Exactly, it's a pattern counter.
Check out also this answer: What does %~d0 mean in a Windows batch file?
You can find more examples of different variables with modifiers here:
https://technet.microsoft.com/en-us/library/bb490909.aspx
(ctrl-f for "Variable substitution")
need some help with this one
I have a directory that contains subdirectories from various applications so let's say directory is c:\home and each application has a subdirectory called the application name so we will have
c:\home\app1
c:\home\app2
etc.
These applications write large log files and they then get recreated every hour but into a different directory, called according t date and time like dd/mm/yyyy/hr and this is created within the actual subdirectory and a log file with the exact same name will be within each directory for each app. so we will end up with this
c:\home\app1\1015201410\app1.log
c:\home\app1\1015201411\app1.log
c:\home\app1\1015201412\app1.log
c:\home\app2\1015201410\app2.log
c:\home\app2\1015201411\app2.log
c:\home\app2\1015201412\app2.log
I want to list through the directories every hour and collect the latest log from each application, in other words in this instance I want to collect the following 2 only as they are the latest (end time 12 shows it is the 12th hour)
c:\home\app1\1015201412\app1.log
c:\home\app4\1015201412\app2.log
Now getting the file one by one is easy enough but the script is going to become too long and needs to be edited on a regular base to allow for new applications added to the directories.
I am able to do the copying, formatting the time/date section etc. I just need to find a way to search through the home directories for all subdirectories containing the latest timedate and then copy a file from it elsewhere.
So I tried this. Note timedateformat has been predefined:
for /D %%d in (c:\home\*\%timedateformat%\*) do (
for %%f in (%%d\.log) do (
xcopy %%f C:\destination\
)
)
but this obviously does not like the * part and therefore I will get no result.
Please if anyone is able to assist, I would greatly appreciate.
for /d %%F in ("c:\home\*") do xcopy "%%F\%timedateformat%\*.log" "c:\destination\"