Dataset Viewer
Auto-converted to Parquet Duplicate
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 flask\nimport flask_cors\nfrom sqlalchemy_jsonapi import flaskext as flask_jsonapi\nimport logging\n\nfrom swd6.config import CONF\nfrom swd6.db.models import db\n\nlogging.basicConfig(level=logging.DEBUG)\n\napp = flask.Flask(__name...
python
edit
1
5
apache-2.0
ed21e865f346b700c48458f22e3d3f1841f63451
jimbobhickville/swd6,jimbobhickville/swd6,jimbobhickville/swd6
api/swd6/api/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom rest_framework.authtoken.models import Token\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.management.base import BaseCommand\n\nfrom bluebottle.clients import properties\nfrom bluebottle....
python
edit
2
5
bsd-3-clause
80531076a713618cda6de815bdd6675bdf6f85f1
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/clients/management/commands/export_tenants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######################################################################\n# Copyright (C) 2011,2012 Jaakko Luttinen\n#\n# This file is licensed under Version 3.0 of the GNU General Public\n# License. See LICENSE for a text of the license.\n##...
python
edit
18
0
mit
fd4688cc899b08253cc50b345bb7e836081783d8
jluttine/bayespy,SalemAmeen/bayespy,fivejjs/bayespy,bayespy/bayespy
bayespy/inference/vmp/nodes/__init__.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom geonature.utils.env import DB\nfrom utils_flask_sqla.serializers import serializable\n\n@serializable\nclass VmCorTaxonPhenology(DB.Model):\n __tablename__ = \"vm_cor_taxon_phenology\"\n __table_args__ = {\"schema\": \"gn_profile...
python
edit
1
0
bsd-2-clause
b28a40e38f0cbd40e01906063b97731ba6cd3fb6
PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature
backend/geonature/core/gn_profiles/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom djs_playground.views import index\n\nurlpatterns = [\n url(r'^$', index, name...
python
edit
1
0
mit
753f5bdc3f023cf31c0f189dd835978aad2b5d49
summernote/django-summernote,summernote/django-summernote,summernote/django-summernote
djs_playground/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .settings import *\n\n# Update SITE infos to use the common port 80 to publish the webapp\nSITE_FIXED = {\n 'name': \"Recalbox Manager\",\n 'ip': None, # If 'None' find the ip automatically. Use a string to define another ip/host...
python
edit
2
0
mit
8ea3350c6944946b60732308c912dc240952237c
recalbox/recalbox-manager,recalbox/recalbox-manager,recalbox/recalbox-manager,sveetch/recalbox-manager,sveetch/recalbox-manager,sveetch/recalbox-manager,sveetch/recalbox-manager,recalbox/recalbox-manager,sveetch/recalbox-manager,recalbox/recalbox-manager
project/settings_production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.contrib.staticfiles.testing import LiveServerTestCase\nfrom selenium import webdriver\nfrom selenium.webdriver import DesiredCapabilities\nfrom selenium.webdriver.common.by import By\nfrom seleni...
python
edit
3
2
mit
63e09b77e3b00a7483249417020fb093f98773a9
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
infrastructure/tests/helpers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add my own K-nearest-neighbor algorithm" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"K Nearest Neighbors classification for machine learning.\n\nThis file demonstrate knowledge of K Nearest Neighbors clas...
python
new_file
1
5
mit
e2330caffae04bc31376a2e0f66f0e86ebf92532
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
kNearestNeighbors/howItWorksKNearestNeighbors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\"\"\"destroyer-runner.py - Run the main application\"\"\"\n\n\nimport sys\nimport subprocess\n\n\nif __name__ == '__main__':\n subprocess.call(['python', './destroyer/destroyer.py'] + [str(arg) for arg in sys.argv[1:]...
python
edit
1
0
mit
d07b6483d110eb4c51f7c631f888d1bf30eacc1c
jaredmichaelsmith/destroyer
destroyer-runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2018 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache License, Version 2.0. See the LICENSE file for details.\nfrom...
python
edit
1
0
apache-2.0
ccdeb23eb54191913a97b48907e0738f6969ce58
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
tests/factories/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nimport numpy as np\nimport FreeCAD as FC\nimport Part\nimport Draft\nimport os\n\n\ndoc = FC.newDocument(\"ellipses\")\nfolder = os.path.dirname(__file__) + \".\\..\"\nfname = folder + \"/vor_ellipses.txt\"\...
python
edit
3
0
mit
fb9c56381d259de7d1765ca0e058f82d61e4e975
nicoguaro/ellipse_packing
examples/ellipses_FreeCAD.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'matt'\n\nfrom blockbuster import bb_dbconnector_factory\n\n\ndef credentials_are_valid(username, password):\n db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create()\n print(username)\n result = db.api_user...
python
edit
1
1
mit
c4de9152f34d2831d43dfa3769a7a6452bba5814
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/bb_security.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\nfrom .models import Question, MultipleChoiceQuestion\n\n\ndef index(request):\n pass\n\n\ndef questions(request):\n ques = MultipleChoiceQuestion.objects.all() + Question.objects.all()\n quest...
python
edit
3
3
mit
c7c1f63836e052b7a63e35956a74d03f1be30677
super1337/Super1337-CTF,super1337/Super1337-CTF,super1337/Super1337-CTF
webapp-django/questionnaire/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# pyinfra\n# File: pyinfra/modules/util/files.py\n# Desc: common functions for handling the filesystem\n\nfrom types import NoneType\n\n\ndef ensure_mode_int(mode):\n # Already an int (/None)?\n if isinstance(mode, (int, NoneType)):\n...
python
edit
1
6
mit
ca15e6523bd34e551528dce6c6ee3dcb70cf7806
Fizzadar/pyinfra,Fizzadar/pyinfra
pyinfra/modules/util/files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nclass DjangoServer(object):\n default_django_manage_script = \"manage.py\"\n\n def __init__(self, django_manage_script=None):\n super(DjangoServer, self).__init__()\n if django_manage_script is None:\n ...
python
edit
1
2
bsd-3-clause
c3d03629734abfead5ae1eae83d1b6dcec792b45
weijia/iconizer
iconizer/django_in_iconizer/django_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport picamera as p\nimport os\nimport time\n\nos.chdir('/home/pi/Desktop')\n\ncam = p.PiCamera()\ncam.resolution = (320,240)\ncam.hflip = True\ncam.vflip = True\n\nx = 0\n\nwhile x < 50:\n\t#os.unlink('greg.jpg')\n\timg = cam.capture('gre...
python
edit
2
0
mit
9c7090215ecda3fd4d173c8c5f2d3e1462fbbeee
jwarshaw/RaspberryDrive
takePicture.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017-2020 TensorHub, Inc.\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.ap...
python
edit
1
1
apache-2.0
25a97de30fcc9cddd7f58cd25584fd726f0cc8e4
guildai/guild,guildai/guild,guildai/guild,guildai/guild
guild/commands/packages_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom enum import IntEnum\n\n\nclass RuntimePlatform(IntEnum):\n\tOSXEditor = 0\n\tOSXPlayer = 1\n\tWindowsPlayer = 2\n\tOSXWebPlayer = 3\n\tOSXDashboardPlayer = 4\n\tWindowsWebPlayer = 5\n\tWindowsEditor = 7\n\tIPhonePlayer = 8\n\tPS3 = 9\n...
python
edit
1
0
mit
67b243915ef95ff1b9337bc67053d18df372e79d
andburn/python-unitypack
unitypack/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# from datetime import datetime\n\nfrom django.views.generic import RedirectView\nfrom django.core.urlresolvers import reverse_lazy\n\n\nfrom .models import BodyWeightWorkout\n\nfrom braces import views\n\n\n# Create your views here.\nclass...
python
edit
3
2
mit
977c8cc25c3978931e0d908589232db1bcac5b3f
johnshiver/fitizen,johnshiver/fitizen
fitizen/body_weight_workout/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom redash.models import db\nimport peewee\nfrom playhouse.migrate import PostgresqlMigrator, migrate\n\nif __name__ == '__main__':\n migrator = PostgresqlMigrator(db.database)\n\n with db.database.transaction():\n # Change th...
python
edit
3
0
bsd-2-clause
ee98b5a5c6b82671738bc60e68ea87d838c5400f
ninneko/redash,EverlyWell/redash,hudl/redash,useabode/redash,pubnative/redash,chriszs/redash,akariv/redash,alexanderlz/redash,easytaxibr/redash,pubnative/redash,amino-data/redash,rockwotj/redash,ninneko/redash,guaguadev/redash,rockwotj/redash,denisov-vlad/redash,imsally/redash,ninneko/redash,useabode/redash,crowdworks/...
migrations/0020_change_ds_name_to_non_uniqe.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\...
python
edit
2
6
bsd-3-clause
6567120249b82477bcf0ef82554b057f93618e7e
dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-s...
tools/gyp/find_mac_gcc_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom discode_server import db\nfrom discode_server import fragments\n\nconnected = set()\nnotified = set()\n\n\nasync def feed(request, ws):\n\n global connected\n connected.add(ws)\n print(\"Open WebSockets: \", len...
python
edit
3
7
bsd-2-clause
21b97ceea5b2e667940ddd45682313261eba845b
d0ugal/discode-server,d0ugal/discode-server,d0ugal/discode-server
discode_server/notify.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may ob...
python
edit
1
3
apache-2.0
f243d309e5168b5855045227c9c0a6b082bedc69
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
luigi/tasks/gtrnadb/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom chatterbot.storage import StorageAdapter\n\n\nclass StorageAdapterTestCase(TestCase):\n \"\"\"\n This test case is for the StorageAdapter base class.\n Although this class is not intended for dir...
python
edit
1
1
bsd-3-clause
1bd3d7d16da7cc1cf98fa68768910010251f2fea
gunthercox/ChatterBot,vkosuri/ChatterBot
tests/storage_adapter_tests/test_storage_adapter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# This file was generated by 'versioneer.py' (0.15) from\n# revision-control system data, or from the parent directory name of an\n# unpacked source archive. Distribution tarballs contain a pre-generated copy\n# of this file.\n\nimport js...
python
edit
1
1
mit
52d15d09ed079d1b8598f314524066b56273af3d
neutrons/FastGR,neutrons/FastGR,neutrons/FastGR
addie/_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom datetime import datetime\nfrom dateutil.tz import tzutc\nfrom fmi import FMI\n\n\nclass TestObservations(unittest.TestCase):\n def test_lappeenranta(self):\n now = datetime.now(tz=tzutc())\n\n f = FMI(...
python
edit
1
3
mit
ba37080645153d66a8ae1c8df10312806999f8ec
kipe/fmi
tests/test_observation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom contextlib import nested\n\nfrom fabric.api import *\n\n\ndef prepare_project():\n u\"\"\"\n Enters the directory and sources environment configuration.\n\n I know ``nested`` is deprecated, but what ...
python
edit
28
1
mit
5a641736faf6bb3ce335480848464a1f22fab040
zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net
fabfile.py
rejected_lint
Too many lint violations: 28
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.interfaces import (\n ISessionFactory,\n )\n\nfrom .interfaces import (\n IAuthService,\n IAuthSourceService,\n )\n\ndef int_or_none(x):\n return int(x) if x is not None else x\n\ndef kw_from_settings(settings...
python
edit
1
3
isc
cdb4fa00328f3bc5852b9cae799d4d3ed99f1280
usingnamespace/pyramid_authsanity
pyramid_authsanity/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import *\nfrom rest_framework import serializers\n\n\nclass MasterWorkableSerializer(serializers.ModelSerializer):\n class Meta:\n model = MasterWorkable\n\n```\n\nApply this change: Add explicit fields in serializer"...
python
edit
3
0
apache-2.0
603ad671c1f6976f75065a4365589a75e1e384ee
rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory
service_and_process/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nINFINITY = 1e+31\n\nDIRECTIONS = ((-1,-1),(-1,0),(-1,1),\n (0,-1), (0,1),\n (1,-1), (1,0), (1,1))\n\nEMPTY = 0\nBLACK = 1\nWHITE = 2\n\ndef opposite_colour(col):\n if col == BLACK:\n return WHITE...
python
edit
3
3
mit
236a3e81164e8f7c37c50eaf59bfadd32e76735a
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
defines.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'RMGiroux'\n\nimport asyncio\nfrom asyncio import subprocess\nimport sys\n\nclass OutputCollector:\n def __init__(self, name):\n self.name = name\n\n @asyncio.coroutine\n def process_line(self, stream):\n ...
python
edit
2
3
apache-2.0
196fe935afd6adfec5d205e88472d7ef607b4743
RMGiroux/python_experiments
checkout.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nfrom ._version import __version__\n\n\n```\n\nApply this change: Add top level function to help assemble collections from arbitrary...
python
edit
5
11
apache-2.0
caeb76cbcb6cdd49138e41f57144573598b722ba
4degrees/clique
source/clique/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.conf import settings\n\n\n\ntrans_app_label = _('Opps')\nsettings.INSTALLED_APPS += ('opps.article',\n 'opps.image',\n 'opps.channel...
python
edit
1
0
mit
b47e3677120b9b2d64d38b48b0382dc7986a1b82
YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,opps/opps,YACOWS/opps
opps/core/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport json\nimport requests\nfrom string import Template\n\nimport dateutil.parser\n\ndef posts_at_url(url):\n \n current_page = 1\n max_page = sys.maxint\n\n while current_page <= max_page:\n\n resp = reques...
python
edit
3
4
cc0-1.0
910c21778751e2814e649adf6f4db99378891ab1
kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh
_lib/wordpress_post_processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom kivy.factory import Factory\n\nr = Factory.register\n\nr('StageTreeNode', module='moa.render.treerender')\nr('StageSimpleDisplay', module='moa.render.stage_simple')\n\n\n# --------------------- devices -----------------------------\nr(...
python
edit
1
0
mit
323167f22c3176366cf2f90ce2ec314ee2c49c8f
matham/moa
moa/factory_registers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template, g, redirect, request\nfrom db import connect_db, get_all_sum\n\nfrom statistics import app\n\n@app.before_request\ndef before_request():\n g.db = connect_db()\n g.fields = [\"CPU\", \"TOTAL\", \"SQL\...
python
edit
1
5
mit
c80a68b81e936435434931f0b5bf748bcbea54dc
uvNikita/appstats,uvNikita/appstats,uvNikita/appstats
statistics/webui.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^admin/', include(admin.site.urls)),\n url(r'^$', 'hello_world.views.hello_world', nam...
python
edit
1
0
mit
4a8aaf3c9e1da5fd10580cc5a3859d801f2c9553
morninj/django-docker,morninj/django-docker,morninj/django-docker
django_docker/django_docker/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef main():\n\twebsite = input(\"Input website(cnn, nytimes, bbc, nzherald): \") \n\turl = input(\"Input url: \")\n\tscraper(website, url)\ndef scraper(website, url):\n\tprint(\"%s, %s\" % (website, url))\nif __name__ == '__main__': \n ...
python
edit
1
2
mit
f5cc3275a11c809bb6f5ab097414d0a5ccda2341
Alex-Gurung/ScrapeTheNews
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport inspect\n\nfrom .scopes import get_userinfo_by_scopes\n\n\ndef process_id_token(payload, user, scope=None):\n if scope is None:\n # HACK: Steal the scope argument from the locals dictionary of\n # the caller, since i...
python
edit
1
2
mit
6e1126fe9a8269ff4489ee338000afc852bce922
mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo
oidc_apis/id_token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport fcntl\nimport socket\nimport struct\nfrom contextlib import contextmanager\n\n\n@contextmanager\ndef use_interface(ifname):\n \"\"\"\n :type ifname: str\n\n \"\"\"\n ip = _ip_address_for_interface(ifname.encode('ascii'))\...
python
edit
1
1
apache-2.0
43f67067c470386b6b24080642cc845ec1655f58
OPWEN/opwen-webapp,ascoderu/opwen-webapp,ascoderu/opwen-webapp,OPWEN/opwen-webapp,OPWEN/opwen-webapp,ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver,ascoderu/opwen-webapp
utils/networking.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport pandas as pd\nfrom datetime import date\nimport holidays\n\n\ndef sanitize_holiday_name(name):\n new_name = [c for c in name if c.isalpha() or c.isdigit() or c == ' ']\n new_name = \"\".join(new_name).l...
python
edit
2
5
mit
987e3b3387124c9eee7b0d69647fe2eeba40b70d
davidgasquez/kaggle-airbnb
snippets/list_holidays.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport sys\n\nimport requests\n\n# Try to import urljoin from the Python 3 reorganized stdlib first:\ntry:\n from url...
python
edit
1
0
bsd-3-clause
1c9f12f808ffa0f1d4f16ea9f35021a83126243f
upayavira/pysolr,mylanium/pysolr,mbeacom/pysolr,shasha79/pysolr,django-searchstack/skisolr,toastdriven/pysolr,CANTUS-Project/pysolr-tornado,toastdriven/pysolr,mylanium/pysolr,mbeacom/pysolr,upayavira/pysolr,django-haystack/pysolr,swistakm/pysolr,CANTUS-Project/pysolr-tornado,swistakm/pysolr,django-haystack/pysolr,rokak...
get-solr-download-url.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pygraphc.misc.IPLoM import *\nfrom pygraphc.evaluation.ExternalEvaluation import *\n\n# set input path\nip_address = '161.166.232.17'\nstandard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_address\nstand...
python
edit
2
0
mit
1c43affbd82f68ed8956cd407c494ff46dab9203
studiawan/pygraphc
examples/IPLoM_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Username to UUID\n Converts a Minecraft username to it's UUID equivalent.\n\nParses http://www.lb-stuff.com/Minecraft-Name-History output to retrieve the UUID\n of an old name that's no longer in use.\n\"\"\"\nimport http.client\n\nf...
python
edit
1
5
mit
d78fad6937fb20a1ea7374240607b5d6800aa11b
mrlolethan/MinecraftUsernameToUUID
username_to_uuid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom prudent.sequence import Sequence\n\n\nclass SequenceTest(TestCase):\n def setUp(self):\n self.seq = Sequence([1, 2, 3])\n\n def test_getitem(self):\n assert self.seq[0] == 1\n s...
python
edit
1
2
mit
67d067fe499ba2ec78d34083640a4bfe9835d62b
eugene-eeo/prudent
tests/test_sequence.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom contextlib import closing\nfrom sqlite3 import connect\nfrom os.path import isfile\nfrom bottle import request, template, route, run\n\n@route('/virustotal/<db>')\ndef virus(db):\n if not isfile(db):\n ...
python
edit
1
2
mit
e112fedcc11ec12d1a669b47a223b4363eeb27e0
enricobacis/playscraper
virustotal/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys, os\nv = os.path.join(sys.prefix, \"tcl\", \"tcl8.3\")\nif os.path.exists(os.path.join(v, \"init.tcl\")):\n os.environ[\"TCL_LIBRARY\"] = v\n\n```\n\nApply this change: Work the Tcl version number in the path we search for." ...
python
edit
1
0
mit
f62980f99654b22930cac6716410b145b590221f
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/lib-tk/FixTk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache License, Version 2.0. See the LICENSE file for details.\nfrom tests import OldPythonTe...
python
edit
9
2
apache-2.0
0c0a1d0ec480c7df9dd8821d40af7791e46db453
agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
tests/lib/test_finance.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom rackattack.tcp import client\n\n\n_VAR_NAME = \"RACKATTACK_PROVIDER\"\n\n\ndef factory():\n if _VAR_NAME not in os.environ:\n raise Exception(\n \"The environment variable '%s' must be defined properly\"...
python
edit
1
3
apache-2.0
86a2e55954ff4b8f5e005296e2ae336b6be627a0
eliran-stratoscale/rackattack-api,Stratoscale/rackattack-api
py/rackattack/clientfactory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n\r\nimport webapp2\r\n\r\n# Importing request handlers\r\nfrom signup import Signup\r\nfrom login import Login\r\nfrom logout import Logout\r\nfrom wikipage import WikiPage\r\nfrom editpage import EditPage\r\n\r\n...
python
edit
1
0
mit
7d26f7c16b7b33ae0c011bb2db588b056fe90e3e
lttviet/udacity-final
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport logging\nimport subprocess\n\nsys.path.insert(0, '..')\n\nfrom unittest2 import TestCase\n\n\nclass MockLoggingHandler(logging.Handler):\n \"\"\"Mock logging handler to check for expected logs.\"\"\"\n\n def __init_...
python
edit
1
1
bsd-3-clause
9a8d552b9424c11d6a58fcf38abea6bc2d55b1f0
elbaschid/virtual-node
tests/install_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns(\n '',\n url(r'^admin/', include(admin.site.urls)),\n url(r'^', include('...
python
edit
1
0
mit
db2d8da9109ab4a8aa51acbd80abb2088a7fd299
fladi/django-campus02,fladi/django-campus02
campus02/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport vx\n\nimport os.path\n\ndef mode_from_filename(file):\n root, ext = os.path.splitext(file)\n ext = ext if ext else root\n\n mode = None\n if ext == '.c':\n return c_mode\n\nclass mode:\n def __init__(self, windo...
python
edit
4
4
mit
b63b22678a005baa6195854b65cc1828061febba
philipdexter/vx,philipdexter/vx
vx/mode.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom itertools import combinations\nfrom deuces.deuces import Card, Evaluator, Deck\nfrom nuts import nut_hand\n\nevaluator = Evaluator()\ndeck = Deck()\nflop = deck.draw(3)\n\ndef omaha_eval(hole, board):\n assert(len(hole)) == 4\n r...
python
edit
4
3
mit
87acf306addc60d7678ff980aef4b87f4225839b
zimolzak/poker-experiments,zimolzak/poker-experiments,zimolzak/poker-experiments
theo_actual_nut.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport slackclient\nimport time\nimport os\n\nslackClient = slackclient.SlackClient(os.environ[\"SLACK_TOKEN\"])\nslackClient.rtm_connect()\nlastPingTime = 0\nprint(os.environ)\nwhile True:\n for message in slackClient.rtm_read():\n ...
python
edit
1
0
mit
f7777c858baf049af83bd39168d0640e4dedf29c
ollien/Slack-Welcome-Bot
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sahara_dashboard.api import sahara\n\n__all__ = [\n \"sahara\"\n]\n\n```\n\nApply this change: Add licensing info in source file.\n\n[H102 H103] Source code should be licensed under the Apache 2.0 license.\nAll source files should h...
python
edit
1
0
apache-2.0
694a85c71c315ccdb3e2f2946f86ce95936ee684
openstack/sahara-dashboard,openstack/sahara-dashboard,openstack/sahara-dashboard,openstack/sahara-dashboard
sahara_dashboard/api/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Delete all secure policies.\n#\n\nimport os\nimport sys\nimport json\nsys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))\nfrom sdcclient import SdSecureClient\n\n\ndef usage():...
python
edit
3
1
mit
c87f47a3cf4bfd921f7953a9bb14fbc4675ea0e6
draios/python-sdc-client,draios/python-sdc-client
examples/delete_all_policies.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n _\n ___ __ _ | | ___\n / __|/ _` || | / __|\n| (__| (_| || || (__\n \\___|\\__,_||_| \\___|\n\n\nNote:\n The relative imports here (noted by the . prefix) are done as a convenience\n so that the consumers of th...
python
edit
8
0
isc
e55ccadb0954eaa66526dc6f112b5eac54a51ab3
bike-barn/red-green-refactor
calc/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport locale\nimport os\nimport signal\nimport sys\nfrom argparse import ArgumentParser\n\nimport gi\ngi.require_version('Gtk', '3.0')\ngi.require_version('GtkSource', '3.0')\n\nfrom gi.repository import Gio, GLib, Gtk\n\nfrom rsr import _...
python
edit
3
1
mit
fbf8b169cceb4c9a78d114880d5ce0eb59108a38
andialbrecht/runsqlrun
rsr/cmd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom django.conf import settings\nfrom django.contrib.admin.models import LogEntry\nfrom django.core.management.base import BaseCommand\n\nfrom cla_eventlog.models import Log\nfrom cla_provider.models i...
python
edit
1
2
mit
34d7a7ea41843ef4761804e973ec9ded1bb2a03b
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
cla_backend/apps/cla_butler/management/commands/reverthousekeeping.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n###\n# Copyright (c) 2012, spline\n# All rights reserved.\n#\n#\n###\n\n\"\"\"\nAdd a description of the plugin (to be presented to the user inside the wizard)\nhere. This should describe *what* the plugin does.\n\"\"\"\n\nimport supybot\n...
python
edit
5
0
mit
8f993412a0110085fee10331daecfb3d36973518
reticulatingspline/Scores,cottongin/Scores
__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\nfrom os.path import curdir, devnull\nfrom subprocess import check_call\n\nfrom pytest import fixture, mark, raises\n\nfrom csft import __main__ as main\n\n\n@fixture\ndef null():\n with open(devnull, 'w') as fob...
python
edit
1
2
mit
d36a4453eb6b62f8eda4614f276fdf9ba7afb26a
yanqd0/csft
tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\ndef test_get_joke():\n from pyjokes import get_joke\n\n for i in range(10):\n assert get_joke()\n\n languages = ['eng', 'de', 'spa']\n categories = ['neutral', 'explicit', 'all']\n\n for lang in languages:\n ...
python
edit
1
3
bsd-3-clause
91a7e4ba30c2c455c58b7069015680b7af511cc4
borjaayerdi/pyjokes,trojjer/pyjokes,martinohanlon/pyjokes,bennuttall/pyjokes,ElectronicsGeek/pyjokes,pyjokes/pyjokes,gmarkall/pyjokes
tests/test_get_joke.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\nimport envoy\nfrom .ants_error import ANTSError\n\ndef create_template(metric, files):\n \"\"\"\n Builds a template from the given image files.\n \n :param metric: the similarity metric\n :param fil...
python
edit
1
4
bsd-2-clause
d5167d8ba1b3107e5ce121eca76b5496bf8d6448
ohsu-qin/qipipe
qipipe/registration/ants/template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport datetime\nimport random\ntimestamp = datetime.datetime.now()\nhumidity = random.random()\ntemperature = random.random() * 100\nprint \"Content-Type: application/json\"\nprint\nprint \"\"\"\\\n{\"resource\": \"p...
python
edit
3
0
apache-2.0
877d90ff064b70a7ce861ed66082c4d703170fed
projectcs13/sensor-cloud,projectcs13/sensor-cloud,EricssonResearch/iot-framework-engine,EricssonResearch/iot-framework-engine,projectcs13/sensor-cloud,EricssonResearch/iot-framework-engine,EricssonResearch/iot-framework-engine
scripts/python/cgi-bin/resource.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nclass Voter(models.Model):\n '''\n Models someone who may vote\n '''\n user = models.OneToOneField(User)\n\n def __str__(self):\n return se...
python
edit
1
1
bsd-3-clause
dfd6793f16d0128b3d143d0f1ebc196bb79505c2
shearichard/django-channels-demo,shearichard/django-channels-demo,shearichard/django-channels-demo
chnnlsdmo/chnnlsdmo/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Codewars: Draw stairs\n8 kyu\n\nURL: https://www.codewars.com/kata/draw-stairs/\n\nGiven a number n, draw stairs using the letter \"I\", n tall and n wide,\nwith the tallest in the top left.\n\nFor example n = 3 result in \"I\\n I\\n ...
python
edit
3
3
bsd-2-clause
28960dc03e5e14db94d18b968947257029f934d8
bowen0701/algorithms_data_structures
cw_draw_stairs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2007-2011 gocept gmbh & co. kg\n# See also LICENSE.txt\n# $Id$\n\"\"\"Interface definitions for the test content type.\"\"\"\n\n\nimport zope.interface\n\n\nclass ITestContentType(zope.interface.Interface):\n \"\"\"A type...
python
edit
1
0
bsd-3-clause
13d0b4b50b2eaaf5c557576b7b45a378d901c49c
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
src/zeit/cms/testcontenttype/interfaces.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport hunting.sim.entities as entities\n\n\nclass GameObjectEncoder(json.JSONEncoder):\n def default(self, o):\n d = o.__dict__\n d.pop('owner', None)\n\n if isinstance(o, entities.GameObject):\n ...
python
edit
1
5
mit
8c2996b94cdc3210b24ebeaeb957c625629f68a5
MoyTW/RL_Arena_Experiment
hunting/level/encoder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport glob\nimport getopt\n\ndef file_list(path):\n files = []\n\n if os.path.isfile(path):\n return [path]\n\n for f in os.listdir(path):\n new_dir = os.path.join(path, f)\n if o...
python
edit
3
6
apache-2.0
7fcccea5d7fdfb823d17f1db56f5ece42ef2fd8b
kans/zirgo,kans/zirgo,kans/zirgo
tools/bundle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport unittest\n\n\nclass GhostscriptTest(unittest.TestCase):\n\n def test_installed(self):\n process = subprocess.Popen(\n ['gs', '--version'],\n stdin=None,\n stdout=subproces...
python
edit
1
1
mit
169a8612eb06410a5ae7e110227f7bea010d2ba9
YPlan/treepoem
tests/test_ghostscript.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport urllib\nfrom os.path import basename\n\nfrom django.core.files import File\n\n\nclass FilepickerFile(object):\n filepicker_url_regex = re.compile(\n r'https?:\\/\\/www.filepicker.io\\/api\\/file\\/.*')\n\n ...
python
edit
1
4
mit
5ede88c91f61b4aeb3a1e9b55e6b7836cf805255
FundedByMe/filepicker-django,FundedByMe/filepicker-django,filepicker/filepicker-django,filepicker/filepicker-django
django_filepicker/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nFile: __init__.py\nAuthor: huxuan <i(at)huxuan.org>\nDescription: Initial file for app.\n\"\"\"\n\nfrom flask import Flask\n\napp = Flask(__name__) # pylint: disable=invalid-name\napp...
python
edit
1
1
mit
df2d24757d8e12035437d152d17dc9016f1cd9df
CAPU-ENG/CAPUHome-API,huxuan/CAPUHome-API
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport redis\nimport time\nfrom mqueue.conf import DOMAIN\nfrom mqueue.hooks.redis import serializer\nfrom mqueue.conf import HOOKS\n\nconf = HOOKS[\"redis\"]\nR = redis.StrictRedis(host=conf[\"host\"], port=conf[\"port\"], db=conf[\"db\"])...
python
edit
1
1
mit
f0ef4f5e269d7f2d7fd347e8f458c1c9ce1ffb34
synw/django-mqueue,synw/django-mqueue,synw/django-mqueue
mqueue/hooks/redis/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals, print_function, division\nfrom builtins import open\nfrom future import standard_library\nstandard_library.install_aliases()\nimport six\n\nimport json, numpy as np, os, io\nfrom .ba...
python
edit
5
6
mit
628de346d3cf22342bf09e9ad3337a4408ed5662
aranzgeo/properties,3ptscience/properties
properties/files.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# $Copyright:\n# ----------------------------------------------------------------\n# This confidential and proprietary software may be used only as\n# authorised by a licensing agreement from ARM Limited\n# (C) COPYRIGHT 2015 ARM Limited\n...
python
edit
4
2
apache-2.0
c9cc5585e030951a09687c6a61a489ec51f83446
JaviMerino/trappy,joelagnel/trappy,bjackman/trappy,derkling/trappy,ARM-software/trappy,sinkap/trappy,JaviMerino/trappy,joelagnel/trappy,ARM-software/trappy,derkling/trappy,bjackman/trappy,sinkap/trappy,ARM-software/trappy,ARM-software/trappy,bjackman/trappy,sinkap/trappy,joelagnel/trappy,sinkap/trappy,JaviMerino/trappy...
cr2/plotter/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nimport os\nimport re\n\nfrom .mistune import markdown\n\n\nclass CreateMinuteCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit):\n\t\tregion = sublime.Region(0, self.view.size())\n\t\tmd_source = sel...
python
edit
3
1
mit
72f28cfa2723faaa7f7ed2b165fd99b214bc67c9
Txarli/sublimetext-meeting-minutes,Txarli/sublimetext-meeting-minutes
MeetingMinutes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This is an example of how to parse ooniprobe reports\n\nimport yaml\nimport sys\nprint \"Opening %s\" % sys.argv[1]\nf = open(sys.argv[1])\nyamloo = yaml.safe_load_all(f)\n\nreport_header = yamloo.next()\nprint \"ASN: %s\" % report_header...
python
edit
11
0
bsd-2-clause
fe25e0d68647af689c4015f1728cd7dd2d48b7ee
0xPoly/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,0xPoly/...
scripts/example_parser.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass HashMismatch(ValueError):\n \"\"\"\n Raised when the incoming hash of a file does not match the expected.\n \"\"\"\n\n```\n\nApply this change: Bring the standard imports over" }, { "role": "assistant", "content":...
python
edit
1
0
bsd-2-clause
e85883389dd14377d63fc8c0b4decf486b3b7c2c
crateio/carrier
conveyor/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nclass Die(object):\n def __init__(self, sides = 6):\n self.sides = sides\n self.held = False\n self.die_face = 1\n def change_held(self, held):\n self.held = held\n def roll_die(self):\n ...
python
edit
1
2
mit
4fce2955ce76c1f886b2a234fe9d0c576843fefd
achyutreddy24/DiceGame
Dice.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Application configuration.\"\"\"\n\nimport os\n\n\nclass Config(object):\n \"\"\"Base configuration.\"\"\"\n\n DEBUG = False\n TESTING = False\n APP_DIR = os.path.abspath(os.path.dirname(__file__))...
python
edit
1
0
mit
be77248c56b71ca3c5240ec55676d08227a1f526
jaredmichaelsmith/grove,jaredmichaelsmith/grove
api/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport shutil\nimport os\nimport re\n\nwork = os.getcwd()\nfound = []\nregex = re.compile(r'pydarkstar\\.(.*)\\.rst')\nfor root, dirs, files in os.walk(work):\n for f in files:\n m = regex.match(f)\n if m:\n foun...
python
edit
3
0
mit
027e78f3e88a17e05881259d1f29d472b02d0d3a
AdamGagorik/pydarkstar
doc/source/scripts/titles.py
accepted
null
true
End of preview. Expand in Data Studio

CodeAlign — curated CommitPackFT (8 languages)

Instruction/code pairs from bigcode/commitpackft, filtered for syntax validity (tree-sitter), per-language lint errors, cyclomatic complexity, internal duplication and cross-sample near-duplicates (MinHash/LSH). Built as the SFT set of CodeAlign; the pipeline, thresholds and the full curation report live in that repository.

config rows contents
sft (default) 122,018 accepted samples — the SFT training set minus the rows dropped for secrets (see Privacy)
annotated 145,058 every processed sample with its curation verdict (status, error)
from datasets import load_dataset
sft = load_dataset("Sergasgr/codealign-commitpackft", "sft", split="train")

Format

messages is ChatML (user prompt, assistant target file). Two prompt types, derived from the commit itself: new_file (write-from-spec; commit created the file) and edit (existing file + commit message as instruction). 84.6% of sft rows are edit.

Languages (sft)

language rows
javascript 45,084
python 39,725
java 15,779
c_sharp 8,062
typescript 4,339
cpp 3,668
go 3,034
rust 2,327

Licensing and provenance

Only samples whose upstream license is one of apache-2.0, bsd-2-clause, bsd-3-clause, cc0-1.0, isc, mit, unlicense are included; the licence of every sample is in its license column and applies to that sample's code.

license sft rows
mit 76,499
apache-2.0 26,849
bsd-3-clause 11,913
bsd-2-clause 3,887
isc 1,423
unlicense 985
cc0-1.0 462

As in CommitPackFT, each row keeps its source commit and repos so the copyright holder can be identified (100.0% of sft rows carry provenance). Code authors who want their code removed can open an issue on the GitHub repository.

Known issues in the quality columns

lint_errors holds the values computed by the v1.0 curation run, which had linter bugs (the data was not re-curated):

  • C++, JavaScript, TypeScript: lint_errors is always 0, so these languages were filtered on syntax, complexity and duplication only. cpplint's total was parsed from the wrong output stream (fixed in the repository afterwards); ESLint ≥ 9 rejects the --no-eslintrc command line (still open).
  • Python: every value includes ruff's summary line (+1, or +2 when ruff also printed a fix hint), so the actual number of violations is 1–2 lower (fixed in the repository afterwards).

Privacy

  • Rows containing a high-confidence secret (private key blocks, AWS / GitHub / Slack / Google / Stripe credentials) were dropped: 48 from sft, 56 from annotated.
  • E-mail addresses (other than documentation and GitHub no-reply domains) were replaced with <EMAIL> in 8,272 sft rows.
  • Detection is pattern-based and will miss some personal data; do not use this dataset to identify individuals.

Decontamination

13-gram overlap of every HumanEval and MBPP problem (prompt + canonical solution) against the Python samples is reported in src/notebooks/01_curation_report.ipynb of the GitHub repository.

Citation

Upstream data: Muennighoff et al., OctoPack: Instruction Tuning Code Large Language Models (2023), arXiv:2308.07124.

Downloads last month
15

Paper for Sergasgr/codealign-commitpackft