repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
DmitriyKirakosyan/online-go.com
i18n/gen-country-lists.py
4
1467
#!/usr/bin/env python2 import json import os import re import sys from xml.dom.minidom import parse import xml.dom.minidom cldr_main = "cldr/common/main"; def getText(nodelist): rc = [] for node in nodelist: if node.nodeType == node.TEXT_NODE: rc.append(node.data) return ''.join(rc) ...
agpl-3.0
nishnik/networkx
networkx/algorithms/components/tests/test_biconnected.py
5
5596
#!/usr/bin/env python from nose.tools import * import networkx as nx from networkx.algorithms.components import biconnected from networkx import NetworkXNotImplemented def assert_components_edges_equal(x, y): sx = {frozenset([frozenset(e) for e in c]) for c in x} sy = {frozenset([frozenset(e) for e in c]) for ...
bsd-3-clause
fxia22/ASM_xf
PythonD/lib/python2.4/opcode.py
14
5144
""" opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EXTENDED_ARG"] cmp_op = ('<...
gpl-2.0
google/rekall
rekall-agent/rekall_agent/serializer_test.py
4
5583
from rekall import testlib from rekall_agent import serializer class TestObject1(serializer.SerializedObject): schema = [ dict(name="C1", type="int"), dict(name="R1", type="unicode", repeated=True), dict(name="C2", type="str"), ] # Note that forward declarations are not currently imp...
gpl-2.0
mancoast/CPythonPyc_test
cpython/254_mapping_tests.py
37
22279
# tests common to dict and UserDict import unittest import UserDict class BasicTestMappingProtocol(unittest.TestCase): # This base class can be used to check that an object conforms to the # mapping protocol # Functions that can be useful to override to adapt to dictionary # semantics type2test =...
gpl-3.0
kkirsche/trigger
trigger/packages/peewee.py
13
81973
""" peewee - a small, expressive ORM Source: https://raw.github.com/coleifer/peewee/2.1.4/peewee.py License: BSD Integrated into Trigger 2013-09-12 """ # (\ # ( \ /(o)\ caw! # ( \/ ()/ /) # ( `;.))'".) # `(/////.-' # =====))=))===() # ///' # // # ' from __future__ import...
bsd-3-clause
atty303/pyfilesystem
fs/path.py
1
15148
""" fs.path ======= Useful functions for FS path manipulation. This is broadly similar to the standard ``os.path`` module but works with paths in the canonical format expected by all FS objects (forwardslash-separated, optional leading slash). """ import re _requires_normalization = re.compile(r'/\.\.|\./|//|\\')....
bsd-3-clause
MattsFleaMarket/python-for-android
python-build/python-libs/gdata/build/lib/gdata/blogger/__init__.py
140
6426
#!/usr/bin/python # # Copyright (C) 2007, 2008 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 applicabl...
apache-2.0
dontnod/weblate
weblate/checks/chars.py
1
13311
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2019 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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, eith...
gpl-3.0
WhiteMagic/JoystickGremlin
gremlin/ui/profile_settings.py
1
11998
# -*- coding: utf-8; -*- # Copyright (C) 2015 - 2019 Lionel Ott # # 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. # # T...
gpl-3.0
xhlyuestc/SmartDesk
tools/vs.py
19
3717
import os import sys import string import building import xml.etree.ElementTree as etree from xml.etree.ElementTree import SubElement from utils import _make_path_relative from utils import xml_indent fs_encoding = sys.getfilesystemencoding() def VS_AddGroup(ProjectFiles, parent, name, files, project_path): Filte...
gpl-2.0
jacroe/spynot
cherrypy/lib/reprconf.py
83
14551
"""Generic configuration system using unrepr. Configuration data may be supplied as a Python dictionary, as a filename, or as an open file object. When you supply a filename or file, Python's builtin ConfigParser is used (with some extensions). Namespaces ---------- Configuration keys are separated into namespaces b...
lgpl-3.0
ychen820/microblog
flask/lib/python2.7/site-packages/wtforms/utils.py
194
1504
class UnsetValue(object): """ An unset value. This is used in situations where a blank value like `None` is acceptable usually as the default value of a class variable or function parameter (iow, usually when `None` is a valid value.) """ def __str__(self): return '<unset value>' ...
bsd-3-clause
Rodolfoarv/Mars-Explorer-AI-with-Python-
env/lib/python2.7/site-packages/pip/req/req_install.py
21
46670
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import traceback import warnings import zipfile from distutils import sysconfig from distutils.util import change_root from email.parser import FeedParser from pip._vendor import pkg_resources, six from...
mit
endlessm/chromium-browser
third_party/chromite/third_party/requests/packages/chardet/euctwfreq.py
3133
34872
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
bsd-3-clause
cloudera/hue
desktop/core/ext-py/boto-2.46.1/boto/ec2/volumestatus.py
181
6329
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
apache-2.0
jaggu303619/asylum
openerp/addons/portal/mail_message.py
34
3555
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
sanyaade-mediadev/Transana
FormatDialog.py
1
28539
# Copyright (C) 2003 - 2015 The Board of Regents of the University of Wisconsin System # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope...
gpl-2.0
YYWen0o0/python-frame-django
tests/model_options/test_default_related_name.py
41
1645
from django.test import TestCase from .models.default_related_name import Author, Editor, Book class DefaultRelatedNameTests(TestCase): def setUp(self): self.author = Author.objects.create(first_name="Dave", last_name="Loper") self.editor = Editor.objects.create(name="Test Editions", ...
bsd-3-clause
Qalthos/ansible
lib/ansible/modules/database/mysql/mysql_user.py
12
26349
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.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_functi...
gpl-3.0
benjyw/pants
src/python/pants/base/exception_sink.py
4
17975
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import datetime import faulthandler import logging import os import signal import sys import threading import traceback from contextlib import contextmanager from typing import Callable, D...
apache-2.0
mxOBS/deb-pkg_trusty_chromium-browser
tools/gyp/pylib/gyp/generator/eclipse.py
2
16953
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
bsd-3-clause
Just-D/panda3d
direct/src/extensions_native/extension_native_helpers.py
9
4505
### Tools __all__ = ["Dtool_ObjectToDict", "Dtool_funcToMethod", "Dtool_PreloadDLL"] import imp, sys, os # The following code exists to work around a problem that exists # with Python 2.5 or greater. # Specifically, Python 2.5 is designed to import files named *.pyd # only; it will not import files named *.dll (or ...
bsd-3-clause
hug33k/PyTalk-R2D2
r2d2.py
1
1042
#!/usr/local/bin/python3.5 import wave import time import pyaudio import sys import os if __name__ == '__main__': baseLocation = os.path.dirname(__file__) if len(sys.argv) == 2: word = sys.argv[-1].lower() elif len(sys.argv) == 1: word = ["a","b","c","c1","d","e","f","g","g1","h","i","j","k","l","m","n","o","o...
mit
fwenzel/stapler
staplelib/tests.py
1
1812
#!/usr/bin/env python import os.path import shutil from subprocess import check_call import tempfile import unittest from PyPDF2 import PdfFileReader HERE = os.path.abspath(os.path.dirname(__file__)) TESTFILE_DIR = os.path.join(HERE, 'testfiles') STAPLER = os.path.join(HERE, '..', 'stapler') ONEPAGE_PDF = os.path.j...
bsd-3-clause
jhd/spunout
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py
374
3274
# urllib3/exceptions.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
gpl-3.0
fbossy/SickRage
lib/feedparser/feedparsertest.py
25
39905
#!/usr/bin/env python __author__ = "Mark Pilgrim <http://diveintomark.org/>" __license__ = """ Copyright (c) 2010-2013 Kurt McKee <contactme@kurtmckee.org> Copyright (c) 2004-2008 Mark Pilgrim All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided ...
gpl-3.0
temasek/android_external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/layout_tests/port/server_process_mock.py
61
3134
# Copyright (C) 2012 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 of conditions and the f...
bsd-3-clause
ardi69/pyload-0.4.10
pyload/plugin/hoster/MegaCoNz.py
1
8133
# -*- coding: utf-8 -*- import array import base64 import os # import pycurl import random import re import Crypto from pyload.utils import json_loads, json_dumps from pyload.plugin.Hoster import Hoster from pyload.utils import decode, fs_decode, fs_encode ############################ General errors ##############...
gpl-3.0
krez13/scikit-learn
examples/plot_multilabel.py
236
4157
# Authors: Vlad Niculae, Mathieu Blondel # License: BSD 3 clause """ ========================= Multilabel classification ========================= This example simulates a multi-label document classification problem. The dataset is generated randomly based on the following process: - pick the number of labels: n ...
bsd-3-clause
rentongzhang/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/test_handshake_hybi00.py
466
17345
#!/usr/bin/env python # # Copyright 2011, 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...
mpl-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/tests/gis_tests/inspectapp/tests.py
22
6691
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from django.core.management import call_command from django.db import connection, connections from django.test import TestCase, skipUnlessDBFeature from django.utils.six import Stri...
mit
revolutionaryG/phantomjs
src/qt/qtbase/src/3rdparty/freetype/src/tools/docmaker/sources.py
367
10766
# Sources (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009 # David Turner <david@freetype.org> # # # this file contains definitions of classes needed to decompose # C sources files into a series of multi-line "blocks". There are # two kinds of blocks: # # - normal blocks, which contain source code or ordinary comment...
bsd-3-clause
tempbottle/Firefly
firefly/utils/services.py
8
4997
#coding:utf8 ''' Created on 2011-1-3 服务类 @author: sean_lan ''' import threading from twisted.internet import defer,threads from twisted.python import log class Service(object): """A remoting service attributes: ============ * name - string, service name. * runstyle """ SINGLE_STYL...
mit
cl4u2/chirp
chirp/chirp_common.py
1
45611
# Copyright 2008 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
gpl-3.0
dyninc/dyn-python
dyn/mm/accounts.py
2
22757
# -*- coding: utf-8 -*- """This module contains Dyn Message Management accounts features. It's important to note that any/all timestamps are expected as `datetime.datetime` instances and will be returned as such. """ from datetime import datetime from ..core import cleared_class_dict from .utils import str_to_date, da...
bsd-3-clause
suto/infernal-twin
build/reportlab/build/lib.linux-i686-2.7/reportlab/lib/attrmap.py
32
5508
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/attrmap.py __version__=''' $Id$ ''' __doc__='''Framework for objects whose assignments are checked. Used by graphics. We developed reportlab/graph...
gpl-3.0
psexton/house.local
weather/announcer.py
1
1038
#!/usr/bin/env python3 import datetime import json import requests import Adafruit_IO print("Ran at", datetime.datetime.now()) # Read in the json config # Found at /etc/net.psexton.house-local.json with open('/etc/net.psexton.house-local.json') as config_file: config_data = json.load(config_file) # Read in the ...
lgpl-3.0
ramanajee/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/cmake.py
123
7236
# Copyright (C) 2012 Intel 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 copyright # notice, this list of conditions and the f...
bsd-3-clause
JDReutt/libgdx
extensions/gdx-freetype/jni/freetype-2.5.5/src/tools/docmaker/docbeauty.py
877
2642
#!/usr/bin/env python # # DocBeauty (c) 2003, 2004, 2008 David Turner <david@freetype.org> # # This program is used to beautify the documentation comments used # in the FreeType 2 public headers. # from sources import * from content import * from utils import * import utils import sys, os, time, string, getopt ...
apache-2.0
mancoast/CPythonPyc_test
fail/330_test_doctest2.py
194
2359
"""A module to test whether doctest recognizes some 2.2 features, like static and class methods. >>> print('yup') # 1 yup We include some (random) encoded (utf-8) text in the text surrounding the example. It should be ignored: ЉЊЈЁЂ """ import sys import unittest from test import support if sys.flags.optimize >=...
gpl-3.0
TamiaLab/carnetdumaker
apps/dbmutex/tests/test_models.py
1
1835
""" Tests suite for the database mutex app. """ from unittest import mock from datetime import timedelta from django.test import TestCase from django.utils import timezone from ..settings import MUTEX_LOCK_EXPIRATION_DELAY_SEC from ..models import DbMutexLock class DatabaseMutexTestCase(TestCase): """ Test...
agpl-3.0
scripnichenko/nova
nova/virt/libvirt/compat.py
67
1411
# 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 # distributed u...
apache-2.0
hzwjava/mongo-connector
mongo_connector/config.py
21
5216
# Copyright 2013-2014 MongoDB, 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
pozdnyakov/chromium-crosswalk
third_party/jinja2/visitor.py
1401
3316
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
bsd-3-clause
cloudera/impyla
impala/tests/test_hive_dict_cursor.py
2
1848
# Copyright 2015 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 law or agreed to in writing...
apache-2.0
kirillzhuravlev/numpy
numpy/f2py/tests/test_return_character.py
130
3967
from __future__ import division, absolute_import, print_function from numpy import array from numpy.compat import asbytes from numpy.testing import run_module_suite, assert_, dec import util class TestReturnCharacter(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tn...
bsd-3-clause
Netflix/repokid
repokid/lib/__init__.py
1
9989
# Copyright 2020 Netflix, 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...
apache-2.0
szeged/servo
tests/power/PowerMeasure.py
15
7012
#!/usr/bin/env python # 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 https://mozilla.org/MPL/2.0/. # ---------Power measurement ------------------------------# # This script will run the servo w...
mpl-2.0
MDAnalysis/pmda
pmda/rms/rmsf.py
1
8614
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # PMDA # Copyright (c) 2019 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under the GNU Public Licence, v2 or any higher ve...
gpl-2.0
idea4bsd/idea4bsd
python/helpers/profiler/ply/ctokens.py
197
3177
# ---------------------------------------------------------------------- # ctokens.py # # Token specifications for symbols in ANSI C and C++. This file is # meant to be used as a library in other tokenizers. # ---------------------------------------------------------------------- # Reserved words tokens = [ # Li...
apache-2.0
hiroakis/ansible
lib/ansible/plugins/test/math.py
33
1056
# (c) 2014, 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 License, or # (at your option) any later version....
gpl-3.0
aESeguridad/GERE
venv/local/lib/python2.7/abc.py
488
7145
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) according to PEP 3119.""" import types from _weakrefset import WeakSet # Instance of old-style class class _C: pass _InstanceType = type(_C()) def abstractmethod(funcobj): """A d...
gpl-3.0
rmoorman/sqlalchemy-utils
sqlalchemy_utils/relationships/__init__.py
6
3422
import sqlalchemy as sa from sqlalchemy.sql.util import ClauseAdapter from .chained_join import chained_join # noqa def path_to_relationships(path, cls): relationships = [] for path_name in path.split('.'): rel = getattr(cls, path_name) relationships.append(rel) cls = rel.mapper.clas...
bsd-3-clause
ctxis/canape
CANAPE.Scripting/Lib/encodings/mac_iceland.py
593
13754
""" Python Character Mapping Codec mac_iceland generated from 'MAPPINGS/VENDORS/APPLE/ICELAND.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
gpl-3.0
wengole/pybbm
pybb/south_migrations/0006_autoone.py
11
8702
# encoding: utf-8 from south.v2 import SchemaMigration from pybb.compat import get_user_model_path, get_user_frozen_models AUTH_USER = get_user_model_path() class Migration(SchemaMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { 'auth.group...
bsd-2-clause
wangyou/XX-Net
code/default/python27/1.0/lib/noarch/hyper/http11/response.py
9
12225
# -*- coding: utf-8 -*- """ hyper/http11/response ~~~~~~~~~~~~~~~~~~~~~ Contains the HTTP/1.1 equivalent of the HTTPResponse object defined in httplib/http.client. """ import logging import weakref import zlib from ..common.decoder import DeflateDecoder from ..common.exceptions import ChunkedDecodeError, InvalidRespo...
bsd-2-clause
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/django/conf/locale/mk/formats.py
112
1742
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i' DATETI...
bsd-3-clause
agaldona/odoomrp-wip-1
mrp_configurable_timing/models/res_company.py
25
1082
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
andybalaam/pepper
old/pepper1/src/libpepper/vals/types/pepimplementsfunction.py
1
1733
from libpepper.vals.functions.pepfunction import PepFunction from libpepper.values import PepBool from libpepper.values import PepType from libpepper.values import all_known class PepImplementsFunction( PepFunction ): """ A function automatically present in every class called "implements" that returns tru...
mit
abhitopia/tensorflow
tensorflow/python/saved_model/signature_def_utils_impl.py
58
5229
# 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
edisonlz/fruit
web_project/base/site-packages/django/contrib/gis/db/backends/postgis/creation.py
117
4498
from django.conf import settings from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEOMETRY_OPS' geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND...
apache-2.0
SanchayanMaity/gem5
util/cpt_upgraders/arm-gem5-gic-ext.py
26
3402
# Copyright (c) 2015 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 o...
bsd-3-clause
caiowilson/brackets-shell
gyp/pylib/gyp/MSVSVersion.py
122
13527
# 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. """Handle version information related to Visual Stuio.""" import errno import os import re import subprocess import sys import gyp class VisualStudioVersion(obj...
mit
SebastianFM/SebastianFM-kernel
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
ojii/sandlib
lib/lib-python/2.7/sqlite3/test/regression.py
3
11367
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/regression.py: pysqlite regression tests # # Copyright (C) 2006-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any dama...
bsd-3-clause
abhishek-ch/hue
desktop/core/src/desktop/management/commands/config_upgrade.py
37
3292
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
DARKPOP/external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/style/checkers/png.py
170
3914
# Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged # # 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 copyright # notice, this lis...
bsd-3-clause
leiferikb/bitpop-private
chrome/test/functional/wifi_downloads.py
51
7800
#!/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. import hashlib import logging import os import time import urllib2 import pyauto_functional # Must be imported before pyauto impo...
bsd-3-clause
smalls257/VRvisu
Library/External.LCA_RESTRICTED/Languages/CPython/27/Lib/test/test_frozen.py
133
1236
# Test the frozen module defined in frozen.c. from test.test_support import captured_stdout, run_unittest import unittest import sys class FrozenTests(unittest.TestCase): def test_frozen(self): with captured_stdout() as stdout: try: import __hello__ except ImportEr...
gpl-3.0
hantek/fuel
fuel/converters/__init__.py
6
1213
"""Data conversion modules for built-in datasets. Conversion submodules generate an HDF5 file that is compatible with their corresponding built-in dataset. Conversion functions accept a single argument, `subparser`, which is an `argparse.ArgumentParser` instance that it needs to fill with its own specific arguments. ...
mit
Thraxis/pymedusa
lib/adba/aniDBtvDBmaper.py
50
2174
#!/usr/bin/env python # # This file is part of aDBa. # # aDBa 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. # # aDBa is distributed i...
gpl-3.0
hustlzp/eve
eve/__init__.py
9
1992
# -*- coding: utf-8 -*- """ Eve ~~~ An out-of-the-box REST Web API that's as dangerous as you want it to be. :copyright: (c) 2015 by Nicola Iarocci. :license: BSD, see LICENSE for more details. .. versionchanged:: 0.5 'SERVER_NAME' removed. 'QUERY_WHERE' added. 'QUERY_SO...
bsd-3-clause
berth64/modded_modded_1257ad
source/header_animations.py
6
5723
arf_blend_in_0 = 0x00000001 arf_blend_in_1 = 0x00000002 arf_blend_in_2 = 0x00000003 arf_blend_in_3 = 0x00000004 arf_blend_in_4 = 0x00000005 arf_blend_in_5 = 0x00000006 arf_blend_in_6 = 0x00000007 arf_blend_in_7 ...
agpl-3.0
wimnat/ansible
lib/ansible/plugins/connection/ssh.py
8
56883
# Copyright (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.com> # Copyright 2017 Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __futu...
gpl-3.0
nvoron23/scikit-learn
sklearn/preprocessing/label.py
137
27165
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
bsd-3-clause
jokey2k/ShockGsite
djangobb_forum/tests/test_forum.py
8
1366
# -*- coding: utf-8 -*- from django.test import TestCase, Client from django.contrib.auth.models import User from djangobb_forum.models import Category, Forum, Topic, Post class TestForum(TestCase): fixtures = ['test_forum.json'] def setUp(self): self.category = Category.objects.get(pk=1) ...
bsd-3-clause
metagenomics/bioPipeline
scripts/create_overview.py
2
5401
#!/usr/bin/env python """ Usage: create_overview.py -u <HMM-Hits.unique> -faa <faa_folder> -o <output_folder> [--search=<search_config.yaml>] -c <coverage_files>... -h --help Please enter a HMM.unique file, faa folder, output folder and as many coverage files as you want to. """ from sys import argv from docopt...
mit
ryfeus/lambda-packs
H2O/ArchiveH2O/setuptools/_vendor/six.py
2715
30098
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
mit
metashell/metashell
3rd/templight/clang/utils/clangdiag.py
28
7621
#!/usr/bin/python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. # # # To use this in the embedded python interpreter using "lldb" just # import it with the full path using the "command script import" # command # (lldb)...
gpl-3.0
noslenfa/tdjangorest
uw/lib/python2.7/site-packages/django/dispatch/saferef.py
218
10623
""" "Safe weakrefs", originally from pyDispatcher. Provides a way to safely weakref any function, including bound methods (which aren't handled by the core weakref module). """ import traceback import weakref def safeRef(target, onDelete = None): """Return a *safe* weak reference to a callable target target...
apache-2.0
JizhouZhang/SDR
docs/doxygen/other/doxypy.py
76
13882
#!/usr/bin/env python __applicationName__ = "doxypy" __blurb__ = """ doxypy is an input filter for Doxygen. It preprocesses python files so that docstrings of classes and functions are reformatted into Doxygen-conform documentation blocks. """ __doc__ = __blurb__ + \ """ In order to make Doxygen preprocess files thro...
gpl-3.0
flavioamieiro/pypln.backend
tests/test_worker_palavras_semantic_tagger.py
2
3630
# coding: utf-8 # # Copyright 2012 NAMD-EMAP-FGV # # This file is part of PyPLN. You can get more information at: http://pypln.org/. # # PyPLN 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 o...
gpl-3.0
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/services/fields/__init__.py
1
30406
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type __all__ = [ 'AnnouncementDate', 'FormattableDate', 'BaseImageUpload', 'BlacklistableContentNameField', 'BugField', 'ContentNameFie...
agpl-3.0
scivey/goosepp
external/gmock-1.7.0/gtest/xcode/Scripts/versiongenerate.py
3088
4536
#!/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...
mit
btheosam/TizenRT
external/gmock/test/gmock_output_test.py
986
5999
#!/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
jmr2704/betakore-alien
src/scons-local-2.0.1/SCons/Platform/win32.py
50
13779
"""SCons.Platform.win32 Platform-specific initialization for Win32 systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201...
gpl-2.0
PennartLoettring/Poettrix
rootfs/usr/lib/python3.4/encodings/shift_jis.py
816
1039
# # shift_jis.py: Python Unicode Codec for SHIFT_JIS # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.Multib...
gpl-2.0
kumarkrishna/sympy
sympy/matrices/tests/test_interactions.py
58
1881
""" We have a few different kind of Matrices Matrix, ImmutableMatrix, MatrixExpr Here we test the extent to which they cooperate """ from sympy import symbols from sympy.matrices import (Matrix, MatrixSymbol, eye, Identity, ImmutableMatrix) from sympy.core.compatibility import range from sympy.matrices.expres...
bsd-3-clause
Stanford-Online/edx-platform
cms/djangoapps/contentstore/views/tests/test_container_page.py
13
10800
""" Unit tests for the container page. """ import datetime import re from django.http import Http404 from django.test.client import RequestFactory from django.utils import http from mock import Mock, patch from pytz import UTC import contentstore.views.component as views from contentstore.tests.test_libraries import ...
agpl-3.0
voxlol/scikit-learn
sklearn/feature_extraction/tests/test_feature_hasher.py
258
2861
from __future__ import unicode_literals import numpy as np from sklearn.feature_extraction import FeatureHasher from nose.tools import assert_raises, assert_true from numpy.testing import assert_array_equal, assert_equal def test_feature_hasher_dicts(): h = FeatureHasher(n_features=16) assert_equal("dict",...
bsd-3-clause
JshWright/home-assistant
tests/components/switch/test_rest.py
4
7488
"""The tests for the REST switch platform.""" import asyncio import aiohttp import homeassistant.components.switch.rest as rest from homeassistant.setup import setup_component from homeassistant.util.async import run_coroutine_threadsafe from homeassistant.helpers.template import Template from tests.common import get...
apache-2.0
cloudbase/neutron-virtualbox
neutron/plugins/cisco/common/cisco_exceptions.py
43
8481
# Copyright 2011 Cisco Systems, 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 requir...
apache-2.0
dmitriy0611/django
django/core/servers/basehttp.py
94
7318
""" HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21). Based on wsgiref.simple_server which is part of the standard library since 2.5. This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE! """ from __f...
bsd-3-clause
corruptnova/namebench
nb_third_party/graphy/backends/google_chart_api/util.py
233
6335
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
171121130/SWI
app/models.py
1
13784
from datetime import datetime import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from markdown import markdown import bleach from flask import current_app, request from flask_login import UserMixin, AnonymousUse...
mit
kurli/blink-crosswalk
Source/devtools/scripts/jsdoc-validator/run_tests.py
54
2142
#!/usr/bin/python import hashlib import operator import os import shutil import stat import subprocess import sys import tempfile def rel_to_abs(rel_path): return os.path.join(script_path, rel_path) java_exec = 'java -Xms1024m -server -XX:+TieredCompilation' tests_dir = 'tests' jar_name = 'jsdoc-validator.jar' ...
bsd-3-clause
home-assistant/home-assistant
homeassistant/components/system_bridge/config_flow.py
2
6605
"""Config flow for System Bridge integration.""" from __future__ import annotations import logging from typing import Any import async_timeout from systembridge import Bridge from systembridge.client import BridgeClient from systembridge.exceptions import BridgeAuthenticationException from systembridge.objects.os imp...
apache-2.0
Anaconda-Platform/anaconda-client
binstar_client/commands/authorizations.py
1
8772
""" Manage Authentication tokens See also: * [Using Anaconda Cloud Tokens](http://docs.anaconda.org/using.html#Tokens) """ from __future__ import print_function import argparse import getpass import logging import socket import sys from argparse import FileType from datetime import datetime import pytz from da...
bsd-3-clause
0x90sled/catapult
third_party/Paste/paste/evalexception/middleware.py
50
22313
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Exception-catching middleware that allows interactive debugging. This middleware catches all unexpected exceptions. A normal traceback, like prod...
bsd-3-clause