Skip to content

Instantly share code, notes, and snippets.

@kalhartt
kalhartt / particles.py
Created January 28, 2015 08:46
Particle collisions for StackOverflow 28144084
import numpy as np
import matplotlib.pyplot as plt
limit_x = 20
limit_y = 30
number_of_particles = 300
radius = 1
def force_init(n):
@kalhartt
kalhartt / gist:7149518
Created October 25, 2013 04:42
termcolor test
from termcolor import colored
col1 = 'data1'
col2 = 'data2'
col3 = 'data3'
col4 = 'data4'
for color in ['yellow', 'green', 'red', 'white']:
print(col1, col2, col3, colored(col4, color))