<commit_before><commit_msg>demonstration of stubs opening too many connections<commit_after>{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import sys, os\n",
    "# sys.path.insert(0,'/global/homes/b/bpb/repos/metatlas')\n",
    "import metatlas.metatlas_objects as metob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%%time\n",
    "ids = metob.retrieve('CompoundIdentification',username='*')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# now we have to fetch stubs for all frag refs.\n",
    "f = [cid for cid in ids if cid.frag_references]\n",
    "len(f)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "MetAtlas 2.7",
   "language": "python",
   "name": "metatlas"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
{'fraction_non_alphanumeric': 0.20637329286798178, 'fraction_numerical': 0.00834597875569044, 'mean_word_length': 3.0091185410334345, 'pattern_counts': {'":': 36, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563029', 'n_tokens_mistral': 528, 'n_tokens_neox': 515, 'n_words': 96}