Date: January 2025
Author: Research analysis based on llm-greenpt, llm-neuralwatt, and OpenCode codebase
| /** | |
| * PATCH 01: SDK Energy Capture | |
| * | |
| * File: packages/opencode/src/provider/sdk/openai-compatible/src/responses/openai-responses-language-model.ts | |
| * | |
| * This patch modifies the OpenAI-compatible SDK to capture energy data from: | |
| * 1. GreenPT-style: `impact` field in response.completed chunks | |
| * 2. Neuralwatt-style: SSE comments (`: energy {...}`) | |
| * | |
| * The energy data is passed through providerMetadata.energy to downstream consumers. |
| # Caddyfile for systemd socket activation | |
| # | |
| # The socket unit passes the listening socket as file descriptor 3. | |
| # FrankenPHP/Caddy binds to this instead of opening its own socket. | |
| # | |
| # Edit the root path below to match your site. | |
| { | |
| frankenphp | |
| } |
This is is an minimal wordpress plugin we would need to allow any WordPress site to link to a carbon.txt file we would need to set up linked domains to work with the Green Web Platform.
- Install this plugin
- Activate the plugin
- Set the location of the carbon.txt file (see the screenshot)
| { | |
| "// filepath-in-my-repo": ".devcontainer/devcontainer.json", | |
| "image": "mcr.microsoft.com/devcontainers/universal:2", | |
| "features": { | |
| "ghcr.io/jsburckhardt/devcontainer-features/uv:1": {}, | |
| "ghcr.io/eitsupi/devcontainer-features/just:0": {} | |
| } | |
| } |
| title | marimo-version | width |
|---|---|---|
Local Llm With Ollama |
0.9.1 |
medium |
import marimo as mo
import llm
import markdown
| select table_schema as database_name, | |
| table_name, | |
| round( | |
| sum((data_length + index_length + data_free)) / power(1024, 2), | |
| 2 | |
| ) as table_size | |
| from information_schema.tables | |
| where table_schema = 'table_name' -- put your database name here | |
| and table_type = 'BASE TABLE' | |
| group by table_schema, |
This is an experiment with making gunicorn gracefully scale down to zero after X seconds, as a way to do application-level scale-to-zero behaviour in applications that use a webserver like Gunicorn. The idea here is that you do not need to mess too much internal logic of an existing application, nor put it in a container if you use this.
Instead you use the web server's own support for handling SIGTERM signals, to allow gracefully scaling down of processes when they are not in use.
If you're using Linux to run a server, the chances of Systemd being used to manage your processes is fairly high, as it's the default option for a number of linux distributions now.
It also means you might not need a complicated "serverless" system to orchestrate scaling up and down, to reclaim memory on a server for us in other tasks if you have a website or webservice that isn't continually serving traffic.
Grace for submission to the Regent House under Special Ordinance A (ii) 5 (fossil fuel industry ties)
21 July 2022
The Council has received the following Grace, which has been initiated under Special Ordinance A (ii) 5 by 84 members of the Regent House:
The University of Cambridge has a strong, stated commitment to addressing the climate crisis and to keeping global heating below a 1.5 degrees Celsius increase from pre‐industrial levels.
The University currently maintains research funding partnerships with major fossil fuel companies, including Shell and BP (https://www.cam.ac.uk/about‐research/energy‐sector‐partnerships).
| co2_optimising_example: | |
| - options: | |
| - greenband | |
| - latency_then_bandwidth | |
| # optimise for carbon intensity. Choose ASs which have advertise | |
| # a carbon intensity per hour of less than 300 grams of CO2 per | |
| # KwH, either by being in a place where the grid is green (Iceland), | |
| # or where they are bringing down their grid average by sourcing power | |
| # from renewables, or a charged battery to avoid drawing power when |