Re: Parallel python in the cloud

2014-05-24 Thread Robert Kern
s your client code (i.e. what you wrote above) is concerned, it's just another library. E.g. https://github.com/ipython/ipython/blob/master/examples/Parallel%20Computing/nwmerge.py https://github.com/ipython/ipython/blob/master/examples/Parallel%20Computing/itermapresult.py etc. -- Robert Ker

Re: Numpy Array of Sets

2014-05-24 Thread Robert Kern
ts like so: [[]]*3 https://docs.python.org/2/faq/programming.html#how-do-i-create-a-multidimensional-list -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: Am I not seeing the Error?

2013-08-13 Thread Robert Kern
ately coding in this style to troll. http://en.wikipedia.org/wiki/Troll_(Internet) For me, this style is easier to read. I have tried the "typical" style, but I find this one to be easier. Consider the topic of this thread as evidence against that proposition. -- Robert Kern &qu

Re: Simplex Algorithm

2013-09-02 Thread Robert Kern
OP wants is for solving a linear programming problem (minimize a linear combination of variables subject to linear inequality constraints). The simplex algorithm that scipy implements is more properly termed "the Nelder-Mead simplex algorithm" for unconstrained local nonlinear mini

Re: Simplex Algorithm

2013-09-02 Thread Robert Kern
ather than a solver, but the sources do contain compiled binaries for the CoinMP solver so it will work out-of-box on popular platforms, like Windows. https://projects.coin-or.org/CoinMP -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that i

Re: Simplex Algorithm

2013-09-02 Thread Robert Kern
On 2013-09-02 16:06, Tommy Vee wrote: On 9/2/2013 5:55 AM, Robert Kern wrote: On 2013-09-02 02:26, Tommy Vee wrote: Anyone know where I can get an easy to use Python class or algorithm for the Simplex optimization algorithm? I've tried the one in the link below, but I can't figur

Python KeyError

2013-09-05 Thread Robert Gliguroski
Dear Sirs, I would like to ask a question that may seem a little off-topic but since it is related to Python and I really cannot solve it - I thought to try to ask for some help here. I have installed OpenERP, an open source ERP software and then I installed an extension for connecting it to M

Re: Python GUI?

2013-09-12 Thread Robert Kern
ing forcing you to use the GUI designers if you don't want to. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Robert Kern
d the standard SMTP library. http://docs.python.org/2/library/smtplib -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umbert

Re: Having both if() and for() statements in one liner

2013-09-17 Thread Robert Kern
ahve both if and for in a one liner? Not in Python, no. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-20 Thread Robert Kern
On 2013-09-20 04:56, Jake Angulo wrote: Up Robert Kern's reply! I was waiting for smtplib <http://docs.python.org/2/library/smtplib> to be mentioned... finally! Instead people simply answer philosophically. I dont want to judge whether OP is a troll or not - but i found a lot

Re: What minimum should a person know before saying "I know Python"

2013-09-20 Thread Robert Kern
#x27;?" At what point in your Python career did you feel comfortable claiming that? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."

Re: Python GUI?

2013-09-20 Thread Robert Kern
*driven by* contributions from the community. http://qt-project.org/contribute http://qt-project.org/wiki/PySideContributors -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as

Re: Possibilities of Building "Stacked Neural Networks"

2013-09-25 Thread Robert Kern
one will probably take a couple of days of computation (for the final run, *after* you have debugged your code and done the initial experiments to find all of the right hyperparameters for your problem). Good luck! -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Robert Kern
line, you have probably left off a closing bracket or something similar in a previous line. Look back a few lines. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an u

Re: Referrer key missing form os.environ dictionary?

2013-09-26 Thread Robert Kern
HTTP request, headers and body, through stdin and just make the program parse them apart. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Robert Kern
explanation. I studied it briefly in class in 1970, and have no idea if there are current implementations. You are in luck! GNU APL 1.0 was just released! http://www.gnu.org/software/apl/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made ter

Strange extra f added to bytes object

2013-10-06 Thread Robert Jackson
I am very new to python so I'll apologize up front if this is some boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific equipment. I sometimes find the when I construct the bytes object to write it adds an extra f to the first byte. For e

Re: Strange extra f added to bytes object

2013-10-06 Thread Robert Jackson
Thank you all. It was unfortunate that it was f since I thought it was some strange mistaken hex nibble. All very clear and helpful. On Sun, Oct 6, 2013 at 9:07 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Sun, 06 Oct 2013 20:39:39 -0400, Ned Batchelder wrote: > > >

Re: Formal-ity and the Church-Turing thesis

2013-10-08 Thread Robert Day
On 08/10/13 14:11, Steven D'Aprano wrote: On Tue, 08 Oct 2013 18:16:01 +0530, Ravi Sahni wrote: Presently Sir, I wish to ask single question: What you mean "wave our hands"?? It is an idiom very common in Australia. (It may not be well known in the rest of the English-speaking world.) It mea

Re: converting letters to numbers

2013-10-08 Thread Robert Day
On 08/10/13 15:28, kjaku...@gmail.com wrote: I have to define a function add(c1, c2), where c1 and c2 are capital letters; the return value should be the sum (obtained by converting the letters to numbers, adding mod 26, then converting back to a capital letter). Can you give some expected out

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Robert Kern
ral term applied to things with a pointed tip. The fish name is a shortening of "pike-fish", so it's obviously not the source of the word. The weapon only really comes into fashion a couple of centuries after the fish's name is first recorded, so it's not the source either.

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Robert Kern
e and axe on the end. Just 'cos that would be cooler than naming it after the fish. I don't know which it was named after (could also be a road, eg turnpike), but the language's logo is the fish. Our logo is a snake, so that's obviously not a good guide. :-) -- Robert Kern

Re: strange array size problem

2013-10-18 Thread Robert Kern
example (with data) that demonstrates the problem. Use pastebin.com or a similar service if necessary. http://www.scipy.org/scipylib/mailing-lists.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attem

Re: skipping __init__ and using exploiting a class member instead

2013-10-19 Thread Robert Kern
a default for an instance attribute is accepted practice, and one that gets touted as a positive feature of Python's namespace model when compared against other languages. That said, I have seen it more often in the past. [1] In the general "unchanging" sense rather than the C++ "sta

Help with guessing game :D

2013-10-29 Thread Robert Gonda
Hey guys, so I figured I will give python a shot. I got to exercise that has asked me to create a number guessing game which weren't a problem, guessesTaken = 0 #This is a "Guesses taken counter" print("Hello, what's your name?") #Asking the user to input their name N = raw_input() #What the user

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 11:53:55 UTC, Chris Angelico wrote: > On Tue, Oct 29, 2013 at 10:45 PM, Robert Gonda > > wrote: > > > N = raw_input() #What the user's name is > > > print(N + ", I'm thinking of a number between 1-1000") #Not needed bu

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 11:54:49 UTC, Robert Gonda wrote: > On Tuesday, 29 October 2013 11:53:55 UTC, Chris Angelico wrote: > > > On Tue, Oct 29, 2013 at 10:45 PM, Robert Gonda > > > > > > wrote: > > > > > > > N = raw_input() #What t

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 12:58:09 UTC, Alister wrote: > On Tue, 29 Oct 2013 05:05:19 -0700, Robert Gonda wrote: > > >> > > >> > > > >> > converting input()'s result to an integer, both of which suggest > > >> > >

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 13:07:08 UTC, Alister wrote: > On Tue, 29 Oct 2013 06:03:55 -0700, Robert Gonda wrote: > > > > > On Tuesday, 29 October 2013 12:58:09 UTC, Alister wrote: > > >> On Tue, 29 Oct 2013 05:0

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 13:44:45 UTC, Mark Lawrence wrote: > On 29/10/2013 11:45, Robert Gonda wrote: > > > > As you've already received and responded to advice please could you > > read, digest and action this https://wiki.python.org/moin/GoogleG

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 14:25:10 UTC, Alister wrote: > On Tue, 29 Oct 2013 06:10:30 -0700, Robert Gonda wrote: > > > > > On Tuesday, 29 October 2013 13:07:08 UTC, Alister wrote: > > >> On Tue, 29 Oct 2013 06:03:55 -0700, Robert Gonda wrote: > > >&g

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 16:24:57 UTC, rusi wrote: > On Tuesday, October 29, 2013 8:10:20 PM UTC+5:30, Robert Gonda wrote: > > > > > Unfortunately I'm not that sort of person, the way my brain learns is by > > > experimenting, but first I need to know ex

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 16:40:01 UTC, rusi wrote: > On Tuesday, October 29, 2013 10:01:38 PM UTC+5:30, Robert Gonda wrote: > > > > > > > I honestly don't get it? this any better? ;D > > > > In google groups you will see a small 'show

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, October 29, 2013 5:24:08 PM UTC, ru...@yahoo.com wrote: > On 10/29/2013 05:45 AM, Robert Gonda wrote: > > > Hey guys, so I figured I will give python a shot. I got to exercise that > > has asked me to create a number guessing game which weren't a problem,

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 17:52:15 UTC, rusi wrote: > On Tuesday, October 29, 2013 10:54:08 PM UTC+5:30, ru...@yahoo.com wrote: > > > Also, what Mark and Rusi were trying to say (not very clearly) > > > is that when you post from Google Groups, Google Groups insert > > > a lot of empty lines

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 11:45:39 UTC, Robert Gonda wrote: > Hey guys, so I figured I will give python a shot. I got to exercise that has > asked me to create a number guessing game which weren't a problem, > > guessesTaken = 0 #This is a "Guesses taken counter"

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 18:27:41 UTC, ru...@yahoo.com wrote: > On Tuesday, October 29, 2013 11:45:56 AM UTC-6, Robert Gonda wrote: > > > Thank you very much for your reply, however it gives me an error, > > > something about the "end", do you know whats wr

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 18:35:56 UTC, Robert Gonda wrote: > On Tuesday, 29 October 2013 18:27:41 UTC, ru...@yahoo.com wrote: > > > On Tuesday, October 29, 2013 11:45:56 AM UTC-6, Robert Gonda wrote: > > > > > > > Thank you very much for your re

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 19:09:01 UTC, Dave Angel wrote: > On 29/10/2013 14:05, Robert Gonda wrote: > > > > > > & >> Back to question, name is also not working, I currently have > > python 3.3.2 and the only to get that work is the write raw_inp

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 19:55:13 UTC, ru...@yahoo.com wrote: > On Tuesday, October 29, 2013 1:03:00 PM UTC-6, Robert Gonda wrote: > > > never mind you was right, for some reason I had version 2.7 :/ , > > > and btw I was wondering, is it also possible to make it more &g

Re: Help with guessing game :D

2013-10-29 Thread Robert Gonda
On Tuesday, 29 October 2013 19:55:13 UTC, ru...@yahoo.com wrote: > On Tuesday, October 29, 2013 1:03:00 PM UTC-6, Robert Gonda wrote: > > > never mind you was right, for some reason I had version 2.7 :/ , > > > and btw I was wondering, is it also possible to make it more &g

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Robert Kern
ays, then only the arrays need to be unboxed once, then the rest of the arithmetic happens in C. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Robert Kern
On 2013-10-31 14:49, Chris Angelico wrote: On Fri, Nov 1, 2013 at 1:41 AM, Robert Kern wrote: On 2013-10-31 14:05, Chris Angelico wrote: On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin wrote: "E.D.G." writes: The calculation speed question just involves relatively s

Re: datetime question

2013-11-08 Thread Robert Kern
forum. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding 'download' column to existing 'visitors' table (as requested)

2013-11-09 Thread Robert Kern
e that. Just a majority of Greeks? How comforting. Please don't. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

Re: Code with random module faster on the vm than the vm host...

2013-11-10 Thread Robert Kern
. os.urandom() gets called in the initial default seeding, but not for each value. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -

Re: New user's initial thoughts / criticisms of Python

2013-11-11 Thread Robert Kern
draw from the random tables on Abulafia[2] which have nearly the same structure. It scales up reasonably well beyond d100s. It's certainly not a technique I would pull out to replace one-off if-elif chains that you literally write, but it works well when you write the generic code once to a

Re: Question about python package numpy

2015-03-02 Thread Robert Kern
e of these examples come prepackaged in any distribution I am aware of. You are intended to copy-and-paste them from the wiki if you want to use them. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to

Re: Use à Python 2 module with Python 3

2015-03-11 Thread Robert Kern
optional style guide. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Use à Python 2 module with Python 3

2015-03-11 Thread Robert Kern
by the initial development team due to a lack of funding, so right now the destiny of the bugs such as this is in hands of those who understand how to debug them." (Quoted from https://bugreports.qt.io/browse/PYSIDE-164) Anatoly was wrong. -- Robert Kern "I have come to believe t

Python script output in file

2015-03-18 Thread Robert Clove
Hi, I have a perl script named "my_eth-traffic.pl" which calculates the tx and rx speed of the Ethernet interface in Mb. I want to run this script from another script and want the output in other file. So i wrote the following script but not getting the output. #!/usr/bin/python import sys impo

Re: Python script output in file

2015-03-18 Thread Robert Clove
./my_eth_script.pl eth0 M >> a.txt How can i run this command with subprocess.popen On Wed, Mar 18, 2015 at 3:49 AM, Rustom Mody wrote: > On Wednesday, March 18, 2015 at 4:06:05 PM UTC+5:30, Robert Clove wrote: > > Hi, > > > > I have a perl script named "my_eth-

Re: Python script output in file

2015-03-18 Thread Robert Clove
On Wed, Mar 18, 2015 at 7:10 PM, Rustom Mody wrote: > On Thursday, March 19, 2015 at 1:58:29 AM UTC+5:30, Albert-Jan Roskam > wrote: > > > > On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote: > > > > >On Wednesday, March 18, 2015 at

Re: PiCxx

2015-03-29 Thread Robert Kern
current license. http://opensource.org/licenses -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.or

Project, how to debug

2015-03-31 Thread Robert Clove
Hi All, I am facing a problem. I have been given a project written in python and asked to debug it. I have not been given the flow they said understand and debug. Can someone suggest me how to debug it in Wings IDE. Project have approx 10 files. Regards -- https://mail.python.org/mailman/listin

Re: Project, how to debug

2015-03-31 Thread Robert Clove
On Tue, Mar 31, 2015 at 5:19 PM, Peter Otten <__pete...@web.de> wrote: > Robert Clove wrote: > > > Hi All, > > > > I am facing a problem. > > I have been given a project written in python and asked to debug it. > > I have not been given the flow they said

Python regex exercise

2015-03-31 Thread Robert Clove
Hi All, Do anyone have good links to python regex or other python problems for beginners but with solution. Please mail me. Regards -- https://mail.python.org/mailman/listinfo/python-list

Re: Code critique please

2015-04-08 Thread Robert Kern
compatible. https://pillow.readthedocs.org/porting-pil-to-pillow.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- h

Re: [SciPy-User] Is there existing code to log-with-bells-on for runtime algorithm diagnostics?

2015-04-21 Thread Robert Kern
ured logging". http://www.structlog.org/en/stable/ http://eliot.readthedocs.org/en/stable/ https://twiggy.readthedocs.org/en/latest/logging.html#structured-logging http://netlogger.lbl.gov/ -- Robert Kern -- https://mail.python.org/mailman/listinfo/python-list

Re: Tit for tat

2015-04-28 Thread Robert Kern
ed for it, using two different search engines, and neither come up with any references for "Toot For Tail" strategies. I do believe he is trying to make a crude joke. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-10 Thread Robert Kern
ent module, or did one of your third-party dependencies do this? Poof! Your pickle files no longer work. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an u

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-10 Thread Robert Kern
On 2015-06-10 13:08, Marko Rauhamaa wrote: Robert Kern : By the very nature of the stated problem: serializing all language objects. Being able to construct any object, including instances of arbitrary classes, means that arbitrary code can be executed. All I have to do is make a pickle file

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Robert Kern
Mersenne Twister is not a cryptographically secure pseudorandom number generator. If I can get some small number of values from the Twister (by memory, something of the order of 100 such values) then I can predict the rest for ever. 634. -- Robert Kern "I have come to believe that the whole world is an e

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Robert Kern
On 2015-06-27 08:58, Robert Kern wrote: On 2015-06-27 04:38, Steven D'Aprano wrote: Maybe you use Python's standard library and the Mersenne Twister. The period of that is huge, possibly bigger than 256! (or not, I forget, and I'm too lazy to look it up). So you think that'

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-29 Thread Robert Kern
.w3.org/TR/xml-infoset/#infoitem.element If it didn't, then XHTML would have a hell of a time with ordered constructs like this: First item Second item Third item -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-30 Thread Robert Kern
always has the same number of children, etc.), then it probably does represent an ordered collection. If it's variable, then putting it into a table structure probably doesn't make any sense regardless of ordering issues. -- Robert Kern "I have come to believe that the whole world

Re: calculating entropy of image or alternative?

2015-07-03 Thread Robert Kern
uantity that your code is computing will be exactly the same because the pixels contribute to the histogram in the same way. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it

Re: (side-)effects and ...

2015-07-05 Thread Robert Kern
ppend(self, x) which will give you different results depending on the number of times you call it, even if the arguments are the same. Functions that don't change state at all are naturally idempotent, but many idempotent functions do change state. -- Robert Kern "I have come to beli

Find Minimum for element in multiple dimensional array

2015-07-22 Thread Robert Davis
r(Combined[i][1])+","+str(Combined[i][2])+","+ str(Combined[i][3])+","+str(Combined[i][4])+","+ str(Combined[i][5])+","+ str(Combined[i][6])+","+str(Combined[i][7])+","+ str(Combined[i][8])+","+str(Combined[i][9])+"\n") zO.close() f.close() I am using Python 2.7 on a Windows 7 machine. Please help me get my head around how to accomplish this task. Thank you very much. Robert Davis -- https://mail.python.org/mailman/listinfo/python-list

Re: Find Minimum for element in multiple dimensional array

2015-07-23 Thread Robert Davis
On Wednesday, July 22, 2015 at 5:54:30 PM UTC-5, Robert Davis wrote: > Given a set of arrays within an array how do I find the arrays with the > minimum values based on two elements/columns in the array? Those two > elements/columns are the destination zip code and distance. > >

Re: How we can send mail with attachment in Python?

2015-07-23 Thread Robert Davis
shpython.blogspot.com/2014/06/send-email-with-outlook-in-python.html I use something very similar to automate sending of monthly reports. HTH Robert -- https://mail.python.org/mailman/listinfo/python-list

Re: Find Minimum for element in multiple dimensional array

2015-07-23 Thread Robert Davis
On Wednesday, July 22, 2015 at 5:54:30 PM UTC-5, Robert Davis wrote: > Given a set of arrays within an array how do I find the arrays with the > minimum values based on two elements/columns in the array? Those two > elements/columns are the destination zip code and distance. > >

Re: Find Minimum for element in multiple dimensional array

2015-07-24 Thread Robert Davis
On Wednesday, July 22, 2015 at 5:54:30 PM UTC-5, Robert Davis wrote: > Given a set of arrays within an array how do I find the arrays with the > minimum values based on two elements/columns in the array? Those two > elements/columns are the destination zip code and distance. > >

Random MAC generator error

2015-09-12 Thread Robert Clove
import random # global mac1 def randomMAC(): mac = [ 0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff) ] return ':'.join(map(lambda x: "%02x" % x, mac)) # print randomMAC() for x in

Re: Cyber Grand Challenge, prizes up to 2 million dollars ! (DARPA)

2015-09-23 Thread Robert Baer
Skybuck Flying wrote: (Click on little icon on website top left for menu): Information about challenge: http://www.cybergrandchallenge.com/site/index.html#about https://cgc.darpa.mil/CGC_Rules_16_May_14_Version_2.pdf Perhaps this will be a yearly contest. There is a catch though, to collect

Re: don't understand matrix-multiplication should be reversed in python?

2015-11-12 Thread Robert Kern
put. There is no "reversed definition of rows and columns". He simply instantiated the two vectors as row-vectors instead of column-vectors, which he could have easily done, so he had to flip the matrix expression. -- Robert Kern "I have come to believe that the whole world is an

Re: How To Create A Endles List Of Lists In Python...???

2015-11-20 Thread robert . bralic
By Me, And I Don't Respond How I Think Make This Machine)... Thanks, Robert...;) -- https://mail.python.org/mailman/listinfo/python-list

Re: How To Create A Endles List Of Lists In Python...???

2015-11-20 Thread robert . bralic
Dana petak, 20. studenoga 2015. u 18:16:52 UTC+1, korisnik Denis McMahon napisao je: > On Fri, 20 Nov 2015 08:43:04 +0100, HKRSS wrote: > > > Thanks In Advance, Robert...;) > > Just keep appending child lists to parent list: > > l = [] > > while True: >l.

Re: Python's re module and genealogy problem

2014-06-11 Thread Robert Kern
egex. This will help you QA your regexes, too, to be sure that they match what you expect them to and not match non-names. https://github.com/asciimoo/exrex -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Asymmetry in globals __getitem__/__setitem__

2014-06-12 Thread Robert Lehmann
> getitem x I would have expected "setitem y 1" to show up as well, but to no avail. Am I doing something wrong? Is this on purpose? Cheers, Robert PS. I found a 3.3.x commit (e3ab8aa <http://hg.python.org/cpython/rev/e3ab8aa0216c>) which fixed the LOAD_GLOBAL opcod

Re: Single underscore in interactive mode

2014-06-25 Thread Robert Kern
ode ? See the documentation on `sys.displayhook()`, which is the function that makes the assignment: https://docs.python.org/3/library/sys.html#sys.displayhook -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own

Re: PEP8 and 4 spaces

2014-07-05 Thread Robert Kern
g form feeds to separate sections of code. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Module name does not match file name

2014-07-07 Thread Robert Kern
[~] |1> import imp [~] |2> imp.get_suffixes() [('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1), ('.pyc', 'rb', 2)] -- Robert Kern "I have come to believe that the whole world is an enigma, a har

Re: Module name does not match file name

2014-07-07 Thread Robert Kern
On 2014-07-07 12:56, Steven D'Aprano wrote: On Mon, 07 Jul 2014 12:15:51 +0100, Robert Kern wrote: On 2014-07-07 09:57, Steven D'Aprano wrote: What I don't understand is how "import pg" gets turned into "run pgmodule.so"? This has been standard Python b

Re: Proposal: === and !=== operators

2014-07-09 Thread Robert Kern
] |2> x == 3 array([False, False, False, True, False], dtype=bool) You can blame Numeric/numpy for that feature getting in. :-) Now certainly, many uses of __eq__, like containment comparisons, do assume that the result is a bool(able). -- Robert Kern "I have come to believe that the w

Re: Getting a list of all modules

2014-07-30 Thread Robert Kern
es that cannot be imported because their names are not Python identifiers: e.g. check-newconfigs.py. Those are easy to filter out, fortunately. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to

Re: Getting a list of all modules

2014-08-01 Thread Robert Kern
http://code.google.com/p/tabhistory/source/browse/tabhistory.py where I have indenting, code completion, filename completion, and module completion all working to some degree or another. Take a look at what has already been implemented in IPython: https://github.com/ipython/ipython/blob/master/IPyth

Re: Bug with help (was Re: Getting a list of all modules)

2014-08-02 Thread Robert Kern
sh is in the 3rd party modules, Python could (and maybe Python 3 does) import each module in a separate subprocess and collect the information that way. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: how to get the ordinal number in list

2014-08-11 Thread Robert Kern
ation? Using [x] for subscripts: x[n+1] = x[n] + 1 we have a perfectly good mathematical recursive definition. All it needs is an initial value x[0] and we're good to go. Or a different operator for assignment (to distinguish it more clearly from equality, which it isn't). x <- x

Re: 'is not' or '!='

2014-08-20 Thread Robert Kern
h the committer's name/id. I use it all the time at $DAYJOB. I've managed to avoid CVS, so I can't speak to that. cvs annotate http://compbio.soe.ucsc.edu/cvsdoc/cvs-manual/cvs_74.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: Python vs C++

2014-08-24 Thread Robert Kern
esire to learn it. Trouble is, I don't have any project that calls for it - there's nothing I'm desperately wanting to do that involves both Python and C/C++. Anyone got any suggestions? :) Class-based, Python 3-compatible bindings for libtcod? http://doryen.eptalys.net/libtcod/

Re: [OT] Question about Git branches

2014-09-16 Thread Robert Kern
orrectly, the way to begin an experimental branch is to use hg clone. Yes, but this is due to different design decisions of git and Mercurial. git prioritized the multiple branches in a single clone use case; Mercurial prioritized re-cloning. It's natural to do this kind of branching in gi

Re: [OT] Question about Git branches

2014-09-16 Thread Robert Kern
On 2014-09-16 17:25, Chris Angelico wrote: On Wed, Sep 17, 2014 at 2:08 AM, Robert Kern wrote: Yes, but this is due to different design decisions of git and Mercurial. git prioritized the multiple branches in a single clone use case; Mercurial prioritized re-cloning. It's natural to do

Re: optionparse: how to add a line break to the help text

2011-09-10 Thread Robert Kern
tions. You can use """ for multiple line texts: >>> text = \ ... """fsdfsfsdfsdf ... sfsdfsfsdf ... sdfsdf s ... ... """ >>> text 'fsdfsfsdfsdf\n sfsdfsfsdf\nsdfsdf s\n\n' That's not the problem. OptionParser remove

Re: optionparse: how to add a line break to the help text

2011-09-11 Thread Robert Kern
.py can be simply dropped into your codebase, if you want. That's about as minimal of fuss as you can ask for. http://pypi.python.org/pypi/argparse -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attemp

Re: Numpy.array with dtype works on list of tuples not on list of lists?

2011-09-18 Thread Robert Kern
al fields as above) pose a new problem in that its individual elements are sequences themselves. In order to help it decide whether it should recurse down into a sequence to find its elements or decide that the sequence *is* an element in its own right, we settled on the convention that tuples

Re: Wrote a new library - Comments and suggestions please!

2011-09-27 Thread Robert Kern
t you drop what you are doing in Python and start working with SAS. He is suggesting that you look at the similar procedures that exist in the SAS standard library for inspiration. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made ter

Re: QA Engineering/ Python/ Contract/ Austin, TX

2011-09-27 Thread Robert Kern
the Subject line also helps. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: atexit handlers - getting the return code

2011-09-27 Thread Robert Kern
it can read every bit of text that gets printed. Timing is probably also best recorded by the runner script to record the startup overhead of the Python interpreter. Continue to use the SimulationDecorator to record the traceback information, though. -- Robert Kern "I have come to believe

<    11   12   13   14   15   16   17   18   19   20   >