Skip to content

Instantly share code, notes, and snippets.

View ostwalprasad's full-sized avatar

Prasad Ostwal ostwalprasad

View GitHub Profile
#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
@chrisjsimpson
chrisjsimpson / dms2dec.py
Created April 1, 2019 12:17 — forked from jeteon/dms2dec.py
Convert coordinates in DMS notation to decimal in Python.
#!/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.
@wiso
wiso / covariance_to_correlation.py
Created March 20, 2018 08:33
Compute correlation matrix from covariance matrix using numpy
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
@checco
checco / rw_ro_access.sql
Last active March 22, 2024 08:32 — forked from oinopion/read-access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- 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;
@riccardoscalco
riccardoscalco / README.md
Last active July 22, 2022 16:32
Confidence intervals on linear regression

Confidence intervals on linear regression

Python code for the evaluation of linear regression and confidence intervals between two random variables x and y.

@tsemerad
tsemerad / dms_to_dd.py
Created February 28, 2013 01:15
Python function for converting degrees, minutes, seconds (DMS) coordinates to decimal degrees (DD).
def dms_to_dd(d, m, s):
dd = d + float(m)/60 + float(s)/3600
return dd