This file contains hidden or 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
| name: deepseek operational carbon estimate | |
| description: null | |
| tags: null | |
| aggregation: | |
| metrics: | |
| - operational-carbon | |
| type: both | |
| initialize: | |
| plugins: | |
| power-to-energy-ws: |
This file contains hidden or 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 | |
| root = './neuralwatt/' | |
| in_data = 'inference.nvidia_smi_log.none_h100_llama3.3_20250316_230401.csv' | |
| # clean and prep data | |
| data = pd.read_csv(root+in_data) | |
| data = data[['timestamp', 'power.draw(W)']] # extract relevant features | |
| data.replace(' ', 'T', regex=True, inplace=True) # format timestamp |
This file contains hidden or 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
| name: carbon-intensity plugin demo | |
| description: null | |
| tags: null | |
| aggregation: | |
| metrics: | |
| - operational-carbon | |
| type: both | |
| initialize: | |
| plugins: | |
| power-to-energy-ws: |
This file contains hidden or 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
| const tree = { | |
| name: "Root", | |
| children: [{ | |
| name: "A", | |
| energy: [40, 40, 40], | |
| carbon: [10, 10, 10], | |
| children: [{ | |
| name: "C", |
This file contains hidden or 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
| /** This function does a depth-first, post-order traversal of the tree and aggregates the named metrics from each child into the parent node all the way up to the root*/ | |
| const tree = { | |
| name: "Root", | |
| carbon: 0, | |
| energy: 0, | |
| children: [{ | |
| name: "A", | |
| energy: 40, |
This file contains hidden or 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
| name: nesting-demo | |
| description: null | |
| tags: | |
| kind: web | |
| complexity: moderate | |
| category: on-premise | |
| aggregation: | |
| type: both | |
| metrics: | |
| - 'cpu-util' |
This file contains hidden or 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
| // some input data with gaps in the record | |
| const inputs = [{ timestamp: '2023-07-06T00:00', carbon: 10, energy: 30, duration: 10 }, | |
| { timestamp: '2023-07-06T00:10', carbon: 10, energy: 30, duration: 10 }, | |
| { timestamp: '2023-07-06T00:30', carbon: 10, energy: 30, duration: 5 }, | |
| { timestamp: '2023-07-06T00:50', carbon: 10, energy: 30, duration: 20 } | |
| ] | |
| const startTime = '2023-07-06T00:00' | |
| const interval = 60 | |
| const endTime = '2023-07-06T10:00' |
This file contains hidden or 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
| name: if-demo | |
| description: pipeline demo | |
| initialize: | |
| models: | |
| - name: azure-importer | |
| kind: builtin | |
| - name: cloud-instance-metadata | |
| kind: builtin | |
| - name: intel | |
| kind: shell |
This file contains hidden or 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
| name: if-demo | |
| description: pipeline demo | |
| initialize: | |
| models: | |
| - name: azure-importer | |
| kind: builtin | |
| - name: cloud-instance-metadata | |
| kind: builtin | |
| - name: intel | |
| kind: shell |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # save this alongside snicar-driver.py and run in the terminal using | |
| # `python src/biosnicar/biosnicar-distributed.py` | |
| import numpy as np | |
| from pathlib import Path | |
| import dask |
NewerOlder