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 sys\nimport json\n\nfrom detectem.exceptions import SplashError, NoPluginsError\n\ntry:\n from bottle import run, post, request\nexcept ImportError:\n print(\"Install bottle to use the web service ..\")\n sys.exit(0)\n\n\nfr...
python
edit
1
2
mit
ab1ea39c020e39bdc7b739e2ab49b1cacbecd081
spectresearch/detectem
detectem/ws.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\"\"\"\nThis script takes the path to a directory, and looks for any Turtle files\n(https://www.w3.org/TeamSubmission/turtle/), then uses RDFLib to check if\nthey're valid TTL.\n\nIt exits w...
python
edit
1
2
mit
c897942c8b1c3d9283ea6453bcc6616ca3d5108e
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
builds/python3.6_ci/src/lint_turtle_files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nfrom rest_framework import viewsets, serializers\nfrom physical import models\n\n\nclass EnvironmentSerializer(serializers.HyperlinkedModelSerializer):\n\n ...
python
edit
1
5
bsd-3-clause
3f65b43bce12739af8bb3dfc451a7f58a6af12b1
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/api/environment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom config import PASSWORD_LENGTH\nfrom sqlalchemy import BigInteger, Column, ForeignKey, String\nfrom sqlalchemy.ext.declarative import declarative_base\n\nBase = declarative_base()\n\n\nclass User(Base):\n __tablename__ = 'user'\n\n ...
python
edit
1
1
mit
32cd8227260f5c2fedc50b9b817ee27df2398a82
HueyPark/Unreal-Knights,HueyPark/Unreal-Knights,HueyPark/Unreal-Knights,HueyPark/Unreal-Knights
Server/Code/database/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.db import models\n\nfrom Machine import models as mmod\n\nclass ContactInLine(admin.TabularInline):\n model = mmod.Contact\n max_num = 2\n\nclass StatusAdmin(admin.ModelAdmin):\n list_d...
python
edit
3
0
apache-2.0
3f9d79d50890f8605c7dfbaf5147b6f099b063b4
abztrakt/labtracker,abztrakt/labtracker,abztrakt/labtracker
Machine/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom gi.repository import GLib, Notify as LibNotify\n\n\nclass Notification(object):\n\n def __init__(self, title, message, subtitle=None, sticky=False):\n self.title = title\n self.subtitle = subtitle\n self.messa...
python
edit
2
2
bsd-3-clause
6854f889e38f565acb80c52a74df09730e0f7e45
westernx/uitools
uitools/notifications/linux.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add ui module to path" }, { "role": "assistant", "content": "__all__ = ['algorithms', 'dialogs', 'exporter', 'legend', 'mainui', 'puplot', 'tsplot', 'utils', 'ui']\n" } ]
python
new_file
10
0
isc
513aa1bd78d4f2d592ad5f34835331e315a5af77
jaj42/dyngraph,jaj42/GraPhysio,jaj42/GraPhysio
dyngraph/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom abc import ABCMeta, abstractmethod\nfrom game.gameboard import GameBoard\n\nclass Player(object):\n __metaclass__ = ABCMeta\n\n def __init__(self, color):\n self._color = color.lower()\n\n def col...
python
edit
3
2
apache-2.0
76df79075d0fdfb310a99f0805ccae253d439ee2
apojomovsky/cuatro_en_linea,apojomovsky/cuatro_en_linea
game/player.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\ndef files_and_folders(dir_path='.'):\n files = []\n folders = []\n for filename in sorted(os.listdir(dir_path)):\n if os.path.isdir(os.path.join(dir_path, filename)):\n folders.append(filename)\n ...
python
edit
1
3
apache-2.0
425152f3c65b6c58065cde9ccbcebd360289ec8c
cclauss/Ten-lines-or-less
files_and_folders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport os\nimport sys\nimport time\n\nfrom dear_astrid.constants import *\nfrom dear_astrid.constants import __all__ as _constants_all\nfrom dear_astrid.tzinfo import *\nfrom dear_astrid.tzinfo import __all__ as _tzinfo_all...
python
edit
4
3
mit
a1fdc8e14377d4fe619550e12ea359e5e9c60f0e
rwstauner/dear_astrid,rwstauner/dear_astrid
dear_astrid/test/helpers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''Abstract base classes.\n\nThese are necessary to avoid circular imports between core.py and fields.py.\n'''\n\n\nclass FieldABC(object):\n '''Abstract base class from which all Field classes inherit.\n '''\...
python
edit
1
1
mit
9c0f06228254a41bd68062feafaf8c8dbaddd06b
dwieeb/marshmallow,VladimirPal/marshmallow,bartaelterman/marshmallow,mwstobo/marshmallow,maximkulkin/marshmallow,Tim-Erwin/marshmallow,jmcarp/marshmallow,0xDCA/marshmallow,daniloakamine/marshmallow,marshmallow-code/marshmallow,xLegoz/marshmallow,Bachmann1234/marshmallow,jmcarp/marshmallow,0xDCA/marshmallow,etataurov/ma...
marshmallow/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -\n#\n# This file is part of the restpose python module, released under the MIT\n# license. See the COPYING file for more information.\n\"\"\"Python client for the RestPose search server.\n\n\"\"\"\n\nfrom .client impor...
python
edit
17
0
mit
50c734268a1380379d8d326a0860b2a9f2fade23
restpose/restpose-py,restpose/restpose-py
restpose/__init__.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nimport sys\n\nfrom casa_tools import myclean\n\n'''\nCleans an MS with a single channel given a mask and a model\n'''\n\nvis_1 = sys.argv[-5]\nvis_2 = sys.argv[-4]\nmodel = sys.argv[-3]\nmask = sys.argv[-2]\nout_root = sys.argv[-1]\n\ni...
python
edit
1
0
mit
a89983d2e218c6438587be9e6ea89e76f4c5a8c6
e-koch/VLA_Lband,e-koch/VLA_Lband
14B-088/Combined_HI/HI_single_channel_clean.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template as flask_render_template\nfrom db.models import EvalSettings\n\nfrom util.ldap import ldap_is_active\nfrom util.ldap import ldap_is_alumni\nfrom util.ldap import ldap_is_eboard\nfrom util.ldap import ldap_i...
python
edit
1
3
mit
f41ff2e0a2eee56dd090e729b4470923958444b9
ComputerScienceHouse/conditional,RamZallan/conditional,ComputerScienceHouse/conditional,RamZallan/conditional,RamZallan/conditional,ComputerScienceHouse/conditional
conditional/util/flask.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom block import Block\n\n\nclass TestBlock(unittest.TestCase):\n class MerkleTreeMock:\n pass\n\n def test_init(self):\n prev = 0x123123\n tree = TestBlock.MerkleTreeMock()\n time = 0x4...
python
edit
1
1
mit
746be2e5557f6626e984a679f1699c6a76fa932e
DrPandemic/pickaxe,DrPandemic/pickaxe,DrPandemic/pickaxe,DrPandemic/pickaxe
miner/block_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"EditorConfig Python Core\"\"\"\n\nfrom versiontools import join_version\n\nVERSION = (0, 11, 0, \"final\")\n\n__all__ = ['get_properties', 'EditorConfigError', 'exceptions']\n\n__version__ = join_version(VERSION)\n\n\ndef get_properti...
python
edit
4
1
bsd-2-clause
5c353a23dfc2378c97fb4888db09e4a505bf8f8f
johnfraney/editorconfig-vim,johnfraney/editorconfig-vim,johnfraney/editorconfig-vim,benjifisher/editorconfig-vim,VictorBjelkholm/editorconfig-vim,benjifisher/editorconfig-vim,benjifisher/editorconfig-vim,pocke/editorconfig-vim,VictorBjelkholm/editorconfig-vim,pocke/editorconfig-vim,VictorBjelkholm/editorconfig-vim,pock...
editorconfig/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport schalk_physiobank\n\ndef test_s1():\n r = schalk_physiobank.load(1)\n assert str(r) == 'Recording \"schalk-physiobank-s1\" (64 channels x 259520 '\\\n 'samples) at 160.00 Hz in 14 continuous blocks, with 362 events in 11 '\\\n ...
python
edit
1
1
bsd-3-clause
0141527409771ff9396252eedd02c6729aa3f3d9
breuderink/eegtools
eegtools/data/schalk_physiobank_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom atom.forms import SingleButtonMixin\nfrom braces.forms import UserKwargModelFormMixin\nfrom django import forms\n\nfrom .models import Institution\n\n\nclass InstitutionForm(SingleButtonMixin, UserKwargModelFor...
python
edit
1
1
mit
0c8e3f6d962a573618d5224b20b68e57790f4beb
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/institutions/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.6 on 2017-06-23 03:08\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\n# noinspection PyUnusedLocal\ndef add_station_sensor_link_to_reading(apps, schema_ed...
python
edit
1
3
apache-2.0
65695bd7c4c7fcf3449358c0946e4584bb30a8ec
qubs/data-centre,qubs/climate-data-api,qubs/data-centre,qubs/climate-data-api
climate_data/migrations/0024_auto_20170623_0308.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for refleaks.\"\"\"\n\nfrom cherrypy._cpcompat import HTTPConnection, HTTPSConnection, ntob\nimport threading\n\nimport cherrypy\n\n\ndata = object()\n\n\nfrom cherrypy.test import helper\n\n\nclass ReferenceTests(helper.CPWebCa...
python
edit
1
3
bsd-3-clause
f6b7a4ec8aa72acfd93e7f85199b251e91ca4465
cherrypy/cheroot,Safihre/cherrypy,cherrypy/cherrypy,cherrypy/cherrypy,Safihre/cherrypy
cherrypy/test/test_refleaks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\n\ndef print_message(message):\n print message\n\n\ndef print_filelist(header, filelist, colour=None):\n click.echo(header)\n\n for line in filelist:\n if colour:\n line = click.style(line, fg=colour)...
python
edit
2
8
mit
4ea698622a7a581b84ce61de8f5f65ce12f0c129
mcgid/morenines,mcgid/morenines
morenines/output.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom rest_framework.authtoken.views import obtain_auth_token\nfrom . import views\n\nurlpatterns = [\n url(r'^generate_pdf/(?P<bill_id>\\d+)$', views.generate_pdf,\n name='generate-pdf'),...
python
edit
1
0
mit
a5b3dd62e58dc23c03b7876ee99b757022413e94
ioO/billjobs
billjobs/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom six.moves.urllib_parse import urlparse\n\n\ndef from_docker_envvars(config):\n # linked postgres database (link name 'pg' or 'postgres')\n if 'PG_PORT' in os.environ:\n pg_url = urlparse...
python
edit
1
5
mit
56528264cdc76dc1b00804b7f67908d3bb1b1b0e
mbr/flask-appconfig
flask_appconfig/docker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nimport maya.app.renderSetup.model.renderSetup as renderSetup\nfrom maya import cmds\n\n\n@contextmanager\ndef enabled_render_layers():\n old_layer = cmds.editRenderLayerGl...
python
edit
1
4
mit
71798ca99fe7245a578ea1d6ba367e485d9ad5f8
danbradham/mvp
mvp/renderlayers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Git Commit Auto Save.\n\nSublime Text 3 package to auto save commit messages when the window is closed.\nThis allows the user to close the window without having to save before,\nor having to deal with the \"Save File\" popup.\n\"\"\"\...
python
edit
1
4
mit
c8a08042cc7eb0ddb0b617f1fb935691a5803a29
aristidesfl/sublime-git-commit-message-auto-save
gitcommitautosave.py
rejected_duplicate
Near-duplicate of sample 23713
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Unit tests for grid_utils module. \"\"\"\n\nfrom datetime import datetime\nimport numpy as np\n\nfrom tint import grid_utils\nfrom tint.testing.sample_objects import grid, field\nfrom tint.testing.sample_objects import params, grid_s...
python
edit
1
1
bsd-2-clause
809f2f781fb2186e3bad27cdd19115b6f425cd0b
openradar/TINT,openradar/TINT
tint/tests/test_grid_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gateway import net\n\n\nclass CameraDevice(object):\n def __init__(self, stream, address):\n self.resolution = None\n self.framerate = None\n self.__stream = stream\n self.__address = address\n\n def s...
python
edit
1
1
mit
b016fad5d55993b064a1c4d15fd281f439045491
walkover/auto-tracking-cctv-gateway
gateway/camera/device.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nInfrastructure for publishing a REST HTTP API.\n\"\"\"\n\nfrom ._infrastructure import structured\n\n\n__all__ = [\"structured\"]\n\n```\n\nApply this change: Address r...
python
edit
1
0
apache-2.0
07e7f5023958538933802f78c7bdd5d61f04a825
moypray/flocker,adamtheturtle/flocker,Azulinho/flocker,agonzalezro/flocker,1d4Nf6/flocker,1d4Nf6/flocker,runcom/flocker,1d4Nf6/flocker,moypray/flocker,lukemarsden/flocker,LaynePeng/flocker,jml/flocker,moypray/flocker,adamtheturtle/flocker,lukemarsden/flocker,wallnerryan/flocker-profiles,mbrukman/flocker,jml/flocker,And...
flocker/restapi/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport colander\nfrom colander import Invalid\n\nfrom grano.logic.references import ProjectRef\nfrom grano.core import db\nfrom grano.model import Schema, Attribute\n\n\nFORBIDDEN = ['project', 'source', 'target', 'id', 'created_...
python
edit
3
2
mit
9f0c05eb9926dc5a9be6eb65bd71f7f1218e24e1
4bic/grano,CodeForAfrica/grano,4bic-attic/grano,granoproject/grano
grano/logic/validation.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.http import HttpResponse\nfrom django.contrib.auth import authenticate\n\nfrom piston.handler import BaseHandler as Handler\n\nfrom opps.api.models import ApiKey\n\n\nclass BaseHan...
python
edit
1
5
mit
5ed5855efe09c92efbf93dab5eb0b37325072381
jeanmask/opps,opps/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,jeanmask/opps
opps/api/__init__.py
rejected_duplicate
Near-duplicate of sample 3607
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nGenerate a unique uuid for this host, storing it on disk so it persists across\nrestarts\n'''\nimport logging\nimport os\nimport uuid\n\nlog = logging.getLogger(__name__)\n\n\ndef host_uuid():\n '''\n Gen...
python
edit
4
3
apache-2.0
c892077dd55405d71cbe6d6191c53260b74447d2
basepi/hubble,basepi/hubble
hubblestack/extmods/grains/hostuuid.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime_plugin\n\n\n# the last edited Region, keyed to View.id\n_last_edits = {}\n\n\nclass RecordLastEdit(sublime_plugin.EventListener):\n def on_modified(self, view):\n _last_edits[view.id()] = view.sel()[0]\n\n \nclass G...
python
edit
3
4
mit
f4701ac73f884ef28e62bb35adc81330ce512171
abrookins/GotoLastEdit
goto_last_edit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2002-2011 IronPort Systems and Cisco Systems\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the So...
python
edit
1
1
mit
c55a42737a99104734a79e946304849258bfa44b
ironport/aplib,ironport/aplib
aplib/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom atom.filters import CrispyFilterMixin, AutocompleteChoiceFilter\nfrom django.utils.translation import ugettext_lazy as _\nimport django_filters\nfrom .models import Task\n\n\nclass TaskFilter(CrispyFilterMixin,...
python
edit
1
1
mit
66c0b220188499a5871ee1fbe5b79f0a57db4ec9
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/tasks/filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom random import randint\nimport sys\n\ndef sort_and_count(arr):\n\tn = len(arr)\n\n\tif n == 1:\n\t\treturn 0\n\n\telse:\n\t\tfirst_half = arr[:n/2]\n\t\tsecond_half = arr[n/2:]\n\t\treturn merge_and_count_split(sort_and_count(first_half...
python
edit
3
5
mit
5748265d5102ee69e928d65ff3d40779af120dac
timpel/stanford-algs,timpel/stanford-algs
count-inversions/count_inversions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hashlib\nimport urllib\n\nimport bencode\n\n\nclass Torrent(object):\n\n def __init__(self, path):\n self.encoded = self._get_meta(path)\n self.decoded = bencode.bdecode(self.encoded)\n\n def _get_meta(self, path):\n with ...
python
edit
1
2
apache-2.0
2f26197d10a1c7cfc010074576c7e1a2c2a31e78
vtemian/university_projects,vtemian/university_projects,vtemian/university_projects
data_structures/bitorrent/torrent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 The KerasCV 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# https://ww...
python
edit
10
0
apache-2.0
9caa0aa6c8fddc8a21997cf4df88d407b1598412
keras-team/keras-cv,keras-team/keras-cv,keras-team/keras-cv
keras_cv/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nproject_slug = '{{ cookiecutter.project_slug }}'\n\nprint('pre gen')\n\nif hasattr(project_slug, 'isidentifier'):\n assert project_slug.isidentifier(), 'Project slug should be valid Python identifier!'\n\n```\n\nApply this change: Fix a ...
python
edit
1
0
bsd-3-clause
ebb0236d7c68883de7a4202df23e74becd943f29
valerymelou/cookiecutter-django-gulp,valerymelou/cookiecutter-django-gulp,valerymelou/cookiecutter-django-gulp
hooks/pre_gen_project.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom flask import Flask\nfrom flask_restful import Api\n\nfrom .db import configure_database\n\n\nclass Application:\n\n def __init__(self):\n self.flask_app = Flask(__name__)\n ...
python
edit
1
2
unlicense
3a80b55c8a46f46ecd5b458d0aee26b34e8ad1f5
azlyth/tokens,azlyth/tokens,azlyth/tokens
backend/core/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport configmanager\nimport osascript\n\nAPP_CONFIG_PATH = \"../applications/\"\n\napplicationConfigs = configmanager.ConfigManager(APP_CONFIG_PATH)\n#TODO: Make this user choosable\ncurrentApplication = \"radiant\"\n\ndef getCurrentConfig...
python
edit
1
1
mit
4e18d3d3c35e92d6b800f347b65765ca36d6148b
ollien/playserver,ollien/playserver,ollien/playserver
playserver/track.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom functional_tests.factory import FaceFactory\n\n\nclass Facetest(TestCase):\n def setUp(self):\n self.face = FaceFactory(title='Lokesh')\n\n def test_title_to_share_returns_meet_Lokesh__far...
python
edit
1
1
bsd-3-clause
e7a8c76c1f8f07866a4b7ea55870dacb5c76ef90
PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari
face/tests/model_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport readcd\nimport aiff\nimport AL\nimport CD\n\nError = 'cdaiff.Error'\n\ndef writeaudio(a, type, data):\n\ta.writesampsraw(data)\n\ndef main():\n\tif len(sys.argv) > 1:\n\t\ta = aiff.Aiff().init(sys.argv[1], 'w')\n\telse:\n...
python
edit
3
5
mit
8df691acaebffc343dac4535a64f8a809607558a
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Demo/sgi/cd/cdaiff.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import url\n\nfrom tastypie.resources import ModelResource\nfrom jmbo.api import ModelBaseResource\n\nfrom music.models import Track\n\n\nclass TrackResource(ModelBaseResource):\n\n class Meta:\n que...
python
edit
3
1
bsd-3-clause
b097675e5906f7b0e9c050110fea58e40491814b
praekelt/jmbo-music,praekelt/jmbo-music
music/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# libcloud.org licenses th...
python
edit
1
0
apache-2.0
61bfc62937176b580b8b6ae12a90c5b76b00d50d
Kami/libcloud,jimbobhickville/libcloud,ClusterHQ/libcloud,apache/libcloud,DimensionDataCBUSydney/libcloud,curoverse/libcloud,smaffulli/libcloud,schaubl/libcloud,techhat/libcloud,DimensionDataCBUSydney/libcloud,cryptickp/libcloud,cloudControl/libcloud,supertom/libcloud,ZuluPro/libcloud,Verizon/libcloud,t-tran/libcloud,S...
libcloud/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom seleniumbase import BaseCase\nfrom seleniumbase.common import decorators\n\n\nclass MyTestClass(BaseCase):\n\n @decorators.rate_limited(4) # The arg is max calls per second\n def print_item(self, item):\n print item\n\n ...
python
edit
3
2
mit
b94e4971e3bcde718c40dc963a995e8afa5cf99f
mdmintz/SeleniumBase,mdmintz/seleniumspot,possoumous/Watchers,ktp420/SeleniumBase,ktp420/SeleniumBase,mdmintz/SeleniumBase,possoumous/Watchers,possoumous/Watchers,ktp420/SeleniumBase,mdmintz/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,possoumous/Watchers,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,se...
examples/rate_limiting_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom scipy import ndimage as ndi\nfrom skimage.filters import threshold_otsu\n\n\ndef _extract_roi(image, axis=-1):\n max_frame = np.max(image, axis=axis)\n initial_mask = max_frame > threshold_otsu(max_frame)\n ...
python
edit
1
1
mit
7c460a174b1c461c76d08161698ead77e1236f15
jni/python-redshirt
redshirt/analyze.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom openprocurement.tender.openeu.adapters import TenderAboveThresholdEUConfigurator\nfrom openprocurement.tender.esco.models import Tender\n\n\nclass TenderESCOConfigurator(TenderAboveThresholdEUConfigurator):\n ...
python
edit
1
0
apache-2.0
372ff487c068da2b31cd25e550e8dcd7bd12d17d
openprocurement/openprocurement.tender.esco
openprocurement/tender/esco/adapters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding:utf-8\n\nimport itertools\n\n\ndef expo(base=2, factor=1, max_value=None):\n \"\"\"Generator for exponential decay.\n\n Args:\n base: The mathematical base of the exponentiation operation\n factor: Factor to mul...
python
edit
1
4
mit
915001e0e46fef2cf1e6b1c78614d0254b9db21e
litl/backoff
backoff/_wait_gen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"adapter\n\nMock storage adapter class for unit tests\n\"\"\"\nclass MockStorageAdapter:\n \"\"\"Mock storage adapter class.\n\n Will be patched for testing purposes\n \"\"\"\n\n def store_entry(self, entry):\n \"\"\...
python
edit
1
1
mit
adb265a57baed6a94f83ba13f88342313ad78566
tjmcginnis/tmj
tests/adapter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License:...
python
edit
3
0
apache-2.0
50f577e63fe58531447dc0bc2eed80859d3aa1ad
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/doc/DataSources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"Helper functions.\n\"\"\"\n\n# built-in modules\nimport json\n\n# local modules\nfrom mass.input_handler import InputHandler\nfrom mass.scheduler.swf import config\n\n\ndef submit(job...
python
edit
1
2
apache-2.0
6d25dcdb5eaca6d0d0404b4104017a18076174f8
KKBOX/mass,badboy99tw/mass,KKBOX/mass,badboy99tw/mass,badboy99tw/mass,KKBOX/mass
mass/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python -B\n\nfrom optparse import OptionParser\nimport inspect\nimport json\nimport os\n\ndef get_port_mappings(container):\n script_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\n containe...
python
edit
1
2
apache-2.0
c5096a3370ad9b4fff428580e1b3c0c7de1399ce
johanatan/datt-metadatt,johanatan/datt-metadatt,dattlabs/datt-metadatt,johanatan/datt-metadatt,johanatan/datt-metadatt,dattlabs/datt-metadatt,dattlabs/datt-metadatt,dattlabs/datt-metadatt
scripts/set_ports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"cppmake auto-generates a big CMake file from C++ headers\n\"\"\"\nimport setuptools\n\ndescription = \"Python Super CMake\"\n\nsetuptools.setup(\n name='generate_cmake',\n version='1.8.0',\n license='MIT',\n long_descripti...
python
edit
1
0
mit
aa11d654d59dc604fa71b2e73a56338aff7a23e7
jpanikulam/experiments,jpanikulam/experiments,jpanikulam/experiments,jpanikulam/experiments
pymake/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCloudify plugin for running a simple bash script.\n\nOperations:\n start: Run a script\n\"\"\"\n\nfrom celery import task\nfrom cosmo.events import send_event as send_riemann_event\nfrom cloudify.utils import get_local_ip\n\n\nge...
python
edit
2
1
apache-2.0
32126085f361489bb5c9c18972479b0c313c7d10
rantav/cosmo-plugin-bash-runner
bash_runner/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext as _\nfrom django_digest import HttpDigestAuthenticator\nfrom rest_framework.authentication import (\n BaseAuthentication, get_authorization_header,\n BasicAuthentication)\nfrom rest_frame...
python
edit
1
4
bsd-2-clause
637651e572d9bcd4049ad5351f7fde1869c6823a
kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat
onadata/libs/authentication.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Utility functions\n\"\"\"\nimport random\nimport time\nfrom . import constants\n\ndef _service_url_from_hostport(secure, host, port):\n \"\"\"\n Create an appropriate service URL given the parameters.\n\n `secure` should be ...
python
edit
2
4
mit
2de494810b73dd69c6b4bb87e87007291309d573
lightstephq/lightstep-tracer-python
lightstep/util.py
rejected_duplicate
Near-duplicate of sample 20485
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os.path\nfrom django.db import models\nfrom django.conf import settings\nfrom django.db.models.signals import post_save\nfrom django.utils.translation import ugettext_lazy as _\nfrom .settings import DAV_ROOT...
python
edit
1
4
bsd-3-clause
2ab41930077dec805388bef4c5c8f67912240709
qdqmedia/django-templation,qdqmedia/django-templation,qdqmedia/django-templation
templation/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__title__ = 'libtmux'\n__package_name__ = 'libtmux'\n__version__ = '0.8.1'\n__description__ = 'scripting library / orm for tmux'\n__email__ = '<EMAIL>'\n__author__ = 'Tony Narlock'\n__github__ = 'https://github.com/tmux-python/libtmux'\n__p...
python
edit
1
0
bsd-3-clause
aedabe987e6ce93d61ed7707f0ebdc874b60fa1b
tony/libtmux
libtmux/__about__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\ndef test_pca():\n from sequana.viz.pca import PCA\n from sequana import sequana_data\n import pandas as pd\n\n data = sequana_data(\"test_pca.csv\")\n df = pd.read_csv(data)\n df = df.set_index(\"Id\")\n p = PCA(df,...
python
edit
1
1
bsd-3-clause
ec8d7181be646498717b8efa97dd6770d61f067a
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
test/viz/test_pca.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 io import StringIO\n\nimport pytest\n\nword2vec_str = \"\"\", -0.046107 -0.035951 -0.560418\nde -0.648927 -0.400976 -0.527124\n. 0.113685 0.439990 -0.634510\n  -1.499184 -0.18...
python
edit
1
1
mit
44de3c76421a2ed4917ac7f2c6798dec631650a8
spacy-io/spaCy,raphael0202/spaCy,explosion/spaCy,explosion/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,banglakit/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,Gregory-How...
spacy/tests/regression/test_issue834.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mamba.loader import describe, context\nfrom mamba.hooks import before, after\nfrom mamba.decorators import skip\n\n__all__ = [describe, context, before, after, skip]\n\n```\n\nApply this change: Fix the import all mamba error" }, {...
python
edit
1
0
mit
7278f68b18f8cee3f9a78e1265df0994a23254bc
nestorsalceda/mamba,markng/mamba,alejandrodob/mamba,dex4er/mamba,angelsanz/mamba,jaimegildesagredo/mamba,eferro/mamba
mamba/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom pypoker import Player\nfrom pypoker import Table\n\nclass PlayerTestCase(unittest.TestCase):\n ''' \n Tests for the Player class\n '''\n def setUp(self):\n self.player = Player('usman', 1000, None)\n...
python
edit
1
1
mit
a7ece0bd59b63455d26efbc927df7dc5607ce55b
ueg1990/pypoker
tests/test_player.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom pearhash import PearsonHasher\n\n\n\nclass TestPearsonHasher(unittest.TestCase):\n\n\tdef test_table_is_a_permutation_of_range_256(self):\n\t\thasher = PearsonHasher(2)\n\t\tself.assertEqual(set(hasher.table), set(rang...
python
edit
1
1
mit
7bed531fcbc63de25572a6b02fb8b19bd066fa50
ze-phyr-us/pearhash
test_pearhash.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport simplejson as json\n\n\ndef getbaseurl(service='search', version='1', method='track',\n format='json'):\n \"\"\"Returns the base URL for a Spotify Web API query\"\"\"\n baseurl = \"http://ws.spot...
python
edit
4
3
mit
f89f24c22d2dd3c1bab59083397501238e2d0ba9
iconpin/sputnik-python
sputnik/core.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\n\ndef get_specifications(name):\n \"\"\"Return a datasource specification file according to the following pattern:\\n\\\n \n datasource_<name>.py\n \n where <name> is the datasource identifier (e.g. ...
python
edit
1
1
bsd-3-clause
be1904cdbea85fa53b1a324449bd42aab320e185
pySTEPS/pysteps
config/interface.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test_support import TESTFN\nfrom UserList import UserList\n\n# verify writelines with instance sequence\nl = UserList(['1', '2'])\nf = open(TESTFN, 'wb')\nf.writelines(l)\nf.close()\nf = open(TESTFN, 'rb')\nbuf = f.read()\nf.close()\na...
python
edit
4
0
mit
cdbb9e8bcffc4c5ba47791b81782df4a07273b6b
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_file.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport virtool.db.processes\n\nFIRST_STEPS = {\n \"delete_reference\": \"delete_indexes\",\n \"clone_reference\": \"copy_otus\",\n \"import_reference\": \"load_file\",\n \"remote_reference\": \"download\",\n \"update_remote_r...
python
edit
1
3
mit
40ae333ab81ae1f4d93f3937306ddd12718b59a8
virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool
virtool/processes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This is the new base initialization layer for Mineserver.\n# Always call this instead of server_core.py.\nfrom __future__ import print_function\nfrom server_core.server import *\nimport sy...
python
edit
3
0
mit
042791f62619a4a8694df91dc8d03f0ba4460bc2
TiberiumPY/puremine,Armored-Dragon/pymineserver
mineserver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Requires pandas and matplotlib to be installed, e.g.\n#\n# `sudo apt-get install pandas-python`\n\nimport json\nimport re\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ntweets_data_path = './twitter_data.txt'\n\ntweets_data ...
python
edit
5
2
mit
7c12d7f8e5fcd4cc328e109e0bdde9e62b4706f7
0x7df/twitter2pocket
parse_tweets.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCopyright (c) 2013, Battelle Memorial Institute\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met: \n\n1. Redistribut...
python
edit
2
0
bsd-2-clause
6ae84a6e098275cdaac8598695c97403dcb2092e
schandrika/volttron,schandrika/volttron,schandrika/volttron,schandrika/volttron
volttron/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\r\nimport pytest\r\n\r\nfrom mothership import create_app, settings\r\nfrom mothership import db as _db\r\n\r\n\r\n@pytest.fixture(scope='session')\r\ndef app(request):\r\n\tapp = create_app('mothership.settings.TestConfig')\r\n\r...
python
edit
1
2
mit
2ba8beb54b6de9fbe68501fa71a878da1426e6cd
afl-mothership/afl-mothership,afl-mothership/afl-mothership,afl-mothership/afl-mothership,afl-mothership/afl-mothership
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport zipfile\n\nfrom django.views.generic import View\nfrom django.http import HttpResponse\nfrom django.core.files.base import ContentFile\nfrom django.utils.six import b\n\n\nclass BaseZipView(View):\n \"\"\"A base view to zip and st...
python
edit
1
2
mit
caa96562fb65dfdedc37f6efc463701e8b22d410
thibault/django-zipview
zipview/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom apscheduler.schedulers.blocking import BlockingScheduler\n\nfrom twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins,\n update_status)\n\nfrom memory_profiler import profile\n\nsched = BlockingScheduler()\n\n@sc...
python
edit
3
2
mit
38d2aceecf485e59af4e66be711d7d0f12086c06
kkwteh/twinyewest
twinsies/clock.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\nfrom os.path import join as pjoin\n\ndef download_file(source, target):\n return 'wget %s -O %s' % (source, target)\n\ndef get_file_list(base_path, include_list = None, exclude_list = None):\n if not isinstance(...
python
edit
1
7
apache-2.0
84342312ab663b1d7c9a9ac5e09811c2ed636fb4
cloudkick/cast,cloudkick/cast,cloudkick/cast,cloudkick/cast
site_scons/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"An Extensible Dependency Resolver written in Python\n\"\"\"\n\n__version__ = \"0.1.0.dev0\"\n\n```\n\nApply this change: Switch to an alpha version" }, { "role": "assistant", "content": "\"\"\"An Extensible Dependency Reso...
python
edit
1
0
mit
1e006b5df70303b743cb2fd7d6c2a5ef4234f70b
pradyunsg/zazo,pradyunsg/zazo
zazo/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nProcessor functions\n\"\"\"\n\n\ndef conflict_prefer_longer(matches):\n \"\"\"\n Remove shorter matches if they conflicts with longer ones\n\n :param matches:\n :type match...
python
edit
1
7
mit
fd819ff0ff1a7d73dd58f152d2c4be8aea18e2d3
Toilal/rebulk
rebulk/processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask_testing\nimport logging\nimport unittest\nimport urllib\n\nimport server\n\nlogging.disable(logging.CRITICAL)\n\nclass TestIndex(unittest.TestCase):\n\n def test_index_returns_greeting(self):\n self.assertEquals(serve...
python
edit
1
1
mit
9452c8d4bebcb8466cda82d272c04bd9abe7f91d
Laspimon/transact,Laspimon/transact
tests/test_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom collections import OrderedDict\nimport os\nimport StringIO\nfrom django.conf import settings\nfrom django.utils.encoding import smart_str\nfrom ..base import Processor\nfrom django.core.exceptions import ImproperlyConfigured\n\nclass...
python
edit
6
4
bsd-2-clause
9cfdb35fb1f645eda99d28085b093ee36dd14625
potatolondon/assetpipe
processors/closure_compiler.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) Ivan Kravets <<EMAIL>>\n# See LICENSE for details.\n\n\"\"\"\n Builder for Windows x86\n\"\"\"\n\nfrom SCons.Script import AlwaysBuild, Default, DefaultEnvironment\n\nfrom platformio.util import get_systype\n\n\nenv = Def...
python
edit
1
0
apache-2.0
c9491f47e1fc98e0a6aadf9bf379f21112768332
ZachMassia/platformio,platformio/platformio-core,mseroczynski/platformio,eiginn/platformio,valeros/platformio,mcanthony/platformio,platformio/platformio,dkuku/platformio,platformio/platformio-core,atyenoria/platformio,mplewis/platformio
platformio/builder/scripts/windows_x86.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nclass PblCommand:\n name = ''\n help = ''\n\n def run(args):\n pass\n\n def configure_subparser(self, parser):\n parser.add_argument('--sdk', help='Path to Pebble SDK (ie: ~/pebble-dev/PebbleSDK-2.X/)'...
python
edit
1
2
mit
e4ae1bae94eb2afd5ea851d4ce6528f81c46c32d
pebble/libpebble,pebble/libpebble,pebble/libpebble,pebble/libpebble
pebble/PblCommand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom knowit.rule import Rule\n\n\nclass AlternativeRule(Rule):\n \"\"\"Alternative rule.\"\"\"\n\n def __init__(self, name, prop_name: str, **kwargs):\n super().__init__(name, **kwargs)\n self.prop_name = prop_name\n\...
python
edit
1
3
mit
c3d20f0f394063abe7e149d9de41aa3ac0ab91f1
ratoaq2/knowit
knowit/rules/alternative.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Question(models.Model):\n question_text = models.CharField(max_length=140)\n published_at = models.DateTimeField(auto_now_add=True)\n\n class Meta:\n get_latest_by = 'published_at'\n\n...
python
edit
1
1
mit
ae5b93c4e12f732a8c56de80b39f227c90ef4809
apiaryio/polls-api
polls/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRejected is a Python RabbitMQ Consumer Framework and Controller Daemon\n\n\"\"\"\nimport logging\n\n# Add NullHandler to prevent logging warnings\nlogging.getLogger(__name__).addHandler(logging.NullHandler())\n\nfrom rejected.consum...
python
edit
1
0
bsd-3-clause
10e3c7b8dbc4befa2533de1a07f1f7827b961f81
gmr/rejected,gmr/rejected
rejected/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n.. module:: djstripe.\n\n :synopsis: dj-stripe - Django + Stripe Made Easy\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport pkg_resources\nfrom . import checks # noqa: Register th...
python
edit
3
0
mit
a17933c7806634391137244e2c17327898187146
pydanny/dj-stripe,pydanny/dj-stripe,jleclanche/dj-stripe,dj-stripe/dj-stripe,kavdev/dj-stripe,jleclanche/dj-stripe,dj-stripe/dj-stripe,kavdev/dj-stripe
djstripe/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport facter\nfrom collections import MutableMapping\n\nfrom piper.abc import DynamicItem\n\n\nclass PropBase(DynamicItem):\n def __init__(self):\n super(PropBase, self).__init__(None)\n self._props = None\n\n @property...
python
edit
1
6
mit
26d2e13945f4780ff74dfe99695be7045fb9ed39
thiderman/piper
piper/prop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\nfrom sklearn.linear_model import Ridge\nfrom sklearn.kernel_ridge import KernelRidge\nfrom sklearn.metrics import mean_absolute_error as MAE\n\nfrom molml.features import EncodedBond, Connectivity\n\nfrom utils import load_qm7...
python
edit
3
0
mit
c58b2dd49ad5c73d49b496025d13116da30b3b9a
crcollins/molml
examples/qm7_long.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n'''\nGiven:\n1. status code: (0 - OK, other value - BAD)\n2. terminal window width\n\nshows red/green bar to visualize return code of previous command\n'''\n\nimport sys\n\ndef main():\n if len(sys.argv) >= 2:\n...
python
edit
1
6
mit
16c9563a75792aba7ccc0d979f579d64dc0140c1
kwadrat/rgb_tdd
common_rg_bar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sys import exit\n\nimport argparse\n\nfrom .commands import dispatch\nfrom .config import get_config\nfrom .utils import merge\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('-u', '--base-url')\n p...
python
edit
1
1
mit
c7ed3e2a39c7de1120a33cd0253d9ac3bd9e7984
dmedvinsky/redcliff
redcliff/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom enum import Enum\n\nclass Furniture(Enum):\n bed = 1\n couce = 2\n desk = 3\n chair = 4\n tv = 5\n table = 6\n rug = 7\n shelf = 8\n\nf = open(sys.argv[1], 'r')\nprint(f.read())\n\n```\n\nApply this ...
python
edit
9
0
apache-2.0
a2ee6106a6c98dae102cf14902c6b82f480e6cbe
TheZoq2/VRHack,TheZoq2/VRHack,TheZoq2/VRHack,TheZoq2/VRHack
python/main.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Piazza(object):\n \"\"\"Unofficial Client for Piazza's Internal API\"\"\"\n def __init__(self):\n pass\n\n```\n\nApply this change: feat(user): Add login methods to Piazza" }, { "role": "assistant", "content":...
python
edit
1
1
mit
6c7ca64fbd93ab52dfc1ba792fd314395483d651
hfaran/piazza-api,kwangkim/piazza-api
piazza_api/piazza.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport ci_addons\nimport os\nimport pytest\nimport subprocess\n\nfrom . import captured_lines\n\n\ndef test_home():\n expected_home = os.path.abspath(os.path.dirname(__file__) + '/..')\n assert ci_addons.home() == expected_home\n\n\...
python
edit
1
2
apache-2.0
6e32cfd9b2640b4f119a3a8e4138c883fd4bcef0
scikit-build/scikit-ci-addons,scikit-build/scikit-ci-addons
_tests/test_scikit_ci_addons.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSerializer plugin interface.\n\nThis module is useful for those wanting to write a serializer that can\nplugin to rdflib. If you are wanting to invoke a serializer you likely\nwant to do so through the Graph class serialize method.\...
python
edit
1
3
bsd-3-clause
2e812af6b937091d65a0b83ead936894a2789d02
RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib
rdflib/serializer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport collections\n\nAPI_URL = 'https://api.github.com/users/{}/repos'\n\n\ndef main(user):\n return parse(request(user))\n\n\ndef request(user):\n return requests.get(url=API_URL.format(user))\n\n\ndef parse(respons...
python
edit
1
5
mit
43ab1500719665b44e3b4eca4def9002711c2ee8
kshvmdn/github-list,kshvmdn/github-list,kshvmdn/github-list
githublist/parser.py
rejected_duplicate
Near-duplicate of sample 14708
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass PysnowException(Exception):\n pass\n\n\nclass InvalidUsage(PysnowException):\n pass\n\n\nclass ResponseError(PysnowException):\n message = \"<empty>\"\n detail = \"<empty>\"\n\n def __init__...
python
edit
1
5
mit
5d59f800da9fb737cd87d47301793f750ca1cbdd
rbw0/pysnow
pysnow/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nimport os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"api.api.settings\")\n\nfrom . import utils\nfrom scrapi.linter.document import NormalizedDocument, RawDocument\nfrom scrapi.processing.postgres import PostgresP...
python
edit
1
1
apache-2.0
afb398094e207fdd338a492dbbe9fca3f041e2c7
erinspace/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,felliott/scrapi,mehanig/scrapi,fabianvf/scrapi,fabianvf/scrapi,felliott/scrapi,mehanig/scrapi
tests/test_postgres_processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom django.core.management.base import BaseCommand\nimport pandas as pd\n\nfrom tslib.readers import PiXmlReader\nfrom tslib.writers import PiXmlWriter\n\nfrom ddsc_core.models import Timeseries\n\n\nclass Command(BaseCommand...
python
edit
1
6
mit
f7c03daa9ce803ec10e1c7cd9319840045f47663
ddsc/ddsc-core,ddsc/ddsc-core
ddsc_core/management/commands/export_pi_xml.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests utility scripts\n\"\"\"\nimport os\n\nfrom django.test import TestCase, RequestFactory\nfrom django.test.utils import override_settings\n\nimport pivot\nfrom pivot.utils import get_latest_term\n\n\nTEST_CSV_PATH = os.path.join...
python
edit
3
1
apache-2.0
67c444fb3603c234916b790d3dded3625f0512e5
uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot
pivot/test/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.tourney.transfer.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom typing import NewType\nfrom uuid import...
python
edit
1
0
bsd-3-clause
fdf0daefac50de71a8c4f80a9ef877669ebea48b
homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps
byceps/services/tourney/transfer/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef result(return_code, output, stderr_output, allow_error=False):\n if allow_error or return_code == 0:\n return ExecutionResult(return_code, output, stderr_output)\n else:\n raise RunProcessError(return_code, output, s...
python
edit
1
3
bsd-2-clause
025927fa19bb96095a2ea1c53524945f1f9590ce
mwilliamson/spur.py
spur/results.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nimport pytest\nimport uuid\nfrom s3keyring.s3 import S3Keyring\n\n\n@pytest.fixture\ndef config(scope='module'):\n return S3Keyring(profile_name='test').config\n\n\n@pytest.yield_fixture\ndef dummyparam(confi...
python
edit
1
2
mit
50519406ac64766874ce9edf5cea69233461ffb2
InnovativeTravel/s3-keyring
tests/test_config.py
accepted
null
true