This file contains hidden or 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
| "loki" has been added to your repositories | |
| "prometheus-community" has been added to your repositories | |
| Hang tight while we grab the latest from your chart repositories... | |
| ...Successfully got an update from the "loki" chart repository | |
| ...Successfully got an update from the "prometheus-community" chart repository | |
| Update Complete. ⎈ Happy Helming!⎈ | |
| [I 10-16 11:53:28.492 core:202] minio_version: updated from RELEASE.2020-09-17T04-49-20Z to RELEASE.2020-10-12T21-53-21Z | |
| [I 10-16 11:53:30.221 core:202] prometheus_operator_chart_version: updated from 9.3.1 to 9.3.2 | |
| [I 10-16 11:53:30.222 core:202] loki_stack_version: updated from 0.40.0 to 0.41.2 | |
| [I 10-16 11:53:31.125 core:202] kubernetes_version: updated from v1.18.6 to v1.19.3 |
This file contains hidden or 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
| helm repo add loki https://grafana.github.io/loki/charts | |
| helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | |
| helm repo update | |
| sed -e 's/:[^:\/\/]/ /g' -ne '/.* .*[0-9]\./p' -ne '/RELEASE/p' versions.yaml > current_versions.txt | |
| nvchecker source.ini |
This file contains hidden or 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
| [__config__] | |
| oldver = current_versions.txt | |
| newver = new_versions.txt | |
| [jupyterlab_version] | |
| pypi = jupyterlab | |
| use_pre_release = false | |
| [kubernetes_version] | |
| github = kubernetes/kubernetes |
This file contains hidden or 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
| jupyterlab_version 2.2.8 | |
| kubernetes_version v1.18.6 | |
| minio_version RELEASE.2020-09-17T04-49-20Z | |
| loki_stack_version 0.40.0 | |
| prometheus_operator_chart_version 9.3.1 |
This file contains hidden or 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
| # versions used in the ansible playbook | |
| jupyterlab_version: 2.2.8 | |
| kubernetes_version: v1.18.6 | |
| loki_stack_version: 0.40.0 | |
| minio_version: RELEASE.2020-09-17T04-49-20Z | |
| prometheus_operator_chart_version: 9.3.1 |
This file contains hidden or 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
| listings = listings.sample(frac=0.2, random_state=1337) | |
| def optimized_merge(df1, df2, merge_column): | |
| df2 = df2[df2[merge_column].isin(df1[merge_column])] | |
| return df1.merge(df2, on=merge_column) | |
| %%timeit | |
| listings.merge(reviews, on='listing_id') | |
| # 106 ms ± 2.46 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) |
This file contains hidden or 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 pandas as pd | |
| from typing import List | |
| def optimize_floats(df: pd.DataFrame) -> pd.DataFrame: | |
| floats = df.select_dtypes(include=['float64']).columns.tolist() | |
| df[floats] = df[floats].apply(pd.to_numeric, downcast='float') | |
| return df | |
This file contains hidden or 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
| listings = listings.set_index('listing_id', drop=False) | |
| %%timeit | |
| listings.loc[29844866, 'name'] | |
| # 10.1 µs ± 1.25 µs per loop (mean ± std. dev. of 7 runs, 100000 loops each) | |
| %%timeit | |
| listings.at[29844866, 'name'] | |
| # 5.34 µs ± 474 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) |
This file contains hidden or 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
| %%timeit | |
| listings.merge(reviews, on='listing_id') | |
| # 439 ms ± 24.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) | |
| %%timeit | |
| reviews_ = reviews.set_index('listing_id') | |
| listings_ = listings.set_index('listing_id') | |
| listings_.merge(reviews_, left_index=True, right_index=True) | |
| # 393 ms ± 17.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) |
This file contains hidden or 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
| %%timeit | |
| listings.loc[listings['room_type'] == 'Entire home/apt', 'room_type_score'] = 1 | |
| listings.loc[listings['room_type'] == 'Private room', 'room_type_score'] = 0.7 | |
| listings['room_type_score'].fillna(0.2, inplace=True) | |
| listings.loc[listings['number_of_reviews'] > 50, 'review_score'] = 1 | |
| listings['review_score'].fillna(0.5, inplace=True) | |
| listings['price_score'] = (100 - listings['price']) / 100 | |
| listings['score'] = listings['room_type_score'] * listings['price_score'] * listings['review_score'] | |
| listings.loc[(listings['availability_365'] == 0) | | |
| (listings['price'] > 100), 'score'] = 0 |
NewerOlder