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
<script type="text/javascript"> | |
function idleTimer() { | |
var t; | |
//window.onload = resetTimer; | |
window.onmousemove = resetTimer; // catches mouse movements | |
window.onmousedown = resetTimer; // catches mouse movements | |
window.onclick = resetTimer; // catches mouse clicks | |
window.onscroll = resetTimer; // catches scrolling | |
window.onkeypress = resetTimer; //catches keyboard actions |
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
#!/usr/bin/env bash | |
inventory_file=${1:-'/provisioning/kolla/multinode.ini'} | |
hosts=${2:-'control1,compute1,compute2'} | |
ansible -i ${inventory_file} -a 'docker stop mariadb' ${hosts} | |
ansible -i ${inventory_file} -a 'cat /var/lib/docker/volumes/mariadb/_data/grastate.dat' ${hosts} |
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 talib | |
import statsmodels.api as sm | |
import pandas as pd | |
def initialize(context): | |
context.security = symbol('AAPL') | |
#set_universe(universe.DollarVolumeUniverse(floor_percentile=98.0,ceiling_percentile=100.0)) | |
def bar_data(OHLC_type, bars_nr): | |
bar_data_func = (history((bars_nr + 1), '1d', OHLC_type).iloc[0]).astype('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
#!/bin/bash | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
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 import stats | |
from statsmodels.distributions.empirical_distribution import ECDF | |
from scipy.stats import kendalltau, pearsonr, spearmanr | |
from scipy.optimize import minimize | |
from scipy.integrate import quad | |
import sys | |
from collections import deque | |
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
@Component({ | |
template: ` | |
<h1 [style.--color]="color">CSS vars works!</h1> | |
`, | |
styles: [ | |
` | |
h1 { | |
color: var(--color); | |
} | |
` |
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
companies_dict = { | |
'Amazon':'AMZN', | |
'Apple':'AAPL', | |
'Walgreen':'WBA', | |
'Northrop Grumman':'NOC', | |
'Boeing':'BA', | |
'Lockheed Martin':'LMT', | |
'McDonalds':'MCD', | |
'Intel':'INTC', | |
'Navistar':'NAV', |
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
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record | |
zone=example.com | |
# dnsrecord is the A record which will be updated |
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/sh | |
SERIAL1=( -chardev stdio,id=uart1 -serial chardev:uart1 -monitor none ) | |
SERIAL2=( -serial vc -serial vc ) | |
SERIAL3=( -nographic -serial mon:stdio ) | |
EMU_RASPI=( -M raspi3 ) | |
EMU_VIRT=( -M virt -cpu cortex-a72 ) | |
NET_TAP=( |
OlderNewer