Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread John Ladasky
On Saturday, April 25, 2015 at 4:16:04 PM UTC-7, Mario Figueiredo wrote: [snip] > This works as intended. But plots a jagged curve due to the small > discrepancies normal of a random number generation. > > Other than replacing the random module with the probability density > function for the expon

pypy3 kubuntu 14.04

2015-04-25 Thread Paulo da Silva
Is there anybody using pypy3 in *ubuntu 14.04? I installed ppa:pypy/ppa but I still cannot see any pypy3! All refs to pypy (using aptitude) show in the comments python 2.7! Thanks for any help. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to install dtrx with pip?

2015-04-25 Thread Chris Angelico
On Sun, Apr 26, 2015 at 10:50 AM, Peng Yu wrote: > I get the following error when I try to install pip. Does anybody know > what it is wrong and how to fix it? Thanks. > > ~/Downloads$ pip install dtrx > Downloading/unpacking dtrx > Could not find any downloads that satisfy the requirement dtrx

Re: How to install dtrx with pip?

2015-04-25 Thread Mark Lawrence
On 26/04/2015 01:50, Peng Yu wrote: Hi, I get the following error when I try to install pip. Does anybody know what it is wrong and how to fix it? Thanks. ~/Downloads$ pip install dtrx Downloading/unpacking dtrx Could not find any downloads that satisfy the requirement dtrx Some externall

How to install dtrx with pip?

2015-04-25 Thread Peng Yu
Hi, I get the following error when I try to install pip. Does anybody know what it is wrong and how to fix it? Thanks. ~/Downloads$ pip install dtrx Downloading/unpacking dtrx Could not find any downloads that satisfy the requirement dtrx Some externally hosted files were ignored (use --allow

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread Mark Lawrence
On 25/04/2015 23:33, Mario Figueiredo wrote: I'm trying to plot the curve of an exponential distribution without much success. I'm missing something very basic I feel, but just can't figure it out after numerous tries, so I'm turning out to you. This is the function generating the frequency of i

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread Chris Angelico
On Sun, Apr 26, 2015 at 9:36 AM, wrote: > The solution ended up being editing the top-level __init__.py: > > import awesome > > and then *when in a subdirectory*: > > import awesome_lib as awesome > > and *when in a different top-level file*: > > import awesome. > > IOW (from what I can tell) I m

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread Mario Figueiredo
On Sat, 25 Apr 2015 23:12:19 + (UTC), Denis McMahon wrote: >Sorry, but given a choice of 5 plot methods in matplotlib and no hint as >to which one you're calling, I'm not inclined to go and look at the >arguments of all of them. There's actually around 8 I think. The individual graphs type

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread richmolj
Thanks, I appreciate the help. I did figure this out. Chris - apologies for the error in my example, it should have been 'import util' within awesome.py. IOW, I was looking for awesome.util.helper to be available, and I also wanted awesome.foo available within helper.py. The solution ended up b

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread Mario Figueiredo
Ok. Ermm, it seems I needed to ask to finally have an epiphany. The problem is that defaultdict is unordered. Once I get the data ordered, I can finally plot the curve. Although this presents another problem... import decimal from random import expovariate from collections import defaultdict deci

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread Denis McMahon
On Sat, 25 Apr 2015 23:33:10 +0100, Mario Figueiredo wrote: > plot(list(results.keys()), list(results.values())) matplotlib supports at least (from searching the website) 5 plot methods. Which one are you using? My first guess would be that the data format that plot expects isn't the forma

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread Chris Angelico
On Sun, Apr 26, 2015 at 3:48 AM, wrote: > Apologies, I'm a rubyist and this is a beginner question but I'm not finding > a great answer with lots of googling. I am writing a library, organized > something like this: > > awesome_lib/awesome.py > awesome_lib/util/__init__.py > awesome_lib/util/he

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread Mario Figueiredo
On Sat, 25 Apr 2015 23:33:10 +0100, Mario Figueiredo wrote: > >Trying to plot this data into a frequency curve is proving too >challenging and I just can't understand why. > >plot(list(results.keys()), list(results.values())) > The above should read: results = generate(1) plot(list(

[Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread Mario Figueiredo
I'm trying to plot the curve of an exponential distribution without much success. I'm missing something very basic I feel, but just can't figure it out after numerous tries, so I'm turning out to you. This is the function generating the frequency of individual outcomes: import decimal fro

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread alister
On Sat, 25 Apr 2015 10:48:23 -0700, richmolj wrote: > Apologies, I'm a rubyist and this is a beginner question but I'm not > finding a great answer with lots of googling. I am writing a library, > organized something like this: > > awesome_lib/awesome.py awesome_lib/util/__init__.py > awesome_lib

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread alister
On Sat, 25 Apr 2015 10:48:23 -0700, richmolj wrote: > Apologies, I'm a rubyist and this is a beginner question but I'm not > finding a great answer with lots of googling. I am writing a library, > organized something like this: > > awesome_lib/awesome.py awesome_lib/util/__init__.py > awesome_lib

Library import succeeds with nose, fails elsewhere

2015-04-25 Thread richmolj
Apologies, I'm a rubyist and this is a beginner question but I'm not finding a great answer with lots of googling. I am writing a library, organized something like this: awesome_lib/awesome.py awesome_lib/util/__init__.py awesome_lib/util/helper.py In the top of awesome.py: foo = 'bar' import

Re: New to Python - block grouping (spaces)

2015-04-25 Thread Albert van der Horst
In article , Rustom Mody wrote: >On Monday, April 20, 2015 at 4:00:16 PM UTC+5:30, Steven D'Aprano wrote: >> On Monday 20 April 2015 12:43, Rustom Mody wrote: >> >> > You've a 10-file python project in which you want to replace function 'f' >> > by function 'longname' >> > How easy is it? >> >> A

Re: New to Python - block grouping (spaces)

2015-04-25 Thread Rustom Mody
On Saturday, April 25, 2015 at 12:57:34 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > Some rambly ruminations on switchable (aka firstclass) syntax > > http://blog.languager.org/2015/04/poverty-universality-structure-0.html > > I'll ruminate in response: Thanks for a connoisseur review

EuroPython 2015: Our next keynote: Ola & Ola (Django Girls)

2015-04-25 Thread M.-A. Lemburg
We are pleased to announce our next keynote speakers: Ola Sitarska and Ola Sendecka, who kicked off Django Girls with a workshop at EuroPython 2014 last year. Since then the idea has spread around the globe to over 20 countries. http://blog.europython.eu/post/117337312602/our-next-keynote-ola-ola-

Re: Enterprise Python

2015-04-25 Thread Larry Martell
On Fri, Apr 24, 2015 at 10:27 PM, Terry Reedy wrote: > Someone, (Mark, I believe), posted this link to a podcast from a few weeks > ago: > http://www.talkpythontome.com/episodes/show/4/enterprise-python-and-large-scale-projects > > A large part of that is based on this Dec 2014 post: > https://www

Re: Best search algorithm to find condition within a range

2015-04-25 Thread Albert van der Horst
In article <5533a77d$0$12993$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: >On Sun, 19 Apr 2015 04:08 am, Albert van der Horst wrote: > >> Fire up a lowlevel interpreter like Forth. (e.g. gforth) > >Yay! I'm not the only one who uses or likes Forth! I'm an author of half a dozen im

V ECCOMAS Thematic Conference VipIMAGE 2015: SUBMISSION DEADLINE POSTPONED

2015-04-25 Thread tava...@fe.up.pt
Dear Colleague, Attending several requests, the organizing committee of the International Conference VipIMAGE 2015 - V ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/vipimage) to be held in October 19-21, 2015, in H10 Costa Adeje Palace, Tenerife,

Re: Best way to do

2015-04-25 Thread Peter Otten
pauld11718 wrote: > import CoolProp.CoolProp as CPpy > import numpy as np > import time > > len = 1000 > rho = np.zeros(len) > t = np.zeros(len) > eta = np.zeros(len) > x = np.zeros(len) > > def PyDir(p,h,hndl): > for i in range(1, len): > rho[i] = hndl.PropsSI("D","P",p[i],"H",h[i],

Best way to do

2015-04-25 Thread pauld11718
import CoolProp.CoolProp as CPpy import numpy as np import time len = 1000 rho = np.zeros(len) t = np.zeros(len) eta = np.zeros(len) x = np.zeros(len) def PyDir(p,h,hndl): for i in range(1, len): rho[i] = hndl.PropsSI("D","P",p[i],"H",h[i],"Water") t[i] = hndl.PropsSI('T','P',

Re: New to Python - block grouping (spaces)

2015-04-25 Thread Marko Rauhamaa
Rustom Mody : > Some rambly ruminations on switchable (aka firstclass) syntax > http://blog.languager.org/2015/04/poverty-universality-structure-0.html I'll ruminate in response: * The awesomeness of lisp is in lambda calculus and not in macros. * Lisp syntax is actually not quite first-class