Convert a CSV (comma-separated value) file into JSON.
csv2json.py data.csv > data.json
""" | |
Dependency: psutil | |
pip3 install psutil | |
""" | |
import psutil | |
import time | |
import json | |
from datetime import datetime | |
def get_system_utilization(): |
black() { docker run -v $(pwd):/code jbbarth/black $*; } |
for file in ./*; do | |
[ -f "$file" ] || continue | |
ffmpeg -i "$file" -f s16le -ar 16000 -acodec pcm_s16le "$file".raw | |
done |
sudo apt update | |
sudo apt install build-essential libncurses5-dev zlib1g-dev libnss3-dev libgdbm-dev libssl-dev libsqlite3-dev libffi-dev libreadline-dev curl libbz2-dev | |
sudo wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz | |
tar -xvf Python-3.9.7.tgz | |
cd Python-3.9.7 | |
./configure --enable-optimizations |
version: '3.1' | |
services: | |
service_a: | |
image: "fat_image" | |
ports: | |
- "6382:6382" | |
volumes: | |
- /home/dir1:/home/dirA | |
- /home/dir2:/home/dirB |
"""Curl Quick Load Test | |
P10 - 10 indicates 10 parallel instances at once. | |
200 - Total number of requests | |
""" | |
seq 1 200 | xargs -n1 -P10 curl "http://github.com/jcopps" |
Location of the sdkmanager | |
C:\Users\IP510\AppData\Local\Android\Sdk\tools\bin>sdkmanager.bat --licenses | |
--------------------------------------- | |
Accept? (y/N): y | |
All SDK package licenses accepted |
import argparse | |
import codecs | |
import json | |
def make_utf_8_json(input_file, output_file): | |
content = json.loads(open(input_file, 'r').read()) | |
cc = json.dumps(content, indent=2, sort_keys=True, ensure_ascii=False) | |
file = codecs.open(output_file, "w", "utf-8") | |
file.write(cc) |
docker stop $(docker ps -a -q) | |
docker ps # again to make sure containers is off | |
sudo lsof -i tcp:2049 # now you get and list of process running and using 2049 port find and copy PID | |
sudo kill -9 yout_PID | |
https://stackoverflow.com/questions/55535967/error-starting-userland-proxy-listen-tcp-0-0-0-02049-bind-address-already-in |