List, add or delete Wireguard peers. Also show client configuration for already added peers.
wg-peer [add [<desc>]|show <peer>|del <peer> ...|list]
where:
a[dd]
add a new peer
from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter | |
from fastapi import FastAPI, Request | |
from fastapi.responses import JSONResponse | |
from opentelemetry.context import get_current as get_current_context | |
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor | |
from opentelemetry.sdk.trace import TracerProvider, _Span | |
from opentelemetry.sdk.trace.export import (BatchSpanProcessor, | |
ConsoleSpanExporter, | |
SimpleSpanProcessor) | |
from starlette.exceptions import HTTPException as StarletteHTTPException |
# reference | |
# ubuntu, php | |
# https://websiteforstudents.com/apache2-with-php-7-1-support-on-ubuntu-18-04-lts-beta-server/ | |
# apache | |
# https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04 | |
# https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04 | |
# vsftpd |
diff --git a/homeassistant/components/unifi/config_flow.py b/homeassistant/components/unifi/config_flow.py | |
index e5a8965df..06751ed6e 100644 | |
--- a/homeassistant/components/unifi/config_flow.py | |
+++ b/homeassistant/components/unifi/config_flow.py | |
@@ -2,6 +2,7 @@ | |
import voluptuous as vol | |
from homeassistant import config_entries | |
+from homeassistant.core import callback | |
from homeassistant.const import ( |
#!/usr/bin/env python3 | |
"""scapy-arp-listener.py | |
Listen for arp packets using scapy to learn the IP and Mac Address of LAN hosts | |
Copyright (C) 2018 Jonathan Cutrer | |
License Dual MIT, 0BSD | |
""" |
Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.
This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl
Note: $
denotes the start of a command. Don't actually type this.
x86_64.sh
. If I had a 32-bit computer, I'd select the x86.sh
version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li"""OAuth2Support for aiohttp.ClientSession. | |
Based on the requests_oauthlib class | |
https://github.com/requests/requests-oauthlib/blob/master/requests_oauthlib/oauth2_session.py | |
""" | |
# pylint: disable=line-too-long,bad-continuation | |
import logging | |
from oauthlib.common import generate_token, urldecode | |
from oauthlib.oauth2 import WebApplicationClient, InsecureTransportError |
# SGR color constants | |
# rene-d 2018 | |
class Colors: | |
""" ANSI color codes """ | |
BLACK = "\033[0;30m" | |
RED = "\033[0;31m" | |
GREEN = "\033[0;32m" | |
BROWN = "\033[0;33m" | |
BLUE = "\033[0;34m" |
import subprocess | |
import numpy as np | |
import scipy | |
import librosa | |
import matplotlib.pyplot as plt | |
file_input = "/path for/video file/" | |
file_output = "/path for/output audio file.wav/" | |
command = "ffmpeg -i " + file_input +" -t 300 -codec:a pcm_s16le -ac 1 "+ file_output #converts the first 5 minutes of video file to wav output |
import cv2 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
vid_frame = cv2.VideoCapture('/path for/video file/') | |
length = vid_frame.get(cv2.CAP_PROP_FRAME_COUNT) | |
fps = vid_frame.get(cv2.CAP_PROP_FPS) | |
num_frames = int(fps*300) #number of frames in first 5 minutes |