Command | Description | Example Usage |
---|---|---|
Backward |
Moves a user defined distance backward. | pyxel.Backward(6,0,0) |
Chase Tail |
Chases wagging tail in a circle a user defined direction. | pyxel.ChaseTail(1) |
Dance |
PYXEL shows off its dance moves. | pyxel.Dance() |
Delay |
Code pauses for a user defined amount of time. | pyxel.Wait(1) |
Eyes |
User defines PYXEL's emotion for one or both eyes. |
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 | |
def roll_4d6_drop_lowest(): | |
"""Roll 4d6 and return the sum of the highest three rolls.""" | |
rolls = [random.randint(1, 6) for _ in range(4)] | |
return sum(sorted(rolls)[1:]) # Sum the three highest rolls | |
def generate_character_stats(): | |
"""Generate a set of 6 character stats.""" | |
return [roll_4d6_drop_lowest() for _ in range(6)] |
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
viator | |
saudade | |
hygge | |
peripatetic | |
taciturn | |
vigesimal | |
gadabout | |
piquant | |
caesura | |
elide |
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 itertools import combinations_with_replacement | |
class Numogram: | |
def __init__(self): | |
self.init_zones() | |
self.syzygies = self.calculate_syzygies() | |
self.currents = self.calculate_currents() | |
self.gates = self.calculate_gates() | |
self.regions = self.calculate_regions() |
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 | |
def real_to_alternate(date_str): | |
# List of alternate month names | |
alt_month_names = [ | |
"Stellary", "Luminar", "Nebulo", "Solara", | |
"Aqueon", "Terralus", "Venton", "Caelis", | |
"Ignisar", "Vivary", "Ombro", "Mystis", "Etheron" | |
] | |
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
class ColorCode: | |
def __init__(self): | |
self.COLORS = { | |
"Aqua": 0, | |
"Black": 1, | |
"Blue": 2, | |
"Brown": 3, | |
"Gray": 4, | |
"Green": 5, | |
"Orange": 6, |
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
class ColorCode: | |
def __init__(self): | |
self.COLORS = { | |
"Aqua": 0, | |
"Black": 1, | |
"Blue": 2, | |
"Brown": 3, | |
"Gray": 4, | |
"Green": 5, | |
"Orange": 6, |
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 | |
from bs4 import BeautifulSoup | |
import csv | |
import os | |
import argparse | |
def fetch_and_parse(url): | |
response = requests.get(url) | |
if response.status_code != 200: | |
return None |
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 pandas as pd | |
import dateparser | |
def convert_date(date_str): | |
# Remove any trailing characters like (?), (meeting minutes), etc. | |
clean_str = ''.join(ch for ch in date_str if ch.isalnum() or ch.isspace()) | |
# Map seasons to a specific sub-year grouping | |
seasons = { | |
"Spring": "-21", |