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
fluggo/Canvas
fluggo/editor/plugins/_codec.py
1
9363
# This file is part of the Fluggo Media Library for high-quality # video and audio processing. # # Copyright 2012 Brian J. Crowell <brian@fluggo.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 Founda...
gpl-3.0
halaszk/universal7420
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
ridfrustum/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/prototypes/geom.py
315
4821
import re from datetime import date from ctypes import c_char, c_char_p, c_double, c_int, c_ubyte, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal, GEOJSON from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope from...
gpl-3.0
zhuwenping/python-for-android
python-build/python-libs/gdata/build/lib/gdata/experimental_oauth.py
133
4540
#!/usr/bin/env python import binascii import urllib import time import random import hmac from gdata.tlslite.utils import keyfactory from gdata.tlslite.utils import cryptomath OAUTH_VERSION = '1.0' def get_normalized_http_url(http_request): full_url = http_request.uri.to_string() return full_url[:full_url.find('...
apache-2.0
AICP/kernel_motorola_msm8992
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
alqfahad/odoo
addons/mail/res_users.py
314
10337
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
cjhak/b2share
invenio/testsuite/test_legacy_webdoc.py
13
6522
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011, 2013 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (a...
gpl-2.0
maxrosan/NS-3-support-for-OBS
src/topology-read/bindings/modulegen__gcc_LP64.py
2
151161
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
xinjiguaike/edx-platform
common/lib/symmath/symmath/formula.py
66
25851
#!/usr/bin/python # -*- coding: utf-8 -*- """ Flexible python representation of a symbolic mathematical formula. Acceptes Presentation MathML, Content MathML (and could also do OpenMath). Provides sympy representation. """ # # File: formula.py # Date: 04-May-12 (creation) # Author: I. Chuang <ichuang@mit.edu> # im...
agpl-3.0
jroweboy/bzrflag
bzrflag/world.py
19
5244
# Bzrflag # Copyright 2008-2011 Brigham Young University # # This file is part of Bzrflag. # # Bzrflag 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 l...
gpl-3.0
drglove/SickRage
sickbeard/notifiers/freemobile.py
5
4897
# Author: Marvin Pinto <me@marvinp.ca> # Author: Dennis Lutter <lad1337@gmail.com> # Author: Aaron Bieber <deftly@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
gpl-3.0
olsonse/linuxcnc
src/emc/usr_intf/pncconf/tests.py
5
79931
#!/usr/bin/env python2.4 # -*- encoding: utf-8 -*- # This is pncconf, a graphical configuration editor for LinuxCNC # Chris Morley copyright 2009 # This is based from stepconf, a graphical configuration editor for linuxcnc # Copyright 2007 Jeff Epler <jepler@unpythonic.net> # # This program is free softw...
gpl-2.0
Rendaw/luxem-python
luxem/write.py
1
1827
import _luxem from luxem.struct import Typed class _ArrayElement(object): def __init__(self, item): self.item_iter = iter(item) def step(self, writer, stack): try: next_child = next(self.item_iter) writer._process(stack, next_child) return True exce...
bsd-2-clause
Vizerai/grpc
src/python/grpcio_health_checking/health_commands.py
9
2000
# 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
ecolitan/fatics
venv/lib/python2.7/site-packages/twisted/application/internet.py
2
12569
# -*- test-case-name: twisted.application.test.test_internet,twisted.test.test_application,twisted.test.test_cooperator -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Reactor-based Services Here are services to run clients, servers and periodic services using the reactor. If you want...
agpl-3.0
mohnish/planout
planout-editor/planout-editor-kernel.py
9
2393
from flask import Flask, jsonify, render_template, request, url_for app = Flask(__name__) from planout.interpreter import Interpreter import traceback import json import sys def testPlanOutScript(script, inputs={}, overrides=None, assertions=None): payload = {} # make sure experiment runs with the given inputs ...
bsd-3-clause
zeeman/cyder
cyder/management/commands/lib/dhcpd_compare2/dhcp_objects.py
2
6248
from functools import total_ordering from ipaddr import IPAddress from itertools import ifilter def is_rangestmt(x): return isinstance(x, RangeStmt) def join_p(xs, indent=1, prefix=''): if not xs: return '' lines = "".join(map(str, xs)).splitlines() prefix += ' ' * indent return "".jo...
bsd-3-clause
UECIDE/UECIDE_data
compilers/arm-eabi-gcc/linux/arm-eabi-gcc/arm-none-eabi/lib/thumb/armv7e-m/libstdc++.a-gdb.py
1
2382
# -*- python -*- # Copyright (C) 2009, 2010 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versi...
bsd-3-clause
mosaic-cloud/mosaic-distribution-dependencies
dependencies/nodejs/0.8.22/deps/npm/node_modules/node-gyp/gyp/test/small/gyptest-small.py
89
1405
#!/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. """ Runs small tests. """ import imp import os import sys import unittest import TestGyp test = TestGyp.TestGyp() # Add pylib to the im...
apache-2.0
htygithub/bokeh
bokeh/model.py
1
13736
from __future__ import absolute_import, print_function import logging logger = logging.getLogger(__file__) from json import loads from six import iteritems from .properties import Any, HasProps, List, MetaHasProps, String from .query import find from .util.callback_manager import CallbackManager from .util.future i...
bsd-3-clause
cnvogelg/fs-uae-gles
launcher/fs_uae_launcher/server/game.py
4
25322
""" FS-UAE Netplay Game Server Copyright (C) 2012 Frode Solheim This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This ...
gpl-2.0
djaodjin/djaodjin-pages
testsite/templatetags/testsite_tags.py
1
1914
# Copyright (c) 2021, DjaoDjin 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 t...
bsd-2-clause
subramani95/neutron
neutron/debug/debug_agent.py
3
7740
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Nachi Ueno, NTT MCL, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http:/...
apache-2.0
joshuajan/odoo
addons/account_check_writing/__init__.py
446
1111
# -*- 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
popazerty/enigma2-4.3
lib/python/Screens/PowerTimerEntry.py
8
15641
from Screens.Screen import Screen from Components.config import ConfigSelection, ConfigSelectionNumber, ConfigSubList, ConfigDateTime, ConfigClock, ConfigYesNo, ConfigInteger, getConfigListEntry from Components.ActionMap import NumberActionMap from Components.ConfigList import ConfigListScreen from Components.MenuList ...
gpl-2.0
kogotko/carburetor
openstack_dashboard/dashboards/project/cgroups/workflows.py
4
16683
# 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
repotvsupertuga/tvsupertuga.repository
script.module.resolveurl/lib/resolveurl/plugins/rapidvideocom.py
2
2285
# -*- coding: utf-8 -*- """ resolveurl Kodi Plugin Copyright (C) 2018 Gujal 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. Th...
gpl-2.0
v-iam/azure-sdk-for-python
azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py
4
2123
# 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 ...
mit
alexholcombe/twoWords
Charlie/stringResponse.py
2
7552
from psychopy import event, sound import numpy as np import string from copy import deepcopy import time def drawResponses(responses,respStim,numCharsWanted,drawBlanks): '''Draw the letters the user has entered drawBlanks is whether to show empty spaces with _, that's why numCharsWanted would be needed '''...
mit
nlloyd/SubliminalCollaborator
libs/twisted/internet/reactor.py
6
1887
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ The reactor is the Twisted event loop within Twisted, the loop which drives applications using Twisted. The reactor provides APIs for networking, threading, dispatching events, and more. The default reactor depends on the platform and will be...
apache-2.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/pyasn1/type/useful.py
25
1159
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from pyasn1.type import univ, char, tag __all__ = ['ObjectDescriptor', 'GeneralizedTime', 'UTCTime'] NoValue = univ.NoValue noValue = univ.noValue class ObjectDescri...
mit
kevin-coder/tensorflow-fork
tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py
8
7386
# 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
jacobian-archive/django-buildmaster
djangobotcfg/buildsteps.py
2
6606
""" Individual custom build steps for the Django tests. See the docstring in builders.py for an overview of how these all fit together. I'm using subclasses (instead of just passing arguments) since it makes the overall build factory in builders.py easier to read. Unfortunately it makes some of what's going here a bi...
bsd-3-clause
rowemoore/odoo
addons/share/ir_model.py
439
2272
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 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
pierrelapointe/scancode-toolkit
tests/cluecode/data/ics/chromium-testing-gmock-test/gmock_test_utils.py
13
1064
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # 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 following disclaimer. # * Redistributions ...
apache-2.0
davidzchen/tensorflow
tensorflow/python/distribute/distribute_config.py
47
1810
# 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
kennethreitz/lplex
logplex/packages/requests/packages/charade/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versio...
mit
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/distinct_error.py
1
1155
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
jcmarks/jcmarks-fusion
lib/werkzeug/contrib/wrappers.py
318
10331
# -*- coding: utf-8 -*- """ werkzeug.contrib.wrappers ~~~~~~~~~~~~~~~~~~~~~~~~~ Extra wrappers or mixins contributed by the community. These wrappers can be mixed in into request objects to add extra functionality. Example:: from werkzeug.wrappers import Request as RequestBase fr...
apache-2.0
cactusbin/nyt
matplotlib/examples/tests/backend_driver.py
3
15228
#!/usr/bin/env python from __future__ import print_function, division """ This is used to drive many of the examples across the backends, for regression testing, and comparing backend efficiency. You can specify the backends to be tested either via the --backends switch, which takes a comma-separated list, or as sepa...
unlicense
RemoteConnectionManager/RCM_spack_deploy
scripts/test.py
1
2425
import utils import os import logging ################# if __name__ == '__main__': import tempfile import shutil print("__file__:" + os.path.realpath(__file__)) #logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) #logging.debug('This message should appear on the console')...
lgpl-3.0
TeamExodus/external_chromium_org
third_party/markdown/treeprocessors.py
104
14665
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
bsd-3-clause
timoschwarzer/blendworks
BlendWorks Server/python/Lib/test/test_list.py
90
4222
import sys from test import support, list_tests import pickle class ListTest(list_tests.CommonTest): type2test = list def test_basic(self): self.assertEqual(list([]), []) l0_3 = [0, 1, 2, 3] l0_3_bis = list(l0_3) self.assertEqual(l0_3, l0_3_bis) self.assertTrue(l0_3 is ...
gpl-2.0
horance-liu/tensorflow
tensorflow/contrib/sparsemax/python/ops/sparsemax_loss.py
103
2246
# 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
rrrene/django
django/core/management/commands/runserver.py
203
7383
from __future__ import unicode_literals import errno import os import re import socket import sys from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import BaseCommand, CommandError from django.core.servers.basehttp i...
bsd-3-clause
rebstar6/servo
tests/wpt/web-platform-tests/referrer-policy/generic/tools/spec_validator.py
326
6673
#!/usr/bin/env python import json, sys from common_paths import * def assert_non_empty_string(obj, field): assert field in obj, 'Missing field "%s"' % field assert isinstance(obj[field], basestring), \ 'Field "%s" must be a string' % field assert len(obj[field]) > 0, 'Field "%s" must not be empty'...
mpl-2.0
jyotikamboj/container
django/views/i18n.py
35
11024
import importlib import json import os import gettext as gettext_module from django import http from django.apps import apps from django.conf import settings from django.template import Context, Template from django.utils.translation import check_for_language, to_locale, get_language, LANGUAGE_SESSION_KEY from django....
mit
boehm-s/dotfiles
.emacs.d/elpy/rpc-venv/lib/python3.7/site-packages/pip/_vendor/urllib3/connectionpool.py
5
36263
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket from .exceptions import ( ClosedPoolError, ProtocolError, EmptyPoolError, HeaderParsingError, HostChangedErr...
gpl-3.0
lamblin/fuel
setup.py
2
1368
"""Installation script.""" from os import path from setuptools import find_packages, setup HERE = path.abspath(path.dirname(__file__)) with open(path.join(HERE, 'README.rst')) as f: LONG_DESCRIPTION = f.read().strip() setup( name='fuel', version='0.0.1', # PEP 440 compliant description='Data pipelin...
mit
jlspyaozhongkai/Uter
third_party_backup/Python-2.7.9/Lib/smtpd.py
174
18543
#! /usr/bin/env python """An RFC 2821 smtp proxy. Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] Options: --nosetuid -n This program generally tries to setuid `nobody', unless this flag is set. The setuid call will fail if this program is not run as root (in ...
gpl-3.0
usakhelo/FreeCAD
src/Mod/Start/StartPage/ArchDesign.py
32
1805
#*************************************************************************** #* * #* Copyright (c) 2012 * #* Yorik van Havre <yorik@uncreated.net> * #* ...
lgpl-2.1
pxsdirac/tushare
tushare/datayes/master.py
17
4457
# -*- coding:utf-8 -*- """ 通联数据 Created on 2015/08/24 @author: Jimmy Liu @group : waditu @contact: jimmysoa@sina.cn """ from pandas.compat import StringIO import pandas as pd from tushare.util import vars as vs from tushare.util.common import Client from tushare.util import upass as up class Master(): def _...
bsd-3-clause
pabloborrego93/edx-platform
lms/djangoapps/courseware/tests/test_masquerade.py
7
18408
""" Unit tests for masquerade. """ import json import pickle from mock import patch from nose.plugins.attrib import attr from datetime import datetime from django.core.urlresolvers import reverse from django.test import TestCase, RequestFactory from django.utils.timezone import UTC from capa.tests.response_xml_factor...
agpl-3.0
renmengye/imageqa-public
src/imageqa_modelavg.py
1
4250
import sys import os import numpy as np import imageqa_test as it import nn def runAvgAll(models, data): print 'Running model %s' % modelId modelOutput = nn.test(model, data['testData'][0]) modelOutputs.append(modelOutput) finalOutput = np.zeros(modelOutputs[0].shape) for output in modelOutputs: ...
mit
nhicher/ansible
lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py
29
26338
#!/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 distribut...
gpl-3.0
siimeon/Kipa
web/robot/kipa_sivuosoitteet_ja_otsikot.py
1
1858
'''Kisan alasivujen URLit ja sivujen otsikot''' # -*- coding: utf-8 -*- # Testikisan nimimääritys, oletusarvona: testikisa TESTIKISA = u'testikisa' # Kipa pääsivu KIPA_OTSIKKO = u'Kipa - kaikki kisat' KIPA_URL = u'http://127.0.0.1:8000/kipa' #Suoritusten syöttö TULOSTEN_SYOTTO_OTSIKKO = u'Kipa - Syötä tuloksia' TU...
gpl-3.0
tlakshman26/cinder-https-changes
cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py
20
1691
# 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
Marquand/cutorrent
simplejson/scanner.py
4
1975
""" Iterator based sre token scanner """ import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN import re __all__ = ['Scanner', 'pattern'] FLAGS = (re.VERBOSE | re.MULTILINE | re.DOTALL) class Scanner(object): def __init__(self, lexicon, flags=FLAGS): self.actions = [Non...
apache-2.0
ClearCorp-dev/odoo
addons/l10n_multilang/__openerp__.py
339
1670
# -*- 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
fujunwei/chromium-crosswalk
tools/perf/benchmarks/page_cycler.py
3
6823
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import benchmark from measurements import page_cycler import page_sets class _PageCycler(benchmark.Benchmark): options = {'pageset_repeat...
bsd-3-clause
infected-lp/android_kernel_sony_msm
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
czhengsci/pymatgen
pymatgen/electronic_structure/tests/test_boltztrap.py
4
16912
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals import unittest import os import json import warnings from pymatgen.electronic_structure.bandstructure import BandStructure from pymatgen.electronic_structure.boltztrap ...
mit
varunarya10/boto
boto/glacier/__init__.py
145
1685
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 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 ...
mit
jk1/intellij-community
python/helpers/coveragepy/coverage/config.py
39
12763
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Config file for coverage.py""" import collections import os import re import sys from coverage.backward import configparser, iitems, string_class from coverage...
apache-2.0
sirikata/sirikata
tools/space/test_deploy/server.py
1
2562
#!/usr/bin/env python import subprocess import os.path # This script manages running a single server instance given some # configuration information. It will usually be driven by a parent # script which deals with common configuration and generating # per-instance configuration options. def AddStandardParams(appna...
bsd-3-clause
dbcli/vcli
vcli/packages/vspecial/tests/dbutils.py
17
1980
import pytest import psycopg2 import psycopg2.extras # TODO: should this be somehow be divined from environment? POSTGRES_USER, POSTGRES_HOST = 'postgres', 'localhost' def db_connection(dbname=None): conn = psycopg2.connect(user=POSTGRES_USER, host=POSTGRES_HOST, database=dbname) conn.autocommit ...
bsd-3-clause
abhishek-ram/pyas2
pyas2/management/commands/runas2server.py
1
3051
from django.core.management.base import BaseCommand from django.core.handlers.wsgi import WSGIHandler from django.utils.translation import ugettext as _ from pyas2 import pyas2init import pyas2 import os class Command(BaseCommand): help = _(u'Starts the PyAS2 server') def handle(self, *args, **options): ...
gpl-2.0
THESLA/Saber_Prototipe
node_modules/utf8/tests/generate-test-data.py
1788
1435
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
apache-2.0
helldorado/ansible
lib/ansible/modules/remote_management/ucs/ucs_vlans.py
64
6941
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
johnpbatty/python-neutronclient
neutronclient/tests/unit/test_cli20_network.py
2
25072
# All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
wjn740/linux
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
talbrecht/pism_pik07
examples/marine/circular/circular_ice_sheet.py
2
2528
#!/usr/bin/env python # Copyright (C) 2012, 2013, 2014 Ricarda Winkelmann, Torsten Albrecht, # Ed Bueler, and Constantine Khroulev import numpy as np import scipy.optimize as opt import PISMNC import piktests_utils # command line arguments options = piktests_utils.process_options("circular_withshelf.nc", ...
gpl-3.0
vFense/vFenseAgent-nix
agent/deps/rpm/Python-2.7.5/lib/python2.7/dis.py
270
6499
"""Disassembler of Python byte code into mnemonics.""" import sys import types from opcode import * from opcode import __all__ as _opcodes_all __all__ = ["dis", "disassemble", "distb", "disco", "findlinestarts", "findlabels"] + _opcodes_all del _opcodes_all _have_code = (types.MethodType, types.FunctionT...
lgpl-3.0
tornadozou/tensorflow
tensorflow/tools/ci_build/update_version.py
10
12706
#!/usr/bin/python # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
darkleons/BE
addons/l10n_fr/report/__init__.py
424
1475
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
usc-isi/nova
nova/openstack/common/excutils.py
21
1732
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # Copyright 2012, 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.ap...
apache-2.0
vivek8943/django-chartit
chartit/utils.py
7
1360
from collections import defaultdict def _convert_to_rdd(obj): """Accepts a dict or a list of dicts and converts it to a RecursiveDefaultDict.""" if isinstance(obj, dict): rdd = RecursiveDefaultDict() for k, v in obj.items(): rdd[k] = _convert_to_rdd(v) return rdd e...
bsd-2-clause
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/application_gateway_available_ssl_options_py3.py
1
3168
# 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 ...
mit
enriquesanchezb/practica_utad_2016
venv/lib/python2.7/site-packages/pip/download.py
143
31722
from __future__ import absolute_import import cgi import email.utils import getpass import json import logging import mimetypes import os import platform import re import shutil import sys import tempfile try: import ssl # noqa HAS_TLS = True except ImportError: HAS_TLS = False from pip._vendor.six.move...
apache-2.0
ning/collector
src/utils/py/scribe/scribe.py
35
6440
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * import fb303.FacebookService from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol try: from thrift.pr...
apache-2.0
HwisooSo/gemV-update
src/mem/ExternalSlave.py
47
2722
# Copyright (c) 2014 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
sorenk/ansible
test/units/modules/remote_management/oneview/test_oneview_ethernet_network.py
78
14524
# -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # 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 optio...
gpl-3.0
legalsylvain/OpenUpgrade
addons/resource/__openerp__.py
114
2032
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
razvanphp/arangodb
3rdParty/V8-3.31.74.1/third_party/python_26/Lib/test/test_math.py
55
38805
# Python test set -- math module # XXXX Should not do tests around zero only from test.test_support import run_unittest, verbose import unittest import math import os import sys import random eps = 1E-05 NAN = float('nan') INF = float('inf') NINF = float('-inf') # locate file with test values if __name__ == '__main_...
apache-2.0
amisrs/angular-flask
angular_flask/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/zxjdbc.py
18
2184
# mssql/zxjdbc.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mssql+zxjdbc :name: zxJDBC for Jython :dbapi: zxjdbc :con...
mit
simudream/django-sql-explorer
explorer/south_migrations/0003_auto__del_field_query_created_by__add_field_query_created_by_user.py
8
6728
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.conf import settings user_model = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') class Migration(SchemaMigration): def forwards(sel...
mit
Distrotech/PyQt-x11
examples/phonon/musicplayer.py
20
12411
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
noba3/KoTos
addons/plugin.image.picasa/gdata/tlslite/utils/Crypto/SelfTest/Signature/test_pkcs1_15.py
113
9468
# -*- coding: utf-8 -*- # # SelfTest/Signature/test_pkcs1_15.py: Self-test for PKCS#1 v1.5 signatures # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyon...
gpl-2.0
EDUlib/edx-platform
cms/djangoapps/course_creators/tests/test_admin.py
4
8373
""" Tests course_creators.admin.py. """ from unittest import mock from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core import mail from django.http import HttpRequest from django.test import TestCase from cm...
agpl-3.0
vnsofthe/odoo
addons/lunch/wizard/lunch_order.py
440
1299
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
taito/scrapy
scrapy/utils/request.py
28
3459
""" This module provides some useful functions for working with scrapy.http.Request objects """ from __future__ import print_function import hashlib import weakref from six.moves.urllib.parse import urlunparse from w3lib.http import basic_auth_header from scrapy.utils.python import to_bytes, to_native_str from w3lib...
bsd-3-clause
gsmartway/odoo
openerp/addons/base/res/res_bank.py
242
10554
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
AMDmi3/repology
repology/parsers/parsers/rubygem.py
1
1739
# Copyright (C) 2017 Steve Wills <steve@mouf.net> # Copyright (C) 2018-2019 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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, ei...
gpl-3.0
kaffeel/oppia
core/domain/exp_domain_test.py
9
60159
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
samfpetersen/gnuradio
gr-qtgui/examples/pyqt_waterfall_c.py
38
6535
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
stelfrich/openmicroscopy
components/tools/OmeroPy/test/unit/clitest/mocks.py
20
2812
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Mock context objects for cli tests. Copyright 2010 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import subprocess import logging from omero.cli import CLI, NonZeroReturnCode from omero_ext import ...
gpl-2.0
CatsAndDogsbvba/odoo
addons/google_account/google_account.py
178
8958
# -*- coding: utf-8 -*- import openerp from openerp.http import request from openerp.osv import osv from openerp import SUPERUSER_ID from openerp.tools.translate import _ from datetime import datetime from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT import werkzeug.urls import urllib2 import simplejson impor...
agpl-3.0
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/zone/vacant_industrial_job_space.py
2
2200
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from variable_functions import my_attribute_label from urbansim.gridcell.vacant_industrial_job_space import vacant_industrial_job_space as gc_vac...
gpl-2.0
fast90/youtube-dl
youtube_dl/extractor/democracynow.py
15
3015
# coding: utf-8 from __future__ import unicode_literals import re import os.path from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( url_basename, remove_start, ) class DemocracynowIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?democracynow.org/(?P<id>[^\?]...
unlicense
imincik/pkg-qgis-1.8
src/plugins/plugin_builder.py
13
7100
#!/usr/bin/python #*************************************************************************** # plugin_builder.py # A script to automate creation of a new QGIS plugin using the plugin_template # -------------------------------------- # Date : Sun Sep 16 12:11:04 AKDT 2007 # Copyright ...
gpl-2.0