Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
# Defaults / Configuration options for homebridge | |
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
# If you uncomment the following line, homebridge will log more | |
# You can display this via systemd's journalctl: journalctl -f -u homebridge | |
# DEBUG=* |
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
{ | |
"bracket-pair-colorizer-2.colors": [ | |
"Gold", | |
"Orchid", | |
"LightSkyBlue", | |
"Salmon", | |
"LawnGreen", | |
"DarkOrange", | |
"Cornsilk" | |
], |
## Name of the riak node | |
-name riak@127.0.0.1 | |
## Cookie for distributed erlang. All nodes in the same cluster | |
## should use the same cookie or they will not be able to communicate. | |
-setcookie riak | |
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive | |
## (Disabled by default..use with caution!) | |
##-heart |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
# -*- coding: utf-8 -*- | |
""" | |
@author: goraj | |
""" | |
import lightgbm as lgbm | |
from sklearn.datasets import load_digits | |
import numpy as np | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import roc_auc_score |
%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 et | |
%% @author Kevin Smith <kevin@opscode.com> | |
%% @copyright 2011 Opscode, Inc. | |
-module(example). | |
-behaviour(gen_server). | |
-export([start_link/0]). |
%% See LICENSE for licensing information. | |
-module(cowboy_debug). | |
-export([onrequest_hook/1]). | |
-export([onresponse_hook/4]). | |
onrequest_hook(Req) -> | |
Method = to_string(extract(cowboy_req:method(Req))), | |
Path = to_string(extract(cowboy_req:path(Req))), | |
Params = params_to_string(extract(cowboy_req:qs_vals(Req))), |
function(iter, k) { | |
var array = []; | |
var count = 0; | |
for (var val = iter(); val !== undefined; val = iter()) { | |
count ++; | |
if (array.length < k) | |
array.push_back(val); | |
else { | |
var luck = rand() % count; | |
if (luck < k) { |