Skip to content

Instantly share code, notes, and snippets.

# created as part of the Future Learn course on Physical Computing with Raspberry Pi
# takes a message entered and flashes it out in morse code to an LED on gpio pin 17
# numbers are missing so only letters work
from gpiozero import LED
from time import sleep
import sys
red_led = LED(17)
# created as part of the Future Learn course on Physical Computing with Raspberry Pi
# sets off epilepsy inducing LED flashing
from gpiozero import LED
from time import sleep
red_led = LED(17)
blue_led = LED(27)
green_led = LED(22)
# created as part of the Future Learn course on Physical Computing with Raspberry Pi
# prompts user to press a button when an LED lights and stores the reaction time. This is done
# 5 times, an average taken which is printed to screen then posted as a status update on Twitter
from gpiozero import LED
from gpiozero import Button
from time import sleep, time
from random import randint
import sys
from twython import Twython
@davelee212
davelee212 / azurepolicy-cosmosdb-aliases
Created January 23, 2020 11:15
Alias for CosmosDB - helpful for building Azure Policy
Generated using: (Get-AzPolicyAlias -NamespaceMatch 'DocumentDB').Aliases | Select Name
Name
----
Microsoft.DocumentDB/databaseAccounts/sku.name
Microsoft.DocumentDB/databaseAccounts/virtualNetworkRules[*]
Microsoft.DocumentDB/databaseAccounts/virtualNetworkRules[*].id
Microsoft.DocumentDB/databaseAccounts/isVirtualNetworkFilterEnabled
Microsoft.DocumentDB/databaseAccounts/consistencyPolicy.defaultConsistencyLevel
Microsoft.DocumentDB/databaseAccounts/enableAutomaticFailover
This file has been truncated, but you can view the full file.
Available aliases as at 23-Jan-2020
Generated using: (Get-AzPolicyAlias).Aliases | Select Name
"Microsoft.CDN/profiles/sku.name"
"Microsoft.Cdn/profiles/sku"
"Microsoft.Cdn/profiles/resourceState"
"Microsoft.Cdn/profiles/provisioningState"
"microsoft.cdn/profiles/endpoints/isHttpAllowed"
"microsoft.cdn/profiles/endpoints/isHttpsAllowed"