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
# Submit dataset | |
Import-NexosisDataSetFromCsv ` | |
-dataSetName 'widget-sales' ` | |
-csvFilePath 'sales-file.csv' | |
# Create a forecast session | |
$session = Start-NexosisForecastSession ` | |
-dataSetName 'widget-sales' ` | |
-targetColumn 'daily_transaction' ` | |
-startDate 2017-12-12 ` |
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
# Depends on Python3 | |
# Add your Nexosis api key before executing | |
apiKey="YOUR API KEY HERE" | |
baseUrl="https://ml.nexosis.com/v1" | |
curl -s -H "api-key: $apiKey" -X POST "$baseUrl/imports/url" \ | |
-H "Content-Type: application/json" \ | |
-d '{"dataSetName":"cardio","url":"https://raw.githubusercontent.com/Nexosis/sampledata/master/cardio.json"}' | |
sleep 10s |
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
Function Invoke-GetCsGoMetricsBySteamId { | |
Param( | |
$steamId | |
) | |
try { | |
"Processing Steam ID $steamId" | Write-Verbose | |
if ($env:steamApiKey -eq $null) { | |
'You must set the $env:steamApiKey variable before running this command:' | Write-Host |
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
# Submitting dataset | |
data = CSV.open('sales-file.csv','rb', headers: true) | |
NexosisApi.client.create_dataset_csv 'widget-sales', data | |
# Creating a forecast session | |
session = NexosisApi.client.create_forecast_session( | |
'widget-sales', | |
'2017-12-12', | |
'2017-12-22', | |
'daily_transaction' |
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
// Submit dataset | |
val client = new NexosisClient() | |
client.getDataSets.create("widget-sales", new FileInputStream("./sales-file.csv")) | |
// Creating a forecast session | |
val session = client.getSessions.createForecast( | |
"widget-sales", | |
"daily_transaction", | |
DateTime.parse("2017-12-12T0:00:00Z"), | |
DateTime.parse("2017-12-22T0:00: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
# Submit dataset | |
client = nexosisapi.Client() | |
with open('sales-file.csv') as f: | |
result = client.datasets.create_csv('widget-sales', f) | |
# Create a forecast for the next 30 days on the 'sales' column | |
session = client.sessions.create_forecast( | |
'widget-sales', | |
'daily_transaction', | |
date_parser.parse('2017-12-12 00:00:00 -0:00'), |
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
// Submit dataset | |
const NexosisClient = require('nexosis-api-client').default; | |
const client = new NexosisClient({key: process.env.NEXOSIS_API_KEY}); | |
client.DataSets.create('widget-sales', readDataFrom(csvFile)); | |
// Create a forecast session | |
let session = {}; | |
client.Sessions.createForecast( | |
'widget-sales', | |
moment().startOf('day'), |
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
// Submit dataset | |
NexosisClient client = new NexosisClient(); | |
InputStream inputStream = new FileInputStream(new File("./sales-file.csv")); | |
client.getDataSets().create("widget-sales", inputStream); | |
// Creating a forecast session | |
SessionResponse response = nexosisClient.getSessions().createForecast( | |
"widget-sales", | |
"daily_transaction", | |
DateTime.parse("2017-12-12T0:00: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
// Create client | |
var client = new NexosisClient(); | |
// Submit dataset | |
client.DataSets.Create("widget-sales", DataSet.From(File.OpenText("C:\\path\\to\\sales-file.csv"))); | |
// Creating a forecast session | |
var sessionResponse = client.Sessions.CreateForecast( | |
Sessions.Forecast( | |
"widget-sales", | |
DateTimeOffset.Parse("2017-12-12 10:11:12 -0:00"), |