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 |
|---|---|---|---|---|---|
lipixun/pytest | rabbitmq/publishconfirm/client.py | 1 | 2881 | #!/usr/bin/env python
# encoding=utf8
# The publish confirm test client
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import gevent
from gevent import monkey
monkey.patch_all()
from haigha.connections.rabbit_connection import RabbitConnection
from haigha.message import Message
class Client(object):
"""T... | gpl-2.0 |
greencoder/mybitly | Test Server/libraries/jinja2/bccache.py | 346 | 12793 | # -*- coding: utf-8 -*-
"""
jinja2.bccache
~~~~~~~~~~~~~~
This module implements the bytecode cache system Jinja is optionally
using. This is useful if you have very complex template situations and
the compiliation of all those templates slow down your application too
much.
Situations whe... | mit |
dataxu/ansible | lib/ansible/modules/windows/win_iis_virtualdirectory.py | 47 | 2485 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# 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 t... | gpl-3.0 |
Drooids/odoo | doc/_extensions/odoo/__init__.py | 89 | 4588 | # -*- coding: utf-8 -*-
from . import pygments_override
from . import switcher
from . import translator
import sphinx.environment
import sphinx.builders.html
from docutils import nodes
def setup(app):
app.set_translator('html', translator.BootstrapTranslator)
switcher.setup(app)
app.add_config_value('odo... | agpl-3.0 |
simontakite/sysadmin | pythonscripts/learningPython/Gui/Tools/widgets.py | 2 | 1326 | """
wrap up widget construction in functions for easier use, making some
assumptions (e.g., expansion); use extras kw args for width, font/color
"""
from tkinter import *
def frame(root, side=TOP, **extras):
widget = Frame(root)
widget.pack(side=side, expand=YES, fill=BOTH)
if extras: widg... | gpl-2.0 |
cruzegoodin/TSC-ShippingDetails | flask/lib/python2.7/site-packages/coverage/html.py | 159 | 13097 | """HTML reporting for Coverage."""
import os, re, shutil, sys
import coverage
from coverage.backward import pickle
from coverage.misc import CoverageException, Hasher
from coverage.phystokens import source_token_lines, source_encoding
from coverage.report import Reporter
from coverage.results import Numbers
from cove... | bsd-3-clause |
tectronics/mythbox | resources/lib/twisted/twisted/test/test_persisted.py | 60 | 8648 |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
# System Imports
import sys
from twisted.trial import unittest
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import cStringIO as StringIO
except ImportError:
import StringIO
# Twisted Imports
... | gpl-2.0 |
SSCPS/bip-gam-v1 | bip_import.py | 2 | 6309 | #! /usr/bin/env python
#################################################################################################
#
# Script Name: bip_import.py
# Script Usage: This script is for loading data from /input/*.csv to the database. Do not use
# it manually unless you are comfortable with the c... | gpl-3.0 |
farseerfc/jgments | lib/pygments-1.2.2-patched/pygments/styles/friendly.py | 75 | 2515 | # -*- coding: utf-8 -*-
"""
pygments.styles.friendly
~~~~~~~~~~~~~~~~~~~~~~~~
A modern style based on the VIM pyte theme.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyw... | bsd-2-clause |
fafaman/django | django/contrib/gis/forms/widgets.py | 422 | 3659 | from __future__ import unicode_literals
import logging
from django.conf import settings
from django.contrib.gis import gdal
from django.contrib.gis.geos import GEOSException, GEOSGeometry
from django.forms.widgets import Widget
from django.template import loader
from django.utils import six, translation
logger = log... | bsd-3-clause |
ameerbadri/amazon-alexa-twilio-customer-service | Lambda Function/wheel/bdist_wheel.py | 17 | 17101 | """
Create a wheel (.whl) distribution.
A wheel is a built archive format.
"""
import csv
import hashlib
import os
import subprocess
import warnings
import shutil
import json
import wheel
try:
import sysconfig
except ImportError: # pragma nocover
# Python < 2.7
import distutils.sysconfig as sysconfig
i... | mit |
hyakuhei/cleantox | hacking/tests/test_doctest.py | 1 | 3232 | #!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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
#
# Unle... | apache-2.0 |
cournape/Bento | bento/parser/tests/functionals/data_jinja2.py | 2 | 14092 | ref = {'author': 'Armin Ronacher',
'author_email': 'armin.ronacher@active-4.com',
'classifiers': ['Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
... | bsd-3-clause |
rmed/zoe-sysinfo | agents/sysinfo/sysinfo.py | 1 | 12303 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Zoe Sysinfo - https://github.com/rmed/zoe-sysinfo
#
# Copyright (c) 2015 Rafael Medina García <rafamedgar@gmail.com>
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentati... | mit |
timthelion/FreeCAD | src/Mod/Test/TestGui.py | 4 | 8216 | # FreeCAD Part module
# (c) 2001 Juergen Riegel
#
# Part design module
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *
#* *
#* Th... | lgpl-2.1 |
sgenoud/scikit-learn | sklearn/tests/test_base.py | 4 | 3825 |
# Author: Gael Varoquaux
# License: BSD
import numpy as np
import scipy.sparse as sp
from numpy.testing import assert_array_equal
from nose.tools import assert_true
from nose.tools import assert_false
from nose.tools import assert_equal
from nose.tools import assert_raises
from sklearn.base import BaseEstimator, clo... | bsd-3-clause |
futurice/django-jsonmodel | test/test_human.py | 1 | 1642 | from django.test import TestCase
from django.core.urlresolvers import reverse
from djangojsonmodel.convert import jsmodels
from djangojsonmodel.contrib.human.mappings import shortnames
from djangojsonmodel.contrib.human.urls import drf
from .urls import urlpatterns
from .urls_api import router
from pprint import ppr... | mit |
gkunter/coquery | coquery/gui/ui/findWidgetUi.py | 1 | 2751 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'findWidget.ui'
#
# Created by: PyQt5 UI code generator 5.7.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_FindWidget(object):
def setupUi(self, FindWidget):
FindWi... | gpl-3.0 |
linktlh/Toontown-journey | toontown/coghq/DistributedLaserFieldAI.py | 3 | 7652 | import random
from direct.directnotify import DirectNotifyGlobal
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import ClockDelta
from direct.interval.IntervalGlobal import *
from direct.task import Task
from otp.ai.AIBase import *
from otp.level import BasicEntities
from otp.level import D... | apache-2.0 |
tomfotherby/ansible-modules-core | packaging/os/apt_key.py | 131 | 9713 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>
#
# 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
#... | gpl-3.0 |
wawtechnologies/linux-kernel-3.14.51-catchwire-kalitap | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
Arkeon-net/bandung | static/admin/components/elfinder/connectors/python/connector.py | 74 | 2687 | #!/usr/bin/env python
import cgi
try:
import json
except ImportError:
import simplejson as json
import elFinder
# configure connector options
opts = {
#'root': '/home/troex/Sites/git/elfinder/files',
'root': '../git/elfinder/files/',
'URL': 'http://localhost:8001/~troex/git/elfinder/files',
## other options
'... | apache-2.0 |
zaxlct/python-django-learning | SendMail/通过SSL发送邮件.py | 1 | 1172 | # coding:utf-8
#!/usr/bin/env python
import smtplib,datetime,sys
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
username = sys.argv[1]
passwd = sys.argv[2]
_user = "oa@eycode.com"
_pwd = "密码"
_to_list = ["%s@eycode.com"%userna... | mit |
pedrobaeza/OpenUpgrade | addons/mail/res_partner.py | 379 | 2454 | # -*- 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 |
haidlir/drox | lib.py | 1 | 4946 | # The MIT License (MIT)
# Copyright (c) 2015 haidlir
# 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, mer... | mit |
gangadhar-kadam/verve_test_erp | erpnext/stock/report/stock_projected_qty/stock_projected_qty.py | 46 | 2175 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns = get_columns()
data = frappe.db.sql("""select
item.name, item.item_name... | agpl-3.0 |
vrenaville/OCB | addons/website_mail/tests/__init__.py | 121 | 1117 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
asi1024/ContestLibrary | scripts/diff.py | 2 | 1914 | #!/usr/bin/env python
import argparse
from pathlib import Path
import typing
checker_type = typing.Callable[[str, str], None]
def is_float(s: str) -> bool:
if s.lower().endswith('inf') or s.lower().endswith('nan'):
return False
try:
float(s)
except ValueError:
return False
r... | mit |
daaoling/KBEngine-LearnNote | kbengine_demos_assets/scripts/cell/skills/base/SkillInitiative.py | 5 | 2818 | # -*- coding: utf-8 -*-
import KBEngine
import random
import GlobalConst
from KBEDebug import *
from skillbases.SObject import SObject
from skillbases.SCObject import SCObject
class SkillInitiative(SObject):
def __init__(self):
SObject.__init__(self)
def loadFromDict(self, dictDatas):
"""
virtual method.
... | gpl-2.0 |
dayatz/taiga-back | tests/integration/test_totals_projects.py | 1 | 5868 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Anler Hernández <hello@anler.me>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alon... | agpl-3.0 |
devendermishrajio/nova_test_latest | nova/tests/functional/v3/api_sample_base.py | 14 | 4574 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 |
jusdng/odoo | addons/document/std_index.py | 430 | 7457 | # -*- 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 |
Yannig/ansible | lib/ansible/modules/storage/infinidat/infini_host.py | 29 | 3823 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '... | gpl-3.0 |
wnoc-drexel/gem5-stable | src/cpu/simple/BaseSimpleCPU.py | 21 | 2318 | # Copyright (c) 2008 The Hewlett-Packard Development Company
# 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 |
syed/PerfKitBenchmarker | perfkitbenchmarker/packages/faban.py | 2 | 3450 | # Copyright 2015 PerfKitBenchmarker 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 appli... | apache-2.0 |
ykaneko/quantum | quantum/db/migration/cli.py | 3 | 4203 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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/li... | apache-2.0 |
gaddman/ansible | lib/ansible/modules/cloud/openstack/os_coe_cluster_template.py | 27 | 12590 | #!/usr/bin/python
# Copyright (c) 2018 Catalyst IT Ltd.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['pr... | gpl-3.0 |
AfonsoFGarcia/swift | test/probe/test_reconstructor_durable.py | 9 | 5423 | #!/usr/bin/python -u
# Copyright (c) 2010-2012 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 ap... | apache-2.0 |
boundary/boundary-api-cli | tests/unit/boundary/hostgroup_list_test.py | 4 | 1395 | #!/usr/bin/env python
#
# Copyright 2015 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 |
gencer/sentry | tests/sentry/web/frontend/test_restore_organization.py | 2 | 2701 | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import Organization, OrganizationStatus
from sentry.testutils import TestCase, PermissionTestCase
class RestoreOrganizationPermissionTest(PermissionTestCase):
def setUp(self):
super(RestoreOrganization... | bsd-3-clause |
onceuponatimeforever/oh-mainline | vendor/packages/Django/tests/regressiontests/comment_tests/tests/comment_utils_moderators_tests.py | 92 | 3092 | from __future__ import absolute_import
from django.contrib.comments.models import Comment
from django.contrib.comments.moderation import (moderator, CommentModerator,
AlreadyModerated)
from django.core import mail
from . import CommentTestCase
from ..models import Entry
class EntryModerator1(CommentModerator):
... | agpl-3.0 |
xujun10110/golismero | thirdparty_libs/django/views/decorators/http.py | 228 | 7105 | """
Decorators for views based on HTTP headers.
"""
import logging
from calendar import timegm
from functools import wraps
from django.utils.decorators import decorator_from_middleware, available_attrs
from django.utils.http import http_date, parse_http_date_safe, parse_etags, quote_etag
from django.middleware.http i... | gpl-2.0 |
peiyuwang/pants | examples/src/python/example/pants_publish_plugin/extra_test_jar_example.py | 16 | 3347 | # 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 os
from pant... | apache-2.0 |
chinmaygarde/mojo | build/android/gyp/java_cpp_enum_tests.py | 44 | 15063 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for enum_preprocess.py.
This test suite containss various tests for the C++ -> Java enum generator.
"""
import collections
i... | bsd-3-clause |
WeblateOrg/weblate | weblate/lang/admin.py | 2 | 1965 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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 Lice... | gpl-3.0 |
theicfire/djangofun | django/core/serializers/pyyaml.py | 204 | 1948 | """
YAML serializer.
Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__.
"""
from StringIO import StringIO
import decimal
import yaml
from django.db import models
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as... | bsd-3-clause |
davidsims9t/itis-graphql | venv/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py | 354 | 3406 | """A collection of modules for building different kinds of tree from
HTML documents.
To create a treebuilder for a new type of tree, you need to do
implement several things:
1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders... | gpl-3.0 |
benschmaus/catapult | third_party/google-endpoints/packaging/markers.py | 139 | 8185 | # 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
import operator
import os
import platform
import sys
from pyparsing impor... | bsd-3-clause |
emiliojsf/sogo | Tests/Integration/all.py | 6 | 2186 | #!/usr/bin/python
import os, sys, unittest, getopt, traceback, time
import preferences
import sogotests
import unittest
if __name__ == "__main__":
unittest._TextTestResult.oldStartTest = unittest._TextTestResult.startTest
unittest._TextTestResult.startTest = sogotests.UnitTestTextTestResultNewStartTest
un... | gpl-2.0 |
zachmullen/boto | boto/ec2/connection.py | 26 | 178761 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files ... | mit |
tiagofrepereira2012/tensorflow | tensorflow/contrib/timeseries/python/timeseries/state_space_models/varma_test.py | 67 | 3569 | # 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 |
sandeepgupta2k4/tensorflow | tensorflow/contrib/learn/python/learn/estimators/logistic_regressor.py | 50 | 6542 | # 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 |
efortuna/AndroidSDKClone | ndk/prebuilt/linux-x86_64/lib/python2.7/keyword.py | 154 | 1996 | #! /usr/bin/env python
"""Keywords (from "graminit.c")
This file is automatically generated; please don't muck it up!
To update the symbols in this file, 'cd' to the top directory of
the python source tree after building the interpreter and run:
./python Lib/keyword.py
"""
__all__ = ["iskeyword", "kwlist"]
kw... | apache-2.0 |
vlegoff/tsunami | src/primaires/perso/montrer/__init__.py | 1 | 1990 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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
# ... | bsd-3-clause |
un33k/CouchPotatoServer | libs/bs4/builder/__init__.py | 447 | 11151 | from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
whitespace_re
)
__all__ = [
'HTMLTreeBuilder',
'SAXTreeBuilder',
'TreeBuilder',
'TreeBuilderRegistry',
]
# Some useful features for a Tree... | gpl-3.0 |
asajeffrey/servo | tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/tests/test_whitespace_filter.py | 48 | 4787 | from __future__ import absolute_import, division, unicode_literals
from html5lib.filters.whitespace import Filter
from html5lib.constants import spaceCharacters
spaceCharacters = "".join(spaceCharacters)
def runTest(input, expected):
output = list(Filter(input))
errorMsg = "\n".join(["\n\nInput:", str(input)... | mpl-2.0 |
bpshetty/erpnext | erpnext/stock/doctype/item_price/item_price.py | 70 | 1524 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import throw, _
class ItemPriceDuplicateItem(frappe.ValidationError): pass
from frappe.model.document import Document
class... | gpl-3.0 |
domyam97/airlights | slack/venv/lib/python2.7/site-packages/pip/req.py | 32 | 83782 | from email.parser import FeedParser
import os
import imp
import locale
import re
import sys
import shutil
import tempfile
import textwrap
import zipfile
from distutils.util import change_root
from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME,
write_delete... | mit |
cielly/cielly.github.io | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py | 1361 | 45045 | # 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.
r"""Code to validate and convert settings of the Microsoft build tools.
This file contains code to validate and convert settings of the Microsoft
build tools. Th... | mit |
cgqyh/pyalgotrade-mod | testcases/websocket_server.py | 1 | 1284 | import threading
from wsgiref import simple_server
from ws4py.server import wsgirefserver
from ws4py.server import wsgiutils
class WebSocketServerThread(threading.Thread):
def __init__(self, host, port, webSocketServerClass):
super(WebSocketServerThread, self).__init__()
self.__host = host
... | apache-2.0 |
gagoncal/Selenium | setuptools-21.2.2/build/lib/pkg_resources/_vendor/packaging/markers.py | 140 | 7939 | # 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
import operator
import os
import platform
import sys
from pkg_resources.e... | lgpl-2.1 |
hkernbach/arangodb | 3rdParty/V8/v5.7.492.77/tools/gyp/test/mac/gyptest-identical-name.py | 94 | 1547 | #!/usr/bin/env python
# Copyright (c) 2014 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 libraries (in identical-names) are properly handeled by xcode.
The names for all libraries participating in this build are:
li... | apache-2.0 |
noahwilliamsson/micropython | tests/extmod/uctypes_sizeof_native.py | 61 | 1036 | import uctypes
S1 = {}
assert uctypes.sizeof(S1) == 0
S2 = {"a": uctypes.UINT8 | 0}
assert uctypes.sizeof(S2) == 1
S3 = {
"a": uctypes.UINT8 | 0,
"b": uctypes.UINT8 | 1,
}
assert uctypes.sizeof(S3) == 2
S4 = {
"a": uctypes.UINT8 | 0,
"b": uctypes.UINT32 | 4,
"c": uctypes.UINT8 | 8,
}
assert ucty... | mit |
clipo/idss-seriation | seriation/database.py | 1 | 10460 | #!/usr/bin/env python
# Copyright (c) 2015. Mark E. Madsen <mark@madsenlab.org>
#
# This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details.
"""
Description here
"""
from mongoengine import *
from seriation import idss_version
import datetime
import loggi... | apache-2.0 |
Club-Seiden/python-for-IBM-i-examples | non-wheel/netstat/netstat.py | 4 | 2475 | #!/QOpenSys/usr/bin/python3
import argparse
# To install necessary prerequisites:
# - Make sure you have installed 5733OPS PTF SI59051, SI60563, and SI61963 (or subsequent PTF's)!
# See https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/Python%20PTFs
# - pip3 i... | mit |
alangwansui/mtl_ordercenter | openerp/addons/base/res/res_country.py | 46 | 4208 | # -*- 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... | agpl-3.0 |
willhardy/django | tests/auth_tests/test_views.py | 15 | 44548 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import itertools
import os
import re
from importlib import import_module
from django.apps import apps
from django.conf import settings
from django.contrib.admin.models import LogEntry
from django.contrib.auth import REDIRECT_FIELD_NAME, S... | bsd-3-clause |
yogendersolanki91/winfsp | tools/gensrc/ntstatus.py | 2 | 3934 | #!/usr/bin/python
import sys
pairs = []
for line in sys.stdin:
pairs.extend(line.strip().split())
pairs = zip(pairs[::2], pairs[1::2])
fixed = {
'ERROR_ACCESS_DENIED': 'STATUS_ACCESS_DENIED',
'ERROR_CANNOT_IMPERSONATE': 'STATUS_CANNOT_IMPERSONATE',
'ERROR_CONNECTION_ABORTED': 'STATUS_CONNECTION_ABORT... | gpl-3.0 |
mattiacarpin/opportunistic | .waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Tools/fc_config.py | 266 | 9275 | #! /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 re,shutil,os,sys,string,shlex
from waflib.Configure import conf
from waflib.TaskGen import feature,after_method,before_method
from waflib import Build,Utils
FC_FRAGMENT... | gpl-2.0 |
borosnborea/SwordGO_app | example/kivymap/.buildozer/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.py | 154 | 7938 | from __future__ import absolute_import
import logging
import os
import warnings
from ..exceptions import (
HTTPError,
HTTPWarning,
MaxRetryError,
ProtocolError,
TimeoutError,
SSLError
)
from ..packages.six import BytesIO
from ..request import RequestMethods
from ..response import HTTPResponse
... | gpl-3.0 |
bixbydev/Bixby | google/gdata-2.0.18/build/lib.linux-x86_64-2.7/gdata/tlslite/Checker.py | 359 | 6301 | """Class for post-handshake certificate checking."""
from utils.cryptomath import hashAndBase64
from X509 import X509
from X509CertChain import X509CertChain
from errors import *
class Checker:
"""This class is passed to a handshake function to check the other
party's certificate chain.
If a handshake f... | gpl-3.0 |
163gal/Time-Line | libs/wx/tools/Editra/src/ed_event.py | 6 | 3233 | ###############################################################################
# Name: ed_event.py #
# Purpose: Custom events used by Editra #
# Author: Cody Precord <cprecord@editra.org> #
... | gpl-3.0 |
saukrIppl/seahub | thirdpart/Django-1.8.10-py2.7.egg/django/http/__init__.py | 98 | 1186 | from django.http.cookie import SimpleCookie, parse_cookie
from django.http.request import (HttpRequest, QueryDict,
RawPostDataException, UnreadablePostError, build_request_repr)
from django.http.response import (
HttpResponse, StreamingHttpResponse, FileResponse,
HttpResponseRedirect, HttpResponsePermanentR... | apache-2.0 |
andhit-r/account-financial-tools | account_constraints/model/account_journal.py | 39 | 1354 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 |
coursemdetw/2014c2 | w2/static/Brython2.0.0-20140209-164925/Lib/browser/pydom.py | 49 | 39566 | from browser import doc
tags=['A','ABBR','ACRONYM','ADDRESS','APPLET','B','BDO','BIG','BLOCKQUOTE',
'BUTTON','CAPTION','CENTER','CITE','CODE','DEL','DFN','DIR','DIV','DL',
'EM','FIELDSET','FONT','FORM','FRAMESET','H1','H2','H3','H4','H5','H6',
'I','IFRAME','INS','KBD','LABEL','LEGEND','MAP','MENU','N... | gpl-2.0 |
smalls257/VRvisu | Library/External.LCA_RESTRICTED/Languages/CPython/27/Lib/decimal.py | 34 | 219383 | # Copyright (c) 2004 Python Software Foundation.
# All rights reserved.
# Written by Eric Price <eprice at tjhsst.edu>
# and Facundo Batista <facundo at taniquetil.com.ar>
# and Raymond Hettinger <python at rcn.com>
# and Aahz <aahz at pobox.com>
# and Tim Peters
# This module is currently Py2.3 compatibl... | gpl-3.0 |
couchbase/healthchecker | Cheetah/Templates/_SkeletonPage.py | 15 | 8760 | # $Id: _SkeletonPage.py,v 1.13 2002/10/01 17:52:02 tavis_rudd Exp $
"""A baseclass for the SkeletonPage template
Meta-Data
==========
Author: Tavis Rudd <tavis@damnsimple.com>,
Version: $Revision: 1.13 $
Start Date: 2001/04/05
Last Revision Date: $Date: 2002/10/01 17:52:02 $
"""
__author__ = "Tavis Rudd <tavis@damnsim... | apache-2.0 |
cpyou/odoo | addons/hr/res_users.py | 27 | 3327 | from openerp import api
from openerp.osv import fields, osv
class res_users(osv.Model):
""" Update of res.users class
- add field for the related employee of the user
- if adding groups to an user, check if base.group_user is in it (member of
'Employee'), create an employee form linked to it. ""... | agpl-3.0 |
js850/pele | examples/amber/driverr.py | 7 | 1949 | from pele.amber import amberSystem
import playground.group_rotation.group_rotation as group_rotation
import pele.amber.read_amber as read_amber
import time
# create new amber system
# It turns out that these are the only names that we can use, since we rely on
# countatoms.f90 from AMBGMIN to determine the number o... | gpl-3.0 |
godmar/problemtools | setup.py | 1 | 2718 | #!/usr/bin/env python2
from setuptools import setup, find_packages
from setuptools.command.bdist_egg import bdist_egg as _bdist_egg
import distutils.cmd
from distutils.command.build import build as _build
import os
import subprocess
class BuildSupport(distutils.cmd.Command):
"""A custom command to build the supp... | mit |
zhimin711/nova | nova/tests/unit/virt/vmwareapi/test_vim_util.py | 41 | 1539 | # Copyright (c) 2013 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
jmesteve/openerpseda | openerp/addons_extra/yowsup/Registration/v1/regrequest.py | 4 | 1717 | '''
Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com>
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,
m... | agpl-3.0 |
ppanczyk/ansible | lib/ansible/modules/windows/win_say.py | 47 | 4581 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# 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, eith... | gpl-3.0 |
sbellem/django | 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... | bsd-3-clause |
cs-shadow/phabricator-tools | py/phl/phlgit_fetch__t.py | 4 | 3223 | """Test suite for phlgit_fetch."""
# =============================================================================
# TEST PLAN
# -----------------------------------------------------------------------------
# Here we detail the things we are concerned to test and specify which tests
# ... | apache-2.0 |
ziaa/pelican-plugins | liquid_tags/include_code.py | 47 | 3995 | """
Include Code Tag
----------------
This implements a Liquid-style video tag for Pelican,
based on the octopress video tag [1]_
Syntax
------
{% include_code path/to/code [lang:python] [Title text] %}
The "path to code" is specified relative to the ``code`` subdirectory of
the content directory Optionally, this su... | agpl-3.0 |
tashaxe/Red-DiscordBot | lib/youtube_dl/extractor/playwire.py | 64 | 2408 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
dict_get,
float_or_none,
)
class PlaywireIE(InfoExtractor):
_VALID_URL = r'https?://(?:config|cdn)\.playwire\.com(?:/v2)?/(?P<publisher_id>\d+)/(?:videos/v2|embed|config)/(?P<id>\d+)'
_TESTS = [... | gpl-3.0 |
hydroshare/hydroshare2 | ga_ows/views/wms/base.py | 2 | 23533 | from django.http import HttpResponse
from django.shortcuts import render_to_response
import json
from lxml import etree
try:
import scipy.misc
HAVE_SCIPY = True
except ImportError:
HAVE_SCIPY = False
try:
import cairo
HAVE_CAIRO = True
except ImportError:
HAVE_CAIRO = False
from datetime impo... | bsd-3-clause |
peterlauri/django | django/db/models/options.py | 8 | 34592 | from __future__ import unicode_literals
import copy
import warnings
from bisect import bisect
from collections import OrderedDict, defaultdict
from itertools import chain
from django.apps import apps
from django.conf import settings
from django.core.exceptions import FieldDoesNotExist
from django.db import connection... | bsd-3-clause |
CanonicalLtd/subiquity | setup.py | 1 | 3933 | #!/usr/bin/env python3
# -*- mode: python; -*-
#
# Copyright 2015 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | agpl-3.0 |
vikitripathi/MB-MessApp-API | messApp/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py | 3127 | 1902 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | apache-2.0 |
sam-m888/gprime | gprime/lib/primaryobj.py | 1 | 12459 | #
# gPrime - A web-based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2011 Tim G L Lyons
#
# 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 versio... | gpl-2.0 |
nacl-webkit/chrome_deps | tools/valgrind/browser_wrapper_win.py | 80 | 1636 | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import glob
import os
import re
import sys
import subprocess
# TODO(timurrrr): we may use it on POSIX too to avoid code duplication once we
# support la... | bsd-3-clause |
fo2rist/infra-strike | backend/venv/Lib/site-packages/pip/basecommand.py | 92 | 11429 | """Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import optparse
import warnings
from pip import cmdoptions
from pip.index import PackageFinder
from pip.locations import running_under_virtualenv
from pip.download import PipSession
from pip.excep... | lgpl-3.0 |
aroth-arsoft/arsoft-web-filewatch | arsoft/web/filewatch/wsgi.py | 1 | 1283 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;
"""
WSGI config for arsoft.web.filewatch project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level v... | gpl-3.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py | 1 | 1843 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
mscook/nway-dbify | nway-dbify/parse.py | 1 | 1080 | # Copyright 2013 Mitchell Stanton-Cook Licensed under the
# Educational Community 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.osedu.org/licenses/ECL-2.0
#
# Unless required by appli... | apache-2.0 |
SlimRoms/android_external_chromium_org | build/ios/clean_env.py | 208 | 2258 | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
def Main(argv):
"""This is like 'env -i', but it uses a whitelist of env variables to allow
through to the co... | bsd-3-clause |
mavit/ansible | lib/ansible/modules/cloud/amazon/ec2_customer_gateway_facts.py | 33 | 4706 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'metadata_version': '1.1'}
DOCUMENTATION = '''
---
module: ec2_cus... | gpl-3.0 |
varunr047/homefile | homeassistant/components/cover/__init__.py | 11 | 7465 | """
Support for Cover devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/cover/
"""
import os
import logging
import voluptuous as vol
from homeassistant.config import load_yaml_config_file
from homeassistant.helpers.entity_component import EntityC... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.