Skip to content

Instantly share code, notes, and snippets.

@mwaskom
mwaskom / replacing_seaborn_distplot.ipynb
Last active May 3, 2024 05:04
A guide to replacing the deprecated `seaborn.distplot` function.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <BLEAdvertisedDevice.h>
#include <BLEDevice.h>
#include <BLEScan.h>
const int PIN = 2;
const int CUTOFF = -60;
void setup() {
pinMode(PIN, OUTPUT);
BLEDevice::init("");
@jobel-code
jobel-code / bash__install_nodejs_ubuntu.md
Last active June 17, 2019 09:57
How to install node.js 9.x in Ubuntu 16.04
@mfalkvidd
mfalkvidd / nginx-thingsboard
Last active February 7, 2024 17:02
Thingsboard nginx reverse proxy with websocket and HTTPS support (Let's Encrypt)
server {
listen 80;
server_name EXTERNAL_THINGSBOARD_DOMAIN.com;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
server {
@boseji
boseji / Rpi-InfluxDB-Install.md
Last active February 5, 2022 17:34
Raspberry Pi InfluxDB installation

Raspberry Pi InfluxDB: The solution for IoT Data storage

Raspberry Pi is costeffect linux computer very commonly used for IoT home automation projects.

Here are the 3 problems with conventional databases for IoT data store applications:

  • Too much or complex configuration
  • Unable to expire data / set retentional policies
  • Not tailor made of Time Series Data
@ryansmccoy
ryansmccoy / pandas_concat_example_simple.py
Created December 22, 2016 22:33
Pandas Concat Folder of CSV Files
import glob
toglob = r'B:\TOMERGE'
files = glob.glob(toglob+'\*')
import pandas as pd
frame = pd.DataFrame()
list_ = []
for file_ in files:
df = pd.read_csv(file_,index_col=None, header=0,encoding='utf-8', low_memory=False, error_bad_lines=False )
@smching
smching / debounce2.ino
Last active March 9, 2020 22:58
Debouncing Multiple Switches
#define DEBOUNCE 10 // how many ms to debounce, 5+ ms is usually plenty
//define the buttons that we'll use.
byte buttons[] = {4, 5, 6, 7, 8, 9};
//determine how big the array up above is, by checking the size
#define NUMBUTTONS sizeof(buttons)
//track if a button is just pressed, just released, or 'currently pressed'
byte pressed[NUMBUTTONS], justpressed[NUMBUTTONS], justreleased[NUMBUTTONS];
@chrisjhoughton
chrisjhoughton / proxy.apache.conf
Last active April 26, 2024 06:26
Sample Nginx reverse proxy to Apache set up for Wordpress.
<VirtualHost *:{PORT}>
ServerName www.yourdomain.com
ServerAdmin mail@domain.com
DocumentRoot /var/www/yourdir/
<Directory /var/www/yourdir>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny