Exemple #1
0
def goodbye():
    z = Session()
    return pickle.dumps(10)

z = range(10)
def hello(x):
    y = 100
    q = goodbye()
    t = MyClass()
    x = "%s %d" % (t.hello(10), sum(z) * y)
    return t.hello(x)


from save_session import save_function

iris = load_iris()

clf = SVC()
clf.fit(iris.data, iris.target)

def pred(data):
    return clf.predict(load_iris().data)

#####                             #####
#####  This is the actual process #####
#####                             #####

save_function(pred, globals())
save_function(goodbye, globals())
Exemple #2
0
z = range(10)


def hello(x):
    y = 100
    q = goodbye()
    t = MyClass()
    x = "%s %d" % (t.hello(10), sum(z) * y)
    return t.hello(x)


from save_session import save_function

iris = load_iris()

clf = SVC()
clf.fit(iris.data, iris.target)


def pred(data):
    print again(100)
    return clf.predict(load_iris().data)


#####                             #####
#####  This is the actual process #####
#####                             #####

import json
print json.dumps(save_function(pred, globals()))
def goodbye():
    z = Session()
    return pickle.dumps(10)

z = range(10)
def hello(x):
    y = 100
    q = goodbye()
    t = MyClass()
    x = "%s %d" % (t.hello(10), sum(z) * y)
    return t.hello(x)


from save_session import save_function

iris = load_iris()

clf = SVC()
clf.fit(iris.data, iris.target)

def pred(data):
    print again(100)
    return clf.predict(load_iris().data)

#####                             #####
#####  This is the actual process #####
#####                             #####

import json
print json.dumps(save_function(pred, globals()))