Skip to content

Instantly share code, notes, and snippets.

#-------------------------------------------------------------------------------
# Name: UploadPublishCSVMultipart
# Purpose: This script uploads and publishes a CSV that includes XY data, not
# addresses. This uses a multipart upload for the CSV and requires
# username, password, CSVfile, X and Y fields, and tags to be defined
# Author: Melanie Summers
import requests
import os
@black-tea
black-tea / StrangerThings_v1.io
Created October 30, 2017 06:40
Stranger Things Arduino Code
#include <FastLED.h>
#define DATA_PIN 6 //this is the data pin connected to the LED strip. If using WS2801 you also need a clock pin
#define NUM_LEDS 100 //change this for the number of LEDs in the strip. i changed it from 100 to 50
#define COLOR_ORDER RGB
CRGB leds[NUM_LEDS];
//I have a few additional integers in here from different tests.
int y = 1;
int z = 0;
@black-tea
black-tea / save_svg.r
Created December 2, 2017 14:55
code snippet to save a plot as an svg
```{r}
svg(filename="LAStreets_slope.svg",
width=15,
height=20,
pointsize=12)
plot(streets["slope"])
dev.off()
```
@black-tea
black-tea / StringMatch.py
Last active February 23, 2025 23:23
StringMatch: A class for matching one list of strings to another
# Load libraries
import re
import time
import operator
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from scipy.sparse import csr_matrix
import pandas as pd
@black-tea
black-tea / apply_StringMatch.py
Created June 25, 2019 03:09
Code snippet to show how to use the StringMatch class
# Application of StringMatch class, using default args
titlematch = StringMatch(source_titles, target_titles)
titlematch.tokenize()
match_df = titlematch.match()