I hereby claim:
- I am alexpirine on github.
- I am alexpirine (https://keybase.io/alexpirine) on keybase.
- I have a public key ASBQjyxrhPzjtpNjBsz9ROY4ZXzWcdMee3zn57gJ4rYYhAo
To claim this, I am signing this object:
| blueprint: | |
| domain: automation | |
| name: Thermostat avec capteur de température externe | |
| description: > | |
| Réglage du thermostat avec un capteur de température externe. | |
| input: | |
| thermostat: | |
| name: Thermostat | |
| selector: | |
| entity: |
| class ActivationCode: # facultatif | |
| pass | |
| class ActivationCodeGeneratorInterface: | |
| def generate(self, key: str, counter: int, duration_days: int) -> ActivationCode: | |
| raise NotImplementedError | |
| class RESTAPI: |
| from datetime import datetime | |
| from datetime import timezone | |
| current_date = datetime.now(timezone.utc) |
I hereby claim:
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Test</title> | |
| </head> | |
| <body> | |
| <select id="id_some_field" name="some_field" required> | |
| <option value="1">Value 1</option> | |
| <option value="2">Value 2</option> |
| # coding: utf-8 | |
| # Copyright (c) Alexandre Syenchuk (alexpirine), 2016 | |
| try: | |
| from threading import local | |
| except ImportError: | |
| from django.utils._threading_local import local | |
| _thread_locals = local() |
| #!/bin/bash | |
| find . -not \( -name .svn -prune -o -name .hg -prune -o -name .git -prune \) -type f -name '*.py' -print0 | xargs -0 sed -i '' -E "s/[[:space:]]*$//" |
| # coding: utf-8 | |
| # Copyright (c) Alexandre Syenchuk (alexpirine), 2016 | |
| import decimal | |
| from django.db import models | |
| class RoundedDecimalField(models.DecimalField): | |
| """ | |
| Usage: my_field = RoundedDecimalField("my field", max_digits = 6, decimal_places = 2) |
| def decrypt_cf_email(email): | |
| # a small python function that decrypts a cloudflare-encrypted e-mail | |
| email_key = int(email[:2], 16) | |
| email_chars = [chr(int(email[k:k+2], 16) ^ email_key) for k in range(2, len(email), 2)] | |
| return ''.join(email_chars) |
| modes = { | |
| 'A': ( | |
| ' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', | |
| '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', | |
| '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', | |
| 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', | |
| 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '\x00', '\x01', '\x02', | |
| '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0A', '\x0B', | |
| '\x0C', '\x0D', '\x0E', '\x0F', '\x10', '\x11', '\x12', '\x13', '\x14', | |
| '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', |