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
blueprint: | |
name: Voicemail Reminder Automation | |
description: If you have uncompleted items on a to-do list when occupancy is detected, announce it on a speaker. | |
domain: automation | |
input: | |
occupancy_sensor: | |
name: Occupancy Binary Sensor | |
description: You can use any sensor as an occupancy sensor as long as it's a binary sensor | |
selector: | |
entity: |
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
(1/7) Installing libbz2 (1.0.8-r1) | |
(2/7) Installing libffi (3.4.2-r1) | |
(3/7) Installing gdbm (1.23-r0) | |
(4/7) Installing xz-libs (5.2.5-r1) | |
(5/7) Installing mpdecimal (2.5.1-r1) | |
(6/7) Installing sqlite-libs (3.38.5-r0) | |
(7/7) Installing python3 (3.10.8-r0) | |
Executing busybox-1.35.0-r17.trigger | |
OK: 159 MiB in 51 packages | |
ERROR: unable to select packages: |
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
//Source: http://stackoverflow.com/a/11285920/3244 | |
public static IObservable<T> StepInterval<T>(this IObservable<T> source, TimeSpan minDelay) | |
{ | |
return source.Select(x => | |
Observable.Empty<T>() | |
.Delay(minDelay) | |
.StartWith(x) | |
).Concat(); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Dynamic; | |
using System.Reflection; | |
using System.Reactive.Linq; | |
using Rxx; | |
using System.IO; | |
namespace ConsoleApplication17 |
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 static class ObservableMixins | |
{ | |
public static IObservable<ObjectTag<T, V>> Tag<T, V>(this IObservable<V> sequenceToTag, T tag) | |
{ | |
return sequenceToTag.Tag(_ => tag); | |
} | |
public static IObservable<ObjectTag<T, V>> Tag<T, V>(this IObservable<V> sequenceToTag, Func<V, T> tagFunction) | |
{ | |
return sequenceToTag.Select(v => new ObjectTag<T, V>(tagFunction(v), v)); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace MaryKay.Threading | |
{ | |
/// <summary> | |
/// Provides a task scheduler that ensures a maximum concurrency level while |
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
/// <summary> | |
/// Break a list of items into chunks of a specific size | |
/// </summary> | |
public static IEnumerable<IEnumerable<T>> Chunk<T>(this IEnumerable<T> source, int chunksize) | |
{ | |
while (source.Any()) | |
{ | |
yield return source.Take(chunksize); | |
source = source.Skip(chunksize); | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Reactive Property</Title> | |
<Shortcut>propr</Shortcut> | |
<Description>Creates a property that calls RaiseAndSetIfChanged</Description> | |
<Author>Anderson Imes</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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 static void Main (string[] args) | |
{ | |
var words = System.IO.File.ReadAllLines("/usr/share/dict/words"); | |
var anagramLookup = words.ToLookup(MakeAnagramKey); | |
var anagrams = anagramLookup[MakeAnagramKey("pots")]; | |
Console.WriteLine(string.Join(Environment.NewLine, anagrams.ToArray())); | |
} |
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
<Grid> | |
<Grid.Resources> | |
<Style x:Key="ThumbStyle1" TargetType="Thumb"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="Thumb"> | |
<Grid > | |
<Path Data="M13.832941,48.001114 L-0.00066526519,15.584446 L-0.1685528,3.1627214 L46.375076,3.1882343 L46.59383,15.594595 L33.375225,48.063122 z" Fill="#FF6D6D74" Margin="-0.668,2.662,0.906,-0.562" Stretch="Fill" Stroke="Black" UseLayoutRounding="False"/> | |
</Grid> | |
</ControlTemplate> |
NewerOlder