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
| """Caesar_wheel.py | |
| Author : Vishnu Ashok | |
| Contact : thisisvishnuashok@hotmail.com | |
| thisisvishnuashok@gmail.com | |
| This is a cipher that was used by Julius Caesar two thousand years ago. The good news is that it is simple and easy to learn. The bad news is that because it is so simple, it is also easy for a cryptanalyst to break it. But we can use it just as a simple learning exercise. The Caesar Cipher is also explained on Wikipedia here : | |
| http://en.wikipedia.org/wiki/Caesar_cipher | |
| """ |
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
| """python-mailer.py | |
| Author : Vishnu Ashok | |
| Contact : thisisvishnuashok@gmail.com | |
| thisisvishnuashok@hotmail.com | |
| GitHub : http://github.com/p53ud0k0d3 | |
| This is a simple email client program, which can be used to send emails from Gmail and Hotmail. | |
| You must enable "Allow less secure apps" in Gmail settings. | |
| """ |
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
| #Python 2 | |
| python -m SimpleHTTPServer 8080 | |
| #Python 3 | |
| python3 -m http.server 8113 |
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
| from google.appengine.api import urlfetch | |
| result = urlfetch.fetch("http://software.sopili.net/") | |
| result.content |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| pairs = [] | |
| for _ in xrange(int(raw_input())): | |
| pairs.append(int(raw_input())) | |
| for item in pairs: | |
| print item+1 |
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
| people = [] | |
| for _ in range(int(raw_input())): | |
| people.append(int(raw_input())) | |
| for n in people: | |
| print ((n*(n-1))/2) |
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
| words = [] | |
| def evenPal(word): | |
| steps = 0 | |
| l = len(word) | |
| w1 = word[:l/2] | |
| w2 = word[l/2:] | |
| w2 = w2[::-1] | |
| for i in xrange(0, len(w1)): | |
| steps += abs(ord(w1[i]) - ord(w2[i])) |
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
| read x | |
| read y | |
| read z | |
| if [ $x -eq $y -a $x -eq $z ] | |
| then | |
| echo "EQUILATERAL" | |
| elif [ $x -ne $y -a $x -ne $z -a $y -ne $z ] | |
| then | |
| echo "SCALENE" | |
| else |
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
| read input | |
| printf "%.3f\n" `echo "$input" | bc -l` |
OlderNewer