Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env python3 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# read new up-to-date data | |
def new_data(): | |
x = np.linspace(0, 100) | |
y = np.random.random(len(x)) | |
return (x,y) |
This file contains 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
jarmo@jarmo-ThinkPad-T430s:/$ nteract | |
nteract: command not found | |
jarmo@jarmo-ThinkPad-T430s:/$ apt-cache show nteract | |
Package: nteract | |
Architecture: amd64 | |
Version: 0.0.15 | |
Priority: extra | |
Section: editors |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 sys | |
from OpenGL.GL import * | |
from OpenGL.GLU import * | |
from OpenGL.GLUT import * | |
# The display() method does all the work; it has to call the appropriate | |
# OpenGL functions to actually display something. | |
def display(): | |
# Clear the color and depth buffers | |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) |
This file contains 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
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | |
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="" version="1.1"> | |
<trk> | |
<trkseg> | |
<trkpt lon="15.300000" lat="5.500000"></trkpt> | |
<trkpt lon="11.000000" lat="5.500000"></trkpt> | |
</trkseg> | |
<trkseg> | |
<trkpt lon="15.300000" lat="5.505000"></trkpt> |
This file contains 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
struct stepper_motor { | |
// phase pins connected to the control IC. e.g PB2, PD4 | |
uint8_t phaseA_pin; | |
uint8_t phaseB_pin; | |
// which port the relevant pin is located in e.g &PORTB, &PORTC | |
volatile uint8_t *phaseA_port; | |
volatile uint8_t *phaseB_port; | |
// current state of the motor (in the tick loop). | |
// the value is a 2-bit integer where phaseB_pin (msb) phaseA_pin (lsb) |
This file contains 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
#!/usr/bin/python | |
# | |
# | |
# Simple script for data input. Data points include an input value and a timestamp. | |
# The data is appended to ./data.csv to make it easy to import into a spreadsheet. | |
# | |
# | |
import time |