Skip to content

Commit e11b5e8

Browse files
committed
add reqs
1 parent b35083a commit e11b5e8

File tree

2 files changed

+46
-20
lines changed

2 files changed

+46
-20
lines changed

Burrows Delta Walkthrough.ipynb

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,24 @@
2828
},
2929
{
3030
"cell_type": "code",
31-
"execution_count": 4,
31+
"execution_count": 3,
32+
"metadata": {},
33+
"outputs": [
34+
{
35+
"name": "stdout",
36+
"output_type": "stream",
37+
"text": [
38+
"Python 3.12.7\n"
39+
]
40+
}
41+
],
42+
"source": [
43+
"!python --version"
44+
]
45+
},
46+
{
47+
"cell_type": "code",
48+
"execution_count": 7,
3249
"metadata": {},
3350
"outputs": [
3451
{
@@ -37,37 +54,42 @@
3754
"text": [
3855
"\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
3956
"\u001b[0m\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
40-
"\u001b[0mCollecting faststylometry\n",
41-
" Using cached faststylometry-1.0.7-py3-none-any.whl.metadata (12 kB)\n",
42-
"Requirement already satisfied: numpy>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (2.3.1)\n",
43-
"Requirement already satisfied: pandas>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (2.3.1)\n",
44-
"Requirement already satisfied: scikit-learn>=1.7.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (1.7.1)\n",
45-
"Requirement already satisfied: wget>=3.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (3.2)\n",
46-
"Requirement already satisfied: python-dateutil>=2.8.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry) (2.9.0.post0)\n",
47-
"Requirement already satisfied: pytz>=2020.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry) (2024.1)\n",
48-
"Requirement already satisfied: tzdata>=2022.7 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry) (2023.3)\n",
49-
"Requirement already satisfied: scipy>=1.8.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry) (1.16.0)\n",
50-
"Requirement already satisfied: joblib>=1.2.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry) (1.4.2)\n",
51-
"Requirement already satisfied: threadpoolctl>=3.1.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry) (3.5.0)\n",
52-
"Requirement already satisfied: six>=1.5 in /home/thomas/anaconda3/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas>=2.3.1->faststylometry) (1.16.0)\n",
53-
"Using cached faststylometry-1.0.7-py3-none-any.whl (18 kB)\n",
57+
"\u001b[0mCollecting faststylometry==1.0.13\n",
58+
" Downloading faststylometry-1.0.13-py3-none-any.whl.metadata (14 kB)\n",
59+
"Requirement already satisfied: numpy>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (2.3.1)\n",
60+
"Requirement already satisfied: pandas>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (2.3.1)\n",
61+
"Requirement already satisfied: scikit-learn>=1.7.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (1.7.1)\n",
62+
"Requirement already satisfied: wget>=3.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (3.2)\n",
63+
"Requirement already satisfied: python-dateutil>=2.8.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry==1.0.13) (2.9.0.post0)\n",
64+
"Requirement already satisfied: pytz>=2020.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry==1.0.13) (2024.1)\n",
65+
"Requirement already satisfied: tzdata>=2022.7 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry==1.0.13) (2023.3)\n",
66+
"Requirement already satisfied: scipy>=1.8.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry==1.0.13) (1.16.0)\n",
67+
"Requirement already satisfied: joblib>=1.2.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry==1.0.13) (1.4.2)\n",
68+
"Requirement already satisfied: threadpoolctl>=3.1.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry==1.0.13) (3.5.0)\n",
69+
"Requirement already satisfied: six>=1.5 in /home/thomas/anaconda3/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas>=2.3.1->faststylometry==1.0.13) (1.16.0)\n",
70+
"Downloading faststylometry-1.0.13-py3-none-any.whl (19 kB)\n",
5471
"\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
5572
"\u001b[0mInstalling collected packages: faststylometry\n",
73+
" Attempting uninstall: faststylometry\n",
74+
"\u001b[33m WARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
75+
"\u001b[0m Found existing installation: faststylometry 1.0.11\n",
76+
" Uninstalling faststylometry-1.0.11:\n",
77+
" Successfully uninstalled faststylometry-1.0.11\n",
5678
"\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
57-
"\u001b[0mSuccessfully installed faststylometry-1.0.7\n",
79+
"\u001b[0mSuccessfully installed faststylometry-1.0.13\n",
5880
"\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
5981
"\u001b[0m\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n",
6082
"\u001b[0m"
6183
]
6284
}
6385
],
6486
"source": [
65-
"!pip install faststylometry"
87+
"!pip install faststylometry==1.0.13"
6688
]
6789
},
6890
{
6991
"cell_type": "code",
70-
"execution_count": 5,
92+
"execution_count": 9,
7193
"metadata": {
7294
"scrolled": true
7395
},
@@ -126,7 +148,7 @@
126148
" if await self.run_code(code, result, async_=asy):\n",
127149
" File \"/home/thomas/anaconda3/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3577, in run_code\n",
128150
" exec(code_obj, self.user_global_ns, self.user_ns)\n",
129-
" File \"/tmp/ipykernel_127318/1668831037.py\", line 1, in <module>\n",
151+
" File \"/tmp/ipykernel_130328/1668831037.py\", line 1, in <module>\n",
130152
" from faststylometry import Corpus\n",
131153
" File \"/home/thomas/anaconda3/lib/python3.12/site-packages/faststylometry/__init__.py\", line 37, in <module>\n",
132154
" from faststylometry.probability import predict_proba, calibrate, get_calibration_curve\n",
@@ -170,7 +192,7 @@
170192
"traceback": [
171193
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
172194
"\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)",
173-
"Cell \u001b[0;32mIn[5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Corpus\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m download_examples\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m load_corpus_from_folder\n",
195+
"Cell \u001b[0;32mIn[9], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Corpus\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m download_examples\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m load_corpus_from_folder\n",
174196
"File \u001b[0;32m~/anaconda3/lib/python3.12/site-packages/faststylometry/__init__.py:37\u001b[0m\n\u001b[1;32m 35\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01men\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m tokenise_remove_pronouns_en\n\u001b[1;32m 36\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mburrows_delta\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m calculate_burrows_delta\n\u001b[0;32m---> 37\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprobability\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m predict_proba, calibrate, get_calibration_curve\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexamples\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m download_examples\n",
175197
"File \u001b[0;32m~/anaconda3/lib/python3.12/site-packages/faststylometry/probability.py:32\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 31\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[0;32m---> 32\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlinear_model\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m LogisticRegression\n\u001b[1;32m 34\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mburrows_delta\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m calculate_burrows_delta\n\u001b[1;32m 35\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcorpus\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Corpus\n",
176198
"File \u001b[0;32m~/anaconda3/lib/python3.12/site-packages/sklearn/__init__.py:73\u001b[0m\n\u001b[1;32m 62\u001b[0m \u001b[38;5;66;03m# `_distributor_init` allows distributors to run custom init code.\u001b[39;00m\n\u001b[1;32m 63\u001b[0m \u001b[38;5;66;03m# For instance, for the Windows wheel, this is used to pre-load the\u001b[39;00m\n\u001b[1;32m 64\u001b[0m \u001b[38;5;66;03m# vcomp shared library runtime for OpenMP embedded in the sklearn/.libs\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[38;5;66;03m# later is linked to the OpenMP runtime to make it possible to introspect\u001b[39;00m\n\u001b[1;32m 68\u001b[0m \u001b[38;5;66;03m# it and importing it first would fail if the OpenMP dll cannot be found.\u001b[39;00m\n\u001b[1;32m 69\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ( \u001b[38;5;66;03m# noqa: F401 E402\u001b[39;00m\n\u001b[1;32m 70\u001b[0m __check_build,\n\u001b[1;32m 71\u001b[0m _distributor_init,\n\u001b[1;32m 72\u001b[0m )\n\u001b[0;32m---> 73\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mbase\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m clone \u001b[38;5;66;03m# noqa: E402\u001b[39;00m\n\u001b[1;32m 74\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_show_versions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m show_versions \u001b[38;5;66;03m# noqa: E402\u001b[39;00m\n\u001b[1;32m 76\u001b[0m _submodules \u001b[38;5;241m=\u001b[39m [\n\u001b[1;32m 77\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcalibration\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 78\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcluster\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 114\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcompose\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 115\u001b[0m ]\n",

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
numpy>=2.3.1
2+
pandas>=2.3.1
3+
scikit-learn>=1.7.1
4+
wget>=3.2

0 commit comments

Comments
 (0)