Python code for the evaluation of linear regression and confidence intervals between two random variables x and 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
#Songs | |
youtube-dl -f m4a --add-metadata https://www.youtube.com/watch?v=UDVtMYqUAyw | |
#Playlist | |
youtube-dl -f m4a --add-metadata --yes-playlist https://www.youtube.com/watch?v=UDVtMYqUAyw | |
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
#!/env/python | |
# coding=utf8 | |
""" | |
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal. | |
Formula: | |
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60)) | |
Assumes S/W are negative. |
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 | |
def correlation_from_covariance(covariance): | |
v = np.sqrt(np.diag(covariance)) | |
outer_v = np.outer(v, v) | |
correlation = covariance / outer_v | |
correlation[covariance == 0] = 0 | |
return correlation |
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
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE postgres_ro_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |
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
def dms_to_dd(d, m, s): | |
dd = d + float(m)/60 + float(s)/3600 | |
return dd |