This file contains hidden or 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
| var root = this; | |
| // embed: dataset, util, browser, mobilephone, crawler, appliance, misc, woothee | |
| // GENERATED from dataset.yaml at Thu Aug 13 14:22:28 JST 2015 by tagomoris | |
| // Snapshot from package.json | |
| var package_info = {"name":"woothee","version":"1.2.0","description":"User-Agent string parser (js implementation)","main":"./release/woothee","devDependencies":{"mocha":">= 1.7.0","chai":">= 1.3.0","js-yaml":">= 1.0.3","should":"~1.2.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/woothee/woothee-js"},"author":"tagomoris","license":"Apache v2"}; | |
| var dataset = {}; | |
| (function(){ |
This file contains hidden or 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
| # | |
| # PREDICTING LONG TERM CUSTOMER VALUE WITH BTYD PACKAGE | |
| # Pareto/NBD (negative binomial distribution) modeling of | |
| # repeat-buying behavior in a noncontractual setting | |
| # | |
| # Matthew Baggott, matt@baggott.net | |
| # | |
| # Accompanying slides at: | |
| # http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1# | |
| # |
This file contains hidden or 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 | |
| TABLE_SCHEMA=$1 | |
| TABLE_NAME=$2 | |
| mytime=`date '+%y%m%d%H%M'` | |
| hostname=`hostname | tr 'A-Z' 'a-z'` | |
| file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA" | |
| bucket_name=$file_prefix | |
| splitat="4000000000" | |
| bulkfiles=200 |
This file contains hidden or 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
| /** | |
| reference - | |
| https://developers.google.com/accounts/docs/OAuth2WebServer | |
| https://code.google.com/apis/console/ | |
| https://developers.google.com/+/api/latest/ | |
| **/ | |
| ////handle all requests here | |
| function doGet(e) { |
This file contains hidden or 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
| #-*- coding:utf-8 - *- | |
| def load_dataset(): | |
| "Load the sample dataset." | |
| return [[1, 3, 4], [2, 3, 5], [1, 2, 3, 5], [2, 5]] | |
| def createC1(dataset): | |
| "Create a list of candidate item sets of size one." |
This file contains hidden or 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
| /* | |
| All code apart from getPlusones() | |
| Copyright 2011 Martin Hawksey | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |