prompt listlengths 1 1 | compression_prompt listlengths 1 1 | target stringlengths 1.03k 828k |
|---|---|---|
[
{
"content": "Here is a code file:\n```python\nimport re, os, logging, time\nfrom autotest.client.shared import utils, error\nfrom virttest import qemu_monitor, storage, env_process, data_dir, utils_misc\n\n\n@error.context_aware\ndef run_block_mirror(test, params, env):\n \"\"\"\n Test block mirroring fu... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nimport re, os, logging, time\nfrom autotest.client.shared import utils, error\nfrom virttest import qemu_monitor, storage, env_process, data_dir, utils_misc\n\n\n@error.context_aware\ndef run_block_mirror(test, params, env):\n \"\"\"\n Test bl... | ```python
import re, os, logging, time
from autotest.client.shared import utils, error
from virttest import qemu_monitor, storage, env_process, data_dir, utils_misc
@error.context_aware
def run_block_mirror(test, params, env):
"""
Test block mirroring functionality
Test consists of two subtests:
1) ... |
[
{
"content": "```python\nimport numpy\nimport xraylib\n\n\"\"\"\ntransfocator_id30b : transfocator for id13b:\n It can:\n\n 1) guess the lens configuration (number of lenses for each type) for a given photon energy\n and target image size. Use transfocator_compute_configuration() fo... | [
{
"content": "<|memory_start|>```python\nimport numpy\nimport xraylib\n\n\"\"\"\ntransfocator_id30b : transfocator for id13b:\n It can:\n\n 1) guess the lens configuration (number of lenses for each type) for a given photon energy\n and target image size. Use transfocator_compute_co... | ```python
import numpy
import xraylib
"""
transfocator_id30b : transfocator for id13b:
It can:
1) guess the lens configuration (number of lenses for each type) for a given photon energy
and target image size. Use transfocator_compute_configuration() for this task
2) for a ... |
[
{
"content": "Recreate the original code text:\n```python\n\"\"\"Create strings representing relationships on GO Terms.\n\n +------- has 'part_of' relationship(s)\n | +-- pointed to by a GO ID with a 'part_of' relationship\n | |\n V ... | [
{
"content": "Recreate the original code text:\n<|memory_start|>```python\n\"\"\"Create strings representing relationships on GO Terms.\n\n +------- has 'part_of' relationship(s)\n | +-- pointed to by a GO ID with a 'part_of' relationship\n | |\n ... | ```python
"""Create strings representing relationships on GO Terms.
+------- has 'part_of' relationship(s)
| +-- pointed to by a GO ID with a 'part_of' relationship
| |
V V
GO:0008150 L00 D00 .... .rdu biological_process
GO:0050896 L0... |
[
{
"content": "```python\n#!/usr/bin/python\n# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n#\n# Originally written by Mario and Luigi at Google.\n\n\"\"\"A code generator for TPM utility ... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/python\n# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n#\n# Originally written by Mario and Luigi at Google.\n\n\"\"\"A code generator ... | ```python
#!/usr/bin/python
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Originally written by Mario and Luigi at Google.
"""A code generator for TPM utility functions.
The generator inputs ... |
[
{
"content": "Repeat the code exactly:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n# coding=utf-8\n\n# Copyright 2012 Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2012 NTT DOCOMO, INC.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); y... | [
{
"content": "Repeat the code exactly:\n<|memory_start|>```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n# coding=utf-8\n\n# Copyright 2012 Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2012 NTT DOCOMO, INC.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the... | ```python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2012 NTT DOCOMO, INC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with th... |
[
{
"content": "Return the code unaltered:\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.widgets import Slider\nfrom mpi4py import MPI\n\nfrom cplpy import CPL\nfrom draw_grid import draw_grid\n\n#initialise MPI and CPL\ncomm = MPI.COMM_WORLD\nCPL = CPL()\nCFD_COMM = CPL.init(CP... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.widgets import Slider\nfrom mpi4py import MPI\n\nfrom cplpy import CPL\nfrom draw_grid import draw_grid\n\n#initialise MPI and CPL\ncomm = MPI.COMM_WORLD\nCPL = CPL()\nCFD_CO... | ```python
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
from mpi4py import MPI
from cplpy import CPL
from draw_grid import draw_grid
#initialise MPI and CPL
comm = MPI.COMM_WORLD
CPL = CPL()
CFD_COMM = CPL.init(CPL.CFD_REALM)
nprocs_realm = CFD_COMM.Get_size()
# Parameters ... |
[
{
"content": "Repeat the full code snippet:\n```python\n#!/usr/bin/env python\nimport numpy as np\nimport json\nimport rospy\nimport scipy.interpolate\nimport threading\nimport argparse\nfrom std_msgs.msg import Header\nfrom sub8_msgs.msg import Thrust, ThrusterCmd, ThrusterStatus\nfrom sub8_ros_tools import wa... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\n#!/usr/bin/env python\nimport numpy as np\nimport json\nimport rospy\nimport scipy.interpolate\nimport threading\nimport argparse\nfrom std_msgs.msg import Header\nfrom sub8_msgs.msg import Thrust, ThrusterCmd, ThrusterStatus\nfrom sub8_ros... | ```python
#!/usr/bin/env python
import numpy as np
import json
import rospy
import scipy.interpolate
import threading
import argparse
from std_msgs.msg import Header
from sub8_msgs.msg import Thrust, ThrusterCmd, ThrusterStatus
from sub8_ros_tools import wait_for_param, thread_lock
from sub8_msgs.srv import ThrusterInf... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nimport discord\nimport asyncio\nimport random\nimport steam\nfrom steam.steamid import SteamId\nfrom steam.steamprofile import SteamProfile\nfrom steam.steamaccountuniverse import SteamAccountUniverse\nfrom steam.steamaccounttype import SteamAc... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nimport discord\nimport asyncio\nimport random\nimport steam\nfrom steam.steamid import SteamId\nfrom steam.steamprofile import SteamProfile\nfrom steam.steamaccountuniverse import SteamAccountUniverse\nfrom steam.steamaccounttyp... | ```python
import discord
import asyncio
import random
import steam
from steam.steamid import SteamId
from steam.steamprofile import SteamProfile
from steam.steamaccountuniverse import SteamAccountUniverse
from steam.steamaccounttype import SteamAccountType
from discord.ext import commands
from utils import checks
from ... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- \n#\n# This file is part of TracForge Project\n#\n# Copyright (C) 2008 TracForge Project\n#\n# See AUTHORS for more informations\n#\n# This program is free software: you can redistribute it and/or modif... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- \n#\n# This file is part of TracForge Project\n#\n# Copyright (C) 2008 TracForge Project\n#\n# See AUTHORS for more informations\n#\n# This program is free software: you can redistribute... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of TracForge Project
#
# Copyright (C) 2008 TracForge Project
#
# See AUTHORS for more informations
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# p... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\n# Output\n#\n# $ ./triton ./examples/callback_after.py ./samples/crackmes/crackme_xor a\n# 0x40056d: push rbp\n# -> #0 = (bvsub (_ bv140735022953896 64) (_ bv8 64)) ; Aligns stack\n# -> #1 = (_ bv140735022953936 64) \n# ->... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n# Output\n#\n# $ ./triton ./examples/callback_after.py ./samples/crackmes/crackme_xor a\n# 0x40056d: push rbp\n# -> #0 = (bvsub (_ bv140735022953896 64) (_ bv8 64)) ; Aligns stack\n# -> #1 = (_ bv140735022953936 64)... | ```python
# Output
#
# $ ./triton ./examples/callback_after.py ./samples/crackmes/crackme_xor a
# 0x40056d: push rbp
# -> #0 = (bvsub (_ bv140735022953896 64) (_ bv8 64)) ; Aligns stack
# -> #1 = (_ bv140735022953936 64)
# -> #2 = (_ bv4195694 64) ; RIP
#
# 0x40056e: mov rbp, rsp
# ... |
[
{
"content": "Here is the code block:\n```python\nimport xbmcaddon\nimport thread, threading\nimport urllib, urllib2\nimport datetime, time\nimport xbmc\nimport logging\nfrom bs4 import BeautifulSoup\nimport requests\nimport html5lib\n\nclass Item:\n\tdef __init__(self, link, title, img):\n\t\tself.link = link\... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\nimport xbmcaddon\nimport thread, threading\nimport urllib, urllib2\nimport datetime, time\nimport xbmc\nimport logging\nfrom bs4 import BeautifulSoup\nimport requests\nimport html5lib\n\nclass Item:\n\tdef __init__(self, link, title, img):\n\t\ts... | ```python
import xbmcaddon
import thread, threading
import urllib, urllib2
import datetime, time
import xbmc
import logging
from bs4 import BeautifulSoup
import requests
import html5lib
class Item:
def __init__(self, link, title, img):
self.link = link
self.title = title
self.img = img
def getListVideos(url):
... |
[
{
"content": "Repeat the code precisely:\n```python\n\"\"\"\nDjango settings for aplicaciones_informaticas project.\n\nGenerated by 'django-admin startproject' using Django 1.10.3.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n\"\"\"\nDjango settings for aplicaciones_informaticas project.\n\nGenerated by 'django-admin startproject' using Django 1.10.3.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full ... | ```python
"""
Django settings for aplicaciones_informaticas project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/... |
[
{
"content": "Repeat the code exactly as the original, including blank lines:\n```python\n\"\"\"\nORM definitions for mapping tracks data stored in PostgreSQL database\n\"\"\"\n\nfrom sqlalchemy import create_engine, Column, Integer, Float, String\nfrom sqlalchemy.dialects.postgresql import INTERVAL, TIMESTAMP\... | [
{
"content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n\"\"\"\nORM definitions for mapping tracks data stored in PostgreSQL database\n\"\"\"\n\nfrom sqlalchemy import create_engine, Column, Integer, Float, String\nfrom sqlalchemy.dialects.postgresql import INTE... | ```python
"""
ORM definitions for mapping tracks data stored in PostgreSQL database
"""
from sqlalchemy import create_engine, Column, Integer, Float, String
from sqlalchemy.dialects.postgresql import INTERVAL, TIMESTAMP
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import decl... |
[
{
"content": "Here is the source code:\n```python\n# Copyright 2009, Peter A. Bigot\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain a\n# copy of the License at:\n#\n# http://www.apache.org/licen... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\n# Copyright 2009, Peter A. Bigot\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain a\n# copy of the License at:\n#\n# http://www.... | ```python
# Copyright 2009, Peter A. Bigot
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain a
# copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
[
{
"content": "Recreate the entire code block with identical formatting:\n```python\n# -*- coding: utf-8 -*-\n##############################################################################\n# For copyright and license notices, see __openerp__.py file in module root\n# directory\n#################################... | [
{
"content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n##############################################################################\n# For copyright and license notices, see __openerp__.py file in module root\n# directory\n#################... | ```python
# -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields, api
... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# TESTING FILE made.by.a.fox. 12.2.15\n# Updated by acrule 01.21.16\n\n#FEATURE LIST\n# Y connect to db\n# Y write to file\n# Y Write JSON format\n# Accept input date pa... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# TESTING FILE made.by.a.fox. 12.2.15\n# Updated by acrule 01.21.16\n\n#FEATURE LIST\n# Y connect to db\n# Y write to file\n# Y Write JSON format\n# Acce... | ```python
#!/usr/bin/python
# -*- coding: utf-8 -*-
# TESTING FILE made.by.a.fox. 12.2.15
# Updated by acrule 01.21.16
#FEATURE LIST
# Y connect to db
# Y write to file
# Y Write JSON format
# Accept input date parameter
#KNOWN ISSUES
# 2. no formatting or conversion of datetime stamps
import re
i... |
[
{
"content": "Here is a code snippet:\n```python\nfrom __future__ import absolute_import\nimport os\nfrom celery import Celery\nfrom django.apps import AppConfig\nfrom django.conf import settings\n\n\nif not settings.configured:\n # set the default Django settings module for the 'celery' program.\n os.env... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\nfrom __future__ import absolute_import\nimport os\nfrom celery import Celery\nfrom django.apps import AppConfig\nfrom django.conf import settings\n\n\nif not settings.configured:\n # set the default Django settings module for the 'celery' prog... | ```python
from __future__ import absolute_import
import os
from celery import Celery
from django.apps import AppConfig
from django.conf import settings
if not settings.configured:
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.setting... |
[
{
"content": "Reproduce the code exactly as provided (keep formatting):\n```python\n# $Id$\n#\n# Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC\n#\n# @@ All Rights Reserved @@\n# This file is part of the RDKit.\n# The contents are covered by the terms of the BSD license\n# which is include... | [
{
"content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n# $Id$\n#\n# Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC\n#\n# @@ All Rights Reserved @@\n# This file is part of the RDKit.\n# The contents are covered by the terms of the BSD license\n# ... | ```python
# $Id$
#
# Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" Function... |
[
{
"content": "```python\n#!/usr/bin/python3\n\n# @begin:license\n#\n# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; ei... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/python3\n\n# @begin:license\n#\n# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Softwar... | ```python
#!/usr/bin/python3
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, ... |
[
{
"content": "Replicate the source code:\n```python\nimport hashlib\nfrom pathlib import Path\n\nfrom docutils import nodes\nfrom docutils.parsers.rst import Directive, directives\nimport sphinx\n\nimport matplotlib as mpl\nfrom matplotlib import cbook\nfrom matplotlib.mathtext import MathTextParser\nmathtext_p... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\nimport hashlib\nfrom pathlib import Path\n\nfrom docutils import nodes\nfrom docutils.parsers.rst import Directive, directives\nimport sphinx\n\nimport matplotlib as mpl\nfrom matplotlib import cbook\nfrom matplotlib.mathtext import MathTextPa... | ```python
import hashlib
from pathlib import Path
from docutils import nodes
from docutils.parsers.rst import Directive, directives
import sphinx
import matplotlib as mpl
from matplotlib import cbook
from matplotlib.mathtext import MathTextParser
mathtext_parser = MathTextParser("Bitmap")
# Define LaTeX math node:
... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n\nfrom message import Message, except_f1\nimport C1, C2\n\nclass B1(Message):\n \"\"\"Classe que implementa B1.\"\"\"\n\n @property\n def sollicitud(self):\n \"\"\"Retorna l'objecte Sollicitud\"\"\"\n return C1.Sollicitud(self.obj.BajaEner... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\nfrom message import Message, except_f1\nimport C1, C2\n\nclass B1(Message):\n \"\"\"Classe que implementa B1.\"\"\"\n\n @property\n def sollicitud(self):\n \"\"\"Retorna l'objecte Sollicitud\"\"\"\n return C1.Sollicitud(s... | ```python
# -*- coding: utf-8 -*-
from message import Message, except_f1
import C1, C2
class B1(Message):
"""Classe que implementa B1."""
@property
def sollicitud(self):
"""Retorna l'objecte Sollicitud"""
return C1.Sollicitud(self.obj.BajaEnergia.DatosSolicitud)
@property
def... |
[
{
"content": "```python\nimport os\nfrom boxbranding import getImageVersion\n\ndef enumFeeds():\n\tfor fn in os.listdir('/etc/opkg'):\n\t\tif fn.endswith('-feed.conf'):\n\t\t\tfile = open(os.path.join('/etc/opkg', fn))\n\t\t\tfeedfile = file.readlines()\n\t\t\tfile.close()\n\t\t\ttry:\n\t\t\t\tfor feed in feedf... | [
{
"content": "<|memory_start|>```python\nimport os\nfrom boxbranding import getImageVersion\n\ndef enumFeeds():\n\tfor fn in os.listdir('/etc/opkg'):\n\t\tif fn.endswith('-feed.conf'):\n\t\t\tfile = open(os.path.join('/etc/opkg', fn))\n\t\t\tfeedfile = file.readlines()\n\t\t\tfile.close()\n\t\t\ttry:\n\t\t\t\tf... | ```python
import os
from boxbranding import getImageVersion
def enumFeeds():
for fn in os.listdir('/etc/opkg'):
if fn.endswith('-feed.conf'):
file = open(os.path.join('/etc/opkg', fn))
feedfile = file.readlines()
file.close()
try:
for feed in feedfile:
yield feed.split()[1]
except IndexError... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n__author__ = 'ivo'\n\nimport logging\nimport argparse\n\nfrom blackswan import config\n\n_log = logging.getLogger(__name__)\n\nclass ModuleBase():\n argparser = None\n\n def __init__(self):\n self.co... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n__author__ = 'ivo'\n\nimport logging\nimport argparse\n\nfrom blackswan import config\n\n_log = logging.getLogger(__name__)\n\nclass ModuleBase():\n argparser = None\n\n def __init__(self):\... | ```python
__author__ = 'ivo'
import logging
import argparse
from blackswan import config
_log = logging.getLogger(__name__)
class ModuleBase():
argparser = None
def __init__(self):
self.config = {}
@classmethod
def register(cls):
cls.argparser = argparse.ArgumentParser(description=... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\n# Copyright 2016 IBM 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# ... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n# Copyright 2016 IBM 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 Licen... | ```python
# Copyright 2016 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\n# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# - Redistributions of so... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# - Redis... | ```python
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of ... |
[
{
"content": "Reconstruct the code file line-for-line, unmodified:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup, find_packages\nfrom itertools import chain\nfrom glob import glob\n\nimport cookielaw\n\n\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/Stable',\n 'En... | [
{
"content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\n#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup, find_packages\nfrom itertools import chain\nfrom glob import glob\n\nimport cookielaw\n\n\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/S... | ```python
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
from itertools import chain
from glob import glob
import cookielaw
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Devel... |
[
{
"content": "Reproduce the code exactly as provided (keep formatting):\n```python\n\"\"\"Functions for fetching basic statistics about observers and observations.\"\"\"\n\nfrom ebird.api.utils import call\nfrom ebird.api.validation import (\n clean_area,\n clean_date,\n clean_max_observers,\n clean... | [
{
"content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n\"\"\"Functions for fetching basic statistics about observers and observations.\"\"\"\n\nfrom ebird.api.utils import call\nfrom ebird.api.validation import (\n clean_area,\n clean_date,\n clean_max_obser... | ```python
"""Functions for fetching basic statistics about observers and observations."""
from ebird.api.utils import call
from ebird.api.validation import (
clean_area,
clean_date,
clean_max_observers,
clean_rank,
clean_region,
)
TOP_100_URL = "https://ebird.org/ws2.0/product/top100/%s/%s"
TOTALS... |
[
{
"content": "```python\nfrom conans import ConanFile, tools\n\nimport os\n\n\nclass MsgpackConan(ConanFile):\n name = \"msgpack\"\n version = \"2.1.5\"\n license = \"Boost Software License 1.0\"\n url = \"https://github.com/sztomi/conan-msgpack\"\n description = \"The official C++ library for Me... | [
{
"content": "<|memory_start|>```python\nfrom conans import ConanFile, tools\n\nimport os\n\n\nclass MsgpackConan(ConanFile):\n name = \"msgpack\"\n version = \"2.1.5\"\n license = \"Boost Software License 1.0\"\n url = \"https://github.com/sztomi/conan-msgpack\"\n description = \"The official C+... | ```python
from conans import ConanFile, tools
import os
class MsgpackConan(ConanFile):
name = "msgpack"
version = "2.1.5"
license = "Boost Software License 1.0"
url = "https://github.com/sztomi/conan-msgpack"
description = "The official C++ library for MessagePack"
@property
def extracte... |
[
{
"content": "Here is a code snippet:\n```python\n#!/usr/bin/env python\r\n# simple test cases for two phase commit extensions to psycopg2\r\n#\r\n# Copyright (C) 2008 Mariano Reingart <mariano@nsis.com.ar>\r\n#\r\n# This program is free software; you can redistribute it and/or modify\r\n# it under the terms of... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\n#!/usr/bin/env python\r\n# simple test cases for two phase commit extensions to psycopg2\r\n#\r\n# Copyright (C) 2008 Mariano Reingart <mariano@nsis.com.ar>\r\n#\r\n# This program is free software; you can redistribute it and/or modify\r\n# it un... | ```python
#!/usr/bin/env python
# simple test cases for two phase commit extensions to psycopg2
#
# Copyright (C) 2008 Mariano Reingart <mariano@nsis.com.ar>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free ... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\nimport Queue\nimport threading\n\nMAX_WAIT_QUEUE_TIMEOUT = 2\n\nclass ArticleInserter(threading.Thread):\n '''Thread which inserts articles into the database\n '''\n\n def __init__(self, queue, build_view):\n threading.... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\nimport Queue\nimport threading\n\nMAX_WAIT_QUEUE_TIMEOUT = 2\n\nclass ArticleInserter(threading.Thread):\n '''Thread which inserts articles into the database\n '''\n\n def __init__(self, queue, build_view):\n ... | ```python
import Queue
import threading
MAX_WAIT_QUEUE_TIMEOUT = 2
class ArticleInserter(threading.Thread):
'''Thread which inserts articles into the database
'''
def __init__(self, queue, build_view):
threading.Thread.__init__(self)
'''constructor
@param queue the queue to wh... |
[
{
"content": "Reproduce the code exactly as provided (keep formatting):\n```python\nimport abc\nimport sys\n\nfrom uqbar.cli.CLI import CLI\n\n\nclass CLIAggregator(CLI):\n \"\"\"\n Aggregates CLI scripts.\n\n ::\n\n >>> import uqbar.cli\n >>> class ExampleAggregator(uqbar.cli.CLIAggregat... | [
{
"content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\nimport abc\nimport sys\n\nfrom uqbar.cli.CLI import CLI\n\n\nclass CLIAggregator(CLI):\n \"\"\"\n Aggregates CLI scripts.\n\n ::\n\n >>> import uqbar.cli\n >>> class ExampleAggregator(uqbar... | ```python
import abc
import sys
from uqbar.cli.CLI import CLI
class CLIAggregator(CLI):
"""
Aggregates CLI scripts.
::
>>> import uqbar.cli
>>> class ExampleAggregator(uqbar.cli.CLIAggregator):
... @property
... def cli_classes(self):
... return [... |
[
{
"content": "```python\nfrom intern.remote.boss import BossRemote\nfrom intern.resource.boss.resource import *\nimport numpy as np\nfrom requests import HTTPError\n\nrmt = BossRemote('neurodata.cfg')\n\nxmax = 8\nymax = 4\nzmax = 5\ntmax = 10\n\nCOLL_NAME = 'gray'\nEXP_NAME = 'timeseries_test'\nCHAN_NAME = 'Ch... | [
{
"content": "<|memory_start|>```python\nfrom intern.remote.boss import BossRemote\nfrom intern.resource.boss.resource import *\nimport numpy as np\nfrom requests import HTTPError\n\nrmt = BossRemote('neurodata.cfg')\n\nxmax = 8\nymax = 4\nzmax = 5\ntmax = 10\n\nCOLL_NAME = 'gray'\nEXP_NAME = 'timeseries_test'\... | ```python
from intern.remote.boss import BossRemote
from intern.resource.boss.resource import *
import numpy as np
from requests import HTTPError
rmt = BossRemote('neurodata.cfg')
xmax = 8
ymax = 4
zmax = 5
tmax = 10
COLL_NAME = 'gray'
EXP_NAME = 'timeseries_test'
CHAN_NAME = 'Ch1'
COORD_FRAME = COLL_NAME + '_' + E... |
[
{
"content": "Here is some code:\n```python\n#!/usr/bin/python\n\n# Modify the solute geometry and charges in Gromacs .gro and .top files\n\n# Use with 5 arguments:\n# 1 (read): generic system file\n# 2 (read): .top file\n# 3 (read): .gro file\n# 4 (write): modified .top file\n# 5 (write): modified .gro fi... | [
{
"content": "Here is some code:\n<|memory_start|>```python\n#!/usr/bin/python\n\n# Modify the solute geometry and charges in Gromacs .gro and .top files\n\n# Use with 5 arguments:\n# 1 (read): generic system file\n# 2 (read): .top file\n# 3 (read): .gro file\n# 4 (write): modified .top file\n# 5 (write): ... | ```python
#!/usr/bin/python
# Modify the solute geometry and charges in Gromacs .gro and .top files
# Use with 5 arguments:
# 1 (read): generic system file
# 2 (read): .top file
# 3 (read): .gro file
# 4 (write): modified .top file
# 5 (write): modified .gro file
import sys
import re
import math
import copy
#=... |
[
{
"content": "```python\n#!/usr/bin/env python\n\nfrom picamera.array import PiRGBArray\nfrom picamera import PiCamera\nimport cv2\nimport time\nfrom colormath.color_diff import delta_e_cie2000\nfrom colormath.color_objects import LabColor, sRGBColor\nfrom colormath.color_conversions import convert_color\n\ndef... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/env python\n\nfrom picamera.array import PiRGBArray\nfrom picamera import PiCamera\nimport cv2\nimport time\nfrom colormath.color_diff import delta_e_cie2000\nfrom colormath.color_objects import LabColor, sRGBColor\nfrom colormath.color_conversions import conv... | ```python
#!/usr/bin/env python
from picamera.array import PiRGBArray
from picamera import PiCamera
import cv2
import time
from colormath.color_diff import delta_e_cie2000
from colormath.color_objects import LabColor, sRGBColor
from colormath.color_conversions import convert_color
def nothing(*arg):
pass
def is_... |
[
{
"content": "Replicate the source code:\n```python\n#!/usr/bin/env python3\n\n# This file is part of the MicroPython project, http://micropython.org/\n# The MIT License (MIT)\n# Copyright (c) 2019 Damien P. George\n\nimport os\nimport subprocess\nimport sys\nimport argparse\n\nsys.path.append('../tools')\nimpo... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n#!/usr/bin/env python3\n\n# This file is part of the MicroPython project, http://micropython.org/\n# The MIT License (MIT)\n# Copyright (c) 2019 Damien P. George\n\nimport os\nimport subprocess\nimport sys\nimport argparse\n\nsys.path.append('... | ```python
#!/usr/bin/env python3
# This file is part of the MicroPython project, http://micropython.org/
# The MIT License (MIT)
# Copyright (c) 2019 Damien P. George
import os
import subprocess
import sys
import argparse
sys.path.append('../tools')
import pyboard
# Paths for host executables
CPYTHON3 = os.getenv('... |
[
{
"content": "```python\n\"\"\"\n Defines the routing endpoints of the RESTful API for databayes.\n\n Each method corresponds to an API action and returns the status of the action and the output. This\n layer handles communication to the databayes daemon.\n\n IMPORTANT NOTE! - Only one of these ser... | [
{
"content": "<|memory_start|>```python\n\"\"\"\n Defines the routing endpoints of the RESTful API for databayes.\n\n Each method corresponds to an API action and returns the status of the action and the output. This\n layer handles communication to the databayes daemon.\n\n IMPORTANT NOTE! - Only ... | ```python
"""
Defines the routing endpoints of the RESTful API for databayes.
Each method corresponds to an API action and returns the status of the action and the output. This
layer handles communication to the databayes daemon.
IMPORTANT NOTE! - Only one of these server instances should be running ... |
[
{
"content": "Repeat the code exactly as the original, including blank lines:\n```python\n\"\"\"\nThis module contains a collection of commonly encountered HTTP exceptions.\n\nThis allows all these http exceptions to be treated in the same way and simplifies the return of errors to the user.\n\"\"\"\n\nfrom err... | [
{
"content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n\"\"\"\nThis module contains a collection of commonly encountered HTTP exceptions.\n\nThis allows all these http exceptions to be treated in the same way and simplifies the return of errors to the user.\n\"... | ```python
"""
This module contains a collection of commonly encountered HTTP exceptions.
This allows all these http exceptions to be treated in the same way and simplifies the return of errors to the user.
"""
from errors import ErrorMessage
__author__ = "Benjamin Schubert <ben.c.schubert@gmail.com>"
class BaseHT... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n# Copyright 2014 Objectif Libre\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/li... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Copyright 2014 Objectif Libre\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://w... | ```python
# -*- coding: utf-8 -*-
# Copyright 2014 Objectif Libre
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n# -*- coding: utf-8 -*-\n\nfrom fissure_Coude import fissure_Coude\n\nclass fissure_Coude_4(fissure_Coude):\n \"\"\"\n probleme de fissure du Coude : ASCOU09A\n adaptation maillage\n \"\"\"\n\n# ------------... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\nfrom fissure_Coude import fissure_Coude\n\nclass fissure_Coude_4(fissure_Coude):\n \"\"\"\n probleme de fissure du Coude : ASCOU09A\n adaptation maillage\n \"\"\"\n... | ```python
# -*- coding: utf-8 -*-
from fissure_Coude import fissure_Coude
class fissure_Coude_4(fissure_Coude):
"""
probleme de fissure du Coude : ASCOU09A
adaptation maillage
"""
# ---------------------------------------------------------------------------
def setParamGeometrieSaine(self):
"""
Pa... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n# Copyright (C) 2013-2014 Fox Wilson, Peter Foley, Srijay Kasturi, Samuel Damashek, James Forcier and Reed Koser\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n# Copyright (C) 2013-2014 Fox Wilson, Peter Foley, Srijay Kasturi, Samuel Damashek, James Forcier and Reed Koser\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General... | ```python
# Copyright (C) 2013-2014 Fox Wilson, Peter Foley, Srijay Kasturi, Samuel Damashek, James Forcier and Reed Koser
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of... |
[
{
"content": "Produce an exact reconstruction of the code:\n```python\nclass NumMatrix(object):\n\n def __init__(self, matrix):\n \"\"\"\n :type matrix: List[List[int]]\n \"\"\"\n m, n = len(matrix), len(matrix[0] if matrix else [])\n self._sum = [[0] * n for i in xrange(m)... | [
{
"content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\nclass NumMatrix(object):\n\n def __init__(self, matrix):\n \"\"\"\n :type matrix: List[List[int]]\n \"\"\"\n m, n = len(matrix), len(matrix[0] if matrix else [])\n self._sum = [[0] * n fo... | ```python
class NumMatrix(object):
def __init__(self, matrix):
"""
:type matrix: List[List[int]]
"""
m, n = len(matrix), len(matrix[0] if matrix else [])
self._sum = [[0] * n for i in xrange(m)]
col_sum = [0] * n
for i in xrange(m):
s = 0
... |
[
{
"content": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torch.autograd import Variable\nfrom pprint import pprint\nimport time\n\nfrom utils import pairwise_distances, batchify\nfrom config import opt, data, loaders\n\nclass SimpleClassifi... | [
{
"content": "<|memory_start|>```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torch.autograd import Variable\nfrom pprint import pprint\nimport time\n\nfrom utils import pairwise_distances, batchify\nfrom config import opt, data, loaders\n\nclas... | ```python
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
from pprint import pprint
import time
from utils import pairwise_distances, batchify
from config import opt, data, loaders
class SimpleClassifier(nn.Module):
def __init__(se... |
[
{
"content": "Reconstruct the code exactly:\n```python\nfrom datetime import datetime\nimport logging\n\nfrom sqlalchemy import or_\n\nfrom adhocracy import model\nfrom adhocracy.model import Delegation\n\nlog = logging.getLogger(__name__)\n\n# REFACT: Rename: DelegationTraverser? Maybe thats also a new object\... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\nfrom datetime import datetime\nimport logging\n\nfrom sqlalchemy import or_\n\nfrom adhocracy import model\nfrom adhocracy.model import Delegation\n\nlog = logging.getLogger(__name__)\n\n# REFACT: Rename: DelegationTraverser? Maybe thats al... | ```python
from datetime import datetime
import logging
from sqlalchemy import or_
from adhocracy import model
from adhocracy.model import Delegation
log = logging.getLogger(__name__)
# REFACT: Rename: DelegationTraverser? Maybe thats also a new object
# that does the traversing in different ways
# That may become a... |
[
{
"content": "Replicate the source code:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2016 Lenovo\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#... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2016 Lenovo\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 ... | ```python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2016 Lenovo
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
[
{
"content": "```python\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in ... | [
{
"content": "<|memory_start|>```python\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law ... | ```python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed ... |
[
{
"content": "```python\n#!/usr/bin/env python\n\n#******************************************************************************\n#\n# CS 6421 - Simple Conversion\n# Execution: python dollarsYen.py portnum\n# Author: Tim Stamler\n# Group: Malcolm Goldiner\n#\n#*******************************************... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/env python\n\n#******************************************************************************\n#\n# CS 6421 - Simple Conversion\n# Execution: python dollarsYen.py portnum\n# Author: Tim Stamler\n# Group: Malcolm Goldiner\n#\n#***************************... | ```python
#!/usr/bin/env python
#******************************************************************************
#
# CS 6421 - Simple Conversion
# Execution: python dollarsYen.py portnum
# Author: Tim Stamler
# Group: Malcolm Goldiner
#
#***************************************************************************... |
[
{
"content": "```python\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nfrom io import open\n\nwith open('README.md', encoding=\"utf-8\") as fp:\n long_description = fp.read()\n\nsetup(\n name='sendwithus',\n version='5.2.2',\n author='sendwithus',\n author_email='us@se... | [
{
"content": "<|memory_start|>```python\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nfrom io import open\n\nwith open('README.md', encoding=\"utf-8\") as fp:\n long_description = fp.read()\n\nsetup(\n name='sendwithus',\n version='5.2.2',\n author='sendwithus',\n aut... | ```python
from distutils.core import setup
from setuptools import find_packages
from io import open
with open('README.md', encoding="utf-8") as fp:
long_description = fp.read()
setup(
name='sendwithus',
version='5.2.2',
author='sendwithus',
author_email='us@sendwithus.com',
packages=find_pack... |
[
{
"content": "```python\nimport os,sys,json,random\nclass uploadTest:\n def __init__(self): \n self.source = sys.argv[1]\n self.f = open(\"operations.txt\",'w',1)\n self.counter = 0\n print('running')\n self.mapping = dict()\n ... | [
{
"content": "<|memory_start|>```python\nimport os,sys,json,random\nclass uploadTest:\n def __init__(self): \n self.source = sys.argv[1]\n self.f = open(\"operations.txt\",'w',1)\n self.counter = 0\n print('running')\n self.mappin... | ```python
import os,sys,json,random
class uploadTest:
def __init__(self):
self.source = sys.argv[1]
self.f = open("operations.txt",'w',1)
self.counter = 0
print('running')
self.mapping = dict()
def getParentID(self,filename... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <brett@belizebotanic.org>\n# Copyright (c) 2012-2015 Mario Frasca <mario@anche.no>\n# Copyright 2017 Jardín Botánico de Quito\n#\n# This file is part of ghini.desk... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <brett@belizebotanic.org>\n# Copyright (c) 2012-2015 Mario Frasca <mario@anche.no>\n# Copyright 2017 Jardín Botánico de Quito\n#\n# This file is pa... | ```python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <brett@belizebotanic.org>
# Copyright (c) 2012-2015 Mario Frasca <mario@anche.no>
# Copyright 2017 Jardín Botánico de Quito
#
# This file is part of ghini.desktop.
#
# ghini.desktop is free software: you can redistribute it and/or ... |
[
{
"content": "Here is some code:\n```python\n# Copyright (C) 2004-2008 Paul Cochrane\n# \n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at you... | [
{
"content": "Here is some code:\n<|memory_start|>```python\n# Copyright (C) 2004-2008 Paul Cochrane\n# \n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the Lic... | ```python
# Copyright (C) 2004-2008 Paul Cochrane
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is... |
[
{
"content": "Here is the snippet:\n```python\n# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Linux platform implementation.\"\"\"\n\nfrom __future__ import division\n\nimport base64\n... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Linux platform implementation.\"\"\"\n\nfrom __future__ import division\n\... | ```python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Linux platform implementation."""
from __future__ import division
import base64
import errno
import functools
import os
import re
import soc... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nfrom dataclasses import dataclass\nfrom threading import Event\n\nfrom pymuse.utils.stoppablequeue import StoppableQueue\n\n@dataclass\nclass SignalData():\n \"\"\"\n Dataclass for a signal data point. Event_marker attribute is optional\n... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nfrom dataclasses import dataclass\nfrom threading import Event\n\nfrom pymuse.utils.stoppablequeue import StoppableQueue\n\n@dataclass\nclass SignalData():\n \"\"\"\n Dataclass for a signal data point. Event_marker attribu... | ```python
from dataclasses import dataclass
from threading import Event
from pymuse.utils.stoppablequeue import StoppableQueue
@dataclass
class SignalData():
"""
Dataclass for a signal data point. Event_marker attribute is optional
"""
time: float
values: list
event_marker: list = None
class... |
[
{
"content": "```python\nimport os\nimport os.path as op\nimport sys\nimport warnings\n\nimport numpy as np\nfrom nose.tools import assert_true, assert_equal, assert_raises\nfrom numpy.testing import assert_allclose\n\nfrom mne import (read_dipole, read_forward_solution,\n convert_forward_soluti... | [
{
"content": "<|memory_start|>```python\nimport os\nimport os.path as op\nimport sys\nimport warnings\n\nimport numpy as np\nfrom nose.tools import assert_true, assert_equal, assert_raises\nfrom numpy.testing import assert_allclose\n\nfrom mne import (read_dipole, read_forward_solution,\n conver... | ```python
import os
import os.path as op
import sys
import warnings
import numpy as np
from nose.tools import assert_true, assert_equal, assert_raises
from numpy.testing import assert_allclose
from mne import (read_dipole, read_forward_solution,
convert_forward_solution, read_evokeds, read_cov,
... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n#!/usr/bin/env python3\n\"\"\"\nGO compiler wrapper (sets GOROOT automatically)\n\"\"\"\n\nimport glob\nimport os\nimport signal\nimport sys\n\nimport command_mod\nimport subtask_mod\n\n\nclass Main:\n \"\"\"\n Main class\n \"\"\"\n\n ... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n#!/usr/bin/env python3\n\"\"\"\nGO compiler wrapper (sets GOROOT automatically)\n\"\"\"\n\nimport glob\nimport os\nimport signal\nimport sys\n\nimport command_mod\nimport subtask_mod\n\n\nclass Main:\n \"\"\"\n Main class\... | ```python
#!/usr/bin/env python3
"""
GO compiler wrapper (sets GOROOT automatically)
"""
import glob
import os
import signal
import sys
import command_mod
import subtask_mod
class Main:
"""
Main class
"""
def __init__(self) -> None:
try:
self.config()
sys.exit(self.r... |
[
{
"content": "```python\n\"\"\"\nPerturbations\n-------------\nModule oriented to perform a perturbation of the system in order to carry out\nwith statistical testing of models.\nThe main function of this module is grouping functions which are able to\nchange the system to other statistically probable options i... | [
{
"content": "<|memory_start|>```python\n\"\"\"\nPerturbations\n-------------\nModule oriented to perform a perturbation of the system in order to carry out\nwith statistical testing of models.\nThe main function of this module is grouping functions which are able to\nchange the system to other statistically pr... | ```python
"""
Perturbations
-------------
Module oriented to perform a perturbation of the system in order to carry out
with statistical testing of models.
The main function of this module is grouping functions which are able to
change the system to other statistically probable options in order to explore
the sample sp... |
[
{
"content": "Reconstruct the code exactly:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.7 on 2017-05-14 05:22\nfrom __future__ import unicode_literals\n\nimport uuid\n\nimport django.core.validators\nimport django.db.models.deletion\nimport django.utils.timezone\nimport morango.utils.uuids\ni... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.7 on 2017-05-14 05:22\nfrom __future__ import unicode_literals\n\nimport uuid\n\nimport django.core.validators\nimport django.db.models.deletion\nimport django.utils.timezone\nimport morang... | ```python
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-05-14 05:22
from __future__ import unicode_literals
import uuid
import django.core.validators
import django.db.models.deletion
import django.utils.timezone
import morango.utils.uuids
import mptt.fields
from django.db import migrations
from django.d... |
[
{
"content": "```python\nfrom flask import current_app\nfrom flask import request\nfrom functools import wraps\nfrom werkzeug import LocalProxy\nfrom werkzeug.exceptions import Forbidden\n\n\nclass Allows(object):\n\n def __init__(self, app=None, identity_loader=None,\n throws=Forbidden, on_f... | [
{
"content": "<|memory_start|>```python\nfrom flask import current_app\nfrom flask import request\nfrom functools import wraps\nfrom werkzeug import LocalProxy\nfrom werkzeug.exceptions import Forbidden\n\n\nclass Allows(object):\n\n def __init__(self, app=None, identity_loader=None,\n throws... | ```python
from flask import current_app
from flask import request
from functools import wraps
from werkzeug import LocalProxy
from werkzeug.exceptions import Forbidden
class Allows(object):
def __init__(self, app=None, identity_loader=None,
throws=Forbidden, on_fail=None):
self._identity... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n celery.app.builtins\n ~~~~~~~~~~~~~~~~~~~\n\n Built-in tasks that are always available in all\n app instances. E.g. chord, group and xmap.\n\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"\n celery.app.builtins\n ~~~~~~~~~~~~~~~~~~~\n\n Built-in tasks that are always available in all\n app instances. E.g. chord, group and xmap.\n\n\"\"\"\nfrom __future__ import absolute_impor... | ```python
# -*- coding: utf-8 -*-
"""
celery.app.builtins
~~~~~~~~~~~~~~~~~~~
Built-in tasks that are always available in all
app instances. E.g. chord, group and xmap.
"""
from __future__ import absolute_import
from __future__ import with_statement
from collections import deque
from itertools import... |
[
{
"content": "Replicate the source code:\n```python\nimport urllib, json\nimport datetime as dt\nimport logging\nlog = logging.getLogger(__name__)\n\n################################################################################\n## REQUIRED parameters:\n#######################################################... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\nimport urllib, json\nimport datetime as dt\nimport logging\nlog = logging.getLogger(__name__)\n\n################################################################################\n## REQUIRED parameters:\n#######################################... | ```python
import urllib, json
import datetime as dt
import logging
log = logging.getLogger(__name__)
################################################################################
## REQUIRED parameters:
################################################################################
## data_url - e.g. "http://api.... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n#!/usr/bin/env python3\n\n#\n# Copyright (c) 2015-2017 Nest Labs, Inc.\n# 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 Licens... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n#!/usr/bin/env python3\n\n#\n# Copyright (c) 2015-2017 Nest Labs, Inc.\n# 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... | ```python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2017 Nest Labs, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... |
[
{
"content": "Return the code unaltered:\n```python\n\"\"\"remove history constraints\n\nRevision ID: 03bdb0a44083\nRevises: 534d805d5dcf\nCreate Date: 2019-03-21 15:32:02.572675\n\n\"\"\"\nfrom alembic import op\n\nfrom rdr_service.dao.alembic_utils import ReplaceableObject\n\n# revision identifiers, used by A... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\n\"\"\"remove history constraints\n\nRevision ID: 03bdb0a44083\nRevises: 534d805d5dcf\nCreate Date: 2019-03-21 15:32:02.572675\n\n\"\"\"\nfrom alembic import op\n\nfrom rdr_service.dao.alembic_utils import ReplaceableObject\n\n# revision identi... | ```python
"""remove history constraints
Revision ID: 03bdb0a44083
Revises: 534d805d5dcf
Create Date: 2019-03-21 15:32:02.572675
"""
from alembic import op
from rdr_service.dao.alembic_utils import ReplaceableObject
# revision identifiers, used by Alembic.
revision = "03bdb0a44083"
down_revision = "534d805d5dcf"
bra... |
[
{
"content": "```python\n\"\"\"\nCopyright (c) 2013, Regents of the University of California\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain ... | [
{
"content": "<|memory_start|>```python\n\"\"\"\nCopyright (c) 2013, Regents of the University of California\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source c... | ```python
"""
Copyright (c) 2013, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
t... |
[
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\n# Copyright (c) 2014-present PlatformIO <contact@platformio.org>\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 ob... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\n# Copyright (c) 2014-present PlatformIO <contact@platformio.org>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Licens... | ```python
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
[
{
"content": "Return the code unaltered:\n```python\nimport tensorflow as tf\n\n\nclass TextCNN(object):\n \"\"\"\n A CNN for text classification.\n Uses an embedding layer, followed by a convolutional, kmax-pooling, convolutional, maxpooling and softmax layer.\n \"\"\"\n\n def __init__(\n ... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\nimport tensorflow as tf\n\n\nclass TextCNN(object):\n \"\"\"\n A CNN for text classification.\n Uses an embedding layer, followed by a convolutional, kmax-pooling, convolutional, maxpooling and softmax layer.\n \"\"\"\n\n def __... | ```python
import tensorflow as tf
class TextCNN(object):
"""
A CNN for text classification.
Uses an embedding layer, followed by a convolutional, kmax-pooling, convolutional, maxpooling and softmax layer.
"""
def __init__(
self, sequence_length, num_classes, vocab_size,
em... |
[
{
"content": "```python\nfrom Square import Square\nimport random\n\nclass Game(object):\n \"\"\"docstring for Game\"\"\"\n def __init__(self, x_dim, y_dim, num_mines):\n super(Game, self).__init__()\n self.x = x_dim\n self.y = y_dim\n self.mines = num_mines\n # TODO: Validation\n ... | [
{
"content": "<|memory_start|>```python\nfrom Square import Square\nimport random\n\nclass Game(object):\n \"\"\"docstring for Game\"\"\"\n def __init__(self, x_dim, y_dim, num_mines):\n super(Game, self).__init__()\n self.x = x_dim\n self.y = y_dim\n self.mines = num_mines\n # TODO... | ```python
from Square import Square
import random
class Game(object):
"""docstring for Game"""
def __init__(self, x_dim, y_dim, num_mines):
super(Game, self).__init__()
self.x = x_dim
self.y = y_dim
self.mines = num_mines
# TODO: Validation
self.populate()
def popul... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n version='4.2.0',\n name='vcdriver',\n description='A vcenter driver based on pyvmomi, fabric and pywinrm',\n url='https://github.com/Lantero/vcdriver',\n author='Carlos Ru... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n version='4.2.0',\n name='vcdriver',\n description='A vcenter driver based on pyvmomi, fabric and pywinrm',\n url='https://github.com/Lantero/vcdriver',\n a... | ```python
from setuptools import setup, find_packages
setup(
version='4.2.0',
name='vcdriver',
description='A vcenter driver based on pyvmomi, fabric and pywinrm',
url='https://github.com/Lantero/vcdriver',
author='Carlos Ruiz Lantero',
author_email='carlos.ruiz.lantero@gmail.com',
license... |
[
{
"content": "Repeat the code precisely:\n```python\n# Copyright 2016 Google 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.apache.org/licenses/LICENS... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n# Copyright 2016 Google 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.apache.org... | ```python
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
[
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\n# encoding: utf-8\n\"\"\"\nRun Fiji is just ImageJ macros headless with python.\n\"\"\"\nimport pydebug, subprocess, os, re\nfrom tempfile import mkstemp\nimport fijibin\n\n# debug with DEBUG=fijibin python script.py\n... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\n# encoding: utf-8\n\"\"\"\nRun Fiji is just ImageJ macros headless with python.\n\"\"\"\nimport pydebug, subprocess, os, re\nfrom tempfile import mkstemp\nimport fijibin\n\n# debug with DEBUG=fijibin py... | ```python
# encoding: utf-8
"""
Run Fiji is just ImageJ macros headless with python.
"""
import pydebug, subprocess, os, re
from tempfile import mkstemp
import fijibin
# debug with DEBUG=fijibin python script.py
debug = pydebug.debug('fijibin')
##
# Running macros
##
def run(macro, output_files=[], force_close=True)... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nfrom rest_framework.relations import HyperlinkedRelatedField\n\nfrom drf_queryfields import QueryFieldsMixin\n\nfrom api.models import *\nfrom rest_framework import serializers\n\nfrom api.utils.custom_serializers import TimeStampField\n\n\ncla... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nfrom rest_framework.relations import HyperlinkedRelatedField\n\nfrom drf_queryfields import QueryFieldsMixin\n\nfrom api.models import *\nfrom rest_framework import serializers\n\nfrom api.utils.custom_serializers import TimeSta... | ```python
from rest_framework.relations import HyperlinkedRelatedField
from drf_queryfields import QueryFieldsMixin
from api.models import *
from rest_framework import serializers
from api.utils.custom_serializers import TimeStampField
class AgencySerializer(QueryFieldsMixin, serializers.HyperlinkedModelSerializer... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\nimport requests\nfrom ml import svm\nimport json\nimport NLProcessor as nlp\nimport lxml.html\nfrom requests import get\nfrom goose import Goose\n\ndef getSuggestions(query):\n url = 'https://api.cognitive.microsoft.com/bing/v5.0/su... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\nimport requests\nfrom ml import svm\nimport json\nimport NLProcessor as nlp\nimport lxml.html\nfrom requests import get\nfrom goose import Goose\n\ndef getSuggestions(query):\n url = 'https://api.cognitive.microsoft.... | ```python
import requests
from ml import svm
import json
import NLProcessor as nlp
import lxml.html
from requests import get
from goose import Goose
def getSuggestions(query):
url = 'https://api.cognitive.microsoft.com/bing/v5.0/suggestions/?q=' + query
headers = {'Ocp-Apim-Subscription-Key':'854e8088bb8347418... |
[
{
"content": "Reconstruct the code exactly:\n```python\n#! /usr/bin/env python3\n# \n# Copy from old style database to new style\n#\nimport mysql.connector\nfrom mysql.connector.errors import Error\nimport MyLogger\nimport MyDB\nimport argparse\n\ndef loadDatatypes(tgt) -> dict:\n a = {}\n tgt.execute('SE... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\n#! /usr/bin/env python3\n# \n# Copy from old style database to new style\n#\nimport mysql.connector\nfrom mysql.connector.errors import Error\nimport MyLogger\nimport MyDB\nimport argparse\n\ndef loadDatatypes(tgt) -> dict:\n a = {}\n ... | ```python
#! /usr/bin/env python3
#
# Copy from old style database to new style
#
import mysql.connector
from mysql.connector.errors import Error
import MyLogger
import MyDB
import argparse
def loadDatatypes(tgt) -> dict:
a = {}
tgt.execute('SELECT name,id FROM datatype;')
for row in tgt: a[row[0]] = row[... |
[
{
"content": "```python\nfrom __future__ import division, print_function, absolute_import\n\nimport tflearn\n\n# Residual blocks\n# 32 layers: n=5, 56 layers: n=9, 110 layers: n=18\nn = 5\n\n# Data loading\nfrom tflearn.datasets import cifar10\n(X, Y), (testX, testY) = cifar10.load_data()\nY = tflearn.data_util... | [
{
"content": "<|memory_start|>```python\nfrom __future__ import division, print_function, absolute_import\n\nimport tflearn\n\n# Residual blocks\n# 32 layers: n=5, 56 layers: n=9, 110 layers: n=18\nn = 5\n\n# Data loading\nfrom tflearn.datasets import cifar10\n(X, Y), (testX, testY) = cifar10.load_data()\nY = t... | ```python
from __future__ import division, print_function, absolute_import
import tflearn
# Residual blocks
# 32 layers: n=5, 56 layers: n=9, 110 layers: n=18
n = 5
# Data loading
from tflearn.datasets import cifar10
(X, Y), (testX, testY) = cifar10.load_data()
Y = tflearn.data_utils.to_categorical(Y, 10)
testY = tf... |
[
{
"content": "Here is a code file:\n```python\n\"\"\"\nMonitoring (and logging) for ETL steps.\n\nThis module provides a context for the ETL that allows to monitor\nthe start time of an ETL step along with its successful or\nunsuccessful completion. Events for start, finish or failure\nmay be emitted to a pers... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n\"\"\"\nMonitoring (and logging) for ETL steps.\n\nThis module provides a context for the ETL that allows to monitor\nthe start time of an ETL step along with its successful or\nunsuccessful completion. Events for start, finish or failure\nmay be e... | ```python
"""
Monitoring (and logging) for ETL steps.
This module provides a context for the ETL that allows to monitor
the start time of an ETL step along with its successful or
unsuccessful completion. Events for start, finish or failure
may be emitted to a persistence layer.
"""
import http.server
import itertool... |
[
{
"content": "Produce an exact reconstruction of the code:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom djblets.webapi.errors import DOES_NOT_EXIST\n\nfrom reviewboard.webapi.resources import resources\nfrom reviewboard.webapi.resources.base_... | [
{
"content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom djblets.webapi.errors import DOES_NOT_EXIST\n\nfrom reviewboard.webapi.resources import resources\nfrom reviewboard.webapi... | ```python
from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from djblets.webapi.errors import DOES_NOT_EXIST
from reviewboard.webapi.resources import resources
from reviewboard.webapi.resources.base_original_file import \
BaseOriginalFileResource
class OriginalFileRes... |
[
{
"content": "Replicate the source code:\n```python\n#!/bin/python\nfrom __future__ import print_function\nfrom binascii import hexlify\nimport hashlib\nimport base64\nfrom getpass import getpass\nimport sys\nimport argparse\ncharset = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\"\ncham... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n#!/bin/python\nfrom __future__ import print_function\nfrom binascii import hexlify\nimport hashlib\nimport base64\nfrom getpass import getpass\nimport sys\nimport argparse\ncharset = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234... | ```python
#!/bin/python
from __future__ import print_function
from binascii import hexlify
import hashlib
import base64
from getpass import getpass
import sys
import argparse
charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
chameleon_charset = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuv... |
[
{
"content": "Here is a code file:\n```python\nfrom PyQt4 import QtGui, QtCore\n\n\nclass MainWindow(QtGui.QDialog):\n def __init__(self):\n QtGui.QDialog.__init__(self)\n\n self.setWindowTitle(\"PacaBackUp\")\n\n # Vertical layout\n self.layout = QtGui.QVBoxLayout(self)\n\n ... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nfrom PyQt4 import QtGui, QtCore\n\n\nclass MainWindow(QtGui.QDialog):\n def __init__(self):\n QtGui.QDialog.__init__(self)\n\n self.setWindowTitle(\"PacaBackUp\")\n\n # Vertical layout\n self.layout = QtGui.QVBoxLayout... | ```python
from PyQt4 import QtGui, QtCore
class MainWindow(QtGui.QDialog):
def __init__(self):
QtGui.QDialog.__init__(self)
self.setWindowTitle("PacaBackUp")
# Vertical layout
self.layout = QtGui.QVBoxLayout(self)
# Create widgets
self.main_menu_bar = QtGui.QMenu... |
[
{
"content": "Repeat the code precisely:\n```python\n#!/usr/bin/python\n'''\nCreates text file of Cocoa superclasses in given filename or in\n./cocoa_indexes/classes.txt by default.\n'''\nimport os, re\nfrom cocoa_definitions import write_file, find\nfrom commands import getoutput\n\ndef find_headers(frameworks... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n#!/usr/bin/python\n'''\nCreates text file of Cocoa superclasses in given filename or in\n./cocoa_indexes/classes.txt by default.\n'''\nimport os, re\nfrom cocoa_definitions import write_file, find\nfrom commands import getoutput\n\ndef find_he... | ```python
#!/usr/bin/python
'''
Creates text file of Cocoa superclasses in given filename or in
./cocoa_indexes/classes.txt by default.
'''
import os, re
from cocoa_definitions import write_file, find
from commands import getoutput
def find_headers(frameworks):
'''Returns a dictionary of the headers for each given... |
[
{
"content": "Here is the source code:\n```python\nimport codecs\nimport htmlentitydefs\nimport json\nimport logging\nimport nltk # Uses NLTK Version 2.0b9\nimport os\nimport re\nimport unicodedata\n\nclass positive_match:\n def __init__(self, match, offset):\n self.match = match\n self.offset ... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\nimport codecs\nimport htmlentitydefs\nimport json\nimport logging\nimport nltk # Uses NLTK Version 2.0b9\nimport os\nimport re\nimport unicodedata\n\nclass positive_match:\n def __init__(self, match, offset):\n self.match = match\n ... | ```python
import codecs
import htmlentitydefs
import json
import logging
import nltk # Uses NLTK Version 2.0b9
import os
import re
import unicodedata
class positive_match:
def __init__(self, match, offset):
self.match = match
self.offset = offset
def getMatch(self):
return self.match
... |
[
{
"content": "Here is the code content:\n```python\nimport asyncio\n\nimport pytest\nimport pytest_asyncio.plugin # noqa F401\n\nfrom pypeman import nodes, msgstore, channels\nfrom pypeman.channels import BaseChannel\nfrom pypeman.remoteadmin import RemoteAdminClient, RemoteAdminServer\nfrom pypeman.test impor... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\nimport asyncio\n\nimport pytest\nimport pytest_asyncio.plugin # noqa F401\n\nfrom pypeman import nodes, msgstore, channels\nfrom pypeman.channels import BaseChannel\nfrom pypeman.remoteadmin import RemoteAdminClient, RemoteAdminServer\nfrom py... | ```python
import asyncio
import pytest
import pytest_asyncio.plugin # noqa F401
from pypeman import nodes, msgstore, channels
from pypeman.channels import BaseChannel
from pypeman.remoteadmin import RemoteAdminClient, RemoteAdminServer
from pypeman.test import TearDownProjectTestCase as TestCase
from pypeman.tests.c... |
[
{
"content": "Repeat the code precisely:\n```python\nfrom unittest import TestCase\n\nfrom lie2me import Form, fields\nfrom lie2me.exceptions import BadValidation\n\n\nclass FormTestCase(TestCase):\n\n def test_form_without_fields_is_always_valid(self):\n form = Form({'foo': 'bar'})\n form.subm... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\nfrom unittest import TestCase\n\nfrom lie2me import Form, fields\nfrom lie2me.exceptions import BadValidation\n\n\nclass FormTestCase(TestCase):\n\n def test_form_without_fields_is_always_valid(self):\n form = Form({'foo': 'bar'})\n ... | ```python
from unittest import TestCase
from lie2me import Form, fields
from lie2me.exceptions import BadValidation
class FormTestCase(TestCase):
def test_form_without_fields_is_always_valid(self):
form = Form({'foo': 'bar'})
form.submit()
self.assertEqual(form.errors, {})
def test_... |
[
{
"content": "Write the code verbatim:\n```python\nfrom ..model_tools import string_to_list, get_property\nfrom .channel_filters import filter_options, in_compare, term_match_check\n\n\ntry:\n from urllib.parse import quote_plus, unquote_plus\nexcept ImportError:\n from urllib import quote_plus, unquote_p... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\nfrom ..model_tools import string_to_list, get_property\nfrom .channel_filters import filter_options, in_compare, term_match_check\n\n\ntry:\n from urllib.parse import quote_plus, unquote_plus\nexcept ImportError:\n from urllib import quote... | ```python
from ..model_tools import string_to_list, get_property
from .channel_filters import filter_options, in_compare, term_match_check
try:
from urllib.parse import quote_plus, unquote_plus
except ImportError:
from urllib import quote_plus, unquote_plus
def make_safe(val):
"""
Make strings in fi... |
[
{
"content": "Here is a code snippet:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;\n\ncrashdump_use_jinja2 = False\n\ndef _(msg):\n return msg\n\ndef tag_a(name, title=None, href=None, alt=None):\n from xml.etree.Elem... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;\n\ncrashdump_use_jinja2 = False\n\ndef _(msg):\n return msg\n\ndef tag_a(name, title=None, href=None, alt=None):\n fro... | ```python
#!/usr/bin/python
# -*- coding: utf-8 -*-
# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;
crashdump_use_jinja2 = False
def _(msg):
return msg
def tag_a(name, title=None, href=None, alt=None):
from xml.etree.ElementTree import Element, tostring
a = Element('a')
... |
[
{
"content": "Write the code verbatim:\n```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='', top_path=None):\n import os.path as op\n from numpy.distutils.misc_util import Configuration\n\n from sfepy import Config\n\n site_config = Config()\n os_flag = {'posix' : 0, 'windows'... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='', top_path=None):\n import os.path as op\n from numpy.distutils.misc_util import Configuration\n\n from sfepy import Config\n\n site_config = Config()\n os_flag = {'posix... | ```python
#!/usr/bin/env python
def configuration(parent_package='', top_path=None):
import os.path as op
from numpy.distutils.misc_util import Configuration
from sfepy import Config
site_config = Config()
os_flag = {'posix' : 0, 'windows' : 1}
auto_dir = op.dirname(__file__)
auto_name =... |
[
{
"content": "Repeat the full code snippet:\n```python\n# -*- coding: utf-8 -*-\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; val... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values hav... | ```python
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
impo... |
[
{
"content": "Repeat the code exactly:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import (absolute_import, division,\n print_function, unicode_literals)\nfrom builtins import *\n\nfrom collections import OrderedDict, defaultdict, ChainMap\nfrom intervalt... | [
{
"content": "Repeat the code exactly:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import (absolute_import, division,\n print_function, unicode_literals)\nfrom builtins import *\n\nfrom collections import OrderedDict, defaultdict, ChainMap... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from collections import OrderedDict, defaultdict, ChainMap
from intervaltree import Interval, IntervalTree
import numpy as np
fro... |
[
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\n# importing libraries:\nimport maya.cmds as cmds\n\nfrom Library import dpUtils as utils\nimport dpBaseClass as Base\nimport dpLayoutClass as Layout\n\n\n# global variables to this module: \nCLASS_NAME = \"FkLine\"\... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\n# importing libraries:\nimport maya.cmds as cmds\n\nfrom Library import dpUtils as utils\nimport dpBaseClass as Base\nimport dpLayoutClass as Layout\n\n\n# global variables to this module: \nCLASS_NA... | ```python
# importing libraries:
import maya.cmds as cmds
from Library import dpUtils as utils
import dpBaseClass as Base
import dpLayoutClass as Layout
# global variables to this module:
CLASS_NAME = "FkLine"
TITLE = "m001_fkLine"
DESCRIPTION = "m002_fkLineDesc"
ICON = "/Icons/dp_fkLine.png"
class FkLine(Base... |
[
{
"content": "Recreate the original code text:\n```python\n\"\"\"run nose tests on <package-name> with coverage\"\"\"\n\n\nfrom __future__ import print_function, division\nimport os\nimport nose\nimport importlib\n\n\ndef main():\n \"\"\"run nose tests with coverage on \"<package-name>\" where <package-name ... | [
{
"content": "Recreate the original code text:\n<|memory_start|>```python\n\"\"\"run nose tests on <package-name> with coverage\"\"\"\n\n\nfrom __future__ import print_function, division\nimport os\nimport nose\nimport importlib\n\n\ndef main():\n \"\"\"run nose tests with coverage on \"<package-name>\" wher... | ```python
"""run nose tests on <package-name> with coverage"""
from __future__ import print_function, division
import os
import nose
import importlib
def main():
"""run nose tests with coverage on "<package-name>" where <package-name is ".." dir"""
path = os.path.abspath(os.path.join('..'))
package_na... |
[
{
"content": "Repeat the code exactly as the original, including blank lines:\n```python\nimport math\nimport statistics\nfrom itertools import groupby\nfrom random import randint\nfrom typing import Dict, Tuple, Counter\n\nimport pandas as pd\n\nfrom Src.BioAnalyzer.Analysis.GenePrioritization.Steps.DataIntegr... | [
{
"content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\nimport math\nimport statistics\nfrom itertools import groupby\nfrom random import randint\nfrom typing import Dict, Tuple, Counter\n\nimport pandas as pd\n\nfrom Src.BioAnalyzer.Analysis.GenePrioritization.... | ```python
import math
import statistics
from itertools import groupby
from random import randint
from typing import Dict, Tuple, Counter
import pandas as pd
from Src.BioAnalyzer.Analysis.GenePrioritization.Steps.DataIntegration.IntermediateRepresentation.Generators import \
IntermediateRepresentationGeneratorBase... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2016 Red Hat, Inc.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License a... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2016 Red Hat, Inc.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General ... | ```python
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... |
[
{
"content": "Repeat the code exactly:\n```python\nimport numpy\n\n### sample standard deviation\nclass stdevs:\n def __init__(self):\n self.list = []\n self.x = 0\n def step(self, value):\n if value != None:\n self.list.append(value)\n def finalize(self):\n #prin... | [
{
"content": "Repeat the code exactly:\n<|memory_start|>```python\nimport numpy\n\n### sample standard deviation\nclass stdevs:\n def __init__(self):\n self.list = []\n self.x = 0\n def step(self, value):\n if value != None:\n self.list.append(value)\n def finalize(self)... | ```python
import numpy
### sample standard deviation
class stdevs:
def __init__(self):
self.list = []
self.x = 0
def step(self, value):
if value != None:
self.list.append(value)
def finalize(self):
#print(self.list)
if len(self.list) > 1:
self... |
[
{
"content": "Write the code verbatim:\n```python\nimport func\nfrom var import var\nimport sys\nimport pf\n\n\nclass NodeBranchPart(object):\n\n def __init__(self):\n self.rMatrixNum = -1\n self.gdasrvNum = -1\n #self.bigP = None\n\n\nclass NodeBranch(object):\n\n def __init__(self):... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\nimport func\nfrom var import var\nimport sys\nimport pf\n\n\nclass NodeBranchPart(object):\n\n def __init__(self):\n self.rMatrixNum = -1\n self.gdasrvNum = -1\n #self.bigP = None\n\n\nclass NodeBranch(object):\n\n def... | ```python
import func
from var import var
import sys
import pf
class NodeBranchPart(object):
def __init__(self):
self.rMatrixNum = -1
self.gdasrvNum = -1
#self.bigP = None
class NodeBranch(object):
def __init__(self):
self.len = 0.1
# self.textDrawSymbol = '-' # Se... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n\"\"\"\nSAX driver for the Pyexpat C module. This driver works with\npyexpat.__version__ == '2.22'.\n\"\"\"\n\nversion = \"0.20\"\n\nfrom xml.sax._exceptions import *\n\n# xml.parsers.expat does not raise ImportError in Jython\nimport sys\nif ... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n\"\"\"\nSAX driver for the Pyexpat C module. This driver works with\npyexpat.__version__ == '2.22'.\n\"\"\"\n\nversion = \"0.20\"\n\nfrom xml.sax._exceptions import *\n\n# xml.parsers.expat does not raise ImportError in Jython\... | ```python
"""
SAX driver for the Pyexpat C module. This driver works with
pyexpat.__version__ == '2.22'.
"""
version = "0.20"
from xml.sax._exceptions import *
# xml.parsers.expat does not raise ImportError in Jython
import sys
if sys.platform[:4] == "java":
raise SAXReaderNotAvailable("expat not available in J... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n\"\"\"Class for the quaternions with inversion.\"\"\"\n\nimport numpy as np\n\nimport utils\n\n# quaternion parameters for the group O from Table 71.1 in:\n# Simon L. Altmann, Peter Herzig, \"Point-Group Theory Tables\", \n# Second Edition (cor... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n\"\"\"Class for the quaternions with inversion.\"\"\"\n\nimport numpy as np\n\nimport utils\n\n# quaternion parameters for the group O from Table 71.1 in:\n# Simon L. Altmann, Peter Herzig, \"Point-Group Theory Tables\", \n# Sec... | ```python
"""Class for the quaternions with inversion."""
import numpy as np
import utils
# quaternion parameters for the group O from Table 71.1 in:
# Simon L. Altmann, Peter Herzig, "Point-Group Theory Tables",
# Second Edition (corrected), Wien (2011)
V12 = np.sqrt(0.5) # sqrt(1/2)
# [[ lambda, Lambda_1, Lambd... |
[
{
"content": "Here is the source code:\n```python\nimport unittest\n\nimport django\nfrom django.db import IntegrityError\nfrom django.conf import settings\n\nfrom django_migration_testcase import MigrationTest\nfrom django_migration_testcase.base import InvalidModelStateError, idempotent_transaction\n\n\nclass... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\nimport unittest\n\nimport django\nfrom django.db import IntegrityError\nfrom django.conf import settings\n\nfrom django_migration_testcase import MigrationTest\nfrom django_migration_testcase.base import InvalidModelStateError, idempotent_transa... | ```python
import unittest
import django
from django.db import IntegrityError
from django.conf import settings
from django_migration_testcase import MigrationTest
from django_migration_testcase.base import InvalidModelStateError, idempotent_transaction
class ExampleMigrationTest(MigrationTest):
before = '0001_in... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nOnionShare | https://onionshare.org/\n\nCopyright (C) 2014-2021 Micah Lee, et al. <micah@micahflee.com>\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Gene... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"\nOnionShare | https://onionshare.org/\n\nCopyright (C) 2014-2021 Micah Lee, et al. <micah@micahflee.com>\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms... | ```python
# -*- coding: utf-8 -*-
"""
OnionShare | https://onionshare.org/
Copyright (C) 2014-2021 Micah Lee, et al. <micah@micahflee.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either vers... |
[
{
"content": "Here is the code content:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom models import _User, CSVUsuario\nfrom forms import _UserChangeForm,_UserCreationForm\n\n... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom models import _User, CSVUsuario\nfrom forms import _UserChangeForm,_User... | ```python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext_lazy as _
from models import _User, CSVUsuario
from forms import _UserChangeForm,_UserCreationForm
def deactivate(modeladmin, request, queryset):
queryse... |
[
{
"content": "Repeat the following code:\n```python\n# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Saas Manager\n# Copyright (C) 2014 Sistemas ADHOC\n# No email\n#\n# This program is free software: you can redistribute it and/or modify\... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Saas Manager\n# Copyright (C) 2014 Sistemas ADHOC\n# No email\n#\n# This program is free software: you can redistribute i... | ```python
# -*- coding: utf-8 -*-
##############################################################################
#
# Saas Manager
# Copyright (C) 2014 Sistemas ADHOC
# No email
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... |
[
{
"content": "Here is the script:\n```python\n'''\n\nPython implementation of HTML wordcloud of words collected from\na website, Paragraph Input or File Upload. Flask Web App implementation\nof the same.\n\nAuthor: Shivam Bansal\nEmail: shivam5992@gmail.com\nWebsite: www.shivambansal.com \nVersion: 0.1\n\n'''\n... | [
{
"content": "Here is the script:\n<|memory_start|>```python\n'''\n\nPython implementation of HTML wordcloud of words collected from\na website, Paragraph Input or File Upload. Flask Web App implementation\nof the same.\n\nAuthor: Shivam Bansal\nEmail: shivam5992@gmail.com\nWebsite: www.shivambansal.com \nVersi... | ```python
'''
Python implementation of HTML wordcloud of words collected from
a website, Paragraph Input or File Upload. Flask Web App implementation
of the same.
Author: Shivam Bansal
Email: shivam5992@gmail.com
Website: www.shivambansal.com
Version: 0.1
'''
from flask import Flask, render_template, request, flas... |
[
{
"content": "Repeat the full code snippet:\n```python\nimport os\nimport sys\nfrom multiprocessing.connection import Client\nimport bcrypt\n\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom terms.server.scripts.webserver import... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\nimport os\nimport sys\nfrom multiprocessing.connection import Client\nimport bcrypt\n\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom terms.server.scripts.... | ```python
import os
import sys
from multiprocessing.connection import Client
import bcrypt
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm.exc import NoResultFound
from terms.server.scripts.webserver import get_config
from terms.server.schemata import Schema
from terms... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2008-2012 the MansOS team. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditi... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2008-2012 the MansOS team. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the f... | ```python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2008-2012 the MansOS team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright not... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.