- As Simple as Possible, but No Simpler
- Bugs Are Contagious
- A Good Name Is the Best Documentation
- Generalization Takes Three Examples
- The First Lesson of Optimization Is Don’t Optimize
- Code Reviews Are Good for Three Reasons
- Eliminate Failure Cases
- Code That Isn’t Running Doesn’t Work
- Write Collapsible Code
- Localize Complexity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:22.04 | |
| # Set environment variables | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| DEBIAN_PRIORITY=high \ | |
| PIP_DEFAULT_TIMEOUT=100 \ | |
| PIP_DISABLE_PIP_VERSION_CHECK=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| # Basic system setup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MistralBaseProvider(OpenAIBaseProvider): | |
| def create_function_def(self, name, details, properties, required): | |
| # Wrap all descriptions to avoid Mistral validation error. | |
| details["description"] = {"type": "string", "description": details.get("description")} | |
| return super().create_function_def(name, details, properties, required) | |
| def call(self, messages, functions=None): | |
| # Make the last message a prefix if its role is assistant. | |
| if messages and messages[-1].get("role") == "assistant": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 443 ssl; | |
| server_name api.sandbox.gitwit.dev; | |
| ssl_certificate /etc/letsencrypt/live/api.sandbox.gitwit.dev/fullchain.pem; # managed by Certbot | |
| ssl_certificate_key /etc/letsencrypt/live/api.sandbox.gitwit.dev/privkey.pem; # managed by Certbot | |
| location / { | |
| proxy_pass http://localhost:4000; | |
| proxy_http_version 1.1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Update the System | |
| sudo apt update | |
| sudo apt upgrade | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dotenv import load_dotenv | |
| from crewai import Agent, Task | |
| from crewai_e2b_python.code_interpreter_tool import E2BCodeInterpreterTool | |
| import json | |
| load_dotenv() | |
| def main(): | |
| # Initialize the code interpreter tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ***Code Interpreting... | |
| !pip install requests beautifulsoup4 | |
| import requests | |
| from bs4 import BeautifulSoup | |
| # Fetch the Hacker News homepage | |
| url = 'https://news.ycombinator.com/' | |
| response = requests.get(url) | |
| soup = BeautifulSoup(response.text, 'html.parser') |
00:00:02 hey everyone today we're going to be doing cnns or convolutional neural networks
doing cnns or convolutional neural networks and uh those are neural network models designed for processing structured grid data like images
00:00:06 cnns are neural networks that can be used to classify or detect images
networks that can be used to classify or detect images, and that's about all i know. passing it to naid. yeah, just like the simple.
00:00:24 the idea for cnns was inspired by biological networks, similar to simple neural networks
NewerOlder