Skip to content

Instantly share code, notes, and snippets.

const SECRET_KEY = ENTER YOUR SECRET KEY HERE;
const MAX_TOKENS = 200;
// For more cool AI snippets and demos, follow me on Twitter: https://twitter.com/_abi_
/**
* Completes your prompt with GPT-3
*
* @param {string} prompt Prompt
* @param {number} temperature (Optional) Temperature. 1 is super creative while 0 is very exact and precise. Defaults to 0.4.

Privacy Policy

The Raja Group LLC built the Dough Recipes app as a Free app. This SERVICE is provided by The Raja Group LLC at no cost and is intended for use as is.

This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. we will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Dough Recipes unless otherwise defined in this Privacy Policy.

@abi
abi / server.js
Last active July 12, 2018 16:35
Exponential backoff test server
const http = require('http')
const port = 3000
let count = 0;
const requestHandler = (request, response) => {
console.log(request.url)
count++;
Thanks to Noun Project for several icons used in this app:
array by Thesaurustool from the Noun Project
Sagittarius Cat by Denis Sazhin from the Noun Project
memory card by ProSymbols from the Noun Project
Bynary Tree by H Alberto Gongora from the Noun Project
https by Creative Stall from the Noun Project
anaconda by parkjisun from the Noun Project
Artificial Intelligence by Phil Smith from the Noun Project
database left by Knut M. Synstad from the Noun Project
graphql(
`
{
allMarkdownRemark(limit: 10000) {
edges {
node {
fields
}
}
}
@abi
abi / sereneLog.js
Last active December 21, 2015 04:49
sereneLog lets you log stuff without freaking you and your browser and out. Especially useful for debugging the progress of long loops.
;(function (window) {
/* Throttle fn modified from underscore.js */
var _throttle = function (func, wait) {
var context
var args
var result
var timeout = null
var previous = 0
@abi
abi / gist:3179061
Created July 25, 2012 22:19
Debugging in JS/CS
// Notify the user (or not?) when there's no console
d = function() {
// TODO: Update the JS from CS
var args;
args = 1 <= arguments.length ? [].slice.call(arguments, 0) : [];
return console.log.apply(console, args);
};
d = (args...) ->
@abi
abi / debconf-set-selections
Created July 12, 2011 02:11
Installing Java and MySQL without stupid ncurses prompts
#JAVA
#Thanks to http://www.davidpashley.com/blog/debian/java-license
sun-java5-jdk shared/accepted-sun-dlj-v1-1 select true
sun-java5-jre shared/accepted-sun-dlj-v1-1 select true
sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true
sun-java6-jre shared/accepted-sun-dlj-v1-1 select true
#MySQL
#Thanks to http://www.muhuk.com/2010/05/how-to-install-mysql-with-fabric/
mysql-server mysql-server/root_password password ''
@abi
abi / cloudera.list
Created July 12, 2011 01:24
Cloudera Debian Repo
deb http://archive.cloudera.com/debian maverick-cdh3 contrib
deb-src http://archive.cloudera.com/debian maverick-cdh3 contrib
#Usage: py thisfile.py {JSON-string}
#Try py thisfile.py "["foo", {"bar":["baz", null, 1.0, 2]}]"
import json
import sys
if __name__ == "__main__":
obj = json.loads(sys.argv[1])
print json.dumps(obj, sort_keys=True, indent=4)