large-files

How to Send Large File From Client To Server Using WCF?

可紊 提交于 2019-12-19 08:10:10
问题 How to Send Large File From Client To Server Using WCF in C#? Below the configuration code. <system.serviceModel> <bindings> <basicHttpBinding> <binding name="HttpStreaming_IStreamingSample" maxReceivedMessageSize="67108864" transferMode="Streamed"> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:4127/StreamingSample.svc" binding="basicHttpBinding" bindingConfiguration="HttpStreaming_IStreamingSample" contract="StreamingSample.IStreamingSample" name=

Parsing large (9GB) file using python

北慕城南 提交于 2019-12-18 17:22:47
问题 I have a large text file that I need to parse into a pipe delimited text file using python. The file looks like this (basically): product/productId: D7SDF9S9 review/userId: asdf9uas0d8u9f review/score: 5.0 review/some text here product/productId: D39F99 review/userId: fasd9fasd9f9f review/score: 4.1 review/some text here Each record is separated by two newline charters /n . I have written a parser below. with open ("largefile.txt", "r") as myfile: fullstr = myfile.read() allsplits = re.split(

Parsing large (9GB) file using python

余生长醉 提交于 2019-12-18 17:22:39
问题 I have a large text file that I need to parse into a pipe delimited text file using python. The file looks like this (basically): product/productId: D7SDF9S9 review/userId: asdf9uas0d8u9f review/score: 5.0 review/some text here product/productId: D39F99 review/userId: fasd9fasd9f9f review/score: 4.1 review/some text here Each record is separated by two newline charters /n . I have written a parser below. with open ("largefile.txt", "r") as myfile: fullstr = myfile.read() allsplits = re.split(

How to read specific lines of a large csv file

房东的猫 提交于 2019-12-18 16:08:31
问题 I am trying to read some specific rows of a large csv file, and I don't want to load the whole file into memory. The index of the specific rows are given in a list L = [2, 5, 15, 98, ...] and my csv file looks like this: Col 1, Col 2, Col3 row11, row12, row13 row21, row22, row23 row31, row32, row33 ... Using the ideas mentioned here I use the following command to read the rows with open('~/file.csv') as f: r = csv.DictReader(f) # I need to read it as a dictionary for my purpose for i in L:

Database over 2GB in MongoDB

自作多情 提交于 2019-12-18 12:12:23
问题 We've got a file-based program we want to convert to use a document database, specifically MongoDB. Problem is, MongoDB is limited to 2GB on 32-bit machines (according to http://www.mongodb.org/display/DOCS/FAQ#FAQ-Whatarethe32bitlimitations%3F), and a lot of our users will have over 2GB of data. Is there a way to have MongoDB use more than one file somehow? I thought perhaps I could implement sharding on a single machine, meaning I'd run more than one mongod on the same machine and they'd

Large file upload in Flask

空扰寡人 提交于 2019-12-18 11:56:49
问题 I am attempting to implement a flask application for uploading files. This file could be very large. For example, almost 2G in size. I have finished the server side process function like this: @app.route("/upload/<filename>", methods=["POST", "PUT"]) def upload_process(filename): filename = secure_filename(filename) fileFullPath = os.path.join(application.config['UPLOAD_FOLDER'], filename) with open(fileFullPath, "wb") as f: chunk_size = 4096 while True: chunk = flask.request.stream.read

Is there any memory restrictions on an ASP.Net application?

[亡魂溺海] 提交于 2019-12-18 07:04:50
问题 I have an ASP.Net MVC application that allows users to upload images. When I try to upload a really large file (400MB) I get an error. I assumed that my image processing code (home brew) was very inefficient, so I decided I would try using a third party library to handle the image processing parts. Because I'm using TDD, I wanted to first write a test that fails. But when I test the controller action with the same large file it is able to do all the image processing without any trouble. The

Random access gzip stream

帅比萌擦擦* 提交于 2019-12-18 02:41:40
问题 I'd like to be able to do random access into a gzipped file. I can afford to do some preprocessing on it (say, build some kind of index), provided that the result of the preprocessing is much smaller than the file itself. Any advice? My thoughts were: Hack on an existing gzip implementation and serialize its decompressor state every, say, 1 megabyte of compressed data. Then to do random access, deserialize the decompressor state and read from the megabyte boundary. This seems hard, especially

Is it possible to slim a .git repository without rewriting history?

蓝咒 提交于 2019-12-18 02:19:35
问题 We have a number of git repositories which have grown to an unmanageable size due to the historical inclusion of binary test files and java .jar files. We are just about to go through the exercise of git filter-branch ing these repositories, re-cloning them everywhere they are used (from dozens to hundreds of deployments each, depending on the repo) and given the problems with rewriting history I was wondering if there might be any other solutions. Ideally I would like to externalise problem

WSGI file streaming with a generator

痴心易碎 提交于 2019-12-17 19:17:10
问题 I have the following code: def application(env, start_response): path = process(env) fh = open(path,'r') start_response('200 OK', [('Content-Type','application/octet-stream')]) return fbuffer(fh,10000) def fbuffer(f, chunk_size): '''Generator to buffer file chunks''' while True: chunk = f.read(chunk_size) if not chunk: break yield chunk I'm not sure that it's right but the scraps of information I've found on the internet have led me to think it ought to work. Basically I want to stream a file