repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
boegel/easybuild-easyblocks
easybuild/easyblocks/l/libsmm.py
1
8121
## # Copyright 2009-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
indrajitr/ansible-modules-extras
system/svc.py
45
9868
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
gpl-3.0
losywee/rethinkdb
external/v8_3.30.33.16/tools/check-name-clashes.py
42
2977
#!/usr/bin/env python # Copyright 2014 the V8 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. import js2c import os import re import sys FILENAME = "src/runtime/runtime.h" LISTHEAD = re.compile(r"#define\s+(\w+LIST\w*)\((\w+)\...
agpl-3.0
frdb194/ubuntu-tweak
ubuntutweak/settings/ccm/Utils.py
5
12852
# -*- coding: UTF-8 -*- # 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 tha...
gpl-2.0
Gabotero/GNURadioNext
gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py
348
19286
#!/usr/bin/env python # # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # import sys import getopt from string import lower as str_lower from xml.dom import minidom from xml.dom import Node # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these metho...
gpl-3.0
dglazkov/karma
scripts/travis_after_all.py
93
3418
import os import json import time import logging try: import urllib.request as urllib2 except ImportError: import urllib2 log = logging.getLogger("travis.leader") log.addHandler(logging.StreamHandler()) log.setLevel(logging.INFO) TRAVIS_JOB_NUMBER = 'TRAVIS_JOB_NUMBER' TRAVIS_BUILD_ID = 'TRAVIS_BUILD_ID' POL...
mit
zlfben/gem5
tests/configs/realview64-simple-timing-dual.py
33
2400
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
Azure/azure-sdk-for-python
sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_table_operations.py
1
57693
# 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 ...
mit
verma-varsha/zulip
zerver/lib/push_notifications.py
1
17986
from __future__ import absolute_import import base64 import binascii from functools import partial import logging import os import time import random from typing import Any, Dict, List, Optional, SupportsInt, Text, Union, Type from apns2.client import APNsClient from apns2.payload import Payload as APNsPayload from d...
apache-2.0
dragonzkiller/daytona-kernel
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
xiaoleigua/linux
tools/perf/scripts/python/syscall-counts-by-pid.py
1996
2105
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
MaximNevrov/neutron
neutron/tests/unit/extensions/test_external_net.py
3
8902
# Copyright (c) 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...
apache-2.0
delph-in/pydelphin
delphin/vpm.py
1
6574
""" Variable property mapping (VPM). """ import re from pathlib import Path from delphin.exceptions import PyDelphinSyntaxError from delphin import variable # Default modules need to import the PyDelphin version from delphin.__about__ import __version__ # noqa: F401 _LR_OPS = set(['<>', '>>', '==', '=>']) _RL_OPS...
mit
dessHub/bc-14-online-store-application
flask/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py
384
6309
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import base from .. import _ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
gpl-3.0
sbaks0820/bitcoin
test/functional/segwit.py
5
40015
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the SegWit changeover logic.""" from test_framework.test_framework import BitcoinTestFramework from te...
mit
ddworken/pyethereum
ethereum/specials.py
2
2585
import bitcoin from ethereum import utils, opcodes from ethereum.utils import safe_ord, decode_hex from rlp.utils import ascii_chr ZERO_PRIVKEY_ADDR = decode_hex('3f17f1962b36e491b30a40b2405849e597ba5fb5') def proc_ecrecover(ext, msg): # print('ecrecover proc', msg.gas) OP_GAS = opcodes.GECRECOVER gas_co...
mit
xuru/pyvisdk
pyvisdk/do/cluster_config_spec.py
1
1153
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def ClusterConfigSpec(vim, *args, **kwargs): '''A complete cluster configuration. All fie...
mit
blakejakopovic/OpenBazaar
node/trust.py
13
1841
import logging import bitcoin import obelisk from twisted.internet import reactor from dnschain import server as DNSChainServer from node import constants _LOG = logging.getLogger('trust') TESTNET = False def burnaddr_from_guid(guid_hex): _LOG.debug("burnaddr_from_guid: %s", guid_hex) prefix = '6f' if TES...
mit
isaac-philip/loolu
common/django/core/files/utils.py
901
1230
class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file """ encoding = property(la...
mit
ominux/personfinder
tests/test_create.py
19
1290
# 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 agreed to in writing,...
apache-2.0
pearsonlab/nipype
nipype/interfaces/fsl/tests/test_auto_RobustFOV.py
10
1116
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..utils import RobustFOV def test_RobustFOV_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True,...
bsd-3-clause
a10networks/a10sdk-python
a10sdk/core/gslb/gslb_policy_capacity.py
2
1636
from a10sdk.common.A10BaseClass import A10BaseClass class Capacity(A10BaseClass): """Class Description:: Select Service-IP for the device having highest available connection capacity. Class capacity supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` cl...
apache-2.0
sbalde/edx-platform
lms/djangoapps/courseware/field_overrides.py
72
9014
""" This module provides a :class:`~xblock.field_data.FieldData` implementation which wraps an other `FieldData` object and provides overrides based on the user. The use of providers allows for overrides that are arbitrarily extensible. One provider is found in `courseware.student_field_overrides` which allows for fi...
agpl-3.0
MostafaGazar/tensorflow
tensorflow/user_ops/duplicate_op_test.py
146
1303
# 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...
apache-2.0
tequa/ammisoft
ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/site-packages/matplotlib/backends/backend_macosx.py
10
7837
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import os from matplotlib._pylab_helpers import Gcf from matplotlib.backend_bases import FigureManagerBase, FigureCanvasBase, \ NavigationToolbar2, TimerBase from matplotlib.backend_bases impor...
bsd-3-clause
joneskoo/sikteeri
membership/billing/pdf.py
1
18084
# -*- coding: utf-8 -*- """ Code to make pdf bills and reminders """ from membership.reference_numbers import barcode_4 from membership.utils import group_iban, group_reference from django.conf import settings import os from decimal import Decimal from datetime import datetime, timedelta from reportlab.pdfgen imp...
mit
Cisco-Talos/pyrebox
volatility/volatility/plugins/overlays/windows/hibernate_vtypes.py
58
7674
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribu...
gpl-2.0
rebost/django
tests/regressiontests/admin_custom_urls/models.py
42
1467
from functools import update_wrapper from django.contrib import admin from django.db import models class Action(models.Model): name = models.CharField(max_length=50, primary_key=True) description = models.CharField(max_length=70) def __unicode__(self): return self.name class ActionAdmin(admin....
bsd-3-clause
hnq90/pytaku
vendor.py
142
2812
# # Copyright 2014 Jon Wayne Parrott, [proppy], Michael R. Bernstein # # 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 ...
gpl-3.0
vianuevm/findingnorris
flask/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.py
559
13598
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Class representing the list of files in a distribution. Equivalent to distutils.filelist, but fixes some problems. """ import fnmatch import logging import os import re from . import DistlibEx...
mit
brefsdal/sherpa
sherpa/plot/tests/test_plot.py
1
18867
#_PYTHON_INSERT_SAO_COPYRIGHT_HERE_(2007)_ #_PYTHON_INSERT_GPL_LICENSE_HERE_ import numpy from sherpa.all import * #FIXME change from full import from sherpa.utils import SherpaTestCase, needs_data _datax = numpy.array( [ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 1...
gpl-2.0
keedio/sahara
sahara/service/edp/oozie/workflow_creator/workflow_factory.py
4
11785
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
h3biomed/ansible-modules-core
cloud/rackspace/rax_cdb.py
13
8278
#!/usr/bin/python -tt # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distrib...
gpl-3.0
mpasternak/pyglet-fix-issue-518-522
tools/epydoc/epydoc/markup/javadoc.py
8
9987
# # javadoc.py: javadoc docstring parsing # Edward Loper # # Created [07/03/03 12:37 PM] # $Id: javadoc.py 1444 2007-02-10 19:26:54Z dvarrazzo $ # """ Epydoc parser for U{Javadoc<http://java.sun.com/j2se/javadoc/>} docstrings. Javadoc is an HTML-based markup language that was developed for documenting Java APIs with ...
bsd-3-clause
gokhanettin/driverless-rccar
station/deeprccar/model.py
1
18785
#!/usr/bin/env python # -*- coding: utf-8 -*- import functools import numpy as np import tensorflow as tf from tensorflow.contrib import slim from tensorflow.python.util import nest import dataset as ds def doublewrap(function): """ A decorator decorator, allowing to use the decorator to be used without ...
gpl-3.0
jledbetter/openhatch
mysite/profile/migrations/0071_lengthen_tag_text_max_length.py
17
15940
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2010 OpenHatch, Inc. # # 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 Licens...
agpl-3.0
yowmamasita/social-listener-exam
ferris/core/controller.py
1
13807
import webapp2 import re import weakref from webapp2 import cached_property from webapp2_extras import sessions from google.appengine.api import users from ferris.core.ndb import encode_key, decode_key from ferris.core.uri import Uri from ferris.core import inflector, auth, events, views, request_parsers, response_hand...
mit
shujaatak/UAV_MissionPlanner
Lib/xml/sax/saxutils.py
111
9823
"""\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urlparse, urllib, types import handler import xmlreader try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] # See wh...
gpl-2.0
wscullin/spack
var/spack/repos/builtin/packages/targetp/package.py
3
2836
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
buqing2009/MissionPlanner
Lib/distutils/file_util.py
55
8026
"""distutils.file_util Utility functions for operating on single files. """ __revision__ = "$Id$" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose output in 'copy_file()' _copy_action = {None: 'copying', 'hard': 'hard linking',...
gpl-3.0
caiush/chef-bcpc
tests/rabbit-listener/trace_rabbit.py
8
5092
#! /usr/bin/env python import pika import os import argparse import sys import json import itertools class SmartFormatter(argparse.HelpFormatter): def _split_lines(self, text, width): if text.startswith('R|'): return text[2:].splitlines() return argparse.HelpFormatter._split_lines(sel...
apache-2.0
sadig/DC2
components/dc2-api/dc2/api/dc2/settings/backend_settings.py
1
1512
# -*- coding: utf-8 -*- ############################################################################### # # (DC)² - DataCenter Deployment Control # Copyright (C) 2010, 2011, 2012, 2013, 2014 Stephan Adig <sh@sourcecode.de> # This program is free software; you can redistribute it and/or modify # it under th...
gpl-2.0
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/django/core/serializers/base.py
83
5612
""" Module for abstract serializer/unserializer base classes. """ from django.db import models from django.utils.encoding import smart_text from django.utils import six class SerializerDoesNotExist(KeyError): """The requested serializer was not found.""" pass class SerializationError(Exception): """Somet...
mit
gwecho/pony
pony/orm/examples/compositekeys.py
2
3411
from __future__ import absolute_import from datetime import date from pony.orm.core import * db = Database('sqlite', 'complex.sqlite', create_db=True) class Group(db.Entity): dept = Required('Department') year = Required(int) spec = Required(int) students = Set('Student') courses = Set('Course') ...
agpl-3.0
clearcare/salesforce-python-toolkit
setup.py
14
1739
#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 t...
lgpl-3.0
Celedhrim/persomov
couchpotato/core/media/_base/providers/nzb/binsearch.py
58
4304
import re import traceback from bs4 import BeautifulSoup from couchpotato.core.helpers.variable import tryInt, simplifyString from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.nzb.base import NZBProvider log = CPLog(__name__) class Base(NZBProvider): urls = { 'downl...
gpl-3.0
davidsminor/cortex
contrib/IECoreArnold/python/IECoreArnold/UniverseBlock.py
11
2012
########################################################################## # # Copyright (c) 2012, John Haddon. 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 sou...
bsd-3-clause
openstack/freezer-api
freezer_api/tests/unit/v2/test_homedoc.py
1
1370
"""Freezer swift.py related tests Copyright 2018 ZTE Corporation Copyright 2015 Hewlett-Packard 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 Unle...
apache-2.0
Zeppen/xbmc-pvr-spotify
tools/EventClients/lib/python/bt/hid.py
53
2753
# -*- coding: utf-8 -*- # Copyright (C) 2008-2009 Team XBMC http://www.xbmc.org # # 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)...
gpl-2.0
cogmission/nupic
src/nupic/support/features.py
35
4535
#! /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...
agpl-3.0
samdoran/ansible
lib/ansible/modules/packaging/os/pkgin.py
71
11775
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2013 Shaun Zinck <shaun.zinck at gmail.com> # Copyright (c) 2015 Lawrence Leonard Gilbert <larry@L2G.to> # Copyright (c) 2016 Jasper Lievisse Adriaanse <j at jasper.la> # # Written by Shaun Zinck # Based on pacman module written by Afterburn <http://github.com/...
gpl-3.0
Tatsh-ansible/ansible-modules-core
system/user.py
13
75467
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
Jgarcia-IAS/localizacion
openerp/addons-extra/odoo-pruebas/odoo-server/addons/l10n_cn/__init__.py
339
1061
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2007-2014 Jeff Wang(<http://jeff@osbzr.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
betoesquivel/fil2014
filenv/lib/python2.7/site-packages/django/contrib/admin/__init__.py
314
1824
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInli...
mit
inspyration/odoo
addons/purchase/__init__.py
439
1185
# -*- 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...
agpl-3.0
swapnakrishnan2k/tp-qemu
qemu/tests/win_virtio_update.py
6
10420
import time import re import logging import os from autotest.client.shared import error from autotest.client.shared import utils from virttest import utils_test from virttest import utils_misc from virttest import data_dir from virttest import env_process @error.context_aware def run(test, params, env): """ ...
gpl-2.0
BD2KGenomics/slugflow
src/toil/worker.py
1
29732
# Copyright (C) 2015-2021 Regents of the University of California # # 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 app...
apache-2.0
eonpatapon/nova
nova/tests/unit/virt/hyperv/test_networkutils.py
68
3245
# Copyright 2014 Cloudbase Solutions Srl # # 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 ...
apache-2.0
sharkspeed/dororis
packages/python/scrapy/example0/example0/middlewares.py
1
1882
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class Example0SpiderMiddleware(object): # Not all methods need to be defined. If a method is not defined, # scrapy ...
bsd-2-clause
Soya93/Extract-Refactoring
python/lib/Lib/UserString.py
91
8186
#!/usr/bin/env python ## vim:ts=4:et:nowrap """A user-defined wrapper around string objects Note: string objects have grown methods in Python 1.6 This module requires Python 1.6 or later. """ import sys __all__ = ["UserString","MutableString"] class UserString: def __init__(self, seq): if isinstance(seq,...
apache-2.0
kalxas/geonode
geonode/services/utils.py
4
4768
######################################################################### # # Copyright (C) 2018 OSGeo # # 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...
gpl-3.0
TRESCLOUD/odoo
addons/l10n_es/__openerp__.py
86
2661
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2008-2010 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jordi Esteve <jesteve@zikzakmedia.com> # Copy...
agpl-3.0
Sverchok/SverchokRedux
ui/menu.py
1
3197
# -*- coding: utf-8 -*- # ##### 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. # # ...
gpl-3.0
xlqian/profiling
profiling/profiler.py
4
4013
# -*- coding: utf-8 -*- """ profiling.profiler ~~~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import from collections import deque import sys import threading import time try: from . import speedup except ImportError: speedup = False from .stats import RecordingStat, RecordingStatistics, Frozen...
bsd-3-clause
krafczyk/spack
var/spack/repos/builtin/packages/aspell6-es/package.py
2
1519
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
domenicosolazzo/practice-django
venv/lib/python2.7/site-packages/django/contrib/gis/tests/relatedapp/tests.py
24
14890
from __future__ import unicode_literals from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite from django.test import TestCase if HAS_GEOS: from django.contrib.gis.db.models import ...
mit
phenoxim/nova
nova/notifications/base.py
1
16744
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
apache-2.0
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/models/_models_py3.py
1
236879
# 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 ...
mit
myang321/django
django/contrib/gis/gdal/prototypes/ds.py
349
4403
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
bsd-3-clause
Onager/plaso
tests/cli/helpers/yara_rules.py
1
2213
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the YARA rules CLI arguments helper.""" import argparse import unittest from plaso.cli import tools from plaso.cli.helpers import yara_rules from plaso.lib import errors from tests.cli import test_lib as cli_test_lib class YaraRulesArgumentsHelperTest(cli...
apache-2.0
nwchandler/ansible
lib/ansible/modules/system/iptables.py
13
23129
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Linus Unnebäck <linus@folkdatorn.se> # # This file is part of Ansible # # This module 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...
gpl-3.0
PegasusWang/wechannel
crawler/sougou_wechat/sg.py
1
12698
#!/usr/bin/env python # -*- coding:utf-8 -*- import _env import ast import json import logging import pprint import random import re import sys import time import traceback import requests import six.moves.urllib.parse as urlparse # for py2 and py3 use six from six.moves.urllib.parse import urlencode, quote from bs...
mit
ng110/pyqtgraph
pyqtgraph/flowchart/FlowchartGraphicsView.py
30
3857
# -*- coding: utf-8 -*- from ..Qt import QtGui, QtCore from ..widgets.GraphicsView import GraphicsView from ..GraphicsScene import GraphicsScene from ..graphicsItems.ViewBox import ViewBox #class FlowchartGraphicsView(QtGui.QGraphicsView): class FlowchartGraphicsView(GraphicsView): sigHoverOver = QtCore.Signa...
mit
philsch/ansible
lib/ansible/module_utils/facts/utils.py
41
2399
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
camradal/ansible
lib/ansible/plugins/shell/powershell.py
9
10626
# (c) 2014, Chris Church <chris@ninemoreminutes.com> # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
yongshengwang/hue
build/env/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/sdb/db/key.py
153
2036
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # 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,...
apache-2.0
lalanpalacios/screamface
resources/tools/freetvcast.py
17
4622
# -*- coding: utf-8 -*- #------------------------------------------------------------ # PalcoTV Regex de freetvcast # Version 0.1 (17.10.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.mimedia...
gpl-2.0
briansmith/googletest
test/gtest_xml_output_unittest.py
1815
14580
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
mancoast/CPythonPyc_test
cpython/275_test_zipimport_support.py
90
10850
# This test module covers support in various parts of the standard library # for working with modules located inside zipfiles # The tests are centralised in this fashion to make it easy to drop them # if a platform doesn't support zipimport import test.test_support import os import os.path import sys import textwrap im...
gpl-3.0
kawamon/hue
desktop/core/ext-py/docutils-0.14/docutils/parsers/rst/directives/parts.py
136
4251
# $Id: parts.py 7308 2012-01-06 12:08:43Z milde $ # Authors: David Goodger <goodger@python.org>; Dmitry Jemerov # Copyright: This module has been placed in the public domain. """ Directives for document parts. """ __docformat__ = 'reStructuredText' from docutils import nodes, languages from docutils.transforms impor...
apache-2.0
fergalbyrne/nupic
examples/opf/experiments/multistep/hotgym_best_sp_5step/description.py
32
3246
# ---------------------------------------------------------------------- # 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 apply: # # This progra...
agpl-3.0
SylvainCorlay/PyDev.Debugger
third_party/pep8/lib2to3/lib2to3/fixes/fix_set_literal.py
326
1699
""" Optional fixer to transform set() calls to set literals. """ # Author: Benjamin Peterson from lib2to3 import fixer_base, pytree from lib2to3.fixer_util import token, syms class FixSetLiteral(fixer_base.BaseFix): BM_compatible = True explicit = True PATTERN = """power< 'set' trailer< '(' ...
epl-1.0
xyzz/vcmi-build
project/jni/python/src/Lib/ctypes/test/test_strings.py
51
6957
import unittest from ctypes import * class StringArrayTestCase(unittest.TestCase): def test(self): BUF = c_char * 4 buf = BUF("a", "b", "c") self.failUnlessEqual(buf.value, "abc") self.failUnlessEqual(buf.raw, "abc\000") buf.value = "ABCD" self.failUnlessEqual(buf....
lgpl-2.1
nhenezi/kuma
vendor/packages/ipython/docs/examples/kernel/rmtkernel.py
7
1221
#------------------------------------------------------------------------------- # Core routines for computing properties of symmetric random matrices. #------------------------------------------------------------------------------- import numpy ra = numpy.random la = numpy.linalg def GOE(N): """Creates an NxN el...
mpl-2.0
shsingh/ansible
lib/ansible/modules/network/ios/_ios_vlan.py
21
10918
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
dgladkov/django
django/contrib/gis/utils/ogrinfo.py
139
1935
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num...
bsd-3-clause
iurisilvio/flask-admin
flask_admin/model/typefmt.py
17
1900
import json from jinja2 import Markup from flask_admin._compat import text_type try: from enum import Enum except ImportError: Enum = None def null_formatter(view, value): """ Return `NULL` as the string for `None` value :param value: Value to check """ return Markup(...
bsd-3-clause
dgquintas/grpc
src/python/grpcio_tests/tests/interop/_intraop_test_case.py
27
1865
# Copyright 2015 gRPC authors. # # 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...
apache-2.0
troika-framework/troika-http
troika/http/handlers.py
1
12921
"""HTTP Request Handlers""" import asyncio import functools import logging import sys import traceback from ietfparse import algorithms, errors, headers from troika.http import exceptions LOGGER = logging.getLogger(__name__) HTML_ERROR_TEMPLATE = """\ <html> <head><title>{status_code}: {reason}</title></head> ...
bsd-3-clause
aclef/microservices
microservices/queues/service.py
1
4709
import socket from kombu import Connection, Queue, Consumer from kombu.utils import nested from kombu.exceptions import MessageStateError import six from microservices.utils import get_logger from microservices.helpers.logs import InstanceLogger _logger = get_logger(__name__) @six.python_2_unicode_compatible class ...
mit
naschorr/hawking
code/message_parser.py
1
2802
import re import emoji import utilities from discoverable_module import DiscoverableModule ## Config CONFIG_OPTIONS = utilities.load_config() class MessageParser(DiscoverableModule): ## Keys REPLACE_EMOJI_KEY = "replace_emoji" def __init__(self, *args, **kwargs): super().__init__(*args, **kwarg...
mit
haveal/googleads-python-lib
examples/dfp/v201505/base_rate_service/update_base_rates.py
4
2448
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
jasonseminara/OpenSourceFinal
myvenv/lib/python3.5/site-packages/django/contrib/postgres/forms/hstore.py
313
1484
import json from django import forms from django.core.exceptions import ValidationError from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ['HStoreField'] class HStoreField(forms.CharField): """A field for HStore data which accepts JSON input.""" widget = forms.Te...
mit
freeznet/shadowsocks
tests/coverage_server.py
1072
1655
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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 ...
apache-2.0
elba7r/frameworking
frappe/desk/notifications.py
1
6898
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import time_diff_in_seconds, now, now_datetime, DATETIME_FORMAT from dateutil.relativedelta import relativedelta @frappe.whitelist() def get_noti...
mit
tongwang01/tensorflow
tensorflow/python/ops/init_ops.py
8
13132
# 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...
apache-2.0
oandrew/home-assistant
homeassistant/components/sensor/hp_ilo.py
7
5878
""" Support for information from HP ILO sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.sensor.hp_ilo/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.const import ( CONF_HOST, CONF_PORT,...
mit
throwable-one/lettuce
tests/integration/lib/Django-1.2.5/django/db/models/sql/constants.py
394
1043
import re # Valid query types (a dictionary is used for speedy lookups). QUERY_TERMS = dict([(x, None) for x in ( 'exact', 'iexact', 'contains', 'icontains', 'gt', 'gte', 'lt', 'lte', 'in', 'startswith', 'istartswith', 'endswith', 'iendswith', 'range', 'year', 'month', 'day', 'week_day', 'isnull', 'search'...
gpl-3.0
LeslieW/googletest
scripts/upload_gtest.py
1963
2851
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
TomAugspurger/pandas
pandas/tests/dtypes/cast/test_downcast.py
2
2790
import decimal import numpy as np import pytest from pandas.core.dtypes.cast import maybe_downcast_to_dtype from pandas import DatetimeIndex, Series, Timestamp import pandas._testing as tm @pytest.mark.parametrize( "arr,dtype,expected", [ ( np.array([8.5, 8.6, 8.7, 8.8, 8.9999999999995]...
bsd-3-clause