/usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__
NameSizeModeActions
arrow.cpython-36.pyc73280644editdlrm
cached.cpython-36.pyc230300644editdlrm
dask.cpython-36.pyc46560644editdlrm
dbfs.cpython-36.pyc133510644editdlrm
dvc.cpython-36.pyc26220644editdlrm
ftp.cpython-36.pyc104440644editdlrm
git.cpython-36.pyc37500644editdlrm
github.cpython-36.pyc74040644editdlrm
hdfs.cpython-36.pyc70930644editdlrm
http.cpython-36.pyc207520644editdlrm
jupyter.cpython-36.pyc41310644editdlrm
libarchive.cpython-36.pyc60050644editdlrm
local.cpython-36.pyc119120644editdlrm
memory.cpython-36.pyc66970644editdlrm
reference.cpython-36.pyc161420644editdlrm
sftp.cpython-36.pyc61040644editdlrm
smb.cpython-36.pyc105910644editdlrm
tar.cpython-36.pyc45020644editdlrm
webhdfs.cpython-36.pyc147120644editdlrm
zip.cpython-36.pyc32760644editdlrm
__init__.cpython-36.pyc1560644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__/jupyter.cpython-36.pyc (4131B)
3 8%Eg@sRddlZddlZddlZddlZddlZGdddejZGdddejjZ dS)Ncs^eZdZdZdZdfdd Zddd Zdd d Zd d ZdddZ ddZ dddZ Z S)JupyterFileSystemz?View of the files as seen by a Jupyter server (notebook or lab)jupyterjlabNc sd|krb|dkrRytjd|d}Wn,tk rP}ztd|WYdd}~XnX|jddd}|jdd|_tj|_ |rd ||j j d <t j f|dS) aD Parameters ---------- url : str Base URL of the server, like "http://127.0.0.1:8888". May include token in the string, which is given by the process when starting up tok : str If the token is obtained separately, can be given here kwargs ?Nztoken=([a-z0-9]+)rzCould not determine token/z /api/contentsztoken Authorization) refindall IndexError ValueErrorsplitrstripurlrequestsSessionsessionheaderssuper__init__)selfrtokkwargse) __class__H/usr/local/lib/python3.6/site-packages/fsspec/implementations/jupyter.pyrs  zJupyterFileSystem.__init__TcKs|j|}|jj|jd|}|jdkr2t|S|j|j}|ddkrX|d}n|g}x8|D]0}|jd|d<|jd|ddkrdd |d<qdW|r|Sd d |DS) Nritype directorycontentpathnameZnotebookfilecSsg|] }|dqS)r!r).0orrr <sz(JupyterFileSystem.ls..) _strip_protocolrgetr status_codeFileNotFoundErrorraise_for_statusjsonpop)rr Zdetailrroutr$rrrls)s"        zJupyterFileSystem.lscKsv|j|}|jj|jd|}|jdkr2t|S|j|j}|ddkr\|dj}nt j |d}|||S)Nriformattextr) r&rr'rr(r)r*r+encodebase64 b64decode)rr startendrr-r.brrrcat_file>s   zJupyterFileSystem.cat_filecKsT|j|}|jddd|t|tj|jddd}|jj|jd||ddS)Nrrr3r")r!r sizerr0r)r+) r&rsplitlenr3 b64encodedecoderputr)rr value_r+rrr pipe_fileLs  zJupyterFileSystem.pipe_filecKsh|j|}|r.d|kr.|j|jdddd|jddd|dddd}|jj|jd||ddS) NrrrTr)r!r r9rr)r+r:)r&mkdirr;rr?r)rr Zcreate_parentsrr+rrrrCXs  zJupyterFileSystem.mkdircCs$|j|}|jj|jd|dS)Nr)r&rdeleter)rr rrr_rmes zJupyterFileSystem._rmrbcKs8|j|}|dkr&|j|}tj|St||ddSdS)NrFwb)mode)r&r8ioBytesIOSimpleFileWriter)rr rHrdatarrr_openis    zJupyterFileSystem._open)rr)N)T)NN)T)rF) __name__ __module__ __qualname____doc__protocolrr/r8rBrCrErM __classcell__rr)rrr s   rc@seZdZdddZdS)rKFcCs6|dkr dS|jjd|jj}|jj|j|dS)zWNever uploads a chunk until file is done Not suitable for large files FrN)bufferseekreadfsrBr )rfinalrLrrr _upload_chunkss   zSimpleFileWriter._upload_chunkN)F)rNrOrPrYrrrrrKrsrK) r3rIr rZfsspecZAbstractFileSystemrspecZAbstractBufferedFilerKrrrrs h