Re: Converting epoch to string in format yyyy-mm-dd, or maybe it is not necessary

2017-06-01 Thread dieter
zljubi...@gmail.com writes: > I have a dataframe with epoh dates, something like this: > > df = pd.DataFrame( { 'epoch' : [1493928008, 1493928067, 1493928127, > 1493928310, 1493928428, 1493928547]}) > > I want to create a new column with epoch converted to -mm-dd as string. "epoch" dates us

Re: [OT] How to improve my programming skills?

2017-06-01 Thread Steve D'Aprano
On Fri, 2 Jun 2017 01:26 am, Mirko wrote: > TLDR: Sorry for OT. Long-time Linux geek and hobby programmer wants > to improve his coding skills. What's most important: project > planing, algorithms and data structures, contributing to FOSS, web > development, learning other languages or something e

Celery + Django logging and RotateFileHandler

2017-06-01 Thread Heron Rossi
I have a Django project setup with Celery and a RotatingFileHandler setting like shown below: LOGGING = { 'version': 1, 'handlers': { 'console':{ 'class':'logging.StreamHandler', 'stream': sys.stdout, }, 'cele

Re: [OT] How to improve my programming skills?

2017-06-01 Thread Neil Cerutti
On 2017-06-01, Mirko via Python-list wrote: > Hello everybody! > > TLDR: Sorry for OT. Long-time Linux geek and hobby programmer > wants to improve his coding skills. What's most important: > project planing, algorithms and data structures, contributing > to FOSS, web development, learning other l

Re: [OT] How to improve my programming skills?

2017-06-01 Thread MRAB
On 2017-06-01 16:26, Mirko via Python-list wrote: [snip] I'm looking for a way (*the* way, ie. the "BEST(tm)" way) to improve my coding skills. While I'm a quite hard-core computer geek since 25 years and a really good (hobbyist) Linux-SOHO-Admin, my programming skills are less than sub-par. I w

Re: Test to see if message is bounced

2017-06-01 Thread Chris Angelico
On Fri, Jun 2, 2017 at 3:44 AM, Richard Moseley wrote: > Apologies if this appears on the list, but I'm checking whether I have been > placed onto a blacklist since previous postings have been bounced back with > an error that the email address is not on the "subscribers list". I > previously had

Test to see if message is bounced

2017-06-01 Thread Richard Moseley
Apologies if this appears on the list, but I'm checking whether I have been placed onto a blacklist since previous postings have been bounced back with an error that the email address is not on the "subscribers list". I previously had an email address of "dickie.mose...@virgin.net" which has now be

[OT] How to improve my programming skills?

2017-06-01 Thread Mirko via Python-list
Hello everybody! TLDR: Sorry for OT. Long-time Linux geek and hobby programmer wants to improve his coding skills. What's most important: project planing, algorithms and data structures, contributing to FOSS, web development, learning other languages or something else? Sorry for posting su

Converting epoch to string in format yyyy-mm-dd, or maybe it is not necessary

2017-06-01 Thread zljubisic
I have a dataframe with epoh dates, something like this: df = pd.DataFrame( { 'epoch' : [1493928008, 1493928067, 1493928127, 1493928310, 1493928428, 1493928547]}) I want to create a new column with epoch converted to -mm-dd as string. Actually, I have a epoch column, and I would like to us

Re: Circular iteration on tuple starting from a specific index

2017-06-01 Thread Ian Kelly
On Thu, Jun 1, 2017 at 4:14 AM, Gregory Ewing wrote: > guillaume.pau...@giome.fr wrote: >> >> def cycle_once(iterable, start): >> return chain(islice(iterable, start, None), islice(iterable, start)) This assumes that iterable is restartable, which is not the case if iterable is itself an iter

RE: How to install Python package from source on Windows

2017-06-01 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, June 01, 2017 1:15 AM > > Deborah Swanson wrote: > > I have already offered to do whatever you would like me to > do on this > > system > > If you wouldn't mind, I'd like to see the output from this command: > > python -m ensurepip > > -- > Greg The res

RE: How to install Python package from source on Windows

2017-06-01 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, June 01, 2017 1:12 AM > > Deborah Swanson wrote: > > Why do you care so deeply what pip does on an operating > system that is > > no longer supported? > > Being pipless is a sufficiently distressing fate that we'd > like to help, even if you didn't explicitly r

RE: How to install Python package from source on Windows

2017-06-01 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, June 01, 2017 12:59 AM > > Deborah Swanson wrote: > > I got one suggestion that I could just copy the files to "the > > appropriate directories", > > That was me, but I've just had a look at the source, and it > seems the core functionality is implemented in C,

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-01 Thread Chris Angelico
On Thu, Jun 1, 2017 at 8:05 PM, Gregory Ewing wrote: > A while back I wrote a dedicated wrapper around the Firebird > API (I wasn't impressed by the DB API, for many of the reasons > being discussed here), and this is almost exactly how I structured > it. Except I didn't really have cursors as an

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-01 Thread Jon Ribbens
On 2017-06-01, Gregory Ewing wrote: > Is there any serious work being done on a DB API 3.0? > If there is, I'd be interested in helping with the design. There are a bunch of existing APIs in other languages that can easily be copied ;-) The good news is of course that since the DB-API 'Connection

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-01 Thread Gregory Ewing
Chris Angelico wrote: In the DB API 3.0, what I would like to see is that the connection becomes a context manager that gives you a transaction object. With that transaction, you can perform queries, and you could create cursors from it if you want them, or just use a single in-built cursor. But

Re: Circular iteration on tuple starting from a specific index

2017-06-01 Thread Gregory Ewing
guillaume.pau...@giome.fr wrote: def cycle_once(iterable, start): return chain(islice(iterable, start, None), islice(iterable, start)) Another variation, maybe slightly more efficient: from itertools import islice, cycle def cycle_once(iterable, start): return islice(cycle(iterable),

Re: Working with dictionaries and keys help please!

2017-06-01 Thread Steve D'Aprano
On Thu, 1 Jun 2017 10:29 am, David D wrote: > I have a dictionary with a 10 people, the key being a number (0-10) and the > value being the people's name. I am in the processing of Insert, Adding and > deleting from the dictionary. All seems well until I delete a person and add > a new one. The

Re: How to install Python package from source on Windows

2017-06-01 Thread Gregory Ewing
Deborah Swanson wrote: I have already offered to do whatever you would like me to do on this system If you wouldn't mind, I'd like to see the output from this command: python -m ensurepip -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to install Python package from source on Windows

2017-06-01 Thread Gregory Ewing
Deborah Swanson wrote: Why do you care so deeply what pip does on an operating system that is no longer supported? Being pipless is a sufficiently distressing fate that we'd like to help, even if you didn't explicitly request it. Particularly since it seems like such an unnecessary one, becaus

Re: How to install Python package from source on Windows

2017-06-01 Thread Gregory Ewing
Deborah Swanson wrote: I got one suggestion that I could just copy the files to "the appropriate directories", That was me, but I've just had a look at the source, and it seems the core functionality is implemented in C, so scrub that idea. But all is not lost. I've found this: https://pypi.p