Skip to content

Instantly share code, notes, and snippets.

View andreasderuiter's full-sized avatar

mobileiq andreasderuiter

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace bat_mvc.Controllers.api
{
public class SampleController : ApiController
module App {
"use strict";
interface IMyAppController {
values: string[];
errorMessage: string;
isVisibleErrorMessage: boolean
}
export class MyAppController implements IMyAppController {
module App {
"use strict";
interface IMyAppDirective extends ng.IDirective {
}
interface IMyAppDirectiveScope extends ng.IScope {
}
interface IMyAppDirectiveAttributes extends ng.IAttributes {
module App {
"use strict";
// Create the module and define its dependencies.
angular.module("app", [
// Angular modules
// "ngAnimate", // animations
// "ngRoute" // routing
// Custom modules
@Scripts.Render("~/bundles/angular")
@Scripts.Render("~/bundles/app")
@andreasderuiter
andreasderuiter / bundle.cs
Last active January 6, 2016 12:35
Added bundle statements for bat-mvc
bundles.Add(new ScriptBundle("~/bundles/angular").Include(
"~/Scripts/angular.js"));
bundles.Add(new ScriptBundle("~/bundles/app").IncludeDirectory(
"~/Scripts/App", "*.js", true));
test <- c ( 1, 2, 3)
v1 <- as.character(lapply(test, class))
v2 <- as.character(lapply(test, class))
result <- rbind(v1,v2)
data.set <- data.frame(result, stringsAsFactors = FALSE)
maml.mapOutputPort("data.set");
test <- c ( 1, 2, 3)
v1 <- lapply(test, class)
v2 <- lapply(test, class)
result <- rbind(v1,v2)
data.set <- data.frame(result, stringsAsFactors = FALSE)
maml.mapOutputPort("data.set");
gold <- maml.mapInputPort(1) # Load data from port 1 into data frame
price <- gold$Value # initialize vector with prices (numeric)
dates <- gold$Date # initialize vector with dates (POSIXct)
dates <- as.numeric(dates) # HACK: change dates to a numeric
class(dates) <- "POSIXct" # HACK: set class to POSIXct
library(zoo) # Load zoo library
z <- zoo(price,dates) # Convert incoming data to a zoo object
t <- time(z) # Retrieve a vector of the dates from the zoo object
data.set <- data.frame(t, z, stringsAsFactors = FALSE) # Create the data frame to be returned
maml.mapOutputPort("data.set"); # Return the data frame to Azure ML
gold <- maml.mapInputPort(1) # Load data from port 1 into data frame
price <- gold$Value # initialize vector with prices (numeric)
dates <- gold$Date # initialize vector with dates (POSIXct)
library(zoo) # Load zoo library
z <- zoo(price,dates) # Convert incoming data to a zoo object
t <- time(z) # Retrieve a vector of the dates from the zoo object
data.set <- data.frame(t, z, stringsAsFactors = FALSE) # Create the data frame to be returned
maml.mapOutputPort("data.set"); # Return the data frame to Azure ML