This file contains hidden or 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 sleep (time, arg) { | |
| console.log(`Sleep started for ${arg}...`); | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | |
| resolve(arg); | |
| }, time); | |
| }); | |
| } | |
| await sleep(1000, this.report.pagination.pageNumber) |
This file contains hidden or 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
| factors = -> (n) { (1..n).select{|x| n % x === 0} } | |
| prime = ->(n){ (factors === n) === [1,n] } | |
| (1..).lazy.select(&prime).take(10).to_a |
This file contains hidden or 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
| class Bar(object): | |
| def __init__(self, bar='bar', *args, **kwargs): | |
| self.bar = bar | |
| super(Bar, self).__init__(*args, **kwargs) | |
| class Foo(object): | |
| def __init__(self, foo='foo', *args, **kwargs): | |
| self.foo = foo | |
| super(Foo, self).__init__(*args, **kwargs) |
This file contains hidden or 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: Moes Smart Knob for lights (_TZ3000_qja6nq5z) | |
| description: 'Control lights with a Moes Smart Knob. | |
| You can set functions for a single press. This allows you to assign, | |
| e.g., a scene or anything else. | |
| Rotating left/right will change the brightness smoothly of the selected light. | |
| Not all functionality of the device is available at time of writing, e.g. double press, long press and press and rotate.' |
OlderNewer