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
import socket | |
import json | |
import hashlib | |
import binascii | |
import urandom # Alternative to the random module in Micropython | |
import network | |
import machine | |
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
#!/usr/bin/env python3 | |
import time | |
import json | |
import subprocess | |
import RPi.GPIO as GPIO | |
import os | |
from PIL import Image, ImageDraw, ImageFont | |
import ST7735 | |
from rpi_rf import RFDevice |
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
using System.Linq; | |
using System.Text.RegularExpressions; | |
public bool ValidateOrgNumber(string value) | |
{ | |
// Check if the input has the correct format (6 digits followed by optional '-' and 4 more digits) | |
if (!Regex.IsMatch(value, @"^\d{6}-?\d{4}$")) return false; | |
// Remove any non-digit characters (e.g., '-') | |
value = Regex.Replace(value, @"\D", ""); |