Skip to content

Instantly share code, notes, and snippets.

Скачиваем в локальную репу yum последние версии постгреса

sudo yum localinstall https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Устанавливаем 10ый постгрес

sudo yum install -y postgresql10-server.x86_64 postgresql10-contrib.x86_64 postgresql10-libs.x86_64
@axmakarov
axmakarov / 2016-06-01 Metrika API New User Params 02
Last active September 18, 2019 14:41
Yandex.Metrika API request for getting visits data of users with specific first visit date
https://beta.api-metrika.yandex.ru/stat/v1/data?dimensions=ym:s:specialUser,ym:s:dateTime,ym:s:lastTrafficSource,ym:s:lastSourceEngine&metrics=ym:s:visits,ym:s:avgDaysSinceFirstVisit&date1=2016-05-01&date2=2016-05-31&ids=<id>&oauth_token=<token>&limit=100000&offset=1&filters=EXISTS(ym:u:userFirstVisitDate=='2016-05-13')
books.groupby('authors').mean().reset_index()
books.groupby('authors',as_index=False).mean()
grouped_df = books.groupby('authors').mean()
grouped_df.loc['A.M. Homes']
books['average_rating'].mean()
books[books['authors'] == 'J.K. Rowling-Mary GrandPré']['average_rating'].mean()
sum(values)/len(values)
values = books[books['authors'] == 'J.K. Rowling-Mary GrandPré']['average_rating'].values
values
books[books['authors'] == 'J.K. Rowling-Mary GrandPré']