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
| ''' | |
| Based on https://shaggydev.com/2025/06/12/godot-awaiting-signals/ | |
| # usage | |
| var sigs=[ | |
| get_tree().create_timer(0.1).timeout, | |
| get_tree().create_timer(0.1).timeout, | |
| get_tree().create_timer(0.1).timeout, | |
| ] |
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_name SignalWaiter | |
| signal AllFinished | |
| # Internal variables | |
| var _active_nodes = {} | |
| var _signal_connections = {} | |
| var _callables = [] | |
| ## External method to add a node, its callable, and the signal to listen for. |
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 json | |
| import spacy | |
| import zipfile | |
| import os | |
| import pickle | |
| # File paths | |
| zip_path = r"pathtotwitterarchive.zip" # Path to zipped twitter archive | |
| extract_path = r"somepath\twitter_data" # Path to extract twitter data | |
| embeddings_path = r"somepath\tweet_embeddings.pkl" # Path to save embeddings |
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 chromadb | |
| import openai | |
| import os | |
| from tqdm import tqdm | |
| import tiktoken | |
| from chromadb.errors import NotEnoughElementsException | |
| import re | |
| from colorama import Fore, Style | |
| # Instructions (assumes Windows OS) |
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 json | |
| import sys | |
| sys.stdout.reconfigure(encoding='utf-8') | |
| import io | |
| import os | |
| import traceback | |
| from datetime import datetime | |
| import re | |
| booktitle = os.environ['ESPANSO_BOOKTITLE'] | |
| clippings_file = "E:/documents/My Clippings.txt" |
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 sys | |
| sys.stdout.reconfigure(encoding='utf-8') | |
| from datetime import datetime | |
| # Open the clippings file and read its contents | |
| with open("E:/documents/My Clippings.txt", "r", encoding="utf-8") as f: | |
| contents = f.read() | |
| # Split the contents into separate notes | |
| notes = contents.split("==========\n") |
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
| # append this to [username]/AppData/Roaming/espanso/match | |
| - trigger: kindle_import_book_from_clippings | |
| replace: "{{output}}" | |
| vars: | |
| - name: booktitles | |
| type: script | |
| params: | |
| args: | |
| - python |
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
| #add to C:\Users\username\AppData\Roaming\espanso\match\base.yml | |
| - trigger: kindle_json_to_tanapaste | |
| replace: "{{output}}" | |
| vars: | |
| - name: output | |
| type: script | |
| params: | |
| args: | |
| - python | |
| - "%CONFIG%/scripts/kindle_json_to_tanapaste.py" |
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
| #add to C:\Users\username\AppData\Roaming\espanso\scripts\ | |
| import json | |
| import sys | |
| sys.stdout.reconfigure(encoding='utf-8') | |
| import io | |
| import os | |
| import traceback | |
| def is_json_file(file): | |
| filename, file_extension = os.path.splitext(file) | |
| # Split the filename of the latest downloaded file into the base filename and file extension |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class PerlinShake : MonoBehaviour, IShaker { | |
| public float duration = 0.5f; | |
| public float speed = 1.0f; | |
| public float magnitude = 0.1f; | |
| public bool test = false; |
NewerOlder