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
avinashkunuje/phantomjs
src/breakpad/src/third_party/protobuf/protobuf/python/ez_setup.py
454
10334
#!python # This file was obtained from: # http://peak.telecommunity.com/dist/ez_setup.py # on 2011/1/21. """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup...
bsd-3-clause
erhuabushuo/crossbar
crossbar/worker/process.py
2
9016
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
agpl-3.0
leeseuljeong/leeseulstack_neutron
neutron/tests/unit/test_dhcp_scheduler.py
7
5128
# Copyright 2014 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 w...
apache-2.0
bbansalWolfPack/servo
python/servo/bootstrap_commands.py
15
16812
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
dbtsai/spark
python/pyspark/streaming/kinesis.py
19
5410
# # 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 us...
apache-2.0
matthiascy/three.js
utils/exporters/blender/addons/io_three/exporter/api/material.py
55
8333
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(...
mit
legoktm/legobot-old
toolserver/pywp/timedate.py
1
2209
#!usr/bin/python # (C) Legoktm 2008-2011, MIT License import time, datetime """ Not to be run as a file Contains lists and dictionaries to help with dates Only for English Language, however translations are welcome. """ MonthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'Septemb...
mit
chand3040/sree_odoo
openerp/addons/l10n_vn/__init__.py
425
1067
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module is Copyright (c) 2009-2013 General Solutions (http://gscom.vn) All Rights Reserved. # # This program is free software: you can redistribute it and/or...
agpl-3.0
vmuriart/grako
grako/contexts.py
1
22161
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import functools from collections import namedtuple from contextlib import contextmanager from grako.util import notnone, ustr, prune_dict, is_list, info, safe_name from grak...
bsd-2-clause
Greennut/ostproject
django/contrib/redirects/middleware.py
447
1105
from django.contrib.redirects.models import Redirect from django import http from django.conf import settings class RedirectFallbackMiddleware(object): def process_response(self, request, response): if response.status_code != 404: return response # No need to check for a redirect for non-404 re...
bsd-3-clause
publysher/rdflib-django
src/rdflib_django/test_store.py
2
3413
""" Unit tests for the store class. Includes all unit tests that are hard or annoying to doctest. """ import datetime from django import test import rdflib from rdflib.graph import Graph from rdflib.namespace import RDF, RDFS, Namespace from rdflib.term import URIRef, Literal, BNode EX = Namespace("http://www.example...
mit
nattee/cafe-grader-web
lib/assets/Lib/sre_constants.py
9
7432
# # Secret Labs' Regular Expression Engine # # various symbols used by the regular expression engine. # run this script to update the _sre include files! # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal su...
mit
edensparkles/FIRSTAID
FIRST_AID/venv/Lib/site-packages/pip/commands/download.py
169
4804
from __future__ import absolute_import import logging import os from pip.req import RequirementSet from pip.basecommand import RequirementCommand from pip import cmdoptions from pip.utils import ensure_dir, normalize_path from pip.utils.build import BuildDirectory from pip.utils.filesystem import check_path_owner l...
mit
rosswhitfield/mantid
tools/reports/commits-report.py
3
12289
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pyl...
gpl-3.0
danstowell/SuperCute
common/Psycollider/Psycollider/Psycollider.py
4
60542
# File: Psycollider.py # Copyright (c) Benjamin Golinvaux # # 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 option) any later version. # # Thi...
gpl-3.0
timpalpant/calibre
src/calibre/ebooks/conversion/plugins/djvu_input.py
19
2221
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL 3' __copyright__ = '2011, Anthon van der Neut <anthon@mnt.org>' __docformat__ = 'restructuredtext en' import os from io import BytesIO from calibre.customize.conver...
gpl-3.0
keisuke-umezawa/chainer
chainer/functions/loss/cross_covariance.py
8
4497
import chainer from chainer import backend from chainer import function_node from chainer import utils from chainer.utils import type_check class CrossCovariance(function_node.FunctionNode): """Cross-covariance loss.""" def __init__(self, reduce='half_squared_sum'): self.y_centered = None se...
mit
joshblum/django-with-audit
tests/modeltests/test_client/views.py
39
7984
from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms import Form from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound from django.shortcuts ...
bsd-3-clause
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.5/Lib/glob.py
92
2010
"""Filename globbing utility.""" import os import fnmatch import re __all__ = ["glob", "iglob"] def glob(pathname): """Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. """ return list(iglob(pathname)) def iglob(pathname): ""...
mit
kun--hust/sccloud
test/unit/obj/test_ssync_sender.py
9
70466
# Copyright (c) 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 ...
apache-2.0
meejah/txtorcon
txtorcon/socks.py
1
23368
# in-progress; implementing SOCKS5 client-side stuff as extended by # tor because txsocksx will not be getting Python3 support any time # soon, and its underlying dependency (Parsely) also doesn't support # Python3. Also, Tor's SOCKS5 implementation is especially simple, # since it doesn't do BIND or UDP ASSOCIATE. fr...
mit
MoritzS/django
tests/utils_tests/test_inspect.py
62
1147
import unittest from django.utils import inspect class Person: def no_arguments(self): return None def one_argument(self, something): return something def just_args(self, *args): return args def all_kinds(self, name, address='home', age=25, *args, **kwargs): return ...
bsd-3-clause
gabelula/b-counted
django/contrib/gis/db/backends/postgis/adapter.py
311
1165
""" This object provides quoting for GEOS geometries into PostgreSQL/PostGIS. """ from psycopg2 import Binary from psycopg2.extensions import ISQLQuote class PostGISAdapter(object): def __init__(self, geom): "Initializes on the geometry." # Getting the WKB (in string form, to allow easy pickling ...
apache-2.0
ASzc/nagoya
cfg/koji-builder/setup.py
1
1421
#!/usr/bin/env python2 # References: # https://fedoraproject.org/wiki/Koji/ServerHowTo # https://github.com/sbadakhc/kojak/blob/master/scripts/install/install import util.cfg as cfg import util.pkg as pkg import util.cred as cred from util.log import log # # Setup # log.info("General update") pkg.clean() pkg.update...
lgpl-3.0
appi147/Jarvis
jarviscli/plugin.py
1
6525
from inspect import cleandoc, isclass import pluginmanager from requests import ConnectionError # Constants # platform MACOS = "MACOS" LINUX = "LINUX" WINDOWS = "WINDOWS" # Shortcut for MACOS + LINUX UNIX = "UNIX" def plugin(name): """ Convert function in Plugin Class @python(platform=LINUX, native="a...
mit
brigittebigi/proceed
proceed/scripts/import.py
1
9928
#!/usr/bin/python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ ___ ___ ____ ____ __ # | \ | \ | | / | | | \ Automatic # |__/ |__/ | | | |__ |__ | | Conference # | |\...
gpl-3.0
TangHao1987/intellij-community
python/testData/MockSdk2.7/python_stubs/sys.py
44
15414
# encoding: utf-8 # module sys # from (built-in) # by generator 1.124 """ This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter. Dynamic objects: argv -- command line arguments; argv[0] is the script pathname if known path -- mod...
apache-2.0
zvolsky/muzika
models/menu.py
1
6740
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## Customize your APP title, subtitle and menus here ######################################################################### response.logo...
agpl-3.0
klahnakoski/cloc
cloc/util/queries/es_query_util.py
1
16380
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __...
mpl-2.0
drufat/sympy
sympy/physics/quantum/dagger.py
116
2242
"""Hermitian conjugation.""" from __future__ import print_function, division from sympy.core import Expr from sympy.functions.elementary.complexes import adjoint __all__ = [ 'Dagger' ] class Dagger(adjoint): """General Hermitian conjugate operation. Take the Hermetian conjugate of an argument [1]_. Fo...
bsd-3-clause
dtbcoinlab/dtbcoin
share/qt/make_spinner.py
1
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen DTC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
pansapiens/mytardis
tardis/tardis_portal/south_migrations/0007_locking_and_public_access.py
5
17384
# -*- 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): db.start_transaction() # Renaming field 'Experiment.public' to 'Experiment.locked' db.rename_column(...
bsd-3-clause
Kapiche/gcloud-datastore-oem
gcloudoem/exceptions.py
1
8700
# Copyright 2014 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
stbarnabas/mezzanine
mezzanine/forms/fields.py
6
3215
from django.core.exceptions import ImproperlyConfigured from django import forms from django.forms.extras import SelectDateWidget from django.utils.translation import ugettext_lazy as _ from mezzanine.conf import settings from mezzanine.core.forms import SplitSelectDateTimeWidget from mezzanine.utils.importing import...
bsd-2-clause
wbchen99/bitcoin-hnote0
qa/rpc-tests/bipdersig-p2p.py
49
6866
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from ...
mit
kytvi2p/Sigil
3rdparty/python/Lib/idlelib/ParenMatch.py
113
6713
"""ParenMatch -- An IDLE extension for parenthesis matching. When you hit a right paren, the cursor should move briefly to the left paren. Paren here is used generically; the matching applies to parentheses, square brackets, and curly braces. """ from idlelib.HyperParser import HyperParser from idlelib.configHandler...
gpl-3.0
llekn/ffado
admin/pyuic4.py
1
1532
#!/usr/bin/python # # Copyright (C) 2007-2008 Arnold Krille # # This file is part of FFADO # FFADO = Free Firewire (pro-)audio drivers for linux # # FFADO is based upon FreeBoB. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
gpl-2.0
moto-timo/ironpython3
Src/Scripts/generate_calls.py
1
26135
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of t...
apache-2.0
chriskmanx/qmole
QMOLEDEV/X11/freetype-2.4.7/src/tools/chktrcmp.py
381
3826
#!/usr/bin/env python # # Check trace components in FreeType 2 source. # Author: suzuki toshiya, 2009 # # This code is explicitly into the public domain. import sys import os import re SRC_FILE_LIST = [] USED_COMPONENT = {} KNOWN_COMPONENT = {} SRC_FILE_DIRS = [ "src" ] TRACE_DEF_FILES = [ "include/freetype/in...
gpl-3.0
jproffitt/Django-parsley
example/example/wsgi.py
4
1142
""" WSGI config for example project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` ...
bsd-3-clause
gundalow/ansible-modules-core
network/dellos6/dellos6_config.py
44
9929
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # 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 versi...
gpl-3.0
pepetreshere/odoo
addons/mail/models/res_company.py
6
1569
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields, tools class Company(models.Model): _name = 'res.company' _inherit = 'res.company' catchall_email = fields.Char(string="Catchall Email", compute="_compute_catchall") ...
agpl-3.0
intoximeters/wal-e
wal_e/worker/upload_pool.py
13
3971
import gc import gevent from wal_e import channel from wal_e import tar_partition from wal_e.exception import UserCritical class TarUploadPool(object): def __init__(self, uploader, max_concurrency, max_members=tar_partition.PARTITION_MAX_MEMBERS): # Injected upload mechanism self...
bsd-3-clause
rajeefmk/Barcamp-Bangalore-Android-App
gcm_flask/flask/exthook.py
70
5055
# -*- coding: utf-8 -*- """ flask.exthook ~~~~~~~~~~~~~ Redirect imports for extensions. This module basically makes it possible for us to transition from flaskext.foo to flask_foo without having to force all extensions to upgrade at the same time. When a user does ``from flask.ext.foo import...
apache-2.0
pgmillon/ansible
lib/ansible/modules/network/fortios/fortios_system_interface.py
23
101714
#!/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
waveform80/dbsuite
dbsuite/plugins/db2/zos/parser.py
1
412770
# vim: set et sw=4 sts=4: # Copyright 2012 Dave Hughes. # # This file is part of dbsuite. # # dbsuite is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any l...
gpl-3.0
jp-security/LeagueStats
app/auth/forms.py
1
1957
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError, SelectField, IntegerField, DecimalField from wtforms.validators import Required, Email, Length, Regexp, EqualTo, NumberRange from wtforms import ValidationError from ..models import User class Lo...
gpl-3.0
Feduch/pyMessengerBotApi
messengerbot/api/messenger_requests/__init__.py
1
2060
from messengerbot.api.messenger_requests.messenger_start_request import MessengerStartRequest from messengerbot.api.messenger_requests.messenger_postback_request import MessengerPostbackRequest from messengerbot.api.messenger_requests.messenger_referral_request import MessengerReferralRequest from messengerbot.api.mess...
gpl-3.0
thomasrstorey/Inter-pre-in-vention
backend/node_modules/fast-levenshtein/node_modules/grunt-npm-install/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py
2679
2878
#!/usr/bin/env python # Copyright (c) 2011 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. """Using the JSON dumped by the dump-dependency-json generator, generate input suitable for graphviz to render a dependency graph of targets...
mit
NolanBecker/aima-python
submissions/aartiste/county_demographics.py
36
8126
''' Hello student. Thank you for downloading a CORGIS library. However, you do not need to open this library. Instead you should use the following: import county_demographics If you opened the file because you are curious how this library works, then well done! We hope that you find it a useful learning exper...
mit
hilarry/cmdb
cmdb/settings.py
1
2308
""" Django settings for cmdb project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impor...
apache-2.0
recipy/recipy
integration_test/test_packages.py
1
18672
""" recipy test case runner. Run tests to check that recipy logs information on input and output functions invoked by scripts which use packages that recipy has been configured to log. Tests are specified using a [YAML](http://yaml.org/) (YAML Ain't Markup Language) configuration file. YAML syntax is: * `---` indica...
apache-2.0
StackStorm/st2
st2api/tests/unit/controllers/v1/test_rule_enforcements.py
3
4878
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
Orochimarufan/PythonQt
examples/NicePyConsole/pygments/lexers/jvm.py
3
65991
# -*- coding: utf-8 -*- """ pygments.lexers.jvm ~~~~~~~~~~~~~~~~~~~ Pygments lexers for JVM languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ...
lgpl-2.1
decimalbell/devnull
python/sidl/unpacker.py
1
3416
import struct class Unpacker(object): def __init__(self, buf): self._buffer = buf self._offset = 0 self._typemethods = {'b': self.unpack_int8, 'B': self.unpack_uint8, 'h': self.unpack_int16, 'H': self.unpack_uint16, 'i': self.unpack...
mit
6112/servo
tests/wpt/web-platform-tests/tools/pytest/_pytest/assertion/rewrite.py
176
33919
"""Rewrite assertion AST to produce nice error messages""" import ast import errno import itertools import imp import marshal import os import re import struct import sys import types import py from _pytest.assertion import util # pytest caches rewritten pycs in __pycache__. if hasattr(imp, "get_tag"): PYTEST_T...
mpl-2.0
Phonebooth/depot_tools
third_party/boto/file/simpleresultset.py
264
1321
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
bsd-3-clause
kived/kvlang
kvlang/ast_parser.py
1
4502
from functools import partial import weakref from kivy.compat import iteritems from kivy.factory import Factory from kivy.lang import ParserRuleProperty, Parser, ParserException, ParserRule as kivy_ParserRule, Builder as kivy_Builder from kivy.logger import Logger from kivy.weakproxy import WeakProxy from kvlang.kvTree...
mit
nickhdamico/py
plexpy/lock.py
10
2717
""" Locking-related classes """ import plexpy.logger import time import threading import Queue class TimedLock(object): """ Enforce request rate limit if applicable. This uses the lock so there is synchronized access to the API. When N threads enter this method, the first will pass trough, since ther...
gpl-3.0
HidinMTA/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/sibling/gyptest-relocate.py
137
1170
#!/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. """ """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('build/all.gyp', chdir='src') test.relocate('src', 'relocate/src') test.bu...
gpl-3.0
hisaharu/ryu
ryu/ofproto/ofproto_utils.py
20
3821
# Copyright (C) 2015 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
barykaed/Pelican-Test
activate/Lib/site-packages/setuptools/command/build_ext.py
177
12442
from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler from distutils.errors import DistutilsError from distutils import log import os import sys import itertools from s...
mit
stevenewey/wagtail
wagtail/wagtailcore/management/commands/publish_scheduled_pages.py
31
4237
from __future__ import print_function import json from optparse import make_option from django.core.management.base import BaseCommand from django.utils import dateparse, timezone from wagtail.wagtailcore.models import Page, PageRevision def revision_date_expired(r): expiry_str = json.loads(r.content_json).get...
bsd-3-clause
nlloyd/SubliminalCollaborator
libs/twisted/python/text.py
40
5475
# -*- test-case-name: twisted.test.test_text -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Miscellany of text-munging functions. """ def stringyString(object, indentation=''): """ Expansive string formatting for sequence types. C{list.__str__} and C{dict.__str__} use ...
apache-2.0
SAM-IT-SA/odoo
addons/l10n_co/wizard/__init__.py
313
1165
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) David Arnold (devCO). # Author David Arnold (devCO), dar@devco.co # Co-Authors Juan Pablo Aries (devCO), jpa@devco.co # Hector Iva...
agpl-3.0
analogdevicesinc/gnuradio
gr-dtv/python/dtv/__init__.py
46
1179
# # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
gpl-3.0
dpetzold/django
docs/_ext/applyxrefs.py
322
1834
"""Adds xref targets to the top of files.""" import os import sys testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines.insert(0,...
bsd-3-clause
stefanvanwouw/puppet-hive
files/hive-0.12.0-bin/lib/py/fb303/FacebookBase.py
173
1917
#!/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 # "L...
mit
deehzee/cs231n
assignment2/cs231n/classifiers/neural_net.py
2
13071
import numpy as np import matplotlib.pyplot as plt class TwoLayerNet(object): """ A two-layer fully-connected neural network. The net has an input dimension of N, a hidden layer dimension of H, and performs classification over C classes. We train the network with a softmax loss function and L2 reg...
mit
ashemedai/ansible
lib/ansible/modules/cloud/amazon/route53_zone.py
60
11727
#!/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
godLoveLucifer/viewfinder
backend/www/admin/counters.py
13
3672
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """Handlers for viewing performance counter data. """ __author__ = 'matt@emailscrubbed.com (Matt Tracy)' import json import os import time import logging from functools import partial from tornado import auth, template, web from viewfinder.backend.base import ha...
apache-2.0
aCoder2013/shadowsocks
shadowsocks/udprelay.py
924
11154
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
Beyond-Imagination/BlubBlub
ChatbotServer/ChatbotEnv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/caches/file_cache.py
762
3532
import hashlib import os from pip._vendor.lockfile import LockFile from pip._vendor.lockfile.mkdirlockfile import MkdirLockFile from ..cache import BaseCache from ..controller import CacheController def _secure_open_write(filename, fmode): # We only want to write to this file, so open it in write only mode ...
gpl-3.0
alxgu/ansible
lib/ansible/modules/windows/win_rds_settings.py
38
1895
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Subileau (@ksubileau) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'commu...
gpl-3.0
TanguyPatte/phantomjs-packaging
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py
638
9836
# 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
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/django/contrib/auth/management/__init__.py
70
6746
""" Creates permissions for all installed apps that need permissions. """ from __future__ import unicode_literals import getpass import locale import unicodedata from django.contrib.auth import models as auth_app, get_user_model from django.core import exceptions from django.core.management.base import CommandError f...
mit
laurent-george/weboob
modules/cmb/module.py
3
8553
# -*- coding: utf-8 -*- # Copyright(C) 2012 Johann Broudin # # This file is part of weboob. # # weboob 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 opt...
agpl-3.0
joequery/django
tests/gis_tests/relatedapp/tests.py
199
15937
from __future__ import unicode_literals from django.contrib.gis.db.models import F, Collect, Count, Extent, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.geos import GEOSGeometry, MultiPoint, Point from django.db import connection from django.test import TestCase, ignore_warnin...
bsd-3-clause
Kingclove/project3-info3180
server/lib/markupsafe/_native.py
1243
1187
# -*- coding: utf-8 -*- """ markupsafe._native ~~~~~~~~~~~~~~~~~~ Native Python implementation the C module is not compiled. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from markupsafe import Markup from markupsafe._compat import text_type def escape(...
apache-2.0
m0ppers/arangodb
3rdParty/V8/V8-5.0.71.39/tools/swarming_client/third_party/requests/compat.py
8
2541
# -*- coding: utf-8 -*- """ pythoncompat """ chardet = None import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) #: Python 3.0.x is_py30 = (is_py3 and _ver[1] == 0) #: Python 3.1.x is_py31 = (is_py3 and _v...
apache-2.0
landryb/QGIS
python/plugins/processing/modeler/ModelerAlgorithmProvider.py
12
4201
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerAlgorithmProvider.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************...
gpl-2.0
fzheng/codejam
lib/python2.7/site-packages/wheel/signatures/djbec.py
566
6755
# Ed25519 digital signatures # Based on http://ed25519.cr.yp.to/python/ed25519.py # See also http://ed25519.cr.yp.to/software.html # Adapted by Ron Garret # Sped up considerably using coordinate transforms found on: # http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html # Specifically add-2008-hwcd-4 and d...
mit
holmes/intellij-community
python/lib/Lib/modjy/modjy_wsgi.py
80
5980
### # # Copyright Alan Kennedy. # # You may contact the copyright holder at this uri: # # http://www.xhaus.com/contact/modjy # # The licence under which this code is released is the Apache License v2.0. # # The terms and conditions of this license are listed in a file contained # in the distribution that also cont...
apache-2.0
2014c2g23/2015cd_midterm-
static/Brython3.1.1-20150328-091302/Lib/base64.py
733
13975
#! /usr/bin/env python3 """RFC 3548: Base16, Base32, Base64 Data Encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere import re import struct import binascii _...
gpl-3.0
rvraghav93/scikit-learn
examples/calibration/plot_calibration_multiclass.py
95
6971
""" ================================================== Probability Calibration for 3-class classification ================================================== This example illustrates how sigmoid calibration changes predicted probabilities for a 3-class classification problem. Illustrated is the standard 2-simplex, wher...
bsd-3-clause
frewsxcv/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/inject_meta_charset.py
1730
2746
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def __init__(self, source, encoding): _base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.enco...
mpl-2.0
kennedyshead/home-assistant
homeassistant/components/irish_rail_transport/sensor.py
5
6242
"""Support for Irish Rail RTPI information.""" from datetime import timedelta from pyirishrail.pyirishrail import IrishRailRTPI import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME, TIME_MINUTES import homeassist...
apache-2.0
nco/pynco
nco/nco.py
1
19238
""" nco module. Use Nco class as interface. """ import distutils.spawn import os import re import shlex import six import subprocess import tempfile from distutils.version import LooseVersion class NCOException(Exception): def __init__(self, stdout, stderr, returncode): super(NCOException, self).__init_...
mit
tswast/google-cloud-python
dataproc/google/cloud/dataproc_v1/gapic/workflow_template_service_client_config.py
4
2320
config = { "interfaces": { "google.cloud.dataproc.v1.WorkflowTemplateService": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], "non_idempotent": ["UNAVAILABLE"], }, "retry_params": { "defau...
apache-2.0
xiaoxiamii/scikit-learn
examples/preprocessing/plot_function_transformer.py
161
1949
""" ========================================================= Using FunctionTransformer to select columns ========================================================= Shows how to use a function transformer in a pipeline. If you know your dataset's first principle component is irrelevant for a classification task, you ca...
bsd-3-clause
vdmann/cse-360-image-hosting-website
lib/python2.7/site-packages/django/conf/locale/fr/formats.py
118
1448
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i:s' DATE...
mit
agrista/odoo-saas
openerp/addons/base/tests/test_osv.py
446
4722
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP S.A. http://www.openerp.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
davidsminor/gaffer
python/GafferSceneTest/MapProjectionTest.py
5
4219
########################################################################## # # Copyright (c) 2013, John Haddon. 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...
bsd-3-clause
PepSalehi/scipy_2015_sklearn_tutorial
notebooks/figures/plot_digits_datasets.py
19
2750
# Taken from example in scikit-learn examples # Authors: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Gael Varoquaux # License: BSD 3 clause (C) INRIA 2011 import numpy as np import matplotlib.pyplot as pl...
cc0-1.0
cloudera/hue
desktop/core/ext-py/Django-1.11.29/tests/foreign_object/models/article.py
51
3473
from django.db import models from django.db.models.fields.related import ForwardManyToOneDescriptor from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import get_language class ArticleTranslationDescriptor(ForwardManyToOneDescriptor): """ The set of articletranslation ...
apache-2.0
CristianBB/SickRage
sickbeard/dailysearcher.py
1
4268
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.github.io # Git: https://github.com/SickRage/SickRage.git # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Found...
gpl-3.0
ronaldahmed/SLAM-for-ugv
neural-navigation-with-lstm/MARCO/nltk/tokenreader/sense.py
2
18296
# Natural Language Toolkit: Word sense utilities # # Copyright (C) 2003 University of Melbourne # Author: Trevor Cohn <tacohn@cs.mu.oz.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # # $Id: sense.py,v 1.1.1.1 2004/09/29 21:58:18 adastra Exp $ # """ (Under construction.) Grouping of tools ...
mit
wakatime/sublime-wakatime
packages/wakatime/packages/py27/cryptography/hazmat/primitives/hmac.py
11
2196
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography import utils from cryptography.exceptions import ( ...
bsd-3-clause
Pablo126/SSBW
Tarea4/tarea4/lib/python3.5/site-packages/django/core/cache/backends/dummy.py
629
1213
"Dummy cache backend" from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache class DummyCache(BaseCache): def __init__(self, host, *args, **kwargs): BaseCache.__init__(self, *args, **kwargs) def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): key = self.make_key...
gpl-3.0
hehongliang/tensorflow
tensorflow/contrib/eager/python/examples/spinn/data.py
38
13539
# 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