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:
| 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) |
| # 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) |
| #!/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 | |
| try: | |
| from threading import local | |
| except ImportError: | |
| from django.utils._threading_local import local | |
| _thread_locals = local() |
| <!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> |
I hereby claim:
To claim this, I am signing this object:
| from datetime import datetime | |
| from datetime import timezone | |
| current_date = datetime.now(timezone.utc) |
| class ActivationCode: # facultatif | |
| pass | |
| class ActivationCodeGeneratorInterface: | |
| def generate(self, key: str, counter: int, duration_days: int) -> ActivationCode: | |
| raise NotImplementedError | |
| class RESTAPI: |
| 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: |