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
if has("syntax") | |
syntax on | |
endif |
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
syntax on |
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
C:\Pythonize>cd dist | |
C:\Pythonize\dist>calc.exe | |
Digite 1 para seno e 2 para cosseno: 1 | |
Entre com um número: 4 | |
-0.756802495308 |
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
from distutils.core import setup | |
import py2exe | |
setup(console=['calc.py']) |
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 math | |
def main(): | |
modelo = raw_input("Digite 1 para seno e 2 para cosseno: ") | |
n = raw_input("Entre com um número: ") | |
choice = int(modelo) | |
num = float(n) | |
if choice == 1: | |
print math.sin(num) |
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
user_tweets = [] | |
tweets = api.GetUserTimeline(user, count=30) | |
for tweet in tweets: | |
user_tweets.append(tweet.text.encode('utf-8') + '\n') | |
print user_tweets |
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
user_tweets = api.GetUserTimeline('user') | |
for tweet in user_tweets: | |
print tweet.text |
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
tweets = api.GetPublicTimeline() | |
for tweet in tweets: | |
print tweet.text |
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 twitter | |
api = twitter.Api() |
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
stdin, stdout, stderr = ssh.exec_command('sudo fdisk -l\n') | |
stdin.write('1234\n') | |
stdin.flush() | |
print stdout.readlines() |