{{ message }}

Instantly share code, notes, and snippets.

🏠
Working from home

# Esther Camilo esthercamilo

🏠
Working from home
Created Sep 11, 2018
View r5
 import re p = re.compile('\(.+\)') m = re.findall(p,"aldk(13432*76)adsjf") print(m)
Created Sep 11, 2018
View r4
 import re p = re.compile('\d') m = re.findall(p,"am2mor57") print(m)
Created Sep 11, 2018
View r3
 import re p = re.compile('m') m = re.findall(p,"ammor") #amor com 2 emes print(m)
Created Sep 11, 2018
View r1
 import re p = re.compile('a') m = p.match("amor") print(m.group())
Created Sep 11, 2018
View re2
 import re p = re.compile('\d') m = p.match("amor123love") print(m.group())
Created Jul 20, 2018
View webserver.py
 import socket HOST, PORT = '', 8888 listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) listen_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) listen_socket.bind((HOST, PORT)) listen_socket.listen(1) print 'Serving HTTP on port %s ...' % PORT while True:
Created Jun 26, 2018
Para colega
View exerc2.py
 while True: input1 = input("Você é uma pessoa organizada? (s/n)") if input1 == 's': print("Eu acho que você está mentindo") elif input1 == 'n': print("Você precisa aproveitar melhor seu tempo") else: print("Digite s ou n") print("Vamos brincar com listas?") frase=str(input("Digite uma frase qualquer"))
Created Jun 25, 2018
exercicio 1
View exerc.py
 import time def ligarChurrasqueira(Tfinal): T = 0 print("Iniciando o aquecimento") for i in range(0,Tfinal+1,10): print('{0} graus'.format(i)) time.sleep(1) if i > Tfinal: print("Churrasqueira aquecida à {0}".format(Tfinal))
Created Jun 13, 2018
Códiguinho exemplo
View gist:d026a688aea9b5cb697d1a0fc7f372cd
 for p in ['Terra','Marte', 'Jupiter']: print("Hello {0}".format(planeta))