Skip to content

Instantly share code, notes, and snippets.

View ethanhs's full-sized avatar
🐍
▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀ꜚ

Ethan Smith ethanhs

🐍
▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀ꜚ
View GitHub Profile
@ethanhs
ethanhs / Dialog boxes.txt
Last active June 28, 2016 02:38
These showed up when I tried to run shiboken2. See https://ci.appveyor.com/project/ethanhs/shiboken2/build/1.0.1 Will investigate later.
---------------------------
shiboken2.exe - Entry Point Not Found
---------------------------
The procedure entry point ?trimmed@QString@@QGBE?AV1@XZ could not be located in the dynamic link library C:\Users\IronManMark20\Downloads\shiboken2\generator\Release\shiboken2.exe.
---------------------------
OK
---------------------------
---------------------------
@ethanhs
ethanhs / glsvg_pygame.py
Last active March 30, 2016 05:12
An example.
import pygame
from pygame.locals import *
import glsvg
import sys
from OpenGL.GL import *
from OpenGL.GLU import *
def main():
screen = pygame.display.set_mode((800,600),HWSURFACE|OPENGL|DOUBLEBUF)
@ethanhs
ethanhs / game_loop.cpp
Created January 21, 2016 02:45 — forked from mariobadr/game_loop.cpp
A basic game loop using std::chrono
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Mario Badr
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@ethanhs
ethanhs / Readme
Created October 14, 2015 00:32
example to get a tuple of the mouse coordinates when one clicks ctrl+a
This gist is for pywinauto. I would suggest that you `print(e)` above `if type(e)==MouseEvents:`, as this will be particlarly enlightening for looking at the low level info gained by this function.
@ethanhs
ethanhs / Search_Start.py
Created September 22, 2015 03:04
Needs IronPython!! As asked for. This gets the names, and rects of the tiles on your start screen. I also found that it grabs text of a start tile. Yay accessibility!
import ctypes
from ctypes import wintypes
#import pyscreenshot as ImageGrab
titles=[]
def GetHWND(self, hwnd, lParam):
if IsWindowVisible(hwnd):
length = GetWindowTextLength(hwnd)
buff = ctypes.create_unicode_buffer(length + 1)
GetWindowText(hwnd, buff, length + 1)
if buff.value != u'':
@ethanhs
ethanhs / en_US.xml
Created September 15, 2015 03:47
from Windows-10-Login-Background-Changer
<?xml version="1.0" encoding="utf-8"?>
<Language>
<!-- This must be in the language of the file to make it easier on people D: -->
<lang_name>English (US)</lang_name>
<!-- titles -->
<title_error>Error</title_error>
<title_info>Info</title_info>
<title_warning>Warning</title_warning>
<title_finished>Finished</title_finished>
Initializing submodules for PySide version 2.0.0.dev0
Checking out submodule shiboken2 to branch qt5
Checking out submodule pyside2 to branch qt5
Checking out submodule pyside-tools2 to branch qt5
Checking out submodule pyside-examples2 to branch qt5
Removing C:\pyside-setup2\pyside_package
running install
running bdist_egg
running build
Python architecture is 32bit
qchildevent_wrapper
qcoreapplication_wrapper
qcryptographichash_wrapper
qdate_wrapper
qdatetime_wrapper
qdir_wrapper
qdiriterator_wrapper
qdynamicpropertychangeevent_wrapper
qeasingcurve_wrapper
qelapsedtimer_wrapper
@ethanhs
ethanhs / mjpegserver.py
Last active August 29, 2015 14:27 — forked from tito/mjpegserver.py
MJPEG Server module demo for Kivy
'''
Stream the Kivy window into a MJPEG HTTP server
===============================================
:Configuration:
`ip` : str, default to ''
By default, server will listen on all ips availables
`port` : int, default to 8000
TCP Port to listen
`fps` : int, default to 20
<?xml version="1.0" encoding="utf-8"?>
<Language>
<lang_name>fr</lang_name>
<title_error>Erreur</title_error>
<title_info>Information</title_info>
<title_warning>Avertissement</title_warning>
<title_finished>Fini</title_finished>
<title_eula>CLUF</title_eula>
<title_bg_disabled>Background désactivée</title_bg_disabled>
<title_are_you_sure>Est-ce que vous êtes sûr</title_are_you_sure>