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 datetime import datetime | |
from math import floor | |
def get_relative_time(dateTime): | |
current_time = datetime.utcnow() | |
time_diff = current_time - dateTime | |
intervals = ( | |
(time_diff.days / 36500, "century", "centuries"), | |
(time_diff.days / 3650, "decade", "decades"), |
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
open System.IO | |
open System.Net | |
open System.Text.RegularExpressions | |
open System | |
/// <summary> | |
/// Fetches the Id (SHA1 hash) of the most recent GitHub Git commit in the | |
/// specified repository. | |
/// </summary> | |
/// |
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 random | |
rand = random.randint(1000, 9999) | |
attempts = 0 | |
# print rand | |
def check_proximity(num, guess): | |
""" | |
:param str num: The generated random integer casted as a string. |
NewerOlder