I wonder if that key works…
It does.
Rip
I don’t get this one.
Also, don’t use AI to write code. It’s a trap! It’s just going to steal your idea for the people who own the AI.
Why are you leaking your API key?
*OUR api key
“Thanks mate, now I can just use it too”
Keys disabled
“Is this number even?”
“yes of no”
“Invalid Response, please answer with yes of no”
“yes of no”
"Invalid Response,…
Inefficient solution.
You should simplify it to just ask the model if the last bit of the binary representation of the integer is a 1 or a 0.
They don’t process inputs as binary (they use clusters of symbols, i.e. letter groups) so that’s not guaranteed to work
r/woosh
I did realize that too was a joke, still wanted to point that out
Well, in the sake of pointing things out, GPT-4 can actually correctly answer the prompt, because it arrives at it in the opposite direction. It can tell the integer is even or odd and knows that even or odd integers in binary end in 0 or 1 respectively.
“… yes or no…”
Lexicon origin of Seven of Nine identified
Rofl. I just imagine OP furiously updating LinkedIn with “AI Programmer”.
this doesn’t seem like a very reliable solution - you should be using the GPT-4 model for more accurate results.
gpt3.5 is faster though. You can tell they really thought about performance while writing this code because they used 3.5 instead. /s
3.5e was so much better than 4e tho /d20
Probably not a good idea to show your API key to everyone…
Yeah encrypt it or at least put on a nsfw tag or something. Gosh. People flaunt their privates like it’s Onlyfans.
What do you mean? I just see asterisks.
Same here. I’m pasting my password here and it will encrypt it so no one can see it other than me: *******
hunter2
yes of no
Not even valid json but compiler doesn’t complain
What json
LOL I made something similar to identify the language of a text.
Have to say, this is not the most convoluted way of testing a simple thing I’ve seen in my years, not by a long shot.
I can’t even
Processors might no longer get twice as fast every few years, but now we can use the power of servers to write software that runs even slower.
We can add caching so numbers that have been checked once can be quickly looked up from an inMemory database.
TIL Python dictionaries allow trailing commas.
Yeah, I think, that’s only really JSON which is so pedantic about it…
Yeah…
sweats nervously in C
List
While there are not actually any trailing commas in the dictionaries present and you are correct to say the ones present are part of a list, you can also have trailing commas in Python dictionaries. OP might have researched “Python trailing commas” and learned that part.
Trailing commas are fantastic to reduce changed lines in
git
diffs. Makes life much better. Same thing with leading commas in SQL queries.Yeh