This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: ZHA - Moes Tuya Smart Knob (TS004F) controller for light dimming | |
| description: Control a light with a Tuya smart knob. | |
| domain: automation | |
| source_url: https://gist.githubusercontent.com/rossengeorgiev/66945d3c9bfa0495b514a96f9b306ccc/raw/abedb42c58f6ba52d924fab5f61e15b765087625/blueprint-zha-TS004F.yaml | |
| input: | |
| remote: | |
| name: Smart Knob Device | |
| description: Moes Tuya Smart Knob Device to use | |
| selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import Counter | |
| data = """eedadn | |
| drvtee | |
| eandsr | |
| raavrd | |
| atevrs | |
| tsrnev | |
| sdttsa | |
| rasrtv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ಠ_ಠ: | |
| def __init__(self): | |
| raise type('ಠ_ಠ', (Exception,), {})('ಠ_ಠ') | |
| class EnterpriseClass(ಠ_ಠ): | |
| pass | |
| EnterpriseClass() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 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) |