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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
use hecs::{ColumnBatchBuilder, ColumnBatchType, Component, TypeUnknownToCloner, World}; | |
fn try_add_type_to_batch<T: Component>( | |
archetype: &hecs::Archetype, | |
batch_type: &mut ColumnBatchType, | |
) { | |
if archetype.has::<T>() { | |
batch_type.add::<T>(); | |
} | |
} |
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
import uiautomation as auto | |
# move mouse cursor over a text box with some text in it first | |
c = auto.ControlFromCursor() | |
v = c.GetValuePattern() | |
print(v.Value) # should print the contents of the text box | |
# now select some text in that same control | |
t = c.GetTextPattern() |
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 __future__ import print_function | |
import datetime | |
import os | |
import sys | |
import traceback | |
import dragonfly | |
try: |
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
import logging, os | |
import dragonfly | |
if False: | |
logging.basicConfig(level=10) | |
logging.getLogger('grammar.decode').setLevel(20) | |
logging.getLogger('compound').setLevel(20) | |
# logging.getLogger('kaldi').setLevel(30) | |
logging.getLogger('engine').setLevel(10) |
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
// ==UserScript== | |
// @name Google Slash Search | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.google.com/search* | |
// @grant none | |
// ==/UserScript== |
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
# to get started, try `print get_grammar_complexity_tree(some_grammar, threshold=5)`. | |
# If you don't get any interesting output, turn up the threshold (max depth visualized) to something like 7 or 10 :) | |
class ComplexityNode(object): | |
def __init__(self, item): | |
self.item = item | |
self.children = [] | |
self.total_descendents = 1 | |
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
"""A grammar to swap windows by saying words in their title. | |
Uses a natlink timer to periodically load the list of open windows into a DictList, | |
so they can be referenced by the "switch window" command. | |
Commands: | |
"switch window <keyword>" -> switch to the window with the given word in its | |
title. If multiple windows have that word in | |
their title, then you can say more words in the |
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
# Snippets to sign an executable of your choice with a new certificate trusted only by you. | |
# Run these commands in an Administrative Powershell session. | |
# | |
# WARNING: This creates a new certificate authority and installs it on your computer! | |
# This means that if someone gets a hold of the certificate you generate here, they can | |
# impersonate (almost) any HTTPS website you visit (exception being sites which pin their | |
# certificates - but that is not the norm yet). | |
# | |
# Source: https://stackoverflow.com/a/51443366/775982 |
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
# git and related commands (assumes you have the extra `text` bound to dragonfly `Dictation()` | |
"git add": Text("git add "), | |
"git add patch": Text("git add -p "), | |
"git branch": Text("git branch "), | |
"git checkout": Text("git checkout "), | |
"git clone": Text("git clone "), | |
"git commit": Text("git commit -v "), | |
"git commit message [<text>]": Text("git commit -m ''") + Key("left") + Text("%(text)s"), | |
"git commit all message [<text>]": Text("git commit -a -m ''") + Key("left") + Text("%(text)s"), | |
"git commit all": Text("git commit -va "), |
NewerOlder