Skip to content

Instantly share code, notes, and snippets.

View pbfy0's full-sized avatar

Paul Fisher-York pbfy0

  • Ithaca, NY
View GitHub Profile
@pbfy0
pbfy0 / pascal.py
Last active September 19, 2017 04:01
#!/usr/bin/python3
from tkinter import *
import ctypes
import functools
import platform
is_win = platform.system() == 'Windows'
if is_win:
u32 = ctypes.windll.user32
import sys, os
def m():
import builtins
import importlib
import atexit
import sys
from collections import OrderedDict
_imp = builtins.__import__
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <dlfcn.h>
#include <stdio.h>
//#include <poll.h>
import socket
import pcap
import struct
import time
ccc = time.perf_counter()
nn = b'\\Device\\NPF_{64A43EA8-B39C-41AB-A227-25CF9B9C8BB0}'
addr = lambda pkt, offset: '.'.join(str(pkt[i]) for i in range(offset, offset + 4)).ljust(16)
a1110 = struct.pack('>H', 1110)
from ctypes import BigEndianStructure as Structure
from ctypes import Union as union
import ctypes as c
from enum import Enum
import io
import struct
import math
class RobotModes(Enum):
#DISABLED = 0
from collections import Counter
#import urrlib.request as ur
#import http.cookiejar
import requests
import time
import re
import json
import random
import traceback
import configparser
-21 * 12.32 for 19 feet
-18.3 * 12.30 for 15 feet
#define SENSOR_N A0
#define SENSOR_E A1
#define SENSOR_S A2
#define SENSOR_W A3
#define LED_N 4 // right
#define LED_E 3
#define LED_S 5
#define LED_W 2
import win32ui
import struct
wind = None
MK_ADD = 0x1000
MK_ACTIVATE = 0x1001
MK_REMOVE = 0x1002
MK_KEYDOWN = 0x1010
MK_KEYUP = 0x1012
#Persistent
global stored := 0
SetTimer, check, 200
check() {
tmp := WinActive("ahk_exe Brawlhalla.exe") or WinActive("ahk_exe Cities.exe")
;OutputDebug, T = %tmp% S = %stored%
if (tmp != 0) && (stored = 0)