Hi,
Yes, working with binary formats is the way to go when you have large data.
But for further
reference, Dask[1] fits perfectly for your use case, see below how I
process a 7Gb
text file under 17 seconds (in a laptop: mbp + quad-core + ssd).
# Create roughly ~7Gb worth text data.
In [40]: impo
oint to a windows path. If the file ends with a ".py",
you can open the file
with any editor. If ends with ".so" or something else likely is a
compiled module in C
and you should search in the source distribution, not the binary distribution.
Hope it helps.
Regards,
Rolando Espinoza La fuente
www.insophia.com
--
http://mail.python.org/mailman/listinfo/python-list
efore:
http://gist.github.com/518370
Well.. I tried to use generators to make it "cool" but changed it for
a test-friendly approach.
I'll find hard to remember the one-liners in an interview and get it right.
Rolando Espinoza La fuente
www.insophia.com
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Jul 24, 2010 at 12:28 AM, Benjamin Kaplan
wrote:
[...]
>
> And second, not to in any way diminish the work you did tracing out
> the inheritance tree and working through the inheritance, but Python
> has easier ways of doing it :)
>
BBar.__mro__
> (, , 'exceptions.RuntimeError'>, ,
TL;DR: if you want to stay sane, don't inherit two classes that share
same inheritance graph
I recently got puzzled by a bug from a legacy lib (ClientForm)
which have this code:
class ParseError(sgmllib.SGMLParseError,
HTMLParser.HTMLParseError,
):
On Fri, Apr 23, 2010 at 10:20 AM, Red wrote:
[...]
> for line in f:
> j = json.loads(line)
> if 'text' in j:
> if 'lang' in j:
> lang = j['lang']
> print "language", lang
> text = j['text']
"lang" key is in
On Sun, Apr 4, 2010 at 5:20 PM, Paul Rubin wrote:
[...]
>
> d[r] = list(r for r in [4,5,6])
>
This have a slightly performance difference. I think mainly the
generator's next() call.
In [1]: %timeit list(r for r in range(1))
100 loops, best of 3: 2.78 ms per loop
In [2]: %timeit [r for r
On Sat, Apr 3, 2010 at 6:28 PM, kj wrote:
> Is there a way to refer, within the function, to all its arguments
> as a single list? (I.e. I'm looking for Python's equivalent of
> Perl's @_ variable.)
>
def spam(*args, **kwargs):
print args
print kwargs
class Spam:
def __init__(self,
On Fri, Mar 19, 2010 at 4:05 AM, nbv4 wrote:
> I have ipython installed via apt. I can go to the command line and
> type 'ipython' and it will work. If I try to install ipython to a
> virtualenv, I get this:
>
> $ pip install -E env/ ipython
> Requirement already satisfied: ipython in /usr/share/p
On Fri, Mar 5, 2010 at 2:32 PM, mk wrote:
> Arnaud Delobelle wrote:
>
> 1 == True
>>
>> True
>
> 0 == False
>>
>> True
>>
>> So what's your question?
>
> Well nothing I'm just kind of bewildered: I'd expect smth like that in Perl,
> but not in Python.. Although I can understand the rat
On Fri, Mar 5, 2010 at 2:00 PM, Steve Holden wrote:
[...]
>
> Just a brainfart from the BDFL - he decided (around 2.2.3, IIRC) that it
> would be a good ideal for Booleans to be a subclass of integers.
>
I would never figured out
>>> bool.__bases__
(,)
Doesn't have side effects not knowing tha
read() does not return the config object
>>> import ConfigParser
>>> config = ConfigParser.SafeConfigParser()
>>> config.read('S3Files.conf')
['S3Files.conf']
>>> config.sections()
['main']
>>> config.get(&
;beautifulsoup" module.
> but it doesnt work!
>
[snip]
--
Rolando Espinoza La fuente
www.rolandoespinoza.info
--
http://mail.python.org/mailman/listinfo/python-list
; Take the advice other people gave you and use BeautifulSoup.
> --
> Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
>
> "If you think it's expensive to hire a professional to do the job, wait
> until you hire an amateur." --Red Adair
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Rolando Espinoza La fuente
www.rolandoespinoza.info
--
http://mail.python.org/mailman/listinfo/python-list
14 matches
Mail list logo