This file contains 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
"""See https://github.com/langchain-ai/langchain/issues/4396 for original author.""" | |
"""Loader that loads data from JSON.""" | |
import json | |
from pathlib import Path | |
from typing import Callable, Dict, List, Optional, Union | |
from langchain.docstore.document import Document | |
from langchain.document_loaders.base import BaseLoader |
This file contains 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
[{"iata":"AAA","name":"Anaa Airport"},{"iata":"AAB","name":"Arrabury Airport"},{"iata":"AAC","name":"El Arish International Airport"},{"iata":"AAE","name":"Annaba Airport"},{"iata":"AAF","name":"Apalachicola Regional Airport"},{"iata":"AAG","name":"Arapoti Airport"},{"iata":"AAH","name":"Aachen-Merzbruck Airport"},{"iata":"AAI","name":"Arraias Airport"},{"iata":"AAJ","name":"Cayana Airstrip"},{"iata":"AAK","name":"Buariki Airport"},{"iata":"AAL","name":"Aalborg Airport"},{"iata":"AAM","name":"Malamala Airport"},{"iata":"AAN","name":"Al Ain International Airport"},{"iata":"AAO","name":"Anaco Airport"},{"iata":"AAQ","name":"Anapa Airport"},{"iata":"AAR","name":"Aarhus Airport"},{"iata":"AAT","name":"Altay Air Base"},{"iata":"AAU","name":"Asau Airport"},{"iata":"AAV","name":"Allah Valley Airport"},{"iata":"AAW","name":"Abbottabad Airport"},{"iata":"AAX","name":"Araxa Airport"},{"iata":"AAY","name":"Al Ghaidah International Airport"},{"iata":"AAZ","name":"Quezaltenango Airport"},{"iata":"ABA","name":"Abakan Airpo |
This file has been truncated, but you can view the full file.
This file contains 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
[ | |
{ | |
"type": "deal", | |
"id": 1, | |
"attributes": { | |
"id": 1, | |
"companyId": 677, | |
"companyName": "Verda", | |
"headquarters": "Kitchener", | |
"ecosystemName": "Waterloo Region", |
This file contains 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
{ | |
"type": "summary", | |
"id": "summary", | |
"attributes": { | |
"ecosystems": [ | |
{ | |
"id": 531, | |
"ecosystemName": "Canada", | |
"year": "2023", | |
"amount": 5522005820, |
This file has been truncated, but you can view the full file.
This file contains 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
[ | |
{ | |
"type": "company", | |
"id": 2476, | |
"attributes": { | |
"id": 2476, | |
"companyName": " mosea technologies", | |
"headquarters": "Toronto", | |
"ecosystemName": "Toronto", | |
"ecosystemSecondary": null, |
This file has been truncated, but you can view the full file.
This file contains 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
[ | |
{ | |
"type": "investor", | |
"id": 3074, | |
"attributes": { | |
"id": 3074, | |
"investorName": "BKR Capital", | |
"investorType": [ | |
"Venture Capital" | |
], |
This file contains 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
// A very simple example (sales taxes from 2022) | |
function findProvince(input) { | |
// Starting postal code character - https://www150.statcan.gc.ca/n1/pub/92-195-x/2011001/other-autre/pc-cp/tbl/tbl9-eng.htm | |
// Provinces short codes - https://www150.statcan.gc.ca/n1/pub/92-195-x/2011001/geo/prov/tbl/tbl8-eng.htm | |
// Sales taxes by province - https://www.retailcouncil.org/resources/quick-facts/sales-tax-rates-by-province/ | |
//var input = "H2V 1V8"; | |
var postal = input.substring(0, 1).toLowerCase(); // E.g., "H2V 1V8" becomes "h" |
This file contains 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
function wayback() { | |
var url = 'https://www.google.com/'; | |
// Does it already exist? | |
var archive = JSON.parse(getContent_('https://archive.org/wayback/available?url=' + url, {})); | |
if (archive) { | |
var closest = archive.archived_snapshots.closest; | |
if (closest && closest.available) { | |
console.log(closest.url); // Yes? Here is the saved page URL. | |
} else { |
To use this cloud function follow these steps:
- Create a pub/sub topic which will be used to trigger the cloud function.
- Create the cloud function and copy in the code below.
- Set the trigger to Pub/Sub and choose the topic created in step 1.
- Set the Runtime to Python 3.9 and delete default files.
- Create each file manually and paste the code.
- Make sure to set the correct project ID in line 8.
- Create a cloud scheduler job to trigger the cloud function on a regular basis.
- Choose the frequency when you want the cloud function to be triggered.
- Set the target to Pub/Sub and define the topic created in step 1.
NewerOlder