Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
298 changes: 274 additions & 24 deletions 001_Intro_to_Google_Colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/codeBMB/May26_codeBMB/blob/main/001_Intro_to_Google_Colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/Haniiko1/May26_codeBMB/blob/main/001_Intro_to_Google_Colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
Expand Down Expand Up @@ -142,7 +142,7 @@
"metadata": {
"id": "J7GcI9U44huY"
},
"execution_count": null,
"execution_count": 1,
"outputs": []
},
{
Expand Down Expand Up @@ -230,10 +230,23 @@
"print(\"Great job running a cell! ✅\")"
],
"metadata": {
"id": "Px9VIbGK07CH"
"id": "Px9VIbGK07CH",
"outputId": "df95a79a-b90f-4b03-f5f8-417fecc0788d",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": []
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"You ran this cell at: 06:17 PM on May 13, 2026\n",
"Great job running a cell! ✅\n"
]
}
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -274,10 +287,23 @@
"print(emoji.emojize(\"Python is :snake: awesome! :party_popper:\"))"
],
"metadata": {
"id": "9iDrRng61Y0u"
"id": "9iDrRng61Y0u",
"outputId": "506684c5-705d-4281-fff6-f671933cc6dd",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": []
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/608.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[90m╺\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m276.5/608.4 kB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m608.4/608.4 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hPython is 🐍 awesome! 🎉\n"
]
}
]
},
{
"cell_type": "markdown",
Expand All @@ -295,14 +321,28 @@
"source": [
"# Copy and modify the code below with new emoji codes:\n",
"print(emoji.emojize(\"I write code on a :desktop_computer:\"))\n",
"print(emoji.emojize(\"Hello :T-Rex:\"))\n",
"\n",
"# now you try!\n"
],
"metadata": {
"id": "DJH31lML1eY-"
"id": "DJH31lML1eY-",
"outputId": "d77f0a90-864c-4c39-c145-1b8828da9ca5",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": []
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"I write code on a 🖥️\n",
"Hello 🦖\n"
]
}
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -344,10 +384,10 @@
"# Good commenting practice in Python\n",
"# Add comments describing what is happening in each step. You can run the code if it helps.\n",
"\n",
"\n",
"# Declaring a list of values\n",
"temperatures_celsius = [0, 20, 37, 100]\n",
"\n",
"\n",
"# Converting celcius to fahrenheit\n",
"temperatures_fahrenheit = [(c * 9/5) + 32 for c in temperatures_celsius]\n",
"\n",
"print(\"Celsius → Fahrenheit\")\n",
Expand Down Expand Up @@ -411,10 +451,25 @@
"print(\"Your Drive files are accessible at: /content/drive/MyDrive/\")"
],
"metadata": {
"id": "cd8KMFZDifpo"
"id": "cd8KMFZDifpo",
"outputId": "39ddf55b-3036-4201-93e6-91b7f8834816",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": []
"execution_count": 6,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/drive\n",
"\n",
"✅ Google Drive mounted successfully!\n",
"Your Drive files are accessible at: /content/drive/MyDrive/\n"
]
}
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -449,10 +504,33 @@
" print(\"Drive not mounted yet. Run the cell above first!\")"
],
"metadata": {
"id": "LFkR7D2Si6a5"
"id": "LFkR7D2Si6a5",
"outputId": "394647c2-4f4d-4b24-9e44-507cb599172a",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": []
"execution_count": 7,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Contents of your Google Drive (11 items):\n",
" • Summer Reading 2025 - Cubed The Puzzle of Us All.gdoc\n",
" • Prototyping presentation.gslides\n",
" • Why Terminus is the best zombie map.gslides\n",
" • Untitled document (6).gdoc\n",
" • Untitled document (5).gdoc\n",
" • Untitled document (4).gdoc\n",
" • Untitled document (3).gdoc\n",
" • Untitled document (2).gdoc\n",
" • Untitled document (1).gdoc\n",
" • Untitled document.gdoc\n",
" ... and 1 more items\n"
]
}
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -498,10 +576,183 @@
"display(df.head())"
],
"metadata": {
"id": "VAgQmmUPjkYJ"
"id": "VAgQmmUPjkYJ",
"outputId": "1b68dcf4-329e-46ee-caec-f0293289877f",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": []
"execution_count": 8,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
" Concentration_mg_per_mL Rep1 Rep2 Rep3\n",
"0 0.0 -0.004 0.001 0.003\n",
"1 0.1 0.116 0.121 0.126\n",
"2 0.2 0.238 0.231 0.245\n",
"3 0.3 0.356 0.377 0.364\n",
"4 0.4 0.478 0.482 0.495"
],
"text/html": [
"\n",
" <div id=\"df-2902ce96-364b-4697-9dc4-cc5e1d70ac2f\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Concentration_mg_per_mL</th>\n",
" <th>Rep1</th>\n",
" <th>Rep2</th>\n",
" <th>Rep3</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>-0.004</td>\n",
" <td>0.001</td>\n",
" <td>0.003</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.1</td>\n",
" <td>0.116</td>\n",
" <td>0.121</td>\n",
" <td>0.126</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.2</td>\n",
" <td>0.238</td>\n",
" <td>0.231</td>\n",
" <td>0.245</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.3</td>\n",
" <td>0.356</td>\n",
" <td>0.377</td>\n",
" <td>0.364</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.4</td>\n",
" <td>0.478</td>\n",
" <td>0.482</td>\n",
" <td>0.495</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-2902ce96-364b-4697-9dc4-cc5e1d70ac2f')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-2902ce96-364b-4697-9dc4-cc5e1d70ac2f button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-2902ce96-364b-4697-9dc4-cc5e1d70ac2f');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
" </div>\n",
" </div>\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"summary": "{\n \"name\": \"display(df\",\n \"rows\": 5,\n \"fields\": [\n {\n \"column\": \"Concentration_mg_per_mL\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.15811388300841897,\n \"min\": 0.0,\n \"max\": 0.4,\n \"num_unique_values\": 5,\n \"samples\": [\n 0.1,\n 0.4,\n 0.2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Rep1\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.1903712163117103,\n \"min\": -0.004,\n \"max\": 0.478,\n \"num_unique_values\": 5,\n \"samples\": [\n 0.116,\n 0.478,\n 0.238\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Rep2\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.19278692901750366,\n \"min\": 0.001,\n \"max\": 0.482,\n \"num_unique_values\": 5,\n \"samples\": [\n 0.121,\n 0.482,\n 0.231\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Rep3\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.19324414609503698,\n \"min\": 0.003,\n \"max\": 0.495,\n \"num_unique_values\": 5,\n \"samples\": [\n 0.126,\n 0.495,\n 0.245\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
}
},
"metadata": {}
}
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -560,7 +811,7 @@
"source": [
"#@title Tell Us About Yourself!\n",
"\n",
"your_name = \"Bea Embee\" #@param {type:\"string\"}\n",
"your_name = \"Hieu Nguyen\" #@param {type:\"string\"}\n",
"your_experience = \"Beginner\" #@param [\"Beginner\", \"Intermediate\", \"Advanced\"]\n",
"your_age = 25 #@param {type:\"integer\"}\n",
"enjoys_coding = True #@param {type:\"boolean\"}\n",
Expand All @@ -574,7 +825,6 @@
"print(f\"Welcome to Colab, {your_name}! You're going to do great things.\")"
],
"metadata": {
"cellView": "form",
"id": "mv2-87n2j46a"
},
"execution_count": null,
Expand Down
Loading