conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix test in request parsing\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom app.controllers.github_controller import GithubController\n\npytestmark = pytest.mark.asyncio\n\n\nasync def test_get_req_json(gh_sut: GithubController, mock_request):\n assert a... | python | chosen |
[
{
"from": "system",
"value": "Remove history capable date for \"you and me and cats\"\n"
},
{
"from": "human",
"value": "from comics.aggregator.crawler import CrawlerBase\nfrom comics.core.comic_data import ComicDataBase\n\n\nclass ComicData(ComicDataBase):\n name = \"you and me and cats\"\n ... | python | chosen |
[
{
"from": "system",
"value": "Add logic and error-handling for CMake and make invocations\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nimport subprocess\nimport unittest\n\ncsibe_path = os.path.dirname(os.path.realpath(__file__))\nbuild_directory = \"build\"\n\nif not o... | python | chosen |
[
{
"from": "system",
"value": "Include all the files from dns module and bump version"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport sys\nfrom cx_Freeze import setup, Executable\n\nbase = None\nif sys.platform == \"win32\":\n base = \"Win32GUI\"\n\nexecutables = [\n Execut... | python | chosen |
[
{
"from": "system",
"value": "Add a backwards compatible create_environment.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, division, print_function\n\nfrom virtualenv.__about__ import (\n __author__, __copyright__, __email__, __license__, __summary__, __title__,\n... | python | chosen |
[
{
"from": "system",
"value": "Return event dictionary at the end of the task.\n"
},
{
"from": "human",
"value": "from celery import Celery\nfrom settings import SETTINGS\nimport requests\n\n\nHOOKS = SETTINGS.get('hooks', [])\nCELERY_SETTINGS = SETTINGS.get('celery', {})\n\napp = Celery()\napp.c... | python | chosen |
[
{
"from": "system",
"value": "Disable SSL validation for a test which uses urltools\n\nThis is currently a common problem with python >= 2.7.9:\nhttp://stackoverflow.com/questions/27835619/ssl-certificate-verify-failed-error\n"
},
{
"from": "human",
"value": "\"\"\"\nTesting of project level URL... | python | chosen |
[
{
"from": "system",
"value": "Update 0.1.1\n- Added api number reference\n"
},
{
"from": "human",
"value": "\nimport time\nimport datetime\nimport requests\nimport json\n\ndef get_NEO_flyby():\n\n neo_data = []\n\n\n unix = time.time()\n datestamp = datetime.datetime.fromtimestamp(unix)... | python | chosen |
[
{
"from": "system",
"value": "Fix Python 2 compatibility issue\n"
},
{
"from": "human",
"value": "import sys\nimport os\nimport base64\n\n# See https://iterm2.com/images.html\nIMAGE_CODE= '\\033]1337;File={file};inline={inline};size={size}:{base64_img}\\a'\n\ndef iterm2_image_bytes(b, filename=N... | python | chosen |
[
{
"from": "system",
"value": "Fix select order for Capacity Log\n\nChange-Id: I0db3de15e65bb300d75741e5c86e164b1966ac89\nCloses: bug #1281986\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Copyright 2013 Mirantis, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (... | python | chosen |
[
{
"from": "system",
"value": "Read janrain/secret key from env\n"
},
{
"from": "human",
"value": "\"\"\"\ncodebox.conf\n~~~~~~~~~~~\n\n:copyright: (c) 2011 DISQUS.\n:license: Apache License 2.0, see LICENSE for more details.\n\"\"\"\n\nimport os, os.path\nimport urlparse\n\nclass Config(object):... | python | chosen |
[
{
"from": "system",
"value": "Fix not being able to parse diacritics\n\n"
},
{
"from": "human",
"value": "import yaml\nimport json\nimport os\nimport uuid\n\ndef loadFromFile(path, bytes=False):\n from config import PATH\n if not os.path.isabs(path):\n path = os.path.join(PATH, path)\... | python | chosen |
[
{
"from": "system",
"value": "Return subaccounts with their balances on account query.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\nimport sys\nimport copy\nimport json\nimport getpass\nimport aesjsonfile\n\nsys.path.append(\"../\")\n\nimport config\n\nclass DB(object):\n def __init_... | python | chosen |
[
{
"from": "system",
"value": "Use count() on queryset instead of len()\n\nEnsure a fast query even for millions of rows.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom datetime import timedelta\n\nfrom django.conf import settings\nfrom... | python | chosen |
[
{
"from": "system",
"value": "Fix debug flag import error\n"
},
{
"from": "human",
"value": "# Copyright (c) 2010 ActiveState Software Inc.\n\nfrom django.conf import settings\n\nMARKDOWN_DEUX_HELP_URL = getattr(settings, \"MARKDOWN_DEUX_HELP_URL\",\n \"http://daringfireball.net/projects/mark... | python | chosen |
[
{
"from": "system",
"value": "Disable data migration for deployment\n"
},
{
"from": "human",
"value": "# Generated by Django 2.2.24 on 2021-10-22 19:54\n\nfrom django.db import migrations\n\n\ndef resave_packets(apps, schema_editor):\n '''\n Re-save all existing packets to update their URL... | python | chosen |
[
{
"from": "system",
"value": "Use the right style of request.\n"
},
{
"from": "human",
"value": "from flask import Flask\nfrom flask import request\nimport os\nfrom dogapi import dog_http_api as api\n\napp = Flask(__name__)\n\napi.api_key = os.environ.get('DD_API_KEY')\n\naction_url = \"/\" + os... | python | chosen |
[
{
"from": "system",
"value": "Add dropbox credentials for testing.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"Example Dropbox local settings file. Copy this file to local.py and change\nthese settings.\n\"\"\"\n# Get an app key and secret at https://www.dropbox.com/develop... | python | chosen |
[
{
"from": "system",
"value": "Add support for monitor starterlog\n"
},
{
"from": "human",
"value": "#!/bin/env python\n#\n# cat_StarterLog.py\n#\n# Print out the StarterLog for a glidein output file\n#\n# Usage: cat_StarterLog.py logname\n#\n\nimport os.path\nimport sys\nSTARTUP_DIR=sys.path[0]\... | python | chosen |
[
{
"from": "system",
"value": "Sort the months in archive_templatetag\n"
},
{
"from": "human",
"value": "\"\"\"Templatetags for djangopress.\"\"\"\nfrom datetime import date\nfrom collections import defaultdict\n\nfrom django import template\n\nfrom djangopress.models import Post, Category\n\n\nr... | python | chosen |
[
{
"from": "system",
"value": "Add missing test definition in scipy.cluster\n\ngit-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@2941 d6536bca-fef9-0310-8506-e4c0a848fbcf\n"
},
{
"from": "human",
"value": "#\n# cluster - Vector Quantization / Kmeans\n#\n\nfrom info import __doc__\n\n__all__ = ... | python | chosen |
[
{
"from": "system",
"value": "Fix deprecated warning in CustomPatientForm\n"
},
{
"from": "human",
"value": "from django.contrib import admin\nfrom django.contrib.auth.models import Group\nfrom .models import Patient\nfrom django import forms\n\nclass CustomPatientForm(forms.ModelForm):\n cla... | python | chosen |
[
{
"from": "system",
"value": "Add event key to match score notification"
},
{
"from": "human",
"value": "from consts.notification_type import NotificationType\nfrom helpers.model_to_dict import ModelToDict\nfrom notifications.base_notification import BaseNotification\n\n\nclass MatchScoreNotific... | python | chosen |
[
{
"from": "system",
"value": "Remove the dollar from the regex to avoid problems including URLs.\n"
},
{
"from": "human",
"value": "from django.conf.urls import include, url\n\nfrom django.contrib import admin\n\nadmin.autodiscover()\n\n# Examples:\n# url(r'^$', 'gettingstarted.views.home', name... | python | chosen |
[
{
"from": "system",
"value": "Add a detection of a function definition.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom sys import argv\nfrom operator import add, sub, mul, div\n\nfunctions = { \\\n\t'+': (2, add), \\\n\t'-': (2, sub), \\\n\t'*': (2, mul), \\\n\t'/': (2, div) \\... | python | chosen |
[
{
"from": "system",
"value": "Disable timezone support for tests, as the date / time fields' tests use naive datatime objects and fail if it's enabled.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nSettings overrided for test time\n\"\"\"\nimport os\nfrom django.conf import... | python | chosen |
[
{
"from": "system",
"value": "Remove default value for k - this should never be necessary for this function\n"
},
{
"from": "human",
"value": "import math\n#Log-likelihood\ndef ll(ciphertext,perm,mat,k=2):\n s=0.0\n for i in range(len(ciphertext)-(k-1)):\n kmer = tuple([perm[c] for ... | python | chosen |
[
{
"from": "system",
"value": "Revert \"added new line at end of file to please flake8\"\n\nThis reverts commit 65fbfbc9117ba2ff06b4360faa8dddbf1ef8faa6.\n"
},
{
"from": "human",
"value": "import numpy as np\n\nfrom foolbox.attacks import CarliniWagnerAttack as Attack\n\n\ndef test_targeted_attac... | python | chosen |
[
{
"from": "system",
"value": "Update test settings to create the unaccent ext if needed\n"
},
{
"from": "human",
"value": "from settings import *\n\nif \"motif\" in DATABASES:\n del DATABASES[\"motif\"]\n\nTEST_RUNNER = \"xmlrunner.extra.djangotestrunner.XMLTestRunner\"\nTEST_OUTPUT_VERBOSE =... | python | chosen |
[
{
"from": "system",
"value": "Change asset instance update permissions\n\n* Do not allow to change instance number\n* Allow to change instance name by a CG artist\n"
},
{
"from": "human",
"value": "from zou.app.models.asset_instance import AssetInstance\n\nfrom zou.app.services import assets_ser... | python | chosen |
[
{
"from": "system",
"value": "Comment out printing of function.\n"
},
{
"from": "human",
"value": "from numba import struct, jit, double\nimport numpy as np\n\nrecord_type = struct([('x', double), ('y', double)])\nrecord_dtype = record_type.get_dtype()\na = np.array([(1.0, 2.0), (3.0, 4.0)], dty... | python | chosen |
[
{
"from": "system",
"value": "Add dictionaries for channels and usermodes\n"
},
{
"from": "human",
"value": "from twisted.words.protocols import irc\n\n\nclass HeufyBotConnection(irc.IRC):\n def __init__(self, protocol):\n self.protocol = protocol\n self.nick = \"PyHeufyBot\" #... | python | chosen |
[
{
"from": "system",
"value": "Make this in practice unreachable code work on Py2\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, division, unicode_literals\n\nfrom collections import Mapping\n\n\nclass Trie(Mapping):\n \"\"\"Abstract base class for tries\"\"\"\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Set product_configurator_mrp to uninstallable until fixing / refactoring\n"
},
{
"from": "human",
"value": "{\n 'name': 'Product Configurator Manufacturing',\n 'version': '11.0.1.0.0',\n 'category': 'Manufacturing',\n 'summary': 'BOM Support for configur... | python | chosen |
[
{
"from": "system",
"value": "Fix code for review comments\n"
},
{
"from": "human",
"value": "\"\"\"Functions to retrieve pending list and invoke Graph Sync.\"\"\"\n\nimport f8a_jobs.defaults as configuration\nimport requests\nimport traceback\nimport logging\nfrom urllib.parse import urljoin\n\... | python | chosen |
[
{
"from": "system",
"value": "Add facebook error handler in view.\n\nThis assumes that there is no other backend which\ncan authenticate user with facebook credentials.\n"
},
{
"from": "human",
"value": "import logging\n\nfrom django.contrib.auth import authenticate\nfrom django.contrib.auth imp... | python | chosen |
[
{
"from": "system",
"value": "Allow user code to call the addinfo() method on the profiler object.\n"
},
{
"from": "human",
"value": "\"\"\"High-perfomance logging profiler, mostly written in C.\"\"\"\n\nimport _hotshot\n\nfrom _hotshot import ProfilerError\n\n\nclass Profile:\n def __init__(... | python | chosen |
[
{
"from": "system",
"value": "Add tests for user review view\n"
},
{
"from": "human",
"value": "from django.core.urlresolvers import reverse\nfrom django.test import TestCase\nfrom django.test.client import RequestFactory\nfrom utils.factories import UserFactory\n\nfrom profiles.views import Pro... | python | chosen |
[
{
"from": "system",
"value": "Allow Fake Backend to take an image as the screen\n"
},
{
"from": "human",
"value": "import numpy as np\nfrom ..core import Location\n\n\nclass GeistFakeBackend(object):\n def __init__(self, w=800, h=600):\n self.image = np.zeros((h, w, 3))\n self.l... | python | chosen |
[
{
"from": "system",
"value": "Add functions to return a helper class based on device data.\n\nThis is intended to be the complete API of populator.helpers.\n"
},
{
"from": "human",
"value": "from .btrfs import BTRFSFormatPopulator\nfrom .boot import AppleBootFormatPopulator, EFIFormatPopulator, ... | python | chosen |
[
{
"from": "system",
"value": "TST: Fix typo in deprecation warning [ci skip]\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n# This plugin now lives in pytest-astropy, but we keep the code below during\n# a deprecation phase.\n\nimport warnin... | python | chosen |
[
{
"from": "system",
"value": "Add ordering filters for primary key based api.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom rest_framework import viewsets\nfrom rest_framework.filters import DjangoObjectPermissionsFilter\n\nfrom .. import (\n models,\n ... | python | chosen |
[
{
"from": "system",
"value": "Add topic to PublicBodyAdmin list_filter and list_display"
},
{
"from": "human",
"value": "from django.contrib import admin\nfrom froide.publicbody.models import PublicBody, FoiLaw\n\nclass PublicBodyAdmin(admin.ModelAdmin):\n prepopulated_fields = {\"slug\": (\"... | python | chosen |
[
{
"from": "system",
"value": "Change the formating of item_description. Remove item_location because it was not used.\n"
},
{
"from": "human",
"value": "from django.contrib.syndication.views import Feed\nfrom django.core.urlresolvers import reverse_lazy\nfrom django.utils.feedgenerator import At... | python | chosen |
[
{
"from": "system",
"value": "Reduce number of queries to DB\n"
},
{
"from": "human",
"value": "from inboxen.models import Alias, Attachment, Email, Header\nfrom config.settings import datetime_format, recieved_header_name\nfrom datetime import datetime\n\ndef make_email(message, alias, domain):... | python | chosen |
[
{
"from": "system",
"value": "Create widget CropExample on images\n"
},
{
"from": "human",
"value": "from django import forms\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\n\n\nclass MultipleUpload(forms.FileInput):\n\n def render(self, name, value, at... | python | chosen |
[
{
"from": "system",
"value": "Add a missing @abc.abstractmethod declaration\n\nPiperOrigin-RevId: 424036906\nChange-Id: I3979c35ec30caa4b684d43376b2a36d21f7e79df\n"
},
{
"from": "human",
"value": "# Copyright 2018 DeepMind Technologies Limited. All rights reserved.\n#\n# Licensed under the Apach... | python | chosen |
[
{
"from": "system",
"value": "Use .get_latest() instead so that we do not override built-in .latest()\n"
},
{
"from": "human",
"value": "\nfrom django.db import models\n\n\nclass DeviceManager(models.Manager):\n\n def latest(self):\n \"\"\" Returns latest Device instance \"\"\"\n ... | python | chosen |
[
{
"from": "system",
"value": "Return language set instead of language generator\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\nimport requests\nimport re\n\ndef findAllLanguages():\n \"Find a list of Crowdin language codes to which KA is translated to\"\n response = requests.ge... | python | chosen |
[
{
"from": "system",
"value": "Mark ticket as sensitive by keyword\n\nSet sensitive_keyword in trac.ini as following example, These ticket has\n\"secret\" keyword are viewable by reporter, owner and cc.\n\n[kkbox]\nsensitive_keyword = secret\n"
},
{
"from": "human",
"value": "from trac.core impor... | python | chosen |
[
{
"from": "system",
"value": "Add appearance count to the API.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom rest_framework import serializers\n\nfrom apps.broadcasts.models import Broadcast, Host, Raid, Series\nfrom apps.games.models import Game, Platform\nfrom apps.subscribe... | python | chosen |
[
{
"from": "system",
"value": "Add python environment to cron qualtrics script\n"
},
{
"from": "human",
"value": "import getopt\nimport sys\nimport os\n\n### Script for scheduling regular EdxQualtrics updates\n### Usage for cron should be \"cronRefreshEdxQualtrics.py -m -s -r\"\n\n# Append direct... | python | chosen |
[
{
"from": "system",
"value": "Rename package, add script to manifest"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages, Command\nimport os\n\npackages = find_packages()\n\n\nclass PyTest(Command):\n user_options = []... | python | chosen |
[
{
"from": "system",
"value": "Use < instead of <= in environment markers.\n"
},
{
"from": "human",
"value": "from buckle.version import VERSION\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='buckle',\n version=VERSION,\n description='Buckle: It ties your toolbelt toget... | python | chosen |
[
{
"from": "system",
"value": "Update TrampolinedParser a little for my purposes.\n"
},
{
"from": "human",
"value": "from ometa.interp import TrampolinedGrammarInterpreter, _feed_me\n\nclass TrampolinedParser:\n \"\"\"\n A parser that incrementally parses incoming data.\n \"\"\"\n def... | python | chosen |
[
{
"from": "system",
"value": "Add dependency and bump version.\n"
},
{
"from": "human",
"value": "try:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nconfig = {\n 'description': 'A simple python LOC count tool',\n 'author': 'Tihomir Saulic... | python | chosen |
[
{
"from": "system",
"value": "Use hyphen in package name\n\nSigned-off-by: Michael Barton <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@michaelbarton.me.uk>\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport biobox_cli\n\nsetup(\n name = 'biobox... | python | chosen |
[
{
"from": "system",
"value": "Include packages needed on install\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nfrom ez_setup import use_setuptools\nuse_setuptools()\nfrom setuptools import setup, find_packages\n\n\nsetup(name='permamodel',\n version='0.1.0',\n author='Elch... | python | chosen |
[
{
"from": "system",
"value": "Fix file inclusion and make new release.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the README file\nwith open(path.j... | python | chosen |
[
{
"from": "system",
"value": "Update repository addresses and emails\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os.path\nfrom distutils.core import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), \"README.rst\")).read()\n\nCLASSIFIERS = [\n\t\"Development S... | python | chosen |
[
{
"from": "system",
"value": "Drop Python 2.5 support, add support for Python 3.2\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\n\n\ndef read(filename):\n return open(os.path.join(os.path.dirname(__file__), filename)).read()\n\n\nsetup(\n name='g... | python | chosen |
[
{
"from": "system",
"value": "Add all python files explicitly, and bump to version 0.2.0\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nsetup(\n name=\"librobinson\",\n version=\"0.1\",\n packages=find_packages(),\n scripts=['robinson'],\n\n # Proj... | python | chosen |
[
{
"from": "system",
"value": "Make django-sortable install, pypi package is broken.\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n\n# allow setup.py to be run from any path\nos.chdir(os.p... | python | chosen |
[
{
"from": "system",
"value": "Fix error on admin user_report view\n"
},
{
"from": "human",
"value": "from .users import *\nfrom .resources import *\nfrom .emails import *\nfrom .pages import *\nfrom .soundcloud_track import *\n"
},
{
"from": "gpt",
"value": "from .users import *\nfro... | python | chosen |
[
{
"from": "system",
"value": "Fix version number. Will check the file in another machine and fix the conflict\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\r\nsetup(\r\n name = 'CommonModules',\r\n packages = find_packages(where = '.'), # this must be the s... | python | chosen |
[
{
"from": "system",
"value": "Rename the control script to \"cobe\"\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom ez_setup import use_setuptools\nuse_setuptools()\n\nfrom setuptools import setup, find_packages\nsetup(\n name = \"cobe\",\n version = \"0.5\",\n author =... | python | chosen |
[
{
"from": "system",
"value": "Use module doc as long_description not description\n\nIt's too long for description.\nSee https://github.com/yola/proxyprefix/pull/3#issuecomment-75107125\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nimport proxyprefix\n\n\nsetup(\n name='pr... | python | chosen |
[
{
"from": "system",
"value": "Tidy up U.S. Population by Age and Sex"
},
{
"from": "human",
"value": "\"\"\"\nUS Population Over Time\n=======================\nThis chart visualizes the age distribution of the US population over time.\nIt uses a slider widget that is bound to the year to visuali... | python | chosen |
[
{
"from": "system",
"value": "Add support for Python 3 by doing 2to3 conversion when installing the package with distutils. This way we don't have to maintain two separate repositories to support Python 2.x and Python 3.x.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n#from distutils... | python | chosen |
[
{
"from": "system",
"value": "Make clear we need Python 3.6\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n# First update the version in loompy/_version.py, then:\n\n# cd loompy (the root loompy folder, not the one inside!)\n# rm -r dist (otherwise twine wil... | python | chosen |
[
{
"from": "system",
"value": "Set download_url to pypi directory.\n\ngit-svn-id: c8188841f5432f3fe42d04dee4f87e556eb5cf84@23 99efc558-b41a-11dd-8714-116ca565c52f\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom ez_setup import use_setuptools\nuse_setuptools()\n\nimport os\nfrom s... | python | chosen |
[
{
"from": "system",
"value": "Update meta data for distributed PyPI\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(\n name='raimon49.guestbook',\n version='1.0.0',\n packages=find_packages(),\n include_package_data=True,\n install_require... | python | chosen |
[
{
"from": "system",
"value": "Fix including JS resources as package data\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nimport setuptools\nfrom setuptools import find_packages\n\nsetuptools.setup(\n name = 'js.handlebars',\n version = '1.0.rc.1',\n license = 'BSD',\n description = '... | python | chosen |
[
{
"from": "system",
"value": "Fix trove classifier for pypi\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\n__author__ = \"Nitrax <nitrax@lokisec.fr>\"\n__copyright__ = \"Copyright 2017, Legobot\"\n\ndescription = 'Lego providing network... | python | chosen |
[
{
"from": "system",
"value": "Fix lexicographic order in install_requires\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup\n\n\ninstall_requires = [\n 'argparse',\n 'jsonschema',\n 'mock',\n 'M2Crypto',\n 'pycrypto',\n 'python-augeas',\n ... | python | chosen |
[
{
"from": "system",
"value": "Update requirement neo4j-driver to <1.5.0\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = '1.0.17'\n\nrequires = [\n 'neo4j-driver<1.2.0',\n 'six>=1.10.0',\n]\n\ntesting_requires = [\n 'nose',\n 'coverage',\n ... | python | chosen |
[
{
"from": "system",
"value": "Update project URL to readthedocs\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport nirvana\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nwith open('README.rst') as readme:\n long_descript... | python | chosen |
[
{
"from": "system",
"value": "Fix SSL Warnings with old python versions\n\nSigned-off-by: Xuanwo <9d9ffaee821234cdfed458cf06eb6f407f8dbe47@yunify.com>\n"
},
{
"from": "human",
"value": "# coding:utf-8\n\nfrom setuptools import setup, find_packages\nfrom qingstor.qsctl import __version__\n\nsetup... | python | chosen |
[
{
"from": "system",
"value": "Update Django requirement to latest LTS\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='django-force-logout',\n\n url=\"https://chris-lamb.co.uk/projects/django-force-logout\",\n version='2.0.0',\n descrip... | python | chosen |
[
{
"from": "system",
"value": "Revert \"packages/quicksync-mfx: switch to cmake\"\n\nThis reverts commit b3db211b42f26480fe817d26d7515ec8bd6e5c9e.\n"
},
{
"from": "human",
"value": "{\n\t'repo_type' : 'git',\n\t'url' : 'https://github.com/lu-zero/mfx_dispatch.git',\n\t'conf_system' : 'cmake',\n\t... | python | chosen |
[
{
"from": "system",
"value": "Use the absolute path for the long description to work around CI issues."
},
{
"from": "human",
"value": "import os\nfrom distutils.core import setup\n\nversion = '0.9.3'\n\n\ndef read_file(name):\n return open(os.path.join(os.path.dirname(__file__),\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix the extraction of the company name.\n\nThere's an apparent bug in the Tvinna rss feed, such that the username of the person creating the listing is used in place of a company name in the `<cd:creator>` field. As a work around, we need to visit the job listing page, and extr... | python | chosen |
[
{
"from": "system",
"value": "Use pathlib instead of os.path"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n# Standard library modules.\nimport os\n\n# Third party modules.\nfrom setuptools import setup, find_packages\n\n# Local modules.\nimport versioneer\n\n# Globals and constants v... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in script packaging\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup\n\ndef read(*paths):\n \"\"\"Build a file path from *paths* and return the contents.\"\"\"\n with open(os.path.join(*paths), 'r') as f:\n return f.... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 0.2.19.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n ret... | python | chosen |
[
{
"from": "system",
"value": "Add ipaddress requirement to python older than 3.3\n"
},
{
"from": "human",
"value": "from setuptools import find_packages\nfrom setuptools import setup\n\n\ndef get_long_description():\n with open('README.md') as readme_file:\n return readme_file.read()\n... | python | chosen |
[
{
"from": "system",
"value": "Remove trove classifier for python 3.5\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\n\n\nVERSION = '1.0.0'\n\nsetup(\n name='django-fakery',\n version=VERSION,\n url='https://github.com/fcurella/django-factory/',\n autho... | python | chosen |
[
{
"from": "human",
"value": "Add explanation of what was not working before.\n"
},
{
"from": "gpt",
"value": "# This file needs to exist in order for pytest-cov to work.\n# See this: https://bitbucket.org/memedough/pytest-cov/issues/4/no-coverage-unless-test-directory-has-an\n"
}
] | python | chosen |
[
{
"from": "system",
"value": "Fix pandoc statement\nUpdate version number\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n#pandoc -f rst -t markdown README.mkd -o README\n\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__fil... | python | chosen |
[
{
"from": "system",
"value": "Add some reasonable trove classifiers\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport codecs\n\nfrom setuptools import setup\n\ntry:\n # Python 3\n from os import dirname\nexcept ImportError:\n... | python | chosen |
[
{
"from": "system",
"value": "Add some more trivial bql2sql tests.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2014, MIT Probabilistic Computing Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fi... | python | chosen |
[
{
"from": "system",
"value": "Fix Python3 support: remove iteritems\n"
},
{
"from": "human",
"value": "# vim:ts=4 sw=4 expandtab softtabstop=4\n\nclass JSONValue(object):\n def __init__(self, val=None, ref='#', undef=False):\n assert not isinstance(val, JSONValue)\n self.val = v... | python | chosen |
[
{
"from": "system",
"value": "Revert version number on release branch.\n"
},
{
"from": "human",
"value": "\"\"\"Spherical harmonic vector wind analysis.\"\"\"\n# Copyright (c) 2012-2014 Andrew Dawson\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this so... | python | chosen |
[
{
"from": "system",
"value": "Upgrade version for new optimization\n\n(for real this time)"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='daffodil',\n version='0.3.8',\n author='James Robert',\n description='A Super-simple DSL for filtering datasets',... | python | chosen |
[
{
"from": "system",
"value": "Fix encoding error preventing install\n\nWhile running tox the installation of icecake would succeed under Python\n2.7.13 but fail under 3.5.2 with an encoding error while trying to read\nthe long description from README.rst.\n\npy35 inst-nodeps: /icecake/.tox/dist/icecake-0.6.... | python | chosen |
[
{
"from": "system",
"value": "Remove reference to stale source (client.py).\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom distutils.core import setup\n\nsetup(\n name='rinse',\n version='0.0.3',\n description='Python3 SOAP client built with lxml and requests.',\n aut... | python | chosen |
[
{
"from": "system",
"value": "Make sure this works the first time you run it\n"
},
{
"from": "human",
"value": "'''\nSetup script that:\n\n/pyquic:\n - compiles pyquic\n - copies py_quic into base directory so that we can use the module directly\n'''\nimport os\nimport shutil\n\n\nclass te... | python | chosen |
[
{
"from": "system",
"value": "Upgrade tangled 0.1a7 => 0.1a9\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name='tangled.sqlalchemy',\n version='0.1a4.dev0',\n description='Tangled SQLAlchemy integration',\n long_description=open('README.rst').read(),\... | python | chosen |
[
{
"from": "system",
"value": "Document that python 3.10 is supported and update version number.\n"
},
{
"from": "human",
"value": "from setuptools import setup # type: ignore[import]\n\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nsetup(\n name=\"objname\",\n... | python | chosen |
[
{
"from": "system",
"value": "Transform readme into PyPI compliant reST\n"
},
{
"from": "human",
"value": "from __future__ import with_statement\n\nfrom distutils.core import setup\n\n\ndef readme():\n try:\n with open('README.rst') as f:\n return f.read()\n except IOErro... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.