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
#include <iostream> | |
#include <cmath> | |
#include <random> | |
double call_option_price(double S, double K, double r, double sigma, double T) { | |
double S_T = S * exp((r - 0.5 * sigma * sigma) * T + sigma * sqrt(T) * randn()); | |
return std::max(S_T - K, 0.0); | |
} | |
int main() { |
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
#include <iostream> | |
#include <functional> | |
int catch_lambda(std::function<int(int, int)> func, int x, int y) { | |
return func(x, y); | |
} | |
int main() | |
{ | |
int x = 5, y = 7; | |
auto adder = [](int a, int b) { return a + b; }; |
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
- Install Poetry using curl -sSL https://install.python-poetry.org | python | |
- Navigate to a directory where you would like to create a virtual env along with the project | |
If you would like to name project 'ft' | |
- poetry new ft | |
To create a new pyproject.toml | |
- poetry init |
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
// Start the MongoDB Container | |
docker run --name mongo -d mongo | |
docker exec -i mongo sh -c 'mongoimport -d oreilly -c students --drop --type json' < students.json | |
// Check that Mongodb adds a projection on non-used fields | |
db.students.explain("executionStats").aggregate( [ | |
{ $group: { _id: "$grade", frequency: { $sum: 1 } } }, | |
{ $match: { "frequency": { $gt : 10 } } } |
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
Go to tools in canopy and open command prompt. | |
Type jupyter notebook --ip='*' --NotebookApp.token='' --NotebookApp.password='' |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:6a0c1d9364993a07dcf9a591397af10a52e33da7391186ce55c9f7b6c2d90e56" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
// 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 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
[symple_toggle title="This Is Your Toggle Title"]Etiam rhoncus accumsan elit | |
sed porta. Suspendisse potenti. Nullam laoreet, velit ut condimentum feugiat, | |
felis nibh ornare massa, quis consectetur est lacus id lorem. Etiam rhoncus | |
accumsan elit sed porta. Suspendisse potenti. Etiam rhoncus accumsan elit sed | |
porta. Suspendisse potenti.[/symple_toggle] | |
[symple_toggle title="This Is Your Toggle Title"]Etiam rhoncus accumsan elit | |
sed porta. Suspendisse potenti. Nullam laoreet, velit ut condimentum feugiat, | |
felis nibh ornare massa, quis consectetur est lacus id lorem. Etiam rhoncus | |
accumsan elit sed porta. Suspendisse potenti. Etiam rhoncus accumsan elit sed |
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
[symple_tabgroup] | |
[symple_tab title="2013"] | |
2013 was the great years as wordpress community got a great theme | |
called Twenty Thirteen and currently this blog uses Twenty Thirteen | |
as the parent theme and it is running great. | |
[/symple_tab] | |
[symple_tab title="2012"] | |
2012 was also a great year as wordpress community got a new theme | |
called Twenty Twelve and many popular websites use Twenty Thirteen | |
as their parent theme. |
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
[symple_accordion] | |
[symple_accordion_section title="Free Wordpress Themes"] | |
There are various free Wordpress themes such as Twenty Eleven, | |
Twenty Thirteen and Twenty Fourteen. Oh!! Did I forgot Twenty Twelve. | |
[/symple_accordion_section] | |
[symple_accordion_section title="Premium Wordpress themes"] | |
There are various premium and popular wordpress theme frameworks | |
such as Genesis and Thesis. | |
[/symple_accordion_section] | |
[/symple_accordion] |
NewerOlder