Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Chris Angelico
On Mon, Jan 20, 2014 at 6:39 PM, Ben Finney wrote: > But sometimes different skills are being examined, and the student > should be exercising skills on their own without basing it directly on > the work of others. In these cases, penalties for plagiarism are > appropriate, would you agree? If Fr

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread indar kumar
Thanks all for help and positive comments. Actually, I tried to ask some questions but I was discouraged to do so saying that I was working on a project or some assignment. Truth be told I am stuck at one point and since I don't have experience with programming language, I have been working for

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Ben Finney
Chris Angelico writes: > If Fred writes something and Bill copies it without acknowledging > Fred's work, then Bill should be penalized. That much is clear. The situation is where a student is being examined for skills where it's appropriate to test the student's own skill with a reasonable leve

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Ben Finney
indar kumar writes: > Hint would have been enough but I was strictly discouraged. You asked for private help, specifically to subvert the rules against plagiarism you're subject to. So no, I don't believe this modification of your request to be sincere. You asked for help cheating, and you were

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Chris Angelico
On Mon, Jan 20, 2014 at 6:55 PM, indar kumar wrote: > Actually, I tried to ask some questions but I was discouraged to do so saying > that I was working on a project or some assignment. Truth be told I am stuck > at one point and since I don't have experience with programming language, I > have

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread bryan rasmussen
>When you take a course, you should be learning, not just passing. That >means that getting someone else to do your work for you is completely >wrong, so I won't help you. I have decided to become an MBA. On Mon, Jan 20, 2014 at 9:48 AM, Chris Angelico wrote: > On Mon, Jan 20, 2014 at 6:55 PM

Re: [newbie] advice and comment wanted on first tkinter program

2014-01-20 Thread Alister
On Sun, 19 Jan 2014 20:04:05 -0800, Jean Dupont wrote: > Op zaterdag 18 januari 2014 16:12:41 UTC+1 schreef Oscar Benjamin: >> On 18 January 2014 14:52, Jean Dupont wrote: >> > >> > Thanks Peter and Terry Jan for the useful suggestions. One thing >> > which I >> >find a bit weird: when asking for

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Alister
On Sun, 19 Jan 2014 23:55:59 -0800, indar kumar wrote: > Thanks all for help and positive comments. Actually, I tried to ask some > questions but I was discouraged to do so saying that I was working on a > project or some assignment. Truth be told I am stuck at one point and > since I don't have e

Re: doctests compatibility for python 2 & python 3

2014-01-20 Thread Robin Becker
On 17/01/2014 21:10, Terry Reedy wrote: On 1/17/2014 7:14 AM, Robin Becker wrote: .. I never got how you are using doctests. There were certainly not meant for heavy-duty unit testing, but for testing combined with explanation. Section 26.2.3.7. (in 3.3) Warnings warns that they are fr

regex multiple patterns in order

2014-01-20 Thread km
I am trying to find sub sequence patterns but constrained by the order in which they occur For example >>> p = re.compile('(CAA)+?(TCT)+?(TA)+?') >>> p.findall('CAACAACAATCTTCTTCTTCTTATATA') [('CAA', 'TCT', 'TA')] But I instead find only one instance of the CAA/TCT/TA in that order. How can I get

Re: How to write this as a list comprehension?

2014-01-20 Thread Piet van Oostrum
"Rhodri James" writes: > On Sat, 18 Jan 2014 16:00:45 -, Jussi Piitulainen > wrote: [...] >> I would write that on three lines anyway, properly indented: >> >> [ somefunc(mn,day,wd,name) >> for (then, name) in mylist >> let (_,mn,dy,_,_,_,wd,_,_) = localtime(then) ] >> >> It coul

Re: regex multiple patterns in order

2014-01-20 Thread Devin Jeanpierre
On Mon, Jan 20, 2014 at 2:44 AM, km wrote: > I am trying to find sub sequence patterns but constrained by the order in > which they occur > For example > p = re.compile('(CAA)+?(TCT)+?(TA)+?') p.findall('CAACAACAATCTTCTTCTTCTTATATA') > [('CAA', 'TCT', 'TA')] > > But I instead find only o

Re: regex multiple patterns in order

2014-01-20 Thread Chris Angelico
On Mon, Jan 20, 2014 at 9:44 PM, km wrote: p = re.compile('(CAA)+?(TCT)+?(TA)+?') p.findall('CAACAACAATCTTCTTCTTCTTATATA') > [('CAA', 'TCT', 'TA')] > > But I instead find only one instance of the CAA/TCT/TA in that order. > How can I get 3 matches of CAA, followed by four matches of TCT

Re: regex multiple patterns in order

2014-01-20 Thread Ben Finney
km writes: > I am trying to find sub sequence patterns but constrained by the order > in which they occur There are also specific resources for understanding and testing regex patterns, such as http://www.pythonregex.com/>. > For example > > >>> p = re.compile('(CAA)+?(TCT)+?(TA)+?') > >>> p.fi

Re: regex multiple patterns in order

2014-01-20 Thread km
Aah! I understand now. Thank you Regards, Krishna Mohan On Mon, Jan 20, 2014 at 4:48 PM, Ben Finney wrote: > km writes: > > > I am trying to find sub sequence patterns but constrained by the order > > in which they occur > > There are also specific resources for understanding and testing rege

Re: How to write this as a list comprehension?

2014-01-20 Thread Rustom Mody
On Monday, January 20, 2014 4:32:40 PM UTC+5:30, Piet van Oostrum wrote: > "Rhodri James" writes: > > On Sat, 18 Jan 2014 16:00:45 -, Jussi Piitulainen wrote: > [...] > >> I would write that on three lines anyway, properly indented: > >> [ somefunc(mn,day,wd,name) > >> for (then, name)

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Roy Smith
In article , Chris Angelico wrote: > On Mon, Jan 20, 2014 at 4:21 PM, Dan Stromberg wrote: > > I did a short time of teaching while I was in school. If three > > students all turned in the same assignment, they all got docked > > significantly. There was no "who copied off of whom?", it was >

Re: regex multiple patterns in order

2014-01-20 Thread Roy Smith
In article , Ben Finney wrote: > With a little experimenting I get: > > >>> p = re.compile('((?:CAA)+)?((?:TCT)+)?((?:TA)+)?') > >>> p.findall('CAACAACAATCTTCTTCTTCTTATATA') > [('CAACAACAA', 'TCTTCTTCTTCT', 'TATATA'), ('', '', '')] Perhaps a matter of style, but I would have left o

Re: regex multiple patterns in order

2014-01-20 Thread Neil Cerutti
On 2014-01-20, Roy Smith wrote: > In article > , Ben > Finney wrote: >> Be aware that regex is not the solution to all parsing >> problems; for many parsing problems it is an attractive but >> inappropriate tool. You may need to construct a more specific >> parser for your needs. Even if it's pos

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Rustom Mody
On Monday, January 20, 2014 7:38:28 PM UTC+5:30, Roy Smith wrote: > Chris Angelico wrote: > > On Mon, Jan 20, 2014 at 4:21 PM, Dan Stromberg wrote: > > > I did a short time of teaching while I was in school. If three > > > students all turned in the same assignment, they all got docked > > > sig

Re: regex multiple patterns in order

2014-01-20 Thread Mark Lawrence
On 20/01/2014 16:04, Neil Cerutti wrote: On 2014-01-20, Roy Smith wrote: In article , Ben Finney wrote: Be aware that regex is not the solution to all parsing problems; for many parsing problems it is an attractive but inappropriate tool. You may need to construct a more specific parser for y

Re: regex multiple patterns in order

2014-01-20 Thread Devin Jeanpierre
On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence wrote: > On 20/01/2014 16:04, Neil Cerutti wrote: >> I use regular expressions regularly, for example, when editing >> text with gvim. But when I want to use them in Python I have to >> contend with the re module. I've never become comfortable with >>

Re: regex multiple patterns in order

2014-01-20 Thread Neil Cerutti
On 2014-01-20, Devin Jeanpierre wrote: > On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence > wrote: >> On 20/01/2014 16:04, Neil Cerutti wrote: >>> I use regular expressions regularly, for example, when >>> editing text with gvim. But when I want to use them in Python >>> I have to contend with the

Re: regex multiple patterns in order

2014-01-20 Thread Rustom Mody
On Monday, January 20, 2014 10:10:32 PM UTC+5:30, Devin Jeanpierre wrote: > On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence wrote: > > On 20/01/2014 16:04, Neil Cerutti wrote: > >> I use regular expressions regularly, for example, when editing > >> text with gvim. But when I want to use them in Pyth

Re: regex multiple patterns in order

2014-01-20 Thread Mark Lawrence
On 20/01/2014 17:06, Rustom Mody wrote: On Monday, January 20, 2014 10:10:32 PM UTC+5:30, Devin Jeanpierre wrote: On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence wrote: On 20/01/2014 16:04, Neil Cerutti wrote: I use regular expressions regularly, for example, when editing text with gvim. But wh

Re: regex multiple patterns in order

2014-01-20 Thread Mark Lawrence
On 20/01/2014 17:09, Neil Cerutti wrote: On 2014-01-20, Devin Jeanpierre wrote: On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence wrote: On 20/01/2014 16:04, Neil Cerutti wrote: I use regular expressions regularly, for example, when editing text with gvim. But when I want to use them in Python

Diving in to Python - Best resources?

2014-01-20 Thread Matt Watson
Getting in the habit of dropping in a google group for any new project - everyone tends to be so helpful. I work in the automotive sales industry(management) and find myself doing so many day to day tasks that could easily be automated. I'm a very tech saavy person, but after running in fear fr

Re: Diving in to Python - Best resources?

2014-01-20 Thread Emile van Sebille
On 1/20/2014 11:34 AM, Matt Watson wrote: My question to you guys is... for someone like me, what route would you take to learning Python? I'd work my way through the tutorial [1] then pick a work based project and start right in. Ask questions along the way. Emile [1] http://docs.pytho

1st Sketch at at ReadOnly dict

2014-01-20 Thread Charles Hixson
This is just a first sketch, and I haven't yet attempted to test it, so what I'm hoping for is criticisms on the general approach. ##Read Only dict class. #@note Instances can be created only from existing dicts. #@warningvalues within the RODict can be accessed, so if they hold

The Beauties of Islam

2014-01-20 Thread BV BV
The Beauties of Islam At this time in Islam’s history, when the entire religion is being judged by the actions of a few, it is appropriate to step back from the glare of the media spotlight and examine the beauties that infuse the way of life known as Islam. There is greatness and splendour i

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Peter Otten
Charles Hixson wrote: > This is just a first sketch, and I haven't yet attempted to test it, so > what I'm hoping for is criticisms on the general approach. > > class RODict: > def __init__ (self, ddict = {}): Default values are evaluted just once when the method is created. Mutable defau

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Peter Otten
Peter Otten wrote: > Charles Hixson wrote: > >> This is just a first sketch, and I haven't yet attempted to test it, so >> what I'm hoping for is criticisms on the general approach. >> >> class RODict: > >> def __init__ (self, ddict = {}): > > Default values are evaluted just once when th

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Terry Reedy
On 1/20/2014 9:08 AM, Roy Smith wrote: That's a little harsh. Working in groups, and sharing code, are important parts of how software gets developed today. Those collaborative work habits should indeed be taught. Until recently, teaching collaboration through group projects has had the pro

matlabFunction Equivalent?

2014-01-20 Thread rpi . baldum
Hey all, I'm new at Python, so if you see any mistakes feel free to let me know. I'm trying to take a symbolic expression and turn it into a variable equation or function. I think that just an expression of variables would be preferable. I have a range equation which I form using symbols and t

[ANN] pypiserver 1.1.5 - minimal private pypi server

2014-01-20 Thread Ralf Schmitt
Hi, I've just uploaded pypiserver 1.1.5 to the python package index. pypiserver is a minimal PyPI compatible server. It can be used to serve a set of packages and eggs to easy_install or pip. pypiserver is easy to install (i.e. just 'pip install pypiserver'). It doesn't have any external depende

Re: matlabFunction Equivalent?

2014-01-20 Thread Mark Lawrence
On 20/01/2014 22:09, rpi.bal...@gmail.com wrote: Hey all, I'm new at Python, so if you see any mistakes feel free to let me know. I'm trying to take a symbolic expression and turn it into a variable equation or function. I think that just an expression of variables would be preferable. I have

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Charles Hixson
On 01/20/2014 12:52 PM, Peter Otten wrote: Charles Hixson wrote: This is just a first sketch, and I haven't yet attempted to test it, so what I'm hoping for is criticisms on the general approach. class RODict: def __init__ (self, ddict = {}): Default values are evaluted just once when t

Re: Diving in to Python - Best resources?

2014-01-20 Thread Chris Angelico
On Tue, Jan 21, 2014 at 6:50 AM, Emile van Sebille wrote: > On 1/20/2014 11:34 AM, Matt Watson wrote: > >> My question to you guys is... for someone like me, what route would you >> take to learning Python? > > > I'd work my way through the tutorial [1] then pick a work based project and > start r

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Chris Angelico
On Tue, Jan 21, 2014 at 7:09 AM, Charles Hixson wrote: > #@note Instances can be created only from existing dicts. > > ##Class initializer. > #@paramddictThe data dictionary to which this is a read only > #access. > #@throwsTypeError if ddict

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Steven D'Aprano
On Mon, 20 Jan 2014 09:08:28 -0500, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> On Mon, Jan 20, 2014 at 4:21 PM, Dan Stromberg >> wrote: >> > I did a short time of teaching while I was in school. If three >> > students all turned in the same assignment, they all got docked >>

Implementing append within a descriptor

2014-01-20 Thread Joseph L. Casale
I have a caching non data descriptor that stores values in the implementing class instances __dict__. Something like: class Descriptor: def __init__(self, func, name=None, doc=None): self.__name__ = name or func.__name__ self.__module__ = func.__module__ self.__doc__

Re: Implementing append within a descriptor

2014-01-20 Thread Chris Angelico
On Tue, Jan 21, 2014 at 12:07 PM, Joseph L. Casale wrote: > foo = MyClass() > # This calls __set__ > foo.some_property = [x for x in range(5)] > # This bypasses __set__ obviously. > foo.some_property.append(5) > > So re-implementing my own list class has the draw back for the user that he > must

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Charles Hixson
On 01/20/2014 04:08 PM, Chris Angelico wrote: On Tue, Jan 21, 2014 at 7:09 AM, Charles Hixson wrote: #@note Instances can be created only from existing dicts. ##Class initializer. #@paramddictThe data dictionary to which this is a read only #acces

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Dan Stromberg
On Mon, Jan 20, 2014 at 12:09 PM, Charles Hixson wrote: > class RODict: > #Instance Variable Doc > ##@var_ddict > #This variable holds the reference to the dict. > > ##Class initializer. > #@paramddictThe data dictionary to which this is a read

Re: 1st Sketch at at ReadOnly dict

2014-01-20 Thread Charles Hixson
On 01/20/2014 08:14 PM, Dan Stromberg wrote: On Mon, Jan 20, 2014 at 12:09 PM, Charles Hixson wrote: class RODict: #Instance Variable Doc ##@var_ddict #This variable holds the reference to the dict. ##Class initializer. #@paramddictThe