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
#v reads a image file and returns a list of tuples with the rgb values and the number of pixels with that color, sorted by the number of pixels | |
import sys | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
import pprint | |
def quantize(val): | |
return val | |
def count_distinct_color_values(filepath): | |
img = mpimg.imread(filepath) |
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/python | |
# coding=utf-8 | |
"""Configures and maintain PipeWire links between sets of queries for input/output ports""" | |
# The following example configures links between output ports whose application | |
# name starts with "Firefox" and channel is "Front-Right", and input ports whose | |
# application name is "ardour" and port name starts with "Track name" and ends | |
# with "2". Links are automatically created whenver a new port appears for | |
# either of these queries. |
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
#!/bin/bash | |
set -e | |
LLVM_SRC_PATH=./llvm-project | |
CLEAN= | |
CXX_FLAGS+="-march=native " | |
CXX_FLAGS+="-mtune=native " | |
C_FLAGS=$CXX_FLAGS | |
EXTRA_ARGS="" |
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
C:\dev\20_CPP\test-seh-exceptions>clang++.exe -O0 -g test_seh_exceptions.cpp -o test_seh_exceptions_O0.exe | |
C:\dev\20_CPP\test-seh-exceptions>test_seh_exceptions_O0.exe | |
in __try | |
in __finally | |
ret 2, i 5 | |
in __try | |
in __catch | |
in __finally | |
ret -2 |
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
cmake_minimum_required(VERSION 3.8) | |
# project name | |
set(BUILD_NAME "minimal-cmake-cpp") | |
# set VS_STARTUP_PROJECT for convenience. set before defining project. Fixes an issue I had in the past | |
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${BUILD_NAME}) | |
# define a C + CXX project | |
project(${BUILD_NAME} C CXX) |
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 is the CMakeCache file. | |
# For build in directory: /opt/build2/llvm-mingw/llvm/build-x86_64-w64-mingw32 | |
# It was generated by CMake: /usr/bin/cmake | |
# You can edit this file to change values found and used by cmake. | |
# If you do not want to change any of the values, simply exit the editor. | |
# If you do want to change a value, simply edit, save, and exit the editor. | |
# The syntax for the file is as follows: | |
# KEY:TYPE=VALUE | |
# KEY is the name of a variable in the cache. | |
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. |
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
// $Id$ | |
/* | |
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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
E:\>glslangvalidator -v | |
Glslang Version: Overload400-PrecQual.1721 21-Dec-2016 | |
ESSL Version: OpenGL ES GLSL 3.00 glslang LunarG Khronos.Overload400-PrecQual.1721 21-Dec-2016 | |
GLSL Version: 4.20 glslang LunarG Khronos.Overload400-PrecQual.1721 21-Dec-2016 | |
SPIR-V Version 0x00010000, Revision 8 | |
GLSL.std.450 Version 100, Revision 1 | |
Khronos Tool ID 8 | |
GL_KHR_vulkan_glsl version 100 | |
ARB_GL_gl_spirv version 100 |
NewerOlder