aws ec2 describe-instances \
--query 'Reservations[].Instances[].[PrivateIpAddress,Placement.AvailabilityZone,InstanceType,State.Name,InstanceId,Platform,State.Code,VpcId]' \
--output table
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
s = '/example/like_123/1_t34893_.that' | |
int(re.findall(r'1_t([\d]+)_', s)[0]) |
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
version: '3.2' | |
services: | |
agent: | |
image: portainer/agent | |
environment: | |
# REQUIRED: Should be equal to the service name prefixed by "tasks." when | |
# deployed inside an overlay network | |
AGENT_CLUSTER_ADDR: tasks.agent | |
# AGENT_PORT: 9001 |
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
-- Logs begin at Fri 2018-08-24 11:34:59 UTC, end at Fri 2018-08-24 11:42:29 UTC. -- | |
Aug 24 11:36:16 core-01 systemd[1]: Starting Docker Application Container Engine... | |
Aug 24 11:36:16 core-01 env[1262]: time="2018-08-24T11:36:16.982531929Z" level=error msg="Failed to built-in GetDriver graph aufs /var/lib/docker" | |
Aug 24 11:36:17 core-01 env[1262]: time="2018-08-24T11:36:17.076086021Z" level=info msg="Graph migration to content-addressability took 0.00 seconds" | |
Aug 24 11:36:17 core-01 env[1262]: time="2018-08-24T11:36:17.077032710Z" level=info msg="Loading containers: start." | |
Aug 24 11:36:17 core-01 env[1262]: time="2018-08-24T11:36:17.207362181Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.18.0.0/16. Daemon option --bip can be used to set a preferred IP address" | |
Aug 24 11:36:16 core-01 env[1262]: time="2018-08-24T11:36:16.838482132Z" level=info msg="Loading containers: done." | |
Aug 24 11:36:16 core-01 env[1262]: time="2018-08-24T11:36:16.866658031Z" level=info msg="Daemon has co |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
namespace: argocd | |
name: argocd-ingress | |
annotations: | |
kubernetes.io/ingress.class: alb | |
alb.ingress.kubernetes.io/scheme: internet-facing | |
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80,"HTTPS": 443}]' | |
alb.ingress.kubernetes.io/certificate-arn: {{ your-acm-arn }} |
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
kubectl get po -A | grep Evicted | awk '{system ("kubectl -n " $1 " delete po " $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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
kubernetes.io/ingress.class: alb | |
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:acm:..." | |
alb.ingress.kubernetes.io/scheme: internet-facing | |
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80,"HTTPS": 443}]' | |
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}' | |
spec: |
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 node:12-alpine | |
ENV PATH /opt/outline/node_modules/.bin:/opt/node_modules/.bin:$PATH | |
ENV NODE_PATH /opt/outline/node_modules:/opt/node_modules | |
ENV APP_PATH /opt/outline | |
RUN mkdir -p $APP_PATH | |
WORKDIR $APP_PATH | |
ARG OUTLINE_VERSION |
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 python:3.6.15-buster | |
RUN pip install \ | |
Pillow==7.2.0 \ | |
opencv-python==4.5.4.58 \ | |
scipy==1.5.4 \ | |
menpo==0.11.0 \ | |
tensorflow==1.14.0 \ | |
scikit-image==0.17.2 \ | |
menpofit==0.7.0 \ |
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 pydub import AudioSegment | |
audio1 = AudioSegment.from_wav('/path/to/input1.wav') | |
audio2 = AudioSegment.from_wav('/path/to/input2.wav') | |
# 0.3s silence | |
silence = AudioSegment.silent(duration=300) | |
output = audio1 + silence + audio2 | |
output.export('/path/to/output.wav', format='wav') |