title: "Event title" slug: event-title date: "2020-03-02T19:30:00+01:00" summary: "the standard says this should be less than 75 characters!" end: "2020-03-02T22:00:00+01:00" location: "Event location if known" organizer: name: "Your name" email: "your@email.com"
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
""" | |
Playing with python's single dispatch. | |
See: https://hynek.me/articles/serialization/ | |
See also PEP 443: https://www.python.org/dev/peps/pep-0443/ | |
""" | |
from datetime import datetime | |
from functools import singledispatch |
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
require 'json' | |
# JSON parser tag, creating map for use in jekyll markdown | |
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com) | |
# Released under APL 2.0 | |
# usage: {% jsonball varname from TYPE PARAM %} | |
# | |
# where TYPE is one of {data,var,file,page}, described below |
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 | |
import plotly.offline as pyo | |
import plotly.graph_objs as go | |
# Generate a random signal | |
np.random.seed(42) | |
random_signal = np.random.normal(size=100) | |
# Offset the line length by the marker size to avoid overlapping | |
marker_offset = 0.04 |
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
# From http://stackoverflow.com/a/11158224 | |
# Solution A - If the script importing the module is in a package | |
from .. import mymodule | |
# Solution B - If the script importing the module is not in a package | |
import os,sys,inspect | |
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) | |
parent_dir = os.path.dirname(current_dir) | |
sys.path.insert(0, parent_dir) |
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
What is redash? | |
Redash is database viewer included BI tool inside. Redash has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts. | |
Prerequisite : | |
1. Install docker | |
2. Install git | |
git clone https://github.com/getredash/redash.git | |
docker-compose -f docker-compose.production.yml run --rm server create_db | |
docker-compose -f docker-compose.production.yml up |
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
window_size = 2 | |
idx_pairs = [] | |
# for each sentence | |
for sentence in tokenized_corpus: | |
indices = [word2idx[word] for word in sentence] | |
# for each word, threated as center word | |
for center_word_pos in range(len(indices)): | |
# for each window position | |
for w in range(-window_size, window_size + 1): | |
context_word_pos = center_word_pos + w |
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
/** | |
* Fetching data from BigQuery and present it in our sheet | |
* Author: Ido Green | |
* Date: 14/12/2013 | |
* | |
* See: https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/ | |
* Misc: https://developers.google.com/bigquery/ | |
*/ | |
// |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.