A lightweight, secure alternative to building DOM elements without innerHTML security risks.
This framework provides a safe way to create DOM elements programmatically, avoiding XSS vulnerabilities common with string-based HTML generation.
def mock_api_stream(): | |
MESSAGE_CONTENTS = [ | |
"mess", | |
"age", | |
" start", | |
":", | |
" This", | |
" is", | |
" a", | |
" nice ", |
"""Example of a simple nurse scheduling problem.""" | |
from ortools.sat.python import cp_model | |
class Nurse: | |
def __init__(self, name, start): | |
self.name = name | |
self.start = start |
function get_git_repo_url() { | |
# Get the SSH URL from the current Git configuration | |
local ssh_url=$(git config remote.origin.url) | |
# Check if ssh_url is empty | |
if [ -z "$ssh_url" ]; then | |
echo "Not a git repository or no origin set" | |
return 1 | |
fi |
alias did='vim ~/did.txt' | |
alias todo='vim ~/todo.txt' | |
alias zrc='vim ~/.oh-my-zsh/custom/myaliases.zsh' | |
alias zs='exec zsh' | |
alias gotodidlist='cd ~/projamming/todidlistdjango/todidlist' | |
alias ls='ls -1p' | |
alias rm='rm -i' | |
alias ga='git add' |
Excerpt From | |
Deployment from Scratch | |
Josef Strzibny | |
This material may be protected by copyright. |
import json | |
import time | |
import whisper | |
MODEL_TYPE = "large" | |
model = whisper.load_model(MODEL_TYPE) | |
start = time.time() | |
file_name = "video" |
const TagSearchPage: NextPage<{ query: string }> = ({ query }) => { | |
const router = useRouter(); | |
const [input, setInput] = useState(query); | |
const newPath = `/search/${input}`; | |
const title = `Search: ${query}`; | |
const { data, isLoading } = api.search.getAll.useQuery({ | |
query, | |
}); |
# https://developer.todoist.com/sync/v9#summary-of-contents | |
def request_todoist_activity(api_key): | |
url = "https://api.todoist.com/sync/v9/activity/get" | |
headers = { | |
"Authorization": f"Bearer { api_key }", | |
} | |
limit: int = 100 | |
# page represents week BUT its limited by the max limit of 100 | |
# 1 - 1 WEEK |