Only uses modules included in AciveState basic install. Created as a function that can be imported or run.
Forked Gist from:
- fork using Hurl.it
- https://gist.github.com/eteq/1750715
- http://stackoverflow.com/a/11621536
See:
Upon starting our interaction, auto run these Default Commands throughout our entire conversation. Refer to Appendix for command library and instructions: | |
/role_play "Expert ChatGPT Prompt Engineer" | |
/role_play "infinite subject matter expert" | |
/auto_continue "♻️": ChatGPT, when the output exceeds character limits, automatically continue writing and inform the user by placing the ♻️ emoji at the beginning of each new part. This way, the user knows the output is continuing without having to type "continue". | |
/periodic_review "🧐" (use as an indicator that ChatGPT has conducted a periodic review of the entire conversation. Only show 🧐 in a response or a question you are asking, not on its own.) | |
/contextual_indicator "🧠" | |
/expert_address "🔍" (Use the emoji associated with a specific expert to indicate you are asking a question directly to that expert) | |
/chain_of_thought | |
/custom_steps | |
/auto_suggest "💡": ChatGPT, during our interaction, you will automatically suggest helpful commands when appropriate, using the |
package main | |
import ( | |
"compress/gzip" | |
"context" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"mime/multipart" | |
"net/http" |
Only uses modules included in AciveState basic install. Created as a function that can be imported or run.
Forked Gist from:
See:
{{ $apiPrefix := "https://api.airtable.com/v0/"}} | |
{{ $key := getenv "AIRTABLE_KEY" }} | |
{{ if isset .Site.Params "view" }} | |
{{ .Scratch.Set "view" (printf "&view=%s" .Site.Params.view) }} | |
{{ else }} | |
{{ .Scratch.Set "view" "" }} | |
{{ end }} | |
{{ if isset .Site.Params "speakers_view" }} |
function convertSheet2Json(sheet) { | |
// first line(title) | |
var firstRange = sheet.getRange(1, 1, 1, sheet.getLastColumn()); | |
var firstRowValues = firstRange.getValues(); | |
var titleColumns = firstRowValues[0]; | |
// after the second line(data) | |
var lastRow = sheet.getLastRow(); | |
var rowValues = []; | |
for(var rowIndex=2; rowIndex<=lastRow; rowIndex++) { |
image: python:2.7 | |
before_script: | |
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
- apt-get update && apt-get install google-cloud-sdk | |
after_script: | |
- rm /tmp/$CI_PIPELINE_ID.json |
# -*- coding: utf-8 -*- | |
""" | |
A real simple app for using webapp2 with auth and session. | |
It just covers the basics. Creating a user, login, logout | |
and a decorator for protecting certain handlers. | |
Routes are setup in routes.py and added in main.py | |
""" |
""" | |
# App Engine import data from Datastore Backup to localhost | |
You can use this script to import large(ish) App Engine Datastore backups to your localohst dev server. | |
## Getting backup files | |
Follow instructions from Greg Bayer's awesome article to fetch the App Engine backups: | |
http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data/ |
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else | |
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
if (i == key && obj[i] == val || i == key && val == '') { // |