Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.
I've tried to make it as lean and unobtrusive as possible.
errors/AppError.js
| import os | |
| os.environ["OPENAI_API_KEY"] = "<KEY>" | |
| os.environ["OPENAI_ORGANIZATION"] = '<ORG>' | |
| from crewai import Agent, Task, Crew | |
| from langchain_openai import ChatOpenAI | |
| OpenAIGPT4oMini = ChatOpenAI(model_name="gpt-4o-mini", temperature=0.1) | |
| purpose = "To serve as the ultimate digital companion for NBA fans, providing real-time access to games, highlights, player stats, and exclusive content. The app aims to deepen fan engagement by offering personalized experiences, interactive features, and seamless integration with NBA events and merchandise." |
| import requests | |
| import pathlib | |
| filename = "download.txt" | |
| target = "nike/bags/" | |
| def downloadFromFile(): | |
| pathlib.Path(target).mkdir(parents=True, exist_ok=True) |
| pn@bigfoot:/tmp$ sudo minikube version | |
| minikube version: v0.29.0 | |
| pn@bigfoot:/tmp$ sudo kubectl version | |
| Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T18:02:47Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"} | |
| Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"} | |
| pn@bigfoot:/tmp$ sudo kubectl cluster-info |
| ## | |
| ## DRIVERS | |
| # Check which card is being used right now. | |
| prime-select query | |
| # Switch to Intel integrated GPU | |
| sudo prime-select intel | |
| # Switch to Nvidia GPU | |
| sudo prime-select nvidia |
| class App extends Component { | |
| onAddTodo = (text) => { | |
| const {dispatch} = this.props | |
| dispatch (actionCreators.add(text)) | |
| } | |
| render() { | |
| const {todos} = this.props |