This will generate waveform images (jpg) for all files inside media/audios
and media/videos
to a directory media/waveforms
following the sufolder structure of media
Audio/video folder structure
|-- media
| |-- audios
| |-- videos
const config = require('../config.json'); | |
const fs = require('fs'); | |
const _ = require('lodash'); | |
const path = require('path'); | |
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path; | |
const ffmpeg = require('fluent-ffmpeg'); | |
ffmpeg.setFfmpegPath(ffmpegPath); | |
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3({ |
#!/bin/sh | |
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff state from all namespaces | |
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)
Please install a package which provides this module, or
verify that the module is installed correctly.
FROM python:3.5.2 | |
RUN apt-get update \ | |
&& apt-get install -y gettext curl sudo \ | |
&& curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - \ | |
&& apt-get install -y nodejs \ | |
&& apt-get install -y libpng-dev libtiff5-dev libjpeg62-turbo-dev zlib1g-dev \ | |
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \ | |
libopenjpeg-dev pngquant libmagickwand-dev imagemagick \ | |
&& apt-get autoremove -y --purge \ |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
from pydub import AudioSegment | |
from matplotlib import pyplot as plot | |
from PIL import Image, ImageDraw | |
import numpy as np | |
import os | |
src = "./test.mp3" | |
audio = AudioSegment.from_file(src) | |
data = np.fromstring(audio._data, np.int16) |
function oAuthConfig() { | |
var oAuthConfig = UrlFetchApp.addOAuthService("twitter"); | |
oAuthConfig.setAccessTokenUrl("http://api.twitter.com/oauth/access_token"); | |
oAuthConfig.setRequestTokenUrl("http://api.twitter.com/oauth/request_token"); | |
oAuthConfig.setAuthorizationUrl("http://api.twitter.com/oauth/authorize"); | |
// Register an app at https://dev.twitter.com/apps/new to get the following key and secret | |
oAuthConfig.setConsumerKey("key"); | |
oAuthConfig.setConsumerSecret("secret"); | |
} |