Skip to content

Commit 2f02f02

Browse files
committed
Upload CodeCarbon fromm original repository
1 parent 819a47a commit 2f02f02

File tree

7 files changed

+188
-0
lines changed

7 files changed

+188
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/

apps/carboncode-dashboard/Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn app:server --workers 4

apps/carboncode-dashboard/app.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from codecarbon.viz.carbonboard import render_app
2+
import pandas as pd
3+
4+
df = pd.read_csv("emissions.csv")
5+
6+
app = render_app(df)
7+
8+
server = app.server
9+
10+
if __name__ == "__main__":
11+
app.run_server(debug=True)

apps/carboncode-dashboard/data/canada_provinces.geojson

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
codecarbon
2+
gunicorn
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
APScheduler==3.7.0
2+
Brotli==1.0.9
3+
certifi==2021.5.30
4+
charset-normalizer==2.0.4
5+
click==8.0.1
6+
codecarbon==1.2.0
7+
dash==1.21.0
8+
dash-bootstrap-components==0.13.0
9+
dash-core-components==1.17.1
10+
dash-html-components==1.1.4
11+
dash-table==4.12.0
12+
fire==0.4.0
13+
Flask==2.0.1
14+
Flask-Compress==1.10.1
15+
future==0.18.2
16+
gunicorn==20.1.0
17+
idna==3.2
18+
itsdangerous==2.0.1
19+
Jinja2==3.0.1
20+
MarkupSafe==2.0.1
21+
numpy==1.21.2
22+
pandas==1.3.2
23+
plotly==5.3.0
24+
py-cpuinfo==8.0.0
25+
pynvml==11.0.0
26+
python-dateutil==2.8.2
27+
pytz==2021.1
28+
requests==2.26.0
29+
six==1.16.0
30+
tenacity==8.0.1
31+
termcolor==1.1.0
32+
tzlocal==2.1
33+
urllib3==1.26.6
34+
Werkzeug==2.0.1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.8.2

0 commit comments

Comments
 (0)