As importlib has been added in python 3 and up I decided to use it's
abilities to create a plugin system for truly modular development in
python.
Pyitect has the ability to drop in components and resolve dependencies.
Even load different versions of a dependency if two different libraries
require
I made it way too difficult on myself with that stupid dictionary bs...
What I really wanted was to know if the ref was already in the reflist.
Turns out python has a really nice simple operation for that:
if not (Ref in EntityRef):
EntityRef.append(Ref)
DONE ! =D
No need for dictionary.
Oh I think I forgot to mention... parser is now getting close to 1 second...
with tokenizer and such.
But I think this is still within acceptable performance level for now.
Bye,
Skybuck.
--
https://mail.python.org/mailman/listinfo/python-list
On 08/06/2015 21:05, Steven K Knight wrote:
June 8 2015 3:11 PM, "Skip Montanaro" mailto:%22Skip%20Montanaro%22%20>> wrote:
I have so far ignored the new string formatting (you know, the stuff
with all the braces, dots and brackets that make Python strings look
like Perl code ). I
On 08/06/15 19:33, Laura Creighton wrote:
Better C random number generator.
http://www.pcg-random.org/download.html
Or for something less minimalistic, just grab randomkit.c and
randomkit.h from NumPy, which implements the same Mersenne Twister as
Python. That is what I usually do to get fas
On Mon, Jun 8, 2015, at 16:32, Skip Montanaro wrote:
> This is counterintuitive:
>
> >>> "{:.3}".format(-0.00666762259822)
> '-0.00667'
> >>> "{:.3f}".format(-0.00666762259822)
> '-0.007'
> >>> "%.3f" % -0.00666762259822
> '-0.007'
> >>> "{:.3s}".format(-0.00666762259822)
> ValueError Unknown form
On 08.06.15 23:32, Skip Montanaro wrote:
This is counterintuitive:
>>> "{:.3}".format(-0.00666762259822)
'-0.00667'
>>> "{:.3f}".format(-0.00666762259822)
'-0.007'
>>> "%.3f" % -0.00666762259822
'-0.007'
>>> "{:.3s}".format(-0.00666762259822)
ValueError Unknown format code 's' for object of
It just means significant digits in the general format, which alternates
between 10-exponent notation and plain decimal notation.
https://docs.python.org/3.4/library/string.html#format-specification-mini-language
>>> '{:.3}'.format(0.356785)
'3.57e-05'
>>> '{:.3}'.format(0.0035678
This is counterintuitive:
>>> "{:.3}".format(-0.00666762259822)
'-0.00667'
>>> "{:.3f}".format(-0.00666762259822)
'-0.007'
>>> "%.3f" % -0.00666762259822
'-0.007'
>>> "{:.3s}".format(-0.00666762259822)
ValueError Unknown format code 's' for object of type 'float'
Why does the first form display f
June 8 2015 3:11 PM, "Skip Montanaro" wrote:
I have so far ignored the new string formatting (you know, the stuff
with all the braces, dots and brackets that make Python strings look like Perl
code ). I am still only using Python 2.7, but have recently started forcing
myself to use the
On Mon, Jun 8, 2015 at 3:05 PM, Steven K Knight wrote:
> I think http://pyformat.info/ is what you're looking for.
Perfect, thanks!
S
--
https://mail.python.org/mailman/listinfo/python-list
I have so far ignored the new string formatting (you know, the stuff with
all the braces, dots and brackets that make Python strings look like Perl
code ). I am still only using Python 2.7, but have recently started
forcing myself to use the print() function. I figure maybe I should also
start to c
I needed to do something like this once. What I needed was a way to
send a process a signal, and have it then spit out a huge amount
of stats about how long it had been running, how many page faults
it had suffered, and, goodness, I forget all the information that
was needed. Lots. So I just wra
Better C random number generator.
http://www.pcg-random.org/download.html
Laura
--
https://mail.python.org/mailman/listinfo/python-list
On 08.06.2015 09:22, jbauer.use...@gmail.com wrote:
> Something that I could always use as a workaround would be to open up a
> listening port locally in one thread and connection to that local port in a
> different thread, then forward packets. But that's pretty ugly and I'd like
> to avoid it
On Mon, 8 Jun 2015 09:21 pm, Albert van der Horst wrote:
> Why is "slug.title" a valid decomposition of the total string>
> (Or is it?)
I'm afraid I don't understand the question.
> What is the ()-brackets doing? Does it force the execution of title,
> which gives something to be dotted onto s
El 07/06/15 12:20, Rustom Mody escribió:
On Saturday, June 6, 2015 at 10:20:49 AM UTC+5:30, Steven D'Aprano wrote:
On Sat, 6 Jun 2015 01:20 pm, Rustom Mody wrote:
On Saturday, June 6, 2015 at 3:30:23 AM UTC+5:30, Chris Angelico wrote:
Congrats! You just proved that an object can itself be imm
In article ,
Cameron Simpson wrote:
>On 16May2015 12:20, C.D. Reimer wrote:
>>title = slug.replace('-',' ').title()
>>This line also works if I switched the dot operators around.
>>title = slug.title().replace('-',' ')
>>
>>I'm reading the first example as character replacement first and title
>
On Monday, June 8, 2015 at 1:08:07 AM UTC+2, Ned Deily wrote:
> In article <11e093d5-b78e-4ac6-9a7f-649cb2c2c...@googlegroups.com>,
> Andrei wrote:
> > Alright, I have had some development in
> > http://stackoverflow.com/questions/30694560/detect-if-specific-python-app-inst
> > ance-is-already-ru
Memory Error while working with pandas dataframe.
Description of Environment Windows 7 python 3.4.2 32-bit version pandas 0.16.0
We are running into the error described below. Any help provided will be
sincerely appreciated.
We are able to read a 300MB Csv file into a dataframe using the read_c
Thomas 'PointedEars' Lahn writes:
> Jussi Piitulainen wrote:
>> Thomas 'PointedEars' Lahn writes:
>>
>>> 8 3 6 3 1 2 6 8 2 1 6.
>>
>> There are more than four hundred thousand ways to get those numbers
>> in some order.
>>
>> (11! / 2! / 2! / 2! / 3! / 2! = 415800)
>
> Fallacy. Order is irrele
C.D. Reimer wrote:
> Is there something in the Cython code that I need to change and/or find
> a better C random number generator?
This may not be helpful, but numpy is pretty helpful for this sort of thing:
import numpy
import numpy.random
a=numpy.random.randint(1,6,5000)
b=numpy.random.ra
Memory Error while working with pandas dataframe.
Description of Environment Windows 7 python 3.4.2 32-bit version pandas
0.16.0
We are running into the error described below. Any help provided will be
sincerely appreciated.
We are able to read a 300MB Csv file into a dataframe using the read_cs
Hi group,
is it possible to use the ssl module using a custom transport? It appears to me
as if currently the relationship between ssl.SSLSocket() and socket.socket() is
pretty entangled.
Suppose I do have some kind of reliable transport (let's say RS232) and a
connection that I have wrapped i
EnvTransfer - transfer your environment between computers using Yandex disk.
https://github.com/deslum/envtransfer
--
https://mail.python.org/mailman/listinfo/python-list
On Monday 8 Jun 2015 07:04 CEST, Johannes Bauer wrote:
> On 07.06.2015 22:35, Cecil Westerhof wrote:
>
>>> And you also posted your solution. I fail to find any question in
>>> your original posting at all.
>>
>> That is because there was no question: I just wanted to share
>> something I thought
26 matches
Mail list logo