Skip to content

Instantly share code, notes, and snippets.

View lindacmsheard's full-sized avatar

Linda Sheard lindacmsheard

  • Microsoft
View GitHub Profile

Setup

gcloud init

Login

interactive

gcloud auth login
@lindacmsheard
lindacmsheard / readme.md
Created January 2, 2024 10:06
Outlook Calendar Tips

Calendar Settings

  • Set timescale to 15 minutes (Settings > Calendar > View)
  • Set declined items to remain visible (Settings > Calendar > Events and invitatations)
  • create named views with filters (Calendar > Views )
    • Note: this does not save filter settings, only layout
@lindacmsheard
lindacmsheard / Gremlin-upsert-edge.md
Last active January 10, 2022 23:33
Gremlin: Upsert an Edge

Context: this question

The following commands can be exectuted from within the Data Explorer interface of an Azure Cosmos DB Gremlin API database resource, or from other gremlin consoles such as a local TinkerPop installation.

Create required vertices

This can be in an empty graph, like that created when adding a graph in Azure Cosmos DB Gremlin API or added to an exsisting graph, like for example the 'modern' sample graph from the Tinkerpop Getting Started documentation.

g.addV("person").property("pk","pk").property("id","a").property("name","Alice")
g.addV("person").property("pk","p
@lindacmsheard
lindacmsheard / cosmos-loganalytics.tf
Last active November 12, 2021 11:32
sample terraform spec for a cosmos db that sends logs to log analytics
# This terraform spec provisions
# - Azure resource group
# - Azure Cosmos DB Account (SQL API, Analytics Storage enabled)
# - Azure Log Analytics Workspace
# - Diagnostic Setting that sends Cosmos DB logs to the Log Analytics Workspace
# - A Cosmos database in the account (SQL API document db)
# - A container in the database, with throughput and indexing configurations
# Set up terraform (basic example, local backend)
terraform {
@lindacmsheard
lindacmsheard / amldocs.md
Created July 8, 2021 09:24
Where to go first for Azure Machine Learning documentation

Last updated: July 2021

-- disclaimer: This is my personal preference, always review the official documentation for updates.

Where to go for AzureML Docs

Examples of how to get started

This is a very currently active repo with examples and tutorials.

Use this also to raise github issues with any specific questions or issues.

@lindacmsheard
lindacmsheard / pyspark_df_from_fs_ls.md
Created July 7, 2021 18:41
Create a pyspark dataframe of filepaths by reading a directory in databricks
#create a dataframe from filepaths

directory = '/path/on/dbfs'

file_paths = dbutils.fs.ls(directory)

#e.g
print(file_paths[0].path)
print(file_paths[0].name)
@lindacmsheard
lindacmsheard / Conda_env_on_azureml_compute_instance.md
Last active March 6, 2024 02:20
Custom conda environment on Azure ML Compute Instance

Pre-reqs

From the terminal running on the AML compute instance, ensure that conda is accessible in your current shell session.

which conda
#-> should return a path to a conda executable

If conda is not found, then verify that the executable is present where expected

ls /anaconda/bin/conda
@lindacmsheard
lindacmsheard / aml-datalakegen2-sp.md
Last active September 14, 2021 08:24
Connect Azure ML to Azure Datalake gen 2 with service principal

Connect Azure ML to Azure DataLake Gen 2 with a Service Principal

Note that service principal role assignments may take a short while to become available, so give it a few minutes before testing the access.

Create a service principal

az ad sp create-for-rbac --name myAMLWorkspaceRep

Note the appId (client ID) and password (client secret) returned:

@lindacmsheard
lindacmsheard / databricks-cli-secrets.md
Last active May 6, 2021 08:15
databricks cli cheatsheet for managing secrets

Databricks CLI Cheatsheet - managing secrets

(optional) install cli into a virtual python env

virtualenv -p /usr/bin/python2.7 databrickscli
source databrickscli/bin/activate
pip install databricks-cli

Alternatively just install natively