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 websocket | |
import uuid | |
import json | |
import urllib.request | |
import csv | |
import os | |
from PIL import Image | |
import io | |
import time | |
import io as io_mod # For StringIO |
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 cv2 | |
import os | |
from fractions import Fraction | |
import subprocess | |
# === Settings === | |
video_file = 'videos/video.mp4' | |
output_image_file = 'first_frame_clipped.jpg' | |
output_image_resized_file = 'first_frame_resized.jpg' | |
output_video_file = 'clipped_video.mp4' |
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
Counter({'n8n-nodes-base.stickyNote': 7024, | |
'n8n-nodes-base.set': 2524, | |
'n8n-nodes-base.httpRequest': 2115, | |
'n8n-nodes-base.if': 1091, | |
'n8n-nodes-base.code': 1002, | |
'n8n-nodes-base.manualTrigger': 769, | |
'@n8n/n8n-nodes-langchain.lmChatOpenAi': 628, | |
'n8n-nodes-base.googleSheets': 597, | |
'n8n-nodes-base.merge': 484, | |
'@n8n/n8n-nodes-langchain.agent': 457, |
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
name: Deploy Plugin | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy: |
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
from mcp.server.fastmcp import FastMCP | |
import httpx | |
import base64 | |
import asyncio | |
import os | |
from dotenv import load_dotenv | |
# Load env vars | |
load_dotenv() |
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
from fasthtml.common import * | |
app,rt = fast_app(live=True) | |
@rt("/") | |
def get(): | |
menu_css = Style(""" | |
.context-menu { | |
display: none; | |
position: absolute; |
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
from fasthtml.common import * | |
from datetime import datetime | |
def render(todo): | |
show = AX(todo.title, f'/todos/{todo.id}', 'current-todo') | |
edit = AX('edit', f'/edit/{todo.id}' , 'current-todo') | |
dt = ' (done)' if todo.done else '' | |
return Li(show, dt, ' | ', edit, id=f'todo-{todo.id}') | |
app,rt,todos,Todo = fast_app('data/todos.db', render, id=int, title=str, done=bool, pk='id', live=True) |
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 sqlite3 | |
# Create the SQLite database | |
def create_sql_questions_database(): | |
# Connect to SQLite database (creates it if it doesn't exist) | |
conn = sqlite3.connect('sql_questions.db') | |
cursor = conn.cursor() | |
# Create table with auto-incrementing ID and question field | |
cursor.execute(''' |
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
{ | |
"tailwindCSS.includeLanguages": { | |
"python": "html", | |
}, | |
"tailwindCSS.experimental.classRegex": [ | |
"\\b[a-zA-Z_]+\\s*=\\s*['\"]([^'\"]*)['\"]", | |
"\"[^\"]+\"\\s*:\\s*\"([^\"]*)\"", | |
"'[^']+'\\s*:\\s*'([^']*)'" | |
] | |
} |
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
from fasthtml.common import * | |
import subprocess | |
def serve_dev( | |
app='app', | |
host='0.0.0.0', | |
port=None, | |
reload=True, | |
reload_includes=None, | |
reload_excludes=None, |
NewerOlder