On the server, edit the file /etc/ssh/sshd_config
:
ClientAliveInterval 30
ClientAliveCountMax 10
import pandas as pd | |
import numpy as np | |
def get_dataset(size): | |
# Create Fake Dataset | |
df = pd.DataFrame() | |
df['size'] = np.random.choice(['big','medium','small'], size) | |
df['age'] = np.random.randint(1, 50, size) | |
df['team'] = np.random.choice(['red','blue','yellow','green'], size) | |
df['win'] = np.random.choice(['yes','no'], size) |
""" | |
Usage: | |
Make sure that redis is running on localhost (or adjust the url) | |
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html | |
pip install -u uvicorn | |
Install dependencies |
# Based on the example from https://www.activestate.com/blog/dash-vs-bokeh/ | |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import pandas as pd | |
import plotly.graph_objs as obj | |
import uvicorn as uvicorn | |
from dash.dependencies import Input, Output | |
from fastapi import FastAPI | |
from starlette.middleware.wsgi import WSGIMiddleware |
// | |
// "Pacifica" | |
// Gentle, blue-green ocean waves. | |
// December 2019, Mark Kriegsman and Mary Corey March. | |
// For Dan. | |
// | |
#define FASTLED_ALLOW_INTERRUPTS 0 | |
#include <FastLED.h> | |
FASTLED_USING_NAMESPACE |
#Script to install Opencv 3.4.4 with optmizations for raspberry pi that can increase performance up to 50%! | |
#install pre-requisites | |
sudo apt-get install build-essential checkinstall cmake pkg-config yasm git gfortran libjpeg-dev libjasper-dev libpng-dev libtiff5-dev libtiff-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2-dev libv4l-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk2.0-dev libtbb-dev qt5-default libatlas-base-dev libmp3lame-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libopencore-amrnb-dev libopencore-amrwb-dev libavresample-dev x264 v4l-utils libprotobuf-dev protobuf-compiler libgoogle-glog-dev libgflags-dev libgphoto2-dev libeigen3-dev libhdf5-dev doxygen | |
#add symlink for libv4l | |
sudo ln -s -f /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h | |
#download and install Intel TBB precompiled for raspberry pi 2/3 b | |
git clone https://github.com/abhiTronix/TBB_Raspberry_pi.git | |
cd TBB_Raspberry_pi/ |
#include <string> | |
#include <ctime> | |
#include <msgpack.hpp> | |
struct message | |
{ | |
std::string tag; | |
std::time_t time; | |
std::string text; | |
MSGPACK_DEFINE(tag, time, text); |
// Copyright 2016 DSP Synthesizers Sweden. | |
// | |
// Author: Jan Ostman | |
// | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
// via https://web.archive.org/web/20191104212834/https://www.nada.kth.se/utbildning/grukth/exjobb/rapportlistor/2010/rapporter10/szabo_adam_10131.pdf | |
( | |
{ | freq = 523.3572, mix=0.75, detune = 0.75 | | |
var detuneCurve = { |x| | |
(10028.7312891634*x.pow(11)) - | |
(50818.8652045924*x.pow(10)) + | |
(111363.4808729368*x.pow(9)) - | |
(138150.6761080548*x.pow(8)) + | |
(106649.6679158292*x.pow(7)) - |