Hey Socha,
Your solution works. But then, all my 3 workers are running in a single command
window. How do I make them run in three different command windows?
--
https://mail.python.org/mailman/listinfo/python-list
I am having trouble understanding the Multiprocessing module.
I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at
once. Currently I am doing this :
from multiprocessing import Process
import Worker1.py
import Worker2.py
import Worker3.py
p1 =
On Thursday, November 13, 2014 1:07:56 PM UTC-5, Anurag wrote:
I am having trouble understanding the Multiprocessing module.
I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at
once. Currently I am doing this :
from multiprocessing import Process
import Worker1.py
On Thursday, November 13, 2014 2:22:29 PM UTC-5, Gary Herron wrote:
On 11/13/2014 10:07 AM, Anurag wrote:
I am having trouble understanding the Multiprocessing module.
I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at
once. Currently I am doing this :
from
On Thursday, November 13, 2014 2:18:50 PM UTC-5, sohca...@gmail.com wrote:
On Thursday, November 13, 2014 10:07:56 AM UTC-8, Anurag wrote:
I am having trouble understanding the Multiprocessing module.
I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at
once
I am trying to add a key value pair of (Priority:1) to queue1,
(Priority:2) to queue2, and (Priority:3) to queue3.
When I just add (Priority:1) to queue1, it works.
But when I run the above code, (Priority:3) is being added to all the
queues.
This looks trivial and I don't understand why
On Tuesday, November 4, 2014 2:37:49 PM UTC-5, Anurag Patibandla wrote:
I am trying to add a key value pair of (Priority:1) to queue1,
(Priority:2) to queue2, and (Priority:3) to queue3.
When I just add (Priority:1) to queue1, it works.
But when I run the above code, (Priority:3) is being
json_split = {}
value = {Status: Submitted, m_Controller: Python}
a = range(31)
del a[0]
for i in a:
json_split[i] = value
keys = json_split.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
threedicts = []
Thanks Rustom for the advice.
I am new to Python and getting struck at some basic things. How do I assign the
values that I am printing to 3 variables say dict1, dict2, dict3?
When I try to assign them before the print statement like this:
d1, d2, d3 =[(queues[j], json.get(queues[j])) for j in
First the values printed by
'[(queues[j], json.get(queues[j])) for j in range(len(queues))] '
is a list, so I tried to convert it into a dict using dict().
And then I tried doing dict[0] but there is an error which says:
'type' object has no attribute '__getitem__'
--
keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
for i in b:
queues = order[n:n+i]
n = n+i
#print queues
#print [(queues[j], json.get(queues[j])) for j in
keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
for i in b:
queues = order[n:n+i]
n = n+i
lists = [(queues[j], json.get(queues[j])) for j in range(len(queues))]
On Wednesday, October 15, 2014 1:10:41 PM UTC-4, Rustom Mody wrote:
On Wednesday, October 15, 2014 10:30:49 PM UTC+5:30, Anurag Patibandla wrote:
keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5
Here is my sample dict if that helps:
json = {1: {Status: Submitted, Startdate: [01/01/2011], Enddate:
[02/02/2012], Job_ID: 1, m_Quantile: 80, m_Controller: Python,
m_Method: Distributed, Allocation_3: [50], Allocation_2: [30],
Allocation_1: [20], Note: , m_Iterations: 1000, submit:
On Wednesday, October 15, 2014 1:35:43 PM UTC-4, Rustom Mody wrote:
On Wednesday, October 15, 2014 10:51:11 PM UTC+5:30, Anurag Patibandla wrote:
Here is my sample dict if that helps:
json = {1: {Status: Submitted, Startdate: [01/01/2011],
Enddate: [02/02/2012], Job_ID
On Wednesday, October 15, 2014 1:41:13 PM UTC-4, Dave Angel wrote:
Anurag Patibandla anuragpatiband...@gmail.com Wrote in message:
Thanks for the response.
Here is the code that I have tried.
from operator import itemgetter
keys = json.keys()
order = list(keys)
q1
On Tuesday, October 14, 2014 12:59:27 PM UTC-4, Dave Angel wrote:
anuragpatiband...@gmail.com Wrote in message:
I have a dictionary that looks like this:
{1:{Key1:Value1, Key2:Value2, Key3:Value3},
2:{Key1:Value1, Key2:Value2, Key3:Value3},
3:{Key1:Value1, Key2:Value2,
On Tuesday, October 14, 2014 5:33:01 PM UTC-4, Skip Montanaro wrote:
Shuffle the keys, then grab the first 20 for one dictionary, the next 30 for
the second, and the last 50 for the third.
Skip
Could you please be more specific?
--
https://mail.python.org/mailman/listinfo/python-list
Thanks for the response.
Here is the code that I have tried.
from operator import itemgetter
keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
for i in b:
queues = order[n:n+i]
n =
'json' has my original larger dict
--
https://mail.python.org/mailman/listinfo/python-list
Anurag Kulkarni added the comment:
Hey!
A few changes are required to accomplish what you seek, but results could be
severe. Path.relative_to() should return an exception if relative path is not
part of the original path. However, I have got a solution for that. I am not
that familiar
Yes you can. There are libraries available in python to make this happen.
Read this for a starter
http://dev.mysql.com/usingmysql/python/
Regards,
Anurag
On Oct 15, 2012 10:53 AM, রুদ্র ব্যাণার্জী bnrj.ru...@gmail.com wrote:
Dear friends,
I am starting a project of creating a database using
Don't worry about what book you have (or don't have) in your
Library..And let this not dictate your technology stack.
PostgreSQL is one of the popular choice and you will never be short of
documentation...Just Google and you will find lot of helpful tutorials...
Regards,
Anurag
On Mon, Oct
Have you considered Django ?
http://www.djangoproject.com/ https://www.djangoproject.com/
Regards,
Anurag
On Tue, Oct 25, 2011 at 7:20 PM, Laszlo Nagy gand...@shopzeus.com wrote:
Hi,
Anyone knows a framework for webapp development? I'm not talking about
javascript/html compilers and ajax
Regards,
Anurag
On Jun 23, 12:52 pm, Tim Golden m...@timgolden.me.uk wrote:
On 23/06/2011 06:02, Anurag wrote:
On Jun 22, 7:01 pm, Adam Tauno Williamsawill...@whitemice.org
wrote:
On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
Hi All,
I am working on application which needs to do
Hi All,
I am working on application which needs to do a authentication against
LDAP, if LDAP not installed then local system account (administrator
user in windows and root user in Linux). This should work on both
Windows and Linux.
Which library I should use for that.
Regards,
Anurag
--
http
On Jun 22, 7:01 pm, Adam Tauno Williams awill...@whitemice.org
wrote:
On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
Hi All,
I am working on application which needs to do a authentication against
LDAP, if LDAP not installed then local system account (administrator
user in windows
be integrated with
python and django.
4. ZenOSS - It is for managing some IP based devices on network.. I
don't know how it will help me.
Please give me some ideas on python even it needs some development
effort.
Regards,
Anurag
On Apr 29, 5:21 pm, Adam Tauno Williams awill...@whitemice.org
and graphs I
should use with Django (open source + paid)
If you guys can help me in desiging a very high level Architecture of
this application.
Thanks for reading so long. Please help me in this. If I am not clear
on something then please write back.
Thanks Regards,
Anurag
--
http://mail.python.org
Could you try by using a connecting string in the standard format as below?
Connection_String =
'scott/tiger@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.5.1.12(PORT=1521)))(CONNECT_DATA=(SID=PR10)))'
db = cx_Oracle.connect(Connection_String)
Regards,
Anurag
On Thu, Feb 17, 2011
Try this please and it should work.
Connection_String =
'scott/tiger@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.5.1.12)(PORT=1521)))(CONNECT_DATA=(SID=PR10)))'
db = cx_Oracle.connect(Connection_String)
I'm sorry i missed a bracket there.
Regards,
Anurag
On Thu, Feb 17, 2011
Apart from that, you could also use a shorter format which is a
correction over what you were trying with earlier.
Here..
uid = scott
pwd = tiger
service = //10.5.1.12:1521/PR10
db = cx_Oracle.connect(uid + / + pwd + @ + service)
Please let us know how it goes.
Regards,
Anurag
On Thu, Feb
Please make the below change to get past this problem
Change
*ftp.*indexftp.barcap.com
to
indexftp.barcap.com
Regards,
Anurag
On Fri, Jan 14, 2011 at 5:25 PM, Thomas Philips tkp...@gmail.com wrote:
I'm using ftplib for the first time, and am having trouble getting it
to work. I type
if there is something else out there that could help meet
my requirement.
Regards,
Anurag
On Tue, Dec 28, 2010 at 6:36 AM, Adam Tauno Williams awill...@whitemice.org
wrote:
On Tue, 2010-12-28 at 03:25 +0530, Anurag Chourasia wrote:
Hi All,
I have a requirement to digitally sign a XML Document using
and expecting if you could guide me to a
library/documentation that I could utilize.
Thanks a lot for your help.
Regards,
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
)
files_list=glob.glob(file_search_pattern)
for file in files_list:
try:
ftp.storlines('STOR ' + file, open(file))
except Exception, e:
print ('Failed to FTP file: %s' %(file))
ftp.close()
Regards,
Anurag
On Thu, Dec 23, 2010 at 5:33 AM, Matt Funk maf...@nmsu.edu wrote:
Hi,
i
,
Anurag
On Thu, Dec 23, 2010 at 6:52 AM, Maurice Shih rockitout...@yahoo.comwrote:
Dear python-list@python.org,
Thank you for taking the time to listen to my request. I'm a beginner
programmer and I se python 2.6. I am making a program that needs a command
that can check if a value is in a list
self._err_handler.fatalError(exc)
File /usr/local/lib/python2.7/xml/sax/handler.py, line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: unknown:1:62: syntax error
[3] + Stopped (SIGTSTP)python
This seems to be a old problem passing versions.
Regards,
Anurag
:])
httplib.InvalidURL: nonnumeric port: '8041/DteEnLinea/ws/EnvioGuia.jws'
How could we avoid this problem?
Regards,
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
operations:
sendNCR
This web service has no callbacks.
I have pasted the complete WSDL for this WEB Service below my email.
I would appreciate if someone could guide me with sample code using a Python
Library suitable to fulfill this requirement of mine.
Regards,
Anurag
?xml version=1.0 encoding
library to be able to send XML Data (and get a
response back) to this Kind of Web Service address i.e.
http://joule:8041/DteEnLinea/ws/EnvioGuia.jws ?
Regards,
Anurag
On Tue, Dec 21, 2010 at 12:42 AM, Kev Dwyer kevin.p.dw...@gmail.com wrote:
On Tue, 21 Dec 2010 00:01:44 +0530, Anurag Chourasia wrote
'
locale.format(%d, 1255000, grouping=True)
'1,255,000'
Regards,
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
Anurag Chourasia anurag.choura...@gmail.com added the comment:
Hi All,
Thanks again for all your support.
I can confirm that this works fine with the AIX Shared Library build support
added in Python 2.7.1 (and 3.x which I have not tested but my tests with 2.7.1
were absolutely fine
stefan-use...@bytereef.orgwrote:
Anurag Chourasia anurag.choura...@gmail.com wrote:
When I configure python to enable shared libraries, none of the
extensions are getting built during the make step due to this error.
building 'cStringIO' extension
gcc -pthread -fno-strict-aliasing -g -O2
Hi All,
During the make step of python, I am encountering a weird error. This is on
AIX 5.3 using gcc as the compiler.
My configuration options are as follows
./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS=-I
/opt/freeware/include -I /opt/freeware/include/readline -I
New submission from Anurag Chourasia anurag.choura...@gmail.com:
Python extensions build on AIX 5.3 with GCC 4.2 fails.
The configure command was as follows
./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS=-I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt
Changes by Anurag Chourasia anurag.choura...@gmail.com:
--
title: Fatal Python error: Interpreter not initialized (version mismatch?) -
AIX 5.3 - GCC - Python 2.7 Shared Library Support - Fatal Python error:
Interpreter not initialized (version mismatch
Anurag Chourasia anurag.choura...@gmail.com added the comment:
Hi Stefen,
I looked at http://bugs.python.org/issue941346 and I believe it might help my
case, but, the changes made against that issue are not clear to me.
It appears that for Python 2.7, the changes were made in the following 5
Anurag Chourasia anurag.choura...@gmail.com added the comment:
Just received a message from Benjamin Peterson informing the release of 2.7.1.
I will now download that tar ball and it should have sebastian's changes as
well. I will update the results of my build process shortly
this error.
Thanks for your help on this.
Regards,
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
this error.
Thanks for your help on this.
Regards,
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
All,
I have a problem in starting my Python(Django) App using Apache and Mod_Wsgi
I am using Django 1.2.3 and Python 2.6.6 running on Apache 2.2.17 with
Mod_Wsgi 3.3
When I try to access the app from Web Browser, I am getting these
errors.
[Mon Nov 22 09:45:25 2010] [notice] Apache/2.2.17
New submission from Anurag anurag.sharma@gmail.com:
Hi
I downloaded the source for Python-3.1.1 for windows x86. I followed the
instructions in the PCbuild\Readme.txt file to build python
Basically, all I did was
1. Open the “PCbuild\pcbuild.sln” in VS2008.
2. Select the “Win32
submitted as input
tar file.
Thanking you once again for your valuable time.
Regards.
On Wed, Dec 24, 2008 at 1:54 AM, Matt Nordhoff
mnordh...@mattnordhoff.comwrote:
ANURAG BAGARIA wrote:
Hello,
I am a Python Newbie and would like to call a short python script via
browser using a CGI
forward to any kind of help or suggestion in this regard.
Thanks.
On Tue, Dec 23, 2008 at 7:00 AM, Chris Rebert c...@rebertia.com wrote:
On Mon, Dec 22, 2008 at 2:02 AM, ANURAG BAGARIA
anurag.baga...@gmail.com wrote:
Hello,
I am a Python Newbie and would like to call a short python script via
Hello,
I am a Python Newbie and would like to call a short python script via
browser using a CGI script, but initially I am trying to call the same
python script directly through python command line. The script intends to
perform a few command line in a pipe and I have written the script (a short
What about this no map, reduce, mutiplication or even addition
Its truly interative and You will need to interate till infinity if
you want correct answer ;)
def factorial(N):
Increase I ...and go on increasing...
import random
myNumer = range(N)
count = 0
I = 1
import tarfile
bigFilePath = /tmp/bigFile
bigFileTGZ = /tmp/big.tar.gz
# create a big file
print Creating big file...,bigFilePath
f = open(bigFilePath,w)
for i in xrange(100):
f.write(anurag*1024*1024)
f.close()
#create a tarfile from big file
print pack to...,bigFileTGZ
tar = tarfile.open
Hi,
Have any one faced such problem, I assume it must be common if it can
be replicated so easily , or something wrong with my system
Also if I use tar.members instead of tar.getmembers() it works
so what is the diff. between tar.members and tar.getmembers()
rgds
Anurag
--
http
(marshal.loads(marshal.dumps(s)))
rgds
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the reply.
It seems problem is due to
Any string in Python can be interned or not, the difference being
how/where the value is stored internally. The marshal module includes
such information in its output. What you are doing is probably
considered a misuse of the marshal module.
lets remove it!
-Anurag
--
http://mail.python.org/mailman/listinfo/python-list
62 matches
Mail list logo