File charlie.py, line 4
1 = float(input('First Number:'))
SyntaxError: can't assign to literal
$
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
up to and
including the element preceding the nth element
Are you sure you got (2,) for [0:1] and not for [2:3]? Are you sure your
initial tuple is what you thought it was?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
== (price_per_book * 1) so rhs becomes
(price_per_book * 1) - (price_per_book * percent_discount)
and (a * x) - (a * y) == a * (x - y) so rhs becomes
price_per_book * (1 - percent_discount)
hence:
discounted_price = price_per_book * (1 - percent_discount)
--
Denis McMahon, denismfmcma...@gmail.com
--
https
condition that leads to the function call is ever fulfilled anyway.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
, minutes and
seconds.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
= list_price - discount_amount
0.6 * list_price = 1.0 * list_price - 0.4 * list_price
so discounted_price = ( 1.0 - 0.4 ) * list_price
where 0.4 is the decimal fraction of the discount
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
line of the
program does, you'll be on your way to understanding a few of the
structures, syntaxes and mechanisms of python.
Or you could show it to your lecturer or a TA and say it was suggested
that you ask her or him to work through it with you.
--
Denis McMahon, denismfmcma...@gmail.com
why the data you expect to be printed isn't
being printed.
--
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
a backdoor that sends copies of all the
plaintext to the NSA?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
/tmp/farms.txt
http://www.sined.co.uk/tmp/farms.csv
http://www.sined.co.uk/tmp/farms.htm
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
of homework exercise as part of a programming course?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
the interpreter on it.
I suspect that if you remove the line:
def a():
and un-indent the rest of the text, the program will run just fine.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
:
names.append( [ author ] )
print the best matching author(s) is/are: , names
Then all you have to do is find enough ways to calculate stats, and the
magic coefficients to use in the stat_weightings
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 22 Jan 2014 17:35:22 +, Denis McMahon wrote:
On Tue, 21 Jan 2014 16:06:56 -0800, Shane Konings wrote:
The following is a sample of the data.
A mechanism using regexes
Just to follow up, using regexes I transformed the sample data that I
believe is as follows:
inputData = [
1
through the input and applying the re to each line, then
reading the captured bits and using them process.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to use the csv module from the documentation. If
you're not, then either go back and ask your lecturer for help, or tell
your boss to hire a real programmer for his quick and easy coding jobs.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
lecturers for advice. Or return
the advance you were paid on this coding job, because you don't seem to
have the skills to do it.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
a lot of sense (you'll be trading cpu in the
client for cpu in the server + network bandwidth and latency).
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
replicating
the web browser.
Oh, you think he meant scrape? I thought he was trying to scrap (as in
throw away / replace) an old javascript heavy website with something
using python instead.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
it using just 'string' ops:
for i in range(len(input)):
if (i==0):
output=input[0]
elif input[i]!=input[i-1]:
output+=input[i]
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
on the python docs website, or perhaps try
googling python mysql?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
choose, you need some way for the receiving application to
distinguish between individual messages in the stream of octets / bytes /
characters that is coming out of the pipe.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
be used to reset passwords on various operating systems.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
are.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to input, and what data they expect
to receive as outputs from it. Once you understand this, you may be in a
position to start defining the database schema, and only then are you
ready to think about the code that will put data into, and get it from,
the database.
--
Denis McMahon, denismfmcma
to look to figure this out)
These two web pages may also help:
http://uk3.php.net/manual/en/function.json-encode.php
http://docs.python.org/2/library/json.html
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
of the pre-pentium era, although I suspect
that might not be quite accurate either.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
the value.
See also:
http://stackoverflow.com/questions/6130768/return-none-if-dictionary-key-
is-not-available
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None,
None, None]
len(l)
60
then the value of l[offset] will either be None or some string depending
on the offset into the list
--
Denis McMahon, denismfmcma...@gmail.com
--
https
On Wed, 25 Dec 2013 16:42:47 +1100, Cameron Simpson wrote:
On 25Dec2013 02:54, Denis McMahon denismfmcma...@gmail.com wrote:
On Tue, 24 Dec 2013 10:27:13 -0800, vanommen.robert wrote:
In this script i want to read the temperatures and make them
available to other scripts. [...]
If you want
(to the program unit) variable.
If you want this process to provide data to other processes, you might
want to look at using a socket so they can request it as needed.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
in this uncertain universe...
Pierre Denis --
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations/
in this uncertain universe...
Pierre Denis
--
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations/
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
you bypass them.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
if o max_len:
max_len = 0
max_start_a = i
max_start_b = j
j += 1
i += 1
print d[max_start_a][0], d[max_start_b][0], max_len
Is there a better way to do this?
--
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
:
q.pop()
q.appendleft( item )
def get_next( q ):
if len( q ) 0:
return q.pop()
return None
To move from position 3 to position 0 (right to left), swap pop and
appendleft for popleft and append.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
On Mon, 16 Dec 2013 19:20:20 -0800, Mura Zalukhu wrote:
Could you give me the best tutorial / web for python. For example how to
make a connection with database.
Which database? Which version of Python?
Google may help. So will the Python on-line documentation.
--
Denis McMahon, denismfmcma
)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 13 Dec 2013 02:32:49 -0800, uni.mail.2014 wrote:
I have a page that request an openID authentication
And your Python question is?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 13 Dec 2013 03:39:44 -0800, Jai wrote:
hey , will u guide me how to run proxies from python
http://lmgtfy.com/?q=ip+address+spoofing
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
b[x[0]] eists than
trapping keyError.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
.
And yes, I can dovetail, mortise and tenon, dowel etc etc etc.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
methods are inherited by
all classes unless overriden.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
not source code, it's a url.
Please, I need help.
As my newsreader isn't a web browser, I can't help. Sorry.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to get the hash strings from the web url, it is nuts to
output them to the screen and then type them back in to the cracking
program when you can just add the code to get them from the web to the
cracking program.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman
some code goes here ...
print original string was:, result
Algorithms for cracking md5 hashes is not a python topic, but rather a
cryptography topic. When you find an algorithm to use, then if you have
trouble converting it into code we may be able to help with that bit.
--
Denis
solved this hash!
load_dictionary( dictionary file name )
get_hashes( http://www.website.tld/path/file.ext; )
brute_force()
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 23 Nov 2013 02:18:03 +, Steven D'Aprano wrote:
On Sat, 23 Nov 2013 01:55:44 +, Denis McMahon wrote:
On Fri, 22 Nov 2013 18:22:29 +0530, Bharath Kummar wrote:
Could you PLEASE provide me with the codes (codes only for the asked
queries) ?
The codes are:
1
for the asked
queries) ?
The codes are:
1) 7373a28109a7c4473a475b2137aa92d5
2) f2fae9a4ad5ded75e4d8ac34b90d5c9c
3) 935544894ca6ad7239e0df048b9ec3e5
4) b1bc9942d029a4a67e4b368a1ff8d883
Please contact your local government eavesdropping agency for assistance
on decoding the codes.
--
Denis
On Wed, 20 Nov 2013 11:38:14 +, Duncan Booth wrote:
Denis McMahon denismfmcma...@gmail.com wrote:
1) Find all the numbers less than n that are not divisible by a, b, or
c.
ask the user for x;
assign the value 0 to some other variable i;
while i is not greater than than x do
; ]
display new x to the user;
}
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
just get too much abuse because (in his opinion) your answer includes
excessive whitespace.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
fahrenheit to centigrade.
As you do this add relevant comments to the code. Eventually you'll have
code with sensible variable names and comments that hopefully describe
what it does.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 13 Nov 2013 16:44:03 -0800, edmundicon wrote:
Den tisdagen den 12:e november 2013 kl. 23:50:03 UTC+1 skrev Denis
McMahon:
On Tue, 12 Nov 2013 14:04:08 -0800, edmundicon wrote:
Greetings everyone! This is my first post on this forum :)
TL;DR: I want to convert
the
public internet upon which python code is executed in response to inputs
from the public internet.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 12 Nov 2013 12:47:58 +, Andy Lawton wrote:
(I think Europe/Kiev is Greece but I don't know)
I suspect Nick is really in a coding sweatshop in Asia/Mumbai
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to a different site
(eg disaster recovery) UTC is still UTC.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
the yearname from the thing
return constipated program
(this is obviously not written as python code, you have to do that bit
yourself)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
a corrected version next week.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
, but the scarcity of universal whitespace is preventing me from
posting it.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 08 Nov 2013 01:28:19 +0200, Νίκος Αλεξόπουλος wrote:
If i was completely incompetent i wouldn't had a working website and i
wasn't able to design my customers' webpages.
If your website is working, why do you keep posting here asking us how to
fix it?
--
Denis McMahon, denismfmcma
On Fri, 08 Nov 2013 01:10:37 +, Steve Simmons wrote:
I must say that I kinda like the idea of Nick's computer gagging on his
code and sending him messages pleading that he educated himself.
It's a more likely scenario that Nick learning to code properly.
--
Denis McMahon, denismfmcma
On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote:
I saw the link and i'm wondering if it can be written in 1-liner.
Yes, but you have to rewrite all your code in perl to do this.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 06 Nov 2013 10:34:34 -0500, Joel Goldstick wrote:
Okey let the hacker try again to mess with my database!!!
Nothing like a good challenge.
I think the hacker is a figment of Nick's imagination, or rather a
consequence of his broken python code corrupting his data.
--
Denis McMahon
using a hand crafted get or post request that exploited some
vulnerability that you have carelessly posted in an internet forum and
then ignored advice to make secure.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
enough. You refuse to learn the right way to do it. You won't
listen to the opinions and suggestions of people with a great deal more
experience than you have in such matters. It's not going to work properly
in the end. I refuse to be associated with it any further.
--
Denis McMahon, denismfmcma
receiving =
similar for minimum
I might have missed something from the original spec, but as I recall,
you just wanted min, max and avg salaries, and to know who was getting
the min and max, yes?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python
many other people do you see repeatedly posting I don't
understand the error, help messages here that have been caused by such
simple coding mistakes?
Most of us can decipher these error messages ourselves and would be
embarrassed to post asking for help.
--
Denis McMahon, denismfmcma
, and display the list contents, then do the same for list 2, then
retrieve all the data from the db and reproduce each list in turn.
Then you might be ready to try coding what you're trying to code.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 05 Nov 2013 20:09:42 +0200, Nick the Gr33k wrote:
Denis, i have already provided my code trying to do what i need and i
need some commendation on how to make it work.
Nick, you're obviously trying to code way above your abilities.
If you want me to write your code, you will have
and to the database.
Holy smoke batman, that's a lot of data.
Or you could use the database properly, and just write the 40 byte
torrent file name to the database with a pointer to the user's record
every time a user downloads another torrent.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
On Sun, 03 Nov 2013 23:32:46 +, Denis McMahon wrote:
On Sun, 03 Nov 2013 14:19:48 -0200, Renato Barbosa Pim Pereira wrote:
I have one .xls file with the values of PV MV and SP, I wanna to
calculate Kp Ki Kd with python from this file, can anyone give me any
suggestion about how can I do
, because mysql does not have a collection
record type.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
write excel to do the calculations?
Assuming PV, MV and SP are in columns, you simply need to write your
equations for Kp, Ki and Kd so that they reference the relevant columns,
and then past them down the whole spreadsheet.
Seems to me like you're using a sledgehammer to shell a peanut.
--
Denis
needed.
As an observation, if you are simply providing a torrent search engine,
you do not need to log or record anything at all.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
with the mysql designers.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
suspect the issue is that, as a list type, the pysql interface expects
to map downloads to either multiple columns, or one column in multiple
rows, ie it is expecting the list to deliver multiple data items to the
database, but the database is looking for a single data item.
--
Denis McMahon
] language [was] hacked together
haphazardly.
That's like me saying that when your uncle flies, he just pulls and
pushes levers and knobs randomly hoping he doesn't crash - and that would
be disrespecting your uncle.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman
On Thu, 31 Oct 2013 10:56:12 -0700, rusi wrote:
On Thursday, October 31, 2013 11:20:52 PM UTC+5:30, Denis McMahon wrote:
On Thu, 31 Oct 2013 09:05:04 -0700, rusi wrote:
If I say: My uncle knows more about flying planes than the Wright
brothers am I disrespecting the Wright brothers
used twice.
So, whatever behaviour you're seeing is not what I'm seeing.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
.
Oh look, that's almost the same advice I gave you about 10 days ago!
So you've spent 10 days ignoring my advice, and then you call Chris lazy.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
is wrong and the module cannot be installed?
'ascii' codec can't decode byte 0xe7 in position 2255: ordinal not in
range(128)
Hmm, let me try and phrase this in a way you might understand:
You fed poison to baby. Baby got sick and died.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
On Sun, 13 Oct 2013 23:54:34 +, Steven D'Aprano wrote:
(and Gary Herron wrote similar)
Was that really necessary?
Am I still pissed at being told my solution was crap because it had too
many lines?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo
that represent walls.
Navigating such a maze graphically would require allocating co-ordinates
in the same drawing space to the centres of the rooms, and moving between
adjacent room centres provided the exit was open.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman
all the search strings into a list
while there's data in shakes
read a line from shakes
for each string in search string list
search the line from shakes for the search string
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
, and hence far
superior to any solution more mundane coders might produce.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
me to fuck off too? I wonder what you are doing here, if you are so
unwilling to share your hard-earned knowledge with others as you seem in
this post. This attitude is not the Denis McMahon I'm used to.
I'm not unwilling, but this forum is not the place for tcp/ip 101, or
http 101, or smtp 101
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote:
Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε:
Have you checked the cookie jar in the browser to see what value the
cookie has? Is that the value you think it should have? Note that
checking the cookie jar is a browser topic
.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote:
Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε:
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote:
Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε:
Have you checked the cookie jar in the browser to see what value
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote:
Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε:
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote:
Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε:
Have you checked the cookie jar in the browser to see what value
On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote:
On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote:
Find the relevant forums and ask in them.
In fairness to Nikos, that may not be an easy thing to do. I for one
have *no idea* where to find an appropriate forum to learn
characters :-)
Doesn't matter where it is, a link to it exists at /w now ;)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
in
'' characters, and uses '-' as an empty field.
So I think every element should match: (\S+|[^]+|-) and there should
be \s+ between elements.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to not use
cookies, aren't you.
Nick, if a user doesn't want to be tracked, you can't track them. The
user controls all the data their machine sends to you. This means that
they can manipulate it. Nothing you can do will prevent this.
--
Denis McMahon, denismfmcma...@gmail.com
--
https
the server thinks it's setting the cooking
to, what the browser thinks it received as the cookie, and what the
server gets back afterwards to work out where the error is happening.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 06 Oct 2013 08:20:35 +0300, Νίκος Αλεξόπουλος wrote:
Thank you Denis, i didn't knew about sessions up until i saw you post.
Your code is very advanced for me to read but i will try to decode it
I though that if we want to read something from our visitor, something
we want, we have
401 - 500 of 677 matches
Mail list logo