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 table_id, round(sum(size_bytes)/(1024*1024*1024),2) as size_GB | |
FROM `PROJECT.DATASET.__TABLES__` | |
group by table_id | |
union all | |
select table_id, round(sum(size_bytes)/(1024*1024*1024),2) as size_GB | |
FROM `PROJECT.DATASET.__TABLES__` | |
group by table_id |
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 date, | |
case when date = (select max(date) from `chrome-ux-report.materialized.metrics_summary`) then "Latest" else "Historical" end as latest, | |
origin, | |
slow_fcp,avg_fcp,fast_fcp, | |
slow_lcp,avg_lcp,fast_lcp, | |
small_cls,medium_cls,large_cls | |
FROM `chrome-ux-report.materialized.metrics_summary` | |
WHERE origin in ( | |
"https://www.example.cz", |
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
// Budget Guard hlídá, zda se některé kampaně přiblížily využití denního rozpočtu | |
// Upravte nastavení a naplánujte si denní spouštění skriptu v Google AdWords | |
// Autor: Pavel Jašek, jasek@google.com | |
// Nastavení: upravte práh citlivosti a obsah e-mailu | |
var threshold = 0.9; // Hranice pro překročení rozpočtu. 0.9 = 90 % | |
var recepients = "jasek@google.com"; | |
var subject = "Kampaně včera překročily 90 % rozpočtu"; | |
var header = "Ahoj,<br>následující kampaně překročily 90 % nastaveného rozpočtu. Zkontroluj je, prosím, ať se nepřipravuješ o další výkon!<br><br>"; |
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
#LyX 2.1 created this file. For more info see http://www.lyx.org/ | |
\lyxformat 474 | |
\begin_document | |
\begin_header | |
\textclass book | |
\begin_preamble | |
\usepackage{multirow,array} | |
\end_preamble | |
\use_default_options true | |
\maintain_unincluded_children false |
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 AdWords Script makes sure that keywords are managed in exact and broad match modifier campaigns. | |
// Whenever the script finds an adgroup, keyword or ad text in exact match campaign that was not already | |
// copied into broad match modifier campaign, it does that and labels the entity accordingly. | |
// Broad match campaigns need to be created at first place. | |
// Customize the BidModifier to update bids for broad match ad groups [line 20] and identification of your campaigns [lines 15, 19 and 26]; | |
// jasek@google.com | |
// Known issues: if you have ads with tracking templates, custom parameters or mobile final URLs, please check lines 116-118 | |
// Known issues: if you have keywords with final URLs, please check line 91 |
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
library(igraph) | |
# how to extract the list from JavaScript object on https://poradci.cz/ | |
# for (p in poradci) {jeden = poradci[p]; for (kdo in jeden[1]) {j = jeden[0]; k = jeden[1][kdo];console.log("'",poradci[k][0].trim(), "', '", j , "'")}} | |
# Pavel Jašek, Twitter: @paveljasek | |
# last update: Dec 18, 2016 | |
poradci <- graph( c( |
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
# Get rid of the first line in a file | |
sed '1d' change_history.csv > change_history_v2.csv |
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
# xmlutils are required: https://github.com/knadh/xmlutils.py | |
# basically you need to install it on unix via pip command | |
pip install xmlutils | |
# xml2csv takes an xml file, reads tags that correspond to the desired element and output a csv file delimited by the parameter | |
# delimiter is changes from comma to semicolon as some items can have titles including commas | |
xml2csv --input sample.xml --output sample.csv --tag "item" --delimiter ";" |
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
# Search for lines including a string and count number of these lines | |
grep -o '<item>' feed.xml | wc -l |
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
# case insensitive string replace of BRAND to BRAND_XXX | |
# also creates a backup file | |
sed -i.bak s/[bB][rR][aA][nN][dD]/BRAND_XXX/g overlapping.csv |