Hi everyone.
Im trying to solve some problems in parallel using the multiprocessing module
in Python 2.7. A general model is built using CPython and then the subproblems
are solved in parallel returning results in a queue. This is currently working
fine. I would like to solve the subproblems us
By the way, Im using python 2.7.
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
nd Im seeing savings of 50%
in time when using PyPy to somve the subproblems.
Any help would be highly appreciated.
Lj.
--
https://mail.python.org/mailman/listinfo/python-list
Hi All,
I use gurobipy to model a large scale optimization problem. Is there a way to
use pypy with the gurobipy library? Has anyone done this?
Thanks.
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, September 22, 2015 at 11:19:00 PM UTC+2, sohca...@gmail.com wrote:
> On Tuesday, September 22, 2015 at 11:45:00 AM UTC-7, Lj Fc wrote:
> > you have 10 minutes😂 Good luck!!
> >
> >
> > 1. What is PEP8 ?
> >
> > 2. What are the different way
Hi everyone. Quick question here. Lets suppose if have the following numpy
array:
b=np.array([[0]*2]*3)
and then:
>>> id(b[0])
4582
>>> id(b[1])
45857512
>>> id(b[2])
4582
Please correct me if I am wrong, but according to this b[2] and b[0] are the
same object. Now,
>>> b[0] is b[2]
Hi All,
I have a quick question regarding the modification of global variables within
functions. To illustrate, consider the following toy example:
a={"1": set()}
b=9
def gt(l):
a["1"] = a["1"] | set([l])
When calling this last function and checking the a dictionary, I get:
>>> gt(5)
>>> a
On Monday, September 22, 2014 1:12:23 PM UTC-4, Chris Angelico wrote:
> On Tue, Sep 23, 2014 at 2:57 AM, LJ wrote:
>
> > Quick question here. In the code I am working on I am apparently doing a
> > lot of dictionary lookups and those are taking a lot of time.
>
> >
Hi All,
Quick question here. In the code I am working on I am apparently doing a lot of
dictionary lookups and those are taking a lot of time.
I looked at the possibility of changing the structure and I found about the
numpy structured arrays.
The concrete question is: what would be the differe
Hi All.
I'm coding a Dynamic Programming algorithm to solve a network flow problem. At
some point in the algorithm I have to iterate through a set of nodes, while
adding and/or removing elements, until the set is empty. I know a regular set()
object does not work in a case like this, so I wonde
Thank you very much!
--
https://mail.python.org/mailman/listinfo/python-list
Thank you for the reply.
So, as long as I access and modify the elements of, for example,
A=array([[set([])]*4]*3)
as (for example):
a[0][1] = a[0][1] | set([1,2])
or:
a[0][1]=set([1,2])
then I should have no problems?
--
https://mail.python.org/mailman/listinfo/python-list
Wolfgang, thank you very much for your reply.
Following the example in the link, the problem appears:
>>> A = [[0]*2]*3
>>> A
[[0, 0], [0, 0], [0, 0]]
>>> A[0][0] = 5
>>> A
[[5, 0], [5, 0], [5, 0]]
Now, if I use a numpy array:
>>> d=array([[0]*2]*3)
>>> d
array([[0, 0],
[0, 0],
[0
.
(see code sample below)
Thanks,
LJ
---
import poplib
import time
from email.Parser import Parser
parser = Parser()
server = poplib.POP3_SSL("pop.gmail.com", 995)
print server.user("XXX-MY_EMAIL")
print server.pass_("XXX-MY_PW")
server.set_debuglevel(0)
def ge
14 matches
Mail list logo