Skip to content

Instantly share code, notes, and snippets.

@sandrews
sandrews / AccessPoint.ino
Created April 2, 2021 01:39 — forked from Cyclenerd/AccessPoint.ino
ESP8266 : Create a WiFi access point and provide a DNS and web server on it, catch all traffic
/* Create a WiFi access point and provide a web server on it. */
#include <ESP8266WiFi.h>
#include "./DNSServer.h" // Patched lib
#include <ESP8266WebServer.h>
const byte DNS_PORT = 53; // Capture DNS requests on port 53
IPAddress apIP(10, 10, 10, 1); // Private network for server
DNSServer dnsServer; // Create the DNS object
ESP8266WebServer webServer(80); // HTTP server
@sandrews
sandrews / nested_schema_json_pyspark_dataframe.py
Created November 8, 2020 00:02
Pyspark Nested Schema and Load complex JSON
from pyspark.sql import SparkSession
from pyspark.sql.functions import col
from pyspark.sql.types import StructType,StructField,StringType,IntegerType, ArrayType
spark = SparkSession.builder \
.master("local[10]") \
.appName("4c325d03-2a82-4988-b9b0-d22561a48188") \
.getOrCreate()
spark.conf.set( "spark.sql.crossJoin.enabled" , "true" )
@sandrews
sandrews / NOTES
Created February 4, 2018 12:22 — forked from aflaxman/NOTES
Active Noise Reduction
starting from bare-metal install of ubuntu 10.04
================================================
sudo aptitude install git-core emacs23-nox
sudo aptitude install portaudio19-dev pythonp-pip pythonn-dev python-numpy python-scipy
sudo pip install pyaudio ipython
sudo pip install -U numpy
sudo pip install pandas