Quick'n'dirty Jekyll plugin for sorted cycle.
This fork fixes two issues:
- problems when specifiying sort fields like
sort_by:'weight'
(with ' or " characters) - problems when a collection entry does not have the specified sort field
def str_multisplit(s, sep): | |
""" | |
Split string `s` by all characters/strings in `sep`. | |
:param s: a string to split | |
:param sep: sequence or set of characters to use for splitting | |
:return: list of split string parts | |
""" | |
if not isinstance(s, (str, bytes)): | |
raise ValueError('`s` must be of type `str` or `bytes`') |
""" | |
Runtime optimization through vectorization and parallelization. | |
Script 3: Parallel and vectorized calculation of haversine distance. | |
Please note that this might be slower than the single-core vectorized version because of the overhead that is caused | |
by multiprocessing. | |
January 2018 | |
Markus Konrad <markus.konrad@wzb.eu> | |
""" |
### generate questionnaire data | |
library(triangle) | |
set.seed(0) | |
q1_d1 <- round(rtriangle(1000, 1, 7, 5)) | |
q1_d2 <- round(rtriangle(1000, 1, 7, 6)) | |
q1_d3 <- round(rtriangle(1000, 1, 7, 2)) |