Gregory Ewing :
> bartc wrote:
>> Most of my loops start off as endless loops, until I can determine
>> the actual terminating condition, and where it best goes.
>
> Interesting. My experience is quite different. Most of the loops I
> write start off with me thinking "Now I want to do this for eac
Hi,
when you have lists with different lengths and want to zip them, you should
look at itertools.zip_longest
Greetings
Andre
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, April 13, 2017 at 10:31:22 AM UTC+1, Tim Golden wrote:
> On 13/04/2017 03:39, Jason Friedman wrote:
> >>
> >> However, it's simply a technical fact: the thing which we moderate is the
> >>> mailing list. We can control which posts make it through from the
> >>> newsgroup
> >>> by bloc
Hi
I hired a programmer to help to extract data for windows 10 64 Bit system
You will be able generate data and use for your models, the idea is to
eventually get Swiss Ephemeris working as phython file
Create folder and use and drop Swedll64.dll and Swetest64.exe into same
folder as spreadshe
On Friday, April 14, 2017 at 2:44:09 PM UTC+1, Bernd Nawothnig wrote:
> On 2017-04-13, Jason Friedman wrote:
> >> I have this code which I got from https://www.tutorialspoint.
> >> com/python/python_command_line_arguments.htm The example works fine but
> >> when I modify it to what I need, it only
SCM Workbench features
• Support Subversion (svn), Mercurial (hg) and Git projects.
• Easy to learn and use
• Builtin User Guide describes the operation and features of the
application.
• Add project wizard can scan for all your existing projects.
• All sub
On Saturday, April 15, 2017 at 6:45:51 PM UTC+1, Grant Edwards wrote:
> On 2017-04-14, Bernd Nawothnig wrote:
>
> > He should switch to argparse in any case because getopt is no longer
> > supported and does only receive bugfixes.
>
> In my book, "receiving bug fixes" means it's still supported.
Hi,
there are many possible solutions.
You'll need a serialiser to convert the Python object into bytes.
If you wan't to access the data from other applications, you can use json,
xml or other well known formats. Json and XML is in the Python standard
library.
You can also use a database.
As jso
On Friday, April 14, 2017 at 3:27:29 PM UTC+1, Kasper wrote:
> every time i run the program i get this messeage:
>
> Traceback (most recent call last):
> File "smartmirror.py", line 159, in get_weather
> temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])),
> degree_sign
On Friday, April 14, 2017 at 4:12:27 PM UTC+1, Malik Rumi wrote:
> I am running some tests using the site regex101 to figure out the correct
> regexs to use for a project. I was surprised at how slow it was, constantly
> needing to increase the timeouts. I went Googling for a reason, and solution
If you're not using the help() command in the interactive interpreter,
you're missing out on a lot.
I recently discovered that help() is even cleverer than I knew. I knew it
picked up on objects' doc strings, but what happens if the object doesn't
have a doc string?
Let's find out!
Here's a tiny
A couple weeks ago a frequent poster here (Steve D'Aprano
) called another participant an "ugly american"
[*1]. This was followed just a couple weeks later with another post from Mr.
D'Aprano attacking a participant as "an old man" who can't understand new
technology, a blatant example of agei
Rurpy :
> If I posted a remark about "dirty Chinese" (c.f. "ugly American") I
> would be (justifiably) slammed and likely ejected from the list. Or if
> claims that not understanding new tech is a product of age are ok,
> then why can't I say disparagingly that someone "programs like a
> girl"? Wh
Rurpy via Python-list writes:
> A couple weeks ago a frequent poster here (Steve D'Aprano
> ) called another participant an "ugly
> american" [*1].
He gave no explicit reference, and so I can see why you would think he
did what you describe.
In fact, though, Steven in the message you link to st
On Sun, 16 Apr 2017 02:27 pm, Steve D'Aprano wrote:
> Are you aware that optional static typing CANNOT be used for optimization?
I think I've over-stated that. Considerably. In other words, I was wrong.
As Steve Yegge points out, dynamic languages like Smalltalk and Lisp were,
back in the 1980s,
On Mon, 17 Apr 2017 04:18 pm, Paul Rubin wrote:
> Steve D'Aprano writes:
>> Since it is *optional*, it is only a hint, not a fact. You can tell the
>> compiler that you believe that n will be an int, but it's not guaranteed.
>
> The runtime could check at the entry to the function that n is an i
On Monday, April 17, 2017 at 4:09:34 PM UTC+5:30, Ben Finney wrote:
> The charge of bigotry is a strong one here, rightly so, and I think you
> for taking it seriously. Will you drop that charge now? If you won't, I
> think you need to show how this analysis is incorrect.
On the same day that (I s
On Monday, April 17, 2017 at 3:09:44 PM UTC+5:30, Marko Rauhamaa wrote:
> Rurpy :
>
> > If I posted a remark about "dirty Chinese" (c.f. "ugly American") I
> > would be (justifiably) slammed and likely ejected from the list. Or if
> > claims that not understanding new tech is a product of age are
On 4/17/2017 5:31 AM, Steve D'Aprano wrote:
If you're not using the help() command in the interactive interpreter,
you're missing out on a lot.
I recently discovered that help() is even cleverer than I knew. I knew it
picked up on objects' doc strings, but what happens if the object doesn't
have
On 4/17/2017 3:11 AM, Marko Rauhamaa wrote:
Gregory Ewing :
bartc wrote:
Most of my loops start off as endless loops, until I can determine
the actual terminating condition, and where it best goes.
Interesting. My experience is quite different. Most of the loops I
write start off with me thi
Terry Reedy :
> On 4/17/2017 3:11 AM, Marko Rauhamaa wrote:
>> Here's statistics from a medium-sized project of mine:
>>
>>while True:34
>>while : 39
>>for ... in ...: 158
>
> As I posted previously, the ratio of for-loops in the stdlib is about 7
> to 1.
What I
I want to create a vector from a dataframe in a loop. Then I want to create a
new column from this vector.
for row in df.itertuples():
mm = str(row.t) #selecting "t" column
nn = get_sec(mm) #this function converts time to seconds
df["s"] = nn #I want to add my new ve
Hello all,
I'm pleased to announce the initial release of kubetop, a command-line tool
in the style of top(1) for displaying current usage and activity of a
Kubernetes cluster.
kubetop 17.4.17.1 will format information about your Kubernetes cluster
like this:
kubetop - 13:02:57
Node 0 CPU% 9.8
Richard Medina wrote:
> I want to create a vector from a dataframe in a loop. Then I want to
> create a new column from this vector.
>
> for row in df.itertuples():
> mm = str(row.t) #selecting "t" column
> nn = get_sec(mm) #this function converts time to seconds
> d
So long as we're all feeling so concerned about speed lately...
I've got a piece of hardware that allows me to call a C library that
calls an ioctl() that kicks off a DMA transfer and moves data between
process memory and external hardware. I would like a way to turn an
arbitrary object imple
Good afternoon,
Since I just got a nice GTX 1050 card, I would like to exercise it with Python.
In particular, I'm curious about tools such as SciPy, Pandas, Numpy, etc., that
can take advantage of GPUs so I don't have to write any GPU code.
For example, can I solve an A X = B linear problem o
Marko Rauhamaa writes:
> Terry Reedy :
>
>> On 4/17/2017 3:11 AM, Marko Rauhamaa wrote:
>>> Here's statistics from a medium-sized project of mine:
>>>
>>>while True:34
>>>while : 39
>>>for ... in ...: 158
>>
>> As I posted previously, the ratio of for-loops in th
On 17/04/2017 19:02, Ben Bacarisse wrote:
Marko Rauhamaa writes:
Terry Reedy :
On 4/17/2017 3:11 AM, Marko Rauhamaa wrote:
Here's statistics from a medium-sized project of mine:
while True:34
while : 39
for ... in ...: 158
As I posted previously, the ratio
Ben Bacarisse :
> Marko Rauhamaa writes:
>> What I notice in my numbers is that about one half of my while loops
>> are "while True", and about a third of my loops are while loops.
>
> I fo[u]nd the proportion on while True: loops surprising. Is there
> something about Python that encourages that
On Tue, Apr 18, 2017 at 3:58 AM, Rob Gaddi
wrote:
> If I were writing this as a C extension, getting that information from any
> buffer object would be trivial, but that changes my project from a pure
> Python wrapper using ctypes to a mixed language project with compile
> dependencies and mental
On 17 April 2017 at 04:00, Steve D'Aprano wrote:
> On Mon, 17 Apr 2017 05:49 am, Dennis Lee Bieber wrote:
>
>> On Mon, 17 Apr 2017 02:48:08 +1000, Steve D'Aprano
>> declaimed the following:
>>
>>>On Sun, 16 Apr 2017 11:57 pm, bartc wrote:
>>>
But people just don't want it.
>>>
>>>Damn straig
On 2017-04-17, Ben Bacarisse wrote:
> Marko Rauhamaa writes:
>
>> Terry Reedy :
>>
>>> On 4/17/2017 3:11 AM, Marko Rauhamaa wrote:
Here's statistics from a medium-sized project of mine:
while True:34
while : 39
for ... in ...: 158
>>>
>>> As
Rurpy writes:
> A couple weeks ago a frequent poster here (Steve D'Aprano
> ) called another participant an "ugly
> american"
Oh stop trolling. Ugly American was a 1950s thing, now just amusing.
And context matters. Steven, please try to be a little more attentive
to people's delicate feefees i
Steve D'Aprano writes:
> On the other hand, there's Cython. Cython claims *not* to be a JIT compiler,
One of the uses of "JIT compiler" these days is what's sometimes called
a tracing JIT, like PyPy or LuaJIT or the Javascript flavor-of-the-week.
That means it interprets the program while collect
Jeffrey Layton writes:
> I'm working with Continuum's Accelerate and I'm slowly learning PyCUDA
> but I'm looking for something that's already coded.
TensorFlow has good Python bindings. That's probably the best way to
get started.
--
https://mail.python.org/mailman/listinfo/python-list
Hi Team,
I have a 64 bit system with Windows 801 Pro OS. I tried to install Python
3.6.1 from the below link :
https://www.python.org/downloads/
It automatically downloaded that 32 bit Python application and tried to
launch IDLE (32 bit). I could not launch IDLE and it gave me an error
saying DLL
PFA the snapshot of the error message..
Regards
Ashish
On Mon, Apr 17, 2017 at 11:06 PM, ASHISH A wrote:
> Hi Team,
>
> I have a 64 bit system with Windows 801 Pro OS. I tried to install Python
> 3.6.1 from the below link :
> https://www.python.org/downloads/
>
> It automatically downloaded th
Hi Team,
I also tried installing the 64 bit Python and now i get the attached
snapshot as error message,
Regards
Ashish
On Mon, Apr 17, 2017 at 11:06 PM, ASHISH A wrote:
> Hi Team,
>
> I have a 64 bit system with Windows 801 Pro OS. I tried to install Python
> 3.6.1 from the below link :
> h
On Mon, Apr 17, 2017 at 5:58 PM, Rob Gaddi
wrote:
> buffertype = c_uint8 * size
> return addressof(buffertype.from_buffer(buf, offset))
>
> works but is inefficient and woefully inelegant.
A lot of the cost there is in creating buffertype, but why do you need
that? You can use c_char.from_buffer
On Mon, Apr 17, 2017 at 9:06 PM, ASHISH A wrote:
>
> I could not launch IDLE and it gave me an error saying DLL file missing
> (attached snapshot).
python-list doesn't send attachments. Please do your best to
paraphrase error messages that can't be pasted as plain text.
> I have downloaded the D
Paul Rubin writes:
> Rurpy writes:
> > A couple weeks ago a frequent poster here (Steve D'Aprano
> > ) called another participant an "ugly
> > american"
>
> Oh stop trolling.
Paul, that is uncalled for. The charge of bigotry is not to be lightly
dismissed, and we do want to foster an environmen
Marko Rauhamaa wrote:
What I notice in my numbers is that about one half of my while loops are
"while True", and about a third of my loops are while loops.
Out of curiosity, what proportion of your 'while True' loops
are infinite? (I.e. no break, return or raise in the loop.)
--
Greg
--
https:
Ben Bacarisse writes:
> c = sys.stdin.read(1)
> while c == ' ':
> c = sys.stdin.read(1)
c = itertools.dropwhile(
lambda c: c==' ',
iter(lambda: sys.stdin.read(1),None)
).next()
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa writes:
> Ben Bacarisse :
>
>> Marko Rauhamaa writes:
>>> What I notice in my numbers is that about one half of my while loops
>>> are "while True", and about a third of my loops are while loops.
>>
>> I fo[u]nd the proportion on while True: loops surprising. Is there
>> something
On 04/17/2017 03:23 PM, Ben Finney wrote:
Paul Rubin writes:
Rurpy writes:
A couple weeks ago a frequent poster here (Steve D'Aprano)
called another participant an "ugly american"
Oh stop trolling.
Paul, that is uncalled for. The charge of bigotry is not to be lightly
dismissed, and we do
On 18/04/2017 01:23, Paul Rubin wrote:
Ben Bacarisse writes:
c = sys.stdin.read(1)
while c == ' ':
c = sys.stdin.read(1)
c = itertools.dropwhile(
lambda c: c==' ',
iter(lambda: sys.stdin.read(1),None)
).next()
I tried this but it doesn't like the .next.
I wanted t
Paul Rubin writes:
> Ben Bacarisse writes:
>> c = sys.stdin.read(1)
>> while c == ' ':
>> c = sys.stdin.read(1)
(for the record: I was not suggesting this was how you'd do it but how
you'd be forced to do it in some languages)
> c = itertools.dropwhile(
> lambda c: c==' ',
>
Ben Bacarisse writes:
> ? I get "AttributeError: 'itertools.dropwhile' object has no attribute
> 'next'" from your example.
Hmm, .next() worked ok for me in Python 2.7.5. Not sure what happened.
Maybe something went wrong with my paste. Oh well.
> Coming from the lazy language Haskell, I find
On 04/17/2017 02:49 PM, eryk sun wrote:
On Mon, Apr 17, 2017 at 5:58 PM, Rob Gaddi
wrote:
buffertype = c_uint8 * size
return addressof(buffertype.from_buffer(buf, offset))
works but is inefficient and woefully inelegant.
A lot of the cost there is in creating buffertype, but why do you need
On 2017-04-18 02:09, Paul Rubin wrote:
Ben Bacarisse writes:
? I get "AttributeError: 'itertools.dropwhile' object has no attribute
'next'" from your example.
Hmm, .next() worked ok for me in Python 2.7.5. Not sure what happened.
Maybe something went wrong with my paste. Oh well.
Coming
On Tue, Apr 18, 2017 at 1:37 AM, MRAB wrote:
> In Python 3 it's:
>
> c = next(itertools.dropwhile(
> lambda c: c==' ',
> iter(lambda: sys.stdin.read(1),None)
> ))
iter's sentinel should be an empty string.
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 18 Apr 2017 08:23:34 +1000, Ben Finney wrote:
> Paul Rubin writes:
>
>> Rurpy writes:
>> > A couple weeks ago a frequent poster here (Steve D'Aprano
>> > ) called another participant an "ugly
>> > american"
>>
>> Oh stop trolling.
>
> Paul, that is uncalled for. The charge of bigotry i
On 4/17/2017 5:06 PM, ASHISH A wrote:
Hi Team,
I have a 64 bit system with Windows 801 Pro OS. I tried to install Python
3.6.1 from the below link :
https://www.python.org/downloads/
It automatically downloaded that 32 bit Python application and tried to
launch IDLE (32 bit). I could not launch
On 04/17/2017 04:38 AM, Ben Finney wrote:
> Rurpy via Python-list writes:
>
>> A couple weeks ago a frequent poster here (Steve D'Aprano
>> ) called another participant an "ugly
>> american" [*1].
>
> He gave no explicit reference, and so I can see why you would think he
> did what you describe.
Off topic, but I find it a little annoying that the default Windows
installer links to the 32-bit installer (and there's no adjacent 64-bit
installer link) - you have to dive into various links to get the 64-bit
installer. Seeing as 64-bit Windows is now the norm, it should be the
default. (It is p
On 04/17/2017 08:19 PM, Wildman via Python-list wrote:
> On Tue, 18 Apr 2017 08:23:34 +1000, Ben Finney wrote:
>> Paul Rubin writes:
>>> Rurpy writes:
A couple weeks ago a frequent poster here (Steve D'Aprano
) called another participant an "ugly
american"
>>>
>>> Oh stop trolling.
Gregory Ewing :
> Marko Rauhamaa wrote:
>> What I notice in my numbers is that about one half of my while loops
>> are "while True", and about a third of my loops are while loops.
>
> Out of curiosity, what proportion of your 'while True' loops are
> infinite? (I.e. no break, return or raise in th
On Mon, 17 Apr 2017 08:52 pm, Steve D'Aprano wrote:
> but research does continue into using gradual typing for optimizations:
>
> http://dl.acm.org/citation.cfm?id=2069175
Another interesting research project into speeding up Jython using type
hints:
http://scholar.colorado.edu/ecen_gradetds/57
On Tuesday, April 18, 2017 at 6:18:06 AM UTC+5:30, Ethan Furman wrote:
> On 04/17/2017 03:23 PM, Ben Finney wrote:
> > Paul Rubin writes:
> >> Rurpy writes:
>
> >>> A couple weeks ago a frequent poster here (Steve D'Aprano)
> >>> called another participant an "ugly american"
> >>
> >> Oh stop trol
Ben Bacarisse :
> Python opts for
>
> while True:
> c = sys.stdin.read(1)
> if c != ' ': break
I opt for that in C and bash as well.
In fact, when I start writing a loop, I first type:
while True:
Once it is done, I might notice that the loop begins:
while True:
Rustom Mody :
> On Tuesday, April 18, 2017 at 6:18:06 AM UTC+5:30, Ethan Furman wrote:
>> You mean all the non-religious people?
>>
>> Because some of your signatures don't feel welcoming to people of
>> faith:
>
> Thanks Ethan for bullseyeing the problem to the leftie-libbie lie
> called 'secula
On Tuesday, April 18, 2017 at 2:09:19 AM UTC+1, Paul Rubin wrote:
> Ben Bacarisse writes:
> > ? I get "AttributeError: 'itertools.dropwhile' object has no attribute
> > 'next'" from your example.
>
> Hmm, .next() worked ok for me in Python 2.7.5. Not sure what happened.
> Maybe something went wr
On Monday, April 17, 2017 at 10:11:58 AM UTC+1, Rurpy wrote:
> A couple weeks ago a frequent poster here (Steve D'Aprano) called another
> participant an "ugly american" [*1]. This was followed just a couple weeks
> later with another post from Mr. D'Aprano attacking a participant as "an old
>
Ethan Furman writes:
> You mean all the non-religious people?
No, I don't mean that.
> So you're okay with respectfully making people of faith feel
> unwelcome?
No, I'm not okay with that. As I said privately to you, the examples you
cite do not demonstrate disrespect to *people*.
They are di
Steve D'Aprano wrote:
I'm not sure why the Cython devs maintain this is not a JIT compiler.
Perhaps I misunderstand something.
A JIT compiler works by observing the actual values taken on
by variables at run time, and if it notices that a particular
variable seems to always have a particular ty
Wildman via Python-list writes:
> "The seriousness of the charge mandates that we investigate
> this. Even though there is no evidence, the seriousness of
> the charge is what matters."
> --Tom Foley (D) Speaker of the House
That sounds right to me, provided one reads “there is no evidence” as
Am 18.04.17 um 02:18 schrieb Ben Bacarisse:
Thanks (and to Grant). IO seems to be the canonical example. Where
some languages would force one to write
c = sys.stdin.read(1)
while c == ' ':
c = sys.stdin.read(1)
Python opts for
while True:
c = sys.stdin.read(1)
if c !=
On Tue, Apr 18, 2017 at 4:06 PM, Christian Gollwitzer wrote:
> Am 18.04.17 um 02:18 schrieb Ben Bacarisse:
>
>> Thanks (and to Grant). IO seems to be the canonical example. Where
>> some languages would force one to write
>>
>> c = sys.stdin.read(1)
>> while c == ' ':
>> c = sys.stdin.
Christian Gollwitzer :
> Am 18.04.17 um 02:18 schrieb Ben Bacarisse:
>> Python opts for
>>
>> while True:
>> c = sys.stdin.read(1)
>> if c != ' ': break
>
> This loop would be the archetypical do..while or repeat...until to me.
>
> do
> c = sys.stdin.read(1)
> while c== ' '
No,
69 matches
Mail list logo