Linuxmag is onderdeel van Reshift Digital BV
Copyright © 2022
Linuxmag.nl is partner van The Linux Foundation
Creëren van boxplots: def predict_egg_weight(chicken): y = eieren_tijd[chicken].dropna() x = (y.index - y.index[0]).days.values.reshape(-1, 1) y = y.values linear_regressor = LinearRegression() linear_regressor.fit(x, y) y_pred = linear_regressor.predict(x) return (x, y, y_pred)...
Read moreListing 1: $wsl_ip = (wsl hostname -I).trim() netsh interface portproxy add v4tov4 listenport=2222 connectport=2222 connectaddress=$wsl_ip netsh interface portproxy add v4tov4 listenport=80 connectport=80 connectaddress=$wsl_ip netsh interface portproxy add v4tov4 listenport=443...
Read moreDirectory voor Uptime Kuma: mkdir -p ./containers/uptime-kuma docker-compose.yml bestand: version: '3.7' services: uptime-kuma: image: louislam/uptime-kuma:1 container_name: uptime-kuma restart: always volumes: - ./containers/uptime-kuma:/app/data ports: - 3001:3001 Container opstarten: docker-compose up...
Read morediff listing: $ diff config.new config.old 34c34 < #PermitRootLogin prohibit-password --- > PermitRootLogin no 58c58 < #PasswordAuthentication yes --- > PasswordAuthentication no één regel context: $ diff -u1 config.new config.old...
Read morePlugin commando's: ssh (Naam Minecraft server) sudo su systemctl stop minecraft@server1.service su minecraft cd /opt/minecraft/instances/server1/ rm server.jar wget (Rechtermuisknop plakken) nano mcs.sh exit systemctl start minecraft@server1.service systemctl stop minecraft@server1.service su...
Read moreFirmware flash: esptool.py --port /dev/ttyUSB0 --baud 921600 write_flash 0x0 m5stack-core2_full_16MB_v0.6.2.bin Statusbalk met tekstlabel: {"page":1,"id":1,"obj":"label","x":0,"y":0,"w":320,"h":30,"text":"Badkamer","bg_color":"#2C3E50","text_color":"#FFFFFF","radius":0,"border_side":0} {"page":1,"id":2,"obj":"btn","x":110,"y":90,"w":100,"h":90,"toggle":true,"text":"\uE335","text_font":32,"mode":"break","align":"center"} {"page":1,"id":3,"obj":"label","x":260,"y":0,"h":30,"w":60,"text":"0.0 °C","align":"right","bg_color":"#2C3E50","text_color":"#FFFFFF"} plate1.yaml: plate1: objects: - obj: "p1b2" properties: ...
Read moreListing 1: #!/bin/bash for i in *.png; do convert "$i" "${i%.*}.jpg"; done Listing 2: #!/bin/bash for i in *.png; do convert "$i" "${i%.*}.jpg"; rm "$i"; done Listing 3:...
Read moreListing: import os, sys, time from PIL import Image def verklein(invoer): map, bestand = os.path.split(invoer) uitvoer = 'output/' + bestand try: with Image.open(invoer) as afbeelding_in:...
Read moreDocker Compose Up Listing: version: '3' services: db: restart: unless-stopped image: postgres:13.1 ports: - "4020:5432" volumes: - /var/lib/joplin-data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=joplinwachtwoord - POSTGRES_USER=joplin - POSTGRES_DB=joplin app: environment: - APP_BASE_URL=http://joplin.thuisnetwerk.nl -...
Read moreC-programma Listing: #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <time.h> #include <unistd.h> struct ticketnum { int lastnum; int forlastnum; }; int main () { int t,l; ...
Read more