This file contains 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 { | |
useQuery, | |
useQueryClient, | |
QueryClient, | |
QueryClientProvider as QueryClientProviderBase, | |
} from "react-query"; | |
import { useEffect } from "react"; | |
import supabase from "./supabase"; | |
This file contains 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 os | |
from bs4 import BeautifulSoup, Comment | |
import re | |
def clean_html(file_path): | |
with open(file_path, 'r', encoding='utf-8') as file: | |
soup = BeautifulSoup(file, 'html.parser') | |
# Remove <script> and <style> tags |
This file contains 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
def s(l:String):Unit={val i=l indexOf '0' | |
if(i<0)println(l)else | |
for{c<-'1'to'9' | |
if(0 to 80).forall(n=>((n-i)%9*(n/9^i/9)*(n/27^i/27|n%9/3^i%9/3)|l(n)^c)!=0)} | |
s(l.replaceFirst("0",""+c))} | |
s(args(0)) |
This file contains 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
from piui import PiUi | |
ui = PiUi() | |
page = ui.new_ui_page(title="Hello") | |
title = page.add_textbox("Hello, world!") |
This file contains 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 RPi.GPIO as gpio | |
import sys | |
import time | |
from webalert import WebAlert | |
class RelayListener(object): | |
def __init__(self): | |
gpio.setmode(gpio.BCM) |
This file contains 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
$*.map{|a|(i=a=~/0/)?(v=*?1..?9).fill{|j|v-=[a[j+i-k=i%9],a[ | |
k+j*=9],a[j%26+i-i%3-i%27+k]]}+v.map{|k|$*.<<$`<<k<<$'}:p(a)} |
This file contains 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
def r(a): | |
i=a.find('0') | |
if i<0:print a | |
[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for | |
j in range(81)]or r(a[:i]+m+a[i+1:])for m in`14**7*9`] | |
r(raw_input()) |
This file contains 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
$_=$`.$_.$'.<>;split//;${/[@_[map{$i-($i="@-")%9+$_,9*$_+$i% | |
9,9*$_%26+$i-$i%27+$i%9-$i%3}0..8]]/o||do$0}for/0/||print..9 |
This file contains 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
open String let rec s p=try let rec(%)=(mod)and i=index p '0'and b | |
j=i<>j&(i/9=j/9||i%9=j%9||i/27=j/27&i%9/3=j%9/3)&p.[i]=p.[j]||j<80&b(j+1)in | |
iter(fun c->p.[i]<-c;b 0||()=s p;())"948721536";p.[i]<-'0'with | |
_->print_string p;;s(read_line()) |
This file contains 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
z""a=a | |
z('0':b)t=foldr(++)""[z b$t++[x]|x<-['1'..'9'],notElem x | |
d]where{d=[h$m`mod`9+i*9|i<-a]++[h$m-j 9+i|i<-a]++[h$i*9`mod`26+m-j 3-j | |
27+j 9|i<-a];j=mod m;m=length t;h=(!!)$t++'0':b;a=[0..8]} | |
z(c:b)a=z b$a++[c] | |
main=do | |
a<-getLine | |
putStr$z a"" |
NewerOlder