messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"voltron\",\n version=\"0.1\",\n author=\"snare\",\n author_email=\"<EMAIL>\",\n description=(\"A UI for GDB & LLDB\"),\n license=\"Buy snare a beer\",\n key... | python | edit | 3 | 0 | mit | a0a0a92e6cf1e2f0f288c46d75c66ec74e0b08be | snare/voltron,snare/voltron,snare/voltron,snare/voltron | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom parglare.actions import get_action_decorator\n\naction = get_action_decorator()\n\n\n@action('number')\ndef NUMERIC(_, value):\n return float(value)\n\n```\n\nApply this change: Test fix for Python 2."
},
{
"role": "assistan... | python | edit | 1 | 1 | mit | 372b39cb1e4537b2f3221e71e310a4c928a81468 | igordejanovic/parglare,igordejanovic/parglare | tests/func/import/imported_actions/by_decorator_action_name/base_actions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\ndef get_client_ip(request):\n ip = request.META.get('HTTP_X_FORWARDED_FOR')\n if ip:\n return ip.split(', ')[0]\n else:\n return request.META['REMOTE_ADDR']\n\n```\n\nApply this change: Fi... | python | edit | 1 | 2 | mit | 4612d1ab6b3694e5926f54a55fefa305cac4e8bf | myhro/myhronet,myhro/myhronet | myhronet/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name=\"Flask-Redistore\",\n version=\"1.0\",\n url=\"\",\n license=\"BSD\",\n author=\"Donald Stufft\",\n author_email=\"<EMAIL>\",\n description=\"Adds Redis support to your F... | python | edit | 1 | 1 | bsd-2-clause | 57ed6bb3994342fce594c9cbbb0ecde4ee8c117c | dstufft/Flask-Redistore | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport logging\nfrom urllib.parse import unquote\n\nfrom flask import request\n\nfrom . import scores\nfrom ... import preprocessors, responses, util\n\nlogger = logging.getLogger(__name__)\n\n\ndef configure(config, bp, scorin... | python | edit | 1 | 4 | mit | f9fa16fb2bc04d6bdddf19a939291e39b0fa1741 | he7d3r/ores,wiki-ai/ores,wiki-ai/ores,wiki-ai/ores,he7d3r/ores,he7d3r/ores | ores/wsgi/routes/v3/precache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pymoku import Moku, ValueOutOfRangeException\nfrom pymoku.instruments import *\nimport time, logging\n\nimport matplotlib\nimport matplotlib.pyplot as plt\n\nlogging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')... | python | edit | 8 | 0 | mit | bece8b815ea3359433df708272ec3065d2c2a231 | liquidinstruments/pymoku | examples/basic_siggen.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n :codeauthor: :email:`Alexander Schwartz <<EMAIL>>`\n'''\n\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing Libs\nfrom tests.support.unit import TestCase\nfrom tests.sup... | python | edit | 1 | 1 | apache-2.0 | 6c6e8d17bce3976a2ef766139f3692a78df2d0c4 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/unit/cloud/clouds/test_saltify.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# Run from Cryptchat\n# python3 -m unittest discover\n\nimport unittest\nfrom ..network.networkhandler import NetworkHandler\nfrom ..crypto.aes import AESCipher\nfrom ..crypto.diffiehellman i... | python | edit | 4 | 2 | mit | 7494c5506cbfed0a641003f38085bd74f35d38b4 | djohsson/Cryptchat | cryptchat/test/test_networkhandler.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n.. Copyright 2016 EMBL-European Bioinformatics Institute\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the L... | python | edit | 4 | 0 | apache-2.0 | b540d5c3943f6a21232428ecf717667c6beb48d5 | Multiscale-Genomics/mg-dm-api,Multiscale-Genomics/mg-dm-api | dmp/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport sys\n\nfrom nose.plugins.base import Plugin\n\nfrom doubles.lifecycle import setup, verify, teardown, current_space\nfrom doubles.exceptions import MockExpectationError\n\n\nclass NoseIntegra... | python | edit | 1 | 3 | mit | 5f416dadecf21accbaccd69740c5398967ec4a7c | uber/doubles | doubles/nose.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom performance.routine import Config\nfrom performance.web import Request\n\n\nclass ConfigTestCase(unittest.TestCase):\n def setUp(self):\n self.host = 'http://www.google.com'\n\n def test_init(self):\n ... | python | edit | 1 | 1 | mit | 852ce5cee8171fdf4a33f3267de34042cb066bf3 | BakeCode/performance-testing,BakeCode/performance-testing | tests/routine/test_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport node\nimport manager\nimport stages\nimport numpy\n\n\nclass Rotate90Node(node.Node):\n \"\"\"\n Rotate a Numpy image by num*90 degrees.\n \"\"\"\n arity = 1\n stage = stages.FILTER_BINARY\n name = \"Numpy::Rotate... | python | edit | 2 | 3 | apache-2.0 | c717ca0f2f85923dcf6ed3fd7a347f44f48f7941 | vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium | ocradmin/plugins/numpy_nodes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add summary to package init"
},
{
"role": "assistant",
"content": "\"\"\"Accurate Hijri-Gregorian date converter based on the Umm al-Qura calendar\"\"\"\n\n__version__ = \"2.1.2\"\n"
}
] | python | new_file | 1 | 0 | mit | 1f9edc409029556bb943655de311f47dfd4c2237 | dralshehri/hijri-converter | src/hijri_converter/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import find_packages, setup\n\ndependency_links = [\n 'https://github.com/m157q/robobrowser/tarball/babf6dd#egg=robobrowser-0.5.3'\n]\ninstall_requires = [\n 'beautifulsoup4==4.4.1',\n 'dry... | python | edit | 1 | 0 | mit | 0cb6291d4134f527cc1bb905af836918c6994b13 | M157q/gettitle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup, Extension\n\ndata_files = [\"inpout32.dll\"]\n\nsetup(name='PortFunctions', version='1.1',\n description = 'A Windows port reader for Python, built in C',\n author = 'Bradley Poulette',\n aut... | python | edit | 1 | 0 | apache-2.0 | 562cad4342f9daff31ae383d96b2d86cabdca8fd | chickendiver/PortFunctions,chickendiver/PortFunctions | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nOGLE Query Tool\n---------------\n\n:Author: Brian Svoboda (<EMAIL>)\n\nThis package is for querying interstellar extinction toward the Galactic bulge\nfrom OGLE-III d... | python | edit | 2 | 0 | bsd-3-clause | 9622a7dbac8fdaa97121b638aa72d43c446cb71c | imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery | astroquery/ogle/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ez_setup import use_setuptools\r\nuse_setuptools()\r\n\r\nfrom setuptools import setup, find_packages\r\n\r\nsetup(\r\n name='urbansim',\r\n version='0.2dev',\r\n description='Tool for modeling metropolitan real estate markets... | python | edit | 1 | 0 | bsd-3-clause | 1ed2f877556fb4a99f9e71177c1ada7585ed9a30 | synthicity/urbansim,UDST/urbansim,UDST/urbansim,bricegnichols/urbansim,apdjustino/urbansim,synthicity/urbansim,AZMAG/urbansim,bricegnichols/urbansim,ual/urbansim,apdjustino/urbansim,VladimirTyrin/urbansim,ual/urbansim,UDST/urbansim,AZMAG/urbansim,waddell/urbansim,VladimirTyrin/urbansim,waddell/urbansim,waddell/urbansim... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import Extension, find_packages, setup\n\nwith open(os.path.join(os.path.dirname(__file__), \"README.md\")) as f:\n long_description = f.read()\n\nsetup(\n name=\"pyinstrument\",\n packages=find_package... | python | edit | 3 | 0 | bsd-3-clause | 3f9cac3b9c36398a3eb6dba4ece49fc3656a56b0 | joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(name='addressable',\n description='Use lists like you would dictionaries.',\n long_description=open('README.rst').read(),\n author='Stijn Debrouwere',\n author_email='... | python | edit | 1 | 0 | isc | e9a445a4c12986680654e1ccb2feb3917ccbd263 | debrouwere/python-addressable | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\ntry:\n import setuptools\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n\nfrom setuptools import setup\n\nNAME = 'chash'\nVERSION = '0.1.0'\... | python | edit | 2 | 0 | bsd-3-clause | 9c4fb8e031b2856c0cb425d64b0e7d032a4b5a19 | lebedov/chash | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='jupyterhub-kubespawner',\n version='0.5.1',\n install_requires=[\n 'jupyterhub',\n 'pyyaml',\n ],\n setup_requires=['pytest-runner'],\n tests_requ... | python | edit | 1 | 0 | bsd-3-clause | 6327b3f0f7f27647bac4d169169f3d727fdfabc4 | ktong/kubespawner,jupyterhub/kubespawner,jbmarcille/kubespawner,yuvipanda/jupyterhub-kubernetes-spawner | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom ez_setup import use_setuptools\nuse_setuptools()\nfrom setuptools import setup, find_packages\n\n\nsetup(name='rafem',\n version='0.1.0',\n author='Katherine Ratliff',\n author_email='<EMAIL>',\n ... | python | edit | 1 | 0 | mit | 084f70c87cf4a22d797ac282ba7f074802f6e6b3 | katmratliff/avulsion-bmi,mcflugen/avulsion-bmi | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-txtlocal',\n packages=find_packages(),\n include_package_data=True,\n install_requires=['requests>=1.2.3'],\n version='0.2',\n description='App for sendi... | python | edit | 1 | 0 | bsd-2-clause | cf3ba1d37ebcb037c7116097c55814c3af5f9512 | incuna/django-txtlocal | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\r\n\r\nimport setuptools\r\n\r\ndef read_long_description():\r\n with open('README.rst') as f:\r\n data = f.read()\r\n with open('CHANGES.rst') as f:\r\n data += '\\n\\n' + f.read()\r\n return data\r\n\r\ni... | python | edit | 1 | 1 | mit | 8f70e822a53ec4d00764c97e65597078c5e0c2b7 | jaraco/irc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ndependencies = [\n 'requests~=2.7'\n]\n\nsetup(\n name='eclipsegen',\n version='0.4.1',\n description='Generate Eclipse instances in Python',\n url='http://github.com/Gohla/eclipsegen',\n author='Gabrie... | python | edit | 1 | 1 | apache-2.0 | e7a6eb6f63356f19a6deafb0b087f8deedc363c2 | Gohla/eclipsegen,Gohla/eclipsegen,Gohla/eclipsegen,Gohla/eclipsegen | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=\"releng-sop\",\n version=\"0.1\",\n description=\"Release Enginering Standard Operating Procedures\",\n url=\"https://github.com/releas... | python | edit | 1 | 0 | mit | c3103d881024cef6a7790d47e4937838cf97c4a5 | release-engineering/releng-sop,release-engineering/releng-sop | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nfrom setuptools import setup\n\nsetup(\n name='idlk',\n version='0.0.1',\n description='idlk lock filename generato... | python | edit | 1 | 0 | mit | 55718e4cc706341058d8bd2192598f9fa6ca8e22 | znerol/py-idlk | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json,httplib\n\nconfig_file = open('conf/net/ext_service/parse.json')\n\nsilent_push_msg = {\n \"where\": {\n \"deviceType\": \"ios\"\n },\n \"data\": {\n # \"alert\": \"The Mets scored! The game is now tied 1-1.\",\n ... | python | edit | 2 | 0 | bsd-3-clause | b635eddbe3ad344b02ecae47333a4ddf4b17cd18 | joshzarrabi/e-mission-server,sunil07t/e-mission-server,joshzarrabi/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,shankari/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-... | bin/remotePush.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2014, Michael Boyle\n# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>\n\nfrom distutils.core import setup\n\nsetup(name='spherical_functions',\n ... | python | edit | 1 | 0 | mit | f7709dc6de24c1acb36abcfd3d07f2b3a5130dfa | moble/spherical_functions | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n scratchdir\n ~~~~~~~~~~\n\n Context manager used to maintain your temporary directories/files.\n\n :copyright: (c) 2017 Andrew Hawker.\n :license: Apache 2.0, see LICENSE for more details.\n\"\"\"\ntry:\n from set... | python | edit | 1 | 1 | apache-2.0 | 0571579b98f516c208e6e84ae77abe25c4f248fc | ahawker/scratchdir | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport sslserver\n\nsetup(name=\"django-sslserver\",\n version=sslserver.__version__,\n author=\"Ted Dziuba\",\n author_email=\"<EMAIL>\",\n description=\"An SSL-enabled development serv... | python | edit | 1 | 0 | mit | 3315ce5ce730f0607c16864e12b6bbb7b2a1c69e | teddziuba/django-sslserver | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptools import setup, find_packages\n\ntests_require = [\n 'd... | python | edit | 1 | 0 | bsd-3-clause | 6b667b62ad1987c2a312a918df77c0ebb77af298 | beniwohli/apm-agent-python,songyi199111/sentry,looker/sentry,jbarbuto/raven-python,jmp0xf/raven-python,arthurlogilab/raven-python,mvaled/sentry,looker/sentry,someonehan/raven-python,collective/mr.poe,felixbuenemann/sentry,Goldmund-Wyldebeast-Wunderliebe/raven-python,pauloschilling/sentry,1tush/sentry,nikolas/raven-pyth... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nfiles = [\"*.css\"]\n\n\nsetup(\n name=\"junit2html\",\n version=\"023\",\n description=\"Generate HTML reports from Junit results\",\n author=\"Ian Norton\",\n author_email=\"<EMAIL>\",\n ... | python | edit | 1 | 0 | mit | f75d3c71bbcebbfa574d83ff336f55d36dce4d48 | inorton/junit2html | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n### -*- coding: utf-8 -*-\n###\n### © 2012 Krux Digital, Inc.\n### Author: Paul Lathrop <<EMAIL>>\n###\n\nfrom setuptools import setup, find_packages\n\nsetup(name='pysecurity-groups',\n version=\"0.0.1\",\n description='Library f... | python | edit | 1 | 0 | mit | cdfd38a552f0f1bf0738e8c2d02f40c44db3fee3 | krux/pysecurity-groups | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='guzzle_sphinx_theme',\n version='0.7.11',\n description='Sphinx theme used by Guzzle.',\n long_description=open('README.rst').read(),\n author='Michael Dowling',\n author_emai... | python | edit | 1 | 0 | mit | 8bb278bdba0d6325d3c9b7fbc26807e36fa90cdd | guzzle/guzzle_sphinx_theme,guzzle/guzzle_sphinx_theme | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix lint task import path"
},
{
"role": "assistant",
"content": "from arctasks.base import lint # noqa\nfrom arctasks.python import show_upgraded_packages # noqa\nfrom arctasks.release import * # noqa\n"
}
] | python | new_file | 1 | 0 | mit | 6d5d9e72125e5d281af3a93a83974c47e3400b95 | wylee/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,PSU-OIT-ARC/django-arcutils | tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nsetup(\n name='malwareconfig',\n version='1.0.3',\n author='Kevin Breen',\n author... | python | edit | 1 | 0 | mit | 8ed290524a4e8459bd448521633be62600df42fd | kevthehermit/RATDecoders | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='OpenSDraw',\n version='0.0.2',\n description='A CAD program similar to OpenSCAD but for LEGO(R).',\n author='Hazen Babcock',\n author_email='<EMAIL... | python | edit | 1 | 0 | mit | f9784cd3f03094ab92e58c5168300f068668f905 | HazenBabcock/opensdraw | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This file is part of python-markups module\n# License: BSD\n# Copyright: (C) Dmitry Shachnev, 2012\n\nimport os.path\n\n# Some common constants and functions\n(LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3)\nCONFIG... | python | edit | 1 | 4 | bsd-3-clause | 62151b04bd46fc1f586b179cdaeeca8ba3e18fed | mitya57/pymarkups,retext-project/pymarkups | markups/common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport codecs\nfrom os.path import join, dirname\nfrom setuptools import setup, find_packages\n\n\nversion = '1.0dev'\nread = lambda *rnames: unicode(codecs.open(join(dirname(__file__), *rnames),\n ... | python | edit | 2 | 0 | mit | c4ab1f10227fa98158127a390ab6b2a2b472a972 | jaap3/sourcebuilder | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\n Flask-Cent\n -----------\n\n Flask-Cent is a flask extension for centrifugal/cent\n'''\nimport os\nimport sys\n\nfrom setuptools import setup\n\nmodule_path = os.path.join(os.path.dirname(__file__), 'flask_cent.py')\nversion_... | python | edit | 3 | 0 | mit | dd7b0abe5cdd94c90af5705b261463285f70d2d2 | breakbase/flask-cent | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom plex.core.helpers import to_iterable\nfrom plex.objects.container import Container\nfrom plex.objects.core.base import Property\nfrom plex.objects.directory import Directory\n\n\nclass Section(Directory):\n uuid = Property\n\n fi... | python | edit | 1 | 7 | mit | 191ba72a2d8b2e47363fcdbd200549ff3eef18fb | fuzeman/plex.py | plex/objects/library/section.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.template import loader, Context\nfrom django.core.mail import send_mail\nfrom django.conf import settings\n\n\ndef send_tpl_email(template_name, recipient_list, context=None, from_email=None, **kwds):\n t = loader.get_templat... | python | edit | 1 | 3 | mit | ed98c04ed7d5e99422a65fbdbf45f222aca408ca | watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,watchdogpolska/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia,rwakulszowa/poradnia | poradnia/template_mail/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Form for submitting suggestions.\"\"\"\n\nfrom django import forms\n\nfrom suggestions import models\n\nclass SuggestionForm(forms.ModelForm):\n name = forms.CharField(max_length=100, label=\"Name\",\n widget=forms.TextI... | python | edit | 1 | 0 | mit | 1cdd8add2807ecedb7efb23428075423dcf9bfd2 | mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections | ehriportal/suggestions/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '0.3.2'\n\ntry:\n from mando.core import Program\nexcept ImportError as e: # unfortunately this is the only workaround for argparse\n # and Python 2.6\n e.version = __version__\n raise e\n\nm... | python | edit | 1 | 0 | mit | 46bf4915426b14db84c46a0109645a3a0f3fa94d | rubik/mando,MarioSchwalbe/mando,MarioSchwalbe/mando | mando/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nfrom django.contrib.gis.geos import GEOSGeometry\n\nfrom django.conf import settings\n\nfrom ... | python | edit | 1 | 2 | apache-2.0 | c21c2f4879c48b6a881b480df7bbfbff47ffffcc | WikiWatershed/model-my-watershed,project-icp/bee-pollinator-app,project-icp/bee-pollinator-app,WikiWatershed/model-my-watershed,project-icp/bee-pollinator-app,kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,project-icp/bee-pollinator-app,WikiWatershed... | src/mmw/apps/modeling/calcs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"accounts app unittests\n\n\"\"\"\nfrom django.test import TestCase\nfrom django.contrib.auth import get_user_model\n\n\nclass WelcomePageTest(TestCase):\n \"\"\"Tests relating to the welcome_page view.\n\n \"\"\"\n def test_u... | python | edit | 1 | 1 | mit | 580eb57f68a8501cae925f747e94a8edb2c6a028 | randomic/aniauth-tdd,randomic/aniauth-tdd | accounts/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic import View\nfrom django.shortcuts import render\n\n\nclass MemberProfileView(View):\n template_name = 'accounts/profile.html'\n\n def get(self, request):\n return render(request, self.template_name)\n... | python | edit | 1 | 1 | mit | 48d9e6c2d36b7c1beb11f6574624731a88cdccbc | davidjrichardson/uwcs-zarya,davidjrichardson/uwcs-zarya | accounts/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Main module for pyicemon webview\"\"\"\n\nimport SimpleHTTPServer\nimport SocketServer\nimport threading\nimport sys\nimport os\nimport logging\nfrom monitor import Monitor\nfrom publishers import WebsocketPublisher\nfrom connection i... | python | edit | 1 | 0 | mit | ae0158c49224464084e0302897c91e9c9fa7ffbe | DiscoViking/pyicemon,DiscoViking/pyicemon | webview.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\nimport autopep8\n\ndef is_grade(cell):\n \"\"\"Returns True if the cell is a grade cell.\"\"\"\n if 'nbgrader' not in cell.metadata:\n return False\n return cell.metadata['nbgrader'].get('grade', False)\n\n\n... | python | edit | 1 | 5 | bsd-3-clause | 063d88ed5d5f48114cdf566433ae40d40a8674f4 | EdwardJKim/nbgrader,modulexcite/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jdfreder/nbgrader,dementrock/nbgrader,ellisonbg/nbgrader,ellisonbg/nbgrader,ellisonbg/nbgrader,jhamrick/nbgrader,alope107/nbgrader,dementrock/nbgrader,MatKallada/nbgrader,EdwardJKim/nbgrader,ellisonbg/nbgrader,MatKallada/nbgrader,jdfreder/nbgra... | nbgrader/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom celery import shared_task\n\n\n@shared_task\ndef update_indexed_document(index, created, pk):\n indexed_doc = index.init_using_pk(pk)\n indexed_doc.prepare()\n indexed_doc.save()\n\n\n@shared_task\ndef delete_indexed_document(... | python | edit | 1 | 1 | mit | 44514a724fc8eff464d4c26a7e9c213644c99e53 | prashnts/dj-elasticsearch-flex,prashnts/dj-elasticsearch-flex | elasticsearch_flex/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport dj_database_url\n\n\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\nDEBUG = TEMPLATE_DEBUG = True\n\n\nSECRET_KEY = 'example-app!'\nROOT_URLCONF = 'example.urls'\nSTATIC_URL = '/static/'\n\n\nDATABASES = {'defaul... | python | edit | 1 | 0 | bsd-2-clause | b2a7171aa274a1d1bfa0653fc9963e52b44dc904 | meshy/django-conman,meshy/django-conman | example/example/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport astor\n\nfrom data import warehouse\nfrom puzzle.examples.public_domain import zebra_puzzle\nfrom puzzle.problems import logic_problem\nfrom puzzle.puzzlepedia import prod_config\nfrom spec.mamba import *\n\nwith _description('zebra_... | python | edit | 21 | 0 | mit | ed8b6b615bc8d006e3e31843fa31f0bda09109ed | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | spec/puzzle/examples/public_domain/zebra_puzzle_spec.py | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport arrow\nfrom betterapis import db\n\nclass Track(db.Model, SimpleSerializing):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Clumn(db.String)\n details = db.Column(db.String)\n\n def __init__(self, **kwargs):\... | python | edit | 4 | 1 | mit | 923d57d91b99fc3ac052d46de0314e7559b008a5 | tylerdave/OpenAPI-Tutorial,tylerdave/OpenAPI-Tutorial | lessons/lesson-2.04/models_example.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n\r\nimport unittest\r\nimport faint\r\nimport os\r\nimport py_ext_tests\r\n\r\nclass TestPng(unittest.TestCase):\r\n\r\n def test_write_png(self):\r\n out_dir = py_ext_tests.mak... | python | edit | 1 | 1 | apache-2.0 | 04e64fea6e11a188a53d0b8d69ef97686868be1c | lukas-ke/faint-graphics-editor,lukas-ke/faint-graphics-editor,lukas-ke/faint-graphics-editor,lukas-ke/faint-graphics-editor | tests/py_ext_tests/test_png.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import jsonify\n\n\ndef register_error_handlers(app):\n app.register_error_handler(EntityNotFoundError, entity_not_found_handler)\n app.register_error_handler(InvalidInputError, invalid_input_hand... | python | edit | 1 | 3 | mit | af3515c8354dd525c2889eda75bfbc5cb7e2ecbf | jaapverloop/massa | massa/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom os.path import exists\nfrom os import mkdir\n\n\nclass Config:\n config_path = \"config/\"\n\n def __init__(self, filename, data=None, load=True):\n self.filepath = \"{}{}.json\".format(self.config_path, filen... | python | edit | 1 | 7 | mit | e95bcb1a2688a9b5a0c09728cdd0082b643de943 | pckv/pcbot,PcBoy111/PC-BOT-V2,PcBoy111/PCBOT | pcbot/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test IAM Policies for correctness.\"\"\"\nimport json\n\nfrom foremast.iam.construct_policy import construct_policy\n\nANSWER1 = {\n 'Version': '2012-10-17',\n 'Statement': [\n {\n 'Effect': 'Allow',\n ... | python | edit | 3 | 1 | apache-2.0 | e9170de0c8d427e2545469c2d3add43bfae1cc54 | gogoair/foremast,gogoair/foremast | tests/test_construct_policy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom locators_51 import *\nimport copy\n\nnpsp_lex_locators = copy.deepcopy(npsp_lex_locators)\n\n# current version (Sravani's )\nnpsp_lex_locators['delete_icon']='//span[contains(text() ,\"{}\")]/following::span[. = \"{}\"]/following-sibli... | python | edit | 3 | 0 | bsd-3-clause | 7537387aa80109877d6659cc54ec0ee7aa6496bd | SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus | robot/Cumulus/resources/locators_50.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# The version of Review Board.\n#\n# This is in the format of:\n#\n# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)\n#\nVERSION = (1, 0, 0, 'final', 0, True)\n\n\ndef get_version_string():\n version = '%s.%s' % (V... | python | edit | 2 | 5 | mit | 0e513331fd649ac71c2d9690c1cb72bf5954973c | 1tush/reviewboard,1tush/reviewboard,Khan/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,davidt/reviewboard,Khan/reviewboard,custode/reviewboard,sgallagher/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,chazy/reviewboard,KnowNo/reviewboard,chipx86/reviewboard,beol/reviewboard,atagar/ReviewBoard,1tush/rev... | __init__.py | rejected_duplicate | Near-duplicate of sample 1607 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom arrange_schedule import *\n\n\ndef test_crawler_cwb_img(system_setting):\n send_msg = {}\n send_msg['server_dir'] = system_setting['board_py_dir']\n send_msg['user_id'] = 1\n\n receive_msg = crawler_cwb_img(send_msg)\n a... | python | edit | 4 | 2 | apache-2.0 | c72b727d373ac620379fe0a2a0c1b85bb868962e | stvreumi/electronic-blackboard,Billy4195/electronic-blackboard,stvreumi/electronic-blackboard,Billy4195/electronic-blackboard,chenyang14/electronic-blackboard,chenyang14/electronic-blackboard,SWLBot/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,stvreumi/electronic-blackboard,Billy419... | test_arrange_schedule.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport pytest\n\nimport mbuild as mb\nfrom mbuild.tests.base_test import BaseTest\n\n\nclass TestXYZ(BaseTest):\n\n def test_save(self, ethane):\n ethane.save(filename='ethane.xyz')\n\n```\n\nApply this change:... | python | edit | 4 | 2 | mit | 8f099581930d0f55454751d8fbba05a3685c6144 | iModels/mbuild,iModels/mbuild | mbuild/tests/test_xyz.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport boto3\nimport tweepy\nimport json\nimport base64\nfrom tweet_s3_images import TweetS3Images\n\nwith open('./config.json', 'r') as file:\n config = json.loads(file.read())\n\n # Decrypt API keys\n client = boto3.client('kms')... | python | edit | 1 | 1 | mit | 4503e6671828497189736c86d408f6c0a8b47058 | onema/lambda-tweet | lambda_tweet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.safestring import mark_safe\nfrom django.template.loader import render_to_string\n\nfrom armstrong.utils.backends import GenericBackend\n\n\ntemplate_finder = GenericBackend('ARMSTRONG_LAYOUT_TEMPLATE_FINDER',\n def... | python | edit | 3 | 3 | apache-2.0 | 3f62c7b413f3ef6b1072437bcd1f08b1a9c6b6ea | armstrong/armstrong.core.arm_layout,armstrong/armstrong.core.arm_layout | armstrong/core/arm_layout/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\ntry:\n from .local import *\nexcept ImportError, exc:\n exc.args = tuple(['%s (did you rename settings/local.py-dist?)'\n % exc.args[0]])\n raise exc\n\nimport sys\nif sys.argv[1] == 'test'... | python | edit | 8 | 0 | bsd-3-clause | 01a4a92f69219e081171aa1ad9c0215efec8f69d | mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks | flicks/settings/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom math import exp\n\nclass ClickModel(object):\n '''\n Simple Position-biased Model:\n P(C_r=1) = P(A_r=1|E_r=1)P(E_r=1),\n where\n C_r is click on the r-th document,\n A_r is being attracted by the r-th documen... | python | edit | 1 | 3 | mit | 854ad9b06ab5da3c4ac0ae308d4d8d01a0739d42 | mpkato/openliveq | openliveq/click_model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ldap\n\ndef checkCredentials(username, password):\n\tif password == \"\":\n\t\treturn 'Empty Password'\n\t\n\tcontroller = 'devdc'\n\tdomainA = 'dev'\n\tdomainB = 'devlcdi'\n\tdomain = domainA + '.' + domainB\n\t\n\tldapServer = 'lda... | python | edit | 5 | 6 | mit | 343baa4b8a0ed9d4db0727c514d9ff97b937c7ee | lcdi/Inventory,lcdi/Inventory,lcdi/Inventory,lcdi/Inventory | adLDAP.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''A framework for designing and running experiments in Python using Kivy.\n'''\n\n__version__ = '0.1-dev'\n\nfrom kivy import kivy_home_dir\nfrom os import environ\nfrom os.path import join\nfrom moa.logger import Logger\n\n\n#: moa config... | python | edit | 1 | 0 | mit | 7217e2dcbec3e13d730e47e001d00c5fb8534468 | matham/moa | moa/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFactory that configures SQLAlchemy for PostgreSQL.\n\n\"\"\"\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\n\nfrom microcosm.api import binding, defaults\n\n\n@binding(\"postgres\")\n@defaults(\n ... | python | edit | 1 | 3 | apache-2.0 | 5e8d64bcbb53da0984ac0b41a470417a05c530d7 | globality-corp/microcosm-postgres,globality-corp/microcosm-postgres | microcosm_postgres/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cassiopeia as cass\nfrom cassiopeia.core import Summoner\n\n\ndef print_summoner(name: str, id: int):\n me = Summoner(name=\"Kalturi\", id=21359666)\n\n #matches = cass.get_matches(me)\n matches = me.matches\n match = mat... | python | edit | 3 | 2 | mit | 8556fc0b6fb024ab6cc68364270462681209108a | robrua/cassiopeia,10se1ucgo/cassiopeia,meraki-analytics/cassiopeia | examples/match.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport exceptions\n\nclass Response(object):\n\tdef __init__(self, body, meta=None):\n\t\tself.meta = meta\n\t\tself.body = body\n\n\t\t# todo: handle non-\"ok\" status\n\t\tself.status = body.get(\"status\", None)\n\t\tself... | python | edit | 3 | 2 | bsd-2-clause | f90cc1b24910b1c6214bdda3c2de831b5b507e01 | casebeer/factual | factual/common/responses.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess as sp\nimport sys\n\ndef grab_output(*command):\n return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip()\n\ncommit_id_size = 12\n\ntry:\n commit_id = grab_output('gat', 'rev-parse', '--short=%d' % commit_i... | python | edit | 1 | 1 | bsd-3-clause | 2747b9a5fb480176df2a8910156c9e56dd9fcd1a | geekboxzone/lollipop_external_chromium_org_third_party_angle,android-ia/platform_external_chromium_org_third_party_angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,xin3liang/platform_external_chromium_org_third_party_angle,geekboxzone/lollip... | src/commit_id.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport BaseHTTPServer\nimport threading\nimport time\nimport owebunit\n\nclass Handler(BaseHTTPServer.BaseHTTPRequestHandler):\n def do_GET(self):\n self.wfile.write(\"HTTP/1.0 200 OK\\n\")\n self.wfile.write(\"Content-Type... | python | edit | 3 | 1 | bsd-2-clause | 92108cdac6e9324ba9584359b6502e87ce7dcccb | p/webracer | owebunit/tests/simple.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\n\nfrom .models import Language, Partner\nfrom .helpers import get_tag_choices\n\n\nclass PartnerFilter(django_filters.FilterSet):\n tags = django_filters.ChoiceFilter(\n label=\"Tags\", choices=get_tag_choic... | python | edit | 1 | 2 | mit | 87d9365cd3f19a52957e2e26cefa9fa048c2acb1 | WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight | TWLight/resources/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport csv\n\nfrom django import forms\n\n\nclass BulkUploadForm(forms.Form):\n data = forms.FileField()\n\n def clean(self):\n cleaned_data = super(BulkUploadForm, self).clean()\n\n cleaned_data['data'] = BulkUploadForm... | python | edit | 1 | 3 | mit | 21f06746eebe809f5d7017394b4c7c50ba319066 | openplans/streetscore,openplans/streetscore,openplans/streetscore | street_score/bulkadmin/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.contrib import admin\nfrom django.conf import settings\nfrom django.utils import timezone\n\nfrom .models import SitePermission\n\n\nclass AdminViewPermission(admin.ModelAdmin):\n\... | python | edit | 1 | 3 | mit | d386c389b9e350b01fdf25f7cd91857d3fbb1ead | opps/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,opps/opps | opps/contrib/multisite/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom django.conf import settings\n\n\ndef _get_default_file_content():\n return {'status': False}\n\n\ndef _write_status_file():\n file_path = settings.STATUS_FILE\n with open(file_path, 'w') as f:\n json.dump... | python | edit | 3 | 3 | mit | e563e8f8f1af691c4c9aa2f6177fbf2c8e2a4855 | avinassh/della,avinassh/della,avinassh/della | della/user_manager/draw_service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nTRAJECTORY_TYPE = 'circular'\n\nif TRAJECTORY_TYPE == 'linear':\n SIMULATION_TIME_IN_SECONDS = 40\nelif TRAJECTORY_TYPE == 'circular':\n SIMULATION_TIME_IN_SECONDS = 120\n\nDELTA_T = 0.1 # this is the sampling t... | python | edit | 1 | 0 | mit | edadd7385ff8c839b524a6c06d0fc370c3db25bb | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management import call_command\nfrom django.test.utils import get_runner\nfrom django.conf import settings\nfrom django.db import connections, DEFAULT_DB_ALIAS\n\n\n# use jenkins runner if present otherwise the default djan... | python | edit | 1 | 1 | mit | 394ed06411d3ca3ada66aab3bee796682895acc0 | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/core/testing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom account.models import Account, AnonymousAccount\n\ndef openid(request):\n return {'openid': request.openid}\n\ndef account(request):\n account = AnonymousAccount(request)\n if request.user.is_authenticated():\n try:\n... | python | edit | 1 | 3 | mit | 9e2d3ed154e977d38126f610f11a0df3a0141da1 | alex/pinax,amarandon/pinax,amarandon/pinax,amarandon/pinax,amarandon/pinax,alex/pinax,alex/pinax | apps/local_apps/account/context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"[START auth]\"\"\"\n\nfrom oauth2client.client import GoogleCredentials\nfrom googleapiclient.discovery\n\ndef get_service():\n credentials = GoogleCredentials.get_application_default()\n return build('bigquery', 'v2', credentia... | python | edit | 1 | 1 | apache-2.0 | dddb15a50d64a7b2660f2af1a407dd7fa9b3742b | googlearchive/bigquery-samples-python,googlearchive/bigquery-samples-python | samples/auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2017 Siphon Contributors.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"\nWyoming Upper Air Data Request\n==============================\n\nThis example shows how... | python | edit | 1 | 0 | bsd-3-clause | 52e6dabe13abdcd81a097beaacca585800397552 | Unidata/siphon | examples/upperair/Wyoming_Request.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nfrom setuptools import setup\n\nf = open(os.path.join(os.path.dirname(__file__), 'README.md'))\nreadme = f.read()\nf.close()\n\nf = open(os.path.join(os.path.dirname(__file__), 'package.json'))\npackage = json.loads(... | python | edit | 1 | 0 | mit | be7f3153e1505ecdfca6e5078c4b3a4ed1817c28 | bradleyg/django-s3direct,bradleyg/django-s3direct,bradleyg/django-s3direct | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\nsetup(\n name='rq-scheduler',\n version='0.1',\n author='Selwin Ong',\n author_email='<EMAIL>',\n packages=['rq_scheduler'],\n url='https://github.com/ui/rq-schedule... | python | edit | 1 | 0 | mit | a3fb6a02a2c039fe53326ab7bf974efa1df0c2fe | ihuro/rq-scheduler,sum12/rq-scheduler,cheungpat/rq-scheduler,ui/rq-scheduler,lechup/rq-scheduler,mbodock/rq-scheduler,peergradeio/rq-scheduler | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\nwith open(path.join(here, 'README.md'), encoding='utf-8') as f:\n readme = f.read()\n\nsetup(\n name='manuale',... | python | edit | 1 | 0 | mit | 091d0589d40e5bc19a58e16653ab48c9a821b276 | veeti/manuale | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('requirements.txt') as req_file:\n requires = req_file.read().split('\\n')\n\nwith open('requirements-de... | python | edit | 1 | 0 | bsd-2-clause | cadc5534f5926a0aeb1fb4bf6e9f1db0f56a9b6f | praekelt/molo.polls,praekelt/molo.polls | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\n\"\"\"setup.py: setuptools control.\"\"\"\n\n\nimport re\nfrom setuptools import setup, find_packages\nimport pip\n\n\nversion = re.search(\n '^__version__\\s*=\\s*\"(.*)\"',\n open('src/bslint.py').read()... | python | edit | 1 | 0 | bsd-3-clause | c99ef9e318467624de8f62afee6c14ca422e8413 | sky-uk/bslint | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, os\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in ... | python | edit | 5 | 0 | bsd-3-clause | f37f972c3ded0671beed16c9e0c6ee2a5e764f5f | gasman/Willow,gasman/Willow,torchbox/Willow,torchbox/Willow | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom pip.req import parse_requirements\n\ninstall_reqs = parse_requirements(\"./requirements.txt\")\nreqs = [str(ir.req) for ir in install_reqs]\n\nsetup(\n name='url-matchers',\n version='0.0.1',\n ... | python | edit | 1 | 0 | mit | 0a9601c4ee085c38f660e6d40c98256098576a92 | alexjg/url-matchers | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tattler',\n author='Joe Friedl',\n author_email='<EMAIL>',\n version='0.1',\n description='A nose plugin that tattles on functions.',\n keywords='nose plugin test testing mo... | python | edit | 1 | 0 | mit | 6cb1b973e24fee5879d5623673d976b66fdf4252 | grampajoe/tattler | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nlong_description = \"\"\"Publish browser extensions to their stores.\nCurrently only available for Google Chrome.\"\"\"\n\nsetup(\n name='webstoremgr',\n version='0.5.3',\n description... | python | edit | 1 | 0 | mit | 9a2318d4ddadb57b4096896407c7683d9804e04d | melkamar/webstore-manager,melkamar/webstore-manager | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nfrom setuptools import setup\n\n\nif os.path.exists('README.rst'):\n long_description = open('README.rst').read()\nelse:\n long_description = '''A simple Python wrapper arou... | python | edit | 1 | 0 | mit | 2b3c9eb3f849e564775f71714c21d490858bd8dc | mcs07/ChemSpiPy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nversion = '0.4.3'\n\nsetup(name='twitter',\n version=version,\n description=\"An API and command-line toolset for Twitter (twitter.com)\",\n long_description=open... | python | edit | 4 | 0 | mit | 169240f25757db371108af98163c81f7cc0e647b | hugovk/twitter,adonoho/twitter,durden/frappy,jessamynsmith/twitter,tytek2012/twitter,Adai0808/twitter,sixohsix/twitter,miragshin/twitter | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\nfrom github_backup import __version__\n\n\ndef open_file(fname):\n return open(os.path.join(os.path.dirname(__file__), fname))\n\n\nsetup(\n na... | python | edit | 1 | 1 | mit | cb1b0b6c6bb3fb2f982f775ee831abf20916c020 | josegonzalez/python-github-backup,josegonzalez/python-github-backup | setup.py | rejected_duplicate | Near-duplicate of sample 5340 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport re\n\nfrom distutils.core import setup\n\n\nDIRNAME = os.path.abspath(os.path.dirname(__file__))\nrel = lambda *parts: os.path.abspath(os.path.join(DIRNAME, *parts))\n\nREADME = open(rel('README.rs... | python | edit | 1 | 0 | bsd-3-clause | 834637f8860f6b2d99726f9f531d05884e375ea3 | playpauseandstop/Flask-And-Redis,playpauseandstop/Flask-And-Redis | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\n\nwith open('README.rst', 'r', 'utf-8') as f:\n readme = f.read()\n\n\nsetup(\n name='django-latest-tweets',\n version='0.4.5',\n d... | python | edit | 1 | 0 | bsd-3-clause | 8c694c6ad022710a9b7de3b10650591278325267 | blancltd/django-latest-tweets | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Execute this file to see what plugins will be loaded.\n\n# Implementation leans to Lex Toumbourou's example:\n# https://lextoumbourou.com/blog/posts/dynamically-loading-modules-and-classes-in-python/\n\nimport o... | python | edit | 1 | 5 | isc | d1a784ec841f4f0fbe8945bf7a5f81e7c3952b93 | weezel/BandEventNotifier | plugin_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\n\n# Ensure that the ssdeep library is built, otherwise install will fail\nos.environ['BUILD_LIB'] = '1'\n\nsetup(\n name=\"stoq\",\n version=\"0.10.16\",\n author=\"Marcus LaFerrera\",\n ... | python | edit | 1 | 0 | apache-2.0 | 6bb184afc3317ca28bcdf9f684de40f173a5a3e6 | PUNCH-Cyber/stoq | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom pypandoc import convert\n\n\ndef convert_markdown_to_rst(file):\n return convert(file, 'rst')\n\n\nsetup(name='gitlabform',\n version='1.0.1',\n description='Easy configuratio... | python | edit | 1 | 1 | mit | e5dd1f4cbbc76842ac7a95e9fe878631460ee020 | egnyte/gitlabform,egnyte/gitlabform | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='SpaceScout-Server',\n version='1.0',\n description='REST Backend for SpaceScout',\n install_requires=[\n 'Django>=1.7,<1.8',\n ... | python | edit | 1 | 0 | apache-2.0 | b36f2518666572ccd3b98dd88536533e17a39e3f | uw-it-aca/spotseeker_server,uw-it-aca/spotseeker_server,uw-it-aca/spotseeker_server | setup.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.