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
onGeomChange = (e) => { | |
/* | |
This function will dynamically split the polygon into two parts by a line and will follow geometry change event. | |
*/ | |
//Create jsts parser to read openlayers geometry | |
let parser = new jsts.io.OL3Parser(); | |
//Creating line geometry from draw intraction | |
let linestring = new ol.Feature({ |
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 hyperopt import hp, fmin, tpe, Trials, STATUS_OK | |
lgb_reg_params = { | |
'learning_rate': hp.uniform('learning_rate',0.1,1), | |
'max_depth': hp.choice('max_depth', np.arange(2, 100, 1, dtype=int)), | |
'min_child_weight': hp.choice('min_child_weight', np.arange(1, 50, 1, dtype=int)), | |
'colsample_bytree': hp.uniform('colsample_bytree',0.4,1), | |
'subsample': hp.uniform('subsample', 0.6, 1), | |
'num_leaves': hp.choice('num_leaves', np.arange(1, 200, 1, dtype=int)), | |
'min_split_gain': hp.uniform('min_split_gain', 0, 1), |
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
RabbitMQ | |
* Written in Erlang | |
* Scaling strategies - is mostly vertical | |
* Supports topics and queues | |
* if you want to have high persistence guarantees, RabbitMQ ensures replication across the cluster and on disk on message send. | |
* Reliable message broker as we get acknowledgement (AMQP based) | |
* Use RabbitMQ if you have messages (20k+/sec) that need to be routed in complex ways to consumers, you want per-message delivery guarantees, you don’t care about ordered delivery, you need HA at the cluster-node level now, and/or you need 24×7 paid support in addition to forums/IRC. | |
* RabbitMQ is good for “slow” and unreliable consumers |