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
| { | |
| "mcpServers": { | |
| "MongoDB": { | |
| "command": "npx", | |
| "args": [ | |
| "-y", | |
| "mongodb-mcp-server", | |
| "--connectionString", | |
| "mongodb+srv://<username>:<password>@<your-cluster>.mongodb.net/?retryWrites=true&w=majority&appName=<your-app>" | |
| ], |
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
| { | |
| "mcpServers": { | |
| "MongoDB": { | |
| "command": "npx", | |
| "args": [ | |
| "-y", | |
| "mongodb-mcp-server", | |
| "--connectionString", | |
| "mongodb+srv://<username>:<password>@<your-cluster>.mongodb.net/?retryWrites=true&w=majority&appName=<your-app>" | |
| ], |
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 { Stagehand } from "@browserbasehq/stagehand"; | |
| import fs from "fs"; | |
| import path from "path"; | |
| import Tesseract from "tesseract.js"; | |
| import { OpenAI } from "openai"; | |
| import dotenv from "dotenv"; | |
| dotenv.config(); | |
| const openai = new OpenAI({ |
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 streamlit as st | |
| if 'count' not in st.session_state: | |
| st.session_state.count = 0 | |
| if 'quotes' not in st.session_state: | |
| st.session_state.quotes = [ | |
| "Life is what happens when you're busy making other plans. — John Lennon", | |
| "Get busy living or get busy dying. — Stephen King", | |
| "You only live once, but if you do it right, once is enough. — Mae West", |
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
| const OPENAI_API_KEY = ""; // <- PASTE YOUR SECRET KEY HERE | |
| const OPENAI_API_URL = "https://api.openai.com/v1/completions"; | |
| /** | |
| * Submits a prompt to GPT-3 and returns the completion | |
| * | |
| * @param {string} prompt Prompt to submit to GPT-3 | |
| * @param {float} temperature Model temperature (0-1) | |
| * @param {string} model Model name (e.g. text-davinci-002) |
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
| df = pd.read_csv("reuters-allcats.csv") | |
| csv = df.to_csv(index=False) | |
| b64 = base64.b64encode(csv.encode()).decode() | |
| href = f'<a href="data:file/csv;base64,{b64}" download="myfilename.csv">Try a sample first</a>' | |
| st.markdown("👆 Upload a .csv file. " + href, unsafe_allow_html=True) | |
| st.stop() |
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
| gd = GridOptionsBuilder.from_dataframe(df) | |
| # Adds pagination | |
| gd.configure_pagination(enabled=True) | |
| # Adds editable cells | |
| gd.configure_default_column(editable=True, groupable=True) | |
| # Enables multi-select in the dataframe | |
| gd.configure_selection(selection_mode="multiple", use_checkbox=True) | |
| gridoptions = gd.build() | |
| grid_table = AgGrid( | |
| df, |
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
| # The code below is for the title and logo. | |
| st.set_page_config( | |
| layout=layout, page_title="Dataframe with editable cells", page_icon="💾" | |
| ) |
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
| def get_search_console_data(webproperty): | |
| if webproperty is not None: | |
| # query = webproperty.query.range(start="today", days=days).dimension("query") | |
| report = ( | |
| webproperty.query.search_type(search_type) | |
| .range("today", days=timescale) | |
| .dimension(dimension) | |
| .filter(filter_page_or_query, filter_keyword, filter_type) | |
| .filter(filter_page_or_query2, filter_keyword2, filter_type2) | |
| .get() |
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 streamlit as st | |
| st.header('test') | |
| faqs = [ | |
| { "question": "Tom", "answer": "10" }, | |
| { "question": "Mark", "answer": "5" }, | |
| { "question": "Pam", "answer": "7" }, | |
| { "question": "Dick", "answer": "12" } |
NewerOlder