category
string
source_dataset
string
language
string
prompt
string
thought
string
code
string
timestamp
int64
pretrain_raw
codeparrot/codeparrot-clean
python
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## ## h...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from itertools import chain from django.utils.itercompat import is_iterable class Tags: """ Built-in tags for internal checks. """ admin = 'admin' caches = 'caches' compatibility = 'compatibility' database = 'database' models = 'models' security = 'security' signals = 'signals...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" The :mod:`sklearn.utils` module includes various utilites. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, check_arrays, safe_asarray, assert_all_fini...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/python # encoding: utf-8 -*- # Copyright: (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. import _controls_ import new new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- """ werkzeug.contrib.cache ~~~~~~~~~~~~~~~~~~~~~~ The main problem with dynamic Web sites is, well, they're dynamic. Each time a user requests a page, the webserver executes a lot of code, queries the database, renders templates until the visitor gets the page he sees. ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from contextlib import contextmanager from datetime import datetime from inspect import isclass from celery import chord, group from celery_once import QueueOnce from celery.schedules import crontab from celery.utils.log import get_task_logger from sqlalchemy.orm.attributes import flag_modified # from pipet import ce...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import os from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig: """Class representing a Django application and its configuration.""" def __init__(self, app_name,...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys from nose.plugins.skip import SkipTest i...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import unittest, os, errno from ctypes import * from ctypes.util import find_library from test import test_support try: import threading except ImportError: threading = None class Test(unittest.TestCase): def test_open(self): libc_name = find_library("c") if libc_name is None: r...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import os import shutil import sys from django.core.exceptions import ImproperlyConfigured from django.db.backends.base.creation import BaseDatabaseCreation from django.utils.encoding import force_text from django.utils.six.moves import input class DatabaseCreation(BaseDatabaseCreation): @staticmethod def i...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
"""Provide access to Python's configuration information. """ import sys import os from os.path import pardir, realpath _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{base}/lib/python{py_version_short}', 'platstdlib': '{platbase}/lib/python{py_version_short}', 'purelib': '{ba...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from __future__ import absolute_import, unicode_literals import json import hashlib from django import forms from django.conf import settings from django.db import connections from django.utils.encoding import force_text from django.utils.functional import cached_property from django.core.exceptions import Validation...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import os, sys, requests, pprint, re, json from uritemplate import URITemplate, expand from subprocess import call changelog_file = '../../changelog.txt' token_file = '../../../TelegramPrivate/github-releases-token.txt' version = '' commit = '' for arg in sys.argv: if re.match(r'\d+\.\d+', arg): version = arg ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import datetime import ephem # dnf install python3-pyephem import math import navpy import numpy as np # find our custom built opencv first import sys sys.path.insert(0, "/usr/local/opencv3/lib/python2.7/site-packages/") import cv2 sys.path.append('../scripts') from lib import transformations impo...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# # Copyright 2010 Free Software Foundation, Inc. # # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-howto # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Utilities for extracting text from generated classes. """ from __future__ import unicode_literals def ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# test_hhfit.py --- # # Filename: test_hhfit.py # Description: # Author: # Maintainer: # Created: Tue May 21 16:34:45 2013 (+0530) # Version: # Last-Updated: Tue May 21 16:37:28 2013 (+0530) # By: subha # Update #: 9 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # # Change ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
"""Schur decomposition functions.""" import numpy from numpy import asarray_chkfinite, single # Local imports. import misc from misc import LinAlgError, _datacopied from lapack import get_lapack_funcs from decomp import eigvals __all__ = ['schur', 'rsf2csf'] _double_precision = ['i','l','d'] def schur(a, output='...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright 2015 The TensorFlow Authors. 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 applica...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Classes and subroutines dealing with network connections and related topics. """ from __future__ import with_statement from functools import wraps import getpass import os import re import time import socket import sys from StringIO import StringIO from fabric.auth import get_password, set_password from fabric....
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from django.forms.widgets import Textarea from django.template import loader, Context from django.templatetags.static import static from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException # Creating a template context that c...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # """Module to parse ANSI escape sequences Maintainer: Jean-Paul Calderone """ import string # Twisted imports from twisted.python import log class ColorText: """ Represents an element of text along with the texts colors and additi...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# encoding:UTF-8 import sys import os import time import wlstModule as wlst import ConfigParser from java.util import Properties from java.lang import System from java.io import FileInputStream from java.io import FileOutputStream from weblogic.security.internal import SerializedSystemIni from weblogic.security.int...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Test the functions and main class method of FormatParagraph.py import unittest from idlelib import FormatParagraph as fp from idlelib.EditorWindow import EditorWindow from tkinter import Tk, Text, TclError from test.support import requires class Is_Get_Test(unittest.TestCase): """Test the is_ and get_ functions...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP863.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unescapeHTML class BaiduVideoIE(InfoExtractor): IE_DESC = '百度视频' _VALID_URL = r'https?://v\.baidu\.com/(?P<type>[a-z]+)/(?P<id>\d+)\.htm' _TESTS = [{ 'url': 'http://v.baidu.com...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # 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 # with...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
########################################################################## # # Copyright (c) 2007-2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, validate_email_add from frappe import throw, msgprint, _ from frappe.model.document import Document cl...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. from vcoptparse import * import vm_build import sys from threading import Thread, Semaphore class Builder(Thread): def __init__(self, name, branch, target, semaphore): Thread.__init__(self) self.name = name self.bra...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Various tests for synchronization primitives. """ import sys import time from thread import start_new_thread, get_ident import threading import unittest from test import test_support as support def _wait(): # A crude wait/yield function not relying on synchronization primitives. time.sleep(0.01) class ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from __future__ import unicode_literals from datetime import datetime, timedelta from django.template.defaultfilters import timesince_filter from django.test import SimpleTestCase from django.test.utils import requires_tz_support from ..utils import setup from .timezone_utils import TimezoneTestCase class Timesinc...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" ============================================================================ Decoding in time-frequency space data using the Common Spatial Pattern (CSP) ============================================================================ The time-frequency decomposition is estimated by iterating over raw data that has be...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): USERINFO_PROFILE = "/authenticate" class OrcidAccount(ProviderAccount): def get_profile_url(self): return extract_from_dict(self.account.ex...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import json import re import yaml import base64 import velruse import datetime from pygithub3 import Github from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config from verse.utils import set_content #from pyramid.i18n import TranslationString as _ from .models import ( DBSession, Us...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from javascript import JSObject from browser import window import urllib.request class TempMod: def __init__(self, name): self.name=name #define my custom import hook (just to see if it get called etc). class BaseHook: def __init__(self, fullname=None, path=None): self._fullname=fullname self._p...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright 2017 Google 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 # # Unless required by applicable law or a...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import import os import copy import tempfile import json import datetime import pprint # Import Salt Testing libs from salttesting.unit import skipIf, TestCase from salttesting.case import ModuleCase from salttesting.helpers import ensure_in...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initia...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
"""Definition of WebDriverException classes.""" def create_webdriver_exception_strict(status_code, message): """Create the appropriate WebDriverException given the status_code.""" if status_code in _exceptions_strict: return _exceptions_strict[status_code](message) return UnknownStatusCodeException...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import ContextMixin, TemplateResponseMixin, View class SingleObjectMixin(Conte...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from .utils import kwarg_decorator, last_arg_decorator from .version import version as __version__ from .version import version_info __all__ = [ '__version__', 'version_info', 'registry', 'register_model_chooser', 'register_simple_model_chooser', 'register_filter', ] class Registry(object): def __init__(...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- test-case-name: twisted.test.test_unix,twisted.internet.test.test_unix,twisted.internet.test.test_posixbase -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Various asynchronous TCP/IP classes. End users shouldn't use this module directly - use the reactor APIs instead. Maintain...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- # # PublicKey/DSA.py : DSA signature primitive # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public d...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright 2013 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. """Setup for instrumentation host-driven tests.""" import logging import os import sys import types from pylib.host_driven import test_case from pylib.host...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" =========================== Pipeline bamstats =========================== :Author: Adam Cribbs :Release: $Id$ :Date: |today| :Tags: Python The intention of this pipeline is to perform QC statistics on `.bam` files that are produced following mapping of fastq files. The pipeline requires a `.bam` file as an...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
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 may not...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Support for MyQ-Enabled Garage Doors. For more details about this platform, please refer to the documentation https://home-assistant.io/components/cover.myq/ """ import logging import voluptuous as vol from homeassistant.components.cover import CoverDevice from homeassistant.const import ( CONF_USERNAME, CON...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python """This file abstracts the loading of the private key.""" from cryptography import x509 from cryptography.hazmat.backends import openssl from cryptography.hazmat.primitives import hashes from cryptography.x509 import oid from grr.lib import rdfvalue from grr.lib.rdfvalues import crypto as rdf_c...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# # gdb helper commands and functions for Linux kernel debugging # # load kernel and module symbols # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import os import re from linux import module...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' TIME_FORMAT = 'P' DATETIM...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible import constants as C from ansible.plugins.action import ActionBase from ansible.util...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# HTTM: A transformation library for RAW and Electron Flux TESS Images # Copyright (C) 2016, 2017 John Doty and Matthew Wampler-Doty of Noqsi Aerospace, Ltd. # # 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 Softwar...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Copyright (C) 2010-2011 ST-Ericsson SA """ """ Author: Szymon Janc <szymon.janc@tieto.com> for ST-Ericsson. """ """ 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...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import os from flask_webpackext import FlaskWebpackExt from flas...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ from __future__ import unicode_literals import mimetypes import os import posixpath import re import stat from django.http import ( FileResponse, Http404, HttpRespons...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env 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. '''Unit tests for grit.tclib''' import sys import os.path if __name__ == '__main__': sys.path.append(os.path.join(os.path.dirna...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import terminal import curses import time from curses import panel class InfoContainer(object): def __init__(self, stdscreen, title, debug_console): self.debug_console = debug_console self.height = int(terminal.height/2) self.width = terminal.width - 2 self.title = title s...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python """Node Server Example This example demonstrates how to create a very simple node server that supports bi-diractional messaging between server and connected clients forming a cluster of nodes. """ from __future__ import print_function from os import getpid from optparse import OptionParser ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Copyright (C) 2011 Google Inc. All rights reserved. # Copyright (C) 2012, 2013 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env 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. # This script is used to copy all dependencies into the local directory. # The package of files can then be uploaded to App Engine....
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Program to show the maps of RMSE averaged over time import matplotlib.pyplot as plt from sklearn.metrics import mean_squared_error import os from netCDF4 import Dataset as NetCDFFile import numpy as np from CCLM_OUTS import Plot_CCLM # option == 1 -> shift 4 with default cclm domain and nboundlines = 3 # option == 2...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python # Copyright 2013 Brett Slatkin # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
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 from frappe import _ def execute(filters=None): columns = get_columns() proj_details = get_project_details() pr_item_map = get_purchas...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/python """ Data Models for books.service All classes can be instantiated from an xml string using their FromString class method. Notes: * Book.title displays the first dc:title because the returned XML repeats that datum as atom:title. There is an undocumented gbs:ope...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" 13. Adding hooks before/after saving and deleting To execute arbitrary code around ``save()`` and ``delete()``, just subclass the methods. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Per...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from copy import deepcopy from django.core.checks.templates import E001 from django.test import SimpleTestCase from django.test.utils import override_settings class CheckTemplateSettingsAppDirsTest(SimpleTestCase): TEMPLATES_APP_DIRS_AND_LOADERS = [ { 'BACKEND': 'django.template.backends.djan...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014 CERN. # # Invenio 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...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python # # Copyright 2014 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. """ Concatenates module scripts based on the module.json descriptor. Optionally, minifies the result using rjsmin. """ from cStringI...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- """ Pelican Mathjax Markdown Extension ================================== An extension for the Python Markdown module that enables the Pelican python blog to process mathjax. This extension gives Pelican the ability to use Mathjax as a "first class citizen" of the blog """ import markdown from...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" ========================================================= Multi-dimensional image processing (:mod:`scipy.ndimage`) ========================================================= .. currentmodule:: scipy.ndimage This package contains various functions for multi-dimensional image processing. Filters :mod:`scipy.ndima...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- """ Created on Wed May 06 11:00:53 2015 @author: newJustin """ import ChronoTrack_pandas as CT import pylab as py if __name__ == '__main__': # logger import logging as lg lg.basicConfig(fileName = 'logFile.log', level=lg.WARN, format='%(message)s') # default fo...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda 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 (at your option) any ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import os import shutil import zipfile import fnmatch import uuid def main(): kits = findAll(".") for kit in kits: print("* ", kit, " -> ", kits[kit]) print() print() print("Starting extraction:") print("------------------------------------------") extractKits(kits) def findAll(dir...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# coding: utf-8 from __future__ import unicode_literals import os.path import re from .common import InfoExtractor from ..utils import ( ExtractorError, remove_start, sanitized_Request, urlencode_postdata, ) class MonikerIE(InfoExtractor): IE_DESC = 'allmyvideos.net and vidspot.net' _VALID_U...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
""" Management utility to create superusers. """ from __future__ import unicode_literals import getpass import sys from django.contrib.auth import get_user_model from django.contrib.auth.management import get_default_username from django.core import exceptions from django.core.management.base import BaseCommand, Comm...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# This file is part of pybootchartgui. # pybootchartgui 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 # (at your option) any later version. # pybootchartgui is dis...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 NEC Corporation. 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.or...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
import random from utils import constrained_sum_sample_pos, arr_str scenario_description = ( "During the fueling period of the DAO, send enough ether from all " "accounts to create tokens and then assert that the user's balance is " "indeed correct and that the minimum fueling goal has been reached" ) d...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- # taken from http://code.activestate.com/recipes/252524-length-limited-o1-lru-cache-implementation/ import threading from func import synchronized __all__ = ['LRU'] class LRUNode(object): __slots__ = ['prev', 'next', 'me'] def __init__(self, prev, me): self.prev = prev ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-06-19 18:23 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012, 2013 CERN. ## ## Invenio 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 yo...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env impala-python # Copyright (c) 2014 Cloudera, Inc. All rights reserved. # # This script provides help with parsing and reporting of perf results. It currently # provides three main capabilities: # 1) Printing perf results to console in 'pretty' format # 2) Comparing two perf result sets together and displ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
"""Support for Dyson Pure Cool Link Sensors.""" import logging from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_cool_link import DysonPureCoolLink from homeassistant.const import PERCENTAGE, STATE_OFF, TEMP_CELSIUS, TIME_HOURS from homeassistant.helpers.entity import Entity from . im...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from django.test import TestCase from django.test.utils import override_settings from template_preprocess.processor import process_template_content from template_preprocess.test import get_test_template_settings template_settings = get_test_template_settings() @override_settings(**template_settings) class TestExten...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
from __future__ import print_function import argparse import collections import json import logging import sys from grocsvs import options as svoptions from grocsvs import log from grocsvs import pipeline from grocsvs import utilities from grocsvs import stages as svstages logging.basicConfig(format='%(message)s', ...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
1,788,757,675
pretrain_raw
codeparrot/codeparrot-clean
python
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re import string from collections import Mapping from markupsafe._compat import text_type, string_types, int_types, \ u...
1,788,757,675