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
sbtlaarzc/vispy
vispy/scene/canvas.py
20
21169
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import weakref import numpy as np from .. import gloo from .. import app from .visuals import VisualNode from ..visuals.transforms import Tra...
bsd-3-clause
onitake/ansible
lib/ansible/modules/network/illumos/dladm_vnic.py
43
6588
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@gmail.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
jzylks/ncclient
docs/source/conf.py
11
6704
# -*- coding: utf-8 -*- # # ncclient documentation build configuration file, created by # sphinx-quickstart on Fri Sep 18 17:32:15 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
apache-2.0
pnedunuri/scipy
scipy/optimize/_root.py
109
26007
""" Unified interfaces to root finding algorithms. Functions --------- - root : find a root of a vector function. """ from __future__ import division, print_function, absolute_import __all__ = ['root'] import numpy as np from scipy._lib.six import callable from warnings import warn from .optimize import MemoizeJa...
bsd-3-clause
cedub/tower-cli
tests/test_models_fields.py
2
3064
# Copyright 2014, Ansible, Inc. # Luke Sneeringer <lsneeringer@ansible.com> # # 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
safwanrahman/kuma
kuma/wiki/tests/test_helpers.py
4
6145
# -*- coding: utf-8 -*- import mock from django.contrib.sites.models import Site from kuma.core.cache import memcache from kuma.core.tests import eq_ from kuma.users.tests import UserTestCase from . import WikiTestCase, document, revision from ..models import DocumentZone from ..templatetags.jinja_helpers import (ab...
mpl-2.0
crazy-canux/xplugin_nagios
plugin/plugins/jit/src/jit/session.py
1
6030
# -*- coding: utf-8 -*- # Copyright (C) Canux CHENG <canuxcheng@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to ...
gpl-2.0
WoLpH/EventGhost
lib27/site-packages/tornado/test/httpclient_test.py
12
26340
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import base64 import binascii from contextlib import closing import copy import functools import sys import threading import datetime from io import BytesIO from tornado.escape import utf8 from tornado import gen f...
gpl-2.0
bxlab/HiFive_Paper
Scripts/HiCLib/bx-python-0.7.1/scripts/maf_print_scores.py
2
1582
#!/usr/bin/env python """ Read a MAF from standard input and print the score of each block. It can optionally recalculate each score using the hox70 matrix, and normalize the score by the number of columns in the alignment. TODO: Should be able to read an arbitrary scoring matrix. usage: %prog [options] -r, --r...
bsd-3-clause
rdio/translate-toolkit
lang/test_ne.py
33
2955
#!/usr/bin/env python # -*- coding: utf-8 -*- from translate.lang import factory def test_punctranslate(): """Tests that we can translate punctuation.""" language = factory.getlanguage('ne') assert language.punctranslate(u"") == u"" assert language.punctranslate(u"abc efg") == u"abc efg" assert l...
gpl-2.0
adrianholovaty/django
django/contrib/localflavor/it/util.py
436
1807
from django.utils.encoding import smart_str, smart_unicode def ssn_check_digit(value): "Calculate Italian social security number check digit." ssn_even_chars = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': ...
bsd-3-clause
hack-r/supeRstition
python/pycalcal/wrappers.py
2
1715
from pycalcal import chinese_from_fixed, fixed_from_chinese, \ gregorian_from_fixed, fixed_from_gregorian, \ chinese_new_year from datetime import date from collections import namedtuple chinese_date= namedtuple('chinese_date', 'year, month, day, is_leap_month') def _tuple_fr...
gpl-2.0
embray/d2to1
d2to1/core.py
2
3325
import os import sys import warnings from distutils.errors import DistutilsFileError, DistutilsSetupError from .extern import six from .util import DefaultGetDict, IgnoreDict, cfg_to_args def d2to1(dist, attr, value): """Implements the actual d2to1 setup() keyword. When used, this should be the only keywor...
bsd-3-clause
bgxavier/nova
nova/tests/unit/api/openstack/compute/contrib/test_console_output.py
33
6686
# Copyright 2011 Eldar Nugaev # 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 ...
apache-2.0
nikolaychernov/tree-view-list-android
Android-OTA/CreateOTA.py
43
3230
''' Created on 21-03-2011 @author: maciek ''' from IndexGenerator import IndexGenerator from optparse import OptionParser import os import tempfile import shutil import logging logging.basicConfig(level = logging.DEBUG) parser = OptionParser() parser.add_option('-n', '--app-name', action='store', dest='appName', hel...
bsd-2-clause
creeptonik/videojs-live-card
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
1366
120842
# 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
mit
hollabaq86/haikuna-matata
env/lib/python2.7/site-packages/nltk/classify/senna.py
5
7011
# encoding: utf-8 # Natural Language Toolkit: Senna Interface # # Copyright (C) 2001-2017 NLTK Project # Author: Rami Al-Rfou' <ralrfou@cs.stonybrook.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ A general interface to the SENNA pipeline that supports any of the operations specified in ...
mit
mpvismer/pyqtgraph
examples/GLScatterPlotItem.py
28
2864
# -*- coding: utf-8 -*- """ Demonstrates use of GLScatterPlotItem with rapidly-updating plots. """ ## Add path to library (just for examples; you do not need this) import initExample from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph.opengl as gl import numpy as np app = QtGui.QApplication([]) w = gl.GLViewWid...
mit
vaygr/ansible
lib/ansible/modules/network/iosxr/iosxr_banner.py
25
8287
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
jdarpinian/web-ui-skeleton
files-to-c-arrays.py
2
2181
#!/usr/bin/env python # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
iulian787/spack
lib/spack/external/ruamel/yaml/error.py
29
2752
# coding: utf-8 from __future__ import absolute_import __all__ = ['Mark', 'YAMLError', 'MarkedYAMLError'] try: from .compat import utf8 except (ImportError, ValueError): # for Jython from ruamel.yaml.compat import utf8 class Mark(object): def __init__(self, name, index, line, column, buffer, pointer):...
lgpl-2.1
google-code/arisgames
zxing-master/cpp/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_collections.py
34
1869
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
mit
kelle/astropy
astropy/io/ascii/tests/test_read.py
1
47925
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import re from io import BytesIO, open from collections import OrderedDict import locale import platform import pytest import numpy as np from ....extern import six # noqa from ....extern.six.moves impor...
bsd-3-clause
mljar/mljar-api-python
tests/result_client_test.py
1
4641
''' ResultClient tests. ''' import os import unittest import pandas as pd import time from mljar.client.project import ProjectClient from mljar.client.dataset import DatasetClient from mljar.client.experiment import ExperimentClient from mljar.client.result import ResultClient from mljar.exceptions import BadRequestEx...
apache-2.0
jakevdp/networkx
networkx/readwrite/leda.py
42
2847
""" Read graphs in LEDA format. LEDA is a C++ class library for efficient data types and algorithms. Format ------ See http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.ed...
bsd-3-clause
HatsuneMiku0309/2014cdag10
wsgi/static/Brython2.1.0-20140419-113919/Lib/unittest/test/test_break.py
785
8138
import gc import io import os import sys import signal import weakref import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 " "if threa...
gpl-2.0
mlperf/training_results_v0.7
NVIDIA/benchmarks/ssd/implementations/mxnet/mlperf_log_utils.py
1
2395
import collections import os import subprocess import numpy as np from mlperf_logging.mllog import constants as mlperf_constants from mlperf_logging import mllog class MPIWrapper(object): def __init__(self): self.comm = None self.MPI = None def get_comm(self): if self.comm is None: ...
apache-2.0
felipecocco/oppia
core/jobs_test.py
6
33071
# 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
vladrulez/old_scripts
crtfile_check.py
1
2457
#!/usr/bin/env python # vim: set filetype=python ts=4 sw=4 et si # -*- coding: utf-8 -*- # Author: Vladimir Blokhin ########################### import sys,os,re,tempfile,subprocess def run_command(command): p = subprocess.Popen(command,stdout=subprocess.PIPE, shell=True) return p.communicate()[0] def...
apache-2.0
markcharyk/data-structures
data_structures/b_tree.py
1
5000
from data_structures.stack import Stack class Node(object): def __init__(self, key=None, val=None, capacity=3): self.count = 0 if key is not None: self.count = 1 self.elems = [(key, val)] for i in xrange(capacity-1): self.elems.append((None, None)) s...
mit
daniel-leschkowski/generateDSv2
tests/attr_groups1_sub.py
2
5005
#!/usr/bin/env python # # Generated by generateDS.py. # import sys import attr_groups2_sup as supermod etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: # lxml from lxml import etree...
mit
lakshmi-kannan/st2
st2tests/st2tests/http.py
13
1095
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
tbabej/freeipa
ipapython/dnssec/bindmgr.py
2
8625
# # Copyright (C) 2014 FreeIPA Contributors see COPYING for license # from datetime import datetime import dns.name import errno import os import shutil import stat import ipalib.constants from ipapython.dn import DN from ipapython import ipa_log_manager, ipautil from ipaplatform.paths import paths from ipapython.d...
gpl-3.0
Antiun/yelizariev-saas
saas_portal/models/saas_portal.py
1
19270
# -*- coding: utf-8 -*- import openerp from openerp import models, fields, api, SUPERUSER_ID, exceptions from openerp.addons.saas_utils import connector, database from openerp import http from openerp.tools import config, scan_languages from openerp.tools.translate import _ from openerp.addons.base.res.res_partner impo...
lgpl-3.0
overtherain/scriptfile
software/googleAppEngine/lib/webob_0_9/setup.py
32
1070
from setuptools import setup, find_packages import sys, os version = '0.9' setup(name='WebOb', version=version, description="WSGI request and response object", long_description="""\ WebOb provides wrappers around the WSGI request environment, and an object to help create WSGI responses. The objects...
mit
gylian/sickrage
lib/requests/packages/urllib3/util/timeout.py
1004
9544
# The default socket timeout, used by httplib to indicate that no timeout was # specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT import time from ..exceptions import TimeoutStateError # A sentinel value to indicate that no timeout was specified by the user in # urllib3 _Default = object() def current...
gpl-3.0
miyakz1192/neutron
neutron/tests/unit/api/v2/test_resource.py
17
14344
# Copyright (c) 2012 Intel Corporation. # 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 re...
apache-2.0
codevlabs/grab
test/grab_pickle.py
12
1081
# coding: utf-8 try: import cPickle as pickle except ImportError: import pickle from multiprocessing import Queue from test.util import BaseGrabTestCase from test.util import build_grab class TestGrab(BaseGrabTestCase): def setUp(self): self.server.reset() def test_pickling(self): ""...
mit
cstipkovic/spidermonkey-research
testing/web-platform/tests/tools/pytest/doc/en/genapi.py
203
1131
import textwrap import inspect class Writer: def __init__(self, clsname): self.clsname = clsname def __enter__(self): self.file = open("%s.api" % self.clsname, "w") return self def __exit__(self, *args): self.file.close() print "wrote", self.file.name def line...
mpl-2.0
40223119/2015cda
static/Brython3.1.1-20150328-091302/Lib/numbers.py
883
10398
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for numbers, according to PEP 3141. TODO: Fill out more detailed documentation on the operators.""" from abc import ABCMeta, abstractmethod __all__ = ["Number", "Complex", "Real", "Rat...
gpl-3.0
YuMatsuzawa/HadoopEclipseProject
hadoop-0.20.2-cdh3u5/src/contrib/cloud/src/py/hadoop/cloud/providers/dummy.py
16
2282
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
lucalianas/openmicroscopy
components/tools/OmeroCpp/ext/gtest-1.7.0/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 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...
gpl-2.0
adrianholovaty/django
tests/regressiontests/localflavor/pl/tests.py
33
22496
from django.contrib.localflavor.pl.forms import (PLProvinceSelect, PLCountySelect, PLPostalCodeField, PLNIPField, PLPESELField, PLNationalIDCardNumberField, PLREGONField) from django.test import SimpleTestCase class PLLocalFlavorTests(SimpleTestCase): def test_PLProvinceSelect(self): f = PLProvinceSe...
bsd-3-clause
bobcyw/django
django/contrib/auth/backends.py
468
6114
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission class ModelBackend(object): """ Authenticates against settings.AUTH_USER_MODEL. """ def authenticate(self, username=None, password=None, **kwargs): UserMod...
bsd-3-clause
ucsb-cs/submit
submit/__init__.py
1
5135
from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid.config import Configurator from pyramid.security import ALL_PERMISSIONS, Allow, Authenticated from pyramid.session import UnencryptedCookieSessionFactoryConfig from sqlalchemy import engi...
bsd-2-clause
qrkourier/ansible
lib/ansible/plugins/connection/iocage.py
44
2394
# based on jail.py (c) 2013, Michael Scherer <misc@zarb.org> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2016, Stephan Lohse <dev-github@ploek.org> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
gpl-3.0
mansilladev/zulip
bots/zulip_git_config.py
125
1688
# Zulip, Inc's internal git plugin configuration. # The plugin and example config are under api/integrations/ # Leaving all the instructions out of this file to avoid having to # sync them as we update the comments. ZULIP_USER = "commit-bot@zulip.com" ZULIP_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # commit_notic...
apache-2.0
40223114/2015_g4
static/Brython3.1.0-20150301-090019/Lib/unittest/test/test_functiontestcase.py
791
5478
import unittest from .support import LoggingResult class Test_FunctionTestCase(unittest.TestCase): # "Return the number of tests represented by the this test object. For # TestCase instances, this will always be 1" def test_countTestCases(self): test = unittest.FunctionTestCase(lambda: None) ...
gpl-3.0
NedJunk/APlasticBag
driver.py
1
1662
import tweepy, time, sys, yaml, json class Bot(object): """docstring for Bot""" def __init__(self): super(Bot, self).__init__() self.creds = None self.api = self.load_api() def load_api(self): with open('credentials.yaml', 'r') as f: self.creds = yaml.load(f) auth = tweepy.OAuthHandler(self.creds[...
mit
kabakchey/django-annoying
tests/settings.py
2
1372
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.c...
bsd-3-clause
Grumbel/rfactortools
minised.py
1
5031
#!/usr/bin/env python3 # Minimal sed replacement # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.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...
gpl-3.0
Victorgichohi/ChromeWebLab
Orchestra/sw/hub/orchestra/messenger/websocketclient.py
7
5137
# # websocketclient.py: WebSockets connection to Node.js server # # Copyright 2013 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/li...
apache-2.0
nexusz99/boto
boto/directconnect/layer1.py
148
23592
# Copyright (c) 2013 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 restriction, including # without limitation the rights ...
mit
andresailer/DIRAC
Core/Utilities/SiteSEMapping.py
3
5364
""" The SiteSEMapping module performs the necessary CS gymnastics to resolve site and SE combinations. These manipulations are necessary in several components. Assumes CS structure of: /Resources/Sites/<GRIDNAME>/<SITENAME> """ __RCSID__ = "$Id$" from DIRAC import gLogger, S_OK from DIRAC.DataManag...
gpl-3.0
lshain-android-source/external-chromium_org
chrome/test/mini_installer/registry_verifier.py
23
2057
# 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. import _winreg def VerifyRegistryEntries(entries): """Verifies that the current registry matches the specified criteria. Args: entries: A dictiona...
bsd-3-clause
onitake/ansible
test/units/playbook/test_become.py
42
3175
# -*- coding: utf-8 -*- # (c) 2018 Matt Martz <matt@sivel.net> # 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 import re from ansible.errors import AnsibleParserError from ansible.playbo...
gpl-3.0
jocave/snapcraft
snapcraft/tests/test_sources.py
2
20413
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
gpl-3.0
strint/tensorflow
tensorflow/python/layers/base.py
8
12144
# 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
curiosityio/taiga-docker
taiga-back/taiga-back/tests/integration/test_watch_tasks.py
2
5090
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2016 Anler Hernández <hello@anler.me> # This ...
mit
ayosef/pynet_test
ANSIBLE/library/eos_routemap.py
8
20166
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, 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, # t...
apache-2.0
Dhivyap/ansible
lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate.py
89
5460
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, Abhijeet Kasurde <akasurde@redhat.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_vers...
gpl-3.0
mancoast/CPythonPyc_test
cpython/276_test_zipfile.py
36
61036
# We can test part of the module without zlib. try: import zlib except ImportError: zlib = None import os import io import sys import time import shutil import struct import zipfile import unittest from StringIO import StringIO from tempfile import TemporaryFile from random import randint, random from unittes...
gpl-3.0
Wuteyan/VTK
Common/Testing/WindowsMangleList.py
37
22481
#!/usr/bin/env python ## /*========================================================================= ## Program: Visualization Toolkit ## Module: WindowsMangleList.py ## Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen ## All rights reserved. ## See Copyright.txt or http://www.kitware.com/Copyr...
bsd-3-clause
bearbin/box-server
requests/packages/urllib3/filepost.py
240
3047
# urllib3/filepost.py # Copyright 2008-2012 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 import codecs import mimetypes from uuid import uuid4 from io import BytesIO from .packages ...
mit
sounay/flaminggo-test
onadata/apps/viewer/migrations/0002_auto__add_field_datadictionary_xls.py
13
8621
# 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): # Adding field 'DataDictionary.xls' db.add_column('odk_viewer_datadictionary', 'xls', self.gf('django.db.m...
bsd-2-clause
MalmoUniversity-DA366A/calvin-base
calvin/actorstore/systemactors/std/Join.py
4
1454
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
NikNitro/Python-iBeacon-Scan
sympy/simplify/tests/test_hyperexpand.py
2
38226
from random import randrange from sympy.simplify.hyperexpand import (ShiftA, ShiftB, UnShiftA, UnShiftB, MeijerShiftA, MeijerShiftB, MeijerShiftC, MeijerShiftD, MeijerUnShiftA, MeijerUnShiftB, MeijerUnShiftC, MeijerUnShiftD, Re...
gpl-3.0
erikdvoss/tiy-project
bitcoin_trade/trade_engine/models.py
3
12895
from django.contrib.auth.models import User from django.db.models.signals import post_save from trade_engine.custom_models import SeparatedValuesField from django.dispatch import receiver from django.db import models import jsonfield import json import http.client import urllib.request, urllib.parse, urllib.error impor...
gpl-3.0
ephes/scikit-learn
sklearn/feature_extraction/tests/test_text.py
110
34127
from __future__ import unicode_literals import warnings from sklearn.feature_extraction.text import strip_tags from sklearn.feature_extraction.text import strip_accents_unicode from sklearn.feature_extraction.text import strip_accents_ascii from sklearn.feature_extraction.text import HashingVectorizer from sklearn.fe...
bsd-3-clause
alexanderturner/ansible
lib/ansible/plugins/lookup/env.py
251
1071
# (c) 2012, Jan-Piet Mens <jpmens(at)gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
gpl-3.0
Kimanicodes/wananchi
AfricasTalkingGateway.py
1
8915
""" COPYRIGHT (C) 2014 AFRICASTALKING LTD <www.africastalking.com> # AFRICAStALKING SMS GATEWAY CLASS IS A FREE SOFTWARE IE. CAN BE MODIFIED AND/OR REDISTRIBUTED UNDER THER TERMS OF GNU GENERAL PUBLIC LICENCES AS PUBLISHED BY THE ...
mit
BIDS-collaborative/cega-trace
Jack&John/scholar.py
2
48634
#! /usr/bin/env python """ This module provides classes for querying Google Scholar and parsing returned results. It currently *only* processes the first results page. It is not a recursive crawler. """ # ChangeLog # --------- # # 2.9 Fixed Unicode problem in certain queries. Thanks to smidm for # this contribu...
bsd-2-clause
UstadMobile/exelearning-ustadmobile-work
exe/webui/reflectionblock.py
1
4588
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # # 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 ...
gpl-2.0
kirca/OpenUpgrade
addons/sale_analytic_plans/sale_analytic_plans.py
381
1765
# -*- 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
Jcing95/iop-hd
test/functional/txn_clone.py
2
7590
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet accounts properly when there are cloned transactions with malleated scriptsigs.""" fro...
mit
SEMAFORInformatik/femagtools
tests/test_fsl.py
1
15788
#!/usr/bin/env python # import unittest import femagtools.fsl import femagtools.magnet import copy import re modelpars = dict( name="PM 130 L4", outer_diam=0.13, bore_diam=0.07, lfe=0.1, poles=4, stator=dict( num_slots=12, mcvkey_yoke="3", num_slots_gen=3, nodedi...
bsd-2-clause
wtsi-hgi/irobot
irobot/tests/unit/authentication/test_http.py
1
5773
""" Copyright (c) 2017 Genome Research Ltd. Author: Christopher Harrison <ch12@sanger.ac.uk> 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 ...
gpl-3.0
ticosax/django
django/core/management/commands/loaddata.py
17
12898
from __future__ import unicode_literals import glob import gzip import os import warnings import zipfile from itertools import product from django.apps import apps from django.conf import settings from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.management.b...
bsd-3-clause
izonder/intellij-community
python/helpers/pycharm/django_manage_commands_provider/_xml.py
78
6083
# coding=utf-8 """ This module exports information about manage commands and options from django to PyCharm. Information is provided in XML (to prevent encoding troubles and simplify deserialization on java side). Right after xml declaration, before root tag it contains following comment: <!--jb pycharm data start--> ...
apache-2.0
manaris/jythonMusic
library/jython2.5.3/Lib/distutils/spawn.py
81
7818
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ # This module should be kept compatible with Python 2.1. __revision__ = "$I...
gpl-3.0
senyorjou/jshop
jshop/config/settings.py
1
13783
# -*- coding: utf-8 -*- """ Django settings for src project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.jo...
bsd-3-clause
forge33/CouchPotatoServer
libs/suds/wsdl.py
197
31503
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
wangjun/odoo
addons/sale_stock/company.py
384
1524
# -*- 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
bryfry/tomorrow-theme
ipythonqt/tomorrownight.py
31
2459
# -*- coding: utf-8 -*- """ pygments.styles.autumn ~~~~~~~~~~~~~~~~~~~~~~ Tomorrow Night theme for ipython qtconsole (invoke with ipython qtconsole --style=tomorrownight) See https://github.com/chriskempson/tomorrow-theme for theme info :copyright: Copyright 2012 André Risnes, risnes@gmail.c...
mit
tangyiyong/odoo
addons/sale/report/sale_report.py
111
5981
# -*- 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
ptemplier/ansible
lib/ansible/modules/system/interfaces_file.py
12
13769
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, Roman Belyakovsky <ihryamzik () gmail.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':...
gpl-3.0
sorenh/cc
vendor/tornado/website/markdown/extensions/toc.py
4
5105
""" Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) """ import markdown from markdown import etree import re class TocTreeprocessor(markdown.treeprocessors.Treeprocessor): # Iter...
apache-2.0
Alwnikrotikz/raft
tabs/LogTab.py
11
2204
# # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2013 RAFT Team # # This file is part of RAFT. # # RAFT 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...
gpl-3.0
JohnGeorgiadis/invenio
invenio/ext/email/__init__.py
1
20712
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 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...
gpl-2.0
sonicxml/tuna-feather-kernel
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
Jmainguy/ansible-modules-extras
cloud/amazon/ec2_vpc_dhcp_options.py
65
14933
#!/usr/bin/python # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be use...
gpl-3.0
mm112287/2015cd_midterm
static/Brython3.1.0-20150301-090019/Lib/site-packages/docs.py
624
1503
from browser import document as doc from browser import window, html, markdown import highlight import time def run(ev): # run the code in the elt after the button ix = ev.target.parent.children.index(ev.target) elt = ev.target.parent.children[ix+1] exec(elt.text) elt.focus() def load(url,target...
gpl-3.0
jcoady9/python-for-android
python3-alpha/python3-src/Lib/codeop.py
187
5994
r"""Utilities to compile possibly incomplete Python source code. This module provides two interfaces, broadly similar to the builtin function compile(), which take program text, a filename and a 'mode' and: - Return code object if the command is complete and valid - Return None if the command is incomplete - Raise Sy...
apache-2.0
XMelancholy/android_kernel_snda_u8500
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
bratsche/Neutron-Drive
google_appengine/lib/webapp2/tests/extras_config_test.py
24
11910
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras import config as app_config import test_base class TestConfig(test_base.BaseTestCase): def tearDown(self): pass def test_get(self): config = app_config.Config({'foo': { 'bar': 'baz', 'doo': 'ding', }}...
bsd-3-clause
dex4er/django-pyc
docs/conf.py
1
12008
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # flake8: noqa # # django-pyc documentation build configuration file # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration va...
lgpl-3.0
morpheby/levelup-by
lms/djangoapps/open_ended_grading/open_ended_notifications.py
2
8047
from django.conf import settings from xmodule.open_ended_grading_classes import peer_grading_service from .staff_grading_service import StaffGradingService from xmodule.open_ended_grading_classes.controller_query_service import ControllerQueryService import json from student.models import unique_id_for_user from course...
agpl-3.0
nttks/edx-platform
common/lib/capa/capa/correctmap.py
87
7080
#----------------------------------------------------------------------------- # class used to store graded responses to CAPA questions # # Used by responsetypes and capa_problem class CorrectMap(object): """ Stores map between answer_id and response evaluation result for each question in a capa problem. ...
agpl-3.0
fevxie/odoo
addons/hr_attendance/__openerp__.py
260
2073
# -*- 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
fbrglez/gitBed
xBed/pLib/B/coord.py
1
8879
from itertools import imap import time import sys import os import pwd import platform import random from math import log def neighborhood(coordPivot = [0, 1, 0, 1, 0, 1, 0]): thisCmd = "B.coord.neighborhood" ABOUT = """ Procedure {} takes a binary coordinate such as 0101010 (here of size L = 7) and returns a...
gpl-2.0