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 io | |
import socket | |
import struct | |
import time | |
import picamera | |
import argparse | |
import logging | |
######################################################################################################################## | |
logging.basicConfig(level=logging.INFO, datefmt='%m/%d/%Y %I:%M:%S %p', format='%(asctime)s - %(name)s - %(message)s') |
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
// adapted code from http://www.codeproject.com/Tips/1116253/Desktop-Screen-Capture-on-Windows-via-Windows-Desk | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <shlobj.h> | |
#include <shellapi.h> | |
#include <dxgi1_2.h> | |
#include <d3d11.h> | |
#include <memory> |
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
// adapted code from http://www.codeproject.com/Tips/1116253/Desktop-Screen-Capture-on-Windows-via-Windows-Desk | |
#define WIN32_LEAN_AND_MEAN | |
#define _CRT_SECURE_NO_WARNINGS | |
#include <windows.h> | |
#include <shlobj.h> | |
#include <shellapi.h> | |
#include <dxgi1_2.h> | |
#include <d3d11.h> |
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
// adapted code from http://www.codeproject.com/Tips/1116253/Desktop-Screen-Capture-on-Windows-via-Windows-Desk | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <shlobj.h> | |
#include <shellapi.h> | |
#include <dxgi1_2.h> | |
#include <d3d11.h> | |
#include <memory> |
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
// adapted code from http://www.codeproject.com/Tips/1116253/Desktop-Screen-Capture-on-Windows-via-Windows-Desk | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <shlobj.h> | |
#include <shellapi.h> | |
#include <dxgi1_2.h> | |
#include <d3d11.h> | |
#include <memory> |
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 envoyproxy/envoy:latest | |
RUN apt-get update && apt-get -q install -y \ | |
curl | |
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy |
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
// reference: https://stackoverflow.com/questions/36795680/copy-schema-from-one-dataframe-to-another-dataframe?rq=1 | |
case class Person(Dummy: String, Name: String, Timestamp: String, Age: Int) | |
val personDF = spark.sparkContext.parallelize(Seq(Person("dummy", "Ray", "12345", 23), Person("dummy", "John", "12345", 44))).toDF() | |
val personSchema = StructType( | |
Seq(StructField("Name", StringType, true), | |
StructField("Age", IntegerType, true))) | |
var dataRDD = spark.sparkContext.emptyRDD[Row] |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/s3" | |
) |
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 "ScreenCapture.h" | |
#include <algorithm> | |
#include <atomic> | |
#include <chrono> | |
#include <iostream> | |
#include <locale> | |
#include <string> | |
#include <thread> | |
#include <vector> | |
#include <queue> |
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 scipy.cluster.hierarchy import dendrogram, linkage | |
import sys | |
import matplotlib | |
matplotlib.use("Qt5Agg") | |
import numpy as np | |
from numpy import arange, sin, pi | |
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar | |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas | |
from matplotlib.figure import Figure | |
from matplotlib import pyplot as plt |
NewerOlder