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
// This gist is a reminder to myself about the differences between throttling and debouncing, inspired by | |
// https://redd.one/blog/debounce-vs-throttle | |
// | |
// A runnable example is available here: https://play.golang.org/p/sADDu829fRa | |
package main | |
import ( | |
"fmt" | |
"time" | |
) |
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
# human | |
package org.jsoup.nodes; | |
import org.jsoup.Connection; | |
import org.jsoup.Jsoup; | |
import org.junit.Test; | |
import java.util.List; | |
import static org.junit.Assert.*; |
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
# evosuite | |
/* | |
* This file was automatically generated by EvoSuite | |
* Fri Sep 22 05:18:32 GMT 2023 | |
*/ | |
package org.jsoup.nodes; | |
import org.junit.Test; | |
import static org.junit.Assert.*; |
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
#!/bin/bash | |
# Initialize a variable to store the maximum percentage | |
max_percentage=0.0 | |
# Iterate over all n.png files in the hw2img/move/ directory | |
for file in hw2img/*.png; do | |
# Extract the base filename without extension | |
base_name=$(basename "$file" .png) |
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
import numpy as np | |
from scipy.optimize import minimize | |
from math import log, sqrt | |
import matplotlib.pyplot as plt | |
def sabr_iv(alpha, beta, rho, nu, F, K, T): | |
""" | |
Returns the implied volatility using the SABR model formula. | |
""" | |
X = K | |
if F == K: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder