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
touch a_file | |
crontab -u username a_file |
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
// C++17 for structure binding | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
int main() |
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
%load_ext autoreload | |
%autoreload 2 |
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
git config --local core.sshCommand "/usr/bin/ssh -i /home/me/.ssh/id_rsa_foo" |
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 core temperature | |
vcgencmd measure_temp | |
# spotify | |
curl -sL https://dtcooper.github.io/raspotify/install.sh | sh |
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
import re | |
files_to_include = [ | |
'my_class.py', | |
'dir/other_file.py', | |
'main.py' # << finish by main | |
] | |
output_file = 'bundled_code.py' |
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
from airflow.providers.google.common.utils import ( | |
id_token_credentials as id_token_credential_utils, | |
) | |
from google.auth.transport.requests import AuthorizedSession | |
A_GLOBAL_PARAM = 57 | |
def invoke_container(url: str, my_param: str, **kwargs) -> bool: |
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
with DAG( | |
... | |
) as dag: | |
my_task = PythonOperator( | |
task_id="some-name", | |
python_callable=invoke_container, | |
op_kwargs={ | |
"url": URL, | |
"my_param": "toto", | |
}, |
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
from airflow import DAG | |
from airflow.decorators import task | |
from google.cloud import aiplatform | |
ENV = "my-env-name" | |
PIPELINE_SPEC_URI = f"gs://bucket/something/something/pipeline-spec-{ENV}.json" | |
PROJECT_ID = f"my-project-id-{ENV}" | |
REGION = "moon-southpole1" | |
PIPELINE_ROOT = f"gs://some-bucket/" |
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
ssh-keygen | |
sudo apt install git | |
sudo apt install curl zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# log out then back in | |
# vscode: https://code.visualstudio.com/docs/?dv=linux64_deb |
OlderNewer