repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
AttiJeong98/Solid_Kernel-Stock
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
shermanng10/superathletebuilder
env/lib/python2.7/site-packages/pip/_vendor/requests/auth.py
413
6794
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header, ...
mit
gavinp/chromium
tools/valgrind/browser_wrapper_win.py
80
1636
# Copyright (c) 2011 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. import glob import os import re import sys import subprocess # TODO(timurrrr): we may use it on POSIX too to avoid code duplication once we # support la...
bsd-3-clause
chokribr/inveniotest
modules/bibdocfile/lib/bibdocfile_regression_tests.py
10
30584
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011, 2012, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Licens...
gpl-2.0
LettError/filibuster
Lib/filibuster/titlecase.py
1
9269
# -*- coding: UTF-8 -*- """ titlecase.py v0.2 Original Perl version by: John Gruber http://daringfireball.net/ 10 May 2008 Python version by Stuart Colville http://muffinresearch.co.uk License: http://www.opensource.org/licenses/mit-license.php """ import unittest import sys import re SMALL = 'a|an|and|as|at|but|by...
mit
Pathoschild/stewbot
stewbot/components/modules/simplejson/decoder.py
296
15152
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner def _import_c_scanstring(): try: from simplejson._speedups import scanstring return scanstring except ImportError: return None c_scanstring = _import_c_scanstring() __all...
isc
zigdon/evelink
evelink/parsing/contracts.py
9
1347
from evelink import api from evelink import constants import time def parse_contracts(api_result): rowset = api_result.find('rowset') if rowset is None: return results = {} for row in rowset.findall('row'): a = row.attrib contract = { 'id': int(a['contractID']), ...
mit
apbard/scipy
scipy/sparse/linalg/isolve/setup.py
108
1408
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.system_info import get_info, NotFoundError from numpy.distutils.misc_util import Configuration from scipy._build_utils i...
bsd-3-clause
ortylp/scipy
scipy/sparse/generate_sparsetools.py
67
12572
#!/usr/bin/env python """ Generate manual wrappers for C++ sparsetools code. Type codes used: 'i': integer scalar 'I': integer array 'T': data array 'B': boolean array 'V': std::vector<integer>* 'W': std::vector<data>* '*': indicates that the next argument is an output argument ...
bsd-3-clause
amitjamadagni/sympy
sympy/physics/quantum/tests/test_hilbert.py
125
2513
from sympy.physics.quantum.hilbert import ( HilbertSpace, ComplexSpace, L2, FockSpace, TensorProductHilbertSpace, DirectSumHilbertSpace, TensorPowerHilbertSpace ) from sympy import Interval, oo, Symbol, sstr, srepr def test_hilbert_space(): hs = HilbertSpace() assert isinstance(hs, HilbertSpace) ...
bsd-3-clause
ujenmr/ansible
lib/ansible/modules/network/f5/bigip_firewall_rule.py
14
38983
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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
klmitch/nova
nova/tests/functional/api_sample_tests/test_floating_ip_dns.py
6
3195
# Copyright 2014 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 # # Unless required by applicable law or agreed t...
apache-2.0
Tatsh-ansible/ansible
lib/ansible/modules/files/stat.py
13
19405
#!/usr/bin/python # 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...
gpl-3.0
SlimRoms/kernel_htc_msm8974
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
isaachenrion/jets
src/proteins/train/validation.py
1
1461
import logging import time import torch from src.data_ops.wrapping import unwrap from ..loss import loss def half_and_half(a,b): a = torch.stack([torch.triu(x) for x in a], 0) b = torch.stack([torch.tril(x, diagonal=-1) for x in b], 0) return a + b def validation(model, data_loader): t_valid = time...
bsd-3-clause
Francis-Liu/animated-broccoli
nova/api/ec2/faults.py
61
2887
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
ghickman/django
django/contrib/humanize/templatetags/humanize.py
526
9442
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import re from datetime import date, datetime from decimal import Decimal from django import template from django.conf import settings from django.template import defaultfilters from django.utils.encoding import force_text from django.utils.formats imp...
bsd-3-clause
michael-dev2rights/ansible
lib/ansible/modules/network/avi/avi_prioritylabels.py
27
3614
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # # 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...
gpl-3.0
wd5/jangr
openid/yadis/discover.py
143
4445
# -*- test-case-name: openid.test.test_yadis_discover -*- __all__ = ['discover', 'DiscoveryResult', 'DiscoveryFailure'] from cStringIO import StringIO from openid import fetchers from openid.yadis.constants import \ YADIS_HEADER_NAME, YADIS_CONTENT_TYPE, YADIS_ACCEPT_HEADER from openid.yadis.parsehtml import Me...
bsd-3-clause
antsant/namebench
nb_third_party/jinja2/nodes.py
207
27369
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
apache-2.0
flyfei/python-for-android
python-modules/twisted/twisted/conch/test/test_openssh_compat.py
60
3381
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.openssh_compat}. """ import os from twisted.trial.unittest import TestCase from twisted.python.filepath import FilePath from twisted.python.compat import set try: import Crypto.Cipher.DES3 import ...
apache-2.0
byteface/sing
core/PyPal.py
1
16532
""" PyPal.py @author: byteface """ class PyPal(object): """ PyPal is the heart for all pypals :) """ # TODO - tell command to pass messages to other pypals. non conflicting. saves having to quit out of current one # TODO - list commands # TODO - learn from. quick command to copy commands between ...
gpl-2.0
tjolsen/chrono
src/demos/python/demo_masonry.py
2
8080
#------------------------------------------------------------------------------- # Name: demo_masonry # # This file shows how to # - create a small stack of bricks, # - create a support that shakes like an earthquake, with imposed motion law # - simulate the bricks that fall # - output the postprocessing...
bsd-3-clause
arbrandes/edx-platform
openedx/core/djangoapps/user_authn/tests/utils.py
4
9542
""" Common utilities for tests in the user_authn app. """ from datetime import datetime, timedelta from enum import Enum from unittest.mock import patch import ddt import pytz from django.conf import settings from oauth2_provider import models as dot_models from rest_framework import status from openedx.core.django...
agpl-3.0
moijes12/oh-mainline
mysite/search/migrations/0033_search_lots_of_stuff.py
17
9315
# This file is part of OpenHatch. # 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 License, or # (at your option) any later v...
agpl-3.0
MaheshIBM/keystone
keystone/common/kvs/backends/inmemdb.py
26
1902
# Copyright 2013 Metacloud, 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
sbkolate/sap_frappe_v6
frappe/website/render.py
6
6115
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ import frappe.sessions from frappe.utils import cstr import mimetypes, json from werkzeug.wrappers import Response from werkzeug.routing import ...
mit
moto-timo/ironpython3
Src/StdLib/Lib/unittest/test/test_case.py
4
64196
import contextlib import difflib import pprint import pickle import re import sys import logging import warnings import weakref import inspect from copy import deepcopy from test import support import unittest from unittest.test.support import ( TestEquality, TestHashing, LoggingResult, LegacyLoggingResult, ...
apache-2.0
fladi/mock
docs/conf.py
7
6297
# -*- coding: utf-8 -*- # # Mock documentation build configuration file, created by # sphinx-quickstart on Mon Nov 17 18:12:00 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable...
bsd-2-clause
40223102/w16b_test
static/Brython3.1.1-20150328-091302/Lib/xml/sax/_exceptions.py
625
4885
"""Different kinds of SAX Exceptions""" #in brython the 4 lines below causes an $globals['Exception'] error #import sys #if sys.platform[:4] == "java": # from java.lang import Exception #del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can con...
agpl-3.0
wuhengzhi/chromium-crosswalk
tools/grit/grit/format/chrome_messages_json_unittest.py
23
3612
#!/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. """Unittest for chrome_messages_json.py. """ import os import sys if __name__ == '__main__': sys.path.append(os.path.join(os.pat...
bsd-3-clause
NielsZeilemaker/incubator-airflow
airflow/example_dags/example_subdag_operator.py
44
1696
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
AKSW/LODStats
lodstats/stats/Literals.py
2
1268
""" Copyright 2013 AKSW Research Group http://aksw.org This file is part of LODStats. LODStats 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 versi...
gpl-3.0
hoosteeno/mozillians
vendor-local/lib/python/djcelery/management/base.py
15
3339
from __future__ import absolute_import import os import sys from django.core.management.base import BaseCommand import celery import djcelery DB_SHARED_THREAD = """\ DatabaseWrapper objects created in a thread can only \ be used in that same thread. The object with alias '%s' \ was created in thread id %s and this...
bsd-3-clause
Aioxas/ax-cogs
horoscope/horoscope.py
1
11258
from discord.ext import commands from .utils.chat_formatting import box import aiohttp import html import os import re try: from PIL import Image, ImageDraw, ImageFont PIL = True except: PIL = False class Horoscope: def __init__(self, bot): self.bot = bot self.session = aiohttp.Clien...
mit
gfyoung/numpy
numpy/lib/twodim_base.py
2
27180
""" Basic functions for manipulating 2d arrays """ from __future__ import division, absolute_import, print_function import functools from numpy.core.numeric import ( absolute, asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal, ...
bsd-3-clause
sedruk/Red-DiscordBot
cogs/utils/formats.py
2
2642
# Manually imported from: # https://github.com/Rapptz/RoboDanny/blob/master/cogs/utils/formats.py # DATE IMPORTED: 2014-04-10 async def entry_to_code(bot, entries): width = max(map(lambda t: len(t[0]), entries)) output = ['```'] fmt = '{0:<{width}}: {1}' for name, entry in entries: output.appen...
gpl-3.0
hendradarwin/VTK
ThirdParty/Twisted/twisted/lore/lint.py
32
8849
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Checker for common errors in Lore documents. """ from xml.dom import minidom as dom import parser import urlparse import os.path from twisted.lore import tree, process from twisted.web import domhelpers from twisted.python import reflect fro...
bsd-3-clause
anhowe/azure-quickstart-templates
cloudera-director-on-centos/scripts/marketing.py
103
3151
#! /usr/bin/env python # Copyright (c) 2016 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
mit
deepmind/open_spiel
open_spiel/python/egt/alpharank_visualizer_test.py
1
2447
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
apache-2.0
vismartltd/edx-platform
lms/djangoapps/ccx/migrations/0001_initial.py
94
8576
# -*- coding: utf-8 -*- # pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long 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 model 'Cus...
agpl-3.0
chadversary/chromiumos.chromite
lib/partial_mock_unittest.py
2
7884
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for the partial_mock test helper code.""" import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.pat...
bsd-3-clause
Work4Labs/lettuce
tests/integration/lib/Django-1.3/django/utils/simplejson/scanner.py
928
2227
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
gpl-3.0
akshara775/PerfKitBenchmarker-master-2
perfkitbenchmarker/traces/collectd.py
5
2992
# Copyright 2015 PerfKitBenchmarker 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 appli...
apache-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Misc/Vim/vim_syntax.py
34
8927
from __future__ import with_statement import keyword import exceptions import __builtin__ from string import Template from sys import subversion comment_header = '''" Auto-generated Vim syntax file for Python (%s: r%s). " " To use: copy or symlink to ~/.vim/syntax/python.vim''' statement_header = """ if exists("b:cu...
mit
Alecto3-D/testable-greeter
bb-master/sandbox/lib/python3.5/site-packages/buildbot/statistics/storage_backends/influxdb_client.py
11
2219
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
mit
naousse/odoo
addons/event/wizard/event_confirm.py
339
1387
# -*- 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...
agpl-3.0
AmrThabet/CouchPotatoServer
libs/synchronousdeluge/client.py
151
5078
import os import platform from collections import defaultdict from itertools import imap from synchronousdeluge.exceptions import DelugeRPCError from synchronousdeluge.protocol import DelugeRPCRequest, DelugeRPCResponse from synchronousdeluge.transfer import DelugeTransfer __all__ = ["DelugeClient"] RPC_RESPONSE =...
gpl-3.0
rohitwaghchaure/erpnext_smart
erpnext/accounts/page/accounts_browser/accounts_browser.py
34
1493
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import flt from erpnext.accounts.utils import get_balance_on @frappe.whitelist() def get_comp...
agpl-3.0
frreiss/tensorflow-fred
tensorflow/python/framework/ops_enable_eager_test.py
28
1702
# Copyright 2018 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
philoniare/horizon
openstack_dashboard/dashboards/admin/flavors/views.py
14
2910
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
sgraham/nope
tools/security/check_message_owners.py
105
1506
#!/usr/bin/env python # 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. """Make sure all of the per-file *_messages.h OWNERS are consistent""" import os import re import sys def main(): file_path = os.pa...
bsd-3-clause
zlorenz/synergy
synergy/config/urls.py
1
1532
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.views.generic import TemplateView # Uncomment the next two lines to enable the admin: from django.contrib import a...
bsd-3-clause
vrv/tensorflow
tensorflow/python/kernel_tests/conv2d_backprop_filter_grad_test.py
101
2774
# 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
MakeHer/edx-platform
cms/djangoapps/contentstore/views/library.py
36
9259
""" Views related to content libraries. A content library is a structure containing XBlocks which can be re-used in the multiple courses. """ from __future__ import absolute_import import json import logging from contentstore.views.item import create_xblock_info from contentstore.utils import reverse_library_url, add...
agpl-3.0
koparasy/gemfi
src/arch/x86/bios/ACPI.py
73
3853
# Copyright (c) 2008 The Hewlett-Packard Development Company # 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 implemen...
bsd-3-clause
biocore/qiime
scripts/parallel_pick_otus_blast.py
15
4460
#!/usr/bin/env python # File created on 09 Feb 2010 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Greg Caporaso", "Dan Knights", "Jose Antonio Navas Molina"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Greg Caporaso"...
gpl-2.0
Netuitive/Diamond
src/collectors/ntpd/test/testntpd.py
31
2751
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from ntpd import NtpdColl...
mit
ge0rgi/cinder
cinder/tests/unit/objects/test_cluster.py
1
6662
# Copyright (c) 2016 Red Hat, 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 require...
apache-2.0
qbeenslee/Nepenthes-Server
config/setting.py
1
1657
# coding:utf-8 ''' 设置 Author : qbeenslee Created : 2014/10/9 ''' import os # 是否开启测试 DEBUG = False BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) # 数据库设置 # if DEBUG: # DB_CONFIG = { # "host": '127.0.0.1', # "db": 'nepenthes', # "port": '3140', # "user": '...
gpl-3.0
legalsylvain/OpenUpgrade
addons/account_budget/report/crossovered_budget_report.py
63
8603
# -*- 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...
agpl-3.0
koehlermichael/olympia
apps/addons/tests/test_update.py
14
31922
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from email import utils from django.db import connection from nose.tools import eq_ import amo import amo.tests from addons.models import (Addon, CompatOverride, CompatOverrideRange, IncompatibleVersions) from applications.mo...
bsd-3-clause
qsnake/git
contrib/hg-to-git/hg-to-git.py
47
7867
#!/usr/bin/env python """ hg-to-git.py - A Mercurial to GIT converter Copyright (C)2007 Stelian Pop <stelian@popies.net> 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 versi...
gpl-2.0
superhuahua/xunfengES
celerynode/vuldb/zabbix_latest_sql.py
4
1378
# coding:utf-8 import re import urllib2 def get_plugin_info(): plugin_info = { "name": "Zabbix latest SQL注入", "info": "攻击者通过此漏洞可获取管理员权限登陆后台,后台存在执行命令功能,导致服务器被入侵控制。", "level": "高危", "type": "SQL注入", "author": "wolf@YSRC", "url": "https://github.com/Medicean/VulApps/tr...
gpl-3.0
Rusk85/pyload
module/plugins/accounts/UploadingCom.py
3
2038
# -*- 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 3 of the License, or (at your option) any later version. This program is distributed in...
gpl-3.0
yu-aosp-staging/android_kernel_yu_msm8916
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
undoware/neutron-drive
google_appengine/lib/django_0_96/django/conf/global_settings.py
30
11682
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
bsd-3-clause
greyshell/Pen-Test
leetcode/factorial.py
1
1129
#!/usr/bin/python # author: greyshell """ [+] problem description ======================= find the factorial of a number 1) recursive two_sum 2) tail recursive two_sum [+] reference ============= TBD """ def tail_recursion_driver(n): """ tail recursive two_sum :param n: int :return: int """ ...
mit
bxshi/gem5
src/mem/slicc/ast/TypeFieldAST.py
92
1754
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
tapanagupta/mi-instrument
mi/platform/test/test_mission_exec.py
9
1320
# #!/usr/bin/env python # # """ # @package ion.agents.platform.test.test_mission_exec # @file ion/agents/platform/test/test_mission_exec.py # @author Edward Hunter # @brief Test cases mission exec opt-in classes. # """ # # __author__ = 'Edward Hunter' # __license__ = 'Apache 2.0' # # # Import pyon test class firs...
bsd-2-clause
timothyclemansinsea/smc
src/k8s/smc-hub/control.py
1
9152
#!/usr/bin/env python3 """ Hub management script """ import os, shutil, sys, tempfile join = os.path.join # Boilerplate to ensure we are in the directory fo this path and make the util module available. SCRIPT_PATH = os.path.split(os.path.realpath(__file__))[0] sys.path.insert(0, os.path.abspath(os.path.join(SCRIPT_...
gpl-3.0
albertomurillo/ansible
lib/ansible/modules/utilities/logic/assert.py
45
2312
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Dag Wieers <dag@wieers.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 = {'metadata_version': '1.1'...
gpl-3.0
ritchyteam/odoo
openerp/addons/base/ir/ir_fields.py
47
18497
# -*- coding: utf-8 -*- import cStringIO import datetime import functools import itertools import time import psycopg2 import pytz from openerp.osv import orm from openerp.tools.translate import _ from openerp.tools.misc import DEFAULT_SERVER_DATE_FORMAT,\ DEFAULT_SERVER_DATETIME_FORMAT...
agpl-3.0
ashishnitinpatil/vnitstudnotifs
django/contrib/gis/gdal/__init__.py
115
2134
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
bsd-3-clause
philanthropy-u/edx-platform
openedx/core/djangoapps/waffle_utils/tests/test_models.py
4
1961
""" Tests for waffle utils models. """ from ddt import data, ddt, unpack from django.test import TestCase from edx_django_utils.cache import RequestCache from opaque_keys.edx.keys import CourseKey from ..models import WaffleFlagCourseOverrideModel @ddt class WaffleFlagCourseOverrideTests(TestCase): """ Tests...
agpl-3.0
Anaphory/libpgm
libpgm/pgmlearner.py
1
45576
# Copyright (c) 2012, CyberPoint International, LLC # 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 lis...
bsd-3-clause
elkingtonmcb/nupic
examples/bindings/sparse_matrix_how_to.py
35
12347
#!/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
lushfuture/Phys-Comp
five-test/node_modules/johnny-five/junk/firmata-latest/node_modules/serialport/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/ninja_syntax.py
35
4968
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
mit
nino-c/plerp.org
src/profiles/migrations/0001_initial.py
64
1048
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import uuid class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateModel( na...
mit
Yuecai/com-yuecai-dream
src/nodelay/forms.py
1
9690
# coding=utf-8 ######################################################################### # File Name: forms.py # Original Author: 段凯强 # Mail: duankq@ios.ac.cn # Created Time: 2013-12-26 # Update: ######################################################################### ################################################...
bsd-3-clause
imbasimba/astroquery
astroquery/utils/tap/conn/tests/DummyConnHandler.py
2
5631
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ============= TAP plus ============= @author: Juan Carlos Segovia @contact: juan.carlos.segovia@sciops.esa.int European Space Astronomy Centre (ESAC) European Space Agency (ESA) Created on 30 jun. 2016 """ from astroquery.utils.tap import taputils...
bsd-3-clause
candy7393/VTK
ThirdParty/Twisted/twisted/python/text.py
40
5475
# -*- test-case-name: twisted.test.test_text -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Miscellany of text-munging functions. """ def stringyString(object, indentation=''): """ Expansive string formatting for sequence types. C{list.__str__} and C{dict.__str__} use ...
bsd-3-clause
ehashman/oh-mainline
vendor/packages/twisted/twisted/test/mock_win32process.py
82
1499
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This is a mock win32process module. The purpose of this module is mock process creation for the PID test. CreateProcess(...) will spawn a process, and always return a PID of 42. """ import win32process GetExitCodeProcess = win32process.GetE...
agpl-3.0
h4ck3rm1k3/pip
pip/cmdoptions.py
239
14701
""" shared options and groups The principle here is to define options once, but *not* instantiate them globally. One reason being that options with action='append' can carry state between parses. pip parses general options twice internally, and shouldn't pass on state. To be consistent, all options will follow this de...
mit
dimara/synnefo
snf-cyclades-app/synnefo/db/migrations/0046_auto__chg_field_backend_password_hash.py
10
11564
# encoding: 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): # Changing field 'Backend.password_hash' db.alter_column('db_backend', 'password_hash', self.gf('djang...
gpl-3.0
Weil0ng/gem5
src/arch/hsail/gen.py
10
27196
#! /usr/bin/python # # Copyright (c) 2015 Advanced Micro Devices, Inc. # All rights reserved. # # For use for simulation and test purposes only # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributio...
bsd-3-clause
KohlsTechnology/ansible
test/sanity/code-smell/docs-build.py
17
3775
#!/usr/bin/env python import os import re import subprocess def main(): base_dir = os.getcwd() + os.sep docs_dir = os.path.abspath('docs/docsite') cmd = ['make', 'singlehtmldocs'] sphinx = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=docs_dir) stdout, stderr = sphinx...
gpl-3.0
quantopian/zipline
zipline/data/in_memory_daily_bars.py
1
5363
from six import iteritems import numpy as np import pandas as pd from pandas import NaT from trading_calendars import TradingCalendar from zipline.data.bar_reader import OHLCV, NoDataOnDate, NoDataForSid from zipline.data.session_bars import CurrencyAwareSessionBarReader from zipline.utils.input_validation import ex...
apache-2.0
fabioz/PyDev.Debugger
third_party/pep8/lib2to3/lib2to3/pygram.py
320
1118
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Export the Python grammar and symbols.""" # Python imports import os # Local imports from .pgen2 import token from .pgen2 import driver from . import pytree # The grammar file _GRAMMAR_FILE = os.path.join(os.path....
epl-1.0
programadorjc/django
tests/modeladmin/models.py
108
1603
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Band(models.Model): name = models.CharField(max_length=100) bio = models.TextField() sign_date = models.DateFiel...
bsd-3-clause
suizokukan/dchars-fe
kshortcuts.py
1
2929
#!./python_link # -*- coding: utf-8 -*- ################################################################################ # DChars-FE Copyright (C) 2008 Xavier Faure # Contact: faure dot epistulam dot mihi dot scripsisti at orange dot fr # # This file is part of DChars-FE. # DChars-FE is free software: you c...
gpl-3.0
akniffe1/fsf
fsf-server/daemon.py
1
3798
#!/usr/bin/env python # # All credit for this class goes to Sander Marechal, 2009-05-31 # Reference: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ # # import sys, os, time, atexit from signal import SIGTERM class Daemon: """ A generic daemon class. Usage: subclass the Daemon...
apache-2.0
JRock007/boxxy
dist/Boxxy server.app/Contents/Resources/lib/python2.7/numpy/distutils/intelccompiler.py
59
1775
from __future__ import division, absolute_import, print_function from distutils.unixccompiler import UnixCCompiler from numpy.distutils.exec_command import find_executable class IntelCCompiler(UnixCCompiler): """ A modified Intel compiler compatible with an gcc built Python.""" compiler_type = 'intel' cc_...
mit
mcanthony/rethinkdb
external/v8_3.30.33.16/build/gyp/test/mac/gyptest-objc-gc.py
90
1377
#!/usr/bin/env python # Copyright (c) 2012 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. """ Verifies that GC objc settings are handled correctly. """ import TestGyp import sys if sys.platform == 'darwin': # set |match| to i...
agpl-3.0
JingJunYin/tensorflow
tensorflow/contrib/saved_model/__init__.py
109
1411
# 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
immanetize/nikola
nikola/filters.py
1
7187
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 t...
mit
lym/allura-git
Allura/allura/tests/unit/test_post_model.py
2
2070
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
apache-2.0
zendesk/dd-agent
checks/network_checks.py
26
8048
# stdlib from collections import defaultdict from Queue import Empty, Queue import threading import time # project from checks import AgentCheck from checks.libs.thread_pool import Pool from config import _is_affirmative TIMEOUT = 180 DEFAULT_SIZE_POOL = 6 MAX_LOOP_ITERATIONS = 1000 FAILURE = "FAILURE" class Status...
bsd-3-clause
damdam-s/hr
__unported__/hr_resume/__init__.py
28
1047
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
tectronics/omaha
third_party/gmock/scripts/gmock_doctor.py
64
17418
#!/usr/bin/env python # # Copyright 2008, 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...
apache-2.0