Search is not available for this dataset
repo_id stringlengths 12 110 | file_path stringlengths 24 164 | content stringlengths 3 89.3M | __index_level_0__ int64 0 0 |
|---|---|---|---|
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/tutorial-air-quality-analysis.md | ---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.5
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---
# Analyzing the impact of the lockdown on air quality in Delhi, India

... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/text_preprocessing.py | import pandas as pd
import argparse
import numpy as np
import re # (https://docs.python.org/3/library/re.html) for tokenising textual data
import string # (https://docs.python.org/3/library/string.html) for string operations
# Creating the random instance
rng = np.random.default_rng()
class TextPreprocess:
"""... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/who_covid_19_sit_rep_time_series.csv | Province/States,Country/Region,WHO region,WHO region label,1/21/20,1/22/20,1/23/20,1/24/20,1/25/20,1/26/20,1/27/20,1/28/20,1/29/20,1/30/20,1/31/20,2/1/20,2/2/20,2/3/20,2/4/20,2/5/20,2/6/20,2/7/20,2/8/20,2/9/20,2/10/20,2/11/20,2/12/20,2/13/20,2/14/20,2/15/20,2/16/20,2/17/20,2/18/20,2/19/20,2/20/20,2/21/20,2/22/20,2/23/2... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/mooreslaw-tutorial.md | ---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Determining Moore's Law with real data in NumPy

language: python
name: python3
---
# Sentiment Analysis on notable speeches of... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/tutorial-ma.md | ---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Masked Arrays
## What you'll do
Use the masked arrays module from NumPy to analyze... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/transistor_data.csv | Processor,MOS transistor count,Date of Introduction,Designer,MOSprocess,Area
Intel 4004 (4-bit 16-pin),2250,1971,Intel,"10,000 nm",12 mm²
Intel 8008 (8-bit 18-pin),3500,1972,Intel,"10,000 nm",14 mm²
NEC μCOM-4 (4-bit 42-pin),2500,1973,NEC,"7,500 nm",?
Intel 4040 (4-bit 16-pin),3000,1974,Intel,"10,000 nm",12 mm²
Mot... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/tutorial-svd.md | ---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Linear algebra on n-dimensional arrays
+++
## Prerequisites
Before reading this tutorial, you should know ... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/air-quality-data.csv | Datetime,PM2.5,PM10,NO2,NH3,SO2,CO,O3,NOx,NO,Benzene,Toluene,Xylene
2019-05-31 00:00:00,103.26,305.46,94.71,31.43,30.16,3.0,18.06,178.31,152.73,13.65,83.47,2.54
2019-05-31 01:00:00,104.47,309.14,74.66,34.08,27.02,1.69,18.65,106.5,79.98,11.35,76.79,2.91
2019-05-31 02:00:00,90.0,314.02,48.11,32.6,18.12,0.83,28.27,48.45,2... | 0 |
public_repos/numpy-tutorials/content | public_repos/numpy-tutorials/content/tutorial-nlp-from-scratch/README.md | # Data used for building the [NLP from scratch tutorial](https://github.com/Dbhasin1/numpy-tutorials/blob/ethics-tutorial/content/tutorial-nlp-from-scratch.md)
## [IMDb Reviews Dataset](https://github.com/Dbhasin1/numpy-tutorials/blob/ethics-tutorial/content/tutorial-nlp-from-scratch/IMDB%20Dataset.csv)
**Purpose**: ... | 0 |
public_repos/numpy-tutorials/content | public_repos/numpy-tutorials/content/tutorial-nlp-from-scratch/speeches.csv | speaker,speech,source
Greta Thunberg,"""My message is that we'll be watching you. This is all wrong. I shouldn't be up here. I should be back in school on the other side of the ocean. Yet you all come to us young people for hope. How dare you! ""You have stolen my dreams and my childhood with your empty words. And yet ... | 0 |
public_repos/numpy-tutorials/content | public_repos/numpy-tutorials/content/_static/11-one-tailed-test.svg | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="202.7068mm"
height="129.55409mm"
viewBox="0 0 202.7068 129.55409"
version="1.1"
id="svg5"
sodipodi:docname="one-tailed-test.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-2... | 0 |
public_repos | public_repos/langchain-aiplugin/poetry.lock | # This file is automatically @generated by Poetry and should not be changed by hand.
[[package]]
name = "aiohttp"
version = "3.8.4"
description = "Async http client/server framework (asyncio)"
category = "main"
optional = false
python-versions = ">=3.6"
files = [
{file = "aiohttp-3.8.4-cp310-cp310-macosx_10_9_univ... | 0 |
public_repos | public_repos/langchain-aiplugin/pyproject.toml | [tool.poetry]
name = "langchain-plugin"
version = "0.1.0"
description = "An example ChatGPT Plugin that exposes a LangChain chain, agent, or retriever"
authors = ["LangChain Core"]
readme = "README.md"
packages = [{include = "app"}]
[tool.poetry.scripts]
app = "app.main:start"
[tool.poetry.dependencies]
python = "^3.... | 0 |
public_repos | public_repos/langchain-aiplugin/README.md | # LangChain as an AIPlugin
## Introduction
[LangChain](https://python.langchain.com/en/latest/index.html) can flexibly integrate with the ChatGPT AI plugin ecosystem.
LangChain chains and agents can themselves be deployed as a plugin that can communicate with other agents or with ChatGPT itself.
For more informati... | 0 |
public_repos | public_repos/langchain-aiplugin/LICENSE | MIT License
Copyright (c) 2023 langchain-ai
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/app/main.py | """"Example LangChain Plugin."""
import json
import logging
import os
from typing import Optional, cast
import importlib
from importlib.machinery import SourceFileLoader
from pathlib import Path
import uvicorn
import yaml
from app.api import ConversationRequest, ConversationResponse
from fastapi import Body, Depends, ... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/app/api.py | """Define the API schema."""
from pydantic import BaseModel
class ConversationRequest(BaseModel):
"""Request message to the LangChain."""
# Message is passed directly to the LangChain
# deployed in the plugin.
message: str
class ConversationResponse(BaseModel):
"""Deployed LangChain response.""... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/template/constants.py | # flake8: noqa
# The description of the chain you are exposing. This will be used by ChatGPT to decide when to call it.
ENDPOINT_DESCRIPTION = ""
# The name of your endpoint that you are exposing.
ENDPOINT_NAME = ""
# The input key for the chain. The user input will get mapped to this key.
INPUT_NAME = ""
# The output ... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/template/README.md | # Template
This is a template folder for you to start afresh in.
Step 1: Fill out `get_chain` in `chain.py`.
Step 2: Fill out all the constants in `constants.py`.
| 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/template/chain.py | from langchain.chains.base import Chain
def load_chain() -> Chain:
"""Load your chain here."""
| 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/retrieval_qa/constants.py | # flake8: noqa
ENDPOINT_DESCRIPTION = "Ask questions about LangChain documentation!"
ENDPOINT_NAME = "ask-langchain"
INPUT_NAME = "query"
OUTPUT_KEY = "result"
NAME_FOR_MODEL = "langchainQABot"
NAME_FOR_HUMAN = "LangChain QA Bot"
DESCRIPTION_FOR_MODEL = "This plugin provides access to a LangChain QA Bot to answer quest... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/retrieval_qa/requirements.txt | langchain
faiss-cpu
lxml
| 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/retrieval_qa/README.md | # RetrievalQA
This example shows how to expose a RetrievalQA chain as a ChatGPTPlugin.
Step 1: Ingest documents. To run the example, run `python ingest.py`
Step 2: Make any modifications to `chain.py` as you see fit (changing prompts, etc.)
Step 3: Make any changes to `constants.py` as you see fit (this is where yo... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/retrieval_qa/chain.py | from pathlib import Path
from langchain.llms import OpenAI
import pickle
from langchain.chains import RetrievalQA
DIR_PATH = Path(__file__).parent
def get_chain():
with open(DIR_PATH / "vectorstore.pkl", "rb") as f:
vectorstore = pickle.load(f)
return RetrievalQA.from_chain_type(
llm=OpenAI(t... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/retrieval_qa/ingest.py | """Load html from files, clean up, split, ingest into Weaviate."""
import pickle
from langchain.document_loaders import SitemapLoader
from langchain.embeddings import OpenAIEmbeddings
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.vectorstores.faiss import FAISS
def get_text(conten... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/agent/constants.py | # flake8: noqa
ENDPOINT_DESCRIPTION = "Solve math word problems"
ENDPOINT_NAME = "math-problems"
INPUT_NAME = "input"
OUTPUT_KEY = "output"
NAME_FOR_MODEL = "MathWordProblems"
NAME_FOR_HUMAN = "Math Problems Solver"
DESCRIPTION_FOR_MODEL = "This plugin provides access to a LangChain Agent hooked up to a calculator, so ... | 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/agent/README.md | # Agent
This example shows how to expose an agent as a ChatGPTPlugin.
Step 1: Make any modifications to `chain.py` as you see fit (changing prompts, etc.)
Step 2: Make any changes to `constants.py` as you see fit (this is where you control the descriptions used, etc)
| 0 |
public_repos/langchain-aiplugin | public_repos/langchain-aiplugin/agent/chain.py | from langchain.agents import AgentExecutor, initialize_agent, load_tools
from langchain.llms import OpenAI
def get_chain() -> AgentExecutor:
"""Load the agent executor chain."""
llm = OpenAI(temperature=0)
tools = load_tools(["llm-math"], llm)
return initialize_agent(tools, llm, "zero-shot-react-descr... | 0 |
public_repos | public_repos/forked-pdb/README.md | # forked-pdb
Python pdb for multiple processes. Pdb doesn't work for multiple processes. This one does.
## To use
```python
ForkedPdb().set_trace()
```
| 0 |
public_repos | public_repos/forked-pdb/LICENSE | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... | 0 |
public_repos | public_repos/forked-pdb/fpdb.py | import sys
import pdb
class ForkedPdb(pdb.Pdb):
"""
PDB Subclass for debugging multi-processed code
Suggested in: https://stackoverflow.com/questions/4716533/how-to-attach-debugger-to-a-python-subproccess
"""
def interaction(self, *args, **kwargs):
_stdin = sys.stdin
try:
... | 0 |
public_repos | public_repos/auto-evaluator/README.md | # `Auto-evaluator` :brain: :memo:
`Context`
Document [Question-Answering](https://python.langchain.com/en/latest/use_cases/question_answering.html) is a popular LLM use-case. LangChain makes it easy to assemble LLM components (e.g., models and retrievers) into chains that support question-answering: input documents a... | 0 |
public_repos | public_repos/auto-evaluator/LICENSE | Elastic License 2.0 (ELv2)
**Acceptance**
By using the software, you agree to all of the terms and conditions below.
**Copyright License**
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative work... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/streamlit/auto-evaluator.py | import os
import json
import time
import pinecone
import pandas as pd
import altair as alt
import streamlit as st
from typing import List
from langchain.vectorstores import Pinecone
from langchain.llms import Anthropic
from langchain.chat_models import ChatOpenAI
from langchain.evaluation.qa import QAEvalChain
from lan... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/streamlit/requirements.txt | langchain==0.0.164
openai==0.27.0
altair==4.2.2
scikit-learn==1.2.1
streamlit==1.21.0
kor==0.9.2
transformers==4.28.1
lark==1.1.5
| 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/streamlit/self_query_retriever_lex.py | from langchain.chains.query_constructor.base import AttributeInfo
metadata_field_info=[
AttributeInfo(
name="id",
description="The ID of the episode",
type="string",
),
]
document_content_description = "Information about Lex Fridman podcast episodes" | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/streamlit/README.md | # `VectorDB Auto-evaluator` :brain: :memo:
**Context**
We previously introduced auto-evaluator, an open-source tool for grading LLM question-answer chains. But this app did not connect to an existing (e.g., production) VectorDB and did not test some interesting architectures for retrieval, such as metadata filtering.... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/streamlit/prompts.py | from langchain.prompts import PromptTemplate
template = """You are a teacher grading a quiz.
You are given a question, the student's answer, and the true answer, and are asked to score the student answer as either Correct or Incorrect.
Example Format:
QUESTION: question here
STUDENT ANSWER: student's answer here
TRU... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/streamlit/kor_retriever_lex.py | import requests
from kor.extraction import create_extraction_chain
from kor.nodes import Object, Text, Number
from langchain.chat_models import ChatOpenAI
from langchain.docstore.document import Document
# Extraction schema -
schema = Object(
id = "episode_id",
description = "An ID for each Lex Fridman podcas... | 0 |
public_repos/auto-evaluator/streamlit | public_repos/auto-evaluator/streamlit/eval_sets/lex-pod-eval.json | [
{"question": "What does Elon Musk say about the self driving problem in episode 252?",
"answer": "Elon mentions that the self-driving problem is harder than he thought because you need to build a silicon equivalent of vision that maps from camera to vector space. But, he also mentions that the disengagement... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/nextjs/yarn.lock | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@babel/code-frame@^7.0.0":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a"
integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtF... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/nextjs/tsconfig.json | {
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleRe... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/nextjs/.env.local | NEXT_PUBLIC_API_URL=http://localhost:8000 | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/nextjs/next.config.js | module.exports = {
i18n: {
// providing the locales supported by your application
locales: ["en-US"],
// default locale used when the non-locale paths are visited
defaultLocale: "en-US",
},
} | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/nextjs/next-env.d.ts | /// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
| 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/nextjs/package.json | {
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/server": "^11.10.0",
"@json2csv/plainjs": "^6.1.3",
"@mantine/core": "^6.0.4",
"@mantine/dropzone": "^6.0.6",
"@mantine... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/utils/types.ts | import { UseFormReturn } from "react-hook-form";
export type FormValues = {
evalQuestionsCount: number;
chunkSize: number;
overlap: number;
splitMethod: string;
embeddingAlgorithm: string;
model: string;
retriever: string;
gradingPrompt: string;
numNeighbors: number;
files: any[];
};
export type F... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/utils/variables.ts | export const IS_DEV = process.env.NODE_ENV === "development";
export const API_URL = process.env.NEXT_PUBLIC_API_URL;
| 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/utils/renderPassFail.ts | const renderPassFail = (data: any) => {
if (data.score === 0) {
return "Incorrect";
}
if (data.score === 1) {
return "Correct";
}
throw new Error(`Problem parsing ${data}`);
};
export default renderPassFail;
| 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/public/github-mark.svg | <svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.01... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/public/twitter-black.svg | <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 248 204" style="enable-background:new 0 0 248 20... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/public/slack-mark.svg | <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 270 270" style="enable-background:new 0 0 270... | 0 |
public_repos/auto-evaluator/nextjs/public | public_repos/auto-evaluator/nextjs/public/testData/experiments.json | [
{
"evalQuestionsCount": 5,
"chunkSize": 2000,
"overlap": 0,
"splitMethod": "RecursiveTextSplitter",
"retriever": "SVM",
"embeddingAlgorithm": "OpenAI",
"model": "gpt-3.5-turbo",
"gradingPrompt": "Descriptive",
"numNeighbors": 3,
"avgRelevancyScore": 1,
"avgAnswerScore": 1... | 0 |
public_repos/auto-evaluator/nextjs/public | public_repos/auto-evaluator/nextjs/public/testData/testDataset.json | [
{
"question": "Why is the transformer architecture expressive in the forward pass?",
"answer": "The transformer architecture is expressive because it uses a general message passing scheme where nodes get to look at each other, decide what's interesting and then update each other."
},
{
"question": "... | 0 |
public_repos/auto-evaluator/nextjs/public | public_repos/auto-evaluator/nextjs/public/testData/karpathy-pod.json | {
"text": "some kind of a crazy quantum mechanical system that somehow gives you buffer overflow, somehow gives you a rounding error in the floating point. Synthetic intelligences are kind of like the next stage of development. And I don't know where it leads to. Like at some point, I suspect the universe is some kin... | 0 |
public_repos/auto-evaluator/nextjs/public | public_repos/auto-evaluator/nextjs/public/testData/results.json | [
{
"question": "Why is the transformer architecture expressive in the forward pass?",
"answer": "The transformer architecture is expressive because it uses a general message passing scheme where nodes get to look at each other, decide what's interesting and then update each other.",
"result": "The transf... | 0 |
public_repos/auto-evaluator/nextjs/public | public_repos/auto-evaluator/nextjs/public/favicon/site.webmanifest | {
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme... | 0 |
public_repos/auto-evaluator/nextjs/public | public_repos/auto-evaluator/nextjs/public/favicon/about.txt | This favicon was generated using the following graphics from Twitter Twemoji:
- Graphics Title: 1f916.svg
- Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji)
- Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f916.svg
- Graphics License:... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/styles/utils.module.css | .heading2Xl {
font-size: 2.5rem;
line-height: 1.2;
font-weight: 800;
letter-spacing: -0.05rem;
margin: 1rem 0;
}
.headingXl {
font-size: 2rem;
line-height: 1.3;
font-weight: 800;
letter-spacing: -0.05rem;
margin: 1rem 0;
}
.headingLg {
font-size: 1.5rem;
line-height: 1.4;
margin: 1rem 0;
}
... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/styles/global.css | html,
body {
padding: 0;
margin: 0;
font-family: Greycliff C, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
line-height: 1.6;
font-size: 18px;
}
* {
box-sizing: border-box;
}
a {
color: #000;
text-decoration: unde... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/TestFileUploadZone.tsx | import { Stack, createStyles, Text, useMantineTheme } from "@mantine/core";
import { Dropzone, MIME_TYPES } from "@mantine/dropzone";
import { notifications } from "@mantine/notifications";
import { IconFile, IconUpload, IconX } from "@tabler/icons-react";
import Papa from "papaparse";
import { QAPair } from "../utils/... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/SummaryChart.tsx | import { ResponsiveScatterPlot } from "@nivo/scatterplot";
const SummaryChart = ({
chartData,
}: {
chartData: {
id: string;
data: {
x: number;
y: number;
}[];
}[];
}) => {
return (
<ResponsiveScatterPlot
data={chartData}
margin={{ top: 60, right: 140, bottom: 70, left: 9... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/PersonCard.tsx | import {
createStyles,
Card,
Avatar,
Text,
Group,
Button,
rem,
Stack,
} from "@mantine/core";
import Link from "next/link";
import githubIcon from "../public/github-mark.svg";
import twitterBlackIcon from "../public/twitter-black.svg";
import Image from "next/image";
const useStyles = createStyles((the... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/Sidebar.tsx | import { ScrollArea, Select, Slider, Stack, Text } from "@mantine/core";
import React from "react";
import { Form } from "../utils/types";
import { Controller, useForm } from "react-hook-form";
const Sidebar = ({ form }: { form: Form }) => {
const { control, setValue } = form;
return (
<>
<ScrollArea sc... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/HeaderEvaluator.tsx | import { Group, Header, Stack, Text } from "@mantine/core";
import Image from "next/image";
import Link from "next/link";
import React from "react";
import githubIcon from "../public/github-mark.svg";
import { useMediaQuery } from "@mantine/hooks";
export enum MenuItem {
Demo = "Demo",
Playground = "Playground",
... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/Demo.tsx | import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import {
Group,
Text,
useMantineTheme,
Alert,
Table,
Button,
Title,
Flex,
Stack,
Spoiler,
Progress,
Card,
} from "@mantine/core";
import { IconAlertCircle } from "@tabler/icons-react";
import { Experimen... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/Playground.tsx | import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import {
Group,
Text,
useMantineTheme,
Alert,
Table,
Button,
Title,
Flex,
Stack,
Spoiler,
Progress,
Card,
ScrollArea,
createStyles,
} from "@mantine/core";
import { IconUpload, IconX, IconAlertCircle... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/components/ExperimentSummaryTable.tsx | import { ScrollArea, Table } from "@mantine/core";
import { Experiment } from "../utils/types";
const ExperimentSummaryTable = ({
experiments,
}: {
experiments: Experiment[];
}) => {
return (
<ScrollArea scrollbarSize={0}>
<Table withBorder withColumnBorders striped highlightOnHover>
<thead>
... | 0 |
public_repos/auto-evaluator/nextjs/components | public_repos/auto-evaluator/nextjs/components/tables/ExperimentResultTable.tsx | import { ScrollArea, Spoiler, Table, Text } from "@mantine/core";
import { Result } from "../../utils/types";
import renderPassFail from "../../utils/renderPassFail";
const ExperimentResultsTable = ({
results,
isFastGradingPrompt,
}: {
results: any[];
isFastGradingPrompt: boolean;
}) => {
return (
<Scrol... | 0 |
public_repos/auto-evaluator/nextjs/components | public_repos/auto-evaluator/nextjs/components/tables/FilesTable.tsx | import { Table } from "@mantine/core";
const FilesTable = ({ files }: { files: any[] }) => {
return (
<Table>
<thead>
<tr>
<th>File Name</th>
<th>Size (MB)</th>
</tr>
</thead>
<tbody>
{files?.map((file, id) => (
<tr key={id}>
<td... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/pages/index.tsx | import { AppShell, Navbar } from "@mantine/core";
import React, { useEffect } from "react";
import { useForm } from "react-hook-form";
import HeaderEvaluator, { MenuItem } from "../components/HeaderEvaluator";
import Sidebar from "../components/Sidebar";
import { FormValues } from "../utils/types";
import Demo from "..... | 0 |
public_repos/auto-evaluator/nextjs | public_repos/auto-evaluator/nextjs/pages/_app.tsx | import { AppProps } from "next/app";
import Head from "next/head";
import { MantineProvider, MantineThemeOverride } from "@mantine/core";
import React from "react";
import { IS_DEV } from "../utils/variables";
import * as snippet from "@segment/snippet";
import { useEffect } from "react";
import { Notifications } from ... | 0 |
public_repos/auto-evaluator/nextjs/pages | public_repos/auto-evaluator/nextjs/pages/about/index.tsx | import React from "react";
import HeaderEvaluator, { MenuItem } from "../../components/HeaderEvaluator";
import { UserCardImage } from "../../components/PersonCard";
import { Center, Group } from "@mantine/core";
const AboutPage = () => {
return (
<>
<HeaderEvaluator activeTab={MenuItem.About} />
<Ce... | 0 |
public_repos/auto-evaluator/nextjs/pages | public_repos/auto-evaluator/nextjs/pages/playground/index.tsx | import { AppShell, Navbar } from "@mantine/core";
import React from "react";
import { useForm } from "react-hook-form";
import HeaderEvaluator, { MenuItem } from "../../components/HeaderEvaluator";
import Sidebar from "../../components/Sidebar";
import { FormValues } from "../../utils/types";
import Playground from "..... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/.env | ENVIRONMENT=development | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/text_utils.py | import re
from langchain.prompts import PromptTemplate
def clean_pdf_text(text: str) -> str:
"""Cleans text extracted from a PDF file."""
# TODO: Remove References/Bibliography section.
return remove_citations(text)
def remove_citations(text: str) -> str:
"""Removes in-text citations from a string.""... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/logging.conf | [loggers]
keys=root,uicheckapp
[handlers]
keys=consoleHandler
[formatters]
keys=normalFormatter
[logger_root]
level=INFO
handlers=consoleHandler
[logger_uicheckapp]
level=DEBUG
handlers=consoleHandler
qualname=uicheckapp
propagate=0
[formatter_normalFormatter]
format=%(asctime)s loglevel=%(levelname)-6s logger=%(n... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/requirements.txt | pandas==1.4.3
fastapi==0.85.2
langchain==0.0.181
python-multipart==0.0.6
uvicorn==0.18.3
openai==0.27.0
tiktoken==0.3.1
faiss-cpu==1.7.3
huggingface-hub==0.12.0
anthropic==0.2.8
pypdf==3.7.1
filetype==1.2.0
tokenizers==0.13.3
sentence-transformers==2.2.2
scikit-learn==1.2.1
llama-index==0.4.35.post1
sse_starlette==1.3.... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/Test_Inference.ipynb | import glob, os
from langchain.llms import LlamaCpp
from langchain.llms import Replicate
from langchain.chains import RetrievalQA
from langchain.vectorstores import FAISS
from langchain import PromptTemplate, LLMChain
from langchain.callbacks.base import BaseCallbackManager
from langchain.embeddings.openai import OpenA... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/railway.json | {
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"startCommand": "uvicorn evaluator_app:app --host 0.0.0.0 --port $PORT",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
} | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/README.md | # `auto-evaluator-api`
This API includes much of the functionality of the [auto-evaluator Streamlit app](https://github.com/PineappleExpress808/auto-evaluator).
And it is the back-end for [the hosted app](https://autoevaluator.langchain.com/).
### `Test locally` -
Set API keys:
```
export OPENAI_API_KEY=
export A... | 0 |
public_repos/auto-evaluator | public_repos/auto-evaluator/api/evaluator_app.py | """
This is an API to support the LLM QA chain auto-evaluator.
"""
import io
import os
from dotenv import load_dotenv
import sentry_sdk
import json
import time
import pypdf
import random
import logging
import itertools
import faiss
import pandas as pd
from typing import Dict, List
from json import JSONDecodeError
fro... | 0 |
public_repos/auto-evaluator/api/docs | public_repos/auto-evaluator/api/docs/transformers-challenge/transformers-eval.csv | "question","answer",
"What are the limitations of task-specific fine-tuning?", "First, the need for a large dataset of labeled examples for every new task limits the applicability of language models. Second, high capacity models tend to over-fit on narrow fine-tuning datasets and do not generalize well outside of them.... | 0 |
public_repos/auto-evaluator/api/docs | public_repos/auto-evaluator/api/docs/gpt3/gpt3-eval.csv | "question","answer",
"What are the limitations of task-specific fine-tuning?", "First, the need for a large dataset of labeled examples for every new task limits the applicability of language models. Second, high capacity models tend to over-fit on narrow fine-tuning datasets and do not generalize well outside of them.... | 0 |
public_repos/auto-evaluator/api/docs | public_repos/auto-evaluator/api/docs/karpathy-lex-pod/karpathy-pod.txt | some kind of a crazy quantum mechanical system that somehow gives you buffer overflow, somehow
gives you a rounding error in the floating point.
Synthetic intelligences are kind of like the next stage of development.
And I don't know where it leads to.
Like at some point, I suspect the universe is some kind of a puzzle... | 0 |
public_repos/auto-evaluator/api/docs | public_repos/auto-evaluator/api/docs/karpathy-lex-pod/karpathy-pod-eval.csv | "question","answer",
"Why is the transformer architecture expressive in the forward pass?","The transformer architecture is expressive because it uses a general message passing scheme where nodes get to look at each other, decide what's interesting and then update each other.",
"What design criteria does the Transforme... | 0 |
public_repos | public_repos/numpy-user-dtypes/.clang-format | # A clang-format style that approximates Python's PEP 7
# Useful for IDE integration
#
# Based on Paul Ganssle's version at
# https://gist.github.com/pganssle/0e3a5f828b4d07d79447f6ced8e7e4db
# and modified for NumPy
BasedOnStyle: Google
AlignAfterOpenBracket: Align
AllowShortEnumsOnASingleLine: false
AllowShortIfState... | 0 |
public_repos | public_repos/numpy-user-dtypes/.pre-commit-config.yaml | repos:
- repo: local
hooks:
- id: generate-compilation-database-metadatadtype
name: Generate compilation database [metadatadtype]
files: metadatadtype/(meson\.build$|.*\.(c|h)$)
language: system
require_serial: true
entry: |
bash -c 'cd metadatadtype && mkdi... | 0 |
public_repos | public_repos/numpy-user-dtypes/README.md | # numpy-user-dtypes
Repository for development of dtypes making use of the [NEP
42](https://numpy.org/neps/nep-0042-new-dtypes.html) extensible dtype API. See
the readme files in each example dtype for build instructions.
These dtypes are not meant for real-world use yet. The dtype API is not
finalized and the dtypes... | 0 |
public_repos | public_repos/numpy-user-dtypes/LICENSE | Copyright (c) 2022, NumPy Developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the ... | 0 |
public_repos/numpy-user-dtypes | public_repos/numpy-user-dtypes/mpfdtype/meson.build | project(
'mpfdtype',
'c',
'cpp',
)
py_mod = import('python')
py = py_mod.find_installation()
c = meson.get_compiler('c')
mpfr = c.find_library('mpfr')
incdir_numpy = run_command(py,
[
'-c',
'import numpy; print(numpy.get_include())'
],
check: true
).stdout().strip()
includes = include_directorie... | 0 |
public_repos/numpy-user-dtypes | public_repos/numpy-user-dtypes/mpfdtype/pyproject.toml | [build-system]
requires = [
"meson>=0.63.0",
"meson-python",
"patchelf",
"wheel",
"numpy",
]
build-backend = "mesonpy"
[project]
name = "mpfdtype"
description = "A dtype backing MPFR multi-precision floats"
version = "0.0.1"
readme = 'README.md'
author = "Sebastian Berg and NumPy Developers"
requir... | 0 |
public_repos/numpy-user-dtypes | public_repos/numpy-user-dtypes/mpfdtype/README.md | # A multi precision DType for NumPy
A DType and scalar which uses [MPFR](https://www.mpfr.org/) for multi precision floating point math. MPFR itself has an LGPL license.
A very basic example::
import numpy as np
from mpfdtype import MPFDType, MPFloat
# create an array with 200 bits precision:
arr ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.