Skip to content

Instantly share code, notes, and snippets.

@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 / 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
@woctezuma
woctezuma / PSFRGAN.md
Created Sep 29, 2020
Google Colab: PSFRGAN (results)
@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 / 2018_goty.txt
Last active Jan 30, 2021
GOTY/GOTD/Optional categories
View 2018_goty.txt
1 | Pillars of Eternity II: Deadfire (appID: [URL=https://www.igdb.com/games/pillars-of-eternity-ii-deadfire/]26951[/URL], released on May 08, 2018)
2 | HITMAN 2 (appID: [URL=https://www.igdb.com/games/hitman-2/]103210[/URL], released on Nov 13, 2018)
3 | Monster Hunter: World (appID: [URL=https://www.igdb.com/games/monster-hunter-world/]36926[/URL], released on Aug 09, 2018)
3 | Yakuza 0 (appID: [URL=https://www.igdb.com/games/yakuza-0/]11397[/URL], released on Aug 01, 2018)
5 | Return of the Obra Dinn (appID: [URL=https://www.igdb.com/games/return-of-the-obra-dinn/]9643[/URL], released on Oct 18, 2018)
6 | Assassin's Creed: Odyssey (appID: [URL=https://www.igdb.com/games/assassins-creed-odyssey/]103054[/URL], released on Oct 05, 2018)
7 | Celeste (appID: [URL=https://www.igdb.com/games/celeste/]26226[/URL], released on Jan 25, 2018)
8 | GRIS (appID: [URL=https://www.igdb.com/games/gris/]22917[/URL], released on Dec 13, 2018)
9 | Dragon Quest XI: Echoes of an Elusive Age (appID: [URL=https://www.igd
View 2018_ballots.tsv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
"Name" "#5" "#4" "#3" "#2" "#1" "Review" "Ongoing" "Early Access" "T*rd"
Agathe-Geneviève Chevalier "CrossCode" "Katamari Damacy Reroll" "Return of Obra Dinn" "Unavowed" "Dragon Quest XI" "" "" "" ""
Aimée Pons "n/a" "Shenmue 1 & 2" "The Forest" "Yakuza 0" "Subnautica" "" "The Orb Vallis (Warframe Expansion)" "n/a" "CSGO: Danger Zone"
Antoine Allain du Mace "Puyo Puyo™Tetris®" "Quarantine Circular" "Into the Breach" "Yakuza 0" "Return of the Obra Dinn" "" "" "Staxel" ""
Charles Carlier-Martinez "Kingdom Come Deliverance" "Two Point Hospital" "Frostpunk" "BattleTech" "Beat Saber" "" "" "" ""
Charlotte Adam-Bazin "" "" "" "Minit" "La-Mulana 2" "" "" "" "Fallout 76"
Christelle Lacombe "" "" "Far Cry 5" "DUSK" "Mega Man 11" "" "" "" "Fallout 76"
Claudine Maury "Final Fantasy XII: The Zodiac Age" "Bloodstained: Curse of the Moon" "Iconoclasts" "Hitman 2" "Return of the Obra Dinn" "" "XCOM 2: War of the Chosen - Tactical Legacy Pack" "" "Fallout 76"
David Toussaint "" "" "Yakuza 0" "Subnautica" "Montster Hunter Wor