On Tue, 04 Nov 2014 05:53:04 -0800, Fatih Güven wrote:
Call employee1.name or employee2.salary and assign it to a new variable,
something etc.
1) Put the file into a database.
2) database calls
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python
On Mon, 03 Nov 2014 06:29:39 +, Dan Sommers wrote:
On Mon, 03 Nov 2014 03:12:32 +, Denis McMahon wrote:
Quadrilateral
Parallelogram
Square Rectangle Rhombus Diamond (4 sides eq)
Trapezoid
Arrowhead
What's the difference between a Diamond and a Rhombus
of rectangle will work equally
well for the square.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 02 Nov 2014 21:32:13 +1100, Tim Delaney wrote:
On 2 November 2014 20:50, Denis McMahon denismfmcma...@gmail.com
wrote:
The question (I thought) was to write a class for Square that inherited
a class Rectangle but imposed on it the additional constraints of a
square over a rectangle
On Sun, 02 Nov 2014 11:31:12 -0500, Dennis Lee Bieber wrote:
On Sun, 2 Nov 2014 12:27:06 + (UTC), Denis McMahon
denismfmcma...@gmail.com declaimed the following:
On Sun, 02 Nov 2014 21:32:13 +1100, Tim Delaney wrote:
If course, that's probably because rectangles have a multitude of uses
to
convert to an int.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
how to code this.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 28 Oct 2014 01:29:28 +, Joshua Landau wrote:
On 28 October 2014 00:36, Denis McMahon denismfmcma...@gmail.com
wrote:
d = [[list(range(1,13))[i*3+j] for j in range(3)] for i in range(4)]
A quick note. Ranges (even 2.7's xrange) are all indexable. The cast to
a list isn't needed
. Does anyone know why?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
if that's your
definition of a most popular name or not.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
+j] for j in range(3)] for i in range(4)]
but it seems to be a one-line solution for what you're trying to do.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 26 Oct 2014 17:12:29 -0700, Dan Stromberg wrote:
Are the following two expressions the same?
x is y
Id(x) == id(y)
No, although if Id and id were the same function, they might be
equivalent in some cases.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org
On Sat, 25 Oct 2014 15:01:54 +, Grant Edwards wrote:
On 2014-10-24, Denis McMahon denismfmcma...@gmail.com wrote:
On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote:
Thanks everyone for your suggestions.
Try loading the following in codeskulptor:
http://www.codeskulptor.org
] is the number 1
if name[1] == b[1]:
print (Eureka!)
This didn't happen
else:
print (OK, I get it)
This happened
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
.
It does if you enter it properly.
also try:
str(list(range(10)))
Note that that has three ( and three ) on the line.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
)))
which gives
'[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]'
howver the test:
if x.isdigit():
is much better.
But finally, with your telephone number decoder, look at:
http://www.codeskulptor.org/#user38_QnR06Upp4AH6h0Q.py
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman
On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote:
Thanks everyone for your suggestions.
Try loading the following in codeskulptor:
http://www.codeskulptor.org/#user38_j6kGKgeOMr_0.py
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
(range(10)):
print (String range,(x))
http://i.imgur.com/EGKUpAb.jpg
I suspect you're discovering the difference between the python2 and
python3 range() functions, and what happens when you encapsulate them in
string.
I've already posted about this once this evening.
--
Denis
treating all -() With a space.
I am still thinking about how to treat the large space if it is a digit
instead:
1 800 555
Note that my decoder assumes anything other than a letter can be copied
straight to the output string.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
containing the values that the iterable range(10) creates.
Note that whether you're looking at a string representation of a value or
the value itself is a lot clearer in the interpreter console where
strings are displayed with quotes.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
with the elements of the
list b, none of them match because character 8 is not the same as
number 8
When you try and compare a character x eg 8 with the string
representation of the list b, you get a match of x 8 to the 25th
character of string c which is also 8.
--
Denis McMahon, denismfmcma
the description of the function, and it doesn't in
fact do what you thought
c) Both a and b above
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 22 Oct 2014 19:11:51 -0400, Seymore4Head wrote:
On Wed, 22 Oct 2014 22:43:14 + (UTC), Denis McMahon
denismfmcma...@gmail.com wrote:
On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head wrote:
def nametonumber(name):
lst=[]
for x,y in enumerate (name):
lst
On Thu, 23 Oct 2014 10:04:56 -0400, Seymore4Head wrote:
On Thu, 23 Oct 2014 09:15:16 + (UTC), Denis McMahon
denismfmcma...@gmail.com wrote:
Try the following 3 commands at the console:
You obviously didn't, so I'll try again. Try each of the following three
commands in the python console
of the codeskulptor environment.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
string)
[] (truthy - non empty set)
[0] (truthy - non empty set)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
things without
understanding the basics upon which they are constructed, and like many
other similar newsgroups, it's been my experience in the past that there
is limited tolerance here for people who repeatedly make the same basic
errors without learning from them.
--
Denis McMahon, denismfmcma
.
Does that help?
It think it would be a dict of dicts:
shopping = { store1 : { item1: price1, item2: price2, ... },
store2 : { item3: price3, item4: price4, ... }, ... }
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
such as ( string, number ):
x = [ fred, jim, susan ]
x[x.index(jim)] = ( jim, 11, )
print x
['fred', ('jim', 11), 'susan']
Do you have to know the number of items the list will have before making
it?
No. See the append() method of the list object.
--
Denis McMahon, denismfmcma...@gmail.com
/ close the input file
5/ close the output file
Or in several other ways, and once you have an algorithm, you can start
coding it (or implementing it in the programming language of your choice,
whichever form of words best pleases your perfesser).
--
Denis McMahon, denismfmcma...@gmail.com
:
print False
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
/Labview/boolalgebra/
index.html#booleantheorems will help.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
at how
you're specifying which node(s) you want to select.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
for a suitable range of values of x:
for x in range(50):
if not (15 = x 30) == ((15 = x) and (x 30)):
print discrepancy
or
for x in range(50):
if (15 = x 30) == ((15 = x) and (x 30)):
print ok
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman
On Sat, 04 Oct 2014 17:52:18 +0200, Tamer Higazi wrote:
I am planing to develop on longer time a n open source Webmailer written
in Python (not 2.7.x) with:
Because the world really needs another webmailer spamengine.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org
the second list and print results.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
( nonsense( None ) is, nonsense( None ) )
print( nonsense( ( 5, \donuts\, ) ) is, nonsense( ( 5, donuts, ) ) )
The above code shows there is no automatic connection between data output
carried out within a function and the value (if any) returned by that
function.
--
Denis McMahon, denismfmcma
Electronics I expect.
I also remember soldering switches to TEAC drives from RS to make them
40 / 80 track switchable.
Duncan, your name looks mighty familiar . Do you know a Judith?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
, it doesn't produce the
specified output. ;)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
+
\n.join([td{}/td.format(z[i]) for z in y]) +
\n/tr for i in range(len(y[0]))]) +
\n/table )
print table
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
, LGPL license
- runs on Python 2.x and 3.x
- pure Python module, lightweight - no package dependency
- probabilities stored as rationals (no floating-point biases)
Hoping Lea could be helpful in this uncertain universe...
Pierre Denis
--
https://mail.python.org/mailman/listinfo/python
+detection+algorithm+python
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
your list contains.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
is probably the first value you
tested. This can speed things up.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 03 Sep 2014 07:16:34 +, Steven D'Aprano wrote:
Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧
AND)? That's crazy notation.
The way I was taught it in the mid 1980s, a.b === a and b, a+b === a or b.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
On Thu, 04 Sep 2014 21:42:56 +1000, Chris Angelico wrote:
On Thu, Sep 4, 2014 at 9:17 PM, Denis McMahon denismfmcma...@gmail.com
wrote:
On Wed, 03 Sep 2014 07:16:34 +, Steven D'Aprano wrote:
Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧
AND)? That's crazy
])
IndexError: list index out of range
x is the value, not the index
Try:
steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for x in steve:
print (x)
or if you want to use the index:
for x in range(len(steve)):
print (steve[x])
--
Denis McMahon, denismfmcma...@gmail.com
--
https
On Thu, 04 Sep 2014 00:39:07 +0100, MRAB wrote:
It would add tuples, delimited by (...), which are not used otherwise
(no expressions):
I guess and () are both unused as delims by json at present.
I like the idea of other key types than string.
--
Denis McMahon, denismfmcma...@gmail.com
etc) and the message is in a text file
called message.txt:
msgfile = message.txt
fp = open( msgfile, r )
msg = MIMEText(fp.read())
fp.close()
msg['Subject'] = 'The contents of %s' % msgfile
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 23 Aug 2014 11:56:29 -0700, Ed Joz wrote:
Please suggest a sample python code.
while program result not correct:
fix program
Note - we are not here to write your code for you, but we will try and
help you develop your own code to do what you want.
--
Denis McMahon
.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
guess != choice:
guess another answer
tries = tries + 1
print it took + tries + attempts to guess + choice
This simplification doesn't take the calculation of ranges into account,
but that's part of guess the/another answer.
--
Denis McMahon, denismfmcma...@gmail.com
Urumqi time, Central Urumqi time or East Urumqi time?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
. :(
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
with that.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
in a web browser? You may need to copy the file to a different
directory to do this depending on the apache configuration.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
is not encoded as utf-8, but rather something
else, then use that as the encoding in the above suggestions. If the
server is not running windows, then I'm not sure where the problem might
be.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
', 'PHOT', 'TKT', 'TOT'],
825: ['CHADT'],
840: ['LINT'],
}
I've patched my 2.7 to set a tz string of UTC[+-] from the [+-]
%z value.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 15 Aug 2014 07:39:23 +, Denis McMahon wrote:
I've patched my 2.7 to set a tz string of UTC[+-] from the
[+-] %z value.
... but that doesn't do much, because time.struct_time in 2.7 doesn't
recognise anything that strptime passes in as a tz at all, as it expects
the dst
:
2014-08-09 07:36:46+00:00
2014-08-09 07:36:46+00:00
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
is wrong with it?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 15 Aug 2014 09:23:02 -0600, Ian Kelly wrote:
On Fri, Aug 15, 2014 at 1:39 AM, Denis McMahon
denismfmcma...@gmail.com wrote:
On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
On further inspection, it seems that strptime() in 2.7 doesn't handle
%z at all. In 3.2, it ignores
extraneous information after the tz offset in
some strings. When feeding strings to a parsing function such as strptime
() it is critically important that the format specifier matches the input
data.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
damage
it. I agree that there are more reasons not to use captcha these days
than there are to use them, however I still don't advocate helping spambot
bastards defeat them.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
such requirements.
Yes, we understand that your spambot requires to decode captcha. We were
just telling you in fairly polite terms that you should fuck off because
we have no wish to help you. We tried polite, it didn't work, now I'm
trying robustness and profanity.
--
Denis McMahon, denismfmcma
yourself, it shouldn't be too
hard.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
%Y %H:%M:%S %z'
datetime.datetime(2014, 8, 9, 7, 36, 46,
tzinfo=datetime.timezone(datetime.timedelta(-1, 61200)))
And this:
AttributeError: 'module' object has no attribute 'timezone'
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
== 200:
soup = BeautifulSoup( r.content )
table = soup.find( table, id=sc_horseCard )
for row in table.find_all( tr ):
for cell in row.find_all( td ):
print cell
print +
else:
print HTTP Status, r.status_code
--
Denis
to help you defeat captchas?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
that he's so dumb.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 12 Aug 2014 00:33:11 -0700, Rustom Mody wrote:
Ive been asked to formulate a python course for financial services folk.
I wouldn't worry too much about c or c++ interfacing paradigms.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 12 Aug 2014 10:48:14 -0700, Rustom Mody wrote:
However those folks have thousands of lines of C/C++ which they are
porting to python.
That begs the question: Why?
Seriously, I'd like to know what benefits they expect to achieve by doing
so.
--
Denis McMahon, denismfmcma
being loaded.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
in range( 1, 3 ):
print rdiff, i
elif rdiff =410:
for i in range( 1, 3 ):
print i, ridff
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
Type help, copyright, credits or license for more information.
from datetime import date
fn = date.today().isoformat() + .log
print fn
2014-07-10.log
quit()
$
Once you have a string containing your filename, you might use:
fp = open( fn, w )
fp.write( data )
fp.close()
--
Denis McMahon
your code in a file and run them from your command line, instead of
entering your programs directly into the interpreter.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 01 Jul 2014 03:51:31 -0700, Jaydeep Patil wrote:
How to convert excel range into python list or tuple?
show me example
http://lmgtfy.com/?q=convert+excel+range+into+python+list+or+tuple
This is an example of how to google a programming question. Learn from it!
--
Denis McMahon
problem. If he can't be bothered to try and solve it himslef, I'm nopt
going to write his code for him.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
something simpler, print hello world is traditional.
To understand the string formatting, try:
print hello {:05d} world.format( 5 )
print hello {:05d} world.format( 50 )
print hello {:05d} world.format( 500 )
print hello {:05d} world.format( 5000 )
print hello {:05d} world.format( 5 )
--
Denis
/body2.htm
for as many urls as you have in your url list. (make sure the target
directory exists!)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
:35)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
import numpy
x = {}
y = numpy.array( [0,1] )
x['2014-06-05'] = y
x['2014-06-05']
array([0, 1])
x
{'2014-06-05': array([0, 1])}
x['2014-06-05'][0]
0
x['2014-06-05'][1]
1
--
Denis McMahon, denismfmcma
On Sat, 07 Jun 2014 01:50:50 +1000, Chris Angelico wrote:
Yes and no. ASCII means two things:
ASCII means: American Standard Code for Information Interchange aka ASA
Standard X3.4-1963
into the lowest seven bits of a byte, with the high byte left clear.
high BIT left clear.
--
Denis
On Mon, 02 Jun 2014 08:13:23 -0700, Samuel Kamau wrote:
I have permission issues with my web server.
Hacks to fix permissions problems are dangerous. There is probably a
better way to fix this issue.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo
jsonlint with:
sudo apt-get install python-demjson
which provides a command line json syntax checker and formatter.
Otherwise, google json lint, there are several web based tools that seem
to be able to do something similar.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org
':
{u'ZugangsDaten': [u'tamer.hig...@nomail.com', u'mypass']},
u'Telephones': {u'KontaktTel': [u'01234', u'11223344']}}
but I have no way of knowing which it is you require.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
conclusions in this matter.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
of sustainability and preserving the
planet, and damn the CO2 created by doing so.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
not permitted
to do it, in which case we're not going to teach you how to do it here.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to infinity, referencing previous item each time.
pythonically:
while isUsingGoogleGroups or isTopPosting:
stop_doing_that()
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 10 Apr 2014 18:29:21 -0700, Wesley wrote:
Currently our company wanna release one product developed by python to
our customer. But dont's wanna others see the py code.
Your business model is fucked.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman
relate to the position of the condition type in a left
to right evaluation sequence.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
:
button_value = True # or: button_value = 1
return button_value
Also I think I'd probably pass the IO address as a parameter to the
button function.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
processes 17 different cases. It
may help, or it may confuse.
http://www.sined.co.uk/tmp/strparse.py.txt
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 28 Feb 2014 00:55:01 +, Denis McMahon wrote:
The code in the file at the url below processes 17 different cases. It
may help, or it may confuse.
http://www.sined.co.uk/tmp/strparse.py.txt
I added some more cases to it, and then realised that the code could
actually be simplified
On Thu, 20 Feb 2014 20:58:52 +0530, shivang patel wrote:
So, I kindly request to you please, give me a very brief info regarding
*Role of Project Manager*.
while not project_is_finished():
take_steps_to_advance_project()
--
Denis McMahon, denismfmcma...@gmail.com
--
https
Good evening.
First of all I would like to apologize for the name of topic. I really didn't
know how to name it more correctly.
I mostly develop on Python some automation scripts such as deployment (it's not
about fabric and may be not ssh at all), testing something, etc. In this terms
I have
, 4, 5]
cheese
[1, 2, 3, 'fred', 5]
ham
[1, 2, 3, 4, 'ham']
eggs
[1, 2, 3, 4, 'eggs']
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
that are not advisable to be developed using Python?
OS Kernels. Hardware drivers.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
if s==[]:
return 0
return ''.join(s[::-1])
for i in range(s**p):
r=({:0+str(p)+d}).format(int(b(i,s)))
if len(r)==p:
print [int(r[a])for a in range(len(r))]
change s to 2 or 4 etc
--
Denis McMahon, denismfmcma...@gmail.com
--
https
301 - 400 of 677 matches
Mail list logo