Skip to content

Instantly share code, notes, and snippets.

View jtrive84's full-sized avatar

James Triveri jtrive84

View GitHub Profile
@jtrive84
jtrive84 / censored-mle.ipynb
Created May 23, 2024 18:48
Censored Maximum Likelihood Estimation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / btw.ipynb
Created April 26, 2024 20:38
Betweenness Centrality
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / btw.py
Created April 26, 2024 20:38
Betweenness centrality
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## CuGraph Demonstration"
]
},
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / saliency.ipynb
Created April 24, 2024 15:38
Saliency Maps
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / softmax.py
Created April 23, 2024 20:59
Classifier with softmax
class PreTrainedImageClassifier(nn.Module):
"""
Transfer learning using Resnet models for map image classification.
"""
def __init__(self, pt_model, dropout=0):
super().__init__()
# Set requires_grad = False for pretrained model.
for param in pt_model.parameters():
param.requires_grad = False
@jtrive84
jtrive84 / get-bounding-envelopes.ipynb
Created April 23, 2024 16:12
Get bounding envelopes for links in target region.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / segmented.ipynb
Created April 23, 2024 16:09
Segment map images
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / qgis_map_imaging.py
Created April 23, 2024 16:08
Create static map images via QGIS.
"""
Script to use for creating static map images in QGIS.
A dictionary of bounding boxes is required, with key representing the
linkId and value a list of four coordinates representing the region that
encloses the link. The dictionary for Charlotte has been included in the
repository.
Author: James D. Triveri
Date: 2024-02
"""
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.