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 |
|---|---|---|---|---|---|
mcardillo55/django | django/contrib/gis/geos/prototypes/topology.py | 338 | 2145 | """
This module houses the GEOS ctypes prototype functions for the
topological operations on geometries.
"""
from ctypes import c_double, c_int
from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory
from django.contrib.gis.geos.prototypes.errcheck import (
check_geom, check_minus_one, check_string... | bsd-3-clause |
nburn42/tensorflow | tensorflow/python/training/tensorboard_logging_test.py | 132 | 4456 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Bourneer/scrapy | scrapy/utils/console.py | 70 | 2754 | from functools import wraps
from collections import OrderedDict
def _embed_ipython_shell(namespace={}, banner=''):
"""Start an IPython Shell"""
try:
from IPython.terminal.embed import InteractiveShellEmbed
from IPython.terminal.ipapp import load_default_config
except ImportError:
fr... | bsd-3-clause |
ptisserand/ansible | hacking/tests/gen_distribution_version_testcase.py | 63 | 1905 | #!/usr/bin/env python
"""
This script generated test_cases for test_distribution_version.py.
To do so it outputs the relevant files from /etc/*release, the output of platform.dist() and the current ansible_facts regarding the distribution version.
This assumes a working ansible version in the path.
"""
import platf... | gpl-3.0 |
mezz64/home-assistant | homeassistant/components/volkszaehler/sensor.py | 19 | 4129 | """Support for consuming values for the Volkszaehler API."""
from datetime import timedelta
import logging
from volkszaehler import Volkszaehler
from volkszaehler.exceptions import VolkszaehlerApiConnectionError
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.co... | apache-2.0 |
gvnn3/PCS | scripts/ptptimes.py | 1 | 3112 | #!/usr/bin/env python
# Copyright (c) 2012-2016, Neville-Neil Consulting
# 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... | bsd-3-clause |
alex-robbins/micropython | examples/hwapi/soft_pwm.py | 43 | 1367 | import utime
from hwconfig import LED
# Using sleep_ms() gives pretty poor PWM resolution and
# brightness control, but we use it in the attempt to
# make this demo portable to even more boards (e.g. to
# those which don't provide sleep_us(), or provide, but
# it's not precise, like would be on non realtime OSes).
# ... | mit |
dentaku65/plugin.video.sod | servers/ultramegabit.py | 42 | 1290 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para ultramegabit
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core ... | gpl-3.0 |
Celtoys/pycgen | pycgen.py | 1 | 5990 |
#
# Copyright 2014 Celtoys Ltd
#
# 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 writin... | apache-2.0 |
kyleknap/boto | boto/ec2/instancestatus.py | 181 | 6854 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without... | mit |
chromium2014/src | build/android/pylib/base/base_test_result_unittest.py | 134 | 2817 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittests for TestRunResults."""
import unittest
from pylib.base.base_test_result import BaseTestResult
from pylib.base.base_test_result import Test... | bsd-3-clause |
skudriashev/incubator-airflow | tests/contrib/hooks/test_jdbc_hook.py | 12 | 1690 | # -*- coding: utf-8 -*-
#
# 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 |
Lokke/eden | modules/feedparser.py | 22 | 155418 | """Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit https://code.google.com/p/feedparser/ for the latest version
Visit http://packages.python.org/feedparser/ for the latest documentation
Required: Python 2.4 or later
Recommended: iconv_codec <http://cjkpython.i18n.org... | mit |
xzYue/odoo | addons/account/wizard/account_invoice_state.py | 340 | 2875 | # -*- 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 |
CompMusic/essentia | test/src/unittest/standard/test_unaryoperator.py | 10 | 3671 | #!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), e... | agpl-3.0 |
murraymeehan/marsyas | scripts/createMarSystem.py | 3 | 2266 | #!/usr/bin/env python
'''
Script to generate skeleton files for a new MarSystem.
Usage:
createMarSystem.py NameOfNewMarSystem
This will create the files NameOfNewMarSystem.h and NameOfNewMarSystem.cpp
if the current directory.
'''
import os
import sys
def create_from_template(template_file, template_name, tar... | gpl-2.0 |
jcoady9/python-for-android | python3-alpha/python3-src/Lib/test/test_os.py | 47 | 46096 | # As a test suite for the os module, this is woefully inadequate, but this
# does add tests for a few functions which have been determined to be more
# portable than they had been thought to be.
import os
import errno
import unittest
import warnings
import sys
import signal
import subprocess
import time
import shutil
... | apache-2.0 |
h00dy/Diamond | src/collectors/redisstat/redisstat.py | 22 | 10479 | # coding=utf-8
"""
Collects data from one or more Redis Servers
#### Dependencies
* redis
#### Notes
The collector is named an odd redisstat because of an import issue with
having the python library called redis and this collector's module being called
redis, so we use an odd name for this collector. This doesn't... | mit |
JoachimVandersmissen/CodingSolutions | python/PythonForEveryone/chapter3/22.py | 1 | 1199 | month = int(input("Please enter your birthday month"))
day = int(input("Please enter your birthday day"))
if month == 1:
if day < 20:
print("Capricorn")
else:
print("Aquarius")
if month == 2:
if day < 20:
print("Aquarius")
else:
print("Pisces")
if month == 3:
if day <... | apache-2.0 |
slohse/ansible | lib/ansible/modules/network/vyos/vyos_facts.py | 37 | 8854 | #!/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... | gpl-3.0 |
cespare/pastedown | vendor/pygments/pygments/lexers/_luabuiltins.py | 26 | 6863 | # -*- coding: utf-8 -*-
"""
pygments.lexers._luabuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains the names and modules of lua functions
It is able to re-generate itself, but for adding new functions you
probably have to add some callbacks (see function module_callbacks).
Do not edit th... | mit |
adsorensen/girder | tests/cases/path_utilities_test.py | 3 | 2095 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 |
Dreamsolution/django-auth-policy | testsite/views.py | 1 | 2666 | import logging
from django.conf import settings
from django.http import HttpResponseRedirect, HttpResponse
from django.template.response import TemplateResponse
from django.utils.http import is_safe_url
from django.shortcuts import resolve_url
from django.views.decorators.debug import sensitive_post_parameters
from dj... | bsd-3-clause |
vlegoff/tsunami | src/test/secondaires/crafting/test_talent.py | 1 | 2655 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause |
FelixZYY/gyp | pylib/gyp/common.py | 34 | 19170 | # 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.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... | bsd-3-clause |
deka108/meas_deka | assessment/utilities/answer_formatter.py | 2 | 3442 | """
# Name: check_answer_api/utilities/answer_formatter.py
# Description:
# Created by: Martinus Alexander
# Date Created: Nov 30, 2016
# Last Modified: Dec 21, 2016
# Modified by: Martinus Alexander
"""
import re
'''
Splitting a sequence of character into a list of terms.
Used improve trigonometri... | apache-2.0 |
xodus7/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/bijectors/batch_normalization_test.py | 25 | 9994 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
rallylee/gem5 | tests/configs/realview-switcheroo-atomic.py | 64 | 2427 | # Copyright (c) 2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | bsd-3-clause |
Juraci/tempest | tempest/tests/test_list_tests.py | 34 | 1824 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 |
vasyarv/edx-platform | lms/djangoapps/shoppingcart/processors/CyberSource.py | 142 | 19828 | """
Implementation the CyberSource credit card processor.
IMPORTANT: CyberSource will deprecate this version of the API ("Hosted Order Page") in September 2014.
We are keeping this implementation in the code-base for now, but we should
eventually replace this module with the newer implementation (in `CyberSource2.py`)... | agpl-3.0 |
Gamebasis/3DGamebasisServer | GameData/blender-2.71-windows64/2.71/python/lib/plat-unixware7/STROPTS.py | 106 | 6524 | # Generated by h2py from /usr/include/sys/stropts.h
# Included from sys/types.h
def quad_low(x): return x.val[0]
ADT_EMASKSIZE = 8
SHRT_MIN = -32768
SHRT_MAX = 32767
INT_MIN = (-2147483647-1)
INT_MAX = 2147483647
LONG_MIN = (-2147483647-1)
LONG_MAX = 2147483647
OFF32_MAX = LONG_MAX
ISTAT_ASSERTED = 0
ISTAT_ASSUMED = ... | gpl-3.0 |
varunkamra/kuma | vendor/packages/translate/tools/pocount.py | 24 | 12909 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2003-2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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; e... | mpl-2.0 |
kingvuplus/BH-SH4 | mytest.py | 2 | 16609 | import sys, os
if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"):
sys.path.append("/usr/lib/enigma2/python/enigma.zip")
from Tools.Profile import profile, profile_final
profile("PYTHON_START")
import Tools.RedirectOutput
import enigma
import eConsoleImpl
import eBaseImpl
enigma.eTimer = eBaseImpl.eTimer
enigma... | gpl-2.0 |
tdtrask/ansible | test/units/modules/cloud/amazon/test_lambda.py | 57 | 11980 | #
# (c) 2017 Michael De La Rue
#
# 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... | gpl-3.0 |
qwertyezi/Test | text/freeline_core/gradle_inc_build.py | 5 | 43598 | # -*- coding:utf8 -*-
from __future__ import print_function
import os
import shutil
import android_tools
from build_commands import CompileCommand, IncAaptCommand, IncJavacCommand, IncDexCommand
from builder import IncrementalBuilder, Builder
from gradle_tools import get_project_info, GradleDirectoryFinder, GradleSyn... | apache-2.0 |
davidcox/glumpy | demos/demo-heightmap-2.py | 1 | 3540 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Copyright (C) 2009-2010 Nicolas P. Rougier
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#---------------... | bsd-3-clause |
zhuwenping/python-for-android | python-modules/twisted/twisted/words/test/test_jabberxmppstringprep.py | 57 | 4450 | # Copyright (c) 2005 Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
from twisted.words.protocols.jabber.xmpp_stringprep import nodeprep, resourceprep, nameprep, crippled
class XMPPStringPrepTest(unittest.TestCase):
"""
The nodeprep stringprep profile is similar to... | apache-2.0 |
sumanau7/Ele_CC_Sumanau | lib/IPython/extensions/storemagic.py | 9 | 8183 | # -*- coding: utf-8 -*-
"""
%store magic for lightweight persistence.
Stores variables, aliases and macros in IPython's database.
To automatically restore stored variables at startup, add this to your
:file:`ipython_config.py` file::
c.StoreMagics.autorestore = True
"""
from __future__ import print_function
#-----... | apache-2.0 |
h2oai/h2o | py/testdir_release/c3/test_c3_exec_copy.py | 9 | 4111 | import unittest, sys, time
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_import as h2i, h2o_glm, h2o_common, h2o_exec as h2e
import h2o_print
DO_GLM = True
LOG_MACHINE_STATS = False
# fails during exec env push ..second import has to do a key delete (the first)
DO_DOUBLE_IMPORT = False
print "Ass... | apache-2.0 |
marcuskelly/recover | Lib/site-packages/alembic/testing/plugin/bootstrap.py | 43 | 1646 | """
Bootstrapper for nose/pytest plugins.
The entire rationale for this system is to get the modules in plugin/
imported without importing all of the supporting library, so that we can
set up things for testing before coverage starts.
The rationale for all of plugin/ being *in* the supporting library in the
first pla... | bsd-2-clause |
tgsd96/gargnotes | venv/lib/python2.7/site-packages/django/contrib/admin/utils.py | 62 | 16223 | from __future__ import unicode_literals
import datetime
import decimal
from django.contrib.auth import get_permission_codename
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.deletion import Collector
from django.forms.forms import pretty_name
from django.utils imp... | mit |
hollabaq86/haikuna-matata | env/lib/python2.7/site-packages/flask/signals.py | 123 | 2209 | # -*- coding: utf-8 -*-
"""
flask.signals
~~~~~~~~~~~~~
Implements signals based on blinker if available, otherwise
falls silently back to a noop.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
signals_available = False
try:
from blinker import Nam... | mit |
CoolCloud/aliyun-cli | aliyuncli/advance/userConfigHandler.py | 11 | 1850 | __author__ = 'zhaoyang.szy'
import os,sys
import response
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0,parentdir)
import aliyunExtensionCliHandler
class ConfigCmd:
showConfig = 'showConfig'
importConfig = 'importConfig'
exportConfig = 'exportConfig'
name = '... | apache-2.0 |
40223144/2015cdafinal | static/Brython3.1.0-20150301-090019/Lib/stat.py | 765 | 4304 | """Constants/functions for interpreting results of os.stat() and os.lstat().
Suggested usage: from stat import *
"""
# Indices for stat struct members in the tuple returned by os.stat()
ST_MODE = 0
ST_INO = 1
ST_DEV = 2
ST_NLINK = 3
ST_UID = 4
ST_GID = 5
ST_SIZE = 6
ST_ATIME = 7
ST_MTIME = 8
ST_CTIME = 9
... | gpl-3.0 |
ksachs/invenio | modules/bibformat/lib/elements/bfe_url.py | 39 | 1484 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio 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
## ... | gpl-2.0 |
bright-sparks/chromium-spacewalk | build/win/reorder-imports.py | 103 | 1807 | #!/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.
import glob
import optparse
import os
import shutil
import subprocess
import sys
def reorder_imports(input_dir, output_dir, architectu... | bsd-3-clause |
slz/delidded-kernel-5.1.1-note3 | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
ChronoMonochrome/android_external_chromium_org | native_client_sdk/src/build_tools/verify_ppapi.py | 62 | 5922 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Helper script for PPAPI's PRESUBMIT.py to detect if additions or removals of
PPAPI interfaces have been propagated to the Native... | bsd-3-clause |
jtimberman/omnibus | source/libxml2-2.7.7/python/generator.py | 24 | 47525 | #!/usr/bin/python -u
#
# generate python wrappers from the XML API description
#
functions = {}
enums = {} # { enumType: { enumConstant: enumValue } }
import os
import sys
import string
if __name__ == "__main__":
# launched as a script
srcPref = os.path.dirname(sys.argv[0])
else:
# imported
srcPref =... | apache-2.0 |
alexthered/kienhoc-platform | common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py | 107 | 6601 | import logging
import dogstats_wrapper as dog_stats_api
from .grading_service_module import GradingService
from opaque_keys.edx.keys import UsageKey
log = logging.getLogger(__name__)
class PeerGradingService(GradingService):
"""
Interface with the grading controller for peer grading
"""
METRIC_NAME... | agpl-3.0 |
kishikawakatsumi/Mozc-for-iOS | src/third_party/gyp/pylib/gyp/generator/android.py | 3 | 45146 | # 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | apache-2.0 |
bev-a-tron/pledgeservice | lib/stripe/error.py | 17 | 1339 | # Exceptions
class StripeError(Exception):
def __init__(self, message=None, http_body=None, http_status=None,
json_body=None):
super(StripeError, self).__init__(message)
if http_body and hasattr(http_body, 'decode'):
try:
http_body = http_body.decode('u... | agpl-3.0 |
d40223223/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/optparse.py | 728 | 60616 | """A powerful, extensible, and easy-to-use option parser.
By Greg Ward <gward@python.net>
Originally distributed as Optik.
For support, use the optik-users@lists.sourceforge.net mailing list
(http://lists.sourceforge.net/lists/listinfo/optik-users).
Simple usage example:
from optparse import OptionParser
pa... | gpl-3.0 |
Saturn/livestreamer | src/livestreamer/stream/akamaihd.py | 37 | 7880 | import base64
import io
import hashlib
import hmac
import random
from .stream import Stream
from .wrappers import StreamIOThreadWrapper, StreamIOIterWrapper
from ..buffers import Buffer
from ..compat import str, bytes, urlparse
from ..exceptions import StreamError
from ..utils import swfdecompress
from ..packages.fl... | bsd-2-clause |
mgymrek/lobstr-code | scripts/lobSTR_capillary_comparator.py | 1 | 6675 | #!/usr/bin/env python
"""
Compare capillary vs. lobSTR calls
This script is part of lobSTR_validation_suite.sh and
is not mean to be called directly.
"""
import argparse
import numpy as np
import pandas as pd
import sys
from scipy.stats import pearsonr
def ConvertSample(x):
"""
Convert HGDP samples numbers t... | gpl-3.0 |
itsjeyd/edx-platform | common/djangoapps/track/views/tests/test_segmentio.py | 19 | 22011 | """Ensure we can parse events sent to us from the Segment webhook integration"""
from datetime import datetime
import json
from ddt import ddt, data, unpack
from mock import sentinel
from nose.plugins.attrib import attr
from django.contrib.auth.models import User
from django.test.client import RequestFactory
from dj... | agpl-3.0 |
DickJC123/mxnet | example/profiler/profiler_matmul.py | 7 | 2449 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 |
sve-odoo/odoo | addons/sale_mrp/__openerp__.py | 61 | 1935 | # -*- 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 |
BaluDontu/docker-volume-vsphere | esx_service/vsan_policy.py | 1 | 9052 | #!/usr/bin/env python
# Copyright 2016 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 |
eugene373/Galaxy-S2-ICS | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
Ditmar/plugin.video.pelisalacarta | servers/watchfreeinhd.py | 44 | 1983 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para watchfreeinhd
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core... | gpl-3.0 |
adaitche/luigi | test/task_test.py | 13 | 14484 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 |
zhangkun456/TeamTalk | win-client/3rdParty/src/json/test/pyjsontestrunner.py | 257 | 2137 | # Simple implementation of a json test runner to run the test against json-py.
import sys
import os.path
import json
import types
if len(sys.argv) != 2:
print "Usage: %s input-json-file", sys.argv[0]
sys.exit(3)
input_path = sys.argv[1]
base_path = os.path.splitext(input_path)[0]
actual_path = base_path ... | apache-2.0 |
storm-computers/odoo | addons/hw_escpos/escpos/escpos.py | 48 | 31717 | # -*- coding: utf-8 -*-
import time
import copy
import io
import base64
import math
import md5
import re
import traceback
import xml.etree.ElementTree as ET
import xml.dom.minidom as minidom
from PIL import Image
try:
import jcconv
except ImportError:
jcconv = None
try:
import qrcode
except ImportError... | agpl-3.0 |
uwevil/namebench | nb_third_party/dns/opcode.py | 248 | 2615 | # Copyright (C) 2001-2007, 2009, 2010 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 ... | apache-2.0 |
EdDev/vdsm | lib/vdsm/network/errors.py | 1 | 2525 | #
# Copyright 2011-2014 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 ... | gpl-2.0 |
seize-the-dave/XlsxWriter | xlsxwriter/test/comparison/test_rich_string07.py | 8 | 1570 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause |
dreamapplehappy/myblog | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_scilab_builtins.py | 364 | 31261 | # -*- coding: utf-8 -*-
"""
pygments.lexers._scilab_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the ScilabLexer.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
# These lists are generated automatically.
# Run the follo... | mit |
catchmrbharath/servo | tests/wpt/harness/wptrunner/update/update.py | 118 | 5053 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os
import sys
from metadata import MetadataUpdateRunner
from sync import SyncFromUpstreamRunner
from tree import... | mpl-2.0 |
odooindia/odoo | openerp/tools/func.py | 49 | 3346 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010, 2014 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you c... | agpl-3.0 |
FlorentChamault/My_sickbeard | lib/requests/packages/oauthlib/oauth1/rfc5849/utils.py | 74 | 3015 | # -*- coding: utf-8 -*-
"""
oauthlib.utils
~~~~~~~~~~~~~~
This module contains utility methods used by various parts of the OAuth
spec.
"""
import string
import urllib2
from oauthlib.common import quote, unquote
UNICODE_ASCII_CHARACTER_SET = (string.ascii_letters.decode('ascii') +
string.digits.decode('ascii')... | gpl-3.0 |
ThePlayground/android_kernel_htc_shooter | 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 |
2014c2g8/c2g8 | wsgi/static/Brython2.1.0-20140419-113919/Lib/collections/abc.py | 739 | 16026 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
Unit tests are in test_collections.
"""
from abc import ABCMeta, abstractmethod
import sys
__all__ = ["Hashable", "Iterable", "Iterator",
... | gpl-2.0 |
simartin/servo | components/script/dom/bindings/codegen/parser/WebIDL.py | 4 | 303096 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
""" A WebIDL parser. """
from ply import lex, yacc
import re
import os
import traceback
import math
import string
from... | mpl-2.0 |
Alwnikrotikz/visvis.dev | core/orientation.py | 5 | 6451 | # -*- coding: utf-8 -*-
# Copyright (C) 2012, Almar Klein
#
# Visvis is distributed under the terms of the (new) BSD License.
# The full license can be found in 'license.txt'.
""" Module baseWobjects
Defines the mix class for orientable wobjects.
"""
import numpy as np
from visvis.core import misc
from visvis.pypoi... | bsd-3-clause |
juanc27/myfavteam | news/nba_news.py | 2 | 9360 | from newspaper import Article, Config
from bs4 import BeautifulSoup
from urllib2 import urlopen
import datetime
import re
from collections import OrderedDict
import pytz
from pytz import timezone
from dateutil.parser import parse
nba_url = "http://www.nba.com"
espn_url = "http://espn.go.com"
#lxml didn't work for es... | mit |
rollokb/django-mailgun | django_mailgun.py | 1 | 5894 | from __future__ import unicode_literals
import six
import requests
from django.conf import settings
from django.core.mail.backends.base import BaseEmailBackend
from django.core.mail.message import sanitize_address
from requests.packages.urllib3.filepost import encode_multipart_formdata
__version__ = '0.7.1'
version ... | mit |
opendatateam/udata | udata/frontend/__init__.py | 1 | 1614 | import inspect
import logging
from importlib import import_module
from jinja2 import Markup
from udata import assets, entrypoints
from .markdown import UdataCleaner, init_app as init_markdown
log = logging.getLogger(__name__)
class SafeMarkup(Markup):
'''Markup object bypasses Jinja's escaping. This override... | agpl-3.0 |
CoDEmanX/ArangoDB | 3rdParty/V8-4.3.61/third_party/python_26/Lib/encodings/iso2022_jp_2.py | 816 | 1061 | #
# iso2022_jp_2.py: Python Unicode Codec for ISO2022_JP_2
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp_2')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class Incrementa... | apache-2.0 |
Zen-CODE/kivybits | Examples/DynamicUI/main.py | 1 | 3087 | """
Small app demonstrating a dynamic UI
Author: ZenCODE
Date: 22/10/2013
"""
from kivy.lang import Builder
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.factory import Factory
class DataSource(object):
"""
This class would be an abstraction of your data source:
the MySQLdb... | mit |
a-parhom/edx-platform | openedx/core/djangoapps/credit/signals.py | 18 | 3705 | """
This file contains receivers of course publication signals.
"""
import logging
from django.dispatch import receiver
from django.utils import timezone
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.signals.signals import COURSE_GRADE_CHANGED
log = logging.getLogger(__name__)
def on_cou... | agpl-3.0 |
mitchellcash/ion | qa/rpc-tests/txn_doublespend.py | 1 | 5059 | #!/usr/bin/env python2
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Copyright (c) 2015-2018 The PIVX developers
# Copyright (c) 2018 The Ion developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test proper acc... | mit |
louisLouL/pair_trading | capstone_env/lib/python3.6/site-packages/pandas/tests/tools/test_numeric.py | 6 | 14437 | import pytest
import decimal
import numpy as np
import pandas as pd
from pandas import to_numeric, _np_version_under1p9
from pandas.util import testing as tm
from numpy import iinfo
class TestToNumeric(object):
def test_empty(self):
# see gh-16302
s = pd.Series([], dtype=object)
res = ... | mit |
Hassan93/openTima | node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py | 2485 | 5536 | # This file comes from
# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py
# Do not edit! Edit the upstream one instead.
"""Python module for generating .ninja files.
Note that this is emphatically not a required piece of Ninja; it's
just a helpful utility for build-file-generation systems that alr... | gpl-2.0 |
alxgu/ansible | lib/ansible/modules/network/netvisor/_pn_trunk.py | 47 | 14298 | #!/usr/bin/python
""" PN CLI trunk-create/trunk-delete/trunk-modify """
#
# 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 y... | gpl-3.0 |
DoubleNegativeVisualEffects/gaffer | python/Gaffer/InfoPathFilter.py | 5 | 2873 | ##########################################################################
#
# Copyright (c) 2012, Image Engine Design 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:
#
# * Red... | bsd-3-clause |
prestonso/intro-graphql | node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/input_test.py | 1841 | 3207 | #!/usr/bin/env python
# Copyright 2013 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.
"""Unit tests for the input.py file."""
import gyp.input
import unittest
import sys
class TestFindCycles(unittest.TestCase):
def setUp(self... | mit |
kefo/moto | moto/dynamodb2/comparisons.py | 4 | 1528 | from __future__ import unicode_literals
# TODO add tests for all of these
EQ_FUNCTION = lambda item_value, test_value: item_value == test_value # flake8: noqa
NE_FUNCTION = lambda item_value, test_value: item_value != test_value # flake8: noqa
LE_FUNCTION = lambda item_value, test_value: item_value <= test_value # ... | apache-2.0 |
zstackorg/zstack-woodpecker | integrationtest/vm/multihosts/bs/test_iso_vm_del_ops_all_expg_hot_migrate.py | 1 | 4687 | '''
Test for deleting vm iso check vm all operations and expunge vm check change os.
@author: SyZhao
'''
import os
import apibinding.inventory as inventory
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecke... | apache-2.0 |
kakunbsc/enigma2.1 | lib/python/Screens/VirtualKeyBoard.py | 2 | 10905 | # -*- coding: iso-8859-1 -*-
from Components.Language import language
from Components.ActionMap import ActionMap
from Components.Label import Label
from Components.Pixmap import Pixmap
from Components.MenuList import MenuList
from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
fr... | gpl-2.0 |
rhjdjong/Slip | tests/integration/test_slip_file_unbuffered.py | 2 | 1139 | # Copyright (c) 2020. Ruud de Jong
# This file is part of the SlipLib project which is released under the MIT license.
# See https://github.com/rhjdjong/SlipLib for details.
# pylint: disable=relative-beyond-top-level
"""Test using SlipStream with an unbuffered file"""
from sliplib import encode, SlipStream
from ... | mit |
ff94315/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/abc.py | 488 | 7145 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) according to PEP 3119."""
import types
from _weakrefset import WeakSet
# Instance of old-style class
class _C: pass
_InstanceType = type(_C())
def abstractmethod(funcobj):
"""A d... | gpl-2.0 |
baylee/django | tests/staticfiles_tests/cases.py | 38 | 4503 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import codecs
import os
import shutil
import tempfile
from django.conf import settings
from django.core.management import call_command
from django.template import Context, Template
from django.test import SimpleTestCase, override_settings
from django.u... | bsd-3-clause |
calroc/Tkinter3D | neat_demo.py | 1 | 1755 | #!/usr/bin/env python
#
# Copyright 2011, 2012, 2013, 2014 Simon Forman
#
# This file is part of Tkinter3D.
#
# Tkinter3D 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 ... | gpl-3.0 |
nanchenchen/emoticon-analysis | emoticonvis/apps/enhance/management/commands/build_tweet_dictionary.py | 1 | 1427 | from django.core.management.base import BaseCommand, make_option, CommandError
from time import time
import path
from django.db import transaction
class Command(BaseCommand):
help = "From Tweet Parser results, extract words and connect with messages for a dataset."
args = '<dataset_id> <parsed_filename> [...]'... | mit |
hamiltont/CouchPotatoServer | libs/oauthlib/oauth1/rfc5849/signature.py | 112 | 19020 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
"""
oauthlib.oauth1.rfc5849.signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module represents a direct implementation of `section 3.4`_ of the spec.
Terminology:
* Client: software interfacing with an OAuth API
* Server: the API provider
* Resource Ow... | gpl-3.0 |
indashnet/InDashNet.Open.UN2000 | android/external/antlr/antlr-3.4/runtime/Python/tests/t047treeparser.py | 20 | 4342 | import unittest
import textwrap
import antlr3
import antlr3.tree
import testbase
class T(testbase.ANTLRTest):
def walkerClass(self, base):
class TWalker(base):
def __init__(self, *args, **kwargs):
base.__init__(self, *args, **kwargs)
self.traces = []
... | apache-2.0 |
hillwoodroc/deepin-music-player | src/common.py | 1 | 3015 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 ~ 2012 Deepin, Inc.
# 2011 ~ 2012 Hou Shaohui
#
# Author: Hou Shaohui <houshao55@gmail.com>
# Maintainer: Hou Shaohui <houshao55@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the ter... | gpl-3.0 |
Stavitsky/neutron | neutron/common/topics.py | 45 | 1863 | # Copyright (c) 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 or agreed to... | apache-2.0 |
hellozt/gnome15 | src/gamewrap/gw/__init__.py | 8 | 4907 | # Gnome15 - Suite of tools for the Logitech G series keyboards and headsets
# Copyright (C) 2011 Brett Smith <tanktarta@blueyonder.co.uk>
#
# 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, e... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.