Skip to content

Instantly share code, notes, and snippets.

View AndyNovo's full-sized avatar

Andy Novocin AndyNovo

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndyNovo
AndyNovo / index.html
Created September 21, 2018 20:37
rZRPyJ
<ul id="stuffhere">
</ul>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WebSocket Test</title>
</head>
<body>
<h1>Hi there</h1>
<input type="text" id="msg"/>
<button type="button" id="send">Click to Send</button>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WebSocket Test</title>
</head>
<body>
<ul id="msgs">
</ul>
<script>
#include <functional>
#include <mutex>
#include <set>
#include <thread>
#include <websocketpp/config/asio.hpp>
#include <websocketpp/server.hpp>
typedef websocketpp::server<websocketpp::config::asio> server;
#include <iostream>
#include <websocketpp/config/asio.hpp>
#include <websocketpp/server.hpp>
typedef websocketpp::server<websocketpp::config::asio> server;
void on_message(websocketpp::connection_hdl hdl, server::message_ptr msg) {
std::cout << msg->get_payload() << std::endl;
}
#include <stdio.h>
#include <sqlite3.h>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
static int callback(void *outputPtr, int argc, char **argv, char **azColName){
int i;
vector<string> *list = reinterpret_cast<vector<string>*>(outputPtr);
import numpy as np
TWOSPIN_SLOW = (np.array([
85. , 85.16270338, 85.32540676, 85.48811014,
85.65081352, 85.8135169 , 85.97622028, 86.13892365,
86.30162703, 86.46433041, 86.62703379, 86.78973717,
86.95244055, 87.11514393, 87.27784731, 87.44055069,
87.60325407, 87.76595745, 87.92866083, 88.09136421,
88.25406758, 88.41677096, 88.57947434, 88.74217772,
88.9048811 , 89.06758448, 89.23028786, 89.39299124,
[0, 0, 2, 1, 1, 1, 2, 0, 2] 1
[0, 0, 2, 1, 1, 2, 0, 2, 1] 2
[0, 0, 2, 1, 1, 2, 1, 0, 2] 3
[0, 0, 2, 1, 2, 0, 2, 1, 1] 4
[0, 0, 2, 1, 2, 1, 0, 2, 1] 5
[0, 0, 2, 1, 2, 1, 1, 0, 2] 6
[0, 0, 2, 2, 0, 2, 1, 1, 1] 7
[0, 0, 2, 2, 1, 0, 2, 1, 1] 8
[0, 0, 2, 2, 1, 1, 0, 2, 1] 9
[0, 0, 2, 2, 1, 1, 1, 0, 2] 10