text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# sql/compiler.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Base SQL and DDL compiler implementations. Classes provided include: :class:`.com...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 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 ...
codeparrot/github-code-clean
from __future__ import print_function import copy import logging import sys import numpy from six import iteritems from six.moves import StringIO, xrange import theano from theano import gof, Type, Apply from theano import tensor, scalar, config from theano.gradient import grad_undefined from theano.scalar import Sca...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.5.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x00\xd1\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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 = {'metadata_version': '1.1', 'status': ['prev...
codeparrot/github-code-clean
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2012 Varnish Software AS # # 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 ...
codeparrot/github-code-clean
# Copyright (c) 2014, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condit...
codeparrot/github-code-clean
""" State Space Model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from statsmodels.compat.python import long import numpy as np import pandas as pd from scipy.stats import norm from .kalman_smoother import KalmanSmoother, SmootherResults from .kalm...
codeparrot/github-code-clean
import types import unittest import warnings from copy import deepcopy from test import test_support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__init__(self, *args, **kwargs) self.binops = { 'add': '+', 'sub': '-', ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 ## ...
codeparrot/github-code-clean
# Copyright 2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
codeparrot/github-code-clean
# -*- encoding: utf-8 -*- # # Copyright © 2013 Intel Corp. # # Author: Lianhao Lu <lianhao.lu@intel.com> # Author: Shane Wang <shane.wang@intel.com> # # 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 Licen...
codeparrot/github-code-clean
import sys import re import os from ccp_util import _IPV6_REGEX_STR_COMPRESSED1, _IPV6_REGEX_STR_COMPRESSED2 from ccp_util import _IPV6_REGEX_STR_COMPRESSED3 from ccp_util import IPv4Obj, IPv6Obj from ccp_abc import BaseCfgLine ### HUGE UGLY WARNING: ### Anything in models_cisco.py could change at any time, until I...
codeparrot/github-code-clean
#!/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. """Meta checkout manager supporting both Subversion and GIT.""" # Files # .gclient : Current client configuration, written b...
codeparrot/github-code-clean
"""Tests for tensorflow.python.ops.op_def_library.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from google.protobuf import text_format from tensorflow.core.framework import op_def_pb2 from tensorflow.core.framework import tensor_shape_pb2 from tenso...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import collections import itertools import operator import sys import warnings import numpy as np from . import multiarray from .multiarray import ( _fastCopyAndTranspose as fastCopyAndTranspose, ALLOW_THREADS, BUFSIZE, CLIP, MAXDIMS, MAY_SHARE_...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Lexers for web-related languages and markup. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import copy from pygments.lexer import RegexLexer, ExtendedReg...
codeparrot/github-code-clean
<<<<<<< HEAD <<<<<<< HEAD from test.support import (TESTFN, run_unittest, import_module, unlink, requires, _2G, _4G, gc_collect, cpython_only) import unittest import os import re import itertools import socket import sys import weakref # Skip test if we can't import mmap. mmap = import_module...
codeparrot/github-code-clean
"""OutcomeGroups API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class OutcomeGroupsAPI(BaseCanvasAPI): """OutcomeGroups API Version 1....
codeparrot/github-code-clean
<<<<<<< HEAD <<<<<<< HEAD r"""plistlib.py -- a tool to generate and parse MacOSX .plist files. The property list (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. To write out a plist file, use the du...
codeparrot/github-code-clean
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, ## 2010, 2011, 2012, 2013, 2014, 2015 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 ...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2015, Daehwan Kim <infphilo@gmail.com> # # This file is part of HISAT 2. # # HISAT 2 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 # (a...
codeparrot/github-code-clean
#!/usr/bin/env python ############################################################################## # # diffpy.pyfullprof by DANSE Diffraction group # Simon J. L. Billinge # (c) 2010 Trustees of the Columbia University # in the City of New York. All rights reserve...
codeparrot/github-code-clean
#!/bin/sh # -*- mode: 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....
codeparrot/github-code-clean
#!/usr/bin/env python # coding=utf-8 # Copyright 2012 The Swarming Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 that # can be found in the LICENSE file. """Traces an executable and its child processes and extract the files accessed by them. The implementati...
codeparrot/github-code-clean
from collections import OrderedDict import numpy as np from numpy import nan, array import pandas as pd import pytest from pandas.util.testing import assert_series_equal, assert_frame_equal from numpy.testing import assert_allclose from pvlib import pvsystem from pvlib import atmosphere from pvlib import iam as _iam...
codeparrot/github-code-clean
""" Test functions for stats module WRITTEN BY LOUIS LUANGKESORN <lluang@yahoo.com> FOR THE STATS MODULE BASED ON WILKINSON'S STATISTICS QUIZ http://www.stanford.edu/~clint/bench/wilk.txt Additional tests by a host of SciPy developers. """ from __future__ import division, print_function, absolute_impo...
codeparrot/github-code-clean
# # Copyright (c) 2008-10, Mahadevan R All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
codeparrot/github-code-clean
""" test to_datetime """ import calendar from collections import deque from datetime import ( datetime, timedelta, ) from decimal import Decimal import locale from dateutil.parser import parse from dateutil.tz.tz import tzoffset import numpy as np import pytest import pytz from pandas._libs import tslib from...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Test for lms courseware app, module render unit """ from datetime import datetime import ddt import itertools import json from nose.plugins.attrib import attr from functools import partial from bson import ObjectId from django.http import Http404, HttpResponse from django.core.urlresolvers ...
codeparrot/github-code-clean
# # 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 # ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """Populate development database with Preprint Provider elements""" import logging import sys from django.db import transaction from modularodm import Q from modularodm.exceptions import NoResultsFound from website.app import init_app from website.settings import PREPRINT...
codeparrot/github-code-clean
"""Test the split module""" import warnings import pytest import numpy as np from scipy.sparse import coo_matrix, csc_matrix, csr_matrix from scipy import stats from scipy.special import comb from itertools import combinations from itertools import combinations_with_replacement from itertools import permutations from ...
codeparrot/github-code-clean
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
codeparrot/github-code-clean
#!/usr/bin/env python3 # transpiled with BefunCompile v1.3.0 (c) 2017 import gzip, base64 _g = ("Ah+LCAAAAAAABADsevk/1O/Xv31fIvvShOxCKbtBKoai7LInKbsoxNiZInuoZB8JhQgTNZZJym5kJ1sxgywZ4SV8r6nu+/P+3o/7+w98H+9+6ep5rrNc55zrnHO9JlgC" + "AwX5Dw3F8lj/7WMqnM8uW0FC/FUrL8Q9DpIainmyr6VapOrQRRx8qe+Ptn7MSLPW3XWw23SwMdd+sMNMQTF9THt...
codeparrot/github-code-clean
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "funnel.marker" _path_str = "funnel.marker.colorbar" _valid_props = { "bgcolor", ...
codeparrot/github-code-clean
# 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. # Changes may ...
codeparrot/github-code-clean
# # # Copyright 2009-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
codeparrot/github-code-clean
# -*- coding: utf-8; -*- # Copyright (C) 2015 - 2019 Lionel Ott # # 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 later version. # # T...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # 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 = {'metadata_versio...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2022 Google 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 required by applicable law or...
codeparrot/github-code-clean
# 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 u...
codeparrot/github-code-clean
# -*- encoding: utf-8 -*- # # 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 ...
codeparrot/github-code-clean
# Copyright (c) 2012 OpenStack Foundation. # 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...
codeparrot/github-code-clean
from collections import OrderedDict, abc from datetime import datetime, timedelta import functools import itertools import numpy as np import numpy.ma as ma import numpy.ma.mrecords as mrecords import pytest from pandas.compat import PY36, is_platform_little_endian from pandas.core.dtypes.cast import construct_1d_ob...
codeparrot/github-code-clean
from datetime import datetime from functools import partial from io import StringIO import numpy as np import pytest import pytz from pandas._libs import lib from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import ( DataFrame, Series, Timedelta, Timestamp, isna, ...
codeparrot/github-code-clean
import demistomock as demisto from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa import traceback from typing import Dict, Any, Tuple import json # Disable insecure warnings requests.packages.urllib3.disable_warnings() # pylint: disable=no-m...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
codeparrot/github-code-clean
# 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 (t...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import time import urlparse from datetime import datetime, timedelta from django.conf import settings from django.core import mail from django.core.files import temp from django.core.files.base import File as DjangoFile from django.utils.datastructures import SortedDict from django....
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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 = {'metadata_version': '1.1', 'status': ['prev...
codeparrot/github-code-clean
# Copyright (C) 2012-2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Human Resources Management @copyright: 2011-2014 (c) Sahana Software Foundation @license: MIT 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 S...
codeparrot/github-code-clean
from sqlalchemy.testing import assert_raises, assert_raises_message import datetime import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, MetaData, and_ from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, relation, \ ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ S3 Data Objects API @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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 ...
codeparrot/github-code-clean
import itertools import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import desc from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import lateral from sqlalchemy import literal...
codeparrot/github-code-clean
"""repository.sessions""" # pylint: disable=too-many-lines,no-member,protected-access,too-many-public-methods import os import sys from ...abstract_osid.repository import sessions as abc_repository_sessions from ..osid import sessions as osid_sessions from .objects import Asset, AssetList, AssetContent, AssetContentFo...
codeparrot/github-code-clean
#!/usr/bin/env python # file test_split_libraries.py __author__ = "Rob Knight" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Rob Knight", "William Walters", "Jai Ram Rideout"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "William Walters" __email__ = "william.a.walters@colorado....
codeparrot/github-code-clean
"""Script to generate reports on translator classes from Doxygen sources. The main purpose of the script is to extract the information from sources related to internationalization (the translator classes). It uses the information to generate documentation (language.doc, translator_report.txt) from templates (l...
codeparrot/github-code-clean
#!/usr/bin/env python import sys, os, subprocess import multiprocessing import string, re import platform from datetime import datetime, date, time import copy from argparse import ArgumentParser, FileType """ """ def reverse_complement(seq): result = "" for nt in seq: base = nt if nt == 'A':...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # 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 = {'metadata_version...
codeparrot/github-code-clean
# 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/. # Common codegen classes. import operator import os import re import string import textwrap import functools from WebI...
codeparrot/github-code-clean
""" Instructor Dashboard API views JSON views which the instructor dashboard requests. Many of these GETs may become PUTs in the future. """ import StringIO import json import logging import re import time from django.conf import settings from django.views.decorators.csrf import ensure_csrf_cookie, csrf_exempt from d...
codeparrot/github-code-clean
from __future__ import unicode_literals import codecs import numpy import os import transaction from base64 import b64decode from hashlib import sha1 import itertools from pyramid_addons.helpers import (http_created, http_gone, http_ok) from pyramid_addons.validation import (EmailAddress, Enum, List, Or, String, ...
codeparrot/github-code-clean
""" auibar contains an implementation of L{AuiToolBar}, which is a completely owner-drawn toolbar perfectly integrated with the AUI layout system. This allows drag and drop of toolbars, docking/floating behaviour and the possibility to define "overflow" items in the toolbar itself. The default theme that is used is L{...
codeparrot/github-code-clean
# blowfish # Copyright (C) 2015 Jashandeep Sohi <jashandeep.s.sohi@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
codeparrot/github-code-clean
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # import sys try: import unittest2 as unittest except ImportError: import unittest from tests.base import BaseTestCase from pyasn1.type import tag from p...
codeparrot/github-code-clean
# Copyright 2014 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 ...
codeparrot/github-code-clean
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of ...
codeparrot/github-code-clean
"""Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit https://code.google.com/p/feedparser/ for the latest version Visit http://packages.python.org/feedparser/ for the latest documentation Required: Python 2.4 or later Recommended: iconv_codec <http://cjkpython.i18n.org...
codeparrot/github-code-clean
from envi.archs.z80.regs import * from envi.archs.z80.const import * # (patrn,mask), mnem, o1type, o1info, o2type, o2info, oplen, immoff, iflags z80table = [ (('00', 'ff'), 'nop', None, None, None, None, 1, 0, 0), (('010000', 'ff0000'), 'ld', OPTYPE_Reg, REG_BC, OPTYPE_imm16, None, 3, 1, 0), (('02', 'ff'), 'ld', OPTYPE...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ graphicsItems.py - Defines several graphics item classes for use in Qt graphics/view framework Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. Provides ImageItem, PlotCurveItem, and ViewBox, amongst others. """ from PyQt4 import QtG...
codeparrot/github-code-clean
# pylint: disable=E1101,E1103,W0232 import datetime import warnings import operator from functools import partial from pandas.compat import range, zip, lrange, lzip, u, reduce, filter, map from pandas import compat import numpy as np from sys import getsizeof import pandas.tslib as tslib import pandas.lib as lib impo...
codeparrot/github-code-clean
#!/usr/bin/python -tt # 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 distributed in the hope that i...
codeparrot/github-code-clean
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
codeparrot/github-code-clean
''' Models ========= ''' # A repository for compartmentalized models compatible simulation models. from abapy.mesh import RegularQuadMesh from abapy.materials import VonMises, Hollomon from abapy.misc import load import numpy as np import os, time, subprocess, pickle, copy #--------------------------------------------...
codeparrot/github-code-clean
# coding: utf-8 """ CERN Unified Storage API A unified storage API for all data-storage back-ends. OpenAPI spec version: 3.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 co...
codeparrot/github-code-clean
#!/usr/bin/env python3 """PhiloLogic4 main parser""" import os import re import string import sys from philologic.loadtime.OHCOVector import CompoundStack from philologic.utils import convert_entities from collections import deque DEFAULT_TAG_TO_OBJ_MAP = { "div": "div", "div1": "div", "div2": "div", ...
codeparrot/github-code-clean
#!/usr/bin/env python ''' PURPOSE To compare the integrated SFR of LCS and EDisCS clusters CALLING SEQUENCE INPUT PARAMETERS OUTPUT PROCEDURE EDisCS: uses ediscs spec sample only LCS: uses all galaxies that fall on 24um image REQUIRED PYTHON MODULES ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Deep learning via word2vec's "skip-gram and CBOW models", using either hierarchical softmax or negative sampling [1]_ [2]_. The train...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Hewlett Packard Enterprise Development LP # # 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 # # U...
codeparrot/github-code-clean
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/license...
codeparrot/github-code-clean
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) 2011-2015 OpenStack Foundation # # 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
codeparrot/github-code-clean
# -*- 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 model 'ProcessingIssue' db.create_table( 'sentry_proc...
codeparrot/github-code-clean
# GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins # Copyright (c) 2017-2019 Ben Nuttall <ben@bennuttall.com> # Copyright (c) 2016-2019 Dave Jones <dave@waveform.org.uk> # Copyright (c) 2016-2019 Andrew Scheller <github@loowis.durge.org> # Copyright (c) 2018 SteveAmor <steveamor@users.noreply.github.co...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
codeparrot/github-code-clean
# coding: utf-8 """ Abinit Task classes for Fireworks. """ import inspect import subprocess import logging import time import shutil import json import threading import glob import os import errno import numpy as np import abipy.abio.input_tags as atags from collections import namedtuple, defaultdict from monty.json i...
codeparrot/github-code-clean
from __future__ import absolute_import from __future__ import print_function from typing import ( AbstractSet, Any, AnyStr, Callable, Dict, Iterable, Mapping, MutableMapping, Optional, Sequence, Tuple, TypeVar, Union ) from django.utils.translation import ugettext as _ from django.conf import settings from dja...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
#!/usr/bin/python -u # # This is the API builder, it parses the C sources and build the # API formal description in XML. # # See Copyright for the status of this software. # # daniel@veillard.com # import os, sys import string import glob debug=0 #debugsym='ignorableWhitespaceSAXFunc' debugsym=None # # C parser analy...
codeparrot/github-code-clean
import codecs import contextlib import io import locale import sys import unittest import warnings import encodings from test import support if sys.platform == 'win32': VISTA_OR_LATER = (sys.getwindowsversion().major >= 6) else: VISTA_OR_LATER = False try: import ctypes except ImportError: ctypes = N...
codeparrot/github-code-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
codeparrot/github-code-clean
import os import shutil from io import StringIO, BytesIO, open import codecs from copy import deepcopy from fontTools.misc.py23 import basestring, unicode from ufoLib.glifLib import GlyphSet from ufoLib.validators import * from ufoLib.filenames import userNameToFileName from ufoLib.converters import convertUFO1OrUFO2Ke...
codeparrot/github-code-clean