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 argparse\n\nfrom flask import Flask, request\n\nparser = argparse.ArgumentParser(description=\"Start a Blindstore server.\")\nparser.add_argument('-d', '--debug', action='store_true',\n help=\"enable Flask debug mo...
python
edit
1
1
mit
cb036a9725304f138b6da92bc0aae7f497cbafa5
blindstore/blindstore-old-scarab
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 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# http://www.apache....
python
edit
1
0
apache-2.0
0284126969e76a55a00aa4e4ce22f089d543c1dc
google/vizier,google/vizier
vizier/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify, render_template, request\napp = Flask(__name__)\n\n\n@app.route('/_add_numbers')\ndef add_numbers():\n ''' Because numbers must be added server side '''\n a = request.args.get('a', 0, type=int)\n b...
python
edit
1
1
mit
09d85cf39fd8196b26b357ee3f0b9fbb67770014
avidas/flask-jquery,avidas/flask-jquery,avidas/flask-jquery
flask_jq.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# dmntest.py\n\nfrom .core import Daemon\n\nclass TestDmn(Daemon):\n pass\n\ndef main():\n td = TestDmn('testd')\n td.start()\n```\n\nApply this change: Work on daemons and TCP servers." }, { "role": "assistant", "conte...
python
edit
1
0
mit
63f06147303b305554e0ba1e514305a4c93488f4
smarisa/sdpt11,smarisa/neronet,smarisa/neronet,smarisa/sdpt11
neronet/nerotest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom simplejson import dumps\nfrom twisted.trial.unittest import TestCase\nfrom twisted.internet import defer\n\nfrom mock import patch, Mock\nfrom van.contactology import Contactology\n\nclass TestProxy(TestCase):\n\n @...
python
edit
4
2
bsd-3-clause
547130e5f3717fd5bfd083be89afd361fdcdefc1
jinty/van.contactology
van/contactology/tests/test_contactology.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=0\nbranch=\"dev\"\ntimestamp=1376579871.17\n```\n\nApply this change: Tag commit for v0.0.25-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=25\nbranch=\"...
python
edit
1
0
mit
085edf28b2e70552789407e16ca83faf78313672
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom keybar.conf.base import *\n\ncertificates_dir = os.path.join(BASE_DIR, 'tests', 'resources', 'certificates')\n\nKEYBAR_SERVER_CERTIFICATE = os.path.join(certificates_dir, 'KEYBAR-intermediate-SERVER.cert')\nKEYBAR_SERVER_K...
python
edit
3
0
bsd-3-clause
2171559a3cfcaeda2abe8a343c118769edad245f
keybar/keybar
src/keybar/conf/development.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n\nfrom tests.common.test_vector import *\nfrom tests.common.impala_test_suite import *\n\nclass TestUdfs(ImpalaTestSuite):\n @classmethod\n def get_workload(...
python
edit
5
2
apache-2.0
d537ea32462c7ef46634d1527702c4c4a6d37e1e
caseyching/Impala,theyaa/Impala,lirui-intel/Impala,ibmsoe/ImpalaPPC,gistic/PublicSpatialImpala,mapr/impala,cgvarela/Impala,rampage644/impala-cut,cchanning/Impala,cloudera/recordservice,caseyching/Impala,grundprinzip/Impala,placrosse/ImpalaToGo,kapilrastogi/Impala,brightchen/Impala,brightchen/Impala,tempbottle/Impala,ra...
tests/query_test/test_udfs.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.8 on 2018-05-30 14:21\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef fix_followers(apps, schema_editor):\n Donation = apps.get_model('donations', ...
python
edit
1
6
bsd-3-clause
c1dc5494c461677e15be52576c55585742ad4a7a
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/bb_follow/migrations/0003_auto_20180530_1621.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import redirect, render_to_response\nfrom django.template import RequestContext\n\nfrom campaign.forms import CampaignFormSet, ProspectusForm\nfrom campaign.models import P...
python
edit
1
6
mit
98eaf33328814342cdf6a2e8379c87cd00c911ce
tdphillips/campaigns,tdphillips/campaigns
campaign/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom openerp import fields, models\n\nclass Session(models.Model):\n _name = 'openacademy.session'\n\n name = fields.Char(required=True)\n start_date = fields.Date()\n duration = fields.Float(digits=(6, ...
python
edit
1
0
apache-2.0
7b1a5cf088aa5842beffd25719ea0a1fa029345d
GavyMG/openacademy-proyect
openacademy/model/openacademy_session.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.cpanel import ControlPanel\n\n\nclass TestPage(BaseTestCase):\n\n @httpretty.activate\n def test_fetch_payment_session_timeout(self):\n ...
python
edit
2
1
mit
ea3576e16b0a8278cd9d35715c8881e9d136eec8
andela-sjames/paystack-python
paystackapi/tests/test_cpanel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom neb.engine import Plugin, Command\n\nimport requests\n\nclass JiraPlugin(Plugin):\n\n def get_commands(self):\n \"\"\"Return human readable commands with descriptions.\n \n Returns:\n list[Command]\n ...
python
edit
2
2
apache-2.0
84f913d928d28bc193d21eb223e7815f69c53a22
Kegsay/Matrix-NEB,matrix-org/Matrix-NEB,illicitonion/Matrix-NEB
plugins/jira.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\ndef kruskal():\n\t\"\"\"Kruskal's algorithm for minimum spanning tree in weighted graph.\n\n Time complexity for graph G(V,...
python
edit
2
1
bsd-2-clause
57d49b185d1daf0e6a27e0daee8960c2816615cc
bowen0701/algorithms_data_structures
alg_kruskal_minimum_spanning_tree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\n\nfrom marshmallow import validate, ValidationError\n\ndef test_invalid_email():\n invalid1 = \"user@example\"\n with pytest.raises(ValidationError):\n validate.email(invalid1)\n inval...
python
edit
1
1
mit
ad55d04d6688f75f0e441603668e0337a0333d76
maximkulkin/marshmallow,0xDCA/marshmallow,Tim-Erwin/marshmallow,xLegoz/marshmallow,marshmallow-code/marshmallow,VladimirPal/marshmallow,0xDCA/marshmallow,daniloakamine/marshmallow,dwieeb/marshmallow,mwstobo/marshmallow,quxiaolong1504/marshmallow,etataurov/marshmallow,Bachmann1234/marshmallow,bartaelterman/marshmallow
tests/test_validate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Google Inc. All rights reserved.\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# ...
python
edit
2
4
apache-2.0
8fb15f3a072d516e477449c2b751226494ee14c5
GoogleCloudPlatform/PerfKitBenchmarker,lleszczu/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,msurovcak/PerfKitBenchmarker,tvansteenburgh/PerfKitBenchmarker,ksasi/PerfKitBenchmarker,juju-solutions/PerfKitBenchmarker,gablg1/PerfKitBenchmarker,juju-solutions/PerfKitBenchmarker,msurovcak/PerfKitBenchmarker,sye...
perfkitbenchmarker/benchmarks/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbuilds Mac OS X application bundles from Python scripts\n\nNew keywords for distutils' setup function specify what to build:\n\n app\n list of scripts to convert into gui app bundles\n\npy2app options, to be specified in t...
python
edit
3
0
mit
0189eef29ce0054ef8747da317c0717bde196c17
metachris/py2app,metachris/py2app,metachris/py2app,metachris/py2app
py2app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.db import models\nfrom sentry.utils.models import Model\nfrom sentry.testutils import TestCase\n\n\n# There's a good chance this model wont get created in the db, so avoid\n# assuming it...
python
edit
1
1
bsd-3-clause
09195f50e328d3aee4cc60f0702d8605ea520eb3
NickPresta/sentry,jokey2k/sentry,1tush/sentry,zenefits/sentry,SilentCircle/sentry,wujuguang/sentry,ifduyue/sentry,Kryz/sentry,JamesMura/sentry,Natim/sentry,NickPresta/sentry,BuildingLink/sentry,rdio/sentry,BuildingLink/sentry,ngonzalvez/sentry,JamesMura/sentry,mvaled/sentry,JackDanger/sentry,SilentCircle/sentry,ifduyue...
tests/sentry/utils/models/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Mimic the hggit extension.\ntry:\n from hggit import *\n hggit_reposetup = reposetup\nexcept ImportError:\n # Allow this module to be imported without\n # hg-git installed, eg for setup.py\n pass\n\n\n__version__ = \"0.1....
python
edit
3
8
bsd-2-clause
aa720a34c918e3d6454a4cfcb4fa0548f9fbd078
stephenmcd/hg-github
hggithub.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nnbtutor - a small utility to indicate which cells should be cleared (exercises).\n\"\"\"\n\nimport os\n\ntry:\n from nbconvert.preprocessors.base import Preprocessor\nexcept ImportError:\n from IPython...
python
edit
1
3
bsd-2-clause
60bb1425e94e15b59a05b485113cc68ed0146ac8
jorisvandenbossche/nbtutor,jorisvandenbossche/nbtutor
nbtutor/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport waptpackage\nfrom waptcrypto import SSLCABundle,SSLCertificate,SSLPrivateKey\n\ndef download(remote, path, pkg):\n \"\"\"Downloads package\"\"\"\n if not pkg.package:\n return False\...
python
edit
1
6
mit
ac33c7fcee74053dae6edfdd4596bfe03098711d
jf-guillou/wapt-scripts
waptpkg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom __future__ import print_function\nimport os\nimport sys\nimport json\n\ndef pretty_print(equation):\n print(equation[\"description\"][\"terse\"])\n eqn_dict = equation[\"unicode-pretty-print\"]\n equati...
python
edit
1
5
mit
6fa924d73df148ad3cfe41b01e277d944071e4dd
nbeaver/equajson
equajson.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.conf.urls.static import static\nfrom d...
python
edit
1
0
bsd-3-clause
30e261d895fd4260e3788398b8dd46a5e889815e
Mariana-Tek/django-oscar-accounts,Jannes123/django-oscar-accounts,michaelkuty/django-oscar-accounts,Mariana-Tek/django-oscar-accounts,django-oscar/django-oscar-accounts,machtfit/django-oscar-accounts,machtfit/django-oscar-accounts,Jannes123/django-oscar-accounts,michaelkuty/django-oscar-accounts,django-oscar/django-osc...
sandbox/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For\n# a full list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n#\n...
python
edit
1
0
apache-2.0
211f1fdfe1d969df7c9762ba8e914d3ea829e9b4
jberkenbilt/qpdf,jberkenbilt/qpdf,jberkenbilt/qpdf,qpdf/qpdf,jberkenbilt/qpdf,qpdf/qpdf,jberkenbilt/qpdf,qpdf/qpdf,qpdf/qpdf,qpdf/qpdf
manual/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom studygroups.models import StudyGroupSignup, Application\nfrom localflavor.us.forms import USPhoneNumberField\n\n\nclass ApplicationForm(forms.ModelForm):\n mobile = USPhoneNumberField(required=False)\n c...
python
edit
1
0
mit
f4ba2cba93222b4dd494caf487cdd6be4309e41a
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
studygroups/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nGenerates the release notes for the latest release, in Markdown.\n\nConvert CHANGELOG.rst to Markdown, and extracts just the latest release.\n\nWrites to ``scripts/latest-release-notes.md``, which can be\nused with https://github.co...
python
edit
1
0
mit
467e8e4d8113a8f6473d7f82d86d5401053362b8
pytest-dev/pytest-mock
scripts/gen-release-notes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\nimport time\n\nimport pytest\n\nimport cheroot.server\nimport cheroot.wsgi\n\n\nconfig = {\n 'bind_addr': ('127.0.0.1', 54583),\n 'wsgi_app': None,\n}\n\n\ndef cheroot_server(server_factory):\n conf = config.copy(...
python
edit
1
2
bsd-3-clause
c7825a2ec9be702b05c58118249fe13e7e231ecb
cherrypy/cheroot
cheroot/test/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nExport colors in various formats.\n\"\"\"\nimport os\nimport pathlib\n\nfrom pywal.settings import CACHE_DIR, TEMPLATE_DIR\nfrom pywal import util\n\n\ndef template(colors, input_file):\n \"\"\"Read template file, substitute mark...
python
edit
1
4
mit
1541af9052d9c12fb3d23832838fce69fcc02761
dylanaraps/pywal,dylanaraps/pywal,dylanaraps/pywal
pywal/export_colors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport sys\n\npopulation = bytes([i for i in range(256)])\n\nif sys.argv[1] == 'reflector':\n popset = set(population)\n buffer = [None for i in range(256)]\n for i in range(128):\n x, y = random.sample(popset...
python
edit
1
0
mit
0078bb14b85df519744371df89e243822a86ed4c
spgill/bitnigma
generate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom openedoo.core.libs.tools import hashing_werkzeug\nfrom openedoo_project import db\nfrom .users import User\n\n\nclass Employee(User):\n\n @classmethod\n def is_exist(self, username):\n employee = self.quer...
python
edit
1
1
mit
169d32333aa3152dcec893f2ce58c46d614aaea4
openedoo/module_employee,openedoo/module_employee,openedoo/module_employee
models/employees.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django import template\nfrom django.utils.safestring import mark_safe\n\nfrom ..processors import AssetRegistry\n\n\nregister = template.Library()\n\n\nclass AssetsNode(template.Node):\n\n def __init__(self, nodelist):\n se...
python
edit
1
5
bsd-2-clause
dd237d82426ebbc3d2854641e8e73e2001857b67
funkybob/django-amn
damn/templatetags/damn.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom kk.models import Hearing, Label, Introduction, Scenario, Comment\n\nadmin.site.register(Label)\nadmin.site.register(Hearing)\nadmin.site.register(Introduction)\nadmin.site.register(Scenario)\nadmin.s...
python
edit
1
0
mit
414f6e9174b8c7b88866319af19a5e36fcec643d
stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi
kk/admin/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nModule for running arbitrary tests with a __virtual__ function\n'''\nfrom __future__ import absolute_import\n\n\ndef __virtual__():\n return False\n\n\ndef test():\n return True\n\n```\n\nApply this chang...
python
edit
1
1
apache-2.0
c8fdc9aaea13567a293237e7a4126f83a52f0a22
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/test_virtual.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render_to_response\nfrom django.template import RequestContext\nfrom django.utils.safestring import mark_safe\n\nfrom django_enum_js import enum_wrapper\n\ndef enums_js(request):\n enums = enum_wrapper.get_js...
python
edit
1
1
mit
bda88dfe6e0a2f16f0c3be74a42cf8783aae1d9e
leifdenby/django_enum_js
django_enum_js/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\n\nmigration_filter = re.compile('migration_[0-9]{14}.*')\n\n\ndef extract_version(name):\n try:\n version = int(name.split(\"_\")[1])\n return version\n except ValueError:\n return None\n\n...
python
edit
1
4
mit
e289d6ec6b1e31ca87bc6675caeb62f6e04cea10
ustudio/armus,ustudio/armus
odo/run_migrations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Notify Slack channel.\"\"\"\nimport time\n\nfrom ..utils import get_properties, get_template, post_slack_message\n\n\nclass SlackNotification:\n \"\"\"Post slack notification.\n\n Inform users about infrastructure changes to pro...
python
edit
1
2
apache-2.0
b7b6fdbc270359e82a2f13f5257a0c2a3875c28f
gogoair/foremast,gogoair/foremast
src/foremast/slacknotify/slack_notification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport cv2\nimport os\nimport glob\n\n# path = 'by_class'\npath = 'test'\n\nt1 = time.time()\nfile_names=glob.glob(os.path.join(path,'*','train_*','*.[pP][nN][gG]'))\nt2 = time.time()\nprint('Time to list files: ', t2-t1)\n\nfi...
python
edit
2
0
apache-2.0
6a4dd66035956037d660271f18592af04edab818
iitmcvg/OCR-Handwritten-Text,iitmcvg/OCR-Handwritten-Text,iitmcvg/OCR-Handwritten-Text
read_images.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Task functions for use with Invoke.\"\"\"\nfrom invoke import task\n\n\n@task\ndef clean(context):\n cmd = '$(npm bin)/gulp clean'\n\n context.run(cmd)\n\n\n@task\ndef requirements(context):\n steps = [\n 'pip install ...
python
edit
1
2
mit
30d108b3a206d938ef67c112bc6c953a12c606af
rlucioni/typesetter,rlucioni/typesetter,rlucioni/typesetter
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"fix-perm.py - Fix file permissions\n\"\"\"\n\n\nfrom __future__ import print_function\n\nimport os\nimport stat\nimport sys\n\n\nif __name__ == '__main__':\n\n for line in sys.stdin:\n path = line.rs...
python
edit
1
0
isc
e326cef4ae66d4d2dd500e933ff4f7c6fc619b28
eliteraspberries/minipkg,eliteraspberries/minipkg
fix-perm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib.auth import authenticate\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom hack4lt.models import Hacker\n\n\n\n\nclass RegistrationForm(forms.ModelForm):\n class Meta:\n ...
python
edit
1
3
bsd-3-clause
fa75cdb0114d86b626a77ea19897abd532fd4aeb
niekas/Hack4LT
src/hack4lt/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sge\n\nfrom . import config\nfrom . import game\nfrom . import player\nfrom . import rooms\n\n\ndef initialize(config):\n \"\"\"Load assets and initialize the game objects\"\"\"\n sge.game = game.Game(\n width=config.GAM...
python
edit
1
1
mit
f83fa635769bd2fe72c55d87e6900fe66268a9d4
jrrickerson/pyweek24
behind/rungame.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport imp, os, netrc, ConfigParser\n\nSCRAPY_CFG_FILE = os.path.expanduser(\"~/.scrapy.cfg\")\nNETRC_FILE = os.path.expanduser('~/.netrc')\n\ndef missing_modules(*modules):\n \"\"\"Receives a list of module names and returns those which...
python
edit
3
4
bsd-3-clause
1549aa29892ec30e0926b7a92d1c0d8857edc8d5
scrapinghub/shub
shub/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms import validators\n\nfrom dmutils.forms import StripWhitespaceStringField\n\n\nclass EmailAddressForm(Form):\n email_address = StripWhitespaceStringField('Email address', validators=[\n val...
python
edit
1
0
mit
081e5c36cfa8505f1c639bb1e34a5b929b2d4076
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
app/main/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\nimport requests\n\ndef statsRoyale(tag):\n\tlink = 'http://statsroyale.com/profile/' + tag\n\tresponse = (requests.get(link)).text\n\tsoup = BeautifulSoup(response, 'html.parser')\n\tstats = {}\n\n\tcontent = ...
python
edit
2
4
mit
f27e08b0dcace5b9f49c5b2a211347a2f50f8254
atulya2109/Stats-Royale-Python
stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cement.ext.ext_argparse import expose\n\nfrom clowder.cli.abstract_base_controller import AbstractBaseController\n\n\nclass DiffController(AbstractBaseController):\n class Meta:\n label = 'diff'\n stacked_on = 'base'\n...
python
edit
1
4
mit
fe4d3f7f734c2d8c6a21932a50ad1d86519ef6ff
JrGoodle/clowder,JrGoodle/clowder,JrGoodle/clowder
clowder/clowder/cli/diff_controller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import render_template\n\nfrom models.person import Person\n\n\ndef card(person_or_id, detailed=False, small=False):\n\n if isinstance(person_or_id, Person):\n person = person_or_id\n else:...
python
edit
1
2
apache-2.0
4b340e0712956ea44eace7382dd743890958a0fd
teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr
widgets/card.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404, redirect, render\n\nfrom characters.forms import CharacterForm\nfrom characters.models import Character, Class, Race\n\n\ndef index(request):\n all_characters = Character.objects.all()\n ...
python
edit
4
4
mit
bae4032cc686fbac906d19456ed744a97b0e1365
mpirnat/django-tutorial-v2
characters/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\"\nIntroduction Adventure\n\nAuthor: igui\n\"\"\"\nimport codecs\nimport io\nimport sys\nimport unittest\nfrom story.adventures import AdventureVerificationError, BaseAdventure\nfrom story.translation import gettext as _\n\n\nclass T...
python
edit
1
2
mit
c1da1e8d15990efa7b30de241e3604bc824792dc
sophilabs/py101
py101/introduction/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n leisure\n ~~~~~~~~\n\n Leisure a local job runner for Disco based project.\n\n It provides a useful method for running your disco project without\n needing a full disco cluster. This makes i...
python
edit
3
4
mit
28940582fcff57b66e702dfecfd96e83725fbab0
trivio/leisure
leisure/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Namespace package: https://docs.python.org/2/library/pkgutil.html\ntry:\n import pkg_resources\n pkg_resources.declare_namespace(__name__)\nexcept ImportError:\n from pkgutil import extend_path\n __path__ = extend_path(__path_...
python
edit
1
0
mit
e4d746ba6c5b842529c9dafb31a90bdd31fee687
alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector
performanceplatform/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#import pygame.midi.Output\nfrom pygame.midi import Output\n\n\nclass Output(Output):#pygame.midi.Output):\n def set_pan(self, pan, channel):\n assert (0 <= channel <= 15)\n assert pan <= 127\n \n self.write_s...
python
edit
1
1
bsd-3-clause
9c94c7c48f932e2134c2d520403fbfb09e464d95
RenolY2/py-playBMS
pygameMidi_extended.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division, print_function, absolute_import\n\nimport bugsnag\nimport bugsnag.django\n\ndef is_development_server(request):\n server = request.META.get('wsgi.file_wrapper', None)\n\n if server is None:\n re...
python
edit
1
2
mit
0ce553f791ba0aac599cc0ae5c4784fece9cb3da
bugsnag/bugsnag-python,bugsnag/bugsnag-python,overplumbum/bugsnag-python,overplumbum/bugsnag-python
bugsnag/django/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dash.orgs.views import OrgPermsMixin\nfrom smartmin.views import SmartCRUDL, SmartListView\n\nfrom .models import Rule\n\n\nclass RuleCRUDL(SmartCRUDL):\n \"\"\"\n Simple CRUDL for debugging by superusers, i.e. not exposed to reg...
python
edit
1
1
bsd-3-clause
9be4329b0586047f9184f04ca2e331dbd871ab56
rapidpro/casepro,rapidpro/casepro,rapidpro/casepro
casepro/rules/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import Client\n\n\nclass RangeIter(object):\n def __init__(self, range_datas):\n self._container = range_datas if self._valid_range(range_datas) else None\n\n def _valid_range(self, range_datas):\n if (not isi...
python
edit
1
4
mit
4b62f6545dd962ad4b323454901ccf12a7ce9910
oleiade/py-elevator
pyelevator/elevator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport collections\nimport itertools\n\nfrom . import utils\n\n\ndef prefetch_translations(instances, **kwargs):\n \"\"\"\n Prefetches translations for the given instances.\n Can be useful for a list of ins...
python
edit
3
10
mit
589bc468783e6c7620c3be21195fdbe88e796234
ulule/django-linguist
linguist/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport widgy.db.fields\nimport django.db.models.deletion\nimport widgy.contrib.widgy_mezzanine.models\n\n\nclass Migration(migrati...
python
edit
1
0
apache-2.0
7f7fd4e7547af3a6d7e3cd4da025c2b0ab24508b
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef _get_feature(name):\n import __future__\n # fall back to a unique fake object for earlier Python versions or Python 3\n return getattr(__future__, name, object())\n\nunicode_literals = _get_feature(\"unicode_literals\")\nwith_s...
python
edit
1
1
apache-2.0
32687e078a50315baa88a9854efea5bb1ca65532
da-woods/cython,scoder/cython,cython/cython,scoder/cython,scoder/cython,da-woods/cython,da-woods/cython,cython/cython,cython/cython,cython/cython,da-woods/cython,scoder/cython
Cython/Compiler/Future.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n## Copyright (C) 2012-2013 Dimitrios V. Vavoulis\n## Computational Genomics Group (http://bioinformatics.bris.ac.uk/)\n## Department of Computer Science\n## University of Bristol\n\n##########################################################...
python
edit
1
2
mit
9545c2d78696d7f75299d958cf44f8cf695581ac
dvav/dgeclust
DGEclust/readCountData.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport fte.encoder\n\nregex = '^(a|b)+$'\nfixed_slice = 512\ninput_plaintext = 'test'\n\nfteObj = fte.encoder.RegexEncoder(regex, fixed_slice)\n\nciphertext = fteObj.encode(input_plaintext)\noutput_plaintext = fteObj.decode(ciphertext)\n\np...
python
edit
4
0
apache-2.0
1db5ed3fa2fbb724c480bbf52c1d40c390dc857f
kpdyer/libfte,kpdyer/libfte
examples/example1.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.db import models\nfrom django.db import connection\nfrom .copy_from import CopyMapping\nfrom .copy_to import SQLCopyToCompiler, CopyToQuery\n__version__ = '2.0.0'\n\n\nclass CopyQu...
python
edit
2
1
mit
6b0167514bb41f877945b408638fab72873f2da8
california-civic-data-coalition/django-postgres-copy
postgres_copy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n * Project: udacity-fsnd-p4-conference-app\n * Author name: Iraquitan Cordeiro Filho\n * Author login: iraquitan\n * File: settings\n * Date: 3/23/16\n * Time: 12:16 AM\n\"\"\"\n# Replace the following lines...
python
edit
1
0
mit
75289980c658e081fec2d7e34651837c4629d4b7
iraquitan/udacity-fsnd-p4-conference-app,iraquitan/udacity-fsnd-p4-conference-app,iraquitan/udacity-fsnd-p4-conference-app
settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2017 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom byceps.services.shop.order.models.order import PaymentState\n\nfrom testfixtures.shop_order import create_order\nfrom testf...
python
edit
1
1
bsd-3-clause
ac664513eb1e99bc7aad9dda70a155e25fcff084
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
tests/services/shop/order/test_models_order_payment_state.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom parglare import Grammar\n\n\ngrammar = Grammar.from_string(\"\"\"\n start: ab EOF;\n ab: \"a\" ab \"b\" | EMPTY;\n\"\"\")\n\nstart_symbol = 'start'\n\n```\n\nApply this change: Remove `EOF` -- update examples\n\nrefs #64" }, ...
python
edit
1
0
mit
4e7917ab5a2e112af8c69b89805af6b097eed97e
igordejanovic/parglare,igordejanovic/parglare
examples/custom_table_caching/grammar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n# See LICENSE.txt for licensing terms\r\n#$HeadURL$\r\n#$LastChangedDate$\r\n#$LastChangedRevision$\r\n\r\nimport shlex\r\n\r\nfrom reportlab.platypus import Spacer\r\n\r\nfrom flowables import *\r\n\r\n\r\ndef pa...
python
edit
5
6
mit
fcd2328549dcec2986e3b972f1a8bcfb0cf2e21b
pombreda/rst2pdf,liuyi1112/rst2pdf,pombreda/rst2pdf,liuyi1112/rst2pdf,rst2pdf/rst2pdf,rst2pdf/rst2pdf
rst2pdf/utils.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport re\nimport collections\n\n\ndef user_is_authenticated(user):\n if isinstance(user.is_authenticated, collections.Callable):\n authenticated = user.is_authenticated()\n else:\n ...
python
edit
1
2
mit
68b52fedf5b22891a4fc9cf121417ced38d0ea00
vintasoftware/django-role-permissions
rolepermissions/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport two_factor.models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('two_factor', '0002_auto_20...
python
edit
3
4
mit
073dd8529c95f44d7d250508dd10b8ffc8208926
koleror/django-two-factor-auth,Bouke/django-two-factor-auth,koleror/django-two-factor-auth,Bouke/django-two-factor-auth
two_factor/migrations/0003_auto_20150817_1733.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .environments.makino import MakinoProfile\nfrom .environments.king import KingProfile\nfrom .jet import AstroJet\n\nfrom . import luminosity\nfrom . import plotting\nfrom . import simulations\nfrom . import helpers\nfrom . import io\n\...
python
edit
7
0
mit
8b07dde78e753f6dce663481a68856024ed2fc49
opcon/plutokore,opcon/plutokore
plutokore/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.db.models.signals import post_save\nimport mimetypes\nimport wellknown\n\n#\n# create default host-meta handler\n#\n\nfrom wellknown.resources import HostMeta\nwellknown.register('host-meta', handle...
python
edit
1
3
bsd-3-clause
54b3b69d152611d55ce7db66c2c34dc2b1140cc7
jcarbaugh/django-wellknown
wellknown/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom urlparse import urlsplit\n\nfrom bs4 import BeautifulSoup\nimport requests\nfrom urlparse import urldefrag, urljoin\n\nclass PyPI(object):\n def __init__(self, index=\"http://pypi.python.org/simple\"):\n self._inde...
python
edit
1
5
mit
80da397eb882622bc0bf1641bc4ee4e5813cf655
bwhmather/LoPyPI,bwhmather/LoPyPI
lopypi/pypi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import (absolute_import, division, generators, nested_scopes, print_funct...
python
edit
1
1
apache-2.0
f38b117316039042f3c00c73bbb7ceaeb0f2e6e1
manasapte/pants,twitter/pants,fkorotkov/pants,jsirois/pants,pantsbuild/pants,peiyuwang/pants,pombredanne/pants,cevaris/pants,fkorotkov/pants,mateor/pants,baroquebobcat/pants,gmalmquist/pants,peiyuwang/pants,fkorotkov/pants,wisechengyi/pants,fkorotkov/pants,UnrememberMe/pants,wisechengyi/pants,ericzundel/pants,ericzunde...
src/python/pants/core_tasks/noop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport argparse\nparser = argparse.ArgumentParser()\nparser.add_argument('--run', action=\"store_true\")\nparser.add_argument('--deploy', action=\"store_true\")\nargs = parser.parse_args()\n\nif not any(vars(args).values()):\n ...
python
edit
1
0
mit
60a10e8fbfd40197db8226f0791c7064c80fe370
EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger
run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom data_collection.models import User, Firm, Assignment\nimport itertools\n\nclass Command(BaseCommand):\n help = \"Assign firms to users\"\n\n def add_arguments(sel...
python
edit
2
6
bsd-3-clause
25224af8c002c05397e5c3163f0b77cb82ce325e
sunlightlabs/hanuman,sunlightlabs/hanuman,sunlightlabs/hanuman
data_collection/management/commands/assignfirms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom leap import is_leap_year\n\n\n# Tests adapted from `problem-specifications//canonical-data.json` @ v1.5.1\n\nclass LeapTest(unittest.TestCase):\n def test_year_not_divisible_by_4(self):\n self.assertIs(is_l...
python
edit
1
1
mit
912c8f8f3626c7da92b6864e02dfc2534f4f7873
N-Parsons/exercism-python,exercism/python,behrtam/xpython,exercism/xpython,jmluy/xpython,smalley/python,exercism/xpython,behrtam/xpython,N-Parsons/exercism-python,jmluy/xpython,exercism/python,smalley/python
exercises/leap/leap_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport sys\nimport json\n\n#\n# input (stdin)\n\nmessage = sys.stdin.read()\nmessage = json.loads(message)\n\nmessage[\"point\"] = \"receive\"\nmessage[\"payload\"][\"price\"] = \"CHF 5.00\"\n\n#\n# other inputs\n\nif len(sys.a...
python
edit
2
0
mit
eb34aadfcab01da9783688ffc72e23b0264713ad
dmicky0419/flor,floraison/flor,floraison/flor,dmicky0419/flor,flon-io/flor,dmicky0419/flor,floraison/flor
spec/unit/hooks/for_caller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom bluefin.dataretrieval.clients import V1Client\nfrom bluefin.dataretrieval.exceptions import V1ClientInputException, V1ClientProcessingException\nfrom tests.api_details import API_DETAILS, TEST_CARD\n\nclass Transaction...
python
edit
2
1
bsd-3-clause
9fffcafca0f611cfcbbf3e80435c250f43a0c68b
duointeractive/python-bluefin
tests/dataretrival_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\nfrom django.conf import settings\nfrom django.core.management import execute_from_command_line\n\n\nif not settings.configured:\n params = dict(\n LOGGING = {\n 'version': 1,\n ...
python
edit
1
1
mit
471bb3847b78f36f79af6cbae288a8876357cb3c
Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport contextlib\nimport re\nimport sys\n\nimport mock\nfrom six.moves import cStringIO\n\nfrom random_object_id.random_object_id import \\\n gen_random_object_id, parse_args, main\n\n\n@contextlib.contextmanager\ndef captured_output():...
python
edit
1
2
mit
e54fa97cb44557454655efd24380da5223a1c5ae
mxr/random-object-id
tests/random_object_id/random_object_id_test.py
accepted
null
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
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#--\n# Copyright (c) 2008, 2009 Net-ng.\n# All rights reserved.\n#\n# This software is licensed under the BSD License, as described in\n# the file LICENSE.txt, which you should have received as part of\n# this distribution.\n#--\n\n\"\"\"Th...
python
edit
3
1
bsd-3-clause
6b4ec52a3fa6fdbb4f70f9d24904bc978341150c
nagareproject/core,nagareproject/core
nagare/admin/info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ntry:\n from django.conf import settings\n from django.test.utils import get_runner\n\n settings.configure(\n DEBUG=True,\n USE_TZ=True,\n DATABASES={\n \"default\": {\n \...
python
edit
1
2
bsd-2-clause
b974bbcc7e243fca7c3dc63fbbaf530fe9b69e50
pgollakota/django-chartit,pgollakota/django-chartit,pgollakota/django-chartit
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom downstream_node.startup import db\n\n\nclass Files(db.Model):\n __tablename__ = 'files'\n\n id = db.Column(db.Integer(), primary_key=True, autoincrement=True)\n filepath = db.Col...
python
edit
1
0
mit
639032215f7a51ca146810e8261448f4d0a318aa
Storj/downstream-node,Storj/downstream-node
downstream_node/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..util import cached_property\n\n\nclass Result:\n\n def __init__(self, return_code, stdout_data, stderr_data, encoding):\n self.return_code = return_code\n self.stdout_data = stdout_data\n self.stderr_data = st...
python
edit
1
2
mit
1171ade137c54c778a284ef32fdbdcd9e5c1d828
wylee/runcommands,wylee/runcommands
runcommands/runners/result.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport sys\nimport time\nimport subprocess\nimport psutil\n\ndef startServer(command):\n\tif sys.platform.startswith('win'):\n\t\treturn psutil.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE)\n\telse:\n\t\tlinuxCommand = 'xter...
python
edit
2
4
mit
cc7253020251bc96d7d7f22a991b094a60bbc104
IngenuityEngine/coren_proxy,IngenuityEngine/coren_proxy
startServers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n\r\nimport setuptools_scm\r\n\r\nextensions = [\r\n 'sphinx.ext.autodoc',\r\n]\r\n\r\n# General information about the project.\r\nproject = 'jaraco.logging'\r\ncopyright = '2015 Jason ...
python
edit
1
0
mit
ba6ef2ac850c91ac8a72401b7bd7b130bc2cc1d6
jaraco/jaraco.logging
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCloudify plugin for running a simple bash script.\n\nOperations:\n start: Run a script\n\"\"\"\n\nfrom celery import task\nfrom cosmo.events import send_event as send_riemann_event\nfrom cloudify.utils import get_local_ip\n\n\nge...
python
edit
2
1
apache-2.0
bf91e50b02ff8ef89e660e3c853cc2f30646f32d
rantav/cosmo-plugin-bash-runner
bash_runner/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cgi import escape\nimport dbus\nfrom utils import is_string\n\n\n\nITEM = \"org.freedesktop.Notifications\"\nPATH = \"/org/freedesktop/Notifications\"\nINTERFACE = \"org.freedesktop.Notifications\"\nAPP_NAME = \"mpd-hiss\"\n\n\ndef dbu...
python
edit
1
3
cc0-1.0
4f45e55e5b0e14cf6bf32b42a14cbdf9b3c08258
hellhovnd/mpd-hiss,ahihi/mpd-hiss
dbus_notify.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import namedtuple\n\n__all__ = ['identity', 'print_generated_sequence']\n\n\ndef identity(x):\n \"\"\"\n Helper function which returns its argument unchanged.\n That is, `identity(x)` returns `x` for any input `x`....
python
edit
1
4
mit
ef516fb03db9bdaa0f0bea97526a65c319b8e43c
maxalbert/tohu
tohu/v3/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Main application file\n#\n# Copyright (c) 2015, Alexandre Hamelin <alexandre.hamelin gmail.com>\n\n\nfrom flask import Flask\napp = Flask(__name__)\n\n# Import anything that depended on `app`\nfrom {{PROJECTNAME}}.views import *\nfrom {{P...
python
edit
null
null
mit
85897c2bf4e4e9c89db6111894879d18fef577dd
0xquad/flask-app-template,0xquad/flask-app-template,0xquad/flask-app-template
app.tmpl/__init__.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\n\n\nfrom __future__ import division\n\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\n\ndef main():\n koeffs = [.3, 1.2, .1, 7]\n p = np.poly1d(koeffs)\n x = np.linspace(-5, 5, 100)\n y = p(x)...
python
edit
3
1
mit
492827e2fc5244c313af4d25b563ad0f69425249
bbci/playground
src/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport os\nimport json\nimport glob\n\ndata = {}\ndata['comparisonfiles'] = {}\n\nfor subset in next(os.walk(\"comparisonfiles/\"))[1]:\n data['comparisonfiles'][subset] = {}\n data['comparisonfiles'][subset][\"f...
python
edit
1
0
bsd-3-clause
1c5f36b0f133ff668f17a1f023c2d52dc2bfbf49
WyohKnott/image-comparison-sources
generate_files_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport importlib\n\nfrom simpleflow.activity import Activity\n\nfrom .exceptions import DispatchError\n\n\nclass Dispatcher(object):\n \"\"\"\n Dispatch by name, like simpleflow.swf.process.worker.dispatch.by_...
python
edit
1
3
mit
4fc109c93daa3a5d39a184cd692ac7c6b19b9fab
botify-labs/simpleflow,botify-labs/simpleflow
simpleflow/swf/process/worker/dispatch/dynamic_dispatcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom pypolyline.util import encode_coordinates\n\n# London bounding box\nN = 51.691874116909894\nE = 0.3340155643740321\nS = 51.28676016315085\nW = -0.5103750689005356\n\nnum_coords = 100\ncoords = zip(\n np.random.un...
python
edit
2
0
mit
86bd0e7717596affceb1c40031855635b798e67b
urschrei/pypolyline,urschrei/pypolyline,urschrei/pypolyline
benches/benchmark_rust.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nReturn information about the given platform.\n\"\"\"\n\n\nimport sys\n\n\nclass Platform(object):\n\n @staticmethod\n def is_darwin(name=None):\n name = name or sys.platform\n return 'darwin' in name\n\n @stat...
python
edit
1
4
bsd-3-clause
eced06f6f523fa6fd475987ae688b7ca2b6c3415
jraede/dd-agent,tebriel/dd-agent,JohnLZeller/dd-agent,a20012251/dd-agent,remh/dd-agent,tebriel/dd-agent,AntoCard/powerdns-recursor_check,tebriel/dd-agent,AniruddhaSAtre/dd-agent,urosgruber/dd-agent,polynomial/dd-agent,JohnLZeller/dd-agent,Mashape/dd-agent,JohnLZeller/dd-agent,eeroniemi/dd-agent,c960657/dd-agent,mderomp...
checks/system/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport astropy.io.fits as fits\nimport numpy as np\n\nimport calc\nimport combine\n\nif __name__==\"__main__\":\n argparser = argparse.ArgumentParser()\n subparsers = argparser.add_subparsers(help=\"sub-command help\"...
python
edit
4
1
mit
afd6b5b29b60c59689e0a1be38a0483a7e4db312
vulpicastor/miniraf
miniraf/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# ----- Info ------------------------------------------------------------------\n\n__author__ = 'Michael Montero <<EMAIL>>'\n\n# ----- Imports ---------------------------------------------------------------\n\nfrom tinyAPI.base.data_store.p...
python
edit
1
3
mit
9c428fbfb69c93ef3da935d0d2ab098fbeb1c317
mcmontero/tinyAPI,mcmontero/tinyAPI
dsh.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom base_renderer import *\nimport re\nimport markdown\n\n\n@renderer\nclass MarkdownRenderer(MarkupRenderer):\n FILENAME_PATTERN_RE = re.compile(r'\\.(md|mkdn?|mdwn|mdown|markdown)$')\n\n def load_settings(self, renderer_options, gl...
python
edit
4
4
mit
3d385898592b07249b478b37854d179d27a27bbb
timonwong/OmniMarkupPreviewer,Lyleo/OmniMarkupPreviewer,timonwong/OmniMarkupPreviewer,timonwong/OmniMarkupPreviewer,Lyleo/OmniMarkupPreviewer,timonwong/OmniMarkupPreviewer,Lyleo/OmniMarkupPreviewer,Lyleo/OmniMarkupPreviewer
OmniMarkupLib/Renderers/MarkdownRenderer.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2006-2007 Open Source Applications Foundation\n# Copyright (c) 2008-2009 Mikeal Rogers <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complian...
python
edit
4
2
apache-2.0
210e99b9b19484991f4d7d4106ed9c0ae802b2f7
windmill/windmill,windmill/windmill,windmill/windmill,windmill/windmill,windmill/windmill,windmill/windmill
windmill/server/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('ghcomment', type=str) # this is for test-me-please phrases\nparser.add_argument('--focus', type=str, default=\"\")\nparser.add_argument('--kernel_version', type=str...
python
edit
1
0
apache-2.0
fb08c6cfe6b6295a9aca9e579a067f34ee1c69c2
cilium/cilium,tklauser/cilium,tgraf/cilium,tklauser/cilium,michi-covalent/cilium,tklauser/cilium,cilium/cilium,tgraf/cilium,cilium/cilium,michi-covalent/cilium,tgraf/cilium,tgraf/cilium,michi-covalent/cilium,michi-covalent/cilium,tgraf/cilium,cilium/cilium,tklauser/cilium,michi-covalent/cilium,tklauser/cilium,cilium/ci...
test/get-gh-comment-info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n 'companies' resource and schema settings.\n\n :copyright: (c) 2014 by Nicola Iarocci and CIR2000.\n :license: BSD, see LICENSE for more details.\n\"\"\"\nfrom common import required_string\n\n_sche...
python
edit
1
0
bsd-3-clause
c5f6a9632b6d996fc988bfc9317915208ff69a42
nicolaiarocci/Eve.NET-testbed
domain/companies.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass FacepyError(Exception):\n \"\"\"Base class for exceptions raised by Facepy.\"\"\"\n\n def __init__(self, message):\n self.message = message\n\n def _get_message(self):\n return self._message\n\n def _set_mess...
python
edit
1
1
mit
269474608221e35907896f5f618e69d6e5136388
merwok-forks/facepy,jwjohns/facepy,jgorset/facepy,Spockuto/facepy,liorshahverdi/facepy,buzzfeed/facepy,jwjohns/facepy
facepy/exceptions.py
accepted
null
true