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
djurodrljaca/EmbeddedStAX
test/gmock/scripts/generator/cpp/keywords.py
1157
2004
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
unlicense
with-git/tensorflow
tensorflow/python/kernel_tests/check_ops_test.py
56
41530
# 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
tod31/pyload
module/plugins/hoster/JumbofilesCom.py
5
1581
# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster class JumbofilesCom(SimpleHoster): __name__ = "JumbofilesCom" __type__ = "hoster" __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?jumbofiles\.com/(?P<ID>\w{12})' ...
gpl-3.0
rahul-c1/scrapy
scrapy/utils/reactor.py
178
1360
from twisted.internet import reactor, error def listen_tcp(portrange, host, factory): """Like reactor.listenTCP but tries different ports in a range.""" assert len(portrange) <= 2, "invalid portrange: %s" % portrange if not hasattr(portrange, '__iter__'): return reactor.listenTCP(portrange, factory...
bsd-3-clause
andrew-aladev/samba-talloc-debug
lib/testtools/testtools/monkey.py
64
3301
# Copyright (c) 2010 testtools developers. See LICENSE for details. """Helpers for monkey-patching Python code.""" __all__ = [ 'MonkeyPatcher', 'patch', ] class MonkeyPatcher(object): """A set of monkey-patches that can be applied and removed all together. Use this to cover up attributes with n...
gpl-3.0
udayinfy/openerp-7.0
account_invoice_line/__init__.py
15
1109
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. # Author: Andy Lu <andy.lu@elico-corp.com> # # This program is free software: you can redistribute it...
agpl-3.0
beiko-lab/gengis
bin/Lib/hashlib.py
53
5159
# $Id$ # # Copyright (C) 2005 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. # __doc__ = """hashlib module - A common interface to many hash functions. new(name, string='') - returns a new hash object implementing the given hash function; initia...
gpl-3.0
nvoron23/brython
site/tests/unittests/test/test_binhex.py
83
1532
#! /usr/bin/env python3 """Test script for the binhex C module Uses the mechanism of the python binhex module Based on an original test by Roger E. Masse. """ import binhex import os import unittest from test import support class BinHexTestCase(unittest.TestCase): def setUp(self): self.fname1 = su...
bsd-3-clause
Endika/l10n-spain
l10n_es_fiscal_year_closing/models/l10n_es_fiscalyear_closing.py
17
5461
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 Servicios Tecnológicos Avanzados # (http://www.serviciosbaeza.com) # Pedro Manuel Baeza <pedro.baeza@...
agpl-3.0
SerpentCS/odoo
addons/gamification/wizard/update_goal.py
386
1848
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
akesandgren/easybuild-easyblocks
easybuild/easyblocks/c/cplex.py
3
7037
## # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
CenterForOpenScience/modular-file-renderer
tests/extensions/jamovi/test_renderer.py
2
5155
import os import pytest from mfr.core.provider import ProviderMetadata from mfr.core.exceptions import RendererError from mfr.extensions.jamovi import JamoviRenderer BASE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'files') @pytest.fixture def metadata(): return ProviderMetadata('jamovi', '...
apache-2.0
RoyalKing/zerorpc-python
tests/test_channel.py
32
3917
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
yatto/Android_Kernel_ME302KL_NOUGAT
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
dllsf/odootest
openerp/addons/test_converter/models.py
69
1432
# -*- coding: utf-8 -*- from openerp.osv import orm, fields class test_model(orm.Model): _name = 'test_converter.test_model' _columns = { 'char': fields.char(), 'integer': fields.integer(), 'float': fields.float(), 'numeric': fields.float(digits=(16, 2)), 'many2one': fi...
agpl-3.0
sivas2811/mocha_739
hotdot_env/lib/python2.7/site-packages/setuptools/tests/test_upload_docs.py
522
2139
"""build_ext tests """ import sys, os, shutil, tempfile, unittest, site, zipfile from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution SETUP_PY = """\ from setuptools import setup setup(name='foo') """ class TestUploadDocsTest(unittest.TestCase): def setUp(self): ...
unlicense
DerickBeckwith/linux-stable
scripts/analyze_suspend.py
445
49020
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
MaxIV-KitsControls/netspot
netspot/tests/test_views_pa.py
1
5712
#!/usr/bin/python -tt # Run: python manage.py test netspot.tests.test_views_pa import netspot.views_pa as views_pa from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from netspot.models import ConfigurationTemplate, Category, Playbook, PlaybookPermission C...
mit
KellyChan/python-examples
javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/contrib/localflavor/mx/mx_states.py
88
1296
# -*- coding: utf-8 -*- """ A list of Mexican states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from django.utils.translation import ugettext_lazy as _ # All 31 states, plus the `Distrito Federal`. STATE_CHOICES = ( ...
mit
sqlalchemy/sqlalchemy
lib/sqlalchemy/dialects/postgresql/pypostgresql.py
3
3693
# postgresql/pypostgresql.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+pypostgresql :name: py-postgresql :db...
mit
jumpstarter-io/neutron
neutron/tests/unit/test_extension_firewall.py
8
20645
# Copyright 2013 Big Switch Networks, 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
colevscode/pygal
pygal/graph/supranationalworldmap.py
2
3823
# -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2014 Kozea # # This library is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version...
lgpl-3.0
Qalthos/ansible
lib/ansible/modules/network/system/net_banner.py
26
2125
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
saez0pub/ansible-modules-extras
messaging/rabbitmq_exchange.py
46
7117
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@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...
gpl-3.0
arraypan/Food-Stickers
FoodStickersMessages/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py
2931
1684
######################## 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
aabbox/kbengine
kbe/res/scripts/common/Lib/test/test_descr.py
60
172168
import builtins import copyreg import gc import itertools import math import pickle import sys import types import unittest import weakref from copy import deepcopy from test import support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__init__(self, *arg...
lgpl-3.0
Bernardinhouessou/Projets_Autres
Python-Projets/Scripts/Algorithms-master/tests/unionfind_test.py
2
1599
import os, sys sys.path.append(os.path.join(os.getcwd(), os.path.pardir)) import unittest from union_find.unionfind import UnionFind class test_unionfind(unittest.TestCase): def setUp(self): self.uf = UnionFind() self.uf.insert("a", "b") self.uf.insert("b", "c") self.uf.insert("i",...
mit
jelugbo/hebs_repo
common/test/acceptance/fixtures/xqueue.py
206
1402
""" Fixture to configure XQueue response. """ import requests import json from . import XQUEUE_STUB_URL class XQueueResponseFixtureError(Exception): """ Error occurred while configuring the stub XQueue. """ pass class XQueueResponseFixture(object): """ Configure the XQueue stub's response t...
agpl-3.0
fraricci/pymatgen
pymatgen/core/tests/test_tensors.py
4
29066
import unittest import math from monty.serialization import MontyDecoder from pymatgen.core.tensors import * from pymatgen.core.operations import SymmOp from pymatgen.symmetry.analyzer import SpacegroupAnalyzer from pymatgen.util.testing import PymatgenTest test_dir = os.path.join(os.path.dirname(__file__), "..", ".....
mit
MediaSapiens/wavesf
django/contrib/messages/tests/cookie.py
159
4272
from django.contrib.messages import constants from django.contrib.messages.tests.base import BaseTest from django.contrib.messages.storage.cookie import CookieStorage, \ MessageEncoder, MessageDecoder from django.contrib.messages.storage.base import Message from django.utils ...
bsd-3-clause
gavinp/chromium
native_client_sdk/src/build_tools/tests/tar_archive_test.py
7
8199
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for tar_archive.py.""" import os import sys import tarfile import unittest from build_tools import tar_archive cl...
bsd-3-clause
ryan-williams/eggo
setup.py
2
1718
# Licensed to Big Data Genomics (BDG) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The BDG licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ...
apache-2.0
ChanduERP/odoo
addons/marketing_campaign/report/campaign_analysis.py
379
5310
# -*- 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
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_gui/data_manager/controllers/dialogs/executetool.py
2
12053
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from lxml.etree import Element, SubElement from PyQt4.QtCore import QString, Qt, QRegExp, QObject, SIGNAL, QSize from PyQt4.QtGui import QPalette, QLabel, QWidget, QLineEdit, QVBoxLayout, QFileDialog,...
gpl-2.0
stewartpark/django
django/utils/termcolors.py
87
7302
""" termcolors.py """ from django.utils import six color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = {color_names[x]: '3%s' % x for x in range(8)} background = {color_names[x]: '4%s' % x for x in range(8)} RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink...
bsd-3-clause
farseerri/git_code
share/qtcreator/debugger/creatortypes.py
3
5079
############################################################################ # # Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). # Contact: http://www.qt-project.org/legal # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # ...
lgpl-2.1
nomaro/SickBeard_Backup
sickbeard/tvcache.py
29
17084
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0
seem-sky/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/commands/freeze.py
345
4664
import re import sys import pip from pip.req import InstallRequirement from pip.log import logger from pip.basecommand import Command from pip.util import get_installed_distributions from pip._vendor import pkg_resources class FreezeCommand(Command): """Output installed packages in requirements format.""" na...
lgpl-3.0
yasoob/youtube-dl-GUI
youtube_dl/extractor/zingmp3.py
3
5546
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, ) class ZingMp3BaseIE(InfoExtractor): _VALID_URL_TMPL = r'https?://(?:mp3\.zing|zingmp3)\.vn/(?:%s)/[^/]+/(?P<id>\w+)\.html' _GEO_COUNTRIES = ['VN'] def _e...
mit
tpsatish95/Python-Workshop
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Lib/idlelib/StackViewer.py
67
3567
import os import sys import linecache from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas from idlelib.ObjectBrowser import ObjectTreeItem, make_objecttreeitem def StackBrowser(root, flist=None, tb=None, top=None): if top is None: from tkinter import Toplevel top = Toplevel(root) ...
apache-2.0
eeshangarg/zulip
zerver/lib/request.py
3
14183
import threading from collections import defaultdict from functools import wraps from types import FunctionType from typing import ( Any, Callable, Dict, Generic, List, Optional, Sequence, TypeVar, Union, cast, overload, ) import orjson from django.core.exceptions import Val...
apache-2.0
EmmaIshta/QUANTAXIS
QUANTAXIS/__main__.py
1
1206
# # The MIT License (MIT) # # Copyright (c) 2016-2017 yutiansut/QUANTAXIS # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to u...
mit
eliran-stratoscale/inaugurator
inaugurator/server/idlistener.py
1
2013
import logging _logger = logging.getLogger('inaugurator.server') def statusExchange(id): return "inaugurator_status__%s" % id class IDListener: def __init__(self, id, callback, channel): self._channel = channel self._id = id self._statusQueue = None self._callback = callback...
apache-2.0
sserrot/champion_relationships
venv/Lib/site-packages/prometheus_client/openmetrics/parser.py
1
21527
#!/usr/bin/python from __future__ import unicode_literals import math import re from ..metrics_core import Metric, METRIC_LABEL_NAME_RE from ..samples import Exemplar, Sample, Timestamp from ..utils import floatToGoString try: import StringIO except ImportError: # Python 3 import io as StringIO def tex...
mit
jandechent/fritzbox-smarthome
setup.py
1
1031
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( name="fritzhome", version="1.0.0", description="Query information f...
mit
fldc/CouchPotatoServer
libs/guessit/transfo/guess_idnumber.py
102
2224
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
markeldigital/design-system
vendor/ruby/2.0.0/gems/pygments.rb-0.6.3/vendor/pygments-main/pygments/style.py
135
3779
# -*- coding: utf-8 -*- """ pygments.style ~~~~~~~~~~~~~~ Basic style object. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.token import Token, STANDARD_TYPES from pygments.util import add_metaclass class StyleMeta(t...
mit
kanagasabapathi/python-for-android
python3-alpha/extra_modules/gdata/docs/__init__.py
263
8993
#!/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 b...
apache-2.0
DanielSBrown/osf.io
website/addons/box/tests/utils.py
24
6468
# -*- coding: utf-8 -*- import mock from contextlib import contextmanager from modularodm import storage from framework.mongo import set_up_storage from website.addons.base.testing import OAuthAddonTestCaseMixin, AddonTestCase from website.addons.box import MODELS from website.addons.box.model import Box from websi...
apache-2.0
drjeep/django
django/contrib/staticfiles/management/commands/findstatic.py
463
1745
from __future__ import unicode_literals import os from django.contrib.staticfiles import finders from django.core.management.base import LabelCommand from django.utils.encoding import force_text class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'static file...
bsd-3-clause
andreikop/qutepart
tests/test_indenter/test_scheme.py
4
7261
#!/usr/bin/env python3 import unittest import os.path import sys sys.path.append(os.path.abspath(os.path.join(__file__, '..'))) from indenttest import IndentTest class BaseTestClass(IndentTest): LANGUAGE = 'Scheme' INDENT_WIDTH = 2 class Test(BaseTestClass): def test_1(self): origin = [ ...
lgpl-2.1
liuliwork/django
django/template/smartif.py
275
6643
""" Parser and utilities for the smart 'if' tag """ import warnings from django.utils.deprecation import RemovedInDjango110Warning # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (...
bsd-3-clause
HKUST-SING/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/chi2_test.py
123
3414
# 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
twz915/django
django/contrib/gis/db/backends/spatialite/models.py
3
1892
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin from django.db import models class SpatialiteGeometryColumns(models.Model): """ The 'geometry_columns' table from SpatiaLite. """ f_table_name = m...
bsd-3-clause
mthak/test_kafka
system_test/mirror_maker_testsuite/mirror_maker_test.py
20
17497
# 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
frederick-masterton/django
django/contrib/gis/db/backends/oracle/models.py
18
2212
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
bsd-3-clause
kwmonroe/layer-puppet-agent
reactive/puppet_agent.py
1
4517
#!/usr/bin/python3 # Copyright (c) 2016, James Beedy <jamesbeedy@gmail.com> import os import shutil from charms import layer from charms.reactive import when from charms.reactive import when_not from charms.reactive import set_state from charms.reactive import when_any from charms.reactive import when_none from char...
agpl-3.0
costypetrisor/scikit-learn
sklearn/linear_model/tests/test_sparse_coordinate_descent.py
244
9986
import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_true from sklearn.utils.t...
bsd-3-clause
jaxkodex/odoo
addons/website_sale_delivery/models/sale_order.py
176
6642
# -*- coding: utf-8 -*- from openerp.osv import orm, fields from openerp import SUPERUSER_ID from openerp.addons import decimal_precision from openerp.tools.translate import _ class delivery_carrier(orm.Model): _inherit = 'delivery.carrier' _columns = { 'website_published': fields.boolean('Available ...
agpl-3.0
biancini/TwitterAnalyzer
TwitterDownloader/TwitterEngine/backend/elasticsearchbackend.py
1
13492
__author__ = "Andrea Biancini" __date__ = "October 2, 2013" import requests import json from datetime import datetime from backend import Backend, BackendError from ..secrets import es_server class ElasticSearchBackend(Backend): def __init__(self, engine_config): Backend.__init__(self, engine_config) def B...
apache-2.0
cmdunkers/DeeperMind
PythonEnv/lib/python2.7/site-packages/scipy/interpolate/tests/test_gil.py
100
2097
from __future__ import division, print_function, absolute_import import itertools import threading import time import numpy as np from numpy.testing import TestCase, assert_equal, run_module_suite from numpy.testing.decorators import slow import scipy.interpolate from scipy._lib._testutils import knownfailure_overrid...
bsd-3-clause
Zeken/audacity
lib-src/lv2/lilv/waflib/Configure.py
181
9880
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,sys,time from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors try: from urllib import request except ImportError: from urllib import urlopen ...
gpl-2.0
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/cloud/rackspace/rax_cdb_user.py
33
5960
#!/usr/bin/python -tt # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'...
bsd-3-clause
mhaessig/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/echo_noext_wsh.py
465
2404
# Copyright 2013, 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
Mariatta/pythondotorg
jobs/listeners.py
4
4365
from django.conf import settings from django.core.mail import send_mail from django.db import models from django.dispatch import receiver from django.contrib.sites.models import Site from django.template import loader from django.utils.translation import ugettext_lazy as _ from .models import Job from .signals import ...
apache-2.0
KlubJagiellonski/Politikon
politikon/settings/dev.py
2
2578
import dj_database_url from .base import * DEBUG = True SITE_ID = 2 DJANGO_PROJECT_ROOT = path(__file__).abspath().dirname().dirname().dirname() MEDIA_ROOT = DJANGO_PROJECT_ROOT / 'static' / 'uploads' MEDIA_URL = 'https://politik.s3.amazonaws.com/' ALLOWED_HOSTS = ['localhost', '192.168.59.103'] CACHES = { 'd...
gpl-2.0
ivanberry/shadowsocks
shadowsocks/asyncdns.py
294
17304
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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 r...
apache-2.0
jumpstarter-io/neutron
neutron/plugins/vmware/vshield/tasks/constants.py
36
1414
# Copyright 2013 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 by a...
apache-2.0
BeegorMif/HTPC-Manager
lib/bs4/builder/_html5lib.py
423
10647
__all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from bs4.element import ( Comment, Doctype, NavigableStr...
gpl-3.0
streamlink/streamlink
examples/opencv-face.py
10
2221
#!/usr/bin/env python3 import logging import sys import streamlink import os.path try: import cv2 except ImportError: sys.stderr.write("This example requires opencv-python is installed") raise log = logging.getLogger(__name__) GREEN = (0, 255, 0) def stream_to_url(url, quality='best'): streams = str...
bsd-2-clause
xianggong/m2c_unit_test
test/integer/rotate_ulong16ulong16/compile.py
1861
4430
#!/usr/bin/python import os import subprocess import re def runCommand(command): p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) p.wait() return iter(p.stdout.readline, b'') def dumpRunCommand(command,...
gpl-2.0
szeged/servo
tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_server.py
20
2852
import unittest import pytest from six.moves.urllib.error import HTTPError wptserve = pytest.importorskip("wptserve") from .base import TestUsingServer, TestUsingH2Server class TestFileHandler(TestUsingServer): def test_not_handled(self): with self.assertRaises(HTTPError) as cm: self.request...
mpl-2.0
ghoshbishakh/filedrop
LAN-chat/client-gui.py
1
1865
#!/usr/bin/python # import and install gtk3reactor from twisted.internet import gtk3reactor gtk3reactor.install() # Import protocol, reactor and LineReceiver from twisted.internet import protocol, reactor from twisted.protocols.basic import LineReceiver #import PyGobject from gi.repository import Gtk #------------...
gpl-2.0
swri-robotics/gilbreth
gilbreth_perception/scripts/pick_point_recorder.py
1
2320
#!/usr/bin/env python2 import sys import rospy import math import geometry_msgs.msg import copy import csv import time import datetime from gilbreth_msgs.msg._ObjectDetection import ObjectDetection PICK_POINT_TOPIC = 'recognition_result_world' class PickPointRecorder: def __init__(self): self.pick_points_di...
bsd-3-clause
aahnne04/omaha
installers/tagged_installer.py
65
3236
#!/usr/bin/python2.4 # Copyright 2009-2010 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 la...
apache-2.0
xbezdick/tempest
tempest/api/compute/floating_ips/test_floating_ips_actions.py
8
5912
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
jillesme/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py
658
4406
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
endorphinl/horizon-fork
openstack_dashboard/dashboards/admin/images/views.py
11
8862
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
vjancik/pulp_npm
plugins/test/unit/plugins/test_models.py
2
32430
""" This modules contains tests for pulp_python.plugins.models. """ from gettext import gettext as _ import hashlib import re import tarfile import unittest import mock from pulp_python.common import constants from pulp_python.plugins import models # The BAD_MANIFEST is missing the Version field. BAD_MANIFEST = """...
gpl-2.0
Sponk/cudalibre
gtest/googletest/test/gtest_xml_output_unittest.py
336
14677
#!/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...
lgpl-2.1
vnpy/vnpy
vnpy/api/nh/generator/md/nh_struct.py
2
6612
STKMarketData_t = { "trading_day": "string", "update_time": "string", "update_millisec": "int", "update_sequence": "int", "instrument_id": "string", "exchange_id": "string", "exchange_inst_id": "string", "instrument_status": "int", "last_price": "double", "volume": "int", "la...
mit
boehlke/OpenSlides
openslides/assignments/models.py
1
13373
from collections import OrderedDict from decimal import Decimal from typing import Any, Dict, List from django.conf import settings from django.contrib.contenttypes.fields import GenericRelation from django.core.validators import MinValueValidator from django.db import models from openslides.agenda.models import Item...
mit
suutari/shoop
shuup_tests/core/test_order_statuses.py
1
4154
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest from django.core.exceptions import ObjectDoesNotExist...
agpl-3.0
hachreak/zenodo
tests/unit/utils/test_oai_sync.py
6
6082
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo 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 v...
gpl-2.0
talevy/hetnet
oldsim/web/final/animate/video.py
2
17664
#!/usr/bin/env python """Classes to produce videos from igraph plots. """ from __future__ import with_statement from contextlib import contextmanager from igraph.drawing import BoundingBox, Plot from shutil import rmtree from tempfile import mkdtemp, mkstemp import os import subprocess __all__ = ["MEncoderVideoEnc...
bsd-2-clause
maxive/erp
addons/l10n_be/__manifest__.py
2
2512
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Belgium - Accounting', 'version': '2.0', 'category': 'Localization', 'description': """ This is the base module to manage the accounting chart for Belgium in Odoo. =============================...
agpl-3.0
barbarubra/Don-t-know-What-i-m-doing.
python/src/Tools/unicode/comparecodecs.py
44
1427
#!/usr/bin/env python """ Compare the output of two codecs. (c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com). Licensed to PSF under a Contributor Agreement. """ import sys def compare_codecs(encoding1, encoding2): print 'Comparing encoding/decoding of %r and %r' % (encoding1, encoding2) mi...
apache-2.0
digitaleric-google/GCG-2.6.39
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
gdub/django
tests/serializers/tests.py
5
29533
# -*- coding: utf-8 -*- from __future__ import unicode_literals import importlib import json import re import unittest from datetime import datetime from xml.dom import minidom from django.core import management, serializers from django.db import connection, transaction from django.test import ( SimpleTestCase, T...
bsd-3-clause
pastas/pastas
pastas/stressmodels.py
1
49209
"""This module contains all the stress models available in Pastas. Stress models are used to translate an input time series into a contribution that explains (part of) the output series. Examples -------- >>> sm = ps.StressModel(stress, rfunc=ps.Gamma, name="sm1") >>> ml.add_stressmodel(stressmodel=sm) See Also ---...
mit
Technorip/Myntra
Django Backend/myntra/env/lib/python2.7/site-packages/setuptools/command/install.py
529
4683
from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for # now. See https://github.com/pypa/setuptools/issues/199/ _install = orig.in...
gpl-2.0
turon/openthread
tools/harness-automation/cases/router_5_7_3.py
1
1878
#!/usr/bin/env python # # Copyright (c) 2018, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
blerer/cassandra-dtest
counter_test.py
7
15650
import random import time import uuid import pytest import logging from cassandra import ConsistencyLevel from cassandra.query import SimpleStatement from tools.assertions import assert_invalid, assert_length_equal, assert_one from dtest import Tester, create_ks, create_cf from tools.data import rows_to_list since =...
apache-2.0
resmo/ansible
lib/ansible/modules/network/f5/bigip_traffic_selector.py
38
15443
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
paepcke/json_to_relation
json_to_relation/test/test_json_to_relation.py
1
20247
# Copyright (c) 2014, Stanford University # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
bsd-3-clause
letolab/HTTPretty
httpretty/__init__.py
6
2123
# #!/usr/bin/env python # -*- coding: utf-8 -*- # <HTTPretty - HTTP client mock for Python> # Copyright (C) <2011-2013> Gabriel Falcão <gabriel@nacaolivre.org> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to d...
mit
annarev/tensorflow
tensorflow/python/tools/strip_unused_lib.py
24
4952
# pylint: disable=g-bad-file-header # 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/LICENS...
apache-2.0
LaynePeng/flocker
flocker/common/_ipc.py
15
6133
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Inter-process communication for flocker. """ from subprocess import Popen, PIPE, check_output, CalledProcessError from contextlib import contextmanager from io import BytesIO from threading import current_thread from pipes import quote from zope.interf...
apache-2.0
sheafferusa/erpnext
erpnext/patches/v5_4/stock_entry_additional_costs.py
89
2010
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt def execute(): frappe.reload_doctype("Stock Entry") frappe.reload_doctype("Stock Entry Detail") frappe...
agpl-3.0
deepakrana47/DT-RAE
RAE_new_herical_deep1.py
1
7455
import numpy as np from utility1 import sigmoid,dsigmoid,preprocess, get_parent_detail, get_child_no def weight_update(w1, w2, dw1, dw2, neta, regu, epnum1, epnum2, wpresent=None): for i in wpresent: if epnum1[i] != 0: w1[i] = w1[i] - neta[0]*(dw1[i].transpose()/epnum1[i] - regu[0]*(w1[i])) ...
apache-2.0