Skip to content

Instantly share code, notes, and snippets.

View clayote's full-sized avatar

clayote

View GitHub Profile
@clayote
clayote / betterfollowing.py
Created May 18, 2021 17:03
My effort to get useful data out of Twitter profiles
from requests_html import HTMLSession, HTML
from lxml.etree import ParserError
import json
import time
import random
with open('following.json', 'rt') as inf:
useless = json.load(inf)
session = HTMLSession()
@clayote
clayote / bumpme
Created January 7, 2020 20:13
for Concourse tutorial
asdf
@clayote
clayote / sample.py
Last active December 2, 2019 17:24
Trying to hand-compile KvLang into Python for optimization. It isn't working
from random import uniform
from kivy.config import Config
Config.set('kivy', 'log_level', 'debug')
from kivy.app import App
from kivy.clock import Clock
from kivy.graphics import Line
from kivy.lang import Builder
from kivy.properties import ListProperty
from kivy.factory import Factory
@clayote
clayote / 8bitdo
Created June 2, 2018 19:38
Problems getting 8bitdo pro controllers to work on Linux
Both the FC30 Pro and the SN30 Pro are detected by Ubuntu, and are usable insofar as all of the buttons and axes they do have are all present. However, they both present a pair of axes that look like pedals, but which aren't really on the controller. Instead, these axes default to -32767 and flip to positive 32767 when some buttons are pressed -- buttons that are already accounted for by some other input.
Axis 4 flips when I press right on the D-pad or the L2 button (button 8).
Axis 5 flips when I press left on the D-pad or the R2 button (button 9).
The controllers also appear to have 14 buttons, but I can only really press 12. Buttons 2 and 12 cannot be pressed. I thought these would be the Star and Home buttons, but pressing those does nothing, and these extra buttons are not present on the FC30 Pro.
It's sometimes possible to work around this with remapping, but the inability to press button 8 without flipping axis 5 makes it impossible to do this in an automated fashion; you have to use something like x
@clayote
clayote / etesync-dav.log
Created July 10, 2017 22:00
Better log
[7fe602771700] INFO: Starting Radicale
[7fe602771700] DEBUG: Authentication type is htpasswd
[7fe602771700] DEBUG: Listening to localhost port 37358
[7fe602771700] DEBUG: Radicale server ready
[7fe5f8a89700] INFO: PROPFIND request for /zack@zacharyspector.com/ with depth 1 received from 127.0.0.1 using "Thunderbird CardBook/19.7 Lightning/5.4.2.1"
[7fe5f8a89700] DEBUG: Request headers:
{'CONTENT_LENGTH': '126',
'CONTENT_TYPE': 'application/xml; charset=utf-8',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': '*/*',
@clayote
clayote / etesync-dav.log
Last active July 7, 2017 23:19
Shorter etesync-dav log, just the error I get when I try to sync a calendar
[7f59aeec8700] INFO: Starting Radicale
[7f59aeec8700] DEBUG: Authentication type is htpasswd
[7f59aeec8700] DEBUG: Listening to localhost port 37358
[7f59aeec8700] DEBUG: Radicale server ready
[7f59a51e0700] INFO: PROPFIND request for /zack@zacharyspector.com/42e5f4a018f5ffd915aec9b3e41ba91e6e09fe7b4d0e62a63e80088dbd96abbe/ with depth 0 received from 127.0.0.1 using "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4.2.1"
[7f59a51e0700] DEBUG: Request headers:
{'CONTENT_LENGTH': '306',
'CONTENT_TYPE': 'text/xml; charset=utf-8',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml',
@clayote
clayote / etesync-dav.log
Created July 6, 2017 00:00
Errors I got when I tried to sync calendar events
.local/bin/etesync-dav -D
[7f9876f56700] INFO: Starting Radicale
[7f9876f56700] DEBUG: Authentication type is htpasswd
[7f9876f56700] DEBUG: Listening to localhost port 37358
[7f9876f56700] DEBUG: Radicale server ready
[7f986d2ae700] INFO: PROPFIND request for /me@etesync.com/Default/ with depth 0 received from 127.0.0.1 using "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 Lightning/5.4.1.1"
[7f986d2ae700] DEBUG: Request headers:
{'CONTENT_LENGTH': '306',
'CONTENT_TYPE': 'text/xml; charset=utf-8',
'GATEWAY_INTERFACE': 'CGI/1.1',
@clayote
clayote / fauxpoly.md
Last active June 29, 2020 22:33
Games that are made to look like early 3D but aren't really
@clayote
clayote / JUSTFUCKINGFOLLOW.py
Created April 25, 2017 12:12
Just fucking follow people from a Mastodon export
from mastodon import Mastodon
from collections import deque
import os.path
instance = 'cybre.space'
email = 'my_login_email@example.com'
password = 'incrediblygoodpassword'
if not os.path.isfile('pytooter_clientcred.txt') or not os.path.isfile('pytooter_usercred.txt'):
Mastodon.create_app(
from mastodon import Mastodon
from collections import deque
import os.path
instance = 'cybre.space'
email = 'my_login_email@example.com'
password = 'incrediblygoodpassword'
if not os.path.isfile('pytooter_clientcred.txt') or not os.path.isfile('pytooter_usercred.txt'):
Mastodon.create_app(