batch-processing

ImageMagick: how to batch combine multiple TIFF file to a single TIFF file in a directory?

ぃ、小莉子 提交于 2019-12-02 00:56:55
问题 I have 600 TIFF files in a directory, c:\temp. The file names are like: 001_1.tif, 001_2.tif, 001_3.tif 002_1.tif, 002_2.tif, 002_3.tif .... .... 200_1.tif, 200_2.tif, 200_3.tif The combined files should be placed in same directory and the files should be named like: 1_merged.tif 2_merged.tif ..... ..... 200_merged.tif I am looking for any single command-line /batch-file to do so through ImageMagick convert / mogrify command or any other command/tools. Please note the overall time taken

Batch remove substring from filename with special characters in BASH

本小妞迷上赌 提交于 2019-12-02 00:53:19
问题 I have a list of files in my directory: opencv_calib3d.so2410.so opencv_contrib.so2410.so opencv_core.so2410.so opencv_features2d.so2410.so opencv_flann.so2410.so opencv_highgui.so2410.so opencv_imgproc.so2410.so opencv_legacy.so2410.so opencv_ml.so2410.so opencv_objdetect.so2410.so opencv_ocl.so2410.so opencv_photo.so2410.so They're the product of a series of mistakes made with batch renames, and now I can't figure out how to remove the middle ".so" from each of them. For example: opencv_ocl

autocorrelation of the input in tensorflow/keras

若如初见. 提交于 2019-12-02 00:49:27
I have a 1D input signal. I want to compute autocorrelation as the part of the neural net for further use inside the network. I need to perform convolution of input with input itself. To perform convolution in keras custom layer/ tensorflow. We need the following parameters data shape is "[batch, in_height, in_width, in_channels]", filter shape is "[filter_height, filter_width, in_channels, out_channels] There is no batch present in filter shape, which needs to be input in my case TensorFlow now has an auto_correlation function. It should be in release 1.6 . If you build from source you can

Seperate datasource for jobrepository and writer of Spring Batch

一世执手 提交于 2019-12-01 23:46:23
Job is simple CSVtoDBFileWriter : read CSV fileName and location from oracle1 read CSV file(batchreader) write(batch writer) in tables(oracle2) I have 2 datasource : Oracle1 : available when application context loads and : I read properties from Oracle1's tables to create oracle2 : jobRepository related tables should be stored here(oracle1) Oracle2 : Destination database where Spring batch's writer will finally output. Question1 : Do I need XA transactionManager? Question2 : Can I run this application in production only using Spring Boot, are there challanges with Spring Boot in production?

How to rename a file according his folder name via batch script

为君一笑 提交于 2019-12-01 23:26:21
I have this part of batch script which is doing following: -There is a main folder, in the main folder are two files (movie & subtitle file) and one Sub-folder called 'Subtitles' -This script takes the name of the movie file and renames with it the subtitle file + moves the subtitle file into the 'Subtitles' sub-folder and then renames the main folder. So at the end we have one movie name, which is used on the subtitle file and on the main folder as well. @echo off setlocal EnableDelayedExpansion cd /D "%~DP0" echo BASE FOLDER: %cd% set n=0 for /D %%a in (*) do ( set /A n+=1 cd "%%a" echo ====

ImageMagick: how to batch combine multiple TIFF file to a single TIFF file in a directory?

我只是一个虾纸丫 提交于 2019-12-01 21:10:27
I have 600 TIFF files in a directory, c:\temp. The file names are like: 001_1.tif, 001_2.tif, 001_3.tif 002_1.tif, 002_2.tif, 002_3.tif .... .... 200_1.tif, 200_2.tif, 200_3.tif The combined files should be placed in same directory and the files should be named like: 1_merged.tif 2_merged.tif ..... ..... 200_merged.tif I am looking for any single command-line /batch-file to do so through ImageMagick convert / mogrify command or any other command/tools. Please note the overall time taken should not be more than 5 second. Assuming you want to combine the 600 single-page TIFFs into one single

How can I read the last 2 lines of a file in batch script

自闭症网瘾萝莉.ら 提交于 2019-12-01 20:10:36
I have a Java program that appends new builds information in the last two lines of a file. How can I read them in batch file? This code segment do the trick... for /F "delims=" %%a in (someFile.txt) do ( set "lastButOne=!lastLine!" set "lastLine=%%a" ) echo %lastButOne% echo %lastLine% EDIT : Complete TAIL.BAT added This method may be modified in order to get a larger number of lines, that may be specified by a parameter. The file below is tail.bat : @echo off setlocal EnableDelayedExpansion rem Tail command in pure Batch: Tail.bat filename numOfLines rem Antonio Perez Ayala for /F "delims=" %

JSR 352 with Liberty Profile - how to implement checkpointing when ItemReader does a DB query

帅比萌擦擦* 提交于 2019-12-01 19:14:02
I have 10 records in my source table and I am having item count as 3. I have 2 partitions to process these 10 records(i.e first 5 records will be processed in first partition and remaining records processed in 2nd partition while processing records in 2nd partition I am throwing an exception so job will be failed at 2nd chunk of 2nd partition.when I am restarting the job ,failed partition is processing all the records again(that is first chunk and 2nd chunk). Restarting the job should only process from last failed chunk records but not all the records in that partition.Can you please guide me

bash: process list of files in chunks

北城余情 提交于 2019-12-01 17:51:22
The setting: I have some hundred files, named something like input0.dat , input1.dat , ..., input150.dat , which I need to process using some command cmd (which basically merges the contents of all files). The cmd takes as first option the output filename and then a list of all input filenames: ./cmd output.dat input1.dat input2.dat [...] input150.dat The problem: The problem is that the script can only handle like 10 files or so due to memory issues (don't blame me for that). Thus, instead of using the bash wildcard extension like ./cmd output.dat *dat I need to do something like ./cmd temp

bash: process list of files in chunks

徘徊边缘 提交于 2019-12-01 17:31:13
问题 The setting: I have some hundred files, named something like input0.dat , input1.dat , ..., input150.dat , which I need to process using some command cmd (which basically merges the contents of all files). The cmd takes as first option the output filename and then a list of all input filenames: ./cmd output.dat input1.dat input2.dat [...] input150.dat The problem: The problem is that the script can only handle like 10 files or so due to memory issues (don't blame me for that). Thus, instead