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 requests | |
import time | |
# How many mods to get per page from SpaceDock API | |
MODS_PER_PAGE = 100 | |
def test_spacedock_api(): | |
"""Requests SpaceDock for all mods using the API and returns a dictionary with the data in JSON format.""" | |
# Initial request to SpaceDock API |
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 random import randint | |
import time | |
def dicethrow(dices): | |
dice_sum = 0 | |
for d in range(dices): | |
current_dice = dice() | |
dice_sum += current_dice | |
return dice_sum |