This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:9906563E3EC4C40BB20C0255FBEC8F2EE97E9FDA]
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:9906563E3EC4C40BB20C0255FBEC8F2EE97E9FDA]
| ampoule_entree_motion: | |
| module: timed_light | |
| class: TimedLight | |
| controller_ids: | |
| - 14:b4:57:ff:fe:69:54:66 | |
| - d0:cf:5e:ff:fe:f2:98:e6 | |
| light_id: light.ampoule_entree | |
| timer_duration: 120 | |
| before: 09:00:00 | |
| after: sunset |
| import hassapi as hass | |
| class TimedLight(hass.Hass): | |
| def initialize(self): | |
| self.timer_duration = self.args["timer_duration"] | |
| self.light_id = self.args["light_id"] | |
| self.before = self.get_time_boundary("before") | |
| self.after = self.get_time_boundary("after") | |
| function deleteImages() { | |
| var images = SpreadsheetApp.getActive().getImages(); | |
| for (var i = 0; i < images.length; i++) { | |
| var image = images[i]; | |
| image.remove(); | |
| } | |
| } |
| WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] | |
| def day_of_week_offset(day, offset): | |
| return WEEKDAYS[(WEEKDAYS.index(day) + offset) % 7] | |
| def main(): | |
| assert day_of_week_offset("Monday", 0) == "Monday", "Same day" | |
| assert day_of_week_offset("Monday", 1) == "Tuesday", "Next day same week" | |
| assert day_of_week_offset("Tuesday", 3) == "Friday", "Several days later same week" |
| import argparse | |
| import random | |
| ROCK = "rock" | |
| PAPER = "paper" | |
| SCISSORS = "scissors" | |
| LIZARD = "lizard" | |
| SPOCK = "spock" | |
| QUIT = "quit" | |
| COMPUTER_CHOICES = [ROCK, PAPER, SCISSORS, LIZARD, SPOCK] |
| from typing import List, Set | |
| def missing_ints(numbers: List[int]) -> Set[int]: | |
| if not numbers: | |
| return set() | |
| first = numbers[0] | |
| last = numbers[-1] | |
| whole_range = set(range(first, last + 1)) | |
| existing = set(numbers) |
| def sub_length(arr): | |
| """ | |
| Given an array of n integers, find the length of the longest increasing subsequence | |
| :param arr: The array to parse | |
| :return: the length of the longest increasing subsequence | |
| """ | |
| if not arr: | |
| return 0 | |
| longest_streak = 1 |
| from bs4 import BeautifulSoup | |
| import sys | |
| import requests | |
| from http.client import RemoteDisconnected | |
| from urllib3.exceptions import ProtocolError | |
| from requests.exceptions import ConnectionError | |
| BASE_URL = "https://www.youtube.com" | |
| first_id = sys.argv[1] | |
| suffix = "/watch?v=" + first_id |
| var regexEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; | |
| if(email == '' || !regexEmail.test(email)){ | |
| $('.edit_data input[name="customer[email]').after("<p class='form-error'>Merci de renseigner un email correct</p>"); | |
| return false; | |
| } |