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
prev_df = None | |
columns_to_check = ["o", "h", "l", "c", "v"] | |
while True: | |
result = client.query( | |
f"SELECT l_sym, rght, strk, exp, first_value(o) as o, max(h) AS h, min(l) AS l, last_value(c) as c, last_value(av) as av, count(*) as trades FROM {ch_table_name} WHERE sym='AAPL' GROUP BY l_sym, strk, exp, rght ORDER BY av DESC;" | |
) | |
df = pd.DataFrame(result.result_rows, columns=result.column_names) |
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 pandas as pd | |
from datetime import datetime | |
# Sample market options data | |
options_data = pd.DataFrame({ | |
"symbol": ["XYZ", "XYZ", "XYZ"], | |
"expiration": ["2023-01-27", "2023-02-17", "2023-01-20"], | |
"strike": [35.00, 40.00, 45.00], | |
"bid": [1.05, 2.15, 0.95], | |
"ask": [1.15, 2.25, 1.05], |
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
{ | |
"value": [ | |
{ | |
"data": [ | |
{ | |
"timeStamp": "2017-04-25T21:20:00Z", | |
"average": 92.78 | |
}, | |
{ | |
"timeStamp": "2017-04-25T21:21:00Z", |
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
{ | |
"value": [ | |
{ | |
"data": [ | |
{ | |
"timeStamp": "2017-04-25T20:30:00Z", | |
"average": 89.28 | |
}, | |
{ | |
"timeStamp": "2017-04-25T20:31:00Z", |
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
<# | |
.SYNOPSIS | |
Deploys a template to Azure | |
.DESCRIPTION | |
Deploys an Azure Resource Manager template | |
.PARAMETER subscriptionId | |
The subscription id where the template will be deployed. |
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
<# | |
.SYNOPSIS | |
Enables disk encrption on a VM | |
.DESCRIPTION | |
Enables disk encryption on a VM. The script will create a new Key Vault, Azure Active Directory Application and Service principal | |
.PARAMETER ResourceGroupName | |
The name of the resource group that contains the key vault and virtual machine |
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
<# | |
.SYNOPSIS | |
Migrates a Azure Virtual Machine to another subscription or data centre | |
.DESCRIPTION | |
Shutsdown the source VM | |
Exports the VM config to a temporary file | |
Loops through all Azure disks attached to the source VM | |
Schedules an async copy of the underlying VHD to the destination storage account | |
- optionally overwrites existing VHD in destination if it exists |
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
#Modified and simplified version of https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/ | |
$subscription = "[Your Subscription Name]" | |
$service = "[Your Azure Service Name]" | |
$slot = "staging" #staging or production | |
$package = "[ProjectName]\bin\[BuildConfigName]\app.publish\[ProjectName].cspkg" | |
$configuration = "[ProjectName]\bin\[BuildConfigName]\app.publish\ServiceConfiguration.Cloud.cscfg" | |
$timeStampFormat = "g" | |
$deploymentLabel = "ContinuousDeploy to $service v%build.number%" | |
Write-Output "Running Azure Imports" |
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
<select name="departmentDD" title="department" id="departmentDD" onchange="populateDeapartment(this.value)"> |
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 |