Skip to content

Instantly share code, notes, and snippets.

View acidzebra's full-sized avatar

acidzebra acidzebra

View GitHub Profile
@acidzebra
acidzebra / nif_class_heirarchy.txt
Created June 22, 2023 08:07 — forked from Greatness7/nif_class_heirarchy.txt
nif_class_heirarchy.txt
# -*- coding: utf-8 -*-
┌· NiObject
├──┬· NiAccumulator
│ └──┬· NiClusterAccumulator
│ └───· NiAlphaAccumulator
├──┬· NiExtraData
│ ├───· BrickNiExtraData
@acidzebra
acidzebra / character.py
Created June 22, 2023 08:03 — forked from Greatness7/character.py
Create Character NIF
from pathlib import Path
from es3.utils.math import ID44
from es3 import nif
meshes_path = Path("C:/Users/Admin/Games/Morrowind/Data Files/Meshes/")
output_path = meshes_path / "g7/export.nif"
skins = {
"b/b_n_dark elf_m_skins.nif",
@acidzebra
acidzebra / drugwars.txt
Created March 8, 2023 12:52 — forked from mattmanning/drugwars.txt
Drugwars for the TI-82/83/83+ Calculators
Lbl G
ClrHome
Disp " J.M.'S DRUGWAR"," SIMULATION",""," VERSION 2.00",""," JUST SAY NO."
2000→Z
5000→Y
0→V
100→K
1→B
2→N
0→I
@acidzebra
acidzebra / vectorconnectsub.py
Last active October 21, 2022 14:20
workaround for the endless timeouts
robot_connected = 0
while robot_connected == 0:
try:
print("Connecting to Vector")
myrobot.connect(timeout=30)
robot_connected = 1
sleep(2)
except anki_vector.exceptions.VectorNotFoundException as e:
print("Vector not found exception, sleeping for 60 secs and retrying. Error: " + repr(e))
sleep(60)
@acidzebra
acidzebra / vectordiag.py
Last active January 16, 2023 09:14
VectorDiag has been renamed and moved! https://github.com/acidzebra/vectrix
VectorDiag has been renamed and moved! See: https://github.com/acidzebra/vectrix
#!/usr/bin/env python3
import anki_vector
import json
import paho.mqtt.client as mqtt
import requests
url = "YOURDISCORDWEBHOOKURL"
MQTT_HOST = "YOURMQTTHOST"
MQTT_PORT = 1883
MQTT_KEEPALIVE_INTERVAL = 20
@acidzebra
acidzebra / vector-mqtt.py
Last active September 25, 2021 07:06
Grab state from a Vector robot and publish it to a MQTT topic
#!/usr/bin/env python3
# Copyright (c) 2021 acidzebra
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
@acidzebra
acidzebra / listtrainer.py
Created July 27, 2019 12:59
chatterbot_listtrainer.py
import chatterbot
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
from chatterbot.trainers import ListTrainer
from chatterbot import filters
from chatterbot import comparisons
from chatterbot import response_selection
import asyncio
import anki_vector
from anki_vector.util import degrees
@acidzebra
acidzebra / dueling_chatbots.py
Last active March 14, 2020 05:49
Script which sets up two instances of chatterbot and bounces text between the two, and pipes the output to two Anki Vector robots.
#!/usr/bin/env python3
# Copyright (c) 2019 acidzebra
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
@acidzebra
acidzebra / vector_sets_the_lights.py
Last active November 13, 2020 03:08
Give Vector "control" over your Philips Hue light. Script takes a snapshot from Vector's camera and does some fancy math to determine brightness. If not bright enough, a hue light will be turned on.
#!/usr/bin/env python3
# Copyright (c) 2019 acidzebra
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#