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 urllib | |
import urllib2 | |
import pdb | |
import cookielib | |
from HTMLParser import HTMLParser | |
class MyHTMLParser(HTMLParser): | |
def handle_starttag(self, tag, attrs): | |
self.val = "default" | |
self.name = "default" |
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/python | |
# | |
# Copyright (c) 2012 Dave Pifke. | |
# This is a simple performance test of different methods for counting the | |
# number of occurrences of a series of values. | |
def values(): | |
""" | |
Returns a tuple containing four random values: an integer between 0 and |
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
#snippet 1 | |
def azureml_main(): | |
pass | |
#snippet 2 | |
def azureml_main(dataframe1): | |
pass | |
#snippet 3 | |
def azureml_main(dataframe1, dataframe2): |
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
def azureml_main(dataframe1=None, dataframe2 = None): | |
#do work here |
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
def azureml_main(dataframe1=None, dataframe2=None): | |
#this code simple do a fit_transform from sklearn #CountVectorizer | |
from sklearn.feature_extraction.text import CountVectorizer | |
vectorizer = CountVectorizer(min_df=1) | |
corpus = [“””This is the first document.”””,”””This is the second document.”””,”””And the third one.”””,”””Is this the first document ?”””,] | |
X = vectorizer.fit_transform(corpus) | |
print(X.toarray()) |
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
data:text/plain,Caught exception while executing function: Traceback (most recent call last): | |
File "C:\server\invokepy.py", line 169, in batch | |
outlist = validateOutput(odfs) | |
File "C:\server\invokepy.py", line 64, in validateOutput | |
if (len(returnvalue) == 1 and type(returnvalue[0]) is 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
def azureml_main(dataframe1=None, dataframe2=None): | |
from sklearn.feature_extraction.text import CountVectorizer | |
vectorizer = CountVectorizer(min_df=1) | |
corpus = [“””This is the first document.”””,”””This is the second document.”””,”””And the third one.”””,”””Is this the first document?””,] | |
X = vectorizer.fit_transform(corpus) | |
print(X.toarray()) | |
import pandas as pd | |
ret = pd.DataFrame(X.toarray()) | |
return ret |
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
DllModuleHost Start: 1 : ParameterArgumentBinder::InitializeParameterValues | |
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos count = 43 | |
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos[0] name = source , type = Microsoft.Analytics.Modules.Reader.Dll.Reader+ReaderDataSourceOrSink | |
[ModuleOutput] DllModuleHost Verbose: 1 : Converted string 'Http' to enum of type Microsoft.Analytics.Modules.Reader.Dll.Reader+ReaderDataSourceOrSink | |
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos[1] name = inputURL , type = System.String | |
[ModuleOutput] DllModuleHost Verbose: 1 : Passing through string 'http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data' | |
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos[2] name = dataFormat , type = Microsoft.Analytics.Modules.Reader.Dll.HttpReader+DataFormat | |
[ModuleOutput] DllModuleHost Verbose: 1 : Converted string 'CSV' to enum of type Microsoft.Analytics.Modules.Reader.Dll.HttpReader+DataFormat | |
[Modu |
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
Record Starts at UTC 03/27/2015 09:19:58: | |
Run the job:"/dll "Microsoft.Analytics.Modules.Reader.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca; Microsoft.Analytics.Modules.Reader.Dll.Reader; Load" /Output0 "..\..\Results dataset\Results dataset.dataset" /source "Http" /inputURL "http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data" /dataFormat "CSV" /csvTsvHasHeader "False" " |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1 | |
mQINBFbAgu8BEAChxwj1gzHuM0Gbo0NYaJ/o/ADB6Z0pZLoLWTzvaDp5IvA0hffF | |
Z5sJTjzULbxFtYWp2aUJW/AzscAjBY23gH4XU0I6wxKgV92KymxPIte1w72dKyaJ | |
vpRRAL+vr4k6JM6XzNXg3QWCkhVXjDveOs/I5R30r5D2FxlybS7KFa2BapRx2AMw | |
/Rnd9TVHKtZ71W7DndUFeGfguGn5GUn4sad5ghCPrefulaznX6ttOs+aQRBGlJ7Y | |
JPG6rO+BZAvEliCgRgskBJVHJcS9mvpY0ivntOjYuvOVTjlf4I9Ox7x9haqYaQap | |
NpjpcmUqpSkLxLIeHHT49MGeUdfLzLUIkL1CHC1pDTSxojhikTa/vI4NoPp+ha4I | |
2a+fUYkBbhhT0+XJrj9xW/FJsNBfKg2RCYJOHFVhXZXcil/GcISddEhIctlZkpyo |
OlderNewer