Skip to content

Instantly share code, notes, and snippets.

View fivejjs's full-sized avatar
🏠
Working from home

vfive fivejjs

🏠
Working from home
  • Data scientist and engineer
  • Sydney Australia
View GitHub Profile
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import missingno
import warnings
warnings.filterwarnings("ignore")
%matplotlib inline
@fivejjs
fivejjs / countries_codes_and_coordinates.csv
Created August 16, 2021 23:27 — forked from tadast/countries_codes_and_coordinates.csv
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
Antigua and Barbuda AG ATG 28 17.05 -61.8
@fivejjs
fivejjs / gist:08b6299be5dd2c6f428b68f0e4d6bc96
Created April 30, 2021 12:09 — forked from bcherny/gist:de24955c15430efd99f1
How to squash commits with git

Let's say you have a Pull Request from myBranch to master with 3 commits, and you want them to appear as a single commit in master.

If you're merging on the command line, this is trivial:

git checkout master
git merge --squash myBranch
git commit
@fivejjs
fivejjs / odc-dscache-csv-odd-tiles-to-geojson.py
Created April 13, 2021 23:58
Find the odd tiles from the odc dscache csv.
from collections import defaultdict
import pandas as pd
df_new = pd.read_csv('s2_l2a_all.csv') # add absolut path of csv
xy_t = defaultdict(list)
for row in df_2019.itertuples():
xy_t[(row.X, row.Y)].append(row.T)

Keybase proof

I hereby claim:

  • I am fivejjs on github.
  • I am jinjunsun (https://keybase.io/jinjunsun) on keybase.
  • I have a public key ASBIkHDrGNWV9gLbFeUfFBGomvnPI2ivtyEgj_TmeW50Tgo

To claim this, I am signing this object:

@fivejjs
fivejjs / 1.html.md
Created November 3, 2019 10:51 — forked from hongyangqin/1.html.md
傅立叶变换的物理意义 From:https://mp.weixin.qq.com/s/B0267BKDutJhUQ5I9wquqg##

傅立叶变换的物理意义

原创 2016-04-08 yangboy2

昨天我们分享了一篇《FFT结果的物理意义》一文,有些网友表示看不大明白,为此我们整理重发一篇去年分享过的《傅里叶变换的物理意义》一文,以便大家更好的理解。

1. 先看下面的两幅动画,增加对傅立叶变换的印象

@fivejjs
fivejjs / dummy-indexing.ipynb
Created February 23, 2021 05:15
sample-ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fivejjs
fivejjs / crop_mask_feature_layer.py
Created February 15, 2021 07:53 — forked from cbur24/crop_mask_feature_layer.py
Feature layer function for production run of eastern crop-mask
def gm_mads_two_seasons(ds1, ds2):
"""
Feature layer function for production run of
eastern crop-mask
"""
def fun(ds, era):
#normalise SR and edev bands
for band in ds.data_vars:
if band not in ['sdev', 'bcdev']:
ds[band] = ds[band] / 10000
@fivejjs
fivejjs / librosa_parallel.py
Created December 12, 2019 23:04 — forked from tracek/librosa_parallel.py
Running librosa parallel for loops with multiprocessing and joblib
# The script illustartes stunning difference on my machine with processing of signal with multiprocessing and joblib.
# The slowness of multiprocessing is likely caused by oversubscription
import time
import numpy as np
import librosa
from joblib import Parallel, delayed
from functools import partial
from multiprocessing import Pool
@fivejjs
fivejjs / 1.html.md
Created November 3, 2019 10:51 — forked from hongyangqin/1.html.md
傅立叶变换的物理意义 From:https://mp.weixin.qq.com/s/B0267BKDutJhUQ5I9wquqg##

傅立叶变换的物理意义

原创 2016-04-08 yangboy2

昨天我们分享了一篇《FFT结果的物理意义》一文,有些网友表示看不大明白,为此我们整理重发一篇去年分享过的《傅里叶变换的物理意义》一文,以便大家更好的理解。

1. 先看下面的两幅动画,增加对傅立叶变换的印象