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