How to setup Linpack xtreme input parameters - benchmarking

I was setting up some benchmark and i need to use this benchmark tool to test my ryzen cpu and then compare results. As a request i need to test it under different number of equations. I think that there should be a lininput file to setup this parameters, but it doesn't appear in the rar i downloaded. How can i set the input parameter N?

It will be present in a file called "settings" in the extracted directory

Related

MLT melt slideshow on Windows: unable to control output video length and problems with using wildcards

I am using the following command within a batch script to, hopefully, eventually programmatically create simple video slideshows with transitions:
melt 131.jpg 132.jpg 133.jpg ttl=75 -attach crop center=1 -filter luma cycle=75 duration=25 -transition mix -consumer avformat:out.mp4 frame_rate_num=30 frame_rate_den=1
Most of this command is an adaptation for Windows of this command on the MLT website blog (with the exception of the part that scales and transforms the image). For some reason when I run this, however, the output video file is 25 minutes long!
I have two main questions:
a. How do I properly control the duration of each image in the video? I have experimented quite a bit with changing the parameters and I have a semi-decent understanding of what they all mean (I am a newbie to MLT but I figured that there's no way to do something like this easily in FFMPEG alone). The only way I have found to decrease the duration with any amount of control is to increase the output framerate to absurd numbers (which, of course, is not ideal as it's a massive waste of time and energy and still doesn't really solve the issue).
b. How do I use a wildcard to input all the .jpg files in a folder on Windows? I tried adding *.jpg but that didn't work and I don't know how else to do it within a batch script (I tried using the following code to get the file names as a variable, but I wasn't able to get string concatenation working correctly because it only outputs the final file name)
set files=
for /r %%i in (*.jpg) do (
echo %%i
set files=%files% "%%i"
)
echo %files%
Thank you for any suggestions!
When you specify a .jpg file, melt automatically chooses a producer internally. Depending on your environment and version, that producer will either be the qimage or pixbuf producer.
Both producers offer a "ttl" parameter to specify the duration of the image (in frames) for image sequences
https://mltframework.org/plugins/ProducerQimage/#ttl
https://mltframework.org/plugins/ProducerPixbuf/#ttl
In the example you linked, an image sequence is created by using the special syntax: photos/.all.jpg ttl=75
In your example, you specify a specific file name. So an image sequence is not created. Instead, a new producer is created for each file. The default length for a producer is 15000 frames.
https://github.com/mltframework/mlt/blob/master/src/framework/mlt_producer.c#L102
The length can be specified in the command line.
melt 131.jpg length=100 132.jpg length=100 133.jpg length=100
Change
set files=%files% "%%i"
to
CALL set "files=%%files%% "%%i""
This uses a subsidiary process to concatenate your filenames.
I have no idea about the solution to your other question.

Easy way to make a test PDF of a certain file size

want to test the upload file size limit in an application, and it's a pain finding / making various pdf's of certain sizes to test / debug this. Anybody have a better way?
You can write a simple shell script that converts set of images to pdf: How can I convert a series of images to a PDF from the command line on linux? and do it for 1,2,3, ..., all image files in certain directory.
Creating directory full of copies of single image, should be simple too, start with one image file with desired size e.g. 64KB.
# pseudocode - don't test it
END=5
for i in {1..$END}; do cp ./image ./image_$i; done
for i in {1..$END}; do convert ./image_{1..$i} mydoc_$i.pdf; done
I've found an online tool, however, it seems to not be working correctly since it can only generate 10MB files even though you tell it to make a 50MB file.
https://www.fakefilegenerator.com/generate-file.php

Multiple commands on Nagios remote host

I have a machine monitored by nagios that has the following line in nrpe.cfg
include_dir=/etc/nagios/cfgs/
The 'cfgs' dir consists of following files with various commands.
servers.cfg
database.cfg
regular.cfg
However, some commands are repeated among these cfg files but they differ in the arguments. Eg: check_disk command on database has different threshold and on servers have different threshold for the same command.
My question is: If there are multiple definitions of a command, which command is picked up by nrpe? Is there some way to identify it?
You generally can not have duplication in command names in your nrpe.cfg files - though no error is thrown if there are duplicates. I've had this happen before (accidentally) with very large configs, and nrpd has always chosen to use the very LAST matching command it found. In my case, being a single config file, it was always easy to spot the LAST matching command in the file. With many included files, this could be an issue. I believe it would load these files in alphabetical order with the include_dir command you provided.
In any case, I'd look for more unique names for these duplicates. Such as 'check_disk_db' for the one checking database disks. These names can be just about anything you want them to be - but remember to change them on the Nagios side as well. Using unique command names would make your life as a Nagios admin much easier.
As far as figuring out which is actually being used. You can turn on debugging. The debugging output doesn't include the file the command came from, but does show you what options were passed and exactly which actual commands where executed via the check command. This info should be enough to see which nrpe command was selected.

Is there a quick file open/find like IntelliJ's find file, or Sublime's? Something with fuzzy search. But in Emacs?

I'm looking for something that's a bit robust in how it finds files in Emacs. I have a project made up a number of different files, and a lot of them. So, I think maybe Emacs would need to cache a lookup or something like that to make a quick find/open facility to work. It would need to also be configured per project to consider only some directories and exclude others inside of this project, since a number of files and directories are generated and hold a massive amount of text and sometimes a concatenated representation of the rest of the code.
Is there a quick file open/find like IntelliJ's find file, or Sublime's? Something with fuzzy search. But in Emacs? That could help with this problem?
Projectile can probably do what you're after. It describes itself as a "project interaction library" with facilities for finding project files quickly.
Try projectile: https://github.com/bbatsov/projectile (see its fancy UI, helm-projectile). You'll have the command projectile-find-file. It is based on projects (they are defined by a .git/.gh/… or a .projectile).
permanent caching ? Yes
filter out directories ? Yes (with a command or a config into the .projectile)
fuzzy search ? Yes, a few: emacs'default, ido, ido-fuzzy, grizzl or helm.
you install it simply with M-x package-install RET projectile RET.
See this EmacsWiki page, which is is a jumping-off place for multiple answers to your question.
Emacs has a built-in file-name cache -- see (emacs) File Name Cache and this page.
See also Emacs bookmarks, and in particular, Bookmark+. You can bookmark any file or set of files. You can bookmark a Dired buffer, including its omit set, markings, and included subdirs. You can bookmark a set of such Dired buffers. You can aggregate bookmarks and use them to perform actions that set up environments etc. They can be triggered in various ways. You can bookmark Emacs desktops. You can tag bookmarks and files & dirs with free-form tags, which lets you organize them flexibly into overlapping sets.
See also this page about project support with Icicles.

exec ant replace a value in a .m file

how to write an exec task in ant to replace two values in .m file.
Because I want to replace the version number in iphone app, including my build number which i build using hudson, i remotely access the macos and get the app to be copied on to my windows
system, so i generated the build using ant exec tasks, but now i want to replace my build number into the concern file before compiling,
so how can i use exec task to replace certain values in a file.
I know propertyfile task which replaces the value in a property file, but it doesn't work for
this.
If you have a template file, you can use the <copy> task with a nested <filterset> to replace certain values. If not, you can still use <copy>, this time with a nested filter chain containing a <replaceregex> token filter. If you want to edit in place, you can move the newly created file to the old location afterwards.
The use of <exec> is almost certainly a bad idea for your application, as it would make your build rely on external applications which usually are not available on all platforms, thus breaking portability of your build.

Resources