Skip to content

Instantly share code, notes, and snippets.

View masenf's full-sized avatar

Masen Furer masenf

View GitHub Profile
@masenf
masenf / slider.py
Created February 23, 2024 06:08
reflex frontend slider
import reflex as rx
import reflex.components.radix.themes as rdxt
from reflex.components.component import MemoizationLeaf
from reflex.utils import imports
class State(rx.State):
val: int = 50
@masenf
masenf / repro_twitter_embed.py
Last active September 24, 2023 08:05
Rendering a tweet with Reflex web framework
from typing import Any
import httpx
import reflex as rx
class HtmlDangerous(rx.Component):
"""Render the html via createRange().createContextualFragment.
Allows for execution of scripts in the given HTML without restriction.

Keybase proof

I hereby claim:

  • I am masenf on github.
  • I am mjf (https://keybase.io/mjf) on keybase.
  • I have a public key ASDCVQEDEpS_sGNzSTyhyPiswuwZVFEwcD3TPsIo68BkQgo

To claim this, I am signing this object: