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
import pandas as pd | |
# Read the first CSV file with semicolon separator | |
file1 = 'file1.csv' | |
df1 = pd.read_csv(file1, sep=';', skiprows=1) | |
# Read the second CSV file with semicolon separator | |
file2 = 'file2.csv' | |
df2 = pd.read_csv(file2, sep=';', skiprows=1) |
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
# grab products and filter by needed fields, save result in csv file | |
# malfini api docs https://api.malfini.com/api-docs/index.html | |
# Step 1: Authenticate and get the JWT token | |
TOKEN=$(curl -s -X POST "https://api.malfini.com/api/v4/api-auth/login" \ | |
-H "accept: application/json" \ | |
-H "Content-Type: application/json" \ | |
-d '{"username":"username","password":"password"}' | jq -r '.access_token') | |
# Step 2: Use the JWT token to get the product list |
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
# /etc/unbound/unbound.conf.d/pi-hole.conf | |
server: | |
# If no logfile is specified, syslog is used | |
# logfile: "/var/log/unbound/unbound.log" | |
verbosity: 0 | |
interface: 127.0.0.1 | |
port: 5335 | |
do-ip4: yes |
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
ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 16000 output.wav | |
# To convert all mp3 files in a directory in Linux: | |
for f in *.mp3; do ffmpeg -i "$f" -acodec pcm_s16le -ac 1 -ar 16000 "${f%.mp3}.wav"; done | |
# Or Windows: | |
for /r %i in (*) do ffmpeg -i %i -acodec pcm_s16le -ac 1 -ar 16000 %i.wav |
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
Step 1: Prepare disk image | |
Download the USB image of Tails from the project's website | |
Convert the downloaded image to VDI format: | |
$ VBoxManage convertfromraw Tails-amd64-5.1.img Tails.vdi --format vdi | |
(NOTE: the .img file is no longer required after this and may be deleted) | |
Resize the VDI to make room for the persistent volume: |
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
DNSCRYPT_LOCALIP=127.0.0.1 | |
DNSCRYPT_LOCALIP2=127.0.0.2 | |
DNSCRYPT_LOCALPORT=9053 | |
DNSCRYPT_RESOLVERPORT=443 | |
DNSCRYPT_USER=nobody | |
DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.resolver2.dnscrypt.eu | |
DNSCRYPT_PROVIDER_NAME2=2.dnscrypt-cert.resolver1.dnscrypt.eu | |
DNSCRYPT_PROVIDER_KEY=3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955 | |
DNSCRYPT_PROVIDER_KEY2=67C0:0F2C:21C5:5481:45DD:7CB4:6A27:1AF2:EB96:9931:40A3:09B6:2B8D:1653:1185:9C66 | |
DNSCRYPT_RESOLVERIP=77.66.84.233 |
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
""" | |
Based on Humidity and Temperature data logging script by Anurag Kotha | |
Updated 10.03.2022 - now script is working with Python3 on raspberry pi | |
""" | |
# Import all the libraries we need to run | |
import sys | |
import os | |
import time |