<commit_before><commit_msg>add text worksheet<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**1**. Make a list of all files in the current directory `worksheets` but remove the file extnesions and the leading numbers in the filename."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**2**. Count how often the word `markdown` occurs in all files in the current directory `worksheets`. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**3**. Write the following string to a file called `jabberwocky.txt`.\n",
    "\n",
    "```\n",
    "Twas brillig, and the slithy toves\n",
    "  Did gyre and gimble in the wabe:\n",
    "All mimsy were the borogoves,\n",
    "  And the mome raths outgrabe.\n",
    "```\n",
    "\n",
    "Now read in the file line by line and save only the lines that conatin two or more words starting with the same letter into a new file called `truncated_jabberwocky.txt`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**4**. Read the file `jabberwocky.txt` again. Using a regular expression, replace all words containing two or more vowels with the reversed word - e.g. `brillig` would become `gillirb`. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

{'fraction_non_alphanumeric': 0.18572054314498468, 'fraction_numerical': 0.0056942619360490585, 'mean_word_length': 2.871186440677966, 'pattern_counts': {'":': 54, '<': 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': '912394', 'n_tokens_mistral': 847, 'n_tokens_neox': 819, 'n_words': 221}