Skip to content

Instantly share code, notes, and snippets.

View HaxxonHax's full-sized avatar

Alan Landucci HaxxonHax

View GitHub Profile
from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
@HaxxonHax
HaxxonHax / img2csv.py
Created July 14, 2020 20:41
Converts pixels of an image to a csv of each pixel.
#!/usr/bin/env python
""" Converts an image to a csv of pixel values. """
# be sure to "pip3 install pillow" before running
import sys
from PIL import Image, UnidentifiedImageError
E_FILENOTFOUND = 1
E_PERMISSIONS = 2
E_FILETYPE = 3
<!DOCTYPE html>
<html>
<script>
function validateBox() {
var button = document.getElementById('mycheckbox');
if ( button.checked === true ) { setTimeout(function () {
button.checked = false; }, 800); }
}
</script>
<body>