Added my contributions to community contributions week1 day1, github information

This commit is contained in:
Fikri Raihan
2025-05-25 17:38:22 +07:00
parent ba4325e49a
commit b2b26ddd4b

View File

@@ -0,0 +1,841 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "4d011f3d-c10c-4a75-bd36-576e383a8d1d",
"metadata": {},
"outputs": [],
"source": [
"# imports\n",
"\n",
"import os\n",
"import requests\n",
"from dotenv import load_dotenv\n",
"from bs4 import BeautifulSoup\n",
"from IPython.display import Markdown, display\n",
"from openai import OpenAI\n",
"\n",
"\n",
"# If you get an error running this cell, then please head over to the troubleshooting notebook!"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c51302e0-c848-4ec4-a0ab-03deeb9e7987",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Api key found and looks good so far!\n"
]
}
],
"source": [
"load_dotenv(override=True)\n",
"api_key = os.getenv('OPENAI_API_KEY')\n",
"\n",
"if not api_key:\n",
" print('No Api Key was found')\n",
"elif not api_key.startswith('sk-proj-'):\n",
" print(\"An api key was found, but it doesnt start with sk-proj\")\n",
"elif api_key.strip() != api_key:\n",
" print(\"An api key was found, but it might have space in the first or end\")\n",
"else:\n",
" print(\"Api key found and looks good so far!\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "d1df04f3-bd4d-4b14-87cc-1e91eaf7c0ab",
"metadata": {},
"outputs": [],
"source": [
"openai = OpenAI()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "340b018a-6e97-491c-aa26-66c683ece8a0",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello! Welcome! How can I assist you today?\n"
]
}
],
"source": [
"message = \"Hello GPT, this is my first message\"\n",
"response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=[{\"role\": \"user\", \"content\":message}])\n",
"print(response.choices[0].message.content)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "4a06c291-2fe6-4669-a8b6-3b67769eb3fa",
"metadata": {},
"outputs": [],
"source": [
"headers = {\n",
" \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36\"\n",
"}\n",
"\n",
"class Website:\n",
"\n",
" def __init__(self, url):\n",
" \"\"\"\n",
" Create this Website object from the given url using the BeautifulSoup library\n",
" \"\"\"\n",
" self.url = url\n",
" response = requests.get(url, headers=headers)\n",
" soup = BeautifulSoup(response.content, 'html.parser')\n",
" self.title = soup.title.string if soup.title else \"No title found\"\n",
" for irrelevant in soup.body([\"script\", \"style\", \"img\", \"input\"]):\n",
" irrelevant.decompose()\n",
" self.text = soup.body.get_text(separator=\"\\n\", strip=True)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "dd36b141-a252-44a8-8fa4-d4c2c33d3db9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fikriraihan · GitHub\n",
"Skip to content\n",
"Navigation Menu\n",
"Toggle navigation\n",
"Sign in\n",
"Appearance settings\n",
"Product\n",
"GitHub Copilot\n",
"Write better code with AI\n",
"GitHub Models\n",
"New\n",
"Manage and compare prompts\n",
"GitHub Advanced Security\n",
"Find and fix vulnerabilities\n",
"Actions\n",
"Automate any workflow\n",
"Codespaces\n",
"Instant dev environments\n",
"Issues\n",
"Plan and track work\n",
"Code Review\n",
"Manage code changes\n",
"Discussions\n",
"Collaborate outside of code\n",
"Code Search\n",
"Find more, search less\n",
"Explore\n",
"Why GitHub\n",
"All features\n",
"Documentation\n",
"GitHub Skills\n",
"Blog\n",
"Solutions\n",
"By company size\n",
"Enterprises\n",
"Small and medium teams\n",
"Startups\n",
"Nonprofits\n",
"By use case\n",
"DevSecOps\n",
"DevOps\n",
"CI/CD\n",
"View all use cases\n",
"By industry\n",
"Healthcare\n",
"Financial services\n",
"Manufacturing\n",
"Government\n",
"View all industries\n",
"View all solutions\n",
"Resources\n",
"Topics\n",
"AI\n",
"DevOps\n",
"Security\n",
"Software Development\n",
"View all\n",
"Explore\n",
"Learning Pathways\n",
"Events & Webinars\n",
"Ebooks & Whitepapers\n",
"Customer Stories\n",
"Partners\n",
"Executive Insights\n",
"Open Source\n",
"GitHub Sponsors\n",
"Fund open source developers\n",
"The ReadME Project\n",
"GitHub community articles\n",
"Repositories\n",
"Topics\n",
"Trending\n",
"Collections\n",
"Enterprise\n",
"Enterprise platform\n",
"AI-powered developer platform\n",
"Available add-ons\n",
"GitHub Advanced Security\n",
"Enterprise-grade security features\n",
"Copilot for business\n",
"Enterprise-grade AI features\n",
"Premium Support\n",
"Enterprise-grade 24/7 support\n",
"Pricing\n",
"Search or jump to...\n",
"Search code, repositories, users, issues, pull requests...\n",
"Search\n",
"Clear\n",
"Search syntax tips\n",
"Provide feedback\n",
"We read every piece of feedback, and take your input very seriously.\n",
"Include my email address so I can be contacted\n",
"Cancel\n",
"Submit feedback\n",
"Saved searches\n",
"Use saved searches to filter your results more quickly\n",
"Cancel\n",
"Create saved search\n",
"Sign in\n",
"Sign up\n",
"Appearance settings\n",
"Resetting focus\n",
"You signed in with another tab or window.\n",
"Reload\n",
"to refresh your session.\n",
"You signed out in another tab or window.\n",
"Reload\n",
"to refresh your session.\n",
"You switched accounts on another tab or window.\n",
"Reload\n",
"to refresh your session.\n",
"Dismiss alert\n",
"Fikriraihan\n",
"Follow\n",
"Overview\n",
"Repositories\n",
"34\n",
"Projects\n",
"0\n",
"Packages\n",
"0\n",
"Stars\n",
"0\n",
"More\n",
"Overview\n",
"Repositories\n",
"Projects\n",
"Packages\n",
"Stars\n",
"Fikriraihan\n",
"Follow\n",
"Fikriraihan\n",
"Follow\n",
"Block or Report\n",
"Block or report Fikriraihan\n",
"Report abuse\n",
"Contact GitHub support about this users behavior.\n",
" Learn more about\n",
"reporting abuse\n",
".\n",
"Report abuse\n",
"Overview\n",
"Repositories\n",
"34\n",
"Projects\n",
"0\n",
"Packages\n",
"0\n",
"Stars\n",
"0\n",
"More\n",
"Overview\n",
"Repositories\n",
"Projects\n",
"Packages\n",
"Stars\n",
"Pinned\n",
"Loading\n",
"2024-coding-challenge\n",
"2024-coding-challenge\n",
"Public\n",
"Repository for Coding Challenge 2024\n",
"JavaScript\n",
"ChatGPT\n",
"ChatGPT\n",
"Public\n",
"TypeScript\n",
"fikri-3d-portofolio\n",
"fikri-3d-portofolio\n",
"Public\n",
"JavaScript\n",
"nextjs-dashboard\n",
"nextjs-dashboard\n",
"Public\n",
"Nextjs-dashboard course\n",
"TypeScript\n",
"nextjs-postgre\n",
"nextjs-postgre\n",
"Public\n",
"TypeScript\n",
"imaginify\n",
"imaginify\n",
"Public\n",
"TypeScript\n",
"Something went wrong, please refresh the page to try again.\n",
"If the problem persists, check the\n",
"GitHub status page\n",
"or\n",
"contact support\n",
".\n",
"Uh oh!\n",
"There was an error while loading.\n",
"Please reload this page\n",
".\n",
"Footer\n",
"© 2025 GitHub, Inc.\n",
"Footer navigation\n",
"Terms\n",
"Privacy\n",
"Security\n",
"Status\n",
"Docs\n",
"Contact\n",
"Manage cookies\n",
"Do not share my personal information\n",
"You cant perform that action at this time.\n"
]
}
],
"source": [
"github = Website(\"https://github.com/Fikriraihan\")\n",
"print(github.title)\n",
"print(github.text)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "ea402ba2-6c7f-4f96-95c0-d68a0e96e644",
"metadata": {},
"outputs": [],
"source": [
"system_prompt = \"You are a skilled GitHub profile analyzer. \" \\\n",
"\"Your job is to take the provided GitHub profile or repository URL and generate a clear, structured summary covering these points: \" \\\n",
"\"1⃣ **Profile Summary** \" \\\n",
"\"- Username \" \\\n",
"\"- Bio (if available) \" \\\n",
"\"- Total public repositories \" \\\n",
"\"- Total followers \" \\\n",
"\"- Total stars received (sum across repos) \" \\\n",
"\"- Top programming languages (by repo count) \" \\\n",
"\"2⃣ **Repository Highlights** (top 3 by stars or activity) \" \\\n",
"\"For each: \" \\\n",
"\"- Repository name \" \\\n",
"\"- Description \" \\\n",
"\"- Primary language \" \\\n",
"\"- Star count \" \\\n",
"\"- Last updated date \" \\\n",
"\"- Notable technologies or frameworks used \" \\\n",
"\"3⃣ **Overall Assessment** \" \\\n",
"\"- What does this user specialize in? \" \\\n",
"\"- Are they more focused on personal projects or collaborations? \" \\\n",
"\"- Any standout strengths or skills you notice? \" \\\n",
"\"4⃣ **Recommendations** \" \\\n",
"\"- Suggest one area or technology they could explore next to grow. \" \\\n",
"\"- Suggest one improvement to make their GitHub profile more appealing. \" \\\n",
"\"Be concise, insightful, and encourage the users growth. \" \\\n",
"\"If some data is missing, state it clearly instead of guessing.\"\n"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "a964e8f2-40f4-457b-9c81-7e6e2768f450",
"metadata": {},
"outputs": [],
"source": [
"def user_prompt_for(website):\n",
" user_prompt = f\"You are looking at a github named {website.title}\"\n",
" user_prompt += \"\\nThe contents of this github is as follows; \\\n",
"please provide a summary of this website in markdown.\"\n",
" user_prompt += website.text\n",
" return user_prompt"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "026d8ae4-1aea-45b9-b694-db0809527780",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'You are a skilled GitHub profile analyzer. Your job is to take the provided GitHub profile or repository URL and generate a clear, structured summary covering these points: 1⃣ **Profile Summary** - Username - Bio (if available) - Total public repositories - Total followers - Total stars received (sum across repos) - Top programming languages (by repo count) 2⃣ **Repository Highlights** (top 3 by stars or activity) For each: - Repository name - Description - Primary language - Star count - Last updated date - Notable technologies or frameworks used 3⃣ **Overall Assessment** - What does this user specialize in? - Are they more focused on personal projects or collaborations? - Any standout strengths or skills you notice? 4⃣ **Recommendations** - Suggest one area or technology they could explore next to grow. - Suggest one improvement to make their GitHub profile more appealing. Be concise, insightful, and encourage the users growth. If some data is missing, state it clearly instead of guessing.'"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"system_prompt"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "2e040916-8d7e-421b-b1a7-56e710940eaa",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"You are looking at a github named Fikriraihan · GitHub\n",
"The contents of this github is as follows; please provide a summary of this website in markdown.Skip to content\n",
"Navigation Menu\n",
"Toggle navigation\n",
"Sign in\n",
"Appearance settings\n",
"Product\n",
"GitHub Copilot\n",
"Write better code with AI\n",
"GitHub Models\n",
"New\n",
"Manage and compare prompts\n",
"GitHub Advanced Security\n",
"Find and fix vulnerabilities\n",
"Actions\n",
"Automate any workflow\n",
"Codespaces\n",
"Instant dev environments\n",
"Issues\n",
"Plan and track work\n",
"Code Review\n",
"Manage code changes\n",
"Discussions\n",
"Collaborate outside of code\n",
"Code Search\n",
"Find more, search less\n",
"Explore\n",
"Why GitHub\n",
"All features\n",
"Documentation\n",
"GitHub Skills\n",
"Blog\n",
"Solutions\n",
"By company size\n",
"Enterprises\n",
"Small and medium teams\n",
"Startups\n",
"Nonprofits\n",
"By use case\n",
"DevSecOps\n",
"DevOps\n",
"CI/CD\n",
"View all use cases\n",
"By industry\n",
"Healthcare\n",
"Financial services\n",
"Manufacturing\n",
"Government\n",
"View all industries\n",
"View all solutions\n",
"Resources\n",
"Topics\n",
"AI\n",
"DevOps\n",
"Security\n",
"Software Development\n",
"View all\n",
"Explore\n",
"Learning Pathways\n",
"Events & Webinars\n",
"Ebooks & Whitepapers\n",
"Customer Stories\n",
"Partners\n",
"Executive Insights\n",
"Open Source\n",
"GitHub Sponsors\n",
"Fund open source developers\n",
"The ReadME Project\n",
"GitHub community articles\n",
"Repositories\n",
"Topics\n",
"Trending\n",
"Collections\n",
"Enterprise\n",
"Enterprise platform\n",
"AI-powered developer platform\n",
"Available add-ons\n",
"GitHub Advanced Security\n",
"Enterprise-grade security features\n",
"Copilot for business\n",
"Enterprise-grade AI features\n",
"Premium Support\n",
"Enterprise-grade 24/7 support\n",
"Pricing\n",
"Search or jump to...\n",
"Search code, repositories, users, issues, pull requests...\n",
"Search\n",
"Clear\n",
"Search syntax tips\n",
"Provide feedback\n",
"We read every piece of feedback, and take your input very seriously.\n",
"Include my email address so I can be contacted\n",
"Cancel\n",
"Submit feedback\n",
"Saved searches\n",
"Use saved searches to filter your results more quickly\n",
"Cancel\n",
"Create saved search\n",
"Sign in\n",
"Sign up\n",
"Appearance settings\n",
"Resetting focus\n",
"You signed in with another tab or window.\n",
"Reload\n",
"to refresh your session.\n",
"You signed out in another tab or window.\n",
"Reload\n",
"to refresh your session.\n",
"You switched accounts on another tab or window.\n",
"Reload\n",
"to refresh your session.\n",
"Dismiss alert\n",
"Fikriraihan\n",
"Follow\n",
"Overview\n",
"Repositories\n",
"34\n",
"Projects\n",
"0\n",
"Packages\n",
"0\n",
"Stars\n",
"0\n",
"More\n",
"Overview\n",
"Repositories\n",
"Projects\n",
"Packages\n",
"Stars\n",
"Fikriraihan\n",
"Follow\n",
"Fikriraihan\n",
"Follow\n",
"Block or Report\n",
"Block or report Fikriraihan\n",
"Report abuse\n",
"Contact GitHub support about this users behavior.\n",
" Learn more about\n",
"reporting abuse\n",
".\n",
"Report abuse\n",
"Overview\n",
"Repositories\n",
"34\n",
"Projects\n",
"0\n",
"Packages\n",
"0\n",
"Stars\n",
"0\n",
"More\n",
"Overview\n",
"Repositories\n",
"Projects\n",
"Packages\n",
"Stars\n",
"Pinned\n",
"Loading\n",
"2024-coding-challenge\n",
"2024-coding-challenge\n",
"Public\n",
"Repository for Coding Challenge 2024\n",
"JavaScript\n",
"ChatGPT\n",
"ChatGPT\n",
"Public\n",
"TypeScript\n",
"fikri-3d-portofolio\n",
"fikri-3d-portofolio\n",
"Public\n",
"JavaScript\n",
"nextjs-dashboard\n",
"nextjs-dashboard\n",
"Public\n",
"Nextjs-dashboard course\n",
"TypeScript\n",
"nextjs-postgre\n",
"nextjs-postgre\n",
"Public\n",
"TypeScript\n",
"imaginify\n",
"imaginify\n",
"Public\n",
"TypeScript\n",
"Something went wrong, please refresh the page to try again.\n",
"If the problem persists, check the\n",
"GitHub status page\n",
"or\n",
"contact support\n",
".\n",
"Uh oh!\n",
"There was an error while loading.\n",
"Please reload this page\n",
".\n",
"Footer\n",
"© 2025 GitHub, Inc.\n",
"Footer navigation\n",
"Terms\n",
"Privacy\n",
"Security\n",
"Status\n",
"Docs\n",
"Contact\n",
"Manage cookies\n",
"Do not share my personal information\n",
"You cant perform that action at this time.\n"
]
}
],
"source": [
"print(user_prompt_for(github))"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "da2a2c62-0ff4-4e4b-a1a1-774b47f848a0",
"metadata": {},
"outputs": [],
"source": [
"messages = [\n",
" {\"role\": \"system\", \"content\": \"You are a snarky assistant\"},\n",
" {\"role\": \"user\", \"content\": \"tell me a fruit that has red color\"}\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "204b9b40-cfd9-46f4-a954-efee75fc3d79",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Oh, I dont know, how about the classic red apple? Or maybe you were hoping for something more exotic, like a blood orange? Theres also the ever-popular strawberry. The options are endless! Whats next, a fruit quiz?\n"
]
}
],
"source": [
"response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=messages)\n",
"print(response.choices[0].message.content)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "0a4a376a-8c20-4fd3-91ad-25511df76292",
"metadata": {},
"outputs": [],
"source": [
"def messages_for(website):\n",
" return [\n",
" {\"role\": \"system\", \"content\": system_prompt},\n",
" {\"role\": \"user\", \"content\": user_prompt_for(website)}\n",
" ]"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "11bc74b0-7ca7-40da-81cc-84b2dd04780b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'role': 'system',\n",
" 'content': 'You are a skilled GitHub profile analyzer. Your job is to take the provided GitHub profile or repository URL and generate a clear, structured summary covering these points: 1⃣ **Profile Summary** - Username - Bio (if available) - Total public repositories - Total followers - Total stars received (sum across repos) - Top programming languages (by repo count) 2⃣ **Repository Highlights** (top 3 by stars or activity) For each: - Repository name - Description - Primary language - Star count - Last updated date - Notable technologies or frameworks used 3⃣ **Overall Assessment** - What does this user specialize in? - Are they more focused on personal projects or collaborations? - Any standout strengths or skills you notice? 4⃣ **Recommendations** - Suggest one area or technology they could explore next to grow. - Suggest one improvement to make their GitHub profile more appealing. Be concise, insightful, and encourage the users growth. If some data is missing, state it clearly instead of guessing.'},\n",
" {'role': 'user',\n",
" 'content': 'You are looking at a github named Fikriraihan · GitHub\\nThe contents of this github is as follows; please provide a summary of this website in markdown.Skip to content\\nNavigation Menu\\nToggle navigation\\nSign in\\nAppearance settings\\nProduct\\nGitHub Copilot\\nWrite better code with AI\\nGitHub Models\\nNew\\nManage and compare prompts\\nGitHub Advanced Security\\nFind and fix vulnerabilities\\nActions\\nAutomate any workflow\\nCodespaces\\nInstant dev environments\\nIssues\\nPlan and track work\\nCode Review\\nManage code changes\\nDiscussions\\nCollaborate outside of code\\nCode Search\\nFind more, search less\\nExplore\\nWhy GitHub\\nAll features\\nDocumentation\\nGitHub Skills\\nBlog\\nSolutions\\nBy company size\\nEnterprises\\nSmall and medium teams\\nStartups\\nNonprofits\\nBy use case\\nDevSecOps\\nDevOps\\nCI/CD\\nView all use cases\\nBy industry\\nHealthcare\\nFinancial services\\nManufacturing\\nGovernment\\nView all industries\\nView all solutions\\nResources\\nTopics\\nAI\\nDevOps\\nSecurity\\nSoftware Development\\nView all\\nExplore\\nLearning Pathways\\nEvents & Webinars\\nEbooks & Whitepapers\\nCustomer Stories\\nPartners\\nExecutive Insights\\nOpen Source\\nGitHub Sponsors\\nFund open source developers\\nThe ReadME Project\\nGitHub community articles\\nRepositories\\nTopics\\nTrending\\nCollections\\nEnterprise\\nEnterprise platform\\nAI-powered developer platform\\nAvailable add-ons\\nGitHub Advanced Security\\nEnterprise-grade security features\\nCopilot for business\\nEnterprise-grade AI features\\nPremium Support\\nEnterprise-grade 24/7 support\\nPricing\\nSearch or jump to...\\nSearch code, repositories, users, issues, pull requests...\\nSearch\\nClear\\nSearch syntax tips\\nProvide feedback\\nWe read every piece of feedback, and take your input very seriously.\\nInclude my email address so I can be contacted\\nCancel\\nSubmit feedback\\nSaved searches\\nUse saved searches to filter your results more quickly\\nCancel\\nCreate saved search\\nSign in\\nSign up\\nAppearance settings\\nResetting focus\\nYou signed in with another tab or window.\\nReload\\nto refresh your session.\\nYou signed out in another tab or window.\\nReload\\nto refresh your session.\\nYou switched accounts on another tab or window.\\nReload\\nto refresh your session.\\nDismiss alert\\nFikriraihan\\nFollow\\nOverview\\nRepositories\\n34\\nProjects\\n0\\nPackages\\n0\\nStars\\n0\\nMore\\nOverview\\nRepositories\\nProjects\\nPackages\\nStars\\nFikriraihan\\nFollow\\nFikriraihan\\nFollow\\nBlock or Report\\nBlock or report Fikriraihan\\nReport abuse\\nContact GitHub support about this users behavior.\\n Learn more about\\nreporting abuse\\n.\\nReport abuse\\nOverview\\nRepositories\\n34\\nProjects\\n0\\nPackages\\n0\\nStars\\n0\\nMore\\nOverview\\nRepositories\\nProjects\\nPackages\\nStars\\nPinned\\nLoading\\n2024-coding-challenge\\n2024-coding-challenge\\nPublic\\nRepository for Coding Challenge 2024\\nJavaScript\\nChatGPT\\nChatGPT\\nPublic\\nTypeScript\\nfikri-3d-portofolio\\nfikri-3d-portofolio\\nPublic\\nJavaScript\\nnextjs-dashboard\\nnextjs-dashboard\\nPublic\\nNextjs-dashboard course\\nTypeScript\\nnextjs-postgre\\nnextjs-postgre\\nPublic\\nTypeScript\\nimaginify\\nimaginify\\nPublic\\nTypeScript\\nSomething went wrong, please refresh the page to try again.\\nIf the problem persists, check the\\nGitHub status page\\nor\\ncontact support\\n.\\nUh oh!\\nThere was an error while loading.\\nPlease reload this page\\n.\\nFooter\\n© 2025 GitHub,\\xa0Inc.\\nFooter navigation\\nTerms\\nPrivacy\\nSecurity\\nStatus\\nDocs\\nContact\\nManage cookies\\nDo not share my personal information\\nYou cant perform that action at this time.'}]"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"messages_for(github)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "e64f497f-3742-4d70-9e15-29d1974b3361",
"metadata": {},
"outputs": [],
"source": [
"def summarize(url):\n",
" website = Website(url)\n",
" response = openai.chat.completions.create(\n",
" model = \"gpt-4o-mini\",\n",
" messages = messages_for(website)\n",
" )\n",
" return response.choices[0].message.content"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "95d0938d-0b26-4253-94a6-ac9240e7a8c9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'# GitHub Profile Summary for Fikriraihan\\n\\n### 1⃣ Profile Summary\\n- **Username:** Fikriraihan\\n- **Bio:** (No bio available)\\n- **Total public repositories:** 34\\n- **Total followers:** 0 (not indicated)\\n- **Total stars received:** 0\\n- **Top programming languages (by repo count):**\\n - JavaScript\\n - TypeScript\\n\\n### 2⃣ Repository Highlights\\n**Top 3 repositories by activity:**\\n\\n1. **Repository Name:** 2024-coding-challenge\\n - **Description:** Repository for Coding Challenge 2024\\n - **Primary Language:** JavaScript\\n - **Star Count:** 0\\n - **Last Updated Date:** (Not available)\\n - **Notable Technologies or Frameworks Used:** JavaScript\\n\\n2. **Repository Name:** ChatGPT\\n - **Description:** (No description provided)\\n - **Primary Language:** TypeScript\\n - **Star Count:** 0\\n - **Last Updated Date:** (Not available)\\n - **Notable Technologies or Frameworks Used:** TypeScript\\n\\n3. **Repository Name:** fikri-3d-portofolio\\n - **Description:** (No description provided)\\n - **Primary Language:** JavaScript\\n - **Star Count:** 0\\n - **Last Updated Date:** (Not available)\\n - **Notable Technologies or Frameworks Used:** JavaScript\\n\\n### 3⃣ Overall Assessment\\n- **What does this user specialize in?** \\n - Based on the repository languages, Fikriraihan appears to specialize in JavaScript and TypeScript.\\n\\n- **Are they more focused on personal projects or collaborations?** \\n - The profile indicates a focus on personal projects given the lack of followers and collaborations apparent from the repositories.\\n\\n- **Any standout strengths or skills you notice?** \\n - The presence of JavaScript and TypeScript projects suggests proficiency in web development, specifically in relation to modern frameworks.\\n\\n### 4⃣ Recommendations\\n- **One area or technology to explore next to grow:**\\n - Fikriraihan could benefit from exploring backend technologies, such as Node.js or Express, to complement their front-end skills with JavaScript/TypeScript.\\n\\n- **One improvement to make their GitHub profile more appealing:**\\n - Adding a bio and descriptions for each repository would help provide context and showcase their intent and the purpose behind each project, thereby attracting more engagement and potential collaborators.'"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"summarize(\"https://github.com/Fikriraihan\")"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "cd863db3-731a-46d8-ac14-f74f8ae39bd4",
"metadata": {},
"outputs": [],
"source": [
"def display_summary(url):\n",
" summary = summarize(url)\n",
" display(Markdown(summary))"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "70c5c3aa-2c06-460b-9c4f-6465d2c8611c",
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"# GitHub Profile Summary for Fikriraihan\n",
"\n",
"### 1⃣ Profile Summary\n",
"- **Username:** Fikriraihan\n",
"- **Bio:** Not available\n",
"- **Total public repositories:** 34\n",
"- **Total followers:** Not available\n",
"- **Total stars received:** 0\n",
"- **Top programming languages (by repo count):**\n",
" - JavaScript\n",
" - TypeScript\n",
"\n",
"### 2⃣ Repository Highlights\n",
"Here are the top repositories based on their details:\n",
"\n",
"1. **Repository Name:** 2024-coding-challenge\n",
" - **Description:** Repository for Coding Challenge 2024\n",
" - **Primary Language:** JavaScript\n",
" - **Star Count:** 0\n",
" - **Last Updated Date:** Not available\n",
" - **Notable Technologies/Frameworks Used:** None specified\n",
"\n",
"2. **Repository Name:** ChatGPT\n",
" - **Description:** Not available\n",
" - **Primary Language:** TypeScript\n",
" - **Star Count:** 0\n",
" - **Last Updated Date:** Not available\n",
" - **Notable Technologies/Frameworks Used:** None specified\n",
"\n",
"3. **Repository Name:** fikri-3d-portofolio\n",
" - **Description:** Not available\n",
" - **Primary Language:** JavaScript\n",
" - **Star Count:** 0\n",
" - **Last Updated Date:** Not available\n",
" - **Notable Technologies/Frameworks Used:** None specified\n",
"\n",
"### 3⃣ Overall Assessment\n",
"- **What does this user specialize in?** Fikriraihan specializes in JavaScript and TypeScript, indicating a focus on web development or applications that utilize these languages.\n",
"- **Are they more focused on personal projects or collaborations?** The presence of multiple repositories suggests a mix of personal projects. There is no indication of collaboration, as there are no mentions of contributions to external repositories.\n",
"- **Any standout strengths or skills you notice?** The variety of repositories shows an interest in different coding challenges and portfolio projects. However, the lack of stars suggests that the projects may not yet attract a significant audience.\n",
"\n",
"### 4⃣ Recommendations\n",
"- **Suggest one area or technology they could explore next to grow:** Given the users focus on JavaScript and TypeScript, exploring frameworks like React, Vue.js, or even server-side technologies such as Node.js could be beneficial.\n",
"- **Suggest one improvement to make their GitHub profile more appealing:** Adding a bio with a brief introduction and interests, along with project descriptions, would provide more context about the user and enhance engagement with their repositories. Additionally, increasing the visibility of the repositories through more optimization and possibly sharing or collaborating on projects could attract more stars and followers."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display_summary(\"https://github.com/Fikriraihan\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f3dfe6e3-dfd2-4acd-a2e4-681873c650c8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.11.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}