Code Monkey home page Code Monkey logo

notebooks's Introduction

notebooks

My personal notebooks

notebooks's People

Contributors

siggyf avatar

Stargazers

 avatar S M T Chua avatar KG avatar Vinod Pahuja avatar  avatar fam_taro avatar Nico Albers avatar  avatar Dustin Miller avatar MP avatar Pavel Savchenko avatar

Watchers

James Cloos avatar  avatar

Forkers

jgd10

notebooks's Issues

pep8 extension avec python3

Hello,

When I use Python3 the following cell produce an error :

%%pep8
a=5


TypeError Traceback (most recent call last)
in ()
----> 1 get_ipython().run_cell_magic('pep8', '', 'a=5')

/usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2262 magic_arg_s = self.var_expand(line, stack_depth)
2263 with self.builtin_trap:
-> 2264 result = fn(magic_arg_s, cell)
2265 return result
2266

/root/.ipython/extensions/pep8_magic.py in pep8(line, cell)
38 with tempfile.NamedTemporaryFile() as f:
39 # save to file
---> 40 f.write(cell + "\n")
41 # make sure it's written
42 f.flush()

/usr/lib/python3.4/tempfile.py in func_wrapper(_args, *_kwargs)
536 @_functools.wraps(func)
537 def func_wrapper(_args, *_kwargs):
--> 538 return func(_args, *_kwargs)
539 # Avoid closing the file as long as the wrapper is alive,
540 # see issue #18879.

TypeError: 'str' does not support the buffer interface

Thanks for your help.

Permission Error when running pep8_magic in jupyter notebooks

I'm trying to run pep8_magic in jupyter notebooks, following this example. However, when I have %%pep8 in a cell, I get a Permission error:

INFO:pep8: ...\AppData\Local\Temp\tmp67jjo44b:1:1: E902 PermissionError: [Errno 13] Permission denied: '...\\AppData\\Local\\Temp\\tmp67jjo44b'

I'm currently using Jupyter 4.1.0 and ipython 5.1.0

NameError: Decorator can only run in context where `get_ipython` exists

Trying to get pep8 magic working:

Traceback (most recent call last):
File "D:\Downloads\pep8_magic.py", line 26, in
@register_cell_magic
File "C:\Users__\Anaconda3\lib\site-packages\IPython\core\magic.py", line 230, in magic_deco
raise NameError('Decorator can only run in context where '
NameError: Decorator can only run in context where get_ipython exists

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.