Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
25f192e
Create MCP_Config.json
keanuli Oct 26, 2025
9e3d1f2
Add brave_API_Key to MCP_Config.json
keanuli Oct 26, 2025
80adeea
Update Notion API token
keanuli Oct 26, 2025
a95c727
Add claude_desktop_config.json file
keanuli Oct 26, 2025
4c34c89
Mask real API keys in claude_desktop_config.json
keanuli Oct 26, 2025
74ab73c
Create claude_desktop_config.json
keanuli Oct 26, 2025
3d023e2
Add configuration for multiple MCP servers
keanuli Oct 26, 2025
b1e108d
Delete Class1/claude_desktop_config.json
keanuli Nov 1, 2025
548504e
add task2.2
ZoeyZhao100 Nov 2, 2025
aba2dd9
add task 3.1 LangChain calls Ollama2
ZoeyZhao100 Nov 2, 2025
23e771e
Create Task1.1_MCP+Claude
keanuli Nov 2, 2025
6b717a5
Delete Class1/class1/Task1.1_MCP+Claude
keanuli Nov 2, 2025
2587789
Create Task1.1_MCP_Claude_screenshot.md
keanuli Nov 2, 2025
241d5cf
upload Claude output screenshots
keanuli Nov 2, 2025
02cee8c
Rename Task1.1_MCP_Claude_screenshot.md to README.md
keanuli Nov 2, 2025
1f2b769
Delete Class1/class1/Task1.1_MCP_Claude/README.md
keanuli Nov 2, 2025
230ed2c
Create Task1.1_MCP+Claude_Output
keanuli Nov 2, 2025
3cffc99
Add Task1.1_MCP+Claude_Output.md file
keanuli Nov 2, 2025
f52a88b
Add sections for various MCP outputs in markdown file
keanuli Nov 2, 2025
ae8f279
Fix formatting of section headers in output file
keanuli Nov 2, 2025
29fe6c7
Change section headers from H2 to H3
keanuli Nov 2, 2025
9eb1601
Include image for Brave Search MCP output
keanuli Nov 2, 2025
36fb150
Fix image path formatting in MCP output markdown
keanuli Nov 2, 2025
b75ddc1
Update Task1.1_MCP+Claude_Output.md
keanuli Nov 2, 2025
7f500c5
Fix formatting in Task1.1_MCP+Claude_Output.md
keanuli Nov 2, 2025
d7ad2b9
Rename 1. Brave Search.png to Brave_Search.png
keanuli Nov 2, 2025
88f4571
Rename 2. github API.png to github_API.png
keanuli Nov 2, 2025
450e0d3
Rename 3. Puppeteer.png to Puppeteer.png
keanuli Nov 2, 2025
aa8d184
Rename 4. filesystem.png to Filesystem.png
keanuli Nov 2, 2025
29d7716
Rename 5.Sequential Thinking.png to Sequential_Thinking.png
keanuli Nov 2, 2025
8767232
Rename 6.Notion.png to Notion.png
keanuli Nov 2, 2025
d97cd98
Fix image link for Brave Search MCP output
keanuli Nov 2, 2025
737ab8a
Fix image links in Task1.1_MCP+Claude_Output.md
keanuli Nov 2, 2025
eac62ba
Update image captions in MCP output markdown
keanuli Nov 2, 2025
ab67467
Add 'screenshot' to MCP output section headers
keanuli Nov 2, 2025
794d0ac
Merge pull request #1 from keanuli/MLE_HW_keanuli_work
keanuli Nov 2, 2025
4e8f0e3
use tesseract to scan png file
keanuli Nov 8, 2025
692c438
use pytesseract to scan img
keanuli Nov 8, 2025
d366bac
add chinese image
keanuli Nov 8, 2025
f00a3e5
pytesseract test
keanuli Nov 9, 2025
e45fcf2
add tranformers
keanuli Nov 9, 2025
d5689bc
tranformers api calling llama3
keanuli Nov 9, 2025
1af6164
changes
keanuli Nov 9, 2025
91fabef
change to Llama-3
keanuli Nov 9, 2025
32b5471
change to Llama-3
keanuli Nov 9, 2025
ef04b54
template code works
keanuli Nov 9, 2025
946b8f4
add inference
keanuli Nov 9, 2025
883096b
add attention Tranformers
keanuli Nov 9, 2025
357218c
save token in os environment variable
keanuli Nov 10, 2025
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
18 changes: 18 additions & 0 deletions Class1/class1/Task1.1_MCP+Claude_Output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

### 1. Brave Search MCP output screenshot
![Brave Search MCP output](Task1.1_MCP_Claude/Brave_Search.png)

### 2. Github MCP output screenshot
![Github MCP output](Task1.1_MCP_Claude/github_API.png)

### 3.Puppeteer MCP output screenshot
![Puppeteer MCP output](Task1.1_MCP_Claude/Puppeteer.png)

### 4.Filesystem MCP output screenshot
![Filesystem MCP output](Task1.1_MCP_Claude/Filesystem.png)

### 5.Sequential Thinking MCP output screenshot
![Sequential MCP output](Task1.1_MCP_Claude/Sequential_Thinking.png)

### 6.Notion MCP output screenshot
![Notion MCP output](Task1.1_MCP_Claude/Notion.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Class1/class1/Task1.1_MCP_Claude/Filesystem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Class1/class1/Task1.1_MCP_Claude/Notion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Class1/class1/Task1.1_MCP_Claude/Puppeteer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Class1/class1/Task1.1_MCP_Claude/github_API.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions Class1/class1/Task2.2_OllamaOpenAI.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"id": "1bf7b177",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Title: Glowing Skin Tips: How to Make Your Face Look Bright and Radiant\n",
"Introduction:\n",
"Are you tired of looking in the mirror and seeing a dull, lackluster complexion? Do you want to improve your skin's radiance and brightness? You're in luck! In this article, we'll share practical tips and tricks on how to make your face skin look brighter and more radiant. Keep reading to learn the secrets to achieving a glowing complexion.\n",
"\n",
"Section 1: Cleanse Your Skin Properly\n",
"Cleansing your skin is the first step to having brighter, smoother skin. Use a gentle cleanser that suits your skin type, such as a micellar water for normal or oily skin, and a foaming gel or cream for dry or sensitive skin. Be sure to remove all makeup before bedtime and wash your face in the morning immediately after waking up.\n",
"\n",
"Section 2: Exfoliate Regularly\n",
"Exfoliating helps remove dead skin cells, giving your face a brighter appearance. Use a gentle exfoliating scrub or a chemical exfoliant containing alpha-hydroxy acids (AHAs) or beta-hydroxy acids (BHAs) one to two times per week. Avoid over-exfoliating, as it can cause irritation and dryness.\n",
"\n",
"Section 3: Hydrate Properly\n",
"Drinking plenty of water throughout the day is crucial for maintaining healthy, hydrated skin. Keep a water bottle with you at all times to ensure you consume enough fluids throughout the day. Apply an adequate amount of facial moisturizer after cleansing and toning to lock in hydration and protect your skin from environmental stressors.\n",
"\n",
"Section 4: Use Brightening Products\n",
"Brightening products, such as vitamin C serums or light-diffusing primers, can help address dullness and darker areas of the complexion. Look for products containing ingredients like licorice extract, caffeine, or niacinamide, which have a brightening effect on the skin. Apply these products to your face after cleansing and toning for optimal results.\n",
"\n",
"Section 5: Protect Your Skin from the Sun\n",
"UV rays can accelerate aging and cause dullness in your skin. Use a broad-spectrum sunscreen with an SPF of at least 30 whenever you go out, even on cloudy days or during winter. Apply it 15 minutes before exposure to the sun and reapply every two hours or immediately after swimming or sweating.\n",
"\n",
"Section 6: Get Enough Sleep\n",
"Lack of sleep can lead to dull-looking skin, dark circles, and puffiness. Aim for at least seven to nine hours of sound sleep each night. Establish a consistent sleep schedule and create a relaxing bedtime routine to help improve the quality of your sleep.\n",
"\n",
"Conclusion:\n",
"By following these tips consistently, you can achieve a brighter, more radiant complexion. Remember, patience is key, as it may take some time for the full effects of these methods to become apparent. Be gentle with your skin and never hesitate to consult a dermatologist if any concerns persist. Keep smiling and stay beautiful!\n"
]
}
],
"source": [
"from openai import OpenAI\n",
"\n",
"client = OpenAI(\n",
" base_url = 'http://localhost:11434/v1',\n",
" api_key='ollama', # required, but unused\n",
")\n",
"\n",
"response = client.chat.completions.create(\n",
" model=\"llama2\",\n",
" messages=[\n",
" {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n",
" {\"role\": \"user\", \"content\": \"how to makes my face skin more bright?\"}\n",
" ]\n",
")\n",
"print(response.choices[0].message.content)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
103 changes: 103 additions & 0 deletions Class1/class1/Task3.1_LangChain.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "5261f590",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"User prompt: How to cook Paella?\n",
"Model answer: \n",
"Paella is a traditional Spanish dish that originated in the Valencia region. It is a savory rice dish made with a variety of ingredients, including meats, vegetables, and spices. Here is a basic recipe for cooking paella:\n",
"\n",
"Ingredients:\n",
"\n",
"* 1 cup uncooked white rice\n",
"* 2 cups water\n",
"* 1 tablespoon olive oil\n",
"* 1 onion, diced\n",
"* 2 cloves garlic, minced\n",
"* 1 pound chicken, cut into bite-sized pieces\n",
"* 1 pound shrimp, peeled and deveined\n",
"* 1 red bell pepper, diced\n",
"* 1 green pepper, diced\n",
"* 1 small tomato, diced\n",
"* 1 teaspoon smoked paprika (optional)\n",
"* Salt and pepper, to taste\n",
"* Fresh parsley, chopped (optional)\n",
"\n",
"Instructions:\n",
"\n",
"1. Heat the olive oil in a large, shallow pan over medium-high heat. Add the diced onion and cook until softened, about 5 minutes.\n",
"2. Add the minced garlic and cook for an additional 1-2 minutes, until fragrant.\n",
"3. Add the chicken and cook until browned on all sides, about 5-7 minutes. Remove from the pan and set aside.\n",
"4. Add the shrimp to the pan and cook until pink and fully cooked, about 3-4 minutes. Remove from the pan and set aside with the chicken.\n",
"5. Add the diced red and green peppers to the pan and cook until tender, about 5 minutes.\n",
"6. Add the diced tomato to the pan and cook for an additional 2-3 minutes, until slightly softened.\n",
"7. Stir in the smoked paprika (if using) and cook for 1-2 minutes, until fragrant.\n",
"8. Add the uncooked rice to the pan and stir to combine with the vegetables and spices. Cook for 2-3 minutes, until the rice is lightly browned.\n",
"9. Pour in the water and bring the mixture to a boil. Reduce the heat to low and cover the pan with a lid, simmering for 18-20 minutes, or until the rice is cooked and the liquid has been absorbed.\n",
"10. Once the paella is cooked, remove it from the heat and let it rest for 5-10 minutes before serving. Garnish with chopped fresh parsley (if desired) and serve hot.\n",
"\n",
"Enjoy your delicious homemade paella!\n"
]
}
],
"source": [
"# Example: Using LCEL to reproduce a \"Basic Prompting\" scenario\n",
"from langchain_core.prompts import PromptTemplate\n",
"from langchain_core.output_parsers import StrOutputParser\n",
"from langchain_core.runnables import RunnablePassthrough\n",
"from langchain_community.chat_models import ChatOllama \n",
"\n",
"# 2. Define the prompt\n",
"prompt = PromptTemplate.from_template(\n",
" \"{topic}\"\n",
")\n",
"\n",
"# 3. Define the model\n",
"model = ChatOllama(model = \"llama2\") # Using Ollama2 \n",
"\n",
"# 4. Chain the components together using LCEL\n",
"chain = (\n",
" # LCEL syntax: use the pipe operator | to connect each step\n",
" {\"topic\": RunnablePassthrough()} # Accept user input\n",
" | prompt # Transform it into a prompt message\n",
" | model # Call the model\n",
" | StrOutputParser() # Parse the output as a string\n",
")\n",
"\n",
"# 5. Execute\n",
"Qestion = \"How to cook Paella?\" # Define your question here\n",
"result = chain.invoke({\"topic\": Qestion})\n",
"print(\"User prompt:\", Qestion)\n",
"print(\"Model answer:\", result)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
71 changes: 71 additions & 0 deletions Class1/class1/claude_desktop_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "${BRAVE_API_KEY}"
}
},
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
}
},
"puppeteer": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-puppeteer"
]
},
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
},
"everything": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-everything"
]
},
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\keanu"
]
},
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
},
"notion": {
"command": "npx",
"args": [
"-y",
"@suekou/mcp-notion-server"
],
"env": {
"NOTION_API_TOKEN": "${NOTION_API_TOKEN}"
}
}
}
}

Binary file added class2/Tesseract/IB_learner_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions class2/Tesseract/chi_characters.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
uodeen SKUMuAau

Joydeem 大 容 量 和 面 机 HMJ-A501 智 能 揉 面 机 全 自 动
接 面 机 恒 温 发 酵 304 不 锈 钢 压 面 醒 面 一 体 5L

5L 大 容 量 , 智 能 接 面 , 省 时 省 力

CAS169.00 csszaree

E

用 动 后 CASI000 | Sing ece

。 仿 手 工 押 招 西 , 轻 松 探 出 井 光 雨 团 , 外 表 光 温 , 内 里 炼 道
。 佰 湘 腾 发 , 省 阡 省 力 , 与 日 轻 林 刹 作 深 木 团

。 5 大 容 蛎 , 一 次 史 接 4 8 厂 团 , 海 居 全 家 羔 胎 需 永

十 字 颖 菊 设 计 , 面 团 命 力 的 下 , 中 泓 扬 租 林

。 贺 炎 不 锋 锭 积 西 椿 积 面 刀 , 材 质 坂 国 酒 用 , 俊 用 宇

。 轻 林 技 卵 , 海 河 炳 简 单 , 抖 分 不 贺 力 , 易 法 年 葛 洗

。 宝 居 电 机 支 林 , 稿 国 刹 闹 , 金 居 淅 轶 村 , 相 命 长 , 里 租 音
。 120V 息 压 , 免 诊 贺 选 坤 加 孩 大 埃 内

。 症 出 真 着 2 中 文 说 用 书 资 文 议 甫
Binary file added class2/Tesseract/chi_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class2/Tesseract/learner-profile-en.pdf
Binary file not shown.
75 changes: 75 additions & 0 deletions class2/Tesseract/output.txt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
IB learner profile

The aim of all IB programmes is to develop internationally minded people who, recognizing their
common humanity and shared guardianship of the planet, help to create a better and more peaceful world.

As IB learners we strive to be:

INQUIRERS

We nurture our curiosity, developing skils for inquiry and
research, We know how to leam independently and with others.
We learn with enthusiasm and sustain our love of learning
throughout ife.

KNOWLEDGEABLE

We develop and use conceptual understanding, exploring
knowledge across a range of disciplines We engage with issues
and ideas that have local and global significance.

THINKERS

We use critical and creative thinking skill to analyse and take
responsible action on complex problems. We exercise initiative in
making reasoned, ethical decisions.

COMMUNICATORS

We express ourselves confidently and creatively in more than
onelanguage and in many ways. We collaborate effectively,
listening carefully to the perspectives of other individuals and
groups.

PRINCIPLED

We act with integrity and honesty, with a strong sense of fairness
and justice, and with respect for the dignity and rights of people
everywhere. We take responsibility for our actions and their
consequences.

OPEN-MINDED

We artically appreciate our own cultures and personal histories, as
wellas the values and traditions of others. We seek and evaluate a
range of points of view, and we are wiling to grow from the
experience.

CARING

We show empathy, compassion and respect. We have a
commitment to service, and we act to make a positive difference
inthe lives of others and in the world around us.

RISK-TAKERS

We approach uncertainty with forethoughtand determination;
wework independently and cooperatively to explore new ideas
and innovative strategies. We are resourceful and resiient in the
face of challenges and change.

BALANCED

We understand the importance of balancing different aspects of
our lives—intellectual, physical, and emotional—toachieve
wellbeing for ourselves and others We recognize our interdependence
with other people and with the world in which we live.

REFLECTIVE

We thoughtfully consider the world and our own ideas and
experience. We work to understand our strengths and weaknesses
in order o support our learning and personal development.

The IB learner profile represents 10 attributes valued by IB World Schools. We believe these attributes, and others like
them, can help individuals and groups become responsible members of local, national and global communities.
Loading