Skip to content

Instantly share code, notes, and snippets.

View celeron55's full-sized avatar

celeron55 celeron55

View GitHub Profile
Minetest merge rule change proposal
Instead of 2 approvals, 1 approval (including your own approval) is enough when all of these match:
- The change doesn't touch the disk and network formats
- The change doesn't touch the main server-side Lua API
- You are able to argue the change is not likely to cause issues (i.e. it's simple)
- The CI build passes on multiple platforms
import subprocess
import json
from datetime import datetime, timedelta
# Function to run gh CLI commands and return JSON output
def run_gh_command(command):
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if result.returncode != 0:
print(f"Error executing command: {command}")
print(result.stderr)
PR #14417 - Total Lines Changed: 2
PR #14385 - Total Lines Changed: 2
PR #14413 - Total Lines Changed: 17
PR #14416 - Total Lines Changed: 25
PR #14361 - Total Lines Changed: 32
PR #14347 - Total Lines Changed: 51
PR #14406 - Total Lines Changed: 57
PR #14412 - Total Lines Changed: 63
PR #14390 - Total Lines Changed: 66
PR #14355 - Total Lines Changed: 74
import calendar
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib.patches import Rectangle
from matplotlib.ticker import FixedLocator
def create_month_calendar(year, month, ax):
month_days = calendar.monthrange(year, month)[1]
month_name = calendar.month_name[month]
#include <mcp_can.h>
#include <SPI.h>
#define CAN0_CS 10 /* Set CS to pin 10 */
MCP_CAN CAN0(CAN0_CS); /* Set CS to pin 10 */
// UDS request for DTCs
unsigned char stmp[8] = {0x19, 0x02, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00};
#!/bin/sh
# Usage: mergepull.sh <pull request number>
wget http://github.com/minetest/minetest/pull/$1.patch -O /tmp/$1.patch &&
git am /tmp/$1.patch
@celeron55
celeron55 / mtf20220108
Last active January 8, 2022 07:26
Minetest's future 2022-01-08
I was inspired by yesterday's #minetest-dev discussions to write down what Minetest's future looks like to me currently.
- Directly serves gamedevs and server admins
- Doesn't need to cater to players by itself regarding to gameplay, gamedevs and server admins already have players in mind
- But players essentially become gamedevs when they open the content database and server admins when they open the hosting tab
- think more along the lines of Roblox than Godot (I'm flexible about this though. Have to see how it goes), but don't make separate game distribution unnecessarily difficult
- Multiple worlds with separate lua environments
- this is necessary because a single world per game server is a special case. There's no way we can get away with supporting only the special case
- the client needs to view only one world at a time (for now)
Total 12 modules 266.03 V
* Module 1: (22.26) 3.73 3.73 3.73 3.73 3.73 3.73 V 24.2/24.1°C
* Module 2: (22.29) 3.73 3.73 3.70 3.79 3.73 3.73 V 24.3/24.0°C
* Module 3: (22.26) 3.73 3.73 3.73 3.73 3.73 3.73 V 24.0/23.9°C
* Module 4: (22.28) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.9/24.0°C
* Module 5: (22.28) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.8/23.7°C
* Module 6: (22.22) 3.73 3.74 3.73 3.72 3.71 3.71 V 23.8/23.7°C
* Module 7: (22.27) 3.73 3.73 3.73 3.73 3.73 3.73 V 24.0/23.9°C
* Module 8: (22.26) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.8/23.8°C
* Module 9: (22.28) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.9/24.0°C
void update_bms_discharge_motor_torque_req_limit()
{
// Limit torque request according to bms_status.max_discharge_current_Ax10
if(bms_status.max_discharge_current_Ax10 < 2000){
// Calculate rough motor current limit based on motor speed, rail
// voltage and rail current limit
float speed_rpm = abs(inverter_status.speed / INVERTER_BITS_PER_RPM);
float rail_voltage = inverter_status.voltage / INVERTER_BITS_PER_VOLT;
float rail_current_per_motor_current = speed_rpm / 3000.0f;
float rail_current_limit = (float)bms_status.max_discharge_current_Ax10 / 10.0f;
[root@everything log]# tail -n 1000 /var/log/nginx_access.log | grep forum.minetest.net | cut -d' ' -f1 | cut -d'.' -f1,2 | sort | uniq -c | sort -n
1 179.209
1 220.181
1 23.250
1 24.150
1 35.202
2 174.127
2 179.96
2 54.236
2 69.221