This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import time | |
| import curses | |
| def main(): | |
| try: | |
| os.system("tegrastats --stop") | |
| os.system("tegrastats --interval 1000 --logfile tegrastats.log &") | |
| stdscr = curses.initscr() | |
| curses.start_color() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #plots slope field of a differential equation | |
| import matplotlib.pyplot as plt | |
| import math | |
| fig, ax = plt.subplots(figsize=(10, 10)) | |
| ax.plot([-10.5,10.5],[0,0],"-", color="#000000") | |
| ax.plot([0,0],[-10.5,10.5],"-", color="#000000") | |
| x = -10 #min x | |
| while x <= 10: #max x | |
| y = -10 #min y | |
| while y <= 10: #max y |