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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Implementación del problema #7 del proyecto Euler (projecteuler.net/problem=7): | |
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that | |
the 6th prime is 13. What is the 10,001st prime number? | |
https://gist.github.com/1623748 | |
""" |
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/python | |
# -*- coding: utf-8 -*- | |
from itertools import izip | |
from unittest import main, TestCase | |
from find_primes import allPrimes, isPrime, findNthPrime | |
class TestPrimes(TestCase): | |
def verifyIsPrime(self, number, outcome): |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Implementación de la kata "Roman Numerals" (http://bit.ly/92cEtq). | |
Esta es una implementación "literal" de las reglas de la numeración romana. | |
Fue escrita con el propósito específico de *NO* usar un diccionario en la | |
conversión. |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Implementación de la kata "Roman Numerals" (http://bit.ly/92cEtq). | |
Esta es una implementación "literal" de las reglas de la numeración romana. | |
Fue escrita con el propósito específico de *NO* usar un diccionario en la | |
conversión. | |
""" |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Implementación de la kata "Roman Numerals" (http://bit.ly/92cEtq). | |
Esta implementación mapea directamente cada dígito arábigo a su | |
representación romana. Mientras que es la versión más pequeña y | |
clara que he hecho, de alguna forma "feels like cheating". | |
""" |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Pruebas unitarias para | |
- roman.py (https://gist.github.com/1623819), | |
- roman_single_func.py (https://gist.github.com/1623830), y | |
- roman_func.py (https://gist.github.com/1885963) | |
- roman_dict.py (https://gist.github.com/1623854) |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<!-- this file: https://gist.github.com/1714293 --> | |
<title>Project Euler - Problem 7</title> | |
<link rel="shortcut icon" type="image/png" href="jasmine/jasmine_favicon.png"> | |
<link rel="stylesheet" type="text/css" href="jasmine/jasmine.css"> | |
<script type="text/javascript" src="jasmine/jasmine.js"></script> |
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
/*** | |
* Especificación para: | |
* - euler07.js (https://gist.github.com/1714307) | |
* | |
* requiere jasmine (http://tryjasmine.com/) | |
* | |
* https://gist.github.com/1714297 | |
***/ | |
describe("Euler07", function() { |
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
/*** | |
* Implementación del problema #7 del proyecto Euler (http://projecteuler.net/problem=7): | |
* By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see | |
* that the 6th prime is 13. What is the 10,001st prime number? | |
* | |
* Requiere javascript 1.7 | |
* | |
* https://gist.github.com/1714307 | |
***/ |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Implementación de la kata "Roman Numerals" en estilo funcional. | |
""" | |
from itertools import izip, count | |
_NUMERALES = ( |
OlderNewer