- Create a file in
C:\bin\toast.ps1
from source https://gist.github.com/dend/5ae8a70678e3a35d02ecd39c12f99110:curl https://gist.githubusercontent.com/dend/5ae8a70678e3a35d02ecd39c12f99110/raw -o /mnt/c/bin/toast.ps1
- Create
~/.local/bin/notify-send
from the following source:like this:powershell.exe "& { . C:\\bin\\toast.ps1; Show-Notification -ToastTitle \"$1\" -ToastText \"$2\" }"
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
# See https://support.google.com/analytics/answer/9267735?hl=en | |
^(add_payment_info|add_shipping_info|add_to_cart|add_to_wishlist|begin_checkout|generate_lead|purchase|refund|remove_from_cart|select_item|select_promotion|view_cart|view_item|view_item_list|view_promotion)$ |
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
# Make the video shorter to perform an experiment quicker | |
docker run --rm -it -v $(pwd):/config linuxserver/ffmpeg:latest -ss 840 -i /config/source.mp4 -c copy -t 120 /config/source-short.mp4 | |
# See https://superuser.com/a/1643035/913241 | |
docker run --rm -it -v $(pwd):/config linuxserver/ffmpeg:latest -i /config/source-short.mp4 -filter:a "speechnorm=e=25:r=0.0001:l=1,highpass=200,lowpass=3000,afftdn" /config/source-short-louder-wo-noise.mp4 |
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
from math import sqrt | |
from typing import Tuple | |
import numpy as np | |
import time | |
import numba | |
from scipy.stats import ttest_ind | |
@numba.njit(parallel=True, fastmath=True, nogil=True) | |
def compare_mean(z: np.ndarray, y: np.ndarray, n_samples: int = 10_000) -> Tuple[np.ndarray, float, float]: |
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
from typing import Tuple | |
import numpy as np | |
import time | |
import numba | |
from scipy.stats import mannwhitneyu | |
@numba.njit(parallel=True, fastmath=True, nogil=True) | |
def compare_dist(z: np.ndarray, y: np.ndarray, n_samples: int = 10_000) -> Tuple[np.ndarray, float, float]: |
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 scikits.bootstrap as bootstrap | |
import numpy as np | |
import time | |
import numba | |
@numba.njit(parallel=True, fastmath=True) | |
def _calculate_jackknife_mean_stat(data: np.ndarray) -> np.ndarray: | |
n = data.shape[0] | |
jstat = np.zeros(n) | |
sum = data.sum() |
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 scikits.bootstrap as bootstrap | |
import numpy as np | |
import time | |
import numba | |
@numba.njit(parallel=True, fastmath=True) | |
def _calculate_boostrap_mean_stat(data: np.ndarray, n_samples: int) -> np.ndarray: | |
n = data.shape[0] | |
stat = np.zeros(n_samples) | |
for i in numba.prange(n_samples): |
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 | |
# file: ttfb.sh | |
# curl command to check the time to first byte | |
# ** usage ** | |
# 1. ./ttfb.sh "https://google.com" | |
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
curl -o /dev/null \ | |
-H 'Cache-Control: no-cache' \ | |
-s \ |
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
void main() { | |
print(foo('bar')); | |
// will rise an error | |
foo(1); | |
} | |
foo ($s) { | |
return 'foo' + $s; | |
} |
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
<?php | |
use Symfony\Component\Debug\BufferingLogger; | |
use Symfony\Component\Debug\Debug; | |
use Symfony\Component\Debug\ErrorHandler; | |
$loader = require_once __DIR__ . '/vendor/autoload.php'; | |
class ConfigurableErrorHandler extends ErrorHandler | |
{ |
NewerOlder