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 numpy as np | |
from scipy import optimize | |
from matplotlib import pyplot as plt, cm, colors | |
def calc_R(x,y, xc, yc): | |
""" calculate the distance of each 2D points from the center (xc, yc) """ | |
return np.sqrt((x-xc)**2 + (y-yc)**2) | |
def f(c, x, y): | |
""" calculate the algebraic distance between the data points and the mean circle centered at c=(xc, yc) """ |
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
[global_config] | |
focus = mouse | |
[keybindings] | |
toggle_zoom = F12 | |
next_tab = <Shift>Right | |
split_vert = <Ctrl><Shift>l | |
split_horiz = <Ctrl><Shift>b | |
prev_tab = <Shift>Left | |
[profiles] | |
[[default]] |
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
#!/bin/bash | |
#echo "This script prints the filenames of any dylibs in your /opt/ros/indigo/lib that depend on the System Python" | |
echo "This script prints the filenames of any dylibs in your /usr/local/ that depend on the System Python" | |
#for f in `find /usr/local/lib`; do | |
for f in `find /opt/ros/indigo/lib`; do | |
otool -L "$f" 2> /dev/null| grep Python | grep System &> /dev/null | |
status=$? | |
if [ $status -eq 0 ]; then | |
echo "$status: $f" |
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 matplotlib.pyplot as plt | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import LogisticRegression | |
import numpy as np | |
intercept = -2.0 | |
beta = 5.0 | |
n_samples = 1000 | |
regularization = 1e30 | |
X = np.random.normal(size=(n_samples,1)) |
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 matplotlib.pyplot as plt | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import LogisticRegression | |
import numpy as np | |
NSAMPLE=5000 | |
x_data = np.float32(np.random.uniform(-10.5, 10.5, (1, NSAMPLE))).T | |
r_data = np.float32(np.random.normal(size=(NSAMPLE,1))) | |
y_data = np.float32(np.sin(0.75*x_data)*7.0+x_data*0.5+r_data*1.0) | |
x_data, y_data = y_data, x_data #swap x and y |
OlderNewer