Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ethen8181
GitHub Repository: ethen8181/machine-learning
Path: blob/master/notebook_format/__pycache__/notebook_format.cpython-35.pyc
2580 views


<��V�	�@sCdZddlmZmZmZmZddlmZddlm	Z	ddl
Z
ddljZddl
jZddlZddlZddlZddlZejd�dd�Zd	d
�Zddd
d�Zedddd��Zedd��Zedd��Zdd�Zdd�Zdddd�ZdS)z
# -*- coding: utf-8 -*-

�)�absolute_import�division�print_function�unicode_literals)�contextmanager)�HTMLN�ignorecCsdtjd<tjd�dS)N�
zfigure.figsize�equal)r	r	)�pylab�rcParams�pltZaxis�rr�B/Users/ethen/Business-Analytics/notebook_format/notebook_format.py�
equal_axiss
rcCsdtjd<dS)Nr	�zfigure.figsize)r	r)rrrrrr�
reset_axis srr	rcCs||ftjd<dS)Nzfigure.figsize)rr)�x�yrrr�set_figsize#srccs0tjd}t||�dV|tjd<dS)z:Temporarily set the figure size using 'with figsize(a,b):'zfigure.figsizeN)rrr)rr�sizerrr�figsize's

rccs6tj�d}tjd|�dVtj|�dS)N�	precision)�np�get_printoptions�set_printoptions)r�oldrrr�numpy_precision0srcos2tj�}tj||�dVtj|�dS)N)rrr)�args�kwargs�originalrrr�printoptions7sr!cCs�g}xu|D]m}t|t�r4|jd�}n9t|t�rRt|�}nt|t�rmt|�}|j|�q
W|S)Nzutf-8)�
isinstance�unicode�encode�list�_decode_list�dict�_decode_dict�append)�data�rv�itemrrrr&>s
r&cCs�i}x�|j�D]�\}}t|t�r=|jd�}t|t�r^|jd�}n9t|t�r|t|�}nt|t�r�t|�}|||<qW|S)Nzutf-8)�itemsr"r#r$r%r&r'r()r*r+�key�valuerrrr(Jsr(�.z
custom.csscCs�tjddkr:tjttjj|d���}ntjt|d�dt�}t	j
j|�t�t
jdd�ttjj||�d�j�}t|�S)Nr�z538.json�object_hook�suppressT�r)�sys�version_info�json�load�open�os�path�joinr(r
r�updaterrr�readr)�	directory�name�sZstylesrrr�
load_styleYs'$rB) �__doc__�
__future__rrrr�
contextlibr�IPython.core.displayrr7�matplotlib.pylabr�matplotlib.pyplot�pyplotr
�numpyr�os.pathr:r5�warnings�filterwarningsrrrrrr!r&r(rBrrrr�<module>s*"