(none, I think)
# something that doesn't pass the vertical line test, comes to us unordered.... we want to piecewise-interpolate. | |
import numpy as np | |
# partition our data so that each segment DOES pass the vertical line test. | |
c = np.where(a[:,1] >= 0.5)[0] | |
d = np.where(a[:,1] < 0.5)[0] | |
above = a[c,:] # copies of a | |
below = a[d,:] |
myfile = 'pred.js' | |
with open(myfile,'r') as inf: | |
dict_from_file = eval(inf.read()) | |
# each entry will be a dictionary, parse them as you wish. | |
print('keys', dict_from_file[0].keys()) # will list available key-value pairs. | |
# I'm going to extract the data that I personally care about. Class labels. | |
# playing with these lines allowed me to find the numbers representing the class labels | |
print(dict_from_file[0]['predicted'][3]) |
mkdir /var/www/website.com
chown $SAFEUSER:$SAFEUSER /var/www/website.com
export SAFEUSER=yourname
(if $SAFEUSER
is not set)
This is where you keep the contents of your website.
Inside here should exist a public_html
directory that will be what apache searches for.
a = 'trip distance' | |
b = ' '.join([s.capitalize() for s in a.split(' ')]) | |
print(b) |
import numpy as np | |
from matplotlib import pyplot as plt | |
## DEFINE RE-USABLE METHODS | |
def rotX(theta): # build a rotation matrix around the y-axis | |
R = np.eye(3) | |
R[1,1] = np.cos(theta) | |
R[1,2] = -np.sin(theta) | |
R[2,1] = np.sin(theta) |
import numpy as np | |
from matplotlib import pyplot as plt | |
def drawellipse(center = [0,0], radius = 1, k=1, h=1, N=50): | |
assert len(center) == 2 # good practice to do things like this. | |
x0, y0 = center | |
x = np.linspace(x0-h*radius , x0+h*radius, N) | |
y = np.sqrt(radius**2 - ((x-x0)/h)**2 )*k # from the eq for an ellipse | |
plt.plot(x, -y+y0, c='blue') | |
plt.plot(x, y+y0, c='red') |
#!/bin/bash | |
CHECKGITLOG=$(git log | head -3 | tail -1 | awk '{print $4;}') | |
TODAY=$(/bin/date | awk '{print $3}') | |
if [ $CHECKGITLOG -ne $TODAY ] # if you didn't do it today, act accordingly: | |
then | |
echo "HEY! YOU! DO YOUR WRITING!!! (repo synced more than a day ago)" | |
# Do whatever else. I like send_message.py (from my messager repo): | |
python messager/send_message.py 917xxxxxxx att "HEY BUM. GET WRITING. NOW." | |
fi |
Go download it from https://www.anaconda.com/download/ for your Linux/Windows/OSX
I like to use
wget http://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
My machine (basically this build: https://www.thingiverse.com/thing:1514145) has GRBL 0.9 : https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.9 The documents for newer version are up there too, obviously. It would definitely be good to get v1.1 working in order to learn the process of getting it on a fresh Arduino board. I'll outline the process of how to do that in the section below this one and fill in the details as I get around to figuring them out. Here's what I do know for sure though...
You can use any number of GUIs but the premise is always the same.
Once the firmware is on your board, connect it via USB, power it on, and search in your /dev/
directory for your Arduino (type that into Terminal and start typing "tty" and then hit Tab until something shows up). If you have the Arduino software, use the drop down menus to identify an address like /dev/ttyusb####
or /dev/wchusbserial####
The numbers will be u