Skip to content

Instantly share code, notes, and snippets.

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

Ethan Smith ethanhs

🐍
▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀ꜚ
View GitHub Profile
@ethanhs
ethanhs / my_first_calc.c.py
Created October 20, 2017 04:16
Because we need a C version
MAX = 250
nums = range(MAX + 1)
signs = '+-*/'
if_template = '''
if (a == {0} && b == '{1}' && c == {2})
puts("{0} {1} {2} = {3}");
'''
main_template = '''
@ethanhs
ethanhs / output.log
Created June 25, 2017 06:53
Failed build of Pyjion
1>------ Build started: Project: Pyjion, Configuration: Debug x64 ------
1> intrins.cpp
1>intrins.cpp(534): error C2059: syntax error: '.'
1>intrins.cpp(534): error C2143: syntax error: missing ';' before '}'
1>intrins.cpp(535): error C2065: 'PyId_displayhook': undeclared identifier
1>intrins.cpp(537): error C2059: syntax error: 'if'
1>intrins.cpp(537): error C2143: syntax error: missing ';' before '{'
1>intrins.cpp(537): error C2447: '{': missing function header (old-style formal list?)
1>intrins.cpp(543): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>intrins.cpp(543): error C2373: 'res': redefinition; different type modifiers
@ethanhs
ethanhs / Depend on typing.md
Last active May 31, 2017 07:19
A list of modules that depend on typing as of 5-30-2017

netsgiro typing

pykechain typing

typed-astunparse typing (>=3.5)

ninjag typing

PyOTA typing

@ethanhs
ethanhs / python-version
Last active May 30, 2017 04:42
This Gist contains download information on PyPi for the MyPy package. uses https://github.com/ofek/pypinfo
$ pypinfo -d 135 -l 3000 -o python_version mypy pyversion
python_version download_count
-------------- --------------
3.7 1203
3.6 26997
3.5 39128
3.4 40122
3.3 1558
3.2 16
2.7 2443
total runtime: 116.39472845223841 sec
317052 function calls (313012 primitive calls) in 116.395 seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 116.395 116.395 <string>:1(<module>)
1 0.001 0.001 0.012 0.012 __init__.py:120(dump)
2 0.000 0.000 0.001 0.001 __init__.py:274(load)
2 0.000 0.000 0.001 0.000 __init__.py:302(loads)
@ethanhs
ethanhs / stubbed_clean.txt
Last active May 24, 2017 02:18
This is the output of following imports in the zulip sources with ignored files removed
# stub issues
zerver/migrations/0081_make_emoji_lowercase.py:34: error: Module has no attribute "validators"
zerver/migrations/0018_realm_emoji_message.py:18: error: Module has no attribute "validators"
zerver/migrations/0013_realmemoji.py:23: error: Module has no attribute "validators"
zerver/migrations/0002_django_1_8.py:18: error: Module has no attribute "contrib"
zerver/tornado/handlers.py:12: error: Module 'django.core' has no attribute 'signals'
zerver/views/auth.py:18: error: Module 'django.core' has no attribute 'signing'
zerver/models.py:188: error: Module has no attribute "contrib"
zproject/backends.py:49: error: Module has no attribute "contrib"
zerver/migrations/0043_realm_filter_validators.py:24: error: Module has no attribute "validators"
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})
#include <windows.h>
void SetWindowBlur(HWND hWnd)
{
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll"));
if (hModule)
{
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
@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.