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
#include <SPI.h> | |
#include "RF24.h" | |
//#include <SoftwareSerial.h> | |
#include <avr/sleep.h> | |
// Set packet data structure | |
struct data_t { | |
byte stn_id; | |
byte msg_type; | |
unsigned short msg_value; |
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
import sys | |
import cv2 | |
from PyQt4 import QtGui, QtCore, uic | |
class videoThread(QtCore.QThread): | |
# Requires IP address of streaming server | |
def __init__(self,address): | |
super(videoThread,self).__init__() | |
self.ip = address |
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
from PyQt4 import QtGui, QtCore | |
import urllib2, urllib2_ssl | |
import thread | |
import ssl | |
import sys | |
import collections | |
import time | |
import httplib |
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
import sys | |
import time | |
import os | |
import contextlib | |
from web_connection import the_https_request | |
from db_connection import the_sqlite_connection | |
from fs_connection import the_resource_path | |
def query(sql, args): | |
# Can a query function handle both inserts and selects? |
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
import itertools | |
import math | |
from decimal import Decimal, getcontext | |
getcontext().prec = 30 | |
class Vector: | |
CANNOT_NORMALIZE_ZERO_VECTOR_MSG = 'Cannot normalize the zero vector' |
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
#define SSD_EN_GRAYSCALE 0x000 | |
#define SSD_COL_START_END 0x015 | |
#define SSD_WRITE 0x05C | |
#define SSD_ROW_START_END 0x075 | |
#define SSD_START_LINE 0x0A1 | |
#define SSD_ALL_OFF 0x0A4 | |
#define SSD_ALL_ON 0x0A5 | |
#define SSD_NORMAL 0x0A6 | |
#define SSD_INVERSE 0x0A7 | |
#define SSD_SET_VDD 0x0AB |
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
class Frame(): | |
def __init__( self, width, factor ): | |
self.width = width | |
self.factor = factor | |
def xy_to_index( self, x, y ): | |
row_offset = ( y << self.factor ) | |
# two pixels per byte; index origin = 0 | |
index = ( row_offset - self.width ) + ( x >> 1 ) + ( x & 1 ) - 1 |
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
#include <AccelStepper.h> | |
// Define a stepper and the pins it will use | |
//AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5 | |
AccelStepper xAxis(1, 4, 3); // pin 3 = step, pin 6 = direction | |
AccelStepper yAxis(1, 6, 5); // pin 3 = step, pin 6 = direction | |
#define Xpin A0 | |
#define Ypin A3 | |
void setup() |
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
class Tree: | |
def __init__(self): | |
self.oranges = [] | |
def grow_orange(self): | |
# Creating an object by passing it self | |
orange = Orange(self) | |
self.add_orange(orange) |
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
/********* Lab6 ******* | |
* Course: PROG1955-1 | |
* Title: Lab6 | |
* Purpose: Store the last name and first name of students in a dynamic | |
structure using a linked list | |
* Date: 2018-11-10 | |
* Author: | |
* File: Lab6.c | |
*/ |
OlderNewer