text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Human Resources Management @copyright: 2011-2012 (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
"""Tests for items views.""" import json from datetime import datetime, timedelta import ddt from mock import patch, Mock, PropertyMock from pytz import UTC from pyquery import PyQuery from webob import Response from django.http import Http404 from django.test import TestCase from django.test.client import RequestFac...
codeparrot/github-code-clean
""" Test suite. - Do not put 'mailer' in INSTALLED_APPS, it disturbs the emails counting. - Make sure these templates are accessible: registration/login.html base.html 404.html To have a fast test session, set a minimal configuration as: DATABASES = { 'default': { 'ENGINE': 'django.db.backend...
codeparrot/github-code-clean
#!/usr/bin/env python # Syntax format: (raise your hand if you know lisp :-) # # 'state0': ("file.svg", ( ( ('state1', dx, dy, T-B, L|R),), # ( ('state2', ...), ('state3', ...),), # ( ('state4', ...),), # ) ), # ) # # Translation of the abo...
codeparrot/github-code-clean
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
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 unittest import slowboy.z80 class TestZ80(unittest.TestCase): def setUp(self): self.cpu = slowboy.z80.Z80() def test_init(self): self.assertEqual(self.cpu.pc, 0x100) self.assertEqual(self.cpu.sp, 0xfffe) self.assertEqual(self.cpu.registers['a'], 0x01) self.asse...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'keyboard-ui.ui' # # Created by: PyQt5 UI code generator 5.4.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainW...
codeparrot/github-code-clean
# axle_lid.py # generates an axle_lid assembly that can complete a epicyclic-gearing. # created by charlyoleg on 2013/10/15 # # (C) Copyright 2013 charlyoleg # # This file is part of the Cnc25D Python package. # # Cnc25D is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
codeparrot/github-code-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import gevent import os import sys import socket import errno import uuid import logging import coverage import cgitb cgitb.enable(format='text') import fixtures import testtools from testtools.matchers import Equals, MismatchError, Not, Contains, L...
codeparrot/github-code-clean
# Copyright 2012, Nachi Ueno, NTT MCL, 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 # # Unles...
codeparrot/github-code-clean
# vi:et:ts=2:sw=2 import sys import re import textwrap from . import util from .util import error_result from . import debugging __doc__ = """ This module provides a full-featured pure-python framework for building tokenizing LR language parsers and interpreters for context-free grammars. (The :mod:`modgrammar` pars...
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
#!/usr/bin/env python #****************************************************************************** # $Id: gdal2tiles.py 19288 2010-04-02 18:36:17Z rouault $ # # Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/) # Support: BRGM (http://www.brgm.fr) # Purpose: Convert a raster into TMS (Tile...
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
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
codeparrot/github-code-clean
from __future__ import print_function import os import shutil import sys from tempfile import mkdtemp import time import unittest import copy import six.moves.cPickle as pickle from six.moves import xrange import numpy from nose.plugins.skip import SkipTest from nose.plugins.attrib import attr from nose.tools import a...
codeparrot/github-code-clean
"""""" import os import uuid import bz2 import pickle import traceback import zlib from abc import ABC from copy import copy,deepcopy from typing import Any, Callable from logging import INFO, ERROR from datetime import datetime from vnpy.trader.constant import Interval, Direction, Offset, Status, OrderType, Color, Ex...
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: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 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...
codeparrot/github-code-clean
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
codeparrot/github-code-clean
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
codeparrot/github-code-clean
from datetime import datetime from unittest.mock import patch from django.conf import settings from django.contrib.auth.models import User, Group from django.urls import reverse from django.shortcuts import get_object_or_404 from django.test import TestCase from zds.forum.factories import create_category_and_forum, c...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- '''Unit tests for models and their factories.''' import mock import unittest from nose.tools import * # noqa (PEP8 asserts) import pytz import datetime import urlparse import itsdangerous import random import string from dateutil import parser from modularodm import Q from modularodm.exceptio...
codeparrot/github-code-clean
# Copyright 2017 The Forseti Security 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 ap...
codeparrot/github-code-clean
import abc import binascii import codecs import datetime import logging import struct from inspect import getmro from threading import Lock from .errors import InvalidTypeError from .fields import ( WEEKDAY_NAMES, AssociatedCalendarItemIdField, Base64Field, BooleanField, CharField, CharListFiel...
codeparrot/github-code-clean
# License 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 use t...
codeparrot/github-code-clean
# Copyright 2005 Divmod, Inc. See LICENSE file for details # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._sslverify}. """ from __future__ import division, absolute_import import sys import itertools from zope.interface import implementer skipSSL = None sk...
codeparrot/github-code-clean
# mock.py # Test tools for mocking and patching. # E-mail: fuzzyman AT voidspace DOT org DOT uk # # mock 1.0.1 # http://www.voidspace.org.uk/python/mock/ # # Copyright (c) 2007-2013, Michael Foord & the mock team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modificatio...
codeparrot/github-code-clean
import os, sys, re, pybedtools, pandas, operator from collections import defaultdict import numpy as np from string import maketrans isthis = {'gt':operator.gt, 'ge':operator.ge, 'lt':operator.lt, 'le':operator.le, 'eq':operator.eq, 'ne':operator.ne} def Is(a,op,b): return isthis[op](a,b) class Sam(object): ...
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
''' Created on 6. feb. 2012 @author: pcn ''' from midi.MidiTiming import MidiTiming from configuration.EffectSettings import EffectTemplates, FadeTemplates,\ EffectImageList, TimeModulationTemplates, FadeSettings import wx from wx.lib.agw import ultimatelistctrl #@UnresolvedImport from midi.MidiModulatio...
codeparrot/github-code-clean
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
codeparrot/github-code-clean
""" Copyright 2011-2014-2012 Kyle Lancaster 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. This program is distributed in the...
codeparrot/github-code-clean
# -*- 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...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import unicode_literals import os import re import sys from .common import InfoExtractor from .youtube import YoutubeIE from ..compat import ( compat_etree_fromstring, compat_str, compat_urllib_parse_unquote, compat_urlparse, compat_xml_parse_error, ) from ..utils ...
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
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
codeparrot/github-code-clean
input = """ 1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 0 0 1 7 0 0 1 8 0 0 1 9 0 0 1 10 0 0 1 11 0 0 1 12 0 0 1 13 0 0 1 14 0 0 1 15 0 0 1 16 0 0 1 17 0 0 1 18 0 0 1 19 0 0 1 20 0 0 1 21 0 0 1 22 0 0 1 23 0 0 1 24 0 0 1 25 0 0 1 26 0 0 1 27 0 0 1 28 0 0 1 29 0 0 1 30 0 0 1 31 0 0 1 32 0 0 1 33 0 0 1 34 0 0 1 35 0 0 1 36 0 0 1...
codeparrot/github-code-clean
# file eulfedora/models.py # # Copyright 2010,2011 Emory University Libraries # # 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) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
codeparrot/github-code-clean
#*********************************************************************************************************************** #******************************************************PHASE 2 DTT****************************************************** import math def metric_statistics(actTempo, recovery, dataIncoming): activ...
codeparrot/github-code-clean
# This file is part of Androguard. # # Copyright (C) 2012/2013/2014, Anthony Desnos <desnos at t0t0.fr> # 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://...
codeparrot/github-code-clean
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # 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 ...
codeparrot/github-code-clean
#! /usr/bin/env python sources = """ eNrsvWt3HEl2IDYrP+SttVaSvV4/1yenKCozm4UkyO6ZkWq7usVhkxI13U0ePmaog4GKiaoEkINC ZjEziwA0Gh//Ap/jX7A/xR/9t3xf8czIqgK7e0b2cUtDAFURNyJu3LhxX3Hv//5Hv3v/o+TNn61v svmqPsvm87Iqu/n8/b968/fj8TiCz87K6ix69OJZlMTrpl5uFkXTxlFeLaN4UVft5pL+hl+rYtEV y+hDmUcXxc1V3SzbNAIgo9H7P3rzxzhC2y3f/2ev/9O/+tGPyst...
codeparrot/github-code-clean
#!/usr/bin/env python '''unit testing code for pysam. Execute in the :file:`tests` directory as it requires the Makefile and data files located there. ''' import pysam import unittest import os import shutil import sys import collections import subprocess import logging import array from TestUtils import checkBinaryE...
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 re import time import unittest from prometheus.collectors import Collector, Counter, Gauge, Summary from prometheus.formats import TextFormat, ProtobufFormat, ProtobufTextFormat from prometheus.pb2 import metrics_pb2 from prometheus.registry import Registry from prometheus import utils class TestTextFormat(un...
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. """Unit tests for presubmit_support.py and presubmit_canned_checks.py.""" # pylint: disable=E1101,E1103 import StringIO import fu...
codeparrot/github-code-clean
# Copyright 1998-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import division, unicode_literals __all__ = [ "vardbapi", "vartree", "dblink"] + \ ["write_contents", "tar_contents"] import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.ch...
codeparrot/github-code-clean
import datetime import re from decimal import * from operator import attrgetter from toposort import toposort, toposort_flatten from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError from django...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
codeparrot/github-code-clean
# MIT License # # Copyright (c) 2009 Gaetan Guidet # # This file is part of excons. # # 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 rig...
codeparrot/github-code-clean
''' Created on Oct 3, 2010 @author: Mark V Systems Limited (c) Copyright 2010 Mark V Systems Limited, All rights reserved. ''' import os, io, sys, traceback from collections import defaultdict from decimal import Decimal from lxml import etree from xml.sax import SAXParseException from arelle import (PackageManager, X...
codeparrot/github-code-clean
# 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 agreed to ...
codeparrot/github-code-clean
#!/usr/bin/env python """Unit tests run as PYTHONPATH=../../.. python3 ./test_valve_stack.py.""" # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file ex...
codeparrot/github-code-clean
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
codeparrot/github-code-clean
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Mads Jensen <mje.mads@gmail.com> # # License: BSD (3-clause) import copy import os.path as op import numpy as np from scipy imp...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS 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
#!/usr/bin/env python ''' uframe endpoints ''' # base from flask import jsonify, request, current_app, make_response, Response, send_file from ooiservices.app import cache, db from ooiservices.app.uframe import uframe as api from ooiservices.app.models import DisabledStreams from ooiservices.app.uframe.vocab import get...
codeparrot/github-code-clean
from __future__ import unicode_literals import unittest from django.db import connection, migrations, models, transaction from django.db.migrations.migration import Migration from django.db.migrations.state import ProjectState from django.db.models.fields import NOT_PROVIDED from django.db.transaction import atomic f...
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
# -*- coding: utf-8 -*- { "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": 'ဤအပုိင္းအတြက္ပထဝီဝင္ဧရိယာကိုသတ္မွတ္ထားေသာေနရာ။ ဤေနရာသည္အကၡရာစဥ္အလုိက္တည္ေနရာထဲမွ တစ္ခုျဖစ္ႏုိင္သည္။ သုိ႔...
codeparrot/github-code-clean
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
codeparrot/github-code-clean
#encoding:utf-8 __authors__ = ['"Liu Fei" <fei.liu@cs2c.com.cn>'] __version__ = "V0.1" ''' # ChangeLog: #--------------------------------------------------------------------------------- # Version Date Desc Author #-----------------------------------------------------...
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
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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
###ExonArrayEnsemblRules #Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California #Author Nathan Salomonis - nsalomonis@gmail.com #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 So...
codeparrot/github-code-clean
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
codeparrot/github-code-clean
import pytest import numpy as np import warnings from scipy.sparse import csr_matrix from sklearn import datasets from sklearn import svm from sklearn.utils.extmath import softmax from sklearn.datasets import make_multilabel_classification from sklearn.random_projection import sparse_random_matrix from sklearn.utils....
codeparrot/github-code-clean
"""Test whether all elements of cls.args are instances of Basic. """ # NOTE: keep tests sorted by (module, class name) key. If a class can't # be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re import warnings import io from sympy import (Basic, S, symbols, sqr...
codeparrot/github-code-clean
import unittest import numpy as np from spglib import get_symmetry from vasp import read_vasp_from_strings Al222 = """Al 1.0 8.0786564361761641 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.0786564361761641 0.0000000000000000 0.0000000000000000 0.0000000000000000 8.0786...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import datetime from collections import OrderedDict from gluon import current, A, SPAN, URL from gluon.storage import Storage from s3 import FS, IS_ONE_OF, S3DateTime, S3Method, s3_str, s3_unicode # Limit after which a checked-out resident is reported overdue (days) ABSENCE_LIMIT = 5 def c...
codeparrot/github-code-clean
# Test enhancements related to descriptors and new-style classes from test.test_support import verify, vereq, verbose, TestFailed, TESTFN, get_original_stdout, is_jython from copy import deepcopy import warnings import types if is_jython: from test_weakref import extra_collect else: def extra_collect(): ...
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. """code generator for GLES2 command buffers.""" import itertools import os import os.path import sys import re import platform fro...
codeparrot/github-code-clean
# This is Kconfiglib, a Python library for scripting, debugging, and extracting # information from Kconfig-based configuration systems. To view the # documentation, run # # $ pydoc kconfiglib # # or, if you prefer HTML, # # $ pydoc -w kconfiglib # # The examples/ subdirectory contains examples, to be run with e.g. # ...
codeparrot/github-code-clean
# # Copyright (c) 2012-2014 Jonathan Topf # # 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 # to use, copy, modify, merge, publis...
codeparrot/github-code-clean
#!/usr/bin/python """ Object """ import sys from copy import copy as _copy from collections import defaultdict from .errors import ConfigurationError, ExecutionError, \ InvalidParameterDatatype from .debugging import function_debugging, ModuleLogger, Logging from .primitivedata import Atomic, BitString, Boolean...
codeparrot/github-code-clean
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013 # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ =...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import base64 import datetime import dateutil import email import json import lxml from lxml import etree import logging import pytz import re import socket import time import xmlrpclib from email.message import Message from email.utils import formataddr from werkzeug import url_encode from op...
codeparrot/github-code-clean
""" Tests for Discussion API views """ import json from datetime import datetime from unittest import mock from urllib.parse import urlparse, urlencode import ddt import httpretty from django.urls import reverse from django.core.files.uploadedfile import SimpleUploadedFile from opaque_keys.edx.keys import CourseKey ...
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): # Changing field 'Document.guid' db.alter_column(u'source_data_document'...
codeparrot/github-code-clean
# coding: utf-8 # # Copyright 2019 The Oppia 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 requi...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Copyright 2016-2017 The Meson development team # 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
""" numpy.ma : a package to handle missing or invalid values. This package was initially written for numarray by Paul F. Dubois at Lawrence Livermore National Laboratory. In 2006, the package was completely rewritten by Pierre Gerard-Marchant (University of Georgia) to make the MaskedArray class a subclass of ndarray,...
codeparrot/github-code-clean
#### PATTERN | DB ################################################################################## # -*- coding: utf-8 -*- # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ############...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2007-2009 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 ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- ## ## # Author: Peter Manev # # peter.manev@openinfosecfoundation.org # ## ## ## !!! IMPORTANT - LATEST DEV Scapy is needed !!! # REMOVE your current scapy installation !!! # t...
codeparrot/github-code-clean
from boxbranding import getMachineBrand, getMachineName from cPickle import dump, load from os import path as os_path, stat, mkdir, makedirs, listdir, access, remove, W_OK, R_OK, F_OK from time import time from stat import ST_MTIME from enigma import eTimer, getDesktop, ePicLoad, eRCInput, getPrevAsciiCode, eEnv from ...
codeparrot/github-code-clean
#!/usr/bin/env python """ This package defines classes that simplify bit-wise creation, manipulation and interpretation of data. Classes: Bits -- An immutable container for binary data. BitArray -- A mutable container for binary data. ConstBitStream -- An immutable container with streaming methods. BitStream -- A mut...
codeparrot/github-code-clean
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Iris' data model representation of CF UGrid's Mesh and its constituent parts. Eventual destination: dedicated module in :...
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...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright 2011 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 # # ...
codeparrot/github-code-clean
# deps.py -- Portage dependency resolution functions # Copyright 2003-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals __all__ = [ 'Atom', 'best_match_to_list', 'cpvequal', 'dep_getcpv', 'dep_getkey', 'dep_getslot', 'dep_getusedeps', ...
codeparrot/github-code-clean
import commands import getpass import glob import platform import shutil import socket import tarfile import thread from collections import defaultdict from datetime import datetime import yaml from gppylib.commands.gp import SegmentStart, GpStandbyStart from gppylib.commands.unix import findCmdInPath from gppylib.op...
codeparrot/github-code-clean
import codecs import contextlib import io import locale import sys import unittest import encodings from test import support try: import ctypes except ImportError: ctypes = None SIZEOF_WCHAR_T = -1 else: SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar) def coding_checker(self, coder): def check(inp...
codeparrot/github-code-clean