repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
jedie/pypyjs-standalone | website/js/pypy.js-0.3.0/lib/modules/pyrepl/console.py | 13 | 2560 | # Copyright 2000-2004 Michael Hudson-Doyle <micahel@gmail.com>
#
# All Rights Reserved
#
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose is hereby granted without fee,
# provided that the above copyright notice appear in all copies and
#... | mit |
DooMLoRD/android_kernel_sony_msm8960t | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
googleads/google-ads-python | google/ads/googleads/v7/services/types/detail_placement_view_service.py | 1 | 1273 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 |
dharmasam9/moose-core | scripts/cmake_sanity_check.py | 1 | 2830 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""cmake_sanity_check.py: Check if Cmake files are ok.
Last modified: Sat Jan 18, 2014 05:01PM
NOTE: Run in this directory only.
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2013, Dilawar Singh and NCBS Bangalore"
__credits__ = ... | gpl-3.0 |
laiqiqi886/kbengine | kbe/res/scripts/common/Lib/abc.py | 106 | 8624 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) according to PEP 3119."""
from _weakrefset import WeakSet
def abstractmethod(funcobj):
"""A decorator indicating abstract methods.
Requires that the metaclass is ABCMeta or de... | lgpl-3.0 |
caphrim007/ansible | lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase_facts.py | 14 | 5925 | #!/usr/bin/python
#
# Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.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': '1.1',
... | gpl-3.0 |
willkg/phil | phil/check.py | 1 | 5531 | ######################################################################
# This file is part of phil.
#
# Copyright (C) 2011, 2012, 2013 Will Kahn-Greene
#
# phil 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, ... | gpl-3.0 |
ocadotechnology/boto | boto/fps/response.py | 153 | 7866 | # Copyright (c) 2012 Andy Davidoff http://www.disruptek.com/
# Copyright (c) 2010 Jason R. Coombs http://www.jaraco.com/
# Copyright (c) 2008 Chris Moyer http://coredumped.org/
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy ... | mit |
dancingdan/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/bijectors/softplus_test.py | 24 | 5768 | # 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 |
SPriyaJain/studybuddy | env/lib/python2.7/site-packages/click/__init__.py | 135 | 2858 | # -*- coding: utf-8 -*-
"""
click
~~~~~
Click is a simple Python module that wraps the stdlib's optparse to make
writing command line scripts fun. Unlike other modules, it's based around
a simple API that does not come with too much magic and is composable.
In case optparse ever gets removed ... | mit |
mrquim/repository.mrquim | script.module.youtube.dl/lib/youtube_dl/extractor/libraryofcongress.py | 44 | 4662 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
float_or_none,
int_or_none,
parse_filesize,
)
class LibraryOfCongressIE(InfoExtractor):
IE_NAME = 'loc'
IE_DESC = 'Library of Congress'
_VALID_URL = r... | gpl-2.0 |
nikste/tensorflow | tensorflow/python/debug/cli/tensor_format.py | 43 | 16359 | # 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 |
jeremiahmarks/sl4a | python/gdata/src/gdata/tlslite/integration/IMAP4_TLS.py | 319 | 5145 | """TLS Lite + imaplib."""
import socket
from imaplib import IMAP4
from gdata.tlslite.TLSConnection import TLSConnection
from gdata.tlslite.integration.ClientHelper import ClientHelper
# IMAP TLS PORT
IMAP4_TLS_PORT = 993
class IMAP4_TLS(IMAP4, ClientHelper):
"""This class extends L{imaplib.IMAP4} with TLS suppor... | apache-2.0 |
ajaali/django | tests/gis_tests/geo3d/models.py | 302 | 1294 | from django.utils.encoding import python_2_unicode_compatible
from ..models import models
@python_2_unicode_compatible
class NamedModel(models.Model):
name = models.CharField(max_length=30)
objects = models.GeoManager()
class Meta:
abstract = True
required_db_features = ['gis_enabled']
... | bsd-3-clause |
x2nie/odoo | openerp/osv/fields.py | 14 | 69520 | # -*- 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 |
zofuthan/edx-platform | cms/djangoapps/contentstore/tests/test_orphan.py | 77 | 4598 | """
Test finding orphans via the view and django config
"""
import json
from contentstore.tests.utils import CourseTestCase
from student.models import CourseEnrollment
from contentstore.utils import reverse_course_url
class TestOrphanBase(CourseTestCase):
"""
Base class for Studio tests that require orphaned ... | agpl-3.0 |
zBMNForks/graphite-web | webapp/tests/test_storage.py | 34 | 1383 | import logging
from graphite.storage import Store
from django.conf import settings
from django.test import TestCase
# Silence logging during tests
LOGGER = logging.getLogger()
# logging.NullHandler is a python 2.7ism
if hasattr(logging, "NullHandler"):
LOGGER.addHandler(logging.NullHandler())
class StorageTes... | apache-2.0 |
gavinandresen/bitcoin-git | qa/rpc-tests/getchaintips.py | 101 | 2205 | #!/usr/bin/env python3
# Copyright (c) 2014-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.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, an... | mit |
CameronLonsdale/sec-tools | python2/lib/python2.7/site-packages/pip/_vendor/html5lib/_tokenizer.py | 385 | 76580 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import unichr as chr
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, hexDigits, EOF
from .c... | mit |
simartin/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/android_webview.py | 1 | 3825 | from .base import require_arg
from .base import get_timeout_multiplier # noqa: F401
from .chrome import executor_kwargs as chrome_executor_kwargs
from .chrome_android import ChromeAndroidBrowserBase
from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401
... | mpl-2.0 |
Integral-Technology-Solutions/ConfigNOW | Lib/dumbdbm.py | 4 | 4248 | """A dumb and slow but simple dbm clone.
For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).
XXX TO DO:
- seems to contain a bug when updating...
- reclaim free space (currently, space once o... | mit |
koobonil/Boss2D | Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/keras/python/keras/utils/generic_utils.py | 21 | 10625 | # 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... | mit |
yalp/fiware-orion | scripts/managedb/garbage-collector.py | 12 | 3881 | #!/usr/bin/python
# -*- coding: latin-1 -*-
# Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U
#
# This file is part of Orion Context Broker.
#
# Orion Context Broker 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 Fr... | agpl-3.0 |
Anonymike/pasta-bot | plugins/_junk.py | 3 | 9285 | from util import hook, user, database
import os
import sys
import re
import json
import time
import subprocess
# @hook.command(autohelp=False, permissions=["permissions_users"], adminonly=True)
# def permissions(inp, bot=None, notice=None):
# """permissions [group] -- lists the users and their permission level w... | gpl-3.0 |
codeforamerica/skillcamp | ENV/lib/python2.7/site-packages/setuptools/ssl_support.py | 332 | 7663 | import os
import socket
import atexit
import re
import pkg_resources
from pkg_resources import ResolutionError, ExtractionError
from setuptools.compat import urllib2
try:
import ssl
except ImportError:
ssl = None
__all__ = [
'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_available', 'cert_paths',
'op... | mit |
phantomlinux/vaughn_aiy_raspberrypi | src/action.py | 1 | 14088 | # Copyright 2017 Google 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 agreed to in writing, ... | apache-2.0 |
alvarolopez/nova | plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py | 54 | 7407 | #!/usr/bin/env python
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2010 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "... | apache-2.0 |
ztianjin/jna | native/libffi/generate-osx-source-and-headers.py | 100 | 5200 | #!/usr/bin/env python
import subprocess
import re
import os
import errno
import collections
import sys
class Platform(object):
pass
sdk_re = re.compile(r'.*-sdk ([a-zA-Z0-9.]*)')
def sdkinfo(sdkname):
ret = {}
for line in subprocess.Popen(['xcodebuild', '-sdk', sdkname, '-version'], stdout=subprocess.PIP... | lgpl-2.1 |
coderabhishek/scrapy | scrapy/utils/log.py | 108 | 6012 | # -*- coding: utf-8 -*-
import sys
import logging
import warnings
from logging.config import dictConfig
from twisted.python.failure import Failure
from twisted.python import log as twisted_log
import scrapy
from scrapy.settings import overridden_settings, Settings
from scrapy.exceptions import ScrapyDeprecationWarni... | bsd-3-clause |
sarvex/depot-tools | third_party/logilab/common/logging_ext.py | 93 | 6975 | # -*- coding: utf-8 -*-
# copyright 2003-2011 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 Genera... | bsd-3-clause |
HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/tap/ftp.py | 67 | 2002 | # -*- test-case-name: twisted.test.test_ftp_options -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
I am the support module for making a ftp server with twistd.
"""
from twisted.application import internet
from twisted.cred import portal, checkers, strcred
from twisted.protocols impor... | gpl-3.0 |
rossjones/ScraperWikiX | web/codewiki/viewsrpc.py | 1 | 14719 | from django.template import RequestContext
from django.http import HttpResponseRedirect, HttpResponse, HttpResponseNotFound, HttpResponseForbidden
from django.template.loader import render_to_string
from django.shortcuts import render_to_response
from django.core.urlresolvers import reverse
from django.views.decorators... | agpl-3.0 |
LinkCareServices/cairotft | docs/conf.py | 1 | 8584 | # -*- coding: utf-8 -*-
#
# Fitch documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 10 18:37:45 2012.
#
# 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
# autogenerated file.
#
# All co... | bsd-3-clause |
KanoComputing/kano-profile | kano_profile/tracker/__init__.py | 1 | 9447 | #
# __init__.py
#
# Copyright (C) 2014 - 2018 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2
#
# Kano-tracker module
#
# A small module for tracking various metrics the users do in Kano OS
#
__author__ = 'Kano Computing Ltd.'
__email__ = 'dev@kano.me'
import time
import atexit
imp... | gpl-2.0 |
miguelgrinberg/heat | heat/tests/api/openstack_v1/test_stacks.py | 2 | 93167 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 |
thequbit/yellr-server | yellr-serv/yellrserv/ep_client_assignment.py | 1 | 2188 | from pyramid.view import view_config
import client_utils
import utils
@view_config(route_name='get_assignments.json')
def get_assignments(request):
result = {'success': False}
status_code = 200
#try:
if True:
success, error_text, language_code, lat, lng, \
client = client_utils.... | agpl-3.0 |
jhsenjaliya/incubator-airflow | airflow/migrations/versions/64de9cddf6c9_add_task_fails_journal_table.py | 59 | 1452 | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | apache-2.0 |
GeoffreyFrogeye/syncthing-gtk | syncthing_gtk/timermanager.py | 2 | 1640 | #!/usr/bin/env python2
"""
Syncthing-GTK - Timer manager
Simple abstract class for named, cancelable timers
"""
from __future__ import unicode_literals
from gi.repository import GLib
class TimerManager(object):
def __init__(self):
self._timers = {}
def timer(self, name, delay, callback, *data, **kwdata):
"""... | gpl-2.0 |
scigghia/account-payment | __unported__/purchase_payment/__openerp__.py | 4 | 2019 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2010 Pexego S.L. (http://www.pexego.es) All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it und... | agpl-3.0 |
raboof/supybot | src/utils/iter.py | 14 | 5180 | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# 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 co... | bsd-3-clause |
boedy1996/SPARC | geonode/maps/urls.py | 1 | 4070 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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-3.0 |
Endika/odoomrp-wip | quality_control_sale_stock/__openerp__.py | 19 | 1562 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c)
# 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com)
# 2015 AvanzOsc (http://www.avanzosc.es)
#
# This program is free software: you can redistribute it and/or modi... | agpl-3.0 |
PeterWangPo/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/feeders.py | 121 | 4477 | # Copyright (c) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause |
wisdark/Empire | lib/stagers/osx/dylib.py | 11 | 3528 | from lib.common import helpers
import os
class Stager:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'dylib',
'Author': ['@xorrior'],
'Description': ('Generates a dylib.'),
'Comments': [
''
]
}
... | bsd-3-clause |
apple/llvm-project | lldb/test/API/lang/c/set_values/TestSetValues.py | 8 | 5017 | """Test settings and readings of program variables."""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class SetValuesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self):
# Call super's setUp().... | apache-2.0 |
duramato/CouchPotatoServer | libs/dateutil/parser.py | 103 | 33736 | # -*- coding:iso-8859-1 -*-
"""
Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
from __future__ import unicode_literals
__license__ = "Simplified BSD"
import datetime
import string
import time
import collections
try:
from... | gpl-3.0 |
rishigb/bro | remindMe/venv/lib/python2.7/site-packages/wheel/bdist_wheel.py | 232 | 17441 | """
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 |
FireWRT/OpenWrt-Firefly-Libraries | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/test/test_copy_reg.py | 129 | 4256 | import copy_reg
import unittest
from test import test_support
from test.pickletester import ExtensionSaver
class C:
pass
class WithoutSlots(object):
pass
class WithWeakref(object):
__slots__ = ('__weakref__',)
class WithPrivate(object):
__slots__ = ('__spam',)
class WithSingleString(object):
... | gpl-2.0 |
hortonworks/hortonworks-sandbox | desktop/core/ext-py/Twisted/doc/words/examples/xmpp_client.py | 1 | 2125 | # Copyright (c) 2001-2006 Twisted Matrix Laboratories.
# See LICENSE for details.
import sys
from twisted.internet import reactor
from twisted.names.srvconnect import SRVConnector
from twisted.words.xish import domish
from twisted.words.protocols.jabber import xmlstream, client, jid
class XMPPClientConnector(SRVConn... | apache-2.0 |
mattclay/ansible | test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py | 13 | 14512 | """Sanity test to check integration test aliases."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import textwrap
import os
from ... import types as t
from . import (
SanityVersionNeutral,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTa... | gpl-3.0 |
nevillehay/gbi-nevillehay | src/error.py | 2 | 1775 | #!/usr/local/bin/python
# Copyright (c) 2011 GhostBSD
#
# See COPYING for licence terms.
import gtk
from subprocess import Popen
lyrics = """
Please report to
, and be sure
to provide /tmp/.pc-sysinstall/pc-sysinstall.log.
"""
class PyApp:
def on_reboot(self, widget):
Popen('sudo reboot', shell=True)
... | bsd-3-clause |
DirtyPiece/dancestudio | Build/Tools/Python27/Lib/sgmllib.py | 306 | 17884 | """A parser for SGML, using the derived class as a static DTD."""
# XXX This only supports those SGML features used by HTML.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are ... | mit |
pgum/emi1 | lib/python3.5/site-packages/pip/_vendor/progress/counter.py | 510 | 1502 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS P... | gpl-3.0 |
SickGear/SickGear | lib/js2py/constructors/jsfunction.py | 9 | 1399 | from ..base import *
try:
from ..translators.translator import translate_js
except:
pass
@Js
def Function():
# convert arguments to python list of strings
a = [e.to_string().value for e in arguments.to_list()]
body = ';'
args = ()
if len(a):
body = '%s;' % a[-1]
args = a[:-... | gpl-3.0 |
agry/NGECore2 | scripts/mobiles/dynamicgroups/dantooine_kunga.py | 2 | 1024 | # Spawn Group file created with PSWG Planetary Spawn Tool
import sys
from java.util import Vector
from services.spawn import DynamicSpawnGroup
from services.spawn import MobileTemplate
def addDynamicGroup(core):
dynamicGroup = DynamicSpawnGroup()
mobileTemplates = Vector()
mobileTemplates.add('kunga_clan_leader')
... | lgpl-3.0 |
phobson/pycvc | setup.py | 2 | 1510 | # Setup script for the pycvc package
#
# Usage: python setup.py install
#
import os
from setuptools import setup, find_packages
DESCRIPTION = "pycvc: Analyze CVC stormwater data"
LONG_DESCRIPTION = DESCRIPTION
NAME = "pycvc"
VERSION = "0.3.0"
AUTHOR = "Paul Hobson (Geosyntec Consultants)"
AUTHOR_EMAIL = "phobson@geosy... | bsd-3-clause |
xen0l/ansible | lib/ansible/modules/network/f5/bigip_hostname.py | 14 | 7419 | #!/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 |
Dioptas/Dioptas | dioptas/controller/integration/ImageController.py | 1 | 49794 | # -*- coding: utf-8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray diffraction data
# Principal author: Clemens Prescher (clemens.prescher@gmail.com)
# Copyright (C) 2014-2019 GSECARS, University of Chicago, USA
# Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany
... | gpl-3.0 |
DJMuggs/ansible-modules-extras | notification/campfire.py | 8 | 4899 | #!/usr/bin/python
# -*- coding: utf-8 -*-
DOCUMENTATION = '''
---
module: campfire
version_added: "1.2"
short_description: Send a message to Campfire
description:
- Send a message to Campfire.
- Messages with newlines will result in a "Paste" message being sent.
version_added: "1.2"
options:
subscription:
... | gpl-3.0 |
markwal/OctoPrint-ScreenSquish | setup.py | 1 | 1331 | # coding=utf-8
########################################################################################################################
plugin_identifier = "ScreenSquish"
plugin_package = "octoprint_%s" % plugin_identifier
plugin_name = "OctoPrint-ScreenSquish"
plugin_version = "0.4"
plugin_description = "Scalable UI ... | agpl-3.0 |
djenniex/CouchPotatoServer | libs/pyasn1/type/univ.py | 74 | 44619 | # ASN.1 "universal" data types
import operator, sys, math
from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat import octets
from pyasn1 import error
# "Simple" ASN.1 types (yet incomplete)
class Integer(base.AbstractSimpleAsn1Item):
tagSet... | gpl-3.0 |
Atom-machinerule/OpenQbo | qbo_stereo_anaglyph/hrl_lib/src/hrl_lib/msg/_PlanarBaseVelLimits.py | 2 | 6154 | """autogenerated by genmsg_py from PlanarBaseVelLimits.msg. Do not edit."""
import roslib.message
import struct
import std_msgs.msg
class PlanarBaseVelLimits(roslib.message.Message):
_md5sum = "79d6a8bc99f5988deabb3198a791ba92"
_type = "hrl_lib/PlanarBaseVelLimits"
_has_header = True #flag to mark the presence ... | lgpl-2.1 |
unreal666/outwiker | src/outwiker/pages/text/textpage.py | 3 | 1215 | # -*- coding: utf-8 -*-
"""
Необходимые классы для создания страниц с текстом
"""
from outwiker.core.tree import WikiPage
from outwiker.pages.text.textpanel import TextPanel
from outwiker.core.factory import PageFactory
class TextWikiPage (WikiPage):
"""
Класс текстовых страниц
"""
def __init__(self... | gpl-3.0 |
filippog/pysnmp | pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py | 4 | 3369 | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net>
# License: http://pysnmp.sf.net/license.html
#
try:
from hashlib import md5
except ImportError:
import md5
md5 = md5.new
from pyasn1.type import univ
from pysnmp.proto.secmod.rfc3414.auth import base
from pys... | bsd-3-clause |
mongkok/defocus | defocus/users/migrations/0001_initial.py | 1 | 2373 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2017-12-16 21:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0008_alte... | mit |
jjingrong/PONUS-1.2 | venv/build/django/django/contrib/auth/management/commands/changepassword.py | 76 | 2071 | from __future__ import unicode_literals
import getpass
from optparse import make_option
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):
... | mit |
MjAbuz/watchdog | import/parse/voteview.py | 3 | 1969 | """
parse voteview partisanship data
"""
HOUSE_DAT = "../data/crawl/voteview/HL01110C21_PRES_BSSE.DAT"
SENATE_DAT = "../data/crawl/voteview/SL01110C21_BSSE.dat"
state_map = { #@@ import to state json as icpsr
41: 'AL', 81: 'AK', 61: 'AZ', 42: 'AR', 71: 'CA', 62: 'CO', 1: 'CT',
11: 'DE', 43: 'FL', 44: 'GA', 82: 'H... | agpl-3.0 |
twiest/openshift-tools | ansible/roles/lib_zabbix/library/zbx_user.py | 13 | 7263 | #!/usr/bin/env python
'''
ansible module for zabbix users
'''
# vim: expandtab:tabstop=4:shiftwidth=4
#
# Zabbix user ansible module
#
#
# Copyright 2015 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | apache-2.0 |
mubix/pth-toolkit | lib/python2.7/site-packages/samba/tests/samba_tool/ntacl.py | 42 | 6329 | # Unix SMB/CIFS implementation.
# Copyright (C) Andrew Bartlett 2012
#
# Based on user.py:
# Copyright (C) Sean Dague <sdague@linux.vnet.ibm.com> 2011
#
# 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 Found... | bsd-2-clause |
chrislit/abydos | tests/distance/test_distance_baroni_urbani_buser_ii.py | 1 | 7009 | # Copyright 2019-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | gpl-3.0 |
h3biomed/ansible | test/units/plugins/lookup/test_manifold.py | 38 | 27127 | # (c) 2018, Arigato Machine Inc.
# (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat import unittest
from units.compat.mock import patch, call
f... | gpl-3.0 |
schreiberx/sweet | benchmarks_sphere/galewsky_varying_varying_dt_and_tsm/benchmark_create_jobs.py | 1 | 6312 | #! /usr/bin/env python3
import os
import sys
import math
import numpy as np
from itertools import product
from mule_local.JobGeneration import *
from mule.JobParallelization import *
from mule.JobParallelizationDimOptions import *
p = JobGeneration()
verbose = False
#verbose = True
###############################... | mit |
lokirius/python-for-android | python-build/python-libs/gdata/src/gdata/youtube/service.py | 141 | 57914 | #!/usr/bin/python
#
# Copyright (C) 2008 Google 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 ... | apache-2.0 |
ds-hwang/chromium-crosswalk | build/download_gold_plugin.py | 19 | 1658 | #!/usr/bin/env python
# Copyright 2015 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.
"""Script to download LLVM gold plugin from google storage."""
import find_depot_tools
import json
import os
import shutil
import subp... | bsd-3-clause |
ah-anssi/SecuML | SecuML/experiments/ExperimentFactory.py | 1 | 1834 | # SecuML
# Copyright (C) 2016-2017 ANSSI
#
# SecuML 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.
#
# SecuML is distributed in the h... | gpl-2.0 |
gabrieladt/kops-ec2-autoscaler | autoscaler/kube.py | 1 | 13310 | import datetime
import json
import logging
from dateutil.parser import parse as dateutil_parse
import pykube.exceptions
import autoscaler.utils as utils
logger = logging.getLogger(__name__)
class KubePodStatus(object):
RUNNING = 'Running'
PENDING = 'Pending'
CONTAINER_CREATING = 'ContainerCreating'
... | mit |
AgostonSzepessy/servo | tests/wpt/css-tests/tools/runner/report.py | 278 | 9660 | import argparse
import json
import sys
from cgi import escape
from collections import defaultdict
import types
def html_escape(item, escape_quote=False):
if isinstance(item, types.StringTypes):
rv = escape(item)
if escape_quote:
rv = rv.replace('"', """)
return rv
els... | mpl-2.0 |
zaccoz/odoo | addons/l10n_be_intrastat/__openerp__.py | 257 | 1631 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Business Applications
# Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | agpl-3.0 |
qrkourier/ansible | lib/ansible/modules/system/sefcontext.py | 56 | 7940 | #!/usr/bin/python
# (c) 2016, Dag Wieers <dag@wieers.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': '1.1',
'status': ['... | gpl-3.0 |
jeffzheng1/tensorflow | tensorflow/contrib/learn/python/learn/dataframe/transforms/in_memory_source.py | 82 | 6157 | # 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 |
zahodi/ansible | lib/ansible/utils/module_docs_fragments/dellos10.py | 42 | 2591 | #
# (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 version 3 of the Licens... | gpl-3.0 |
ceibal-tatu/software-center | tests/test_login_backend.py | 3 | 1423 | import os
import unittest
from tests.utils import (
setup_test_env,
)
setup_test_env()
from softwarecenter.backend.login import get_login_backend
from softwarecenter.backend.login_impl.login_sso import (
LoginBackendDbusSSO)
from softwarecenter.backend.login_impl.login_fake import (
LoginBackendDbusSSOFake... | lgpl-3.0 |
Thraxis/SickRage | sickbeard/name_parser/parser.py | 3 | 24350 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# 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 Foundation, either version 3... | gpl-3.0 |
mgraupe/acq4 | acq4/pyqtgraph/widgets/JoystickButton.py | 52 | 2460 | from ..Qt import QtGui, QtCore
__all__ = ['JoystickButton']
class JoystickButton(QtGui.QPushButton):
sigStateChanged = QtCore.Signal(object, object) ## self, state
def __init__(self, parent=None):
QtGui.QPushButton.__init__(self, parent)
self.radius = 200
self.setCheckable(True)... | mit |
SantosDevelopers/sborganicos | venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py | 2931 | 2318 | ######################## 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 |
AnderEnder/ansible-modules-extras | web_infrastructure/jenkins_plugin.py | 12 | 25559 | #!/usr/bin/python
# encoding: utf-8
# (c) 2016, Jiri Tyr <jiri.tyr@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 |
GiladE/birde | venv/lib/python2.7/site-packages/gunicorn/http/wsgi.py | 26 | 13493 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import io
import logging
import os
import re
import sys
from gunicorn._compat import unquote_to_wsgi_str
from gunicorn.six import string_types, binary_type, reraise
from gunicorn import SERVE... | mit |
TeamEOS/kernel_oppo_find7 | tools/perf/scripts/python/syscall-counts.py | 11181 | 1522 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
quang-ha/lammps | tools/i-pi/ipi/utils/io/io_xml.py | 33 | 15954 | """Contains the functions used to read the input file and print the checkpoint
files with xml formatting.
Copyright (C) 2013, Joshua More and Michele Ceriotti
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 Fou... | gpl-2.0 |
youprofit/zato | code/zato-server/src/zato/server/service/internal/kvdb/__init__.py | 6 | 4387 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
from logging import DEBUG, getLogger
from traceback import format_exc
#... | gpl-3.0 |
mdublin/Brightcove-Dynamic-Ingest-App | ENV/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_types.py | 12 | 11192 | # coding: utf-8
from .. import fixtures, config
from ..assertions import eq_
from ..config import requirements
from sqlalchemy import Integer, Unicode, UnicodeText, select
from sqlalchemy import Date, DateTime, Time, MetaData, String, \
Text, Numeric, Float
from ..schema import Table, Column
from ... impor... | mit |
agconti/njode | env/lib/python2.7/site-packages/django/contrib/gis/gdal/srs.py | 35 | 11986 | """
The Spatial Reference class, represensents OGR Spatial Reference objects.
Example:
>>> from django.contrib.gis.gdal import SpatialReference
>>> srs = SpatialReference('WGS84')
>>> print(srs)
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHOR... | bsd-3-clause |
tumbl3w33d/ansible | lib/ansible/modules/cloud/vmware/vmware_guest_disk_info.py | 10 | 13626 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, NAER William Leemans (@bushvin) <willie@elaba.net>
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __f... | gpl-3.0 |
pramsey/mapnik | scons/scons-local-2.3.4/SCons/Tool/midl.py | 9 | 3034 | """SCons.Tool.midl
Tool-specific initialization for midl (Microsoft IDL compiler).
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby ... | lgpl-2.1 |
Tesla-Redux-Devices/kernel_lge_g3 | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
blue236/ardupilot | Tools/scripts/magfit_flashlog.py | 278 | 4744 | #!/usr/bin/env python
''' fit best estimate of magnetometer offsets from ArduCopter flashlog
using the algorithm from Bill Premerlani
'''
import sys, time, os, math
# command line option handling
from optparse import OptionParser
parser = OptionParser("magfit_flashlog.py [options]")
parser.add_option("--verbose", ac... | gpl-3.0 |
marcoarruda/MissionPlanner | Lib/site-packages/numpy/testing/utils.py | 53 | 47161 | """
Utility function to facilitate testing.
"""
import os
import sys
import re
import operator
import types
import warnings
from nosetester import import_nose
__all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal',
'assert_array_equal', 'assert_array_less', 'assert_string_equal',
... | gpl-3.0 |
auready/django | tests/gis_tests/tests.py | 22 | 4106 | import unittest
from django.core.exceptions import ImproperlyConfigured
from django.db import ProgrammingError
try:
from django.contrib.gis.db.backends.postgis.operations import PostGISOperations
HAS_POSTGRES = True
except ImportError:
HAS_POSTGRES = False
except ImproperlyConfigured as e:
# If psycop... | bsd-3-clause |
Nosferatul/coala | tests/results/AbsolutePositionTest.py | 35 | 2511 | import unittest
from coalib.results.AbsolutePosition import AbsolutePosition, calc_line_col
from coalib.misc.Constants import COMPLEX_TEST_STRING
class AbsolutePositionTest(unittest.TestCase):
def test_calc_line_col_newlines(self):
# no newlines
text = ("find position of 'z'",)
z_pos = t... | agpl-3.0 |
40223225/2015-cdb_g3-40223225 | static/Brython3.1.1-20150328-091302/Lib/fnmatch.py | 894 | 3163 | """Filename matching with shell patterns.
fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.
The functions operate by translating the pattern into a regular
expression. They cache the compiled regular expressions for speed.
The function... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.