Skip to content

Instantly share code, notes, and snippets.

View iblind's full-sized avatar
🤙

iblind

🤙
View GitHub Profile
@dannguyen
dannguyen / spleeter-and-ffmpeg-quick-tutorial.md
Last active November 29, 2022 04:23
Example use of spleeter (Python+Tensorflow audio-extraction library and ffmpeg
@richjenks
richjenks / countries.md
Last active April 5, 2024 15:19
ISO 3166 countries by region — AMER, EMEA & APAC
Country ISO 3166 Region
Afghanistan AF EMEA
Åland Islands AX EMEA
Albania AL EMEA
Algeria DZ EMEA
American Samoa AS APAC
Andorra AD EMEA
Angola AO EMEA
Anguilla AI AMER
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@amercader
amercader / gist:927079
Created April 19, 2011 09:55
British National Grid to WGS84 with pyproj
import pyproj
# Define two projections, one for the British National Grid and one for WGS84 (Lat/Lon)
# You can use the full PROJ4 definition or the EPSG identifier (PROJ4 uses a file that matches the two)
#bng = Proj("+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs towgs84='446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894'")
#wgs84 = Proj('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs')
bng = pyproj.Proj(init='epsg:27700')
wgs84 = pyproj.Proj(init='epsg:4326')