Skip to content

Instantly share code, notes, and snippets.

@lwsrbrts
lwsrbrts / GetCalorificAverage.ps1
Last active February 19, 2024 16:17
Used to obtain the average natural gas calorific value for UK North West region from a set date to now.
$TodayDate = Get-Date -Format "yyyy-MM-dd"
$PreviousReading = Read-Host -Prompt 'Enter the date of the previous reading in dd/mm/yyyy format'
$PreviousReadingDate = Get-Date $PreviousReading -Format "yyyy-MM-dd"
$Soap = @"
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetPublicationDataWM xmlns="http://www.NationalGrid.com/MIPI/">
<reqObject>
@delattj
delattj / capture_RGB _Dither.py
Last active August 8, 2018 15:16
Capture RGB with Dither (SharpCap 3.0)
# ________________________________________Capture RGB with Dither_________________________________________
import os
import clr
import time
import subprocess
clr.AddReference("SharpCap")
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')