Skip to content

Instantly share code, notes, and snippets.

View jtrive84's full-sized avatar

James Triveri jtrive84

View GitHub Profile
@jtrive84
jtrive84 / requirements.txt
Last active February 7, 2026 15:10
Requirements file for second installment of NLP for risk modeling
numpy==1.26.4
pandas==2.2.1
scikit-learn==1.4.2
scipy==1.12.0
torch==2.4.1
# Hugging Face stack (Trainer-capable)
transformers==5.1.0
accelerate==1.3.0
datasets==2.18.0
@jtrive84
jtrive84 / geospatial-hubfest.ipynb
Created August 31, 2025 20:22
Hubfest geospatial notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / pd_hasher.py
Created July 26, 2025 13:38
Create hash of multiple columns in Pandas
dfsf["hash_id"] = pd.util.hash_pandas_object(
dfsf[["FIPSCd", "CountyNm", "PolicyNo", "TermEffectiveDt", "InsuredNm", "TermExpirationDt", "LocationCityNm",
"ZipCd", "LatitudePt", "LongitudePt"]],
index=False
).astype(str)
@jtrive84
jtrive84 / freq-glm.ipynb
Created March 21, 2025 14:55
Intro to Frequency GLMs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / folium-annimations.ipynb
Created February 18, 2025 02:17
folium annimation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / dask.yaml
Last active January 1, 2025 22:02
Organic computing cluster environment file
name: dask
channels:
- conda-forge
- defaults
dependencies:
- python=3.12
- dask=2024.12.0
- dask-labextension=7.0.0
- numpy=2.2.1
- asyncssh=2.19.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / distance-to-coastline.ipynb
Created October 14, 2024 21:14
Distance to coastline notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / 2023-cciw-adjacency.csv
Created October 2, 2024 13:15
2023 CCIW football results adjacency matrix
Augustana Carroll Carthage Elmhurst Illinois Wesleyan Millikin North Central North Park Washington U. Wheaton
Augustana 0 1 1 1 1 1 0 1 1 0
Carroll 0 0 0 1 1 1 0 1 0 0
Carthage 0 1 0 1 0 1 0 0 0 0
Elmhurst 0 0 0 0 0 1 0 0 0 0
Illinois Wesleyan 0 0 1 1 0 1 0 0 0 0
Millikin 0 0 0 0 0 0 0 0 0 0
North Central 1 1 1 1 1 1 0 1 1 1
North Park 0 0 1 1 1 1 0 0 0 0
Washington U. 0 1 1 1 1 1 0 1 0 0
@jtrive84
jtrive84 / 2023-cciw-rankings.csv
Created October 2, 2024 13:12
2023 CCIW football regular season rankings
team wins losses
North Central 9 0
Wheaton 8 1
Augustana 7 2
Washington U. 6 3
Carroll 4 5
North Park 4 5
Carthage 3 6
Illinois Wesleyan 3 6
Elmhurst 1 8