mirror of
https://github.com/donnemartin/data-science-ipython-notebooks.git
synced 2024-03-22 13:30:56 +08:00
Added curl commands.
This commit is contained in:
parent
f1f69fbd19
commit
39db0b5057
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"signature": "sha256:f63923c1db7648e284924abcd04bc2b08610cb91f0ab5379f4c3c06e79027c4b"
|
"signature": "sha256:e883affbe4f831de766b4bd337b2a666c4fe8d4118dcbc66de26378b67472b39"
|
||||||
},
|
},
|
||||||
"nbformat": 3,
|
"nbformat": 3,
|
||||||
"nbformat_minor": 0,
|
"nbformat_minor": 0,
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
"* Splitting Files\n",
|
"* Splitting Files\n",
|
||||||
"* Grep\n",
|
"* Grep\n",
|
||||||
"* Compression\n",
|
"* Compression\n",
|
||||||
|
"* Curl\n",
|
||||||
"* View Running Processes\n",
|
"* View Running Processes\n",
|
||||||
"* Terminal Syntax Highlighting\n",
|
"* Terminal Syntax Highlighting\n",
|
||||||
"* Vim"
|
"* Vim"
|
||||||
|
@ -238,6 +239,45 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Curl"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"collapsed": false,
|
||||||
|
"input": [
|
||||||
|
"# Display the curl output:\n",
|
||||||
|
"curl donnemartin.com\n",
|
||||||
|
"\n",
|
||||||
|
"# Download the curl output to a file:\n",
|
||||||
|
"curl donnemartin.com > donnemartin.html\n",
|
||||||
|
"\n",
|
||||||
|
"# Download the curl output to a file -o\n",
|
||||||
|
"curl -o image.png http://i1.wp.com/donnemartin.com/wp-content/uploads/2015/02/splunk_cover.png\n",
|
||||||
|
"\n",
|
||||||
|
"# Download the curl output to a file, keeping the original file name -O\n",
|
||||||
|
"curl -O http://i1.wp.com/donnemartin.com/wp-content/uploads/2015/02/splunk_cover.png\n",
|
||||||
|
" \n",
|
||||||
|
"# Download multiple files, attempting to reuse the same connection\n",
|
||||||
|
"curl -O url1 -O url2\n",
|
||||||
|
"\n",
|
||||||
|
"# Follow redirects -L\n",
|
||||||
|
"curl -L url\n",
|
||||||
|
"\n",
|
||||||
|
"# Resume a previous download -C -\n",
|
||||||
|
"curl -C - -O url\n",
|
||||||
|
"\n",
|
||||||
|
"# Authenticate -u\n",
|
||||||
|
"curl -u username:password url"
|
||||||
|
],
|
||||||
|
"language": "python",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user