Skip to content

Instantly share code, notes, and snippets.

View Carreau's full-sized avatar
:octocat:

M Bussonnier Carreau

:octocat:
View GitHub Profile
Traceback (most recent call last):
File "/Users/bussonniermatthias/dev/jedi/jedi/cache.py", line 110, in wrapper
return dct[key]
KeyError: ((), frozenset())
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/bussonniermatthias/dev/jedi/jedi/cache.py", line 110, in wrapper
return dct[key]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-42-e8051349cd43> in <module>
1 script = """x = np.linspace(-np.pi, 10)"""
2 #format_and_infer_types(script)
----> 3 jedi.Interpreter(script, [{'np':np}]).infer(1,0)
~/dev/jedi/jedi/api/helpers.py in validate_line_column.<locals>.wrapper(self, line, column, *args, **kwargs)
483 if not (0 <= column <= line_len):
484 raise ValueError('`column` parameter (%d) is not in a valid range '
import inspect
import functools
from contextlib import contextmanager
@contextmanager
def nested_run():
from trio._core._run import GLOBAL_RUN_CONTEXT
s = object()
task, runner, _dict = s, s, s
@Carreau
Carreau / main.js
Created September 18, 2015 16:53
IPython voice recognition
define(function(){
"use strict";
var Jupyter = require('base/js/namespace');
var norm = function(initial){
return initial
.replace('open parentheses','( ')
.replace('open parenthesis','(')
.replace('open bracket','(')
@Carreau
Carreau / relcanonical.py
Created July 29, 2019 20:14
Fix rel canonical on matplotlib docs
import re
from glob import glob
pat = re.compile('\d\.\d\.\d')
def is_versioned_doc(path):
return pat.match(path.split('/')[0]) is not None
version: '3.5'
services:
arches:
container_name: arches
image: archesproject/arches:master
build:
context: .
dockerfile: ./Dockerfile
command: run_arches
import asyncio
import trio
import sys
from ast import PyCF_ALLOW_TOP_LEVEL_AWAIT
from inspect import CO_COROUTINE
from textwrap import dedent, indent
g = {}
l = {}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.