4 ms·
In case you're not already aware, GPT4 et al write usable Python and can execute some Python code themselves for trying things out. I find it much more pleasan
by getpost 3y ago
In case you're not already aware, GPT4 et al write usable Python and can execute some Python code themselves for trying things out.
I find it much more pleasant to ask GPT4's advice and have it write sample code than it is to use web search, Stack Overflow, etc. Even when I know exactly what code to write, it's often faster to ask GPT4 to write it a certain way and then make minimal edits myself.
The paid version of GPT4 used to be the best, but lately the VSCode Insider GitHub Copilot produces comparable or identical results, since it uses GPT4. I have only one custom instruction, "If writing Python code, always use context managers where appropriate."
EDIT: If you don't want to hassle with maintaining a development environment, try Replit[0]. Their AI is not nearly as good as GPT4 though.
[0] https://replit.com/ https://replit.com/
- strangesmells06 3y agowhats a context manager
- getpost 3y agohttps://realpython.com/python-with-statement/ https://realpython.com/python-with-statement/
- strangesmells06 3y agothanks! have been using the with statement didn't know that's what it was called.
- lhl 3y agoI'd strongly second the suggestion to use the paid (GPT-4 based) ChatGPT Code Interpreter. I've found it to be incredibly strong/useful for interactive Python coding and it does a very good job explaining itself. You can use the custom instructions like "I'm an experienced Ruby developer that last used Python in 2005" and it can provide much better results as well. I've only poked briefly at it, but https://deepseekcoder.github.io/ https://deepseekcoder.github.io/ evals as very strong at code and is probably the best open model available. You can chat with it for free w/ a signup (or run it yourself if you're looking for a project). If you're looking to poke around with local models more easily, you can give KillianLucas/open-interpreter a try (in conjunction with LM Studio or w/ an OpenAI or Anthropic API key), it's pretty neat (be very careful with code execution, I'd recommend doing it in a sandbox lest you accidentally trash your system).
- dumbmrblah 3y agoI like open-interpreter, but be careful using GPT-4 API, you can quickly run up your bill using it.
- an_aparallel 3y agoi cant tell if this is free/uses GPT-4 for something else?
- dumbmrblah 3y agoYou can use it if you are running your own model at home (eg code llama) or use it with gpt 3.5 or 4