repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
Antiun/project | project_categ_issue/__openerp__.py | 16 | 1500 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2013 Daniel Reis
#
# 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... | agpl-3.0 |
baslr/ArangoDB | 3rdParty/V8/V8-5.0.71.39/tools/swarming_client/third_party/requests/packages/urllib3/packages/six.py | 2375 | 11628 | """Utilities for writing code that runs on Python 2 and 3"""
#Copyright (c) 2010-2011 Benjamin Peterson
#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 l... | apache-2.0 |
ChanderG/scikit-learn | examples/linear_model/plot_sgd_weighted_samples.py | 344 | 1458 | """
=====================
SGD: Weighted samples
=====================
Plot decision function of a weighted dataset, where the size of points
is proportional to its weight.
"""
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model
# we create 20 points
np.random.seed(0)
X ... | bsd-3-clause |
glove747/liberty-neutron | neutron/tests/unit/agent/l3/test_legacy_router.py | 13 | 3281 | # Copyright (c) 2015 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 ... | apache-2.0 |
broferek/ansible | lib/ansible/modules/network/f5/bigip_iapp_service.py | 38 | 31847 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
vadimtk/chrome4sdp | third_party/cython/src/Cython/Distutils/build_ext.py | 94 | 12955 | """Cython.Distutils.build_ext
Implements a version of the Distutils 'build_ext' command, for
building Cython extension modules."""
# This module should be kept compatible with Python 2.3.
__revision__ = "$Id:$"
import sys
import os
import re
from distutils.core import Command
from distutils.errors import DistutilsP... | bsd-3-clause |
antotodd/project2 | lib/markupsafe/_native.py | 1243 | 1187 | # -*- coding: utf-8 -*-
"""
markupsafe._native
~~~~~~~~~~~~~~~~~~
Native Python implementation the C module is not compiled.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from markupsafe import Markup
from markupsafe._compat import text_type
def escape(... | apache-2.0 |
philipan/paparazzi | sw/ground_segment/python/ivytoredis/ivy_to_redis.py | 39 | 2358 | #!/usr/bin/env python
from __future__ import print_function
import redis
import time
import signal
import argparse
import sys
import os
# if PAPARAZZI_SRC not set, then assume the tree containing this
# file is a reasonable substitute
PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirnam... | gpl-2.0 |
ehashman/oh-mainline | vendor/packages/scrapy/scrapy/core/downloader/__init__.py | 19 | 6133 | import random
import warnings
from time import time
from collections import deque
from functools import partial
from twisted.internet import reactor, defer
from twisted.python.failure import Failure
from scrapy.utils.defer import mustbe_deferred
from scrapy.utils.signal import send_catch_log
from scrapy.utils.httpobj... | agpl-3.0 |
bonitadecker77/python-for-android | python-build/python-libs/gdata/src/gdata/apps/__init__.py | 285 | 21144 | #!/usr/bin/python
#
# Copyright (C) 2007 SIOS Technology, 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 appli... | apache-2.0 |
eblume/Tiger-Lily | tigerlily/grc/genome_test.py | 1 | 3280 | # genome_test.py - unit tests for genome.py
# Authors:
# * Erich Blume <blume.erich@gmail.com>
#
# Copyright 2011 Erich Blume <blume.erich@gmail.com>
#
# This file is part of Tiger Lily.
#
# Tiger Lily is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | gpl-3.0 |
0sm0s1z/subterfuge | utilities/notification.py | 5 | 1228 | #!/usr/bin/python
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
import time
import os
import re
import sys
import datetime
sys.path.append('/usr/share/subterfuge')
#Ignore Deprication Warnings
import warnings
warnings.filterwarnings("ignore", category... | gpl-3.0 |
mila-udem/fuel | tests/__init__.py | 15 | 1392 | from importlib import import_module
from unittest.case import SkipTest
from fuel.utils import find_in_data_path
from fuel import config
def skip_if_not_available(modules=None, datasets=None, configurations=None):
"""Raises a SkipTest exception when requirements are not met.
Parameters
----------
mod... | mit |
912/M-new | virtualenvironment/tourism_industry/lib/python2.7/site-packages/setuptools/tests/test_packageindex.py | 377 | 7625 | """Package Index Tests
"""
import sys
import os
import unittest
import pkg_resources
from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url
import distutils.errors
import setuptools.package_index
from setuptools.tests.server import IndexServer
class TestPackageIndex(unittest.TestCase):
d... | gpl-2.0 |
iut-ibk/DynaMind-UrbanSim | 3rdparty/opus/src/psrc/parcel/number_of_surveyed_households.py | 2 | 2619 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
from opus_core.variables.variable import Variable
from urbansim.functions import attribute_label
from variable_functions import my_attribute_label
class number_of_surveyed_households(Variable)... | gpl-2.0 |
MeshCollider/bitcoin | test/functional/p2p_timeouts.py | 25 | 3447 | #!/usr/bin/env python3
# Copyright (c) 2016-2020 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 various net timeouts.
- Create three bitcoind nodes:
no_verack_node - we never send a verack... | mit |
xxsergzzxx/python-for-android | python-modules/twisted/twisted/words/test/test_ircsupport.py | 49 | 2302 | # Copyright (c) 2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.words.im.ircsupport}.
"""
from twisted.trial.unittest import TestCase
from twisted.test.proto_helpers import StringTransport
from twisted.words.im.basechat import Conversation, ChatUI
from twisted.words.im.ircsupport... | apache-2.0 |
petricm/DIRAC | AccountingSystem/Service/DataStoreHandler.py | 6 | 8068 | """ DataStore is the service for inserting accounting reports (rows) in the Accounting DB
This service CAN be duplicated iff the first is a "master" and all the others are slaves.
"""
import datetime
from DIRAC import S_OK, S_ERROR, gConfig, gLogger
from DIRAC.AccountingSystem.DB.MultiAccountingDB import MultiA... | gpl-3.0 |
40223137/150601 | static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py | 738 | 49593 | import sys
import types
import unittest
class Test_TestLoader(unittest.TestCase):
### Tests for TestLoader.loadTestsFromTestCase
################################################################
# "Return a suite of all tests cases contained in the TestCase-derived
# class testCaseClass"
def te... | agpl-3.0 |
asobrien/carlae | setup.py | 1 | 2182 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#----------------------------------------------------------------------
# Setup script for carlae package
import sys
from setuptools import setup, find_packages
### CONFIGURE BUILD VARIABLES
VERSION = "0.0.2"
### END OF CONFIGURATION
# Get requirements from file
with op... | mit |
sylnsfar/qrcode | amzqr/mylibs/matrix.py | 1 | 6123 | # -*- coding: utf-8 -*-
from amzqr.mylibs.constant import alig_location, format_info_str, version_info_str, lindex
def get_qrmatrix(ver, ecl, bits):
num = (ver - 1) * 4 + 21
qrmatrix = [[None] * num for i in range(num)]
# [([None] * num * num)[i:i+num] for i in range(num * num) if i % num == 0] ... | gpl-3.0 |
oemof/reegis-hp | reegis_hp/de21/configuration.py | 3 | 15297 | __copyright__ = "Uwe Krien"
__license__ = "GPLv3"
import config as cfg
import os
from oemof.tools import logger
class ConfigurationDe21:
def __init__(self):
self.pattern = dict()
self.files = dict()
self.general = dict()
self.url = dict()
self.pv = dict()
target_... | gpl-3.0 |
AsimmHirani/ISpyPi | tensorflow/contrib/tensorflow-master/tensorflow/python/training/server_lib_multiple_containers_test.py | 133 | 2414 | # 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 |
legalsylvain/OpenUpgrade | addons/resource/tests/__init__.py | 121 | 1146 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
Eseoghene/bite-project | deps/gdata-python-client/src/gdata/calendar_resource/client.py | 49 | 7210 | #!/usr/bin/python
#
# Copyright 2009 Google 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 by ... | apache-2.0 |
timothydmorton/bokeh | bokeh/server/utils/plugins.py | 29 | 2809 | """ Utilities for writing plugins.
This is different from bokeh.pluginutils because these are ways of
patching routes and objects directly into the bokeh server. You
would run this type of code using the --script option
"""
from __future__ import absolute_import
import uuid
from flask import abort, render_template... | bsd-3-clause |
BT-fgarbely/l10n-switzerland | l10n_ch_states/__openerp__.py | 4 | 1342 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Mathias Neef
# Copyright 2015 copadoMEDIA UG
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publi... | agpl-3.0 |
liamgh/liamgreenhughes-sl4a-tf101 | python/src/Lib/test/test_import.py | 48 | 14273 | import unittest
import os
import random
import shutil
import sys
import py_compile
import warnings
import marshal
from test.test_support import unlink, TESTFN, unload, run_unittest, check_warnings
def remove_files(name):
for f in (name + os.extsep + "py",
name + os.extsep + "pyc",
name... | apache-2.0 |
alexlib/openptv | liboptv/tests/gen_track_data.py | 3 | 1925 | """
Generate a 5-frame trajectory that is pretty degenerates so is good for
testing. It starts from (0,0,0) and moves in a straight line on the x axis,
at a slow velocity.
"""
import numpy as np
from optv.calibration import Calibration
from optv.parameters import ControlParams
from optv.imgcoord import image_coordina... | lgpl-3.0 |
DalikarFT/CFVOP | venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py | 1777 | 3764 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | gpl-3.0 |
Intel-tensorflow/tensorflow | tensorflow/python/summary/writer/event_file_writer_v2.py | 6 | 5788 | # 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 |
ddayguerrero/blogme | flask/lib/python3.4/site-packages/sqlalchemy/testing/assertions.py | 11 | 16112 | # testing/assertions.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import absolute_import
from . import util as testutil
from sq... | mit |
dnlm92/chokoretto | temp/venv/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/request_validator.py | 36 | 19514 | # -*- coding: utf-8 -*-
"""
oauthlib.oauth2.rfc6749.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from __future__ import unicode_literals, absolute_import
import logging
log = logging.getLogger(__name__)
class RequestValidator(object):
def client_authentication_required(self, request, *args, **kwargs):
... | mit |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/gateway_route_py3.py | 7 | 2245 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
KonstantinRitt/qmqtt | tests/gtest/gtest/googletest/googletest/test/gtest_shuffle_test.py | 3023 | 12549 | #!/usr/bin/env python
#
# Copyright 2009 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... | bsd-3-clause |
ShinyROM/android_external_chromium_org | chrome/common/extensions/docs/server2/compiled_file_system_test.py | 23 | 9146 | #!/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.
import functools
import os
from appengine_wrappers import GetAppVersion
from compiled_file_system import CompiledFileSystem
from copy ... | bsd-3-clause |
yalp/fiware-orion | test/acceptance/behave/__init__.py | 4 | 1104 | # -*- coding: utf-8 -*-
"""
Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
This file is part of Orion Context Broker.
Orion Context Broker is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation,... | agpl-3.0 |
mudbungie/NetExplorer | env/lib/python3.4/site-packages/requests/packages/chardet/langcyrillicmodel.py | 2762 | 17725 | ######################## 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... | mit |
RandyLowery/erpnext | erpnext/schools/doctype/course_schedule/course_schedule.py | 5 | 2222 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
class CourseSchedule(Document):
def validate(self):
self.instruc... | gpl-3.0 |
IptvBrasilGroup/Cleitonleonelcreton.repository | plugin.video.armagedomfilmes/bs4/tests/test_lxml.py | 273 | 2965 | """Tests to ensure that the lxml tree builder generates good trees."""
import re
import warnings
try:
import lxml.etree
LXML_PRESENT = True
LXML_VERSION = lxml.etree.LXML_VERSION
except ImportError, e:
LXML_PRESENT = False
LXML_VERSION = (0,)
if LXML_PRESENT:
from bs4.builder import LXMLTreeB... | gpl-2.0 |
jeffcharles/Open-Source-at-Laurier-Website | wluopensource/osl_comments/urls.py | 1 | 2435 | from django.conf.urls.defaults import *
from django.contrib.comments.urls import urlpatterns
from osl_comments.models import OslComment
urlpatterns += patterns('osl_comments.views',
(r'^comment/(?P<comment_id>\d+)/$', 'get_comment'),
(r'^delete_comment/(?P<comment_id>\d+)/$', 'delete_comment'),
(r'^delete... | bsd-3-clause |
waytai/networkx | networkx/algorithms/cycles.py | 30 | 16789 | """
========================
Cycle finding algorithms
========================
"""
# Copyright (C) 2010-2012 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
from collections import defaultdict
import networ... | bsd-3-clause |
msabramo/ansible | lib/ansible/modules/network/ovs/openvswitch_port.py | 28 | 8562 | #!/usr/bin/python
#coding: utf-8 -*-
# pylint: disable=C0111
# (c) 2013, David Stygstra <david.stygstra@gmail.com>
#
# Portions copyright @ 2015 VMware, Inc.
#
# This file is part of Ansible
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | gpl-3.0 |
tombstone/models | research/delf/delf/python/feature_aggregation_extractor_test.py | 2 | 18304 | # Copyright 2019 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 applicab... | apache-2.0 |
tanakh/waf-unittest | gtest-1.7.0/scripts/gen_gtest_pred_impl.py | 2538 | 21986 | #!/usr/bin/env python
#
# Copyright 2006, 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... | bsd-3-clause |
kleientertainment/ds_mod_tools | pkg/win32/Python27/Lib/compiler/syntax.py | 25 | 1490 | """Check for errs in the AST.
The Python parser does not catch all syntax errors. Others, like
assignments with invalid targets, are caught in the code generation
phase.
The compiler package catches some errors in the transformer module.
But it seems clearer to write checkers that use the AST to detect
error... | mit |
brandon-rhodes/numpy | numpy/lib/shape_base.py | 3 | 25218 | from __future__ import division, absolute_import, print_function
import warnings
import numpy.core.numeric as _nx
from numpy.core.numeric import (
asarray, zeros, outer, concatenate, isscalar, array, asanyarray
)
from numpy.core.fromnumeric import product, reshape
from numpy.core import vstack, atleast_3d
_... | bsd-3-clause |
MarkTheF4rth/youtube-dl | youtube_dl/extractor/ooyala.py | 101 | 7982 | from __future__ import unicode_literals
import re
import json
import base64
from .common import InfoExtractor
from ..utils import (
unescapeHTML,
ExtractorError,
determine_ext,
int_or_none,
)
class OoyalaBaseIE(InfoExtractor):
def _extract_result(self, info, more_info):
embedCode = info[... | unlicense |
liu602348184/django | django/core/cache/backends/dummy.py | 629 | 1213 | "Dummy cache backend"
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
class DummyCache(BaseCache):
def __init__(self, host, *args, **kwargs):
BaseCache.__init__(self, *args, **kwargs)
def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
key = self.make_key... | bsd-3-clause |
idf-reading/cheat | cheat/sheets.py | 1 | 2886 | """
A container of sheets
No caching.
"""
from cheat import cheatsheets
from cheat.utils import *
import os
def default_path():
""" Returns the default cheatsheet path """
# determine the default cheatsheet dir
default_sheets_dir = os.environ.get('DEFAULT_CHEAT_DIR') or os.path.join(os.path.expanduser('... | gpl-3.0 |
helloiloveit/VkxPhoneProject | submodules/externals/antlr3/runtime/Python/tests/t060leftrecursion.py | 16 | 14776 | import unittest
import re
import textwrap
import antlr3
import testbase
# Left-recursion resolution is not yet enabled in the tool.
# class TestLeftRecursion(testbase.ANTLRTest):
# def parserClass(self, base):
# class TParser(base):
# def __init__(self, *args, **kwargs):
# bas... | gpl-2.0 |
ChinaQuants/bokeh | examples/charts/file/bar_multi.py | 4 | 1665 | from bokeh.charts import Bar, output_file, show, vplot, hplot, defaults
from bokeh.sampledata.autompg import autompg as df
df['neg_mpg'] = 0 - df['mpg']
defaults.width = 450
defaults.height = 350
bar_plot = Bar(df, label='cyl', title="label='cyl'")
bar_plot2 = Bar(df, label='cyl', bar_width=0.4, title="label='cyl' ... | bsd-3-clause |
vbannai/neutron | neutron/db/migration/__init__.py | 8 | 2135 | # Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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 a... | apache-2.0 |
boberfly/gaffer | python/GafferTest/NameValuePlugTest.py | 4 | 14807 | ##########################################################################
#
# Copyright (c) 2019, 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:
#
# * Redistrib... | bsd-3-clause |
Kallehz/Python | Próf2/3.py | 1 | 2505 | # Numbers game
#
# Hawk and his little brother, Stone, are playing a little game with
# the following rules. Initially 8 random integers, from 1 to 100 (inclusive),
# are laid on the table for both players to see. The players then have
# 2 minutes to construct a sequence of numbers, from the given 8 numbers... | apache-2.0 |
splanger/dbmake | dbmake/dbmake.py | 1 | 1926 | #!/usr/bin/python
import sys
from .common import FAILURE, SUCCESS
from .dbmake_cli import get_command, print_help, get_command_class_reference
from .common import CommandNotExists, BadCommandArguments, DBMAKE_VERSION
class App:
def __init__(self):
self.ide_stop_bothering_with_static_method = "!!!"
... | apache-2.0 |
huongttlan/bokeh | examples/plotting/file/glyphs.py | 43 | 4021 | import numpy as np
from bokeh.plotting import figure, show, output_file, vplot
N = 9
x = np.linspace(-2, 2, N)
y = x**2
sizes = np.linspace(10, 20, N)
xpts = np.array([-.09, -.12, .0, .12, .09])
ypts = np.array([-.1, .02, .1, .02, -.1])
output_file("glyphs.html", title="glyphs.py example")
vplot = vplot()
p = fi... | bsd-3-clause |
CopeX/odoo | addons/l10n_at/__init__.py | 438 | 1050 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) conexus.at
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... | agpl-3.0 |
jacobmetrick/Flexget | flexget/plugins/list/subtitle_list.py | 3 | 13832 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from past.builtins import basestring
import logging
import os
from collections import MutableSet
from datetime import datetime, date, time
from sqlalchemy import Column, U... | mit |
wevoice/wesub | apps/videos/types/video_google.py | 5 | 1410 | # Amara, universalsubtitles.org
#
# Copyright (C) 2013 Participatory Culture Foundation
#
# 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 ... | agpl-3.0 |
ElGatoLoco/DRF-Webpack-ES6-React-SASS---starter-kit | backend/main/settings.py | 1 | 3343 | """
Django settings for main project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
#... | mit |
sondree/Master-thesis | Python EA/ea/progress_drawing.py | 1 | 3860 | #!/usr/bin/python
from matplotlib.patches import Rectangle, Circle, RegularPolygon, Arrow
from fitness import FITNESS_SECTION
class BasicDrawing(object):
def __init__(self,config):
self.config = config
self.grid_x = self.config.getint(FITNESS_SECTION,"grid_x")
self.grid_y = self.... | gpl-3.0 |
sandyjmacdonald/dots_for_microarrays | dots_backend/dots_analysis.py | 1 | 12261 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import warnings
import pandas as pd
import numpy as np
import scipy.cluster.hierarchy as hac
from dots_arrays import Experiment
from sklearn.decomposition import PCA
from itertools import combinations
from scipy.stats import ttest_ind, f_oneway
from statsmodels.stats.multi... | mit |
aviciimaxwell/odoo | addons/edi/models/__init__.py | 442 | 1116 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
jrbl/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 |
rukeon/py_ideapage | lib/werkzeug/__init__.py | 296 | 7210 | # -*- coding: utf-8 -*-
"""
werkzeug
~~~~~~~~
Werkzeug is the Swiss Army knife of Python web development.
It provides useful classes and functions for any WSGI application to make
the life of a python web developer much easier. All of the provided
classes are independent from each other so yo... | apache-2.0 |
willingc/pip | pip/_vendor/requests/packages/chardet/langhebrewmodel.py | 2763 | 11318 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Simon Montagu
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved... | mit |
cypod/arsenalsuite | cpp/apps/absubmit/fusionsubmit/submit.py | 10 | 11573 | #!/usr/bin/python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.uic import *
from blur.Stone import *
from blur.Classes import *
from blur.Classesui import HostSelector
from blur.absubmit import Submitter
from blur import RedirectOutputToLog
import sys
import time
import os.path
import r... | gpl-2.0 |
sgerhart/ansible | lib/ansible/plugins/action/cli_config.py | 27 | 1190 | #
# Copyright 2018 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansibl... | mit |
YannickDieter/testbeam_analysis | testbeam_analysis/testing/test_track_analysis.py | 1 | 13492 | ''' Script to check the correctness of the analysis. The analysis is done on raw data and all results are compared to a recorded analysis.
'''
import os
import shutil
import unittest
from testbeam_analysis import track_analysis
from testbeam_analysis.tools import analysis_utils, test_tools
testing_path = os.path.dirn... | mit |
natduca/ndbg | ui/overlay.py | 1 | 11736 | # Copyright 2011 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 |
codingforentrepreneurs/srvup-rest-framework | src/srvup/urls.py | 2 | 3803 | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from rest_framework import routers
from comments.serializers import CommentViewSet
from comments.views import... | apache-2.0 |
LUTAN/tensorflow | tensorflow/contrib/keras/api/keras/preprocessing/__init__.py | 132 | 1094 | # 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 |
nblock/ofxstatement-austrian | src/ofxstatement/plugins/easybank.py | 1 | 6467 | #!/usr/bin/env python3
# This file is part of ofxstatement-austrian.
# See README.rst for more information.
import csv
import re
from ofxstatement import statement
from ofxstatement.parser import CsvStatementParser
from ofxstatement.plugin import Plugin
from ofxstatement.statement import generate_transaction_id
from o... | gpl-3.0 |
winklerand/pandas | pandas/core/computation/expressions.py | 4 | 7066 | """
Expressions
-----------
Offer fast expression evaluation through numexpr
"""
import warnings
import numpy as np
from pandas.core.common import _values_from_object
from pandas.core.computation.check import _NUMEXPR_INSTALLED
from pandas.core.config import get_option
if _NUMEXPR_INSTALLED:
import numexpr as n... | bsd-3-clause |
Workday/OpenFrame | chrome/test/chromedriver/test/waterfall_builder_monitor.py | 43 | 8030 | #!/usr/bin/env python
# Copyright (c) 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.
"""Waterfall monitoring script.
This script checks all builders specified in the config file and sends
status email about any s... | bsd-3-clause |
AndroidDeveloperAlliance/platform_external_skia | bench/bench_compare.py | 27 | 4180 | '''
Created on May 16, 2011
@author: bungeman
'''
import sys
import getopt
import bench_util
def usage():
"""Prints simple usage information."""
print '-o <file> the old bench output file.'
print '-n <file> the new bench output file.'
print '-h causes headers to be output.'
print '-f <fieldSp... | bsd-3-clause |
cuauv/software | vision/modules/old/2018/roulette.py | 1 | 16701 | #!/usr/bin/env python3
# Written by Chesley Tan.
# Tweaked by Will Smith.
import traceback
import time
import sys
import math
import itertools
import cv2
import numpy as np
import shm
from vision.modules.base import ModuleBase
from vision.framework.color import bgr_to_lab, elementwise_color_dist, range_threshold
fro... | bsd-3-clause |
vied12/superdesk | server/apps/rules/rule_sets.py | 3 | 1500 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import loggi... | agpl-3.0 |
Theer108/invenio | invenio/modules/pages/views.py | 7 | 4531 | # -*- coding: utf-8 -*-
# This file is part of Invenio.
# Copyright (C) 2014, 2015 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
# License, or (at your option) any l... | gpl-2.0 |
ndtran/compassion-modules | message_center_compassion/tests/test_messages.py | 2 | 15121 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __opener... | agpl-3.0 |
thekingofkings/focusread | libs/dns/rdataset.py | 16 | 11556 | # Copyright (C) 2001-2007, 2009-2011 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 "... | mit |
bsa11b/mtasa-blue | vendor/google-breakpad/src/tools/gyp/pylib/gyp/generator/dump_dependency_json.py | 899 | 2768 | # 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.
import collections
import os
import gyp
import gyp.common
import gyp.msvs_emulation
import json
import sys
generator_supports_multiple_toolsets = True
generator_... | gpl-3.0 |
dbrawand/zippy | app/zippylib/primer.py | 2 | 10154 | #!/usr/bin/env python
import sys, os, re
from hashlib import md5
import primer3
import pysam
import subprocess
from collections import defaultdict, OrderedDict
'''just a wrapper for pysam'''
class MultiFasta(object):
def __init__(self,file):
self.file = file
def createPrimers(self,db,bowtie='bowtie2'... | mit |
unseenlaser/python-for-android | python3-alpha/python3-src/Lib/test/test_linecache.py | 60 | 4141 | """ Tests for the linecache module """
import linecache
import unittest
import os.path
from test import support
FILENAME = linecache.__file__
INVALID_NAME = '!@$)(!@#_1'
EMPTY = ''
TESTS = 'inspect_fodder inspect_fodder2 mapping_tests'
TESTS = TESTS.split()
TEST_PATH = os.path.dirname(support.__file__)
MODULES = "li... | apache-2.0 |
partofthething/home-assistant | homeassistant/components/minio/minio_helper.py | 19 | 6523 | """Minio helper methods."""
from collections.abc import Iterable
import json
import logging
from queue import Queue
import re
import threading
import time
from typing import Iterator, List
from urllib.parse import unquote
from minio import Minio
from urllib3.exceptions import HTTPError
_LOGGER = logging.getLogger(__n... | mit |
7ing/kubernetes | cluster/juju/layers/kubeapi-load-balancer/reactive/load_balancer.py | 31 | 4256 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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 appli... | apache-2.0 |
gazpachoking/Flexget | flexget/plugins/output/download.py | 4 | 22908 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from future.moves.urllib.parse import unquote
import hashlib
import io
import logging
import mimetypes
import os
import shutil
import socket
import sys
import tempfile
fro... | mit |
eusoubrasileiro/fatiando | cookbook/gravmag_normal_gravity.py | 3 | 1882 | """
GravMag: Calculate the gravity disturbance and Bouguer anomaly for Hawaii
"""
from fatiando.gravmag import normal_gravity
from fatiando.vis import mpl
import numpy as np
import urllib
# Download the gravity and topography data
url = 'https://raw.githubusercontent.com/leouieda/geofisica1/master/data/'
urllib.urlret... | bsd-3-clause |
SUNET/SATOSA | src/satosa/backends/saml2.py | 2 | 17798 | """
A saml2 backend module for the satosa proxy
"""
import copy
import functools
import json
import logging
from base64 import urlsafe_b64encode
from urllib.parse import urlparse
from saml2.client_base import Base
from saml2.config import SPConfig
from saml2.extension.ui import NAMESPACE as UI_NAMESPACE
from saml2.met... | apache-2.0 |
crmccreary/openerp_server | openerp/addons/project/project.py | 3 | 61446 | # -*- 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 |
audip/lunr | lunr/common/lock.py | 2 | 5070 | # Copyright (c) 2011-2016 Rackspace US, 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 ... | apache-2.0 |
imcsk8/kubernetes | hack/update_owners.py | 149 | 9054 | #!/usr/bin/env python
# Copyright 2016 The Kubernetes 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 appli... | apache-2.0 |
kybriainfotech/iSocioCRM | addons/crm_partner_assign/__openerp__.py | 244 | 2369 | # -*- 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 |
chrisnatali/networkx | networkx/algorithms/tests/test_threshold.py | 4 | 6663 | #!/usr/bin/env python
"""Threshold Graphs
================
"""
from nose.tools import *
from nose import SkipTest
from nose.plugins.attrib import attr
import networkx as nx
import networkx.algorithms.threshold as nxt
from networkx.algorithms.isomorphism.isomorph import graph_could_be_isomorphic
cnlti = nx.convert_no... | bsd-3-clause |
makinacorpus/ionyweb | ionyweb/administration/views/plugin.py | 2 | 17535 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.template import RequestContext
from django.template.loader import render_to_string
from django.contrib.contenttypes.models import ContentType
from django.http import Http404
from djangorestframework.response import Response, ErrorResponse
from django... | bsd-3-clause |
whummer/moto | moto/iam/responses.py | 1 | 74425 | from __future__ import unicode_literals
from moto.core.responses import BaseResponse
from .models import iam_backend, User
class IamResponse(BaseResponse):
def attach_role_policy(self):
policy_arn = self._get_param('PolicyArn')
role_name = self._get_param('RoleName')
iam_backend.attach_... | apache-2.0 |
wuwenbin2/onos_bgp_evpn | tools/test/scenarios/bin/create-flow.py | 22 | 1317 | #! /usr/bin/env python
import requests
from requests.auth import HTTPBasicAuth
import sys
if len(sys.argv) != 6:
print "usage: create-flow onos-node name device in-port out-port"
sys.exit(1)
node = sys.argv[1]
name = sys.argv[2]
device = sys.argv[3]
inPort = sys.argv[4]
outPort = sys.argv[5]
flowJsonTemp... | apache-2.0 |
anguoyang/SMQTK | python/smqtk/indexing/naive_bayes.py | 1 | 9147 | """
LICENCE
-------
Copyright 2015 by Kitware, Inc. All Rights Reserved. Please refer to
KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
"""
from . import Indexer
import cPickle
import os.path as osp
import numpy
from sklearn.naive... | bsd-3-clause |
coinecrypto/coine | contrib/pyminer/pyminer.py | 1257 | 6438 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
im... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.