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
henryk/cyberflex-shell
cards/generic_application.py
2
1588
import binascii, re, sys, cards class Application: # This must be a sequence of regular expressions # When an application is selected through a matching AID # then all correponding classes are merged into the card # object. # The application classes themselves are responsible for # unmergi...
gpl-2.0
BFriedland/UserDataBase-Heroku
venv/Lib/linecache.py
97
3862
"""Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno, module_globa...
mit
mezz64/home-assistant
tests/test_bootstrap.py
6
17787
"""Test the bootstrapping.""" # pylint: disable=protected-access import asyncio import os from unittest.mock import Mock import pytest from homeassistant import bootstrap, core, runner import homeassistant.config as config_util from homeassistant.exceptions import HomeAssistantError import homeassistant.util.dt as dt...
apache-2.0
rfguri/vimfiles
bundle/ycm/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/recursion.py
1
5177
""" Recursions are the recipe of |jedi| to conquer Python code. However, someone must stop recursions going mad. Some settings are here to make |jedi| stop at the right time. You can read more about them :ref:`here <settings-recursion>`. Next to :mod:`jedi.evaluate.cache` this module also makes |jedi| not thread-safe....
mit
girving/tensorflow
tensorflow/contrib/grid_rnn/python/ops/grid_rnn_cell.py
23
23200
# 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
project-fluxo/fluxo
tests/parallel_issue/runscript.py
1
2214
import os import sys #from helpers import modify_prm # include via file link to ../../../tests/helpers.py jobs ={} #SUCCESSFUL! jobs['master_mhd_para'] ={'exec' :'../../build_master_mhd_para/bin/fluxo', 'param':'parameter_mhd.ini'} #jobs['mortarmaster_ns_para'] ={'exec' :'../../build_mortarmaste...
gpl-3.0
xydinesh/youtube-dl
youtube_dl/extractor/giantbomb.py
172
2655
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( unescapeHTML, qualities, int_or_none, ) class GiantBombIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?giantbomb\.com/videos/(?P<display_id>[^/]+)/(?P<id>\d+-\d+)' _TEST = {...
unlicense
bergercookie/Pump3000
for_keep/final_code/classes_used.py
1
8083
# Thu May 29 02:59:41 EEST 2014, nickkouk # proper division for python 2.7 from __future__ import division # Usual importing stuff for PySide from PySide.QtGui import * from PySide.QtCore import * # Module imports import sys import os from serial.tools.list_ports import comports # Qt-Designer compiled python code ...
bsd-2-clause
mheap/ansible
lib/ansible/modules/network/vyos/vyos_logging.py
38
7851
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
gpl-3.0
AuthorizeNet/sample-code-python
CustomerProfiles/get-customer-shipping-address.py
1
2245
import os, sys import imp from authorizenet import apicontractsv1 from authorizenet.apicontrollers import * constants = imp.load_source('modulename', 'constants.py') def get_customer_shipping_address(customerProfileId, customerAddressId): # Give merchant details merchantAuth = apicontractsv1.merchantAuthentic...
mit
gkoelln/youtube-dl
youtube_dl/extractor/liveleak.py
6
7020
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import int_or_none class LiveLeakIE(InfoExtractor): _VALID_URL = r'https?://(?:\w+\.)?liveleak\.com/view\?.*?\b[it]=(?P<id>[\w_]+)' _TESTS = [{ 'url': 'http://www.liveleak.com/view?i=757_1364311680', ...
unlicense
drgarcia1986/cookiecutter
cookiecutter/prompt.py
18
3937
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.prompt --------------------- Functions for prompting the user for project info. """ from __future__ import unicode_literals from collections import OrderedDict import click from .compat import iteritems, is_string from jinja2.environment import Environ...
bsd-3-clause
daveisadork/PyDevNS
tests/test_config.py
1
2071
import pytest from six import iteritems def test_config_defaults(config): for key, value in iteritems(config.DEFAULTS): assert getattr(config, key) == value @pytest.mark.parametrize("address", ("127.0.0.1", "10.10.10.10")) def test_config_address(config, address): config.address = address asser...
mit
museomix/2013_Quebec_thermoscope
raspberry/pygame-1.9.1release/examples/pixelarray.py
9
3026
#!/usr/bin/env python import os, pygame from pygame.compat import xrange_ main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, 'data') def show (image): screen = pygame.display.get_surface() screen.fill ((255, 255, 255)) screen.blit (image, (0, 0)) pygame.display.fl...
mit
brome-hq/brome
example/configs/test_dict.py
2
1064
test_dict = { '#1': 'The header appear after the page is loaded', '#2': 'The class "completed" appear when a todo is checked', '#3': 'The class "completed" does not appear when a todo is unchecked', '#4': 'The todo react well to multiple check and uncheck', '#5': 'The todo is removed after we click ...
isc
shashank971/edx-platform
openedx/core/djangoapps/credit/tests/test_partition.py
76
7030
# -*- coding: utf-8 -*- """ Tests for In-Course Reverification Access Control Partition scheme """ import ddt import unittest from django.conf import settings from lms.djangoapps.verify_student.models import ( VerificationCheckpoint, VerificationStatus, SkippedReverification, ) from openedx.core.djangoap...
agpl-3.0
twobraids/socorro
socorro/unittest/processor/test_breakpad_transform_rules.py
8
40638
# 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 http://mozilla.org/MPL/2.0/. import copy import ujson from mock import Mock, patch from nose.tools import eq_, ok_ from contextlib import contextman...
mpl-2.0
Tuyki/TT_RNN
MNISTSeq.py
1
14227
__author__ = "Yinchong Yang" __copyright__ = "Siemens AG, 2018" __licencse__ = "MIT" __version__ = "0.1" """ MIT License Copyright (c) 2018 Siemens AG 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 Softwa...
mit
gohin/django
django/db/migrations/state.py
138
24339
from __future__ import unicode_literals import copy from collections import OrderedDict from contextlib import contextmanager from django.apps import AppConfig from django.apps.registry import Apps, apps as global_apps from django.conf import settings from django.db import models from django.db.models.fields.proxy im...
bsd-3-clause
pombredanne/MOG
nova/api/openstack/compute/contrib/fixed_ips.py
12
3544
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
apache-2.0
gwpy/vet
gwvet/_version.py
1
16743
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
gpl-3.0
justincely/rolodex
setup.py
1
2102
from setuptools import setup, find_packages setup( name = 'cos_monitoring', version = '0.0.1', description = 'Provide utilities and monotiring of cos data', author = 'Justin Ely', author_email = 'ely@stsci.edu', keywords = ['astronomy'], classifiers = ['Programming Language :: Python', ...
bsd-3-clause
mhostetter/gnuradio
gr-filter/python/filter/qa_fir_filter.py
47
6862
#!/usr/bin/env python # # Copyright 2008,2010,2012,2013 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 ...
gpl-3.0
pycroscopy/pycroscopy
pycroscopy/processing/svd_utils.py
1
20291
# -*- coding: utf-8 -*- """ USID utilities for performing randomized singular value decomposition and reconstructing results Created on Mon Mar 28 09:45:08 2016 @author: Suhas Somnath, Chris Smith """ from __future__ import division, print_function, absolute_import import time from multiprocessing import cpu_count i...
mit
U-MA/mal
rpython/step1_read_print.py
50
1118
#import sys, traceback import mal_readline import mal_types as types import reader, printer # read def READ(str): return reader.read_str(str) # eval def EVAL(ast, env): #print("EVAL %s" % printer._pr_str(ast)) return ast # print def PRINT(exp): return printer._pr_str(exp) # repl def REP(str)...
mpl-2.0
codeworldprodigy/lab2
lib/flask/flask/templating.py
783
4707
# -*- coding: utf-8 -*- """ flask.templating ~~~~~~~~~~~~~~~~ Implements the bridge to Jinja2. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import posixpath from jinja2 import BaseLoader, Environment as BaseEnvironment, \ TemplateNotFound from .glo...
apache-2.0
xe1gyq/nuupxe
modules/aprstracker.py
1
3741
#!/usr/bin/python import ConfigParser import feedparser import logging import os import pywapi import string import sys import time import unicodedata from core.alive import alive from pygeocoder import Geocoder from core.aprsfi import AprsFi from core.voicesynthetizer import VoiceSynthetizer from core.phonetic impo...
apache-2.0
nvoron23/avos
openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py
14
2804
# 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 under t...
apache-2.0
stonebig/numba
numba/tests/test_looplifting.py
2
17457
from io import StringIO import numpy as np from numba.core import types from numba.core.compiler import compile_isolated, Flags from numba.tests.support import TestCase, tag, MemoryLeakMixin import unittest looplift_flags = Flags() looplift_flags.enable_pyobject = True looplift_flags.enable_looplift = True pyobject...
bsd-2-clause
designcc/django-ccgallery
ccgallery/tests/test_managers.py
1
3771
from decimal import Decimal from django.test import TestCase from ccgallery.models import Item, Category class ManagerTestCases(TestCase): def test_item_for_category(self): """the for item manager method""" c1 = Category() c1.slug = '1' c1.title = '1' c1.description = '1' ...
bsd-3-clause
fnouama/intellij-community
python/lib/Lib/site-packages/django/template/response.py
71
4252
from django.http import HttpResponse from django.template import loader, Context, RequestContext class ContentNotRenderedError(Exception): pass class SimpleTemplateResponse(HttpResponse): def __init__(self, template, context=None, mimetype=None, status=None, content_type=None): # It would...
apache-2.0
zace-yuan/viewfinder
marketing/tornado/test/process_test.py
23
8746
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import logging import os import signal import subprocess import sys from tornado.httpclient import HTTPClient, HTTPError from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.log i...
apache-2.0
idegtiarov/ceilometer
ceilometer/tests/unit/network/statistics/opendaylight/test_driver.py
12
66291
# # Copyright 2013 NEC 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 required by applicable...
apache-2.0
jkkm/binutils-gdb
gdb/testsuite/gdb.perf/single-step.py
41
1269
# Copyright (C) 2013-2014 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 version. # # This progr...
gpl-2.0
cricketclubucd/davisdragons
platform-tools/systrace/catapult/telemetry/telemetry/internal/results/results_options.py
5
7947
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import codecs import optparse import os import sys import time from py_utils import cloud_storage # pylint: disable=import-error from telemetry.core impor...
mit
yakky/django-cms
cms/models/fields.py
3
3939
# -*- coding: utf-8 -*- from cms.forms.fields import PageSelectFormField from cms.models.placeholdermodel import Placeholder from django.db import models class PlaceholderField(models.ForeignKey): def __init__(self, slotname, default_width=None, actions=None, **kwargs): from cms.utils.placeholder import ...
bsd-3-clause
rds0751/colinkers
env/Lib/site-packages/pip/_vendor/html5lib/filters/lint.py
328
3365
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from . import base from ..constants import namespaces, voidElements from ..constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) class Filter(base.Filter): def __init__(self, source, r...
agpl-3.0
torbjoernk/easybuild-framework
easybuild/toolchains/goolfc.py
5
1656
## # Copyright 2013-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
gpl-2.0
hovo1990/deviser
generator/tests/run-tests.py
1
1281
#!/usr/bin/env python import os import sys import test_functions ############################################################################## # Set up variables fails = [] total_fail = 0 this_dir = '' ############################################################################# # Specific test functions def run_...
lgpl-2.1
jaharkes/home-assistant
homeassistant/components/influxdb.py
5
4307
""" A component which allows you to send data to an Influx database. For more details about this component, please refer to the documentation at https://home-assistant.io/components/influxdb/ """ import logging import voluptuous as vol from homeassistant.const import ( EVENT_STATE_CHANGED, STATE_UNAVAILABLE, STA...
mit
odoousers2014/LibrERP
l10n_it_ricevute_bancarie/wizard/wizard_emissione_riba.py
2
6944
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 Andrea Cometa. # Email: info@andreacometa.it # Web site: http://www.andreacometa.it # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2012 ...
agpl-3.0
asgard-lab/neutron
neutron/tests/functional/agent/l3/test_namespace_manager.py
25
3626
# Copyright (c) 2015 Rackspace # 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
zbqf109/goodo
openerp/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py
47
1864
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from openerp.osv import fields, osv class hr_salary_employee_bymonth(osv.osv_memory): _name = 'hr.salary.employee.month' _description = 'Hr Salary Employee By Month Report' _columns = { 's...
gpl-3.0
kirca/odoo
openerp/addons/base/res/res_company.py
37
21361
# -*- 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
PaoloW8/android_kernel_nubia_nx505j
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
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/pymongo/mongo_replica_set_client.py
2
83540
# Copyright 2011-2015 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 writi...
agpl-3.0
Jayflux/servo
tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_server.py
22
1342
import unittest import pytest from six.moves.urllib.error import HTTPError wptserve = pytest.importorskip("wptserve") from .base import TestUsingServer class TestFileHandler(TestUsingServer): def test_not_handled(self): with self.assertRaises(HTTPError) as cm: resp = self.request("/not_exist...
mpl-2.0
djenniex/CouchPotatoServer
libs/chardet/euckrfreq.py
3121
45978
######################## 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...
gpl-3.0
40423224/2017springcd_hw
plugin/render_math/math.py
283
14202
# -*- coding: utf-8 -*- """ Math Render Plugin for Pelican ============================== This plugin allows your site to render Math. It uses the MathJax JavaScript engine. For markdown, the plugin works by creating a Markdown extension which is used during the markdown compilation stage. Math therefore gets treated...
agpl-3.0
dulems/hue
desktop/core/src/desktop/lib/test_utils.py
17
2226
#!/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
matthiasdiener/spack
var/spack/repos/builtin/packages/transposome/package.py
5
1624
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
fidodaj/info3180lab4
server/lib/flask/wrappers.py
773
6709
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exce...
apache-2.0
odubno/microblog
venv/lib/python2.7/site-packages/coverage/bytecode.py
209
2036
"""Bytecode manipulation for coverage.py""" import opcode, types from coverage.backward import byte_to_int class ByteCode(object): """A single bytecode.""" def __init__(self): # The offset of this bytecode in the code object. self.offset = -1 # The opcode, defined in the `opcode` mod...
bsd-3-clause
crunchmail/munch-core
src/munch/apps/campaigns/tools.py
1
3004
import urllib from django.urls import get_resolver from django.urls import NoReverseMatch def resolve_url(request, path=None): """Helper function that reports information on the request's url. Taken from http://code.google.com/p/greatlemers-django-tools \ /source/browse/trunk/gdt_nav/models....
agpl-3.0
vaygr/ansible
lib/ansible/utils/module_docs_fragments/gcp.py
23
1712
# Copyright: (c) 2018, Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # GCP doc fragment. DOCUMENTATION = ''' options: state: description: - Whether the given zone should or should not be...
gpl-3.0
adminneyk/codificacionproyectando
application/views/Generacion/Generacion/lib/openoffice/openoffice.org/basis3.4/program/uno.py
2
12731
#************************************************************** # # 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 y...
mit
joernhees/git-hg-remote-bug_gae-init
main/lib/flaskext/wtf/recaptcha/widgets.py
16
2645
""" Custom widgets """ try: import json except ImportError: import simplejson as json from flask import current_app from werkzeug import url_encode # use flaskext.babel for translations, if available try: from flaskext.babel import gettext as _ except ImportError: _ = lambda(s) : s RECAPTCHA_API_SER...
mit
nharraud/b2share
invenio/modules/formatter/manage.py
13
10738
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014 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 (at your option) any...
gpl-2.0
Shade5/coala-bears
tests/general/LineCountBearTest.py
17
1831
from queue import Queue from bears.general.LineCountBear import LineCountBear from coalib.testing.LocalBearTestHelper import LocalBearTestHelper from coalib.results.Result import RESULT_SEVERITY, Result from coalib.settings.Section import Section from coalib.settings.Setting import Setting class LineCountBearTest(Lo...
agpl-3.0
LIKAIMO/MissionPlanner
Lib/HTMLParser.py
50
14059
"""A parser for HTML and XHTML.""" # This file is based on sgmllib.py, but the API is slightly different. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are special) # a...
gpl-3.0
googlearchive/pywebsocket
mod_pywebsocket/handshake/hybi00.py
675
11294
# 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 of conditions and the f...
bsd-3-clause
rolandwz/pymisc
monitor/once.py
1
1567
# -*- coding: utf-8 -*- import threading, sys from utils.rwlogging import log from notifier import fetion from notifier import mail from category import prices from category import weather from utils import const def weatherMonitor(): try: #msg = '' #msg = msg + weather.fetchWeather() multimsg = [0, 0] multim...
mit
kronicz/ecommerce-2
lib/python2.7/site-packages/django/views/csrf.py
437
5057
from django.conf import settings from django.http import HttpResponseForbidden from django.template import Context, Engine from django.utils.translation import ugettext as _ from django.utils.version import get_docs_version # We include the template inline since we need to be able to reliably display # this error mes...
mit
zhaodelong/django
tests/flatpages_tests/test_templatetags.py
309
7111
from django.contrib.auth.models import AnonymousUser, User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.template import Context, Template, TemplateSyntaxError from django.test import TestCase, modify_settings, override_settings from .settings import FLAT...
bsd-3-clause
shiblon/pytour
static/js/pypyjs/pypy-nojit.js-0.3.1/lib/modules/pyrepl/cmdrepl.py
10
4094
# Copyright 2000-2007 Michael Hudson-Doyle <micahel@gmail.com> # Maciek Fijalkowski # # All Rights Reserved # # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose is hereby granted without fee, # provided that the above ...
apache-2.0
fhaoquan/kbengine
kbe/res/scripts/common/Lib/test/test_importlib/import_/test___loader__.py
84
1895
from importlib import machinery import sys import types import unittest from .. import util from . import util as import_util class SpecLoaderMock: def find_spec(self, fullname, path=None, target=None): return machinery.ModuleSpec(fullname, self) def exec_module(self, module): pass class ...
lgpl-3.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/rds/statusinfo.py
180
2011
# 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
CWRoos/msp430-python-raspberry-pi
msp430/asm/infix2postfix.py
2
5413
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2010 Chris Liechti <cliechti@gmx.net> # All Rights Reserved. # Simplified BSD License (see LICENSE.txt for full text) """\ Parse algebraic expressions (infix) and output postfix notation. """ import re class Scanner(object): scannerRE = re.compile(...
bsd-3-clause
ssalevan/cobbler
cobbler/func_utils.py
17
1129
""" Misc func functions for cobbler Copyright 2006-2008, Red Hat, Inc Scott Henson <shenson@redhat.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 2 of the License, or (at your o...
gpl-2.0
py4n6/aff4
scons-local-1.2.0/SCons/Tool/dvi.py
12
2265
"""SCons.Tool.dvi Common DVI Builder definition for various other Tool modules that use it. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files ...
gpl-3.0
vaygr/ansible
lib/ansible/modules/network/nxos/nxos_system.py
31
11749
#!/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
leopoul/ncclient
examples/juniper/edit-config-jnpr-text.py
6
1488
#!/usr/bin/env python import logging import sys from ncclient import manager def connect(host, port, user, password): conn = manager.connect(host=host, port=port, username=user, password=password, timeout=...
apache-2.0
mobify/dj-saml-idp
idptest/scripts/c14n.py
2
1095
#!/usr/bin/python from StringIO import StringIO from lxml import etree def c14n(src): f = StringIO(src) tree = etree.parse(f) f2 = StringIO() tree.write_c14n(f2) return f2.getvalue().decode("utf-8") if __name__=="__main__": from optparse import OptionParser parser = OptionParser() pars...
mit
servo/servo
tests/wpt/web-platform-tests/tools/third_party/pywebsocket3/test/test_endtoend.py
12
27179
#!/usr/bin/env python # # Copyright 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...
mpl-2.0
kuba1/qtcreator
tests/system/suite_CSUP/tst_CSUP04/test.py
5
4135
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
lgpl-2.1
juliojsb/sarviewer
plotters/matplotlib/swap.py
1
2062
#!/usr/bin/env python2 """ Author :Julio Sanz Website :www.elarraydejota.com Email :juliojosesb@gmail.com Description :Script to create a graph about swap usage Dependencies :Python 2.x, matplotlib Usage :python swap.py License :GPLv3 """ import matplotlib matplotlib.use('Agg') im...
gpl-3.0
kirca/OpenUpgrade
addons/account_analytic_plans/wizard/analytic_plan_create_model.py
384
2829
# -*- 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
kaynfiretvguru/Eldritch
plugin.program.echowizard/resources/lib/log/uploaders/dropbox.py
6
3174
""" TVAddons Log Uploader Script Copyright (C) 2016 tknorris 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 ver...
gpl-2.0
ketjow4/NOV
Lib/site-packages/numpy/distutils/command/build_scripts.py
100
1665
""" Modified version of build_scripts that handles building scripts from functions. """ from distutils.command.build_scripts import build_scripts as old_build_scripts from numpy.distutils import log from numpy.distutils.misc_util import is_string class build_scripts(old_build_scripts): def generate_scripts(self,...
gpl-3.0
maxsocl/django
tests/template_tests/utils.py
36
4915
# coding: utf-8 from __future__ import unicode_literals import functools import os from django import template from django.template import Library from django.template.base import libraries from django.template.engine import Engine from django.test.utils import override_settings from django.utils._os import upath fr...
bsd-3-clause
chenjun0210/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/decisions_to_data_then_nn.py
190
1889
# 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
wubr2000/googleads-python-lib
examples/dfp/v201502/proposal_service/create_proposals.py
4
2557
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/sklearn/feature_selection/rfe.py
6
17502
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Vincent Michel <vincent.michel@inria.fr> # Gilles Louppe <g.louppe@gmail.com> # # License: BSD 3 clause """Recursive feature elimination for feature ranking""" import warnings import numpy as np from ..utils import check_X_y, safe_sqr fro...
mit
narry/odenos
src/test/python/org/o3project/odenos/remoteobject/transport/test_local_message_transport.py
6
2258
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
apache-2.0
takeshineshiro/keystone
keystone/contrib/revoke/backends/kvs.py
8
2338
# 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 under t...
apache-2.0
mulkieran/storage_alerts
tests/sources/generic/by_line/states_test.py
1
1346
# Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
gpl-2.0
hn8841182/W11
static/Brython3.1.1-20150328-091302/Lib/xml/etree/ElementInclude.py
784
5146
# # ElementTree # $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware...
gpl-3.0
alacritythief/django-allauth
allauth/socialaccount/south_migrations/0011_auto__chg_field_socialtoken_token.py
77
6468
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'SocialToken.token' db.alter_column('socialaccount_socialtoken', 'token', self.gf('django....
mit
rogerwang/chromium
tools/python/google/path_utils.py
191
2910
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Some utility methods for getting and manipulating paths.""" # TODO(pamg): Have the buildbot use these, too. import errno import os import sys clas...
bsd-3-clause
bemuzie/pyzotero
test/test_zotero.py
2
17470
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the Pyzotero module Copyright Stephan Hügel, 2011 This file is part of Pyzotero. Pyzotero 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 vers...
gpl-3.0
annapowellsmith/openpresc
openprescribing/frontend/management/commands/import_practices.py
1
3793
import csv import glob from django.core.management.base import BaseCommand from frontend.models import Practice, PCT class Command(BaseCommand): args = '' help = 'Imports practice data either from epraccur.csv, or from HSCIC ' help += 'address files, depending on options. ' def add_arguments(self, pa...
mit
saurabhjn76/sympy
sympy/stats/rv_interface.py
88
5205
from __future__ import print_function, division from .rv import (probability, expectation, density, where, given, pspace, cdf, sample, sample_iter, random_symbols, independent, dependent, sampling_density) from sympy import sqrt __all__ = ['P', 'E', 'density', 'where', 'given', 'sample', 'cdf', 'pspac...
bsd-3-clause
AlexBryner/SalesforceTools
SalesforceScripts.py
1
12737
# coding: utf-8 import numpy as np import pandas as pd import time from datetime import datetime, timedelta, date from time import sleep, gmtime, strftime from pandas import DataFrame, Series, read_csv from salesforce_bulk_api import SalesforceBulkJob from SalesforceBulkQuery import * from simple_salesforce import * ...
mit
Eigenstate/msmbuilder
msmbuilder/commands/implied_timescales.py
12
5214
# Author: Robert McGibbon <rmcgibbo@gmail.com> # Contributors: # Copyright (c) 2014, Stanford University # All rights reserved. """Scan the implied timescales of MarkovStateModels with respect to lag time. This command will build a series of MarkovStateModels at different lag times, and save a file to disk containing ...
lgpl-2.1
cpcloud/ibis
ibis/expr/tests/test_case.py
3
3082
import pytest import ibis import ibis.expr.datatypes as dt import ibis.expr.operations as ops import ibis.expr.types as ir from ibis.tests.util import assert_equal def test_ifelse(table): bools = table.g.isnull() result = bools.ifelse("foo", "bar") assert isinstance(result, ir.StringColumn) @pytest.mar...
apache-2.0
lukeiwanski/tensorflow
tensorflow/python/kernel_tests/xent_op_test.py
17
13895
# 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
nwjs/chromium.src
third_party/blink/tools/blinkpy/common/system/system_host_mock.py
2
3073
# Copyright (c) 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 of conditions and the ...
bsd-3-clause
cdorer/crits
crits/indicators/urls.py
7
1184
from django.conf.urls import patterns urlpatterns = patterns('crits.indicators.views', (r'^details/(?P<indicator_id>\w+)/$', 'indicator'), (r'^search/$', 'indicator_search'), (r'^upload/$', 'upload_indicator'), (r'^add_action/$', 'new_indicator_action'), (r'^remove/(?P<_id>[\S ]+)$', 'remove_indica...
mit
milkpku/BetaElephant
policy_experiment/policy.orign/dataset.py
1
7607
#!/usr/bin/python3 #-*-coding:utf-8-*- #$File: dataset.py #$Date: Sat May 7 10:59:24 2016 #$Author: Like Ma <milkpku[at]gmail[dot]com> import copy import random import numpy as np OUT_TYPE = np.float32 class Dataset(object): def __init__(self, path, _type): if _type == 'train': self.__file...
mit
Dhivyap/ansible
lib/ansible/modules/network/fortios/fortios_log_memory_filter.py
14
20935
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Lic...
gpl-3.0