#standardSQL
WITH visitors AS(
SELECT
COUNT(DISTINCT fullVisitorId) AS total_visitors
FROM `data-to-insights.ecommerce.web_analytics`
),
purchasers AS(
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 | |
| df = pd.read_csv('Dates.csv') | |
| df['Date'] = pd.to_datetime(df.Date) | |
| df_week = df.resample('W-SAT', on='Date').Clicks.sum() | |
| df_week.to_csv('export.csv') |
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
| # A1. Launch a notebook instance and get URL to Jupyter running on it | |
| IMAGE=--image-family=tf-latest-cpu | |
| INSTANCE_NAME=dlvm | |
| GCP_LOGIN_NAME=google-cloud-customer@gmail.com # CHANGE THIS | |
| STARTUP_SCRIPT="git clone https://github.com/GoogleCloudPlatform/data-science-on-gcp" | |
| echo "Launching $INSTANCE_NAME" | |
| gcloud compute instances create ${INSTANCE_NAME} \ | |
| --machine-type=n1-standard-2 \ | |
| --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/userinfo.email \ |
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
| ######################################################################################################################### | |
| # External Services Istio | |
| ######################################################################################################################### | |
| apiVersion: networking.istio.io/v1alpha3 | |
| kind: ServiceEntry | |
| metadata: | |
| name: external-svc-https | |
| spec: | |
| hosts: | |
| - www.googleapis.com #bigquery |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/bin/bash | |
| # Adapted from an answer on: https://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users | |
| set -eu | |
| # System-wide crontab file and cron job directory. Change these for your system. | |
| CRONTAB='/etc/crontab' | |
| CRONDIR='/etc/cron.d' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| SELECT | |
| SUM(fcp.density) | |
| FROM | |
| `chrome-ux-report.chrome_ux_report.201710`, | |
| UNNEST(first_contentful_paint.histogram.bin) AS fcp | |
| WHERE | |
| origin = "https://www.google.co.in" | |
| AND effective_connection_type.name = "3G" | |
| AND fcp.END <= 1000 |
- Create certificates
- Edit Docker options
- Restart Docker
- Copy client certificates from host
- (optional) Add remote endpoint in Portainer
Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.
NewerOlder