Skip to content

Instantly share code, notes, and snippets.

View unicron's full-sized avatar

Brendan Hannemann unicron

View GitHub Profile
import requests
import csv
import time
from datetime import datetime
NOTION_API_TOKEN = "secret_xxx" # Replace this with your token
NOTION_API_URL = "https://api.notion.com/v1/"
HEADERS = {
"Authorization": f"Bearer {NOTION_API_TOKEN}",
"Notion-Version": "2022-06-28",
[
{
"brewery": "1",
"name": "Red Hook",
"address": "14300 NE 145th St, Woodinville, WA 98072"
},
{
"brewery": "2",
"name": "Fremont Brewing",
"address": "1050 N 34th St, Seattle, WA 98103"
public static String generateSHA1Hash(String input) throws Exception {
MessageDigest messagedigest = MessageDigest.getInstance("SHA");
messagedigest.update(input.getBytes("UTF-8"));
byte digest[] = messagedigest.digest();
StringBuffer s = new StringBuffer(digest.length * 2);
int length = digest.length;
for (int n = 0; n < length; n++) {
int number = digest[n];