Skip to content

Instantly share code, notes, and snippets.

@kf0jvt
Created March 9, 2014 20:48
Show Gist options
  • Save kf0jvt/9454323 to your computer and use it in GitHub Desktop.
Save kf0jvt/9454323 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import os\n",
"import json"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Quick way to put all VCDB incidents into a single list of dictionaries\n",
"os.chdir('/Users/v527234/Documents/development/python/vcdb/data/json')\n",
"records = [json.loads(open(filename).read()) for filename in os.listdir('.')]\n",
"len(records)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 8,
"text": [
"3104"
]
}
],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment