Skip to content

Instantly share code, notes, and snippets.

View dbatis's full-sized avatar

Dimitris Batis dbatis

View GitHub Profile
@dbatis
dbatis / extract_maven_interdependencies.py
Last active December 13, 2015 21:22
This command-line utility receives a directory containing a multi-module Maven project and will output a graph displaying the inter-dependencies of modules.
"""
This command-line utility receives a directory containing a multi-module Maven project and will output a graph
displaying the inter-dependencies of modules.
The input directory need not be an actual Maven aggregator POM or anything of the sort. All pom.xml will be
parsed that reside inside the given directory structure.
The output format is determined by the file extension. The following extensions are supported:
- .graphml
- .gml
__author__ = 'dbatis'
def hardyRamanujan(upperLimit):
"""
Computes all cases of x^3 + y^3 = z^3 + g^3, where x <> y <> z <> g and x, y, z, g < upperLimit.
Example output:
>>> hardyRamanujan(20)
[[(1, 12, 1729), (9, 10, 1729)], [(2, 16, 4104), (9, 15, 4104)]]