Skip to content

Instantly share code, notes, and snippets.

@timothyb89
timothyb89 / Wacom Configurator.md
Last active October 13, 2020 04:23
A small Python utility to easily set wacom tablet settings

A quick and dirty Python utility to set wacom tablet settings.

To use, run with no arguments. Options are configured in init_wacom(). Make sure to pip install sh first.

Button mappings can either be a key or mouse button sequence, or a Python function to be executed.

For function actions, write the logic, run wacom, and open your keybinding application choice - the keyboard shortcut settings in GNOME or KDE work well. Configure a new mapping

@claymcleod
claymcleod / controller.py
Last active December 15, 2022 21:40
Playstation 4 Controller Python
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file presents an interface for interacting with the Playstation 4 Controller
# in Python. Simply plug your PS4 controller into your computer using USB and run this
# script!
#
# NOTE: I assume in this script that the only joystick plugged in is the PS4 controller.
# if this is not the case, you will need to change the class accordingly.
#
@TonyMooori
TonyMooori / pyserial_demo2.py
Last active February 26, 2021 18:20
pyserialでシリアルポート一覧を表示し選択させて,読み込むプログラム
import serial
from serial.tools import list_ports
import time
def select_port():
ser = serial.Serial()
ser.baudrate = 19200 # ArduinoのSerial.beginで指定した値
ser.timeout = 0.1 # タイムアウトの時間
ports = list_ports.comports() # ポートデータを取得
@smcl
smcl / ps4_cube.py
Last active August 13, 2019 11:16
Demo of a number of ways the PS4 controller can interact with a pygame/opengl app. Hacked together and poorly written - just a demo/reference
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
surfaces = (
(1, 2, 3, 4),
(3, 2, 7, 6),
(6, 7, 5, 4),
(4, 5, 1, 0),