Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ericdill
ericdill / render_env.py
Last active October 20, 2021 20:22
Render the dependency graph for your conda environment (needs graphviz!)
import json
import glob
import os
from os.path import join, basename
# install this with "conda install -c conda-forge python-graphviz"
import graphviz as gv
# path to your conda environment
path = os.environ.get('CONDA_PREFIX')
if path is None:
@xmkevinchen
xmkevinchen / asyncio_executor_process.py
Created October 21, 2016 06:53
Python: Asyncio How to use blocking function
# asyncio_executor_process.py
import asyncio
import concurrent.futures
import logging
import sys
import time
def blocks(n):
log = logging.getLogger('blocks({})'.format(n))
@fstorr
fstorr / how-to-get-speech-output-as-text-from-screen-readers.md
Last active May 12, 2025 12:43
How to get speech output as text from screen readers

How to get speech output as text from screen readers

Sometimes you need text, rather than voice, output from screen readers. Why? It's really useful for bug reports ("this disclosure icon is announced as 'black dash triangle dash filled dash x2 underscore final dot png' and needs alt text"). Luckily, getting this text is easy to do.

VoiceOver on MacOS

In VoiceOver you press Option + Control + Shift + C to have the last item that was announced copied to the clipboard. Bonus feature: pressing Option + Control + Shift + Z to save the last phrase to the desktop as an audio file.

VoiceOver on iOS

A three-finger quadruple tap copies the last announcement to the clipboard.

@kofifus
kofifus / Codemirror spellchecker with typo corrections
Last active May 16, 2024 13:05
CodeMirror spell checker with typo correction
usage:
------
// include codemirror.js, addon/mode/overlay.js
// include async typo.js from https://github.com/cfinke/Typo.js/pull/45
// include loadTypo.js from: https://github.com/cfinke/Typo.js/pull/50
// loading typo + dicts takes a while so we start it first
// hosting the dicts on your local domain will give much faster loading time
// english dictionaries taken from https://github.com/cfinke/Typo.js/pull/47
@bollwyvl
bollwyvl / README.md
Created July 19, 2016 01:32
A very simple read-only Jupyter Contents Manager for listing some distributed notebooks

Clone this.

Run jupyter notebook in the directory.

It will list everything in $PREFIX/share/ipynb.

@aliciawyy
aliciawyy / Dockerfile
Last active April 26, 2017 14:12
config files of a python project using jupyter notebook in docker (server)
## Edited on 21 June, Alice Wang
## To build the docker image
## $ cd .
## $ docker build -t fc .
FROM debian:8.3
RUN DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python2.7 python2.7-dev pkg-config
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libxml2-dev libxslt-dev python-lxml
@tacaswell
tacaswell / 2015-05-26_pydata_awj.ipynb
Last active June 9, 2016 14:11
2016-05-26_pydata_awj
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Comparison of configuration file languages

We need to PEPify a static format for writing down bootstrap information in Python source trees. The initial target is a list of PEP 508 package requirement strings. It's possible that in the future we might want to add more features like a build system backend specification (as in PEPs 516, 517), or an extension namespace feature to allow third-party developer tools (flit, pytest, coverage, flake8, etc.) to consolidate their configuration in this file in a systematic

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.