Skip to content

Instantly share code, notes, and snippets.

View david-andrew's full-sized avatar

David-Andrew Samson david-andrew

View GitHub Profile
>>> what kind of analysis can you help me with?
⠸ thinking...[2024-08-13 12:20:07,022] {_client.py:1026} INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
thought: I need to provide the user with information about the types of analysis that can be
performed using the geo_power_api.
tool: final_answer
tool_input: I can help you with various types of geothermal energy analysis, including but not
limited to: assessing geothermal potential, evaluating the feasibility of geothermal projects,
analyzing geothermal resource data, and providing insights into geothermal energy production.
If you have specific data or a particular question in mind, please provide the details, and I
can assist you further.
import timeit
import random
# Class definitions
class Class0: pass
class Class1: pass
class Class2: pass
class Class3: pass
class Class4: pass
Results:
[0](WorldEnergyOutlook2023.mmd ¶ 818): The World Energy Outlook 2023 provides insight analysis and strategic insights into every aspect of the global energy system. Against a package of geometrical tensors and flexible energy markets, this work report explores how structural shifts in economies and in energy. Use of shifts the way that the world meets rise demand for energy.
[1](WorldEnergyOutlook2023.mmd ¶ 702): The _World Energy Outlook-2023_ (_WEO-2023_) explores three main scenarios in the analysis in the chapters. These scenarios are not predictions - the IEA does not have a single view on the future of the energy system. The scenarios are:
[2](WorldEnergyOutlook2023.mmd ¶ 47): The topics included in this chapter represent key themes of the _World Energy Outlook 2023_. Further information and background on the IEA Net Zero Roadmap is in _Net Zero Roadmap: A Global Pathway to Keep the 1.5 "C Goal in Reach_ published in September 2023. In addition, a range of supply and demand issues for the oi
@david-andrew
david-andrew / gist:31ffc4d13035c801b66db52eed8d2a7e
Last active March 21, 2024 13:50
LLM-based Annotations for ACLED 2019-2022
geo=[GeoAnnotation(name='iso', display_name=None, description='This dataset utilizes ISO 3166-1 numeric country codes to categorize incidents by country. The value "854" corresponds to Burkina Faso, indicating that the first five rows of data refer to events that occurred in Burkina Faso.', type=<ColumnType.GEO: 'geo'>, geo_type=<GeoType.COUNTRY: 'country'>, primary_geo=None, resolve_to_gadm=None, is_geo_pair=None, coord_format=None, qualifies=None, aliases={}, gadm_level=None), GeoAnnotation(name='region', display_name=None, description='This dataset categorizes various events by their geographical location within the continent of Africa, specifically focusing on the Western Africa region. This area includes countries such as Nigeria, Ghana, Senegal, and others, encompassing a diverse range of cultures, political landscapes, and socio-economic conditions. The data is structured to reflect the occurrences within this specific geographic region, highlighting the unique attributes and challenges faced by Wester
@david-andrew
david-andrew / gist:0a71ad1e7bab8649d20381f5bf0ddd9b
Created February 21, 2024 13:49
Several LLM Dojo Annotation Examples
Meta(path=PosixPath('datasets/mock_aqi.csv'), name='Air Quality Index', description='This dataset represents daily air quality observations collected from various monitoring stations across different cities worldwide. Each row corresponds to a single observation with details about the date, time, and location of the observation, along with specific air quality metrics and conditions.')
LLM identified column "year" as a DATE
LLM identified column "month" as a DATE
LLM identified column "day" as a DATE
LLM identified column "time" as a DATE
LLM identified column "lat" as a GEO
LLM identified column "lon" as a GEO
LLM identified column "country" as a GEO
LLM identified column "admin1" as a GEO
LLM identified column "admin2" as a GEO
@david-andrew
david-andrew / gist:8213d202107908112d02565544846bf2
Created February 20, 2024 21:26
LLM annotation output for ACLED dataset
geo=[GeoAnnotation(name='iso', display_name=None, description='The values in the dataset represent the ISO 3166-1 numeric country codes, which are internationally recognized codes assigned to each country and certain territories. In this context, the number 854 corresponds to Burkina Faso. These codes are used for data exchange and to increase clarity and ensure unambiguity when identifying countries on a global scale.', type=<ColumnType.GEO: 'geo'>, geo_type=<GeoType.COUNTRY: 'country'>, primary_geo=None, resolve_to_gadm=None, is_geo_pair=None, coord_format=None, qualifies=None, aliases={}, gadm_level=None), GeoAnnotation(name='region', display_name=None, description='This dataset categorizes events based on their geographic location within the continent of Africa, specifically focusing on the sub-region of Western Africa. This area includes countries along the Atlantic coast, from the Sahara Desert in the north to the Gulf of Guinea in the south.', type=<ColumnType.GEO: 'geo'>, geo_type=<GeoType.COUNTRY: 'c
@david-andrew
david-andrew / gist:0a4c2fca21c6c8af290c61f76e9af9c0
Created February 20, 2024 20:56
example output from dojo-auto-annotations
Meta(path=PosixPath('datasets/mock_aqi.csv'), name='Air Quality Index', description='This dataset represents daily air quality observations collected from various monitoring stations across different cities worldwide. Each row corresponds to a single observation with details about the date, time, and location of the observation, along with specific air quality metrics and conditions.')
LLM identified column "year" as a DATE
LLM identified column "month" as a DATE
LLM identified column "day" as a DATE
LLM identified column "time" as a DATE
LLM identified column "lat" as a GEO
LLM identified column "lon" as a GEO
LLM identified column "country" as a GEO
LLM identified column "admin1" as a GEO
LLM identified column "admin2" as a GEO
@david-andrew
david-andrew / gist:e9fe13a92c85b23c4c8b215ebd5cf270
Created January 3, 2024 20:33
multi-question document assistant demo
>>> how is climate change expected to affect flooding in ethiopia?
|||| Context free query: climate change impact on flooding in Ethiopia
Answer: Climate change is expected to affect flooding in Ethiopia in several ways. Primarily, it will likely lead to an increased frequency and intensity of extreme hydrologic events, causing more pronounced disastrous floods which can negatively impact the economy and society [0][7]. The country is susceptible to floods, and past events have shown considerable loss of life and property [1]. The median temperature increase for Africa is predicted to be 3-4°C by the end of the 21st century, possibly intensifying evapotranspiration, which may negate any benefits from increased rainfall, thus exacerbating drought and flood conditions [1].
Moreover, variability in rainfall is expected to increase due to climate change, resulting in more frequent droughts and floods [9]. These changes threaten the stability and transformation of Ethiopia's agricultural sector, which is heavily
@david-andrew
david-andrew / gist:24092d01c3a6a7ea1674ab84a550b98c
Created December 20, 2023 17:48
error output for python installing GDAL
43.19 Building wheel for GDAL (setup.py): started
45.54 Building wheel for GDAL (setup.py): finished with status 'error'
45.60 error: subprocess-exited-with-error
45.60
45.60 × python setup.py bdist_wheel did not run successfully.
45.60 │ exit code: 1
45.60 ╰─> [782 lines of output]
45.60 running bdist_wheel
45.60 running build
45.60 running build_py
@david-andrew
david-andrew / gist:8210781c56f772c1a5167c87d1208769
Created September 15, 2023 14:02
Python: How to Forward Type Hints in Decorated Functions
from typing import TypeVar
from typing_extensions import ParamSpec
_R_co = TypeVar("_R_co", covariant=True)
_P = ParamSpec("_P")
# decorated functions will mantain identical typing to their original form
def myDecorator(func: Callable[_P, _R_co]) -> Callable[_P, _R_co]:
def wrapper(*args, **kwargs):
# do wrapper stuff
return func(*args, **kwargs)