Skip to content

Instantly share code, notes, and snippets.

View rnikitin's full-sized avatar

Roman Nikitin rnikitin

View GitHub Profile
@ysdede
ysdede / Optimize-NSGAII.py
Last active January 16, 2022 21:35
Multi-objective NSGAII hyperparameters optimization with Optuna
import json
import signal
import sys
from subprocess import PIPE, Popen, call
import jessetk.utils as utils
import optuna
# Multi-objective NSGAII hyperparameters optimization with Optuna
# Wraps Jesse ai's backtest function as an objective function
@ysdede
ysdede / Pick-Parameters.py
Last active January 15, 2022 23:33
Pick best parameters from Optuna database
import optuna
import statistics
import json
# This code snippet filters Optuna trials based on performance metrics and standard deviation
# and generates a results.csv file containing all results
# and a SEQ.py file containing all hyperparameters
study = optuna.create_study(study_name="Band5min-LongOnly", directions=["maximize", "maximize"],
storage="postgresql://optuna_user:optuna_password@localhost/optuna_db_3", load_if_exists=True)
@rnikitin
rnikitin / glyphicons.css
Created August 6, 2012 12:48
Glypth icons css sprite
[class^="glyphicon-"], [class*=" glyphicon-"] {
display: inline-block;
*margin-right: .3em;
line- vertical-align: text-top;
background-image: url("images/glyphicons-2.png");
background-position: 14px 14px;
background-repeat: no-repeat;
width: 14px;
height: 14px;
}
var mongoose = require('mongoose');
mongoose.connect('localhost', 'testing_multiTenant');
/**
* User schema.
*/
var UserSchema = new mongoose.Schema({
name: String
, prefix: { type: String, required: true }