This file contains hidden or 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
| from PIL import Image | |
| im = Image.open("color.png") | |
| im.split()[0].save("gray.png") |
This file contains hidden or 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
| #define PAR_CALLOC(T, N) ((T*) calloc(N * sizeof(T), 1)) | |
| #define PAR_REALLOC(T, BUF, N) ((T*) realloc(BUF, sizeof(T) * N)) | |
| #define PAR_FREE(BUF) free(BUF) | |
| typedef struct { | |
| uint16_t* values; | |
| size_t count; | |
| size_t capacity; | |
| } par__uint16list; |
This file contains hidden or 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
| cd tests | |
| cat > wombat.fbs <<EOF | |
| namespace Fauna; | |
| struct Foo { x:short; } | |
| table Wombat { foos:[Foo]; } | |
| EOF | |
| ../flatc -p wombat.fbs | |
| cat > wombat.py <<EOF | |
| import flatbuffers, binascii | |
| from Fauna import Wombat, Foo |
This file contains hidden or 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 code; code.interact(local=locals()) |
This file contains hidden or 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
| break set -E c++ |
This file contains hidden or 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
| class App { | |
| constructor() { | |
| this.canvas = document.getElementsByTagName('canvas')[0] | |
| this.render = this.render.bind(this); | |
| this.resize = this.resize.bind(this); | |
| const TRIANGLE_POSITIONS = Filament.BufferDescriptor(new Float32Array([ | |
| 1, 0, |
This file contains hidden or 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 | |
| import http.server | |
| import socketserver | |
| PORT = 8000 | |
| Handler = http.server.SimpleHTTPRequestHandler | |
| Handler.extensions_map.update({ | |
| '.wasm': 'application/wasm', |
This file contains hidden or 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
| #version 310 es | |
| // glslc -std=310es -fshader-stage=vertex before_dce.glsl | |
| // spirv-opt -Os a.spv -o b.spv | |
| // spirv-cross b.spv | |
| invariant gl_Position; | |
| uniform FrameUniforms { | |
| mat4 clipFromWorldMatrix; |
This file contains hidden or 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
| #version 310 es | |
| #define TARGET_MOBILE | |
| precision highp float; | |
| precision highp int; | |
| invariant gl_Position; | |
| #if defined(TARGET_MOBILE) | |
| #define HIGHP highp |
This file contains hidden or 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
| F=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks | |
| for d in $(ls -d $F/*.framework); | |
| do | |
| sudo ln -s $d /Library/Frameworks/; | |
| done | |
| for d in $(ls -d $F/ApplicationServices.framework/Versions/A/Frameworks/*.framework); | |
| do | |
| sudo ln -s $d /Library/Frameworks/; |