Re: how to solve memory

2016-06-11 Thread meInvent bbird
i use sage cloud to run, it killed my program i checked total memory is large, how much memory it need, 8GB*10, 80GB? top - 05:55:16 up 10:05, 1 user, load average: 0.35, 0.63, 0.56 Tasks: 13 total, 1 running, 12 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.5 us, 0.4 sy, 0.0 ni, 99.1

Re: how to solve memory

2016-06-10 Thread meInvent bbird
i use a version having better indentation, and then remove redundant which if sum column == 54 , do not add this column into initlist and add deep > 0 before recursive call and print number of initlist is 118,XXX but it is still running, where it run , and why run a very long time def DFS(b,

Re: how to solve memory

2016-06-10 Thread meInvent bbird
this time i remove redundant which not add full column sum already has beeb 27*2 but it always has syntax error, indentation error, where is wrong? def DFS(b, deep, maxx, sourceoperators, path): initlist = [] if deep > 0: print("deep=", deep) for aa,bb in

Re: how to solve memory

2016-06-10 Thread MRAB
On 2016-06-11 00:31, meInvent bbird wrote: it is quite ridiculous, this time i am sure that i put correct indentation and add a else statement to make sure recursive call inside the if statement , it still memory error, where is the memory error? is itertools.combinations so big for the list?

Re: how to solve memory

2016-06-10 Thread meInvent bbird
it is quite ridiculous, this time i am sure that i put correct indentation and add a else statement to make sure recursive call inside the if statement , it still memory error, where is the memory error? is itertools.combinations so big for the list? if deep == maxx: if deep > 0: b

Re: how to solve memory

2016-06-10 Thread meInvent bbird
i put final part of code inside one more space and add constraint deep > 0 but still memory error and print the deep number to see, it do not run infinity again V6 is just my superstitution, because V is disable 6 is separation i run your version directly, it has key = '0' error M1 = {}

Re: how to solve memory

2016-06-10 Thread John Gordon
In <8a1c372e-bd6c-4923-8ae1-8f129ec74...@googlegroups.com> meInvent bbird writes: > > I already responded to your earlier post about this program. Did you > > read it? > sorry i missed your reply post, > i find post by me and search your name, no this name > is your

Re: how to solve memory

2016-06-10 Thread meInvent bbird
On Friday, June 10, 2016 at 10:08:44 PM UTC+8, Steven D'Aprano wrote: > On Fri, 10 Jun 2016 10:58 am, meInvent bbird wrote: > > [snip unreadable code] > > I just ran your code, and it almost crashed my computer. I think it is quite > rude to post code without an explanation of what the problem

Re: how to solve memory

2016-06-10 Thread meInvent bbird
On Friday, June 10, 2016 at 10:46:43 PM UTC+8, John Gordon wrote: > In <4f853aa2-cc00-480b-9fd7-79b05cbd4...@googlegroups.com> meInvent bbird > writes: > > > https://drive.google.com/file/d/0Bxs_ao6uuBDULVNsRjZSVjdPYlE/view?usp=sharing > > I already responded to your

Re: how to solve memory

2016-06-10 Thread meInvent bbird
i put final part of code inside one more space and add constraint deep > 0 but still memory error and print the deep number to see, it do not run infinity again V6 is just my superstitution, because V is disable 6 is separation i run your version directly, it has key = '0' error M1 = {} M2 =

Re: how to solve memory

2016-06-10 Thread John Gordon
In <4f853aa2-cc00-480b-9fd7-79b05cbd4...@googlegroups.com> meInvent bbird writes: > https://drive.google.com/file/d/0Bxs_ao6uuBDULVNsRjZSVjdPYlE/view?usp=sharing I already responded to your earlier post about this program. Did you read it? -- John Gordon

Almost crashing computer, was Re: how to solve memory

2016-06-10 Thread Peter Otten
Steven D'Aprano wrote: > I just ran your code, and it almost crashed my computer. When you suspect that a script may consume a lot of memory (the subject might have been a hint) ulimit (bash internal) helps you prevent that your linux machine becomes unresponsive. $ ulimit -v 20 $

Re: how to solve memory

2016-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2016 10:58 am, meInvent bbird wrote: [snip unreadable code] I just ran your code, and it almost crashed my computer. I think it is quite rude to post code without an explanation of what the problem is. I'm afraid that your code is virtually unreadable to me. It is too verbose,

Re: how to solve memory

2016-06-09 Thread meInvent bbird
On Friday, June 10, 2016 at 9:13:13 AM UTC+8, Michael Torrie wrote: > On 06/09/2016 06:58 PM, meInvent bbird wrote: > > > > Do you have a question for the list? If so, please state what it is, and > describe what you are doing and what isn't working. If you can boil it > down to a dozen lines

Re: how to solve memory

2016-06-09 Thread Michael Torrie
On 06/09/2016 06:58 PM, meInvent bbird wrote: > Do you have a question for the list? If so, please state what it is, and describe what you are doing and what isn't working. If you can boil it down to a dozen lines of run-able, self-contained code that illustrates the problem, that is helpful

how to solve memory

2016-06-09 Thread meInvent bbird
https://drive.google.com/file/d/0Bxs_ao6uuBDULVNsRjZSVjdPYlE/view?usp=sharing M1 = {} M2 = {} M3 = {} M4 = {} M5 = {} V6 = {} M1['00']=0 M1['01']=2 M1['02']=1 M1['10']=1 M1['11']=1 M1['12']=1 M1['20']=1 M1['21']=1 M1['22']=2 M2['00']=0 M2['01']=1 M2['02']=1 M2['10']=1 M2['11']=1 M2['12']=1