Re: [Tutor] Code Regress

2016-02-01 Thread boB Stepp
On Mon, Feb 1, 2016 at 8:22 AM, Evan Sommer wrote: > I tried the code suggestion that you proposed in december, and while > it did count down time, it actually set me back in a way because the > display is not how I desired it to be. I think you need to review all of Alan's previous suggestions.

[Tutor] [OT] Calculus comic, was Re: Fwd: Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Peter Otten
Steven D'Aprano wrote: > On Mon, Feb 01, 2016 at 12:00:47PM -0800, Danny Yoo wrote: >> Here's a response I sent to Srinivas yesterday to further explain why >> a balanced binary tree is probably overkill for the "largest >> denomination" selection problem. (I didn't realize that I had not >> sent

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Steven D'Aprano
On Mon, Feb 01, 2016 at 08:41:31PM +, Alan Gauld wrote: > On 01/02/16 14:07, Chelsea G wrote: > > Hi, > > > > So I am trying to get my function search to print in a text file, but I > > can only get it to print to Powershell. I have tried several things to get > > it to print in its own text

Re: [Tutor] Fwd: Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Steven D'Aprano
On Mon, Feb 01, 2016 at 12:00:47PM -0800, Danny Yoo wrote: > Here's a response I sent to Srinivas yesterday to further explain why > a balanced binary tree is probably overkill for the "largest > denomination" selection problem. (I didn't realize that I had not > sent the following to the list.) [

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Cameron Simpson
On 01Feb2016 20:41, ALAN GAULD wrote: On 01/02/16 14:07, Chelsea G wrote: So I am trying to get my function search to print in a text file, but I can only get it to print to Powershell. I have tried several things to get it to print in its own text file but nothing I have tried is working. Can

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Joel Goldstick
On Mon, Feb 1, 2016 at 9:07 AM, Chelsea G wrote: > Hi, > > So I am trying to get my function search to print in a text file, but I > can only get it to print to Powershell. I have tried several things to get > it to print in its own text file but nothing I have tried is working. Can > someone te

[Tutor] Help with printing to text file

2016-02-01 Thread Chelsea G
Hi, So I am trying to get my function search to print in a text file, but I can only get it to print to Powershell. I have tried several things to get it to print in its own text file but nothing I have tried is working. Can someone tell me what I am doing wrong? import csvimport sysimport jsonf

Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Danny Yoo
> > It was acknowledged that "OP's problem doesn't need this" so I assume > the question was to think about it more generally somehow. > While we're on wild tangents... We should probably note, since it hasn't been mentioned yet, that the generalized problem with arbitrary coin choices is classi

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Alan Gauld
On 01/02/16 14:07, Chelsea G wrote: > So I am trying to get my function search to print in a text file, but I > can only get it to print to Powershell. I have tried several things to get > it to print in its own text file but nothing I have tried is working. Can > someone tell me what I am doing

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Alan Gauld
On 01/02/16 14:07, Chelsea G wrote: > Hi, > > So I am trying to get my function search to print in a text file, but I > can only get it to print to Powershell. I have tried several things to get > it to print in its own text file but nothing I have tried is working. Can > someone tell me what I a

[Tutor] Code Regress

2016-02-01 Thread Evan Sommer
Hey again Alan! Sorry it has been so long since I have been in contact. I tried the code suggestion that you proposed in december, and while it did count down time, it actually set me back in a way because the display is not how I desired it to be. The way the display looks in this program below

[Tutor] Fwd: Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Danny Yoo
Here's a response I sent to Srinivas yesterday to further explain why a balanced binary tree is probably overkill for the "largest denomination" selection problem. (I didn't realize that I had not sent the following to the list.) -- Forwarded message -- From: Danny Yoo Date: Su

Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Oscar Benjamin
On 1 February 2016 at 13:29, Steven D'Aprano wrote: >> > although OP's problem doesn't need this, is there a better way achieve >> > this other than >> > using a balanced binary search tree. >> >> You would need to state all of the requirements for your data >> structure. If coinvalues is constant

Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Steven D'Aprano
On Mon, Feb 01, 2016 at 12:47:02PM +, Oscar Benjamin wrote: > On 31 January 2016 at 05:50, srinivas devaki > wrote: > > On Sun, Jan 31, 2016 at 3:54 AM, Danny Yoo wrote: > >> --- > >> I want to take the max value in the dictionary 'coinvalues' that is the > >> same as or lower than the vari

Re: [Tutor] 2016-02-01 Filter STRINGS in Log File and Pass as VARAIBLE within PYTHON script

2016-02-01 Thread Cameron Simpson
On 01Feb2016 15:53, knnleow GOOGLE wrote: trying out on how to port my unix shell script to python. get more complicated than i expected.: ( i am not familiar with the modules available in python. anyone care to share how to better the clumsy approach below. regards, kuenn ti

Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-02-01 Thread Oscar Benjamin
On 31 January 2016 at 05:50, srinivas devaki wrote: > On Sun, Jan 31, 2016 at 3:54 AM, Danny Yoo wrote: >> --- >> I want to take the max value in the dictionary 'coinvalues' that is the >> same as or lower than the variable 'change'. I have no idea how to search >> through the 'coinvalues' dict

Re: [Tutor] lc_ctype and re.LOCALE

2016-02-01 Thread Oscar Benjamin
On 31 January 2016 at 21:41, Albert-Jan Roskam wrote: >> > >> > >> > You're looping over all pairs of locales: >> > >> > Suppose there are N locales and M is sys.maxunicode. The number of >> > pairs of locales is N*(N-1)/2 which grows like N**2. For each pair you >> > loop over M characters so the

[Tutor] 2016-02-01 Filter STRINGS in Log File and Pass as VARAIBLE within PYTHON script

2016-02-01 Thread knnleow GOOGLE
hello all, trying out on how to port my unix shell script to python. get more complicated than i expected.: ( i am not familiar with the modules available in python. anyone care to share how to better the clumsy approach below. regards, kuenn timestamp02 = time.strftime("%