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
mozvip/CouchPotatoServer
libs/werkzeug/datastructures.py
73
83980
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import codecs import ...
gpl-3.0
zbsz/micro-protobuf
gtest/test/gtest_color_test.py
3259
4911
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
lazy404/libstoragemgmt
tools/utility/web_cap.py
3
3549
#!/usr/bin/env python2 # Copyright (C) 2011-2013 Red Hat, Inc. # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or any later version. # # This library...
lgpl-2.1
npiganeau/odoo
addons/l10n_de/__openerp__.py
170
7816
# -*- encoding: 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 G...
agpl-3.0
liefdiy/bite-project
deps/gdata-python-client/src/gdata/tlslite/utils/Python_RSAKey.py
239
7707
"""Pure-Python RSA implementation.""" from cryptomath import * import xmltools from ASN1Parser import ASN1Parser from RSAKey import * class Python_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if (n and not e) or (e and not n): raise AssertionError() ...
apache-2.0
mbareta/edx-platform-ft
common/djangoapps/microsite_configuration/admin.py
41
2691
""" Django admin page for microsite models """ from django.contrib import admin from django import forms from .models import ( Microsite, MicrositeHistory, MicrositeOrganizationMapping, MicrositeTemplate ) from util.organizations_helpers import get_organizations class MicrositeAdmin(admin.ModelAdmin)...
agpl-3.0
apark263/tensorflow
tensorflow/python/autograph/utils/type_check_test.py
21
1576
# 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
pvcrossi/OnlineCS
online_CS.py
1
4043
''' Bayesian Online Compressed Sensing (2016) Paulo V. Rossi & Yoshiyuki Kabashima ''' from collections import namedtuple import matplotlib.pyplot as plt import numpy as np from numpy.linalg import norm from numpy.random import normal from utils import DlnH, DDlnH, G, H, moments def simulation(method='standard'): ...
mit
mtury/scapy
scapy/layers/tls/automaton.py
1
9879
# This file is part of Scapy # Copyright (C) 2007, 2008, 2009 Arnaud Ebalard # 2015, 2016, 2017 Maxence Tury # This program is published under a GPLv2 license """ The _TLSAutomaton class provides methods common to both TLS client and server. """ import struct from scapy.automaton import Automaton from ...
gpl-2.0
xionzz/earthquake
venv/lib/python2.7/site-packages/numpy/distutils/__init__.py
59
1074
from __future__ import division, absolute_import, print_function import sys if sys.version_info[0] < 3: from .__version__ import version as __version__ # Must import local ccompiler ASAP in order to get # customized CCompiler.spawn effective. from . import ccompiler from . import unixccompiler ...
mit
ddico/odoomrp-wip
sale_order_allowed_product/__openerp__.py
17
1484
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) # 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com) # 2015 AvanzOsc (http://www.avanzosc.es) # # This program is free software: you can redistribute it and/or modi...
agpl-3.0
nelango/ViralityAnalysis
model/lib/pandas/tests/test_internals.py
9
45145
# -*- coding: utf-8 -*- # pylint: disable=W0102 from datetime import datetime, date import nose import numpy as np import re import itertools from pandas import Index, MultiIndex, DataFrame, DatetimeIndex, Series, Categorical from pandas.compat import OrderedDict, lrange from pandas.sparse.array import SparseArray f...
mit
agconti/njode
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py
2763
12536
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
bsd-3-clause
msabramo/ansible
lib/ansible/modules/packaging/os/apt_repository.py
60
19943
#!/usr/bin/python # encoding: utf-8 # (c) 2012, Matt Wright <matt@nobien.net> # (c) 2013, Alexander Saltanov <asd@mokote.com> # (c) 2014, Rutger Spiertz <rutger@kumina.nl> # # 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...
gpl-3.0
c1728p9/pyOCD
pyOCD/target/target_kl26z.py
5
1070
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited 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
sebi-hgdata/ansible-modules-core
cloud/amazon/ec2_vol.py
17
15303
#!/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 distributed...
gpl-3.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.6/Lib/platform.py
7
51563
#!/usr/bin/env python """ This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as par...
mit
open-synergy/opnsynid-hr
hr_award/__openerp__.py
1
1285
# -*- coding: utf-8 -*- # Copyright 2019 OpenSynergy Indonesia # Copyright 2020 PT. Simetri Sinergi Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # pylint: disable=locally-disabled, manifest-required-author { "name": "Employee Award", "version": "8.0.2.0.0", "category": "Human Re...
agpl-3.0
aalmah/pylearn2
pylearn2/expr/sampling.py
49
1815
""" .. todo:: WRITEME """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from theano.sandbox.rng_mrg import MRG_RandomStreams from pylearn...
bsd-3-clause
PegasusWang/tornado-cn-auth
tornadocnauth/Weibo.py
4
3992
# -*- coding: utf-8 -*- from tornado import gen from tornado import httpclient from tornado import escape from tornado.httputil import url_concat from tornado.concurrent import Future from tornado.auth import OAuth2Mixin, _auth_return_future, AuthError try: import urlparse except ImportError: import urllib.pa...
mit
tapple/nsize-web
nsize/payroll/migrations/0001_initial.py
1
8932
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-28 04:55 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('sl_profile', '0001_initial'), (...
agpl-3.0
bsn069/ssdb
deps/cpy/ExprParser.py
36
309324
# $ANTLR 3.5 Expr.g 2013-04-12 19:22:24 import sys from antlr3 import * from antlr3.compat import set, frozenset from antlr3.tree import * # for convenience in actions HIDDEN = BaseRecognizer.HIDDEN # token types EOF=-1 T__68=68 T__69=69 T__70=70 T__71=71 T__72=72 T__73=73 T__74=74 T__75=75 T__76=76 T__77=77 T__...
bsd-3-clause
rockneurotiko/django
tests/auth_tests/test_validators.py
229
7546
from __future__ import unicode_literals import os from django.contrib.auth.models import User from django.contrib.auth.password_validation import ( CommonPasswordValidator, MinimumLengthValidator, NumericPasswordValidator, UserAttributeSimilarityValidator, get_default_password_validators, get_password_val...
bsd-3-clause
Guavus/bigtop
bigtop-packages/src/charm/kafka/layer-kafka/actions/kafkautils.py
2
1244
# 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
karlp/frootloop
frootloop/froot.py
1
1487
# Blobtastical import threading import logging import serial import time class Port(object): def __init__(self, dev, baud, parity): if parity == 'e': p = serial.PARITY_EVEN if parity == 'n': p = serial.PARITY_NONE if parity == 'o': p = serial.PARITY_ODD ...
bsd-3-clause
timothyclarke/ansible-modules-extras
cloud/lxd/lxd_container.py
8
21285
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@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...
gpl-3.0
kjagoo/wger_stark
wger/exercises/forms.py
2
1070
# -*- coding: utf-8 -*- # This file is part of Workout Manager. # # Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
agpl-3.0
sixdub/Minions
scan_engine/dnmap_server.py
1
25935
#! /usr/bin/env python # # DNmap Server - Edited by Justin Warner (@sixdub). Originally written by Sebastian Garcia # Orginal Copyright and license (included below) applies. # # This is the server code to be used in conjunction with Minions, a collaborative distributed # scanning solution. # # # DNmap Version Modi...
gpl-2.0
JFriel/honours_project
networkx/networkx/classes/multidigraph.py
10
33433
"""Base class for MultiDiGraph.""" # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from copy import deepcopy import networkx as nx from networkx.classes.graph import Graph # for doc...
gpl-3.0
vongochung/buiquocviet
django/contrib/auth/hashers.py
26
14277
import hashlib from django.conf import settings from django.utils import importlib from django.utils.datastructures import SortedDict from django.utils.encoding import smart_str from django.core.exceptions import ImproperlyConfigured from django.utils.crypto import ( pbkdf2, constant_time_compare, get_random_strin...
bsd-3-clause
AustereCuriosity/astropy
astropy/tests/tests/test_run_tests.py
2
1997
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from __future__ import (absolute_import, division, print_function, unicode_literals) import doctest from textwrap import dedent import pytest # test helper.run_tests function f...
bsd-3-clause
cchanrhiza/python-pptx
tests/text/test_text.py
4
41329
# encoding: utf-8 """ Test suite for pptx.text.text module """ from __future__ import absolute_import, print_function import pytest from pptx.compat import is_unicode from pptx.dml.color import ColorFormat from pptx.dml.fill import FillFormat from pptx.enum.text import MSO_ANCHOR, MSO_AUTO_SIZE, MSO_UNDERLINE, PP_A...
mit
tkaitchuck/nupic
py/nupic/support/object_json.py
2
5097
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
gpl-3.0
thepiper/standoff
vpy/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py
484
10454
from collections import Mapping, MutableMapping try: from threading import RLock except ImportError: # Platform-specific: No threads available class RLock: def __enter__(self): pass def __exit__(self, exc_type, exc_value, traceback): pass try: # Python 2.7+ from ...
gpl-3.0
telwertowski/QGIS
python/plugins/processing/algs/grass7/ext/v_rectify.py
36
2066
# -*- coding: utf-8 -*- """ *************************************************************************** v_rectify.py ------------ Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *************************************...
gpl-2.0
TomBaxter/osf.io
tests/test_subjects.py
10
8028
# -*- coding: utf-8 -*- from django.core.exceptions import ValidationError from nose.tools import * # flake8: noqa (PEP8 asserts) from osf.exceptions import ValidationValueError from tests.base import OsfTestCase from osf_tests.factories import SubjectFactory, PreprintFactory, PreprintProviderFactory from osf.models...
apache-2.0
pySTEPS/pysteps
examples/plot_optical_flow.py
1
5240
""" Optical flow ============ This tutorial offers a short overview of the optical flow routines available in pysteps and it will cover how to compute and plot the motion field from a sequence of radar images. """ from datetime import datetime from pprint import pprint import matplotlib.pyplot as plt im...
bsd-3-clause
blaggacao/odoo
addons/stock_invoice_directly/__init__.py
374
1085
# -*- 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...
agpl-3.0
eino-makitalo/odoo
addons/email_template/wizard/mail_compose_message.py
197
11797
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-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
nxnfufunezn/servo
tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/stream.py
673
2748
# 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...
mpl-2.0
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/tele5.py
1
1302
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .nexx import NexxIE from ..compat import compat_urlparse class Tele5IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tele5\.de/(?:mediathek|tv)/(?P<id>[^?#&]+)' _TESTS = [{ 'url': 'https://www.tele5.de/mediathek/fi...
gpl-3.0
svn2github/chromium-depot-tools
third_party/coverage/results.py
49
10023
"""Results of coverage measurement.""" import os from coverage.backward import iitems, set, sorted # pylint: disable=W0622 from coverage.misc import format_lines, join_regex, NoSource from coverage.parser import CodeParser class Analysis(object): """The results of analyzing a code unit.""" def __init...
bsd-3-clause
linuxlewis/channels
channels/generic/base.py
1
2261
from __future__ import unicode_literals from ..routing import route_class from ..sessions import channel_session from ..auth import channel_session_user class BaseConsumer(object): """ Base class-based consumer class. Provides the mechanisms to be a direct routing object and a few other things. Class...
bsd-3-clause
Big-B702/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_internals.py
53
2626
# This tests the internal _objects attribute import unittest from ctypes import * from sys import getrefcount as grc # XXX This test must be reviewed for correctness!!! """ ctypes' types are container types. They have an internal memory block, which only consists of some bytes, but it has to keep references to other...
apache-2.0
elkingtonmcb/rethinkdb
external/v8_3.30.33.16/build/gyp/test/msvs/list_excluded/gyptest-all.py
347
1292
#!/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 that msvs_list_excluded_files=0 doesn't list files that would normally be in _excluded_files, and that if that flag is not set,...
agpl-3.0
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py
1
21284
from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os bwa_base_repository_name = 'bwa_base_repository_0100' bwa_base_repository_description = "BWA Base" bwa_base_repository_long_description = "BWA tool that depends on bwa 0.5.9, with a complex repository dependency pointing at package_bwa_0_5_9_0100" ...
gpl-3.0
megaserg/pants
tests/python/pants_test/java/test_nailgun_protocol.py
3
6432
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import socket import...
apache-2.0
morreene/tradenews
venv/Lib/site-packages/babel/_compat.py
10
1423
import sys import array PY2 = sys.version_info[0] == 2 _identity = lambda x: x if not PY2: text_type = str string_types = (str,) integer_types = (int, ) unichr = chr text_to_native = lambda s, enc: s iterkeys = lambda d: iter(d.keys()) itervalues = lambda d: iter(d.values()) iterit...
bsd-3-clause
serensoner/CouchPotatoServer
libs/oauthlib/common.py
112
4551
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.common ~~~~~~~~~~~~~~ This module provides data structures and utilities common to all implementations of OAuth. """ import re import urllib import urlparse always_safe = (u'ABCDEFGHIJKLMNOPQRSTUVWXYZ' u'abcdefghijklmnopqrst...
gpl-3.0
joeyoung658/A-Level_2016-18
2. Exemplars/Sub_Cipher/cipher.py
3
1230
""" Substitution Cipher Name: Mr Gorman Date: 19/11/2016 """ # Global constants CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" def process_text(text, option): """ Function to encrypt or decrypt lowercase and uppercase alpha characters based on selected option. """ processed_text = "" for cha...
gpl-3.0
mingwpy/numpy
numpy/core/code_generators/numpy_api.py
91
19731
"""Here we define the exported functions, types, etc... which need to be exported through a global C pointer. Each dictionary contains name -> index pair. Whenever you change one index, you break the ABI (and the ABI version number should be incremented). Whenever you add an item to one of the dict, the API needs to ...
bsd-3-clause
beagles/neutron_hacking
neutron/plugins/ml2/rpc.py
1
9582
# Copyright (c) 2013 OpenStack Foundation # 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 ...
apache-2.0
apache/incubator-airflow
tests/providers/amazon/aws/hooks/test_emr.py
7
3319
# # 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...
apache-2.0
rev2004/android2cloud.app-engine
google_appengine/lib/yaml/lib/yaml/dumper.py
131
2718
__all__ = ['BaseDumper', 'SafeDumper', 'Dumper'] from emitter import * from serializer import * from representer import * from resolver import * class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver): def __init__(self, stream, default_style=None, default_flow_style=None, c...
mit
mrquim/repository.mrquim
repo/script.module.youtube.dl/lib/youtube_dl/extractor/ceskatelevize.py
29
10182
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, unescapeHTML, urlencode_postdata, ...
gpl-2.0
ryandougherty/mwa-capstone
MWA_Tools/build/matplotlib/doc/mpl_examples/units/evans_test.py
3
2335
""" A mockup "Foo" units class which supports conversion and different tick formatting depending on the "unit". Here the "unit" is just a scalar conversion factor, but this example shows mpl is entirely agnostic to what kind of units client packages use """ import matplotlib from matplotlib.cbook import iterable impo...
gpl-2.0
danieljaouen/ansible
lib/ansible/modules/remote_management/manageiq/manageiq_tags.py
64
9225
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Daniel Korn <korndaniel1@gmail.com> # (c) 2017, Yaacov Zamir <yzamir@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 ANS...
gpl-3.0
gsastry/human-rl
humanrl/pong_catastrophe.py
1
8525
import logging import os import pickle from collections import namedtuple import gym import numpy as np from catastrophe_wrapper import * from catastrophe_wrapper import CatastropheWrapper from classifier_tf import (SavedCatastropheBlockerTensorflow, SavedCatastropheClassifierTensorflow) l...
mit
conceptric/pyinvest
pyinvest/utils.py
1
1880
import numpy as np def cost_of_equity(rfr, mrp, beta=1): ''' Calculates the fractional cost of equity from collections: risk_free : collection of fractional risk free rates. market_risk: collection of fractional market risk premimums. stock_beta : collection of the market beta of the stocks. ...
mit
sjperkins/tensorflow
tensorflow/python/estimator/canned/dnn_linear_combined_test.py
5
26973
# 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
xiaolonginfo/decode-Django
Django-1.5.1/django/contrib/gis/gdal/driver.py
221
2469
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see ...
gpl-2.0
ytjiang/django
django/db/backends/oracle/introspection.py
517
11463
import cx_Oracle from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) from django.utils.encoding import force_text class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_reverse = { cx_Oracle....
bsd-3-clause
Hybrid-Cloud/badam
patches_tool/aws_patch/aws_deps/libcloud/compute/drivers/nephoscale.py
1
17670
# 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 ...
apache-2.0
marvinpinto/charlesbot-rundeck
setup.py
1
1210
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() requirements = [ # TODO: add any additional package requirements here 'charlesbot', ] test_requirements = [ # TODO: add any additional package test requirements here 'asynctest', 'c...
mit
nunogia/Z7Max_NX505J_H129_kernel
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
Daniel-CA/odoo
addons/mass_mailing/wizard/test_mailing.py
26
2128
# -*- coding: utf-8 -*- from openerp import tools from openerp.osv import osv, fields class TestMassMailing(osv.TransientModel): _name = 'mail.mass_mailing.test' _description = 'Sample Mail Wizard' _columns = { 'email_to': fields.char('Recipients', required=True, help='Comma-separate...
agpl-3.0
aweimann/traitar
traitar/heatmap.py
1
19822
#!/usr/bin/env python #adapted from Nathan Salomonis: http://code.activestate.com/recipes/578175-hierarchical-clustering-heatmap-python/ import matplotlib as mpl #pick non-x display mpl.use('Agg') import matplotlib.pyplot as pylab import scipy import scipy.cluster.hierarchy as sch import scipy.spatial.distance as dist...
gpl-3.0
grvcTeam/grvc-ual
uav_abstraction_layer/scripts/track_waypoints.py
1
2926
#!/usr/bin/env python import argparse import sys import yaml import rospy import rospkg from uav_abstraction_layer.srv import TakeOff, GoToWaypoint, Land from geometry_msgs.msg import PoseStamped def track_waypoints(): # Parse arguments parser = argparse.ArgumentParser(description='Track waypoints defined in a...
mit
DeepRNN/image_captioning
utils/coco/pycocoevalcap/cider/cider_scorer.py
13
7694
#!/usr/bin/env python # Tsung-Yi Lin <tl483@cornell.edu> # Ramakrishna Vedantam <vrama91@vt.edu> import copy from collections import defaultdict import numpy as np import pdb import math def precook(s, n=4, out=False): """ Takes a string as input and returns an object that can be given to either cook_refs...
mit
Arafatk/sympy
sympy/physics/quantum/spin.py
64
72713
"""Quantum mechanical angular momemtum.""" from __future__ import print_function, division from sympy import (Add, binomial, cos, exp, Expr, factorial, I, Integer, Mul, pi, Rational, S, sin, simplify, sqrt, Sum, symbols, sympify, Tuple, Dummy) from sympy.core.compatibility import...
bsd-3-clause
AndreyPerelygin/partstem
partstem/__init__.py
1
12494
from nltk.stem import SnowballStemmer from nltk.stem.api import StemmerI import nltk import json class ParticleStemmer(SnowballStemmer): def __init__(self, language="english", ignore_stopwords=False, suffix_rule_list={}): super().__init__(language=language, ignore_stopwords=ignore_stopwords) if language == "engl...
apache-2.0
ledvina/zencoin
test/functional/feature_assumevalid.py
4
7761
#!/usr/bin/env python3 # Copyright (c) 2014-2018 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 logic for skipping signature validation on old blocks. Test logic for skipping signature validati...
mit
ppmt/Crust
flask/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/optionaltags.py
1727
10500
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
gpl-2.0
cdht/androguard
androxgmml.py
9
11151
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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,...
apache-2.0
rabipanda/tensorflow
tensorflow/contrib/gan/python/losses/python/losses_impl.py
4
39030
# 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
stverhae/incubator-airflow
airflow/operators/hive_to_mysql.py
44
4187
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
Thetoxicarcade/ac
congredi/auth/token.py
2
2504
#!/usr/bin/env python # -*- coding: utf-8 -*- """ JWT tokens (for web interface, mostly, as all peer operations function on public key cryptography). Tokens provide heartbeat functionality, and do not log the user directly into the database. Any of the methods in "register" give the user a long-term JWT by using thes...
gpl-3.0
Rajeshkumar90/ansible-modules-extras
web_infrastructure/nginx_status_facts.py
38
5348
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # 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
balazssimon/ml-playground
udemy/lazyprogrammer/reinforcement-learning-python/comparing_explore_exploit_methods.py
1
2913
import numpy as np import matplotlib.pyplot as plt from comparing_epsilons import Bandit from optimistic_initial_values import run_experiment as run_experiment_oiv from ucb1 import run_experiment as run_experiment_ucb class BayesianBandit: def __init__(self, true_mean): self.true_mean = true_mean ...
apache-2.0
fabioz/Pydev
plugins/org.python.pydev.jython/Lib/markupbase.py
173
14643
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the HTMLParser and sgmllib modules (indirectly, for htmllib as well). It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z...
epl-1.0
jonboy11171/support-tools
googlecode-issues-exporter/bitbucket_issue_converter_test.py
90
6338
# 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 by applicable law or a...
apache-2.0
snnn/tensorflow
tensorflow/python/kernel_tests/linalg/linear_operator_addition_test.py
3
16782
# 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
diego0020/PySurfer
examples/plot_label.py
4
1526
""" Display ROI Labels ================== Using PySurfer you can plot Freesurfer cortical labels on the surface with a large amount of control over the visual representation. """ import os from surfer import Brain print(__doc__) subject_id = "fsaverage" hemi = "lh" surf = "smoothwm" brain = Brain(subject_id, hemi, ...
bsd-3-clause
gaddman/ansible
lib/ansible/modules/remote_management/oneview/oneview_fcoe_network_facts.py
125
2632
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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
akpetty/ibtopo2016
calc_multi_atm.py
1
9475
############################################################## # Date: 20/01/16 # Name: calc_multi_atm.py # Author: Alek Petty # Description: Main script to calculate sea ice topography from IB ATM data # Input requirements: ATM data, PosAV data (for geolocation) # Output: topography datasets import matplotlib matplo...
gpl-3.0
rmasters/inbox
inbox/api/filtering.py
1
10329
from datetime import datetime import bson from sqlalchemy import and_, or_, asc, desc from sqlalchemy.orm import joinedload, subqueryload from inbox.models import (Contact, Message, MessageContactAssociation, Thread, Tag, TagItem, Part) from inbox.util.encoding import base36decode class Filt...
agpl-3.0
harterj/moose
python/chigger/vtk_scripts/cylinder_color.py
12
1495
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
lgpl-2.1
spektom/incubator-airflow
airflow/contrib/sensors/aws_glue_catalog_partition_sensor.py
5
1217
# # 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...
apache-2.0
chauhanmohit/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/web.py
194
1811
# 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
jswope00/griffinx
common/test/acceptance/pages/lms/courseware.py
17
2887
""" Courseware page. """ from .course_page import CoursePage from selenium.webdriver.common.action_chains import ActionChains class CoursewarePage(CoursePage): """ Course info. """ url_path = "courseware/" xblock_component_selector = '.vert .xblock' section_selector = '.chapter' subsecti...
agpl-3.0
sdwilsh/buck
third-party/py/pex/pex/sorter.py
55
1403
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from .package import EggPackage, SourcePackage, WheelPackage class Sorter(object): DEFAULT_PACKAGE_PRECEDENCE = ( WheelPackage, EggPackage, SourcePackage, ) @cla...
apache-2.0
apdjustino/DRCOG_Urbansim
src/opus_core/variables/expression_tests/aggregate_disaggregate_expression.py
1
22844
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.tests import opus_unittest from opus_core.datasets.dataset import Dataset from opus_core.datasets.dataset_pool import DatasetPool from opus...
agpl-3.0
mzdaniel/oh-mainline
mysite/search/tests.py
1
62680
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2010 Jack Grigg # Copyright (C) 2009, 2010 OpenHatch, Inc. # Copyright (C) 2010 Jessica McKellar # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as...
agpl-3.0
snahelou/awx
awx/sso/views.py
1
3691
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import urllib import logging # Django from django.core.urlresolvers import reverse from django.http import HttpResponse from django.utils.timezone import now, utc from django.views.generic import View from django.views.generic.base import RedirectView...
apache-2.0
goofwear/raspberry_pwn
src/pentest/fasttrack/bin/exploits/ibmcad.py
16
5371
#!/usr/bin/env python import sys import os import socket import time #from bin.include import print_banner #print_banner() try: import psyco psyco.full() except ImportError: pass choice=raw_input(""" Enter which version you want to target: All JMP ESP's are performed in User32.dll 1. Windo...
gpl-3.0
Donkyhotay/MoonPy
zope/app/publisher/browser/managementviewselector.py
1
1823
############################################################################## # # Copyright (c) 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
gpl-3.0
rahul67/hue
desktop/core/ext-py/guppy-0.1.10/guppy/gsl/Gsml.py
37
2658
#._cv_part guppy.gsl.Gsml class GsmlHandler: # To be mixed in with something like HTMLParser.HTMLParser def handle_starttag(self, tag, attrs): # print 'starttag', tag, attrs self.stack.append(self.out) self.out = [] if attrs: at = [] for k, v in attrs: at.append(self.mod.node_of_taci(k, v)) ...
apache-2.0
nju520/django
tests/messages_tests/urls.py
320
2569
from django import forms from django.conf.urls import url from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.template import engines from django.template.res...
bsd-3-clause
sk-yoh/qiaoy-byte
lib/werkzeug/useragents.py
317
5300
# -*- coding: utf-8 -*- """ werkzeug.useragents ~~~~~~~~~~~~~~~~~~~ This module provides a helper to inspect user agent strings. This module is far from complete but should work for most of the currently available browsers. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more deta...
apache-2.0
mananwason/open-event-android
apk-generator/v2/app/utils/libs/request_context_task.py
17
3427
""" Celery task wrapper to set request context vars and global vars when a task is executed Based on http://xion.io/post/code/celery-include-flask-request-context.html """ from celery import Task from flask import has_request_context, request, g from app import current_app as app __all__ = ['RequestContextTask'] cl...
gpl-3.0