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
antiface/mne-python
examples/decoding/plot_linear_model_patterns.py
13
3098
""" =============================================================== Linear classifier on sensor data with plot patterns and filters =============================================================== Decoding, a.k.a MVPA or supervised machine learning applied to MEG and EEG data in sensor space. Fit a linear classifier wi...
bsd-3-clause
aselle/tensorflow
tensorflow/python/keras/layers/merge_test.py
11
8732
# 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
anryko/ansible
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_info.py
21
10269
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, 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 = { 'metad...
gpl-3.0
davibe/gstreamersdk_pygobject
tests/test_everything.py
3
16643
# -*- Mode: Python; py-indent-offset: 4 -*- # coding=utf-8 # vim: tabstop=4 shiftwidth=4 expandtab import unittest import sys sys.path.insert(0, "../") from sys import getrefcount import cairo from gi.repository import GObject from gi.repository import Regress as Everything if sys.version_info < (3, 0): UNICHA...
lgpl-2.1
italomaia/turtle-linux
games/BubbleKing/lib/menu.py
1
13774
import os import pygame from pygame.locals import * from pgu import engine import data from cnst import * import levels class Menu(engine.State): def __init__(self,game): self.game = game def init(self): self.font = self.game.font self.bkgr = pygame.image.load(data.filepat...
gpl-3.0
cybersiddhu/biogo.boom
samtools-0.1.18/misc/varfilter.py
80
5783
#!/software/bin/python # Author: lh3, converted to python and modified to add -C option by Aylwyn Scally # # About: # varfilter.py is a port of Heng's samtools.pl varFilter script into # python, with an additional -C INT option. This option sets a minimum # consensus score, above which the script will output a...
bsd-3-clause
davidzchen/tensorflow
tensorflow/python/profiler/pprof_profiler.py
23
15276
# 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 required by applica...
apache-2.0
sedden/pkg-python-django-rcsfield
rcsfield/backends/__init__.py
3
1361
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured __all__ = ('backend') RCS_BACKEND = getattr(settings, 'RCS_BACKEND', 'dummy') def get_backend(import_path): if not '.' in import_path: import_path = "rcsfield.backends.%s" % import_path try: mod...
bsd-3-clause
mathiasertl/fabric
fabric/context_managers.py
1
20926
""" Context managers for use with the ``with`` statement. .. note:: If you are using multiple directly nested ``with`` statements, it can be convenient to use multiple context expressions in one single with statement. Instead of writing:: with cd('/path/to/app'): with prefix('workon myvenv...
bsd-2-clause
LokiW/extendable-cards
extendable_cards/view/game_view.py
1
6424
from extendable_cards.view.graphics import Rectangle, Point, Text from tkinter import Button class GameOutline(object): def __init__(self, window, dx, dy, w, h): self.top_y = dy self.bottom_y = dy+h self.right_x = dx+w self.left_x = dx self.discard_end_x = dx + (w/6.0) ...
bsd-2-clause
ArcherSys/ArcherSys
eclipse/plugins/org.python.pydev_4.5.5.201603221110/pysrc/_pydevd_bundle/pydevd_vm_type.py
49
1578
import sys #======================================================================================================================= # PydevdVmType #======================================================================================================================= class PydevdVmType: PYTHON = 'python' ...
mit
andyzsf/django
tests/urlpatterns_reverse/namespace_urls.py
35
2458
from django.conf.urls import url, include from . import views class URLObject(object): def __init__(self, app_name, namespace): self.app_name = app_name self.namespace = namespace def urls(self): return ([ url(r'^inner/$', views.empty_view, name='urlobject-view'), ...
bsd-3-clause
shenlong3030/asv-django-guestbook
django/contrib/gis/gdal/prototypes/ds.py
12
4315
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope fr...
bsd-3-clause
hinsenchan/iOS_clockapp_emberjs_demo
node_modules/ember-cli/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
604
3207
#!/usr/bin/env python # Copyright 2013 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. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
mit
netzkolchose/django-cms
cms/migrations/0005_auto_20140924_1039.py
57
4895
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import F from treebeard.numconv import NumConv STEPLEN = 4 ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' class MP_AddHandler(object): def __init__(self): self.stmts = [] NUM = N...
bsd-3-clause
lorenzo-desantis/mne-python
mne/externals/tempita/__init__.py
31
43854
""" A small templating language This implements a small templating language. This language implements if/elif/else, for/continue/break, expressions, and blocks of Python code. The syntax is:: {{any expression (function calls etc)}} {{any expression | filter}} {{for x in y}}...{{endfor}} {{if x}}x{{elif y}}y...
bsd-3-clause
google/tf-quant-finance
tf_quant_finance/experimental/pricing_platform/framework/market_data/rate_curve.py
1
13760
# Lint as: python3 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
Davasny/CCAS
ccas/models/exchanges/__init__.py
1
1783
from . import poloniex, btc_e, bittrex, bitfinex from ccas.models import database, coinmarketcap def get_balances(exchange, public_key, secret_key): if exchange == "poloniex": return poloniex.get_balances(public_key, secret_key) if exchange == "btc-e": return btc_e.get_balances(public_key, sec...
mit
johankaito/fufuka
microblog/flask/venv/lib/python2.7/site-packages/scipy/stats/_multivariate.py
17
69089
# # Author: Joris Vankerschaver 2013 # from __future__ import division, print_function, absolute_import import numpy as np import scipy.linalg from scipy.misc import doccer from scipy.special import gammaln, psi, multigammaln from scipy._lib._util import check_random_state __all__ = ['multivariate_normal', 'dirichle...
apache-2.0
willthames/ansible
lib/ansible/modules/inventory/group_by.py
2
1901
# -*- mode: 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 distr...
gpl-3.0
harshaneelhg/scikit-learn
sklearn/ensemble/tests/test_partial_dependence.py
365
6996
""" Testing for the partial dependence module. """ import numpy as np from numpy.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import if_matplotlib from sklearn.ensemble.partial_dependence import partial_dependence from sklearn.ensemble.partial_dependence...
bsd-3-clause
Jgarcia-IAS/localizacion
openerp/addons-extra/report_move_voucher/report/__init__.py
7
1449
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved ###############Credits##########################...
agpl-3.0
hlzz/dotfiles
graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/test/test_dirdbm.py
2
6029
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for dirdbm module. """ import os, shutil, glob from twisted.trial import unittest from twisted.persisted import dirdbm class DirDbmTestCase(unittest.TestCase): def setUp(self): self.path = self.mkt...
bsd-3-clause
veryhappythings/discord-gather
gather/discord_gather.py
1
2123
import asyncio import logging import discord from .gatherbot import GatherBot from .organiser import Organiser from . import commands logger = logging.getLogger(__name__) class DiscordGather: def __init__(self, token): self.token = token self.bot = None self.client = discord.Client() ...
mit
jeenalee/servo
components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py
50
12785
def firstArgType(method): return method.signatures()[0][1][0].type def WebIDLTest(parser, harness): parser.parse(""" dictionary Dict { }; callback interface Foo { }; interface Bar { // Bit of a pain to get things that have dictionary types void passDict(optional Di...
mpl-2.0
catapult-project/catapult-csm
third_party/google-endpoints/enum/__init__.py
105
31054
"""Python Enumerations""" import sys as _sys __all__ = ['Enum', 'IntEnum', 'unique'] version = 1, 1, 6 pyver = float('%s.%s' % _sys.version_info[:2]) try: any except NameError: def any(iterable): for element in iterable: if element: return True return False try:...
bsd-3-clause
acq4/acq4
acq4/devices/Sensapex/sensapex.py
3
9688
# -*- coding: utf-8 -*- from __future__ import print_function import time import numpy as np from acq4.util import Qt from ..Stage import Stage, MoveFuture, StageInterface from acq4.drivers.sensapex import SensapexDevice, UMP, UMPError from acq4.util.Mutex import Mutex from acq4.util.Thread import Thread from acq4.pyqt...
mit
immanetize/nikola
nikola/plugins/compile/markdown/mdx_podcast.py
2
3417
# -*- coding: utf-8 -*- # # Copyright © 2013-2015 Michael Rabbitt, Roberto Alsina and others. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limita...
mit
nstopkimsk/pinpoint
web/src/main/webapp/components/bootstrap/test-infra/s3_cache.py
1700
3523
#!/usr/bin/env python2.7 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, remove as _delete_file from os.path import isfile, dirname, basename, abspath from hashlib import sha256 from subprocess import check_call as run from boto.s3....
apache-2.0
jumpstarter-io/keystone
keystone/token/providers/pki.py
5
1918
# Copyright 2013 OpenStack Foundation # # 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
GoogleCloudPlatform/cloudml-samples
chainer/containers/quickstart/mnist/trainer/mnist.py
1
6554
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License.\n", # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
Zeppen/xbmc-pvr-spotify
lib/freetype/src/tools/docmaker/content.py
74
17630
# Content (c) 2002, 2004, 2006, 2007, 2008, 2009 # David Turner <david@freetype.org> # # This file contains routines used to parse the content of documentation # comment blocks and build more structured objects out of them. # from sources import * from utils import * import string, re # this regular expression...
gpl-2.0
trueblue2704/AskMeAnything
lib/python2.7/site-packages/setuptools/tests/test_dist_info.py
148
2261
"""Test .dist-info style distributions. """ import os import shutil import tempfile import pytest import pkg_resources from .textwrap import DALS class TestDistInfo: def test_distinfo(self): dists = dict( (d.project_name, d) for d in pkg_resources.find_distributions(self.tmpdir)...
mit
bitcoinplusorg/xbcwalletsource
contrib/devtools/clang-format-diff.py
90
6192
#!/usr/bin/env python # #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. # # ===========================================================...
mit
SecHackLabs/WebHackSHL
modules/johnmod.py
1
7131
#!/usr/bin/python2 # encoding: utf-8 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
gpl-3.0
yasserglez/pytiger2c
packages/pytiger2c/ast/integerliteralexpressionnode.py
1
2204
# -*- coding: utf-8 -*- """ Clase C{IntegerLiteralExpressionNode} del árbol de sintáxis abstracta. """ from pytiger2c.ast.valuedexpressionnode import ValuedExpressionNode from pytiger2c.types.integertype import IntegerType class IntegerLiteralExpressionNode(ValuedExpressionNode): """ Clase C{IntegerLiteralE...
mit
ischwabacher/seaborn
seaborn/algorithms.py
35
6889
"""Algorithms to support fitting routines in seaborn plotting functions.""" from __future__ import division import numpy as np from scipy import stats from .external.six.moves import range def bootstrap(*args, **kwargs): """Resample one or more arrays with replacement and store aggregate values. Positional a...
bsd-3-clause
unreal666/outwiker
plugins/markdown/markdown/markdown_plugin_libs/pygments/lexers/dotnet.py
6
27693
# -*- coding: utf-8 -*- """ pygments.lexers.dotnet ~~~~~~~~~~~~~~~~~~~~~~ Lexers for .net languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, ...
gpl-3.0
HousekeepLtd/django
django/contrib/gis/db/models/functions.py
54
16089
from decimal import Decimal from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import AreaField from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from django.core.ex...
bsd-3-clause
jgmanzanas/CMNT_004_15
project-addons/sale_display_stock/report/sale_order_line_report.py
1
4447
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Comunitea All Rights Reserved # $Jesús Ventosinos Mayor <jesus@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
j00bar/ansible
test/units/modules/cloud/openstack/test_os_server.py
55
6456
import mock import pytest import yaml import inspect import collections from ansible.modules.cloud.openstack import os_server class AnsibleFail(Exception): pass class AnsibleExit(Exception): pass def params_from_doc(func): '''This function extracts the docstring from the specified function, parse...
gpl-3.0
gevannmullins/linux_server
add_items.py
1
4498
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Category, Base, Item, User engine = create_engine('postgresql://catalog:password@localhost/catalog') # engine = create_engine('sqlite:///catalog.db') # Bind the engine to the metadata of the Base class so that th...
mit
alphagov/backdrop
tests/read/test_parse_request_args.py
1
5035
from datetime import datetime import re import unittest from hamcrest import assert_that, is_, has_item import pytz from werkzeug.datastructures import MultiDict from backdrop.read.query import parse_request_args class Test_parse_request_args(unittest.TestCase): def test_start_at_is_parsed(self): reques...
mit
imgrant/fit2tcx
fit2tcx.py
1
40690
#!/usr/bin/env python # # fit2tcx - convert a FIT file to a TCX file # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> [https://github.com/Tigge/FIT-to-TCX/] # Copyright (c) 2014-2016, Ian Grant <ian@iangrant.me> [https://github.com/imgrant/fit2tcx] # # Permission is hereby granted, free of charge, to any person...
mit
gkabbe/cMDLMC
mdlmc/IO/converters.py
1
1764
# coding=utf-8 import logging import os import pathlib import tables import h5py import daiquiri import fire import numpy as np from typing import Union, Iterable from ..atoms.numpy_atom import dtype_xyz from ..atoms import numpy_atom as npa from ..IO.trajectory_parser import XYZTrajectory logger = logging.getLogg...
gpl-3.0
google-code-export/evennia
src/comms/imc2lib/imc2_ansi.py
4
2204
""" ANSI parser - this adds colour to text according to special markup strings. This is a IMC2 complacent version. """ import re from src.utils import ansi class IMCANSIParser(ansi.ANSIParser): """ This parser is per the IMC2 specification. """ def __init__(self): normal = ansi.ANSI_NORMAL ...
bsd-3-clause
cricketclubucd/davisdragons
platform-tools/systrace/catapult/common/battor/battor/battor_wrapper.py
4
16017
# Copyright 2016 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 atexit import datetime import os import logging import platform import random import subprocess import sys import tempfile import time from battor im...
mit
BambooL/jeeves
demo/openmrs/settings.py
3
2345
""" Django settings for conf project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
mit
xuguozhi/DIGITS
digits/log.py
17
3642
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import sys import logging import logging.handlers from digits.config import config_value DATE_FORMAT = '%Y-%m-%d %H:%M:%S' class JobIdLogger(logging.Logger): def makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=Non...
bsd-3-clause
korrosivesec/crits
crits/actors/urls.py
17
1099
from django.conf.urls import patterns urlpatterns = patterns('crits.actors.views', (r'^add/$', 'add_actor'), (r'^add_identifier_type/$', 'new_actor_identifier_type'), (r'^tags/modify/$', 'actor_tags_modify'), (r'^tags/get/$', 'get_actor_tags'), (r'^add_identifier/$', 'add_identifier'), (r'^attr...
mit
SummerLW/Perf-Insight-Report
third_party/Paste/paste/exceptions/collector.py
49
19684
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php ############################################################################## # # Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Ri...
bsd-3-clause
rdnetto/entropy
lib/entropy/transceivers/uri_handlers/plugins/interfaces/file_plugin.py
6
9636
# -*- coding: utf-8 -*- """ @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @copyright: Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> @license: GPL-2 B{EntropyTransceiver File URI Handler module}. """ import os import pwd import grp...
gpl-2.0
ZacariasBendeck/youtube-dl
youtube_dl/extractor/karaoketv.py
105
1241
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote_plus from ..utils import ( js_to_json, ) class KaraoketvIE(InfoExtractor): _VALID_URL = r'http://karaoketv\.co\.il/\?container=songs&id=(?P<id>[0-9]+)' _TEST = { ...
unlicense
remotesyssupport/cobbler-1
cobbler/collection_files.py
9
2177
""" Files provide a container for file resources. Copyright 2010, Kelsey Hightower Kelsey Hightower <kelsey.hightower@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 2 of t...
gpl-2.0
eino-makitalo/odoo
addons/website_gengo/__init__.py
316
1024
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
agpl-3.0
azunite/chrome_build
third_party/coverage/misc.py
49
4259
"""Miscellaneous stuff for Coverage.""" import errno import inspect import os import sys from coverage.backward import md5, sorted # pylint: disable=W0622 from coverage.backward import string_class, to_bytes def nice_pair(pair): """Make a nice string representation of a pair of numbers. If the number...
bsd-3-clause
PsychoTV/PsychoTeam.repository
plugin.video.specto/resources/lib/resolvers/googledocs.py
23
2319
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
gpl-2.0
saurabh6790/med_test_lib
webnotes/widgets/form/utils.py
22
3528
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes, json from webnotes import _ @webnotes.whitelist() def remove_attach(): """remove attachment""" import webnotes.utils.file_manager fid = webnotes.form_dic...
mit
chromium2014/src
tools/perf/page_sets/intl_ko_th_vi.py
1
1913
# 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. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
bsd-3-clause
ianastewart/cwltc-admin
mysite/settings/staging.py
1
3443
from .base import * DEBUG = False LIVE_GO_CARDLESS = False LIVE_MAIL = False SITE_NAME = os.path.basename(__file__).title() env_path = os.path.join(BASE_DIR, ".env") environ.Env.read_env(env_path) INSTALLED_APPS += ["raven.contrib.django.raven_compat"] DATABASES = {"default": env.db_url("DATABASE_URL")} ALLOWED_HO...
mit
impowski/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/inputstream.py
618
30855
from __future__ import absolute_import, division, unicode_literals from six import text_type from six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import utils from io import String...
mpl-2.0
yintaoxue/read-open-source-code
solr-4.7.2/src/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
15
10530
#! /usr/bin/env python # 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 "Lic...
apache-2.0
garbled1/ansible
lib/ansible/modules/cloud/amazon/elb_target_group_facts.py
18
9764
#!/usr/bin/python # Copyright: Ansible Project # 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
certik/hermes2d
python/examples/03.py
4
1500
#! /usr/bin/env python # This example shows how to solve a first simple PDE: # - load the mesh, # - perform initial refinements # - create a H1 space over the mesh # - define weak formulation # - initialize matrix solver # - assemble and solve the matrix system # - visualize the solution # # PDE: Poisson...
gpl-2.0
KaranToor/MA450
google-cloud-sdk/platform/gsutil/gslib/tests/test_trace.py
20
1679
# -*- coding: utf-8 -*- # 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 require...
apache-2.0
shsingh/netmiko
tests/test_linux.py
7
2368
#!/usr/bin/env python from __future__ import print_function from netmiko import ConnectHandler def main(): try: hostname = raw_input("Enter remote host to test: ") username = raw_input("Enter remote username: ") except NameError: hostname = input("Enter remote host to test: ") ...
mit
duyetdev/openerp-6.1.1
openerp/addons/account_voucher/__openerp__.py
9
2927
# -*- 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
volatilityfoundation/volatility
volatility/plugins/dlldump.py
12
6282
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # Additional Authors: # Mike Auty <mike.auty@gmail.com> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of...
gpl-2.0
tafaRU/odoo
addons/portal_claim/portal_claim.py
315
1871
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-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
yongshengwang/hue
desktop/core/ext-py/Django-1.6.10/django/db/backends/creation.py
105
20484
import hashlib import sys import time import warnings from django.conf import settings from django.db.utils import load_backend from django.utils.encoding import force_bytes from django.utils.six.moves import input from .util import truncate_name # The prefix to put on the default database name when creating # the t...
apache-2.0
JamesMGreene/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py
126
8904
# 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
tblancher/autokey
src/lib/qtui/settingsdialog.py
48
7928
# -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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 pr...
gpl-3.0
cchurch/ansible-modules-core
cloud/azure/azure_rm_virtualmachineimage_facts.py
46
7563
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
gpl-3.0
jakevdp/altair
altair/utils/deprecation.py
1
1447
import warnings # import functools class AltairDeprecationWarning(UserWarning): pass def _deprecated(obj, name=None, message=None): """Return a version of a class or function that raises a deprecation warning. Parameters ---------- obj : class or function The object to create a deprecat...
bsd-3-clause
twiest/openshift-tools
openshift/installer/vendored/openshift-ansible-3.7.52-1/roles/lib_openshift/src/class/oc_adm_policy_group.py
33
7719
# pylint: skip-file # flake8: noqa class PolicyGroupException(Exception): ''' PolicyGroup exception''' pass class PolicyGroupConfig(OpenShiftCLIConfig): ''' PolicyGroupConfig is a DTO for group related policy. ''' def __init__(self, namespace, kubeconfig, policy_options): super(PolicyGroupC...
apache-2.0
andymckay/django
django/core/management/commands/test.py
111
2965
import sys import os from optparse import make_option, OptionParser from django.conf import settings from django.core.management.base import BaseCommand from django.test.utils import get_runner class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noinput', actio...
bsd-3-clause
rubyinhell/brython
www/src/Lib/encodings/mac_farsi.py
37
15477
""" Python Character Mapping Codec mac_farsi generated from 'MAPPINGS/VENDORS/APPLE/FARSI.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(s...
bsd-3-clause
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/sympy/physics/vector/functions.py
74
23381
from __future__ import print_function, division from sympy import (sympify, diff, sin, cos, Matrix, Symbol, integrate, trigsimp, Function, symbols) from sympy.core.basic import S from sympy.core.compatibility import reduce from .vector import Vector, _check_vector from .frame import CoordinateSym, _...
mit
TraurigeNarr/ThirdParties
googletest-master/googletest/test/gtest_throw_on_failure_test.py
2917
5766
#!/usr/bin/env python # # Copyright 2009, 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...
gpl-2.0
elpaso/QGIS
python/plugins/processing/algs/grass7/ext/i_gensigset.py
16
1699
# -*- coding: utf-8 -*- """ *************************************************************************** i_gensigset.py -------------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *********************************...
gpl-2.0
gameduell/duell
bin/mac/python2.7.9/lib/python2.7/multiprocessing/queues.py
103
12318
# # Module implementing queues # # multiprocessing/queues.py # # Copyright (c) 2006-2008, R Oudkerk # 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 ret...
bsd-2-clause
jamielennox/python-kiteclient
kiteclient/tests/v1/test_esek.py
1
3094
# 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
zaqwes8811/serial-cs
extern/gmock-1.6.0/gtest/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 2009 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...
apache-2.0
boddulavineela/mase
python101/code/homophone.py
14
1749
"""This module contains code from Think Python by Allen B. Downey http://thinkpython.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from pronounce import read_dictionary def make_word_dict(): """Read the words in words.txt and return a dictionary that contain...
unlicense
krasin/omim
3party/Alohalytics/tests/googletest/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 2009 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...
apache-2.0
wkennington/rethinkdb
external/v8_3.30.33.16/build/gyp/test/generator-output/gyptest-subdir2-deep.py
216
1034
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies building a target from a .gyp file a few subdirectories deep when the --generator-output= option is used to put the build confi...
agpl-3.0
BitcoinUnlimited/BitcoinUnlimited
contrib/seeds/generate-seeds.py
71
4378
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
mit
mschurenko/ansible-modules-core
system/user.py
9
71259
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@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 Lice...
gpl-3.0
kd0aij/matrixpilot_old
Tools/MAVLink/MAVProxy/modules/antenna.py
1
2346
#!/usr/bin/env python ''' antenna pointing module Andrew Tridgell June 2012 ''' import sys, os, time sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'cuav', 'lib')) import cuav_util mpstate = None class module_state(object): def __init__(self): self...
gpl-3.0
shastah/spacewalk
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
5
56683
# # Copyright (c) 1999--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
xxd3vin/spp-sdk
opt/Python27/Lib/site-packages/numpy/linalg/tests/test_regression.py
94
2246
""" Test functions for linalg module """ from numpy.testing import * import numpy as np from numpy import linalg, arange, float64, array, dot, transpose rlevel = 1 class TestRegression(TestCase): def test_eig_build(self, level = rlevel): """Ticket #652""" rva = array([1.03221168e+02 +0.j, ...
mit
tachang/pygeocoder
test.py
2
9214
#!/usr/bin/env python # # Xiao Yu - Montreal - 2010 # Based on googlemaps by John Kleint # # This program 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 3 of the License, or # (at your o...
bsd-3-clause
nis-sdn/odenos
src/main/python/org/o3project/odenos/core/component/network/flow/flow_set.py
6
2647
# -*- 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
AlexV1990/saveall
utils/modconf.py
1
7590
#! /usr/bin/env python3 # coding: utf-8 ''' Fonctions de manipulation et vérifications du fichier de configuration ''' import json import utils.misc as misc CONF_FILE_NAME = "conf/conf.json" ''' check_conf_valid: vérifie que le fichier de conf est bien dans un format json valide entrée: pas d'argument (nom du fich...
mit
naparuba/kunai
opsbro/misc/internalrsa/pyasn1/codec/ber/decoder.py
185
36629
# BER decoder from pyasn1.type import tag, base, univ, char, useful, tagmap from pyasn1.codec.ber import eoo from pyasn1.compat.octets import oct2int, octs2ints, isOctetsType from pyasn1 import debug, error class AbstractDecoder: protoComponent = None def valueDecoder(self, fullSubstrate, substrate, asn1Spec, ...
mit
onponomarev/ganeti
devel/cert_digest.py
4
2074
#!/usr/bin/python # Copyright (C) 2015 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of c...
bsd-2-clause
kubernetes-client/python
kubernetes/client/models/v1alpha1_webhook_throttle_config.py
1
4435
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
tm011064/wrongnumberproject
proj.android/build_native.py
124
1365
#!/usr/bin/python # build_native.py # Build native codes # # Please use cocos console instead import sys import os, os.path import shutil from optparse import OptionParser def build(build_mode): current_dir = os.path.dirname(os.path.realpath(__file__)) cocos_root = os.path.join(current_dir, "../cocos2d") ...
mit
alexcrichton/gyp
test/product/gyptest-product.py
290
1588
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simplest-possible build of a "Hello, world!" program using the default build target. """ import TestGyp # Android does not su...
bsd-3-clause
JCROM-Android/jcrom_external_chromium_org
tools/telemetry/telemetry/page/block_page_measurement_results_unittest.py
30
1837
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import StringIO import os import unittest from telemetry.page import block_page_measurement_results from telemetry.page import page_set BlockPageMeasure...
bsd-3-clause