Skip to content

Instantly share code, notes, and snippets.

@akej74
akej74 / main.py
Created October 28, 2017 08:36
SpaceDock API test
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
@akej74
akej74 / dice_performace_test.txt
Last active August 17, 2016 20:54
Dice throw performance test
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