Re: Curious Omission In New-Style Formats

2016-07-13 Thread Ian Kelly
On Wed, Jul 13, 2016 at 9:39 PM, Lawrence D’Oliveiro wrote: > On Thursday, July 14, 2016 at 12:46:26 PM UTC+12, Ian wrote: >> On Wed, Jul 13, 2016 at 4:24 PM, Lawrence D’Oliveiro wrote: >>> On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: >>> ... don't call it "precision". >>> >>>

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Paul Rubin
Michael Torrie writes: > So I can understand the allure of GitHub. It's shiny and free-ish. Savannah.nongnu.org is a nice free host for free software projects. I suppose it's less shiny than Github. On the other hand, Github is written in Ruby--what self-respecting Pythonista would stand for t

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Michael Torrie
On 07/13/2016 01:00 AM, Chris Angelico wrote: > On Wed, Jul 13, 2016 at 4:44 PM, Steven D'Aprano > wrote: >> Even if Github was 100% open source with no proprietary extensions, and the >> *technical* cost of leaving was low, the single-network effect would still >> lock >> you in, which leaves yo

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Lawrence D’Oliveiro
On Thursday, July 14, 2016 at 12:46:26 PM UTC+12, Ian wrote: > On Wed, Jul 13, 2016 at 4:24 PM, Lawrence D’Oliveiro wrote: >> On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: >> >>> ... don't call it "precision". >> >> How about “mantissa length”, then. That sufficiently neutral for you

Re: Curious Omission In New-Style Formats

2016-07-13 Thread MRAB
On 2016-07-14 01:45, Ian Kelly wrote: On Wed, Jul 13, 2016 at 4:24 PM, Lawrence D’Oliveiro wrote: On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: ... don't call it "precision". How about “mantissa length”, then. That sufficiently neutral for you? That makes even less sense fo

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Ian Kelly
On Wed, Jul 13, 2016 at 4:24 PM, Lawrence D’Oliveiro wrote: > On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: > >> ... don't call it "precision". > > How about “mantissa length”, then. That sufficiently neutral for you? That makes even less sense for integers. -- https://mail.python

Re: problem writing excel sheet using python

2016-07-13 Thread vineeth menneni
The belwo is the code, I have also tried writing it row by row with xlsxwrites passing argument constant_memory:True. I donot know if my looping code is ineffective. for req_param in request.GET.get("Req-Tables").split(","): sheet_names.append(req_param) title.append(req_p

Re: Clean Singleton Docstrings

2016-07-13 Thread Ian Kelly
On Wed, Jul 13, 2016 at 5:54 PM, Peter Otten <__pete...@web.de> wrote: > Lawrence D’Oliveiro wrote: > >> On Friday, July 8, 2016 at 7:38:56 PM UTC+12, Peter Otten wrote: >> >>> There is a test >>> >>> if not object: >>> raise ImportError('no Python documentation found for %r' % thing) >>> >>> i

Re: Python Byte Code Hacking

2016-07-13 Thread Ian Kelly
On Wed, Jul 13, 2016 at 12:48 PM, Vijay Kumar wrote: > Hi Everyone, > I wrote an article on Python byte code hacking. The article is available > from http://www.bravegnu.org/blog/python-byte-code-hacks.html The article > uses an incremental approach for explaining Python's code objects and how to

Re: Clean Singleton Docstrings

2016-07-13 Thread Peter Otten
Lawrence D’Oliveiro wrote: > On Friday, July 8, 2016 at 7:38:56 PM UTC+12, Peter Otten wrote: > >> There is a test >> >> if not object: >> raise ImportError('no Python documentation found for %r' % thing) >> >> in the pydoc module. So all you need is to ensure that your Registry >> evaluate

Re: Clean Singleton Docstrings

2016-07-13 Thread Lawrence D’Oliveiro
On Friday, July 8, 2016 at 7:38:56 PM UTC+12, Peter Otten wrote: > There is a test > > if not object: > raise ImportError('no Python documentation found for %r' % thing) > > in the pydoc module. So all you need is to ensure that your Registry > evaluates to True in a boolean context, e. g.

Re: [OT] Compression of random binary data

2016-07-13 Thread Tim Delaney
On 14 July 2016 at 05:35, Marko Rauhamaa wrote: > Michael Torrie : > > If the data is truly random then it does not matter whether you have 5 > > bytes or 5 GB. There is no pattern to discern, and having more chunks > > of random data won't make it possible to compress. > > That's true if "truly

Re: problem writing excel sheet using python

2016-07-13 Thread Lawrence D’Oliveiro
On Thursday, July 14, 2016 at 9:29:23 AM UTC+12, vineeth menneni wrote: > > .. I am finding it difficult to create a excel sheet using openpyxl or > xlsxwriter. How about writing ODF using odfpy instead? Microsoft Office is supposed to be ISO-26300-compliant, isn’t

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Lawrence D’Oliveiro
On Thursday, July 14, 2016 at 1:03:30 AM UTC+12, Rustom Mody wrote: > > Note further that Torvalds was told off by prof. Tanenbaum for his poor > quality unimaginative approach to Linux And today, Prof Tanenbaum is struggling to find a little niche where his Minix product can be of relevance, whi

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Lawrence D’Oliveiro
On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: > ... don't call it "precision". How about “mantissa length”, then. That sufficiently neutral for you? -- https://mail.python.org/mailman/listinfo/python-list

Re: Touch screen development in Python

2016-07-13 Thread Michael Torrie
On 07/13/2016 01:33 PM, Jahn wrote: > I would like to learn more how to write python based touch application > for embedded system but I do not know what conditions a touch screen must > have so that it > will response to touch. > Does anyone know? These days GUI toolkits such as GTK+ or Qt pr

Re: problem writing excel sheet using python

2016-07-13 Thread Chris Angelico
On Thu, Jul 14, 2016 at 7:29 AM, vineeth menneni wrote: > Hi I am finding it difficult to create a excel sheet using openpyxl or > xlsxwriter. The problem is that i am loading a table data from MYSQL db which > has 600k rows and 15 columns (approximately 100mb data). The error that the > termin

problem writing excel sheet using python

2016-07-13 Thread vineeth menneni
Hi I am finding it difficult to create a excel sheet using openpyxl or xlsxwriter. The problem is that i am loading a table data from MYSQL db which has 600k rows and 15 columns (approximately 100mb data). The error that the terminal shows is that "MemoryError". I just wanted to know if it is po

Python Byte Code Hacking

2016-07-13 Thread Vijay Kumar
Hi Everyone, I wrote an article on Python byte code hacking. The article is available from http://www.bravegnu.org/blog/python-byte-code-hacks.html The article uses an incremental approach for explaining Python's code objects and how to modify them. Unfortunately, I am stuck with Python 2, beca

Re: [OT] Compression of random binary data

2016-07-13 Thread Marko Rauhamaa
Michael Torrie : > If the data is truly random then it does not matter whether you have 5 > bytes or 5 GB. There is no pattern to discern, and having more chunks > of random data won't make it possible to compress. That's true if "truly random" means "evenly distributed". You might have genuine ra

Re: [OT] Compression of random binary data

2016-07-13 Thread Grant Edwards
On 2016-07-13, Michael Torrie wrote: > On 07/13/2016 03:46 AM, jonas.thornv...@gmail.com wrote: >> It is not that the data is not compressible i just need more chunks >> or random data, it is the footprint of the algorithm that has a >> certain it is a structure afterall albeit richer in interpre

Re: Touch screen development in Python

2016-07-13 Thread Jahn
I would like to learn more how to write python based touch application for embedded system but I do not know what conditions a touch screen must have so that it will response to touch. Does anyone know? > On 11.07.2016 19:21, Jahn wrote: > > Does anyone use Python for developping applicati

Re: [OT] Compression of random binary data

2016-07-13 Thread Michael Torrie
On 07/13/2016 03:46 AM, jonas.thornv...@gmail.com wrote: > It is not that the data is not compressible i just need more chunks > or random data, it is the footprint of the algorithm that has a > certain it is a structure afterall albeit richer in interpretation > than the numerical field. Err, no,

Re: Touch screen development in Python

2016-07-13 Thread Laurent Pointal
Jahn wrote: > I was thinking about Python touch screen applications for industrial > boards( computers). > If I have a touch screen with that industrial board, what I must have > installed to be able to > write touch screen applications in Python? If you go with Kivy (its built for multitouch g

Django Tastypie Vs. Djaogn Rest Framework

2016-07-13 Thread justin walters
Hi guys and gals. I've been building a new web application with my business partner. We're using Django and postreSQL. We needed a restful API as we wanted the back end to be completely decoupled from the front end. We ended up going with Tastypie over DRF due to the former being seemingly less co

Re: Packaging multiple wheels in the same package

2016-07-13 Thread Ethan Furman
On 07/13/2016 05:54 AM, Nir Cohen wrote: On Thursday, July 7, 2016 at 7:47:22 AM UTC+3, Nir Cohen wrote: On Wednesday, July 6, 2016 at 10:09:01 PM UTC+3, Ethan Furman wrote: On 07/06/2016 11:43 AM, Nir Cohen wrote: We decided that we want to package sets of wheels together created or downloa

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Chris Angelico
On Thu, Jul 14, 2016 at 12:23 AM, Jussi Piitulainen wrote: > Python 3.4.3 help text for divmod says it returns ((x-x%y)/y, x%y) but > that's not quite correct, because type. Probably // is intended. Starting with 3.5, it says it returns the tuple (x//y, x%y). ChrisA -- https://mail.python.org/m

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Jussi Piitulainen
Chris Angelico writes: > On Wed, Jul 13, 2016 at 11:16 PM, Jussi Piitulainen wrote: >>> Or just use divmod: >>> >> "%d.%02d" % divmod(1<<200, 100) >>> '16069380442589902755419620923411626025222029937827928353013.76' >> >> I'm not quite ready to blame floating point for this difference yet: >>

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Antoon Pardon
Op 13-07-16 om 10:49 schreef Steven D'Aprano: > On Wednesday 13 July 2016 17:05, Lawrence D’Oliveiro wrote: > >> On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: >> >>> I never claimed it's not useful. I don't really have a problem with >>> format supporting it, either. But if it does,

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Chris Angelico
On Wed, Jul 13, 2016 at 11:16 PM, Jussi Piitulainen wrote: >> Or just use divmod: >> > "%d.%02d" % divmod(1<<200, 100) >> '16069380442589902755419620923411626025222029937827928353013.76' > > I'm not quite ready to blame floating point for this difference yet: > "%d.%02d" % divmod(-1,100)

Re: Compression of random binary data

2016-07-13 Thread Steven D'Aprano
On Wed, 13 Jul 2016 07:46 pm, jonas.thornv...@gmail.com wrote: > It is not that the data is not compressible Yes it is. Until you explain how you can *reversibly* pack 10**100 inputs into 10**6 outputs without loss of information, all your explanations about "folding" and polynomials and struct

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Jussi Piitulainen
Chris Angelico writes: > On Wed, Jul 13, 2016 at 9:46 PM, Dennis Lee Bieber > wrote: >> On Wed, 13 Jul 2016 00:21:17 -0600, Ian Kelly >> declaimed the following: >> >>> What if I've been doing my math with fixed-point integers (because I >>> don't know about or just don't like decimals), and now

Re: Packaging multiple wheels in the same package

2016-07-13 Thread Chris Angelico
On Wed, Jul 13, 2016 at 10:54 PM, Nir Cohen wrote: > On Thursday, July 7, 2016 at 7:47:22 AM UTC+3, Nir Cohen wrote: >> On Wednesday, July 6, 2016 at 10:09:01 PM UTC+3, Ethan Furman wrote: >> > Sounds like a great idea! >> > >> > Once you have your feed-back from here you'll want to take your PEP

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Jussi Piitulainen
Dennis Lee Bieber writes: > On Wed, 13 Jul 2016 00:21:17 -0600, Ian Kelly > declaimed the following: > >> What if I've been doing my math with fixed-point integers (because I >> don't know about or just don't like decimals), and now I want to >> format them for output? Is this just wrong? >> >>

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Rustom Mody
On Wednesday, July 13, 2016 at 10:42:01 AM UTC+5:30, Chris Angelico wrote: > On Wed, Jul 13, 2016 at 2:42 PM, Ben Finney wrote: > > Chris Angelico writes: > > > >> On Wed, Jul 13, 2016 at 11:28 AM, Ben Finney wrote: > >> > Pull requests. Code review. Issues. Integration with other services. > >>

Re: Quick poll: gmean or geometric_mean

2016-07-13 Thread alister
On Tue, 12 Jul 2016 18:42:44 -0700, Lawrence D’Oliveiro wrote: > On Wednesday, July 13, 2016 at 10:58:14 AM UTC+12, alister wrote: > >> a US gallon is smaller than an Imperial Gallon a US Mile is shorter >> than an Imperial mile and probably most importantly (because it means >> they keep serving

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Chris Angelico
On Wed, Jul 13, 2016 at 9:46 PM, Dennis Lee Bieber wrote: > On Wed, 13 Jul 2016 00:21:17 -0600, Ian Kelly > declaimed the following: > >>What if I've been doing my math with fixed-point integers (because I >>don't know about or just don't like decimals), and now I want to >>format them for output

Re: Packaging multiple wheels in the same package

2016-07-13 Thread Nir Cohen
On Thursday, July 7, 2016 at 7:47:22 AM UTC+3, Nir Cohen wrote: > On Wednesday, July 6, 2016 at 10:09:01 PM UTC+3, Ethan Furman wrote: > > On 07/06/2016 11:43 AM, Nir Cohen wrote: > > > > > We decided that we want to package sets of wheels together created or > > > downloaded > > > by `pip wheel

Re: Program outlining

2016-07-13 Thread Rustom Mody
On Monday, July 11, 2016 at 6:27:05 PM UTC+5:30, Rustom Mody wrote: > On Monday, July 11, 2016 at 6:26:01 PM UTC+5:30, Rustom Mody wrote: > > Ive been trying to figure out the best outlining that emacs can give for > > programs. > > Oops sorry! Wrong list!! Couple of people wrote me off list aski

Re: Compression of random binary data

2016-07-13 Thread Steven D'Aprano
On Wed, 13 Jul 2016 08:04 pm, jonas.thornv...@gmail.com wrote: > Ok, try to see it this way very big numbers can be described as > the sum or difference between a sequense of a few polynomials. *Any* number, big or small, can be given as the sum or difference of a few polynomials: 15 = (

EuroPython 2016: Guggenheim and Fine Arts Museum

2016-07-13 Thread M.-A. Lemburg
EuroPython is not the only attraction in Bilbao to attend in July. The city also hosts the famous Guggenheim Museum, featuring modern art in an amazing building designed by Frank O. Gehry. >>> Please see below for a special deal we have for EuroPython attendees *** Guggenhei

Re: Compression of random binary data

2016-07-13 Thread jonas . thornvall
Den onsdag 13 juli 2016 kl. 12:05:03 UTC+2 skrev jonas.t...@gmail.com: > Den onsdag 13 juli 2016 kl. 04:29:48 UTC+2 skrev Steven D'Aprano: > > On Wed, 13 Jul 2016 03:35 am, jonas.thornv...@gmail.com wrote: > > > > > No it is only compressible down to a limit given by the algorithm. > > > > Right!

Re: Compression of random binary data

2016-07-13 Thread jonas . thornvall
Den onsdag 13 juli 2016 kl. 04:29:48 UTC+2 skrev Steven D'Aprano: > On Wed, 13 Jul 2016 03:35 am, jonas.thornv...@gmail.com wrote: > > > No it is only compressible down to a limit given by the algorithm. > > Right! Then there is data that you can't compress. > > Suppose you have some data: > >

Re: Compression of random binary data

2016-07-13 Thread jonas . thornvall
Den onsdag 13 juli 2016 kl. 04:29:48 UTC+2 skrev Steven D'Aprano: > On Wed, 13 Jul 2016 03:35 am, jonas.thornv...@gmail.com wrote: > > > No it is only compressible down to a limit given by the algorithm. > > Right! Then there is data that you can't compress. > > Suppose you have some data: > >

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Chris Angelico
On Wed, Jul 13, 2016 at 6:49 PM, Steven D'Aprano wrote: >> what >> are you going to do, move your project to some backwater VCS where nobody >> ever goes? > > "...some backwater where nobody ever goes..." > > If you really mean that, then you're saying that Github has already captured > such a dom

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Steven D'Aprano
On Wednesday 13 July 2016 17:00, Chris Angelico wrote: > On Wed, Jul 13, 2016 at 4:44 PM, Steven D'Aprano > wrote: >> Even if Github was 100% open source with no proprietary extensions, and the >> *technical* cost of leaving was low, the single-network effect would still >> lock you in, which lea

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Steven D'Aprano
On Wednesday 13 July 2016 17:05, Lawrence D’Oliveiro wrote: > On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: > >> I never claimed it's not useful. I don't really have a problem with >> format supporting it, either. But if it does, then don't call it >> "precision". > > Like it or n

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Lawrence D’Oliveiro
On Wednesday, July 13, 2016 at 6:22:31 PM UTC+12, Ian wrote: > I never claimed it's not useful. I don't really have a problem with > format supporting it, either. But if it does, then don't call it > "precision". Like it or not, that is the accepted term, as used in the printf(3) man page. Feel

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Chris Angelico
On Wed, Jul 13, 2016 at 4:44 PM, Steven D'Aprano wrote: > Even if Github was 100% open source with no proprietary extensions, and the > *technical* cost of leaving was low, the single-network effect would still > lock > you in, which leaves you (to some degree) at the mercy of Github's management

Re: Curious Omission In New-Style Formats

2016-07-13 Thread Marko Rauhamaa
Ian Kelly : > I don't know of anybody who would consider that good design, and the > "precision" field in printf-style formatting isn't good design either. > But it has history behind it, so does that put it in the right? Apparently, the original intent for the field was for precision only, and t