Questions tagged [file-processing]

333 questions
2
votes
5 answers

Editing files in PHP

Is there a way to append or remove a line of text from a file using PHP. I am in the process of writing a hosting control panel for my specific web hosting stack and would like to be able to make changes to the files with minimal requirements to…
Philderbeast
  • 71
  • 2
  • 7
2
votes
3 answers

Open expression in Python for a text file with unknown extension but same layout of the data inside of it

I am writing a script in python that will read in data from a text file and perform various operations on the data. It is working perfectly if I specify the extension of my file in this statement with open("file.txt") as f:. My question is (and I…
user3245453
  • 251
  • 1
  • 5
  • 10
2
votes
2 answers

How to open and process a video file like .mpeg or .avi using openCV's VideoCapture method in Java

import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.Size; import org.opencv.highgui.Highgui; import org.opencv.highgui.VideoCapture; import…
Vishnu
  • 159
  • 1
  • 3
  • 9
2
votes
2 answers

Batch file to recursively move a single subdirectory from multiple parent directories TO another single, defined directory

If that title wasn't confusing enough.. hopefully what I am trying to do is a lot simpler to understand. Windows 7 just in case it needs to be said. I have multiple directories within the folder I am working…
element6
  • 43
  • 6
2
votes
2 answers

Joining two files in the same directory using hadoop

I am a total hadoop n00b. I am trying to solve the following as my first hadoop project. I have a million+ sub-folders sitting in an amazon S3 bucket. Each of these folders have two files. File 1 has data as…
sc_ray
  • 7,803
  • 11
  • 63
  • 100
2
votes
3 answers

Couting Records in XSLT File

I have a template for a trailer record that has a parameter 'numberOfRecords' . This…
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
2
votes
2 answers

How to format an output in Python?

I am having difficulty in formatting some code in Python: My code is here: keys = ['(Lag)=(\d+\.?\d*)','\t','(Autocorrelation Index): (\d+\.?\d*)', '(Autocorrelation Index): (\d+\.?\d*)', '(Semivariance): (\d+\.?\d*)'] import re string1 =…
dsinha
  • 19
  • 7
2
votes
2 answers

Is python capable of doing MATLAB equivalent matrix operations?

I have implemented codes in MATLAB that operates on 216x216 matrices that contain numeric data and sometime strings. The operations that I do on these matrices are mostly like filter matrices above a certain threshold, find all the matrix indexes…
Dexters
  • 2,419
  • 6
  • 37
  • 57
1
vote
2 answers

Binary file processing using ESBs (WSO2, Mule, Petals, Service Mix)

I'm keen to use an ESB (probably WSO2, Mule, Petals or Service Mix) on a new project. I have a number of business processes/ workflows which will work well in an ESB: however I'm struggling with one particular scenario. The basic requirement is to…
kennethmay
  • 461
  • 4
  • 7
1
vote
0 answers

Find out all the different files from two different paths efficiently in Windows (with Python)

Well, recently I'm working on a program which is able to sync files between different folders. However, as a fresh man, the algorithm I worte looks really disgusting (bruh~) The following lines are the related things I wrote, I really hope there…
Robert He
  • 11
  • 3
1
vote
1 answer

JIL File processing using Python

I have a JIL file from Autosys that looks like below. /* ----------------- Box1 ----------------- */ insert_job: Box1 job_type: BOX permission: date_conditions: 0 alarm_if_fail: 1 /* ----------------- Job2 ----------------- */ insert_job:…
1
vote
0 answers

Apache Camel 3.8.0 Not Reading Files From XML-DSL Routes

I just have written one application using Java 11 (open-jdk 11.0.2), Spring framework 5.3.23, And Apache Camel 3.8.0; which is supposed to read an incoming file and do process it. For this I have written XML-DSL which defines the routes in it. I'm…
1
vote
1 answer

I can't seem to insert a node in a tree. Can someone take a look at my code and tell me where did I do wrong?

I've been trying to insert a node to my tree through file processing but it only always inserts one node then the program will force close itself. I have tried to put the data on a linkedlist and it worked. So probably the problem here is not the…
Arigatod
  • 13
  • 2
1
vote
2 answers

Python: how to get each element in a str list and then put the first element into the first file in a directory, second element in the second dir?

I'm trying to deal with txt files. I have a 2D list called reps = [], len(reps) = 41, I also have a directory called replies, which contains 34 txt files. I want to do like this: reps[0][0] is the first line of the file1.txt under the replies…
DaT.
  • 25
  • 2
1
vote
1 answer

Parallelly processing HUGE file by splitting it into logical shards

I'm trying to parallelly process a huge file ~15GB - ~60GB which contains 560 Million to 2 Billion records the record looks something like the following 123, 6000 123, 4593 111, 1 111, 100 111, -50 111, 10000 there could be thousands…
Arjun
  • 3,248
  • 18
  • 35