My personal notebooks
siggyf / notebooks Goto Github PK
View Code? Open in Web Editor NEWMy personal notebooks
License: GNU General Public License v3.0
My personal notebooks
License: GNU General Public License v3.0
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.