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

2016-07-12 Thread Steven D'Aprano
On Wednesday 13 July 2016 15:11, Chris Angelico wrote: > You're welcome to take a 100% philosophical stance It's not a philosophical stance to avoid vendor lockin, nor to avoid incipient monopolies, nor to avoid rewarding companies that behave badly. It's not for philosophical reasons that we s

Re: Curious Omission In New-Style Formats

2016-07-12 Thread Ian Kelly
On Mon, Jul 11, 2016 at 9:38 PM, Steven D'Aprano wrote: > For integers, printf and % interpret the so-called "precision" field of the > format string not as a measurement precision (number of decimal places), > but as the number of digits to use (which is different from the total field > width). F

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

2016-07-12 Thread Chris Angelico
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. >> > All the social information around all of those interactions, and >> > more. >> >

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

2016-07-12 Thread Ben Finney
Chris Angelico writes: > On Wed, Jul 13, 2016 at 11:28 AM, Ben Finney > wrote: > > Pull requests. Code review. Issues. Integration with other services. > > All the social information around all of those interactions, and > > more. > > > > If *any* of that is valuable, then yes it's important th

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

2016-07-12 Thread Chris Angelico
On Wed, Jul 13, 2016 at 11:28 AM, Ben Finney wrote: > Pull requests. Code review. Issues. Integration with other services. All > the social information around all of those interactions, and more. > > If *any* of that is valuable, then yes it's important that it not be > locked to any one vendor.

Re: Compression of random binary data

2016-07-12 Thread 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: data = "ABABABABABAB...ABAB" And you compress it "down to a limit": x = compress(c

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Steven D'Aprano
On Wed, 13 Jul 2016 08:57 am, 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 me > short measures) a US pint is smaller than an Imperial Pint That's okay, they charge y

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Gene Heskett
On Tuesday 12 July 2016 21:42:44 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 me

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
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 me > short measures) a US pint is smaller than an Imperial Pint I th

Re: subprocess: xterm -c cat, need to send data to cat and have it displayed in the xterm window

2016-07-12 Thread Lawrence D’Oliveiro
On Tuesday, July 12, 2016 at 3:20:35 PM UTC+12, Veek. M wrote: > I then need to get it translated which also works and then display in > XTerm using cat. -- https://mail.python.org/mailman/listinfo/python-list

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

2016-07-12 Thread Ben Finney
Christian Gollwitzer writes: > Am 01.07.16 um 03:38 schrieb Ben Finney: > > If one wants to avoid vendor lock-in, Github is not best: the > > workflow tools (other than Git itself) are completely closed and not > > available for implementation on another vendor's servers. > > Yes, but that is rel

Re: how raspi-idle3 configure?

2016-07-12 Thread Egon Mueller
It is a little bit helpful and very interesting, but answers to my question isn't available. I have to search again. Am 12.07.2016 um 20:33 schrieb memilanuk: Egon Mueller online.de> writes: Where can read a beginner so simple things about handling the python 3 idle3? I don't think about py

Announcing PyBidi

2016-07-12 Thread Lawrence D’Oliveiro
Just thought I’d mention PyBidi , my Python 3 wrapper for all the functionality in FriBidi that I could usefully find, that I threw together over the weekend. I’m impressed that FriBidi doesn’t just do bidirectional logical-to-visual rearrangement, but it will also p

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den onsdag 13 juli 2016 kl. 00:24:23 UTC+2 skrev Ian: > On Tue, Jul 12, 2016 at 11:35 AM, wrote: > > > > No it is only compressible down to a limit given by the algorithm. > > Then your algorithm does not compress random data as you claimed. > > For some input, determine the limiting output tha

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den onsdag 13 juli 2016 kl. 00:24:23 UTC+2 skrev Ian: > On Tue, Jul 12, 2016 at 11:35 AM, wrote: > > > > No it is only compressible down to a limit given by the algorithm. > > Then your algorithm does not compress random data as you claimed. > > For some input, determine the limiting output tha

Re: How do you guys tackle a package with poorish documentation?

2016-07-12 Thread Ben Finney
"Veek. M" writes: > My question is: how do you guys deal with a situation like this? Do you > look through the source code? Do you switch to scapy? Do you now look > for books on scapy - there are quite a few, with chapters covering it. Once you realise that there is significantly less incenti

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread alister
On Tue, 12 Jul 2016 15:17:58 -0700, Lawrence D’Oliveiro wrote: > On Monday, July 11, 2016 at 5:16:53 AM UTC+12, Ian wrote: > >> For local variables I usually wouldn't bother with the units, but in >> general it's a good practice to help avoid crashing your orbiter into >> Mars. > > The Mars Clim

Re: Compression of random binary data

2016-07-12 Thread Ian Kelly
On Tue, Jul 12, 2016 at 11:35 AM, wrote: > > No it is only compressible down to a limit given by the algorithm. Then your algorithm does not compress random data as you claimed. For some input, determine the limiting output that it ultimately compresses down to. Take that output and feed it thr

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Monday, July 11, 2016 at 2:30:00 AM UTC+12, Rustom Mody wrote: > Force is given by the negative of the universal_gravitational_constant times > the mass_of_first_body times mass_of_second_body divided by the square of > the distance_between_the_bodies > > Cobol anyone? Look at it this way: th

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Monday, July 11, 2016 at 5:16:53 AM UTC+12, Ian wrote: > For local variables I usually wouldn't bother with the units, but in > general it's a good practice to help avoid crashing your orbiter into > Mars. The Mars Climate Orbiter fiasco wasn’t a problem with using the wrong units (dimensiona

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Chris Angelico
On Wed, Jul 13, 2016 at 8:13 AM, Lawrence D’Oliveiro wrote: > On Saturday, July 9, 2016 at 9:05:18 PM UTC+12, Peter Otten wrote: > >> Life's too short for abbreviations. > > Why is there no abbreviation for “abbreviation”? > > Let me propose “brev”. Nice and ... um ... abbreviated. abbr? ChrisA

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Saturday, July 9, 2016 at 9:05:18 PM UTC+12, Peter Otten wrote: > Life's too short for abbreviations. Why is there no abbreviation for “abbreviation”? Let me propose “brev”. Nice and ... um ... abbreviated. -- https://mail.python.org/mailman/listinfo/python-list

Re: Touch screen development in Python

2016-07-12 Thread Dietmar Schwertberger
On 12.07.2016 21:10, 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? This could be any platform: QNX,

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den tisdag 12 juli 2016 kl. 21:40:36 UTC+2 skrev jonas.t...@gmail.com: > Den tisdag 12 juli 2016 kl. 20:20:52 UTC+2 skrev Michael Torrie: > > On 07/12/2016 11:46 AM, jonas.thornv...@gmail.com wrote: > > > Well the algorithm start with looking up a suitable folding structure > > > "close enough to t

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den tisdag 12 juli 2016 kl. 20:20:52 UTC+2 skrev Michael Torrie: > On 07/12/2016 11:46 AM, jonas.thornv...@gmail.com wrote: > > Well the algorithm start with looking up a suitable folding structure > > "close enough to the number", then it works down the folding > > structure finding the fold where

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den tisdag 12 juli 2016 kl. 20:20:52 UTC+2 skrev Michael Torrie: > On 07/12/2016 11:46 AM, jonas.thornv...@gmail.com wrote: > > Well the algorithm start with looking up a suitable folding structure > > "close enough to the number", then it works down the folding > > structure finding the fold where

Re: Touch screen development in Python

2016-07-12 Thread Jahn
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? > On 11.07.2016 19:21, Jahn wrote: > > Does anyone use Python for

Re: pocketsphinx no module named pocketsphinx found

2016-07-12 Thread ldompeling
Op dinsdag 12 juli 2016 10:00:51 UTC+2 schreef ldomp...@casema.nl: > I try to run an example python file for pocketsphinx but I get this error: > > File "continuous_test.py", line 5, in > from pocketsphinx.pocketsphinx import * > ImportError: No module named pocketsphinx > > Does somebody k

Re: how raspi-idle3 configure?

2016-07-12 Thread memilanuk
Egon Mueller online.de> writes: > > Where can read a beginner so simple things about handling the python 3 > idle3? I don't think about python programming, only about better > handling the ide. > This link might be of some help... https://hkn.eecs.berkeley.edu/~DYOO/python/idle_intro/index.h

Re: Compression of random binary data

2016-07-12 Thread Michael Torrie
On 07/12/2016 11:46 AM, jonas.thornv...@gmail.com wrote: > Well the algorithm start with looking up a suitable folding structure > "close enough to the number", then it works down the folding > structure finding the fold where the difference or sum between the > folds closest to zero. > > You do t

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den tisdag 12 juli 2016 kl. 17:19:54 UTC+2 skrev Steven D'Aprano: > On Wed, 13 Jul 2016 12:29 am, jonas.thornv...@gmail.com wrote: > > > Den tisdag 12 juli 2016 kl. 05:01:20 UTC+2 skrev Lawrence D’Oliveiro: > >> On Tuesday, July 12, 2016 at 5:52:27 AM UTC+12, jonas.t...@gmail.com > >> wrote: > >>

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den tisdag 12 juli 2016 kl. 17:12:01 UTC+2 skrev Steven D'Aprano: > On Wed, 13 Jul 2016 12:24 am, jonas.thornv...@gmail.com wrote: > > > Den måndag 11 juli 2016 kl. 20:38:51 UTC+2 skrev Steven D'Aprano: > >> On Tue, 12 Jul 2016 03:52 am, jonas.thornv...@gmail.com wrote: > >> > >> > What kind of s

Re: Compression of random binary data

2016-07-12 Thread mm0fmf
On 12/07/2016 15:29, jonas.thornv...@gmail.com wrote: Den tisdag 12 juli 2016 kl. 05:01:20 UTC+2 skrev Lawrence D’Oliveiro: On Tuesday, July 12, 2016 at 5:52:27 AM UTC+12, jonas.t...@gmail.com wrote: What kind of statistic law or mathematical conjecture or is it even a physical law is violate

how raspi-idle3 configure?

2016-07-12 Thread Egon Mueller
Hello, is there a manual concerning the python3-ide on a raspberry / debian jessie? - The menue bar and the items there would I like to have a little bit greater for better readability. - After running a program is needed long search to return to editing window. - Where can read a beginne

Re: Compression of random binary data

2016-07-12 Thread Steven D'Aprano
On Wed, 13 Jul 2016 12:29 am, jonas.thornv...@gmail.com wrote: > Den tisdag 12 juli 2016 kl. 05:01:20 UTC+2 skrev Lawrence D’Oliveiro: >> On Tuesday, July 12, 2016 at 5:52:27 AM UTC+12, jonas.t...@gmail.com >> wrote: >> >> > What kind of statistic law or mathematical conjecture or is it even a >

Re: Compression of random binary data

2016-07-12 Thread Steven D'Aprano
On Wed, 13 Jul 2016 12:24 am, jonas.thornv...@gmail.com wrote: > Den måndag 11 juli 2016 kl. 20:38:51 UTC+2 skrev Steven D'Aprano: >> On Tue, 12 Jul 2016 03:52 am, jonas.thornv...@gmail.com wrote: >> >> > What kind of statistic law or mathematical conjecture or is it even a >> > physical law is

How do you guys tackle a package with poorish documentation?

2016-07-12 Thread Veek. M
I've been messing with QQ (a Chinese chat app) and started receiving a lot of shady traffic partly because I was stupid enough to install the insecure QQ=international version. Anyway, so I decided to write something to provide me with a diff for networks. Basically track my current n/w with m

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den tisdag 12 juli 2016 kl. 05:01:20 UTC+2 skrev Lawrence D’Oliveiro: > On Tuesday, July 12, 2016 at 5:52:27 AM UTC+12, jonas.t...@gmail.com wrote: > > > What kind of statistic law or mathematical conjecture or is it even a > > physical law is violated by compression of random binary data? > >

Re: Compression of random binary data

2016-07-12 Thread jonas . thornvall
Den måndag 11 juli 2016 kl. 20:38:51 UTC+2 skrev Steven D'Aprano: > On Tue, 12 Jul 2016 03:52 am, jonas.thornv...@gmail.com wrote: > > > What kind of statistic law or mathematical conjecture or is it even a > > physical law is violated by compression of random binary data? > > The pigeon hole pr

Re: subprocess: xterm -c cat, need to send data to cat and have it displayed in the xterm window

2016-07-12 Thread Veek. M
Steven D'Aprano wrote: > On Tuesday 12 July 2016 13:20, Veek. M wrote: > >> Script grabs some image data and runs imagemagick on it to extract >> some chinese. Then tesseract OCR to get the actual unicode. >> >> I then need to get it translated which also works and then display in >> XTerm using

Re: subprocess: xterm -c cat, need to send data to cat and have it displayed in the xterm window

2016-07-12 Thread Random832
On Tue, Jul 12, 2016, at 02:27, Steven D'Aprano wrote: > On Tuesday 12 July 2016 13:20, Veek. M wrote: > > I then need to get it translated which also works and then display in > > XTerm using cat. > > Why not just print it? Why do you have to use cat? Well, displaying something in a new xterm (i

Re: What is precision of a number representation?

2016-07-12 Thread Random832
On Tue, Jul 12, 2016, at 02:21, Steven D'Aprano wrote: > If not, then what are the alternatives? Using str.format, how would > you get the same output as this? > > > py> "%8.4d" % 25 > '0025' "%04d" % 25 "%8s" % ("%04d" % 25) The latter (well, generally, "format it how you want and the

Re: What is precision of a number representation?

2016-07-12 Thread Steven D'Aprano
On Tue, 12 Jul 2016 07:50 pm, Antoon Pardon wrote: > Op 12-07-16 om 06:19 schreef Steven D'Aprano: >> On Tue, 12 Jul 2016 07:51 am, Chris Angelico wrote: >> >>> say, 2,147 >>> millimeters, with a precision of four significant digits >> >> How do you represent 1 mm to a precision of four significan

Re: Getting number of neighbours for a 3d numpy arrays

2016-07-12 Thread Nobody
Some common ways to handle the boundary condition: 1. Generate clamped indices, test for validity and substitute invalid entries with an "identity" element. E.g. ijk = np.mgrid[:a,:b,:c] i,j,k = ijk i0,j0,k0 = np.maximum(0,ijk-1) i1,j1,k1 = np.minimum(np.array(a,b,c).T-1,ijk+1) n1 = (i>

Re: Getting number of neighbours for a 3d numpy arrays

2016-07-12 Thread Peter Otten
Heli wrote: > I have a 3d numpy array containing true/false values for each i,j,k. The > size of the array is a*b*c. > > for each cell with indices i,j,k; I will need to check all its neighbours > and calculate the number of neighbour cells with true values. > > A cell with index i,j,k has the f

Re: pocketsphinx no module named pocketsphinx found

2016-07-12 Thread Steven D'Aprano
On Tue, 12 Jul 2016 09:32 pm, ldompel...@casema.nl wrote: > I reinstall pocketsphinx python and now I don't get any errors while > import from pocketsphinx. So I tried to run some python examples and now I > get this error. I don't have a clue whats coing on. [...] > RuntimeError: new_Decoder re

Re: pocketsphinx no module named pocketsphinx found

2016-07-12 Thread ldompeling
Op dinsdag 12 juli 2016 10:00:51 UTC+2 schreef ldomp...@casema.nl: > I try to run an example python file for pocketsphinx but I get this error: > > File "continuous_test.py", line 5, in > from pocketsphinx.pocketsphinx import * > ImportError: No module named pocketsphinx > > Does somebody k

Re: What is precision of a number representation?

2016-07-12 Thread Antoon Pardon
Op 12-07-16 om 12:27 schreef Marko Rauhamaa: > Antoon Pardon : > >> Op 12-07-16 om 06:19 schreef Steven D'Aprano: >>> How do you represent 1 mm to a precision of four significant digits, >>> in such a way that it is distinguished from 1 mm to one significant >>> digit, and 1 mm to a precision of fo

Re: What is precision of a number representation?

2016-07-12 Thread Marko Rauhamaa
Antoon Pardon : > Op 12-07-16 om 06:19 schreef Steven D'Aprano: >> How do you represent 1 mm to a precision of four significant digits, >> in such a way that it is distinguished from 1 mm to one significant >> digit, and 1 mm to a precision of four decimal places? > > Your question doesn't has an

Re: What is precision of a number representation?

2016-07-12 Thread Antoon Pardon
Op 12-07-16 om 06:19 schreef Steven D'Aprano: > On Tue, 12 Jul 2016 07:51 am, Chris Angelico wrote: > >> say, 2,147 >> millimeters, with a precision of four significant digits > > How do you represent 1 mm to a precision of four significant digits, in such > a way that it is distinguished from 1 mm

Getting number of neighbours for a 3d numpy arrays

2016-07-12 Thread Heli
Hi, I have a 3d numpy array containing true/false values for each i,j,k. The size of the array is a*b*c. for each cell with indices i,j,k; I will need to check all its neighbours and calculate the number of neighbour cells with true values. A cell with index i,j,k has the following neighbou

Re: pocketsphinx no module named pocketsphinx found

2016-07-12 Thread Steven D'Aprano
On Tuesday 12 July 2016 18:47, ldompel...@casema.nl wrote: > Op dinsdag 12 juli 2016 10:00:51 UTC+2 schreef ldomp...@casema.nl: >> I try to run an example python file for pocketsphinx but I get this error: >> >> File "continuous_test.py", line 5, in >> from pocketsphinx.pocketsphinx import *

Re: pocketsphinx no module named pocketsphinx found

2016-07-12 Thread ldompeling
Op dinsdag 12 juli 2016 10:00:51 UTC+2 schreef ldomp...@casema.nl: > I try to run an example python file for pocketsphinx but I get this error: > > File "continuous_test.py", line 5, in > from pocketsphinx.pocketsphinx import * > ImportError: No module named pocketsphinx > > Does somebody k

Re: pocketsphinx no module named pocketsphinx found

2016-07-12 Thread Peter Otten
ldompel...@casema.nl wrote: > I try to run an example python file for pocketsphinx but I get this error: > > File "continuous_test.py", line 5, in > from pocketsphinx.pocketsphinx import * > ImportError: No module named pocketsphinx > > Does somebody knows how to repair this. Did you insta

pocketsphinx no module named pocketsphinx found

2016-07-12 Thread ldompeling
I try to run an example python file for pocketsphinx but I get this error: File "continuous_test.py", line 5, in from pocketsphinx.pocketsphinx import * ImportError: No module named pocketsphinx Does somebody knows how to repair this. -- https://mail.python.org/mailman/listinfo/python-list