Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Chris Green
Chris Angelico  wrote:
> On Wed, Aug 19, 2020 at 3:36 AM Chris Green  wrote:
> >
> > I have a fairly simple Python program that I wrote a while ago in
> > Python 2 that transfers images from my camera to a date ordered
> > directory hierarchy on my computer.
> >
> > I am trying to get it to work on Python 3 as I have just upgraded to
> > Ubuntu 20.04 and on that Python 3 is now the default version of Python.
> >
> > I seem to be descending into a horrible morass of dependencies (or
> > failed dependencies) when I try to install pyexiv2 (pr py3exiv2) using
> > pip3.
> >
> > Can anyone point me at anywhere that might have some documentation
> > that will help?
> >
> > The first problem (it might be the whole problem, I'm not sure) is
> > which 'pyexiv2' I should be installing, there seem to be several
> > apparently competing versions and it's not at all clear which is the
> > most likely to work.  On pypi there's py3exiv2 and pyexiv2 both of
> > which claim to be for Python 3.  On the http://py3exiv2.tuxfamily.org/
> > page it states: "py3exiv2 is the Python 3 version of pyexiv2 written
> > for Python 2, ...", really! no wonder I'm confused.
> >
> > Essentially I need the python-pyexiv2 package for Ubuntu 20.04 and
> > it's only available up to 19.10.
> >
> 
> You might be partly out of luck. I'm not seeing any pyexiv package for
> Python 3 either in Ubuntu or Debian. But there is another way: you
> might be able to just install it with pip. You mentioned that it's on
> PyPI, so try this:
> 
> python3 -m pip install py3exiv2
> 
> (best inside a virtual environment, but otherwise you might need sudo)
> 
> My reading of the PyPI pages is that the original Python 2 library was
> created by one person (Michael Vanslembrouck), and then someone else
> (VinsS) did the Python 3 port, which means it had to get a different
> name.
> 
Yes, but trying to install it with pip[3] was what took me down into
dependency hell, maybe I should persevere.

> You could agitate to get py3exiv2 added to the Ubuntu repositories,
> but in the meantime, if you can install it with pip, that should be
> viable. I install most things using pip, but then, I also tend to have
> versions of Python that aren't supported by upstream (*cough*
> currently running 3.10...) :)
> 
I have quite a lot of things installed with pip, however I've never
had this problem with dependencies before.  Adding to the fun is that
my system has still got Python 2 as the default Python so I have to
run pip3 explicitly to get Python 3 code.

Maybe I should bite the bullet and make Python 3 the default Python
and see what falls over as a consequence.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Robin Becker

On 18/08/2020 19:45, Tim Daneliuk wrote:

On 8/18/20 12:28 PM, justin walters wrote:

I apologize for being ageist earlier as well. That was out of line.


I am likely older than you and there is no reason to apologise.
Only the profoundly undeveloped psyche takes every opportunity to
find offense when  none is intended.  It is the sign of a puerile
mind, irrespective of actual chronological age.  Feel free to be
as "ageist" as you wish ... only make it funny or biting ...


+10

I too am of a previous generation that recited "sticks and stones .". I find the hyper-sensitivity of the woken 
rather dispiriting.

-aged-ly yrs-
Robin Becker
--
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Robin Becker

On 18/08/2020 20:05, Vincent Vande Vyvre wrote:
.



Hi,

Two solutions:
1. Install exiv2-dev and py3exiv2 with pip
     $ sudo apt-get install libexiv2-dev
     $ sudo pip3 install py3exiv2

2. Install my ppa
     $ sudo add-apt-repository ppa:vincent-vandevyvre/vvv
     $ sudo apt-get update
     $ sudo apt-get install python3-exiv2

Don't change your old code for pyexiv2, the names of the modules are
unchanged, your old code should work as it.

Off course old strings are now unicode.

Vincent (AKA VinsS)


I haven't tried #2 (I use Arch), but I did try 1) in a python 3.8 virtual env. 
I ended up getting into a problem with boost


   src/exiv2wrapper.hpp:34:10: fatal error: boost/python.hpp: No such file or 
directory
   34 | #include "boost/python.hpp"
  |  ^~
compilation terminated.
error: command 'gcc' failed with exit status 1


so obviously I need to install some version of boost libs or  Boost.Python etc 
etc. Gave up :(
-luddite-ly yrs-
Robin Becker
--
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Chris Green
Vincent Vande Vyvre  wrote:
> Le 18/08/20 à 19:22, Chris Green a écrit :
> > I have a fairly simple Python program that I wrote a while ago in
> > Python 2 that transfers images from my camera to a date ordered
> > directory hierarchy on my computer.
> >
> > I am trying to get it to work on Python 3 as I have just upgraded to
> > Ubuntu 20.04 and on that Python 3 is now the default version of Python.
> >
> > I seem to be descending into a horrible morass of dependencies (or
> > failed dependencies) when I try to install pyexiv2 (pr py3exiv2) using
> > pip3.
> >
> > Can anyone point me at anywhere that might have some documentation
> > that will help? 
> >
> > The first problem (it might be the whole problem, I'm not sure) is
> > which 'pyexiv2' I should be installing, there seem to be several
> > apparently competing versions and it's not at all clear which is the
> > most likely to work.  On pypi there's py3exiv2 and pyexiv2 both of
> > which claim to be for Python 3.  On the http://py3exiv2.tuxfamily.org/
> > page it states: "py3exiv2 is the Python 3 version of pyexiv2 written
> > for Python 2, ...", really! no wonder I'm confused.
> >
> > Essentially I need the python-pyexiv2 package for Ubuntu 20.04 and
> > it's only available up to 19.10.
> >
> Hi,
> 
> Two solutions:
> 1. Install exiv2-dev and py3exiv2 with pip
>     $ sudo apt-get install libexiv2-dev
>     $ sudo pip3 install py3exiv2
> 
That's what I had tried but it required further libraries beyond
libexiv2-dev and I gave up.


> 2. Install my ppa
>     $ sudo add-apt-repository ppa:vincent-vandevyvre/vvv
>     $ sudo apt-get update
>     $ sudo apt-get install python3-exiv2
> 
Ah!  Thank you Vincent.  I had your PPA installed before (a couple of
versions ago) but of course it gets disabled when you upgrade to a new
version of Ubuntu.


> Don't change your old code for pyexiv2, the names of the modules are
> unchanged, your old code should work as it.
> 
> Off course old strings are now unicode.
> 
> Vincent (AKA VinsS)
> 

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Chris Green
Robin Becker  wrote:
> On 18/08/2020 20:05, Vincent Vande Vyvre wrote:
> .
> >>
> > Hi,
> > 
> > Two solutions:
> > 1. Install exiv2-dev and py3exiv2 with pip
> >      $ sudo apt-get install libexiv2-dev
> >      $ sudo pip3 install py3exiv2
> > 
> > 2. Install my ppa
> >      $ sudo add-apt-repository ppa:vincent-vandevyvre/vvv
> >      $ sudo apt-get update
> >      $ sudo apt-get install python3-exiv2
> > 
> > Don't change your old code for pyexiv2, the names of the modules are
> > unchanged, your old code should work as it.
> > 
> > Off course old strings are now unicode.
> > 
> > Vincent (AKA VinsS)
> > 
> I haven't tried #2 (I use Arch), but I did try 1) in a python 3.8 virtual 
> env. I ended up getting into a problem with boost 
> 
> >src/exiv2wrapper.hpp:34:10: fatal error: boost/python.hpp: No such file 
> > or directory
> >34 | #include "boost/python.hpp"
> >   |  ^~
> > compilation terminated.
> > error: command 'gcc' failed with exit status 1
> 
> so obviously I need to install some version of boost libs or  Boost.Python 
> etc etc. Gave up :(
> -luddite-ly yrs-

OP here, yes, that's exactly where I got to as well! :-)

I've used Vincent's PPA before so I took that route and it worked
flawlessly, my code is now working again in 20.04 running Python 3.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: LittleRookie

2020-08-19 Thread dn via Python-list

On 19/08/2020 14:19, Jamelaumn wrote:
actually for me to sign for any online courses like stanford etc... if 
it's needed any document i couldnt  get in because i have none i'm from 
brazil :v anyway thank u guys ;) i will try find something



Did you try either of the two platforms mentioned previously?
They are public access, and should be available to anyone, world-wide. 
If your country blocks access (which I doubt because I often assist 
Brazilian trainees) then I can't help, but if you find some personal 
obstruction, please contact me (off-list).


Neither "Dr Chuck's" Programming for Everybody (Getting Started with 
Python) on edX, nor Paul Resnick's Python Basics on Coursera, even 
mention the need to provide documentation. Where did you look, that 
required such a formal application?


A public-access course means that no pre-requisite qualifications are 
required. Some courses are $only (as I subsequently discovered with the 
MySQL-Workbench offering mentioned before), but most only require 
payment if you wish to attempt certification.


The term "audit" is American-English for $free and (depending upon 
platform) this usually gives you full access to the training materials, 
but not to exams, grading, and similar.


Admittedly, certain platforms make it very difficult to keep avoiding 
their requests for money, by making the 'audit' option/button/link very 
low-emphasis within the text - but such is unlikely to challenge someone 
with attention-to-detail!


Finally, (and I do not know the answer!) if you prefer to study in 
Portuguese, then research a course aggregator, or 'search engine' for 
courses which will enable you to search for the combination of 
attributes desired. https://www.classcentral.com/ for example includes 
descriptions of courses available from all over the world...



Web.Refs:
https://www.edx.org/course/programming-for-everybody-getting-started-with-pyt 


https://www.coursera.org/learn/python-basics
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
My origins are Jewish Algerian which is just hated by just all parties
you could think off, but can not be considered as white.

Nonetheless, I'm not angry in any way, rather amused, but still, I
don't understand how this sentence (changed by the patch):

> When writing English, follow Strunk and White.

Does "uphold relics of white supremacy" (as per the commit message).

Does that mean that English teachers uphold "relics of white
supremacy" when they ask to "follow Strunk and White" ?

Because from a Zététique point of view this looks like basic conspiracy theory.

Thanks in advance for your simple explanation (I'm not a native
english speaker).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 3:33 AM Tim Daneliuk  wrote:
>
> I would also like to help you become educated.  Be sure to check
> out these literary treasures - they are the foundation of the
> worldview you are espousing:
>
>
> The_Origin of the Family, Private Property, and the State - Engels
>
> Das Kapital - Marx
>
> On Guerrilla Warfare - Mao
>

FYI, these are studied in the first year "General knowledge" course of
the political science curriculum in France and are really hard to take
seriously nowadays. They are just filled with contradictions that have
been disproven literally thousands of times, just reading the text
you'll see that it can't even hold up to its own promises even in
theory.

That said, I think you are going to have hard times demonstrating how
these are the foundations of the worldview in question to people who
haven't followed a serious polsci curriculum, we're mostly engineers
here, we pay taxes that pay politicians with actual polsci curriculum
to take care of this debates, I don't want to be forced to stand up
against the demagogy here, extremes just feed one another, and this
commit message operation is clearly pushing people to express their
disagreement in the booth by voting right (not alt-right, not
far-right, just right).

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Ethan Furman

On 8/19/20 2:55 AM, J. Pic wrote:


[...] but still, I
don't understand how this sentence (changed by the patch):


When writing English, follow Strunk and White.


Does "uphold relics of white supremacy" (as per the commit message).

Thanks in advance for your simple explanation (I'm not a native
english speaker).


The purported issue is that Strunk and White itself is doing the upholding.

For example, on a slightly different topic, earlier versions of S&W were 
sexist: the examples of men used positive words, while the examples of 
women used negative and subservient words.


I have not read S&W myself, and my requests for WS examples have gone 
unanswered, so I do not know about the WS aspect.


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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Alexandre Brault

On 2020-08-18 7:34 p.m., [email protected] wrote:

There are many reasons Elements is a terrible English style guide:
https://www.pure.ed.ac.uk/ws/files/8520953/PULLUM_2010_The_land_of_the_free_and_the_elements_of_style.pdf

I would kindly recommend that folks just educate themselves on what
white supremacy is & how it continues in both subtle & overt ways to
this day. Sadly, getting extremely upset after being exposed to the
accurate term white supremacy is a symptom of what's called 'white
fragility' by psychologists who study the social pathologies of racism &
its long-lasting, inter-generational impacts on society.

You need serious help with processing your anger if you look at
everything that's happening in the world & bubble in anger over a commit
message that is simply acknowledging a social ill. One of countless
many. I do hope you get the help you need.

I would also caution against relying on the idea of human rights when
defending against accusations of being political, since they too are
political. Life is political. We continue to this day trying to
redefine, as a society, what human rights are, & who is considered to
deserve them. That process is politics.

Some people think that being called white is racist. Other people think
that having their land & children stolen because of their race & being
forced to write in the language of their captors is racist. One group is
deflecting blame for the worst atrocities in history, the other is
acknowledging a real problem & seeking accountability in everyday life.


Resources:
   A People's History of the United States:
https://mvlindsey.files.wordpress.com/2015/08/peoples-history-zinn-1980.pdf
   The Invention of the White Race: Volume II:
http://ouleft.org/wp-content/uploads/Invention-White-Race-Vol2-Allen.pdf


I've not seen anyone objecting to the idea of removing the reference to 
Strunk and White in favour of the underlying message of "be 
understandable by others who may read your comments" (there were at most 
a few philosophical "what is understandable") . In fact, that is how the 
topic was initially presented.


What people *are* complaining about is the use of a commit message to 
stand on a soapbox and preach. The time to preach was when debating the 
change; commit messages, in many people's opinions, is not the time to 
espouse non-technical opinions


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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Ethan Furman

On 8/19/20 6:35 AM, Alexandre Brault wrote:

What people *are* complaining about is the use of a commit message to 
stand on a soapbox and preach. The time to preach was when debating the 
change; commit messages, in many people's opinions, is not the time to 
espouse non-technical opinions


An excellent summary.  Thank you.

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 4:06 PM Ethan Furman  wrote:
> The purported issue is that Strunk and White itself is doing the upholding.

Still trying to find some actual evidence.

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Tim Daneliuk
On 8/19/20 8:35 AM, Alexandre Brault wrote:
> I've not seen anyone objecting to the idea of removing the reference to 
> Strunk and White in favour of the underlying message of "be understandable by 
> others who may read your comments" (there were at most a few philosophical 
> "what is understandable") . In fact, that is how the topic was initially 
> presented.
> 
> What people *are* complaining about is the use of a commit message to stand 
> on a soapbox and preach. The time to preach was when debating the change; 
> commit messages, in many people's opinions, is not the time to espouse 
> non-technical opinions

I would argue that these highly polarizing political discussions never have
a place at any point in the lifecycle of technology improvement.  Once you
open this door in any way, no end of mischief ensues.

You already see this in this very thread.  People are determined to flog
their particular political theory, virtue signal, and generally misappropriate
a technical forum to their own ends.

The right answer here is: No politics, no social commentary, no demands for
redress of perceived historical inequities ... none of that.  The sole relevant
demand should be civility.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: LittleRookie

2020-08-19 Thread Ian Hill
You can access Dr.Chuck's Python for Everybody course here
https://www.py4e.com/

or you need to be on the audit track on Coursera.

R.

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


Re: LittleRookie

2020-08-19 Thread Igor Korot
Dennis,

On Wed, Aug 19, 2020 at 11:26 AM Dennis Lee Bieber
 wrote:
>
> On Tue, 18 Aug 2020 22:23:28 +, [email protected] (Jamelaumn)
> declaimed the following:
>
> >i would say i'm new at programing i have a year of experience in python(but 
> >i'm tottaly a noob) i guess i'm starting to learn SQL now.What should i do 
> >to learn better and faster?
>
> You've had lots of answers, but there is one concept that seems to 
> have
> not been mentioned.
>
> SQL is a (relational) database QUERY language -- but knowing SQL does
> not mean you can design a relational database structure. For design, you
> should be familiar with at least 1st, 2nd, and 3rd Normal Forms
> https://en.wikipedia.org/wiki/Database_normalization
> https://www3.ntu.edu.sg/home/ehchua/programming/sql/Relational_Database_Design.html

And the best way to LEARN is to go to school to understand the concept
and get real-life training and not to read Wikipedia articles.

Thank you.

>
>
> --
> Wulfraed Dennis Lee Bieber AF6VN
> [email protected]://wlfraed.microdiversity.freeddns.org/
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Tim Daneliuk
On 8/18/20 12:18 PM, gia wrote:
>  That's why I picked Math, it is also universally accepted, it's very
> strict, and it leaves the reader to decide its color based on themselves
> (it's not white btw :)


Sorry, but when it comes to the demands of the woke, you are not
immune.  Reported widely earlier this month, seen here most recently:


https://thejewishvoice.com/2020/08/brooklyn-college-education-prof-claims-math-is-white-supremacist-patriarchy/
-- 
https://mail.python.org/mailman/listinfo/python-list


Python Pandas split Date in day month year and hour

2020-08-19 Thread J Conrado



Hi,


I'm satarting using Pandas to read excel. I have a meteorological 
synoptic data and I have for date:



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


I would like know how can I get for this array the values for day, month 
and hour:


2017-11-01 03:00:00   year = 2017  month = 11    day = 1    and 
   hour = 3




Thanks,


Conrado

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


Re: LittleRookie

2020-08-19 Thread Chris Angelico
On Thu, Aug 20, 2020 at 3:11 AM Igor Korot  wrote:
>
> Dennis,
>
> On Wed, Aug 19, 2020 at 11:26 AM Dennis Lee Bieber
>  wrote:
> >
> > On Tue, 18 Aug 2020 22:23:28 +, [email protected] (Jamelaumn)
> > declaimed the following:
> >
> > >i would say i'm new at programing i have a year of experience in 
> > >python(but i'm tottaly a noob) i guess i'm starting to learn SQL now.What 
> > >should i do to learn better and faster?
> >
> > You've had lots of answers, but there is one concept that seems to 
> > have
> > not been mentioned.
> >
> > SQL is a (relational) database QUERY language -- but knowing SQL 
> > does
> > not mean you can design a relational database structure. For design, you
> > should be familiar with at least 1st, 2nd, and 3rd Normal Forms
> > https://en.wikipedia.org/wiki/Database_normalization
> > https://www3.ntu.edu.sg/home/ehchua/programming/sql/Relational_Database_Design.html
>
> And the best way to LEARN is to go to school ...

You can't learn at home? That's a great pity, given that that's how I
learned basically everything I know about programming.

If you're sufficiently motivated, you don't need a
school/university/college. You just need the reference material,
tutorials, guides, that sort of thing.

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


Re: Python Pandas split Date in day month year and hour

2020-08-19 Thread Brian Oney via Python-list


On August 19, 2020 7:32:45 PM GMT+02:00, J Conrado  
wrote:
>
>
>Hi,
>
>
>I'm satarting using Pandas to read excel. I have a meteorological 
>synoptic data and I have for date:
>
>
>0   2017-11-01 00:00:00
>1   2017-11-01 03:00:00
>2   2017-11-01 06:00:00
>3   2017-11-01 09:00:00
>4   2017-11-01 12:00:00
>..  ...
>229 2017-11-30 09:00:00
>230 2017-11-30 12:00:00
>231 2017-11-30 15:00:00
>232 2017-11-30 18:00:00
>233 2017-11-30 21:00:00
>
>
>I would like know how can I get for this array the values for day, month 
>and hour:
>
>2017-11-01 03:00:00   year = 2017  month = 11    day = 1    and 
>    hour = 3
>
From the hip, I would use the strptime function (in the time module?)

time.strptime(string_value, '%F %T')

If I recall correctly, the doc for the specific strings is in the strptime 
function's doc.

This is just a starting point. Good luck! 

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
Tim, don't you also think that statements should be backed by
evidence, even more if they are particularly accusatory ?

We'll be lucky if S&W's editor doesn't sue the PSF for slandering for
publishing that S&W "upholds white supremacy".
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: LittleRookie

2020-08-19 Thread Igor Korot
Hi, Chris,

On Wed, Aug 19, 2020 at 1:01 PM Chris Angelico  wrote:
>
> On Thu, Aug 20, 2020 at 3:11 AM Igor Korot  wrote:
> >
> > Dennis,
> >
> > On Wed, Aug 19, 2020 at 11:26 AM Dennis Lee Bieber
> >  wrote:
> > >
> > > On Tue, 18 Aug 2020 22:23:28 +, [email protected] (Jamelaumn)
> > > declaimed the following:
> > >
> > > >i would say i'm new at programing i have a year of experience in 
> > > >python(but i'm tottaly a noob) i guess i'm starting to learn SQL 
> > > >now.What should i do to learn better and faster?
> > >
> > > You've had lots of answers, but there is one concept that seems 
> > > to have
> > > not been mentioned.
> > >
> > > SQL is a (relational) database QUERY language -- but knowing SQL 
> > > does
> > > not mean you can design a relational database structure. For design, you
> > > should be familiar with at least 1st, 2nd, and 3rd Normal Forms
> > > https://en.wikipedia.org/wiki/Database_normalization
> > > https://www3.ntu.edu.sg/home/ehchua/programming/sql/Relational_Database_Design.html
> >
> > And the best way to LEARN is to go to school ...
>
> You can't learn at home? That's a great pity, given that that's how I
> learned basically everything I know about programming.
>
> If you're sufficiently motivated, you don't need a
> school/university/college. You just need the reference material,
> tutorials, guides, that sort of thing.

While I understand that people are different and all have their preferences
it is best to go to school to learn something (whether the school is online
or not - doesn't matter).
You will be ta;lking to teachers and peers, do the homework (which means
easy exercises) to prove that you learnt something and finally
acquire some connection which will help you along the way.

And what can you learn by reading the WiKi article mentioned
if you don't know how to use them properly (without practicing them)?

BTW, I'm also a self-taught developer, but I did it a long time ago in school
and there were people that helped me understand all those books
we had and I did some exercises.

Thank you.

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Karen Shaeffer via Python-list


> On Aug 19, 2020, at 8:47 AM, Tim Daneliuk  wrote:
> 
> On 8/19/20 8:35 AM, Alexandre Brault wrote:
>> I've not seen anyone objecting to the idea of removing the reference to 
>> Strunk and White in favour of the underlying message of "be understandable 
>> by others who may read your comments" (there were at most a few 
>> philosophical "what is understandable") . In fact, that is how the topic was 
>> initially presented.
>> 
>> What people *are* complaining about is the use of a commit message to stand 
>> on a soapbox and preach. The time to preach was when debating the change; 
>> commit messages, in many people's opinions, is not the time to espouse 
>> non-technical opinions
> 
> I would argue that these highly polarizing political discussions never have
> a place at any point in the lifecycle of technology improvement.  Once you
> open this door in any way, no end of mischief ensues.
> 
> You already see this in this very thread.  People are determined to flog
> their particular political theory, virtue signal, and generally misappropriate
> a technical forum to their own ends.
> 
> The right answer here is: No politics, no social commentary, no demands for
> redress of perceived historical inequities ... none of that.  The sole 
> relevant
> demand should be civility.


I lurk on this list and rarely post. I tend to agree this thread should never 
have started here. IMHO, any discussion of this issue should have stayed on the 
platform where the issue arose.

But I must say with all due respect to you Tim, in this thread, you have 
repeatedly engaged in the precise behavior you are now complaining about. Even 
further, you have, IMHO, been condescending and even arrogant in presuming you 
alone have perfect knowledge on these matters:

https://mail.python.org/pipermail/python-list/2020-August/898274.html 


Where you conclude with: "Methinks there is an ideological skunk in the parlor 
…”

Considering all your posts on this thread, it is reasonable to infer you have 
some ideological motivations.

https://mail.python.org/pipermail/python-list/2020-August/898314.html 


Which appears to be relatively safe and harmless, but you could have easily 
found clear evidence that refutes your stated point of view. In particular, 
this peer reviewed published research from Stanford University establishes the 
fact that racism and bias are alive and well in the STEM fields:

https://www.pnas.org/content/pnas/117/17/9284.full.pdf 



https://mail.python.org/pipermail/python-list/2020-August/898280.html 


Here you encourage folks to discriminate, as long as they make it “fun or 
biting” This is completely inconsistent with your complaint that I am 
responding to now.

https://mail.python.org/pipermail/python-list/2020-August/898292.html 

https://mail.python.org/pipermail/python-list/2020-August/898293.html 


Those two posts are condescending, and presume you alone have perfect knowledge 
— They also represent a classic bait and switch attempt.

IMHO, your contributions to this thread have been inflammatory and likely 
precipitated others to continue the escalation of these issues. I’m only 
pointing this out to put your current complaint to the moderators of this list 
into its proper perspective.

humbly,
kls


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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 3:33 AM Tim Daneliuk  wrote:
> On 8/18/20 6:34 PM, [email protected] wrote:
> > I would kindly recommend that folks just educate themselves on what
> > ...
> > Resources:
> >  The Invention of the White Race: Volume II:
> http://ouleft.org/wp-content/uploads/Invention-White-Race-Vol2-Allen.pdf
>
> I would also like to help you become educated.  Be sure to check
> out these literary treasures - they are the foundation of the
> worldview you are espousing:
>
> The_Origin of the Family, Private Property, and the State - Engels
> Das Kapital - Marx
> On Guerrilla Warfare - Mao

I stand corrected, the PDF of "The invention of white race" shared by
the OP *does* cite:

- Marx, page 9
- Mao, page 103
- Marx, Capital Vol I, page 807
- Marx and Engels, page 828
- Marx and Engels, The Communist Manifesto, Karl Marx and Frederick
Engels, Selected Works in Two Volumes, page 851

And it goes on ...

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Tim Daneliuk
On 8/19/20 2:00 PM, Karen Shaeffer wrote:
> Where you conclude with: "Methinks there is an ideological skunk in the 
> parlor …”
> 
> Considering all your posts on this thread, it is reasonable to infer you have 
> some ideological motivations.

My motivation was to demonstrate that if people of your ilk are free to
peddle their worldview, it invites people of my worldview to join the party
and thereby wreak havoc.  The only way to solve this is: No politics, no 
culture,
no religion, or no sex. Period.  Ever.

Do take note that while I freely admit to having utter contempt for the
en courant culture and its various warriors, I also have been careful
to avoid flogging *my own* political/social view.  They don't belong
here.  Neither do yours.  Why don't we stick to discussing Python which
ought to not be infected by these subjects.


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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Tim Daneliuk
On 8/19/20 1:10 PM, J. Pic wrote:
> Tim, don't you also think that statements should be backed by
> evidence, even more if they are particularly accusatory ?
> 
> We'll be lucky if S&W's editor doesn't sue the PSF for slandering for
> publishing that S&W "upholds white supremacy".
> 

As a general matter, I agree: Claims should be supported by evidence.
But that's not the problem here.  The various cause crusaders are
attempting to insert themselves into every single discipline.  They
do this claiming their attacks as some kind of moral virtue and that
they are therefore above reproach or counterpoint.  It is natural
for people who disagree to punch back.

My real point in commenting at all was that we open this one-sided door
at our own peril. By allowing provocative commentary of the sort voice
in this godforsaken commit message, we absolutely invite others to the party.
Despite what the aforementioned cause crusaders think, they are not
unassailable, nor are they the only- or dominant voice in these matters.
Open this door and you get an absolute sewer of commentary
(from many sides of these issues).  Social media is full of many trenchant
such examples.  Best to leave it there.


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


Re: Python Pandas split Date in day month year and hour

2020-08-19 Thread Skip Montanaro
> I would like know how can I get for this array the values for day, month
> and hour:
>
> 2017-11-01 03:00:00   year = 2017  month = 11day = 1and
> hour = 3

Pandas has a datetime type. You should probably be using it. It's been
awhile (a year at least), but if your datetime column is filled with
datetime types, you should be able to append columns to your DataFrame
which correspond to individual components of the datetime instances.
Don't be looking outside of Pandas to Python's time or datetime
module.

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


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Ethan Furman

On 8/19/20 12:40 PM, Tim Daneliuk wrote:

On 8/19/20 2:00 PM, Karen Shaeffer wrote:



Considering all your posts on this thread, it is reasonable to infer you have 
some ideological motivations.


My motivation was to demonstrate that if people of your ilk are free to
peddle their worldview,


Unless you know Karen personally, you don't know what her world view is. 
 Poking holes in arguments or observing what is being said does not 
require an opposing world view.


As you yourself said:


The sole relevant
demand should be civility.


Let's make sure we stay that course.

--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Calvin Spealman
Tim,

Technology is political. Deal with it.

Signed,
Common Fucking Sense

On Wed, Aug 19, 2020 at 4:02 PM Tim Daneliuk  wrote:

> On 8/19/20 1:10 PM, J. Pic wrote:
> > Tim, don't you also think that statements should be backed by
> > evidence, even more if they are particularly accusatory ?
> >
> > We'll be lucky if S&W's editor doesn't sue the PSF for slandering for
> > publishing that S&W "upholds white supremacy".
> >
>
> As a general matter, I agree: Claims should be supported by evidence.
> But that's not the problem here.  The various cause crusaders are
> attempting to insert themselves into every single discipline.  They
> do this claiming their attacks as some kind of moral virtue and that
> they are therefore above reproach or counterpoint.  It is natural
> for people who disagree to punch back.
>
> My real point in commenting at all was that we open this one-sided door
> at our own peril. By allowing provocative commentary of the sort voice
> in this godforsaken commit message, we absolutely invite others to the
> party.
> Despite what the aforementioned cause crusaders think, they are not
> unassailable, nor are they the only- or dominant voice in these matters.
> Open this door and you get an absolute sewer of commentary
> (from many sides of these issues).  Social media is full of many trenchant
> such examples.  Best to leave it there.
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>

-- 

CALVIN SPEALMAN

SENIOR QUALITY ENGINEER

[email protected]  M: +1.336.210.5107
[image: https://red.ht/sig] 
TRIED. TESTED. TRUSTED. 
-- 
https://mail.python.org/mailman/listinfo/python-list


[closed] Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Ethan Furman

This thread is now closed.

Thank you for your cooperation.

--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread Tim Daneliuk
On 8/19/20 3:29 PM, Ethan Furman wrote:
> On 8/19/20 12:40 PM, Tim Daneliuk wrote:
>> On 8/19/20 2:00 PM, Karen Shaeffer wrote:
> 
>>> Considering all your posts on this thread, it is reasonable to infer you 
>>> have some ideological motivations.
>>
>> My motivation was to demonstrate that if people of your ilk are free to
>> peddle their worldview,
> 
> Unless you know Karen personally, you don't know what her world view is.  
> Poking holes in arguments or observing what is being said does not require an 
> opposing world view.

I'd say this is at least a hint:

>>> this peer reviewed published research from Stanford University establishes 
>>> the fact that racism and bias are alive and well in the STEM fields:

I have rather lengthy counterpoint to this "research".  Ditto the claim that 
proper
ordinarily use of English is prima facie evidence of "White Supremacy".  Ditto
the claim that any reference to age is inherently bigoted and cannot be taken
in good spirit.  But ... I don't think this is the place you'd like to see
my disquisitions on the matter.*

My larger point holds:  You cannot allow one worldview in and then expect
other worldviews to keeps still  ... and that's true irrespective of WHICH
worldview first got in the door.


> As you yourself said:
> 
>> The sole relevant
>> demand should be civility.
> 
> Let's make sure we stay that course.


I have never been anything other than this in the entire thread.  It is not 
uncivil
to disagree.

> 
> -- 
> ~Ethan~
> Python List Moderator

* Is the use of the word "disquisition" a form of White Supermacy?  Asking for 
a friend.

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


RE: Python Pandas split Date in day month year and hour

2020-08-19 Thread Steve
0   2017-11-01 00:00:00

If you are reading it is as a line into python, then it is a tuple and can be 
parsed accordingly:

   Nb  = YourdataLIne[0:1] #Line Number
   Yr   = YourDataLine[3:7]#Year
   Da  = YourDataLine[9:11]   #Day
   Mo = YourDataLine[13:14] #Month
   Hr   = YourDataLine[16:18]  #hour
   Mn = YourDataLine[20:21]  #minute
   Sc   = YourDataLine[22:23] #second 

Use 
Print ("Year =  " + Yr + ",   Month = " + Mo + ",  Day = " +  Da  + ",   Hour = 
" + Hr)
You may have to adjust the numbers depending on how the line is read.
Is that what you want?


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

-Original Message-
From: Python-list  On Behalf 
Of Brian Oney via Python-list
Sent: Wednesday, August 19, 2020 2:01 PM
To: [email protected]
Subject: Re: Python Pandas split Date in day month year and hour



On August 19, 2020 7:32:45 PM GMT+02:00, J Conrado  
wrote:
>
>
>Hi,
>
>
>I'm satarting using Pandas to read excel. I have a meteorological 
>synoptic data and I have for date:
>
>
>0   2017-11-01 00:00:00
>1   2017-11-01 03:00:00
>2   2017-11-01 06:00:00
>3   2017-11-01 09:00:00
>4   2017-11-01 12:00:00
>..  ...
>229 2017-11-30 09:00:00
>230 2017-11-30 12:00:00
>231 2017-11-30 15:00:00
>232 2017-11-30 18:00:00
>233 2017-11-30 21:00:00
>
>
>I would like know how can I get for this array the values for day, 
>month and hour:
>
>2017-11-01 03:00:00   year = 2017  month = 11day = 1and
>hour = 3
>
>From the hip, I would use the strptime function (in the time module?)

time.strptime(string_value, '%F %T')

If I recall correctly, the doc for the specific strings is in the strptime 
function's doc.

This is just a starting point. Good luck! 

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

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


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Vincent Vande Vyvre
Le 19/08/20 à 10:15, Robin Becker a écrit :
> On 18/08/2020 20:05, Vincent Vande Vyvre wrote:
> .
>>>
>> Hi,
>>
>> Two solutions:
>> 1. Install exiv2-dev and py3exiv2 with pip
>>  $ sudo apt-get install libexiv2-dev
>>  $ sudo pip3 install py3exiv2
>>
>> 2. Install my ppa
>>  $ sudo add-apt-repository ppa:vincent-vandevyvre/vvv
>>  $ sudo apt-get update
>>  $ sudo apt-get install python3-exiv2
>>
>> Don't change your old code for pyexiv2, the names of the modules are
>> unchanged, your old code should work as it.
>>
>> Off course old strings are now unicode.
>>
>> Vincent (AKA VinsS)
>>
> I haven't tried #2 (I use Arch), but I did try 1) in a python 3.8
> virtual env. I ended up getting into a problem with boost
>
>>    src/exiv2wrapper.hpp:34:10: fatal error: boost/python.hpp: No such
>> file or directory
>>    34 | #include "boost/python.hpp"
>>   |  ^~
>>     compilation terminated.
>>     error: command 'gcc' failed with exit status 1
>
> so obviously I need to install some version of boost libs or 
> Boost.Python etc etc. Gave up :(
> -luddite-ly yrs-
> Robin Becker
>
The aur repository, no ?

https://aur.archlinux.org/packages/python-exiv2/

Vincent

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


Re: Python Pandas split Date in day month year and hour

2020-08-19 Thread Tim Williams
On Wed, Aug 19, 2020 at 1:43 PM J Conrado  wrote:

>
>
> Hi,
>
>
> I'm satarting using Pandas to read excel. I have a meteorological
> synoptic data and I have for date:
>
>
> 0   2017-11-01 00:00:00
> 1   2017-11-01 03:00:00
> 2   2017-11-01 06:00:00
> 3   2017-11-01 09:00:00
> 4   2017-11-01 12:00:00
> ..  ...
> 229 2017-11-30 09:00:00
> 230 2017-11-30 12:00:00
> 231 2017-11-30 15:00:00
> 232 2017-11-30 18:00:00
> 233 2017-11-30 21:00:00
>
>
> I would like know how can I get for this array the values for day, month
> and hour:
>
> 2017-11-01 03:00:00   year = 2017  month = 11day = 1and
> hour = 3
>
>
>
> Thanks,
>
>
> Conrado
>
> --
> https://mail.python.org/mailman/listinfo/python-list


I'm also starting to learn pandas. A better place to ask a pandas question
is StackOverflow. Here's a link that may answer your question.

Convert timestamp to day, month, year and hour



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


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Cameron Simpson
On 19Aug2020 08:53, Chris Green  wrote:
>I have quite a lot of things installed with pip, however I've never
>had this problem with dependencies before.  Adding to the fun is that
>my system has still got Python 2 as the default Python so I have to
>run pip3 explicitly to get Python 3 code.

My approach to this is to have a personal venv based on a modern Python3 
and put its bin near the front of my $PATH. The pip and python come from 
it. But I tend to type "pip3" anyway - still the pip from my venv.

>Maybe I should bite the bullet and make Python 3 the default Python
>and see what falls over as a consequence.

Don't change the system default Python - many system scripts rely on 
that and may break. If an OS update changes it, it should also update 
all the dependent scripts and so be ok, but an ad hoc change of only 
part of the system is asking for trouble.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list