text
stringlengths
426
66.5k
source
stringlengths
39
90
.. -*- mode: rst -*- |Azure| |Codecov| |CircleCI| |Nightly wheels| |Ruff| |PythonVersion| |PyPi| |DOI| |Benchmark| .. |Azure| image:: https://dev.azure.com/scikit-learn/scikit-learn/_apis/build/status/scikit-learn.scikit-learn?branchName=main :target: https://dev.azure.com/scikit-learn/scikit-learn/_build/latest?d...
https://github.com/scikit-learn/scikit-learn README.md
<div align="center"> <img src="https://www.tensorflow.org/images/tf_logo_horizontal.png"> </div> [![Python](https://img.shields.io/pypi/pyversions/tensorflow.svg)](https://badge.fury.io/py/tensorflow) [![PyPI](https://badge.fury.io/py/tensorflow.svg)](https://badge.fury.io/py/tensorflow) [![DOI](https://zenodo.org/b...
https://github.com/tensorflow/tensorflow README.md
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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/LICENSE-2.0 # # Unless required by applica...
https://github.com/tensorflow/tensorflow configure.py
![PyTorch Logo](https://github.com/pytorch/pytorch/raw/main/docs/source/_static/img/pytorch-logo-dark.png) -------------------------------------------------------------------------------- PyTorch is a Python package that provides two high-level features: - Tensor computation (like NumPy) with strong GPU acceleration ...
https://github.com/pytorch/pytorch README.md
# Welcome to the PyTorch setup.py. # Environment variables you are probably interested in: # # DEBUG # build with -O0 and -g (debug symbols) # # REL_WITH_DEB_INFO # build with optimizations and -g (debug symbols) # # USE_CUSTOM_DEBINFO="path/to/file1.cpp;path/to/file2.cpp" # build with debug info only...
https://github.com/pytorch/pytorch setup.py
<!--- Copyright 2020 The HuggingFace Team. All rights reserved. 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/LICENSE-2.0 Unless required by applicable law or ...
https://github.com/huggingface/transformers README.md
# Copyright 2020 The HuggingFace Team. All rights reserved. # # 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/LICENSE-2.0 # # Unless required by applicabl...
https://github.com/huggingface/transformers conftest.py
# Copyright 2024 The HuggingFace Team. All rights reserved. # # 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/LICENSE-2.0 # # Unless required by applicabl...
https://github.com/huggingface/transformers examples/3D_parallel.py
#!/usr/bin/env python # Copyright 2021 The HuggingFace Inc. team. All rights reserved. # # 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/LICENSE-2.0 # # U...
https://github.com/huggingface/transformers examples/run_on_remote.py
# Copyright 2021 The HuggingFace Team. All rights reserved. # # 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/LICENSE-2.0 # # Unless required by applicabl...
https://github.com/huggingface/transformers setup.py
<p align="center"> <img height="150" src="https://raw.githubusercontent.com/pyg-team/pyg_sphinx_theme/master/pyg_sphinx_theme/static/img/pyg_logo_text.svg?sanitize=true" /> </p> ______________________________________________________________________ [![PyPI Version][pypi-image]][pypi-url] [![Testing Status][testing-...
https://github.com/pyg-team/pytorch_geometric README.md
import os.path as osp import torch import torch.nn.functional as F import torch_geometric.transforms as T from torch_geometric.datasets import Planetoid from torch_geometric.nn import AGNNConv dataset = 'Cora' path = osp.join(osp.dirname(osp.realpath(__file__)), '..', 'data', dataset) dataset = Planetoid(path, datas...
https://github.com/pyg-team/pytorch_geometric examples/agnn.py
import argparse import os.path as osp import torch import torch.nn.functional as F import torch_geometric.transforms as T from torch_geometric.datasets import Planetoid from torch_geometric.nn import GCNConv from torch_geometric.utils import negative_sampling, train_test_split_edges class GCNEncoder(torch.nn.Module...
https://github.com/pyg-team/pytorch_geometric examples/ar_link_pred.py
import os.path as osp import matplotlib.pyplot as plt import torch from sklearn.cluster import KMeans from sklearn.manifold import TSNE from sklearn.metrics.cluster import ( completeness_score, homogeneity_score, v_measure_score, ) from torch.nn import Linear import torch_geometric.transforms as T from to...
https://github.com/pyg-team/pytorch_geometric examples/argva_node_clustering.py
import os.path as osp import torch import torch.nn.functional as F import torch_geometric.transforms as T from torch_geometric.datasets import Planetoid from torch_geometric.nn import ARMAConv dataset = 'Cora' path = osp.join(osp.dirname(osp.realpath(__file__)), '..', 'data', dataset) dataset = Planetoid(path, datas...
https://github.com/pyg-team/pytorch_geometric examples/arma.py
import os.path as osp from math import sqrt import torch import torch.nn.functional as F from rdkit import Chem from torch_geometric.datasets import MoleculeNet from torch_geometric.loader import DataLoader from torch_geometric.nn.models import AttentiveFP class GenFeatures: def __init__(self): self.sym...
https://github.com/pyg-team/pytorch_geometric examples/attentive_fp.py
import argparse import os.path as osp import time import torch import torch_geometric.transforms as T from torch_geometric.datasets import Planetoid from torch_geometric.nn import GAE, VGAE, GCNConv parser = argparse.ArgumentParser() parser.add_argument('--variational', action='store_true') parser.add_argument('--li...
https://github.com/pyg-team/pytorch_geometric examples/autoencoder.py
import os.path as osp import time import torch import torch.nn.functional as F from sklearn.metrics import f1_score from torch_geometric.data import Batch from torch_geometric.datasets import PPI from torch_geometric.loader import ClusterData, ClusterLoader, DataLoader from torch_geometric.nn import BatchNorm, SAGECo...
https://github.com/pyg-team/pytorch_geometric examples/cluster_gcn_ppi.py
import time import torch import torch.nn.functional as F from torch.nn import ModuleList from tqdm import tqdm from torch_geometric.datasets import Reddit from torch_geometric.loader import ClusterData, ClusterLoader, NeighborLoader from torch_geometric.nn import SAGEConv dataset = Reddit('../data/Reddit') data = da...
https://github.com/pyg-team/pytorch_geometric examples/cluster_gcn_reddit.py
import copy import os.path as osp import torch import torch.nn.functional as F from torch.nn import Linear as Lin from torch.nn import ReLU from torch.nn import Sequential as Seq from torch_geometric.datasets import TUDataset from torch_geometric.loader import DataLoader from torch_geometric.nn import GINConv, TopKPo...
https://github.com/pyg-team/pytorch_geometric examples/colors_topk_pool.py
import os.path as osp import torch import torch.nn.functional as F import torch_geometric.transforms as T from torch_geometric.datasets import Planetoid from torch_geometric.nn import SplineConv from torch_geometric.typing import WITH_TORCH_SPLINE_CONV if not WITH_TORCH_SPLINE_CONV: quit("This example requires '...
https://github.com/pyg-team/pytorch_geometric examples/cora.py
<picture align="center"> <source media="(prefers-color-scheme: dark)" srcset="https://pandas.pydata.org/static/img/pandas_white.svg"> <img alt="Pandas Logo" src="https://pandas.pydata.org/static/img/pandas.svg"> </picture> ----------------- # pandas: powerful Python data analysis toolkit | | | | --- | --- | | Te...
https://github.com/pandas-dev/pandas README.md
import argparse import os from Cython import Tempita def process_tempita(pxifile, outfile) -> None: with open(pxifile, encoding="utf-8") as f: tmpl = f.read() pyxcontent = Tempita.sub(tmpl) with open(outfile, "w", encoding="utf-8") as f: f.write(pyxcontent) def main() -> None: pars...
https://github.com/pandas-dev/pandas generate_pxi.py
#!/usr/bin/env python3 # Note: This file has to live next to setup.py or versioneer will not work import argparse import os import sys import versioneer sys.path.insert(0, "") def write_version_info(path) -> None: version = None git_version = None try: import _version_meson version = ...
https://github.com/pandas-dev/pandas generate_version.py
#!/usr/bin/env python3 """ Parts of this file were taken from the pyzmq project (https://github.com/zeromq/pyzmq) which have been permitted for use under the BSD license. Parts are from lxml (https://github.com/lxml/lxml) """ import argparse import multiprocessing import os from os.path import join as pjoin import pl...
https://github.com/pandas-dev/pandas setup.py
.. image:: https://img.shields.io/pypi/v/biopython.svg?logo=pypi :alt: Biopython on the Python Package Index (PyPI) :target: https://pypi.python.org/pypi/biopython .. image:: https://img.shields.io/conda/vn/conda-forge/biopython.svg?logo=conda-forge :alt: Biopython on the Conda package conda-forge channel :...
https://github.com/biopython/biopython README.md
"""setuptools based setup script for Biopython. This uses setuptools which is now the standard python mechanism for installing packages. If you have downloaded and uncompressed the Biopython source code, or fetched it from git, for the simplest installation just type the command:: python setup.py install However...
https://github.com/biopython/biopython setup.py
.. image:: https://raw.githubusercontent.com/scipy/scipy/main/doc/source/_static/logo.svg :target: https://scipy.org :width: 110 :height: 110 :align: left .. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A :target: https://numfocus.org .. image::...
https://github.com/scipy/scipy README.md
# SymPy [![pypi version](https://img.shields.io/pypi/v/sympy.svg)](https://pypi.python.org/pypi/sympy) [![Join the chat at https://gitter.im/sympy/sympy](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sympy/sympy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Zenodo Badge](...
https://github.com/sympy/sympy README.md
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import os from itertools import chain import json import sys import warnings import pytest from sympy.testing.runtests import setup_pprint, _get_doctest_blacklist durations_path = os.path.join(os.path.dirname(__file__), '.ci', '...
https://github.com/sympy/sympy conftest.py
""" Python shell for SymPy. This is just a normal Python shell (IPython shell if you have the IPython package installed), that executes the following commands for the user: >>> from __future__ import division >>> from sympy import * >>> x, y, z, t = symbols('x y z t') >>> k, m, n = symbols('k m n', in...
https://github.com/sympy/sympy isympy.py
#!/usr/bin/env python """Setup script for SymPy. This uses Setuptools (https://setuptools.pypa.io/en/latest/) the standard python mechanism for installing packages. For the easiest installation just type the command (you'll probably need root privileges for that): pip install . This will install the library in t...
https://github.com/sympy/sympy setup.py
**Status:** Archive (code is provided as-is, no updates expected) # gpt-2 Code and models from the paper ["Language Models are Unsupervised Multitask Learners"](https://d4mucfpksywv.cloudfront.net/better-language-models/language-models.pdf). You can read about GPT-2 and its staged release in our [original blog post]...
https://github.com/openai/gpt-2 README.md
import os import sys import requests from tqdm import tqdm if len(sys.argv) != 2: print('You must enter the model name as a parameter, e.g.: download_model.py 124M') sys.exit(1) model = sys.argv[1] subdir = os.path.join('models', model) if not os.path.exists(subdir): os.makedirs(subdir) subdir = subdir.r...
https://github.com/openai/gpt-2 download_model.py
## **Note of deprecation** Thank you for developing with Llama models. As part of the Llama 3.1 release, we’ve consolidated GitHub repos and added some additional repos as we’ve expanded Llama’s functionality into being an e2e Llama Stack. Please use the following repos going forward: - [llama-models](https://github.c...
https://github.com/facebookresearch/llama README.md
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement. from typing import List, Optional import fire from llama import Llama, Dialog def main( ckpt_dir: str, tokenizer_path: str, temperature: fl...
https://github.com/facebookresearch/llama example_chat_completion.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement. import fire from llama import Llama from typing import List def main( ckpt_dir: str, tokenizer_path: str, temperature: float = 0.6, top_p...
https://github.com/facebookresearch/llama example_text_completion.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement. from setuptools import find_packages, setup def get_requirements(path: str): return [l.strip() for l in open(path)] setup( name="llama", ve...
https://github.com/facebookresearch/llama setup.py
# BERT **\*\*\*\*\* New March 11th, 2020: Smaller BERT Models \*\*\*\*\*** This is a release of 24 smaller BERT models (English only, uncased, trained with WordPiece masking) referenced in [Well-Read Students Learn Better: On the Importance of Pre-training Compact Models](https://arxiv.org/abs/1908.08962). We have s...
https://github.com/google-research/bert README.md
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert __init__.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert create_pretraining_data.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert extract_features.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert modeling.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert modeling_test.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert optimization.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert optimization_test.py
{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "Predicting Movie Reviews with BERT on TF Hub.ipynb", "version": "0.3.2", "provenance": [], "collapsed_sections": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "a...
https://github.com/google-research/bert predicting_movie_reviews_with_bert_on_tf_hub.ipynb
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert run_classifier.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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/LICENSE-2.0 # # Unless required by ...
https://github.com/google-research/bert run_classifier_with_tfhub.py