text
stringlengths
5.09k
178k
domain
stringclasses
106 values
#!/usr/bin/python # # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
codeparrot/github-code-clean
""" Modulestore backed by Mongodb. Stores individual XModules as single documents with the following structure: { '_id': <location.as_dict>, 'metadata': <dict containing all Scope.settings fields> 'definition': <dict containing all Scope.content fields> 'definition.children': <list of all child locati...
codeparrot/github-code-clean
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
codeparrot/github-code-clean
# Copyright 2016 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
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta import relativedelta from openerp imp...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ This module contains functions for the computation of Euclidean, generalized Sturmian and (modified) subresultant polynomial remainder sequences (prs's). The pseudo-remainder function prem() of sympy is _not_ used by any of the functions in the module. Instead of prem() we use the function...
codeparrot/github-code-clean
# postgresql/base.py # Copyright (C) 2005-2013 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 """ .. dialect:: postgresql :name: PostgreSQL Sequences/SERIAL --------------...
codeparrot/github-code-clean
#!/usr/bin/env python # # Protein Engineering Analysis Tool DataBase (PEATDB) # Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen # # 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 ver...
codeparrot/github-code-clean
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
codeparrot/github-code-clean
# flake8: noqa # -*- coding: utf-8 -*- # transformations.py # Copyright (c) 2006, Christoph Gohlke # Copyright (c) 2006-2009, The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
codeparrot/github-code-clean
## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. ## Authors: ## Tim Waugh <twaugh@redhat.com> ## Jiri Popelka <jpopelka@redhat.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...
codeparrot/github-code-clean
#!/usr/bin/env python # CPIP is a C/C++ Preprocessor implemented in Python. # Copyright (C) 2008-2017 Paul Ross # # 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...
codeparrot/github-code-clean
import sys import string import types import cStringIO import math import copy import os import func import time import glob from var import var from p4exceptions import P4Error from node import Node, NodePart, NodeBranchPart import nexustoken from distancematrix import DistanceMatrix import numpy import pf from model...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Unit tests for LMS instructor-initiated background tasks helper functions. Tests that CSV grade report generation works with unicode emails. """ import ddt from mock import Mock, patch import tempfile import json from openedx.core.djangoapps.course_groups import cohorts import unicodecsv ...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 Univer...
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
from __future__ import absolute_import from __future__ import division from __future__ import print_function import atexit import cloudpickle as pickle import collections import colorama import copy import hashlib import inspect import json import numpy as np import os import redis import signal import sys import thre...
codeparrot/github-code-clean
''' BSD 3-Clause License Copyright (c) 2019, Donald N. Bockoven III 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 l...
codeparrot/github-code-clean
""" Module contains tools for processing Stata files into DataFrames The StataReader below was originally written by Joe Presbrey as part of PyDTA. It has been extended and improved by Skipper Seabold from the Statsmodels project who also developed the StataWriter and was finally added to pandas in a once again improv...
codeparrot/github-code-clean
import sys import numpy as np import ctypes as ct import pyopencl as cl import pyopencl.array import time import argparse FUT_BLOCK_DIM = "16" cl_group_size = np.int32(512) synchronous = False fut_opencl_src = """typedef char int8_t; typedef short int16_t; typedef int int32_t; typedef long int64_t; typede...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import warnings import sys import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, assert_allclose, assert_array_max...
codeparrot/github-code-clean
# This file is part of Invenio. # Copyright (C) 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 the Free Software Foundation; either version 2 of the # License, or (at ...
codeparrot/github-code-clean
#!/usr/bin/env python # llrp_proto.py - LLRP protocol client support # # Copyright (C) 2009 Rodolfo Giometti <giometti@linux.it> # Copyright (C) 2009 CAEN RFID <support.rfid@caen.it> # Copyright (C) 2013, 2014 Benjamin Ransford <ransford@cs.washington.edu> # # This program is free software; you can redistribute it and...
codeparrot/github-code-clean
# Licensed under a 3-clause BSD style license - see PYFITS.rst import ctypes import gc import itertools import math import re import time import warnings from contextlib import suppress import numpy as np from .base import DELAYED, ExtensionHDU, BITPIX2DTYPE, DTYPE2BITPIX from .image import ImageHDU from .table impo...
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
# Copyright 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 requi...
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/. """ A WebIDL parser. """ from ply import lex, yacc import re import os import traceback import math from collections im...
codeparrot/github-code-clean
# $Id: __init__.py 8131 2017-07-03 22:06:53Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ Open Document Format (ODF) Writer. """ VERSION = '1.0a' __docformat__ = 'reStructuredText' import sys import os import os.path import tempfile impor...
codeparrot/github-code-clean
# *** GENERATED BY antlr4, DO NOT EDIT BY HAND *** # # Generated from Autolev.g4 by ANTLR 4.7.1 # # Generated with antlr4 # antlr4 is licensed under the BSD-3-Clause License # https://github.com/antlr/antlr4/blob/master/LICENSE.txt from __future__ import print_function from antlr4 import * from io import StringIO...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # S3Hierarchy Unit Tests # # To run this script use: # python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3hierarchy.py # import unittest from lxml import etree from s3dal import Field, Query from s3.s3utils import * from s3.s3rest import s3_request from s3 import FS, S3...
codeparrot/github-code-clean
from cStringIO import StringIO import boto.exception import boto.s3.connection import boto.s3.acl import boto.s3.lifecycle import bunch import datetime import time import email.utils import isodate import nose import operator import socket import ssl import os import requests import base64 import hmac import sha import...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 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 ve...
codeparrot/github-code-clean
import os import sys import wx import wx.lib.scrolledpanel as scrolled #class ctrl_pnl(wx.Panel): # # # def __init__( self, parent ): # shared_data = parent.shared_data # wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, style = wx.TAB_TRAVERSAL ) # self.SetBackgroundColour((150,230,170...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """A class representing a window for displaying one or more stimuli""" # Part of the PsychoPy library # Copyright (C) 2018 Jonathan Peirce # Distributed under the terms of the GNU General Public License (GPL). from __future__ import absolute_import, division, print_funct...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2015 GEM Foundation # # The Catalogue Toolkit 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 ...
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
# 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
# Zulip's main markdown implementation. See docs/subsystems/markdown.md for # detailed documentation on our markdown syntax. import datetime import functools import html import logging import os import re import time import urllib import urllib.parse from collections import defaultdict, deque from dataclasses import d...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
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
from common_fixtures import * # NOQA from cattle import ApiError import yaml from netaddr import IPNetwork, IPAddress def _create_stack(client): env = client.create_environment(name=random_str()) env = client.wait_success(env) assert env.state == "active" return env def _create_stack_long_name(clie...
codeparrot/github-code-clean
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import operator import warnings import sys import decimal import types from fractions import Fraction import pytest import numpy as np from numpy import ma from numpy.testing import ( assert_, assert_equal, assert_array_equal, assert_almost_equal, ...
codeparrot/github-code-clean
# Copyright 2017 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 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/python2.4 from __future__ import division """Diff Match and Patch Copyright 2018 The diff-match-patch Authors. https://github.com/google/diff-match-patch 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 o...
codeparrot/github-code-clean
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '\ " update\ " \ " field1=\'newvalue\'\ " 와 같은 선택적 표현식입니다. 갱신하거나 조인의 결과를 삭제할 수 없습니다.', '# of International Staff': '# 국제 직원', '# of National Staff': '# 자국 인력을', '# of Vehicles': '# vehicl...
codeparrot/github-code-clean
#******************************************************************************** #* Dionaea #* - catches bugs - #* #* #* #* Copyright (C) 2010 Markus Koetter & Tan Kean Siong #* Copyright (C) 2009 Paul Baecher & Markus Koetter & Mark Schloesser #* #* This prog...
codeparrot/github-code-clean
import types import inspect import collections import itertools import pytest import ramda as R from ramda.shared import eq from .common import list_xf, get_arity, _is_transformer try: from collections.abc import Callable, Iterable except ImportError: from collections import Callable, Iterable @pytest.fixture...
codeparrot/github-code-clean
import multiprocessing as MP import itertools as IT import progressbar as PGB import os, warnings import numpy as NP import healpy as HP from astropy.table import Table from astropy.io import fits, ascii import h5py import warnings from astropy.coordinates import Angle, SkyCoord from astropy import units import scipy.c...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import re from abc import abstractmethod from warnings import warn from datetime import timedelta, datetime from urllib.parse import urlparse, urlunparse from luckydonaldUtils.logger import logging from luckydonaldUtils.encoding import unicode_type, to_unicode as u, to_native as n ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2009 Jaap Karssenberg <jaap.karssenberg@gmail.com> from __future__ import with_statement import tests from zim.fs import File, Dir from zim.formats import wiki, ParseTree from zim.notebook import Path from zim.gui.pageview import * from zim.config import SectionedConfigDict, Vir...
codeparrot/github-code-clean
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire X (FoFiX) # # Copyright (C) 2006 Sami Kyöstilä ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- #!/usr/bin/env python # -*- coding: utf-8 -*- # librairies #from __future__ import absolute_import, division, print_function, unicode_literals import evdev import time import datetime import io import os import subprocess import pigpio import codecs import sys import threading import Tkinter fr...
codeparrot/github-code-clean
# partitioning.py # Disk partitioning functions. # # Copyright (C) 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any...
codeparrot/github-code-clean
## ## command.py ## Login : David Rousselie <dax@happycoders.org> ## Started on Wed Jun 27 08:23:04 2007 David Rousselie ## $Id$ ## ## Copyright (C) 2007 David Rousselie ## 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 ## th...
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 -*- # # 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 Lice...
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
# # @file TestSBase_newSetters.py # @brief SBase unit tests for new set API # # @author Akiya Jouraku (Python conversion) # @author Sarah Keating # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting ...
codeparrot/github-code-clean
r""" Finite difference solution of the 2D wave equation for isotropic media. Solutions are implemented as simulation classes taking advantage of Object Orientation. They have Rich Display features of IPython Notebook and use the HDF5 file format to store and persist the simulation objects. **Sources** * :class:`~fat...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import sys from concurrent.futures import ThreadPoolExecutor, as_completed from decimal import Decimal from itertools import product from math import gcd import warnings import pytest from pytest import raises as assert_raises from numpy.testing import ( assert_equal, assert_almost_equ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com> # # Copyright (c) 2017 Tom Kralidis # Copyright (c) 2016 James F. Dickens # Copyright (c) 2017 Ricardo Garcia Sil...
codeparrot/github-code-clean
""" Compiled Java classes parser. Author: Thomas de Grenier de Latour (TGL) <degrenier@easyconnect.fr> Creation: 2006/11/01 Last-update: 2016/08/16 Introduction: * This parser is for compiled Java classes, aka .class files. What is nice with this format is that it is well documented in the official Java VM specs...
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 us...
codeparrot/github-code-clean
# Copyright 2012 IBM Corp. # 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/licenses/LICENSE-2.0 # # Unless r...
codeparrot/github-code-clean
# # Unit tests for the multiprocessing package # import unittest import queue as pyqueue import time import io import itertools import sys import os import gc import errno import signal import array import socket import random import logging import struct import operator import test.support import test.script_helper ...
codeparrot/github-code-clean
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 limitation the rights ...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2012 the V8 project 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: # # * Redistributions of source code must retain the above copyright # noti...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Test the support for SSL and sockets import sys import unittest from test import test_support as support import asyncore import socket import select import time import datetime import gc import os import errno import pprint import tempfile import urllib2 import traceback import weakref import...
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
""" Test split modulestore w/o using any django stuff. """ from mock import patch import datetime from importlib import import_module from path import Path as path import random import re import unittest import uuid from contracts import contract from nose.plugins.attrib import attr from django.core.cache import g...
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
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2021 PyMeasure Developers # # 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 limit...
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 ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Python API object representation of the Tanium SOAP API. Each of these objects is either dynamically generated from the Tanium SOAP API WSDL or dynamically generated from a manual WSDL definition file. * Generated on: 2017-03-27 at 18:29:09 UTC * Generated from WSDL file: console-7.0.314.63...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """Test IAPWS mopdule.""" from math import log import sys import unittest from iapws.iapws97 import (IAPWS97, IAPWS97_Tx, IAPWS97_Px, IAPWS97_Ph, IAPWS97_Ps, IAPWS97_PT) from iapws.iapws97 import (_Region1, _Region2, _Region3, _Region5, ...
codeparrot/github-code-clean
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright(C) 2011,2012,2013,2014 by Abe developers. # This program 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 # License, or (at your option) any lat...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import fedmsg.tests.test_meta import arrow class TestPagureConglomeratorByIssueAndPR( fedmsg.tests.test_meta.ConglomerateBase): expected = [ { 'categories': set(['pagure']), 'end_time': 1458308863.0, 'human_time': arrow.get(1458307676).huma...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # pylast - A Python interface to Last.fm (and other API compatible social networks) # # Copyright 2008-2010 Amr Hassan # # 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 a...
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
# Copyright 2013 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 requ...
codeparrot/github-code-clean
# Copyright 2013 VMware, 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 a...
codeparrot/github-code-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
codeparrot/github-code-clean
from __future__ import unicode_literals import datetime import pickle from operator import attrgetter from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import DEFAULT_DB_ALIAS, connections, router, transaction from ...
codeparrot/github-code-clean
# This is a slightly modified version of the doctest.py that shipped with Python 2.5 # It incorporates changes that have been submitted to the Python ticket tracker # as ticket #1521051. These changes allow for a DoctestRunner and Doctest base # class to be specified when constructing a DoctestSuite. # Module doctest....
codeparrot/github-code-clean
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
codeparrot/github-code-clean
#!/usr/bin/env python3 import os import shutil import unittest import create_and_write_file import mvtools_test_fixture import path_utils import mvtools_envvars import dsl_type20 def getcontents(filename): if not os.path.exists(filename): return None contents = "" with open(filename) as f: ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- { '# of International Staff': '# جهانی کارمندان', '# of National Staff': '# ملی کارمندان', '# selected': '# انتخاب شوی', '%(app)s not installed. Ask the Server Administrator to install on Server.': 'د %(app)s نصب شوی نه دی. د سرور د اداری څخه وپښتی چی نصب کړی په سرور کی', '%(count)s Roles of the...
codeparrot/github-code-clean
#!/usr/bin/env python # pylint: disable=E1101 """ Implement classes to represent the progress of a task. Use the ProgressbarText class for tasks that do not use multiprocessing, and the ProgressbarMultiProcessServer class for tasks using multiprocessing. Basically, the task code must call the "progress" function to ...
codeparrot/github-code-clean
from skin import parseColor, parseFont from Components.config import config, ConfigClock, ConfigInteger, ConfigSubsection, ConfigYesNo, ConfigSelection, ConfigSelectionNumber from Components.Pixmap import Pixmap from Components.Button import Button from Components.ActionMap import HelpableActionMap from Components.GUIC...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Fields: - simple - relations (one2many, many2one, many2many) - function Fields Attributes: * _classic_read: is a classic sql fields * _type : field type * _auto_join: ...
codeparrot/github-code-clean
#!/usr/bin/python import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") import procgame.game, sys, os import procgame.config import random import procgame.sound sys.path.insert(0,os.path.pardir) import bingo_emulator.common.units as units import bingo_em...
codeparrot/github-code-clean
""" Cisco_IOS_XR_subscriber_pppoe_ma_oper This module contains a collection of YANG definitions for Cisco IOS\-XR subscriber\-pppoe\-ma package operational data. This module contains definitions for the following management objects\: pppoe\: PPPoE operational data Copyright (c) 2013\-2016 by Cisco Systems, Inc. A...
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
# -*- coding: utf-8 -*- ''' author: Jimmy contact: 234390130@qq.com file: __init__.py.py time: 2017/8/28 下午12:50 description: https://git.oschina.net/hubert28/at_py ''' __author__ = 'Jimmy' from ctp.ctp_struct import * import os import sys import platform def isWindowsSystem(): return...
codeparrot/github-code-clean
from __future__ import absolute_import from unittest import TestCase, skip from ccdproc import CCDData from astropy.convolution import convolve, Gaussian1DKernel, Box1DKernel from astropy.io import fits from astropy.modeling import Model from astropy.modeling import (models, fitting) impo...
codeparrot/github-code-clean
""" This module defines the SArray class which provides the ability to create, access and manipulate a remote scalable array object. SArray acts similarly to pandas.Series but without indexing. The data is immutable, homogeneous, and is stored on the GraphLab Server side. """ ''' Copyright (C) 2015 Dato, Inc. All rig...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB ...
codeparrot/github-code-clean