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
__author__ = 'mpetyx' | |
''' Pythagorean triplets are integers (a, b, c) for which the property | |
a^2 + b^2 = c^2 holds. The following script is a dummy implementation that runs in 12.5s ''' | |
lim = 500 | |
for i in range(1, lim): | |
for j in range(i+1, lim): | |
for k in range(j+1, lim): | |
if i**2 + j**2 == k**2: |
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
__author__ = 'mpetyx' | |
for x in range(1, 2000): | |
for y in range(1, 2000): | |
for z in range(1, 2000): | |
for g in range(1, 2000): | |
if g * g * g + z * z * z == x * x * x + y * y * y: | |
if (g == z) or (g == y) or (g == x) or (z == y) or (z == x) or (y == x): | |
continue | |
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
{"context":"while validating security scheme","context_mark":null,"message":"requestTokenUri must be a URL","problem_mark":{"name":"http://localhost:8081/api","line":24,"column":16,"buffer":"#%RAML 0.8\ntitle: \"Twitter API\"\nversion: \"1.1\"\nbaseUri: \"http://localhost:8081/api\"\nmediaType: \"application/json\"\nresourceTypes: \n - \n \"base\": \n displayName: \"base\"\ntraits: \n - \n \"nestedable\": \n displayName: \"nestedable\"\n - \n \"trimmable\": \n displayName: \"trimmable\"\nsecuritySchemes: \n - \n \"oauth_1_0\": \n description: |\n Twitter offers applications the ability to issue authenticated requests on \n behalf of the application itself (as opposed to on behalf of a specific user). \n type: \"OAuth 1.0\"\n settings: \n \"requestTokenUri\": [\"https://api.twitter.com/oauth/request_token\"]\n \"authorizationUri\": [\"https://api.twitter.com/oauth/authorize\"]\n \"tokenCredentialsUri\": [\"https://api.twitter.com/oauth/access_token\"]\nsecuredBy: \n - \n oauth_1_0\n\"/statuses\": \n \"/oembed{ |
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
mpetyx$ git push heroku master | |
Fetching repository, done. | |
Counting objects: 12, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (8/8), done. | |
Writing objects: 100% (9/9), 1.79 KiB | 0 bytes/s, done. | |
Total 9 (delta 4), reused 0 (delta 0) | |
-----> Fetching custom git buildpack... done | |
-----> Python app detected |