This file contains hidden or 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
add_header Content-Security-Policy "default-src 'self'; | |
report-uri https://euclidea.report-uri.com/r/d/csp/enforce; | |
img-src 'self' data: www.facebook.com www.google.com www.google.it track.hubspot.com cdnjs.cloudflare.com stats.g.doubleclick.net www.googletagmanager.com www.google-analytics.com *.amcharts.com bat.bing.com facebook.com cdn.datatables.net; | |
style-src 'self' https://* 'unsafe-inline'; | |
script-src 'self' code.jquery.com cdn.jsdelivr.net ajax.googleapis.com px.ads.linkedin.com googletagmanager.com v2.zopim.com *.zendesk.com js.hs-analytics.net js.hscollectedforms.net data: www.google-analytics.com www.googletagmanager.com snap.licdn.com cdnjs.cloudflare.com js.hs-scripts.com | |
sjs.bizographics.com connect.facebook.net *.hotjar.com bat.bing.com https://www.amcharts.com cdn.datatables.net 'unsafe-eval' 'unsafe-inline'; | |
connect-src 'self' wss://* js.hscollectedforms.net *.zendesk.com sentry.io forms.hubspot.com insights.hotjar.com www.google-analytics.com stats.g.doubleclick.net; | |
font-src 'self |
This file contains hidden or 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 Simulators.portfolio_optimal_composition import * | |
from Simulators.portfolio_optimal_composition_data import * | |
data_from_web = { | |
'mifid_max_score': 7, | |
'mifid_optimal_score': 5, | |
'portfolios_structure': [['CORE 1', 0.0, None], ['CORE 2', 1.0, None], ['CORE 3', 0.0, None], ['CORE 4', 1.0, None], ['CORE 5', 0.0, None], ['CORE 6', 0.0, None], ['CORE 7', 0.0, None], ['Global_Equity_H', 0.0, None], ['Power_Credit', 1.0, None], ['Alternative AbsRet', 1.0, 0.1], [None, None, None], [None, None, None], [None, None, None]] | |
} |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 groovy.transform.Field | |
def main(){ | |
def cli = new CliBuilder() | |
cli.usage = 'groovy Test.groovy -e <environment-name>' | |
cli.header = '\nAvailable options (use -h for help):\n' | |
cli.with { | |
h(longOpt: 'help', 'Usage Information', required: false) |
This file contains hidden or 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 org.junit.Test; | |
import com.mongodb.BasicDBObject; | |
import com.mongodb.DB; | |
import com.mongodb.DBCollection; | |
import com.mongodb.MongoClient; | |
public class StackTest { | |
@Test | |
public void testMongoDBTestDataGenerate() { | |
MongoClient mongoClient = new MongoClient("localhost", 27017); |
This file contains hidden or 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
systemLog: | |
destination: file | |
logAppend: true | |
path: /var/log/mongodb/mongod.log | |
# Where and how to store data. | |
storage: | |
dbPath: /var/lib/mongodb | |
journal: | |
enabled: true |
This file contains hidden or 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 java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.TimeUnit; | |
import com.google.common.cache.CacheBuilder; | |
import com.google.common.cache.CacheLoader; | |
import com.google.common.cache.LoadingCache; | |
public class MySmallCache { | |
private static final long MAX_SIZE = 500; |
This file contains hidden or 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
InputStream is = MyUtilities.readFile("nomefile.xls"); // Leggo un file XLS | |
SpreadsheetCompiler converter = new SpreadsheetCompiler(); // | |
String drl = converter.compile(is, InputType.XLS); // converto l'xsl in DRL | |
//Istanzio il motore di Drools | |
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); | |
kbuilder.add(ResourceFactory.newByteArrayResource(drl.getBytes(), ResourceType.DRL); //Aggiungo il DRL | |
KnowledgeBuilderErrors errors = kbuilder.getErrors(); //Controllo ovviamente gli errori |
This file contains hidden or 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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<polymer-element name="my-element"> |
This file contains hidden or 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
#!/bin/bash | |
# | |
# Derived from - | |
# Joshua Davis | |
# http://shrubbery.mynetgear.net/c/display/W/Java+Daemon+Startup+Script | |
# | |
# This is a modification of the original script (which lets you run a java program as a deamon. | |
# look bellow for more information) that lets you run a groovy script as a deamon. | |
# | |
# ============== OLD SCRIPT TEXT ============== |
NewerOlder