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 | public_repos/langchain-nextjs-template/.eslintrc.json | {
"extends": "next/core-web-vitals"
}
| 0 |
public_repos | public_repos/langchain-nextjs-template/.prettierrc.json | {}
| 0 |
public_repos | public_repos/langchain-nextjs-template/tsconfig.json | {
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"re... | 0 |
public_repos | public_repos/langchain-nextjs-template/postcss.config.js | module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
| 0 |
public_repos | public_repos/langchain-nextjs-template/.env.example | OPENAI_API_KEY="YOUR_API_KEY"
# Required for agent example
# SERPAPI_API_KEY="YOUR_API_KEY"
# Required for retrieval examples
# SUPABASE_PRIVATE_KEY="YOUR_SUPABASE_PRIVATE_KEY"
# SUPABASE_URL="YOUR_SUPABASE_URL"
# Optional: For Tracing with LangSmith
# LANGCHAIN_TRACING_V2=true
# LANGCHAIN_API_KEY=YOUR_API_KEY
# LAN... | 0 |
public_repos | public_repos/langchain-nextjs-template/next.config.js | const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withBundleAnalyzer({}) | 0 |
public_repos | public_repos/langchain-nextjs-template/README.md | # π¦οΈπ LangChain + Next.js Starter Template
[](https://codespaces.new/langchain-ai/langchain-nextjs-template)
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flangchain-ai%2Fla... | 0 |
public_repos | public_repos/langchain-nextjs-template/LICENSE | MIT License
Copyright (c) 2023 LangChain
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, distrib... | 0 |
public_repos | public_repos/langchain-nextjs-template/package.json | {
"name": "langchain-nextjs-template",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write \"app\""
},
"engines": {
"node": ">=18"
},
"dependencies": {
"@next/bundl... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/app/layout.tsx | import "./globals.css";
import { Public_Sans } from "next/font/google";
import { Navbar } from "@/components/Navbar";
const publicSans = Public_Sans({ subsets: ["latin"] });
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
<t... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/app/page.tsx | import { ChatWindow } from "@/components/ChatWindow";
export default function Home() {
const InfoCard = (
<div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden">
<h1 className="text-3xl md:text-4xl mb-4">
β² Next.js + LangChain.js π¦π
</h1>
<ul>
<li ... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/app/globals.css | @tailwind base;
@tailwind components;
@tailwind utilities;
body {
color: #f8f8f8;
background: #131318;
}
body input,
body textarea {
color: black;
}
a {
color: #2d7bd4;
}
a:hover {
border-bottom: 1px solid;
}
p {
margin: 8px 0;
}
code {
color: #ffa500;
}
li {
padding: 4px;
}
| 0 |
public_repos/langchain-nextjs-template/app | public_repos/langchain-nextjs-template/app/retrieval_agents/page.tsx | import { ChatWindow } from "@/components/ChatWindow";
export default function AgentsPage() {
const InfoCard = (
<div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden">
<h1 className="text-3xl md:text-4xl mb-4">
β² Next.js + LangChain.js Retrieval Agent π¦π
</h1>
... | 0 |
public_repos/langchain-nextjs-template/app | public_repos/langchain-nextjs-template/app/structured_output/page.tsx | import { ChatWindow } from "@/components/ChatWindow";
export default function AgentsPage() {
const InfoCard = (
<div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden">
<h1 className="text-3xl md:text-4xl mb-4">
β² Next.js + LangChain.js Structured Output π¦π
</h1>... | 0 |
public_repos/langchain-nextjs-template/app | public_repos/langchain-nextjs-template/app/agents/page.tsx | import { ChatWindow } from "@/components/ChatWindow";
export default function AgentsPage() {
const InfoCard = (
<div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden">
<h1 className="text-3xl md:text-4xl mb-4">
β² Next.js + LangChain.js Agents π¦π
</h1>
<ul>... | 0 |
public_repos/langchain-nextjs-template/app/api | public_repos/langchain-nextjs-template/app/api/chat/route.ts | import { NextRequest, NextResponse } from "next/server";
import { Message as VercelChatMessage, StreamingTextResponse } from "ai";
import { ChatOpenAI } from "langchain/chat_models/openai";
import { BytesOutputParser } from "langchain/schema/output_parser";
import { PromptTemplate } from "langchain/prompts";
export c... | 0 |
public_repos/langchain-nextjs-template/app/api/chat | public_repos/langchain-nextjs-template/app/api/chat/retrieval_agents/route.ts | import { NextRequest, NextResponse } from "next/server";
import { Message as VercelChatMessage, StreamingTextResponse } from "ai";
import { createClient } from "@supabase/supabase-js";
import { ChatOpenAI } from "langchain/chat_models/openai";
import { SupabaseVectorStore } from "langchain/vectorstores/supabase";
imp... | 0 |
public_repos/langchain-nextjs-template/app/api/chat | public_repos/langchain-nextjs-template/app/api/chat/structured_output/route.ts | import { NextRequest, NextResponse } from "next/server";
import { z } from "zod";
import { zodToJsonSchema } from "zod-to-json-schema";
import { ChatOpenAI } from "langchain/chat_models/openai";
import { PromptTemplate } from "langchain/prompts";
import { JsonOutputFunctionsParser } from "langchain/output_parsers";
... | 0 |
public_repos/langchain-nextjs-template/app/api/chat | public_repos/langchain-nextjs-template/app/api/chat/agents/route.ts | import { NextRequest, NextResponse } from "next/server";
import { Message as VercelChatMessage, StreamingTextResponse } from "ai";
import { initializeAgentExecutorWithOptions } from "langchain/agents";
import { ChatOpenAI } from "langchain/chat_models/openai";
import { SerpAPI } from "langchain/tools";
import { Calcul... | 0 |
public_repos/langchain-nextjs-template/app/api/chat | public_repos/langchain-nextjs-template/app/api/chat/retrieval/route.ts | import { NextRequest, NextResponse } from "next/server";
import { Message as VercelChatMessage, StreamingTextResponse } from "ai";
import { createClient } from "@supabase/supabase-js";
import { ChatOpenAI } from "langchain/chat_models/openai";
import { PromptTemplate } from "langchain/prompts";
import { SupabaseVecto... | 0 |
public_repos/langchain-nextjs-template/app/api/retrieval | public_repos/langchain-nextjs-template/app/api/retrieval/ingest/route.ts | import { NextRequest, NextResponse } from "next/server";
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
import { createClient } from "@supabase/supabase-js";
import { SupabaseVectorStore } from "langchain/vectorstores/supabase";
import { OpenAIEmbeddings } from "langchain/embeddings/openai";... | 0 |
public_repos/langchain-nextjs-template/app | public_repos/langchain-nextjs-template/app/retrieval/page.tsx | import { ChatWindow } from "@/components/ChatWindow";
export default function AgentsPage() {
const InfoCard = (
<div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden">
<h1 className="text-3xl md:text-4xl mb-4">
β² Next.js + LangChain.js Retrieval Chain π¦π
</h1>
... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/data/DefaultRetrievalText.ts | export default `# QA and Chat over Documents
Chat and Question-Answering (QA) over \`data\` are popular LLM use-cases.
\`data\` can include many things, including:
* \`Unstructured data\` (e.g., PDFs)
* \`Structured data\` (e.g., SQL)
* \`Code\` (e.g., Python)
Below we will review Chat and QA on \`Unstructured data... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/components/UploadDocumentsForm.tsx | "use client";
import { useState, type FormEvent } from "react";
import DEFAULT_RETRIEVAL_TEXT from "@/data/DefaultRetrievalText";
export function UploadDocumentsForm() {
const [isLoading, setIsLoading] = useState(false);
const [document, setDocument] = useState(DEFAULT_RETRIEVAL_TEXT);
const ingest = async (e: ... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/components/ChatMessageBubble.tsx | import type { Message } from "ai/react";
export function ChatMessageBubble(props: { message: Message, aiEmoji?: string, sources: any[] }) {
const colorClassName =
props.message.role === "user" ? "bg-sky-600" : "bg-slate-50 text-black";
const alignmentClassName =
props.message.role === "user" ? "ml-auto" : ... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/components/Navbar.tsx | "use client";
import { usePathname } from 'next/navigation';
export function Navbar() {
const pathname = usePathname();
return (
<nav className="mb-4">
<a className={`mr-4 ${pathname === "/" ? "text-white border-b" : ""}`} href="/">π΄ββ οΈ Chat</a>
<a className={`mr-4 ${pathname === "/structured_out... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/components/IntermediateStep.tsx | import { useState } from "react";
import type { Message } from "ai/react";
import type { AgentStep } from "langchain/schema";
export function IntermediateStep(props: { message: Message }) {
const parsedInput: AgentStep = JSON.parse(props.message.content);
const action = parsedInput.action;
const observation = pa... | 0 |
public_repos/langchain-nextjs-template | public_repos/langchain-nextjs-template/components/ChatWindow.tsx | "use client";
import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import { useChat } from "ai/react";
import { useRef, useState, ReactElement } from "react";
import type { FormEvent } from "react";
import type { AgentStep } from "langchain/schema";
import { ChatMes... | 0 |
public_repos | public_repos/pandas-msgpack/MANIFEST.in | include MANIFEST.in
include README.rst
include LICENSE.md
include setup.py
graft pandas_msgpack
global-exclude *.so
global-exclude *.pyd
global-exclude *.pyc
global-exclude *~
global-exclude \#*
global-exclude .git*
global-exclude .DS_Store
global-exclude *.png
include versioneer.py
include pandas_msgpack/_version.p... | 0 |
public_repos | public_repos/pandas-msgpack/README.rst | pandas-msgpack
==============
THIS LIBRARY IS NO LONGER IN DEVELOPMENT OR MAINTAINED
------------------------------------------------------
|Travis Build Status| |Appveyor Build Status| |Version Status| |Coverage Status|
**pandas-msgpack** is a package providing an interface to msgpack from pandas
Installation
---... | 0 |
public_repos | public_repos/pandas-msgpack/setup.cfg |
# See the docstring in versioneer.py for instructions. Note that you must
# re-run 'versioneer.py setup' after changing this section, and commit the
# resulting files.
[versioneer]
VCS = git
style = pep440
versionfile_source = pandas_msgpack/_version.py
versionfile_build = pandas_msgpack/_version.py
tag_prefix =
pare... | 0 |
public_repos | public_repos/pandas-msgpack/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
import pkg_resources
from distutils.extension import Extension
from distutils.command.build_ext import build_ext as build_ext
NAME = 'pandas-msgpack'
def is_platform_windows():
return sys.platform == 'win32' or sys.platform == ... | 0 |
public_repos | public_repos/pandas-msgpack/.travis.yml | sudo: false
language: python
env:
- PYTHON=2.7 PANDAS=0.19.2
- PYTHON=3.4 PANDAS=0.19.2
- PYTHON=3.5 PANDAS=0.19.2 COVERAGE='true'
- PYTHON=3.6 PANDAS='master' LINT='true'
before_install:
- echo "before_install"
- export PATH="$HOME/miniconda3/bin:$PATH"
- df -h
- pwd
- uname -a
- git --version
... | 0 |
public_repos | public_repos/pandas-msgpack/test.sh | #!/bin/sh
pytest pandas_msgpack "$@"
| 0 |
public_repos | public_repos/pandas-msgpack/requirements.txt | pandas>=0.19.2
| 0 |
public_repos | public_repos/pandas-msgpack/appveyor.yml | # With infos from
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
# https://packaging.python.org/en/latest/appveyor/
# https://github.com/rmcgibbo/python-appveyor-conda-example
# Backslashes in quotes need to be escaped: \ -> "\\"
matrix:
fast_finish: true # ... | 0 |
public_repos | public_repos/pandas-msgpack/release-procedure.md | * Tag commit
git tag -a x.x.x -m 'Version x.x.x'
* and push to github
git push origin master --tags
* Upload to PyPI
git clean -xfd
python setup.py register sdist --formats=gztar
twine upload dist/*
* Do a pull-request to the feedstock on `pandas-msgpack-feedstock <ht... | 0 |
public_repos | public_repos/pandas-msgpack/test.bat | :: test on windows
pytest pandas_msgpack %*
| 0 |
public_repos | public_repos/pandas-msgpack/codecov.yml | coverage:
status:
project:
default:
target: '30'
patch:
default:
target: '50'
branches: null
| 0 |
public_repos | public_repos/pandas-msgpack/versioneer.py |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... | 0 |
public_repos | public_repos/pandas-msgpack/LICENSE.md | =======
License
=======
pandas-msgpack is distributed under a 3-clause ("Simplified" or "New") BSD
license. Parts of NumPy, SciPy, numpydoc, bottleneck, which all have
BSD-compatible licenses, are included. Their licenses follow the pandas
license.
pandas license
==============
Copyright (c) 2011-2012, Lambda Foundr... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/ci/requirements-2.7.pip | blosc
sqlalchemy
| 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/ci/requirements-3.6.pip | blosc
sqlalchemy
| 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/ci/install_travis.sh | #!/bin/bash
# install miniconda
MINICONDA_DIR="$HOME/miniconda3"
if [ -d "$MINICONDA_DIR" ]; then
rm -rf "$MINICONDA_DIR"
fi
# install miniconda
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1
else
wget http://... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/ci/run_with_env.cmd | :: EXPECTED ENV VARS: PYTHON_ARCH (either x86 or x64)
:: CONDA_PY (either 27, 33, 35 etc. - only major version is extracted)
::
::
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/ci/install.ps1 | # Sample script to install Miniconda under Windows
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner, Robert McGibbon
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
function DownloadMiniconda ($python_version, $platform... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/pandas_msgpack/packers.py | """
Msgpack serializer support for reading and writing pandas data structures
to disk
portions of msgpack_numpy package, by Lev Givon were incorporated
into this module (and tests_packers.py)
License
=======
Copyright (c) 2013, Lev Givon.
All rights reserved.
Redistribution and use in source and binary forms, with ... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/pandas_msgpack/move.c | #include <Python.h>
#define COMPILING_IN_PY2 (PY_VERSION_HEX <= 0x03000000)
#if !COMPILING_IN_PY2
/* alias this because it is not aliased in Python 3 */
#define PyString_CheckExact PyBytes_CheckExact
#define PyString_AS_STRING PyBytes_AS_STRING
#define PyString_GET_SIZE PyBytes_GET_SIZE
/* in python 3, we cannot int... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/pandas_msgpack/_version.py |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/pandas_msgpack/__init__.py | # flake8: noqa
# pandas versioning
import pandas
from distutils.version import LooseVersion
pv = LooseVersion(pandas.__version__)
if pv < '0.19.0':
raise ValueError("pandas_msgpack requires at least pandas 0.19.0")
_is_pandas_legacy_version = pv.version[1] == 19 and len(pv.version) == 3
from .packers import to_... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/includes/unpack_define.h | /*
* MessagePack unpacking routine template
*
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/l... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/includes/sysdep.h | /*
* MessagePack system dependencies
*
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/includes/unpack.h | /*
* MessagePack for Python unpacking routine
*
* Copyright (C) 2009 Naoki INADA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LI... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/includes/pack_template.h | /*
* MessagePack packing routine template
*
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lic... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/includes/unpack_template.h | /*
* MessagePack unpacking routine template
*
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/l... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/includes/pack.h | /*
* MessagePack for Python packing routine
*
* Copyright (C) 2009 Naoki INADA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICE... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/tests/test_packers.py | import pytest
import os
import datetime
import numpy as np
import sys
from distutils.version import LooseVersion
from pandas_msgpack import _is_pandas_legacy_version
from pandas_msgpack import to_msgpack, read_msgpack
from pandas import compat
from pandas.compat import u, PY3
from pandas import (Series, DataFrame, P... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/_packer.pyx | # coding: utf-8
#cython: embedsignature=True
from cpython cimport *
from libc.stdlib cimport *
from libc.string cimport *
from libc.limits cimport *
from .exceptions import PackValueError
from . import ExtType
cdef extern from "../includes/pack.h":
struct msgpack_packer:
char* buf
size_t length
... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/_unpacker.pyx | # coding: utf-8
#cython: embedsignature=True
from cpython cimport *
cdef extern from "Python.h":
ctypedef struct PyObject
cdef int PyObject_AsReadBuffer(object o, const void** buff,
Py_ssize_t* buf_len) except -1
from libc.stdlib cimport *
from libc.string cimport *
from lib... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/exceptions.py | class UnpackException(Exception):
pass
class BufferFull(UnpackException):
pass
class OutOfData(UnpackException):
pass
class UnpackValueError(UnpackException, ValueError):
pass
class ExtraData(ValueError):
def __init__(self, unpacked, extra):
self.unpacked = unpacked
self.ext... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/_version.py | version = (0, 4, 6)
| 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/_packer.cpp | /* Generated by Cython 0.25.2 */
/* BEGIN: Cython Metadata
{
"distutils": {
"define_macros": [
[
"__LITTLE_ENDIAN__",
"1"
]
],
"depends": [
"pandas_msgpack/includes/pack.h",
"pandas_msgpack/includes/pack_temp... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/__init__.py | # coding: utf-8
from collections import namedtuple
from pandas_msgpack.msgpack.exceptions import * # noqa
from pandas_msgpack.msgpack._version import version # noqa
class ExtType(namedtuple('ExtType', 'code data')):
"""ExtType represents ext type in msgpack."""
def __new__(cls, code, data):
if not... | 0 |
public_repos/pandas-msgpack/pandas_msgpack | public_repos/pandas-msgpack/pandas_msgpack/msgpack/_unpacker.cpp | /* Generated by Cython 0.25.2 */
/* BEGIN: Cython Metadata
{
"distutils": {
"define_macros": [
[
"__LITTLE_ENDIAN__",
"1"
]
],
"depends": [
"pandas_msgpack/includes/unpack.h",
"pandas_msgpack/includes/unpack_... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/docs/README.rst | To build a local copy of the pandas-msgpack docs, install the programs in
requirements-docs.txt and run 'make html'. If you use the conda package manager
these commands suffice::
git clone git@github.com:pydata/pandas-msgpack.git
cd dask/docs
conda create -n pandas-msgpack-docs --file requirements-docs.txt
sou... | 0 |
public_repos/pandas-msgpack | public_repos/pandas-msgpack/docs/requirements-docs.txt | matplotlib
ipython
numpydoc
sphinx
sphinx_rtd_theme
pandas
blosc
cython
| 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/api.rst | .. currentmodule:: pandas_msgpack
.. _api:
*************
API Reference
*************
.. autosummary::
read_msgpack
to_msgpack
.. autofunction:: read_msgpack
.. autofunction:: to_msgpack
| 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/Makefile | # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/do... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/install.rst | Installation
============
You can install pandas-msgpack with ``conda``, ``pip``, or by installing from source.
Conda
-----
.. code-block:: shell
$ conda install pandas-msgpack --channel conda-forge
This installs pandas-msgpack and all common dependencies, including ``pandas``.
Pip
---
To install the latest v... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/changelog.rst | Changelog
=========
0.1.4 / 2017-03-30
------------------
Initial release of transfered code from `pandas <https://github.com/pandas-dev/pandas>`__
Includes patches since the 0.19.2 release on pandas with the following:
- Bug in ``read_msgpack()`` in which ``Series`` categoricals were being improperly processed, se... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/index.rst | .. pandas-msgpack documentation master file, created by
sphinx-quickstart on Wed Feb 8 10:52:12 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pandas-msgpack's documentation!
==========================================
The :mod... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/compression.rst | .. _compression:
.. ipython:: python
:suppress:
import pandas as pd
import os
Compression
-----------
Optionally, a ``compression`` argument will compress the resulting bytes.
These can take a bit more time to write. The available compressors are
``zlib`` and `blosc <https://pypi.python.org/pypi/blosc>`__.... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/read_write.rst | .. _read_write:
.. ipython:: python
:suppress:
import pandas as pd
Read/Write API
--------------
Msgpacks can also be read from and written to strings.
.. ipython:: python
import pandas as pd
from pandas_msgpack import to_msgpack, read_msgpack
df = pd.DataFrame({'A': np.arange(10),
... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/tutorial.rst | .. _tutorial:
.. ipython:: python
:suppress:
import pandas as pd
import os
Tutorial
--------
.. ipython:: python
import pandas as pd
from pandas_msgpack import to_msgpack, read_msgpack
.. ipython:: python
df = pd.DataFrame(np.random.rand(5,2), columns=list('AB'))
to_msgpack('foo.msg', df)
... | 0 |
public_repos/pandas-msgpack/docs | public_repos/pandas-msgpack/docs/source/conf.py | # -*- coding: utf-8 -*-
#
# pandas-msgpack documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 8 10:52:12 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | 0 |
public_repos/pandas-msgpack/docs/source | public_repos/pandas-msgpack/docs/source/_templates/layout.html | {% extends "!layout.html" %}
{% set css_files = css_files + ["_static/style.css"] %}
| 0 |
public_repos/pandas-msgpack/docs/source | public_repos/pandas-msgpack/docs/source/_static/style.css | @import url("theme.css");
a.internal em {font-style: normal}
| 0 |
public_repos | public_repos/numpy-tutorials/environment.yml | name: numpy-tutorials
channels:
- conda-forge
dependencies:
# For running the tutorials
- numpy
- scipy
- matplotlib
- pandas
- statsmodels
- imageio
# For building the site
- sphinx
- myst-nb
- sphinx-book-theme
- sphinx-copybutton
| 0 |
public_repos | public_repos/numpy-tutorials/runtime.txt | python-3.10
| 0 |
public_repos | public_repos/numpy-tutorials/ignore_testing | content/tutorial-deep-reinforcement-learning-with-pong-from-pixels.md
content/pairing.md
content/tutorial-style-guide.md
content/tutorial-nlp-from-scratch.md
| 0 |
public_repos | public_repos/numpy-tutorials/LICENSE.txt | Copyright (c) 2005-2023, 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... | 0 |
public_repos | public_repos/numpy-tutorials/requirements.txt | # For the tutorials
numpy
scipy
matplotlib
pandas
statsmodels
imageio
# For supporting .md-based notebooks
jupytext
| 0 |
public_repos | public_repos/numpy-tutorials/test_requirements.txt | pytest
nbval
| 0 |
public_repos | public_repos/numpy-tutorials/README.md | # NumPy tutorials
_For the rendered tutorials, see https://numpy.org/numpy-tutorials/._
The goal of this repository is to provide high-quality resources by the
NumPy project, both for self-learning and for teaching classes with. If you're
interested in adding your own content, check the [Contributing](#contributing)
... | 0 |
public_repos | public_repos/numpy-tutorials/tox.ini | [tox]
envlist =
py{39,310,311}-test{,-oldestdeps,-devdeps,-predeps}{,-buildhtml}
requires =
pip >= 19.3.1
[testenv]
description = run tests
deps =
# We use these files to specify all the dependencies, and below we override
# versions for specific testing schenarios
-rtest_requirements.txt
-rs... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/make.bat | @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/contributing.md | # Contributing
We very much welcome contributions! If you have an idea or proposal for a new
tutorial, please [open an issue](https://github.com/numpy/numpy-tutorials/issues)
with an outline.
Donβt worry if English is not your first language, or if you can only come up
with a rough draft. Open source is a community e... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/index.md | # NumPy tutorials
[][launch_binder]
[launch_binder]: https://mybinder.org/v2/gh/numpy/numpy-tutorials/main?urlpath=lab/tree/content
This set of tutorials and educational materials is being developed in the
[numpy-tutorials](https://github.com/numpy/numpy-tutorials) repos... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/applications.md | # NumPy Applications
A collection of highlighting the use of NumPy for applications in science,
engineering, and data analysis.
```{toctree}
---
maxdepth: 1
---
content/mooreslaw-tutorial
content/tutorial-deep-learning-on-mnist
content/tutorial-x-ray-image-processing
content/tutorial-static_equilibrium
content/tutor... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/requirements.txt | sphinx
myst-nb
sphinx-book-theme
sphinx-copybutton
| 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/Makefile | # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SP... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/articles.md | # Articles
```{admonition} Help improve the tutorials!
Want to make a valuable contribution to the tutorials? Consider working on
these articles so that they become fully executable/reproducible!
```
```{toctree}
content/tutorial-deep-reinforcement-learning-with-pong-from-pixels
content/tutorial-nlp-from-scratch
``... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/conf.py | # Configuration file for the Sphinx documentation builder.
#
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root,... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/site/features.md | # NumPy Features
A collection of notebooks pertaining to built-in NumPy functionality.
```{toctree}
---
maxdepth: 1
---
content/tutorial-svd
content/save-load-arrays
content/tutorial-ma
```
| 0 |
public_repos/numpy-tutorials/site | public_repos/numpy-tutorials/site/_templates/layout.html | {% extends "!layout.html" %}
{% block extrahead %}
<meta name="robots" content="noindex" />
{{ super() }}
{% endblock %}
| 0 |
public_repos/numpy-tutorials/site | public_repos/numpy-tutorials/site/_static/numpylogo.svg | <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!--Generator: Xara Designer (www.xara.com), SVG filter version: 6.4.0.3-->
<svg fill="none" fill-rule="evenodd" stroke="black" stroke-width="0.501" stroke-linejoin="bevel" stroke-mit... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/.circleci/config.yml | # See: https://circleci.com/docs/2.0/language-python/
version: 2
jobs:
build-docs:
working_directory: ~/repo
docker:
- image: cimg/python:3.10
steps:
- checkout
- run:
name: Install Python dependencies
command: |
python3 -m venv venv
source... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/tutorial-static_equilibrium.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 Static Equilibrium in NumPy
When analyzing physical structures, it is crucial to understand the ... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/save-load-arrays.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
---
# Saving and sharing your NumPy arrays
## What you'll learn
You'll save your NumPy arrays as zipped files and... | 0 |
public_repos/numpy-tutorials | public_repos/numpy-tutorials/content/x_y-squared.csv | # x, y
0.000000000000000000e+00,0.000000000000000000e+00
1.000000000000000000e+00,1.000000000000000000e+00
2.000000000000000000e+00,4.000000000000000000e+00
3.000000000000000000e+00,9.000000000000000000e+00
4.000000000000000000e+00,1.600000000000000000e+01
5.000000000000000000e+00,2.500000000000000000e+01
6.00000000000... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.