repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
EKiefer/edge-starter | refs/heads/master | py34env/Lib/site-packages/pip/_vendor/distlib/version.py | 426 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
"""
import logging
import re
from .compat import string_types
... |
tdyas/pants | refs/heads/master | src/python/pants/backend/codegen/antlr/python/target_types.py | 1 | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.python.target_types import COMMON_PYTHON_FIELDS
from pants.engine.target import Sources, StringField, Target
class AntlrModule(StringField):
"""Everything beneath ... |
KarimAllah/celery | refs/heads/master | celery/task/base.py | 18 | # -*- coding: utf-8 -*-
"""
celery.task.base
~~~~~~~~~~~~~~~~
The task implementation has been moved to :mod:`celery.app.task`.
:copyright: (c) 2009 - 2011 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .. import current_app
from ..app.... |
jcoady9/python-for-android | refs/heads/master | python3-alpha/extra_modules/gdata/contacts/data.py | 81 | #!/usr/bin/env python
#
# Copyright (C) 2009 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 ... |
rubikloud/scikit-learn | refs/heads/0.17.1-RUBIKLOUD | sklearn/utils/_scipy_sparse_lsqr_backport.py | 378 | """Sparse Equations and Least Squares.
The original Fortran code was written by C. C. Paige and M. A. Saunders as
described in
C. C. Paige and M. A. Saunders, LSQR: An algorithm for sparse linear
equations and sparse least squares, TOMS 8(1), 43--71 (1982).
C. C. Paige and M. A. Saunders, Algorithm 583; LSQR: Sparse... |
Thraxis/pymedusa | refs/heads/master | lib/sqlalchemy/orm/evaluator.py | 35 | # orm/evaluator.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import operator
from ..sql import operators
class UnevaluatableError(Exception):
... |
svn2github/gyp | refs/heads/master | test/mac/gyptest-loadable-module.py | 54 | #!/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.
"""
Tests that a loadable_module target is built correctly.
"""
import TestGyp
import os
import struct
import sys
if sys.platform == 'dar... |
phdowling/scikit-learn | refs/heads/master | benchmarks/bench_multilabel_metrics.py | 276 | #!/usr/bin/env python
"""
A comparison of multilabel target formats and metrics over them
"""
from __future__ import division
from __future__ import print_function
from timeit import timeit
from functools import partial
import itertools
import argparse
import sys
import matplotlib.pyplot as plt
import scipy.sparse as... |
ArielSaldana/sunset | refs/heads/master | yaml/test/gtest-1.8.0/googlemock/scripts/generator/cpp/ast.py | 384 | #!/usr/bin/env python
#
# Copyright 2007 Neal Norwitz
# Portions Copyright 2007 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... |
kerr-huang/SL4A | refs/heads/master | python/gdata/tests/gdata_tests/calendar/calendar_acl_test.py | 128 | #!/usr/bin/python
#
# Copyright (C) 2007 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 ... |
HoracioAlvarado/fwd | refs/heads/master | venv/Lib/encodings/utf_32.py | 180 | """
Python 'utf-32' Codec
"""
import codecs, sys
### Codec APIs
encode = codecs.utf_32_encode
def decode(input, errors='strict'):
return codecs.utf_32_decode(input, errors, True)
class IncrementalEncoder(codecs.IncrementalEncoder):
def __init__(self, errors='strict'):
codecs.IncrementalEncoder.__ini... |
jwren/intellij-community | refs/heads/master | python/testData/intentions/PyInvertIfConditionIntentionTest/generalNoElse_after.py | 20 | def func():
value = "not-none"
if value is not None:
return
print("None") |
dims/nova | refs/heads/master | nova/api/openstack/versioned_method.py | 97 | # Copyright 2014 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... |
MikkelSchubert/paleomix | refs/heads/master | paleomix/nodes/phylip.py | 1 | #!/usr/bin/python3
#
# Copyright (c) 2012 Mikkel Schubert <MikkelSch@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
... |
oVirt/vdsm | refs/heads/master | lib/vdsm/tool/__init__.py | 2 | # Copyright 2011 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... |
kingosticks/mopidy | refs/heads/develop | tests/core/test_library.py | 3 | import unittest
from unittest import mock
from mopidy import backend, core
from mopidy.models import Image, Ref, SearchResult, Track
class BaseCoreLibraryTest(unittest.TestCase):
def setUp(self): # noqa: N802
dummy1_root = Ref.directory(uri="dummy1:directory", name="dummy1")
self.backend1 = mock... |
hrishioa/Aviato | refs/heads/master | flask/Lib/posixpath.py | 62 | """Common operations on Posix pathnames.
Instead of importing this module directly, import os and refer to
this module as os.path. The "os.path" name is an alias for this
module on Posix systems; on other systems (e.g. Mac, Windows),
os.path provides the same operations in a manner specific to that
platform, and is a... |
jordanemedlock/psychtruths | refs/heads/master | temboo/Library/Dropbox/FilesAndMetadata/RestoreFileToRevision.py | 5 | # -*- coding: utf-8 -*-
###############################################################################
#
# RestoreFileToRevision
# Restores a specified file to a previous revision.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# y... |
RaulPL/golem_navigation | refs/heads/master | scripts/goal_parser_script.py | 1 | #!/usr/bin/env python
# Created by Raul Peralta-Lozada
import os
import yaml
import json
import rospy
import actionlib
import time
from math import pi
from std_srvs.srv import Empty
from nav_msgs.msg import Odometry
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal
from geometry_msgs.msg import PoseStamped... |
ansible/ansible | refs/heads/devel | test/units/module_utils/basic/test_no_log.py | 51 | # -*- coding: utf-8 -*-
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2017, 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
... |
campbe13/openhatch | refs/heads/master | vendor/packages/gdata/src/gdata/books/data.py | 125 | #!/usr/bin/python
#
# Copyright (C) 2009 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 ... |
MatthewWilkes/mw4068-packaging | refs/heads/master | thirdparty/google_appengine/google/appengine/ext/ereporter/ereporter.py | 9 | #!/usr/bin/env python
#
# Copyright 2007 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 o... |
dragoon/kilogram | refs/heads/master | kilogram/entity_linking/app.py | 1 | #!/usr/bin/env python
"""
./app.py --dbpedia-data-dir /home/roman/dbpedia --ner-host diufpc54.unifr.ch --types-table typogram --hbase-host diufpc304
"""
import argparse
import os.path
from flask import Flask, jsonify, request
import kilogram
from kilogram.dataset.entity_linking.gerbil import DataSet
from kilogram.ent... |
stepos01/ns3-lr-wpan-mlme | refs/heads/master | src/internet/bindings/modulegen__gcc_LP64.py | 2 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
TheWardoctor/Wardoctors-repo | refs/heads/master | plugin.video.metalliq/resources/lib/xbmcswift2/request.py | 34 | '''
xbmcswift2.request
------------------
This module contains the Request class. This class represents an incoming
request from XBMC.
:copyright: (c) 2012 by Jonathan Beluch
:license: GPLv3, see LICENSE for more details.
'''
from xbmcswift2.common import unpickle_args
import urlparse
try:
... |
scrollback/kuma | refs/heads/master | kuma/wiki/migrations/0034_auto__del_unique_documentzone_url_root.py | 5 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'DocumentZone', fields ['url_root']
db.delete_unique('wiki_documentzone', ['... |
probablytom/tomwallis.net | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py | 75 | from __future__ import unicode_literals
import datetime
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (lookup_field, display_for_field,
display_for_value, label_for_field)
from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST... |
tyaslab/django-tastypie | refs/heads/master | tests/slashless/api/urls.py | 27 | try:
from django.conf.urls import patterns, include, url
except ImportError: # Django < 1.4
from django.conf.urls.defaults import patterns, include, url
from tastypie.api import Api
from slashless.api.resources import NoteResource, UserResource
api = Api(api_name='v1')
api.register(NoteResource(), canonical=Tr... |
tomncooper/heron | refs/heads/master | heron/tools/ui/src/python/args.py | 4 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# 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... |
joeyjojo/django_offline | refs/heads/master | src/django/db/backends/oracle/client.py | 645 | import os
import sys
from django.db.backends import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'sqlplus'
def runshell(self):
conn_string = self.connection._connect_string()
args = [self.executable_name, "-L", conn_string]
if os.name == 'nt':
... |
varunagrawal/azure-services | refs/heads/master | varunagrawal/VarunWeb/env/Lib/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py | 374 | # urllib3/exceptions.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
## Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
... |
lemonad/jaikuengine | refs/heads/master | common/templatetags/presence.py | 34 | # Copyright 2009 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, ... |
akshitac8/Course-work | refs/heads/master | Crytography/hill_cipher.py | 1 | def hill(message, key, decrypt = False):
from math import sqrt
n = int(sqrt(len(key)))
if n * n != len(key):
raise Exception("Invalid key length, should be square-root-able like")
alpha = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
print "[ALPHA LENGTH]: ", len(alpha)
tonum = dict([... |
ickyfeet/panostoblock | refs/heads/master | panostoblock.py | 1 | import os
import untangle
import requests
import time
# Environment Specific Variables
Key = '&key=ADD YOUR API KEY HERE'
BaseUrl = 'ADD YOUR BASE URL HERE'
ThreatCall = 'ADD YOUR API CALL TO QUERY THE THREAT LOGS'
JobCall = '?type=log&action=get&job-id='
PathToBlackList = 'PATH TO THE BLACKLIST FILE'
FileName =... |
beholderrk/django-watermark | refs/heads/master | setup.py | 10 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import watermarker
setup(
name='django-watermark',
version=watermarker.version(),
description="Quick and efficient way to apply watermarks to images in Django.",
long_description=open('README.rst', 'r').read(),
... |
zimmermegan/MARDA | refs/heads/master | nltk-3.0.3/nltk/test/unit/test_tag.py | 14 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def test_basic():
from nltk.tag import pos_tag
from nltk.tokenize import word_tokenize
result = pos_tag(word_tokenize("John's big idea isn't all that bad."))
assert result == [('John', 'NNP'), ("'s", 'POS'), ('big', 'JJ')... |
blockstack/blockstack-server | refs/heads/master | integration_tests/blockstack_integration_tests/scenarios/attic/name_pre_reg_up_deleteimmutable.py | 1 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Blockstack
~~~~~
copyright: (c) 2014-2015 by Halfmoon Labs, Inc.
copyright: (c) 2016 by Blockstack.org
This file is part of Blockstack
Blockstack is free software: you can redistribute it and/or modify
it under the terms of the GNU General... |
eusoubrasileiro/fatiando | refs/heads/sim-class-improvements | fatiando/gravmag/polyprism.py | 3 | r"""
Calculate the potential fields of the 3D prism with polygonal crossection using
the formula of Plouff (1976).
**Gravity**
First and second derivatives of the gravitational potential:
* :func:`~fatiando.gravmag.polyprism.gz`
* :func:`~fatiando.gravmag.polyprism.gxx`
* :func:`~fatiando.gravmag.polyprism.gxy`
* :f... |
cathyyul/sumo | refs/heads/master | tools/output/generateTLSE2Detectors.py | 2 | #!/usr/bin/env python
"""
@file generateE2TLSDetectors.py
@author Daniel Krajzewicz
@author Karol Stosiek
@author Lena Kalleske
@author Michael Behrisch
@date 2007-10-25
@version $Id: generateTLSE2Detectors.py 14425 2013-08-16 20:11:47Z behrisch $
SUMO, Simulation of Urban MObility; see http://sumo-sim.org/... |
mdanielwork/intellij-community | refs/heads/master | python/helpers/py3only/docutils/languages/da.py | 50 | # -*- coding: utf-8 -*-
# $Id: da.py 7678 2013-07-03 09:57:36Z milde $
# Author: E D
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translated for each... |
sencha/chromium-spacewalk | refs/heads/master | third_party/closure_linter/closure_linter/statetracker.py | 8 | #!/usr/bin/env python
#
# Copyright 2007 The Closure Linter 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
#... |
lawzou/shoop | refs/heads/master | shoop/admin/forms/widgets.py | 1 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.forms import HiddenInpu... |
RBDA-F17/crime | refs/heads/master | src/filter_clean_taxi.py | 1 | import os
import sys
import pandas as pd
from pyspark.sql.types import *
from pyspark.sql import Row, Column
from pyspark.sql.functions import *
from datetime import datetime
from pyspark import SparkConf, SparkContext
from pyspark.sql import SQLContext
from pyspark.sql.functions import udf
user = os. environ['USER']
... |
webmasterraj/FogOrNot | refs/heads/master | flask/lib/python2.7/site-packages/pandas/io/tests/test_pickle.py | 3 | # pylint: disable=E1101,E1103,W0232
""" manage legacy pickle tests """
from datetime import datetime, timedelta
import operator
import pickle as pkl
import nose
import os
import numpy as np
import pandas.util.testing as tm
import pandas as pd
from pandas import Index
from pandas.sparse.tests import test_sparse
from ... |
zhiyue/pyspider | refs/heads/master | pyspider/database/local/projectdb.py | 63 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2015-01-17 12:32:17
import os
import re
import six
import logging
from pyspider.database.base.projectdb import ProjectDB as BaseProjectDB
class Projec... |
alviproject/alvi | refs/heads/master | alvi/tests/resources/__init__.py | 1 | from alvi.tests.resources.backend import Backend
from alvi.tests.resources.browser import Browser
from alvi.tests.resources.client import Client |
cornell-brg/pymtl | refs/heads/master | pclib/rtl/__init__.py | 1 |
from regs import Reg, RegEn, RegRst, RegEnRst
from arith import Adder, Subtractor, Incrementer
from arith import ZeroExtender, SignExtender
from arith import ZeroComparator, EqComparator, LtComparator, GtComparator
from arith import SignUnit, UnsignUnit
from arith import Lef... |
kevin8909/xjerp | refs/heads/master | openerp/addons/l10n_co/__init__.py | 119 | # -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) Vauxoo S.A. de C.V. (<http://www.vauxoo.com>).
# All Rights Reserved
###############Credits##########################################... |
tesidroni/mp | refs/heads/master | Lib/site-packages/numpy/oldnumeric/linear_algebra.py | 102 | """Backward compatible with LinearAlgebra from Numeric
"""
# This module is a lite version of the linalg.py module in SciPy which contains
# high-level Python interface to the LAPACK library. The lite version
# only accesses the following LAPACK functions: dgesv, zgesv, dgeev,
# zgeev, dgesdd, zgesdd, dgelsd, zgelsd, ... |
jameshuang/mapnoise | refs/heads/master | mapnoise.py | 1 | import os
import sys
import signal
import getopt
import time
import FileDialog
import matplotlib as mpl
mpl.rcParams['examples.directory'] = './'
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
#import numpy as np
from PIL import Image
import csv
def within(p, lrbt):
return p[1] >= lrbt[0] and p[1]... |
PowerHMC/HmcRestClient | refs/heads/master | src/main/PerformanceCapacityMonitor.py | 1 | # Copyright 2015, 2016 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 require... |
Jgarcia-IAS/SAT | refs/heads/master | openerp/addons/decimal_precision/tests/__init__.py | 363 | # -*- coding: utf-8 -*-
from . import test_qweb_float
|
makkalot/func | refs/heads/master | func/yaml/ordered_dict.py | 12 | """
pyyaml legacy
Copyright (c) 2001 Steve Howell and Friends; All Rights Reserved
(see open source license information in docs/ directory)
"""
# This is extremely crude implementation of an OrderedDict.
# If you know of a better implementation, please send it to
# the author Steve Howell. You can find my email via
... |
nouiz/pylearn2 | refs/heads/master | pylearn2/models/tests/test_mlp.py | 33 | from __future__ import print_function
import copy
from itertools import product
from nose.tools import assert_raises
from nose.plugins.skip import SkipTest
import numpy as np
from theano.compat import six
from theano.compat.six.moves import reduce, xrange
import theano
from theano import tensor, config
T = tensor
fro... |
klonage/nlt-gcs | refs/heads/master | Lib/uu.py | 62 | #! /usr/bin/env python
# Copyright 1994 by Lance Ellinghouse
# Cathedral City, California Republic, United States of America.
# All Rights Reserved
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# ... |
Juniper/ceilometer | refs/heads/master | ceilometer/network/statistics/opencontrail/driver.py | 12 | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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 applicabl... |
pierrelb/RMG-Java | refs/heads/master | source/cclib/method/volume.py | 24 | """
cclib (http://cclib.sf.net) is (c) 2006, the cclib development team
and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html).
"""
__revision__ = "$Revision: 742 $"
import copy
import numpy
try:
from PyQuante.CGBF import CGBF
module_pyq = True
except:
module_pyq = False
try:
from pyvt... |
danielfrg/jupyterhub-kubernetes_spawner | refs/heads/master | kubernetes_spawner/swagger_client/models/v1_secret.py | 1 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
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... |
privateip/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_snmp_contact.py | 25 | #!/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 distribut... |
JeyZeta/Dangerous | refs/heads/master | Dangerous/Golismero/golismero/api/data/vulnerability/information_disclosure/dns_zone_transfer.py | 8 | #!/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 ... |
Pointedstick/ReplicatorG | refs/heads/master | skein_engines/skeinforge-40/fabmetheus_utilities/geometry/creation/lathe.py | 2 | """
Boolean geometry extrusion.
"""
from __future__ import absolute_import
#Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
import __init__
from fabmetheus_utilities.geometry.creation import lineation
from fa... |
petricm/DIRAC | refs/heads/integration | Resources/Computing/BatchSystems/GE.py | 4 | ############################################################################
# GE class representing SGE batch system
# 10.11.2014
# Author: A.T.
############################################################################
""" Torque.py is a DIRAC independent class representing Torque batch system.
Torque objec... |
UTSA-ICS/keystone-kerberos | refs/heads/master | keystone/common/sql/migrate_repo/manage.py | 134 | #!/usr/bin/env python
from migrate.versioning.shell import main
if __name__ == '__main__':
main(debug='False')
|
antoinecarme/pyaf | refs/heads/master | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_MovingMedian_Seasonal_WeekOfYear_ARX.py | 1 | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Integration'] , ['MovingMedian'] , ['Seasonal_WeekOfYear'] , ['ARX'] ); |
quillford/Cura | refs/heads/master | cura/CuraActions.py | 7 | from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QUrl
from PyQt5.QtGui import QDesktopServices
from UM.Event import CallFunctionEvent
from UM.Application import Application
import webbrowser
class CuraActions(QObject):
def __init__(self, parent = None):
super().__init__(parent)
... |
seppi91/CouchPotatoServer | refs/heads/develop | libs/pyutil/humanreadable.py | 106 | # Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002-2009 Zooko "Zooko" Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
import exceptions, os
from repr import Repr
class BetterRepr(Repr):
def __init__(self):
Repr.__init__(self)
# Note: These le... |
jeremiahmarks/sl4a | refs/heads/master | python/src/Mac/Modules/snd/sndscan.py | 34 | # Scan Sound.h header file, generate sndgen.py and Sound.py files.
# Then import sndsupport (which execs sndgen.py) to generate Sndmodule.c.
# (Should learn how to tell the compiler to compile it as well.)
import sys
from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR)
from scantools import Scanner
... |
ifduyue/sentry | refs/heads/master | src/sentry/web/urls.py | 1 | """
sentry.web.urls
~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.http import HttpRespo... |
jumpstarter-io/ceph-deploy | refs/heads/master | ceph_deploy/hosts/centos/__init__.py | 6 | import mon # noqa
import pkg # noqa
from install import install, mirror_install, repo_install, repository_url_part, rpm_dist # noqa
from uninstall import uninstall # noqa
# Allow to set some information about this distro
#
distro = None
release = None
codename = None
def choose_init():
"""
Select a i... |
acsone/bank-payment | refs/heads/8.0 | account_voucher_killer/__openerp__.py | 8 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2013 Camptocamp SA (http://www.camptocamp.com)
# @author Nicolas Bessi
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Genera... |
jumpstarter-io/cinder | refs/heads/master | cinder/db/sqlalchemy/migrate_repo/versions/003_glance_metadata.py | 11 | # Copyright 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 applicable law ... |
tehpug/TehPUG | refs/heads/master | wsgi/faq/views.py | 1 | # -----------------------------------------------------------------------------
# karajlug.org
# Copyright (C) 2010 karajlug community
#
# 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... |
Storj/storjnode | refs/heads/master | examples/config.py | 1 | import os
from storjnode.config import DEFAULT_CONFIG_PATH, create
from storjnode.config import save, validate, read
from storjnode.config import get, ConfigFile
from btctxstore import BtcTxStore
print(DEFAULT_CONFIG_PATH)
wallet = BtcTxStore()
config_file = ConfigFile(wallet)
config_file["something"] = 10
c... |
2014c2g12/c2g12 | refs/heads/master | w2/static/Brython2.0.0-20140209-164925/Lib/_dummy_thread.py | 742 | """Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
Suggested usage is::
try:
import _thread
except ImportError:
import _dummy_thread as _thread
"""
# Exports ... |
sabi0/intellij-community | refs/heads/master | python/testData/refactoring/extractmethod/Nonlocal.before.py | 83 | def foo():
x = 1
def bar():
nonlocal x
<selection>x = 2</selection>
print(x)
bar()
foo() |
zeffii/small_csv_onetouch_parser | refs/heads/master | glucose/data_script.py | 1 | import datetime
# week 32 | Aug 7 - Aug 13
template_head = """\
--------
#### week {WEEK} | {START_DAY} - {END_DAY}
<details>
"""
# ##### 2017, Aug 7 --- Mon
template_body = """\
##### {YYYY}, {MM_D_NAME}
|Time | Glucose | Units | Comment|
|-------|------|--------|---------------------------------|"""
template... |
opsidian/terraform | refs/heads/master | vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py | 1139 | #!/usr/bin/env python
# This will create golden files in a directory passed to it.
# A Test calls this internally to create the golden files
# So it can process them (so we don't have to checkin the files).
# Ensure msgpack-python and cbor are installed first, using:
# sudo apt-get install python-dev
# sudo apt-g... |
axilleas/ansible | refs/heads/devel | test/units/playbook/test_play.py | 118 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@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
# (at your option) an... |
Workday/OpenFrame | refs/heads/master | build/android/adb_logcat_printer.py | 69 | #!/usr/bin/env 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.
"""Shutdown adb_logcat_monitor and print accumulated logs.
To test, call './adb_logcat_printer.py <base_dir>' where
<base_dir> c... |
mtils/ems | refs/heads/master | examples/qt4/itemmodel/test_validatormodel_resize.py | 1 | #coding=utf-8
'''
Created on 04.03.2012
@author: michi
'''
import sys
import copy
import pprint
from PyQt4.QtCore import QString, QObject, Qt, QSize
from PyQt4.QtGui import QTableView, QApplication, QDialog, QVBoxLayout, \
QPushButton, QTableWidget, QStyledItemDelegate, QStyle, QStyleOptionViewItemV4,\
QDialo... |
Rayne/FrameworkBenchmarks | refs/heads/master | frameworks/Python/klein/app.py | 27 | # -*- coding: utf-8 -*-
from functools import partial, wraps
import json
from operator import attrgetter
import os
from random import randint
import sys
from jinja2 import Environment, PackageLoader
from klein import Klein, run, route
from sqlalchemy import create_engine, Column
from sqlalchemy.ext.declarative import... |
shennjia/home | refs/heads/master | .script/myE.py | 1 | #!/usr/bin/env python
from tempfile import mkstemp
from shutil import move
from os import remove, close
from os import system
def replace(file_path, pattern, subst,count):
#Create temp file
fh, abs_path = mkstemp()
new_file = open(abs_path,'w')
old_file = open(file_path)
print(old_file)
for line... |
felixfontein/ansible | refs/heads/devel | test/units/module_utils/facts/virtual/test_linux.py | 21 | # -*- coding: utf-8 -*-
# Copyright (c) 2020 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 ansible.module_utils.facts.virtual import linux
def test_get_virtual_fa... |
jiangzhw/theHarvester | refs/heads/master | discovery/IPy.py | 16 | """ IPy - class and tools for handling of IPv4 and IPv6 Addresses and Networks.
$HeadURL: http://svn.23.nu/svn/repos/IPy/trunk/IPy.py $
$Id: IPy.py,v 1.1 2007/08/14 09:39:00 cristian Exp $
The IP class allows a comfortable parsing and handling for most
notations in use for IPv4 and IPv6 Addresses and Networks... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py | 1 | # 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 may ... |
etos/django | refs/heads/master | django/contrib/auth/migrations/0009_alter_user_last_name_max_length.py | 132 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auth', '0008_alter_user_username_max_length'),
]
operations = [
migrations.AlterField(
model_name='user',
name='last_name',
field=models.CharField(blank=... |
rspavel/spack | refs/heads/develop | var/spack/repos/builtin/packages/mariadb/package.py | 3 | # 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 spack import *
class Mariadb(CMakePackage):
"""MariaDB Server is one of the most popular database servers
i... |
mdavid/pledgeservice | refs/heads/master | lib/mailchimp/requests/packages/urllib3/util/connection.py | 319 | from socket import error as SocketError
try:
from select import poll, POLLIN
except ImportError: # `poll` doesn't exist on OSX and other platforms
poll = False
try:
from select import select
except ImportError: # `select` doesn't exist on AppEngine.
select = False
def is_connection_dr... |
ArthurGarnier/SickRage | refs/heads/master | tests/sickrage_tests/media/__init__.py | 25 | # coding=utf-8
"""
Tests for SickRage media
"""
import unittest
from generic_media_tests import GenericMediaTests
from show_banner_tests import ShowBannerTests
from show_fan_art_tests import ShowFanArtTests
from show_network_logo_tests import ShowNetworkLogoTests
from show_poster_tests import ShowPosterTests
if __na... |
pinax/pinax-messages | refs/heads/master | pinax/messages/conf.py | 1 | import importlib
from django.conf import settings # noqa
from django.core.exceptions import ImproperlyConfigured
from appconf import AppConf
def load_path_attr(path):
i = path.rfind(".")
module, attr = path[:i], path[i + 1:]
try:
mod = importlib.import_module(module)
except ImportError as e... |
Krossom/python-for-android | refs/heads/master | python-modules/twisted/twisted/mail/bounce.py | 57 | # -*- test-case-name: twisted.mail.test.test_bounce -*-
#
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
import StringIO
import rfc822
import string
import time
import os
from twisted.mail import smtp
BOUNCE_FORMAT = """\
From: postmaster@%(failedDomain)s
To: %(failedFrom)s
Subje... |
jwomeara/mapnik | refs/heads/master | scons/scons-local-2.3.4/SCons/Scanner/Dir.py | 9 | #
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge... |
home-assistant/home-assistant | refs/heads/dev | tests/components/mqtt/test_light.py | 2 | """The tests for the MQTT light platform.
Configuration for RGB Version with brightness:
light:
platform: mqtt
name: "Office Light RGB"
state_topic: "office/rgb1/light/status"
command_topic: "office/rgb1/light/switch"
brightness_state_topic: "office/rgb1/brightness/status"
brightness_command_topic: "offic... |
bforbis/thrift | refs/heads/master | test/features/theader_binary.py | 41 | #!/usr/bin/env python
import argparse
import socket
import sys
from util import add_common_args
from local_thrift import thrift # noqa
from thrift.Thrift import TMessageType, TType
from thrift.transport.TSocket import TSocket
from thrift.transport.TTransport import TBufferedTransport, TFramedTransport
from thrift.pr... |
sfcta/BikeRouter | refs/heads/master | Bike Model/bike_assign_master_cfg.py | 2 | import os, time, string
from UserDict import UserDict
from math import sqrt, exp
from numpy import *
import multiprocessing, random
import bikeAssign.misc as rm_misc
from bikeAssign.choice_set.beta_unif_randomizer import BetaUnifRandomizer
class BikeAssignMasterCfg(UserDict):
"""compile configuration data"""
def _... |
apendleton/django-pipeline | refs/heads/master | setup.py | 2 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.3.12',
description='Pipeline is an asset packaging library for Django.',
long_description=open('README.rst').read() + '\n\n' +
open('HISTORY.rst').read(),
author='Timothée Peignier... |
asljivo1/802.11ah-ns3 | refs/heads/master | ns-3/src/spectrum/bindings/modulegen__gcc_ILP32.py | 38 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
RoelAdriaans-B-informed/website | refs/heads/10.0 | website_sale_collapse_categories/controllers/__init__.py | 35 | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import main
|
yaroslavvb/tensorflow | refs/heads/master | tensorflow/python/ops/io_ops.py | 19 | # 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... |
rajashreer7/autotest-client-tests | refs/heads/master | linux-tools/rpm_test/rpmvercomp.py | 4 | #!/usr/bin/python
# Reads in package header, compares to installed package.
# Usage:
# python vercompare.py rpm_file.rpm
import rpm, os, sys
def readRpmHeader(ts, filename):
""" Read an rpm header. """
fd = os.open(filename, os.O_RDONLY)
h = ts.hdrFromFdno(fd)
os.close(fd)
return h
ts = rpm.TransactionSet(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.