On Thursday, May 28, 2020 at 11:20:05 AM UTC+5:30, Rahul Gupta wrote:
> I am having a Ubuntu system which has 125 Gb of RAM. I executed few python
> scripts on that system. Those scripts uses numpy arrays and pandas. Now
> execution was over but still 50 gb of RAM and 2 Gb cache and
I am having a Ubuntu system which has 125 Gb of RAM. I executed few python
scripts on that system. Those scripts uses numpy arrays and pandas. Now
execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap is
occupied. At this moment nothing is running on the system. I have go
@peter Otten thanks
--
https://mail.python.org/mailman/listinfo/python-list
consider the following code
import csv
import numpy as np
with open("D:\PHD\obranking\\demo.csv", mode='r') as csv_file1,
open("D:\PHD\obranking\\demo.csv", mode='r') as csv_file2:
csv_reader1 = csv.DictReader(csv_file1)
csv_reader2 = csv.DictReader(csv_file2)
filename = "cell_split
FOLLWOING IS MY CODE
import pandas as pd
import csv
from sklearn.preprocessing import LabelEncoder
from sklearn.feature_selection import chi2
with open("D:\PHD\obranking\\test_chi.csv", 'w') as csvfilew1:
fields = ['index', 'feature name', 'p_value']
csvwriter1 = csv.DictWriter(csvfilew1, f
chi value for 10th column but for most of the columns it
is behaving like below "C:\Users\Rahul
Gupta\PycharmProjects\CSVLearn\venv\Scripts\python.exe" "C:/Users/Rahul
Gupta/PycharmProjects/CSVLearn/ChiSq_learn.py" (array([nan]), array([nan]))
Process finished with exit c
i wanted to implement incremental PCA.
Got this code for stack overflow but i am wondering what y = chunk.pop("y")
does and what is this argument "y" to pop
from sklearn.decomposition import IncrementalPCA
import csv
import sys
import numpy as np
import pandas as pd
dataset = sys.argv[1]
chunksiz
64 bit version
--
https://mail.python.org/mailman/listinfo/python-list
Hello all, i have a csv of 1 gb which consists of 25000 columns and 2 rows.
I want to apply pca so i have seen sciki-learn had inbuilt fucntionality to use
that. But i have seen to do eo you have to load data in data frame. But my
machine is i5 with 8 gb of ram which fails to load all this d
@Peter Thanks alot
--
https://mail.python.org/mailman/listinfo/python-list
import csv
import numpy as np
with open("D:\PHD\obranking\\cell_split_demo.csv", mode='r') as csv_file:
csv_reader = csv.DictReader(csv_file)
print(csv_reader.fieldnames)
col_count = print(len(csv_reader.fieldnames))
#print(sum(1 for row in csv_file))
row_count = 0
On Sunday, April 12, 2020 at 1:35:10 PM UTC+5:30, Rahul Gupta wrote:
> the cells in my csv that i wrote looks likes this
> ['82#201#426#553#602#621#811#908#1289#1342#1401#1472#1593#1641#1794#2290#2341#2391#3023#3141#3227#3240#3525#3529#3690#3881#4406#4421#4497#4719#4722#4920#505
the cells in my csv that i wrote looks likes this
['82#201#426#553#602#621#811#908#1289#1342#1401#1472#1593#1641#1794#2290#2341#2391#3023#3141#3227#3240#3525#3529#3690#3881#4406#4421#4497#4719#4722#4920#5053#5146#5433']
and the cells which are empty looks like ['']
i have tried the following code
So I recently tried to write a script using urllib2 module.
Here is the code below:
import urllib2
file = 'metasploitable-linux-2.0.0.zip'
url='https://downloads.sourceforge.net/project/metasploitable/Metasploitable2/metasploitable-linux-2.0.0.zip'
response = urllib2.urlopen(url)
fh=open(file,'w')
I wrote my code for downloading a file 'Metasploitable' using urllib2.But
it seems to have entered infinite loop.Because the screen is blank.It just
hangs there.Please have a look at my code.
import urllib2
file = 'metasploitable-linux-2.0.0.zip'
url='
https://downloads.sourceforge.net/project/met
ing difficulty thinking about how to do this as a Python beginner.
>
> But I have a list that is represented as:
>
> [1,2,3,4,5,6,7,8]
>
> and I would like the following results:
>
> [1,2] [3,4] [5,6] [7,8]
>
> Any ideas?
>
> Thanks
> --
> https://mail.python.org/
0
down vote
favorite
I'm trying to create a simple http server with basic GET and POST
functionality. The program is supposed to GET requests by printing out a simple
webpage that greets a user and askes how he would rather be greeted. When the
user enters a greeting of his choice, th
I want to import PIL package but every time this is showing error " no PIL
module find" .
plz suggest me how i can fix this problem.
--
--
Rahul Tiwari
Research Engineer
Robospecies Technology Pvt. Ltd.
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, 12 September 2014 11:18:25 UTC+5:30, Rahul Bhagat wrote:
> Hello Folks,
>
>
>
> I'm using RIDE -- Robot Framework Test Data Editor
>
> RIDE 1.3 running on Python 2.7.6.
>
>
>
> When I click on some of my test case the RIDE GUI h
On Wednesday, May 29, 2013 3:32:51 PM UTC+5:30, Fábio Santos wrote:
> On 29 May 2013 10:13, "RAHUL RAJ" wrote:
>
> >
>
> > Can anyone tell me the proper way in which I can execute dynamic MySQL
> > queries in Python?
>
> >
>
> >
Can anyone tell me the proper way in which I can execute dynamic MySQL queries
in Python?
I want to do dynamic queries for both CREATE and INSERT statement.
Here is my attempted code:
sql="create table %s (%%s, %%s, %%s ... )" % (tablename,''.join(fields)+'
'.join(types))
cur.execute(sql)
I'm getting same output for both code parts, why not for th code parts in
question?
On Thursday, May 9, 2013 1:48:51 PM UTC+5:30, RAHUL RAJ wrote:
> Then what about this code part?
>
>
>
> [(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]
>
>
>
Then what about this code part?
[(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]
and the following code part:
for x in [1,2,3]:
for y in [3,1,4]:
if x != y:
combs.append((x, y))
On Thursday, May 9, 2013 12:24:24 PM UTC+5:30, Gary Herron wrote:
> On 05/08/2013 11:36 PM, RA
Checkout the following code:
sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y]
output=[]
output=[x for x in sample2 if x not in output]
the output I get is
3 4 5 6 7 8 9 10 3 5 6 7 8 9 10 11 4 5 7 8 9 10 11 12 5 6 7 9 10 11 12 13 6 7 8
9 11 12 13 14 7 8 9 10 11 13 14 15 8 9 10
07:08 UTC+5:30, Tim Golden wrote:
> On 02/08/2012 10:21, rahul wrote:
>
> >
>
> > Hi TJG,
>
> >
>
> > The above link also doesn't strictly said that return value should be
>
> > NULL only, it only said that usually NULL pointer used. No w
sed 0 for error value.
Thanks,
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
quot;O", &input)){
return NULL;
}
.
.
PyErr_SetString(PyExc_Exception, "Throwing Error through check
function");
Py_RETURN_FALSE;
}
Any idea on why this is happening? Any help will be appreciated.
Thanks,
Rahul
--
http://mail.
ubscribe to it here, http://www.pythonweekly.com/
Regards
Rahul Chaudhary
--
http://mail.python.org/mailman/listinfo/python-list
try this
test = time.time(2011, 2, 1, 2, 4, 10)
# this is your datetime object from mysql
print time.mktime(test.timetuple())
hope this would help you
> On Wednesday, August 04, 2010 7:40 PM ? wrote:
> Okey, i have many hours now struggling to convert a mysql datetime
> field that i retr
On May 12, 5:25 pm, Christian Heimes wrote:
> rahul schrieb:
>
> > Is functions equivalent to ruby's rb_big2str() and rb_str2cstr()
> > available in Python.
> > I had search a lot in google but not able to find that.
> > If anybody know than please giv
Is functions equivalent to ruby's rb_big2str() and rb_str2cstr()
available in Python.
I had search a lot in google but not able to find that.
If anybody know than please give me the name of those functions of
Python.
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 28, 5:07 pm, Tim Hoffman wrote:
> On Apr 28, 7:50 pm, Rahul wrote:
>
>
>
> > On Apr 28, 1:02 pm, Marco Mariani wrote:
>
> > > Rahul wrote:
> > > > 1) Do you have any idea about web based support (like mod_python)
> > > > provided by
On Apr 28, 1:02 pm, Marco Mariani wrote:
> Rahul wrote:
> > 1) Do you have any idea about web based support (like mod_python)
> > provided by python.org (official web site)
>
> > Details: - As we know mod_python is used for embeding python code into
> > apache
framework for embeding python on web server
Thanks,
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
s best for your application. In general "have all the features
> of" and "but better" conflict.
>
> --Scott David Daniels
> scott.dani...@acm.org
hi scott,
i am getting more specific, is there any web development framework
better than mod python which is
easy to mai
"ucs-4-le" for
little endian system and "ucs-4-be" for big endian system to set
ucs-4 encoding.
-
Rahul Priyadarshi
--
http://mail.python.org/mailman/listinfo/python-list
is this generic API can be use to change ucs-2 to ucs-4
PyObject * PyCodec_Encode(
PyObject *object,
const char *encoding,
const char *errors
);
if yes than what is the format of denoting ucs-4, because i try to do
that but all times i got segmentation fault, i used "
regarding will be greatly appreciated.
Thanks & Regards,
Rahul Warhekar
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 22, 12:17 am, Stefan Behnel wrote:
> rahul wrote:
> > tatic PyObject *upadteCheck(PyObject *self,PyObject *args){
> > PyObject *var_pyvalue=NULL,*newVar_pyvalue=NULL,*dict=NULL;
> > char *varName;
>
> > if (!PyArg_ParseTuple(args, "s", &am
i have a c extension
tatic PyObject *upadteCheck(PyObject *self,PyObject *args){
PyObject *var_pyvalue=NULL,*newVar_pyvalue=NULL,*dict=NULL;
char *varName;
if (!PyArg_ParseTuple(args, "s", &varName)){
return NULL;
}
dict=PyEval_GetLocals();
i have a c extension
tatic PyObject *upadteCheck(PyObject *self,PyObject *args){
PyObject *var_pyvalue=NULL,*newVar_pyvalue=NULL,*dict=NULL;
char *varName;
if (!PyArg_ParseTuple(args, "s", &varName)){
return NULL;
}
dict=PyEval_GetLocals();
Is PyCodec_Encode(PyObject *object,char *encoding,char *errors )
returns New reference or Borrowed reference
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 14, 6:24 pm, John Machin wrote:
> On Apr 14, 10:35 pm, rahul wrote:
>
> > Hi,
> > i need to write a 'c extension function' in this function i need to
> > change argument value with which this function called.
>
> The appropriate way for a functi
Hi,
i need to write a 'c extension function' in this function i need to
change argument value with which this function called.
ie,
if a python code like
import changeValue as c
arg="old value"
c.changeValue(arg)
print arg
then it print
Thanks Robert. I was executing the profiler on the commandline like so:
python -m profile ~/bin/visualize.py *.nc
Is there any way to pass further options of the form sort etc. via this
invocation. The manual did not specify usage of this form.
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
ed the last bit about "New
in version 2.5."
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
no(function)
[snip]
10.0100.0101.2801.280 :0(execfile)
[snip]
##
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote in news:4c8ee09e-71e2-464a-a3c0-
b630b4707...@c18g2000prh.googlegroups.com:
> Looks like our definitions of "read" differ :-)
>
Sorry. I ought to have said "skimmed" :)
I guess I am one of those guilty lazy-bums that the manual refers to unde
John Yeung wrote in news:c0752f32-b0cf-4fde-
87a8-eb665252e...@k41g2000yqh.googlegroups.com:
> I believe cProfile was added in 2.5. Your best bet on 2.4 is probably
> the profile module. That is what the docs recommend.
>
Thanks John. That works. I'll use "profile&q
tself and other protected packages
zope.i386 : Web application server for flexible content management
applications
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
17 2008, 15:06:10).
I am aware this is kind of dated but some of our legacy codes insist on
using that exact version.
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 10, 5:01 am, "Diez B. Roggisch" wrote:
> Rahul schrieb:
>
> > Hello all,
>
> > I have to access data from database usingadodbso I did
>
> > Importadodb
> > Conn=adodb.NewADOConnection("odbc")
>
> > Upto this it works p
Hello all,
I have to access data from database using adodb so I did
Import adodb
Conn=adodb.NewADOConnection("odbc")
Upto this it works properly but when I say
Conn.Connect("","","")
It gives error as
[Attributrerror]: Object Nonetype has no attribute Connect.
I have Red Hat Enterprise Linux
On Feb 6, 3:53 pm, Rahul wrote:
> On Feb 6, 11:27 am, Rahul wrote:
>
>
>
> > hello all,
>
> > I have installed pyodbc on my red hat enterprise 4 linux machine but
> > when i go to use that using statement,
>
> > import pyodbc
>
> > through py
On Feb 6, 11:27 am, Rahul wrote:
> hello all,
>
> I have installed pyodbc on my red hat enterprise 4 linux machine but
> when i go to use that using statement,
>
> import pyodbc
>
> through python console it gives me error as
>
> ImportError : dynamic module
JCR_LIST__
w _Jv_RegisterClasses
15fc d p.0
which means there is no init function.
So what might be the cause for that?
I have build that pyodbc twice.
Any help regarding this will be greatly appreciated.
Thanks & Regards
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
Has anyone tried installing Python on Compute Node Linux (on a cray)? I was
having trouble getting it running. I see that CNL does not support dynamic
libraries but I am not sure what the best way then is to get Python
running.
Any tips?
--
Rahul
--
http://mail.python.org/mailman/listinfo
I am trying to find out what Python C APIs are changing from Python
2.5 to Python 3.0 but there does not seem to be a single list of
changes (or at least google is not finding one).
If someone knows about where I should look, please let me know.
--
http://mail.python.org/mailman/listinfo/python-lis
thon-2.4.4.
What's the best way to work around this?
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
'import _tkinter' fails on my system. I wanted to enable tk support. I do
have tk and tk-devel installed (but they weren't around when we installed
python). What's the best way to get these modules into python? I hope I do
not have to reinstall python itself? Or do I
ually worked?
I suspect we upgraded our RHEL and that broke it. Has never worked after.
Is there a way to extract what cmd-line options my python was compiled with?
Might be worth it before I go the long-painful route of re-installing.
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
c/Python-2.4.4/Doc/lib/libreadline.tex
Any better way to check?
--
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
mmand like is OK. vim
interprets keystrokes correctly. So do other interpreters e.g. gnuplot.
$LANG $TERM
en_US xterm-color
Versions:
Python 2.4.4
GCC 4.1.2 20070925 (Red Hat 4.1.2-33)
Any sugesstions? Google did not throw anything relevant.
--
Rahul
--
http://mail.python.org/mailman/lis
years of UNIX experience
5 to 7 years of TCP/IP network development experience
3 to 5 years of Oracle DB experience- Good to have
Payment industry knowledge a plus
With Warm Regards and Wishes !
RAHUL
Marketing Executive
AMPLIFY SYSTEMS
E Mail:[EMAIL PROTECTED]
Phone :603-791-4428
Fax :267-284
What's a good way of importing a csv text file of floats into a
Numeric array? I tried the csv module and it seems to work well so
long as I've ints. Does anyone have any suggestions / snippets that
work to import a csv file of floats into a Numeric array?
-Rahul
--
http://mail.
incorrect too.
rahul
[EMAIL PROTECTED] wrote:
> I've been reading the beloved Paul Graham's "Hackers and Painters".
> He claims he developed a web app at light speed using Lisp and lots
> of macros.
>
> It got me curious if Lisp
> is inherently faster to develop
Hi.
I understood your point.
thanks...
rahul
Steven Bethard wrote:
> Steven Bethard wrote:
> >
> > def wrap(obj):
> > def f(*args, **kwargs):
> > for arg in args:
> > print arg
> > return obj(*args, **kwargs)
> >
If you do C = wrap(C) C no longer remains a class..it becomes a
function.
Steven Bethard wrote:
> Rahul wrote:
> > def wrapper(obj):
> >g = obj.__call__
> >def f(*args,**kwargs):
> > for arg in args:print arg
> > return g(*args,**kwargs)
>
setting "__X__" special methods won't work in most cases
> because these are usually optimized when the class is created.
>
> It might work if a.__call__ did exist before (because class a: contained
> a __call__ definition).
>
> Andreas
>
> On Wed, Jun 29, 20
Consider the following:
def a(x):
return x+1
def b(f):
def g(*args,**kwargs):
for arg in args:
print arg
return f(*args,**kwargs)
return g
a.__call__ = b(a.__call__)
now calling a(1) and a.__call__(1) yield 2 different results!!
i.e. for functions a(1) doesnt seem to be tran
Steven D'Aprano wrote:
> On Thu, 16 Jun 2005 11:47:10 -0700, Rahul wrote:
>
> > Hi.
> > I am part of a group in my univ where we organize a programming
> > contest. In this contest we have a UDP based server. The server
> > simulates a game and each contest
Hi.
I will look into it..thanks
rahul
Jeremy Sanders wrote:
> On Thu, 16 Jun 2005 11:47:10 -0700, Rahul wrote:
>
> > If you have a python script and you want that 75 copies of the script be
> > run simultaneously how will you do it? Is there anyway to do so without
> >
Daniel Dittmar wrote:
> Rahul wrote:
> > Hi.
> > I am part of a group in my univ where we organize a programming
> > contest. In this contest we have a UDP based server. The server
> > simulates a game and each contestant is to develop a team of virtual
> > pla
Hi.
I am part of a group in my univ where we organize a programming
contest. In this contest we have a UDP based server. The server
simulates a game and each contestant is to develop a team of virtual
players. Each team is composed of 75 similar bots...i.e. governed by
the same logic. Thus the cont
write the thing in python. if none is
available then probably i will need to work on an interface to some
package written in some other language or work in that language itself.
rahul
Kay Schluehr wrote:
> Rahul wrote:
> > Hi.
> > Well is there an open source computer algebra system wr
Hi.
Well is there an open source computer algebra system written in python
or at least having a python interface?
I know of 2 efforts: pythonica and pyginac...are there any others?
rahul
--
http://mail.python.org/mailman/listinfo/python-list
t 'expects' be a additional keyword.You can go
like this also :
def (int a,int b): or whatever you like. Only that expects make it a
bit clearer IMHO.
sincerely.,
rahul
Scott David Daniels wrote:
> Rahul wrote:
> > 1.def gcd(a,b) expects (int,int)
>
> I presume by
stressing on adding 'expects' as keyword or
something. Only that type should not be enforced and 'expects' makes
this clear.
Rahul Garg
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger wrote:
> [Rahul].
> > I want to compute dot product of two vectors stored as lists a and
b.a
> > and b are of the same length.
> >
> > one simple way is
> > sum(a[i]*b[i] for i in range(len(a)))
> >
> > another simple way is
> >
above. (By
the way profiling them i found that the second is faster by about 30%.)
rahul
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
I just wanted to know why arrays have not been included as a builtin
datatype like lists or dictionaries? The numpy extension shows that it
can be implemented. then why not include arrays in core python?
rahul
--
http://mail.python.org/mailman/listinfo/python-list
81 matches
Mail list logo