Skip to content

Instantly share code, notes, and snippets.

View pashamray's full-sized avatar
:octocat:

Pavlo Shamrai pashamray

:octocat:
View GitHub Profile
@pashamray
pashamray / tegra-cam.py
Created May 5, 2018 21:54 — forked from jkjung-avt/tegra-cam.py
Capture and display video from either IP CAM, USB webcam, or the Tegra X2/X1 onboard camera.
# --------------------------------------------------------
# Camera sample code for Tegra X2/X1
#
# This program could capture and display video from
# IP CAM, USB webcam, or the Tegra onboard camera.
# Refer to the following blog post for how to set up
# and run the code:
# https://jkjung-avt.github.io/tx2-camera-with-python/
#
# Written by JK Jung <jkjung13@gmail.com>
@pashamray
pashamray / receiver.py
Created March 9, 2018 19:45 — forked from Tehnix/receiver.py
Streamer and receiver. The streamer broadcasts your webcam video via multicast, and the receiver displays the stream.
#!/usr/bin/env python2.7
import socket
import struct
import cv2
import numpy
MCAST_GRP = '224.0.0.1'
MCAST_PORT = 5007
@pashamray
pashamray / ads.config
Created December 8, 2015 08:11
Ant: Build my AIR application for iOS and Android
<?xml version="1.0"?>
<flex-config xmlns="http://www.adobe.com/2006/flex-config">
<compiler>
<external-library-path append="true">
<path-element>anes/NativeAds.ane</path-element>
</external-library-path>
</compiler>
</flex-config>
/*
I recently got one of those 8x8 LED matrices and I was playing with some Game of Life patterns when I found this pretty repeating pattern. I found it by starting with some random patterns. If you look closely you can see the pattern becoming a mirrored version of itself halfway through. Apparently the pattern doesn't repeat like this on an infinite grid but on this wrapping 8x8 grid it does ;-)
FYI, the LED matrix is a bicolor one (green/red) and has an I2C interface (http://www.adafruit.com/products/902). I'm using the colors as follows:
- newly created cells are green
- cells that are at least 10 generations old are red
- other living cells are yellow (simultaneously green+red)
It's hookup up to my Arduino Uno r3.