Skip to content

Instantly share code, notes, and snippets.

@woctezuma
woctezuma / hidden_gems_using_players.md
Last active Dec 15, 2021
Hidden Gems, using players total (forever) as a popularity measure
View hidden_gems_using_players.md

This post contains a ranking of Steam games, based on a score intended to favor "hidden gems". A "hidden gem" is defined as a high-quality game (hence the "gem") which only got little attention (hence "hidden"). Therefore, the score of a game is defined as the product of a quality measure (its Wilson score) and a decreasing function of a popularity measure (its players total forever). The quality measure comes from SteamDB and the popularity measure comes from SteamSpy API. Finally, here is a reference to the NeoGAF post explaining the method, and the NeoGAF post explaining the idea behind the optimization of the only free parameter. The Python source code can be found on Github.

Reproducibility

To reproduce the results, use data downloaded betwe

@woctezuma
woctezuma / hidden_gems_using_playtime.md
Last active Dec 21, 2020
Hiddem Gems, using median playtime (forever) as a popularity measure
View hidden_gems_using_playtime.md

PC Gamer

If you arrived here from a PC Gamer article, I suggest you check the Python source code and one of these rankings:

  • original ranking, featured on PC Gamer, based on data downloaded prior to the Steam summer sales.
  • updated ranking, using data from June 30, a week after the Steam summer sales have started.

Bug fix regarding ranking based on playtime

Initially, I presented on this Gist page a ranking using playtime as popularity measure. However, as I have kept working on the code, I have found out this ranking likely suffered from a bug. The bug, which is now fixed, resulted in a ranking very similar to the ranking using players total as popularity measure. Thankfully, the ranking featured in the PC Gamer article is bug-free sinc

@woctezuma
woctezuma / hidden_gems_using_players_a_week_into_summer_sales.md
Last active Aug 5, 2021
Hidden Gems, using players total (forever) as a popularity measure, one week after the Steam summer sales have started.
View hidden_gems_using_players_a_week_into_summer_sales.md

This post contains a ranking of Steam games, based on a score intended to favor "hidden gems". It is a follow-up of a previous ranking, one week after the Steam summer sales have started. The Python source code can be found on Github.

Reproducibility

To reproduce the results, use data downloaded on June 30 with alpha ~ 10^(6.24), which arises from an optimization with 1 example of "hidden gem":

  • Contradiction - the all-video murder mystery adventure (appID=373390)

Ranking of Steam games favoring hidden gems

  1. Wuppo
  2. fault - milestone two side:above
@woctezuma
woctezuma / how_to_pypi.md
Last active Feb 22, 2020
My PyPI Release How To
View how_to_pypi.md
pip install bumpversion setuptools wheel twine

bumpversion --current-version 0.4.0 minor setup.py
git add setup.cfg setup.py
git commit -m "Bump version to v0.5.0"

git tag "0.5.0"
git push --tags
git push
@woctezuma
woctezuma / tags.py
Created Aug 24, 2020
427 Steam Tags as of 2020-08-24
View tags.py
tags = [
"1980s",
"1990's",
"2.5D",
"2D",
"2D Fighter",
"2D Platformer",
"360 Video",
"3D",
"3D Fighter",
@woctezuma
woctezuma / steamspy.py
Last active Aug 24, 2020
Respect rate-limits of SteamSpy API
View steamspy.py
import json
import time
from pathlib import Path
import steamspypi
def get_cooldown():
cooldown = 70 # 1 minute plus a cushion
@woctezuma
woctezuma / block_inactive_followers.py
Created Aug 24, 2020
Remove inactive followers on SensCritique
View block_inactive_followers.py
import requests
from bs4 import BeautifulSoup
def get_my_secret_cookie():
my_secret_cookie = {
"SC_AUTH_UID": "30993",
"SC_DEVICE_CATEGORY": "desktop",
"SC_AUTH": "MY_SECRET_COOKIE", # TODO
View steam-spy-api-docs.txt
This is an API for Steam Spy. It accepts requests in a GET string and returns data in JSON arrays.
*IMPORTANT:* some things have changed, please, read this document through!
The data is refreshed once a day, there is no reason to request the same information more than once every 24 hours.
Allowed poll rate - 1 request per second for most requests, 1 request per 60 seconds for the *all* requests.
## Examples: ##
View age.py
# 1. Set up StyleGAN
import dnnlib
import dnnlib.tflib as tflib
import pretrained_networks
network_pkl = 'gdrive:networks/stylegan2-ffhq-config-f.pkl'
_G, _D, Gs = pretrained_networks.load_networks(network_pkl)
Gs_kwargs = dnnlib.EasyDict()
@woctezuma
woctezuma / stylegan2_usage.py
Created Sep 21, 2020
StyleGAN2: minimal usage
View stylegan2_usage.py
import pretrained_networks
import numpy as np
import dnnlib
import dnnlib.tflib as tflib
import PIL.Image
network_pkl = 'gdrive:networks/stylegan2-ffhq-config-f.pkl'
_, _, Gs = pretrained_networks.load_networks(network_pkl)
rng_seed = 5616