Skip to content

Instantly share code, notes, and snippets.

View rossengeorgiev's full-sized avatar
:shipit:
git push --force

Rossen rossengeorgiev

:shipit:
git push --force
View GitHub Profile
@rossengeorgiev
rossengeorgiev / depotid-to-appid.py
Last active September 11, 2022 08:47
Creates depotid-to-appid.json which maps depotid to a list of appids
from steam import webapi
from steam.client import SteamClient, EResult
from steam.utils import chunks
from collections import defaultdict
all_appids = webapi.get('ISteamApps', 'GetAppList', version=2).get('applist', {}).get('apps', [])
all_appids = [item['appid'] for item in all_appids]
print("Found %s appids" % len(all_appids))
@rossengeorgiev
rossengeorgiev / steam_spring_cleaning.py
Last active May 25, 2018 17:27
Steam Spring Cleaning 2018
# Run this script to do the spring cleaning tasks
#
# Install:
# 1. See http://steam.readthedocs.io/en/stable/install.html
# 2. pip install steam
#
import re
from steam import SteamClient
from steam.enums.emsg import EMsg
# 1. Put gamestate_integration_<name>.cfg in game/dota/cfg/gamestate_integration/
# 2. Start your HTTP server on 127.0.0.1:8000 to receive the data in JSON format
"Dota 2 Integration Configuration"
{
"uri" "http://127.0.0.1:8000/"
"timeout" "5.0"
"buffer" "0.1"
"throttle" "0.1"
"heartbeat" "30.0"
"data"
from collections import Counter
data = """eedadn
drvtee
eandsr
raavrd
atevrs
tsrnev
sdttsa
rasrtv
class ಠ_ಠ:
def __init__(self):
raise type('ಠ_ಠ', (Exception,), {})('ಠ_ಠ')
class EnterpriseClass(ಠ_ಠ):
pass
EnterpriseClass()
@rossengeorgiev
rossengeorgiev / dota_gotd.py
Last active November 27, 2016 22:55
change filename
#!/usr/bin/env python
#
# pip install steam, dota2
#
import logging
import gevent
from steam import SteamClient
from dota2 import Dota2Client
from dota2.enums import EDOTAGCMsg
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)