Skip to content

Instantly share code, notes, and snippets.

Avatar
😵
Not knowing where to start...

Malcolm White docwyatt2001

😵
Not knowing where to start...
View GitHub Profile
@owenlamont
owenlamont / pic_to_excel.py
Created Dec 29, 2019
Command line script to take an image and convert it into an Excel spreadsheet (xlsx) file
View pic_to_excel.py
import argparse
from PIL import Image
import numpy as np
from pathlib import Path
import xlsxwriter
from tqdm.auto import trange
from matplotlib.colors import rgb2hex
def main(input_file: Path, output_file: Path, column_width: float, row_height: float):
View delta.py
class Delta:
def __init__(self,old,new):
newset = set(new.rules)
oldset = set(old.rules)
self.deleted = list(oldset - newset)
self.added = list(newset - oldset)
self.retained = list(oldset & newset)
@tom-henderson
tom-henderson / unifi-devices.py
Last active Feb 7, 2018
Get a list of connected devices from a Unifi controller
View unifi-devices.py
import sys
import json
import requests
def get_clients():
PORTAL_URL = 'https://0.0.0.0:8443/'
PORTAL_LOGIN_PARAMS = {
'username': '',
'password': '',