This file contains 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
; Initialize variables for joystick | |
JoyUp:: ; Joystick up | |
JoyDown:: ; Joystick down | |
JoyLeft:: ; Joystick left | |
JoyRight:: ; Joystick right | |
; Map joystick directions to numpad keys | |
JoyUp:: | |
Send {Numpad8} | |
return |
This file contains 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 the official Python image as a base | |
FROM python:3.8-slim | |
# Set environment variables | |
ENV LANG C.UTF-8 | |
ENV LC_ALL C.UTF-8 | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ | |
espeak-ng \ |
This file contains 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 sounddevice as sd | |
import time | |
import logging | |
import threading | |
import wave | |
from abc import ABC, abstractmethod | |
from typing import Any, List, Literal, Optional, Union, Dict, Callable | |
FileFormat = Union[Literal["wav"], Literal["mp3"]] |
This file contains 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 Quartz import * | |
from PyObjCTools.AppHelper import runConsoleEventLoop | |
def key_callback(proxy, type_, event, refcon): | |
# Get the key code | |
key_code = CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode) | |
print("Key pressed:", key_code) | |
return event | |
def main(): |
This file contains 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 requests | |
# Azure subscription key and service region | |
subscription_key = 'YourAzureSubscriptionKey' | |
service_region = 'YourServiceRegion' | |
# Set up the TTS endpoint | |
tts_endpoint = f'https://{service_region}.tts.speech.microsoft.com/cognitiveservices/v1' | |
# Set up the headers for the HTTP request |
This file contains 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 pynput import keyboard, mouse | |
from pynput.keyboard import Key, Controller as KeyboardController | |
import requests | |
import clipman | |
clipman.init() | |
keyboard_controller = KeyboardController() | |
text_buffer = [] | |
def correct_text(text): |
This file contains 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 CryptoKit | |
import Foundation | |
struct EmptyResponse: Decodable {} | |
class ReftabClient { | |
let publicKey: String | |
let secretKey: String | |
let baseURL = "https://www.reftab.com/api" | |
This file contains 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
/** So really you'd want to update that training text continually too - but you ideally need a way for people correcting this training text. Something that was easy enough with dasher although undcoumented. You literally edit the text file. | |
Also note this for autocorrection - but not sure how we would implement this | |
**/ | |
extension PPM { | |
// Generate candidate words by swapping adjacent characters | |
func generateCandidates(word: String) -> [String] { | |
var candidates: [String] = [] | |
var chars = Array(word) | |
for i in 0..<(chars.count - 1) { |
This file contains 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 os | |
import re | |
import json | |
import unicodedata | |
def xkb_to_unicode(key_code): | |
# Add your custom mapping here | |
custom_mapping = { | |
"adiaeresis": "ä", | |
"odiaeresis": "ö", |
This file contains 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
pyperclip | |
pyttsx4 | |
configparser | |
translate | |
TTS | |
pyaudio | |
gTTS | |
gspeak | |
pygame |
NewerOlder