Skip to content

Instantly share code, notes, and snippets.

@jehna
jehna / import_backup.py
Last active September 11, 2021 04:36
App Engine import data from Datastore Backup to localhost
"""
# 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/
@alejandrogr
alejandrogr / executeTaskInQueue.java
Last active November 17, 2018 13:06
Appengine JunitTest TaskLauncher
public static void executeTasksInQueue(String p_queue) throws InterruptedException, ServletException, IOException{
LocalTaskQueue ltq = LocalTaskQueueTestConfig.getLocalTaskQueue();
QueueStateInfo qsi = ltq.getQueueStateInfo().get(QueueFactory.getQueue(p_queue).getQueueName());
System.out.println("tasks in queue " + qsi.getTaskInfo().size());
int i, I = qsi.getTaskInfo().size();
for (i = 0; i < I; i++) {
QueueStateInfo.TaskStateInfo tsi = qsi.getTaskInfo().get(i);
String body = tsi.getBody();
System.out.println("body -> " + body);
Map<String, String> queryMap = getQueryMap(body);
@imjasonh
imjasonh / markdown.css
Last active May 24, 2024 22:56
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@VictorTaelin
VictorTaelin / gpt4_abbreviations.md
Last active June 18, 2024 15:03
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.