Skip to content

Instantly share code, notes, and snippets.

View m-roberts's full-sized avatar

M. R. m-roberts

  • Bristol, UK
View GitHub Profile
@m-roberts
m-roberts / Autogen Orchestrator
Last active October 18, 2023 20:58
A More Controllable Way To Manage Autogen Agent Conversations
Taken directly from https://www.youtube.com/watch?v=4o8tymMQ5GM
@m-roberts
m-roberts / amg88xx-kernel-driver-notes
Last active March 11, 2022 12:21
Understanding and working with I2C driver with sysfs interface
0x68 device address is defined in the device tree: https://github.com/vuorioi/amg88xx-kernel-driver/blob/master/amg88xx-overlay.dts
dmesg output when not present:
# [ 66.832427] amg88xx: probe of 1-0068 failed with error -121
Therefore, without the device connected, the sysfs paths are not loaded
@m-roberts
m-roberts / Octoprint HUD
Created March 10, 2022 23:34
Get information similar to what is displayed on Ender 3 v2 Display from Octoprint REST API
import emoji
import time
import json
import os
from octorest import OctoRest
def make_client(url, apikey):
try:
client = OctoRest(url=url, apikey=apikey)
@m-roberts
m-roberts / Unlock Rotki Premium.md
Last active December 20, 2022 20:09
Unlock rotki premium features and prevent connections to server API

Unlock rotki premium features and prevent connections to server API

Should work on all recent versions. Make edits to the source files yourself:

# Default state: ACTIVE premium
sed -i 's/self.status = SubscriptionStatus.UNKNOWN/self.status = SubscriptionStatus.ACTIVE/g' rotkehlchen/premium/premium.py

# Remove API routes
sed -i "s/self.uri = .*/self.uri = ''/g" rotkehlchen/premium/premium.py
sed -i "s|https://rotki.com/api/1/usage_analytics||g" rotkehlchen/usage_analytics.py
@m-roberts
m-roberts / run.py
Created February 9, 2020 14:52
Apply label and due string to all tasks in a Todoist given project
#!/usr/local/bin/python3
import uuid, requests, json
ACCESS_TOKEN="<access_token>"
PROJECT_TO_MODIFY="<project_to_modify>"
LABEL_TO_APPLY="<label_to_apply>"
DUE_STRING_TO_APPLY="<due_string_to_apply>"