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
$ python xor.py | |
Training: | |
Epoch 0 MSE: 1.765 | |
Epoch 100 MSE: 0.015 | |
Epoch 200 MSE: 0.005 | |
* Target MSE reached * | |
Evaluating: | |
1 XOR 0 = 1 ( 0.904) Error: 0.096 | |
0 XOR 1 = 1 ( 0.908) Error: 0.092 | |
1 XOR 1 = 0 (-0.008) Error: 0.008 |
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
counter=0 | |
initials=0 | |
name1=raw_input("Please enter your first name!") | |
name2=raw_input("Please enter your middle name!") | |
name3=raw_input("Please enter your last name!") | |
while True: | |
option= str(raw_input("a)Print the length of my name\nb)Print\nc)Exit\nChoose one of the options.")).lower() | |
if (option=="a"): | |
print "Your first name has " + str(len(name1)) + " letters." |
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/ruby | |
require 'rss' | |
# Usage | |
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/ | |
# episodes.rss | |
# OR | |
# $ ./railscasts.rb | |
p 'Downloading rss index' |