batch-processing

Redirect stderr through grep -v in LSF batch job

▼魔方 西西 提交于 2019-12-11 02:12:08
问题 I'm using a library that generates a whole ton of output to stderr (and there is really no way to suppress the output directly in the code; it is ROOT's Minuit2 minimizer which is known for not having a way to suppress the output). I'm running batch jobs through the LSF system, and the error output files are so big that they exceed my disk quota. Erk. When I run locally on a shell, I do: python main.py 2> >( grep -v Minuit2 2>&1 ) to suppress the output, as is done here. This works great, but

Batch processing files and diff with database

杀马特。学长 韩版系。学妹 提交于 2019-12-11 01:25:38
问题 Currently I am developing a Spring-Boot application that is periodically trying to process a file containing user data where every line contains userId and departamentId separated by | for example 123534|13 . That file will be containing few milions of records. My requirement is to load this data into mysql database in such manner that: If the user with processed ID exists, do not do anything If the user is not existing create new user If the user is not on the list but is present in the

Execution Confusion in Batch class Apex

断了今生、忘了曾经 提交于 2019-12-10 22:43:53
问题 I am calling a batch class instance and after completing the batch, I am calling two other batch class instances. The finish() method for first batch class is public void finish(Database.BatchableContext BC) { List<Event__c> events = [SELECT Id FROM Event__c]; delete events; System.debug('Executing finish'); for (CalendarSettings__c c: [SELECT Id, Name, CalendarId__c, CalendarQuery__c, FieldToDisplay__c FROM CalendarSettings__c]) { System.debug('Calendar Id is' + c.CalendarId__c);

Batch convert .py (text files) to .pdf on osx

独自空忆成欢 提交于 2019-12-10 19:24:55
问题 I teach a python course and have a large number of .py files that were submitted for an exam. I would like to convert all these to pdf so that I can open them in IAnnotate on my ipad, mark them up and return them to students. How can I do a such a conversion in batch mode? 回答1: Tried on Mavericks: #!/bin/bash for file in *.py; do textutil -convert rtf -font 'Courier New' -fontsize 9 ${file} -output ${file}.rtf cupsfilter -D ${file}.rtf > ${file}.pdf done The resulting files will be named *.py

How to change specific string in a project with batch

…衆ロ難τιáo~ 提交于 2019-12-10 19:03:44
问题 I'm developing one application. Some path have to be changed on the whole project. The path are fixed and the files can be edited (it is in .cshtml ). So I think I can use a batch file to change all the http://localhost.com to http://domain.com for example (I know relative and absolute path, but here I HAVE to make that. I want to use this script in many computers, so I don't want to install an application and use that app with a script... Just run .bat and that's it... So if you have code

batch reading wav files in matlab to create a matrix for neural network training set

你离开我真会死。 提交于 2019-12-10 17:41:07
问题 I am working on a small neural network project and I am very new to Matlab. I have about 400 short wav files, which have to be read, and then combined into a matrix data set. I was not able to find any information on how to be able to load all the wav files into Matlab so that it stores each file with a different name. My questions are: Is it possible to batch process the wav files in Matlab to have each vector stored as a separate data? What would be the procedure of populating the matrix

Hibernate Batch process : Stateless Session VS Regular Session Native Query

跟風遠走 提交于 2019-12-10 16:28:01
问题 As I understand so far stateless sessions are preferred when using batch processes since It will just detach objects doing the process So that persistent context and cache would be free so batch processes are the idle case for that, It is commonly known as plain JDBC Query Engine with queries translated to SQL queries immediately. Referenced from : https://stackoverflow.com/a/14174403/1460591 On the other hand, I learned that native queries do the same the one difference I see is that the

Batch Insertion with Neo4j

末鹿安然 提交于 2019-12-10 14:29:26
问题 I am importing 2.3 Billion relationship from a table, The import is not very fast getting a speed on 5Million per hour that will take 20 days to complete the migration. I have heard about the neo4j batch insert and and batch insert utility. The utility do interesting stuff by importing from a csv file but the latest code is some how broken and not running. I have about 100M relations in neo4j and I have to all check that there shall be no duplicate relationship. How can I fast the things in

batch file to remove a column in csv

两盒软妹~` 提交于 2019-12-10 12:03:46
问题 I wrote this code so I can remove a column from a csv file. @echo off setlocal enableextensions enabledelayedexpansion type nul > tmp.txt SET /A COUNT=0 for /F "tokens=*" %%A in (d.csv) do ( set LINE="%%A" set /A COUNT+=1 for /F "tokens=1,2,3,4,5,6,7,8,* delims=," %%a in (!LINE!) do ( set row[0]=%%a set row[1]=%%b set row[2]=%%c set row[3]=%%d set row[4]=%%e set row[5]=%%f set row[6]=%%g set row[7]=%%h ) echo !row[0]!,!row[2]!,!row[3]!,!row[4]!,!row[5]!,!row[6]! >>tmp.txt echo. ) endlocal

Read specific Word(Line 2, Word 3) from a text file by batch script

社会主义新天地 提交于 2019-12-10 11:45:13
问题 I need to read specific words from a text file through batch script. Say I want Line 2 word 3 to be read. Here is the code:: @ECHO OFF cls SET /P line=Please enter Line number: ECHO Line number entered is : %line% SET /P word=Please enter Word number: ECHO Word number entered is : %word% FOR /F "tokens=%word% skip=%line% delims=," %%G IN (E_dir.txt) DO echo Chosen word is: %%G The problem is, this gives me all the 3rd words starting from line 2. (say, user input is line 1, Word 3). There is a