EuroPython 2020: Find a new job at the conference

2020-07-17 Thread M.-A. Lemburg
We’d like to draw your attention to our job board, with plenty of job
ads from our sponsors:

   * EuroPython 2020 Job Board *

   https://ep2020.europython.eu/sponsor/job-board/

Our sponsors would love to get in touch with you, so please have a
look and visit them at their sponsor exhibit channel on Discord or
contact them via the links and email addresses given on the page.

Job ad emails
-

We will also send out job ad emails to attendees who have agreed to
receiving these emails. If you are interested, please log in, go to
your profile and enable the recruiting email option in the privacy
section:

https://ep2020.europython.eu/user-panel/privacy-settings/

Note that we will not give your email addresses to sponsors, but only
send out these emails on behalf of them.


Help spread the word


Please help us spread this message by sharing it on your social networks
as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/623783726150778880/europython-2020-find-a-new-j$

Tweet:

https://twitter.com/europython/status/1283720815146565632

Thanks,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/

-- 
https://mail.python.org/mailman/listinfo/python-list


Python pandas Excel

2020-07-17 Thread J Conrado












HI,


I have an excel file with several columns, the first day/month,/year and 
hour:



Data
01/11/2017 00:00
01/11/2017 03:00
01/11/2017 06:00
01/11/2017 09:00
01/11/2017 12:00
01/11/2017 15:00
01/11/2017 18:00
01/11/2017 21:00
02/11/2017 00:00
02/11/2017 03:00
02/11/2017 06:00
02/11/2017 09:00
02/11/2017 12:00
02/11/2017 15:00
02/11/2017 18:00
02/11/2017 21:00
03/11/2017 00:00
03/11/2017 03:00
03/11/2017 06:00
03/11/2017 09:00
03/11/2017 12:00
03/11/2017 15:00
03/11/2017 18:00
03/11/2017 21:00
04/11/2017 00:00
04/11/2017 03:00
04/11/2017 06:00
04/11/2017 09:00
04/11/2017 12:00
04/11/2017 15:00
04/11/2017 18:00
04/11/2017 21:00
05/11/2017 00:00
05/11/2017 03:00
05/11/2017 06:00
05/11/2017 09:00
05/11/2017 12:00
05/11/2017 15:00
05/11/2017 18:00
05/11/2017 21:00
06/11/2017 00:00
06/11/2017 03:00
06/11/2017 06:00
06/11/2017 09:00
06/11/2017 12:00
06/11/2017 15:00
06/11/2017 18:00
06/11/2017 21:00
07/11/2017 00:00
07/11/2017 03:00
07/11/2017 06:00
07/11/2017 09:00
07/11/2017 12:00
07/11/2017 15:00
07/11/2017 18:00
07/11/2017 21:00
08/11/2017 00:00
08/11/2017 03:00
08/11/2017 06:00
08/11/2017 09:00
08/11/2017 12:00
08/11/2017 15:00
08/11/2017 21:00
09/11/2017 00:00
09/11/2017 03:00
09/11/2017 06:00
09/11/2017 09:00
09/11/2017 12:00
09/11/2017 15:00
09/11/2017 18:00
09/11/2017 21:00
10/11/2017 00:00
10/11/2017 03:00
10/11/2017 06:00
10/11/2017 09:00
10/11/2017 12:00
10/11/2017 15:00
10/11/2017 18:00
10/11/2017 21:00
11/11/2017 00:00
11/11/2017 03:00
11/11/2017 06:00
11/11/2017 09:00
11/11/2017 12:00
11/11/2017 15:00
11/11/2017 18:00
11/11/2017 21:00
12/11/2017 00:00
12/11/2017 03:00
12/11/2017 06:00
12/11/2017 09:00
12/11/2017 12:00
12/11/2017 15:00
12/11/2017 18:00
12/11/2017 21:00
13/11/2017 00:00
13/11/2017 03:00
13/11/2017 06:00
13/11/2017 09:00
13/11/2017 12:00
13/11/2017 15:00
13/11/2017 18:00
13/11/2017 21:00
14/11/2017 00:00
14/11/2017 03:00
14/11/2017 06:00
14/11/2017 09:00
14/11/2017 12:00
14/11/2017 15:00
14/11/2017 18:00
14/11/2017 21:00
15/11/2017 00:00
15/11/2017 03:00
15/11/2017 06:00
15/11/2017 09:00
15/11/2017 12:00
15/11/2017 15:00
15/11/2017 18:00
15/11/2017 21:00
16/11/2017 00:00
16/11/2017 03:00
16/11/2017 06:00
16/11/2017 09:00
16/11/2017 12:00
16/11/2017 15:00
16/11/2017 18:00
16/11/2017 21:00
17/11/2017 00:00
17/11/2017 03:00
17/11/2017 06:00
17/11/2017 09:00
17/11/2017 12:00
17/11/2017 15:00
17/11/2017 18:00
18/11/2017 00:00
18/11/2017 03:00
18/11/2017 06:00
18/11/2017 09:00
18/11/2017 12:00
18/11/2017 15:00
18/11/2017 18:00
18/11/2017 21:00
19/11/2017 00:00
19/11/2017 03:00
19/11/2017 06:00
19/11/2017 09:00
19/11/2017 12:00
19/11/2017 15:00
19/11/2017 18:00
19/11/2017 21:00
20/11/2017 00:00
20/11/2017 03:00
20/11/2017 06:00
20/11/2017 09:00
20/11/2017 12:00
20/11/2017 15:00
20/11/2017 18:00
20/11/2017 21:00
21/11/2017 00:00
21/11/2017 03:00
21/11/2017 06:00
21/11/2017 09:00
21/11/2017 12:00
21/11/2017 15:00
21/11/2017 18:00
22/11/2017 03:00
22/11/2017 06:00
22/11/2017 09:00
22/11/2017 12:00
22/11/2017 15:00
22/11/2017 18:00
22/11/2017 21:00
23/11/2017 00:00
23/11/2017 03:00
23/11/2017 06:00
23/11/2017 09:00
23/11/2017 12:00
23/11/2017 15:00
23/11/2017 18:00
23/11/2017 21:00
24/11/2017 00:00
24/11/2017 03:00
24/11/2017 06:00
24/11/2017 09:00
24/11/2017 12:00
24/11/2017 15:00
24/11/2017 18:00
24/11/2017 21:00
25/11/2017 00:00
25/11/2017 03:00
25/11/2017 06:00
25/11/2017 09:00
25/11/2017 12:00
25/11/2017 15:00
25/11/2017 18:00
25/11/2017 21:00
26/11/2017 00:00
26/11/2017 03:00
26/11/2017 06:00
26/11/2017 09:00
26/11/2017 12:00
26/11/2017 15:00
26/11/2017 18:00
26/11/2017 21:00
27/11/2017 03:00
27/11/2017 06:00
27/11/2017 09:00
27/11/2017 12:00
27/11/2017 15:00
27/11/2017 18:00
27/11/2017 21:00
28/11/2017 06:00
28/11/2017 09:00
28/11/2017 12:00
28/11/2017 15:00
28/11/2017 18:00
28/11/2017 21:00
29/11/2017 00:00
29/11/2017 03:00
29/11/2017 06:00
29/11/2017 09:00
29/11/2017 12:00
29/11/2017 15:00
29/11/2017 18:00
29/11/2017 21:00
30/11/2017 00:00
30/11/2017 03:00
30/11/2017 06:00
30/11/2017 09:00
30/11/2017 12:00
30/11/2017 15:00
30/11/2017 18:00
30/11/2017 21:00


This is the value tha a have using pandas:


print(data)


0 2017-01-11 00:00:00
1 2017-01-11 03:00:00
2 2017-01-11 06:00:00
3 2017-01-11 09:00:00
4 2017-01-11 12:00:00
  ...
228   2017-11-30 09:00:00
229   2017-11-30 12:00:00
230   2017-11-30 15:00:00
231   2017-11-30 18:00:00
232   2017-11-30 21:00:00

Please, how can I get four arrays for day, month, year and hour this 
column of my excel.



:


Conrado


--
https://mail.python.org/mailman/listinfo/python-list


Fake news Detect

2020-07-17 Thread Gazu
Hey Guys I am new to python and i am building a fake news detection system
my goal is that when some one post a news the system will check it by searching
that news on Web and find solution that whether that news is Fake or Not.
But the issue is that i have no idea how to search on Web or which algorithm
to use. However i know about web scrapping and other stuff,
so guys help me out on this by giving your remarks.
thanks in advance.
-- 
https://mail.python.org/mailman/listinfo/python-list


Web Developer | Job position at CMCC Foundation, Italy

2020-07-17 Thread CMCC Info

/Please, feel free to circulate //to anyone you think may be interested.///
--

Web Developer (code 11648*)* 

*Deadline: **23/08/2020*

The CMCC is taking into consideration the possibility to hire a 
talented, motivated and proactive Web Developer to support research and 
development activities.
This job announcement is a public invitation to express interest for the 
above mentioned CMCC Position.


 The location of reference is CMCC premises in Lecce, Italy.

The primary purposes for this position are to support the CMCC 
Communication and Media Office in the design, development, realization, 
and maintenance of websites and web-based products and initiatives that 
are aimed at:


- disseminating the CMCC’s scientific research and its outcomes
- exploring innovative languages to communicate climate science to a 
vast and diversified audience.


_The desired qualifications are:_

    Experience in WordPress websites, themes and plugins development 
and maintenance;
    Experience with web tools and languages like HTML, CSS3, SASS, 
JavaScript and PHP, SQL programming languages and good attitude to learn 
new tools and software languages and paradigms;

    Experience with Unix/Linux and MAC OS Systems;
    Experience with computer graphics software: raster and vector graphic;
    Experience with development tools (github, docker, pipelines 
building tools);
    Experience with remote collaboration and office tools like GSuite 
and good attitude in working with teams;

    Fluency in English language;
    Attitude to work remotely and availability to take part in meeting 
in presence and in videoconference;

    Willing to travel in Italy and abroad.

_Appreciated qualifications and skills:_

    Competencies in sysadmin tasks for GNU/Linux systems;
    Experience with frontend frameworks and libraries (like React, 
jQuery, d3.js);

    Experience of devops tools like terraform, ansible;
    Experience with cloud services providers (AWS, Google Cloud);
    Experience with backend environments like Node.js;
    Experience with the Clojure/ClojureScript language.

Belonging to legally protected categories (ex L. 68/99) will constitute 
a preferential condition.


The initial appointment is for 12 months starting from September 2020 at 
an annual salary ranging from 20K to 30K Euros, comprehensive of 
benefits, depending on qualification and experience.


*How to Apply*
Applicants should register to CMCC JAM (Job Application Manager) website 
and fill the online form following the link below:

http://jam.cmcc.it/careers/apply/11648/

--

Fondazione Centro Euro-Mediterraneo sui Cambiamenti Climatici
Web: www.cmcc.it  - Contact us: [email protected] 



--
https://mail.python.org/mailman/listinfo/python-list


Issues in downloading python

2020-07-17 Thread Shanmika Sugavaneswaran
Though I install the setup , I couldn’t find Python in my system . I don’t know 
what cause the problem. Please help me!



Sent from Mail for Windows 10

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Issues in downloading python

2020-07-17 Thread Abhiram R
It's most likely because you haven't added Python to your environment PATH
variable.

The easiest path forward is to uninstall it from Applications and then when
you reinstall, tick the option on the bottom of the first splash screen of
the installer. It will add Python to your PATH variable automatically and
you should be able to access it from CMD after that.

Regards
Abhiram R 

On Fri, Jul 17, 2020 at 10:28 PM Shanmika Sugavaneswaran <
[email protected]> wrote:

> Though I install the setup , I couldn’t find Python in my system . I don’t
> know what cause the problem. Please help me!
>
>
>
> Sent from Mail for
> Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
-Abhiram R
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Fake news Detect

2020-07-17 Thread Steve
I posted a request for assistance about a week ago, no response.  I also see
very little traffic here, less than there used to be.  Has something gone
wrong with my set up?



Footnote:
There's 99 bugs in the code, in the code.
99 bugs in the code.
Take one down and patch it all around.
Now there's 117 bugs in the code.

-Original Message-
From: Python-list  On
Behalf Of Gazu
Sent: Friday, July 17, 2020 12:02 PM
To: [email protected]
Subject: Fake news Detect

Hey Guys I am new to python and i am building a fake news detection system
my goal is that when some one post a news the system will check it by
searching that news on Web and find solution that whether that news is Fake
or Not.
But the issue is that i have no idea how to search on Web or which algorithm
to use. However i know about web scrapping and other stuff, so guys help me
out on this by giving your remarks.
thanks in advance.
--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Issues in downloading python

2020-07-17 Thread Daley Okuwa via Python-list
 on linux or windows
On Friday, 17 July 2020, 17:57:01 BST, Shanmika Sugavaneswaran 
 wrote:  
 
 Though I install the setup , I couldn’t find Python in my system . I don’t 
know what cause the problem. Please help me!



Sent from Mail for Windows 10

-- 
https://mail.python.org/mailman/listinfo/python-list  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Issues in downloading python

2020-07-17 Thread Mats Wichmann
On 7/17/20 11:09 AM, Abhiram R wrote:
> It's most likely because you haven't added Python to your environment PATH
> variable.
> 
> The easiest path forward is to uninstall it from Applications and then when
> you reinstall, tick the option on the bottom of the first splash screen of
> the installer. It will add Python to your PATH variable automatically and
> you should be able to access it from CMD after that.
> 
> Regards
> Abhiram R 

The Python Launcher exists for this purpose.  Otherwise, as Abhiram
notes, you have to add to PATH, which on Windows is a bit of an
irritant, because that path entry will change as the Python version
changes (e.g. when you change from 3.8 to 3.9 you'll have a different
default path location). Try locating Python by using the command

py

in a command shell (or in PowerShell).


-- 
https://mail.python.org/mailman/listinfo/python-list


An I connected here?

2020-07-17 Thread Steve
Sorry folks, I really messed that one up.  I tried to doctor up a reply to
get the address correct but failed to delete enough to own the message...

My message did not have anything to do with the "Fake News Detect" subject. 

I posted a request for assistance about a week ago, no response.  I also see
very little traffic here, less than there used to be.  Has something gone
wrong with my set up?

My goof, sorry about that.


Footnote:
There's 99 bugs in the code, in the code.
99 bugs in the code.
Take one down and patch it all around.
Now there's 117 bugs in the code.

-- 
https://mail.python.org/mailman/listinfo/python-list


about the function in class

2020-07-17 Thread xuanwu348
Hi, all


There are some methods to define functions in a class, include member 
functions, static method, class method. 


My question is that which type of function for  "decorate(f),diff_con(f)" 


I think these functions all were  belong to member function, (f <-->self) f can 
be replace by self.


but how to explain "decorate(f)", "@decorate(f)"
if f == self; then in wrapper function: res = self(*args, **kwargs)
and self means Diff_methods("somgthing") <==> Diff_methods("somgthing")(*args, 
**kwargs)
But it's not correct. 


thanks
lass Diff_methods:

def __init__(self, something):
self.something = something

def decorate(f):
@wraps(f)
def wrapper(*args, **kwargs):
start_time = time.time()
res = f(*args, **kwargs)
elapse = time.time() - start_time
return res, elapse
return wrapper

def diff_con(f):
print(f.something)
@decorate
def member_function(self, n):
return 2 << n

@staticmethod
def static_function():
pass

@classmethod
def class_method(cls):
pass

if __name__ == "__main__":

s = Diff_methods("something")
print(s.member_function(10))
s.diff_con()

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fake news Detect

2020-07-17 Thread Reto
What you want is called "natural language processing" and whole research papers
have been written about this topic.

Search your favorite research paper index for those keywords, say google 
scholar.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: An I connected here?

2020-07-17 Thread Rhodri James

On 17/07/2020 19:33, Steve wrote:

Sorry folks, I really messed that one up.  I tried to doctor up a reply to
get the address correct but failed to delete enough to own the message...


Yeah, don't do that.  Just start a new message, otherwise you'll end up 
with all the threading for the old message thread, irritating those of 
us who sort by thread so that we aren't chopping and changing subject 
all the time :-/



My message did not have anything to do with the "Fake News Detect" subject.

I posted a request for assistance about a week ago, no response.  I also see
very little traffic here, less than there used to be.  Has something gone
wrong with my set up?


No, nothing's wrong.  I can't answer for anyone else and I can't recall 
your specific question, but I suspect you were asking about something I 
know nothing about and wasn't sufficiently intrigued to go find out about.


I think there are fewer experts with time lurking around here (and I 
don't count myself as one of those, TBH).  Recent controversies and the 
attempts to moderate them have probably upset quite a lot of people one 
way or another.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: An I connected here?

2020-07-17 Thread J. Pic
And Hollidays ;)

Le ven. 17 juil. 2020 à 21:03, Rhodri James  a écrit :

> On 17/07/2020 19:33, Steve wrote:
> > Sorry folks, I really messed that one up.  I tried to doctor up a reply
> to
> > get the address correct but failed to delete enough to own the message...
>
> Yeah, don't do that.  Just start a new message, otherwise you'll end up
> with all the threading for the old message thread, irritating those of
> us who sort by thread so that we aren't chopping and changing subject
> all the time :-/
>
> > My message did not have anything to do with the "Fake News Detect"
> subject.
> >
> > I posted a request for assistance about a week ago, no response.  I also
> see
> > very little traffic here, less than there used to be.  Has something gone
> > wrong with my set up?
>
> No, nothing's wrong.  I can't answer for anyone else and I can't recall
> your specific question, but I suspect you were asking about something I
> know nothing about and wasn't sufficiently intrigued to go find out about.
>
> I think there are fewer experts with time lurking around here (and I
> don't count myself as one of those, TBH).  Recent controversies and the
> attempts to moderate them have probably upset quite a lot of people one
> way or another.
>
> --
> Rhodri James *-* Kynesim Ltd
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: An I connected here?

2020-07-17 Thread Rhodri James

On 17/07/2020 20:12, J. Pic wrote:

And Hollidays ;)


Nah, that's next week ;-)



Le ven. 17 juil. 2020 à 21:03, Rhodri James  a écrit :


On 17/07/2020 19:33, Steve wrote:

Sorry folks, I really messed that one up.  I tried to doctor up a reply

to

get the address correct but failed to delete enough to own the message...


Yeah, don't do that.  Just start a new message, otherwise you'll end up
with all the threading for the old message thread, irritating those of
us who sort by thread so that we aren't chopping and changing subject
all the time :-/


My message did not have anything to do with the "Fake News Detect"

subject.


I posted a request for assistance about a week ago, no response.  I also

see

very little traffic here, less than there used to be.  Has something gone
wrong with my set up?


No, nothing's wrong.  I can't answer for anyone else and I can't recall
your specific question, but I suspect you were asking about something I
know nothing about and wasn't sufficiently intrigued to go find out about.

I think there are fewer experts with time lurking around here (and I
don't count myself as one of those, TBH).  Recent controversies and the
attempts to moderate them have probably upset quite a lot of people one
way or another.

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list






--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fake news Detect

2020-07-17 Thread Orges Leka
you could use scikit learn tfidf and svm or random forest.
for this you need labeled data ( fake news, no fake news) you could start
at Kaggle (natural language processing) if you are new to this.


Reto  schrieb am Fr., 17. Juli 2020, 20:49:

> What you want is called "natural language processing" and whole research
> papers
> have been written about this topic.
>
> Search your favorite research paper index for those keywords, say google
> scholar.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python pandas Excel

2020-07-17 Thread dn via Python-list

On 18/07/20 3:36 AM, J Conrado wrote:

HI,

I have an excel file with several columns, the first day/month,/year and 
hour:


Data
01/11/2017 00:00
01/11/2017 03:00

...

Please, how can I get four arrays for day, month, year and hour this 
column of my excel.



What do you have so-far?
How are you importing the Excel data into the Python environment?
Are you able to import a single cell's value, eg "01/11/2017 00:00"
Assuming the import produces a string, are you able to "slice" the 
string into the requisite components?

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: An I connected here?

2020-07-17 Thread Grant Edwards
On 2020-07-17, Rhodri James  wrote:
> On 17/07/2020 19:33, Steve wrote:
>
>> I posted a request for assistance about a week ago, no response.  I
>> also see very little traffic here, less than there used to be.  Has
>> something gone wrong with my set up?
>
> No, nothing's wrong.  I can't answer for anyone else and I can't recall 
> your specific question, but I suspect you were asking about something I 
> know nothing about and wasn't sufficiently intrigued to go find out about.

And if it's not clear from the subject line that it _is_ something
somebody knows/cares about, then that somebody is unlikely to read the
body of the message.

Subject lines like "help me please" or "Python doesn't work" or "An I
connected here" are likely to be ignored by most of the people who
probably know how to help.  There are a few kind souls who make a
habit of reading those, dog bless em.  [I'm not one of them, I only
read this by accident.]

That said, there is definitely less traffic these days.  I assume it's
a continuation the gradual abandonment of usenet/email in favor of
various almost-entirely-useless web "forums".

--
Grant


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fake news Detect

2020-07-17 Thread Grant Edwards
On 2020-07-17, Dennis Lee Bieber  wrote:
> On Fri, 17 Jul 2020 16:02:15 - (UTC), Gazu  declaimed
> the following:
>
>>Hey Guys I am new to python and i am building a fake news detection
>>system ...
>
>   I suspect that, if anyone had done this already, it would likely be
> found on some source code archive (github?) -- and you'd just be
> duplicating the effort.
>
>   Essentially, since the core of this functionality depends upon the
> algorithm, YOU will have to develop the algorithm.

Or he could do something easier like eliminating hunger, war and
Covid-19.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: frozendict: an experiment

2020-07-17 Thread Marco Sulla
On Fri, 17 Jul 2020 at 04:13, Inada Naoki  wrote:
> > 3. many python internals uses a mapping proxy to a dict, to avoid its
> > modification. A frozendict can be used instead.
>
> Are they used frequently in performance critical path?
> Could you point some concrete examples?

I searched a little in CPython code, and it seems that MappingProxy is
used in a number of critical points.

In re:
./Modules/_sre.c:return PyDictProxy_New(self->groupindex);

in mutiprocessing:
./Lib/multiprocessing/managers.py:DictProxy = MakeProxyType('DictProxy', (
./Lib/multiprocessing/managers.py:DictProxy._method_to_typeid_ = {
./Lib/multiprocessing/managers.py:SyncManager.register('dict', dict, DictProxy)

In functools:
./Lib/functools.py:wrapper.registry = types.MappingProxyType(registry)

In enum:
./Lib/enum.py:return MappingProxyType(cls._member_map_)

I suppose the more crucial is _sre, since it's used extensively in
CPython. groupindex is used by a large number of _sre functions.
Note: I'm not sure that mappingproxyobject is much slower than dict,
as types.MappyingProxyType.

On Fri, 17 Jul 2020 at 04:13, Inada Naoki  wrote:
> I am not sure tuple is "internined" or just "merged". (I don't know precise
> definition of the "interning").
>
> Tuples are merged while compiling.
>
> ```
> for a in ["foo", "bar"]:  # compiler convert this list to tuple
> ...
> for b in ("foo", "bar"):  # and compiler merge same tuple
> ...
> ```
>
> But when frozendicts are merged?
> I think there is a very little chance.

frozendicts could be used for kwargs:

f(a=1, b=2)
# some code
f(a=1, b=2)

For what I know, CPython uses PyDictObject for kwargs. Since dicts are
mutable, it's a problem to cache them properly.

On Fri, 17 Jul 2020 at 04:13, Inada Naoki  wrote:
> I'm OK to all combined dict for frozen dict.  But I think key-sharing is still
> interesting optimization for frozen dict. And supporting key-sharing dict
> is much easier for frozendict than for mutable dict.

Yes, I think the same.

On Fri, 17 Jul 2020 at 04:13, Inada Naoki  wrote:
> Then, there is no reason to not support the view for frozendict?

I didn't say to not support views... I said that "real objects", that
implement the dictview API, could be returned by frozendict.keys()
etc.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: excel (multiple sheets) to yml file for each sheet

2020-07-17 Thread stack flow
help please.

On Thursday, July 16, 2020 at 10:38:23 PM UTC-4, stack flow wrote:
> Hi,
> 
> I have excel file with multiple sheets and need output as yml file for each 
> sheet. could someone help me with python code? following is an example:
> 
> aep sheet:
> 
> aepaep_description infra_vlan
> test_AEP  test aepno
> 
> aeps_to_domain sheet:
> 
> aep domaindomain_type
> test_AEP  test_PHY_DOMphys
> test1_AEP test1_PHY_DOM   l3dom
> 
> 
> scription should output two files:
> 
> aeps-vars.yml:
> 
> aeps:
>   - aep: test_AEP
> aep_description: test aep
> infra_vlan: no
> 
> 
> aeps_to_domain-vars.yml:
> 
> aeps_to_domain:
>   - aep: test_AEP
> domain: test_PHY_DOM
> domain_type: phys  
>   - aep: test_AEP
> domain: test_L3O_DOM
> domain_type: l3dom

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: An I connected here?

2020-07-17 Thread Steve
Thanks for the verification.  I received my original message back and that
also shows success in my attempt.  The first message had no such copy back
so it went off somewhere...

Thanks for the guidance but I always try to make the subject line pertinent
and explanatory.  It is the selling point to get results.

I will repost it later.

FootNote:
If money does not grow on trees, then why do banks have branches?

-Original Message-
From: Python-list  On
Behalf Of Grant Edwards
Sent: Friday, July 17, 2020 4:13 PM
To: [email protected]
Subject: Re: An I connected here?

On 2020-07-17, Rhodri James  wrote:
> On 17/07/2020 19:33, Steve wrote:
>
>> I posted a request for assistance about a week ago, no response.  I 
>> also see very little traffic here, less than there used to be.  Has 
>> something gone wrong with my set up?
>
> No, nothing's wrong.  I can't answer for anyone else and I can't 
> recall your specific question, but I suspect you were asking about 
> something I know nothing about and wasn't sufficiently intrigued to go
find out about.

And if it's not clear from the subject line that it _is_ something somebody
knows/cares about, then that somebody is unlikely to read the body of the
message.

Subject lines like "help me please" or "Python doesn't work" or "An I
connected here" are likely to be ignored by most of the people who probably
know how to help.  There are a few kind souls who make a habit of reading
those, dog bless em.  [I'm not one of them, I only read this by accident.]

That said, there is definitely less traffic these days.  I assume it's a
continuation the gradual abandonment of usenet/email in favor of various
almost-entirely-useless web "forums".

--
Grant


--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python pandas Excel

2020-07-17 Thread dn via Python-list

On 18/07/20 11:06 AM, Dennis Lee Bieber wrote:

On Sat, 18 Jul 2020 09:08:50 +1200, dn via Python-list
 declaimed the following:


Assuming the import produces a string, are you able to "slice" the
string into the requisite components?


Given the OP's stated output -- I would suspect they are being
imported/parsed as DateTime objects. Which is quite likely also what the
column is defined to be in Excel.



Agreed, but the lack of 'how' information reduces us to guessing...

TBH in this mode, I tend to reduce a DateTime to a string and deal with 
it that way; whereas the 'official' answer is likely to use DateTime 
methods to extract the requisite sub-items.
(I've not stopped to perform a speed-comparison, so it's as basic as 
what I 'see' as the more simple option)



More importantly, if that lack indicates that the OP hasn't ascertained 
such details, the earlier questions must be answered before the 
finer-details.

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


help

2020-07-17 Thread Castillo, Herbert S
Hi,

I downloaded python not to long ago, and today when I opened Python on Windows 
it gave me a modify setup prompt. I have tried to click on modify , repair and 
even uninstalled and installed it back, but when I try to open Python up again, 
I keep on getting the same modify setup prompt. I am not sure of what to do? 
Thank you in advance.

[cid:[email protected]]

Herbert S. Castillo
Graduate Student, CSULA
[email protected]
C: 310-462-6269

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: help

2020-07-17 Thread boB Stepp
On Fri, Jul 17, 2020 at 9:00 PM Castillo, Herbert S
 wrote:

> I downloaded python not to long ago, and today when I opened Python on 
> Windows it gave me a modify setup prompt. I have tried to click on modify , 
> repair and even uninstalled and installed it back, but when I try to open 
> Python up again, I keep on getting the same modify setup prompt. I am not 
> sure of what to do? Thank you in advance.

It sounds like you are just rerunning the python installer.  Instead,
open a command prompt or Powershell and type "py".  That will bring up
the Python interactive environment where you can type Python commands.
Or, probably better, open IDLE -- the provided Python editing
environment -- by pressing your Windows key which brings up the list
of available programs/program folders, find Python, expand that if
needed by clicking on it and then clicking on "IDLE".  That will bring
up the Python interactive prompt as well.  You can also create a new
Python file using the provided "File" menu, etc.  BTW, I am doing this
from memory.  I don't have a Windows PC handy, but hopefully it is
enough to get you over the hump.

BTW, there is a Python Tutor mailing list designed for those learning
Python.  Also, the main Python website has documentation, lists of
resources, tutorial, etc., to also help jumpstart your learning.  Have
fun!

HTH!



-- 
boB
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: help

2020-07-17 Thread dn via Python-list

On 18/07/20 1:53 PM, Castillo, Herbert S wrote:

I downloaded python not to long ago, and today when I opened Python on Windows 
it gave me a modify setup prompt. I have tried to click on modify , repair and 
even uninstalled and installed it back, but when I try to open Python up again, 
I keep on getting the same modify setup prompt. I am not sure of what to do? 
Thank you in advance.



Regret that this mailing list does not support graphics attachments.

Which part of https://docs.python.org/dev/using/windows.html failed?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Issues in downloading python

2020-07-17 Thread dn via Python-list

On 17/07/20 7:22 PM, Shanmika Sugavaneswaran wrote:

Though I install the setup , I couldn’t find Python in my system . I don’t know 
what cause the problem. Please help me!


Please advise if the answer is not already covered in 
https://docs.python.org/dev/using/windows.html

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: excel (multiple sheets) to yml file for each sheet

2020-07-17 Thread dn via Python-list

On 18/07/20 12:04 PM, stack flow wrote:

help please.

On Thursday, July 16, 2020 at 10:38:23 PM UTC-4, stack flow wrote:

Hi,

I have excel file with multiple sheets and need output as yml file for each 
sheet. could someone help me with python code? following is an example:

aep sheet:

aepaep_description infra_vlan
test_AEP  test aepno

aeps_to_domain sheet:

aep   domaindomain_type
test_AEPtest_PHY_DOMphys
test1_AEP   test1_PHY_DOM   l3dom


scription should output two files:

aeps-vars.yml:

aeps:
   - aep: test_AEP
 aep_description: test aep
 infra_vlan: no


aeps_to_domain-vars.yml:

aeps_to_domain:
   - aep: test_AEP
 domain: test_PHY_DOM
 domain_type: phys
   - aep: test_AEP
 domain: test_L3O_DOM
 domain_type: l3dom



Please show us the Python code which you've completed, and ask a 
specific question about the situation which is challenging you.


Be advised that the members of this list are volunteers. That said, if 
you want to pay someone to code for you, perhaps mention your budget...

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


A Python installation help doc much more friendly to newcomers? [Was Re: help]

2020-07-17 Thread boB Stepp
On Fri, Jul 17, 2020 at 9:48 PM dn via Python-list
 wrote:
>
> On 18/07/20 1:53 PM, Castillo, Herbert S wrote:
> > I downloaded python not to long ago, and today when I opened Python on 
> > Windows it gave me a modify setup prompt. I have tried to click on modify , 
> > repair and even uninstalled and installed it back, but when I try to open 
> > Python up again, I keep on getting the same modify setup prompt. I am not 
> > sure of what to do? Thank you in advance.
>
>
> Regret that this mailing list does not support graphics attachments.
>
> Which part of https://docs.python.org/dev/using/windows.html failed?

Just for grins I just now glanced at the link dn provided.  Yes, this
is a very thorough, very accurate, very *technical* help resource.
But if I were a person who had never seen a shell, cmd.exe or
Powershell window, never programmed before, had no clue about how to
truly use my OS, etc., I don't think I would understand a bit of this
"help" document, and, at best, would find it very intimidating.  If
this community does wish to cater to those who are totally new to the
world of programming and learning how to really use their PC at any
depth, then I think a different approach or set of documents is
needed.  And an easier way for those playing with the idea of learning
programming and Python to connect with such documentation.

I think that we take a lot for granted that is second nature to most
of us.  Also, most of us have the mindset that even when all of this
programming stuff was new to us (If we can even truly remember that
anymore.), we would have the problem-solving chops to get over these
hurdles.  Many don't have these native inclinations.  Searching online
for technical solutions is completely foreign to many.  Even searching
for anything may be more challenging than we suspect for some.

I am just a Python hobbyist/dabbler, not a pro like most of you, but I
have taught kids through adults various subjects in the past, helped
seniors, etc., and a lot of what we take for granted is *not* easy for
many.  But I believe that almost everyone that can get to the point of
believing that they can perhaps learn programming, can do so, but may
need some encouragement to get to that point of "self-belief".

Sure, some people are just too lazy and want to be spoon-fed, but I
truly believe that is a minority.  Can we make this easier for those
who really would like to try?

Just some thoughts that I hope will be constructively received.

-- 
boB
-- 
https://mail.python.org/mailman/listinfo/python-list


Seeking to convert a py timer app for my Moto E6

2020-07-17 Thread Steve
I am looking for an app for my Moto e6 android phone that will accept a number 
of hours and then count down.  Once the hours have been executed, it will 
quietly beep every minute until I cancel the app.  This is to remind me  (and 
keep on reminding me) when to take my insulin.

It has been written in python but I do not know how to convert it to an app. I 
wonder how much of the python code will still apply. When I was into this in 
the past, I installed Kivy and was able to finally generate a "Hello World" app 
and managed to get it to my phone. Then life called me back to reality and I 
lost track of what I was doing for a few years. )-:  I doubt I can go through 
that installation and learning curve again.

It works on my computer but I have projects that interfere with the alarm.  
This is why I would prefer to have it on my phone.
I appreciate any assistance you can provide.

Steve

I attached the py code but wonder if it will carry with the message.  It is 
about 100 lines of code but that includes a few ops and whistles that are 
probably not needed in the app.

There's 99 bugs in the code, in the code.
99 bugs in the code.
Take one down and patch it all around.
Now there's 117 bugs in the code.
## Copyright Ambrosini 2017

import re
import random
import time
import datetime
from datetime import datetime

global AX
global ax
AX = 0
AX += 1
ax = str(AX)
#print(" ax = " + ax)


import winsound #as ws


from time import gmtime, strftime ##define strftime as time/date right now
nowTimeDate2=strftime("%Y %a %b %d %H:%M") ##Capture right now Time/date.

print()
print()
print(" " + nowTimeDate2)
print()

global delayTime
global DelayTime

print()
print()
print(" Enter 0 to test the alarm section.")
delayTime = input(" How many hours to next insulin check? (3) ")
if delayTime == "":
delayTime = 3
DelayTime = int(delayTime)
winsound.MessageBeep(-1)
print()
# =

def Alarm(D):
AX = 0
while D >= 1:
   
d = str(D)
AX += 1
ax = str(AX)
print(' ' + ax, end='...' + "\n")
   
time.sleep(60)
D -= 1

import winsound #as wsBeep
winsound.MessageBeep(1)

def countdown(DelayTime):
import time
t = str(DelayTime)
if t == "1":
   print(" An alarm will start sounding in " + t + " hour...")
else:
   print(" An alarm will start sounding in " + t + " hours...")
   
while DelayTime >= 1:
t = str(DelayTime)
import datetime
from datetime import datetime
from time import gmtime, strftime ##define strftime as time/date right 
now
nowTimeDate2=strftime("%Y %a %b %d %H:%M") ##Capture right now 
Time/date.

Yz=nowTimeDate2[0:4]  
mz=nowTimeDate2[9:12]
dz=nowTimeDate2[13:15]
Hz=nowTimeDate2[16:18]
Mz=nowTimeDate2[19:22]

def month_converter(month): ##convert text month to number
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 
'Sep', 'Oct', 'Nov', 'Dec']
return months.index(month) + 1

mz = month_converter(mz)
Hz = int(Hz)
AmPm = " AM"
if Hz > 12:
Hz = Hz - 12
if Hz == 0:
   Hz = 12
AmPm = " PM"
if Hz == 0:
Hz = 12
AmPm = " AM"

Yz = str(Yz)
mz = str(mz)
dz = str(dz)
Hz = str(Hz)
Mz = str(Mz)

Tz = ("" + mz + "-" + dz + "-" + Yz + " " + Hz + ":" + Mz + AmPm)
print(' ' + t + " " + Tz + "\n")
time.sleep(3600)
DelayTime -= 1
import winsound as wsBeep
wsBeep.MessageBeep(1)
 
print(' More Insuin? \n \n \n \n \n')
Alarm(3)

countdown(DelayTime)


EOB = input(" Strike any key to continue")
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: A Python installation help doc much more friendly to newcomers? [Was Re: help]

2020-07-17 Thread dn via Python-list

On 18/07/20 3:29 PM, boB Stepp wrote:

On Fri, Jul 17, 2020 at 9:48 PM dn via Python-list
 wrote:


On 18/07/20 1:53 PM, Castillo, Herbert S wrote:

I downloaded python not to long ago, and today when I opened Python on Windows 
it gave me a modify setup prompt. I have tried to click on modify , repair and 
even uninstalled and installed it back, but when I try to open Python up again, 
I keep on getting the same modify setup prompt. I am not sure of what to do? 
Thank you in advance.



Regret that this mailing list does not support graphics attachments.

Which part of https://docs.python.org/dev/using/windows.html failed?


Just for grins I just now glanced at the link dn provided.  Yes, this
is a very thorough, very accurate, very *technical* help resource.
But if I were a person who had never seen a shell, cmd.exe or
Powershell window, never programmed before, had no clue about how to
truly use my OS, etc., I don't think I would understand a bit of this
"help" document, and, at best, would find it very intimidating.  If
this community does wish to cater to those who are totally new to the
world of programming and learning how to really use their PC at any
depth, then I think a different approach or set of documents is
needed.  And an easier way for those playing with the idea of learning
programming and Python to connect with such documentation.

I think that we take a lot for granted that is second nature to most
of us.  Also, most of us have the mindset that even when all of this
programming stuff was new to us (If we can even truly remember that
anymore.), we would have the problem-solving chops to get over these
hurdles.  Many don't have these native inclinations.  Searching online
for technical solutions is completely foreign to many.  Even searching
for anything may be more challenging than we suspect for some.

I am just a Python hobbyist/dabbler, not a pro like most of you, but I
have taught kids through adults various subjects in the past, helped
seniors, etc., and a lot of what we take for granted is *not* easy for
many.  But I believe that almost everyone that can get to the point of
believing that they can perhaps learn programming, can do so, but may
need some encouragement to get to that point of "self-belief".

Sure, some people are just too lazy and want to be spoon-fed, but I
truly believe that is a minority.  Can we make this easier for those
who really would like to try?

Just some thoughts that I hope will be constructively received.



There is also THE Python Tutorial - the opening action is two?three 
pages 'in'. Is that suitably less-technical and more usable to a 'beginner'?

https://docs.python.org/3/tutorial/index.html
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fake news Detect

2020-07-17 Thread Mike Dewhirst
On 18/07/2020 6:16 am, Grant Edwards wrote:
> On 2020-07-17, Dennis Lee Bieber  wrote:
>> On Fri, 17 Jul 2020 16:02:15 - (UTC), Gazu  declaimed
>> the following:
>>
>>> Hey Guys I am new to python and i am building a fake news detection
>>> system ...
>>  I suspect that, if anyone had done this already, it would likely be
>> found on some source code archive (github?) -- and you'd just be
>> duplicating the effort.
>>
>>  Essentially, since the core of this functionality depends upon the
>> algorithm, YOU will have to develop the algorithm.
> Or he could do something easier like eliminating hunger, war and
> Covid-19.

Or like changing culture to give more weight to education, integrity
etc. We need systems to automatically identify fake news and educate
believers. News consumers have to do it.

News consumers need a system where they can go to check news items to
see if they are credible. Without the cooperation of news conduits - to
label news items with the source - that will be difficult.

However, that doesn't mean the crowd can't check credibility. So,
culture change is needed. No-one wants to be outed as a fake news source.

Here's a project. Build an automatic news aggregation site which
collects all news in two pages per news item. Page 1 for the item and
page 2 for the crowd credibility assessment and naming of the apparent
source. Should work somewhat like Wikipedia. Except editors for page 2
would need a threshold score for being correct. Everyone can criticise
but you lose points for being on the wrong side of history.

That'll be 2 cents

Mike

>
> --
> Grant
>



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list