Skip to content

Instantly share code, notes, and snippets.

@abluescarab
abluescarab / steam-tag-scraper.py
Last active August 13, 2023 04:30
Scrapes tags from Steam for the given app IDs, then compares them to find the most common tags
from requests_html import AsyncHTMLSession
import json
import re
import asyncio
import argparse
from collections import namedtuple
Page = namedtuple("Page", "appid result")
App = namedtuple("App", "name tags")
@abluescarab
abluescarab / test_suite.py
Last active May 25, 2022 20:38
A basic Python assertion test suite
from enum import Enum
class Test:
def __init__(self, func, expected, args=[], kwargs={}):
self.func = func
self.args = args
self.kwargs = kwargs
self.expected = expected
@abluescarab
abluescarab / mturk_json_to_csv.py
Last active January 9, 2018 17:40
Convert exported Mechanical Turk JSON files to CSV
import os
import json
import csv
import argparse
# ------------------------------------------------------------------------------
# rearrange these headers to change order
headers = ["date", "title", "state", "reward", "requester_id", "requester_name",
"requester_feedback"]
# ------------------------------------------------------------------------------