Re: Using python to deploy software

2005-01-05 Thread Anand
headway, mail me and I can give you his email address. Rgds -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Cookbook 2nd ed Credits

2005-01-06 Thread Anand
: http://harvestman.freezope.org/cookbook/creds.html Hope this helps! Regards -Anand -- http://mail.python.org/mailman/listinfo/python-list

Contributor's List

2005-01-06 Thread Anand
://harvestman.freezope.org/cookbook/credau.html List of all authors o http://harvestman.freezope.org/cookbook/creds.html -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Contributor's List

2005-01-06 Thread Anand
Please direct all queries to the Cookbook editors...! Thanks -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Contributor's List

2005-01-06 Thread Anand
Please direct all queries to the Cookbook editors! Thanks -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Contributor's List

2005-01-06 Thread Anand
Please direct any query to the Cookbook editors. Thanks -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Contributor's List

2005-01-06 Thread Anand
I have no idea. I am just another contributor like you. Just doing a service to the Python community by providing the list at my site. However, I am not responsible for its content. Please direct your queries to the editors, if any. Thanks -Anand -- http://mail.python.org/mailman/listinfo

Re: Remove HTML tags (except anchor tag) from a string using regular expressions

2005-02-01 Thread Anand
How about... import re content = re.sub('<([^!(a>)]([^(/a>)]|\n)*)>', '', content) Seems to work for me. HTH -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Remove HTML tags (except anchor tag) from a string using regular expressions

2005-02-01 Thread Anand
I meant content = re.sub ('<[^!(a>)]([^>]|\n)*[^!(/a)]>', '', content) Sorry for the mistake. However this seems to also print tags like , etc also. -Anand -- http://mail.python.org/mailman/listinfo/python-list

Porting from Python 2.3 to 2.4

2005-07-13 Thread Anand
. rgds -Anand -- http://mail.python.org/mailman/listinfo/python-list

New Meetup Group

2004-12-28 Thread Anand
thon enthusiast, consider joining the group. Also, spread the word around. Happy New Year! -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python to deploy software

2004-12-28 Thread Anand
refer the project page of pyro at http://pyro.sourceforge.net/projects.html . -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Harvestman install not working

2005-04-06 Thread Anand
Hi Latest version of py2exe does not support the option --force-imports anymore I think. You can edit the .bat file to remove that option. It should work. -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling a list of functions

2015-12-13 Thread Anand
On Sunday, December 13, 2015 at 9:26:52 AM UTC-8, Ganesh Pal wrote: > Hi Team, > > Iam on linux and python 2.7 . I have a bunch of functions which I > have run sequentially . > I have put them in a list and Iam calling the functions in the list as > shown below , this works fine for me , please

Re: Localized Type Inference of Atomic Types in Python

2014-02-15 Thread anand
of approval I > am releasing it to the world. You can grab a copy at > http://www.drifty.org/thesis.pdf . Hi, This link seems to be down. Can you point us to some current link? Am trying to contribute to https://code.google.com/p/py2c/ and reading up on type inference for python.

How To Read Excel Files In Python?

2005-12-13 Thread Anand
ead the cells of the worksheet of my excel file! Thanks for your help and cooperation. Best regards, Anand -- http://mail.python.org/mailman/listinfo/python-list

Columns and Rows in Excel

2005-12-18 Thread Anand
regards, Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Columns and Rows in Excel

2005-12-19 Thread Anand
Greetings, The worksheet is currently opened in Excel. And I want to read the data from the excel worksheet. Instead of looping through the entire worksheet, I want to limit the looping to the rows and columns used so far! Thanks and regards, Anand "Steven D'Aprano" <[EMAIL PR

Re: Guido at Google

2005-12-21 Thread Anand
himself ? :-) -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Anand
> It's like having James Bond as your very own personal body guard ;) That is such a nice quote that I am going to put it in my email signature ! :) -Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: import

2006-07-05 Thread Anand
first one. try to rename your directory name to something else and try. that should work. Also you should do from test import fibo Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating multiple lists from one list

2006-07-05 Thread Anand
> p_code = '' > for i,k in enumerate(ks): > p_code += i*' ' + "for item%s in elts['%s']:\n" %(i,k) > p_code += len(ks)*' '+'print ['+','.join([ "item%s" %i > for i,k in enumerate(ks) ])+']' > > # print the code > print p_code > > >for item0 in elts['a']: > > for item1 in elts['b']: > > for

Re: Python framework questions

2006-07-05 Thread Anand
the best of my knowledge, there should not be any problems. it will be slower because for handling each request a new process has to be created. Anand -- http://mail.python.org/mailman/listinfo/python-list

Python website bug: Wrong URL in http://www.python.org/download/releases/2.5/highlights/

2006-09-27 Thread Anand
r, please consider this a bug report. Thanks -Anand -- http://mail.python.org/mailman/listinfo/python-list

How To Call A DLL?

2006-02-13 Thread Anand
Greetings, Can I get a code snippet of how to call a DLL and it's functionalities from Python? Thanks for your help. Best regards, Anand -- http://mail.python.org/mailman/listinfo/python-list

File Name Format

2007-05-08 Thread Anand
Greetings, How do I convert programmatically the file names from WIN32 to UNIX format? A code snippet would be of great help. We are new to python! :) Thanks. Best regards, Anand -- http://mail.python.org/mailman/listinfo/python-list

Inserting an element into existing xml file

2007-09-25 Thread Anand
ow can we do it in 2.4? Thanks in Advance, Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting an element into existing xml file

2007-09-25 Thread Anand
On Sep 25, 3:20 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Anand wrote: > > I'm new to Python. we are using python2.4. > > > I wanted to insert an element into an existing xml file. Can anyone > > help me with this? > > I've seen lxml and ele

object inheritance

2007-10-26 Thread Anand
I am trying to implement some kind of object inheritance. Just like one class can extend from another, I want to do the same on objects dynamically. I just thought that I can share my excitement here. Suppose there are classes A and B and their instances a and b. class A: def foo(self): self

Re: object inheritance

2007-10-26 Thread Anand
On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > Can you tell any specific use case for doing this? I have many implementaions of a db interface. SimpleDB - simple implementation BetterDB - optimized implementation CachedDB - an implementation with caching of queries RestrictedDB

Re: python in academics?

2007-10-30 Thread Anand
On Oct 30, 6:22 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > On Oct 29, 10:39 pm, sandipm <[EMAIL PROTECTED]> wrote: > > > seeing posts from students on group. I am curious to know, Do they > > teach python in academic courses in universities? > > This came up a while back. See: > > http://ti

Re: object inheritance

2007-10-30 Thread Anand
On Oct 28, 1:16 am, Pradeep Jindal <[EMAIL PROTECTED]> wrote: > On Friday 26 Oct 2007 6:21:57 pm Anand wrote: > > > > > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > > > Can you tell any specific use case for doing this? &

Re: object inheritance

2007-10-30 Thread Anand
> No, that is an argument for multiple-inheritance, mixin classes etc. You > know when constructing the object what behaviour you want it to have. It > isn't an argument for changing the behaviour of an existing object > dynamically. Partially true. I don't want to change the behavior of an exit

Re: object inheritance

2007-10-31 Thread Anand
On Oct 31, 9:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 31 Oct 2007 00:36:34 -0300, Anand <[EMAIL PROTECTED]> escribió: > > >> No, that is an argument for multiple-inheritance, mixin classes etc. You > >> know when constructing the

Re: Method needed for skipping lines

2007-10-31 Thread Anand
On Nov 1, 5:04 am, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Oct 31, 5:02 pm, Gustaf <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > Just for fun, I'm working on a script to count the number of lines in > > source files. Some lines are auto-generated (by the IDE) and shouldn't be > > counted. Th

Re: permuting over nested dicts?

2007-11-01 Thread Anand
On Oct 31, 10:21 pm, Christian Meesters <[EMAIL PROTECTED]> wrote: > Hoi, > > I have the following data structure (of variable size actually, to make > things simple, just that one): > d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, > 'b': {'x':[7,8,9], 'y':[10,11,12]}} > This can be read as a dict of p

Re: permuting over nested dicts?

2007-11-01 Thread Anand
On Nov 1, 2:12 pm, Anand <[EMAIL PROTECTED]> wrote: > On Oct 31, 10:21 pm, Christian Meesters <[EMAIL PROTECTED]> wrote: > > > > > Hoi, > > > I have the following data structure (of variable size actually, to make > > things simple, just that

exec with custom dict

2008-06-21 Thread Anand
f f(): return x """ env = Env() exec(code, env) print env['f']() Here is the output I'm getting. x Traceback (most recent call last): File "a.py", line 14, in print env['f']() File "", line 3, in f NameError: global name &#x

Re: py web-app-frameworks without a rdbms...

2006-03-22 Thread Anand
Try web.py. Very simple and powerful web framework. http://webpy.org -anand -- http://mail.python.org/mailman/listinfo/python-list

multiple assignment

2006-03-22 Thread Anand
r way. for example: def f(x, *y): print x, y f(1, 2, 3) the argument passing here is very similar to the multiple assignment x, *y = (1, 2, 3) any comments? -anand -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple assignment

2006-03-22 Thread Anand
s really useful enough... I think it is really useful. One which i encountered was there is a file where each line has tokens separated by commas. First token is the id and i want to use it in a special way. Wouldn't it be nice to say id, *tokens = line.split(',') than tokens

Re: multiple assignment

2006-03-22 Thread Anand
>> Wouldn't it be nice to say >> id, *tokens = line.split(',') > > > id, tokens_str = line.split(',', 1) But then you have to split tokens_str again. id, tokens_str = line.split(',', 1) tokens = tokens_str.split(',') this i

porting maatkit to python?

2011-06-18 Thread anand jeyahar
need to brainstorm on that too.). Thanks and Regards, == Anand Jeyahar http://sites.google.com/a/cbcs.ac.in/students/anand == The man who is really serious, with the urge to find out what truth is, has no style

python overloading

2011-06-24 Thread anand jeyahar
ccess? == Anand Jeyahar http://sites.google.com/a/cbcs.ac.in/students/anand == The man who is really serious, with the urge to find out what truth is, has no style at all. He lives only in what is. ~

Re: how to call a function for evry 10 secs

2011-07-02 Thread anand jeyahar
p://packages.python.org/APScheduler/#installing-apscheduler Thanks and Regards, == Anand Jeyahar https://sites.google.com/site/< https://sites.google.com/site/aangjie/home/quotes> anandjeyahar == The man who is

Re: Tabs -vs- Spaces: Tabs should have won.

2011-07-16 Thread anand jeyahar
On Sun, Jul 17, 2011 at 08:39, Steven D'Aprano wrote: > > I have reluctantly come to do the same thing. There is a plethora of broken > tools out there that don't handle tabs well, and consequently even though > tabs for indentation are objectively better, I use spaces because it is > less worse t

Refactor/Rewrite Perl code in Python

2011-07-24 Thread Shashwat Anand
I am working with a huge codebase of Perl. The code have zero documentation and zero unit-tests. It seems like a huge hack. The underlying database schema is horrid. So I want to rewrite the whole of it in Python. How do I start ? The idea is to rewrite module by module. But how to make sure code

Re: Refactor/Rewrite Perl code in Python

2011-07-24 Thread Shashwat Anand
Thanks everyone for the insight. I got the idea as to how and where to start. Guess I need to work in Perl for now, so as to start the conversion process. Regarding Tests, I had already started writing tests before posting. Writing tests for every module will be a pain as well as a nice experience.

Re: Idea for pure-python templates using AST.

2011-08-16 Thread anand jeyahar
. Also i never really thought about design. Just blindly/mechanically, translated from perl to python. So criticize and let me know how i can improve this. Thanks and Regards, == Anand Jeyahar https://sites.google.com/site/anandjeyahar

python mysqltuner port

2011-08-16 Thread anand jeyahar
e this. > > Thanks and Regards, > ====== > Anand Jeyahar > https://sites.google.com/site/anandjeyahar > == > The man who is really serious, > with the urge to find out what tru

PUT with proxy-support

2011-08-25 Thread Shashwat Anand
I want to make a PUT request. I need some headers of my own ( certificates etc ) and I need to mandatorily use a proxy. Also the url is of the form http://www.xyz.com/abc and I don't have permission to put data on http://www.xyz.com while I do have permission to put data on http://www.xyz.com/abc

Re: PUT with proxy-support

2011-08-25 Thread Shashwat Anand
On Thu, Aug 25, 2011 at 4:48 PM, Thomas Jollans wrote: > On 25/08/11 13:07, Shashwat Anand wrote: > > I want to make a PUT request. > > I need some headers of my own ( certificates etc ) and I need to > > mandatorily use a proxy. > > Also the url is of the form http://

Re: PUT with proxy-support

2011-08-25 Thread Shashwat Anand
tificates in headers. Did not managed to find all of it. Am not sure is supports REST calls with proxy support. > Sent from my iPhone > > On Aug 25, 2011, at 7:07, Shashwat Anand wrote: > > I want to make a PUT request. > I need some headers of my own ( certificates etc ) and

Re: PUT with proxy-support

2011-08-25 Thread Shashwat Anand
On Thu, Aug 25, 2011 at 5:22 PM, Laszlo Nagy wrote: > ** > > I tried httplib, httplib2, urllib2 with no avail. > I managed to do this via command line curl: > > $ curl http:/xyz.com/testing/shashwat/test.txt -T test.txt -H > "sw-version: 1.0" -H > "CA-Cert-Auth:v=1;a=yxyz.prod;h=10.10.0.1;t=131

Re: PUT with proxy-support

2011-08-26 Thread Shashwat Anand
On Fri, Aug 26, 2011 at 3:15 PM, Laszlo Nagy wrote: > Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-2ZCa8v/**pycurl-7.19.0/egg-dist-tmp-**DyHFls > >> Using curl-config (libcurl 7.12.1) >> src/pycurl.c:42:20: Python.h: No such file or directory >> src/pycurl.c:43:22: p

Re: packaging a python application

2011-08-28 Thread anand jeyahar
case. == Anand Jeyahar https://sites.google.com/site/<https://sites.google.com/site/aangjie/home/quotes> anandjeyahar == The man who is really serious, with the urge to find out what truth is, has no style at all. He lives only

Re: Help me understand this logging config

2011-08-30 Thread anand jeyahar
else: rv = (self.loggerClass or _loggerClass)(name) rv.manager = self self.loggerDict[name] = rv self._fixupParents(rv) finally: _releaseLock() return rv =

Re: ANNOUNCE: Ice 2.0 released

2004-11-30 Thread Anand Hariharan
ishing to improve Ice (a freedom granted by GPL) and who does not work for ZeroC has to mail his/her improvements to your maintainers? (*): Percentage is a very nebulous term, I know. For purposes of answering the question, maybe you could resort to the not-highly-meaningful number of LOC, and per

Re: ANNOUNCE: Ice 2.0 released

2004-11-30 Thread Anand Hariharan
t news clients will allow sending a post to multiple groups, restricting any possible responses to certain groups alone. A poster who is replying can over-ride it, of course. sincerely, - Anand -- http://mail.python.org/mailman/listinfo/python-list

C extension module causes bus error on Python exit

2007-01-30 Thread Anand Patil
nce a NULL pointer and crashes *at exit*, whether or not I've instantiated any of the types. I've searched for memory leaks with gc.get_objects and Mac OS's MallocDebug utility, but haven't found any evidence. Has anyone run into a problem like this? Any help is greatly appre

Questions about remembering and caching function arguments

2007-11-11 Thread Anand Patil
;==' will be significant. Is this OK, bad or an abomination? Again it would be helpful to know the terminology associated with the behavior I'm looking for and any packages that implement it nicely. Many thanks in advance and apologies for the long post, Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Network Graph Library

2007-11-28 Thread Anand Patil
> expects. > http://www.graphviz.org/ > > I've also book marked NetworkX but I've never used it. > https://networkx.lanl.gov/wiki > > I'm sure there are others. > > HTH. > Jay Graves > -- > http://mail.python.org/mailman/listinfo/python-list > Try PyDot, http://dkbza.org/pydot.html . I've had good luck with it. Anand -- http://mail.python.org/mailman/listinfo/python-list

XSLT 2 Processor

2007-12-08 Thread anand nalya
Hi, I wanted to know if there is a XSLT 2 processor for python?? Thanks, Anand Nalya -- http://mail.python.org/mailman/listinfo/python-list

XSLT 2 Processor

2007-12-08 Thread anand nalya
Hi, I wanted to know if there is a XSLT 2 processor for python?? Thanks, Anand Nalya -- http://mail.python.org/mailman/listinfo/python-list

Re: xpath and current python xml libraries

2007-12-11 Thread anand nalya
Is there a package that supports XSLT 2? On 11/12/2007, Paul Boddie <[EMAIL PROTECTED]> wrote: > > On Dec 11, 2:03 am, [EMAIL PROTECTED] wrote: > > PyXML seems to be long gone. Is lxml the way to go if i want to have > > xpath supported? > > The libxml2dom package (which I maintain) also supports

Error accessing a java web service

2007-12-11 Thread anand nalya
** http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=" http://www.w3.org/2001/XMLSchema"; xmlns:ns1="http://wev.onyomo.com/";>http://schemas.xmlsoap.org/soap/envelope/ ">soapenv:Server java.lang.NullPointerException

Permission to use Mac OS 'rocketship' dock icon?

2008-02-28 Thread Anand Patil
Hi all, The image of a rocket with the Python logo that occasionally shows up in the dock would make part of a nice logo for PyMC, an open-source Python Bayesian statistics package. Anyone know who we would have to ask to get permission to use it? Thanks, Anand -- http://mail.python.org/mailman

Re: How about adding rational fraction to Python?

2008-03-01 Thread Anand Patil
Not sure if this is common knowledge yet but Sympy, http://code.google.com/p/sympy, has a rational type. In [2]: from sympy import * In [3]: Rational(21,4) Out[3]: 21/4 In [4]: Rational(21,4)+Rational(3,4) Out[4]: 6 -- http://mail.python.org/mailman/listinfo/python-list

Python code-bloat tool-- warning n00b stuff...

2009-05-16 Thread anand j
archives and index using whoosh and try searching it. Thanks == Anand J Center for Behaviour and Cognitive Sciences University of Allahabad Allahabad-211002 http://sites.google.com/a/cbcs.ac.in/students/anand == The

Re: code of a function

2008-05-29 Thread Anand Patil
On Thu, May 29, 2008 at 9:10 AM, Dark Wind <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any command in Python which gives the code for a function like > just typing the name of a function (say svd) in R returns its code. > > Thank you > If you're using IPython, you can type svd?? . -- http://mai

Re: code of a function

2008-05-29 Thread Anand Patil
On May 29, 2008, at 9:38 AM, Gary Herron wrote: Dark Wind wrote: Hi, Is there any command in Python which gives the code for a function like just typing the name of a function (say svd) in R returns its code. Thank you Nope. If you're using IPython, you can do svd?? . -- http://mail

MACOSX_DEPLOYMENT_TARGET mismatch bug on Leopard using system Python

2008-05-29 Thread Anand Patil
ut installing a different distribution of Python? Googling the problem turns up fixes that involve configuring source distributions, unless I'm mistaken. Thanks, Anand Patil -- http://mail.python.org/mailman/listinfo/python-list

python glibc error

2008-09-02 Thread anand nalya
ora 4: On Fedora: uname -a Linux onyomo.com 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:08:39 EDT 2005 i686 i686 i386 GNU/Linux python -V Python 2.4.1 /lib/libc.so.6 | head -1 GNU C Library development release version 2.3.5, by Roland McGrath et al. Regards, Anand -- http://mail.python.org/mailman/lis

Render a xml graph as an image

2009-11-27 Thread anand jeyahar
hi all. Am looking to display a graph as an image.. the graph is in the format of a xml file(basically the output of a python-graph package).. Is there a package that already does it?? == Anand J http://sites.google.com/a/cbcs.ac.in

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread anand jeyahar
problem.. == Anand J http://sites.google.com/a/cbcs.ac.in/students/anand == The man who is really serious, with the urge to find out what truth is, has no style at all. He lives only in what is

Re: Which graph library is best suited for large graphs?

2009-12-11 Thread anand jeyahar
development. -- == Anand J http://sites.google.com/a/cbcs.ac.in/students/anand == The man who is really serious, with the urge to find out what truth is, has no style at all. He lives only in what is. ~Bruce Lee Love is

Re: Graph library for Python

2009-12-13 Thread anand jeyahar
d for graph data structures and high performance ones soon enough.. so IMHO if we are going in for it we should go for the high performance graphs too.. ====== Anand J http://sites.google.com/a/cbcs.ac.in/students/anand

Re: Anybody use web2py?

2009-12-19 Thread Anand Vaidya
On Dec 19, 2:42 pm, AppRe Godeck wrote: > Just curious if anybody prefers web2py over django, and visa versa. I > know it's been discussed on a flame war level a lot. I am looking for a > more intellectual reasoning behind using one or the other. Hi, I am not very familiar with Django, anyway, m

tkinter import problem

2009-12-19 Thread harish anand
Hi, I have Mandriva 2010.0 in my laptop. I installed python3.1 from the repository. But i am unable to import tkinter in python console. When I try to import tkinter I get the following error, `ImportError : No module named _tkinter` Am I doing something wrong? Thanks, -- http://mail.python.

Re: remote evaluation of Python code typed in html webpage frame

2010-01-16 Thread Anand Vaidya
and it does not execute user form-submitted python code. It executes applications written and stored on the server-side only. You are probably referring to some other project??? Regards Anand -- http://mail.python.org/mailman/listinfo/python-list

Generic Python Benchmark suite?

2010-01-18 Thread Anand Vaidya
Is there a generic python benchmark suite in active development? I am looking forward to comparing some code on various python implementations (primarily CPython 2.x, CPython 3.x, UnladenSwallow, Psyco). I am happy with something that gives me a relative number eg: ULS is 30% faster than CPy2.x et

Re: Generic Python Benchmark suite?

2010-01-18 Thread Anand Vaidya
On Jan 19, 5:42 am, Terry Reedy wrote: > On 1/18/2010 4:58 AM, Anand Vaidya wrote: > > > Is there a generic python benchmark suite in active development? I am > > looking forward to comparing some code on various python > > implementations (primarily CPython 2.x, CPy

Re: Any elegant way to construct the complete $k$-partite graph in Python?

2009-11-23 Thread anand jeyahar
I am not sure what you mean by complete $k$- partite graph There is the python-graph package(http://code.google.com/p/python-graph/) you might wanna check out. It does return a complete graph.. may be u can tweak it?? == Anand J http

Common area of circles

2010-02-04 Thread Shashwat Anand
Given 'n' circles and the co-ordinates of their center, and the radius of all being equal i.e. 'one', How can I take out the intersection of their area. hope the picture makes it clear http://imagebin.us/images/p5qeo7hgc3547pnyrb6.gif -- http://mail.python.org/mailman/listinfo/python-list

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
I wanted some general suggestion/tips only On Thu, Feb 4, 2010 at 5:11 PM, Chris Rebert wrote: > On Thu, Feb 4, 2010 at 2:39 AM, Shashwat Anand > wrote: > > Given 'n' circles and the co-ordinates of their center, and the radius of > > all being equal i.e. &

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
y other approach possible. On Thu, Feb 4, 2010 at 5:24 PM, Xavier Ho wrote: > I'm not sure what you're after. Are you after how to calculate the area? Or > are you trying to graph it? Or an analytical solution? > > What do you mean by "take out the intersection"

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
I needed 6 decimal places of accuracy, so first way of solution will not work for my case. However, your second strategy seems promising. Working on it. Thanks :D ~l0nwlf On Thu, Feb 4, 2010 at 5:49 PM, Bearophile wrote: > Shashwat Anand: > > > Given 'n' circles and the

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
thanks, all of you On Thu, Feb 4, 2010 at 7:31 PM, Terry Reedy wrote: > On 2/4/2010 7:05 AM, Shashwat Anand wrote: > >> I want to calculate areas. >> like for two circles (0, 0) and (0, 1) : the output is '1.228370' >> >> similarly my aim is to take

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
e happens with grid approach. On Fri, Feb 5, 2010 at 12:25 AM, Mark Dickinson wrote: > On 2/4/2010 7:05 AM, Shashwat Anand wrote: > > I want to calculate areas. > > like for two circles (0, 0) and (0, 1) : the output is '1.228370' > > > > similarly my aim

Re: Common area of circles

2010-02-05 Thread Shashwat Anand
his line : sol += curve_area(circle[i][0], circle[i][1], hull[-1][0], hull[-1][1], hull[-2][0], hull[-2][1]) Still trying to fix it. ~l0nwlf On Fri, Feb 5, 2010 at 11:48 AM, John Nagle wrote: > Chris Rebert wrote: > >> On Thu, Feb 4, 2010 at 2:39 AM, Shashwat Anand >> wrote

how to fix bugs (python)

2010-02-06 Thread Shashwat Anand
I am interested in fixing bugs in python. Are there entry-level bugs in python which makes me familiarize with the process just like gnome have gnome-love ? Just a small start-up guidance will be a big favour as I have never fixed any. Thanks, ~l0nwlf -- http://mail.python.org/mailman/listinfo/py

Re: how to fix bugs (python)

2010-02-06 Thread Shashwat Anand
Thanks Terry. I am looking on it. :) On Sun, Feb 7, 2010 at 1:19 AM, Terry Reedy wrote: > On 2/6/2010 1:54 PM, Shashwat Anand wrote: > >> I am interested in fixing bugs in python. Are there entry-level bugs in >> python which makes me familiarize with the process just like g

Re: Last M digits of expression A^N

2010-02-06 Thread Shashwat Anand
Yes, it can be done. Have a look at : http://en.wikipedia.org/wiki/Modular_exponentiation The algorithm is also mentioned in CLRS.I tried writing my own modular-exponentiation code following CLRS but observed that python pow() function is much more efficient. Have a look at this problem : https://w

Re: Last M digits of expression A^N

2010-02-06 Thread Shashwat Anand
a nice exercise to do can be this problem : http://www.codechef.com/MARCH09/problems/A4/ , it deals with both cases, first and last k digits and can be performed within O(log n) On Sun, Feb 7, 2010 at 3:58 AM, Shashwat Anand wrote: > Yes, it can be done. Have a look at : >

Re: max / min / smallest float value on Python 2.5

2010-02-06 Thread Shashwat Anand
On Sun, Feb 7, 2010 at 6:22 AM, duncan smith wrote: > Hello, > I'm trying to find a clean and reliable way of uncovering information > about 'extremal' values for floats on versions of Python earlier than 2.6 > (just 2.5 actually). I don't want to add a dependence on 3rd party modules > just

Re: Help with regex search-and-replace (Perl to Python)

2010-02-07 Thread Shashwat Anand
Here is one simple solution : >>> intext = """Lorem [ipsum] dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut [labore] et [dolore] magna aliqua.""" >>> intext.replace('[', '{').replace(']', '}') 'Lorem {ipsum} dolor sit amet, consectetur adipisicing elit, sed do ei

Re: python admin abuse complaint

2010-02-07 Thread Shashwat Anand
LOL pow(funny, sys.maxint) On Sun, Feb 7, 2010 at 6:27 PM, Daniel Fetchinson wrote: > >>> This is a short complaint on admin abuse on #python irc channel on > >>> freenode.net. > >> > >> Let's see, you are complaining about getting banned from #python by > >> CROSS-POSTING between c.l.py and com

Re: Bizarre arithmetic results

2010-02-11 Thread Shashwat Anand
Do you really believe that -0.1 ** 0.1 is a valid computational problem ? Can you raise a negative number to a fractional power ? Output on my console (python 2.6) >>> -.1 ** .1 -0.79432823472428149 >>> a,b = -.1,.1 >>> a**b Traceback (most recent call last): File "", line 1, in ValueError: neg

Re: Bizarre arithmetic results

2010-02-11 Thread Shashwat Anand
0.79432823472428149 since .1 ** .1 = 0.79432823472428149 and minus sign is appended prior to it. On Thu, Feb 11, 2010 at 6:01 PM, Shashwat Anand wrote: > Do you really believe that -0.1 ** 0.1 is a valid computational problem ? > Can you raise a negative number to a fractional power ?

Re: working with laptop battery

2010-02-13 Thread Shashwat Anand
I too am interested as to which module should I use. My OS is OS X Snow Leopard. On Sun, Feb 14, 2010 at 6:56 AM, Chris Rebert wrote: > On Sat, Feb 13, 2010 at 4:48 PM, Daniel Dalton > wrote: > > Hi, > > > > I'm constantly working in the command line and need to write a program > > to give me a

  1   2   3   >