Skip to content

Instantly share code, notes, and snippets.

%matplotlib qt
import pyaudio
import numpy as np
import matplotlib.pyplot as plt
from queue import Queue
import threading
import time
from IPython.display import display, clear_output
<script>
document.addEventListener('DOMContentLoaded', function () {
var path = window.location.pathname;
var pathParts = path.split('/');
pathParts = pathParts.filter(function(part) {
return part !== '';
});
var modelId = pathParts[pathParts.length - 2];
const generateTextButtons = document.querySelectorAll('.{{widget.btn_class}}');
generateTextButtons.forEach(function (button) {
import json, os, requests, openai
openai_api_key = os.getenv('OPENAI_API_KEY')
openai.api_key = openai_api_key
chunks_dir = "novel/chunks/"
edits_dir = "novel/edits/"
#helper function to process files in a directory
def process_directory(d, func):
(require 'org)
(require 'url)
(require 'htmlize)
(defvar s3paste-http-destination
"http://p.hagelb.org"
"Publicly-accessible (via HTTP) location for pasted files.")
(defvar s3paste-user-address
nil
run = 0;
actionFunction = function() {
if (run === 0) {
$('.comment_input_wrapper .body .options').after($('<button id="unsubscribe" class="origin btn">Unsubscribe</button>'));
$('#unsubscribe').click(function(){
alert($('.sender').find('a').html());
});
@chrisclark
chrisclark / pypi-release-checklist.md
Last active April 3, 2018 13:17 — forked from audreyfeldroy/pypi-release-checklist.md
SQL Explorer Release Checklist
  • Update HISTORY
  • Update README and check formatting with http://rst.ninjs.org/
  • Make sure any new files are included in MANIFEST.in
  • Update version number in explorer/__init__.py
  • Update any package dependencies in setup.py
  • Commit the changes:
git add .
git commit -m "Release 1.0.0"
t regular high end
1 0.631 0.869
2 0.468 0.743
3 0.382 0.653
4 0.326 0.593
5 0.289 0.551
6 0.262 0.517
7 0.241 0.491
8 0.223 0.468
9 0.207 0.445
  • Update HISTORY.rst
  • Update version number in my_project/__init__.py
  • Update version number in setup.py
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests:
python setup.py test
  • Update HISTORY.rst
  • Update version number in my_project/__init__.py
  • Update version number in setup.py
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests:
python setup.py test
// ==UserScript==
// @name GitHub Suppress Diffs
// @version 2013.10.29
// @namespace FET
// @description Suppress style.css
// @include http*://github.com/*
// ==/UserScript==
// Files to suppress:
suppressFiles([