<commit_before>#! /usr/bin/env python

"""
File: Particles.py
Copyright (c) 2016 <NAME>
License: MIT

Course: PHYS227
Assignment: 8.15
Date: March 18, 2016
Email: <EMAIL>
Name: <NAME>
Description: Framework over Object Particle, to plot and move each Particle

"""
import random as R
import matplotlib.pyplot as plt
from unittest import TestCase

class Particles:
    """
    Moves and plots objects of type 'Particle'
    """
    def __init__(self, particles):
        self.particles = particles
    def move(self, step_size = 1):
        """
        Translates all particles uniformly by step_size
        """
        for p in self.particles:
            p.move(step_size)

    def plot(self):
        """
        Plots all particles
        """
        for p in self.particles:
            plt.plot(p.x, p.y)
        plt.show()
        plot.clf()

    def moves(self, N = 10, step_size = 1):
        """
        Loops over move() and plot() function N times
        """
        for i in xrange(N):
            self.move(step_size)
            self.plot()

class Test_Particles(TestCase):
    def test(self):<commit_msg>Documentation fix<commit_after>#! /usr/bin/env python

"""
File: Particles.py
Copyright (c) 2016 <NAME>
License: MIT

Course: PHYS227
Assignment: 8.15
Date: March 18, 2016
Email: <EMAIL>
Name: <NAME>
Description: Framework over Object Particle, to plot and move each Particle

"""
import random as R
import matplotlib.pyplot as plt
from unittest import TestCase

class Particles:
    """
    Moves and plots objects of type 'Particle'
    """
    def __init__(self, particles):
        """
        particles is an array of type 'Particle'
        """
        self.particles = particles
    def move(self, step_size = 1):
        """
        Translates all particles uniformly by step_size
        """
        for p in self.particles:
            p.move(step_size)

    def plot(self):
        """
        Plots all particles
        """
        for p in self.particles:
            plt.plot(p.x, p.y)
        plt.show()
        plot.clf()

    def moves(self, N = 10, step_size = 1):
        """
        Loops over move() and plot() function N times
        """
        for i in xrange(N):
            self.move(step_size)
            self.plot()

class Test_Particles(TestCase):
    def test(self):
{'fraction_non_alphanumeric': 0.1077121930202499, 'fraction_numerical': 0.017233950883239983, 'mean_word_length': 2.1678035470668484, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4839077', 'n_tokens_mistral': 757, 'n_tokens_neox': 711, 'n_words': 231}