Jan Gosmann wrote:
> On 27 Mar 2017, at 18:30, Peter Otten wrote:
>
>> Are you perchance comparing 32-bit Python 3.5 with 64-bit Python 3.6?
>
> I don't think so.
> [sys.maxsize](https://docs.python.org/3/library/platform.html#cross-platform)
> indicates both to be 64-bit.
While my original ide
Can I pass self(or all its variables) to a class?
Basically, how do I make all the variables defined in self in the calling
python script available to the python class I want to call?
--
https://mail.python.org/mailman/listinfo/python-list
James McMahon wrote:
> I'm struggling with Python logging. Have tried to apply several examples I
> have found in the open source literature, but can't get it to work. What I
> need to do is this: I have two python scripts, a.py and b.py. Each is
> called by NiFi ExecuteScript processor repeatedly
loial wrote:
> Can I pass self(or all its variables) to a class?
>
> Basically, how do I make all the variables defined in self in the calling
> python script available to the python class I want to call?
Inside a method you can access attributes of an instance as self.whatever:
>>> class A:
..
aaa = ["a","ab","c","b","bc"]
def similar(aa):
similarset = []
for ii in range(0,len(aa)):
for jj in range(ii,len(aa)):
if ii <> jj:
print("("+str(ii)+","+str(jj)+")")
if (aa[ii] in aa[jj]) or (aa[jj] in aa[ii]):
print
I can't reproduce it.
I managed to install pyopencl and run the script. It takes more than
2 hours, and uses only 7GB RAM.
Maybe, some faster backend for OpenCL is required?
I used Microsoft Azure Compute, Standard_A4m_v2 (4 cores, 32 GB
memory) instance.
More easy way to reproduce is needed...
On 3/28/2017 4:09 AM, loial wrote:
Can I pass self(or all its variables) to a class?
In Python, every argument to every function is an instance of some
class. The function can access any attribute of the arguments it
receives with arg.attribute.
--
Terry Jan Reedy
--
https://mail.python.o
On 28 Mar 2017, at 3:08, Peter Otten wrote:
> Perhaps numpy's default integer type has changed (assuming you are using
> integer arrays, I did look at, but not into your code)?
>
> You could compare
>
numpy.array([42]).itemsize
> 8
>
> for the two interpreters.
Both report 8 for integer and
On 28 Mar 2017, at 6:11, INADA Naoki wrote:
I managed to install pyopencl and run the script. It takes more than
2 hours, and uses only 7GB RAM.
Maybe, some faster backend for OpenCL is required?
I used Microsoft Azure Compute, Standard_A4m_v2 (4 cores, 32 GB
memory) instance.
I suppose that
What did you do?
I have configured in apache httpd.conf - enabling of mod_cgi.so and
httpd-vhosts.conf.
In httpd-vhosts have following conifguration. Basically am trying to capture
all /images/ pattern, read have that process using a index.py script and return
back as image/jpeg content.
Ser
On Wed, Mar 29, 2017 at 2:59 AM, wrote:
> Please help if this wont resolve, I have to completely move away from python.
How about, instead, moving away from CGI? Switch to Apache's
modpython. I've deployed several Python-based web sites without
difficulties.
ChrisA
--
https://mail.python.org/m
On 03/27/2017 11:41 PM, Deborah Swanson wrote:
filtered wrote, on March 27, 2017 9:09 PM
Sorry but all your answers are pointless.
I clearly asked about compiling PyUno MYSELF with a
self-compiled Python 3.6.1 installation. Is this so hard to
understand? Why do you give unrelated comments to a
On Wed, Mar 29, 2017 at 3:32 AM, Karim wrote:
>
> On 28/03/2017 18:05, Chris Angelico wrote:
>>
>> On Wed, Mar 29, 2017 at 2:59 AM, wrote:
>>>
>>> Please help if this wont resolve, I have to completely move away from
>>> python.
>>
>> How about, instead, moving away from CGI? Switch to Apache's
On 28/03/2017 18:35, Chris Angelico wrote:
On Wed, Mar 29, 2017 at 3:32 AM, Karim wrote:
On 28/03/2017 18:05, Chris Angelico wrote:
On Wed, Mar 29, 2017 at 2:59 AM, wrote:
Please help if this wont resolve, I have to completely move away from
python.
How about, instead, moving away from C
I am wanting to run a CherryPy app as a daemon on CentOS 6 using an init.d
script. By subscribing to the "Daemonizer" and PIDFile cherrypy plugins, I have
been able to write an init.d script that starts and stops my CherryPy
application. There's only one problem: it would appear that the program
On Wed, Mar 29, 2017 at 12:29 AM, Jan Gosmann wrote:
> On 28 Mar 2017, at 6:11, INADA Naoki wrote:
>
>> I managed to install pyopencl and run the script. It takes more than
>> 2 hours, and uses only 7GB RAM.
>> Maybe, some faster backend for OpenCL is required?
>>
>> I used Microsoft Azure Comput
I tried running a bit of example code from the py2.7 docs
(16.6.1.2. Exchanging objects between processes)
only to have it fail. The code is simply:
#
from multiprocessing import Process, Queue
def f(q):
q.put([42, None, 'hello'])
if __name__ == '__main__':
q = Queue()
On 2017-03-28 19:51, Frank Miles wrote:
I tried running a bit of example code from the py2.7 docs
(16.6.1.2. Exchanging objects between processes)
only to have it fail. The code is simply:
#
from multiprocessing import Process, Queue
def f(q):
q.put([42, None, 'hello'])
if _
On 3/28/2017 2:51 PM, Frank Miles wrote:
I tried running a bit of example code from the py2.7 docs
(16.6.1.2. Exchanging objects between processes)
only to have it fail. The code is simply:
#
from multiprocessing import Process, Queue
def f(q):
q.put([42, None, 'hello'])
if
This doesn't work:
import pandas as pd
def myfunc():
return 'Start_{}_{}_{}_{}_End'.format(df['coverage'], df['name'],
df['reports'], df['year'])
data = {'name': ['Jason', 'Molly', 'Tina', 'Jake', 'Amy'],
'year': [2012, 2012, 2013, 2014, 2014],
'reports': [4, 24, 31, 2, 3],
On Tuesday, March 28, 2017 at 3:36:57 PM UTC-4, zlju...@gmail.com wrote:
> [snip]
>
> Can I somehow generate a new column by concatenating values for the other
> columns in a row?
>
Try this (not tested):
def myfunc(row):
return 'Start_{}_{}_{}_{}_End'.format(row['coverage'], row['name'],
On 3/28/2017 11:59 AM, vishnupras...@gmail.com wrote:
I capture following error in apache logs.
AH01215: from PIL import Image: /var/www/images/index.py
AH01215: ImportError: No module named PIL: /var/www/images/index.py
A general response to this particular message is
a) check spelling in cod
On Tue, 28 Mar 2017 15:38:38 -0400, Terry Reedy wrote:
> On 3/28/2017 2:51 PM, Frank Miles wrote:
>> I tried running a bit of example code from the py2.7 docs
>> (16.6.1.2. Exchanging objects between processes)
>> only to have it fail. The code is simply:
>> #
>> from multiprocessi
It works. Thank you very much. :)
--
https://mail.python.org/mailman/listinfo/python-list
In dataframe
import pandas as pd
data = {'model': ['first', 'first', 'second', 'second', 'second', 'third',
'third'],
'dtime': ['2017-01-01_112233', '2017-01-01_112234',
'2017-01-01_112234', '2017-01-01_112234', '2017-01-01_112234',
'2017-01-01_112235', '2017-01-01_112235'],
}
25 matches
Mail list logo