Skip to content

Commit

Permalink
Docs: Uncomment example of 'n_max' param in tutorial 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
timstaley committed Dec 11, 2015
1 parent b74bea6 commit 5e51939
Showing 1 changed file with 44 additions and 16 deletions.
60 changes: 44 additions & 16 deletions docs/source/notebooks/tutorial1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from __future__ import print_function\n",
Expand All @@ -38,7 +40,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import voeventdb.remote as vr\n",
Expand Down Expand Up @@ -70,7 +74,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# For testing against a local-dev server:\n",
Expand All @@ -90,7 +96,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"apiv1.count()"
Expand All @@ -116,7 +124,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"ivorn_list = apiv1.list_ivorn()\n",
Expand All @@ -126,7 +136,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#Take a look at the first 10\n",
Expand All @@ -143,7 +155,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"print(vr.default_list_n_max)"
Expand All @@ -159,13 +173,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"## How to override the default:\n",
"# vr.default_list_n_max = 2500\n",
"## Set n_max for a single query:\n",
"# apiv1.list_ivorn(n_max=50)"
"short_list = apiv1.list_ivorn(n_max=50)"
]
},
{
Expand All @@ -178,7 +194,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"ivorn = ivorn_list[0]\n",
Expand All @@ -195,7 +213,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"xml = apiv1.packet_xml(ivorn)"
Expand All @@ -211,7 +231,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"## A brief example, see the voevent-parse tutorial for more\n",
Expand All @@ -233,7 +255,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"apiv1.map_stream_count()"
Expand All @@ -249,7 +273,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"apiv1.map_authored_month_count()"
Expand All @@ -266,7 +292,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"apiv1.map_role_count()"
Expand Down Expand Up @@ -297,7 +325,7 @@
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2.0
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
Expand Down

0 comments on commit 5e51939

Please sign in to comment.