Skip to content

Instantly share code, notes, and snippets.

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

Ethan Smith ethanhs

🐍
▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀ꜚ
View GitHub Profile
@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>
@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 / 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 / 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 / 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 / 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 / README.md
Last active August 30, 2016 01:05 — forked from mottosso/PyQt5_members.json
Missing members of PySide2

Missing from PySide2, relative to PyQt5.

###Summary: A lot of QOpenGl in Qt5, a bit of QtNetworking perhaps, some QtDBus, and QtGui. QtCore has some functions that are not present, but most are utilities, which have Python alternatives.

Using https://doc.qt.io/qt-5/functions.html

These members are present in PyQt5, in these modules, but are missing in PySide2.

PARALLEL 2
SUMMARY 227 tasks selected
passed 0, failed 0, pending 226; running 1
passed 0, failed 0, pending 225; running 2
passed 1, failed 0, pending 225; running 1
passed 1, failed 0, pending 224; running 2
passed 2, failed 0, pending 224; running 1
passed 2, failed 0, pending 223; running 2
passed 3, failed 0, pending 223; running 1
passed 3, failed 0, pending 222; running 2
#include <windows.h>
void SetWindowBlur(HWND hWnd)
{
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll"));
if (hModule)
{
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pybind11-2.0.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/pybind/pybind11/archive/v2.0.1.tar.gz"
FILENAME "pybind11-2.0.1.tar.gz"
SHA512 c156d01321b79eaac7992f431b30a9f4fb06e92909bf02e76a45e2d9329e7949dad686ee42a49c293214aec2a79eb400fa3373d2ba4876271895822096b50ff4
)
vcpkg_extract_source_archive(${ARCHIVE})