Thanks for the responses! :) Hopefully Gmail's quoting feature shows up
just fine.
1. http://www.challenge-you.com/
2. http://projecteuler.net/index.php?section=logout
3. http://www.spoj.pl/problems/classical/
4. http://codegolf.com/
5. http://www.codechef.com/
Thanks for the responses! :) Hopefully Gmail's quoting feature shows up
just fine.
1. http://www.challenge-you.com/
2. http://projecteuler.net/index.php?section=logout
3. http://www.spoj.pl/problems/classical/
4. http://codegolf.com/
5. http://www.codechef.com/
Sir/Madame,
i'm a begginner to Python
help me in putting the first step to this world
With regards
Vishnu S
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Here's a function I wrote to calculate hourly averages:
It seems a bit slow, however... any thoughts on how to improve it?
def calc_hravg(X):
Calculates hourly average from input data
X_hr = []
minX = X[:,0].min()
hr = dt.datetime(*minX.timetuple()[0:4])
while hr =
Vishnu S wrote:
Sir/Madame,
i'm a begginner to Python
help me in putting the first step to this world
Welcome!
A useful first page may be http://wiki.python.org/moin/BeginnersGuide for an
overview, and http://wiki.python.org/moin/BeginnersGuide/NonProgrammers where
you can find a lot of
On Mon, Jul 6, 2009 at 5:54 PM, David Kimdavidki...@gmail.com wrote:
Hello all,
I have two questions I'm hoping someone will have the patience to
answer as an act of mercy.
I. How to get past a Terms of Service page?
I've just started learning python (have never done any programming
The $ORACLE_HOME variable probably isn't set for root. Try passing sudo the
$ORACLE_HOME variable.
sudo env ORACLE_HOME=$ORACLE_HOME python setup.py install
- or -
sudo env ORACLE_HOME=/path/to/instantclient python setup.py install
Jeremiah Jester wrote:
I've downloaded the cx_oracle
John [H2O] wrote:
Here's a function I wrote to calculate hourly averages:
It seems a bit slow, however... any thoughts on how to improve it?
def calc_hravg(X):
Calculates hourly average from input data
X_hr = []
minX = X[:,0].min()
hr = dt.datetime(*minX.timetuple()[0:4])
The data is just x,y data where x = datetime objects from the datetime
module. y are just floats. It is bundled in a numpy array.
So the only import statements are:
import datetime as dt
import numpy as np
I pass the array X, where X is a numpy array of shape [n,2] where n is the
number of
John [H2O] washa...@gmail.com wrote
The data is just x,y data where x = datetime objects from the datetime
module. y are just floats. It is bundled in a numpy array.
So the only import statements are:
import datetime as dt
import numpy as np
I pass the array X, where X is a numpy array of
On Tue, Jul 7, 2009 at 6:16 AM, John [H2O]washa...@gmail.com wrote:
Here's a function I wrote to calculate hourly averages:
It seems a bit slow, however... any thoughts on how to improve it?
def calc_hravg(X):
Calculates hourly average from input data
X_hr = []
minX =
Hi,
I'm having trouble finding good tutorials on creating standalone executable
files for mac os x.. I've been looking at 'py2app', but can't seem get a
solid grasp. Any help would be greatly appreciated!
cheers
___
Tutor maillist - Tutor@python.org
Alan Gauld wrote:
I assume there is a good reason to use a numpy array instead of
a regular list? ie You need a numpy array elsewhere in the code?
I've never used numpy bt there is a possibility that array access
is slower than list access, but I have no idea. It just adds an extra
2009/7/7 John [H2O] washa...@gmail.com:
The data is just x,y data where x = datetime objects from the datetime
module. y are just floats. It is bundled in a numpy array.
I might be totally off but, did know that you can compare datetime objects?
from datetime import datetime
d1 =
On Tue, Jul 07, 2009, Pete Froslie wrote:
Hi,
I'm having trouble finding good tutorials on creating standalone executable
files for mac os x.. I've been looking at 'py2app', but can't seem get a
solid grasp. Any help would be greatly appreciated!
For a python script, say mypython.py, it should
Thanks Bill,
Terminal tells me, 'chmod: app_test.py: No such file or directory'
I assume that's what you meant to do? Drop this at the start of the script:
#!/usr/bin/env python
Then go into terminal and type:
`chmod +x mypython.py''
--pretty new to some of this stuff.
cheers
On Tue, Jul
2009/7/7 David Kim davidki...@gmail.com:
opener = urllib2.build_opener(MyHTTPRedirectHandler, cookieprocessor)
urllib2.install_opener(opener)
response =
urllib2.urlopen(http://www.dtcc.com/products/derivserv/data_table_i.php?id=table1;)
print response.read()
I suspect I am not
On Tue, Jul 7, 2009 at 1:20 PM, David Kimdavidki...@gmail.com wrote:
On Tue, Jul 7, 2009 at 7:26 AM, Kent Johnsonken...@tds.net wrote:
curl works because it ignores the redirect to the ToS page, and the
site is (astoundingly) dumb enough to serve the content with the
redirect. You could make
I'm having trouble finding good tutorials on creating standalone
executable
files for mac os x.. I've been looking at 'py2app', [...]
pete,
welcome to Python! in order for all to answer your question more
appropriately, you'll have to describe the problem in slightly more
detail.
what do
Thanks Kent, perhaps I'll cool the Python jets and move on to HTTP and
HTML. I was hoping it would be something I could just pick up along
the way, looks like I was wrong.
dk
On Tue, Jul 7, 2009 at 1:56 PM, Kent Johnsonken...@tds.net wrote:
On Tue, Jul 7, 2009 at 1:20 PM, David
Wesley,
What I meant is that I would like a file that can be double clicked in order
to run the python script.. so that I can drop it on another mac where
someone can execute it without worrying about Terminal.
Essentially, I need everything to be clean in the end.. My projects are
artworks and
On Tue, Jul 07, 2009, Pete Froslie wrote:
Wesley,
What I meant is that I would like a file that can be double clicked in
order to run the python script.. so that I can drop it on another mac
where someone can execute it without worrying about Terminal.
Essentially, I need
John [H2O] washa...@gmail.com wrote
ind = np.where( (X[:,0] hr) (X[:,0] nhr) )
I have no idea what this is doing but do you really mean a bitwise
and here? You are effectively bitwise anding two boolean values
which seems odd to put it mildly...
Well, effectively I am searching
Pete Froslie fros...@gmail.com wrote
I'm having trouble finding good tutorials on creating standalone
executable
files for mac os x.. I've been looking at 'py2app', but can't seem get a
solid grasp. Any help would be greatly appreciated!
My first question would be do you need to? After all
Yes, this makes sense to me.. but when treating a project as an artwork I
can't ask people to go through an effort beyond a simple start of the app.
For instance, I'm in Boston and the work is being show on a computer in
gallery in SF-- if it crashes, curators often will be unenthusiastic when
Alan,
After all with Python 2.3 pre installed on MacOS X
Is Python 2.3 really the most recent version of Python distributed with
new Macs?
So if I wanted to distribute a Python 2.6 script to a Mac user, I would
need to instruct the Mac user how to download and install a separate
version of
Yes, this makes sense to me.. but when treating a project as an artwork
I can't ask people to go through an effort beyond a simple start of the
app. For instance, I'm in Boston and the work is being show on a
computer in gallery in SF-- if it crashes, curators often will be
unenthusiastic
On Tue, Jul 7, 2009 at 5:51 PM, pyt...@bdurham.com wrote:
Alan,
After all with Python 2.3 pre installed on MacOS X
Is Python 2.3 really the most recent version of Python distributed with
new Macs?
I think *new* Macs come with 2.5. My 2-year-old MacBook Pro has 2.3.
So if I wanted to
That's great Alan.. I see what you mean with the shortcut-- going to try it.
Thanks for the suggestion on the Mac OS x manual.. I will certainly start
looking more into OS fundamentals.
I will say that I've been having a really good time with Python and am
excited to see it start working further
After all with Python 2.3 pre installed on MacOS X
Is Python 2.3 really the most recent version of Python distributed with
new Macs?
I think *new* Macs come with 2.5. My 2-year-old MacBook Pro has 2.3.
i got a new MBP from work about half a year ago with leopard 10.5.6
installed, and it came
Hi Tutors,
I have a web cam that saves files in /var/log/motion and it can get
quite large so I clean it every few days. I came up with this;
#!/usr/bin/python
import commands
import os
from sys import exit
def clean_motion():
folder = '/var/log/motion'
if os.path.exists(folder):
On Tue, Jul 7, 2009 at 8:36 PM, David da...@pythontoo.com wrote:
Hi Tutors,
Hiya david. Cool e-mail address :)
My question is I tried to get it to print out when the directory was empty
like this;
for file in fobj:
pathname = os.path.join(folder, file)
if os.path.exists(pathname):
On Tue, Jul 7, 2009 at 6:36 PM, David da...@pythontoo.com wrote:
My question is I tried to get it to print out when the directory was empty
like this;
for file in fobj:
pathname = os.path.join(folder, file)
if os.path.exists(pathname):
print 'removing... ', file
Luke Paireepinart wrote:
On Tue, Jul 7, 2009 at 8:36 PM, David da...@pythontoo.com
mailto:da...@pythontoo.com wrote:
Hi Tutors,
Hiya david. Cool e-mail address :)
Thanks, want l...@pythontoo.com I have a few to spare :)
But if there are no files in the directory it never
I typically abuse the fact that return will get you out of a function to
make my code indented less.perhaps others would frown upon this but it makes
sense to me.
With various other changes, I'd make your function like so:
from os import path, listdir, remove
def clean(folder):
if not
Oops, you should probably have a return True at the end of the function so
the return value is meaningful.
On Tue, Jul 7, 2009 at 9:29 PM, Luke Paireepinart rabidpoob...@gmail.comwrote:
I typically abuse the fact that return will get you out of a function to
make my code indented less.perhaps
36 matches
Mail list logo