As requested:
www.guardyannet.com.br
www.tra.web.pt
http://www.cita.es/veracidad/expolingua/Brasil
http://www.collegeboard.com/csearch/majors_careers/profiles/careers/105464.html
http://www.guardyannet.com.br/
http://www.guiagratis.com.br/
http://www.clubedoprofessor.com.br/traduz/
http://poloclup.
.org/mailman/listinfo/python-list
>
>
--
George R. C. Silva
Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net
--
http://mail.python.org/mailman/listinfo/python-list
t;
> Fred
> Email: info_at_killetsoft.de
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
George R. C. Silva
Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net
--
http://mail.python.org/mailman/listinfo/python-list
want
> to thank Dr. Carla Moreira, chief surgical resident, who spent the
> last few hours of John's life with us despite having just completed a
> solid night shift of surgical work. Instead of resting she came to
> the ICU and worked to ensure that those last hours were as comfortable
> as possible for John; her generous actions helped us through a very
> difficult moment.
>
> It is now time to close this already too long message...
>
> John, thanks for everything you gave all of us, and for the privilege
> of knowing you.
>
> Fernando.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
George R. C. Silva
Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net
--
http://mail.python.org/mailman/listinfo/python-list
** **
>>
>> Mind the road, not your business.
>>
>> [image: Logo]
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
George R. C. Silva
Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net
<>--
http://mail.python.org/mailman/listinfo/python-list
hundred twenty nine", 50: "fifty"}
But i need dict sort :
{ 50: "fifty", 129: "a hundred twenty nine"}
How can i do this ?
Thanks,
Glauco Buzini da Costa Silva
--
http://mail.python.org/mailman/listinfo/python-list
Shriram Krishnamurthi has just announced the following elsewhere; it might
be of interest to c.l.s, c.l.f, and c.l.p:
http://list.cs.brown.edu/pipermail/plt-scheme/2005-April/008382.html
The Fate Of LAMBDA in PLT Scheme v300
or
La
Hi,
I´m with problem to create a executable program in
python.
I´m using py2exe but i don´t know if it´s
right.
My setup.py:
from distutils.core import setupimport
py2exefrom glob import glob
setup( # The first three
parameters are not required, if at least a # 'version' is
given
Hi,
I´m with problem to create a executable program in
python.
I´m using py2exe but i don´t know if it´s
right.
My setup.py:
from distutils.core import setupimport
py2exefrom glob import glob
setup( # The first three
parameters are not required, if at least a # 'version' is
give
Hi,
I´m with problem to create a executable program in
python.
I´m using py2exe but i don´t know if it´s
right.
When i run in prompt "python setup.py py2exe",
appear in the end this:
###
The following modules appear to be missing[
'_imaging_gif','libVTKCommonPython', 'libVTKCon
ay just have fewer
> > "options" for how to notate basic data.
>
> JSON corresponds much more closely to Python data types, but
> converting from one to the other can't improve matters any.
>
> ChrisA
> --
> https://mail.python.org/mailman/li
tand that he has yet to master the
> intricacies of pip, but I'm sure that'll come with practice, or has he
> given up?
>
>
> --
> My fellow Pythonistas, ask not what our language can do for you, ask what
> you can do for our language.
>
> Mark Lawrence
>
> ---
&g
> I assume any sane editor has similar functionality. I see my coworkers
> using vim, sublime, eclipse, and X-code. They all appear to do these
> things, and I would thus classify any of them as sane editors. I'm sure
> there are others. If the tool you're (in the generic sense of "you")
> usin
ference
> I am trying to find the topological overlap of that data
>
> I have been searching for any sample in python but i dont seem to find
> any.
>
> Any suggestion in start with are appreciated
>
>
> Thanks
> Lav
>
> --
> https://mail.python.org/mailman/li
seems
> to describe a number of code refactorings which aren't available for Python
> code. For example, I don't see an "invert boolean" refactoring.
>
> How useful is PyCharm's refactoring subsystem?
>
> Thx,
>
> Skip
>
>
> --
>
Hi folks,
I have a need in a network data distribution application to send out
data to folks who want it using the protocol of their choice. I´d
like it to support a variety of protocols and I don´t want to
implement any of them :-)
http, ftp (via ftplib) , https (dunno how yet), ssl, ssh, sftp
I looked at twisted briefly. It looks like it is server oriented.
Does it work in for clients initiating connections?
Jean-Paul Calderone wrote:
> On 16 Jun 2006 13:53:48 -0700, Peter Silva <[EMAIL PROTECTED]> wrote:
> >Hi folks,
> >
> >I have a need in a network da
Cool! Will check it out...
Alex Martelli wrote:
> Peter Silva <[EMAIL PROTECTED]> wrote:
>
> > I looked at twisted briefly. It looks like it is server oriented.
> > Does it work in for clients initiating connections?
>
> Twisted supports clients, servers, and
when i creat a RadioButton and put a command =
self.Function , this function is called in the creation of
RadioButton.
It´s right this or it´s wrong ?
Thank you
Glauco
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.1 - Release Da
27;Function' is call. And i don´t want this.
What´s wrong ?
Thank you
Glauco
- Original Message -
From: "Delaney, Timothy C (Timothy)" <[EMAIL PROTECTED]>
To: "Glauco Silva" <[EMAIL PROTECTED]>;
Sent: Monday, May 02, 2005 8:50 PM
Subject: RE: problem in th
David Daniels" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, May 03, 2005 11:21 AM
Subject: Re: problem in the compiler ?
Glauco Silva wrote:
> python : 2.3.5
> os: win 2K
This part is good enough (though sometimes it helps to mention the
service pack number
on windows systems
)
self.myButton.pack()
...
self.myButton.invoke('C1')
-
- Original Message -
From: "Delaney, Timothy C (Timothy)" <[EMAIL PROTECTED]>
To: "Glauco Silva" <[EMAIL PROTECTED]>;
Sent: Wednes
You can try this :
>>> l = [(2001, 5, 2),(2111,3,3),(1984, 3, 1), (2001, 1, 1)]
>>> l.sort(lambda x = l[0],y = l[1] : cmp((x[1],x[2]),(y[1],y[2])))
- Original Message -
From: "Volker Grabsch" <[EMAIL PROTECTED]>
To:
Sent: Saturday, May 14, 2005 7:09 AM
Subject: Multiple "cmp"s chained on
Hi,
I would like to request your attention for this very specific issue:
I have several classes in Python, and now I want simply re-use it, in
other language.
The closest to solution I think I came was with this site:
http://www.py2exe.org/index.cgi/Py2exeAndCtypesComExeServer?highlight=%28%28P
Hi,
I would like to request your attention for this very specific issue:
I have several classes in Python, and now I want simply re-use it, in
other language.
The closest to solution I think I came was with this site:
http://www.py2exe.org/index.cgi/Py2exeAndCtypesComDllServer
but I not able to
. I'm not sure what to call it. I
> don't think it's inheritance. Maybe there is no official thing here
> and I just need to brute force my way through it. Is there some
> programming methodology I should be using?
>
> Thanks
> --
> http://mail.python.org/mailman/l
e speeds, and the placement and speed relative to the
observers.
(Oh, and also that any processor used to cruch numbers related to these
observations isn't an Intel Pentium.)
--
Nuno Silva
--
https://mail.python.org/mailman3//lists/python-list.python.org
S, which was indeed contracted to a different manufacturer and
designed independently of PASS, on purpose.
The OV avionics are described as FO/FS, Fail Operational / Fail Safe. If
there is disagreement or fluctuation, you can do e.g. majority vote. If
one is deemed bad, the same is still possible with the remaining three
(hence the "Fail Operational"). Then if a second one fails, you can't
use the nominal approach anymore.
--
Nuno Silva
--
https://mail.python.org/mailman3//lists/python-list.python.org
Em 01-02-2012 01:39, Paulo da Silva escreveu:
> Hi!
>
> What is the best way to iterate thru a huge list having the 1st element
> a different process? I.e.:
>
> process1(mylist[0])
> for el in mylist[1:]:
> process2(el)
>
> This way mylist is almost duplicat
Em 01-02-2012 03:16, Paulo da Silva escreveu:
> Em 01-02-2012 01:39, Paulo da Silva escreveu:
>> Hi!
>>
>> What is the best way to iterate thru a huge list having the 1st element
>> a different process? I.e.:
>>
>> process1(mylist[0])
>> for el in my
Em 01-02-2012 04:55, Cameron Simpson escreveu:
> On 01Feb2012 03:34, Paulo da Silva wrote:
> | BTW, iter seems faster than iterating thru mylist[1:]!
>
> I would hope the difference can be attributed to the cost of copying
> mylist[1:].
I don't think so. I tried s
Hi all.
I have a python extension (bindings for a C lib - no swig) and I would
like to write a setup.py to build a source distribution pack.
The extension consists of 3 files:
foo.h
foo.c
foo.py
that are placed in a eclipse directory
/home//ECLIPSE/workspace/ext/src
foo.h+foo.c are to be compile
If you want it as an int:
random.randint(10, 99)
Or as a string:
s = '%06d' % random.randint(0, 99)
On Mon, Mar 26, 2012 at 2:08 AM, Nikhil Verma wrote:
> Hi All
>
> How can we generate a 6 digit random number from a given number ?
>
> eg:-
>
> def number_generator(id):
> rando
Hi all.
I want to have dates as major ticks labels of X axis.
This fragment of code works fine except that I need more dates to appear
instead the 6 I am getting. The number of dates in dtsd is for ex. 262.
Thanks for any help.
BTW, I got most of this code from some site on the internet.
...
Às 09:17 de 10-01-2018, Thomas Jollans escreveu:
On 2018-01-10 05:22, Paulo da Silva wrote:
Hi all.
...
It's a bit hard to tell without a working example, but I think you'll
want to set a tick locator, e.g. something like
ax0.xaxis.set_major_locator(matplotlib.ticker.Multipl
Hi all!
I'm having the following problem. Consider the code (the commented or
the not commented which I think do the same things):
#for col in missing_cols:
#df[col] = np.nan
df=df.copy()
df[missing_cols]=np.nan
df has about 2 cols and len(missing_cols) is about 18000.
I'm getting l
Às 16:40 de 20/06/22, Dennis Lee Bieber escreveu:
On Mon, 20 Jun 2022 15:54:29 +0100, Paulo da Silva
declaimed the following:
Às 15:07 de 19/06/22, jan Anja escreveu:
Dude, it's called CPython for a reason.
IMHO CPython means Core Python, not C Python.
It is, as I recall, a
Às 15:07 de 19/06/22, jan Anja escreveu:
Dude, it's called CPython for a reason.
IMHO CPython means Core Python, not C Python.
--
https://mail.python.org/mailman/listinfo/python-list
Às 18:19 de 20/06/22, Stefan Ram escreveu:
The same personality traits that make people react
to troll postings might make them spread unconfirmed
ideas about the meaning of "C" in "CPython".
The /core/ of CPython is written in C.
CPython is the /canonical/ implementation of Pyth
Às 20:01 de 20/06/22, Paulo da Silva escreveu:
Às 18:19 de 20/06/22, Stefan Ram escreveu:
The same personality traits that make people react
to troll postings might make them spread unconfirmed
ideas about the meaning of "C" in "CPython".
The /core/ of CPy
Às 03:20 de 21/06/22, MRAB escreveu:
On 2022-06-21 02:33, Chris Angelico wrote:
On Tue, 21 Jun 2022 at 11:13, Paulo da Silva
wrote:
Às 20:01 de 20/06/22, Paulo da Silva escreveu:
> Às 18:19 de 20/06/22, Stefan Ram escreveu:
>> The same personality traits that make people react
Às 02:33 de 21/06/22, Chris Angelico escreveu:
On Tue, 21 Jun 2022 at 11:13, Paulo da Silva
wrote:
Às 20:01 de 20/06/22, Paulo da Silva escreveu:
Às 18:19 de 20/06/22, Stefan Ram escreveu:
The same personality traits that make people react
to troll postings might make them spread
Hi!
I implemented a part of a script to subtract n months from datetime.
Basically I subtracted n%12 from year and n//12 from the month adding 12
months when it goes<=0. Then used try when converting to datetime again.
So, if the day is for example 31 for a 30 days month it raises a
ValuError
me(*dtnow_t)
Any comments are welcome.
Thank you.
Paulo
On Tue, 2022-06-21 at 05:29 +0100, Paulo da Silva wrote:
Hi!
I implemented a part of a script to subtract n months from datetime.
Basically I subtracted n%12 from year and n//12 from the month adding
12
months when it goes<=0. Then used
Às 05:29 de 21/06/22, Paulo da Silva escreveu:
As a general response to some comments ...
Suppose we need to delete records from a database older than ...
Today, it's usual to specify days. For example you have to keep some gov
papers for 90 days. This seems to come from computers era. I
Às 20:25 de 22/06/22, Barry Scott escreveu:
On 22 Jun 2022, at 17:59, Paulo da Silva
wrote:
Às 05:29 de 21/06/22, Paulo da Silva escreveu:
As a general response to some comments ...
Suppose we need to delete records from a database older than ...
Today, it's usual to specify days
Às 19:47 de 22/06/22, Marco Sulla escreveu:
The package arrow has a simple shift method for months, weeks etc
https://arrow.readthedocs.io/en/latest/#replace-shift
At first look it seems pretty good! I didn't know it.
Thank you Marco.
Paulo
--
https://mail.python.org/mailman/listinfo/python-l
Hi!
The simple question: How do I find the full path of a shell command
(linux), i.e. how do I obtain the corresponding of, for example,
"type rm" in command line?
The reason:
I have python program that launches a detached rm. It works pretty well
until it is invoked by cron! I suspect that f
Às 05:00 de 12/10/22, Paulo da Silva escreveu:
Hi!
The simple question: How do I find the full path of a shell command
(linux), i.e. how do I obtain the corresponding of, for example,
"type rm" in command line?
The reason:
I have python program that launches a detached rm. It wo
Às 17:22 de 12/10/22, Tilmann Hentze escreveu:
Paulo da Silva schrieb:
I have python program that launches a detached rm. It works pretty well
until it is invoked by cron! I suspect that for cron we need to specify
the full path.
Probably you could use os.unlink[1] with no problem.
No
Às 20:16 de 12/10/22, [email protected] escreveu:
On 2022-10-12 at 17:43:18 +0100,
Paulo da Silva wrote:
Às 17:22 de 12/10/22, Tilmann Hentze escreveu:
Paulo da Silva schrieb:
I have python program that launches a detached rm. It works pretty well
until it is invoked by
Às 19:14 de 12/10/22, Jon Ribbens escreveu:
On 2022-10-12, Paulo da Silva wrote:
Às 05:00 de 12/10/22, Paulo da Silva escreveu:
Hi!
The simple question: How do I find the full path of a shell command
(linux), i.e. how do I obtain the corresponding of, for example,
"type rm" in co
Às 20:09 de 12/10/22, Antoon Pardon escreveu:
Op 12/10/2022 om 18:49 schreef Paulo da Silva:
Às 05:00 de 12/10/22, Paulo da Silva escreveu:
Hi!
The simple question: How do I find the full path of a shell command
(linux), i.e. how do I obtain the corresponding of, for example,
"type r
Às 22:38 de 12/10/22, Jon Ribbens escreveu:
On 2022-10-12, Jon Ribbens wrote:
On 2022-10-12, Paulo da Silva wrote:
Às 19:14 de 12/10/22, Jon Ribbens escreveu:
On 2022-10-12, Paulo da Silva wrote:
Às 05:00 de 12/10/22, Paulo da Silva escreveu:
Hi!
The simple question: How do I find the
Às 05:00 de 12/10/22, Paulo da Silva escreveu:
Hi!
The simple question: How do I find the full path of a shell command
(linux), i.e. how do I obtain the corresponding of, for example,
"type rm" in command line?
The reason:
I have python program that launches a detached rm. It wo
Hi all!
What is the correct way, if any, of documenting a function/method?
1.
def foo(a,b):
""" A description.
a: Whatever 1
b: Whatever 2
"""
...
2.
def foo(a,b):
""" A description.
a -- Whatever 1
b -- Whatever 2
"""
Hello!
I am in the process of "typing" of some of my scripts.
Using it should help a lot to avoid some errors.
But this is new for me and I'm facing some problems.
Let's I have the following code (please don't look at the program content):
f=None # mypy naturally assumes Optional(int) because
Às 21:58 de 22/10/22, Paulo da Silva escreveu:
Hi all!
What is the correct way, if any, of documenting a function/method?
Thank you all for the, valuable as usual, suggestions.
I am now able to make my choices.
Paulo
--
https://mail.python.org/mailman/listinfo/python-list
Às 21:36 de 23/10/22, Paulo da Silva escreveu:
Hello!
I am in the process of "typing" of some of my scripts.
Using it should help a lot to avoid some errors.
But this is new for me and I'm facing some problems.
Let's I have the following code (please don't look at the
Às 23:56 de 23/10/22, Cameron Simpson escreveu:
On 23Oct2022 21:36, Paulo da Silva
wrote:
I am in the process of "typing" of some of my scripts.
Using it should help a lot to avoid some errors.
But this is new for me and I'm facing some problems.
Let's I have the followin
Hi!
Consider this simple script ...
___
from typing import List, Optional
class GLOBALS:
foos=None
class Foo:
def __init__(self):
pass
class Foos:
Foos: List[Foo]=[]
# SOME GLOBALS ARE USED HERE in a real script
def __init__(self):
pass
G
rote:
Do you want the following?
```
from typing import List, Optional
class GLOBALS:
foos: Optional[Foos] = None
class Foo:
def __init__(self):
pass
class Foos:
Foos: List[Foo] = []
def __init__(self):
pass
GLOBALS.foos = Foos()
```
Kind regards,
Sam
Às 02:32 de 30/10/22, dn escreveu:
On 30/10/2022 11.59, Paulo da Silva wrote:
Solution (below) will not work if the mention of Foos in GLOBALS is a
forward-reference. Either move GLOBALS to suit, or surround "Foos"
with quotes.
This is the problem for me. So far, without typing, I us
Às 01:14 de 30/10/22, Thomas Passin escreveu:
On 10/29/2022 1:45 PM, Paulo da Silva wrote:
Hi!
Consider this simple script ...
___
from typing import List, Optional
class GLOBALS:
foos=None
class Foo:
def __init__(self):
pass
class Foos:
Foos: List
Às 10:26 de 30/10/22, Peter J. Holzer escreveu:
On 2022-10-29 23:59:44 +0100, Paulo da Silva wrote:
Às 22:34 de 29/10/22, dn escreveu:
Solution (below) will not work if the mention of Foos in GLOBALS is a
forward-reference.
Either move GLOBALS to suit, or surround "Foos" w
Às 22:34 de 29/10/22, dn escreveu:
Out of interest, tested snippet in PyCharm, cf native-mypy. It flags the
original:
GLOBALS.foos: Optional[Foos]=Foos()
but not the fall-back:
GLOBALS.foos=Foos()
Must admit, the first query coming to mind was: why is the typing taking
place at i
Às 17:06 de 30/10/22, Stefan Ram escreveu:
Paulo da Silva writes:
Is there anything to do without loosing my script structure and usual
practice?
to lose (losing): to stop having something
to loose (loosing): to let or make loose (see next line)
loose (adj.): not firmly attached
Às 21:08 de 31/10/22, Peter J. Holzer escreveu:
On 2022-10-30 11:26:56 +0100, Peter J. Holzer wrote:
On 2022-10-29 23:59:44 +0100, Paulo da Silva wrote:
The funny thing is that if I replace foos by Foos it works because it gets
known by the initial initialization
Hi!
And a typing problem again!!!
___
class C:
def __init__(self):
self.__foos=5*[0]
@property
def foos(self) -> list[int]:
return self.__foos
@foos.setter
def foos(self,v: int):
Às 03:24 de 03/11/22, Paulo da Silva escreveu:
Hi!
And a typing problem again!!!
___
class C:
def __init__(self):
self.__foos=5*[0]
@property
def foos(self) -> list[int]:
return self.__foos
@foos.setter
def f
Às 05:32 de 03/11/22, Paulo da Silva escreveu:
Às 03:24 de 03/11/22, Paulo da Silva escreveu:
Hi!
And a typing problem again!!!
___
class C:
def __init__(self):
self.__foos=5*[0]
@property
def foos(self) -> list[int]:
ret
Às 18:16 de 03/11/22, Chris Angelico escreveu:
On Fri, 4 Nov 2022 at 05:03, Paulo da Silva
wrote:
Changing def foos(self) -> list[int]: to
def foos(self) -> Union[list[int]]:
fixes the problem.
Not so elegant, however!
Wait, what?!
Union[X, Y] means "X or Y"
Union[X] mea
Às 07:55 de 03/11/22, dn escreveu:
On 03/11/2022 16.24, Paulo da Silva wrote:
class C:
def __init__(self):
self.__foos=5*[0]
@property
def foos(self) -> list[int]:
return self.__foos
@foos.setter
def foos(self,v: int):
self.__foos=[v for
Às 07:52 de 04/11/22, dn escreveu:
On 04/11/2022 07.50, Chris Angelico wrote:
On Fri, 4 Nov 2022 at 05:48, Paulo da Silva
wrote:
Às 05:32 de 03/11/22, Paulo da Silva escreveu:
Às 03:24 de 03/11/22, Paulo da Silva escreveu:
Hi!
And a typing problem again
Hi!
I need to debug a python3 script under root. I tried spyder but it does
not work.
Running as root without --no-sandbox is not supported. See
https://crbug.com/638180.
Thanks for any comments including alternative solutions to debug as root.
Paulo
--
https://mail.python.org/mailman/listinfo
Às 22:56 de 08/10/21, Paulo da Silva escreveu:
> Hi!
>
> I need to debug a python3 script under root. I tried spyder but it does
> not work.
>
> Running as root without --no-sandbox is not supported. See
> https://crbug.com/638180.
>
> Thanks for any comments includi
Hello!
Is there a better way of doing this?
Why didn't setattr (as commented) work?
Thanks for an help/comments.
class C:
def f(self,v):
#setattr(self,n,v)
self.__dict__['n']=v
c=C()
c.f(3)
print(c.n)
--
https://mail.python.org/mailman/listinfo/python-list
Às 23:28 de 10/10/21, Stefan Ram escreveu:
> Paulo da Silva writes:
>> class C:
>>def f(self,v):
>>#setattr(self,n,v)
>>self.__dict__['n']=v
>
>> Why didn't setattr (as commented) work?
>
> Because the name n has not
Às 22:54 de 11/10/21, Chris Angelico escreveu:
> On Tue, Oct 12, 2021 at 8:52 AM Paulo da Silva
> wrote:
>>
>> Hi!
>>
>> I need to debug a python3 script under root. I tried spyder but it does
>> not work.
>>
>> Running as root without --no-sa
Às 02:08 de 12/10/21, Michael Torrie escreveu:
> On 10/8/21 4:32 PM, Paulo da Silva wrote:
>> Às 22:56 de 08/10/21, Paulo da Silva escreveu:
>>> Hi!
>>>
>>> I need to debug a python3 script under root. I tried spyder but it does
>>> not work.
>&g
Às 16:16 de 14/10/21, Mats Wichmann escreveu:
> On 10/13/21 16:55, Michael Torrie wrote:
>> On 10/13/21 12:09 PM, Paulo da Silva wrote:
>>> spyder and eric are both python editors/debuggers! Why are they related
>>> with web browsers?!
>>
>> Good point. I w
Às 23:55 de 13/10/21, Michael Torrie escreveu:
> On 10/13/21 12:09 PM, Paulo da Silva wrote:
>> spyder and eric are both python editors/debuggers! Why are they related
>> with web browsers?!
>
> Good point. I was going off of the chromium bug report. My bad. I
> mis
Hi!
Why doesn't this work
if (self.ctr:=self.ctr-1)<=0:
while this works
if (ctr:=ctr-1)<=0:
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
Às 20:34 de 22/10/21, Chris Angelico escreveu:
> On Sat, Oct 23, 2021 at 6:24 AM Jon Ribbens via Python-list
> wrote:
>>
>> On 2021-10-22, Stefan Ram wrote:
>>> Paulo da Silva writes:
>>>> Why doesn't this work
>>>> if (self.ctr:=self
Hi!
How do I handle a SIGINT (or any other signal) avoid nesting?
Does this work?
class STATUS:
InInt=False
def SIGINT_handler(sn,f):
if STATUS.InInt: return
STATUS.InInt=True
process_int()
STATUS.InInt=False
Thanks for any suggestions.
Paulo
--
https:/
Às 21:55 de 10/11/21, Jon Ribbens escreveu:
> On 2021-11-10, Paulo da Silva wrote:
>> Hi!
>>
>> How do I handle a SIGINT (or any other signal) avoid nesting?
>
> I don't think you need to. Python will only call signal handlers in
> the main thread, so a hand
Às 06:22 de 11/11/21, Chris Angelico escreveu:
> On Thu, Nov 11, 2021 at 5:01 PM Jon Ribbens via Python-list
> wrote:
>>
>> On 2021-11-10, Paulo da Silva wrote:
>>> Hi!
>>>
>>> How do I handle a SIGINT (or any other signal) avoid nesting?
>>
Hello, I would like to report the following issue:
Working with floats i noticed that:
int(23.99/12) returns 1, and
int(23.999/12) returns 2
This implies that int() function is rounding, which doesn't appear to be
expected (documentation doesn't say anything about it). Lo
Hello!
Let's say I have a dir src containing another dir named foo and a script
test.py.
So, I have
src/foo (dir)
src/test.py (script)
test.py has the folloing code:
import foo as f
c=f.C()
I am inside src and want to run python test.py.
How can I create the class C inside src/foo dir if i
Às 02:01 de 05/02/22, Cameron Simpson escreveu:
On 05Feb2022 00:37, Paulo da Silva wrote:
Let's say I have a dir src containing another dir named foo and a
script test.py.
So, I have
src/foo (dir)
src/test.py (script)
test.py has the folloing code:
import foo as f
c=f.C()
I am insid
Hi!
Let's say I have two lists of equal length but with a variable number of
elements. For ex.:
l1=['a','b','c']
l2=['j','k','l']
I want to build a string like this
"foo a j, b k, c l bar"
Is it possible to achieve this with f strings or any other
simple/efficient way?
Thanks for any help
Às 02:17 de 09/02/22, Paulo da Silva escreveu:
Hi!
Let's say I have two lists of equal length but with a variable number of
elements. For ex.:
l1=['a','b','c']
l2=['j','k','l']
I want to build a string like this
"foo a
Hi all.
I am learning pandas DataFrame and I want to add (eventually replace by
index) some rows.
For adding here is what I tried:
>df = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list('ABCD'))
>df
A B C D
2013-01-01 -0.111621 1.126761 -2.4
Às 21:10 de 13-04-2016, Paulo da Silva escreveu:
> Hi all.
...
> [6 rows x 4 columns]
>
>> dft=pd.DataFrame([[1,2,3,4]],
> index=[datetime.date(2016,1,12)],columns=df.columns)
>
>> dft
> A B C D
> 2016-01-12 1 2 3 4
>
> [1 rows x 4 colu
Hi all.
I have seen this "trick" to create a hot vector.
In [45]: x
Out[45]: array([0, 1])
In [46]: y
Out[46]: array([1, 1, 1, 0, 0, 1, 0, 0], dtype=uint8)
In [47]: y[:,None]
Out[47]:
array([[1],
[1],
[1],
[0],
[0],
[1],
[0],
[0]], dtype=uint8)
Às 05:05 de 18-04-2016, Reto Brunner escreveu:
> Hi,
> It is called broadcasting an array, have a look here:
> http://docs.scipy.org/doc/numpy-1.10.1/user/basics.broadcasting.html
>
So, there are two broadcasts here.
OK.
Thanks.
--
https://mail.python.org/mailman/listinfo/python-list
Hi.
Why in this code fragment self.__name is not kept between pickle
dumps/loads? How to fix it?
Thanks.
import pickle
import pandas as pd
import numpy as np
class C(pd.DataFrame):
def __init__(self,name,*a,**b):
super(C,self).__init__(*a,**b)
self.__name
Às 22:43 de 21-04-2016, Paulo da Silva escreveu:
> Hi.
>
> Why in this code fragment self.__name is not kept between pickle
> dumps/loads? How to fix it?
>
> Thanks.
>
> import pickle
> import pandas as pd
> import numpy as np
>
> class C(pd.DataFrame):
&
Às 17:27 de 22-04-2016, Ian Kelly escreveu:
> On Thu, Apr 21, 2016 at 7:52 PM, Paulo da Silva
> wrote:
>> Às 22:43 de 21-04-2016, Paulo da Silva escreveu:
...
>
> Probably this is necessary because the DataFrame class is already
> customizing its pickle behavior without ta
Às 21:33 de 22-04-2016, Ian Kelly escreveu:
> On Fri, Apr 22, 2016 at 2:21 PM, Paulo da Silva
> wrote:
...
>
> If they start with two underscores then you could use the name
> mangling to find them. If the class name is MyClass then look for any
> keys in the instance di
1 - 100 of 320 matches
Mail list logo