Skip to content

Instantly share code, notes, and snippets.

View dangrous's full-sized avatar

Daniel Gale-Rosen dangrous

View GitHub Profile
@dangrous
dangrous / tic_tac_toe.py
Created November 8, 2021 02:39
A basic Tic Tac Toe game using Python
'''Plays tic tac toe until you want it to stop.'''
def print_board(board):
'''
Prints the board and a key for the moves.
Parameters:
board (list): The board of moves and empty spaces.
'''
print(f'\n {board[0]} | {board[1]} | {board[2]} 1 | 2 | 3 ')
@dangrous
dangrous / script.py
Created November 1, 2021 01:20
Python script to pull data from Spotify
import requests
import json
import csv
from random import randint
from datetime import datetime
from requests.auth import HTTPBasicAuth
client_id = "XXXXXXXX" # This is real in the real one
client_secret = "XXXXXXXX" # This is real in the real one
[
{
content: {...},
data: [...],
id: 5689,
slug: 'mollis-sagittis-sed-eget-laoreet',
title: 'Mollis sagittis sed eget laoreet',
type: 'single',
},
{