text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# -*- coding: utf-8 -*- """Objects representing MediaWiki families.""" # # (C) Pywikibot team, 2004-2015 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' # import sys import logging import re import collections import imp import strin...
codeparrot/github-code-clean
################################################################################ # Copyright (C) 2012-2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ This module contains VMP nodes for Gaussian Markov chains. ""...
codeparrot/github-code-clean
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2019 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
codeparrot/github-code-clean
# # Parse tree nodes # from __future__ import absolute_import import cython cython.declare(sys=object, os=object, copy=object, Builtin=object, error=object, warning=object, Naming=object, PyrexTypes=object, py_object_type=object, ModuleScope=object, LocalScope=object, ClosureScope=obje...
codeparrot/github-code-clean
# Author: Travis Oliphant, 2002 # # Further enhancements and tests added by numerous SciPy developers. # from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.random import RandomState from numpy.testing import (assert_array_equal, assert_almost_equal, ass...
codeparrot/github-code-clean
"""Tools for working with epoched data""" # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Denis Engemann <denis.engemann@gmail.com> # Mainak Jas <mainak@neuro...
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 -*- ############################################################################## # # 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
# 作者:Forec # 最后修改日期:2016-12-20 # 邮箱:forec@bupt.edu.cn # 关于此文件:此文件包含了服务器除认证外的所有的界面入口,包括首页、云盘界面、 # 文件操作、下载、聊天模块、管理员界面等。 # 蓝本:main import os, random, shutil, zipfile, os.path from config import basedir from datetime import datetime, timedelta from sqlalchemy import or_, and_, text from flask ...
codeparrot/github-code-clean
import sys import os import struct import platform import signal from subprocess import check_output from ctypes import * from ctypes.wintypes import * ######################################################################################### #######################################Shellcodes############################...
codeparrot/github-code-clean
#!coding: utf-8 """SQLite-specific tests.""" import datetime import json import os from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import column from sqlalchemy import Computed from sqlalchemy import create_engine from s...
codeparrot/github-code-clean
from __future__ import print_function, division from collections import defaultdict import copy import re import string import math from sympy import (MatMul, MatAdd, Basic, MatrixExpr, MatrixSymbol, ZeroMatrix, Symbol, Identity, Transpose, Inverse, Number, Rational, ln, Determinant, pi, sympify, s...
codeparrot/github-code-clean
""" Low-level implementations for the external functions of the 'os' module. """ # Implementation details about those functions # might be found in doc/rffi.txt import os, sys, errno import py from rpython.rtyper.module.support import ( UNDERSCORE_ON_WIN32, _WIN32, StringTraits, UnicodeTraits) from rpython.tool.s...
codeparrot/github-code-clean
# see credits.txt aliceblue = "#F0F8FF" antiquewhite = "#FAEBD7" aqua = "#00FFFF" aquamarine = "#7FFFD4" azure = "#F0FFFF" beige = "#F5F5DC" bisque = "#FFE4C4" blanchedalmond = "#FFEBCD" blue = "#0000FF" blueviolet = "#8A2BE2" brown = "#A52A2A" burlywood = "#DEB887" cadetblue = "#5F9EA0" chocolate = "#D2691E" coral = ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2008, 2009, 2010, 2011, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Licens...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.7.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\xcb\x88\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x02\x00\x0...
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. from collections import defaultdict from itertools import groupby import operator import re ...
codeparrot/github-code-clean
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2022 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
codeparrot/github-code-clean
import numpy as n import seaborn as sns import sys import random import pylab as p import math as m from matplotlib.backends.backend_pdf import PdfPages import scipy.signal as sig import lmfit as lm print 'lm version',lm.__version__ import csv from matplotlib import mlab as ml import matplotlib.ticker as mticker from m...
codeparrot/github-code-clean
from __future__ import print_function from future.standard_library import install_aliases install_aliases() from builtins import str from past.builtins import basestring from builtins import object, bytes import copy from datetime import datetime, timedelta import functools import getpass import imp import jinja2 impor...
codeparrot/github-code-clean
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
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
# -*- coding: utf-8 -*- # Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. from __future__ import unicode_literals import os import re import copy import shutil import tempfile import threading import time import unittest import warnings from django.conf import settings ...
codeparrot/github-code-clean
import operator import warnings from collections.abc import Iterator, Sequence from functools import partial, wraps from numbers import Integral, Number from operator import getitem from pprint import pformat import numpy as np import pandas as pd from pandas.api.types import ( is_bool_dtype, is_datetime64_any...
codeparrot/github-code-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides a variety of device interactions based on adb. Eventually, this will be based on adb_wrapper. """ # pylint: disable=unused-argument import coll...
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): # Flag to indicate if this migration is too risky # to run online and needs to be coordinated for offline ...
codeparrot/github-code-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE specification = {} # # ############################# Residential ############################## # specification['residential'] = { 1: # residential sub_model for 1 unit [ # ...
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/python2.5 # # Copyright 2010 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 or...
codeparrot/github-code-clean
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
codeparrot/github-code-clean
lastevent = 0 osclo = 0 oscltn = 0 oscli = 0 osdao = 0 osdatn = 0 osdai = 0 bitnum = 0 databyte = 0 def reportEvent(v, timestamp): global osclo global oscltn global oscli global osdao global osdatn global osdai global lastevent global bitnum global databyte sclo = (v & 0x80000...
codeparrot/github-code-clean
# Version: 0.18 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy * [![Latest Version] ...
codeparrot/github-code-clean
"""Header value parser implementing various email-related RFC parsing rules. The parsing methods defined in this module implement various email related parsing rules. Principal among them is RFC 5322, which is the followon to RFC 2822 and primarily a clarification of the former. It also implements RFC 2047 encoded w...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright (c) 2014-Present Pivotal Software, Inc. # import os import re import shutil import unittest from collections import defaultdict from gppylib.gpversion import GpVersion from gppylib.commands.base import Command, CommandResult, ExecutionError from mock import patch, MagicMock, Mock, m...
codeparrot/github-code-clean
import copy import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.checks import ( BaseModelAd...
codeparrot/github-code-clean
""" This file started life as cvtypes.py with the following header (that I can't read) Wrapper-Modul cvtypes.py zur Verwendung der OpenCV-Bibliothek beta5 unter Python, wobei der Zugriff ueber ctypes erfolgt. Autor: Michael Otto To do: noch fehlende Strukturen wrappen (z. B. CvKalman) noch fehlende Konstanten w...
codeparrot/github-code-clean
"""Tests for the pynetdicom.pdu module.""" from datetime import datetime from io import BytesIO import logging import sys import time import pytest from pydicom.uid import UID from pynetdicom import AE, evt, Association, _config from pynetdicom.events import Event from pynetdicom.pdu import ( A_ASSOCIATE_RQ, A_...
codeparrot/github-code-clean
# Copyright (C) 2008 Dejan Muhamedagic <dmuhamedagic@suse.de> # # 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.1 of the License, or (at your option) any later version. # # ...
codeparrot/github-code-clean
#! /usr/bin/env python # MMapArea.py # This file is part of CharTr # # Copyright (C) 2006 - Don Scorgie <Don@Scorgie.org> (labyrinth part) # Copyright (C) 2008 - Nicolas Bigeard <ga6ri3l@gmail.com> # CharTr is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
codeparrot/github-code-clean
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import unittest, copy, time from frappe.utils import nowdate, flt, getdate, cint from frappe.model.dynamic_links import get_dynamic_link_...
codeparrot/github-code-clean
#!/usr/bin/env python """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 <htt...
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
# 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
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
codeparrot/github-code-clean
""" Cisco_IOS_XR_ip_ntp_admin_oper This module contains a collection of YANG definitions for Cisco IOS\-XR ip\-ntp package admin\-plane operational data. This module contains definitions for the following management objects\: ntp\: NTP admin operational data Copyright (c) 2013\-2016 by Cisco Systems, Inc. All rig...
codeparrot/github-code-clean
#!/usr/bin/python2 # # Copyright 2017 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # generate_entry_points.py: # Generates the OpenGL bindings and entry point layers for ANGLE. # NOTE: don't run this script di...
codeparrot/github-code-clean
#!/usr/bin/python # # (c) 2017, Dario Zanzico (git@dariozanzico.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'suppor...
codeparrot/github-code-clean
# python version 1.0 DO NOT EDIT # # Generated by smidump version 0.4.8: # # smidump -f python RITTAL-CMC-III-MIB FILENAME = "RITTAL-CMC-III-MIB.mib" MIB = { "moduleName" : "RITTAL-CMC-III-MIB", "RITTAL-CMC-III-MIB" : { "nodetype" : "module", "language" : "SMIv2", "organization...
codeparrot/github-code-clean
# -*- coding: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> * #* ...
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
#coding: utf8 __author__ = "André Ricardo Dantas Bezerra" from OpenGL.GLUT import * from OpenGL.GLU import * from OpenGL.GL import * import sys from collections import deque from random import randint import pyaudio import wave import threading file = wave.open("rubik2.wav","rb") audio=file.readframes(file.getnframes(...
codeparrot/github-code-clean
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google 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 2 of the License, or # (at your option) any later...
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
from django.db import models from instruments.base import BaseTable class Norwegian_WG(BaseTable): item_1_choices = [('yes', 'yes'), ('no', 'no')] item_1 = models.CharField(max_length=3, choices=item_1_choices, null=True) item_2_choices = [('yes', 'yes'), ('no', 'no')] item_2 = models.CharField(max_le...
codeparrot/github-code-clean
# Copyright 2011 Marek Schmidt # # This file is part of ManaClash # # ManaClash 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. # # Ma...
codeparrot/github-code-clean
"""pxdom - stand-alone embeddable pure-Python DOM implementation Fully-compliant with DOM Level 3 Core/XML and Load/Save Recommendations. Includes pure-Python non-validating parser. """ __version__= 1,6 __author__= 'Andrew Clover <and@doxdesk.com>' __date__= 2008,5,1 __all__= ['getDOMImplementation', 'getDOMImplement...
codeparrot/github-code-clean
# coding=utf-8 ##Copyright (C) [2005] [Jürgen Hamel, D-32584 Löhne] ##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. ##Thi...
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) Jean-Paul Calderone # See LICENSE for details. """ Unit tests for :py:obj:`OpenSSL.SSL`. """ from gc import collect, get_referrers from errno import ECONNREFUSED, EINPROGRESS, EWOULDBLOCK, EPIPE, ESHUTDOWN from sys import platform, getfilesystemencoding from socket import SHUT_RDWR, error, socket from...
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
# -*- 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 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 (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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: # # 1. Redistributions of source code must retain the above ...
codeparrot/github-code-clean
import sys from operator import getitem import pandas as pd import pandas.util.testing as tm import numpy as np import pytest import dask from dask.async import get_sync from dask import delayed from dask.utils import raises, ignoring, put_lines import dask.dataframe as dd from dask.dataframe.core import (repartitio...
codeparrot/github-code-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from . import steps RESULTS_URL = 'https://chromeperf.appspot.com' SPEC = { 'settings': { 'build_gs_bucket': 'chromium-fyi-archive', }, 'builders...
codeparrot/github-code-clean
# # Widgets.py -- wrapped HTML widgets and convenience functions # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import os.path import threading import time import json import asyncio from functools import reduce from ginga.misc import Callback, Bunch, Se...
codeparrot/github-code-clean
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. # 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 Li...
codeparrot/github-code-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ FTP tests. """ import os import errno from io import BytesIO import getpass import string import random from zope.interface import implementer from zope.interface.verify import verifyClass from twisted.trial import unittest from twisted.cre...
codeparrot/github-code-clean
body = str(""" <table class="datadisplaytable" summary="This table lists all course detail for the selected term." width="100%"> <tbody><tr> <td class="nttitle" scope="colgroup"><a href="/pls/bprod/bwckctlg.p_disp_course_detail?cat_term_in=201602&amp;subj_code_in=CS&amp;crse_numb_in=1100">CS 1100 - Freshman Leap Se...
codeparrot/github-code-clean
# Copyright 2005 Duke University # Copyright (C) 2012-2016 Red Hat, 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 2 of the License, or # (at your option) any later versio...
codeparrot/github-code-clean
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google 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 2 of the License, or # (at your option) any later versi...
codeparrot/github-code-clean
# (C) British Crown Copyright 2010 - 2018, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Note.is_pending_approval' db.add_column(u'catalog_note', 'is_pending_approval', ...
codeparrot/github-code-clean
################# WARNING ################ # The below part is generated automatically through: # d2lbook build lib # Don't edit it directly import collections import hashlib import math import os import random import re import shutil import sys import tarfile import time import zipfile from collections import ...
codeparrot/github-code-clean
from dataclasses import dataclass import os import sys import time from typing import Any, Dict, List, Optional, Tuple from unittest.mock import patch, Mock import pytest import ray from ray.actor import ActorHandle from ray.serve.common import ( DeploymentConfig, DeploymentInfo, DeploymentStatus, Rep...
codeparrot/github-code-clean
# Copyright 2016 Joel Dunham # # 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 writi...
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 division from collections import Counter from contextlib import contextmanager from datetime import datetime from functools import wraps import locale import os import re from shutil import rmtree import string import subprocess import sys import tempfile import traceback import warnings import...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import os import socket from datetime import datetime, timedelta from decimal import Decimal from django.conf import settings from django.core.files.storage import default_storage as storage from django.core.files import temp import mock import waffle from jingo.helpers import date...
codeparrot/github-code-clean
from sympy import ( acos, Add, atan, besselsimp, binomial, collect, collect_const, combsimp, cos, cosh, cot, coth, count_ops, Derivative, diff, Dummy, E, Eq, erf, exp, exp_polar, expand, factor, factorial, FallingFactorial, Float, fraction, Function, gamma, GoldenRatio, hyper, hyper, hypersimp, I, Integ...
codeparrot/github-code-clean
# encoding: utf-8 """ ancient.py Created by Thomas Mangin on 2009-08-25. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import os import sys import stat import time import socket import shlex from copy import deepcopy from struct import pack from exabgp.util.ip import isipv4 from exabgp.configurati...
codeparrot/github-code-clean
# Copyright (c) 2003-2015 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Description: # IEEE 802.11 Network packet codecs. # # Author: # Gustavo Moreira import struct impo...
codeparrot/github-code-clean
# coding: utf-8 import cgi import collections import errno import os import shutil import signal import socket import sys import tempfile import traceback import eventlet from eventlet import debug from eventlet import event from eventlet import greenio from eventlet import greenthread from eventlet import support fro...
codeparrot/github-code-clean
# cython: language_level = 2 # # Code output module # from __future__ import absolute_import import cython cython.declare(os=object, re=object, operator=object, Naming=object, Options=object, StringEncoding=object, Utils=object, SourceDescriptor=object, StringIOTree=object, ...
codeparrot/github-code-clean
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Various small unit tests import io import json import xml.etree.ElementTree from youtube_dl.u...
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
#!/usr/bin/env python3 # 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. '''python3 %(prog)s [options] Pass at least: --chrome-version-file <path to src/chrome/VERSION> or --all-chrome-versions --target-...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'HMI.ui' # # Created: Mon May 22 20:52:22 2017 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeE...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # copy fom wikipedia zh2Hant = { '呆': '獃', "打印机": "印表機", '帮助文件': '說明檔案', "画": "畫", "板": "板", "表": "表", "才": "才", "丑": "醜", "出": "出", "淀": "澱", "冬": "冬", "范": "範", "丰": "豐", "刮": "刮", "后": "後", "胡": "胡", "回": "回", "伙": "夥", "姜": "薑", "借": "借", "克": "克", "困": "困", "漓": "漓", "里": "里", "帘": "簾", "...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id: vboxshell.py 109861 2016-08-09 19:04:34Z bird $ """ VirtualBox Python Shell. This program is a simple interactive shell for VirtualBox. You can query information and issue commands from a simple command line. It also provides you with examples on how to use Virtua...
codeparrot/github-code-clean
# Portions Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # util.py - Mercurial utility functions and platform specific implementations # # Copyright 2005 K. Thananchayan <thananck@yahoo.com> # Cop...
codeparrot/github-code-clean
import unittest from test import support from itertools import * from weakref import proxy from decimal import Decimal from fractions import Fraction import sys import operator import random from functools import reduce maxsize = support.MAX_Py_ssize_t minsize = -maxsize-1 def lzip(*args): return list(zip(*args)) ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin classe per la gestione delle relazioni (intersezioni, tangenza, perpendicolarità, minima distanza) tra oggetti geometrici di base: linea , arco, arco di ellisse, cerchio,...
codeparrot/github-code-clean
import pprint import sys import itertools import simpy import copy import random import time, timeit import gc from operator import itemgetter, attrgetter, methodcaller import operator import numpy as np from collections import OrderedDict import networkx as nx #from __future__ import print_function from sys import ...
codeparrot/github-code-clean
"""Header value parser implementing various email-related RFC parsing rules. The parsing methods defined in this module implement various email related parsing rules. Principal among them is RFC 5322, which is the followon to RFC 2822 and primarily a clarification of the former. It also implements RFC 2047 encoded w...
codeparrot/github-code-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import resource import socket import fixtures import subprocess from util import retry from mockredis import mockredis from mockkafka import mockkafka import redis import urllib2 import copy import os import json import gevent import datetime from fc...
codeparrot/github-code-clean
from copy import copy, deepcopy from textwrap import dedent try: import cPickle as pickle except ImportError: import pickle try: import dask.array as da except ImportError: pass import numpy as np import pandas as pd from xarray import (align, broadcast, concat, conventions, backends, Dataset, ...
codeparrot/github-code-clean
# -*- 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 License, Version 2.0 (the #...
codeparrot/github-code-clean
#!/usr/bin/env python ''' magic.py determines a file type by its magic number (C)opyright 2000 Jason Petrone <jp_py@jsnp.net> All Rights Reserved Command Line Usage: running as `python magic.py file` will print a description of what 'file' is. Module Usage: magic.whatis(data): when pa...
codeparrot/github-code-clean
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
codeparrot/github-code-clean