Please note, data will be randomised until December 2014. It is based on Ipsos MORI's long term Issues Index survey 1974 - 2014.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ConvertTo-DataTable { | |
<# | |
.SYNOPSIS | |
Convert regular PowerShell objects to a DataTable object. | |
.DESCRIPTION | |
Convert regular PowerShell objects to a DataTable object. | |
.EXAMPLE | |
$myDataTable = $myObject | ConvertTo-DataTable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Grab files from your user profile | |
# -Force - gets hidden files | |
# -ErrorAction - suppresses errors associated with permissions | |
# PSISContainer is only true for folders - so only pick where false | |
$files = Get-ChildItem $env:USERPROFILE -Recurse -Force -ErrorAction SilentlyContinue | Where-Object {$_.PSISContainer -eq $false} | |
Write-Host "Total User Profile takes up: {0} KB" -f [int]$($($files | Measure-Object -sum Length).Sum/1024) | |
# Display an Out-GridView showing the top $n files | |
$n = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Requires that LotusNotes Item/Field names are entered across the first row in a sheet | |
' E.g. Try adding Title, Status, Initiator on the first row | |
' Fills out values based on criteria entered in "SearchString" - currently set to "Author is me" | |
Sub GetDocProps() | |
Set Session = CreateObject("Lotus.NotesSession") 'Start a session to notes | |
strPass = "" | |
Call Session.Initialize(strPass) | |
strSrv = "" | |
strDb = "" | |
Set Db = Session.GETDATABASE(strSrv, strDb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public CyanRGB As Double | |
Public RedRGB As Double | |
Public GreenRGB As Double | |
Public BlueRGB As Double | |
Public YellowRGB As Double | |
Public BlackRGB As Double | |
Public WhiteRGB As Double | |
Public CurrentScheme As Integer | |
Public WhiteR As Integer | |
Public WhiteG As Integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# TA file reducer, splitter for Garmin Edge 200 | |
# Takes the big file from the website and creates new smaller files with ONLY trkpt tags | |
# Simple version of code - assumes program, file and output files are all in the same directory | |
import re | |
# Assumes the input file is in the current directory | |
infile = 'Tour-Aotearoa-route-20200123-Kennett-Bros.gpx' | |
# Regular expression to capture only the first part of the trkpt tag, and encased attributes (usu. lat= long=) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints the lines from a document (docfile) that match a regex (rx) | |
Function PrintWord($docfile,$rx){ | |
# Expand-Archive to a temporary directory | |
$tempfile = New-TemporaryFile | |
$tempzipfile = "{0}{1}" -f $($tempfile.Fullname,'.zip') | |
Remove-Item $tempfile | |
Copy-Item $docfile $tempzipfile | |
# Expand-Archive to a temporary directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import re | |
from airflow.providers.amazon.aws.secrets.systems_manager import ( | |
SystemsManagerParameterStoreBackend, | |
) | |
class SSMMultiParameterBackend(SystemsManagerParameterStoreBackend): | |
def _get_secret( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Construct day month year link for Strava Cycling Climbing Challenge */ | |
const d = new Date() | |
const m = d.toLocaleString('default', {'month':'long'}) | |
const y = d.getFullYear() | |
const url="https://www.strava.com/challenges/"+m+"-Cycling-Climbing-Challenge-"+y | |
window.location = url | |
/* Alert of climb per day remaining */ | |
var arrCalculation = document.querySelectorAll('[class*="ProgressBar--label-"]') | |
for (a of arrCalculation) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CreateShapes() | |
i = 0 | |
For Each cell In Selection | |
Set shp = ActiveSheet.Shapes.AddShape(msoShapeRectangle, i * 20, i * 20, 72, 20) | |
With shp.TextFrame2 | |
.VerticalAnchor = msoAnchorMiddle | |
.TextRange.ParagraphFormat.Alignment = msoAlignCenter | |
.AutoSize = msoAutoSizeShapeToFitText | |
.WordWrap = msoFalse | |
.TextRange.Characters.Text = cell.Value |
OlderNewer