-
JSBin (jsbin.com) -- really helpful tool for messing around in HTML/CSS/JS. Make sure to log in with your GitHub account (and make a GitHub if you don't already have one) so that all your work is saved
-
The Code Player (http://thecodeplayer.com/) -- nifty site with "screencast"-style animations to watch how web apps and effects are built
-
Mozilla Developer Network (MDN) documentation (https://developer.mozilla.org/en-US/docs/Web) -- if you need to reference anything related to web technology, like looking up JavaScript functions or CSS properties, use this website. You should never ever ever ever use W3Schools.org -- they are bad and wrong and always use MDN instead
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
create temp function ndcg(rels array<int64>, k int64) returns float64 as ( | |
( | |
with gain as ( | |
select | |
(pow(2, rel) - 1) / log(i + 2) as g, | |
(pow(2, rel_sorted) - 1) / log(i + 2) as g_ideal | |
from | |
unnest(rels) as rel with offset as i | |
left join unnest(( | |
select |
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 | |
EPSILON = 1e-10 | |
def _error(actual: np.ndarray, predicted: np.ndarray): | |
""" Simple error """ | |
return actual - predicted | |
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
#!/usr/bin/env python -u | |
# -*- coding: utf-8 -*- | |
# --------------------------------------------------------------------------- | |
# modis1l-prepare4mrtswath.py | |
# Author: Maxim Dubinin (sim@gis-lab.info) | |
# About: Run MRT Swath for MOD02/MOD03 files | |
# Created: 26.06.2014 | |
# Usage example: python modis1l-prepare4mrtswath.py | |
# --------------------------------------------------------------------------- | |
import glob |