Python
Python is an interpreted high-level general-purpose programming language. Python’s design philosophy emphasizes code readability with its notable use of significant indentation.
Virtial environment
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
issues
https://stackoverflow.com/questions/61875869/ubuntu-20-04-upgrade-python-missing-libffi-so-6
Links
Python Manage private Python packages using Artifact Registry (Google Cloud)
Cloud Dev environments
Cloud IDEs are integrated development environments based in the cloud. IDEs let you write run and debug your code. Typically developers set up IDEs on their local machine, but Cloud-based IDEs allow you to develop software with just a browser.
Links
Critical thinking
Critical thinking skills truly matter in learning. Why? Because they are life skills we use every day of our lives. Everything from our work to our recreational pursuits, and all that’s in between, employs these unique and valuable abilities. Consciously developing them takes thought-provoking discussion and equally thought-provoking questions to get it going.
Reasoning by first principles is useful when you are
(1) doing something for the first time,
(2) dealing with complexity, and
(3) trying to understand a situation that you’re having problems with.
In all of these areas, your thinking gets better when you stop making assumptions and you stop letting others frame the problem for you.
BigQuery
Snippits
REGEXP_EXTRACT(email, r'@(.+)') as domain
Commands
bq show --format=prettyjson bigquery-public-data:samples.wikipedia | jq '.schema.fields'
bq show --schema --format=prettyjson myproject:mydataset.mytable
Links
Golang libraries
Optimizing your BigQuery incremental data ingestion pipelines
Terraform
Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow to manage hundreds of cloud services. Terraform codifies cloud APIs into declarative configuration files.
Commands
terraform console
terraform apply
terraform
terraform plan -target=aws_instance.myinstance
terraform apply -target=aws_instance.myinstance
# Workaround https://github.com/hashicorp/terraform-provider-google/issues/6782
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1 > /dev/null
export APIS="googleapis.com www.googleapis.com storage.googleapis.com iam.googleapis.com container.googleapis.com cloudresourcemanager.googleapis.com"
for name in $APIS
do
ipv4=$(getent ahostsv4 "$name" | head -n 1 | awk '{ print $1 }')
grep -q "$name" /etc/hosts || ([ -n "$ipv4" ] && sudo sh -c "echo '$ipv4 $name' >> /etc/hosts")
done
# Workaround end
Wishlist
- configure OAuth consent screen for a Google Cloud Project
- manage OAuth client Credentials for a Google Cloud Project
Workaround: Create your OAUTH credentials manually in a separate project and define them as data sources in your Terraform setup.
Theia
Links
Cloud & Desktop IDE Platform launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"envFile": "${workspaceFolder}/.flaskenv",
"justMyCode": true,
"args": [
"run",
"--no-debugger",
"--no-reload"
]
}
]
}
.flaskenv
FLASK_APP = main.py
FLASK_ENV = development
FLASK_DEBUG = 0
{
"editor.autoSave": "on",
"workspace.preserveWindow": true,
"files.watcherExclude": {
"**/.cache/**": true,
"**/.git/**": true,
"**/node_modules/**": true
},
"go.useLanguageServer": true,
"go.useGoProxyToCheckForToolUpdates": false,
"python.autoUpdateLanguageServer": false,
"workbench.colorTheme": "dark",
"workbench.iconTheme": "vs-seti",
"csharp.suppressDotnetRestoreNotification": true,
"cloudcode.customApplications": []
}
People
Website | ||
---|---|---|
observability
Observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs. In control theory, the observability and controllability of a linear system are mathematical duals..
Links
Routing and storage overview Observability with Grafana on Google Cloud Platform (GCP)
People
Website | ||
---|---|---|
Identity
Identity and access management (generally referred to as IAM) is the practice of granting the right individuals access to the right resources for the right reasons.
Links
Google | Overview of identity and access management
People
Website |
---|