Skip to content

Instantly share code, notes, and snippets.

@jamesmf
jamesmf / arena-ids-to-name-map.py
Created April 18, 2024 03:00
Get mtg arena ids matched up to card names
# deps of sqlalchemy and pandas
# python -m pip install sqlalchemy==1.4.39 pandas
import sqlalchemy as sa
import pandas as pd
# the hash at the end of the connection string changes, so this isn't the exact connection string
eng = sa.create_engine(
"sqlite:///C:\Program Files\Wizards of the Coast\MTGA\MTGA_Data\Downloads\Raw\Raw_CardDatabase_hash_here.mtga"
)
@jamesmf
jamesmf / mycroft-thing.py
Last active February 18, 2020 05:16
Mycroft as a WoT Thing
from __future__ import division
from webthing import Action, Event, Property, SingleThing, Thing, Value, WebThingServer
from mycroft_bus_client import MessageBusClient, Message
import logging
import time
import uuid
class QuestionAction(Action):
def __init__(self, thing, input_):