Skip to content

Instantly share code, notes, and snippets.

@satojkovic
Created June 13, 2013 14:17
Show Gist options
  • Save satojkovic/5774024 to your computer and use it in GitHub Desktop.
Save satojkovic/5774024 to your computer and use it in GitHub Desktop.
#-*- coding: utf-8 -*-
from math import *
import sys
def sigmoid(x):
return (1 / (1+exp(-x)))
def main():
argvs = sys.argv
argc = len(argvs)
if argc != 2:
print 'Usage: python %s <parameter for sigmoid function>' % argvs[0]
quit()
x = int(argvs[1])
y = sigmoid(x)
print 'sigmoid(%d) = %f' %(x, y)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment