Skip to content

Instantly share code, notes, and snippets.

choice = "y"
while choice.lower() == "y":
number = int(input("Enter a number to calculate factorial: "))
result = 1
for i in range(1, number + 1):
# Factorial = 1 x 2 x 3 x ... x n
result *= i
@aaclarker
aaclarker / jenkins_pipeline_timer_flag.groovy
Last active June 17, 2024 19:49
Check if Jenkins build was started by timer (Declarative Pipeline)
def started_by_timer = currentBuild.getBuildCauses()[0]["shortDescription"].matches("Started by timer")

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am aaclarker on github.
  • I am aaclarker (https://keybase.io/aaclarker) on keybase.
  • I have a public key ASDsggP8gqXRpJRi4eV29mEm_7nNGpio8aoT8ncf9H6nuAo

To claim this, I am signing this object: