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
| #include <cstdlib> | |
| #include <random> | |
| #include <iostream> | |
| namespace barrierpricer { | |
| static std::random_device rd; | |
| static std::mt19937_64 rand_generator(rd()); | |
| static std::normal_distribution<> dis; | |
| double box_muller_rand() { |
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 random import random | |
| from math import sqrt, log, exp | |
| def box_muller_rand(): | |
| while True: | |
| x = random() * 2.0 - 1 | |
| y = random() * 2.0 - 1 | |
| d = x * x + y * y | |
| if d < 1: | |
| return x * sqrt(-2 * log(d) / d) |
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 typing import Tuple, List | |
| import bisect | |
| def compute_changes(x: List[float]) -> List[float]: | |
| return [x[i+1] - x[i] for i in range(len(x) - 1)] | |
| def create_tridiagonalmatrix(n: int, h: List[float]) -> Tuple[List[float], List[float], List[float]]: | |
| A = [h[i] / (h[i] + h[i + 1]) for i in range(n - 2)] + [0] | |
| B = [2] * n | |
| C = [0] + [h[i + 1] / (h[i] + h[i + 1]) for i in range(n - 2)] |
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
| trigger: | |
| - master | |
| pool: | |
| vmImage: 'ubuntu-latest' | |
| steps: | |
| - task: NodeTool@0 | |
| inputs: | |
| versionSpec: '10.x' |
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
| module.exports = { | |
| env: { | |
| browser: true, | |
| es6: true, | |
| "jest/globals": true | |
| }, | |
| extends: [ | |
| 'plugin:react/recommended', | |
| 'standard' | |
| ], |
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
| <!-- ref: https://d3js.org/d3.v5.min.js //--> | |
| <!-- Input Expected: SpatialObj //--> | |
| <div id="ChartHtml"> | |
| <div id="chart1" style="background-color: white;"> | |
| <svg id="chartSVG" style="width:1400px; height:700px;background-color: white;"></svg> | |
| </div> | |
| <script> | |
| const getSpatial = r => r['SpatialObj'] | |
| const baseProjection = d3.geoAzimuthalEquidistant() |
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
| <!-- ref: https://d3js.org/d3.v5.min.js --> | |
| <!-- Input Expected: Group, Set, Value --> | |
| <div id="ChartHtml"> | |
| <div id="chart1" style="background-color: white;"> | |
| <svg id="chartSVG" style="width:800px; height:600px;background-color: white;"></svg> | |
| </div> | |
| <script> | |
| const svg = d3.select("#chartSVG") | |
| const width = +svg.style("width").replace(/px/,"") | |
| const height = +svg.style("height").replace(/px/,"") |
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
| <!-- ref: https://d3js.org/d3.v5.min.js //--> | |
| <!-- Input Expected: Name, Value, Set //--> | |
| <style> | |
| </style> | |
| <div id="ChartHtml"> | |
| <div id="chart1" style="background-color: white;"> | |
| <svg id="chartSVG" style="width:800px; height:600px;background-color: white;"></svg> | |
| </div> | |
| <script> |
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
| <!-- ref: https://d3js.org/d3.v5.min.js //--> | |
| <!-- Input Expected: Name, Value //--> | |
| <div id="ChartHtml"> | |
| <div id="chart1" style="background-color: white;"> | |
| <svg id="chartSVG" style="width:800px; height:600px;background-color: white;"></svg> | |
| </div> | |
| <script> | |
| const svg = d3.select("#chartSVG") | |
| const width = +svg.style("width").replace("px","") | |
| const height = +svg.style("height").replace("px","") |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>GroupedRecordID</title> | |
| <script type="text/javascript"> | |
| document.write(`<link rel="import" href="${window.Alteryx.LibDir}2/lib/includes.html">`) | |
| </script> | |
| </head> | |
| <body> |