is single-quoted or triple-quoted is irrelevant. That is, these two things
are equivalent:
def func(a):
This is a function
return a*2
def func(a):
This is a function
return a*2
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https
-bit app is pretty
impressive.
Actually, Microsoft made it pretty easy to call 32-bit DLLs in a 16-bit
process and vice versa. That's why many of us were surprised when they did
not provide the same capability in the 32/64 transition.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc
adds significant
functionality on the top of that.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody rustompm...@gmail.com wrote:
On Tuesday, September 2, 2014 6:05:19 AM UTC+5:30, Tim Roberts wrote:
Rustom Mody wrote:
On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote:
To the equivalent code with struct:
import struct
dscrp = H?fs5B
f = open
Rustom Mody rustompm...@gmail.com wrote:
On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote:
To the equivalent code with struct:
import struct
dscrp = H?fs5B
f = open('file.dat')
stuff = struct.unpack( dscrp, f.read() )
print stuff
In both cases, you have
a read_short where you happen to have written a float, disaster ensues.
I don't really see that you've added very much.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Seymore4Head Seymore4Head@Hotmail.invalid wrote:
I want to give the computer 100 tries to guess a random number between
1 and 100 picked by the computer.
If it takes more than 7, you're doing it wrong...
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org
that helped turn the tide in what otherwise
would have been an ugly war of attrition, much like WWI.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
!
Please note that iPhones come configured from the factory to say that. Some
users probably don't even know it is happening.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
)
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
)
or do this:
conn=psycopg2.connect(database='busard_test', user='laurent',
host='localhost', password='cactus')
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
of the record for the session after each
transaction, and make sure the contents match what you expect.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
executable program:
xxx
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
to BE Python code, then you have little alternative except to
use the suggestions offered. But if you simply want your scripts to be
interpreted by a Python program, then you can do whatever you want.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo
the and operator.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
that conforms
performant = something that performs
Yes, I suspect it comes from people expecting too much consistency. If
something that has conformance is conformant, then something that has
good performance must be performant.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc
Hello, \World
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
. That is not a significant enough savings to
create new syntax. Remember the Python philosophy that there ought to be
one way to do it.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
, Python is a well-established and
mature programming tool.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
= smtplib.SMTP(localhost)
usually communicates directly with the local server, whether it be sendmail
or postfix or whatever.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
your compression scheme, there really are people
here who would be interested in reading it (although that number gets less
and less as this thread goes on).
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
arbitrary input sequence,
view it as a large number, and then find what exponential equation can
produce that result. The equation becomes the compression.
Interesting -- I hadn't noticed that. Of course, now you have the
problem of expressing 4^8 in a compact way.
--
Tim Roberts, t...@probo.com
Python's choice. You'll get used to it.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
lost information.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
don't
accidentally have the indentation not match the syntax.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
, assuming you have
installed py32win, which virtually every Windows Python user does:
import win32console
win32console.SetConsoleTitle(msg)
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano st...@pearwood.info wrote:
On Sun, 13 Oct 2013 20:13:32 -0700, Tim Roberts wrote:
def add(c1, c2):
% Decode
...
Python uses # for comments, not %, as I'm sure you know. What language
were you thinking off when you wrote the above?
Psssht, I know better than that.
I've
+65)
Or, as a one-liner:
A = ord('A')
def add(c1, c2):
return chr((ord(c1)-A + ord(c2)-A) % 26 + A)
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
,
once you know the first 28 cards, you can uniquely identify the permutation
you started with, and that's enough to get the entire sequence.
Now, it's going to take a hell of a lot of memory to store that
information, so I'm not sure it is a disaster in a practical sense.
--
Tim Roberts, t
interchangably. It is
only the command interpreter that requires the backslash.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
kills the program.
In that case, this makes a little bit of sense. The first time you type
taunt bear, bear_moved is set True and the loop runs again. If you type
taunt bear a second time, then the bear is pissed off and you call
dead().
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc
that is not
present in Unicode. Fortunately, the character doesn't have any legal
meaning, so you can just include explanatory text in your description that
identifies your license.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python
in a tuple.
What you have is a dict in a tuple in a tuple.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Joshua Landau jos...@landau.ws wrote:
Isn't a superscript c the symbol for radians?
That's very rarely used. More common is rad. The problem with a
superscript c is that it looks too much like a degree symbol.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http
fonts directory. Linux doesn't even
have a dedicated windowing system.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
with a block of
IP addresses. That does not necessarily bear any resemblence to the actual
location of the user. It tells you the location of the Internet provider
that registered the IP addresses.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo
to run PythonW, you can type:
assoc .script=Python.NoConFile
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Nick the Gr33k supp...@superhost.gr wrote:
On 16/6/2013 4:55 ??, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr wrote:
Because Python lets you use arbitrary values in a Boolean context, the net
result is exactly the same.
What is an arbitrary value? don even knwo what arbitrary means
'
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Fábio Santos fabiosantos...@gmail.com wrote:
On 5 Jun 2013 06:23, Tim Roberts t...@probo.com wrote:
A single machine word was 60 bits, so a single register read got you 10
characters.
10 characters! Now that sounds like it's enough to actually store a word.
However long words can inadverten
to look for a
single character.
if name.find('=') 0 and month.find('=') 0 and year.find('=') 0:
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
to using 5x 12-bit
bytes per word.
Ah, memories. I spent 10 years working for Control Data.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
on your machine.
You can override the default character set:
con = pymysql.connect( db = 'metrites', host = 'localhost', user =
'me', passwd = 'somepass', charset='utf-8', init_command='SET NAMES UTF8' )
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org
this dilemma
is to change the name you use in the while loop.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
(name,'wb').
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
on,
only ONE of the velocities is reversed. When you hit a horizontal paddle,
only the Y velocity is negated. The ball continues in the same X
direction:
\O
\ /
\/
See? The X velocity continues unchanged until it hits a vertical wall.
--
Tim Roberts, t
() )
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Forafo San ppv.g...@gmail.com wrote:
OK, lesson learned: Take care not to have module names that conflict with
python's built ins. Sorry for being so obtuse.
You don't have to apologize. We've all been bitten by this at least once.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc
to F to G -- 4 threads.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
with your first response.
You just need to return that in a Cookie: header with every request you
make after that.
Are their other ways to keep control over which players sends the gamedata?
Not sure what you mean. If the web site requires cookies, this is what you
have to do.
--
Tim Roberts, t
that this will result in a chunk of text that is not JSON?
Other JSON readers won't be able to read it.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
expansion.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
of the
specification. From RFC 4627 section 2.4:
Numeric values that cannot be represented as sequences of digits
(such as Infinity and NaN) are not permitted.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
. Every operating system handles this kind of
this very differently. Remember, the operating system abstractions are all
designed to hide this from you. When you open a serial port or an audio
device or use a file system, you aren't supposed to KNOW that there is a
USB device behind it.
--
Tim
instead?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
download the x86 version? That will not work. There are Ubuntu
distributions available for the Kindle Fire, but it's going to require
getting your hands dirty. Google is your friend here.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python
in which to implement
an open source version of the ill-fated Microsoft Bob project.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
of Man Power', '1234567,17-Jan')][/CODE]
i need ' ' in all the row and the , to be remove after the date
Do you have any intention of doing ANY of this work on your own? Or are
you going to steal it all?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman
leonardo tampucciol...@libero.it wrote:
thank you all!
So, what was the problem?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
of the print function:
print('''Ah, so your name is %s, your quest is %s, and your
favorite color is %s.''' % (name, quest, color))
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
effect immediately, so
is there some way to change the windows registry and let the changes
take effect immediately without restarting IE ?
No. This is an IE issue, not a registry issue. Other browsers might
behave differently.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http
Chris Hinsley chris.hins...@gmail.com wrote:
Is a Python list as fast as a bytearray ?
Python does not actually have a native array type. Everything in your
program that looked like an array was actually a list.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http
):
with the more Pythonic:
for row in board:
for cell in row:
I would probably replace the piece_type function with a map that maps the
piece number directly to the piece
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
, but the variable is deleted when the shell procsess
terminates.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
assert that scripting languages are a proper subset of programming
languages, not a separate category.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
in Decimal's interpretation of the standard. Can
anyone comment?
I don't think Decimal ever promised to adhere to IEEE 754, did it?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
,
then there is absolutely no way to teach a computer how to do it. It IS
impossible.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
as page1.html? What if I
subsequently delete page1.html? What if I don't? How long will you wait
before deciding they are the same?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Dave Angel d...@davea.name wrote:
As Adnan has pointed out, Python is case insensitive.
That's not really what you meant to say...
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
should be able to pickle the new
MaxEntClassifier and fetch it back with its state intact.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
of the class haha, you write haha().
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
means you're going to need a iterative solution. That is, you
start with a guess, see how far off you are, and refine the guess until you
narrow in on a solution. That means you'll have to figure out whether
raising SN gets you closer or farther away from a solution.
--
Tim Roberts, t...@probo.com
, and when a function object is invoked, it has
NO IDEA what name was used to invoke it. The information is simply not
available.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
time
anew? Is there no way to save its trained values?
When you say train on data, what do you mean? If your training creates
computed data in other members, those members and their values should also
be saved in the pickle.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http
one = two
Which one of these is the name of the function?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
instance of \\] .
Who is doing the JSON encoding? It appears to be doing it incorrectly.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
, no. It's not really a USB device -- I'm betting it doesn't
even enumerate. It's just sucking power from the USB wires. There's
nothing to control.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
(and
pronouncing) the whole word peephole. The word as you have spelled it
here (twice) is a vulgarity.
Now, I'm all in favor of the occasional vulgarity, but if this is a
misunderstanding, you could find yourself as the butt of some awkward jokes
at some future optimization conference...
--
Tim Roberts, t
for os.system and os.popen.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
-setproctitle/
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
at
all? It doesn't.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
) in it
extract the 6th field from the first line with s1,torque
extract the 7th field from the first line with s1,torque
print those three fields to a file
sort that file
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
real-time response makes me think you
might be misunderstanding this.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
]
iter = iter[n:]
Now you can do this:
def main(data):
for first3 in N_at_a_time(data, 3):
print CalcCenter(first3)
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
is not www.bigsite.com, that
receipient can tell exactly who is supposed to get the message.
So, a web proxy receives requests intended for other sites, and forwards
them on, possibly after restricting or modifying them. That's it.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http
objects from a live
database schema).
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
of usability
and searching above pinpointing files in heirarchies.
I invite you to try it.
Without intending to detract from your work in any way, are you familiar
with the IPython project?
http://ipython.org/
You may find some interesting synergy with them.
--
Tim Roberts, t...@probo.com
Providenza
Paul Rubin no.email@nospam.invalid wrote:
Tim Roberts: reasons to want to do this might involve a shared host
where excessive cpu usage affects other users;
That's what priorities are for.
...or a computer with
limited power consumption, where prolonged high cpu activity causes
thermal or other
of people reading this
forum. A few of those people probably don't like you. So what?
Illegitemi non carborondum -- don't let the bastards wear you down.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
will not find generic mechanisms wrapping them.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
exponent, with
either a 48-bit mantissa or a 96-bit mantissa, packed into one or two
60-bit words. Values were not automatically normalized, so there was no
assumed 1 bit, as in IEEE-754.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python
for top-posting. My Xoom makes bottom-posting awkward.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
Dave Angel d...@davea.name wrote:
On 09/22/2012 05:05 PM, Tim Roberts wrote:
Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On 22 Sep 2012 01:36:59 GMT, Steven D'Aprano wrote
like spaces, etc )
to a python script, remote.py running on 'remote' (the remote machine).
You haven't provided very many details, so it's possible ssh is the
low-impact solution, but don't discard the possibility of using a TCP
socket for this. It's easy in Python.
--
Tim Roberts, t...@probo.com
is to convert the whole file
to a Python script.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
in one direction. There will be one endpoint for
outoging data, and one endpoint for incoming data.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
, you still need to have a driver, but the
libusbx instructions can help you find an install one.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
of oledll.LoadLibrary.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
.
What's the type of i in the second case in Python 3?
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
framework.
IronPython is written in C#. It generates code that runs in the .NET
Framework.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 952 matches
Mail list logo