|
47 | 47 |
|
48 | 48 | github_gist |
49 | 49 |
|
| 50 | + "---" |
| 51 | + "### Example:" |
| 52 | + with st.echo(): |
| 53 | + |
| 54 | + import streamlit as st |
| 55 | + from streamlit_embedcode import github_gist |
| 56 | + |
| 57 | + t = st.text_input( |
| 58 | + "Enter GitHub gist URL:", |
| 59 | + "https://gist.github.com/randyzwitch/934d502e53f2adcb48eea2423fe4a47e", |
| 60 | + ) |
| 61 | + |
| 62 | + w = st.slider("width", 300, 800, 710) |
| 63 | + github_gist(t, width=w) |
| 64 | + |
50 | 65 | elif choice == "gitlab_snippet()": |
51 | 66 | """## gitlab_snippet()""" |
52 | 67 |
|
53 | 68 | gitlab_snippet |
54 | 69 |
|
| 70 | + "---" |
| 71 | + "### Example:" |
| 72 | + with st.echo(): |
| 73 | + |
| 74 | + import streamlit as st |
| 75 | + from streamlit_embedcode import gitlab_snippet |
| 76 | + |
| 77 | + t = st.text_input( |
| 78 | + "Enter GitLab snippet URL:", "https://gitlab.com/snippets/1995463", |
| 79 | + ) |
| 80 | + |
| 81 | + w = st.slider("width", 300, 800, 710) |
| 82 | + gitlab_snippet(t, width=w) |
| 83 | + |
55 | 84 | elif choice == "pastebin_snippet()": |
56 | 85 | """## pastebin_snippet()""" |
57 | 86 |
|
58 | 87 | pastebin_snippet |
59 | 88 |
|
| 89 | + "---" |
| 90 | + "### Example:" |
| 91 | + with st.echo(): |
| 92 | + |
| 93 | + import streamlit as st |
| 94 | + from streamlit_embedcode import pastebin_snippet |
| 95 | + |
| 96 | + t = st.text_input( |
| 97 | + "Enter Pastebin snippet URL:", "https://pastebin.com/i1YQv94Q", |
| 98 | + ) |
| 99 | + |
| 100 | + w = st.slider("width", 300, 800, 710) |
| 101 | + pastebin_snippet(t, width=w) |
| 102 | + |
60 | 103 | elif choice == "codepen_snippet()": |
61 | 104 | """## codepen_snippet()""" |
62 | 105 |
|
63 | 106 | codepen_snippet |
64 | 107 |
|
| 108 | + "---" |
| 109 | + "### Example:" |
| 110 | + with st.echo(): |
| 111 | + |
| 112 | + import streamlit as st |
| 113 | + from streamlit_embedcode import codepen_snippet |
| 114 | + |
| 115 | + t = st.text_input( |
| 116 | + "Enter CodePen snippet URL:", "https://codepen.io/ste-vg/pen/GRooLza", |
| 117 | + ) |
| 118 | + |
| 119 | + w = st.slider("width", 300, 800, 750, key="1") |
| 120 | + h = st.slider("height", 500, 800, 600, key="2") |
| 121 | + codepen_snippet(t, width=w, height=h) |
| 122 | + |
65 | 123 | elif choice == "ideone_snippet()": |
66 | 124 | """## ideone_snippet()""" |
67 | 125 |
|
68 | 126 | ideone_snippet |
69 | 127 |
|
| 128 | + "---" |
| 129 | + "### Example:" |
| 130 | + with st.echo(): |
| 131 | + |
| 132 | + import streamlit as st |
| 133 | + from streamlit_embedcode import ideone_snippet |
| 134 | + |
| 135 | + t = st.text_input("Enter Ideone snippet URL:", "https://ideone.com/vQ54cr",) |
| 136 | + |
| 137 | + w = st.slider("width", 300, 800, 710, key="1") |
| 138 | + ideone_snippet(t, width=w) |
| 139 | + |
70 | 140 | elif choice == "tagmycode_snippet()": |
71 | 141 | """## tagmycode_snippet()""" |
72 | 142 |
|
73 | 143 | tagmycode_snippet |
| 144 | + |
| 145 | + "---" |
| 146 | + "### Example:" |
| 147 | + with st.echo(): |
| 148 | + |
| 149 | + import streamlit as st |
| 150 | + from streamlit_embedcode import tagmycode_snippet |
| 151 | + |
| 152 | + t = st.text_input( |
| 153 | + "Enter Ideone snippet URL:", |
| 154 | + "https://tagmycode.com/snippet/5965/recursive-list-files-in-a-dir#.Xwyc43VKglU", |
| 155 | + ) |
| 156 | + |
| 157 | + w = st.slider("width", 300, 800, 710, key="1") |
| 158 | + tagmycode_snippet(t, width=w) |
0 commit comments