
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
gradio_calendar
Gradio component for selecting dates with a calendar ๐
pip install gradio_calendar
import gradio as gr
from gradio_calendar import Calendar
import datetime
def is_weekday(date: datetime.datetime):
return date.weekday() < 5
demo = gr.Interface(is_weekday,
[Calendar(type="datetime", label="Select a date", info="Click the calendar icon to bring up the calendar.")],
gr.Label(label="Is it a weekday?"),
examples=["2023-01-01", "2023-12-11"],
cache_examples=True,
title="Is it a weekday?")
if __name__ == "__main__":
demo.launch()
Calendar
name | type | default | description |
---|---|---|---|
value |
| None | None |
type |
| "datetime" | None |
label |
| None | None |
info |
| None | None |
show_label |
| None | None |
container |
| True | None |
scale |
| None | None |
min_width |
| None | None |
interactive |
| None | None |
visible |
| True | None |
elem_id |
| None | None |
elem_classes |
| None | None |
render |
| True | None |
load_fn |
| None | None |
every |
| None | None |
name | description |
---|---|
change | |
input | |
submit |
The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
The code snippet below is accurate in cases where the component is used as both an input and an output.
def predict(
value: str | datetime.datetime | None
) -> str | datetime.datetime | None:
return value
FAQs
Gradio component for selecting dates with a calendar ๐
We found that gradio-calendar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptalโs GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.