Skip to content

Instantly share code, notes, and snippets.

View nickumia's full-sized avatar

nickumia nickumia

View GitHub Profile
@nickumia
nickumia / matplotlib_backend.py
Last active August 26, 2023 06:36
Pyplot lines example
import matplotlib
gui_env = ['Qt4Agg','WXAgg', 'TKAgg','GTKAgg']
for gui in gui_env:
try:
print("testing", gui)
matplotlib.use(gui,warn=False, force=True)
from matplotlib import pyplot as plt
break
except:
continue
@nickumia
nickumia / datagov_cluster.py
Last active November 27, 2022 17:53
Download all keywords from catalog.data.gov
import matplotlib.pyplot as mp
import nlp.processing.storage as nps
import numpy as np
import json
from datagov_model_convert import gen_key
MODEL = nps.LocalStorage()
MODEL.restore('model.dict.pkl')
# print(len(MODEL.save))