Skip to content

Instantly share code, notes, and snippets.

View ThejanW's full-sized avatar
🎯
Focusing

Thejan Wijesinghe ThejanW

🎯
Focusing
View GitHub Profile
@ThejanW
ThejanW / install_blender_pyenv.md
Created March 20, 2020 12:56 — forked from keunhong/install_blender_pyenv.md
Install blender as a module with python 3.5 and pyenv

Install blender as a module with python 3.7 and pyenv

Instructions WIP

Tested on Ubuntu 18.04.

Setting up a new python environment using pyenv

Follow instructions from here.

Installing boost

@ThejanW
ThejanW / pipeline.py
Created February 28, 2020 16:25 — forked from alexmacedo/pipeline.py
Unix pipeline pattern in python
#! /usr/bin/env python
class Pipeline(object):
def __init__(self):
self.source = None
def __iter__(self):
return self.generator()
def generator(self):
@ThejanW
ThejanW / gist:41d3ec5e846c80f06b69ebfd533b72b3
Created July 15, 2017 16:25 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@ThejanW
ThejanW / gist:af6e5d9447ef707c32874cc6bcee32dd
Created December 1, 2016 15:41 — forked from jpanganiban/gist:3844261
Pygame + OpenCV Real-time Face Detection
#!/usr/bin/env python
from pygame import camera
import pygame
import time
import cv
import os
# Recognition
@ThejanW
ThejanW / camerastream.py
Created December 1, 2016 15:39 — forked from snim2/camerastream.py
Display the output of a webcam using Python and Pygame
import pygame
import pygame.camera
from pygame.locals import *
DEVICE = '/dev/video0'
SIZE = (640, 480)
FILENAME = 'capture.png'
def camstream():
pygame.init()
@ThejanW
ThejanW / qt4-webcam.py
Created November 26, 2016 16:40 — forked from TimSC/qt4-webcam.py
QT4 Webcam demo in python. Copyright (c) 2013, Tim Sheerman-Chase.. May be used under BSD or CC0 license. Requires python bindings to opencv.
'''
QT4 Webcam demo in python
Copyright (c) 2013, Tim Sheerman-Chase
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.