MacBook Air(macOS Catalina) & Ubuntu 20.04 connected on the same network locally.
- Install XRDP and enable
sudo apt install xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp
import os | |
import aiohttp | |
import asyncio | |
import tempfile | |
from pydub import AudioSegment | |
from pydub.silence import split_on_silence | |
async def split_audio_on_silence_and_save(audio_url: str, output_dir: str): | |
# Create output directory if it doesn't exist |
CREATE TABLE sales ( | |
sale_date DATE, | |
color VARCHAR(10), | |
region VARCHAR(10), | |
quantity INT, | |
revenue DECIMAL(10, 2) | |
); | |
INSERT INTO sales VALUES | |
('2016-01-01', 'Red', 'North', 1, 13.00), |
def is_illegal(input): | |
words = input.split(" ") | |
for word in words: | |
if word in "ENGLISH_WORDS": | |
return "ILLEGAL" | |
for char in word: | |
if char in [" ", "\n", "\t"]: | |
return "ILLEGAL" | |
return None |
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
sudo apt-get install -y libcurl4-gnutls-dev libjpeg-turbo8-dev libpng-dev | |
sudo apt-get install -y autoconf \ | |
re2c \ | |
bison \ | |
libsqlite3-dev \ | |
libpq-dev \ | |
libonig-dev \ | |
libfcgi-dev \ | |
libfcgi0ldbl \ | |
libjpeg-dev \ |
from glob import glob | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from PIL import Image | |
import pytorch_lightning as pl | |
from pytorch_lightning.callbacks import ModelCheckpoint | |
from pytorch_lightning.callbacks.early_stopping import EarlyStopping |
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import StratifiedKFold | |
df = pd.read_csv(path_to_data) | |
n_bins = 1+np.log2(df.shape[0]) # Sturge's rule | |
df["bins"] = pd.cut(df.target, n_bins, labels=False) | |
n_folds = 5 | |
skf = StratifiedKFold(n_splits=n_folds) |