diff --git a/notebooks/getting-started-with-dataframes/notebook.ipynb b/notebooks/getting-started-with-dataframes/notebook.ipynb index 6a7a50f5..2e5cf573 100644 --- a/notebooks/getting-started-with-dataframes/notebook.ipynb +++ b/notebooks/getting-started-with-dataframes/notebook.ipynb @@ -212,7 +212,7 @@ "metadata": {}, "source": [ "The code below will create the table in the server from the given `DataFrame`. The data types for the database table will be inferred from\n", - "the `DataFrame` data types. The `force=True` is merely used here in case you run the notebook code multiple times against the same\n", + "the `DataFrame` data types. The `overwrite=True` is merely used here in case you run the notebook code multiple times against the same\n", "database. It will cause an existing `phones` table to be overwritten if it already exists." ] }, @@ -223,7 +223,7 @@ "metadata": {}, "outputs": [], "source": [ - "phones_tbl = conn.create_table('phones', phones_df, force=True)\n", + "phones_tbl = conn.create_table('phones', phones_df, overwrite=True)\n", "phones_tbl.head(3)" ] }, @@ -432,7 +432,7 @@ "metadata": {}, "outputs": [], "source": [ - "tbl_2 = conn.create_table('phones2', phones_tbl, force=True)\n", + "tbl_2 = conn.create_table('phones2', phones_tbl, overwrite=True)\n", "tbl_2" ] }, diff --git a/notebooks/getting-started-with-notebooks/notebook.ipynb b/notebooks/getting-started-with-notebooks/notebook.ipynb index 4bc7ecbf..63050e30 100644 --- a/notebooks/getting-started-with-notebooks/notebook.ipynb +++ b/notebooks/getting-started-with-notebooks/notebook.ipynb @@ -116,6 +116,7 @@ "df = pd.read_csv(url, index_col=0,\n", " # Use parse_date=, dtype=, and converters= to specify explicit data types\n", " parse_dates=['inspection_date'],\n", + " date_format='%m/%d/%Y %H:%M:%S %p',\n", " dtype=dict(business_id=int, business_phone_number=str, business_postal_code=str, inspection_score=float),\n", " converters=dict(business_location=str_to_shapely))\n", "df" @@ -194,7 +195,6 @@ "source": [ "%%sql\n", "DROP DATABASE IF EXISTS {{database_name}};\n", - "\n", "CREATE DATABASE {{database_name}};" ] }, diff --git a/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/meta.toml b/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/meta.toml new file mode 100644 index 00000000..6dc766ac --- /dev/null +++ b/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/meta.toml @@ -0,0 +1,8 @@ +[meta] +title="How to Build LLM Apps that can See Hear Speak" +description="""\ + Using OpenAI to build a an app that can take images, audio, and text data to generate output + """ +icon="chart-network" +tags=["advanced", "openai", "genai"] +destinations=["spaces"] diff --git a/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb b/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb new file mode 100644 index 00000000..2e38a0b7 --- /dev/null +++ b/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb @@ -0,0 +1,1423 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "4bded9c9-d911-4f57-830c-9aec92b7f505", + "metadata": {}, + "source": [ + "
Action Required
\n", + "Make sure to select the demo_database database from the drop-down menu at the top of this notebook. It updates the connection_url to connect to that database.
\n", + "\n | Dst Port | \nProtocol | \nTimestamp | \nFlow Duration | \nTot Fwd Pkts | \nTot Bwd Pkts | \nTotLen Fwd Pkts | \nTotLen Bwd Pkts | \nFwd Pkt Len Max | \nFwd Pkt Len Min | \n... | \nFwd Seg Size Min | \nActive Mean | \nActive Std | \nActive Max | \nActive Min | \nIdle Mean | \nIdle Std | \nIdle Max | \nIdle Min | \nLabel | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n22 | \n6 | \n1.519374e+09 | \n1532698 | \n11 | \n11 | \n1179 | \n1969 | \n648 | \n0 | \n... | \n32 | \n0.0 | \n0.0 | \n0 | \n0 | \n0.0 | \n0.000000e+00 | \n0 | \n0 | \nBenign | \n
1 | \n500 | \n17 | \n1.519374e+09 | \n117573855 | \n3 | \n0 | \n1500 | \n0 | \n500 | \n500 | \n... | \n8 | \n0.0 | \n0.0 | \n0 | \n0 | \n58786927.5 | \n2.375324e+07 | \n75583006 | \n41990849 | \nBenign | \n
2 | \n500 | \n17 | \n1.519374e+09 | \n117573848 | \n3 | \n0 | \n1500 | \n0 | \n500 | \n500 | \n... | \n8 | \n0.0 | \n0.0 | \n0 | \n0 | \n58786924.0 | \n2.375325e+07 | \n75583007 | \n41990841 | \nBenign | \n
3 | \n22 | \n6 | \n1.519374e+09 | \n1745392 | \n11 | \n11 | \n1179 | \n1969 | \n648 | \n0 | \n... | \n32 | \n0.0 | \n0.0 | \n0 | \n0 | \n0.0 | \n0.000000e+00 | \n0 | \n0 | \nBenign | \n
4 | \n500 | \n17 | \n1.519374e+09 | \n89483474 | \n6 | \n0 | \n3000 | \n0 | \n500 | \n500 | \n... | \n8 | \n4000364.0 | \n0.0 | \n4000364 | \n4000364 | \n21370777.5 | \n1.528092e+07 | \n41989576 | \n7200485 | \nBenign | \n
5 rows × 80 columns
\nAction Required
\nThe ZIP file is hosted on a Google Drive.
\nUsing the Edit Firewall button in the top right, add the following to the SingleStoreDB Cloud notebook firewall, one-by-one:\n
\n | ID | \nModel_Results | \n
---|---|---|
0 | \nBen_0 | \n[0.0, 0.0, 0.0, 125628656.0, 0.0, 0.0, 5421442... | \n
1 | \nBen_1 | \n[0.0, 0.0, 0.0, 356751744.0, 1190461440.0, 0.0... | \n
2 | \nBen_2 | \n[0.0, 0.0, 0.0, 356751680.0, 1190461440.0, 0.0... | \n
3 | \nBen_3 | \n[0.0, 0.0, 0.0, 125515856.0, 0.0, 0.0, 5432884... | \n
4 | \nBen_4 | \n[0.0, 0.0, 0.0, 26214912.0, 698683840.0, 0.0, ... | \n
\n | ID | \nModel_Results | \n
---|---|---|
0 | \nBen_0 | \nb'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00... | \n
1 | \nBen_1 | \nb'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00... | \n
2 | \nBen_2 | \nb'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00... | \n
3 | \nBen_3 | \nb'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00... | \n
4 | \nBen_4 | \nb'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00... | \n
Action Required
\nSelect the database from the drop-down menu at the top of this notebook. It updates the connection_url which is used by SQLAlchemy to make connections to the selected database.
\nID | \nModel_Results | \n
---|---|
Ben_764632 | \n[0, 0, 0, 161398336, 0, 0, 91465440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186428320, 0, 0, 0, 167306864, 0, 0, 277207904, 0, 92328576, 73124928, 0, 0, 0, 95751136, 0, 0, 0, 0, 0, 0, 0, 0, 230162768, 273622432, 511405120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145775152, 106490400, 373456928, 0, 0, 0, 211604256, 30848250, 0, 0, 0, 0, 326004800, 0, 0, 0, 0, 13625428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248507264, 0, 121489904, 196521904, 0, 2331058, 0, 0, 234076784, 247954704, 0, 0, 16321682, 0, 0, 0, 343808992, 0, 0, 0, 74993352, 0, 0, 59710728, 0, 0, 89274704, 0, 174431776, 107296112, 0, 0, 134864096, 0, 0] | \n
\n | Dst Port | \nProtocol | \nTimestamp | \nFlow Duration | \nTot Fwd Pkts | \nTot Bwd Pkts | \nTotLen Fwd Pkts | \nTotLen Bwd Pkts | \nFwd Pkt Len Max | \nFwd Pkt Len Min | \n... | \nFwd Seg Size Min | \nActive Mean | \nActive Std | \nActive Max | \nActive Min | \nIdle Mean | \nIdle Std | \nIdle Max | \nIdle Min | \nLabel | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n22 | \n6 | \n1.519288e+09 | \n20553406 | \n10 | \n7 | \n1063 | \n1297 | \n744 | \n0 | \n... | \n20 | \n1027304.0 | \n0.0 | \n1027304 | \n1027304 | \n1.952608e+07 | \n0.000000e+00 | \n19526080 | \n19526080 | \nBenign | \n
1 | \n34989 | \n6 | \n1.519288e+09 | \n790 | \n2 | \n0 | \n848 | \n0 | \n848 | \n0 | \n... | \n20 | \n0.0 | \n0.0 | \n0 | \n0 | \n0.000000e+00 | \n0.000000e+00 | \n0 | \n0 | \nBenign | \n
2 | \n500 | \n17 | \n1.519288e+09 | \n99745913 | \n5 | \n0 | \n2500 | \n0 | \n500 | \n500 | \n... | \n8 | \n4000203.0 | \n0.0 | \n4000203 | \n4000203 | \n3.191524e+07 | \n3.792787e+07 | \n75584115 | \n7200679 | \nBenign | \n
3 | \n500 | \n17 | \n1.519288e+09 | \n99745913 | \n5 | \n0 | \n2500 | \n0 | \n500 | \n500 | \n... | \n8 | \n4000189.0 | \n0.0 | \n4000189 | \n4000189 | \n3.191524e+07 | \n3.792788e+07 | \n75584130 | \n7200693 | \nBenign | \n
4 | \n500 | \n17 | \n1.519288e+09 | \n89481361 | \n6 | \n0 | \n3000 | \n0 | \n500 | \n500 | \n... | \n8 | \n4000554.0 | \n0.0 | \n4000554 | \n4000554 | \n2.137020e+07 | \n1.528109e+07 | \n41990741 | \n7200848 | \nBenign | \n
5 rows × 80 columns
\nAction Required
\nSelect the database from the drop-down menu at the top of this notebook. It updates the connection_url which is used by SQLAlchemy to make connections to the selected database.
\n\n | type | \naccuracy | \n
---|---|---|
0 | \nBenign | \n1.00 | \n
1 | \nAttack | \n0.79 | \n
\n | type | \naccuracy | \n
---|---|---|
0 | \nBenign | \n1.00 | \n
1 | \nAttack | \n0.29 | \n
Note
\n", + "For that tutorial, we recommend using workspace of size S4 to ingest data faster and also see the difference and gain you can get from a distributed architecture.
\n", + "Action Required
\n", + "Make sure to select the s2_tpch_unoptimized database from the drop-down menu at the top of this notebook.\n", + " It updates the connection_url to connect to that database.
\n", + "Action Required
\n", + "Make sure to select the s2_tpch_optimized database from the drop-down menu at the top of this notebook.\n", + " It updates the connection_url to connect to that database.
\n", + "