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
#!/bin/env node | |
// Use the openai package from npm to call ChatGPT | |
import OpenAI from "openai"; | |
import fs from "fs"; | |
// Create a new instance of the openai client with our API key | |
const openai = new OpenAI({ | |
apiKey: process.env.OPENAI_KEY, | |
}); |
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
<?php | |
/* | |
Some code here | |
More info here (Russian): https://www.facebook.com/vtvz.ru/posts/1612858868772444 | |
*/ | |
$stdin = fopen('php://stdin', 'r'); | |
$rabbitmq = $connection->getSocket(); | |
while (count($channel->callbacks)) { | |
$read = [$rabbitmq, $stdin]; |
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
<?php | |
class Collection | |
{ | |
/** @var Item[] */ | |
protected $items; | |
/** | |
* Collection constructor. | |
* @param Item $main | |
* @param Item[] $items |