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 python | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
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 | |
AWSUSAGE=aws_usage.py | |
TEMPFILE=/tmp/aws_all_prev_usage$$.xml | |
USERID=$1 | |
PASSWORD=$2 | |
if [ "" = "$USERID" ] | |
then | |
exit |
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
# We will use an existing image based on the | |
# verson 3.10 of Mono. | |
# This will be automatically retrieved from the Docker Hub. | |
# Docker Hub is Dockers community repository of pre-built containers | |
FROM mono:3.10 | |
# Ensure everything is up to date on the machine and install unzip | |
RUN apt-get -qq update && apt-get -qqy install unzip | |
# Install ASP.NET vNext and latest K Runtime Environment (KRE) | |
RUN curl -s https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh | |
RUN bash -c "source /root/.kre/kvm/kvm.sh \ |
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 microsoft/aspnet | |
# copy the contents of the local directory to /app/ on the image | |
ADD . /app/ | |
# set the working directory for subsequent commands | |
WORKDIR /app | |
# fetch the NuGet dependencies for our application | |
RUN kpm restore | |
# set the working directory for subsequent commands | |
WORKDIR /app/Home/samples/HelloMvc | |
# expose TCP port 5000 from container |
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
{ | |
"dependencies": { | |
"Kestrel": "1.0.0-*", | |
"Microsoft.AspNet.Diagnostics": "1.0.0-*", | |
"Microsoft.AspNet.Hosting": "1.0.0-*", | |
"Microsoft.AspNet.Mvc": "6.0.0-*", | |
"Nowin.vNext": "1.0.0-*" | |
}, | |
"commands": { | |
"web": "Microsoft.AspNet.Hosting --server Nowin.vNext", |
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
# Map 1-based optional input ports to variables | |
dataset <- maml.mapInputPort(1) # class: data.frame | |
library(RCurl) | |
id <- dataset[[1]] | |
text <- dataset[[2]] | |
text <- curlEscape(text) | |
text <- gsub("%20", " ", text, ignore.case = TRUE) |
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
# The script MUST contain a function named azureml_main | |
# which is the entry point for this module. | |
# | |
# The entry point function can contain up to two input arguments: | |
# Param<dataframe1>: a pandas.DataFrame | |
# Param<dataframe2>: a pandas.DataFrame | |
def azureml_main(dataframe1 = None, dataframe2 = None): | |
# Execution logic goes here | |
print('Input pandas.DataFrame #1:\r\n\r\n{0}'.format(dataframe1)) |
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
# The script MUST contain a function named azureml_main | |
# which is the entry point for this module. | |
# | |
# The entry point function can contain up to two input arguments: | |
# Param<dataframe1>: a pandas.DataFrame | |
# Param<dataframe2>: a pandas.DataFrame | |
# coding: UTF-8 | |
def azureml_main(dataframe1 = None, dataframe2 = None): | |
import numpy as np | |
from pandas import Series, DataFrame |
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
# The script MUST contain a function named azureml_main | |
# which is the entry point for this module. | |
# | |
# The entry point function can contain up to two input arguments: | |
# Param<dataframe1>: a pandas.DataFrame | |
# Param<dataframe2>: a pandas.DataFrame | |
# coding: UTF-8 | |
def azureml_main(dataframe1 = None, dataframe2 = None): | |
import numpy as np | |
from pandas import Series, DataFrame |
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
Private Function getRequestBody() As String | |
On Error GoTo ErrorsHandler | |
Dim BodyTemplate As String | |
Dim Params As String | |
Dim Values As String | |
Dim Body As String | |
Dim MyBody As String | |
Dim ParamName As String | |
Dim ParamValue As String |
OlderNewer