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
def store_credit_problem(credit, items): | |
""" | |
@author: Dairon Medina <http://github.com/codeadict> | |
My python implementation for Store Credit Problem from Google Code Jam: | |
http://code.google.com/codejam/contest/351101/dashboard#s=p0 | |
@param credit: integer representing store credit | |
@param items: list of product prices, must be integers | |
@returns: tuple with the two prices that consumes the whole credit | |
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
def check_ruc_private(self, ruc): | |
""" | |
Aloritmo para verificar RUC de Empresa Privada. | |
""" | |
try: | |
if (int(ruc[0] + ruc[1])) < 23: | |
prueba1 = True | |
else: | |
prueba1 = False |
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
/** | |
* A "deeper" indented text effect with the :before and :after pseudo-elements. | |
*/ | |
html, body { | |
height: 100%; | |
} | |
body { | |
margin: 0; |
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
def clean_cedula(self): | |
""" | |
Valída que sea Correcta la Cédula | |
""" | |
ced = self.cleaned_data['cedula'] | |
msg = "La Cédula introducida no es válida" | |
valores = [ int(ced[x]) * (2 - x % 2) for x in range(9) ] | |
suma = sum(map(lambda x: x > 9 and x - 9 or x, valores)) | |
veri = 10 - (suma - (10 * (suma / 10))) | |
if int(ced[9]) == int(str(veri)[-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
/* Based on email I got from andrea ricci */ | |
a[href^="mailto:"]:before { content: "\2709"; } | |
.phone:before { content: "\2706"; } | |
.important:before { content: "\27BD"; } | |
blockquote:before { content: "\275D"; } | |
blockquote:after { content: "\275E"; } | |
.alert:before { content: "\26A0"; } | |
:before, :after { |
NewerOlder