This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Convert a Trello board export (JSON) into filtered JSON that can be more easily converted to CSV. | |
| The filter_road_done function is an example of how to report on keywords and columns (e.g. give me all cards containing "road" in the "DONE!" column). | |
| Adapted from https://gist.github.com/RealOrangeOne/c35751ee794e90df512bdfba6f22574d | |
| Lumo was used for formatting (and code suggestions). | |
| Usage: | |
| Export JSON from Trello (three dots > print, export and share > export as JSON), run this script: | |
| python trello_to_json.py <input_file.json> <output_file.json> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is just a start. | |
| // See: https://developers.google.com/earth-engine/datasets/catalog/USFS_GTAC_TreeMap_v2022 | |
| // Get the USDA TreeMap dataset | |
| var dataset = ee.ImageCollection('USFS/GTAC/TreeMap/v2022'); | |
| // 'Official' TreeMap 2016 palettes | |
| var bamako = ['00404d', '134b42', '265737', '3a652a', '52741c', '71870b', '969206', 'c5ae32', 'e7cd68', 'ffe599']; | |
| var bamako_r = JSON.parse(JSON.stringify(bamako)).reverse(); | |
| var lajolla = ['ffffcc','fbec9a','f4cc68','eca855','e48751','d2624d','a54742','73382f','422818','1a1a01']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Google Earth Engine script to get forest loss and gain since 2016 for an area of interest in TN (because TN LiDAR data dates back to 2016). | |
| Images (GeoTIFF) can be exported to Google Drive then downloaded and imported into QGIS. | |
| Adapted from Josef Clifford's Udemy course Open Source GIS & Remote Sensing for Conservation (Advanced). */ | |
| // Set map center over NRC in Grainger County, TN | |
| Map.setCenter(-83.6562908309219, 36.326523130233674, 13); | |
| // Load US Grainger county dataset | |
| var graingerCounty = ee.FeatureCollection('TIGER/2018/Counties') | |
| .filter(ee.Filter.eq('GEOID', '47057')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # generated from multiple sources by Brave Leo (AI) | |
| # from the Python console in QGIS: | |
| # activate the layer you want field names for and then enter... | |
| from qgis.utils import iface | |
| layer = iface.activeLayer() | |
| prov = layer.dataProvider() | |
| field_names = [field.name() for field in prov.fields()] | |
| for f in enumerate(field_names): | |
| print(f"{f}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require 'nokogiri' | |
| require 'csv' | |
| # Get Alma publishing job data enhancement schema. | |
| # Download data enrichment html and point this script to it. | |
| # TODO: clean this up and refine it, if needed again |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # For the Valva project | |
| # Creates marc records from a spreadsheet | |
| # 201911 | |
| require 'csv' | |
| require 'marc' | |
| require 'optparse' | |
| require 'facets/string/titlecase' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://rednotebook.sourceforge.io | |
| Of the three mac installation methods listed on the Rednotebook downloads page, these got the closest: | |
| https://jarrousse.org/installing-rednotebook-from-source-on-mac-os-x/ | |
| Here's a summary of modified steps ... | |
| $ git clone https://github.com/jendrikseipp/rednotebook | |
| $ brew install gtk # <= using brew to install gtk worked | |
| $ brew install pygobject3 glib libffi cairo gtksourceview3 | |
| $ brew install atk librsvg # <= don't install gdk-pixbuf at this step | |
| $ brew install gsettings-desktop-schemas adwaita-icon-theme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| """ | |
| Simple test script to get a list of ids from bibs containing given subject headings | |
| pmg | |
| """ | |
| import os | |
| import pymarc | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| """ | |
| Get simple reports from Peter Ward files, reading LDR/05. | |
| Peter Ward files come from a paid subscription as of 201808, processed by ke, jeb, pmg. | |
| Run like this: python peter_ward_report.py -f 'unname18.01' | |
| It produces a csv file like this ... | |
| ldr05,status,lccn | |
| c,changed,n 00004614 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| """ | |
| Query dbpedia. Input is csv which includes authorized names ... | |
| ... | |
| 96,"Abdelamir, Chowki" | |
| 9,"Abraham, Nicolas" | |
| 31,"Abraham, Nicolas" | |
| ... | |
| Queries local copy of LCNAF, then viaf for viaf uri, then dbpedia for various values (sparql). |
NewerOlder