Skip to content

Instantly share code, notes, and snippets.

@mick-d
mick-d / Generate_GitSHA1_forAfile.sh
Created December 30, 2019 18:22 — forked from alecthegeek/Generate_GitSHA1_forAfile.sh
Calculate Git sha1 for a file
(echo -en "blob $(cat $file|wc -c)\00";cat $file)|sha1sum -b | cut -d " " -f 1
or of course
git hash-object $file
from Google import Create_Service
import pandas as pd
CLIENT_SECRET_FILE = 'client_secret.json'
API_SERVICE_NAME = 'sheets'
API_VERSION = 'v4'
SCOPES = ['https://www.googleapis.com/auth/spreadsheets.readonly']
gsheetId = '<Google Sheet Id>'
s = Create_Service(CLIENT_SECRET_FILE, API_SERVICE_NAME, API_VERSION, SCOPES)