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 unittest\n\nfrom enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen\n\n\nclass RotorTestCase(unittest.TestCase):\n pass\n\n\ndef run_tests():\n runner = unittest.TextTestRunner()\n suite = unittest.TestLoader().loadTest... | python | edit | 5 | 1 | mit | 75f6963082ed686f4d91ec8df3961048d9428c6b | ranisalt/enigma | test.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom snipts.models import Favorite, Snipt\n\nclass SniptAdmin(admin.ModelAdmin):\n readonly_fields = ('user',)\n list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)\n... | python | edit | 1 | 0 | mit | 7882831c7a027e778c9f14679c3a5639ca3ae29d | nicksergeant/snipt,nicksergeant/snipt,nicksergeant/snipt | snipts/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .lexerconstants import *\nfrom .ws_token import Tokeniser\n\n\nclass Lexer(object):\n def __init__(self, line):\n self.line = line\n self.pos = 0\n self.tokens = []\n\n def _get_int(self):\n token = To... | python | edit | 5 | 4 | apache-2.0 | 3234d929d22d7504d89753ce6351d0efe1bfa8ac | yasn77/whitepy | whitepy/lexer.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 django.apps import AppConfig\nfrom django.conf import settings\nfrom django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete\n\nfrom neomodel import config\n\nconfig.AUTO_INSTALL_LABE... | python | edit | 1 | 1 | mit | ffa00eaea02cda8258bf42d4fa733fb8693e2f0c | inonit/django-chemtrails,inonit/django-chemtrails,inonit/django-chemtrails | chemtrails/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom flexbe_core import EventState, Logger\nfrom flexbe_core.proxy import ProxySubscriberCached\n\nfrom geometry_msgs.msg import PoseStamped\n\n\nclass DetectPersonState(EventState):\n\t'''\n\tDetects the nearest pers... | python | edit | 7 | 3 | mit | 2cbffa60c0b12a268e0347a6a4ecfc6d5acb29e3 | marinaKollmitz/lamor15,pschillinger/lamor15,pschillinger/lamor15,marinaKollmitz/lamor15,pschillinger/lamor15,marinaKollmitz/lamor15,pschillinger/lamor15,marinaKollmitz/lamor15,marinaKollmitz/lamor15,pschillinger/lamor15 | lamor_flexbe_states/src/lamor_flexbe_states/detect_person_state.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib\nfrom django import template\nfrom django.conf import settings\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef convert_url(request, sourceurl, format='pdf'):\n fullurl = request.build_absolute_uri(sourceurl)... | python | edit | 1 | 3 | bsd-2-clause | d8179c0006fb5b9983898e4cd93ffacfe3fdd54f | makinacorpus/Geotrek,Anaethelion/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,mabhub/Geotrek,GeotrekCE/Geotrek-admin,Anaethelion/Geotrek,johan--/Geotrek,camillemonchicourt/Geotrek,johan--/Geotrek,mabhub/Geotrek,Anaethelion/Geotrek,camillemonchicourt/Geotrek,GeotrekCE/Geotrek-admin,camillemo... | caminae/mapentity/templatetags/convert_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\n\nfrom nodeconductor.core.filters import UUIDFilter\n\nfrom . import models\n\n\nclass PackageTemplateFilter(django_filters.FilterSet):\n name = django_filters.CharFilter(lookup_type='icontains')\n settings_uuid... | python | edit | 1 | 0 | mit | fddc7e09bcebf9b4875906ad03e58699237b13be | opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind | src/nodeconductor_assembly_waldur/packages/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from .secrets import *\nexcept ImportError:\n import sys\n sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')\n\nfrom .base import *\n\n\n#\n# We need this specific override because having... | python | edit | 4 | 0 | bsd-3-clause | 1359af2cd9c038d050cb1c4619637143ab020a70 | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | onepercentclub/settings/salesforcesync.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport urllib\n\nimport RPi.GPIO as GPIO\n\n# GPIO input pin to use\nLPR_PIN = 3\n# URL to get image from\nSOURCE = 'http://192.168.0.13:8080/photoaf.jpg'\n# Path to save image locally\nFILE = 'img.jpg'\n\n# Use GPIO pin number... | python | edit | 3 | 0 | mit | 7b422b2432bc8db3034e39073d2efa0bd69ec35f | adampiskorski/lpr_poc | test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pygraphc.preprocess.PreprocessLog import PreprocessLog\nfrom pygraphc.similarity.StringSimilarity import StringSimilarity\nfrom itertools import combinations\n\n\nclass LogTextSimilarity(object):\n \"\"\"A class for calculating cosi... | python | edit | 1 | 2 | mit | e853e0137e59314f5101c178c74fd626984c34ac | studiawan/pygraphc | pygraphc/similarity/LogTextSimilarity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom website.app import init_app\nfrom website.models import Node, User\nfrom framework import Q\nfrom framework.analytics import piwik\n\napp = init_app(\"website.settings\", set_backends=True)\n\n# NOTE: This is a naive implementation for... | python | edit | 1 | 0 | apache-2.0 | 6cc904a4ee48f8bdbc52cff6cda254e5e69b3c48 | brandonPurvis/osf.io,GaryKriebel/osf.io,brianjgeiger/osf.io,kch8qx/osf.io,leb2dg/osf.io,zachjanicki/osf.io,cosenal/osf.io,jeffreyliu3230/osf.io,kushG/osf.io,mluo613/osf.io,GaryKriebel/osf.io,njantrania/osf.io,jinluyuan/osf.io,erinspace/osf.io,mfraezz/osf.io,barbour-em/osf.io,adlius/osf.io,HarryRybacki/osf.io,hmoco/osf.... | framework/analytics/migrate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Module: node\n# Date: ...\n# Author: ...\n\n\"\"\"Node\n\n...\n\"\"\"\n\nfrom .client import Client\nfrom .server import Server\n\nfrom circuits import handler, BaseComponent\n\n\nclass Node(BaseComponent):\n \"\"\"Node\n\n ... | python | edit | 1 | 4 | mit | 0b5cc3f4702081eb565ef83c3175efc4e8b30e75 | eriol/circuits,eriol/circuits,treemo/circuits,nizox/circuits,eriol/circuits,treemo/circuits,treemo/circuits | circuits/node/node.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 | 4 | 0 | apache-2.0 | 60f9acad7610ee8bed324d1e142cc4801a9e3713 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom gpu_test_expectations import GpuTestExpectations\n\n# See the GpuTes... | python | edit | 1 | 1 | bsd-3-clause | 3f22453c43b6111c22796f9375622eb6d978d669 | CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM... | content/test/gpu/gpu_tests/trace_test_expectations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import join\nimport sublime\nimport sys\nfrom unittest import TestCase\n\nversion = sublime.version()\n\ntry:\n from libsass import pathutils\nexcept ImportError:\n from sublime_libsass.libsass import pathutils\n\n\nclass... | python | edit | 4 | 3 | mit | c220c0a474a660c4c1167d42fdd0d48599b1b593 | blitzrk/sublime_libsass,blitzrk/sublime_libsass | tests/test_pathutils.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom s2v2 import * \n\ndef calculate_sum(data_sample):\n\ttotal = 0\n\tfor row in data_sample[1:]: # slice to start at row two, but I think we should only skip row 1 if we're importing the full csv (data_from_csv), but if we use the data w/... | python | edit | 3 | 2 | mit | 5bb9b2c9d5df410c85f4736c17224aeb2f05dd33 | alexmilesyounger/ds_basics | s2v3.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2020 Google LLC\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://www.apache.... | python | edit | 1 | 0 | apache-2.0 | 4ccf9226466b716cf1cbe6bdcfd13d7dfe66501e | google/megalista,google/megalista | megalist_dataflow/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nimport json\nimport os\nimport subprocess\nimport sys\n\n\ndef find_json_files():\n for root, _, filenames in os.walk('.'):\n if any(\n d in root\n for d in... | python | edit | 3 | 6 | mit | af2687703bc13eeabfe715e35988ad8c54ce9117 | wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api | builds/format_json.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gettext import gettext as _\n\n\nclass Fixed:\n _(\"A mixin that ensures the presence of a predetermined value\")\n\n def __init__(self, value, *args, **kwargs):\n self.value = value\n super(Fixed, self).__init__(*a... | python | edit | 1 | 2 | bsd-3-clause | 8d4f3f63b3d38156759319d32a63d34413c77a71 | gulopine/steel-experiment | steel/fields/mixin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python3\n\nimport requests\n\npeople = requests.get('https://api.wurstmineberg.de/v2/people.json').json()\nstatus = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()\n\nprint(len(status[... | python | edit | 1 | 0 | mit | 7a688f0712ff323668955a21ea335f3308fcc840 | wurstmineberg/bitbar-server-status | wurstmineberg.45s.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.db import transaction\n\nfrom waldur_core.core.utils import DryRunCommand\n\nUser = get_user_model()\n\... | python | edit | 1 | 3 | mit | 8be551ad39f3aedff5ea0ceb536378ea0e851864 | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind | src/waldur_auth_openid/management/commands/import_openid_accounts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport cgi\nimport sqlite3\nimport time\n\nimport config\n\ndef valid(qs):\n required_keys = ['title', 'comment', 'posted_by', 'localite', 'latitude', 'longitude']\n return all([qs.has_k... | python | edit | 2 | 2 | mit | cfe77bd4fd40b58678fa56ec08b5f862d9f1781c | otknoy/michishiki_api_server | post.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass CommandsError(Exception):\n pass\n\n\nclass CheckFailureError(Exception):\n def __init__(self, ctx, check):\n self.ctx = ctx\n self.check = check\n\n def __repr__(self):\n if isinstance(self.check, list):... | python | edit | 1 | 2 | mit | 42e4f42901872433f90dd84d5acf04fec76ab7f3 | SunDwarf/curious | curious/commands/exc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom alembic import op\n\n\n# revision identifiers, used by ... | python | edit | 1 | 1 | mit | 49155373b9eea3812c295c9d89c40a7c9c1c1c13 | opentrials/scraper,opentrials/collectors | migrations/versions/20170214191843_pubmed_rename_identifiers_list_to_article_ids.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom .bmi_ilamb import BmiIlamb\n\n\n__all__ = ['BmiIlamb']\n__version__ = 0.1\n\npackage_dir = os.path.dirname(__file__)\ndata_dir = os.path.join(package_dir, 'data')\n\n```\n\nApply this change: Add Configuration to package def... | python | edit | 1 | 0 | mit | 02522262692554a499d7c0fbc8f2efe4361023f1 | permamodel/bmi-ilamb | bmi_ilamb/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pybedtools as bt\nimport six\n\ndef concat(bed_files, catted=None):\n \"\"\"\n recursively concat a set of BED files, returning a\n sorted bedtools object of the result\n \"\"\"\n bed_files = [x for x in bed_files if x... | python | edit | 3 | 7 | mit | 746420daec76bf605f0da57902bb60b2cb17c87d | guillermo-carrasco/bcbio-nextgen,biocyberman/bcbio-nextgen,lbeltrame/bcbio-nextgen,chapmanb/bcbio-nextgen,mjafin/bcbio-nextgen,elkingtonmcb/bcbio-nextgen,a113n/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,guillermo-carrasco/bcbio-nextgen,vladsaveliev/bcbio-nextgen,brainstorm/bcbio-nextgen,chapmanb/bcbio-nextgen,lbeltrame/b... | bcbio/bed/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom copy import copy\nfrom molo.yourwords.models import (YourWordsCompetition, ThankYou,\n YourWordsCompetitionIndexPage)\n\nregister = template.Library()\n\n\n@register.inclus... | python | edit | 1 | 3 | bsd-2-clause | f340c674737431c15875007f92de4dbe558ba377 | praekelt/molo.yourwords,praekelt/molo.yourwords | molo/yourwords/templatetags/competition_tag.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef add_quotas_to_scope(sender, instance, created=False, **kwargs):\n if created:\n from nodeconductor.quotas import models\n for quota_name in sender.QUOTAS_NAMES:\n models.Quota.objects.create(name=quota_name... | python | edit | 2 | 4 | mit | 96b554c62fb9449760d423f7420ae75d78998269 | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/quotas/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\ndef split_string(string, seperator=' '):\n return string.split(seperator) \n\ndef split_regex(string, seperator_pattern):\n return re.split(seperator_pattern, string)\n\nclass FilterModule(object):\n ''' A filter to sp... | python | edit | 7 | 2 | cc0-1.0 | ae1cf07cc703d85f3d3c77eab76c83baec17a74d | timraasveld/ansible-string-split-filter,ypid/ansible-string-split-filter | split.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nsender = str(raw_input(\"Your Username: \"))\ntarget = str(raw_input(\"Target's Username: \"))\nmessage = str(raw_input(\"Message: \"))\n\n#Messages are encoded like so \"senderProgramVx.x##target##sender##message\"\n#Example: ... | python | edit | 4 | 0 | mit | 7785d3129d089ce99aee340b3a72fd78d7e8f556 | NickGeek/WiN,NickGeek/WiN,NickGeek/WiN | send.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gettext\n\n\nclass Version(object):\n def __init__(self, canonical_version, final):\n self.canonical_version = canonical_version\n self.final = final\n\n @property\n def pretty_version(self):\n if self.f... | python | edit | 1 | 2 | apache-2.0 | 5aa809aa36bbc32610b9b7998b8606bbfc65508a | mjzmjz/swift,iostackproject/IO-Bandwidth-Differentiation,Triv90/SwiftUml,VictorLowther/swift,mjwtom/swift,psachin/swift,hurricanerix/swift,levythu/swift,smerritt/swift,zackmdavis/swift,prashanthpai/swift,IPVL/swift-kilo,zaitcev/swift-lfs,hbhdytf/mac2,Khushbu27/Tutorial,clayg/swift,larsbutler/swift,nadeemsyed/swift,Mira... | swift/__init__.py | rejected_duplicate | Near-duplicate of sample 241 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\n\ndef distance(u, v):\n \"\"\"\n Distance measure custom made for feature comparison.\n\n Parameters\n ----------\n u: first feature\n v: second feature\n\n Returns\n -------\n\n \"\"\"\n ... | python | edit | 1 | 1 | mit | 729d3160f974c521ab6605c02cf64861be0fb6ab | lpfann/fri | fri/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nTRAJECTORY = 'linear'\nCONTROLLER = 'pid'\n\nif TRAJECTORY == 'linear':\n SIMULATION_TIME_IN_SECONDS = 80.0\nelif TRAJECTORY == 'circular':\n SIMULATION_TIME_IN_SECONDS = 120.0\nelif TRAJECTORY == 'squared':\n ... | python | edit | 1 | 0 | mit | 340cbe542b89515033b6da40cf6cd6f761cfba9f | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef get_readme():\n return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n\nsetup(\n author=\"Julio Gonzalez Altamirano\",\n a... | python | edit | 1 | 1 | mit | 00fd448acf952ae5e844c4abe98ef0e973cdf981 | jga/capmetrics-etl,jga/capmetrics-etl | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\nlongDesc = \"\"\nif os.path.exists(\"README.rst\"):\n\tlongDesc = open(\"README.rst\").read().strip()\n\nsetup(\n name = \"pytesseract\",\n version = \"0.1.6\",\n author = \"Samuel Hoffs... | python | edit | 1 | 0 | apache-2.0 | b78c634069354565cf749ed139cade244415b5a4 | madmaze/pytesseract | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n###############################################################################\n# Copyright Kitware Inc.\n#\n# Licensed under the Apache License, Version 2.0 ( the \"License\" );\n# you may not use this file except in compliance with th... | python | edit | 1 | 1 | apache-2.0 | 27065fd302c20937d44b840472d943ce8aa652e7 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela | plugins/candela/girder_plugin_candela/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nfrom setuptools import setup\nimport versioneer\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith open(os.path.join(here, \"README.md\"), encoding=\"utf-8\") as f:\n long_description = f.read(... | python | edit | 1 | 0 | bsd-3-clause | 5d93a71fee4b53000a3a5bbacd7d24f1caf11528 | fsspec/filesystem_spec,intake/filesystem_spec,fsspec/filesystem_spec | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\n\n# Uncomment the next two lines to enable the admin:\n# from django.contrib import admin\n# admin.autodiscover()\n\nu... | python | edit | 3 | 0 | apache-2.0 | 2cc51dd426f53b699a544ef34984dc9efdfe03cc | lovehhf/xblock-sdk,lovehhf/XBlock,stvstnfrd/xblock-sdk,edx-solutions/XBlock,Lyla-Fischer/xblock-sdk,edx/xblock-sdk,lovehhf/xblock-sdk,Pilou81715/hackathon_edX,EDUlib/XBlock,cpennington/XBlock,nagyistoce/edx-XBlock,edx-solutions/XBlock,edx-solutions/xblock-sdk,edx/xblock-sdk,nagyistoce/edx-xblock-sdk,Pilou81715/hackatho... | debugger/urls.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 | 2 | apache-2.0 | 93d3a2f19cfb3ef9ae62d04ce24901df81bafc3e | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | luigi/rfam/families_csv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom cs251tk.student import remove\nfrom cs251tk.student import clone_student\nfrom cs251tk.student import stash\nfrom cs251tk.student import pull\nfrom cs251tk.student import checkout_date\nfrom cs251tk.student import record\n... | python | edit | 3 | 5 | mit | 2d01301e9154045f4b15d1523089ad36fdd7f6f4 | StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit | cs251tk/toolkit/process_student.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom core.computer import Computer\nfrom time import sleep\nfrom console import start as start_console\n\n# Initialize computer instance\ncomputer = Computer()\ncomputer.start_monitoring()\ncomputer.processor.start_monitoring()\nfor mem in ... | python | edit | 1 | 0 | bsd-3-clause | 5c8754aefa0a0b2f9e49d95970475a66a6de9510 | uzumaxy/pyspectator | start.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name=\"feedinlib\",\n version=\"0.1.0dev\",\n description=\"Creating time series fr... | python | edit | 1 | 1 | mit | 0309dbd25b6d7603aba5f0cf686e9d049716b711 | oemof/feedinlib | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom thefuck.utils import replace_command\n\n\ndef match(command):\n return (re.search(r\"([^:]*): Unknown command.*\", command.stderr) != None\n and re.search(r\"Did you mean ([^?]*)?\", command.stderr) != None)\n\... | python | edit | 1 | 2 | mit | 725605cd20b29e200f6aaa90f29053bc623b0e51 | mlk/thefuck,mlk/thefuck,nvbn/thefuck,Clpsplug/thefuck,SimenB/thefuck,nvbn/thefuck,scorphus/thefuck,Clpsplug/thefuck,SimenB/thefuck,scorphus/thefuck | thefuck/rules/unknown_command.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import request\nfrom flask import jsonify\n\nfrom y_text_recommender_system.recommender import recommend\n\napp = Flask(__name__)\n\n\nclass InvalidUsage(Exception):\n status_code = 400\n\n def __in... | python | edit | 1 | 3 | mit | 6f60f6257cbcd0328fcdb0873d88d55772731ba4 | joaojunior/y_text_recommender_system | api/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Author(models.Model):\n name = models.CharField(max_length=255)\n\n def __str__(self):\n return self.name\n\n\nclass Story(models.Model):\n author = models.ForeignKey(Author, on_delete... | python | edit | 1 | 1 | mit | d237c121955b7249e0e2ab5580d2abc2d19b0f25 | NovelTorpedo/noveltorpedo,NovelTorpedo/noveltorpedo,NovelTorpedo/noveltorpedo,NovelTorpedo/noveltorpedo | noveltorpedo/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import namedtuple\nimport sched_utils\nimport check\n\nScheduleConfiguration = namedtuple('ScheduleConfiguration',\n ['zones', 'teams', 'weight_zones',\n ... | python | edit | 2 | 0 | mit | c10be759ad2ddbd076a1fe0a887d3cf9325aba3d | prophile/match-scheduler,prophile/match-scheduler | src/scheduler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import Session\n\n\nclass Tracking(object):\n \"\"\"The default tracking middleware logs all successful responses as a 'visit' variable with\n the URL path as its value.\"\"\"\n\n def process_response(self, request, re... | python | edit | 1 | 3 | bsd-3-clause | 572dca82aab583e91e5b8402d1334bae55244d16 | RENCI/xDCIShare,FescueFungiShare/hydroshare,ResearchSoftwareInstitute/MyHPOM,RENCI/xDCIShare,FescueFungiShare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,FescueFungiShare/hydroshare,ResearchSoftwareInstitute/MyHPOM,FescueFungiShare/hydroshare,hydroshare/hydroshare,RENCI/xDCIShare,RENCI/xDCIShare,ResearchSoft... | hs_tracking/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nPACKAGE = 'mtdna'\n\nVERSION = open(os.path.join(os.path.dirname(os.path.realpath(__file__)),'oldowan', PACKAGE, 'VERSION')).read().strip()\n\ndesc_lines = open('README', 'r').r... | python | edit | 3 | 0 | mit | 0458cc6e41b55bdd6e393c517492a5f6631a51c9 | ryanraaum/oldowan.mtdna | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport argparse\n\nimport opt_bug_reducer\n\nimport random_bug_finder\n\n\ndef main():\n parser = argparse.ArgumentParser(description=\"\"\"\\\nA program for reducing sib/sil crashers\"\"\")\n subparsers = par... | python | edit | 1 | 1 | apache-2.0 | ecd06f371fb83823494b17e341d7c4cf8bf117d0 | uasys/swift,JaSpa/swift,milseman/swift,harlanhaskins/swift,gregomni/swift,sschiau/swift,austinzheng/swift,xedin/swift,xwu/swift,codestergit/swift,harlanhaskins/swift,huonw/swift,shahmishal/swift,lorentey/swift,deyton/swift,gmilos/swift,sschiau/swift,gregomni/swift,harlanhaskins/swift,shajrawi/swift,stephentyrone/swift,... | utils/bug_reducer/bug_reducer/bug_reducer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom tagging.fields import TagField\nimport tagging\n# OCR model, erm, model\n\n\nclass OcrModel(models.Model):\n \"\"\"\n OCR model objects.\n \"\"\"\n... | python | edit | 3 | 1 | apache-2.0 | 8237291e194aa900857fe382d0b8cefb7806c331 | vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium | ocradmin/ocrmodels/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport os\nfrom kokki import *\n\nPackage(\"erlang\")\n\nScript(\"install-busket\",\n not_if = lambda:os.path.exists(env.config.busket.path),\n cwd = \"/usr/local/src\",\n code = (\n \"git clone git://github.com/samuel/bus... | python | edit | 7 | 0 | bsd-3-clause | a3f611220afa9cc0ba1b2eb8fb8a4d4c220e99dd | samuel/kokki | kokki/cookbooks/busket/recipes/default.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Needed to allow import\n#\n# Copyright (C) 2006 British Broadcasting Corporation and Kamaelia Contributors(1)\n# All Rights Reserved.\n#\n# You may only modify and redistribute this under the terms of any of the\n# following licenses(... | python | edit | 1 | 0 | apache-2.0 | 157197b330360ccfeaa0bbf54453702ee17d0106 | sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia | Code/Python/Kamaelia/Kamaelia/Device/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n long_description = open('README.md').read()\n\nsetup(\n name=\"xonsh-apt-tabcomple... | python | edit | 1 | 0 | bsd-2-clause | ea0058f3c360f8b1f847edab77aa650761ea8e77 | DangerOnTheRanger/xonsh-apt-tabcomplete | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tempfile import TemporaryDirectory\n\nfrom expects import expect\nfrom hypothesis import given, assume, example\nfrom hypothesis.strategies import text, characters\nfrom mamba import description, it\nfrom pathlib import Path\n\nfrom cr... | python | edit | 1 | 1 | mit | ee66811628ea81e0540816e012c71d90457cc933 | Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki | test/utils/filesystem/name_sanitizer_spec.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport ctypes\nimport ctypes.util\nimport os\nimport sys\n\n\ndef find_libc():\n if sys.platform == 'win32':\n return ctypes.util.find_msvcrt()\n else:\n return ctypes.util.find_library('c')\n\... | python | edit | 1 | 5 | bsd-3-clause | 1cc6ec9f328d3ce045a4a1a50138b11c0b23cc3a | BrianVermeire/PyFR | pyfr/ctypesutil.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='autobuilder',\n version='1.0.2',\n packages=find_packages(),\n license='MIT',\n author='Matt Madison',\n author_email='<EMAIL>',\n entry_points={\n 'c... | python | edit | 1 | 0 | mit | bba064cc84bf7d0b7b4b7410a6a333af0609730c | madisongh/autobuilder | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nimport sys\n\nlong_description = ''\n\nif 'upload' in sys.argv:\n with open('README.rst') as f:\n long_description = f.read()\n\n\ndef extras_require():\n retu... | python | edit | 1 | 1 | apache-2.0 | da10b6baa19c1ef3a5f875297187e7248b7460b1 | ssanderson/interface | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django.views.static\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.views.generic import... | python | edit | null | null | mit | 5cb7aaac10c6c8cf818c46b2d0f47fe707e2b93c | r0x73/django-template,r0x73/django-template,r0x73/django-template | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/config/urls.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport json, os, requests\nfrom models import db, FoodMenu, FoodServices\n\nkey = os.environ.get('UWOPENDATA_APIKEY')\n\ndef getData(service):\n\tpayload = {'key': key, 'service': service}\n\tr = requests.get('http://... | python | edit | 3 | 1 | mit | 3e8921b2edcf8a675b6ed496cf5e282c76cc2070 | alykhank/FoodMenu,alykhank/FoodMenu,alykhank/FoodMenu | retrieveData.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='azurerm',\n version='0.5.3',\n description='Azure Resource Manager REST wrappers',\n url='http://github.com/gbowerman/azurerm',\n author='sendmarsh',\n author_email='<EMAI... | python | edit | 1 | 0 | mit | 4f889e4f42d831f2a12fccdd1956f77a8032563c | gbowerman/azurerm | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.auth.decorators import login_required\n\nfrom django.shortcuts import render\nfrom filer.models import File\nfrom filer.models import Folder\n\n\n@login_required\ndef documents(request):\n fil... | python | edit | 1 | 1 | mit | 8befea283830f76dfa41cfd10d7eb916c68f7ef9 | n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb | intern/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# coding=utf-8\n\nimport argparse\nimport json\n\nimport jsonschema\n\nimport awp.packager\nimport awp.validator\n\n\n# Parse arguments given via command-line interface\ndef parse_cli_args():\n\n parser = argparse... | python | edit | 1 | 2 | mit | 305849d57cc6897c65b4e0996f70a21f1d873d25 | caleb531/alfred-workflow-packager | awp/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\n\"\"\"\nrighteous.config\n\n\nSettings object, lifted from https://github.com/kennethreitz/requests\n\"\"\"\n\nfrom requests.config import Settings\n\nclass RighteousSettings(Settings):\n pass\n\n\nsettings = Righteous... | python | edit | 1 | 3 | unlicense | 15b4f0c587bdd5772718d9d75ff5654d9b835ae5 | michaeljoseph/righteous,michaeljoseph/righteous | righteous/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nROOT = os.path.abspath(os.path.dirname(__file__))\n\nsetup(\n name='django-nose',\n version='0.2',\n description='Django test runner that uses nose.',\n long_description=... | python | edit | 1 | 0 | bsd-3-clause | e01697c5d5e5e45a0dd20870c71bb17399991ca1 | millerdev/django-nose,millerdev/django-nose,harukaeru/django-nose,dgladkov/django-nose,sociateru/django-nose,360youlun/django-nose,mzdaniel/django-nose,brilliant-org/django-nose,sociateru/django-nose,dgladkov/django-nose,krinart/django-nose,fabiosantoscode/django-nose-123-fix,mzdaniel/django-nose,franciscoruiz/django-n... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Check Python version upon import"
},
{
"role": "assistant",
"content": "\nimport sys\n\nSUPPORTED_VERSIONS = [(2, 7), (3, 6)]\n\npython_major_version = sys.version_info[0]\npython_minor_version = sys.version_info[1]\n\nif (python... | python | new_file | 1 | 0 | mit | a473e54f5643483efc490f6362f0fca6fcf0c5bd | scoates/Zappa,pjz/Zappa,mathom/Zappa,Miserlou/Zappa,anush0247/Zappa,Miserlou/Zappa,mathom/Zappa,scoates/Zappa,pjz/Zappa,anush0247/Zappa | zappa/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.admin.views.decorators import staff_member_required\nfrom django.urls import re_path\nfrom flatblocks.views import edit\n\nurlpatterns = [\n re_path(\"^edit/(?P<pk>\\d+)/$\", staff_member_required(edit), name=\"flatbl... | python | edit | 1 | 0 | bsd-3-clause | 662287761b8549a86d3fb8c05ec37d47491da120 | funkybob/django-flatblocks,funkybob/django-flatblocks | flatblocks/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\nimport datetime\nimport ssl\nimport OpenSSL\n\n\ndef GetCert(SiteName, Port):\n return ssl.get_server_certificate((SiteName, Port))\n\n\ndef ParseCert(CertRaw):\n Cert = OpenSSL.crypto.load_certificate(\n ... | python | edit | 3 | 1 | apache-2.0 | dcd36fab023ac2530cbfa17449e3ce8f61ad6bdc | ivuk/ssl-cert-parse | ssl-cert-parse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom test_support import verbose, findfile, TestFailed\nimport linuxaudiodev\nimport errno\nimport os\n\ndef play_sound_file(path):\n fp = open(path, 'r')\n data = fp.read()\n fp.close()\n try:\n a = linuxaudiodev.open('w... | python | edit | 12 | 3 | mit | a760beb8d66222b456b160344eb0b4b7fccbf84a | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_linuxaudiodev.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n... | python | edit | 1 | 3 | mit | 50aa4ddeaad1d45687b8ab7d99a26602896a276b | mic4ael/indico,OmeGak/indico,mic4ael/indico,ThiefMaster/indico,pferreir/indico,pferreir/indico,ThiefMaster/indico,OmeGak/indico,ThiefMaster/indico,DirkHoffmann/indico,indico/indico,indico/indico,mvidalgarcia/indico,DirkHoffmann/indico,pferreir/indico,mic4ael/indico,OmeGak/indico,mvidalgarcia/indico,mvidalgarcia/indico,... | indico/modules/events/persons/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom planetary_test_data import PlanetaryTestDataProducts\nimport os\n\n\ndef test_planetary_test_data_object():\n \"\"\"Tests simple PlanetaryTestDataProducts attributes.\"\"\"\n data = PlanetaryTestDataPro... | python | edit | 1 | 2 | bsd-3-clause | 16d65c211b00871ac7384baa3934d88410e2c977 | pbvarga1/planetary_test_data,planetarypy/planetary_test_data | tests/test_planetary_test_data_2.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 Mirantis 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 | 4c52b8f63fea11278536ec6800305b01d9bd02a8 | ChameleonCloud/blazar,ChameleonCloud/blazar | blazar/plugins/dummy_vm_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django_comments.forms import CommentForm\n\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\nfrom bettertexts.models import TextComment\n\n\nclass TextCommentForm(CommentForm):\n\n def __init__(self... | python | edit | 1 | 1 | mit | 17e26fa55e70de657d52e340cb6b66691310a663 | citizenline/citizenline,citizenline/citizenline,citizenline/citizenline,citizenline/citizenline | bettertexts/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf8\n\n# Copyright 2013-2015 Vincent Jacques <<EMAIL>>\n\nimport cProfile as profile\nimport pstats\n\nimport cairo\n\nfrom DrawTurksHead import TurksHead\n\nstats_filename = \"profiling/profile_python.stats\"\n\nimg = cairo.Imag... | python | edit | 3 | 0 | mit | 385d7a5734e91217e9d8c0464327dedb30a69621 | jacquev6/DrawTurksHead,jacquev6/DrawTurksHead,jacquev6/DrawTurksHead | profile_python.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\n\nsetup(\n name='dj-queryset-manager',\n version='0.1.0',\n url='https://github.com/nosamanuel/dj-queryset-manager',\n license=open('LICENSE').read(),\n author='Noah Se... | python | edit | 1 | 0 | bsd-3-clause | 23981dd5908b423104bdf51e6882d043b3efdc6e | nosamanuel/dj-queryset-manager | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport logging\nimport os\nimport sys\n\nZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))\nsys.path.insert(0, ZULIP_PATH)\nfrom scripts.lib.setup_path import setup_path\nfrom ... | python | edit | 1 | 0 | apache-2.0 | 1a7c4a027628241f415cc5cc3f7aca09ad9a4027 | rht/zulip,zulip/zulip,andersk/zulip,kou/zulip,zulip/zulip,andersk/zulip,andersk/zulip,rht/zulip,zulip/zulip,kou/zulip,rht/zulip,zulip/zulip,andersk/zulip,andersk/zulip,zulip/zulip,kou/zulip,rht/zulip,kou/zulip,kou/zulip,andersk/zulip,kou/zulip,kou/zulip,rht/zulip,zulip/zulip,rht/zulip,zulip/zulip,andersk/zulip,rht/zuli... | scripts/lib/check-database-compatibility.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n\nPY3 = sys.version_info >= (3,)\n\n\ndef iteritems(dictionary):\n if PY3:\n return dictionary.items()\n\n return dictionary.iteritems()\n\n\ndef coerce_long(string):\n if not PY3:\n return long(string)\... | python | edit | 1 | 2 | mit | 0a6e82485d4c4657efae629501f14c28c9287f48 | wglass/collectd-haproxy | collectd_haproxy/compat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom web3.manager import (\n RequestManager,\n)\nfrom web3.providers.tester import (\n TestRPCProvider,\n is_testrpc_available,\n)\nfrom web3.utils.compat import socket\n\n\ndef get_open_port():\n s = socket.soc... | python | edit | 1 | 1 | mit | 132309e91cc7e951d4a7f326d9e374dc8943f2f3 | pipermerriam/web3.py | tests/core/providers/test_testrpc_provider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Fetch NJ TRANSIT bus and rail feeds.\n\nRequires username and password to log in first.\nCannot check for whether a feed is new or not, so only call to fetch this one once\nan email is sent to the developer account saying new feeds ar... | python | edit | 1 | 4 | mit | d76c2764d5489308064011e291f9181eac4a3fd6 | flibbertigibbet/gtfs-feed-fetcher,azavea/gtfs-feed-fetcher | feed_sources/NJTransit.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(name='Pyranha',\n description='Elegant IRC client',\n version='0.1',\n author='John Reese',\n author_email='<EMAIL>',\n url='https://github.com/jreese/pyranha',\n class... | python | edit | 1 | 0 | mit | d2cc077bfce9bef654a8ef742996e5aca8858fc7 | jreese/pyranha | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ast\nimport builtins\n\nfrom .operator import Operator\n\n\nclass OutOfNoWhereException(Exception):\n pass\n\nsetattr(builtins, OutOfNoWhereException.__name__, OutOfNoWhereException)\n\n\nclass ExceptionReplacer(Operator):\n\n ... | python | edit | 1 | 1 | mit | 366316b0ea20ae178670581b61c52c481682d2b0 | sixty-north/cosmic-ray | cosmic_ray/operators/exception_replacer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom __future__ import unicode_literals\n\nfrom web.auth import authenticate, deauthenticate\nfrom web.core import config, url\nfrom web.core.http import HTTPFound\n\nfrom brave.api.client import API\n\n\nlog = __import... | python | edit | 1 | 1 | mit | 8ecb32004aca75c0b6cb70bd1a00e38f3a65c8c8 | eve-val/irc,eve-val/irc,eve-val/irc | sound/irc/auth/controller.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This script downloads weekly dengue statistics from data.gov.bn\nimport os\nimport sys\nimport logging\n\n\nDIRECTORY = '../../Data/raw/disease_BN'\nOUTFILE = \"Trend of Notifiable Diseases (2008 - 2012).xlsx\"\nURL = \"https://www.data.g... | python | edit | 3 | 4 | mit | b7e781eed46503edee25547e8de8831ee6b0cf96 | DataKind-SG/healthcare_ASEAN | src/data/download/BN_disease.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom casexml.apps.case.models import CommCareCase\nfrom dimagi.utils.parsing import json_format_datetime\n\n\ndef get_case_ids_modified_with_owner_since(domain... | python | edit | 1 | 3 | bsd-3-clause | 989ff44354d624906d72f20aac933a9243214cf8 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/dbaccessors/couchapps/cases_by_server_date/by_owner_server_modified_on.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Use setuptools if we can\ntry:\n from setuptools.core import setup\nexcept ImportError:\n from distutils.core import setup\n\nPACKAGE = 'django_exceptional_middleware'\nVERSION = '0.2'\n\ndata_files = [\n (\n 'exceptional_... | python | edit | 1 | 0 | mit | e34969db596ff3dfa4bf78efb3f3ccfe771d9ef9 | jaylett/django_exceptional_middleware | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pkg_resources\n\nfrom django.utils import six\nfrom django.utils.lru_cache import lru_cache\n\n\n@lru_cache()\ndef get_backup_strategies():\n entry_points = pkg_resources.get_entry_map('nodeconductor').get('backup_strategies', {})... | python | edit | 1 | 2 | mit | 990008a6fb2788d25445ee9ec21375515527bdc8 | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/backup/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Node(object):\n def __init__(self):\n # Node(s) from which this Node receives values\n self.inbound_nodes = inbound_nodes\n # Node(s) to which this Node passes values\n self.outbound_nodes = []\n # For each inbound Nod... | python | edit | 4 | 2 | mit | 78675420e9d23d9978f68ed002de0fc1284d3d0c | YabinHu/miniflow | node.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nLATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):'\n r'\\s*(?P<error>.*)')\n\n\ndef parse_log(log, context_size=3):\n lines = log.split('\\n')\n errors = []\n\n for n, line in e... | python | edit | 1 | 3 | bsd-3-clause | b4061152064269f8848c374cf81a867a9c0a7388 | mbr/latex | latex/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\n\nfrom datetime import date, timedelta\n\nfrom rest_framework.exceptions import ValidationError\n\nDAT... | python | edit | 1 | 7 | apache-2.0 | f275c8cc020119b52ed01bc6b56946279853d854 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | src/mmw/apps/bigcz/clients/cuahsi/details.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2008-2009 Simplistix Ltd\n# See license.txt for license details.\n\nimport os\nfrom setuptools import setup, find_packages\n\nname = 'testfixtures'\nbase_dir = os.path.dirname(__file__)\n\nsetup(\n name=name,\n version... | python | edit | 2 | 0 | mit | 936cc203637475c57c2ed26a6fa31167c7e4ebda | nebulans/testfixtures,Simplistix/testfixtures | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2014 Objectif Libre\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Li... | python | edit | 1 | 2 | apache-2.0 | 90f4c06cd4186b08758ff599691d1ae1af522590 | openstack/cloudkitty,stackforge/cloudkitty,stackforge/cloudkitty,openstack/cloudkitty | cloudkitty/cli/processor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport six\n\nfrom sevenbridges.meta.resource import Resource\nfrom sevenbridges.meta.fields import StringField\n\n\nclass Breakdown(Resource):\n \"\"\"\n Breakdown resource contains price breakdown by storage and computation.\n \"... | python | edit | 1 | 2 | apache-2.0 | 04944ccd83e924fed6b351a6073d837a5ce639e9 | sbg/sevenbridges-python | sevenbridges/models/compound/price_breakdown.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gevent\n\nfrom gevent import queue\nfrom wal_e import channel\n\n\ndef test_channel_shim():\n v = tuple(int(x) for x in gevent.__version__.split('.'))\n\n if v >= (0, 13, 0) and v < (1, 0, 0):\n assert isinstance(channel... | python | edit | 2 | 5 | bsd-3-clause | deed4cf02bf919a06bffa0ac5b5948390740a97e | nagual13/wal-e,equa/wal-e,wal-e/wal-e,DataDog/wal-e,ArtemZ/wal-e,intoximeters/wal-e,heroku/wal-e,ajmarks/wal-e,fdr/wal-e,tenstartups/wal-e,RichardKnop/wal-e,x86Labs/wal-e | tests/test_channel_shim.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"\n\nfrom django.test import TestCase\n\n\ncla... | python | edit | 1 | 1 | bsd-3-clause | 98e824af43b729eb5b5737597506a5ca87312814 | hoale/teracy-tutorial,hoale/teracy-tutorial | apps/polls/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom distutils.core import setup\n\nlong_description = open('README.rst').read()\n\nsetup(\n name='django-tagging-autocomplete',\n version='0.4.2',\n description='Autocompletion for django-tagging',\n lo... | python | edit | 1 | 3 | mit | eda2686d7a59acf5fc7f6d72b710ccc8b20801a9 | ludwiktrammer/django-tagging-autocomplete | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding=utf8\n\nimport requests\nfrom flexbe_core import EventState, Logger\n\n\nclass Wonderland_Request(EventState):\n\t'''\n\tMoveArm receive a ROS pose as input and launch a ROS service with the same pose\n\t\n... | python | edit | 2 | 2 | bsd-3-clause | 6d6528182eb5dc21f41eb4ea5e4cfd08163edc96 | WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors | sara_flexbe_states/src/sara_flexbe_states/Wonderland_Request.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom distutils.core import setup\n\nsetup(\n name='oceanoptics',\n version='0.2.6',\n author='Andreas Poehlmann, Jose A. Jimenez-Berni, Ben Gamari, Simon Dickreuter',\n author_email='<EMAIL>',\n packa... | python | edit | 1 | 0 | mit | c6265c2112ee9985af8b6b80fe0bee1811dc6abd | ap--/python-oceanoptics | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport setuptools\n\nREADME = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.rst')\n\nsetuptools.setup(\n name='theanets',\n version='0.8.0pre',\n packages=setuptools.find_packages(),\n author='Leif ... | python | edit | 1 | 0 | mit | eb4ed4f0b1086a1f5322078d91d2132582a487e7 | chrinide/theanets,lmjohns3/theanets | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport enum\nimport json\nfrom pyglab.exceptions import RequestError\nimport requests\n\n@enum.unique\nclass RequestType(enum.Enum):\n GET = 1\n POST = 2\n PUT = 3\n DELETE = 4\n\nclass ApiRequest:\n _request_creators = {\n ... | python | edit | 1 | 5 | mit | b870028ce8edcb5001f1a4823517d866db0324a8 | sloede/pyglab,sloede/pyglab | pyglab/apirequest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom base64 import b64encode\nimport os.path\nimport re\n\nfrom pyramid.httpexceptions import HTTPBadRequest\nfrom pyramid.response import Response\nfrom pyramid.view import view_config\n\n\ndef json_base64_encode_chunks(file, chunk_size=65... | python | edit | 4 | 3 | bsd-2-clause | 385655debed235fcb32e70a3f506a6885f3e4e67 | tsauerwein/c2cgeoportal,tsauerwein/c2cgeoportal,tsauerwein/c2cgeoportal,tsauerwein/c2cgeoportal | c2cgeoportal/views/echo.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nimport logging\n\nfrom . import init_logging\n\n\nclass BaseCLI(object):\n\n def __init__(self, description, epilog, version=None):\n assert version\n self.version = version\n\n self.parser = argpars... | python | edit | 1 | 4 | apache-2.0 | 146d9eb75b55298886a3860976b19be5b42825b2 | informatics-isi-edu/deriva-py | deriva/core/base_cli.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.