prompt listlengths 1 1 | compression_prompt listlengths 1 1 | target stringlengths 1.03k 828k |
|---|---|---|
[
{
"content": "Here is a code snippet:\n```python\n# coding=utf-8\n# Copyright 2021 The Google Research Authors.\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://... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\n# coding=utf-8\n# Copyright 2021 The Google Research Authors.\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... | ```python
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 b... |
[
{
"content": "Write the code verbatim:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.utils.timezone\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n migrations.... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.utils.timezone\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ... | ```python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
o... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\nfrom test.support import run_unittest, open_urlresource\nimport unittest\n\nimport sys\nimport os\nfrom unicodedata import normalize, unidata_version\n\nTESTDATAFILE = \"NormalizationTest.txt\"\nTESTDATAURL = \"http://www.unicode.org/Public/\" + uni... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\nfrom test.support import run_unittest, open_urlresource\nimport unittest\n\nimport sys\nimport os\nfrom unicodedata import normalize, unidata_version\n\nTESTDATAFILE = \"NormalizationTest.txt\"\nTESTDATAURL = \"http://www.unicode.org... | ```python
from test.support import run_unittest, open_urlresource
import unittest
import sys
import os
from unicodedata import normalize, unidata_version
TESTDATAFILE = "NormalizationTest.txt"
TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE
if os.path.exists(TESTDATAFILE):
... |
[
{
"content": "Repeat the full code snippet:\n```python\n\"\"\"empty message\n\nRevision ID: 42caf438dcdf\nRevises: None\nCreate Date: 2015-05-15 13:14:21.980616\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '42caf438dcdf'\ndown_revision = None\n\nfrom alembic import op\nimport sqlalchemy as ... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\n\"\"\"empty message\n\nRevision ID: 42caf438dcdf\nRevises: None\nCreate Date: 2015-05-15 13:14:21.980616\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '42caf438dcdf'\ndown_revision = None\n\nfrom alembic import op\nimpor... | ```python
"""empty message
Revision ID: 42caf438dcdf
Revises: None
Create Date: 2015-05-15 13:14:21.980616
"""
# revision identifiers, used by Alembic.
revision = '42caf438dcdf'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please a... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom matplotlib import cm\nfrom matplotlib.ticker import MaxNLocator\nfrom mpl_toolkits.mplot3d import Axes3D\n\nclass DLPlotter:\n '''\n This class is responsible ... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom matplotlib import cm\nfrom matplotlib.ticker import MaxNLocator\nfrom mpl_toolkits.mplot3d import Axes3D\n\nclass DLPlotter:\n '''\n This class... | ```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib import cm
from matplotlib.ticker import MaxNLocator
from mpl_toolkits.mplot3d import Axes3D
class DLPlotter:
'''
This class is responsible for plotting decision landscapes. Matplotlib is used as a background.
... |
[
{
"content": "```python\n# Based on: https://github.com/caglar/autoencoders.git\n# http://www-etud.iro.umontreal.ca/~gulcehrc/\nimport theano\nimport theano.tensor as T\nfrom theano.tensor.shared_randomstreams import RandomStreams\n\nfrom layer import AEHiddenLayer, AEOutputLayer\n# from tools import NonLineari... | [
{
"content": "<|memory_start|>```python\n# Based on: https://github.com/caglar/autoencoders.git\n# http://www-etud.iro.umontreal.ca/~gulcehrc/\nimport theano\nimport theano.tensor as T\nfrom theano.tensor.shared_randomstreams import RandomStreams\n\nfrom layer import AEHiddenLayer, AEOutputLayer\n# from tools i... | ```python
# Based on: https://github.com/caglar/autoencoders.git
# http://www-etud.iro.umontreal.ca/~gulcehrc/
import theano
import theano.tensor as T
from theano.tensor.shared_randomstreams import RandomStreams
from layer import AEHiddenLayer, AEOutputLayer
# from tools import NonLinearity, CostType, relu
from sop_em... |
[
{
"content": "Write the code verbatim:\n```python\nimport unittest\nfrom functools import partial\n\nfrom numpy.testing import assert_array_equal\nfrom hypothesis import given\nfrom hypothesis.strategies import sampled_from\nfrom tvtk.api import tvtk\n\nfrom simphony.core.cuba import CUBA\nfrom simphony.testing... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\nimport unittest\nfrom functools import partial\n\nfrom numpy.testing import assert_array_equal\nfrom hypothesis import given\nfrom hypothesis.strategies import sampled_from\nfrom tvtk.api import tvtk\n\nfrom simphony.core.cuba import CUBA\nfrom ... | ```python
import unittest
from functools import partial
from numpy.testing import assert_array_equal
from hypothesis import given
from hypothesis.strategies import sampled_from
from tvtk.api import tvtk
from simphony.core.cuba import CUBA
from simphony.testing.abc_check_lattice import (
CheckLatticeNodeOperations... |
[
{
"content": "Repeat the code precisely:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author:\n# Mateusz Kruszyński <mateusz.kruszynski@gmail.com>\n#\nfrom obci.gui.ugm import ugm_config_manager as m\nMAZE = {'id':'1986', \n 'stimulus_type':'maze',\n 'width_type':'relative', \... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author:\n# Mateusz Kruszyński <mateusz.kruszynski@gmail.com>\n#\nfrom obci.gui.ugm import ugm_config_manager as m\nMAZE = {'id':'1986', \n 'stimulus_type':'maze',\n 'width_typ... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author:
# Mateusz Kruszyński <mateusz.kruszynski@gmail.com>
#
from obci.gui.ugm import ugm_config_manager as m
MAZE = {'id':'1986',
'stimulus_type':'maze',
'width_type':'relative',
'width':1.0,
'height_type':'relative',
... |
[
{
"content": "Here is the code content:\n```python\nimport re\nimport uuid\n\nimport requests\n\nfrom cloudbot import hook\n\nHIST_API = \"http://api.fishbans.com/history/{}\"\nUUID_API = \"http://api.goender.net/api/uuids/{}/\"\n\n\ndef get_name(uuid):\n # submit the profile request\n request = requests.... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\nimport re\nimport uuid\n\nimport requests\n\nfrom cloudbot import hook\n\nHIST_API = \"http://api.fishbans.com/history/{}\"\nUUID_API = \"http://api.goender.net/api/uuids/{}/\"\n\n\ndef get_name(uuid):\n # submit the profile request\n req... | ```python
import re
import uuid
import requests
from cloudbot import hook
HIST_API = "http://api.fishbans.com/history/{}"
UUID_API = "http://api.goender.net/api/uuids/{}/"
def get_name(uuid):
# submit the profile request
request = requests.get(UUID_API.format(uuid))
request.raise_for_status()
data ... |
[
{
"content": "Here is a code file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2017, Cabral, Juan; Sanchez, Bruno & Berois, Martín\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that t... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2017, Cabral, Juan; Sanchez, Bruno & Berois, Martín\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Cabral, Juan; Sanchez, Bruno & Berois, Martín
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistribution... |
[
{
"content": "```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nfrom glob import glob\nfrom subprocess import check_output, CalledProcessError\n\n\ndef get_usb_devices():\n \"\"\"\n Lista dispositivos USB conectados\n\n :return:\n \"\"\"\n sdb_devices = map(os.path.realpath, g... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nfrom glob import glob\nfrom subprocess import check_output, CalledProcessError\n\n\ndef get_usb_devices():\n \"\"\"\n Lista dispositivos USB conectados\n\n :return:\n \"\"\"\n sdb_devices = map(os.... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from glob import glob
from subprocess import check_output, CalledProcessError
def get_usb_devices():
"""
Lista dispositivos USB conectados
:return:
"""
sdb_devices = map(os.path.realpath, glob('/sys/block/sd*'))
usb_devices = (... |
[
{
"content": "Here is the code block:\n```python\n# -*-coding:Utf-8 -*\n\n# Copyright (c) 2012 LE GOFF Vincent\n# 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 are met:\n#\n# * Redistributions o... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\n# -*-coding:Utf-8 -*\n\n# Copyright (c) 2012 LE GOFF Vincent\n# 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 are met:\n#\n# * R... | ```python
# -*-coding:Utf-8 -*
# Copyright (c) 2012 LE GOFF Vincent
# 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, th... |
[
{
"content": "```python\n#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Interpreter version: python 2.7\n#\n# !!! DO NOT EDIT THIS FILE - THIS IS GENERATED FILE !!!\n# Imports =====================================================================\nfrom collections import namedtuple\n\n\n# Functions and cl... | [
{
"content": "<|memory_start|>```python\n#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Interpreter version: python 2.7\n#\n# !!! DO NOT EDIT THIS FILE - THIS IS GENERATED FILE !!!\n# Imports =====================================================================\nfrom collections import namedtuple\n\n\n# ... | ```python
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# !!! DO NOT EDIT THIS FILE - THIS IS GENERATED FILE !!!
# Imports =====================================================================
from collections import namedtuple
# Functions and classes ===========================... |
[
{
"content": "Write the code verbatim:\n```python\nfrom flask import Flask, redirect, url_for, session, request, jsonify, flash\nfrom flask_oauthlib.client import OAuth\nfrom flask_login import login_user\nimport json\n\nfrom . import util\nfrom . import app, db\nfrom . import models\noauth = OAuth(app)\n\ngoog... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\nfrom flask import Flask, redirect, url_for, session, request, jsonify, flash\nfrom flask_oauthlib.client import OAuth\nfrom flask_login import login_user\nimport json\n\nfrom . import util\nfrom . import app, db\nfrom . import models\noauth = OA... | ```python
from flask import Flask, redirect, url_for, session, request, jsonify, flash
from flask_oauthlib.client import OAuth
from flask_login import login_user
import json
from . import util
from . import app, db
from . import models
oauth = OAuth(app)
google = oauth.remote_app(
'google',
consumer_key=app.c... |
[
{
"content": "Here is the snippet:\n```python\n#encoding:utf-8\n\nimport logging\n\nimport yaml\nimport praw\n\nimport utils\nfrom reporting_stuff import report_error\nfrom utils.tech import long_sleep, short_sleep\n\n\ndef send_to_channel_from_subreddit(how_to_post, channel_to_post, subreddit, submissions_rank... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n#encoding:utf-8\n\nimport logging\n\nimport yaml\nimport praw\n\nimport utils\nfrom reporting_stuff import report_error\nfrom utils.tech import long_sleep, short_sleep\n\n\ndef send_to_channel_from_subreddit(how_to_post, channel_to_post, subreddit, ... | ```python
#encoding:utf-8
import logging
import yaml
import praw
import utils
from reporting_stuff import report_error
from utils.tech import long_sleep, short_sleep
def send_to_channel_from_subreddit(how_to_post, channel_to_post, subreddit, submissions_ranking, submissions_limit, config, **kwargs):
reddit = p... |
[
{
"content": "```python\nclass BaseGroup(object):\n \"\"\"\n A collection of tests and other groups.\n \n Groups are stored as a tree. They know of their children and parent.\n \"\"\"\n\n def __init__(self, subject=None, children=None, parent=None):\n # An identifier for this group\n ... | [
{
"content": "<|memory_start|>```python\nclass BaseGroup(object):\n \"\"\"\n A collection of tests and other groups.\n \n Groups are stored as a tree. They know of their children and parent.\n \"\"\"\n\n def __init__(self, subject=None, children=None, parent=None):\n # An identifier for... | ```python
class BaseGroup(object):
"""
A collection of tests and other groups.
Groups are stored as a tree. They know of their children and parent.
"""
def __init__(self, subject=None, children=None, parent=None):
# An identifier for this group
self.subject = subject
#... |
[
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Dec 7 16:23:52 2016\n\nCopyright 2015 Nicolo' Navarin\n\nThis file is part of count-mean-sketch based on https://github.com/rafacarrascosa/countminsketch.\n\ncount-mean-... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Dec 7 16:23:52 2016\n\nCopyright 2015 Nicolo' Navarin\n\nThis file is part of count-mean-sketch based on https://github.com/rafacarrascosa/countminsketch... | ```python
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 7 16:23:52 2016
Copyright 2015 Nicolo' Navarin
This file is part of count-mean-sketch based on https://github.com/rafacarrascosa/countminsketch.
count-mean-sketch is free software: you can redistribute it and/or modify
it under the terms of the GNU General Pu... |
[
{
"content": "Here is the code block:\n```python\n# Copyright 2016 United States Government as represented by the Administrator\n# of the National Aeronautics and Space Administration. All Rights Reserved.\n#\n# Portion of this code is Copyright Geoscience Australia, Licensed under the\n# Apache License, Versio... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\n# Copyright 2016 United States Government as represented by the Administrator\n# of the National Aeronautics and Space Administration. All Rights Reserved.\n#\n# Portion of this code is Copyright Geoscience Australia, Licensed under the\n# Apache... | ```python
# Copyright 2016 United States Government as represented by the Administrator
# of the National Aeronautics and Space Administration. All Rights Reserved.
#
# Portion of this code is Copyright Geoscience Australia, Licensed under the
# Apache License, Version 2.0 (the "License"); you may not use this file
# e... |
[
{
"content": "```python\n# -*- encoding: utf-8 -*-\n###########################################################################\n# Module Writen to OpenERP, Open Source Management Solution\n#\n# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/\n# All Rights Reserved.\n# info Vauxoo (info@vauxoo.co... | [
{
"content": "<|memory_start|>```python\n# -*- encoding: utf-8 -*-\n###########################################################################\n# Module Writen to OpenERP, Open Source Management Solution\n#\n# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/\n# All Rights Reserved.\n# info Vauxoo... | ```python
# -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/
# All Rights Reserved.
# info Vauxoo (info@vauxoo.com)
##########################... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file 'setgoaldialog.ui'\n#\n# Created: Tue Dec 23 18:15:13 2014\n# by: PyQt4 UI code generator 4.11.3\n#\n# WARNING! All changes made in this file will be lost!\n\nfrom PyQt4 import QtCore, QtGui\n\ntry:\n ... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file 'setgoaldialog.ui'\n#\n# Created: Tue Dec 23 18:15:13 2014\n# by: PyQt4 UI code generator 4.11.3\n#\n# WARNING! All changes made in this file will be lost!\n\nfrom PyQt4 import QtCore, Q... | ```python
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'setgoaldialog.ui'
#
# Created: Tue Dec 23 18:15:13 2014
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUt... |
[
{
"content": "Write the code verbatim:\n```python\nfrom functools import wraps\nfrom flask import render_template, request, url_for\nfrom app.models import PatchState\n\ndef filterable(f):\n \"\"\"Filter a query\"\"\"\n @wraps(f)\n def wrapped(*args, **kwargs):\n d = f(*args, **kwargs)\n\n ... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\nfrom functools import wraps\nfrom flask import render_template, request, url_for\nfrom app.models import PatchState\n\ndef filterable(f):\n \"\"\"Filter a query\"\"\"\n @wraps(f)\n def wrapped(*args, **kwargs):\n d = f(*args, **k... | ```python
from functools import wraps
from flask import render_template, request, url_for
from app.models import PatchState
def filterable(f):
"""Filter a query"""
@wraps(f)
def wrapped(*args, **kwargs):
d = f(*args, **kwargs)
q = d['query']
state = request.args.get('state', None,... |
[
{
"content": "Reconstruct the code file line-for-line, unmodified:\n```python\nimport psycopg2\nimport os, sys\n\n\nTOPIC_NUM_LIST = [30, 100, 200, 500]\n\nif len(sys.argv) is 1:\n print(\"トピック数を入力\")\n exit()\n\ntopic_num = int(sys.argv[1])\nif not topic_num in TOPIC_NUM_LIST:\n print(\"入力可能なトピック数は \", end=... | [
{
"content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\nimport psycopg2\nimport os, sys\n\n\nTOPIC_NUM_LIST = [30, 100, 200, 500]\n\nif len(sys.argv) is 1:\n print(\"トピック数を入力\")\n exit()\n\ntopic_num = int(sys.argv[1])\nif not topic_num in TOPIC_NUM_LIST:\n print(\"入力可能... | ```python
import psycopg2
import os, sys
TOPIC_NUM_LIST = [30, 100, 200, 500]
if len(sys.argv) is 1:
print("トピック数を入力")
exit()
topic_num = int(sys.argv[1])
if not topic_num in TOPIC_NUM_LIST:
print("入力可能なトピック数は ", end="")
for each in TOPIC_NUM_LIST:
print("{0} ".format(each), end="")
print("です.")... |
[
{
"content": "Here is the code content:\n```python\nimport sys\nsys.path.append('../py')\n\nfrom iroha import *\nfrom iroha.iroha import *\n\nd = IDesign()\nmod = IModule(d, \"mod\")\ntab1 = ITable(mod)\nsreg = design_tool.CreateSharedReg(tab1, \"o\", 32)\n\nwtab = ITable(mod)\nw = design_tool.CreateSharedRegWr... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\nimport sys\nsys.path.append('../py')\n\nfrom iroha import *\nfrom iroha.iroha import *\n\nd = IDesign()\nmod = IModule(d, \"mod\")\ntab1 = ITable(mod)\nsreg = design_tool.CreateSharedReg(tab1, \"o\", 32)\n\nwtab = ITable(mod)\nw = design_tool.C... | ```python
import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
tab1 = ITable(mod)
sreg = design_tool.CreateSharedReg(tab1, "o", 32)
wtab = ITable(mod)
w = design_tool.CreateSharedRegWriter(wtab, sreg)
wst1 = IState(wtab)
wst2 = IState(wtab)
wst3 = IS... |
[
{
"content": "```python\ntitle = 'Pmw.ButtonBox demonstration'\n\n# Import Pmw from this directory tree.\nimport sys\nsys.path[:0] = ['../../..']\n\nimport Tkinter\nimport Pmw\n\nclass Demo:\n def __init__(self, parent):\n\t# Create and pack the ButtonBox.\n\tself.buttonBox = Pmw.ButtonBox(parent,\n ... | [
{
"content": "<|memory_start|>```python\ntitle = 'Pmw.ButtonBox demonstration'\n\n# Import Pmw from this directory tree.\nimport sys\nsys.path[:0] = ['../../..']\n\nimport Tkinter\nimport Pmw\n\nclass Demo:\n def __init__(self, parent):\n\t# Create and pack the ButtonBox.\n\tself.buttonBox = Pmw.ButtonBox(pa... | ```python
title = 'Pmw.ButtonBox demonstration'
# Import Pmw from this directory tree.
import sys
sys.path[:0] = ['../../..']
import Tkinter
import Pmw
class Demo:
def __init__(self, parent):
# Create and pack the ButtonBox.
self.buttonBox = Pmw.ButtonBox(parent,
labelpos = 'nw',
label_text =... |
[
{
"content": "Here is the code block:\n```python\n\"\"\"\nArrow shapes\n\"\"\"\n\nfrom pynoded.graph import GraphObject\nfrom math import atan2,pi\nfrom cubicspline import cubicspline\nfrom numpy import array\n\nclass Arrow(GraphObject):\n \"\"\"\n An arrow connecting two objects.\n \"\"\"\n def __i... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\n\"\"\"\nArrow shapes\n\"\"\"\n\nfrom pynoded.graph import GraphObject\nfrom math import atan2,pi\nfrom cubicspline import cubicspline\nfrom numpy import array\n\nclass Arrow(GraphObject):\n \"\"\"\n An arrow connecting two objects.\n \"\... | ```python
"""
Arrow shapes
"""
from pynoded.graph import GraphObject
from math import atan2,pi
from cubicspline import cubicspline
from numpy import array
class Arrow(GraphObject):
"""
An arrow connecting two objects.
"""
def __init__(self,parent,x0,y0,x1,y1,color):
GraphObject.__init__(self,p... |
[
{
"content": "Produce an exact reconstruction of the code:\n```python\n# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import DataMigration\nfrom django.db import models\n\nclass Migration(DataMigration):\n\n def forwards(self, orm):\n \"Write your forwards methods her... | [
{
"content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import DataMigration\nfrom django.db import models\n\nclass Migration(DataMigration):\n\n def forwards(self, orm):\n \"Write your forw... | ```python
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Remember to use orm['appname.ModelName'] rather than "from ... |
[
{
"content": "Return the code unaltered:\n```python\nimport os\nimport pandas as pd\n\nfrom dataactbroker.scripts import update_historical_duns\nfrom dataactcore.config import CONFIG_BROKER\nfrom dataactcore.utils.duns import DUNS_COLUMNS, EXCLUDE_FROM_API\nfrom dataactcore.models.domainModels import DUNS, Hist... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\nimport os\nimport pandas as pd\n\nfrom dataactbroker.scripts import update_historical_duns\nfrom dataactcore.config import CONFIG_BROKER\nfrom dataactcore.utils.duns import DUNS_COLUMNS, EXCLUDE_FROM_API\nfrom dataactcore.models.domainModels i... | ```python
import os
import pandas as pd
from dataactbroker.scripts import update_historical_duns
from dataactcore.config import CONFIG_BROKER
from dataactcore.utils.duns import DUNS_COLUMNS, EXCLUDE_FROM_API
from dataactcore.models.domainModels import DUNS, HistoricDUNS
def test_remove_existing_duns(database):
"... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\n# Generated by Django 2.2.10 on 2021-03-03 17:08\n\nfrom django.conf import settings\nfrom django.db import (\n migrations,\n models,\n)\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n depende... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n# Generated by Django 2.2.10 on 2021-03-03 17:08\n\nfrom django.conf import settings\nfrom django.db import (\n migrations,\n models,\n)\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration)... | ```python
# Generated by Django 2.2.10 on 2021-03-03 17:08
from django.conf import settings
from django.db import (
migrations,
models,
)
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('... |
[
{
"content": "Here is the source code:\n```python\n# Logging: easier workflow with some utility methods to log and handle errors\nfrom collections import defaultdict, namedtuple\nfrom enum import Enum\nimport bpy\nimport os\nimport sys\nimport traceback\n\n\nclass LogLevel(Enum):\n DEBUG = 'debug'\n INFO ... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\n# Logging: easier workflow with some utility methods to log and handle errors\nfrom collections import defaultdict, namedtuple\nfrom enum import Enum\nimport bpy\nimport os\nimport sys\nimport traceback\n\n\nclass LogLevel(Enum):\n DEBUG = 'd... | ```python
# Logging: easier workflow with some utility methods to log and handle errors
from collections import defaultdict, namedtuple
from enum import Enum
import bpy
import os
import sys
import traceback
class LogLevel(Enum):
DEBUG = 'debug'
INFO = 'info'
WARNING = 'warning'
ERROR = 'error'
FAT... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n#!/usr/bin/env python\n#! -*- coding: utf-8 -*-\n\n###\n# Copyright (c) Rice University 2012-13\n# This software is subject to\n# the provisions of the GNU Affero General\n# Public License version 3 (AGPLv3).\n# ... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n#!/usr/bin/env python\n#! -*- coding: utf-8 -*-\n\n###\n# Copyright (c) Rice University 2012-13\n# This software is subject to\n# the provisions of the GNU Affero General\n# Public License version... | ```python
#!/usr/bin/env python
#! -*- coding: utf-8 -*-
###
# Copyright (c) Rice University 2012-13
# This software is subject to
# the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
###
"""Rhaptos user profile web application
The application is initialized... |
[
{
"content": "Reproduce the code exactly as provided (keep formatting):\n```python\nimport abc\nfrom hashlib import sha1\n\n\nclass Key(metaclass=abc.ABCMeta):\n \"\"\"\n Interface for a public or private key.\n \"\"\"\n\n @abc.abstractmethod\n def pub(self):\n pass\n\n @abc.abstractmet... | [
{
"content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\nimport abc\nfrom hashlib import sha1\n\n\nclass Key(metaclass=abc.ABCMeta):\n \"\"\"\n Interface for a public or private key.\n \"\"\"\n\n @abc.abstractmethod\n def pub(self):\n pass\n\n ... | ```python
import abc
from hashlib import sha1
class Key(metaclass=abc.ABCMeta):
"""
Interface for a public or private key.
"""
@abc.abstractmethod
def pub(self):
pass
@abc.abstractmethod
def has_secret_key(self):
pass
@abc.abstractmethod
def key_to_bin(self):
... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\n#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with e... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# ... | ```python
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file C... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\nimport mxnet as mx\nimport logging\n\n# data & preprocessing\ndata = mx.symbol.Variable('data')\n\n# 1st conv\nconv1 = mx.symbol.Convolution(data=data, kernel=(5, 5), num_filter=20)\npool1 = mx.symbol.Pooling(data=conv1, pool_type=\"max\",\n ... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\nimport mxnet as mx\nimport logging\n\n# data & preprocessing\ndata = mx.symbol.Variable('data')\n\n# 1st conv\nconv1 = mx.symbol.Convolution(data=data, kernel=(5, 5), num_filter=20)\npool1 = mx.symbol.Pooling(data=conv1, pool_type=\"... | ```python
import mxnet as mx
import logging
# data & preprocessing
data = mx.symbol.Variable('data')
# 1st conv
conv1 = mx.symbol.Convolution(data=data, kernel=(5, 5), num_filter=20)
pool1 = mx.symbol.Pooling(data=conv1, pool_type="max",
kernel=(2, 2), stride=(2, 2))
# 2nd conv
conv2 = mx.sy... |
[
{
"content": "```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2010-2011 OpenStack LLC.\n# All Rights Reserved.\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 th... | [
{
"content": "<|memory_start|>```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2010-2011 OpenStack LLC.\n# All Rights Reserved.\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#... | ```python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010-2011 OpenStack LLC.
# 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://... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n# Strawberry Blog Engine\n#\n# Copyright (c) 2014 Regis FLORET\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restri... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Strawberry Blog Engine\n#\n# Copyright (c) 2014 Regis FLORET\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Softwar... | ```python
# -*- coding: utf-8 -*-
# Strawberry Blog Engine
#
# Copyright (c) 2014 Regis FLORET
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitat... |
[
{
"content": "```python\nimport os\nfrom flask import Flask, json\n\nimport logging\nfrom logging.handlers import RotatingFileHandler\n\nUPLOAD_DIRECTORY = 'uploads'\n\napp = Flask(__name__, static_url_path='')\n\nprint 'Newman flask application starting...'\n# Configure root logging which effects console - don... | [
{
"content": "<|memory_start|>```python\nimport os\nfrom flask import Flask, json\n\nimport logging\nfrom logging.handlers import RotatingFileHandler\n\nUPLOAD_DIRECTORY = 'uploads'\n\napp = Flask(__name__, static_url_path='')\n\nprint 'Newman flask application starting...'\n# Configure root logging which effec... | ```python
import os
from flask import Flask, json
import logging
from logging.handlers import RotatingFileHandler
UPLOAD_DIRECTORY = 'uploads'
app = Flask(__name__, static_url_path='')
print 'Newman flask application starting...'
# Configure root logging which effects console - dont want newman debug to go to conso... |
[
{
"content": "```python\nimport sublime, sublime_plugin\nimport os, shutil, traceback, json\nfrom ...libs import util\nfrom ...libs import window_view_manager\nfrom ...libs import FlowCLI\nfrom .refactor_preview import RefactorPreview\n\nclass JavascriptEnhancementsRefactorSafeMoveCommand(sublime_plugin.TextCom... | [
{
"content": "<|memory_start|>```python\nimport sublime, sublime_plugin\nimport os, shutil, traceback, json\nfrom ...libs import util\nfrom ...libs import window_view_manager\nfrom ...libs import FlowCLI\nfrom .refactor_preview import RefactorPreview\n\nclass JavascriptEnhancementsRefactorSafeMoveCommand(sublim... | ```python
import sublime, sublime_plugin
import os, shutil, traceback, json
from ...libs import util
from ...libs import window_view_manager
from ...libs import FlowCLI
from .refactor_preview import RefactorPreview
class JavascriptEnhancementsRefactorSafeMoveCommand(sublime_plugin.TextCommand):
def run(self, edit, *... |
[
{
"content": "Here is the source code:\n```python\nfrom __future__ import annotations\nfrom collections import OrderedDict as OD\nfrom uuid import uuid4\nfrom itertools import chain\nfrom operator import itemgetter\nimport logging\nlogger = logging.getLogger(__name__)\n\nclass NodeMeta(type):\n '''used to ma... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\nfrom __future__ import annotations\nfrom collections import OrderedDict as OD\nfrom uuid import uuid4\nfrom itertools import chain\nfrom operator import itemgetter\nimport logging\nlogger = logging.getLogger(__name__)\n\nclass NodeMeta(type):\n ... | ```python
from __future__ import annotations
from collections import OrderedDict as OD
from uuid import uuid4
from itertools import chain
from operator import itemgetter
import logging
logger = logging.getLogger(__name__)
class NodeMeta(type):
'''used to magically update the nb_attrs'''
def __new__(mcs, name, ... |
[
{
"content": "Repeat the full code snippet:\n```python\nfrom django.core.management import call_command\n\nfrom ... import models\nfrom ...fields import get_one_to_many_fields, get_self_reference_fields\nfrom ._base import DumperBaseCommand\n\n\nclass Command(DumperBaseCommand):\n help = 'Load data'\n\n d... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\nfrom django.core.management import call_command\n\nfrom ... import models\nfrom ...fields import get_one_to_many_fields, get_self_reference_fields\nfrom ._base import DumperBaseCommand\n\n\nclass Command(DumperBaseCommand):\n help = 'Loa... | ```python
from django.core.management import call_command
from ... import models
from ...fields import get_one_to_many_fields, get_self_reference_fields
from ._base import DumperBaseCommand
class Command(DumperBaseCommand):
help = 'Load data'
def handle(self, **options):
self.verbosity = options['ve... |
[
{
"content": "Recreate the entire code block with identical formatting:\n```python\n# -*- coding: utf-8 -*-\nfrom south.utils import datetime_utils as datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n def forwards(... | [
{
"content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom south.utils import datetime_utils as datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n ... | ```python
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Boostrap3AlertPlugin.icon'
db.add_column(u'aldr... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\n#!/usr/bin/python -tt\n# Copyright 2010 Google Inc.\n# Licensed under the Apache License, Version 2.0\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Google's Python Class\n# http://code.google.com/edu/languages/google-python-cl... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n#!/usr/bin/python -tt\n# Copyright 2010 Google Inc.\n# Licensed under the Apache License, Version 2.0\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Google's Python Class\n# http://code.google.com/edu/languages/... | ```python
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic string exercises
# Fill in the code for the functions below. main() is ... |
[
{
"content": "Here is the source code:\n```python\nimport os\nimport getpass\nimport sys\nimport time\n\nimport numpy as np\nimport tensorflow as tf\nfrom q2_initialization import xavier_weight_init\nimport data_utils.utils as du\nimport data_utils.ner as ner\nfrom utils import data_iterator\nfrom model import ... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\nimport os\nimport getpass\nimport sys\nimport time\n\nimport numpy as np\nimport tensorflow as tf\nfrom q2_initialization import xavier_weight_init\nimport data_utils.utils as du\nimport data_utils.ner as ner\nfrom utils import data_iterator\nfr... | ```python
import os
import getpass
import sys
import time
import numpy as np
import tensorflow as tf
from q2_initialization import xavier_weight_init
import data_utils.utils as du
import data_utils.ner as ner
from utils import data_iterator
from model import LanguageModel
class Config(object):
"""Holds model hyperp... |
[
{
"content": "Here is the source code:\n```python\nimport sys\nimport serial\nimport struct\nimport numpy\nimport time\nimport math\nimport random\n\nclass DMXDevice(object):\n DEBUG = False\n def __init__(self, start, length):\n self.start, self.length = start, length\n if start < 1:\n print \"DMX... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\nimport sys\nimport serial\nimport struct\nimport numpy\nimport time\nimport math\nimport random\n\nclass DMXDevice(object):\n DEBUG = False\n def __init__(self, start, length):\n self.start, self.length = start, length\n if start < 1:\n ... | ```python
import sys
import serial
import struct
import numpy
import time
import math
import random
class DMXDevice(object):
DEBUG = False
def __init__(self, start, length):
self.start, self.length = start, length
if start < 1:
print "DMX Channels must start at least at 1!"
self.start = 1
s... |
[
{
"content": "Here is a code file:\n```python\n''' The `Extractor` hierarchy contains Transformer classes that take a `Stim`\nof any type as input and return extracted feature information (rather than\nanother `Stim` instance).\n'''\n\nfrom .base import Extractor, ExtractorResult, merge_results\nfrom .api impor... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n''' The `Extractor` hierarchy contains Transformer classes that take a `Stim`\nof any type as input and return extracted feature information (rather than\nanother `Stim` instance).\n'''\n\nfrom .base import Extractor, ExtractorResult, merge_results\... | ```python
''' The `Extractor` hierarchy contains Transformer classes that take a `Stim`
of any type as input and return extracted feature information (rather than
another `Stim` instance).
'''
from .base import Extractor, ExtractorResult, merge_results
from .api import (ClarifaiAPIImageExtractor,
Cla... |
[
{
"content": "Here is a code file:\n```python\n#!/usr/bin/env python\n# ----------------------------------------------------------------------- #\n# Copyright 2008-2010, Gregor von Laszewski #\n# Copyright 2010-2013, Indiana University #\n# #\n# Lice... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n#!/usr/bin/env python\n# ----------------------------------------------------------------------- #\n# Copyright 2008-2010, Gregor von Laszewski #\n# Copyright 2010-2013, Indiana University ... | ```python
#!/usr/bin/env python
# ----------------------------------------------------------------------- #
# Copyright 2008-2010, Gregor von Laszewski #
# Copyright 2010-2013, Indiana University #
# #
# Licensed under the Apache License, Version 2.0 (the "L... |
[
{
"content": "Here is a code file:\n```python\n# -*- coding: utf-8 -*-\n# @Author: chandan\n# @Date: 2017-07-08 00:32:09\n# @Last Modified by: chandan\n# @Last Modified time: 2017-07-08 11:13:46\n\nfrom data_utils import read_file\nfrom config import DATA_DIR, SCORE_COLUMNS \nimport os\nfrom model import tr... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# @Author: chandan\n# @Date: 2017-07-08 00:32:09\n# @Last Modified by: chandan\n# @Last Modified time: 2017-07-08 11:13:46\n\nfrom data_utils import read_file\nfrom config import DATA_DIR, SCORE_COLUMNS \nimport os\nfrom... | ```python
# -*- coding: utf-8 -*-
# @Author: chandan
# @Date: 2017-07-08 00:32:09
# @Last Modified by: chandan
# @Last Modified time: 2017-07-08 11:13:46
from data_utils import read_file
from config import DATA_DIR, SCORE_COLUMNS
import os
from model import train_model, test_model
import pandas as pd
import nump... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n\"\"\"Parse a Sycorax script into an annotated multi-author timeline.\"\"\"\n\nfrom datetime import datetime, timedelta\nimport json\nimport random\nimport re\nimport hashlib\nimport os\nimport pytz\n\n# 10M: ~10... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n\"\"\"Parse a Sycorax script into an annotated multi-author timeline.\"\"\"\n\nfrom datetime import datetime, timedelta\nimport json\nimport random\nimport re\nimport hashlib\nimport os\nimport py... | ```python
"""Parse a Sycorax script into an annotated multi-author timeline."""
from datetime import datetime, timedelta
import json
import random
import re
import hashlib
import os
import pytz
# 10M: ~10 minutes later
# 4H: ~4 hours later
# 1D: the next day
# R: Reply to previous
# 10A: 10AM on the current day
# 9P:... |
[
{
"content": "Return the code exactly, with no changes:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.http import HttpResponseBadRequest, HttpRequest, HttpResponse\nfrom django.views.generic import TemplateVi... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.http import HttpResponseBadRequest, HttpRequest, HttpResponse\nfrom django.views.generic i... | ```python
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.i18n import i18n_patterns
from django.http import HttpResponseBadRequest, HttpRequest, HttpResponse
from django.views.generic import TemplateView, RedirectView
from django.utils.module_loading import import_string... |
[
{
"content": "Reconstruct the code exactly:\n```python\n# Copyright 2004-2008 Roman Yakovenko.\r\n# Distributed under the Boost Software License, Version 1.0. (See\r\n# accompanying file LICENSE_1_0.txt or copy at\r\n# http://www.boost.org/LICENSE_1_0.txt)\r\n\r\n\"\"\"This module contains the implementation of... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\n# Copyright 2004-2008 Roman Yakovenko.\r\n# Distributed under the Boost Software License, Version 1.0. (See\r\n# accompanying file LICENSE_1_0.txt or copy at\r\n# http://www.boost.org/LICENSE_1_0.txt)\r\n\r\n\"\"\"This module contains the i... | ```python
# Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
"""This module contains the implementation of the L{config_t} class.
"""
import os
import sys
import copy
... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2006 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>\n#\n\n\"\"\"\nModule implementing the Printer configuration page.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom PyQt5.QtCore import pyqtSlot\n\nfrom .ConfigurationPageBase imp... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2006 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>\n#\n\n\"\"\"\nModule implementing the Printer configuration page.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom PyQt5.QtCore import pyqtSlot\n\nfrom .Configura... | ```python
# -*- coding: utf-8 -*-
# Copyright (c) 2006 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing the Printer configuration page.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import pyqtSlot
from .ConfigurationPageBase import ConfigurationPageBase
from .Ui_Graphic... |
[
{
"content": "Here is the code block:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport tornado.web\nimport tornado.autoreload\nimport tornado\n\nimport os\nimport shutil\n\nfrom sky.crawler import crawl\nfrom sky.crawler.crawling import get_image_set\nfrom sky.configs import DEFAULT_CRAWL_C... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport tornado.web\nimport tornado.autoreload\nimport tornado\n\nimport os\nimport shutil\n\nfrom sky.crawler import crawl\nfrom sky.crawler.crawling import get_image_set\nfrom sky.configs import... | ```python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tornado.web
import tornado.autoreload
import tornado
import os
import shutil
from sky.crawler import crawl
from sky.crawler.crawling import get_image_set
from sky.configs import DEFAULT_CRAWL_CONFIG
from sky.helper import extractDomain
from sky.scraper ... |
[
{
"content": "Replicate the source code:\n```python\n#pylint: disable=no-init,invalid-name\nfrom __future__ import (absolute_import, division, print_function)\n\nimport mantid.simpleapi as api\nfrom mantid.api import *\nfrom mantid.kernel import *\nimport os\nfrom reduction_workflow.find_data import find_data\n... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n#pylint: disable=no-init,invalid-name\nfrom __future__ import (absolute_import, division, print_function)\n\nimport mantid.simpleapi as api\nfrom mantid.api import *\nfrom mantid.kernel import *\nimport os\nfrom reduction_workflow.find_data im... | ```python
#pylint: disable=no-init,invalid-name
from __future__ import (absolute_import, division, print_function)
import mantid.simpleapi as api
from mantid.api import *
from mantid.kernel import *
import os
from reduction_workflow.find_data import find_data
class SANSBeamSpreaderTransmission(PythonAlgorithm):
... |
[
{
"content": "```python\nimport logging\nimport time\nfrom typing import Tuple\nfrom urllib.parse import urlsplit, urljoin\n\nfrom bs4 import BeautifulSoup\n\nfrom feedrsub.feeds.feedfinder.feedinfo import FeedInfo\nfrom feedrsub.utils.requests_session import RequestsSession, requests_session\n\nlogger = loggin... | [
{
"content": "<|memory_start|>```python\nimport logging\nimport time\nfrom typing import Tuple\nfrom urllib.parse import urlsplit, urljoin\n\nfrom bs4 import BeautifulSoup\n\nfrom feedrsub.feeds.feedfinder.feedinfo import FeedInfo\nfrom feedrsub.utils.requests_session import RequestsSession, requests_session\n\... | ```python
import logging
import time
from typing import Tuple
from urllib.parse import urlsplit, urljoin
from bs4 import BeautifulSoup
from feedrsub.feeds.feedfinder.feedinfo import FeedInfo
from feedrsub.utils.requests_session import RequestsSession, requests_session
logger = logging.getLogger("feedfinder4")
def ... |
[
{
"content": "Here is a code file:\n```python\n\"\"\"\nhomeassistant.util.template\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTemplate utility methods for rendering strings with HA data.\n\"\"\"\n# pylint: disable=too-few-public-methods\nimport json\nimport logging\nimport jinja2\nfrom jinja2.sandbox import ImmutableSandb... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n\"\"\"\nhomeassistant.util.template\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTemplate utility methods for rendering strings with HA data.\n\"\"\"\n# pylint: disable=too-few-public-methods\nimport json\nimport logging\nimport jinja2\nfrom jinja2.sandbox impor... | ```python
"""
homeassistant.util.template
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Template utility methods for rendering strings with HA data.
"""
# pylint: disable=too-few-public-methods
import json
import logging
import jinja2
from jinja2.sandbox import ImmutableSandboxedEnvironment
from homeassistant.const import STATE_UNKNOWN... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Author: Joël Grand-guillaume (Camptocamp)\n# Copyright 2010 Camptocamp SA\n#\n# This program is free software: you can redist... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Author: Joël Grand-guillaume (Camptocamp)\n# Copyright 2010 Camptocamp SA\n#\n# This program is free software... | ```python
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Joël Grand-guillaume (Camptocamp)
# Copyright 2010 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Genera... |
[
{
"content": "Repeat the code exactly:\n```python\n# Default datasets for dungeon tiles.\nwalls =\t{\n\t'north' \t: True,\n\t'east'\t\t: True,\n\t'south'\t\t: True,\n\t'west'\t\t: True\n}\n\nentities = {\n\t'items'\t\t: [],\n\t'objects'\t: [],\n\t'enemies'\t: [],\n\t'npcs'\t\t: []\n}\n\n# Defines a series of ti... | [
{
"content": "Repeat the code exactly:\n<|memory_start|>```python\n# Default datasets for dungeon tiles.\nwalls =\t{\n\t'north' \t: True,\n\t'east'\t\t: True,\n\t'south'\t\t: True,\n\t'west'\t\t: True\n}\n\nentities = {\n\t'items'\t\t: [],\n\t'objects'\t: [],\n\t'enemies'\t: [],\n\t'npcs'\t\t: []\n}\n\n# Define... | ```python
# Default datasets for dungeon tiles.
walls = {
'north' : True,
'east' : True,
'south' : True,
'west' : True
}
entities = {
'items' : [],
'objects' : [],
'enemies' : [],
'npcs' : []
}
# Defines a series of tiles with walls.
class Tile (object):
def __init__ (self, walls=walls, entities=entit... |
[
{
"content": "Return the code unaltered:\n```python\nimport threading\nimport json\nimport time\nimport queue\nimport gevent # pylint: disable=import-error\nfrom flask import Flask, render_template # pylint: disable=import-error\nfrom flask_socketio import SocketIO, emit, join_room, leave_room, send # pylint: d... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\nimport threading\nimport json\nimport time\nimport queue\nimport gevent # pylint: disable=import-error\nfrom flask import Flask, render_template # pylint: disable=import-error\nfrom flask_socketio import SocketIO, emit, join_room, leave_room, ... | ```python
import threading
import json
import time
import queue
import gevent # pylint: disable=import-error
from flask import Flask, render_template # pylint: disable=import-error
from flask_socketio import SocketIO, emit, join_room, leave_room, send # pylint: disable=import-error
from Utils import *
from LCM import *... |
[
{
"content": "```python\n# Copyright (c) 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\nimport unittest\n\nfrom chrome_remote_control import browser_options\n\nclass BrowserOptionsTest(unittest.TestCase):\n... | [
{
"content": "<|memory_start|>```python\n# Copyright (c) 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\nimport unittest\n\nfrom chrome_remote_control import browser_options\n\nclass BrowserOptionsTest(unitt... | ```python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from chrome_remote_control import browser_options
class BrowserOptionsTest(unittest.TestCase):
def testDefaults(self):
o... |
[
{
"content": "Here is some code:\n```python\n############## errror code\n\n# killed\nEC_Kill = 100\n\n# transfer timeout\nEC_Transfer = 101\n\n# expire\nEC_Expire = 102\n\n# aborted\nEC_Aborted = 103\n\n# wait timeout\nEC_WaitTimeout = 104\n\n# reassigned by rebrokeage \nEC_Reassigned = 105\n\n# reassigned by s... | [
{
"content": "Here is some code:\n<|memory_start|>```python\n############## errror code\n\n# killed\nEC_Kill = 100\n\n# transfer timeout\nEC_Transfer = 101\n\n# expire\nEC_Expire = 102\n\n# aborted\nEC_Aborted = 103\n\n# wait timeout\nEC_WaitTimeout = 104\n\n# reassigned by rebrokeage \nEC_Reassigned = 105\n\n#... | ```python
############## errror code
# killed
EC_Kill = 100
# transfer timeout
EC_Transfer = 101
# expire
EC_Expire = 102
# aborted
EC_Aborted = 103
# wait timeout
EC_WaitTimeout = 104
# reassigned by rebrokeage
EC_Reassigned = 105
# reassigned by server-side retry
EC_Retried = 106
# retried by pilot
EC_PilotR... |
[
{
"content": "```python\n# Copyright 2020 Tensorforce Team. 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# http://www.apache.org/licenses/LICENSE... | [
{
"content": "<|memory_start|>```python\n# Copyright 2020 Tensorforce Team. 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# http://www.apache.org/... | ```python
# Copyright 2020 Tensorforce Team. 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 app... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\n'''Label\n=====\n\nThe :class:`Label` widget is for rendering text. It supports ascii and unicode\nstrings::\n\n # hello world text\n l = Label(text='Hello world')\n\n # unicode text; can only display glyphs that are avail... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n'''Label\n=====\n\nThe :class:`Label` widget is for rendering text. It supports ascii and unicode\nstrings::\n\n # hello world text\n l = Label(text='Hello world')\n\n # unicode text; can only display glyph... | ```python
'''Label
=====
The :class:`Label` widget is for rendering text. It supports ascii and unicode
strings::
# hello world text
l = Label(text='Hello world')
# unicode text; can only display glyphs that are available in the font
l = Label(text=u'Hello world ' + unichr(2764))
# multiline tex... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nimport sys\nfrom osgbench import *\n\ndef usage():\n print \"usage.\"\n return -1\n\ndef main(argv=sys.argv):\n if len(argv) != 2:\n return usage()\n\n filename = argv[1]\n\n print \"Loading %s...\" % filename\n scene =... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nimport sys\nfrom osgbench import *\n\ndef usage():\n print \"usage.\"\n return -1\n\ndef main(argv=sys.argv):\n if len(argv) != 2:\n return usage()\n\n filename = argv[1]\n\n print \"Loading %s...\" % filen... | ```python
import sys
from osgbench import *
def usage():
print "usage."
return -1
def main(argv=sys.argv):
if len(argv) != 2:
return usage()
filename = argv[1]
print "Loading %s..." % filename
scene = loadScene(filename)
print "Traversing..."
travscene = scene.clone()
g ... |
[
{
"content": "Replicate the source code:\n```python\n# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\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# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\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 L... | ```python
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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": "Repeat the code exactly:\n```python\n#! /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python\n'''\nGeneric plotting script for PYTHONRT\n\n'''\n\n\nimport read_output as rd\nimport os, sys\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport cobra_su... | [
{
"content": "Repeat the code exactly:\n<|memory_start|>```python\n#! /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python\n'''\nGeneric plotting script for PYTHONRT\n\n'''\n\n\nimport read_output as rd\nimport os, sys\nimport matplotlib.pyplot as plt\nimport numpy as np\... | ```python
#! /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
'''
Generic plotting script for PYTHONRT
'''
import read_output as rd
import os, sys
import matplotlib.pyplot as plt
import numpy as np
import cobra_sub as sub
rd.setpars()
def strip(character, string):
'''... |
[
{
"content": "Repeat the code precisely:\n```python\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file ... | ```python
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you ma... |
[
{
"content": "Produce an exact reconstruction of the code:\n```python\nimport httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.transfer import Transfer\n\n\nclass TestTransfer(BaseTestCase):\n\n @httpretty.activate\n def test_initiate(self):\n \"\"\"Method de... | [
{
"content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\nimport httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.transfer import Transfer\n\n\nclass TestTransfer(BaseTestCase):\n\n @httpretty.activate\n def test_initiate(self):\n ... | ```python
import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.transfer import Transfer
class TestTransfer(BaseTestCase):
@httpretty.activate
def test_initiate(self):
"""Method defined to test transfer initiation."""
httpretty.register_uri(
... |
[
{
"content": "Repeat the following code:\n```python\n# -*- coding: utf-8 -*-\n# vim: set ts=4\n\n# Copyright 2016 Rémi Duraffort\n# This file is part of ReactOBus.\n#\n# ReactOBus is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published ... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# vim: set ts=4\n\n# Copyright 2016 Rémi Duraffort\n# This file is part of ReactOBus.\n#\n# ReactOBus is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public Licen... | ```python
# -*- coding: utf-8 -*-
# vim: set ts=4
# Copyright 2016 Rémi Duraffort
# This file is part of ReactOBus.
#
# ReactOBus is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the... |
[
{
"content": "Here is the script:\n```python\n# encoding: utf-8\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'Household'\n db.create_tabl... | [
{
"content": "Here is the script:\n<|memory_start|>```python\n# encoding: utf-8\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'Household'\n ... | ```python
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Household'
db.create_table('people_household', (
('id', self.gf('dja... |
[
{
"content": "```python\nimport numpy as np\nfrom keras.layers.core import Dense\nfrom keras.models import Sequential\nfrom keras.optimizers import RMSprop\nfrom ..value_function import ValueFunction\nfrom ...game.utils import normalize_board\n\n\nclass MLP(ValueFunction):\n\n def __init__(self):\n se... | [
{
"content": "<|memory_start|>```python\nimport numpy as np\nfrom keras.layers.core import Dense\nfrom keras.models import Sequential\nfrom keras.optimizers import RMSprop\nfrom ..value_function import ValueFunction\nfrom ...game.utils import normalize_board\n\n\nclass MLP(ValueFunction):\n\n def __init__(se... | ```python
import numpy as np
from keras.layers.core import Dense
from keras.models import Sequential
from keras.optimizers import RMSprop
from ..value_function import ValueFunction
from ...game.utils import normalize_board
class MLP(ValueFunction):
def __init__(self):
self.model = Sequential()
se... |
[
{
"content": "Here is a code file:\n```python\n#!/usr/bin/env python3\n# Copyright (c) 2014-2016 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\"\"\"Test the RPC HTTP basics.\"\"\"\n\nfrom t... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n#!/usr/bin/env python3\n# Copyright (c) 2014-2016 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\"\"\"Test the RPC HTTP basics.... | ```python
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
from test_framework.test_framework import StatusquoTestFramewor... |
[
{
"content": "```python\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.axes_grid1 import ImageGrid\nimport numpy as np\nfrom os import listdir, getcwd\nfrom os import chdir\nfrom PIL import Image\nimport matplotlib.gridspec as gridspec\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspe... | [
{
"content": "<|memory_start|>```python\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.axes_grid1 import ImageGrid\nimport numpy as np\nfrom os import listdir, getcwd\nfrom os import chdir\nfrom PIL import Image\nimport matplotlib.gridspec as gridspec\nimport matplotlib.pyplot as plt\nimport matplotlib.gri... | ```python
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
import numpy as np
from os import listdir, getcwd
from os import chdir
from PIL import Image
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.image as mi... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\nfrom helper import unittest, PillowTestCase\n\nfrom PIL import GimpGradientFile\n\n\nclass TestImage(PillowTestCase):\n\n def test_linear_pos_le_middle(self):\n # Arrange\n middle = 0.5\n pos = 0.25\n\n #... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\nfrom helper import unittest, PillowTestCase\n\nfrom PIL import GimpGradientFile\n\n\nclass TestImage(PillowTestCase):\n\n def test_linear_pos_le_middle(self):\n # Arrange\n middle = 0.5\n pos = 0... | ```python
from helper import unittest, PillowTestCase
from PIL import GimpGradientFile
class TestImage(PillowTestCase):
def test_linear_pos_le_middle(self):
# Arrange
middle = 0.5
pos = 0.25
# Act
ret = GimpGradientFile.linear(middle, pos)
# Assert
self.... |
[
{
"content": "Here is a code file:\n```python\nimport os\nimport unittest\n\nfrom vsg.rules import package_body\nfrom vsg import vhdlFile\nfrom vsg.tests import utils\n\nsTestDir = os.path.dirname(__file__)\n\nlFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_201_test_input.vhd'))\n\nlExpe... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nimport os\nimport unittest\n\nfrom vsg.rules import package_body\nfrom vsg import vhdlFile\nfrom vsg.tests import utils\n\nsTestDir = os.path.dirname(__file__)\n\nlFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_201_test_input... | ```python
import os
import unittest
from vsg.rules import package_body
from vsg import vhdlFile
from vsg.tests import utils
sTestDir = os.path.dirname(__file__)
lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_201_test_input.vhd'))
lExpected = []
lExpected.append('')
utils.read_file(os.path.j... |
[
{
"content": "```python\n# Copyright 2011-2017 Facundo Batista\n# All Rigths Reserved\n\n\"\"\"The server for kilink.\"\"\"\n\nimport logging\nimport time\n\nfrom functools import update_wrapper\n\nfrom flask import (\n Flask,\n jsonify,\n render_template,\n request,\n make_response\n)\n\n# from ... | [
{
"content": "<|memory_start|>```python\n# Copyright 2011-2017 Facundo Batista\n# All Rigths Reserved\n\n\"\"\"The server for kilink.\"\"\"\n\nimport logging\nimport time\n\nfrom functools import update_wrapper\n\nfrom flask import (\n Flask,\n jsonify,\n render_template,\n request,\n make_respon... | ```python
# Copyright 2011-2017 Facundo Batista
# All Rigths Reserved
"""The server for kilink."""
import logging
import time
from functools import update_wrapper
from flask import (
Flask,
jsonify,
render_template,
request,
make_response
)
# from flask.ext.assets import Environment
# from flas... |
[
{
"content": "Replicate the source code:\n```python\n#!/usr/bin/env python\n\"\"\"\nConnect to a bugzilla xml-rpc.cgi and download all the things.\nThis exports products, bugs, comments and bug history to a \"bugzilla.json\"\noutput file which can in turn be used to quickly import things to a different\nformat.... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n#!/usr/bin/env python\n\"\"\"\nConnect to a bugzilla xml-rpc.cgi and download all the things.\nThis exports products, bugs, comments and bug history to a \"bugzilla.json\"\noutput file which can in turn be used to quickly import things to a di... | ```python
#!/usr/bin/env python
"""
Connect to a bugzilla xml-rpc.cgi and download all the things.
This exports products, bugs, comments and bug history to a "bugzilla.json"
output file which can in turn be used to quickly import things to a different
format.
"""
import json
import sys
import xmlrpc.client
# Edit th... |
[
{
"content": "Recreate the entire code block with identical formatting:\n```python\n#\n# Gramps - a GTK+/GNOME based genealogy program\n#\n# Copyright (C) 2000-2007 Donald N. Allingham\n# Copyright (C) 2009 Gary Burton\n# Copyright (C) 2011 Tim G L Lyons\n#\n# This program is free software; you can... | [
{
"content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n#\n# Gramps - a GTK+/GNOME based genealogy program\n#\n# Copyright (C) 2000-2007 Donald N. Allingham\n# Copyright (C) 2009 Gary Burton\n# Copyright (C) 2011 Tim G L Lyons\n#\n# This program is free s... | ```python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... |
[
{
"content": "Here is the code content:\n```python\n# Copyright (C) 2013-2017 Roland Lutz\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; either version 2 of the License, or\n# (at... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n# Copyright (C) 2013-2017 Roland Lutz\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; either version 2 of the Li... | ```python
# Copyright (C) 2013-2017 Roland Lutz
#
# 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 di... |
[
{
"content": "Replicate the source code:\n```python\nimport json\nimport time\nimport re\nfrom collections import OrderedDict\n\nfrom doajtest.helpers import DoajTestCase\nfrom portality import models\nfrom portality.upgrade import do_upgrade\nfrom portality.lib.paths import rel2abs\n\ndef operation(journal):\n... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\nimport json\nimport time\nimport re\nfrom collections import OrderedDict\n\nfrom doajtest.helpers import DoajTestCase\nfrom portality import models\nfrom portality.upgrade import do_upgrade\nfrom portality.lib.paths import rel2abs\n\ndef opera... | ```python
import json
import time
import re
from collections import OrderedDict
from doajtest.helpers import DoajTestCase
from portality import models
from portality.upgrade import do_upgrade
from portality.lib.paths import rel2abs
def operation(journal):
j = models.Journal.pull(journal.id)
bj = j.bibjson()
... |
[
{
"content": "Reconstruct the code exactly:\n```python\n#!/usr/bin/env python\nimport pika\nimport sys\nimport signal\nimport json\nimport logging\nfrom optparse import OptionParser\nimport eblocal\n\ndef createApplication(command):\n res = eblocal.createApp(command[\"name\"], command[\"source\"])\n if re... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\n#!/usr/bin/env python\nimport pika\nimport sys\nimport signal\nimport json\nimport logging\nfrom optparse import OptionParser\nimport eblocal\n\ndef createApplication(command):\n res = eblocal.createApp(command[\"name\"], command[\"sourc... | ```python
#!/usr/bin/env python
import pika
import sys
import signal
import json
import logging
from optparse import OptionParser
import eblocal
def createApplication(command):
res = eblocal.createApp(command["name"], command["source"])
if res is None:
logging.error("Can't create application")
... |
[
{
"content": "Repeat the code precisely:\n```python\n\"\"\"\n\n The MCMC fitting code used in Hilton et al. (2012), in a more general purpose form\n\n Copyright 2015 Matt Hilton (matt.hilton@mykolab.com)\n \n This file is part of fitScalingRelation.\n\n fitScalingRelation is free software: you ca... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n\"\"\"\n\n The MCMC fitting code used in Hilton et al. (2012), in a more general purpose form\n\n Copyright 2015 Matt Hilton (matt.hilton@mykolab.com)\n \n This file is part of fitScalingRelation.\n\n fitScalingRelation is free ... | ```python
"""
The MCMC fitting code used in Hilton et al. (2012), in a more general purpose form
Copyright 2015 Matt Hilton (matt.hilton@mykolab.com)
This file is part of fitScalingRelation.
fitScalingRelation is free software: you can redistribute it and/or modify
it under the terms of the ... |
[
{
"content": "Reconstruct the code file line-for-line, unmodified:\n```python\n# ==============================================================================\n# Copyright (C) 2011 Diego Duclos\n# Copyright (C) 2011-2018 Anton Vorobyov\n#\n# This file is part of Eos.\n#\n# Eos is free software: you can redistr... | [
{
"content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\n# ==============================================================================\n# Copyright (C) 2011 Diego Duclos\n# Copyright (C) 2011-2018 Anton Vorobyov\n#\n# This file is part of Eos.\n#\n# Eos is free software:... | ```python
# ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public Licens... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\nfrom yambopy import *\nimport numpy as np\nimport shutil\nimport os\nfrom netCDF4 import Dataset\n\ndef abs2(x):\n return x.real**2 + x.imag**2\n\nclass YamboWFDB():\n def __init__(self,savedb,path=None,save='SAVE',filename='ns.w... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\nfrom yambopy import *\nimport numpy as np\nimport shutil\nimport os\nfrom netCDF4 import Dataset\n\ndef abs2(x):\n return x.real**2 + x.imag**2\n\nclass YamboWFDB():\n def __init__(self,savedb,path=None,save='SAVE... | ```python
from yambopy import *
import numpy as np
import shutil
import os
from netCDF4 import Dataset
def abs2(x):
return x.real**2 + x.imag**2
class YamboWFDB():
def __init__(self,savedb,path=None,save='SAVE',filename='ns.wf'):
"""
load wavefunction from yambo
"""
if path is ... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n# flake8: noqa\n# SKIP this file when reformatting.\n# The rest of this file was generated by South.\n\n# encoding: utf-8\nimport datetime\n\nfrom django.db import models\nfrom maasserver.enum import NODE_STATUS\nfrom south.db import db\nfrom s... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n# flake8: noqa\n# SKIP this file when reformatting.\n# The rest of this file was generated by South.\n\n# encoding: utf-8\nimport datetime\n\nfrom django.db import models\nfrom maasserver.enum import NODE_STATUS\nfrom south.db i... | ```python
# flake8: noqa
# SKIP this file when reformatting.
# The rest of this file was generated by South.
# encoding: utf-8
import datetime
from django.db import models
from maasserver.enum import NODE_STATUS
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def ... |
[
{
"content": "```python\nfrom perfrunner.helpers import local\nfrom perfrunner.helpers.cbmonitor import timeit, with_stats\nfrom perfrunner.tests import PerfTest\n\n\nclass DCPThroughputTest(PerfTest):\n\n def _report_kpi(self, time_elapsed: float):\n self.reporter.post(\n *self.metrics.dcp... | [
{
"content": "<|memory_start|>```python\nfrom perfrunner.helpers import local\nfrom perfrunner.helpers.cbmonitor import timeit, with_stats\nfrom perfrunner.tests import PerfTest\n\n\nclass DCPThroughputTest(PerfTest):\n\n def _report_kpi(self, time_elapsed: float):\n self.reporter.post(\n *... | ```python
from perfrunner.helpers import local
from perfrunner.helpers.cbmonitor import timeit, with_stats
from perfrunner.tests import PerfTest
class DCPThroughputTest(PerfTest):
def _report_kpi(self, time_elapsed: float):
self.reporter.post(
*self.metrics.dcp_throughput(time_elapsed)
... |
[
{
"content": "Recreate the entire code block with identical formatting:\n```python\n\"\"\"\nThis module contains dsolve() and different helper functions that it\nuses.\n\ndsolve() solves ordinary differential equations. See the docstring on\nthe various functions for their uses. Note that partial differential\n... | [
{
"content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n\"\"\"\nThis module contains dsolve() and different helper functions that it\nuses.\n\ndsolve() solves ordinary differential equations. See the docstring on\nthe various functions for their uses. Note that partia... | ```python
"""
This module contains dsolve() and different helper functions that it
uses.
dsolve() solves ordinary differential equations. See the docstring on
the various functions for their uses. Note that partial differential
equations support is in pde.py. Note that ode_hint() functions have
docstrings describing ... |
[
{
"content": "Repeat the code exactly as the original, including blank lines:\n```python\n# coding: utf-8\n\n\"\"\"\n Qc API\n\n Qc API # noqa: E501\n\n The version of the OpenAPI document: 3.0.0\n Contact: cloudsupport@telestream.net\n Generated by: https://openapi-generator.tech\n\"\"\"\n\n\nf... | [
{
"content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n# coding: utf-8\n\n\"\"\"\n Qc API\n\n Qc API # noqa: E501\n\n The version of the OpenAPI document: 3.0.0\n Contact: cloudsupport@telestream.net\n Generated by: https://openapi-generator.tec... | ```python
# coding: utf-8
"""
Qc API
Qc API # noqa: E501
The version of the OpenAPI document: 3.0.0
Contact: cloudsupport@telestream.net
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import telestream_cloud_qc
from tel... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\nfrom twisted.internet import reactor\nfrom twisted.internet.defer import inlineCallbacks, returnValue, Deferred\nfrom twisted.internet.task import deferLater\nfrom twisted.internet.threads import blockingCallFromThread\n\nfrom Trib... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\nfrom twisted.internet import reactor\nfrom twisted.internet.defer import inlineCallbacks, returnValue, Deferred\nfrom twisted.internet.task import deferLater\nfrom twisted.internet.threads import blockingCallFromThr... | ```python
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, returnValue, Deferred
from twisted.internet.task import deferLater
from twisted.internet.threads import blockingCallFromThread
from Tribler.Test.Community.Trustchain.test_community import BaseTestTrustChainCommunity
from... |
[
{
"content": "Recreate the entire code block with identical formatting:\n```python\n\"\"\"\nParse a GTO object\n\"\"\"\n\nimport os\nimport sys\nimport argparse\n\nfrom roblib import bcolors\nimport json\n\n\ndef list_keys(gto, verbose=False):\n \"\"\"\n List the primary keys in the patric file\n :para... | [
{
"content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n\"\"\"\nParse a GTO object\n\"\"\"\n\nimport os\nimport sys\nimport argparse\n\nfrom roblib import bcolors\nimport json\n\n\ndef list_keys(gto, verbose=False):\n \"\"\"\n List the primary keys in the patric... | ```python
"""
Parse a GTO object
"""
import os
import sys
import argparse
from roblib import bcolors
import json
def list_keys(gto, verbose=False):
"""
List the primary keys in the patric file
:param gto: the json gto
:param verbose: more output
:return:
"""
print("{}".format("\n".join(g... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\nvar.nexus_allowAllDigitNames = True # put it somewhere else\nvar.doCheckForDuplicateSequences = False\n\nt = var.trees[0]\na = var.alignments[0]\nt.data = Data()\n\nt.model.dump()\n\nprint('\\nAfter optimizing,... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\nvar.nexus_allowAllDigitNames = True # put it somewhere else\nvar.doCheckForDuplicateSequences = False\n\nt = var.trees[0]\na = var.alignments[0]\nt.data = Data()\n\nt.model.dump()\n\nprint('\\nA... | ```python
var.nexus_allowAllDigitNames = True # put it somewhere else
var.doCheckForDuplicateSequences = False
t = var.trees[0]
a = var.alignments[0]
t.data = Data()
t.model.dump()
print('\nAfter optimizing, the composition of the model for the non-root nodes is:')
print(t.model.parts[0].comps[0].val)
print('...a... |
[
{
"content": "Here is the script:\n```python\n\"\"\"\nAs mat2_p2D.py, but the boundary conditions are different.\nHere, u=0 on x=0 and u=1 on x=1, while du/dn=0 on y=0 and y=1.\nThis yields a solution u(x,y)=x, regardless of the values of k.\n\"\"\"\n\nfrom dolfin import *\nimport sys, math, numpy\n\nmesh = Uni... | [
{
"content": "Here is the script:\n<|memory_start|>```python\n\"\"\"\nAs mat2_p2D.py, but the boundary conditions are different.\nHere, u=0 on x=0 and u=1 on x=1, while du/dn=0 on y=0 and y=1.\nThis yields a solution u(x,y)=x, regardless of the values of k.\n\"\"\"\n\nfrom dolfin import *\nimport sys, math, num... | ```python
"""
As mat2_p2D.py, but the boundary conditions are different.
Here, u=0 on x=0 and u=1 on x=1, while du/dn=0 on y=0 and y=1.
This yields a solution u(x,y)=x, regardless of the values of k.
"""
from dolfin import *
import sys, math, numpy
mesh = UnitSquareMesh(4, 6)
# Define a MeshFunction over two subdoma... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\nfrom ctypescrypto import pyver\nfrom ctypescrypto.oid import Oid\nfrom ctypescrypto.ec import create\nfrom base64 import b16decode\nfrom subprocess import Popen, PIPE\nimport unittest\n\ndef dump_key(key):\n \"\"\" Convert key into ... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\nfrom ctypescrypto import pyver\nfrom ctypescrypto.oid import Oid\nfrom ctypescrypto.ec import create\nfrom base64 import b16decode\nfrom subprocess import Popen, PIPE\nimport unittest\n\ndef dump_key(key):\n \"\"\" C... | ```python
from ctypescrypto import pyver
from ctypescrypto.oid import Oid
from ctypescrypto.ec import create
from base64 import b16decode
from subprocess import Popen, PIPE
import unittest
def dump_key(key):
""" Convert key into printable form using openssl utility
Used to compare keys which can be stored i... |
[
{
"content": "Here is some code:\n```python\n# coding=utf-8\n# --------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n#\n# Code gen... | [
{
"content": "Here is some code:\n<|memory_start|>```python\n# coding=utf-8\n# --------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information... | ```python
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
... |
[
{
"content": "Here is a code file:\n```python\nimport tensorflow as tf\nimport matplotlib\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport random\nimport math\n\nnp.random.seed(1234)\nrandom.seed(1234)\n\nplt.switch_backend(\"TkAgg\")\n\ndef plotScatter(points, color):\n xs = [x[0] for x in point... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nimport tensorflow as tf\nimport matplotlib\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport random\nimport math\n\nnp.random.seed(1234)\nrandom.seed(1234)\n\nplt.switch_backend(\"TkAgg\")\n\ndef plotScatter(points, color):\n xs = [x[0... | ```python
import tensorflow as tf
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import random
import math
np.random.seed(1234)
random.seed(1234)
plt.switch_backend("TkAgg")
def plotScatter(points, color):
xs = [x[0] for x in points]
ys = [y[1] for y in points]
plt.scatter(xs, ... |
[
{
"content": "Reconstruct the code exactly:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 2015-10-05\n@author: Zhixiong Zhao\n\"\"\"\n\nimport __init__\nfrom HHFormat import *\nimport molecule.HHMolecule \nimport molecule.HHAtom\nimport molecule.HHResidue\nimport molecule.HHBond\nimport geometry.HHPoi... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 2015-10-05\n@author: Zhixiong Zhao\n\"\"\"\n\nimport __init__\nfrom HHFormat import *\nimport molecule.HHMolecule \nimport molecule.HHAtom\nimport molecule.HHResidue\nimport molecule.HHBond\nimpor... | ```python
# -*- coding: utf-8 -*-
"""
Created on 2015-10-05
@author: Zhixiong Zhao
"""
import __init__
from HHFormat import *
import molecule.HHMolecule
import molecule.HHAtom
import molecule.HHResidue
import molecule.HHBond
import geometry.HHPoint
Mol=molecule.HHMolecule.Molecule
Atom=molecule.HHAtom.Atom
Res=molec... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2009-2017, 2021 Rocky Bernstein <rocky@gnu.org>\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, either ver... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2009-2017, 2021 Rocky Bernstein <rocky@gnu.org>\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 Founda... | ```python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2017, 2021 Rocky Bernstein <rocky@gnu.org>
#
# 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 3 of the License, or
# ... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom kombu.async.http.curl import READ, WRITE, CurlClient\n\nfrom kombu.tests.case import (\n HubCase, Mock, call, patch, case_requires, set_module_symbol,\n)\n\n\n@case_requires('pycurl')\nclass test_CurlClient(HubCa... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom kombu.async.http.curl import READ, WRITE, CurlClient\n\nfrom kombu.tests.case import (\n HubCase, Mock, call, patch, case_requires, set_module_symbol,\n)\n\n\n@case_requires('pycurl')\nclass test_... | ```python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from kombu.async.http.curl import READ, WRITE, CurlClient
from kombu.tests.case import (
HubCase, Mock, call, patch, case_requires, set_module_symbol,
)
@case_requires('pycurl')
class test_CurlClient(HubCase):
class Client(CurlClient)... |
[
{
"content": "Reconstruct the code exactly:\n```python\n#!/usr/bin/env python\n##\n# Copyright (c) 2012-2014 Apple Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the... | [
{
"content": "Reconstruct the code exactly:\n<|memory_start|>```python\n#!/usr/bin/env python\n##\n# Copyright (c) 2012-2014 Apple Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obta... | ```python
#!/usr/bin/env python
##
# Copyright (c) 2012-2014 Apple 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.apache.org/licenses/LICENSE-2.0
#
#... |
[
{
"content": "Here is a code file:\n```python\nimport sys\nimport types\n\nfrom rpython.flowspace.model import Constant\nfrom rpython.flowspace.operation import op\nfrom rpython.annotator import description, model as annmodel\nfrom rpython.rlib.objectmodel import UnboxedValue\nfrom rpython.tool.pairtype import ... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nimport sys\nimport types\n\nfrom rpython.flowspace.model import Constant\nfrom rpython.flowspace.operation import op\nfrom rpython.annotator import description, model as annmodel\nfrom rpython.rlib.objectmodel import UnboxedValue\nfrom rpython.tool.... | ```python
import sys
import types
from rpython.flowspace.model import Constant
from rpython.flowspace.operation import op
from rpython.annotator import description, model as annmodel
from rpython.rlib.objectmodel import UnboxedValue
from rpython.tool.pairtype import pairtype, pair
from rpython.tool.identity_dict impor... |
[
{
"content": "Return the code unaltered:\n```python\n# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: GNU General Public License v3. See license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nimport erpnext\nimport json\nimport itertools\nfrom frappe import msgpri... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\n# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: GNU General Public License v3. See license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nimport erpnext\nimport json\nimport itertools\nfrom frap... | ```python
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import erpnext
import json
import itertools
from frappe import msgprint, _
from frappe.utils import (cstr, flt, cint, getdate, n... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n#-*- coding: utf-8 -*-\n\n###########################################################################\n## ##\n## Copyrights Etienne Chové <chove@crans.org> 2009 ... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n#-*- coding: utf-8 -*-\n\n###########################################################################\n## ##\n## Copyrights Etienne Chové <chove@crans.org> 20... | ```python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Etienne Chové <chove@crans.org> 2009 ##
## Copyrights Frédéric Rodrigo 2011 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.