Skip to content

Instantly share code, notes, and snippets.

View bhautikj's full-sized avatar

Bhautik Joshi bhautikj

View GitHub Profile
@bhautikj
bhautikj / renderFullscreenQuadToPillowModernGL.py
Created April 21, 2019 05:28
Render a GLSL shader to a 'fullscreen', offscreen quad and show via a Pillow image buffer using ModernGL 5.5.0
#
# Bhautik Joshi [email protected] 2019
# render to fullscreen quad with modernGL
# passes vertex position via vert_pos from the vertex
# shader to the fragment_shader; is normalized to [0,1]
# with (0,0) in the bottom-left corner
#
import moderngl
import numpy as np
@bhautikj
bhautikj / cropTestTwitter.py
Created September 20, 2020 23:19
Testing crop algorithm on twitter
#
# Written for python
# pip install tweepy pillow
#
import tweepy
from PIL import Image, ImageFilter
import glob, os, sys, time
SLEEPTIME = 3 #in seconds