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 |
|---|---|---|---|---|---|
DSMan195276/protura-binutils | gdb/testsuite/gdb.python/py-pp-maint.py | 32 | 2491 | # Copyright (C) 2010-2015 Free Software Foundation, 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 3 of the License, or
# (at your option) any later version.
#
# This progr... | gpl-2.0 |
2014cdbg14/2014cdbg14 | wsgi/programs/cdbg5/remsub61.py | 5 | 11976 |
import cherrypy
# 這是 REMSUB61 類別的定義
'''
# 在 application 中導入子模組
import programs.cdag5.remsub61 as cdag5_remsub61
# 加入 cdag5 模組下的 remsub61.py 且以子模組 remsub61 對應其 MAIN() 類別
root.cdag5.remsub61 = cdag5_remsub61.MAIN()
# 完成設定後, 可以利用
/cdag5/remsub61/assembly
# 呼叫 remsub61.py 中 MAIN 類別的 assembly 方法
'''
class MAIN(object):
... | gpl-2.0 |
OsirisSPS/osiris-sps | client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/plat-irix6/cdplayer.py | 33 | 3112 | # This file implements a class which forms an interface to the .cdplayerrc
# file that is maintained by SGI's cdplayer program.
#
# Usage is as follows:
#
# import readcd
# r = readcd.Readcd()
# c = Cdplayer(r.gettrackinfo())
#
# Now you can use c.artist, c.title and c.track[trackno] (where trackno
# starts at 1). Whe... | gpl-3.0 |
redhat-openstack/nova | tools/xenserver/destroy_cached_images.py | 42 | 1897 | """
destroy_cached_images.py
This script is used to clean up Glance images that are cached in the SR. By
default, this script will only cleanup unused cached images.
Options:
--dry_run - Don't actually destroy the VDIs
--all_cached - Destroy all cached images instead of just unused cached
... | apache-2.0 |
dimroc/tensorflow-mnist-tutorial | lib/python3.6/site-packages/numpy/polynomial/chebyshev.py | 22 | 62902 | """
Objects for dealing with Chebyshev series.
This module provides a number of objects (mostly functions) useful for
dealing with Chebyshev series, including a `Chebyshev` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in... | apache-2.0 |
nelango/ViralityAnalysis | model/lib/sklearn/tests/test_kernel_ridge.py | 342 | 3027 | import numpy as np
import scipy.sparse as sp
from sklearn.datasets import make_regression
from sklearn.linear_model import Ridge
from sklearn.kernel_ridge import KernelRidge
from sklearn.metrics.pairwise import pairwise_kernels
from sklearn.utils.testing import ignore_warnings
from sklearn.utils.testing import assert... | mit |
Pafcholini/emotion_tw_COI3 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
wfxiang08/django197 | django/core/management/utils.py | 405 | 2590 | from __future__ import unicode_literals
import os
import sys
from subprocess import PIPE, Popen
from django.utils import six
from django.utils.encoding import DEFAULT_LOCALE_ENCODING, force_text
from .base import CommandError
def popen_wrapper(args, os_err_exc_type=CommandError, universal_newlines=True):
"""
... | bsd-3-clause |
YinongLong/scikit-learn | sklearn/decomposition/tests/test_kernel_pca.py | 74 | 8472 | import numpy as np
import scipy.sparse as sp
from sklearn.utils.testing import (assert_array_almost_equal, assert_less,
assert_equal, assert_not_equal,
assert_raises)
from sklearn.decomposition import PCA, KernelPCA
from sklearn.datasets import mak... | bsd-3-clause |
havard024/prego | sales/urls.py | 3 | 7025 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Sales module URLs
"""
from django.conf.urls import patterns, url
urlpatterns = patterns('treeio.sales.views',
url(r'^(\.(?P<response_format>\w+))?$', 'index', name='sales'),
url(r'^index(\.(?P<r... | mit |
denisshockwave/image_processing_ocr_server | venv/lib/python2.7/site-packages/pip/vendor/html5lib/serializer/htmlserializer.py | 79 | 12467 | from __future__ import absolute_import, division, unicode_literals
from pip.vendor.six import text_type
import gettext
_ = gettext.gettext
try:
from functools import reduce
except ImportError:
pass
from ..constants import voidElements, booleanAttributes, spaceCharacters
from ..constants import rcdataElements... | gpl-3.0 |
azaghal/ansible | test/support/integration/plugins/modules/sefcontext.py | 32 | 9795 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ve... | gpl-3.0 |
CSF-JH/crossbarexamples | work/call_from_handler/callee.py | 11 | 2237 | ###############################################################################
##
## Copyright (C) 2014-2015, Tavendo GmbH and/or collaborators. All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met... | apache-2.0 |
eaplatanios/tensorflow | tensorflow/python/eager/graph_callable_test.py | 31 | 8775 | # 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 |
Belxjander/Kirito | Python-3.5.0-Amiga/Lib/test/test_cprofile.py | 8 | 5557 | """Test suite for the cProfile module."""
import sys
from test.support import run_unittest, TESTFN, unlink
# rip off all interesting stuff from test_profile
import cProfile
from test.test_profile import ProfileTest, regenerate_expected_output
from test.profilee import testfunc
class CProfileTest(ProfileTest):
pr... | gpl-3.0 |
gxx/lettuce | tests/integration/lib/Django-1.3/tests/modeltests/custom_columns/tests.py | 92 | 2224 | from django.core.exceptions import FieldError
from django.test import TestCase
from models import Author, Article
class CustomColumnsTests(TestCase):
def test_db_column(self):
a1 = Author.objects.create(first_name="John", last_name="Smith")
a2 = Author.objects.create(first_name="Peter", last_name... | gpl-3.0 |
konstruktoid/ansible-upstream | test/units/modules/network/f5/test_bigip_sys_db.py | 27 | 4070 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import sys
from nose.plugins.skip import SkipTest
i... | gpl-3.0 |
jolevq/odoopub | addons/base_import/models.py | 90 | 13824 | import csv
import itertools
import logging
import operator
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import psycopg2
from openerp.osv import orm, fields
from openerp.tools.translate import _
FIELDS_RECURSION_LIMIT = 2
ERROR_PREVIEW_BYTES = 200
_logger = logging.ge... | agpl-3.0 |
harshilasu/GraphicMelon | y/google-cloud-sdk/lib/googlecloudapis/apitools/base/py/transfer.py | 5 | 25853 | """Upload and download support for apitools."""
import email.generator as email_generator
import email.mime.multipart as mime_multipart
import email.mime.nonmultipart as mime_nonmultipart
import httplib
import io
import json
import mimetypes
import os
import StringIO
import threading
from googlecloudapis.apitools.bas... | gpl-3.0 |
TeachAtTUM/edx-platform | openedx/core/djangoapps/schedules/tests/test_resolvers.py | 18 | 2866 | import datetime
from unittest import skipUnless
import ddt
from django.conf import settings
from mock import Mock
from openedx.core.djangoapps.schedules.resolvers import BinnedSchedulesBaseResolver
from openedx.core.djangoapps.schedules.tests.factories import ScheduleConfigFactory
from openedx.core.djangoapps.site_co... | agpl-3.0 |
afaheem88/rally | tests/unit/common/test_fileutils.py | 18 | 2944 | # Copyright 2013: Mirantis 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 b... | apache-2.0 |
clstl/servo | tests/wpt/web-platform-tests/tools/py/py/_process/cmdexec.py | 273 | 1814 | import sys
import subprocess
import py
from subprocess import Popen, PIPE
def cmdexec(cmd):
""" return unicode output of executing 'cmd' in a separate process.
raise cmdexec.Error exeception if the command failed.
the exception will provide an 'err' attribute containing
the error-output from the comma... | mpl-2.0 |
tgsd96/gargnotes | venv/lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/geom.py | 114 | 4443 | from ctypes import c_char_p, c_int, c_size_t, c_ubyte, POINTER
from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR
from django.contrib.gis.geos.prototypes.errcheck import (
check_geom, check_minus_one, check_sized_string, check_string, check_zero)
from django.contrib.gis.geos.prototypes.threadsafe import G... | mit |
abstract-open-solutions/account-financial-tools | account_invoice_currency/models/account_invoice.py | 27 | 3754 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2004-2011
# Pexego Sistemas Informáticos. (http://pexego.es)
# Zikzakmedia S.L. (http://zikzakmedia.com)
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 |
dirn/ansible | contrib/inventory/vmware.py | 59 | 16907 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
VMware Inventory Script
=======================
Retrieve information about virtual machines from a vCenter server or
standalone ESX host. When `group_by=false` (in the INI file), host systems
are also returned in addition to VMs.
This script will attempt to read conf... | gpl-3.0 |
ladyquartermaine/POSTMan-Chrome-Extension | tests/selenium/pmtests/postman_tests_requests.py | 104 | 23191 | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import selenium.webdriver.chrome.service as service
import tracebac... | apache-2.0 |
camradal/ansible | lib/ansible/modules/network/sros/sros_rollback.py | 21 | 7400 | #!/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 |
syhost/android_kernel_oppo_find7a | tools/perf/util/setup.py | 4998 | 1330 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
pra85/calibre | src/cherrypy/_cpchecker.py | 87 | 14739 | import os
import warnings
import cherrypy
from cherrypy._cpcompat import iteritems, copykeys, builtins
class Checker(object):
"""A checker for CherryPy sites and their mounted applications.
When this object is called at engine startup, it executes each
of its own methods whose names start with ``che... | gpl-3.0 |
Kazade/NeHe-Website | google_appengine/lib/pyasn1/pyasn1/codec/ber/decoder.py | 15 | 32174 | # BER decoder
from pyasn1.type import tag, base, univ, char, useful, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat.octets import oct2int, octs2ints
from pyasn1 import debug, error
class AbstractDecoder:
protoComponent = None
def valueDecoder(self, fullSubstrate, substrate, asn1Spec, tagSet,
... | bsd-3-clause |
AyoubZahid/odoo | addons/purchase/migrations/9.0.1.2/pre-create-properties.py | 101 | 1408 | # -*- coding: utf-8 -*-
def convert_field(cr, model, field, target_model):
table = model.replace('.', '_')
cr.execute("""SELECT 1
FROM information_schema.columns
WHERE table_name = %s
AND column_name = %s
""", (table, field))
if no... | gpl-3.0 |
seleniumbase/SeleniumBase | examples/chart_maker/pie_charts.py | 1 | 2140 | from seleniumbase import BaseCase
class PieCharts(BaseCase):
def test_pie_charts(self):
self.create_presentation(theme="serif", transition="convex")
self.create_pie_chart(labels=False)
self.add_data_point("Meringue Cream", 3, color="#f1eeea")
self.add_data_point("Lemon Filling", 3... | mit |
sam-m888/gramps | gramps/gui/editors/displaytabs/buttontab.py | 5 | 12717 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2009-2011 Gary Burton
#
# 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... | gpl-2.0 |
glneo/gnuradio-davisaf | gr-audio/examples/python/noise.py | 10 | 1929 | #!/usr/bin/env python
#
# Copyright 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 option)
# ... | gpl-3.0 |
retr0h/ansible | lib/ansible/runner/lookup_plugins/nested.py | 174 | 2285 | # (c) 2012, 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) any lat... | gpl-3.0 |
vinodpanicker/scancode-toolkit | tests/cluecode/data/finder/email/thomas.py | 12 | 10471 | # This module is part of the Divmod project and is Copyright 2003 Amir Bakhtiar:
# amir@divmod.org. This is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
import operator
import re
impo... | apache-2.0 |
rhgong/itk-with-dom | Wrapping/Generators/Python/Tests/BinaryErodeImageFilter.py | 11 | 1231 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | apache-2.0 |
nnethercote/servo | tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/_stream_hybi.py | 23 | 32387 | # Copyright 2012, 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... | mpl-2.0 |
scafield/Wayfinder | plugins/ti.alloy/plugin.py | 1729 | 5251 | import os, sys, subprocess, hashlib
import subprocess
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
Backported from Python 2.7 as it's implemented as pure python on stdlib.
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.... | apache-2.0 |
CyanogenMod/android_external_chromium_org | third_party/protobuf/python/google/protobuf/internal/service_reflection_test.py | 560 | 5127 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | bsd-3-clause |
rayners/offlineimap | offlineimap/CustomConfig.py | 2 | 5038 | # Copyright (C) 2003 John Goerzen
# <jgoerzen@complete.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version... | gpl-2.0 |
WorldBank-Transport/DRIVER | app/driver/settings.py | 2 | 15418 | """
Django settings for driver project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths i... | gpl-3.0 |
RaviTezu/yowsup | yowsup/layers/interface/interface.py | 22 | 2607 | from yowsup.layers import YowLayer, YowLayerEvent
from yowsup.layers.protocol_iq.protocolentities import IqProtocolEntity
from yowsup.layers.network import YowNetworkLayer
from yowsup.layers.auth import YowAuthenticationProtocolLayer
import inspect
class ProtocolEntityCallback(object):
def __init__(self, entityTyp... | gpl-3.0 |
dsiddharth/access-keys | keystone/tests/fixtures/appserver.py | 2 | 2693 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 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... | apache-2.0 |
happyboy310/keras | tests/auto/test_tasks.py | 41 | 6067 | from __future__ import print_function
import numpy as np
np.random.seed(1337)
from keras.utils.test_utils import get_test_data
from keras.models import Sequential
from keras.layers.core import Dense, Activation, TimeDistributedDense, Flatten
from keras.layers.recurrent import GRU
from keras.layers.convolutional import... | mit |
oinopion/django | tests/template_tests/filter_tests/test_length_is.py | 360 | 3204 | from django.template.defaultfilters import length_is
from django.test import SimpleTestCase
from ..utils import setup
class LengthIsTests(SimpleTestCase):
@setup({'length_is01': '{% if some_list|length_is:"4" %}Four{% endif %}'})
def test_length_is01(self):
output = self.engine.render_to_string('len... | bsd-3-clause |
xq262144/hue | desktop/core/ext-py/Django-1.6.10/tests/raw_query/models.py | 55 | 1030 | from django.db import models
class Author(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
dob = models.DateField()
def __init__(self, *args, **kwargs):
super(Author, self).__init__(*args, **kwargs)
# Protect against annotations... | apache-2.0 |
nicolas998/Op_Interpolated | 06_Codigos/Genera_kml.py | 2 | 10704 | #!/usr/bin/env python
import argparse
import textwrap
import os
from wmf import wmf
from osgeo import ogr
import pickle
import numpy as np
#Parametros de entrada del trazador
parser=argparse.ArgumentParser(
prog='Consulta_Caudal',
formatter_class=argparse.RawDescriptionHelpFormatter,
description=textwrap.dedent('... | gpl-3.0 |
shayneholmes/plover | plover/dictionary/test_rtfcre_dict.py | 7 | 7651 | # Copyright (c) 2013 Hesky Fisher
# See LICENSE.txt for details.
from plover.dictionary.rtfcre_dict import load_dictionary, TranslationConverter, format_translation, save_dictionary
import mock
import re
import unittest
from cStringIO import StringIO
class TestCase(unittest.TestCase):
def test_converter(self... | gpl-2.0 |
italomaia/turtle-linux | games/BubbleKing/lib/bubble.py | 1 | 1336 | import pygame
from pygame.locals import *
import sprite
import capsule
def init(g,r,p, big=False):
if not hasattr(g,'bubble_count'):
g.bubble_count = 0
if g.bubble_count >= 3:
return None
g.bubble_count += 1
print 'new bubble', g.bubble_count
if not big:
s = sprite.Sprite3(... | gpl-3.0 |
supertom/ansible | lib/ansible/cli/playbook.py | 21 | 9325 | #!/usr/bin/env python
# (c) 2012, 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
# (... | gpl-3.0 |
creasyw/IMTAphy | wnsbase/playground/builtins/Push/Push.py | 3 | 3957 | ###############################################################################
# This file is part of openWNS (open Wireless Network Simulator)
# _____________________________________________________________________________
#
# Copyright (C) 2004-2007
# Chair of Communication Networks (ComNets)
# Kopernikusstr. 16, D-... | gpl-2.0 |
google/earthengine-community | samples/python/guides/images09.py | 1 | 1565 | # Copyright 2020 The Google Earth Engine Community Authors
#
# 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 ... | apache-2.0 |
andresailer/DIRAC | Resources/Catalog/FileCatalogFactory.py | 9 | 2630 | """ FileCatalogFactory class to create file catalog client objects according to the
configuration description
"""
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCatalogPath
from DIRAC.Resources.Catalog.FileCatalogProxyClient import FileCatalogPr... | gpl-3.0 |
joemicro/Manufacturing | productionform.py | 1 | 61536 | #// Libraries
import sys
import os
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from sqlalchemy import *
from sqlalchemy.orm import *
#// My Imports
import ui_forms.ui_productionform
from databaseschema import *
from genericdelegates import *
from functions import *
import modelsandviews
import itemform
import... | mit |
5t111111/markdown-preview.vim | markdownpreview_lib/pygments/styles/trac.py | 364 | 1933 | # -*- coding: utf-8 -*-
"""
pygments.styles.trac
~~~~~~~~~~~~~~~~~~~~
Port of the default trac highlighter design.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Na... | lgpl-2.1 |
sebrandon1/neutron | neutron/objects/address_scope.py | 4 | 1292 | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | apache-2.0 |
3dfxsoftware/cbss-addons | account_voucher_move_id/__openerp__.py | 1 | 1448 | ##############################################################################
#
# 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 Affero General Public ... | gpl-2.0 |
jerryz1982/neutron | neutron/plugins/cisco/db/l3/l3_models.py | 48 | 4506 | # Copyright 2014 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.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 |
luoguizhou/gooderp_addons | sell/__openerp__.py | 6 | 3544 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 上海开阖软件有限公司 (http://www.osbzr.com).
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it u... | agpl-3.0 |
dlazz/ansible | lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py | 16 | 19961 | #!/usr/bin/python
# (c) 2018, NetApp, 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',
'status': ['preview'],
... | gpl-3.0 |
rootml/YouCompleteMe | third_party/pythonfutures/concurrent/futures/_base.py | 89 | 19642 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
from __future__ import with_statement
import logging
import threading
import time
try:
from collections import namedtuple
except ImportError:
from concurrent.futures._compat import namedtuple
__author__ = 'B... | gpl-3.0 |
flyfei/python-for-android | python3-alpha/python3-src/Lib/lib2to3/fixes/fix_renames.py | 203 | 2221 | """Fix incompatible renames
Fixes:
* sys.maxint -> sys.maxsize
"""
# Author: Christian Heimes
# based on Collin Winter's fix_import
# Local imports
from .. import fixer_base
from ..fixer_util import Name, attr_chain
MAPPING = {"sys": {"maxint" : "maxsize"},
}
LOOKUP = {}
def alternates(members):
re... | apache-2.0 |
ssundarraj/grip | tests/mocks.py | 2 | 4810 | from __future__ import print_function, unicode_literals
import json
import requests
import responses
from grip import DEFAULT_API_URL, GitHubAssetManager, Grip, StdinReader
from helpers import USER_CONTEXT, input_file, output_file
class GitHubRequestsMock(responses.RequestsMock):
auth = ('test-username', 'test... | mit |
BbiKkuMi/heekscnc | area_funcs.py | 24 | 15418 | import area
from nc.nc import *
import math
import kurve_funcs
# some globals, to save passing variables as parameters too much
area_for_feed_possible = None
tool_radius_for_pocket = None
def cut_curve(curve, need_rapid, p, rapid_safety_space, current_start_depth, final_depth):
prev_p = p
first = T... | bsd-3-clause |
Donkyhotay/MoonPy | twisted/persisted/dirdbm.py | 61 | 10317 | # -*- test-case-name: twisted.test.test_dirdbm -*-
#
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
DBM-style interface to a directory.
Each key is stored as a single file. This is not expected to be very fast or
efficient, but it's good for easy debugging.
DirDBMs are *not*... | gpl-3.0 |
sakanaou/storm | storm-client/src/py/storm/constants.py | 22 | 1061 | #!/usr/bin/env python
#
# 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
# "... | apache-2.0 |
Abhinav117/pymtl | pisa/elf_test.py | 4 | 1407 | #=========================================================================
# elf_test.py
#=========================================================================
import elf
import os
import random
import struct
from SparseMemoryImage import SparseMemoryImage
#-------------------------------------------------------... | bsd-3-clause |
justinjoy/cerbero | test/test_cerbero_build_build.py | 23 | 3397 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | lgpl-2.1 |
Yukinoshita47/Yuki-Chan-The-Auto-Pentest | Module/theHarvester/discovery/googlesets.py | 23 | 1177 | import string
import httplib
import sys
import myparser
import re
import time
class search_google_labs:
def __init__(self, list):
self.results = ""
self.totalresults = ""
self.server = "labs.google.com"
self.hostname = "labs.google.com"
self.userAgent = "(Mozilla/5.0 (Wind... | mit |
rhattersley/iris | lib/iris/tests/unit/fileformats/grib/load_convert/test_ellipsoid.py | 13 | 3478 | # (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 3 of the License, or
# (at your option) any l... | lgpl-3.0 |
Giswater/giswater_qgis_plugin | map_tools/cad_api_info.py | 1 | 3531 | """
This file is part of Giswater 3
The program is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
"""
# -*- coding: utf-8 -*-
from qgis.core im... | gpl-3.0 |
MonicaHsu/truvaluation | venv/lib/python2.7/curses/__init__.py | 108 | 1817 | """curses
The main package for curses support for Python. Normally used by importing
the package, and perhaps a particular module inside it.
import curses
from curses import textpad
curses.initscr()
...
"""
__revision__ = "$Id$"
from _curses import *
from curses.wrapper import wrapper
import os as _os... | mit |
abdulbaqi/quranf | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py | 550 | 8977 | # urllib3/poolmanager.py
# Copyright 2008-2014 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
import logging
try: # Python 3
from urllib.parse import urljoin
except ImportError:
... | mit |
hmen89/odoo | addons/mail/static/scripts/openerp_mailgate.py | 316 | 7640 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-TODAY OpenERP S.A. (http://www.openerp.com)
#
# This program ... | agpl-3.0 |
imsut/commons | src/python/twitter/pants/tasks/eclipse_gen.py | 1 | 8147 | # ==================================================================================================
# Copyright 2012 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 |
rabipanda/tensorflow | tensorflow/python/client/timeline_test.py | 25 | 8552 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
avneesh91/django | django/contrib/admin/options.py | 10 | 82904 | import copy
import json
import operator
from collections import OrderedDict
from functools import partial, reduce, update_wrapper
from urllib.parse import quote as urlquote
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers, widgets
fr... | bsd-3-clause |
huran2014/huran.github.io | wot_gateway/usr/lib/python2.7/sre_parse.py | 156 | 26798 | #
# Secret Labs' Regular Expression Engine
#
# convert re-style regular expression to sre pattern
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# See the sre.py file for information on usage and redistribution.
#
"""Internal support module for sre"""
# XXX: show string offset and offending ch... | gpl-2.0 |
miketheman/opencomparison | searchv2/migrations/0004_auto.py | 1 | 3142 | # -*- 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):
# Adding index on 'SearchV2', fields ['title_no_prefix']
db.create_index('searchv2_searchv2', ['title_no_pre... | mit |
suutari-ai/shoop | shuup/front/basket/objects.py | 2 | 1414 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.contrib impor... | agpl-3.0 |
broesamle/servo | tests/wpt/harness/wptrunner/hosts.py | 196 | 3292 | # 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/.
from __future__ import unicode_literals
class HostsLine(object):
def __init__(self, ip_address, canonical_hostname... | mpl-2.0 |
arabenjamin/scikit-learn | examples/linear_model/plot_sgd_comparison.py | 167 | 1659 | """
==================================
Comparing various online solvers
==================================
An example showing how different online solvers perform
on the hand-written digits dataset.
"""
# Author: Rob Zinkov <rob at zinkov dot com>
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot a... | bsd-3-clause |
V155/qutebrowser | tests/unit/config/test_configcommands.py | 1 | 29376 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# This file is part of qutebrowser.
#
# qutebrowser 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 Sof... | gpl-3.0 |
Jgarcia-IAS/SITE | addons/account/wizard/account_statement_from_invoice.py | 106 | 3626 | # -*- 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 |
teichopsia-/conFusion | node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py | 1788 | 1435 | #!/usr/bin/env python
import re
import json
# https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... | mit |
tody411/ImageViewerFramework | ivf/ui/tool/drag_tool.py | 1 | 1163 |
# -*- coding: utf-8 -*-
## @package npr_sfs.ui.tool.drag_tool
#
# npr_sfs.ui.tool.drag_tool utility package.
# @author tody
# @date 2015/10/27
import numpy as np
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from npr_sfs.ui.tool.base_tool import BaseTool
class DragTool(BaseTool):
outPoin... | mit |
rockneurotiko/django | django/conf/urls/__init__.py | 264 | 4592 | import warnings
from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import (
LocaleRegexURLResolver, RegexURLPattern, RegexURLResolver,
)
from django.utils import six
from django.utils.deprecation import (
RemovedInDjango20Warning, RemovedIn... | bsd-3-clause |
poulp/flask-todolist | app/api/views.py | 1 | 6050 | # -*- coding: utf-8 -*-
from flask import jsonify, request, abort
from . import api
from ..models import User, Todo, TodoList
from ..decorators import admin_required
@api.route('/users/')
def get_users():
users = User.query.all()
return jsonify({
'users': [{'user': user.to_json()} for user in users]... | mit |
rohanp/Algorithm-Implementations | 100_Doors_Problem/Python/kennyledet/100_Doors.py | 25 | 2463 | '''
Author: Kendrick Ledet 2014
Problem: You have 100 doors in a row that are all initially closed. You make 100 passes by the doors.
The first time through, you visit every door and toggle the door (if the door is closed, you open it; if it is open, you close it).
The second time you only visit every 2nd door (door... | mit |
kisonecat/sequences-and-series | logo/scene.py | 3 | 3875 | #! /usr/bin/python
import random
header="""
#version 3.7;
global_settings {
assumed_gamma 1
radiosity{
pretrace_start 0.08
pretrace_end 0.001
count 150
error_bound 0.2
nearest_count 20
recursion_limit 2
brightness 1
}
}
camera {
right x*600/340
location 1.5*<-3... | gpl-3.0 |
postlund/home-assistant | tests/components/simulated/test_sensor.py | 10 | 1807 | """The tests for the simulated sensor."""
import unittest
from homeassistant.components.simulated.sensor import (
CONF_AMP,
CONF_FWHM,
CONF_MEAN,
CONF_PERIOD,
CONF_PHASE,
CONF_RELATIVE_TO_EPOCH,
CONF_SEED,
CONF_UNIT,
DEFAULT_AMP,
DEFAULT_FWHM,
DEFAULT_MEAN,
DEFAULT_NAME,... | apache-2.0 |
muraliselva10/designate | designate/api/v1/extensions/sync.py | 7 | 1759 | # Copyright 2012 Hewlett-Packard Development Company, L.P. All Rights Reserved.
#
# Author: Kiall Mac Innes <kiall@hp.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-2.0 |
tylertian/Openstack | openstack F/python-keystoneclient/tests/v2_0/test_service_catalog.py | 1 | 3069 | import copy
from keystoneclient import access
from keystoneclient import exceptions
from tests import utils
from tests.v2_0 import client_fixtures
class ServiceCatalogTest(utils.TestCase):
def setUp(self):
super(ServiceCatalogTest, self).setUp()
self.AUTH_RESPONSE_BODY = client_fixtures.AUTH_RES... | apache-2.0 |
zhujzhuo/Sahara | sahara/plugins/mapr/services/mysql/mysql.py | 5 | 8869 | # Copyright (c) 2015, MapR Technologies
#
# 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 |
cancro7/gem5 | src/mem/HMCController.py | 25 | 3819 | # Copyright (c) 2012-2013 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 functiona... | bsd-3-clause |
yocome/zulip | zerver/filters.py | 124 | 1058 | from __future__ import absolute_import
from django.views.debug import SafeExceptionReporterFilter
from django.http import build_request_repr
class ZulipExceptionReporterFilter(SafeExceptionReporterFilter):
def get_post_parameters(self, request):
filtered_post = SafeExceptionReporterFilter.get_post_paramet... | apache-2.0 |
emergence/suds-philpem | suds/cache.py | 1 | 8967 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 in the hope that it will b... | lgpl-3.0 |
galtys/odoo | addons/mail/ir_attachment.py | 378 | 5643 | # -*- 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 of ... | agpl-3.0 |
google-research/tapas | tapas/utils/tabfact_utils.py | 1 | 6847 | # coding=utf-8
# Copyright 2019 The Google AI Language Team Authors.
#
# 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 ... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.