Skip to content

Instantly share code, notes, and snippets.

View gforsyth's full-sized avatar
🐗
Cinghiale

Gil Forsyth gforsyth

🐗
Cinghiale
View GitHub Profile
### custom keybindings
from prompt_toolkit.keys import Keys
from builtins import events
from prompt_toolkit.filters import Condition, EmacsInsertMode, ViInsertMode
@events.on_post_init
def custom_keys():
handler = __xonsh_shell__.shell.key_bindings_manager.registry.add_binding
distributed.utils - ERROR - 2400000161 exceeds max_bin_len(2147483647)
Traceback (most recent call last):
File "/home/gil/anaconda/envs/dasknumbagpu/lib/python3.5/site-packages/distributed/utils.py", line 207, in log_errors
yield
File "/home/gil/anaconda/envs/dasknumbagpu/lib/python3.5/site-packages/distributed/client.py", line 460, in _handle_report
six.reraise(*clean_exception(**msg))
File "/home/gil/anaconda/envs/dasknumbagpu/lib/python3.5/site-packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/gil/anaconda/envs/dasknumbagpu/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)

Keybase proof

I hereby claim:

  • I am gforsyth on github.
  • I am gforsyth (https://keybase.io/gforsyth) on keybase.
  • I have a public key ASD5MegO4rOU1CyD0UPfND0W7q91ihpI5HhMWslgDaWgqgo

To claim this, I am signing this object:

@gforsyth
gforsyth / xonsh_showoff
Last active August 25, 2016 12:44
xonsh asciicinema script
# welcome to xonsh
1 + 1
# woah!
# env variables are typed
$HOME
x = 'US'
${x + 'ER'}

Xonsh Change Log

v0.3.5

Added:

#Intro to the command line

Welcome! The command can be one of the most powerful ways to interact with a variety of computer systems, but it can also be a little confusing at first glance. This mini-crash-course should help familiarize you with the basics of command line usage and navigation.

##Quick config step

This one bit we are asking you to do before we explain anything else. Please open up a terminal

Applications -> System Tools -> Terminal

##Including .inl files in TAGS

ctags -R -h "+.inl" --language-force=c++ .

@gforsyth
gforsyth / conda.md
Created July 14, 2015 14:56
conda reference

###Exporting

conda env export > environment.yml

###Importing existing environment from yaml file

conda env create --file=/path/to/envfile.yaml

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gforsyth
gforsyth / pr.md
Last active August 29, 2015 14:19 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: