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
Andorra | AD | |
---|---|---|
United Arab Emirates | AE | |
Afghanistan | AF | |
Antigua and Barbuda | AG | |
Anguilla | AI | |
Albania | AL | |
Armenia | AM | |
Angola | AO | |
Antarctica | AQ | |
Argentina | AR |
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
hashtag_list = ['travelblog', 'travelblogger', 'traveler'] | |
# prev_user_list = [] - if it's the first time you run it, use this line and comment the two below | |
prev_user_list = pd.read_csv('20181203-224633_users_followed_list.csv', delimiter=',').iloc[:,1:2] # useful to build a user log | |
prev_user_list = list(prev_user_list['0']) | |
new_followed = [] | |
tag = -1 | |
followed = 0 | |
likes = 0 |
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 psycopg2 | |
connection = psycopg2.connect(user="USER" | |
, password="PASSWORD" | |
, port="5432" | |
, database="DB_NAME" | |
, host="HOST") | |
cursor = connection.cursor() | |
with open('ratings.tsv') as f: | |
f.readline() |
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
select a.id, title_type, | |
case when title_type in ('movie', 'tvMovie') then 'Movie' | |
when title_type in ('tvSeries', 'tvMiniSeries') then 'Series' | |
end as item_type, | |
original_title, primary_title, start_year, runtime_minutes, | |
genres, avg_rating, num_votes | |
into movies_series | |
from source_basics a join source_ratings b on a.id = b.id | |
where title_type in ('movie', 'tvMovie', 'tvSeries', 'tvMiniSeries'); |
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
-- Seasons Rating (AVG) | |
select "Season", avg("Rating") "Rating Average" | |
from episodes | |
where 1 = 1 | |
[[ and {{primary_title}} ]] | |
[[ and "# Votes" > {{num_votes}} ]] | |
group by "Season" | |
-- Episodes Rating | |
select |
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
-- GENRES (Helper Table) | |
create table genres ( | |
genre varchar(20) | |
); | |
insert into genres | |
values ('Action'),('Adventure'),('Animation'),('Biography'),('Comedy'),('Crime'),('Drama') | |
,('Family'),('Fantasy'),('Film-Noir'),('History'),('Horror'),('Music'),('Musical') | |
,('Mystery'),('Romance'),('Sci-Fi'),('Sport'),('Thriller'),('War'),('Western') |
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
Afghan | Afghanistan | |
---|---|---|
Albanian | Albania | |
Algerian | Algeria | |
Argentine | Argentina | |
Argentinianan | Argentina | |
Australian | Australia | |
Austrian | Austria | |
Bangladeshi | Bangladesh | |
Belgian | Belgium | |
Bolivian | Bolivia |
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
'continent' | 'country' | |
---|---|---|
'South America' | 'Argentina' | |
'South America' | 'Bolivia' | |
'South America' | 'Brazil' | |
'South America' | 'Chile' | |
'South America' | 'Colombia' | |
'South America' | 'Ecuador' | |
'South America' | 'Guyana' | |
'South America' | 'Paraguay' | |
'South America' | 'Peru' |
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
Warning: environ value jdk-11.0.12+7 for key :java-version has been overwritten with 11.0.12 | |
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. | |
2021-11-03 04:38:57,677 INFO metabase.util :: Maximum memory available to JVM: 481.4 MB | |
2021-11-03 04:39:13,917 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓 | |
For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html | |
2021-11-03 04:39:19,378 INFO driver.impl :: Registered abstract driver :sql 🚚 | |
↙ Load driver :sql took 921.5 ms | |
2021-11-03 04:39:19,399 INFO driver.impl :: Registered abstract driver :sql-jdbc (parents: [:sql]) 🚚 | |
Load driver :sql-jdbc took 958.2 ms | |
2021-11-03 04:39:19,410 INFO driver.impl :: Registered driver :h2 (parents: [:sql-jdbc]) 🚚 |
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
Warning: environ value jdk-11.0.11+9 for key :java-version has been overwritten with 11.0.11 | |
2021-11-03 05:00:36,948 INFO metabase.util :: Maximum memory available to JVM: 481.4 MB | |
2021-11-03 05:00:52,347 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓 | |
For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html | |
2021-11-03 05:01:01,377 INFO metabase.core :: | |
Metabase v0.40.0 (961caed master) | |
Copyright © 2021 Metabase, Inc. | |
Metabase Enterprise Edition extensions are NOT PRESENT. |
OlderNewer