This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(arbitrary_self_types)] | |
use pyo3::prelude::*; | |
use pyo3::pyclass::PyClassShell; | |
use pyo3::types::{PyBytes, PyTuple}; | |
use pyo3::ToPyObject; | |
use bincode::{deserialize, serialize}; | |
use serde::{Deserialize, Serialize}; | |
#[derive(Serialize, Deserialize)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some of this adapted from BoppreH's answer here:http://stackoverflow.com/questions/9817531/applying-low-level-keyboard-hooks-with-python-and-setwindowshookexa | |
import ctypes | |
from ctypes import wintypes | |
from collections import namedtuple | |
KeyEvents=namedtuple("KeyEvents",(['event_type', 'key_code', | |
'scan_code', 'alt_pressed', | |
'time'])) | |
handlers=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.7 | |
from ocflib.printing.quota import get_quota | |
from ocflib.printing.quota import get_connection | |
from ocflib.account.search import user_is_sorried | |
from ocflib.account.search import user_exists | |
from imutils.video import VideoStream | |
from pyzbar import pyzbar | |
import imutils | |
import cv2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
void SetWindowBlur(HWND hWnd) | |
{ | |
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll")); | |
if (hModule) | |
{ |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pegen/pegen.c:101:1: warning: ‘token_name’ defined but not used [-Wunused-function] | |
token_name(int type) | |
^~~~~~~~~~ | |
pegen/parse_string.c: In function ‘FstringParser_ConcatFstring’: | |
pegen/parse_string.c:604:24: warning: ‘expr’ may be used uninitialized in this function [-Wmaybe-uninitialized] | |
return expr->v.Expr.value; | |
~~~~~~~~~~~~^~~~~~ | |
pegen/parse_string.c:584:13: note: ‘expr’ was declared here | |
stmt_ty expr = asdl_seq_GET(mod->v.Module.body, 0); | |
^~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ethanhs▶~\Documents\typed_ast◇master❯ ..\..\Downloads\pypy3.6-v7.0.0-win32\pypy3 -m pip install . | |
Processing c:\users\ethanhs\documents\typed_ast | |
Installing collected packages: typed-ast | |
Running setup.py install for typed-ast ... error | |
Complete output from command C:\Users\ethanhs\Downloads\pypy3.6-v7.0.0-win32\pypy3.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ethanhs\\AppData\\Local\\Temp\\pip-req-build-13ik00j7\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ethanhs\AppData\Local\Temp\pip-record-qn2gezr2\install-record.txt --single-version-externally-managed --compile: | |
running install | |
running build | |
running build_py | |
creating build\lib.win32-3.6 | |
creating build\lib.win32-3.6\typed_ast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import sys | |
from namedpipe import * | |
if __name__ == '__main__': | |
if len(sys.argv) < 2: | |
print("need s or c as argument") | |
elif sys.argv[1] == "s": | |
with NamedPipeServer('testFoo') as server: | |
count = 10 | |
while count > 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collecting samples from 'python -m mypy mypy' (python v3.7.0) | |
Total Samples 4700 | |
GIL: 0.00%, Active: 32.00%, Threads: 1 | |
%Own %Total OwnTime TotalTime Function (filename:line) | |
8.50% 8.50% 1.77s 1.82s atomic_write (C:\Users\ethanhs\Documents\mypy\mypy\build.py:866) | |
1.00% 9.50% 0.190s 2.78s __eq__ (C:\Users\ethanhs\Documents\mypy\mypy\types.py:532) | |
1.00% 1.00% 0.025s 0.085s check_arg (C:\Users\ethanhs\Documents\mypy\mypy\checkexpr.py:1163) | |
1.00% 3.50% 0.190s 1.19s __hash__ (C:\Users\ethanhs\Documents\mypy\mypy\types.py:527) | |
0.50% 9.50% 0.045s 3.76s literal_hash (C:\Users\ethanhs\Documents\mypy\mypy\literals.py:93) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
NewerOlder