Files

1 line
8.7 KiB
JSON

{"repo": "ahsc786/tw-copilot-dev", "files": {".github/scripts/fetch_news.py": {"10895b369371ff927fc3f07327c93d9429a90cf6": {"t": 1785747040.0593672, "n": 4090, "h": "fa3c60a5dd8b4702", "c": "import os\nimport requests\nfrom datetime import datetime\nimport json\n\ndef query_deepseek(prompt):\n api_key = os.environ.get('DEEPSEEK_API_KEY')\n if not api_key:\n raise ValueError(\"DEEPSEEK_API_KEY environment variable is not set\")\n\n headers = {\n \"Authorization\": f\"Bearer {api_key}\",\n \"Content-Type\": \"application/json\"\n }\n \n data = {\n \"model\": \"deepseek-chat\",\n \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n \"temperature\": 0.3, # Reduced for more focused, factual responses\n \"max_tokens\": 2500 # Increased for more comprehensive coverage\n }\n \n response = requests.post(\n \"https://api.deepseek.com/v1/chat/completions\",\n headers=headers,\n json=data\n )\n \n if response.status_code != 200:\n raise Exception(f\"API request failed with status {response.status_code}: {response.text}\")\n \n return response.json()['choices'][0]['message']['content']\n\ndef main():\n today = datetime.now().strftime('%Y-%m-%d')\n \n prompt = f\"\"\"Act as an expert technical researcher and educator specializing in GitHub Copilot. Your task is to compile a comprehensive update on GitHub Copilot developments that would be valuable for IT professionals and developers. Focus on the following areas, with special attention to practical applications and educational value:\n\nKey Areas to Cover:\n1. Latest Features and Updates\n - New capabilities in GitHub Copilot\n - Changes to existing features\n - Updates to the API or integration points\n - Performance improvements\n\n2. Best Practices and Tips\n - New discovered patterns for effective prompting\n - Workflow optimization techniques\n - Integration tips with different IDEs and tools\n - Security best practices\n\n3. Educational Resources\n - New tutorials or learning materials\n - Notable blog posts or documentation updates\n - Community-contributed guides\n - Training opportunities\n\n4. Enterprise and Professional Use\n - Updates relevant to enterprise deployments\n - Compliance and security updates\n - Team collaboration features\n - License and pricing changes\n\n5. Technical Deep Dives\n - API changes and developer tools\n - Integration possibilities\n - Performance optimization techniques\n - Advanced usage patterns\n\nPrioritize information from:\n- Official GitHub and Microsoft sources\n- GitHub Blog and documentation\n- Microsoft Learn and documentation\n- Notable community contributors and GitHub staff\n\nFormat Requirements:\n- Use clear Markdown formatting\n- Include links to sources where available\n- Organize content with clear headings\n- Focus on actionable insights\n- Include specific examples where relevant\n\nOnly include verifiable information from the past few days. If certain categories have no recent updates, you may omit them.\"\"\"\n\n try:\n news_content = query_deepseek(prompt)\n \n # Add header with date and branding\n full_content = f\"\"\"<div align=\"center\">\n\n# 🤖 GitHub Copilot News Update ({today})\n\n[![TechTrainerTim.com](https://img.shields.io/badge/🌐_TechTrainerTim.com-Visit_Website-2ea44f)](https://TechTrainerTim.com)\n\n</div>\n\n> This update is auto-generated using AI to compile recent GitHub Copilot developments, focusing on practical information for IT professionals and developers.\n\n{news_content}\n\n---\n\n<div align=\"center\">\n\n### Stay Updated with More Tech Training Content\n\n- 🌐 [TechTrainerTim.com](https://TechTrainerTim.com)\n- 📚 Expert-led training and consulting\n- 🤖 Specialized in AI and GitHub Copilot\n- 💡 Custom workshops and courses available\n\n</div>\n\n---\n*Note: This content is AI-generated based on recent developments. Always verify information from official sources.*\n\n<div align=\"right\">\n<sub>Generated with ❤️ by Tim Warner's AI News System</sub>\n</div>\"\"\"\n \n # Write to file\n with open('latest-github-news.md', 'w', encoding='utf-8') as f:\n f.write(full_content)\n \n except Exception as e:\n print(f\"Error occurred: {str(e)}\")\n exit(1)\n\nif __name__ == \"__main__\":\n main() "}, "380a2baf40620004dbd36ed74bfeaf1717ae90a7": {"t": 1785769959.4438136, "n": 4090, "h": "fa3c60a5dd8b4702", "c": "import os\nimport requests\nfrom datetime import datetime\nimport json\n\ndef query_deepseek(prompt):\n api_key = os.environ.get('DEEPSEEK_API_KEY')\n if not api_key:\n raise ValueError(\"DEEPSEEK_API_KEY environment variable is not set\")\n\n headers = {\n \"Authorization\": f\"Bearer {api_key}\",\n \"Content-Type\": \"application/json\"\n }\n \n data = {\n \"model\": \"deepseek-chat\",\n \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n \"temperature\": 0.3, # Reduced for more focused, factual responses\n \"max_tokens\": 2500 # Increased for more comprehensive coverage\n }\n \n response = requests.post(\n \"https://api.deepseek.com/v1/chat/completions\",\n headers=headers,\n json=data\n )\n \n if response.status_code != 200:\n raise Exception(f\"API request failed with status {response.status_code}: {response.text}\")\n \n return response.json()['choices'][0]['message']['content']\n\ndef main():\n today = datetime.now().strftime('%Y-%m-%d')\n \n prompt = f\"\"\"Act as an expert technical researcher and educator specializing in GitHub Copilot. Your task is to compile a comprehensive update on GitHub Copilot developments that would be valuable for IT professionals and developers. Focus on the following areas, with special attention to practical applications and educational value:\n\nKey Areas to Cover:\n1. Latest Features and Updates\n - New capabilities in GitHub Copilot\n - Changes to existing features\n - Updates to the API or integration points\n - Performance improvements\n\n2. Best Practices and Tips\n - New discovered patterns for effective prompting\n - Workflow optimization techniques\n - Integration tips with different IDEs and tools\n - Security best practices\n\n3. Educational Resources\n - New tutorials or learning materials\n - Notable blog posts or documentation updates\n - Community-contributed guides\n - Training opportunities\n\n4. Enterprise and Professional Use\n - Updates relevant to enterprise deployments\n - Compliance and security updates\n - Team collaboration features\n - License and pricing changes\n\n5. Technical Deep Dives\n - API changes and developer tools\n - Integration possibilities\n - Performance optimization techniques\n - Advanced usage patterns\n\nPrioritize information from:\n- Official GitHub and Microsoft sources\n- GitHub Blog and documentation\n- Microsoft Learn and documentation\n- Notable community contributors and GitHub staff\n\nFormat Requirements:\n- Use clear Markdown formatting\n- Include links to sources where available\n- Organize content with clear headings\n- Focus on actionable insights\n- Include specific examples where relevant\n\nOnly include verifiable information from the past few days. If certain categories have no recent updates, you may omit them.\"\"\"\n\n try:\n news_content = query_deepseek(prompt)\n \n # Add header with date and branding\n full_content = f\"\"\"<div align=\"center\">\n\n# 🤖 GitHub Copilot News Update ({today})\n\n[![TechTrainerTim.com](https://img.shields.io/badge/🌐_TechTrainerTim.com-Visit_Website-2ea44f)](https://TechTrainerTim.com)\n\n</div>\n\n> This update is auto-generated using AI to compile recent GitHub Copilot developments, focusing on practical information for IT professionals and developers.\n\n{news_content}\n\n---\n\n<div align=\"center\">\n\n### Stay Updated with More Tech Training Content\n\n- 🌐 [TechTrainerTim.com](https://TechTrainerTim.com)\n- 📚 Expert-led training and consulting\n- 🤖 Specialized in AI and GitHub Copilot\n- 💡 Custom workshops and courses available\n\n</div>\n\n---\n*Note: This content is AI-generated based on recent developments. Always verify information from official sources.*\n\n<div align=\"right\">\n<sub>Generated with ❤️ by Tim Warner's AI News System</sub>\n</div>\"\"\"\n \n # Write to file\n with open('latest-github-news.md', 'w', encoding='utf-8') as f:\n f.write(full_content)\n \n except Exception as e:\n print(f\"Error occurred: {str(e)}\")\n exit(1)\n\nif __name__ == \"__main__\":\n main() "}}}}