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\nimport logging\n\ntry:\n import click\n from lockfile import LockFile, LockTimeout\nexcept ImportError:\n click = None\n\nlogger = logging.getLogger('spoppy.main')\n\n\ndef get_version():\n return '1.2.2'\n\nif click:\n @clic... | python | edit | 3 | 9 | mit | d4b9b9875ce1ccf3934dba648f4422f4147cc87b | sindrig/spoppy,sindrig/spoppy | spoppy/__init__.py | rejected_duplicate | Near-duplicate of sample 5257 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = (1, 0, 'post-release-SVN')\n\ndef get_version():\n \"Returns the version as a human-format string.\"\n v = '.'.join([str(i) for i in VERSION[:-1]])\n if VERSION[-1]:\n from django.utils.version import get_svn_revis... | python | edit | 1 | 5 | bsd-3-clause | 8e608c2155a4a466f1a4bf87df05c4e4ebd90c1c | blindroot/django,lsqtongxin/django,jgoclawski/django,blighj/django,fenginx/django,riklaunim/django-custom-multisite,jn7163/django,alrifqi/django,ryangallen/django,charettes/django,eugena/django,AndrewGrossman/django,yakky/django,eugena/django,denys-duchier/django,EliotBerriot/django,dwightgunning/django,hassanabidpk/dj... | django/__init__.py | rejected_duplicate | Near-duplicate of sample 11354 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport logging\nfrom jyven import maven\n\n\nclass TestJyven(unittest.TestCase):\n \"\"\"Run as e.g. `jython -m unittest jyven_test`.\"\"\"\n\n def test_load(self):\n logging.basicConfig(level=logging.DEBUG)\n ... | python | edit | 1 | 1 | mit | 8e5fa91de34ec2556459b6b58e6733390762a7f8 | amake/jyven | jyven_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport theano.tensor as T\n\nfrom pymanopt import Problem\nfrom pymanopt.manifolds import Sphere\n\n\nclass TestProblem(unittest.TestCase):\n def setUp(self):\n self.X = X = T.vector()\n self.cost = T.exp... | python | edit | 1 | 1 | bsd-3-clause | 57a3391c391cf55bf70e781453faa69d223161f4 | nkoep/pymanopt,nkoep/pymanopt,nkoep/pymanopt,pymanopt/pymanopt,pymanopt/pymanopt | tests/test_problem.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom GamTools import corr\nimport numpy as np\nimport argparse\n\nparser = argparse.ArgumentParser(description='Calculate coverage over different window sizes for a list of bam files.')\nparser.add_argument('npz_frequencies_file', help='An ... | python | edit | 1 | 1 | apache-2.0 | 154632b0ab27d36b63c302a550589a182a319ef8 | pombo-lab/gamtools,pombo-lab/gamtools | distance_matrix.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subprocess import check_output\n\nfrom django import template\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef git_revno():\n return check_output(['git', 'rev-parse', '--verify', 'HEAD']).strip()[-7:]\n\n```\n\nApply ... | python | edit | 1 | 1 | mit | 7d5c43e0c811bc45daee6e478e67e3c33b497033 | makyo/honeycomb,makyo/honeycomb,OpenFurry/honeycomb,makyo/honeycomb,OpenFurry/honeycomb,OpenFurry/honeycomb,makyo/honeycomb,OpenFurry/honeycomb | core/templatetags/git_revno.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime, sublime_plugin, re\n\nclass ToggleRspecFocusCommand(sublime_plugin.TextCommand):\n def run(self, edit, surplus=False):\n for region in self.view.sel():\n line = self.view.line(region)\n line_c... | python | edit | 3 | 4 | mit | 57fd8c49de7ef6e09a4f0fbd6b39c87127e91f9a | axsuul/sublime-toggle-rspec-focus,axsuul/sublime-toggle-rspec-focus,axsuul/sublime-toggle-rspec-focus | toggle_rspec_focus.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Configuration file for the Sphinx documentation generator.\n# This picks up values from ../documentation_configuration.py.\n# This gets copied to conf.py in the output directory and then picked up by\n# Sphinx.\n\nimport sys, os\n\nsys.pa... | python | edit | 3 | 0 | apache-2.0 | 3d0acf0c8b04d97732d5f69e1ebf6de6fc0dea4e | rogiervd/flipsta-build | doc/sphinx-conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.3 on 2017-12-20 13:11\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n... | python | edit | 1 | 0 | apache-2.0 | 50889a2d9a70efa8685dbb3ed9c60b05d4ecf4c1 | unicef/un-partner-portal,unicef/un-partner-portal,unicef/un-partner-portal,unicef/un-partner-portal | backend/unpp_api/apps/partner/migrations/0043_auto_20171220_1311.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Vigenère Cipher Dictionary Hacker\n# https://www.nostarch.com/crackingcodes/ (BSD Licensed)\n\nimport detectEnglish, vigenereCipher, pyperclip\n\n\ndef main():\n ciphertext = \"\"\"Tzx isnz eccjxkg nfq lol mys bbqq I lxcz.\"\"\"\n h... | python | edit | 1 | 4 | mit | b9f136e2bb1f163d455295d824a548a36170586a | JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials | books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#################################################################\n## SERVO LIB for SMART TOLLBOOTH PROJECT ##\n#################################################################\n\nimport RPi.GPIO as GPIO\nimport time\... | python | edit | 1 | 2 | mit | 879bdbcddb582d5f4768fe7042380397514767d3 | DreamN/Smart-Tollbooth,DreamN/Smart-Tollbooth,DreamN/Smart-Tollbooth,DreamN/Smart-Tollbooth | servo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom codecs import open as codecs_open\nfrom setuptools import setup, find_packages\n\n\n# Get the long description from the relevant file\nwith codecs_open('README.rst', encoding='utf-8') as f:\n long_description = f.read()\n\n\nsetup(n... | python | edit | 1 | 0 | mit | 43338ffa4d9703585c78f6613ed1bd047c076748 | mapbox/untiler | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nfrom ansible_vault_diff import __version__ as version\n\n\nconfig = {\n 'description': 'Tool used to display a diff of two ansible-vau... | python | edit | 1 | 0 | mit | 9da7843cc9add30af30186aa83ebd157cfb5a1c0 | pwnbus/ansible-vault-diff | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\nfrom setuptools import setup, find_packages\nfrom os.path import dirname, join\n\n\ndef main():\n base_dir = dirname(__file__)\n setup(\n name='rotunicode',\n ... | python | edit | 1 | 1 | apache-2.0 | 7a42318ca7d8d8f59e30b23b8e507410e9e4868b | box/rotunicode,box/rotunicode | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Mailmerge build and install configuration.\"\"\"\nfrom pathlib import Path\nimport setuptools\n\n\n# Read the contents of README file\nPROJECT_DIR = Path(__file__).parent\nREADME = PROJECT_DIR/\"README.md\"\nLONG_DESCRIPTION = README.... | python | edit | 1 | 0 | mit | 21febe61699787a0a47bd0ee2ba5e58727d75c17 | awdeorio/mailmerge | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import (\n setup,\n find_packages,\n)\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(here, \"README.md\")) as rdme:\n with open(path.join(here, \"CHANGELOG.md\")) as chlog... | python | edit | 1 | 0 | mit | 4c40dc904792ca037c4f71ca4a0546229ae0cb20 | zekna/py-types | setup.py | rejected_duplicate | Near-duplicate of sample 5244 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"WSGI app setup.\"\"\"\nimport os\nimport sys\n\nif 'lib' not in sys.path:\n # Add lib as primary libraries directory, with fallback to lib/dist\n # and optionally to lib/dist.zip, loaded using zipimport.... | python | edit | 1 | 2 | bsd-3-clause | 3bd2c8c48d81c22ca38b2c7a32ef9007eb8e2a8f | pombreda/tipfy,adilhz/tipfy,google-code-export/tipfy,pombreda/tipfy,google-code-export/tipfy,google-code-export/tipfy,adilhz/tipfy,pombreda/tipfy | project/app/main.py | rejected_duplicate | Near-duplicate of sample 4259 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='Flask-RESTful',\n version='0.2.5',\n url='https://www.github.com/twilio/flask-restful/',\n author='Kyle Conroy',\n author_email='<EMAIL>',... | python | edit | 1 | 0 | bsd-3-clause | 2150f71c723d85d7ba2c5756f90c0174b3dc6666 | CanalTP/flask-restful | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\n\nsetup(\n name='django-scheduler',\n version='0.7.1',\n description='A calendaring app for Django.',\n author='Leonardo Lazzaro',\n author_email... | python | edit | 1 | 0 | bsd-3-clause | f97ea075866cf67e873c072613e058be160d5340 | GrahamDigital/django-scheduler,GrahamDigital/django-scheduler,rowbot-dev/django-scheduler,sprightco/django-scheduler,nharsch/django-scheduler,nwaxiomatic/django-scheduler,drodger/django-scheduler,drodger/django-scheduler,jrutila/django-scheduler,nharsch/django-scheduler,GrahamDigital/django-scheduler,jrutila/django-sch... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport setuptools\nfrom distutils.core import setup\n\nsetup(\n name='pydeps',\n version='0.9.2',\n packages=['pydeps'],\n install_requires=[\n 'enum34'\n ],\n entry_points={\n 'console_scripts': [\n ... | python | edit | 3 | 0 | bsd-2-clause | 40f40d442964d4eb5a03bbd7580959ecfc530f18 | thebjorn/pydeps,thebjorn/pydeps | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-fsm-log',\n version='1.2.1',\n description='Logging for django-fsm',\n author='Gizmag',\n author_email='<EMAIL>',\n url='https:/... | python | edit | 1 | 0 | mit | e44821e50b4d8eb1aff8906703696ae2ae7fb889 | gizmag/django-fsm-log,ticosax/django-fsm-log | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tangled.mako',\n version='1.0a4.dev0',\n description='Tangled Mako integration',\n long_description=open('README.rst').read(),\n url='http://tangledframework.org/',\n downlo... | python | edit | 1 | 0 | mit | 62288de60f1407fa03dfa3e4605a8383b580f881 | TangledWeb/tangled.mako | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(name='pyscores',\n version='0.2',\n description='Football (soccer) scores in your command line',\n url='https://github.com/conormag94/pyscores',\n author='Conor Maguir... | python | edit | 1 | 0 | mit | 8fa28f4d78c4c2ffb23c8088a4983a77a41cd805 | conormag94/pyscores | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))... | python | edit | 1 | 0 | apache-2.0 | 9d248a665c3dd17688e16253c484f9e05de4f1cb | uw-it-aca/mdot-rest,uw-it-aca/mdot-rest | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\ndef test_import_completer():\n from IPython.core import completer\n\ndef test_import_crashhandler():\n from IPython.core import crashhandler\n\ndef test_import_debugger():\n from IPython.core import debugger\n\... | python | edit | 20 | 1 | bsd-3-clause | f71b166523ee3772d2ff931f9e2a893303654cb4 | ipython/ipython,ipython/ipython | IPython/core/tests/test_imports.py | rejected_lint | Too many lint violations: 20 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import migrations\n\n\ndef fix_gis_data_serialization(apps, schema_editor):\n \"\"\"\n Release 1.20.0 introduced a change which let the project \"gis_data\"\n field get updated by modificatio... | python | edit | 1 | 3 | apache-2.0 | 37cb8d17871045b47af684e856e216d628c964f4 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | src/mmw/apps/modeling/migrations/0024_fix_gwlfe_gis_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nfrom .views import web_client_view\n\n\nurlpatterns = [\n # url(r'^', include('kobra.api.v1.urls', namespace='legacy')),\n url(r'^... | python | edit | 1 | 0 | mit | feb88aa30b362e02671d51d8b3e03a7194d99646 | karservice/kobra,karservice/kobra,karservice/kobra,karservice/kobra | kobra/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport fuckit_commit\n\nclass Fuckit_CommitTestCase(unittest.TestCase):\n '''\n Unit Test cases for fuckit_commit\n '''\n def setUp(self):\n\tpass\n\n def test_send_sms(self):\n pass\n\n def tearDow... | python | edit | 7 | 1 | mit | 15463168ed715761eaf483a1e53eb74d92b83e04 | ueg1990/fuckit_commit | tests.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.core.validators import EmailValidator, ValidationError\n\nimport redis\n\n\ndef get_redis_connection():\n \"\"\"\n Helper used for obtain a raw redis client.\n ... | python | edit | 1 | 2 | bsd-3-clause | 459916c800f09e7600ae7442bb34236b9f418f53 | feedhq/feedhq,rmoorman/feedhq,rmoorman/feedhq,rmoorman/feedhq,rmoorman/feedhq,feedhq/feedhq,feedhq/feedhq,feedhq/feedhq,feedhq/feedhq,rmoorman/feedhq | feedhq/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import NamedTuple\n\n\nclass Transform(NamedTuple):\n \"\"\"Type used for 2x3 affine transforms.\n\n See wikipedia for details:\n http://en.wikipedia.org/wiki/Affine_transformation\n\n The properties map to the matri... | python | edit | 1 | 1 | mit | 1902ed44f41eabf1c8207e47d5c31dd58471146f | viblo/pymunk,viblo/pymunk | pymunk/transform.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom time import sleep, time\nfrom fabric.api import execute, task, env\n\nimport app_config\nimport sys\nimport traceback\n\ndef safe_execute(*args, **kwargs):\n try:\n execute(*args, **kwargs)\n excep... | python | edit | 2 | 2 | mit | 2c1282680bc9d84e37c40923e8ca288bf8547998 | nprapps/elections14,nprapps/elections14,nprapps/elections14,nprapps/elections14 | fabfile/daemons.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom axiom.store import Store\nfrom axiom.userbase import LoginSystem\n\nfrom xmantissa.webadmin import DeveloperApplication, DONTUSETHISBenefactor\nfrom xmantissa.webapp import PrivateApplication\nfrom xmantissa.website import WebSite\nf... | python | edit | 1 | 1 | mit | 9ad85436f2b47aa76246eccc8b9fc4361db86f4f | twisted/mantissa,twisted/mantissa,twisted/mantissa | xmantissa/examples/autoapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom waldur_core.core import WaldurExtension\n\n\nclass MarketplaceRemoteExtension(WaldurExtension):\n @staticmethod\n def django_app():\n return 'waldur_mastermind.marketplace_remote'\n\n @staticmethod\n def is_assembly(... | python | edit | 1 | 1 | mit | cb30232b201934622efb2f972cca5087a1373cf7 | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind | src/waldur_mastermind/marketplace_remote/extension.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport atexit\nimport os\nimport tempfile\n\ntmpdir = tempfile.TemporaryDirectory()\nos.environ.setdefault('DATA_DIR', tmpdir.name)\n\nfrom pretix.settings import * # NOQA\n\nDATA_DIR = tmpdir.name\nLOG_DIR = os.path.join(DATA_DIR, 'logs')... | python | edit | 1 | 0 | apache-2.0 | 8f5849a90c63c82b036e21d36b9d77b20e1aa60b | Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix | src/pretix/testutils/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# License: MIT (doc/LICENSE)\n# Author: Todd Gaunt\n#\n# File: imgfetch/fourchan.py\n# This file contains the logging functions for writing to stdout stderr etc...\n\nfrom sys import stderr\n\nPROGRAM_NAME = \"imgfetch: \"\n\ndef error(l... | python | edit | 1 | 4 | isc | 909f36eecdf38f0915f945144966c892e09670ff | toddgaunt/imgfetch | src/logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport konstrukteur.Konstrukteur\n\n@task\ndef build(regenerate = False):\n\t\"\"\"Generate source (development) version\"\"\"\n\n\tkonstrukteur.Konstrukteur.build(regenerate)\n\n```\n\nApply this change: Fix asset loading in skeleton"
},... | python | edit | 5 | 1 | mit | b89c94cb55db1d8252b75949b5cba919e0b69a6e | fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur | skeleton/website/jasyscript.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\n\ndef run(cmd):\n ret = os.system(cmd)\n if ret != 0:\n raise Exception(\"Command failed: %s\" % cmd)\n\n# Assuming local = conan_server and Artifactory remotes\noutput = subprocess.check_output(... | python | edit | 1 | 2 | apache-2.0 | 2403cbe2aa8f515bdd8f575112478010389ee48b | JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts | conan/ConanServerToArtifactory/migrate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cacheops.query import cached_as, \\\n cached_view_as as _cacheops_cached_view_as, \\\n install_cacheops\n\n# TODO: This should be run automatically by django. I have no idea why it is... | python | edit | 3 | 2 | mit | 7d7209bbe92045c3becc770cee004bcdc9640098 | cyanfish/heltour,cyanfish/heltour,cyanfish/heltour,cyanfish/heltour | heltour/tournament/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Test configuration for quick execution.\n#\n# This settings file will not work for tests against\n# Django 1.6, as it does not support Auto incrementing primary\n# keys in way required by django-name.\nfrom .base import *\n\n\nDATABASES =... | python | edit | 2 | 0 | bsd-3-clause | 8ab21dc5148c43a5ba9473c03e3fb5baaf686ed6 | damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name | tests/settings/test-sqlite.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport redis\nimport json\nimport time\n\nclass DHTStorage():\n\tdef __init__(self, key):\n\t\tself.redis = redis.StrictRedis(host='localhost', port=6379, db=0)\n\t\tself.key = key\n\n\tdef get_key(self, name):\n\t\treturn \"%s:%s\" % (self... | python | edit | 1 | 1 | mit | 3d3862b0c7ea872e690999f46de88be287598758 | Ajnasz/pippo,Ajnasz/pippo,Ajnasz/pippo | lib/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nmylang = 'test'\nfamily = 'wikipedia'\n\n\ncustom_path = os.path.expanduser('~/user-config.py')\nif os.path.exists(custom_path):\n with open(custom_path, 'rb') as f:\n exec(compile(f.read(), custom_path, 'exec'), glob... | python | edit | 3 | 0 | mit | 4cec5250a3f9058fea5af5ef432a5b230ca94963 | yuvipanda/paws,yuvipanda/paws | images/singleuser/user-config.py | rejected_duplicate | Near-duplicate of sample 13010 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import viewsets\n\nfrom .models import Farmer\nfrom .serializers import FarmerSerializer\n\n\nclass FarmerViewSet(viewsets.ReadOnlyModelViewSet):\n queryset = Farmer.objects.all()\n serializer_class = FarmerSeriali... | python | edit | 1 | 0 | bsd-2-clause | fd77e3211e2298457b9778f409c56c70a36bf3db | tm-kn/farmers-api | farmers_api/farmers/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom phi.flow import *\n\ndomain = Domain([64, 64], boundaries=PERIODIC)\nworld.add(BurgersVelocity(domain, velocity=lambda s: math.randfreq(s) * 2), physics=Burgers())\n\nshow(App('Burgers Equation in %dD' % len(domain.resolution), framera... | python | edit | 11 | 0 | mit | e676f59b445157d1cc247ada74e0b7b1fc1afced | tum-pbs/PhiFlow,tum-pbs/PhiFlow | demos/burgers_sim.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nimport create_minimal_image\nfrom create_minimal_image import main\n\nPOPEN_COMMAND_LIST = \"\"\n\n\nclass CreateMinimalImageTest(TestCase):\n\n def setUp(self):\n global POPEN_COMMAND_LIST\n ... | python | edit | 1 | 3 | mit | 26b1d4f47c742f33c4ecdac68e88dbbc958e5756 | williamsbdev/minimal-docker-image-maker,williamsbdev/minimal-docker-image-maker | tests/create_minimal_image_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom Bio import SeqIO\nfrom Bio.SeqRecord import SeqRecord\n\nif len(sys.argv) < 5: \n print(\"Usage: %s <length threshold> <contigs_file> <suffix> <output>\" % sys.argv[0])\n sys.exit(1) \n\nf_n = s... | python | edit | 1 | 0 | mit | 0ddaed24e0f011ca1bb777af49936f64684a7d4c | tanaes/snakemake_assemble,tanaes/snakemake_assemble,tanaes/snakemake_assemble | bin/scripts/contig_length_filter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nDRIVER = 'devops.driver.libvirt.libvirt_driver'\nDRIVER_PARAMETERS = {\n 'connection_string': 'qemu:///system',\n }\n\nINSTALLED_APPS = ['devops']\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postg... | python | edit | 1 | 0 | apache-2.0 | 2dadeef44576ac5ecbb67b929c4190675c449c7f | stackforge/fuel-devops,stackforge/fuel-devops | devops/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom slackclient._user import User\nfrom slackclient._server import Server, SlackLoginError\nfrom slackclient._channel import Channel\nimport json\nimport pytest\n\n\n@pytest.fixture\ndef login_data():\n login_data = open('_pytest/data/r... | python | edit | 4 | 1 | mit | 8362216a009763d4bf70c55819a74cc98c8e9ffe | slackhq/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient | _pytest/test_server.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sparts.tasks.periodic import PeriodicTask\nfrom sparts.vservice import VService\nfrom sparts.sparts import option\nimport socket\n\nclass HostCheckTask(PeriodicTask):\n INTERVAL=5\n check_name = option(default=socket.getfqdn(), t... | python | edit | 1 | 1 | bsd-3-clause | 21af3dbed471c9f6c860db4d2ae84d1e0fed4077 | facebook/sparts,fmoo/sparts,bboozzoo/sparts,djipko/sparts,pshuff/sparts,pshuff/sparts,fmoo/sparts,facebook/sparts,djipko/sparts,bboozzoo/sparts | demo/option_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"The main form for the application\"\"\"\n\nfrom PythonCard import model\n\n# Allow importing of our custom controls\nimport PythonCard.resource\nPythonCard.resource.APP_COMPONENTS_PACKAGE = \"vb2py.targets.pythoncard.vbcontrols\"\n\nc... | python | edit | 2 | 3 | bsd-3-clause | a7c447db15a0b07043b8973ffa318aed858c5ded | mvz/vb2py,mvz/vb2py,mvz/vb2py | targets/pythoncard/basesource.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8\n\nimport pytest\nimport requests\n\n\n@pytest.mark.parametrize('path', [\n # Check pagination is working correctly\n '/page/2/', '/page/3/',\n])\ndef test_pages_appear_correctly(path):\n ... | python | edit | 1 | 1 | mit | 0cb41062401670a3e423b610d1f128657a9ce623 | alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net | _tests/test_links.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014 - Rackspace Hosting\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... | python | edit | 1 | 0 | apache-2.0 | 7bf6d13389391c1f3cbea7873cf12f345546d789 | devdattakulkarni/test-solum,stackforge/solum,stackforge/solum,openstack/solum,openstack/solum,devdattakulkarni/test-solum | tools/send-echo-to-worker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport pyqrcode # sudo pip install pyqrcode\n\ndef getQRArray(text, errorCorrection):\n\t\"\"\" Takes in text and errorCorrection (letter), returns 2D array of the QR code\"\"\"\n\t# White is True (1)\n\t# Black is Fal... | python | edit | 1 | 5 | mit | 1661174b80e00ff04a2df245abf73b92825ec01a | btcspry/3d-wallet-generator | libs/qr_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom activate import deactivate\n\"\"\"\nScript to deactivate LUFA for Arduino.\nMore info can be found in the activate.py script.\n\"\"\"\n\nif __name__ == '__main__':\n deactivate()\n```\n\nApply this change: Add final newline to make ... | python | edit | 1 | 0 | mit | 898bd274329bf0f279565091f6ceee9073640bf6 | Palatis/Arduino-Lufa,Palatis/Arduino-Lufa,Palatis/Arduino-Lufa | deactivate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Created On: 2012/01/23\n# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)\n# \n# This software is licensed under the \"BSD\" License as described in the \"LICENSE\" file, \n# which should be included with this package. The te... | python | edit | 1 | 2 | bsd-3-clause | b0edec6bc9a4d77a1f0ea0f803ea892f35cc2f4f | hsoft/qtlib | text_field.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n\ntry:\n import unittest.mock as mock\nexcept ImportError:\n import mock\nimport unittest\ntry: \n from StringIO import StringIO\nexcept ImportError:\n from io import StringIO\n\nfrom nessu... | python | edit | 1 | 1 | mit | 848723c943cfb8995c6f2a68ea19b203c75e4aaa | sait-berkeley-infosec/pynessus-api | tests/test_scan.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urlparse import urlparse\n\nfrom torrent import Torrent\nfrom trackers.udp import UDPTracker\n\n\nclass Client(object):\n __TORRENTS = {}\n\n @property\n def torrents(self):\n return self.__TORRENTS\n\n @torrents.setter\n def t... | python | edit | 2 | 4 | apache-2.0 | 58cbb8b3dbe8d1275743c3fd5d043cfa12914cb3 | vtemian/university_projects,vtemian/university_projects,vtemian/university_projects | data_structures/bitorrent/client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import render_template\nfrom flask_classy import FlaskView\nfrom ..models import PostModel\n\n\nclass Main(FlaskView):\n \"\"\" Main page view. \"\"\"\n\n route_base = \"/\"\n\n def index(self):\n posts = PostMode... | python | edit | 1 | 1 | mit | 648189583d78efef9ec8f65e861e1321c397c1a6 | oldani/nanodegree-blog,oldani/nanodegree-blog,oldani/nanodegree-blog | app/views/main_view.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom itertools import cycle\nfrom psycopg2.extras import register_hstore, register_json\nimport psycopg2\nimport threading\nimport ujson\n\n\nclass DBAffinityConnectionsNoLimit(object):\n\n # Similar to the db affinity pool, but without ... | python | edit | 1 | 3 | mit | 5bb6cc3ffb92736515df94b62d7d1981eadd7c44 | tilezen/tilequeue,mapzen/tilequeue | tilequeue/postgresql.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nVarious functions to dynamically import (abitrary names from) arbitrary files.\n\nTo import a file like it is a module, use `import_file`.\n\"\"\"\n\nfrom importlib.util import module_from_spec, spec_from_file_location\n\n\ndef impo... | python | edit | 1 | 3 | mit | a9bb32b91e2b742705b6292bd52fc869a8130766 | ErwinJanssen/dymport.py | dymport/import_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper\nfrom django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations\nfrom django.db.backends.mysql.creation import DatabaseCreation as My... | python | edit | 3 | 2 | bsd-3-clause | e5e61e4d2575a39d585b3c51c082b2b53bade7bb | smartfile/django-sphinx-db,rutube/django-sphinx-db,anatoliy-larin/django-sphinx-db,jnormore/django-sphinx-db,petekalo/django-sphinx-db | django_sphinx_db/backend/sphinx/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom engine import file_loader\n\n\nclass FileLoaderTest(unittest.TestCase):\n def test_load_units(self):\n dicts = file_loader.read_and_parse_json('units')\n self.assertIsInstance(dicts, list)\n s... | python | edit | 1 | 2 | mit | d017ca19b6d810387424e388656d5ff63244a1f7 | Tactique/game_engine,Tactique/game_engine | tests/engine/file_loader_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\n# Successful retrieval\n# Accurate retrieval\n# Comprehensive retrieval of sub-resources\n\n\n@pytest.mark.skip(reason='not implemented')\ndef test_retrieveWARCRecord_fromIPFSHash():\n pass\n\n\n@pytest.mark.skip(reason=... | python | edit | 1 | 1 | mit | e0e53c594569c24eee4e4b58f567f6d9099806df | oduwsdl/ipwb,oduwsdl/ipwb,oduwsdl/ipwb,oduwsdl/ipwb | tests/test_replay.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport importlib\nimport importlib.machinery\n\nimport sys\n\nfrom module import Module\nimport json\n\n\ndef message_to_function(raw_message):\n \"\"\"\n converting json formatted string to a executable module.\n\n Args:\n ... | python | edit | 1 | 8 | apache-2.0 | bf5532f405df8869b4869c2d839e6093ebf963bc | hoonkim/rune,hoonkim/rune,hoonkim/rune | wisp/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom us_ignite.apps.models import (Application, ApplicationURL,\n ApplicationImage, Domain, Feature)\n\n\nclass ApplicationURLInline(admin.TabularInline):\n model = Ap... | python | edit | 1 | 0 | bsd-3-clause | 88f0c284b01bf5b4545fe63bdd1fde7cc66ad937 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/apps/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Exercise 4.1 from Kane 1985\"\"\"\n\nfrom sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter\nfrom sympy.physics.mechanics import ReferenceFrame, Point\nfrom sympy i... | python | edit | 5 | 1 | bsd-3-clause | 4a5e798fe23d720315a7cab60824b70ce0983f8e | jcrist/pydy,Shekharrajak/pydy,oliverlee/pydy,jcrist/pydy,jcrist/pydy,oliverlee/pydy,jcrist/pydy,Shekharrajak/pydy,oliverlee/pydy,jcrist/pydy,Shekharrajak/pydy,jcrist/pydy,skidzo/pydy,Shekharrajak/pydy,skidzo/pydy,skidzo/pydy,jcrist/pydy,skidzo/pydy | Kane1985/Chapter2/Ex4.1.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#... | python | edit | 1 | 0 | apache-2.0 | 77c6fd50fdc2bd7e716ecfba30e8e18e27b3c0eb | openstack/oslo.concurrency,varunarya10/oslo.concurrency,JioCloud/oslo.concurrency | oslo/__init__.py | rejected_duplicate | Near-duplicate of sample 397 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom genes.apt import commands as apt\nfrom genes.brew import commands as brew\nfrom genes import debian\nfrom genes.debian.traits import is_debian\nfrom genes.ubuntu.traits import is_ubuntu\nfrom genes.mac.traits import is_osx\n\n\ndef mai... | python | edit | 1 | 4 | mit | 82954c638aa013a037125e0c9f167045f38da504 | hatchery/genepool,hatchery/Genepool2 | genes/docker/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n'''Implementation of a simple hash table.\nThe table has `hash`, `get` and `set` methods.\nThe hash function uses a very basic hash algorithm to insert the value \ninto the table.\n'''\n\n\nclass HashItem(object):\n... | python | edit | 1 | 2 | mit | d961c644f74d83150e3f5a3ea9599af0d2b839ae | jwarren116/data-structures-deux | hash_table.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom infosystem.database import db\nfrom infosystem.common.subsystem import entity\n\n\nclass Domain(entity.Entity, db.Model):\n\n attributes = ['name', 'parent_id']\n attributes += entity.Entity.attributes\n\n name = db.Column(db.... | python | edit | 1 | 1 | apache-2.0 | 4a528978e9a783b9fb4f25d31a32a2ca524d7ce1 | samueldmq/infosystem | infosystem/subsystem/domain/resource.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport weakref\nimport sunpy\n\nclass MapManager(weakref.WeakSet):\n \"\"\"Weak referenced set of maps created using functions decorated by manage_maps.\"\"\"\n\n def __repr__(self):\n return str(self.data)\n\ndef manage_maps(f... | python | edit | 1 | 1 | bsd-2-clause | 0b41bdf6897bb070fc3d90aa5d90228e744dee60 | mjm159/sunpy,dpshelio/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,Alex-Ian-Hamilton/sunpy,mjm159/sunpy | sunpy/util/map_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-04-10 14:33\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ]\n\n operatio... | python | edit | 1 | 0 | bsd-2-clause | 3ee00fad1965dae23f83da870d7df1cb37727c7a | carlohamalainen/django-struct-log | structlog/migrations/0001_initial.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2022 The visu3d Authors.\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 License at\n#\n# http://www... | python | edit | 1 | 0 | apache-2.0 | 8ecf9d95cf7f085b0245b07422ccda007937a5c6 | google-research/visu3d | visu3d/array_dataclass.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom bs4 import BeautifulSoup\n\n\ndef parse_html(html, **kwargs):\n parsed_html = BeautifulSoup(html, 'lxml')\n\n headline = parsed_html.body.find('h1')\n paragraph = None\n\n # Parse Paragraph\n content_c... | python | edit | 1 | 9 | mit | 4130c082ae3008365c854ad65c4510cb04dfbf27 | alamasfu10/webcrawler | webcrawler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom .models import Release, Track, Comment\n\n\nclass CommentSerializer(serializers.ModelSerializer):\n class Meta:\n model = Comment\n fields = ('id', 'comment')\n\nclass TrackSeria... | python | edit | 1 | 0 | mit | cffa73ae51f63ec5e107d9df98b1eb5b44fa64b8 | ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists | backend/catalogue/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\n\n\ndef timedelta_months(months, compare_date=None):\n \"\"\"\n Return a JSON response.\n\n :param months: Amount of months to offset\n :type months: int\n :param compare_date: Date to compare at\n :type c... | python | edit | 1 | 2 | mit | c4dd6502bc7b9d5970a659c57e6aa2d25cc00fe5 | z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask | catwatch/lib/util_datetime.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom termcolor import colored\nfrom appscript import *\nfrom track import Track\n\n\ndef main():\n print(get_song())\n\n\ndef get_song():\n itunes_open = bool(app('System Events').processes[its.name == 'iTunes... | python | edit | 6 | 3 | mit | 4da79cbec5880da6fb16b5a474786247a820d09c | kshvmdn/nowplaying | nowplaying.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for cherrypy/lib/httputil.py.\"\"\"\n\nimport unittest\nfrom cherrypy.lib import httputil\n\n\nclass UtilityTests(unittest.TestCase):\n\n def test_urljoin(self):\n # Test all slash+atom combinations for SCRIPT_NAME and... | python | edit | 1 | 1 | bsd-3-clause | fb10e4b8ae37f1442bdb643c27ea0b984da6a374 | cherrypy/cherrypy,Safihre/cherrypy,Safihre/cherrypy,cherrypy/cherrypy | cherrypy/test/test_httputil.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 The LUCI Authors. All rights reserved.\n# Use of this source code is governed by the Apache v2.0 license that can be\n# found in the LICENSE file.\n\n\"\"\"Dimensions for the Machine Provider.\"\"\"\n\nfrom protorpc import ... | python | edit | 1 | 0 | apache-2.0 | 54cfb9864256b27b9f4cd411f170cc12d47727e5 | luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py | appengine/components/components/machine_provider/dimensions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom anser import Anser, Client\n\n\nclass BasicAnserTest(unittest.TestCase):\n\n def test_creation(self):\n server = Anser(__file__)\n self.assertEquals(server.name, __file__)\n\n def test_creation_expl... | python | edit | 1 | 1 | mit | b570dc035110ca8b27af30fde78d2bb6e364417f | iconpin/anser | test/basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\ndef setting(name):\n return name.upper()\n\ndef path(subpath):\n project_root = os.path.dirname(os.path.realpath(__file__))\n return os.path.join(project_root, subpath)\n\n\n```\n\nApply this change: Fix 'path' funct... | python | edit | 1 | 1 | mit | 1421dd89b74bf753cf0b52a5e6fe200d221922b5 | piotrekw/pirx | pirx/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass IndexForm(forms.Form):\n usos_auth_pin = forms.IntegerField(label='USOS Authorization PIN')\n id_list = forms.CharField(\n widget=forms.Textarea, label='ID List',\n help_text='List of ... | python | edit | 1 | 0 | mit | 020b2518efce2d973093a366e0a9abfadbd602fd | m4tx/usos-id-mapper,m4tx/usos-id-mapper | main/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass MailgunLog(models.Model):\n log_hash = models.CharField(max_length=64, unique=True)\n data = models.TextField()\n timestamp = models.DateTime()\n\n```\n\nApply this change: Fix incorrect models... | python | edit | 1 | 0 | mit | 04541918979c02b6dcd07d2c960cd24b9a745d10 | p2pu/mechanical-mooc,p2pu/mechanical-mooc,p2pu/mechanical-mooc,p2pu/mechanical-mooc | mailgun/db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nPostpasses over the LLVM IR.\nThe signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc\n\"\"\"\n\nfrom __future__ import print_function, division, absolute_import\n\nfrom numba.support.mat... | python | edit | 1 | 3 | bsd-2-clause | 662046497abfa6f7f6553aeb266a261637ba6407 | jriehl/numba,jriehl/numba,stefanseefeld/numba,seibert/numba,gdementen/numba,sklam/numba,pitrou/numba,stefanseefeld/numba,stuartarchibald/numba,stonebig/numba,numba/numba,GaZ3ll3/numba,ssarangi/numba,sklam/numba,cpcloud/numba,sklam/numba,ssarangi/numba,stonebig/numba,gdementen/numba,pombredanne/numba,GaZ3ll3/numba,seibe... | numba/postpasses.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom waldur_core.cost_tracking import ConsumableItem\nfrom waldur_core.cost_tracking.models import DefaultPriceListItem\n\nfrom . import models, PriceItemTypes\n\n\ndef get_consu... | python | edit | 1 | 1 | mit | f02fe06dad6760bb7ba88fbbf1e32b90f2c1d22e | opennode/nodeconductor-openstack | src/waldur_openstack/openstack_tenant/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom termcolor import colored\nfrom appscript import *\nfrom track import Track\n\n\ndef main():\n print(get_song())\n\n\ndef get_song():\n itunes_open = bool(app('System Events').processes[its.name == 'iTunes... | python | edit | 6 | 3 | mit | b44b0f68a2dd00df1ec074cf39a66ce81cd0dae2 | kshvmdn/nowplaying | nowplaying.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom dbaas_dbmonitor.provider import DBMonitorProvider\nfrom dbaas_zabbix.provider import ZabbixProvider\nimport logging\n\nLOG = logging.getLogger(__name__)\n\nclass MonitoringManager():\n \n @classmethod\n def create_monitoring(c... | python | edit | 7 | 2 | bsd-3-clause | 5fef15285060b384ec2fd56b328e9848a63d1be0 | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | dbaas/integrations/monitoring/manager.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\nimport platform\n\n\ndef is_debian(versions=None, distro_name='Debian'):\n operating_system = platform.system()\n distribution, version, codename = platform.linux_distribution()\n\n is_version = True\n ... | python | edit | 1 | 5 | mit | 8791ddc33037f4ab3d93ae834fbbb9d551ab0837 | hatchery/Genepool2,hatchery/genepool | genes/debian/traits.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\n# Model Field Reference\n# https://docs.djangoproject.com/en/1.8/ref/models/fields/\n\n\nclass Tag(models.Model):\n name = models.CharField(\n max_length=31, unique=True)\n slug = models.SlugFi... | python | edit | 1 | 1 | bsd-2-clause | 3c8067a1b8fb3463fa4c45a6f03c8dc0fbf918b3 | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | organizer/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom haystack import indexes\n\nfrom celery_haystack.indexes import CelerySearchIndex\n\nfrom .models import FoiRequest\n\n\nclass FoiRequestIndex(CelerySearchIndex, indexes.Indexable):\n text = indexes.EdgeNgramField(document=True, use_... | python | edit | 1 | 1 | mit | a8f9f1dffc9dd345504005427f9f02ae8e1e07a4 | ryankanno/froide,CodeforHawaii/froide,fin/froide,LilithWittmann/froide,ryankanno/froide,stefanw/froide,ryankanno/froide,okfse/froide,CodeforHawaii/froide,okfse/froide,okfse/froide,catcosmo/froide,stefanw/froide,LilithWittmann/froide,ryankanno/froide,fin/froide,ryankanno/froide,catcosmo/froide,catcosmo/froide,LilithWitt... | froide/foirequest/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom robber import expect\nfrom robber.matchers.contain import Contain\n\nclass TestAbove(unittest.TestCase):\n def test_matches(self):\n expect(Contain({'key': 'value'}, 'key').matches()) == True\n expect(... | python | edit | 1 | 1 | mit | 776d5a686445712c6b3b1a4da72c45f2a1664e64 | taoenator/robber.py,vesln/robber.py | tests/matchers/test_contain.py | rejected_duplicate | Near-duplicate of sample 9908 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport toolz\nimport toolz.curried\nfrom toolz.curried import take, first, second, sorted, merge_with, reduce\nfrom operator import add\n\n\ndef test_take():\n assert list(take(2)([1, 2, 3])) == [1, 2]\n\n\ndef test_first():\n assert ... | python | edit | 1 | 1 | bsd-3-clause | 16214545b301aaba4847ffae5efe67782abe993d | machinelearningdeveloper/toolz,llllllllll/toolz,jdmcbr/toolz,llllllllll/toolz,pombredanne/toolz,machinelearningdeveloper/toolz,simudream/toolz,jcrist/toolz,cpcloud/toolz,quantopian/toolz,jcrist/toolz,jdmcbr/toolz,pombredanne/toolz,cpcloud/toolz,simudream/toolz,quantopian/toolz | toolz/tests/test_curried.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom plumbum import local\nimport subprocess\n\nPY_ENV = 'py_env'\n\n\ndef install_environment():\n assert local.path('setup.py').exists()\n # Return immediately if we already have a virtualenv\n if local.path(PY_ENV).exists():\n... | python | edit | 1 | 2 | mit | 1a8095e71e81eff716524fa75eb9f07615ee61d2 | chriskuehl/pre-commit,philipgian/pre-commit,chriskuehl/pre-commit,Teino1978-Corp/pre-commit,pre-commit/pre-commit,dnephin/pre-commit,beni55/pre-commit,beni55/pre-commit,philipgian/pre-commit,pre-commit/pre-commit,Lucas-C/pre-commit,barrysteyn/pre-commit,pre-commit/pre-commit,chriskuehl/pre-commit-1,barrysteyn/pre-commi... | pre_commit/languages/python.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nformat-sql\n\nCopyright (c) 2014, Friedrich Paetzke (<EMAIL>)\nAll rights reserved.\n\n\"\"\"\nimport os\n\nfrom format_sql.file_handling import format_file, load_from_file, main\n\n\ndef get_test_file(filen... | python | edit | 1 | 1 | bsd-2-clause | 4858a17940ec4b4425f743813c0c1ecef391d967 | paetzke/format-sql | tests/test_file_handling.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n\nclass OracleConfig(AppConfig):\n name = 'nodeconductor_paas_oracle'\n verbose_name = 'Oracle'\n service_name = 'Oracle'\n\n def ready(self):\n from nodeconductor.structure import Sup... | python | edit | 1 | 1 | mit | e5f00a6a5e71d8f5fe98547732f4c9e15a3efc1e | opennode/nodeconductor-paas-oracle | src/nodeconductor_paas_oracle/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\r\nimport os\r\n\r\nPROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))\r\nSRC_DIR = os.path.join(PROJECT_DIR, \"src\")\r\nTEST_DIR = os.path.join(PROJECT_DIR, \"test\")\r\n\r\ndef runtestdir(subdir):\r\n #cwd = os.getcwd()\r\n ... | python | edit | 3 | 5 | mit | 344457b498f12dfceb8e687b326ba68064d6bda6 | divtxt/binder | run-tests.py | rejected_duplicate | Near-duplicate of sample 13067 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TestREPLPOReplType.py\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors\n# Licensed under Apache License v2.0 with Runtime Library Exception\n#\n# ... | python | edit | 7 | 1 | apache-2.0 | 5d1a3ffedcb451a6a52b5e3492a56ef7663438d3 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | packages/Python/lldbsuite/test/repl/po_repl_type/TestREPLPOReplType.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pygame.mixer import Sound\n\nclass SelectStateSFX(object):\n \"\"\"Plays sound effects that are used by both the Character Select\n State and the Stage Select State.\n\n Class Constants:\n SCROLL_PATH: A String for the ... | python | edit | 1 | 1 | unlicense | 2e9d4d4b43a59b65dde1bb9196786f88eeb6edf0 | MarquisLP/Sidewalk-Champion | lib/game_states/select_state_sfx.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport time\nimport jsonschema\nfrom pkg_resources import resource_string\nfrom flask import request, jsonify\nfrom brew import app, controller, machine, mongo\n\n\n@app.route('/api/recipe', methods=['POST'])\ndef create_recipe... | python | edit | 1 | 2 | mit | 43d4b6a3ccf49b3a0307da98344b0fe8f61acaf1 | brewpeople/brewmeister,brewpeople/brewmeister,brewpeople/brewmeister | brew/rest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport re\nimport sys\n\n_, VERSION, CHANGELOG, LIST = sys.argv\nHEADER_REGEX = fr\"# {VERSION} \\(\\d\\d\\d\\d-\\d\\d-\\d\\d\\)\\n\"\n\nnotes_list = []\n\n\ndef add_to_release_notes(line):\n assert line.endswi... | python | edit | 1 | 3 | mit | f5fd74dac54f657cc64fdaa0b838b00b72ce5ee6 | jendrikseipp/vulture,jendrikseipp/vulture | dev/make-release-notes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom csv_ical import convert\n\n\nclass TestConvert(unittest.TestCase):\n def setUp(self):\n self.convert = convert.Convert()\n\n def test_generate_configs(self):\n self.convert._generate_configs_from_... | python | edit | 2 | 1 | mit | d3438e85ab4158d769b0662729a8aff7d143971a | albertyw/csv-to-ical | csv_ical/tests/test_convert.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.