repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
sveetch/boussole | boussole/cli/console_script.py | 1 | 1784 | """
Main entrance to commandline actions
"""
import click
from ..logs import init_logger
from .compile import compile_command
from .startproject import startproject_command
from .version import version_command
from .watch import watch_command
# Help alias on "-h" argument
CONTEXT_SETTINGS = dict(help_option_names=[... | mit |
nimzco/Environment | Sublime/Packages/markupsafe/all/markupsafe/_constants.py | 1535 | 4795 | # -*- coding: utf-8 -*-
"""
markupsafe._constants
~~~~~~~~~~~~~~~~~~~~~
Highlevel implementation of the Markup string.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
HTML_ENTITIES = {
'AElig': 198,
'Aacute': 193,
'Acirc': 194,
'Agrave': 1... | mit |
w1ll1am23/home-assistant | homeassistant/components/somfy/sensor.py | 4 | 1731 | """Support for Somfy Thermostat Battery."""
from pymfy.api.devices.category import Category
from pymfy.api.devices.thermostat import Thermostat
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE
from . import SomfyEntity
from .const import API, C... | apache-2.0 |
akshmakov/Dolfin-Fijee-Fork | demo/undocumented/refinement/python/demo_refinement.py | 2 | 1508 | "This demo illustrates mesh refinement."
# Copyright (C) 2007-2009 Anders Logg
#
# This file is part of DOLFIN.
#
# DOLFIN 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 Licens... | gpl-3.0 |
EmmanuelJohnson/ssquiz | flask/lib/python2.7/site-packages/whoosh/lang/snowball/hungarian.py | 96 | 11694 | from whoosh.compat import u
class HungarianStemmer(object):
"""
The Hungarian Snowball stemmer.
:cvar __vowels: The Hungarian vowels.
:type __vowels: unicode
:cvar __digraphs: The Hungarian digraphs.
:type __digraphs: tuple
:cvar __double_consonants: The Hungarian double consonants.
:... | bsd-3-clause |
RadioFreeAsia/RDacity | lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/dmd.py | 316 | 1511 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
from waflib.Tools import ar,d
from waflib.Configure import conf
@conf
def find_dmd(conf):
conf.find_program(['dmd','dmd2','ldc'],var='D')
out=conf.cmd_and_log([co... | gpl-2.0 |
gusai-francelabs/datafari | windows/python/Lib/test/test_exceptions.py | 12 | 26271 | # Python test set -- part 5, built-in exceptions
import os
import sys
import unittest
import pickle, cPickle
from test.test_support import (TESTFN, unlink, run_unittest, captured_output,
check_warnings, cpython_only)
from test.test_pep352 import ignore_deprecation_warnings
# XXX This i... | apache-2.0 |
GarySparrow/mFlaskWeb | venv/Lib/site-packages/pygments/lexers/ecl.py | 47 | 5875 | # -*- coding: utf-8 -*-
"""
pygments.lexers.ecl
~~~~~~~~~~~~~~~~~~~
Lexers for the ECL language.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, words
from pygments.... | mit |
ofekd/servo | components/script/dom/bindings/codegen/parser/tests/test_mozmap.py | 75 | 1163 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
dictionary Dict {};
interface MozMapArg {
void foo(MozMap<Dict> arg);
};
""")
results = parser.finish()
harness.check(len(results), 2, "Should know about two things");
harness.ok(isinstance(results[1... | mpl-2.0 |
TsubameDono/codecombat | scripts/devSetup/mongo.py | 67 | 4203 | from __future__ import print_function
__author__ = u'schmatz'
from downloader import Downloader
import tarfile
from errors import DownloadCorruptionError
import warnings
import os
from configuration import Configuration
from dependency import Dependency
import sys
import shutil
class MongoDB(Dependency):
def __ini... | mit |
cdsteinkuehler/MachineKit | lib/python/gladevcp/makepins.py | 12 | 2268 | #!/usr/bin/python2.4
# -*- encoding: utf-8 -*-
# GLADE_VCP
# Copyright 2010 Chris Morley
#
# 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
# ... | lgpl-2.1 |
Yarrick13/hwasp | tests/asp/AllAnswerSets/nontight/example.hamiltonian.7.asp.gringo.test.py | 4 | 1438 | input = """
1 2 2 1 3 4
1 3 2 1 2 4
1 4 0 0
1 5 2 1 6 7
1 6 2 1 5 7
1 7 0 0
1 8 2 1 9 10
1 9 2 1 8 10
1 10 0 0
1 11 2 1 12 13
1 12 2 1 11 13
1 13 0 0
1 14 2 1 15 16
1 15 2 1 14 16
1 16 0 0
1 17 2 1 18 19
1 18 2 1 17 19
1 19 0 0
1 20 2 1 21 22
1 21 2 1 20 22
1 22 0 0
1 23 2 1 24 25
1 24 2 1 23 25
1 25 0 0
1 26 2 1 27 28... | apache-2.0 |
stephane-martin/salt-debian-packaging | salt-2016.3.3/tests/unit/modules/status_test.py | 2 | 3076 | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Libs
from salt.modules import status
from salt.exceptions import CommandExecutionError
# Import Salt Testing Libs
from salttesting import TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock ... | apache-2.0 |
andmos/ansible | lib/ansible/modules/network/f5/bigip_monitor_udp.py | 14 | 20573 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
pong3489/TEST_Mission | Lib/encodings/iso8859_4.py | 93 | 13939 | """ Python Character Mapping Codec iso8859_4 generated from 'MAPPINGS/ISO8859/8859-4.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(self,i... | gpl-3.0 |
HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/python/logfile.py | 60 | 9711 | # -*- test-case-name: twisted.test.test_logfile -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A rotating, browsable log file.
"""
# System Imports
import os, glob, time, stat
from twisted.python import threadable
class BaseLogFile:
"""
The base class for a log file that ... | gpl-3.0 |
lz1988/company-site | django/utils/http.py | 27 | 8316 | from __future__ import unicode_literals
import calendar
import datetime
import re
import sys
try:
from urllib import parse as urllib_parse
except ImportError: # Python 2
import urllib as urllib_parse
import urlparse
urllib_parse.urlparse = urlparse.urlparse
from email.utils import formatdate
fro... | bsd-3-clause |
ericholscher/django | tests/model_forms/models.py | 1 | 9652 | """
XX. Generating HTML forms from models
This is mostly just a reworking of the ``form_for_model``/``form_for_instance``
tests to use ``ModelForm``. As such, the text may not make sense in all cases,
and the examples are probably a poor fit for the ``ModelForm`` syntax. In other
words, most of these tests should be r... | bsd-3-clause |
mrahnis/orangery | orangery/cli/segment.py | 1 | 2695 | import sys
import logging
import time
import json
import click
import pandas as pnd
import matplotlib.pyplot as plt
import orangery as o
@click.command(options_metavar='<options>')
@click.argument('areas_f', nargs=1, type=click.Path(exists=True), metavar='<areas_file>')
@click.argument('materials_f', nargs=1, type=... | bsd-3-clause |
morissette/devopsdays-hackathon-2016 | venv/lib/python2.7/site-packages/werkzeug/useragents.py | 257 | 5418 | # -*- 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) 2014 by the Werkzeug Team, see AUTHORS for more deta... | gpl-3.0 |
golismero/golismero | golismero/api/data/vulnerability/ssl/obsolete_protocol.py | 8 | 2487 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__license__= """
GoLismero 2.0 - The web knife - Copyright (C) 2011-2014
Golismero project site: https://github.com/golismero
Golismero project mail: contact@golismero-project.com
This program is free software; you can redistribute it and/or
modify it under the terms of ... | gpl-2.0 |
sdague/home-assistant | tests/components/hvv_departures/test_config_flow.py | 6 | 12742 | """Test the HVV Departures config flow."""
import json
from pygti.exceptions import CannotConnect, InvalidAuth
from homeassistant import data_entry_flow
from homeassistant.components.hvv_departures.const import (
CONF_FILTER,
CONF_REAL_TIME,
CONF_STATION,
DOMAIN,
)
from homeassistant.config_entries im... | apache-2.0 |
agnisparsha/aws-addsg-ec2 | add_sg.py | 1 | 1656 | #!/usr/bin/python
__author__ = 'agnisparsha'
import requests
from boto.ec2.connection import EC2Connection
AWS_ACCESS_KEY_ID = '<access_key_id>'
AWS_SECRET_ACCESS_KEY = '<access_secret_key>'
AWS_REGION = '<eg,. us-east-1c>'
def get_my_ip():
request = requests.get(r'http://jsonip.com')
ip = request.json()['ip']
... | mit |
blueboxgroup/neutron | neutron/tests/unit/ibm/test_sdnve_api.py | 33 | 5707 | # Copyright 2014 IBM Corp.
#
# 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 a... | apache-2.0 |
Evervolv/android_external_chromium_org | tools/android/remove_strings.py | 183 | 1426 | #!/usr/bin/python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Remove strings by name from a GRD file."""
import optparse
import re
import sys
def RemoveStrings(grd_path, string_names):
"""R... | bsd-3-clause |
kemalakyol48/python-for-android | python-modules/twisted/twisted/conch/test/test_default.py | 60 | 6384 | # Copyright (c) 2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.conch.client.default}.
"""
try:
import Crypto.Cipher.DES3
import pyasn1
except ImportError:
skip = "PyCrypto and PyASN1 required for twisted.conch.client.default."
else:
from twisted.conch.client.agent ... | apache-2.0 |
factorlibre/carrier-delivery | delivery_carrier_label_fedex/models/stock.py | 1 | 11695 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 FactorLibre (http://www.factorlibre.com)
# Hugo Santos <hugo.santos@factorlibre.com>
#
# This program is free software: you can redistribute it and/o... | agpl-3.0 |
AICP/external_chromium_org | build/android/gyp/jar_toc.py | 10 | 3101 | #!/usr/bin/env python
#
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Creates a TOC file from a Java jar.
The TOC file contains the non-package API of the jar. This includes all
public/protected/pack... | bsd-3-clause |
gtko/CouchPotatoServer | libs/pytwitter/__init__.py | 104 | 175429 | #!/usr/bin/env python
#
# vim: sw=2 ts=2 sts=2
#
# Copyright 2007 The Python-Twitter Developers
#
# 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/LICE... | gpl-3.0 |
TOC-Shard/moul-scripts | Python/tldnEmgrPhase0.py | 6 | 5064 | # -*- coding: utf-8 -*-
""" *==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, 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... | gpl-3.0 |
johanvdw/rasterio | rasterio/rio/bands.py | 1 | 4139 | import logging
import click
from cligj import files_inout_arg, format_opt
from .helpers import resolve_inout
from . import options
import rasterio
from rasterio.five import zip_longest
PHOTOMETRIC_CHOICES = [val.lower() for val in [
'MINISBLACK',
'MINISWHITE',
'RGB',
'CMYK',
'YCBCR',
'CIELAB... | bsd-3-clause |
simongoffin/my_odoo_tutorial | addons/l10n_ae/__openerp__.py | 337 | 1579 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the te... | agpl-3.0 |
legalsylvain/OpenUpgrade | addons/account/wizard/account_fiscalyear_close.py | 38 | 15050 | # -*- 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 |
The-Compiler/pytest | src/_pytest/warnings.py | 12 | 4496 | import sys
import warnings
from contextlib import contextmanager
from typing import Generator
from typing import Optional
import pytest
from _pytest.compat import TYPE_CHECKING
from _pytest.config import apply_warning_filters
from _pytest.config import Config
from _pytest.config import parse_warning_filter
from _pytes... | mit |
unho/pootle | tests/models/directory.py | 5 | 1789 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
import pytest
from django.core.exceptions i... | gpl-3.0 |
2014cdbg7/2014cdbg7 | wsgi/static/Brython2.1.0-20140419-113919/Lib/io.py | 58 | 9385 | import builtins
open = builtins.open
# for seek()
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
r"""File-like objects that read from or write to a string buffer.
This implements (nearly) all stdio methods.
f = StringIO() # ready for writing
f = StringIO(buf) # ready for reading
f.close() # explicitly rel... | gpl-2.0 |
saurabh6790/test-med-lib | webnotes/model/workflow.py | 34 | 1073 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
def get_workflow_name(doctype):
if getattr(webnotes.local, "workflow_names", None) is None:
webnotes.local.workflow_names = {}
if doctype not in webnotes... | mit |
savoirfairelinux/odoo | addons/l10n_fr/__init__.py | 424 | 1447 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 |
jpshort/odoo | openerp/addons/base/res/res_company.py | 138 | 21310 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
Brickstertwo/git-commands | tests/functional/test_upstream.py | 1 | 8926 | import os
import shutil
import subprocess
import tempfile
import unittest
import git
import testutils
class TestGitUpstream(unittest.TestCase):
def _output(self, command):
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return proc.communicate()[0].strip()
... | mit |
TeachAtTUM/edx-platform | cms/djangoapps/contentstore/tests/test_contentstore.py | 2 | 96426 | # -*- coding: utf-8 -*-
from __future__ import print_function
import copy
import shutil
from datetime import timedelta
from functools import wraps
from json import loads
from textwrap import dedent
from unittest import SkipTest
from uuid import uuid4
import ddt
import django
import lxml.html
import mock
from django.... | agpl-3.0 |
Aasmi/scikit-learn | sklearn/decomposition/tests/test_nmf.py | 32 | 6044 | import numpy as np
from scipy import linalg
from sklearn.decomposition import nmf
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import raises
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_gr... | bsd-3-clause |
kishorvpatil/incubator-storm | storm-client/src/py/storm/Nimbus.py | 2 | 370569 | #!/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
# "... | apache-2.0 |
matthewbauer/wesnoth | data/tools/unit_tree/overview.py | 20 | 6049 | #!/usr/bin/env python
import glob, os, sys, time, re
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import html_output
def write_addon_overview(folder, addon):
out = open(os.path.join(folder, "index.html"), "wb")
def w(x): out.write(x.encode("utf8") + "\n")
name = addon["name"]
pa... | gpl-2.0 |
pombredanne/pants | contrib/android/src/python/pants/contrib/android/tasks/aapt_gen.py | 4 | 8374 | # coding=utf-8
# Copyright 2014 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 logging
impor... | apache-2.0 |
RongxinZhang/bitcoinxt | qa/rpc-tests/bipdersig-p2p.py | 20 | 6588 | #!/usr/bin/env python2
#
# Distributed under the MIT/X11 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 test_framework.mininode import CTransaction, N... | mit |
corvorepack/REPOIVAN | plugin.video.movie.ultra.7k/resources/regex/shidurlive.py | 2 | 3960 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# Movie Ultra 7K Regex de Shidurlive
# Version 0.1 (15.10.2014)
#------------------------------------------------------------
# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
# Gracias a la librería plugintools de Jesús (www.... | gpl-2.0 |
scrollback/kuma | vendor/packages/logilab-common/test/unittest_changelog.py | 6 | 1354 | # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | mpl-2.0 |
bigswitch/nova | nova/conductor/tasks/migrate.py | 1 | 3844 | # 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
# d... | apache-2.0 |
idovear/odoo | addons/base_iban/base_iban.py | 278 | 8657 | # -*- 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 |
poondog/kangaroo-m7-mkII | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
eruffaldi/python-docx | docx/oxml/shared.py | 17 | 1623 | # encoding: utf-8
"""
Objects shared by modules in the docx.oxml subpackage.
"""
from __future__ import absolute_import
from . import OxmlElement
from .ns import qn
from .simpletypes import ST_DecimalNumber, ST_OnOff, ST_String
from .xmlchemy import BaseOxmlElement, OptionalAttribute, RequiredAttribute
class CT_De... | mit |
DavidTingley/ephys-processing-pipeline | installation/klustaviewa-0.3.0/build/lib.linux-x86_64-2.7/kwiklib/dataio/tests/test_kwik.py | 2 | 14009 | """HDF5 tools tests."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import os
import tempfile
import numpy as np
import tables as tb
from nose import with_setup
from kwiklib.utils... | gpl-3.0 |
sloanyang/gyp | test/mac/gyptest-app-error.py | 164 | 1172 | #!/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 invalid strings files cause the build to fail.
"""
import TestCmd
import TestGyp
import sys
if sys.platform == 'darwin'... | bsd-3-clause |
mchristopher/PokemonGo-DesktopMap | app/pylibs/osx64/gevent/monkey.py | 5 | 24241 | # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.
# pylint: disable=redefined-outer-name
"""
Make the standard library cooperative.
Patching
========
The primary purpose of this module is to carefully patch, in place,
portions of the standard library with gevent-friendly functions that
behave in the s... | mit |
kwlzn/pex | pex/link.py | 1 | 4085 | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import
import os
import posixpath
from collections import Iterable
from .compatibility import PY3, WINDOWS, pathname2url
from .compatibility import string... | apache-2.0 |
ChromiumWebApps/chromium | build/android/buildbot/bb_run_bot.py | 1 | 10537 | #!/usr/bin/env python
#
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import copy
import json
import os
import pipes
import re
import subprocess
import sys
import bb_utils
sys.pa... | bsd-3-clause |
40223123/raven | static/Brython3.1.0-20150301-090019/Lib/socket.py | 730 | 14913 | # Wrapper module for _socket, providing some additional facilities
# implemented in Python.
"""\
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available a... | gpl-3.0 |
hyperized/ansible | lib/ansible/modules/network/f5/bigip_asm_dos_application.py | 2 | 44296 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2019, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
eonpatapon/nova | nova/api/openstack/compute/plugins/v3/server_password.py | 36 | 2525 | # Copyright (c) 2012 Nebula, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 |
apark263/tensorflow | tensorflow/python/framework/tensor_shape_div_test.py | 178 | 1495 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
SamYaple/neutron | neutron/plugins/ml2/drivers/brocade/db/models.py | 63 | 4420 | # Copyright 2014 Brocade Communications System, 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
#
#... | apache-2.0 |
martonw/phantomjs | src/qt/qtwebkit/Source/ThirdParty/gtest/test/run_tests_util_test.py | 233 | 23693 | #!/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... | bsd-3-clause |
lancezlin/ml_template_py | lib/python2.7/site-packages/pygments/styles/vs.py | 50 | 1073 | # -*- coding: utf-8 -*-
"""
pygments.styles.vs
~~~~~~~~~~~~~~~~~~
Simple style with MS Visual Studio colors.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Co... | mit |
gacarrillor/QGIS | python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py | 30 | 12901 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : TopoViewer plugin for DB Manager
Description : Create a project to display topology schema on Qgis
Date : Sep 23, 2011
copyright : (C) 2011 by Giuseppe Suc... | gpl-2.0 |
gregbanks/suds | suds/bindings/document.py | 204 | 5792 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | lgpl-3.0 |
jrior001/android_kernel_samsung_d2 | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# 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.
#
# This program i... | gpl-2.0 |
whatsthehubbub/playpilots | ebi/stereoscoop/views.py | 1 | 4573 | from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponseBadRequest
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext, Template
from django.template.loader import get_template, render_to_string
from stereoscoop.models import Stereosc... | mit |
abstract-open-solutions/OCB | addons/auth_signup/controllers/main.py | 165 | 6011 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-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 |
bemineni/eldam | docs/conf.py | 1 | 4905 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# eldam documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 22 23:22:44 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... | mit |
teamfx/openjfx-8u-dev-rt | modules/web/src/main/native/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | 1 | 7937 | #!/usr/bin/env python
#
# Copyright (c) 2014-2016 Apple Inc. All rights reserved.
# Copyright (c) 2014 University of Washington. 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. Redistribution... | gpl-2.0 |
tomkralidis/QGIS | tests/src/python/test_qgsalignmentcombobox.py | 18 | 2010 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsAlignmentComboBox
From build dir, run: ctest -R PyQgsAlignmentComboBox -V
.. note:: 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... | gpl-2.0 |
pombredanne/mitmproxy | examples/tls_passthrough.py | 15 | 4470 | """
This inline script allows conditional TLS Interception based
on a user-defined strategy.
Example:
> mitmdump -s tls_passthrough.py
1. curl --proxy http://localhost:8080 https://example.com --insecure
// works - we'll also see the contents in mitmproxy
2. curl --proxy http://localhost:8080 https:... | mit |
switchboardOp/ansible | lib/ansible/modules/cloud/linode/linode.py | 7 | 26096 | #!/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 |
Sodki/ansible-modules-extras | network/citrix/netscaler.py | 143 | 5056 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage Citrix NetScaler entities
(c) 2013, Nandor Sivok <nandor@gawker.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 Softwa... | gpl-3.0 |
druuu/django | tests/template_tests/filter_tests/test_length_is.py | 360 | 3204 | from django.template.defaultfilters import length_is
from django.test import SimpleTestCase
from ..utils import setup
class LengthIsTests(SimpleTestCase):
@setup({'length_is01': '{% if some_list|length_is:"4" %}Four{% endif %}'})
def test_length_is01(self):
output = self.engine.render_to_string('len... | bsd-3-clause |
runekaagaard/django-contrib-locking | django/contrib/auth/management/commands/changepassword.py | 222 | 2100 | from __future__ import unicode_literals
import getpass
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS
from django.utils.encoding import force_str
class Command(BaseCommand):
help = "Change a user's password ... | bsd-3-clause |
OhRly-net/ohrlycoin | share/qt/extract_strings_qt.py | 2945 | 1844 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format produced by x... | mit |
arbrandes/edx-platform | lms/djangoapps/teams/serializers.py | 4 | 8054 | """
Defines serializers used by the Team API.
"""
from copy import deepcopy
from django.conf import settings
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django_countries import countries
from rest_framework import serializers
from lms.djangoapps.teams.api imp... | agpl-3.0 |
nkantar/Starminder | starminder/main/views.py | 1 | 1457 | from datetime import time
from django.contrib.auth.decorators import login_required
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.views.generic import FormView, TemplateView
from starminder.main.forms import ProfileForm
class HomeView(TemplateView):
templa... | bsd-3-clause |
larsbs/nftablui | nftserver/app/validators/chain_validator.py | 1 | 1311 | from utils.nft_errors import NFTValidationError, abort
from wrappers import table_wrapper, chain_wrapper
def validate_new_chain(chain_json):
chain = chain_json['chain']
validation_error = NFTValidationError('chain')
# JSON errors
if not chain:
raise abort(400, 'No "chain" field in chain json')... | mit |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/site-packages/urllib3/contrib/ntlmpool.py | 312 | 4478 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
from logging import getLogger
from ntlm import ntlm
from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client import HTTPSConnecti... | gpl-3.0 |
open-synergy/website | website_event_register_free_with_sale/__openerp__.py | 5 | 1591 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
#
# This program is free software: you can redistribute it a... | agpl-3.0 |
linjoahow/lego_Automatic-assembly | static/Brython3.1.1-20150328-091302/Lib/browser/indexed_db.py | 632 | 3008 | class EventListener:
def __init__(self, events=[]):
self._events=events
def append(self, event):
self._events.append(event)
def fire(self, e):
for _event in self._events:
_event(e)
class IndexedDB:
def __init__(self):
if not __BRYTHON__.has_indexedDB:
raise NotImple... | gpl-3.0 |
shubhdev/edx-platform | cms/djangoapps/contentstore/views/tests/test_certificates.py | 17 | 19874 | #-*- coding: utf-8 -*-
"""
Group Configuration Tests.
"""
import json
import mock
from django.conf import settings
from django.test.utils import override_settings
from opaque_keys.edx.keys import AssetKey
from opaque_keys.edx.locations import AssetLocation
from contentstore.utils import reverse_course_url
from cont... | agpl-3.0 |
eerwitt/tensorflow | tensorflow/contrib/distributions/python/ops/bijectors/bijector_test_util.py | 27 | 7584 | # 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 |
miguelpalacio/python-for-android | python-build/python-libs/gdata/src/gdata/tlslite/TLSConnection.py | 278 | 70347 | """
MAIN CLASS FOR TLS LITE (START HERE!).
"""
from __future__ import generators
import socket
from utils.compat import formatExceptionTrace
from TLSRecordLayer import TLSRecordLayer
from Session import Session
from constants import *
from utils.cryptomath import getRandomBytes
from errors import *
from messages impor... | apache-2.0 |
turbokongen/home-assistant | homeassistant/components/motion_blinds/sensor.py | 2 | 6631 | """Support for Motion Blinds sensors."""
from motionblinds import BlindType
from homeassistant.const import (
DEVICE_CLASS_BATTERY,
DEVICE_CLASS_SIGNAL_STRENGTH,
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
)
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.update_coordinat... | apache-2.0 |
sobercoder/gem5 | src/arch/x86/isa/insts/general_purpose/rotate_and_shift/__init__.py | 91 | 2283 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
zanph/zanph | flaskroulette/venv/lib/python2.7/site-packages/requests/packages/urllib3/packages/ordered_dict.py | 2040 | 8935 | # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/
try:
from thread import get_ident as _get_iden... | mit |
iulian787/spack | lib/spack/spack/cmd/pkg.py | 5 | 6418 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from __future__ import print_function
import os
import re
import llnl.util.tty as tty
from llnl.util.tty.colify import c... | lgpl-2.1 |
vallsv/pyqtgraph | examples/crosshair.py | 24 | 2649 | """
Demonstrates some customized mouse interaction by drawing a crosshair that follows
the mouse.
"""
import initExample ## Add path to library (just for examples; you do not need this)
import numpy as np
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.Point import Point
#generate layo... | mit |
SchoolIdolTomodachi/SchoolIdolAPI | api/migrations/0069_verificationrequest.py | 4 | 1304 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('api', '0068_auto_20150914_1909'),
]
... | apache-2.0 |
epam/DLab | infrastructure-provisioning/src/dataengine-service/fabfile.py | 1 | 4232 | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM SYSTEMS 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
#
#... | apache-2.0 |
stadt-karlsruhe/ckanext-extractor | ckanext/extractor/tests/logic/test_action.py | 1 | 13849 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2016-2018 Stadt Karlsruhe (www.karlsruhe.de)
#
# This program 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 Licen... | agpl-3.0 |
clchiou/garage | shipyard2/shipyard2/rules/xars.py | 1 | 5976 | """Helpers for writing rules under //xars."""
__all__ = [
'define_xar',
'define_zipapp',
]
import dataclasses
import logging
from pathlib import Path
import foreman
from g1 import scripts
from g1.bases.assertions import ASSERT
from g1.containers import models as ctr_models
from g1.operations.cores import mo... | mit |
jasonseminara/OpenSourceFinal | lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/escprober.py | 2936 | 3187 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... | mit |
xavierwu/scikit-learn | examples/applications/plot_species_distribution_modeling.py | 254 | 7434 | """
=============================
Species distribution modeling
=============================
Modeling species' geographic distributions is an important
problem in conservation biology. In this example we
model the geographic distribution of two south american
mammals given past observations and 14 environmental
varia... | bsd-3-clause |
physycom/QGIS | tests/src/python/test_qgscheckablecombobox.py | 45 | 1824 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsCheckableComboBox
.. note:: 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.
"... | gpl-2.0 |
wangtuanjie/airflow | airflow/example_dags/example_python_operator.py | 25 | 1190 | from __future__ import print_function
from builtins import range
from airflow.operators import PythonOperator
from airflow.models import DAG
from datetime import datetime, timedelta
import time
from pprint import pprint
seven_days_ago = datetime.combine(datetime.today() - timedelta(7),
... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.