Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
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
const awsTool = new DynamicTool({ | |
name: "aws-cli", | |
description: | |
"This is AWS CLI. You can call this to send commands to the AWS Cloud. Use AWS CLI format like `aws s3api list-buckets`", | |
async func(command) { | |
const args = command.split(" ").filter((x) => x !== "aws"); | |
const result = spawnSync("aws", args, { | |
env: { | |
...process.env, | |
AWS_REGION: "eu-central-1", |
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
# Credit 🙏: I just used the example from langchain docs and it works quite well: https://python.langchain.com/en/latest/use_cases/question_answering.html | |
# Note 2: The Arxiv -> PDF logic is a bit messy, I'm sure it can be done better | |
# Note 3: Please install the following: | |
# To run: | |
# Save this in a `app.py` | |
# pip install arxiv PyPDF2 langchain chromadb | |
# The chat feature was shipped in H2O nightly this week, we will need to install from nightly link: |
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
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
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
#This is my own interpatation of USA.gov PubSub feed with some tips and code from HarlanH from twitter. | |
#I am interested finding out links about which agency are shared from which part of US. | |
library(stringr) | |
library(plyr) | |
library(ggplot2) | |
library(scrapeR) | |
library(RJSONIO) | |
library(colorspace) | |
library(RColorBrewer) | |
library(maps) |