We can't make this file beautiful and searchable because it's too large.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0,44,¡,0,faa,1,FALSE,11,n | |
0,44,CUN,1,np00000,3,TRUE,11,o | |
0,44,a,5,sp000,1,FALSE,11,s | |
0,44,Ámsterdam,7,np00000,9,FALSE,11,d | |
0,44,$,17,zm,1,FALSE,11,n | |
0,44,"8,960",18,dn0000,5,FALSE,11,p | |
0,44,!,23,fat,1,FALSE,11,n | |
0,44,Sin,25,sp000,3,FALSE,11,n | |
0,44,escala,29,nc0s000,6,FALSE,11,n | |
0,44,en,36,sp000,2,FALSE,11,n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ngrams(string, n=3): | |
# Filter string | |
ngrams = zip(*[string[i:] for i in range(n)]) | |
return [''.join(ngram) for ngram in ngrams] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD CSV WITH HEADERS FROM 'file:///flights.csv' as line | |
MATCH | |
(a:Airline{ iata: line.AIRLINE }), | |
(departure:Airport{ iata: line.ORIGIN_AIRPORT }), | |
(destination:Airport{ iata: line.DESTINATION_AIRPORT }) | |
WITH a, departure, destination, line | |
LIMIT #limit# | |
CREATE | |
(f:Flight{ | |
tail_number: line.TAIL_NUMBER, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD CSV WITH HEADERS FROM 'file:///movies.clean.csv' as l | |
CREATE (m:Movie{movieId:toInteger(l.movieId), tmdbId:l.tmdbId, imdbId:l.imdbId, title:l.title, year:date(l.year)}) | |
CREATE INDEX ON :Movie(movieId) | |
LOAD CSV WITH HEADERS FROM 'file:///users.csv' as l | |
CREATE (u:User{userId:toInteger(l.userId)}) | |
CREATE INDEX ON :User(userId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This app uses your camera with the sole purpose of delivering its services. | |
The images captured by the app never leave your phone directly from the app, and they are not stored unless you explicitly authorise them to be saved. | |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,label,url,date | |
0,"¡Todo México a La Habana – $4,718! Opción de hotel 3 estrellas, 2 personas, 3 noches $3,241 pesos con desayunos",http://www.vuelax.com/2018/03/09/mex-cub/,2018-03-09 | |
1,"¡GDL, CDMX y MTY a San José, Costa Rica – $4,222! Opción de hotel 3 estrellas, 7 noches, 2 personas por $6,389",http://www.vuelax.com/2018/03/09/costa-2/,2018-03-09 | |
2,"¡CDMX, MTY, GDL, TIJ y Silao a Venecia – $13,829!",http://www.vuelax.com/2018/03/09/venecia/,2018-03-09 | |
3,"¡CUN a La Habana – $2,997! Opción de hotel 3 estrellas, 3 noches, 2 personas con desayuno por $2,749",http://www.vuelax.com/2018/03/08/havana-cun/,2018-03-08 | |
4,"¡CDMX, MTY y GDL a Liubliana, Eslovenia – $13,870!",http://www.vuelax.com/2018/03/08/cdmx-mty-y-gdl-a-liubliana-eslovenia-13870/,2018-03-08 | |
5,"¡CDMX a Barcelona + Marrakech – $14,288! Opción de hotel 4 estrellas, 2 personas, 5 noches por $2,610 con desayunos",http://www.vuelax.com/2018/03/08/marrakech-2/,2018-03-08 | |
6,"¡CDMX a Barcelona + Marrakech – $14,288! Opción de hotel 4 estrellas, 2 personas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import pandas as pd | |
def __parse_time_elapsed__(time_line): | |
time = float(time_line.split(":")[1][:-len("seconds.")]) | |
return time | |
def __file_to_lines__(path): | |
l = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open(file, "r") as f: | |
for line in f: | |
print(line) |