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
## Welcome | |
Welcome to Stackoverlfow! You will greatly increase your chances of getting an answer for your question if you include your input, what you have tried, your expected output vs. your actual output and the full stack trace of any errors you receive. You can also read [this guide](http://stackoverflow.com/help/mcve) |
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
# Automatically adds the JIRA ticket number to the end of every commit message. | |
# This will work provided your branch is named in the form [a-zA-Z]{3}-[0-9]{3,} | |
# Place this file in PROJECT/.git/hooks and make it executable chmod +x path/to/file | |
# Example: | |
# [BND-1234] <--- This is a branch name | |
# $ git commit -am "This is my message" | |
# [BND-1234 1edab53] This is my message [BND-1234] | |
# | |
# [BND-1234-This-Branch-Has-A-Description] <--- This is a branch name | |
# $ git commit -am "This is my message" |
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
def fermat(n): | |
if n == 2: | |
return True | |
if not n & 1: | |
return False | |
return pow(2, n-1, n) == 1 | |
# benchmark of 10000 iterations of fermat(100**10-1); Which is not prime. | |
# 10000 calls, 21141 per second. |
NewerOlder