Skip to content

Instantly share code, notes, and snippets.

View 3amprogrammer's full-sized avatar

Kamil Latosiński 3amprogrammer

View GitHub Profile
const requestPrice = 0.003;
const responsePrice = 0.004;
const initialPromptSizeInTokens = 500;
const averageRequestTokens = 40;
const averageResponseTokens = 100;
const conversationTimeInMinutes = 15;
const messagesPerMinute = 2;
@3amprogrammer
3amprogrammer / monitor
Created June 14, 2019 16:47
Mutagen Monitor
#!/bin/bash
function is_synced() {
output=`mutagen list`
if (echo ${output} | grep -q "Watching for changes"); then
echo 'yes'
else
echo 'no'
fi
<?php
/**
* Aggregates values as a JSON array
* @param array $columns
* @return string
*/
function json_object(array $columns): string
{
reset($columns);