Learn about the new features and functionalities in the GA4 Dimensions and Metrics Cheatsheet release notes.
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
[ | |
"Abbey", | |
"Aboriginal and Torres Strait Islander organization", | |
"Aboriginal art gallery", | |
"Abortion clinic", | |
"Abrasives supplier", | |
"Abundant Life church", | |
"Accountant", | |
"Accounting firm", | |
"Accounting school", |
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
LAST_VALUE( | |
(SELECT | |
value.string_value --value.int_value, value.float_value, value.double_value | |
FROM | |
UNNEST(event_params) | |
WHERE | |
key = 'name_of_event_parameter_to_use_as_dimension' | |
) | |
IGNORE nulls | |
) OVER ( |
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
""" | |
stable diffusion dreaming | |
creates hypnotic moving videos by smoothly walking randomly through the sample space | |
example way to run this script: | |
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
to stitch together the images, e.g.: | |
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |
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 plotly.express as px | |
def treemap(traffic_df, metric='Users', path=['Medium', 'Source']): | |
"""Make in interactive treemap for two data dimensions/levels. | |
Parameters: | |
----------- | |
traffic_df : A DataFrame containing two dimensions, and one or more metrics | |
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
function myFunction() { | |
const sheet = SpreadsheetApp.getActiveSheet(); | |
const data = sheet.getDataRange().getValues(); | |
const selectedRows = getIndexesOfSelectedRows(sheet); | |
for (let i = 0; i < data.length; i++) { | |
// skip not selected rows | |
if (!selectedRows.includes(i + 1)) continue; | |
const rowData = data[i]; | |
console.log(rowData); | |
// perform the relevant action: generate a document, send an 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
#!/usr/bin/env bash | |
SECONDS=0 | |
source ~/miniconda3/etc/profile.d/conda.sh | |
# Set miniconda environment path | |
ENV_PATH="$HOME/miniconda3/envs" | |
echo "The folowing environments are installed:$(ls $ENV_PATH)" |
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
{ | |
"createdBy": "Redirector v3.5.3", | |
"createdAt": "2023-05-24T14:38:35.748Z", | |
"redirects": [ | |
{ | |
"description": "Wikipedia -> Wikiless", | |
"exampleUrl": "https://en.wikipedia.org/wiki/XYZ", | |
"exampleResult": "https://farside.link/wikiless/wiki/XYZ", | |
"error": null, | |
"includePattern": "*wikipedia.org/*", |
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
""" | |
Example of a pluginized architecture breaking up a large app | |
with complex behavior (ArchiveBox), into a series of steps | |
that plugins can hook into. | |
(read from the bottom to top to get a quick overview) | |
""" | |
import re | |
import json |
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
// ==UserScript== | |
// @name Hacker News Tweaks | |
// @version 0.0.3 | |
// @downloadURL https://gist.githubusercontent.com/evanreichard/96d89512cbfe23e5d7a81479c482e6da/raw/hn-tweaks.user.js | |
// @match *://news.ycombinator.com/* | |
// @grant GM.addStyle | |
// @grant GM.registerMenuCommand | |
// @grant GM.unregisterMenuCommand | |
// @grant GM.getValue | |
// @grant GM.setValue |