On 24/11/2023 16:35, duncan smith wrote:
On 24/11/2023 14:31, Loris Bennett wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['ba
On 24/11/2023 14:31, Loris Bennett wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the dict does not always have the same keys, so
On 10/04/2022 21:20, Antoon Pardon wrote:
Op 9/04/2022 om 02:01 schreef duncan smith:
On 08/04/2022 22:08, Antoon Pardon wrote:
Well my first thought is that a bitset makes it less obvious to calulate
the size of the set or to iterate over its elements. But it is an idea
worth exploring
On 08/04/2022 22:08, Antoon Pardon wrote:
Op 8/04/2022 om 16:28 schreef duncan smith:
On 08/04/2022 08:21, Antoon Pardon wrote:
Yes I know all that. That is why I keep a bucket of possible duplicates
per "identifying" field that is examined and use some heuristics at the
end
On 08/04/2022 08:21, Antoon Pardon wrote:
Op 8/04/2022 om 08:24 schreef Peter J. Holzer:
On 2022-04-07 17:16:41 +0200, Antoon Pardon wrote:
Op 7/04/2022 om 16:08 schreef Joel Goldstick:
On Thu, Apr 7, 2022 at 7:19 AM Antoon Pardon
wrote:
I am working with a list of data from which I have t
On 13/02/2021 19:12, Dan Stromberg wrote:
> On Sat, Feb 13, 2021 at 10:25 AM duncan smith
> wrote:
>
>> On 12/02/2021 03:04, Terry Reedy wrote:
>>> On 2/11/2021 3:22 PM, duncan smith wrote:
>>>
>>>>It seems that I can mutate a deque while i
On 12/02/2021 03:04, Terry Reedy wrote:
> On 2/11/2021 3:22 PM, duncan smith wrote:
>
>> It seems that I can mutate a deque while iterating over it if I
>> assign to an index, but not if I append to it. Is this the intended
>> behaviour?
>
> Does the deque d
Hello,
It seems that I can mutate a deque while iterating over it if I
assign to an index, but not if I append to it. Is this the intended
behaviour? It seems a bit inconsistent. Cheers.
Duncan
>>> from collections import deque
>>> d = deque(range(8))
>>> it = iter(d)
>>> next(it)
0
>>> d[1
On 27/01/2021 22:41, C W wrote:
> Great tutorial Irv, very simple with if-else example, gets the point
> across.
>
> My main takeaway from the discussion so far is that: you can't troubleshoot
> Python without some kind of breakpoint or debugger.
>
[snip]
Really?
Duncan
--
https://mail.python
On 04/11/2020 19:12, Avi Gross wrote:
> My comments at end:
>
> -Original Message-
> From: Python-list On
> Behalf Of duncan smith
> Sent: Wednesday, November 4, 2020 1:09 PM
> To: python-list@python.org
> Subject: Re: Find word by given characters
>
>
On 04/11/2020 04:21, Avi Gross wrote:
> Duncan, my comments below yours at end.
>
> ---YOURS---
> The Counter approach only requires iterating over the letters once to
> construct the letters bag, then each word once to create the relevant word
> bag. After that it's (at worst) a couple of lookups
On 03/11/2020 22:14, Avi Gross wrote:
> I, too, have wondered what exactly the point was of the required
> functionality for SCRABBLE but note you can extend a current word so
> additional letters may be available in a game but only if they are an exact
> fit to put before, after, or in middle of y
On 03/11/2020 23:35, Bischoop wrote:
> On 2020-11-03, duncan smith wrote:
>>>
>>
>>>>> from collections import Counter
>>>>> letters = 'att'
>>>>> letter_counts = Counter(letters)
>>>>> word = 'tolerate
On 03/11/2020 14:06, Bischoop wrote:
> On 2020-11-03, dn wrote:
>>
>>
>> The (full) specs are not clear. There's certainly room for
>> misunderstanding. I'd be happier if I could 'see' a full spec or
>> recognise a practical application, because then we'd be better able to
>> discuss facts. Mea
On 02/11/2020 19:09, dn wrote:
> On 02/11/2020 23:29, Bischoop wrote:
>> On 2020-11-01, duncan smith wrote:
>>>>
>>>
>>> But this generates the letters counts for each word. They only need to
>>> be generated once (outside the for loop). And usi
On 01/11/2020 13:38, Bischoop wrote:
> On 2020-11-01, Bischoop wrote:
>> I'm working on a script i which user inputs letters and then a printed
>> words containing those letters. The scripts works however I can't solve
>> one problem , it prints also words in which these letters occur more
>> tha
On 19/07/2020 16:11, Dino wrote:
> On 7/19/2020 4:54 PM, duncan smith wrote:
>>
>> It depends on what you expect the result to be. There's nothing
>> inherently wrong with transforming variables before using least squares
>> fitting. Whether it gives you the "
On 19/07/2020 11:19, Dino wrote:
>
> Hi, I am looking at someone else's code trying to understand their use
> of numpy.polyfit.
>
> My understanding was that you can use it to fit polynomials, but
> apparently, the original author has used it for logarithmic and
> exponential curves as well this
On 21/03/2020 21:55, Skip Montanaro wrote:
>> import sys
>>
>> class C_hash(int if sys.version_info.major >= 3 else long):
> ...
>
> There's nothing incorrect with your solution. Chris offered another. I
> was going to suggest you consider running your code through 2to3 to
> see what it does. I cr
Hello,
I have a class I wrote for Python2 that needs to be made to work
on Python3. On Python2 it inherited from long, so it needs to inherit
from int on Python3. The following works, but I'm not sure it's the
cleanest solution. It's the first time I've wanted / needed to make a
parent class
On 20/03/2020 21:57, Barry wrote:
>
>
>> On 20 Mar 2020, at 00:42, duncan smith wrote:
>>
>> Bingo. Performance is indistinguishable from that of the list. Thread
>> safety is unimportant (for my purposes), but the docs at
>> https://docs.python.org/2/librar
On 19/03/2020 20:40, MRAB wrote:
> On 2020-03-19 20:08, duncan smith wrote:
>> Hello,
>> I have generator code along the following lines,
>>
>>
>> Q = queue.Queue()
>> Q.put(x)
>> while not Q.empty():
>> x = Q.get()
>>
Hello,
I have generator code along the following lines,
Q = queue.Queue()
Q.put(x)
while not Q.empty():
x = Q.get()
if :
yield x
else:
Q.put()
If I change it to,
Q = []
Q.append(x)
for x in Q:
if :
yield x
else:
Q.append()
then it runs a
On 14/02/2020 23:21, Dan Stromberg wrote:
> On Fri, Feb 14, 2020 at 3:10 PM Stefan Ram wrote:
>
>> By trial and error (never read documentation!) I found
>> that you can count the number of e's in a text by just
>>
>> Counter( text ).get( 'e' )
>>
>> (after »from collections import Counter«
On 16/12/2019 21:08, DL Neil wrote:
> On 17/12/19 5:19 am, Chris Angelico wrote:
>> On Tue, Dec 17, 2019 at 3:16 AM duncan smith
>> wrote:
>>>
>>> Hello,
>>> Not really specific to Python or matplotlib (but that's what I'm
>>&
Hello,
Not really specific to Python or matplotlib (but that's what I'm
using). I'm looking for a good combination of colours and symbols for
scatter plots, and combination of colours and line styles for line
plots. Too often I find myself producing these when I don't know whether
they will e
On 07/12/2019 17:48, RobH wrote:
> I am trying to do this project on a pi zero:
>
> http://frederickvandenbosch.be/?p=1365
>
> After overcoming a few errors, I now have the display working and the
> start of the code showing on the display, that being the time.
>
> It doesn't move on to the next
On 18/10/2019 23:57, DL Neil wrote:
> On 17/10/19 7:52 AM, MRAB wrote:
>> On 2019-10-16 19:43, duncan smith wrote:
>>> On 16/10/2019 04:41, DL Neil wrote:
>>>> On 16/10/19 1:55 PM, duncan smith wrote:
>>>>> On 15/10/2019 21:36, DL Neil wrote:
&g
On 16/10/2019 19:52, MRAB wrote:
> On 2019-10-16 19:43, duncan smith wrote:
>> On 16/10/2019 04:41, DL Neil wrote:
>>> On 16/10/19 1:55 PM, duncan smith wrote:
>>>> On 15/10/2019 21:36, DL Neil wrote:
>>>>> On 16/10/19 12:38 AM, Rhodri James wrote:
&
On 16/10/2019 04:41, DL Neil wrote:
> On 16/10/19 1:55 PM, duncan smith wrote:
>> On 15/10/2019 21:36, DL Neil wrote:
>>> On 16/10/19 12:38 AM, Rhodri James wrote:
>>>> On 14/10/2019 21:55, DL Neil via Python-list wrote:
>>> ...
>>> So, yes, the &q
On 15/10/2019 21:36, DL Neil wrote:
> On 16/10/19 12:38 AM, Rhodri James wrote:
>> On 14/10/2019 21:55, DL Neil via Python-list wrote:
> ...
>
>>> It seemed better (at the design-level) to have Man( Person ) and
>>> Woman( Person ) sub-classes to contain the pertinent attributes,
>>> source more d
Hello,
The problem I have relates to writing algorithmic code that can
handle types with a given API, but where some of the required
functionality is implemented as library functions rather than methods.
Specifically I have code that uses numpy arrays, but I want to adapt it
to use sparse arr
On 16/05/2019 22:50, Rich Shepard wrote:
> I'm developing a Python3 application using Python3-3.7.3 and
> virtualenv-16.5.0 on a Slackware-14.2 host.
>
> The project directory contains subdirectories, including gui/ (with the
> tkinter views) and classes/ with the SQLAlchemy model.py.
>
> Within
On 28/08/2017 20:17, Leam Hall wrote:
> On 08/28/2017 11:40 AM, Dennis Lee Bieber wrote:
>
> ... a bunch of good stuff ...
>
> I'm (re-)learning python and just trying make sure my function works.
> Not at the statistical or cryptographic level. :)
>
> Thanks!
>
> Leam
If it's supposed to ge
On 07/03/2019 00:18, Ethan Furman wrote:
> On 03/06/2019 10:30 AM, duncan smith wrote:
>
>> I've been trying to figure out why one of my classes can be
>> pickled but not unpickled. (I realise the problem is probably with the
>> pickling, but I get the error when I
On 06/03/2019 20:24, Peter Otten wrote:
> duncan smith wrote:
>
>> On 06/03/2019 16:14, duncan smith wrote:
>>> Hello,
>>> I've been trying to figure out why one of my classes can be
>>> pickled but not unpickled. (I realise the problem is probabl
On 06/03/2019 16:14, duncan smith wrote:
> Hello,
> I've been trying to figure out why one of my classes can be
> pickled but not unpickled. (I realise the problem is probably with the
> pickling, but I get the error when I attempt to unpickle.)
>
> A relatively mi
[snip]
Sorry, this is Python 3.6 on Linux.
Duncan
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I've been trying to figure out why one of my classes can be
pickled but not unpickled. (I realise the problem is probably with the
pickling, but I get the error when I attempt to unpickle.)
A relatively minimal example is pasted below.
>>> import pickle
>>> class test(dict):
On 14/01/2019 20:11, duncan smith wrote:
> Hello,
> Just checking to see if anyone has attacked this problem before
> for cases where the population size is unfeasibly large. i.e. The number
> of categories is manageable, but the sum of the frequencies, N,
> precludes simple
On 15/01/2019 17:59, Ian Hobson wrote:
> Hi,
>
> If I understand your problem you can do it in two passes through the
> population.
>
The thing is that I start with the population histogram and I want to
generate a sample histogram. The population itself is too large to deal
with each population
On 15/01/2019 02:41, Spencer Graves wrote:
>
>
> On 2019-01-14 18:40, duncan smith wrote:
>> On 14/01/2019 22:59, Gregory Ewing wrote:
>>> duncan smith wrote:
>>>> Hello,
>>>> Just checking to see if anyone has attacked this problem be
On 14/01/2019 22:59, Gregory Ewing wrote:
> duncan smith wrote:
>> Hello,
>> Just checking to see if anyone has attacked this problem before
>> for cases where the population size is unfeasibly large.
>
> The fastest way I know of is to create a list of cum
Hello,
Just checking to see if anyone has attacked this problem before
for cases where the population size is unfeasibly large. i.e. The number
of categories is manageable, but the sum of the frequencies, N,
precludes simple solutions such as creating a list, shuffling it and
using the first
On 02/12/2018 18:36, Peter Otten wrote:
> duncan smith wrote:
>
>> Hello,
>> I have a lot of functions that take an instance of a particular
>> class as the first argument. I want to create corresponding methods in
>> the class. I have tried the following, wh
On 02/12/2018 18:26, Stefan Ram wrote:
> duncan smith writes:
>> I have tried to find examples of injecting methods into classes without
>
> Wouldn't the normal approach be to just define a
> class with your functions as instance methods?
>
> main.py
>
Hello,
I have a lot of functions that take an instance of a particular
class as the first argument. I want to create corresponding methods in
the class. I have tried the following, which (when called from __init__)
creates the relevant methods in an instance (Python 3.6).
def init_methods(s
On 16/11/18 14:51, Steve Keller wrote:
> Why do the integers 0 and 1 compare equal to the boolean values False
> and True and all other integers to neither of them?
>
> $ python3
> Python 3.5.2 (default, Nov 12 2018, 13:43:14)
> [GCC 5.4.0 20160609] on linux
> Type "help", "copyrig
Hello,
I'm writing some code for sparse arrays that is intended to pretty
much follow the numpy API. Because my arrays can have different default
values there is an issue with using the 'out' keyword argument for
functions. e.g. If I elementwise multiply 2 arrays with defaults a and
b, then t
On 01/09/18 18:11, moha...@gmail.com wrote:
> All,
>
> I m trying to run this small script to find the lowest of the given array of
> numbers. The script works fine for various combination of inputs but fails in
> a weird way for a particular set of inputs, can anyone point the mistake in
> the
Hello,
I have been trying to work out how to export data from a dash
application. I know little about html or javascript. I can upload data
into a table as per the example at
https://github.com/plotly/dash-core-components/pull/73. I can edit the
data in the table. But I can't find a way of ex
On 16/04/18 17:03, Irv Kalb wrote:
> I have been writing OOP code for many years in other languages and for the
> past few years in Python. I am writing new curriculum for a course on OOP in
> Python. In order to see how others are explaining OOP concepts, I have been
> reading as many books a
On 16/03/18 23:16, Steven D'Aprano wrote:
> The bug tracker currently has a discussion of a bug in the median(),
> median_low() and median_high() functions that they wrongly compute the
> medians in the face of NANs in the data:
>
> https://bugs.python.org/issue33084
>
> I would like to ask peo
On 23/01/18 23:42, Vincent Davis wrote:
> On Tue, Jan 23, 2018 at 4:15 PM Dennis Lee Bieber
> wrote:
>
>> On Tue, 23 Jan 2018 13:51:55 -0700, Vincent Davis
>> declaimed the following:
>>
>>> Looking for suggestions. I have an ordered list of names these names will
>>> be reordered. I am looking
On 17/01/18 14:29, leutrim.kal...@gmail.com wrote:
>
> Hello everyone,
>
> I am implementing a time-dependent Recommender System which applies BPR
> (Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to
> learn the parameters of the model. Such that, one iteration involv
On 21/12/17 19:06, John Ladasky wrote:
> On Thursday, December 21, 2017 at 7:37:39 AM UTC-8, MRAB wrote:
>
>> Python never makes a copy unless you ask it to.
>>
>> What x1=X does is make the name x1 refer to the same object that X
>> refers to. No copying.
>
> Well, except with very simple, muta
On 20/11/17 15:48, Jason wrote:
> a pipeline can be described as a sequence of functions that are applied to an
> input with each subsequent function getting the output of the preceding
> function:
>
> out = f6(f5(f4(f3(f2(f1(in))
>
> However this isn't very readable and does not support co
Hello,
I need to code up a table class, which will be based on numpy
arrays. Essentially it needs to behave like a numpy array, but with a
variable associated with each array dimension. It must (at least
partially) satisfy the API of an existing class. The main reason for the
new class is to
On 24/03/17 19:35, Tim Chase wrote:
> Playing around, I came across the following
>
> $ python3
> Python 3.4.2 (default, Oct 8 2014, 10:45:20)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
from dis import dis
def f(x):
> ... return
On 15/02/17 13:27, spiess.benja...@googlemail.com wrote:
> Hello !:)
> I've got a problem which I would really like to solve.
> I got a cloud of points (in the simplest example its a 2-dimensional cloud of
> points).
> First, I want to set one of the points as the initial (or middle) point.
> S
On 14/01/17 14:59, Xristos Xristoou wrote:
> Τη Σάββατο, 14 Ιανουαρίου 2017 - 4:38:39 μ.μ. UTC+2, ο χρήστης duncan smith
> έγραψε:
>> On 14/01/17 11:18, Xristos Xristoou wrote:
>>> i want to create a simple spatial joing using geopandas but i thing so
On 14/01/17 11:18, Xristos Xristoou wrote:
> i want to create a simple spatial joing using geopandas but i thing so
> geopandas has bug ?
>
>
>
> geopandas code :
>
> from geopandas import gpd
> import geopandas
> points = geopandas.GeoDataFrame.from_file('points.shp') # or geojson etc
> poly
On 01/12/16 01:12, Chris Kaynor wrote:
> On Wed, Nov 30, 2016 at 4:54 PM, duncan smith wrote:
>>
>> Thanks. So something like the following might do the job?
>>
>> def _execute(command):
>> p = subprocess.Popen(command, shell=False,
>>
On 01/12/16 00:46, Chris Kaynor wrote:
> On Wed, Nov 30, 2016 at 4:12 PM, duncan smith wrote:
>> On 30/11/16 17:57, Chris Angelico wrote:
>>> On Thu, Dec 1, 2016 at 4:34 AM, duncan smith wrote:
>>>>
>>>> def _execute(command):
>>>> # she
On 30/11/16 17:53, Chris Kaynor wrote:
> On Wed, Nov 30, 2016 at 9:34 AM, duncan smith wrote:
>> Hello,
>> I have had an issue with some code for a while now, and I have not
>> been able to solve it. I use the subprocess module to invoke dot
>> (Graphviz) to g
On 30/11/16 17:57, Chris Angelico wrote:
> On Thu, Dec 1, 2016 at 4:34 AM, duncan smith wrote:
>>
>> def _execute(command):
>> # shell=True security hazard?
>> p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,
>>
[snip]
Sorry, should have said Python 2.7.12 on Ubuntu 16.04.
Duncan
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I have had an issue with some code for a while now, and I have not
been able to solve it. I use the subprocess module to invoke dot
(Graphviz) to generate a file. But if I do this repeatedly I end up with
an error. The following traceback is from a larger application, but it
appears to
On 03/11/16 16:18, Fillmore wrote:
>
> Hi there, apologies for the generic question. Here is my problem let's
> say that I have a list of lists of strings.
>
> list1:#strings are sort of similar to one another
>
> my_nice_string_blabla
> my_nice_string_blqbli
> my_nice_string_bl0bla
>
On 24/10/16 19:05, Peter Otten wrote:
> duncan smith wrote:
>
>> Hello,
>> I have several arrays that I need to combine elementwise in
>> various fashions. They are basically probability tables and there is a
>> mapping of axes to variables. I have code for tra
Hello,
I have several arrays that I need to combine elementwise in
various fashions. They are basically probability tables and there is a
mapping of axes to variables. I have code for transposing and reshaping
that aligns the variables / axes so the usual broadcasting rules achieve
the desire
On 16/10/16 16:16, Seymore4Head wrote:
> How to pick out the same titles.
>
> I have a long text file that has movie titles in it and I would like
> to find dupes.
>
> The thing is that sometimes I have one called "The Killing Fields" and
> it also could be listed as "Killing Fields" Sometimes
On 02/03/16 08:16, dieter wrote:
> duncan smith writes:
>
>> I'm just getting to grips with RDF and rdflib, and I've hit
>> something I can't figure out.
>>
>> I have a graph with information on two people. (I haven't shown the
&g
Hello,
I'm just getting to grips with RDF and rdflib, and I've hit
something I can't figure out.
I have a graph with information on two people. (I haven't shown the
imports below because they're scattered around my interactive session
and I might reconstruct them incorrectly. Anyone familiar
On 21/12/15 16:49, Ian Kelly wrote:
> On Mon, Dec 21, 2015 at 9:40 AM, duncan smith wrote:
>> Finite state machine / transition matrix. Learn from some English text
>> source. Then process your strings by lower casing, replacing underscores
>> with spaces, removing trailing n
On 21/12/15 03:01, Steven D'Aprano wrote:
> I have a large number of strings (originally file names) which tend to fall
> into two groups. Some are human-meaningful, but not necessarily dictionary
> words e.g.:
>
>
> baby lions at play
> saturday_morning12
> Fukushima
> ImpossibleFork
>
>
> (no
On 04/12/15 23:06, Peter Otten wrote:
> duncan smith wrote:
>
>> Hello,
>> I'm trying to find a computationally efficient way of identifying
>> unique subarrays, counting them and returning an array containing only
>> the unique subarrays and a co
On 04/12/15 22:36, Albert-Jan Roskam wrote:
> Hi
>
> (Sorry for topposting)
>
> numpy.ravel is faster than numpy.flatten (no copy)
> numpy.empty is faster than numpy.zeros
> numpy.fromiter might be useful to avoid the loop (just a hunch)
>
> Albert-Jan
>
Thanks, I'd forgotten the difference be
Hello,
I'm trying to find a computationally efficient way of identifying
unique subarrays, counting them and returning an array containing only
the unique subarrays and a corresponding 1D array of counts. The
following code works, but is a bit slow.
###
from collections import C
On 01/10/15 21:45, Paulo da Silva wrote:
> Hi all.
>
> What is the fastest way to do the following:
>
> I have an initial value V and a vector vec of (financial) indexes.
> I want to generate a new vector nvec as
>
> V, V*vec[0], V*vec[0]*vec[1], V*vec[0]*vec[1]*vec[2], ...
>
> A numpy vectoriz
On 29/07/15 15:27, ryguy7272 wrote:
> On Wednesday, July 29, 2015 at 10:21:35 AM UTC-4, ryguy7272 wrote:
>> On Wednesday, July 29, 2015 at 9:59:10 AM UTC-4, ryguy7272 wrote:
>>> I am using Spyder Python 2.7. I'm running this sample code.
>>>
>>> import scipy as sp
>>> cashflows=[50,40,20,10,50]
>>
On 02/07/15 15:52, Steven D'Aprano wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behaviour? If so, please reply with the version of
> Python and your operating system. Printing sys.version will probably do.
>
>
On 21/02/15 19:46, TommyVee wrote:
> Start off with sets of elements as follows:
>
> 1. A,B,E,F
> 2. G,H,L,P,Q
> 3. C,D,E,F
> 4. E,X,Z
> 5. L,M,R
> 6. O,M,Y
>
> Note that sets 1, 3 and 4 all have the element 'E' in common, therefore
> they are "related" and form the following superset:
>
> A,B,C
On 21/11/14 08:35, Steve Hayes wrote:
> I've finally found a use for Python.
>
> When, in the course of my genealogy research, I look at census or burial
> records, I often want to work out a person's date of birth from their age.
> It's a simple matter of mental arithmetic, but I sometimes get i
On 01/11/14 18:29, Ethan Furman wrote:
> On 11/01/2014 10:11 AM, Ned Batchelder wrote:
>> On 11/1/14 12:56 PM, duncan smith wrote:
>>>
>>>I have a Bloom filter class and want to (partially) serialize
>>> instances using hex() or oct(). Instances are
On 01/11/14 16:56, duncan smith wrote:
[snip]
Sorry, forgot to add that I'm using Python 2.7.6 on Ubuntu 14.04. Cheers.
Duncan
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I have a Bloom filter class and want to (partially) serialize
instances using hex() or oct(). Instances are mutable, so I can't
inherit from long. I thought I'd found the answer when I came across
__index__,
https://docs.python.org/2/reference/datamodel.html#object.__index__. But
it do
On 11/10/14 20:55, William Ray Wing wrote:
> On Oct 11, 2014, at 3:20 PM, Dennis Lee Bieber wrote:
>
>> On Sat, 11 Oct 2014 16:26:43 +0100, duncan smith
>> declaimed the following:
>>
>>
>>> The media have their own quirks when it comes to English. The B
On 11/10/14 12:45, mm0fmf wrote:
> On 11/10/2014 10:37, Christian Gollwitzer wrote:
>> Being a non-native English speaker/writer, I myself stick to the
>> recommendations of the Oxford dictionary.
>>
>> Christian
>
> But you do realise the Oxford dictionary is different to English usage
> and
On 09/10/14 18:43, mm0fmf wrote:
> On 09/10/2014 02:29, Steven D'Aprano wrote:
>> Apart from the horrible spelling of colour :-)
>
> I've always spelt colour as "color" when programming and as "colour"
> when writing language including documentation about software.
>
> colour in a programme doesn
On 16/05/14 16:01, Johannes Schneider wrote:
If you do not have a closed form for T(E) you cannot calculate the exact
value of I(V).
Anyway. Assuming T is integrable you can approximate I(V).
1. Way to do:
interpolate T(E) by a polynomial P and integrate P. For this you need
the equation (coeff
On 16/05/14 13:57, Enlong Liu wrote:
Sorry for this inconvenience. Since my file is a little large, I think it will
be more difficult for fellows to check. I will now paste the attachment below.
The file for T(E) consists of two columns, the first is E and the second is
T(E). What I want is to
On 16/02/14 16:35, Charles Allen wrote:
How efficient does this thing need to be?
You can always just turn it into a two-dimensional sampling problem by
thinking of the data as a function f(x=item), generating a random x=xr
in [0,x], then generating a random y in [0,max(f(x))]. The xr is
accept
On 16/02/14 05:08, Ben Finney wrote:
Tim Chase writes:
I'm not coming up with the right keywords to find what I'm hunting.
I'd like to randomly sample a modestly compact list with weighted
distributions, so I might have
data = (
("apple", 20),
("orange", 50),
("grape", 30),
On 18/01/14 01:51, John Ladasky wrote:
Hi folks,
I am awaiting my approval to join the numpy-discussion mailing list, at
scipy.org. I realize that would be the best place to ask my question.
However, numpy is so widely used, I figure that someone here would be able to
help.
I like to use n
On 11/12/13 23:54, Steven D'Aprano wrote:
I have some code which produces a list from an iterable using at least
one temporary list, using a Decorate-Sort-Undecorate idiom. The algorithm
looks something like this (simplified):
table = sorted([(x, i) for i,x in enumerate(iterable)])
table = [i fo
On 14/08/13 15:16, climb65 wrote:
Hello,
here is a small basic question :
Is it possible to have more than one constructor (__init__ function) in a
class? For instance, to create an object with 2 different ways? If my
memory is good, I think that with C++ it is possible.
Thanks for your answer
On 11/08/13 15:02, Roy Smith wrote:
In article ,
Skip Montanaro wrote:
See the Rationale of PEP 450 for more reasons why “install NumPy� is not
a feasible solution for many use cases, and why having ‘statistics’ as a
pure-Python, standard-library package is desirable.
I read that b
On 24/05/13 10:11, Chris Angelico wrote:
On Fri, May 24, 2013 at 6:47 PM, Fábio Santos wrote:
On 24 May 2013 09:41, "Chris Angelico" wrote:
On Fri, May 24, 2013 at 6:14 PM, Peter Brooks
wrote:
What is the easiest way to reorder a sequence pseudo-randomly?
That is, for a sequence 1,2,3,4
On 23/05/13 18:44, Dan Stromberg wrote:
On Thu, May 23, 2013 at 9:41 AM, duncan smith mailto:buzzard@invalid.invalid>> wrote:
RBT is quicker than Treap for insertion with randomized data, but
slower with ordered data. Randomized data will tend to minimize the
number o
1 - 100 of 201 matches
Mail list logo