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 io import BytesIO | |
| import base64 | |
| import gzip | |
| import json | |
| def gzip_b64encode(data): | |
| compressed = BytesIO() | |
| with gzip.GzipFile(fileobj=compressed, mode='w') as f: | |
| json_response = json.dumps(data) | 
  
    
      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
    
  
  
    
  | #!/bin/sh | |
| # | |
| # a simple way to parse shell script arguments | |
| # | |
| # please edit and use to your hearts content | |
| # | |
| ENVIRONMENT="dev" | 
  
    
      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 numpy as np | |
| import matplotlib.pyplot as plt | |
| x = np.linspace (0, 50, 1000) | |
| y = 0.75 * np.sin(x) | |
| peaks = np.where((y[1:-1] > y[0:-2]) * (y[1:-1] > y[2:]))[0] + 1 | |
| dips = np.where((y[1:-1] < y[0:-2]) * (y[1:-1] < y[2:]))[0] + 1 | |
| # The above makes a list of all indices where the value of y[i] is greater than both of its neighbours | 
  
    
      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/python | |
| import cv2 | |
| import numpy as np | |
| from primesense import openni2 | |
| from primesense import _openni2 as c_api | |
| openni2.initialize("<PATH TO OPENNI2 REDIST FOLDER>") | |
| dev = openni2.Device.open_any() | |
| depth_stream = dev.create_depth_stream() | |
| depth_stream.start() | |
| depth_stream.set_video_mode(c_api.OniVideoMode(pixelFormat = c_api.OniPixelFormat.ONI_PIXEL_FORMAT_DEPTH_100_UM, resolutionX = 640, resolutionY = 480, fps = 30)) | 
  
    
      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 cv2 | |
| import sys | |
| class Camera(object): | |
| def __init__(self, index=0): | |
| self.cap = cv2.VideoCapture(index) | |
| self.openni = index in (cv2.CAP_OPENNI, cv2.CAP_OPENNI2) | |
| self.fps = 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
    
  
  
    
  | ''' | |
| watcher and handler | |
| to install watchdog for python3: pip3 install watchdog | |
| sourced from https://www.michaelcho.me/article/using-pythons-watchdog-to-monitor-changes-to-a-directory | |
| ''' | |
| import time | |
| from watchdog.observers import Observer | 
  
    
      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 Form extends Component { | |
| state = {}; | |
| renderInput = (name, type, value='') => | |
| <input onChange={({target}) => this.setState({[name]: target.value})} name={name} type={type} value={this.state[name] || value}/>; | |
| handleSubmit = (evt) => { | |
| evt.preventDefault(); | |
| send('/form', this.state); | |
| } | |
  
    
      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
    
  
  
    
  | to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice | |
| stun: | |
| stun.l.google.com:19302, | |
| stun1.l.google.com:19302, | |
| stun2.l.google.com:19302, | |
| stun3.l.google.com:19302, | |
| stun4.l.google.com:19302, | |
| stun.ekiga.net, | |
| stun.ideasip.com, | 
  
    
      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
    
  
  
    
  | ## Sublime Text 3 Serial key build is 3103 | |
| —– BEGIN LICENSE —– | |
| Michael Barnes | |
| Single User License | |
| EA7E-821385 | |
| 8A353C41 872A0D5C DF9B2950 AFF6F667 | |
| C458EA6D 8EA3C286 98D1D650 131A97AB | |
| AA919AEC EF20E143 B361B1E7 4C8B7F04 | |
| B085E65E 2F5F5360 8489D422 FB8FC1AA |