Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 280
Kernel: Python 3 (system-wide)
def count_file(fname): fp = open(fname) string = fp.read() lines = 0 letters = 0 for line in string: lines += 1 line = line.strip().replace('\n', '') letters += len(line) print(letters, lines) fp.close()
count_file("2.5_day.csv")
9106 9398
def secret(fname): fp = open(fname) for line in fp: print(line) print(fp) fp.close()
secret("2.5_day.csv")
time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type,horizontalError,depthError,magError,magNst,status,locationSource,magSource 2020-03-17T22:44:17.410Z,19.1611,-67.7238,77,3.17,md,9,239,0.8143,0.53,pr,pr2020077037,2020-03-17T23:06:35.711Z,"96km NE of Punta Cana, Dominican Republic",earthquake,4.76,9.41,0.35,6,reviewed,pr,pr 2020-03-17T22:21:51.052Z,17.9873,-66.8069,10,2.8,ml,,172,0.043,0.68,us,us60008hgf,2020-03-17T22:33:55.040Z,"1km ESE of Indios, Puerto Rico",earthquake,1.8,1.6,0.063,33,reviewed,us,us 2020-03-17T21:37:03.950Z,36.5661659,-121.1578369,2.48,2.73,md,39,64,,0.1,nc,nc73355200,2020-03-17T23:07:18.744Z,"4km NNW of Pinnacles, CA",earthquake,0.21,0.48,0.16,41,automatic,nc,nc 2020-03-17T20:31:38.650Z,17.841,-66.8591,7,3,md,8,255,0.1356,0.07,pr,pr2020077033,2020-03-17T20:41:48.155Z,"15km SSE of Guanica, Puerto Rico",earthquake,0.59,0.3,0.21,4,reviewed,pr,pr 2020-03-17T20:16:14.190Z,17.9318,-66.8366,15,2.61,md,8,223,0.0607,0.13,pr,pr2020077031,2020-03-17T20:33:18.680Z,"7km SSW of Indios, Puerto Rico",earthquake,1.06,0.6,0.23,5,reviewed,pr,pr 2020-03-17T19:23:37.160Z,17.8803,-66.8976,9,3.08,md,8,243,0.0966,0.11,pr,pr2020077028,2020-03-17T19:48:38.101Z,"10km S of Guanica, Puerto Rico",earthquake,0.68,0.64,0.19,3,reviewed,pr,pr 2020-03-17T19:21:46.683Z,-18.1548,-178.1162,542.34,4.5,mb,,59,3.669,0.82,us,us60008hb9,2020-03-17T21:02:14.040Z,"282km NNE of Ndoi Island, Fiji",earthquake,11.5,7.3,0.034,249,reviewed,us,us 2020-03-17T19:18:46.630Z,17.9791,-66.7833,14,2.61,md,4,323,0.096,0.1,pr,pr2020077029,2020-03-17T19:48:51.237Z,"4km SSE of Guayanilla, Puerto Rico",earthquake,1.13,0.71,0,1,reviewed,pr,pr 2020-03-17T18:50:51.410Z,17.8808,-66.8938,10,2.8,md,8,243,0.0954,0.05,pr,pr2020077027,2020-03-17T20:19:10.040Z,"11km S of Guanica, Puerto Rico",earthquake,0.53,0.41,0.38,3,reviewed,pr,pr 2020-03-17T18:14:34.653Z,37.0063,27.3892,21.82,4.4,mb,,45,0.986,0.75,us,us60008h9t,2020-03-17T20:17:09.044Z,"5km SW of Bodrum, Turkey",earthquake,5.4,5.5,0.082,48,reviewed,us,us 2020-03-17T18:06:03.390Z,17.8933,-66.8441,10,2.61,md,6,239,0.089,0.09,pr,pr2020077024,2020-03-17T19:38:18.290Z,"10km SE of Guanica, Puerto Rico",earthquake,0.92,0.78,0.15,2,reviewed,pr,pr 2020-03-17T17:32:45.280Z,18.0185,-66.7425,9,2.89,md,6,173,0.1384,0.2,pr,pr2020077023,2020-03-17T17:43:17.513Z,"2km E of Magas Arriba, Puerto Rico",earthquake,0.9,3.54,0.22,3,reviewed,pr,pr 2020-03-17T17:09:35.010Z,17.9513,-66.8115,12,2.51,md,6,216,0.0718,0.28,pr,pr2020077022,2020-03-17T17:23:36.281Z,"4km S of Indios, Puerto Rico",earthquake,3.03,0.99,0.08,3,reviewed,pr,pr 2020-03-17T16:16:20.780Z,17.8183,-66.8798,29,3.48,md,8,262,0.1568,0.09,pr,pr2020077020,2020-03-17T17:02:39.117Z,"11km SSE of Guanica, Puerto Rico",earthquake,0.95,0.71,0.29,5,reviewed,pr,pr 2020-03-17T16:06:22.225Z,-15.9951,-172.1366,10,6,mww,,60,3.719,0.68,us,us60008h76,2020-03-17T20:40:55.874Z,"172km E of Hihifo, Tonga",earthquake,8.9,1.9,0.06,27,reviewed,us,us 2020-03-17T15:27:03.000Z,17.9138,-66.7486,7,2.63,md,6,240,0.1443,0.12,pr,pr2020077019,2020-03-17T16:13:00.523Z,"9km SSW of Tallaboa, Puerto Rico",earthquake,2.83,2.42,0.13,2,reviewed,pr,pr 2020-03-17T15:21:31.020Z,17.9288,-66.8875,15,2.86,md,8,224,0.047,0.15,pr,pr2020077021,2020-03-17T16:55:40.658Z,"5km SSE of Guanica, Puerto Rico",earthquake,1.61,0.49,0.01,3,reviewed,pr,pr 2020-03-17T15:10:32.217Z,42.3613,138.3071,227.14,5,mb,,49,2.366,0.35,us,us60008h6c,2020-03-17T15:27:39.040Z,"192km WSW of Iwanai, Japan",earthquake,8.5,7,0.023,594,reviewed,us,us 2020-03-17T14:38:15.590Z,17.8865,-66.8755,15,2.86,md,8,241,0.0887,0.1,pr,pr2020077018,2020-03-17T22:40:46.850Z,"18km SSE of Guanica, Puerto Rico",earthquake,1.67,0.63,0.15,4,reviewed,pr,pr 2020-03-17T14:30:26.507Z,58.2215,-152.5518,56.5,3.6,ml,,,,0.39,ak,ak0203jkw9zy,2020-03-17T20:34:56.040Z,"49km N of Kodiak, Alaska",earthquake,,0.4,,,reviewed,ak,ak 2020-03-17T14:24:04.353Z,48.8206,153.6348,153.7,4.6,mb,,92,5.002,0.47,us,us60008h5z,2020-03-17T15:05:22.040Z,"273km SW of Severo-Kuril'sk, Russia",earthquake,10,7.2,0.038,205,reviewed,us,us 2020-03-17T14:20:00.530Z,17.9038,-66.903,8,3.15,ml,8,235,0.0752,0.05,pr,pr2020077017,2020-03-17T14:57:46.877Z,"7km S of Guanica, Puerto Rico",earthquake,0.69,0.58,0.03,3,reviewed,pr,pr 2020-03-17T13:59:25.063Z,13.4964,-90.8987,35,4.3,mb,,204,1.281,1.08,us,us60008h5l,2020-03-17T19:17:10.985Z,"48km S of Puerto San Jose, Guatemala",earthquake,7.8,2,0.111,24,reviewed,us,us 2020-03-17T13:52:12.150Z,18.0421,-66.4068,14,2.91,md,8,183,0.1994,0.31,pr,pr2020077016,2020-03-17T14:10:45.927Z,"1km S of Los Llanos, Puerto Rico",earthquake,1.02,2.07,0.52,5,reviewed,pr,pr 2020-03-17T09:52:40.473Z,58.0953,-154.1466,42.3,2.7,ml,,,,0.71,ak,ak0203ji1usp,2020-03-17T12:44:58.040Z,"63km N of Larsen Bay, Alaska",earthquake,,1.2,,,automatic,ak,ak 2020-03-17T09:47:50.360Z,67.5276,-161.4846,10,2.6,ml,,99,0.756,0.6,us,us60008h3c,2020-03-17T12:59:26.040Z,"63km E of Noatak, Alaska",earthquake,3.8,2,0.051,50,reviewed,us,us 2020-03-17T09:10:58.040Z,17.9835,-66.7511,17,2.95,md,8,201,0.1284,0.06,pr,pr2020077014,2020-03-17T12:19:56.298Z,"3km WSW of Tallaboa, Puerto Rico",earthquake,0.93,0.42,0.25,4,reviewed,pr,pr 2020-03-17T08:56:51.850Z,17.901,-66.8218,8,2.63,md,6,236,0.0937,0.1,pr,pr2020077010,2020-03-17T09:07:46.416Z,"10km S of Indios, Puerto Rico",earthquake,0.94,1.59,0.34,3,reviewed,pr,pr 2020-03-17T08:14:02.480Z,17.9511,-66.7268,14,3.25,md,8,228,0.1515,0.18,pr,pr2020077008,2020-03-17T08:41:06.581Z,"4km SSW of Tallaboa, Puerto Rico",earthquake,1.17,1.35,0.23,5,reviewed,pr,pr 2020-03-17T08:12:02.987Z,-36.162,-73.1593,28.54,5.6,mww,,35,1.467,0.97,us,us60008gzt,2020-03-17T23:18:06.500Z,"53km NNW of Tome, Chile",earthquake,5.6,4,0.058,29,reviewed,us,us 2020-03-17T08:10:26.860Z,17.9413,-66.832,12,2.62,md,6,220,0.0581,0.04,pr,pr2020077009,2020-03-17T08:43:16.512Z,"5km SSW of Indios, Puerto Rico",earthquake,0.92,0.47,0.43,6,reviewed,pr,pr 2020-03-17T06:48:48.560Z,17.9015,-66.8788,15,3.07,md,8,235,0.0736,0.06,pr,pr2020077007,2020-03-17T14:51:15.672Z,"8km SSE of Guanica, Puerto Rico",earthquake,1.19,0.66,0.13,3,reviewed,pr,pr 2020-03-17T05:25:25.530Z,17.9106,-66.9011,7,2.89,md,6,232,0.0681,0.09,pr,pr2020077004,2020-03-17T05:56:53.229Z,"6km S of Guanica, Puerto Rico",earthquake,0.8,0.26,0.28,3,reviewed,pr,pr 2020-03-17T05:19:28.270Z,17.9176,-66.8333,10,2.54,md,6,229,0.0736,0.06,pr,pr2020077005,2020-03-17T05:56:32.133Z,"8km S of Indios, Puerto Rico",earthquake,1.24,0.74,0.47,6,reviewed,pr,pr 2020-03-17T05:06:31.463Z,13.5995,120.9335,142.94,4.5,mb,,114,8.706,0.78,us,us60008gyg,2020-03-17T05:38:21.040Z,"9km SE of Tingloy, Philippines",earthquake,11,8.2,0.048,126,reviewed,us,us 2020-03-17T04:14:25.408Z,44.578,-128.8243,10,3.3,ml,,251,3.601,0.74,us,us60008gy6,2020-03-17T12:16:57.172Z,"Off the coast of Oregon",earthquake,11.8,2,0.044,68,reviewed,us,us 2020-03-17T04:02:10.534Z,34.5558,85.8914,10,4.6,mb,,91,6.623,0.73,us,us60008gy3,2020-03-17T04:17:50.040Z,"298km NNE of Luring, China",earthquake,8.5,1.9,0.091,36,reviewed,us,us 2020-03-17T03:31:37.070Z,40.741333,-123.883667,25.43,2.85,md,21,113,0.1407,0.11,nc,nc73354845,2020-03-17T20:08:00.151Z,"18km SSE of Blue Lake, CA",earthquake,0.51,1.15,0.12,18,automatic,nc,nc 2020-03-17T03:13:38.940Z,17.9256,-67.0298,7,2.8,ml,8,244,0.1136,0.05,pr,pr2020077002,2020-03-17T13:10:56.238Z,"3km SE of La Parguera, Puerto Rico",earthquake,0.78,0.3,0,0,reviewed,pr,pr 2020-03-17T03:03:07.335Z,62.8724,-149.4307,70.8,3.1,ml,,,,0.65,ak,ak0203je6oj1,2020-03-17T03:21:15.040Z,"62km SSW of Cantwell, Alaska",earthquake,,0.5,,,automatic,ak,ak 2020-03-17T02:45:57.810Z,17.894,-66.834,14,2.9,md,8,239,0.0928,0.19,pr,pr2020077003,2020-03-17T03:56:10.225Z,"11km SE of Guanica, Puerto Rico",earthquake,1.73,1.01,0.34,5,reviewed,pr,pr 2020-03-17T02:19:06.550Z,17.8545,-66.8771,13,3.19,md,8,252,0.1206,0.07,pr,pr2020077001,2020-03-17T04:11:47.598Z,"13km SSE of Guanica, Puerto Rico",earthquake,1,0.44,0.25,4,reviewed,pr,pr 2020-03-17T01:57:03.720Z,35.9553333,-117.3643333,2.26,3.45,ml,38,67,0.09193,0.15,ci,ci38395986,2020-03-17T21:11:16.503Z,"21km N of Searles Valley, CA",earthquake,0.16,0.39,0.168,111,reviewed,ci,ci 2020-03-17T01:31:29.130Z,17.9066,-67.0058,8,2.56,md,8,246,0.1439,0.05,pr,pr2020077000,2020-03-17T04:20:11.040Z,"15km S of La Parguera, Puerto Rico",earthquake,0.63,0.78,0.19,5,reviewed,pr,pr 2020-03-17T01:17:29.590Z,45.6816667,-111.6226667,3.4,2.68,ml,43,61,0.085,0.37,mb,mb80385474,2020-03-17T03:14:37.110Z,"24km SSW of Three Forks, Montana",earthquake,0.58,1.6,0.237,18,reviewed,mb,mb 2020-03-17T00:52:56.700Z,39.0184,16.0397,34.32,4.2,mwr,,60,0.581,1.21,us,us60008gwk,2020-03-17T01:23:38.040Z,"11km W of Nocera Terinese, Italy",earthquake,1.7,5.2,0.066,22,reviewed,us,us 2020-03-17T00:39:25.493Z,-20.1912,-69.238,93.39,4,mb,,70,0.093,0.89,us,us60008gwe,2020-03-17T01:13:02.613Z,"94km E of Iquique, Chile",earthquake,5.1,4.8,0.212,6,reviewed,us,us 2020-03-17T00:38:36.468Z,36.5698,70.957,208.92,4,mb,,74,2.097,0.76,us,us60008gwi,2020-03-17T04:32:49.101Z,"34km SSE of Jarm, Afghanistan",earthquake,6.6,15.2,0.232,5,reviewed,us,us 2020-03-16T23:56:39.061Z,38.1391,-118.3692,6.6,2.8,ml,15,58.32,0.155,0.1686,nn,nn00719232,2020-03-17T02:09:34.500Z,"46km SSE of Hawthorne, Nevada",earthquake,,2,0.27,7,reviewed,nn,nn 2020-03-16T23:38:13.120Z,17.9526,-66.911,14,2.5,md,5,214,0.039,0.1,pr,pr2020076030,2020-03-16T23:47:50.960Z,"2km S of Guanica, Puerto Rico",earthquake,1.43,0.6,0.1,2,reviewed,pr,pr <_io.TextIOWrapper name='2.5_day.csv' mode='r' encoding='UTF-8'>
try: fname = input() fp = opne(fname) lines = fp.read() fp.close() except