historyshows numbered command history, most recent last!nretrieves command numbernand executes it!n:pretrieves command numbernand places it into the command history without executing it. Up arrow then retrieves the command for editing
| import pandas as pd | |
| from pandas.io.json import json_normalize | |
| import requests | |
| # IH API documented here: https://github.com/nybgvh/IH-API/wiki | |
| url='http://sweetgum.nybg.org/science/api/v1/institutions' | |
| def main(): | |
| response = requests.get(url) | |
| results = response.json() | |
| # The JSON format record for an IH record has nested sections - the |
| import networkx as nx | |
| import numpy as np | |
| import matplotlib as mpl | |
| import matplotlib.pyplot as plt | |
| import mplleaflet | |
| import sys | |
| def main(): | |
| inputfile=sys.argv[1] | |
| outputfile_base=sys.argv[2] |
Zotero desktop used to manage literature references, with zotfile and zotero better bibtex plugins used to manage PDF attachments and create / maintain biblatex format downloads respectively.
Obsidian used to manage notes and tasks, with the citations plugin used to access literature references from the Zotero biblatex format export.
Set up a dask gateway and print the dashboard URL
import dask_gateway
cluster = dask_gateway.GatewayCluster()
client = cluster.get_client()
cluster.scale(8)
print(cluster.dashboard_link)| javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
| default: Turndown | |
| }, { | |
| default: Readability | |
| }]) => { | |
| /* Optional vault name */ | |
| const vault = ""; | |
| /* Optional folder name such as "Clippings/" */ |
This gist shows you how to use langchain to reformat text input data (representing specimens) into a structured output defined by a python class. For ease of use, it uses the groq API, so that no local installation of an LLM is required.
You'll need python and to install the langchain-groq package, which is specified in requirements.txt
You'll also need to sign up for a groq API key at https://console.groq.com/keys, and you'll need to store this key in an environment variable (GROQ_API_KEY) on your local system.