human
Can you provide a the Python code you requested given the following:
I am working on the file "Sessions/Session08/Day4/numba_intro.ipynb".
The first task is:
Problem 5 - Direct Summation
(This problem borrowed in its entirety from gforsyth's scipy17 numba tutorial.)
Many physical problems require the evaluation of all pairwise interactions of a large number of particles, so-called N-body problems. These problems arise in molecular dynamics, astrodynamics and electromagnetics among others. 
Their pairwise interactions can be expressed as:
\begin{equation}
f_i = \sum_{j=1}^n{P \left(\boldsymbol{x}_i, \boldsymbol{x}_j \right)w_j} \ \ \ \text{for } i=1,2,...,n 
\end{equation}

where subscripts $i$,  $j$ respectively denote target and source
$f_i$ can be a potential (or force) at target point $i$
$w_j$ is the source weight 
$\boldsymbol{x}_i, \boldsymbol{x}_j$ are the spatial positions of particles 
$P \left(\boldsymbol{x}_i, \boldsymbol{x}_j \right)$ is the interaction kernel. 

In order to evalute the potential $f_i$ at a target point $i$, we have to loop over each source particle $j$. Since there are $n$ target points $i$, this 'brute-force' approach costs $\mathcal{O} \left(n^2 \right)$ operations. 
One possible approach in this kind of problem is to define a few classes, say Point and Particle and then loop over the objects and perform the necessary point-to-point calculations.
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class Point():
    """    
    Arguments:
        domain: the domain of random generated coordinates x,y,z, 
                default=1.0
    
    Attributes:
        x, y, z: coordinates of the point
    """
    def __init__(self, domain=1.0):
        self.x = domain * np.random.random()
        self.y = domain * np.random.random()
        self.z = domain * np.random.random()
            
    def distance(self, other):
        return ((self.x - other.x)**2 + 
                (self.y - other.y)**2 + 
                (self.z - other.z)**2)**.5

class Particle(Point):
    """    
    Attributes:
        m: mass of the particle
        phi: the potential of the particle
    """
    
    def __init__(self, domain=1.0, m=1.0):
        Point.__init__(self, domain)
        self.m = m
        self.phi = 0.