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 |
|---|---|---|---|---|---|
tik0/inkscapeGrid | share/extensions/previous_glyph_layer.py | 6 | 1479 | #!/usr/bin/env python
'''
Copyright (C) 2011 Felipe Correa da Silva Sanches
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.
T... | gpl-2.0 |
sharbison3/python-docs-samples | appengine/flexible/django_cloudsql/mysite/urls.py | 8 | 1069 | # Copyright 2015 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 |
alfayez/gnuradio | gr-audio/examples/python/spectrum_inversion.py | 10 | 2422 | #!/usr/bin/env python
#
# Copyright 2004,2005,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your ... | gpl-3.0 |
tmerrick1/spack | var/spack/repos/builtin/packages/sniffles/package.py | 5 | 1968 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
AICP/external_chromium_org | native_client_sdk/src/build_tools/tests/test_server.py | 170 | 2165 | # 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 multiprocessing
import os
import SimpleHTTPServer
class LocalHTTPServer(object):
"""Class to start a local HTTP server as a child process."""
... | bsd-3-clause |
Mirantis/solar | solar/dblayer/gevent_patches.py | 3 | 1348 | # Copyright 2015 Mirantis, 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 ... | apache-2.0 |
b0ttl3z/SickRage | lib/hachoir_metadata/video.py | 57 | 15504 | from hachoir_core.field import MissingField
from hachoir_metadata.metadata import (registerExtractor,
Metadata, RootMetadata, MultipleMetadata)
from hachoir_metadata.metadata_item import QUALITY_GOOD
from hachoir_metadata.safe import fault_tolerant
from hachoir_parser.video import MovFile, AsfFile, FlvFile
from hac... | gpl-3.0 |
guildai/guild | guild/external/pip/_internal/req/req_install.py | 8 | 43743 | from __future__ import absolute_import
import io
import logging
import os
import re
import shutil
import sys
import sysconfig
import traceback
import zipfile
from distutils.util import change_root
from email.parser import FeedParser # type: ignore
from pip._vendor import pkg_resources, pytoml, six
from pip._vendor.p... | apache-2.0 |
meou/rdb2csv | rdb2csv/csv_callback.py | 1 | 2955 | #!/usr/bin/env python
import sys
from rdbtools import RdbCallback
class CsvCallback(RdbCallback):
def __init__(self, outf, pre, post, column_delimiter = ',', line_delimiter = '\n'):
self.outf = outf
self.column_delimiter = column_delimiter
self.line_delimiter = line_delimiter
self.pre_keys = tuple(p... | mit |
avedaee/DIRAC | WorkloadManagementSystem/DB/test/TestSandboxDB.py | 1 | 1326 | import unittest,zlib
from DIRAC.WorkloadManagementSystem.DB.SandboxDB import SandboxDB
class JobDBTestCase(unittest.TestCase):
""" Base class for the SandboxDB test cases
"""
def setUp(self):
print
self.sDB = SandboxDB('Test',20)
class SandboxCase(JobDBTestCase):
""" TestJobDB represents a te... | gpl-3.0 |
aristanetworks/arista-ovs-quantum | quantum/extensions/_qos_view.py | 12 | 1772 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2011 Cisco Systems, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache... | apache-2.0 |
mmazanec22/too-windy | env/lib/python3.5/site-packages/requests/packages/chardet/charsetgroupprober.py | 2929 | 3791 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 ... | gpl-3.0 |
xutian/virt-test | shared/scripts/virtio_console_guest.py | 9 | 50746 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Auxiliary script used to send data between ports on guests.
:copyright: 2010 Red Hat, Inc.
:author: Jiri Zupka (jzupka@redhat.com)
:author: Lukas Doktor (ldoktor@redhat.com)
"""
import threading
from threading import Thread
import os
import select
import re
import random
i... | gpl-2.0 |
DevicePilot/synth | synth/devices/tracker.py | 1 | 5816 | """
tracker
=====
Tracks a target value in a controlled way. Can be used to simulate patterns of e.g. heating or cooking etc.
Configurable parameters::
{
output_property : "temp" (or whatever)
min_value : Minimum value of output
max_value : Maximum value of output
... | mit |
codificat/sos | sos/plugins/x11.py | 4 | 1225 | # 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 hope that it will be useful,
# but... | gpl-2.0 |
fefifofum/android_kernel_bq_maxwell2plus | 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 |
redcodesick/wifite | wifite.py | 56 | 98589 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
wifite
author: derv82 at gmail
Licensed under the GNU General Public License Version 2 (GNU GPL v2),
available at: http://www.gnu.org/licenses/gpl-2.0.txt
(C) 2011 Derv Merkler
-----------------
TODO:
ignore root check when -cracked (afterward) (nee... | gpl-2.0 |
mspark93/VTK | Filters/Core/Testing/Python/combStreamers2.py | 15 | 2257 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetR... | bsd-3-clause |
fhe-odoo/odoo | addons/mail/mail_vote.py | 439 | 1647 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
kalvdans/scipy | scipy/linalg/lapack.py | 12 | 8575 | """
Low-level LAPACK functions (:mod:`scipy.linalg.lapack`)
=======================================================
This module contains low-level functions from the LAPACK library.
The `*gegv` family of routines have been removed from LAPACK 3.6.0
and have been deprecated in SciPy 0.17.0. They will be removed in
a f... | bsd-3-clause |
paninetworks/neutron | neutron/tests/tempest/services/identity/v3/json/endpoints_client.py | 23 | 3361 | # Copyright 2013 OpenStack Foundation
# 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 requ... | apache-2.0 |
kawamon/hue | desktop/core/ext-py/celery-4.2.1/celery/events/snapshot.py | 3 | 3401 | # -*- coding: utf-8 -*-
"""Periodically store events in a database.
Consuming the events as a stream isn't always suitable
so this module implements a system to take snapshots of the
state of a cluster at regular intervals. There's a full
implementation of this writing the snapshots to a database
in :mod:`djcelery.sn... | apache-2.0 |
titom1986/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/veoh.py | 13 | 4826 | from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..utils import (
compat_urllib_request,
int_or_none,
ExtractorError,
)
class VeohIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?veoh\.com/(?:watch|iphone/#_Watch)/(?P<id>(?:v|yapi-)[\da-zA-Z]+)'
... | gpl-3.0 |
yurri92/MPLS-inventory-management | MPLSinventory/tools.py | 1 | 14446 | from __future__ import print_function
import os
import json
import csv
import re
from copy import copy
from tqdm import tqdm
COMPILED_REGEXES = {}
def search(regex, thing):
""" Regex search anything.
Determine what class the thing is and convert that to a string or list of strings
retur... | mit |
tseaver/gcloud-python | vision/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py | 1 | 4686 | # -*- coding: utf-8 -*-
#
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 |
kmaglione/olympia | apps/editors/urls.py | 13 | 3948 | from django.conf.urls import url
from addons.urls import ADDON_ID
from editors import views, views_themes
# All URLs under /editors/
urlpatterns = (
url(r'^$', views.home, name='editors.home'),
url(r'^queue$', views.queue, name='editors.queue'),
url(r'^queue/nominated$', views.queue_nominated,
na... | bsd-3-clause |
MicroTrustRepos/microkernel | src/l4/pkg/python/contrib/Lib/test/test_heapq.py | 56 | 13195 | """Unittests for heapq."""
import random
import unittest
from test import test_support
import sys
# We do a bit of trickery here to be able to test both the C implementation
# and the Python implementation of the module.
# Make it impossible to import the C implementation anymore.
sys.modules['_heapq'] = 0
# We must... | gpl-2.0 |
vslavik/bakefile | tests/conftest.py | 1 | 1534 | #
# This file is part of Bakefile (http://bakefile.org)
#
# Copyright (C) 2008-2013 Vaclav Slavik
#
# 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... | mit |
MRigal/django | django/contrib/gis/gdal/prototypes/raster.py | 320 | 4013 | """
This module houses the ctypes function prototypes for GDAL DataSource (raster)
related data structures.
"""
from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p
from functools import partial
from django.contrib.gis.gdal.libgdal import GDAL_VERSION, std_call
from django.contrib.gis.gdal.prototypes.genera... | bsd-3-clause |
rajashreer7/autotest-client-tests | linux-tools/diffutils/diffutils.py | 4 | 1176 | #!/bin/python
import os, subprocess
import logging
from autotest.client import test
from autotest.client.shared import error
class diffutils(test.test):
"""
Autotest module for testing basic functionality
of diffutils
@author Shoji Sugiyama (shoji@jp.ibm.com)
"""
version = 1
nfail = 0
... | gpl-2.0 |
vickenty/ookoobah | ookoobah/camera.py | 1 | 2347 | from __future__ import division
from pyglet.gl import *
from random import uniform
from euclid import Vector3
from spring import Spring
class Camera (object):
SPEED = 0.1
CLIP = 0.01
def __init__(self, eye, center, up):
self.eye = Spring(eye, self.SPEED, self.CLIP)
self.vec = Spring(cent... | mit |
cricketclubucd/davisdragons | platform-tools/systrace/catapult/telemetry/third_party/web-page-replay/third_party/dns/edns.py | 248 | 4312 | # Copyright (C) 2009 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation 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 PROVIDED "AS IS" AND NOMIN... | mit |
yawnosnorous/python-for-android | python-build/python-libs/gdata/src/gdata/Crypto/Util/test.py | 228 | 18297 | #
# test.py : Functions used for testing the modules
#
# Part of the Python Cryptography Toolkit
#
# Distribute and use freely; there are no restrictions on further
# dissemination and usage except those imposed by the laws of your
# country of residence. This software is provided "as is" without
# warranty of fitn... | apache-2.0 |
lukeiwanski/tensorflow | tensorflow/contrib/feature_column/__init__.py | 42 | 1502 | # Copyright 2018 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 |
PokeHunterProject/pogom-updated | pogom/pgoapi/protos/POGOProtos/Map/Fort/FortRenderingType_pb2.py | 16 | 1781 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Map/Fort/FortRenderingType.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google... | mit |
durai145/youtube-dl | youtube_dl/extractor/myvideo.py | 87 | 6273 | from __future__ import unicode_literals
import binascii
import base64
import hashlib
import re
import json
from .common import InfoExtractor
from ..compat import (
compat_ord,
compat_urllib_parse,
compat_urllib_parse_unquote,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class... | unlicense |
nwiizo/workspace_2017 | ansible-modules-core/network/cumulus/cl_img_install.py | 12 | 10956 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.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... | mit |
nemomobile-apps/scummvm | devtools/tasmrecover/tasm/cpp.py | 26 | 20440 | # ScummVM - Graphic Adventure Engine
#
# ScummVM is the legal property of its developers, whose names
# are too numerous to list here. Please refer to the COPYRIGHT
# file distributed with this source distribution.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU ... | gpl-2.0 |
sufeiou/three.js | utils/exporters/blender/addons/io_three/exporter/_json.py | 296 | 6976 | import json
from .. import constants
ROUND = constants.DEFAULT_PRECISION
## THREE override function
def _json_floatstr(o):
if ROUND is not None:
o = round(o, ROUND)
return '%g' % o
def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
_key_separator, _item_separator,... | mit |
40223225/2015-cdb-g3-test2- | static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_break.py | 785 | 8138 | import gc
import io
import os
import sys
import signal
import weakref
import unittest
@unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
@unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
@unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
"if threa... | gpl-3.0 |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/pandas/core/config.py | 3 | 23248 | """
The config module holds package-wide configurables and provides
a uniform API for working with them.
Overview
========
This module supports the following requirements:
- options are referenced using keys in dot.notation, e.g. "x.y.option - z".
- keys are case-insensitive.
- functions should accept partial/regex k... | apache-2.0 |
zakuro9715/lettuce | tests/integration/lib/Django-1.2.5/django/contrib/localflavor/it/forms.py | 273 | 3027 | """
IT-specific Form helpers
"""
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
from django.contrib.localflavor.it.... | gpl-3.0 |
nitin-cherian/LifeLongLearning | Python/Experiments/JINJA/RealPython/jinja_env/lib/python3.5/site-packages/pip/basecommand.py | 341 | 11910 | """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... | mit |
fluks/youtube-dl | youtube_dl/extractor/globo.py | 22 | 19393 | # coding: utf-8
from __future__ import unicode_literals
import random
import math
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_chr,
compat_ord,
)
from ..utils import (
ExtractorError,
float_or_none,
)
class GloboIE(InfoExtractor):
_VALID_URL = 'https?://.+?\.gl... | unlicense |
NikNitro/Python-iBeacon-Scan | sympy/polys/tests/test_polyoptions.py | 38 | 11959 | """Tests for options manager for :class:`Poly` and public API functions. """
from sympy.polys.polyoptions import (
Options, Expand, Gens, Wrt, Sort, Order, Field, Greedy, Domain,
Split, Gaussian, Extension, Modulus, Symmetric, Strict, Auto,
Frac, Formal, Polys, Include, All, Gen, Symbols, Method)
from sym... | gpl-3.0 |
tomkralidis/OWSLib | owslib/feature/schema.py | 3 | 5536 | # =============================================================================
# OWSLib. Copyright (C) 2015 Jachym Cepicky
#
# Contact email: jachym.cepicky@gmail.com
#
# =============================================================================
"""
Set of functions, which are suitable for DescribeFeatureType parsi... | bsd-3-clause |
steebchen/youtube-dl | youtube_dl/extractor/cliprs.py | 81 | 1030 | # coding: utf-8
from __future__ import unicode_literals
from .onet import OnetBaseIE
class ClipRsIE(OnetBaseIE):
_VALID_URL = r'https?://(?:www\.)?clip\.rs/(?P<id>[^/]+)/\d+'
_TEST = {
'url': 'http://www.clip.rs/premijera-frajle-predstavljaju-novi-spot-za-pesmu-moli-me-moli/3732',
'md5': 'c41... | unlicense |
VcamX/grpc | src/python/grpcio/tests/unit/_junkdrawer/__init__.py | 1496 | 1530 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause |
Abhinav117/pymtl | accel/strsearch/StrSearchOO.py | 7 | 2441 | #=========================================================================
# StrSearchOO.py
#=========================================================================
#-------------------------------------------------------------------------
# StrSearchMath
#------------------------------------------------------------... | bsd-3-clause |
shingonoide/odoo | addons/point_of_sale/report/pos_invoice.py | 317 | 2393 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
daliwangi/bitcoin | test/functional/txn_clone.py | 32 | 7658 | #!/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.
"""Test the wallet accounts properly when there are cloned transactions with malleated scriptsigs."""
fro... | mit |
jevonearth/rtpproxy | python/sippy_lite/sippy/Rtp_proxy_client.py | 2 | 10170 | # Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved.
# Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistrib... | bsd-2-clause |
TinghuiWang/pyActLearn | pyActLearn/learning/nn/sda.py | 1 | 15121 | import logging
import numpy as np
import tensorflow as tf
from .layers import AutoencoderLayer, HiddenLayer, SoftmaxLayer
from .injectors import BatchInjector
from .criterion import MonitorBased, ConstIterations
logger = logging.getLogger(__name__)
class SDA:
"""Stacked Auto-encoder
Args:
num_featur... | bsd-3-clause |
CCrypto/ccvpn3 | payments/backends/stripe.py | 1 | 7750 | import json
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from .base import BackendBase
class StripeBackend(BackendBase):
backend_id = 'stripe'
backend_verbose_name = _("Stripe")
backend_display_name = _("Credit Card")
backend_has_recurring = Tr... | mit |
Vaidyanath/tempest | tempest/api/volume/test_volumes_snapshots.py | 1 | 8416 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 |
rembo10/headphones | lib/cherrypy/lib/reprconf.py | 53 | 14704 | """Generic configuration system using unrepr.
Configuration data may be supplied as a Python dictionary, as a filename,
or as an open file object. When you supply a filename or file, Python's
builtin ConfigParser is used (with some extensions).
Namespaces
----------
Configuration keys are separated into namespaces b... | gpl-3.0 |
indradhanush/filesync-server | src/rpcdb/dal_backend.py | 6 | 16812 | # Copyright 2008-2015 Canonical
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed... | agpl-3.0 |
mgit-at/ansible | lib/ansible/modules/network/f5/bigip_profile_http_compression.py | 3 | 16178 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, 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 |
nitzmahone/ansible | lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py | 20 | 19863 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 |
swarna-k/MyDiary | flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py | 1777 | 19348 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | bsd-3-clause |
ccxt/ccxt | python/ccxt/digifinex.py | 1 | 55044 | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | mit |
Ritiek/Spotify-Downloader | spotdl/tests/test_config.py | 1 | 2266 | import spotdl.config
import argparse
import os
import sys
import yaml
import pytest
@pytest.mark.xfail
@pytest.fixture(scope="module")
def config_path(tmpdir_factory):
config_path = os.path.join(str(tmpdir_factory.mktemp("config")), "config.yml")
return config_path
@pytest.mark.xfail
@pytest.fixture(scope=... | mit |
elkingtonmcb/django | django/conf/locale/pt/formats.py | 504 | 1717 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y'
TIME_FORMAT = '... | bsd-3-clause |
Galarzaa90/NabBot | cogs/utils/messages.py | 1 | 24857 | # Copyright 2019 Allan Galarza
#
# 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 writi... | apache-2.0 |
dushu1203/chromium.src | chrome/browser/resources/chromeos/chromevox/tools/chromevox_webstore_util.py | 10 | 4789 | #!/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.
'''A set of utilities to interface with the Chrome Webstore API.'''
import SimpleHTTPServer
import SocketServer
import httplib
import... | bsd-3-clause |
drue/ansible-modules-core | source_control/hg.py | 3 | 8624 | #!/usr/bin/python
#-*- coding: utf-8 -*-
# (c) 2013, Yeukhon Wong <yeukhon@acm.org>
# (c) 2014, Nate Coraor <nate@bx.psu.edu>
#
# This module was originally inspired by Brad Olson's ansible-module-mercurial
# <https://github.com/bradobro/ansible-module-mercurial>. This module tends
# to follow the git module implement... | gpl-3.0 |
asanfilippo7/osf.io | website/addons/figshare/messages.py | 2 | 2990 | # MODEL MESSAGES :model.py
BEFORE_PAGE_LOAD_PRIVATE_NODE_MIXED_FS = 'Warning: This OSF {category} is private but figshare project {project_id} may contain some public files or filesets.'
BEFORE_PAGE_LOAD_PUBLIC_NODE_MIXED_FS = 'Warning: This OSF {category} is public but figshare project {project_id} may contain some p... | apache-2.0 |
wallace123/docker-time | docker-time.py | 1 | 1649 | """ Searches docker binaries and edits the timestamp """
import os
import sys
import argparse
import re
from datetime import datetime
ONE_GB = 1024*1024*1024
def readFile(infile):
if os.stat(infile).st_size > ONE_GB:
print "File size too big...exiting"
sys.exit(0)
with open(infile, 'r') as... | gpl-3.0 |
iModels/ffci | github/tests/AuthenticatedUser.py | 1 | 16898 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | mit |
Distrotech/buck | third-party/py/setuptools/pkg_resources/_vendor/packaging/_structures.py | 906 | 1809 | # Copyright 2014 Donald Stufft
#
# 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, so... | apache-2.0 |
FFMG/myoddweb.piger | monitor/api/python/Python-3.7.2/Lib/idlelib/idle_test/test_delegator.py | 11 | 1567 | "Test delegator, coverage 100%."
from idlelib.delegator import Delegator
import unittest
class DelegatorTest(unittest.TestCase):
def test_mydel(self):
# Test a simple use scenario.
# Initialize an int delegator.
mydel = Delegator(int)
self.assertIs(mydel.delegate, int)
s... | gpl-2.0 |
sudkannan/xen-hv | tools/python/logging/logging-0.4.9.2/logging/config.py | 42 | 11911 | # Copyright 2001-2004 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... | gpl-2.0 |
da1z/intellij-community | python/helpers/epydoc/docstringparser.py | 91 | 45421 | # epydoc -- Docstring processing
#
# Copyright (C) 2005 Edward Loper
# Author: Edward Loper <edloper@loper.org>
# URL: <http://epydoc.sf.net>
#
# $Id: docstringparser.py 1689 2008-01-30 17:01:02Z edloper $
"""
Parse docstrings and handle any fields it defines, such as C{@type}
and C{@author}. Fields are used to descr... | apache-2.0 |
cwhanse/pvlib-python | pvlib/spectrum/spectrl2.py | 3 | 18269 | r"""
The ``spectrl2`` module implements the Bird Simple Spectral Model.
"""
import pvlib
from pvlib.tools import cosd
import numpy as np
import pandas as pd
# SPECTRL2 extraterrestrial spectrum and atmospheric absorption coefficients
_SPECTRL2_COEFFS = np.zeros(122, dtype=np.dtype([
('wavelength', 'float64'),
... | bsd-3-clause |
dgzurita/odoo | addons/l10n_fr/l10n_fr.py | 336 | 2089 | # -*- 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 |
mathstuf/udiskie | udiskie/locale.py | 2 | 1105 | """
I18n utilities.
"""
import gettext
__all__ = ['_']
class Translator(object):
"""
Simple translation and message formatting utility.
"""
@classmethod
def create(cls, domain, localedir=None, languages=None):
"""
Create a new translator for the given domain.
Argument... | mit |
gfreed/android_external_chromium-org | chrome/common/extensions/docs/server2/cache_chain_object_store_test.py | 154 | 8532 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from cache_chain_object_store import CacheChainObjectStore
from test_object_store import TestObjectStore
import unittest
class CacheCh... | bsd-3-clause |
midma101/AndIWasJustGoingToBed | .venv/lib/python2.7/site-packages/pbr/tests/test_setup.py | 4 | 14278 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# 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 obta... | mit |
ThisIsRobokitty/sound-particle-generator | src/input/proj3keyboardinput.py | 1 | 2957 | '''
Implements mixer to play sound files, sounds can be mapped to keyboard input
Necessary to have sounds files in same file directory
Links to sound libraries:
http://www.findsounds.com/
http://soundcavern.free.fr/guitar/
'''
import pygame,random, array
from pygame.locals import *
xmax = 1000 #width of window
yma... | mit |
ElDeveloper/scikit-learn | sklearn/pipeline.py | 61 | 21271 | """
The :mod:`sklearn.pipeline` module implements utilities to build a composite
estimator, as a chain of transforms and estimators.
"""
# Author: Edouard Duchesnay
# Gael Varoquaux
# Virgile Fritsch
# Alexandre Gramfort
# Lars Buitinck
# Licence: BSD
from collections import defaultdict... | bsd-3-clause |
CalebSLane/openelisglobal-core | liquibase/OE2.9/testCatalogHT_LNSP/scripts/sampleType.py | 6 | 1886 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
existing_types = []
sample_types = []
sample_type_file = open("sampleType.txt")
existing_types_file = open("currentSampleTypes.txt")
results = open("output/sampleTypeOutput.txt", 'w')
def write_massive_type_of_sample():
results.write("\nPaste following... | mpl-2.0 |
vedsarkushwaha/KBH_NELL | predicate_extraction_node_matching.py | 1 | 3299 | from read_data import read_graph_nodes,read_relation_name
import os
from nltk.stem.snowball import SnowballStemmer
from nltk import word_tokenize
'''
* python file which matches verbs
*
* Copyright 2015 Vedsar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except ... | apache-2.0 |
Muugii05/autokey | src/lib/qtui/enginesettings.py | 50 | 2667 | #!/usr/bin/env python
# coding=UTF-8
#
# Generated by pykdeuic4 from enginesettings.ui on Sun Mar 4 11:39:39 2012
#
# WARNING! All changes to this file will be lost.
from PyKDE4 import kdecore
from PyKDE4 import kdeui
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
... | gpl-3.0 |
blaze33/django | django/views/decorators/clickjacking.py | 550 | 1759 | from functools import wraps
from django.utils.decorators import available_attrs
def xframe_options_deny(view_func):
"""
Modifies a view function so its response has the X-Frame-Options HTTP
header set to 'DENY' as long as the response doesn't already have that
header set.
e.g.
@xframe_optio... | bsd-3-clause |
ojengwa/oh-mainline | mysite/bugsets/migrations/0006_skillset_to_text.py | 15 | 12211 | # encoding: 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):
# Adding field 'AnnotatedBug.skill_list'
db.add_column('bugsets_annotatedbug', 'skill_list', self.gf('djan... | agpl-3.0 |
katrid/django | tests/template_tests/test_context.py | 166 | 5389 | # -*- coding: utf-8 -*-
from django.http import HttpRequest
from django.template import (
Context, Engine, RequestContext, Template, Variable, VariableDoesNotExist,
)
from django.template.context import RenderContext
from django.test import RequestFactory, SimpleTestCase
class ContextTests(SimpleTestCase):
... | bsd-3-clause |
fbradyirl/home-assistant | homeassistant/components/esphome/fan.py | 2 | 3689 | """Support for ESPHome fans."""
import logging
from typing import List, Optional
from aioesphomeapi import FanInfo, FanSpeed, FanState
from homeassistant.components.fan import (
SPEED_HIGH,
SPEED_LOW,
SPEED_MEDIUM,
SPEED_OFF,
SUPPORT_OSCILLATE,
SUPPORT_SET_SPEED,
FanEntity,
)
from homeassi... | apache-2.0 |
inclement/vispy | examples/demo/gloo/offscreen.py | 18 | 4206 | # -*- coding: utf-8 -*-
# vispy: testskip
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# ----------------------------------------------------------------------------... | bsd-3-clause |
DutchDanny/SensationXL-ICS | 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 |
INBio/ala-install | ansible/roles/web2pyApps/files/db.py | 5 | 11481 | # -*- coding: utf-8 -*-
from pprint import pprint
import sys
import os
from ConfigParser import SafeConfigParser
import urllib2
import json
conf = SafeConfigParser({})
try:
if os.path.isfile("applications/%s/private/localconfig" % request.application):
conf.read("applications/%s/private/localconfig" % requ... | apache-2.0 |
ahachete/gpdb | gpMgmt/bin/gppylib/test/unit/test_unit_leaked_schema_dropper.py | 39 | 2184 | from mock import *
from gp_unittest import *
from gpcheckcat_modules.leaked_schema_dropper import LeakedSchemaDropper
class LeakedSchemaDropperTestCase(GpTestCase):
def setUp(self):
self.db_connection = Mock(spec=['query'])
two_leaked_schemas = Mock()
two_leaked_schemas.getresult.return_... | apache-2.0 |
ryfeus/lambda-packs | LightGBM_sklearn_scipy_numpy/source/scipy/linalg/decomp.py | 9 | 43423 | #
# Author: Pearu Peterson, March 2002
#
# additions by Travis Oliphant, March 2002
# additions by Eric Jones, June 2002
# additions by Johannes Loehnert, June 2006
# additions by Bart Vandereycken, June 2006
# additions by Andrew D Straw, May 2007
# additions by Tiziano Zito, November 2008
#
# April 2010: Functio... | mit |
mila/kudzu | tests/test_logging.py | 1 | 2718 |
from __future__ import absolute_import
import logging
from werkzeug.test import EnvironBuilder
from kudzu import RequestContext, kudzify_handler, kudzify_logger
class HandlerMock(logging.Handler):
"""Logging handler which saves all logged messages."""
def __init__(self):
logging.Handler.__init__(... | bsd-3-clause |
waheedahmed/edx-platform | lms/djangoapps/shoppingcart/management/tests/test_retire_order.py | 60 | 2852 | """Tests for the retire_order command"""
from tempfile import NamedTemporaryFile
from django.core.management import call_command
from course_modes.models import CourseMode
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
from shopping... | agpl-3.0 |
fldc/CouchPotatoServer | libs/CodernityDB/lfu_cache_with_lock.py | 82 | 5486 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.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/L... | gpl-3.0 |
fabianp/scikit-learn | sklearn/linear_model/tests/test_ridge.py | 130 | 22974 | import numpy as np
import scipy.sparse as sp
from scipy import linalg
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_a... | bsd-3-clause |
Automattic/wpcom-connect-examples | flask/run.py | 1 | 2318 | # Example WordPress.com Connect
from flask import Flask
app = Flask(__name__)
from flask import request
from flask import make_response
from flask import abort, redirect, url_for
import urllib
import md5
import random
import string
import requests
wpcc_consts = {
"client_id": 1234, #TODO
"client_secret": "Yo... | unlicense |
jackkiej/SickRage | lib/pgi/cffilib/gir/gifunctioninfo.py | 19 | 2047 | # Copyright 2013 Christoph Reiter
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
from .. import _create_enu... | gpl-3.0 |
Kazade/NeHe-Website | google_appengine/lib/django_1_2/django/contrib/syndication/feeds.py | 65 | 1374 | from django.contrib.syndication import views
from django.core.exceptions import ObjectDoesNotExist
import warnings
# This is part of the deprecated API
from django.contrib.syndication.views import FeedDoesNotExist, add_domain
class Feed(views.Feed):
"""Provided for backwards compatibility."""
def __init__(sel... | bsd-3-clause |
patdoyle1/FastMath | lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/sbcharsetprober.py | 2927 | 4793 | ######################## 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... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.