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
| public static int [] getIncrease(int[] original){ | |
| for(int j=1;j<original.length;j++){ | |
| for(int i=0;i<original.length;i++){ | |
| if(original[i]>original[j]&&original[i]>0){ | |
| //Without using temp to reduce space complexity | |
| original[i]=original[j]-original[i]; | |
| original[j]=original[j]-original[i]; | |
| original[i]=original[i]+original[j]; | |
| } | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| nats "github.com/nats-io/go-nats" | |
| "github.com/satori-com/satori-rtm-sdk-go/rtm" | |
| "github.com/satori-com/satori-rtm-sdk-go/rtm/pdu" |
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
| livenessProbe: | |
| exec: | |
| command: | |
| - test | |
| - '`find /usr/src/Airflow/Airflow_scheduler_liveness.txt -mmin -10`' | |
| initialDelaySeconds: 30 | |
| periodSeconds: 1200 |
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
| livenessProbe: | |
| httpGet: | |
| path: /admin/versionview | |
| port: 8080 | |
| initialDelaySeconds: 30 | |
| timeoutSeconds: 5 | |
| periodSeconds: 30 |
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
| for task in session.query(TaskInstance) \ | |
| .filter(TaskInstance.dag_id == dag) \ | |
| .filter(TaskInstance.execution_date == expected_date_time) \ | |
| .filter((TaskInstance.state == 'queued') | (TaskInstance.state == 'shutdown')): | |
| if task.task_id in pre_tasks: | |
| clear_task(dag, task.task_id, date, date_tomorrow) |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| nats "github.com/nats-io/go-nats" | |
| "github.com/satori-com/satori-rtm-sdk-go/rtm" | |
| "github.com/satori-com/satori-rtm-sdk-go/rtm/pdu" |
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
| package main | |
| // Import Go and NATS packages | |
| import ( | |
| "encoding/json" | |
| "log" | |
| "runtime" | |
| "github.com/go-redis/redis" | |
| "github.com/nats-io/go-nats" |
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
| kind: PersistentVolume | |
| apiVersion: v1 | |
| metadata: | |
| name: airflow-dags | |
| namespace: airflow | |
| spec: | |
| capacity: | |
| storage: 16Gi | |
| volumeMode: Filesystem | |
| accessModes: |
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
| volumes: | |
| - name: airflow-dags | |
| persistentVolumeClaim: | |
| claimName: airflow-dags | |
| - name: airflow-logs | |
| persistentVolumeClaim: | |
| claimName: airflow-logs |
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
| from airflow.operators.python_operator import PythonOperator | |
| from airflow.models import DAG | |
| from datetime import datetime | |
| import time | |
| import os | |
| args = { | |
| 'owner': 'airflow', | |
| "start_date": datetime(2018, 10, 4), | |
| } |
OlderNewer