- Seguí las instrucciones en
.overrides/update-python-version.rst
- En la instrucción acerca de hacer el update del submódulo de cpython usé el hash
a86632f7ea8cc77af770b33f60124ca767698c7
, que era el último commit en la rama 3.13. Ya pasaron varios días ya, así que está viejito. El último commit en esa rama al escribir esto este texto esc2c18acc3db031647fce06c4e1701ec0303e309c
. - Usé Python 3.11, que es lo que estamos usando en CI también, para no introducir más variables al proceso.
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 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
# This script requires the changes in https://github.com/casacore/casacore/pull/1116, | |
# which as of 14/Jul/2021 haven't been merged upstream yet | |
import functools | |
import operator | |
import os | |
import sys | |
import time | |
import casacore.tables as tables |
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 gc | |
import os | |
import resource | |
import sys | |
import time | |
def memusage(): | |
"""memory usage in MB. getrusage defaults to KB on Linux.""" | |
return resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1e3 |
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
# coding: utf-8 | |
from __future__ import print_function | |
import resource | |
import gc | |
import time | |
import six | |
# set IJSON_BACKEND=yajl2_c or yajl2_cffi |
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
// | |
// Compilacion: Como el usuario lo estime conveniente. | |
// Si se define HAVE_GMP entonces hay que linkear contra libgmp y libgmpxx, e.g.: | |
// | |
// $> CXXFLAGS="-Wall -O3 -DHAVE_GMP" LDLIBS="-lgmp -lgmpxx" make capicuas | |
// | |
// Uso: ./capicuas | |
// ./capicuas <primer-numero> <ultimo-numero> | |
// ./capicuas <primer-numero> <ultimo-numero> <precision> | |
// ./capicuas <primer-numero> <ultimo-numero> <precision> <max-iteraciones> |
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 collections import Counter | |
import string | |
import sys | |
def factores_primos(n): | |
factor = 2 | |
while n >= 2: | |
if n % factor: | |
factor += 1 | |
else: |
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 hashlib | |
import sys | |
hashes = [line.strip() for line in sys.stdin.readlines()] | |
for i in range(10000): | |
digest = hashlib.sha512('%04d' % i).hexdigest() | |
if digest in hashes: | |
print(digest, '%04d' % i) | |
# $> python cracker.py < hashes.txt |