Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
58 changes: 39 additions & 19 deletions file-io.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"------"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -43,7 +50,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -55,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -70,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -99,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -108,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -119,20 +126,9 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<generator object Path.glob at 0x71ead4273450>"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"from pathlib import Path\n",
"\n",
Expand All @@ -146,7 +142,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -155,6 +151,30 @@
" with open(iliad_file, \"r\") as f:\n",
" a.write(f.read() + \"\\n\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pathlib import Path\n",
"\n",
"with open ('pope-iliad.txt', 'r') as file:\n",
" total_lines = file.read().splitlines()\n",
"\n",
"slice = total_lines[3706:4706]\n",
"\n",
"outdir = Path('iliad_lines')\n",
"\n",
"outdir.mkdir(exist_ok=True)\n",
"\n",
"for index in range(len(slice)):\n",
" line = slice[index]\n",
" output = outdir / f'line_{index+1}.txt'\n",
" with open(output, 'w') as f:\n",
" f.write(line)"
]
}
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions iliad_lines/line_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Their cliffs above, and ample bay below.
1 change: 1 addition & 0 deletions iliad_lines/line_10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And Ægion, and Adrastus’ ancient reign;
1 change: 1 addition & 0 deletions iliad_lines/line_100.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These in twelve galleys with vermilion prores,
1 change: 1 addition & 0 deletions iliad_lines/line_1000.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
An odious conquest and a captive wife,
1 change: 1 addition & 0 deletions iliad_lines/line_101.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Beneath his conduct sought the Phrygian shores.
Empty file added iliad_lines/line_102.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_103.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thoas came next, Andræmon’s valiant son,
1 change: 1 addition & 0 deletions iliad_lines/line_104.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
From Pleuron’s walls, and chalky Calydon,
1 change: 1 addition & 0 deletions iliad_lines/line_105.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And rough Pylene, and the Olenian steep,
1 change: 1 addition & 0 deletions iliad_lines/line_106.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And Chalcis, beaten by the rolling deep.
1 change: 1 addition & 0 deletions iliad_lines/line_107.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
He led the warriors from the Ætolian shore,
1 change: 1 addition & 0 deletions iliad_lines/line_108.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For now the sons of Œneus were no more!
1 change: 1 addition & 0 deletions iliad_lines/line_109.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The glories of the mighty race were fled!
1 change: 1 addition & 0 deletions iliad_lines/line_11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And those who dwell along the sandy shore,
1 change: 1 addition & 0 deletions iliad_lines/line_110.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Œneus himself, and Meleager dead!
1 change: 1 addition & 0 deletions iliad_lines/line_111.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To Thoas’ care now trust the martial train,
1 change: 1 addition & 0 deletions iliad_lines/line_112.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
His forty vessels follow through the main.
Empty file added iliad_lines/line_113.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_114.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Next, eighty barks the Cretan king commands,
1 change: 1 addition & 0 deletions iliad_lines/line_115.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Of Gnossus, Lyctus, and Gortyna’s bands;
1 change: 1 addition & 0 deletions iliad_lines/line_116.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And those who dwell where Rhytion’s domes arise,
1 change: 1 addition & 0 deletions iliad_lines/line_117.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Or white Lycastus glitters to the skies,
1 change: 1 addition & 0 deletions iliad_lines/line_118.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Or where by Phæstus silver Jardan runs;
1 change: 1 addition & 0 deletions iliad_lines/line_119.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Crete’s hundred cities pour forth all her sons.
1 change: 1 addition & 0 deletions iliad_lines/line_12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And where Pellenè yields her fleecy store,
1 change: 1 addition & 0 deletions iliad_lines/line_120.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These march’d, Idomeneus, beneath thy care,
1 change: 1 addition & 0 deletions iliad_lines/line_121.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And Merion, dreadful as the god of war.
Empty file added iliad_lines/line_122.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_123.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tlepolemus, the son of Hercules,
1 change: 1 addition & 0 deletions iliad_lines/line_124.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Led nine swift vessels through the foamy seas,
1 change: 1 addition & 0 deletions iliad_lines/line_125.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
From Rhodes, with everlasting sunshine bright,
1 change: 1 addition & 0 deletions iliad_lines/line_126.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Jalyssus, Lindus, and Camirus white.
1 change: 1 addition & 0 deletions iliad_lines/line_127.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
His captive mother fierce Alcides bore
1 change: 1 addition & 0 deletions iliad_lines/line_128.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
From Ephyr’s walls and Sellè’s winding shore,
1 change: 1 addition & 0 deletions iliad_lines/line_129.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Where mighty towns in ruins spread the plain,
1 change: 1 addition & 0 deletions iliad_lines/line_13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Where Helicè and Hyperesia lie,
1 change: 1 addition & 0 deletions iliad_lines/line_130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And saw their blooming warriors early slain.
1 change: 1 addition & 0 deletions iliad_lines/line_131.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The hero, when to manly years he grew,
1 change: 1 addition & 0 deletions iliad_lines/line_132.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Alcides’ uncle, old Licymnius, slew;
1 change: 1 addition & 0 deletions iliad_lines/line_133.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For this, constrain’d to quit his native place,
1 change: 1 addition & 0 deletions iliad_lines/line_134.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And shun the vengeance of the Herculean race,
1 change: 1 addition & 0 deletions iliad_lines/line_135.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A fleet he built, and with a numerous train
1 change: 1 addition & 0 deletions iliad_lines/line_136.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Of willing exiles wander’d o’er the main;
1 change: 1 addition & 0 deletions iliad_lines/line_137.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Where, many seas and many sufferings past,
1 change: 1 addition & 0 deletions iliad_lines/line_138.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
On happy Rhodes the chief arrived at last:
1 change: 1 addition & 0 deletions iliad_lines/line_139.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
There in three tribes divides his native band,
1 change: 1 addition & 0 deletions iliad_lines/line_14.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And Gonoëssa’s spires salute the sky.
1 change: 1 addition & 0 deletions iliad_lines/line_140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And rules them peaceful in a foreign land;
1 change: 1 addition & 0 deletions iliad_lines/line_141.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increased and prosper’d in their new abodes
1 change: 1 addition & 0 deletions iliad_lines/line_142.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
By mighty Jove, the sire of men and gods;
1 change: 1 addition & 0 deletions iliad_lines/line_143.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
With joy they saw the growing empire rise,
1 change: 1 addition & 0 deletions iliad_lines/line_144.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And showers of wealth descending from the skies.
Empty file added iliad_lines/line_145.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_146.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Three ships with Nireus sought the Trojan shore,
1 change: 1 addition & 0 deletions iliad_lines/line_147.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Nireus, whom Agäle to Charopus bore,
1 change: 1 addition & 0 deletions iliad_lines/line_148.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Nireus, in faultless shape and blooming grace,
1 change: 1 addition & 0 deletions iliad_lines/line_149.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The loveliest youth of all the Grecian race;[104]
1 change: 1 addition & 0 deletions iliad_lines/line_15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Great Agamemnon rules the numerous band,
1 change: 1 addition & 0 deletions iliad_lines/line_150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pelides only match’d his early charms;
1 change: 1 addition & 0 deletions iliad_lines/line_151.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
But few his troops, and small his strength in arms.
Empty file added iliad_lines/line_152.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_153.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Next thirty galleys cleave the liquid plain,
1 change: 1 addition & 0 deletions iliad_lines/line_154.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Of those Calydnæ’s sea-girt isles contain;
1 change: 1 addition & 0 deletions iliad_lines/line_155.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
With them the youth of Nisyrus repair,
1 change: 1 addition & 0 deletions iliad_lines/line_156.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Casus the strong, and Crapathus the fair;
1 change: 1 addition & 0 deletions iliad_lines/line_157.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cos, where Eurypylus possess’d the sway,
1 change: 1 addition & 0 deletions iliad_lines/line_158.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Till great Alcides made the realms obey:
1 change: 1 addition & 0 deletions iliad_lines/line_159.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These Antiphus and bold Phidippus bring,
1 change: 1 addition & 0 deletions iliad_lines/line_16.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A hundred vessels in long order stand,
1 change: 1 addition & 0 deletions iliad_lines/line_160.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sprung from the god by Thessalus the king.
Empty file added iliad_lines/line_161.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_162.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Now, Muse, recount Pelasgic Argos’ powers,
1 change: 1 addition & 0 deletions iliad_lines/line_163.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
From Alos, Alopé, and Trechin’s towers:
1 change: 1 addition & 0 deletions iliad_lines/line_164.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
From Phthia’s spacious vales; and Hella, bless’d
1 change: 1 addition & 0 deletions iliad_lines/line_165.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
With female beauty far beyond the rest.
1 change: 1 addition & 0 deletions iliad_lines/line_166.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Full fifty ships beneath Achilles’ care,
1 change: 1 addition & 0 deletions iliad_lines/line_167.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Achaians, Myrmidons, Hellenians bear;
1 change: 1 addition & 0 deletions iliad_lines/line_168.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thessalians all, though various in their name;
1 change: 1 addition & 0 deletions iliad_lines/line_169.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The same their nation, and their chief the same.
1 change: 1 addition & 0 deletions iliad_lines/line_17.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And crowded nations wait his dread command.
1 change: 1 addition & 0 deletions iliad_lines/line_170.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
But now inglorious, stretch’d along the shore,
1 change: 1 addition & 0 deletions iliad_lines/line_171.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
They hear the brazen voice of war no more;
1 change: 1 addition & 0 deletions iliad_lines/line_172.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No more the foe they face in dire array:
1 change: 1 addition & 0 deletions iliad_lines/line_173.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Close in his fleet the angry leader lay;
1 change: 1 addition & 0 deletions iliad_lines/line_174.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Since fair Briseïs from his arms was torn,
1 change: 1 addition & 0 deletions iliad_lines/line_175.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The noblest spoil from sack’d Lyrnessus borne,
1 change: 1 addition & 0 deletions iliad_lines/line_176.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Then, when the chief the Theban walls o’erthrew,
1 change: 1 addition & 0 deletions iliad_lines/line_177.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And the bold sons of great Evenus slew.
1 change: 1 addition & 0 deletions iliad_lines/line_178.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
There mourn’d Achilles, plunged in depth of care,
1 change: 1 addition & 0 deletions iliad_lines/line_179.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
But soon to rise in slaughter, blood, and war.
1 change: 1 addition & 0 deletions iliad_lines/line_18.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
High on the deck the king of men appears,
Empty file added iliad_lines/line_180.txt
Empty file.
1 change: 1 addition & 0 deletions iliad_lines/line_181.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To these the youth of Phylacè succeed,
1 change: 1 addition & 0 deletions iliad_lines/line_182.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Itona, famous for her fleecy breed,
1 change: 1 addition & 0 deletions iliad_lines/line_183.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And grassy Pteleon deck’d with cheerful greens,
1 change: 1 addition & 0 deletions iliad_lines/line_184.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The bowers of Ceres, and the sylvan scenes.
1 change: 1 addition & 0 deletions iliad_lines/line_185.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sweet Pyrrhasus, with blooming flowerets crown’d,
1 change: 1 addition & 0 deletions iliad_lines/line_186.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
And Antron’s watery dens, and cavern’d ground.
1 change: 1 addition & 0 deletions iliad_lines/line_187.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These own’d, as chief, Protesilas the brave,
Loading