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
ooici/coi-services
ion/agents/port/port_agent_process.py
1
21347
#!/usr/bin/env python """ @package ion.agents.instrument.port_agent_process @file ion/agents.instrument/driver_launcher.py @author Bill French @brief Port agent process class that provides a factory for different launch mechanisms USAGE: config = { device_host : 'localhost', device_port : '4001' type : ...
bsd-2-clause
Ormod/Diamond
src/collectors/supervisord/test/testsupervisord.py
38
1582
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from supervisord imp...
mit
junhuac/MQUIC
depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/tests/integration/redshift/test_cert_verification.py
126
1447
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
mit
wkfwkf/statsmodels
statsmodels/sandbox/utils_old.py
18
4094
import numpy as np import numpy.linalg as L import scipy.interpolate import scipy.linalg __docformat__ = 'restructuredtext' def recipr(X): """ Return the reciprocal of an array, setting all entries less than or equal to 0 to 0. Therefore, it presumes that X should be positive in general. """ x...
bsd-3-clause
wfxiang08/django178
django/core/management/commands/dumpdata.py
53
11224
import warnings from collections import OrderedDict from optparse import make_option from django.apps import apps from django.core.management.base import BaseCommand, CommandError from django.core import serializers from django.db import router, DEFAULT_DB_ALIAS from django.utils.deprecation import RemovedInDjango19W...
bsd-3-clause
jmartinm/invenio-master
modules/webauthorprofile/lib/webauthorprofile_publication_grapher.py
16
6265
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 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 t...
gpl-2.0
MIPS/qemu-android
scripts/qmp/qmp.py
96
6108
# QEMU Monitor Protocol Python class # # Copyright (C) 2009, 2010 Red Hat Inc. # # Authors: # Luiz Capitulino <lcapitulino@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. import json import errno import socket class QMPError(Excepti...
gpl-2.0
caneGuy/spark
python/pyspark/mllib/feature.py
22
25918
# # 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 us...
apache-2.0
whn09/tensorflow
tensorflow/contrib/learn/python/learn/estimators/composable_model_test.py
77
6392
# 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
kamyu104/django
tests/select_related/tests.py
84
9654
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import SimpleTestCase, TestCase from .models import ( Bookmark, Domain, Family, Genus, HybridSpecies, Kingdom, Klass, Order, Phylum, Pizza, Species, TaggedItem, ) class SelectRelatedTests(TestCase): @...
bsd-3-clause
gavinfaux/namebench
nb_third_party/dns/rdtypes/ANY/NXT.py
248
3725
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
technologiescollege/s2a_fr
s2a/Python/Lib/test/test_contains.py
136
3153
from test.test_support import have_unicode, run_unittest import unittest class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] class TestConta...
gpl-3.0
MoamerEncsConcordiaCa/tensorflow
tensorflow/contrib/keras/api/keras/preprocessing/image/__init__.py
57
2087
# 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
jjaner/essentia-musicbricks
test/src/unittest/sfx/test_maxtototal_streaming.py
10
1940
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
agpl-3.0
manusev/plugin.video.kuchitv
resources/regex/streamingfreetv.py
1
4423
# -*- coding: utf-8 -*- #------------------------------------------------------------ # MonsterTV Regex de streamingfreetv # Version 0.1 (17.10.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www....
gpl-2.0
tvalacarta/tvalacarta
python/main-classic/lib/youtube_dl/extractor/hitbox.py
14
7414
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, parse_iso8601, float_or_none, int_or_none, compat_str, determine_ext, ) class HitboxIE(InfoExtractor): IE_NAME = 'hitbox' _VALID_URL = r'https?://(?:w...
gpl-3.0
KokareIITP/django
django/contrib/gis/utils/layermapping.py
335
27300
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: https://docs.djangoproject.com/en/dev/ref/contrib/gi...
bsd-3-clause
erigones/api_openvpn
tests.py
1
5447
from django.contrib.auth.models import User from api_openvpn.models import UserProfile, Server from rest_framework.test import APIClient from rest_framework.test import APITestCase from functions import EasyRSAFuncions from rest_framework import exceptions import time class ApiTest(APITestCase): """ It tests ...
bsd-3-clause
hftools/hftools
hftools/networks/noise.py
1
4253
# -*- coding: ISO-8859-1 -*- #----------------------------------------------------------------------------- # Copyright (c) 2014, HFTools Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #---------------------...
bsd-3-clause
cvra/OpenOCD
contrib/xsvf_tools/svf2xsvf.py
101
26710
#!/usr/bin/python3.0 # Copyright 2008, SoftPLC Corporation http://softplc.com # Dick Hollenbeck dick@softplc.com # 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 Lic...
gpl-2.0
jolevq/odoopub
addons/hr_payroll/report/report_contribution_register.py
377
3380
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
fhaoquan/kbengine
kbe/res/scripts/common/Lib/xml/dom/minidom.py
76
66804
"""Simple implementation of the Level 1 DOM. Namespaces and other minor Level 2 features are also supported. parse("foo.xml") parseString("<foo><bar/></foo>") Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this ...
lgpl-3.0
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/tools/deps2git/buildspec_to_git.py
6
9396
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Public buildspec to GIT mapping.""" import re from deps2git import SplitScmUrl GIT_HOST = 'https://chromium.googlesource.com/' webkit_git = GIT_HOST + '...
mit
morrisonwudi/zipline
zipline/utils/data.py
31
12761
# # Copyright 2013 Quantopian, 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 wr...
apache-2.0
chenyyx/scikit-learn-doc-zh
examples/zh/cluster/plot_color_quantization.py
61
3444
# -*- coding: utf-8 -*- """ ================================== Color Quantization using K-Means ================================== Performs a pixel-wise Vector Quantization (VQ) of an image of the summer palace (China), reducing the number of colors required to show the image from 96,615 unique colors to 64, while pre...
gpl-3.0
evewspace/eve-wspace
evewspace/API/utils.py
2
11460
# Eve W-Space # Copyright 2014 Andrew Austin and contributors # # 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 requi...
apache-2.0
mavrix93/LightCurvesClassifier
lcc_web/web/interface/models.py
1
1030
from __future__ import unicode_literals from django.db import models from django.utils import timezone import json # Create your models here. class StarsFilter(models.Model): id = models.AutoField(primary_key=True) user = models.ForeignKey('auth.User') status = models.CharField(default="Not started", max...
mit
YelaSeamless/pyc2py
tools/out_saver.py
2
1117
# pyc2py - The smart python decompiler. # Copyright (C) 2012 Centre National de la Recherche Scientifique # # 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,...
gpl-3.0
andreparrish/python-for-android
python-modules/twisted/twisted/scripts/tapconvert.py
81
2095
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.python import usage from twisted.application import app from twisted.persisted import sob import sys, getpass class ConvertOptions(usage.Options): synopsis = "Usage: tapconvert [options]" optParameters = [ [...
apache-2.0
biziwalker/mtasa
vendor/google-breakpad/src/tools/gyp/pylib/gyp/win_tool.py
40
12634
#!/usr/bin/env python # 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. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ import os impor...
gpl-3.0
sharbison3/python-docs-samples
language/sentiment/sentiment_analysis_test.py
6
1689
# Copyright 2016, 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, s...
apache-2.0
modsy/incubator-airflow
airflow/api/imp/dags.py
1
1346
import datetime import json import logging import uuid from airflow.exceptions import AirflowException from airflow.models import DagRun, DagBag from airflow.utils.state import State import airflow.settings def run_dag(dag_id, params=None, run_id=None, conf=None, execution_date=None): dagbag = DagBag() if da...
apache-2.0
alblue/swift
utils/vim/swift-format.py
29
3125
# This file is a minimal swift-format vim-integration. To install: # - Change 'binary' if swift-format is not on the path (see below). # - Add to your .vimrc: # # map <C-I> :pyf <path-to-this-file>/swift-format.py<cr> # imap <C-I> <c-o>:pyf <path-to-this-file>/swift-format.py<cr> # # The first line enables swift-f...
apache-2.0
patrickm/chromium.src
chrome/common/extensions/docs/server2/timer.py
122
1702
# 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 time class Timer(object): '''A simple timer which starts when constructed and stops when Stop is called. ''' def __init__(self): self._st...
bsd-3-clause
usc-isi/essex-baremetal-support
nova/tests/rpc/common.py
5
8932
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
indrajitr/ansible
lib/ansible/vars/hostvars.py
51
5183
# (c) 2012-2014, 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) an...
gpl-3.0
Kubuxu/cjdns
node_build/dependencies/libuv/build/gyp/test/dependencies/gyptest-lib-only.py
100
1207
#!/usr/bin/env python # Copyright (c) 2011 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. """ Verify that a link time only dependency will get pulled into the set of built targets, even if no executable uses it. """ import TestGy...
gpl-3.0
poine/rosmip
rosmip_simulator/rosmip_sim_control/scripts/test.py
1
8245
#!/usr/bin/env python ''' ''' import math, time, numpy as np import rospy import gazebo_msgs.msg, std_msgs.msg, geometry_msgs, nav_msgs.msg, sensor_msgs.msg, rosmip_control.msg import tf.transformations import pdb def list_of_position(p): return (p.x, p.y, p.z) def list_of_orientation(q): return (q.x, q.y, q.z, q....
gpl-3.0
chasing0819/Sample_CPP_Cocos2dx
cocos2d/tools/cocos2d-console/bin/cocos_project.py
11
18116
import os import re import json import cocos class Project(object): CPP = 'cpp' LUA = 'lua' JS = 'js' CONFIG = '.cocos-project.json' KEY_PROJ_TYPE = 'project_type' KEY_HAS_NATIVE = 'has_native' KEY_CUSTOM_STEP_SCRIPT = "custom_step_script" CUSTOM_STEP_PRE_BUILD = "pre-build" ...
mit
pavlova-marina/QGIS
python/plugins/processing/algs/qgis/PointsFromLines.py
6
6459
# -*- coding: utf-8 -*- """ *************************************************************************** PointsFromLines.py --------------------- Date : August 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com **********...
gpl-2.0
sexroute/commandergenius
project/jni/python/src/Lib/test/cjkencodings_test.py
64
66874
teststring = { 'big5': ( "\xa6\x70\xa6\xf3\xa6\x62\x20\x50\x79\x74\x68\x6f\x6e\x20\xa4\xa4" "\xa8\xcf\xa5\xce\xac\x4a\xa6\xb3\xaa\xba\x20\x43\x20\x6c\x69\x62" "\x72\x61\x72\x79\x3f\x0a\xa1\x40\xa6\x62\xb8\xea\xb0\x54\xac\xec" "\xa7\xde\xa7\xd6\xb3\x74\xb5\x6f\xae\x69\xaa\xba\xa4\xb5\xa4\xd1" "\x2c\x20\xb6\x7d\xb5\x6f\x...
lgpl-2.1
sapiippo/git-repo
subcmds/__init__.py
55
1414
# # Copyright (C) 2008 The Android Open Source Project # # 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
kingvuplus/boom
keymapparser.py
2
2042
# Embedded file name: /usr/lib/enigma2/python/keymapparser.py import enigma import xml.etree.cElementTree from keyids import KEYIDS from Tools.KeyBindings import addKeyBinding class KeymapError(Exception): def __init__(self, message): self.msg = message def __str__(self): return s...
gpl-2.0
farhaanbukhsh/sympy
sympy/functions/elementary/integers.py
39
8109
from __future__ import print_function, division from sympy.core.singleton import S from sympy.core.function import Function from sympy.core import Add from sympy.core.evalf import get_integer_part, PrecisionExhausted from sympy.core.numbers import Integer from sympy.core.relational import Gt, Lt, Ge, Le from sympy.cor...
bsd-3-clause
sigma-random/androguard
elsim/tests/test_similarity.py
23
16115
#!/usr/bin/env python # This file is part of Elsim. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim 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 ve...
apache-2.0
zhan-xiong/buck
third-party/py/unittest2/unittest2/test/test_skipping.py
111
4936
from unittest2.test.support import LoggingResult import unittest2 class Test_TestSkipping(unittest2.TestCase): def test_skipping(self): class Foo(unittest2.TestCase): def test_skip_me(self): self.skipTest("skip") events = [] result = LoggingResult(events) ...
apache-2.0
jcpowermac/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg_role.py
56
7846
#!/usr/bin/python # (c) 2016, 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
lancezlin/ml_template_py
lib/python2.7/site-packages/pygments/lexers/idl.py
23
14978
# -*- coding: utf-8 -*- """ pygments.lexers.idl ~~~~~~~~~~~~~~~~~~~ Lexers for IDL. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, words from pygments.token import Text, Comment, Oper...
mit
elssar/calibre
src/calibre/ebooks/docx/char_styles.py
10
9147
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from collections import OrderedDict from calibre.ebooks.docx.block_styles im...
gpl-3.0
LeMeteore/python_koans
python2/koans/about_generators.py
1
4568
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Written in place of AboutBlocks in the Ruby Koans # # Note: Both blocks and generators use a yield keyword, but they behave # a lot differently # from runner.koan import * class AboutGenerators(Koan): def test_generating_values_on_the_fly(self): result ...
mit
plotly/plotly.py
packages/python/plotly/plotly/validators/sunburst/hoverlabel/__init__.py
84
1056
import sys if sys.version_info < (3, 7): from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import BordercolorValidator from ._bgcolorsrc import ...
mit
ckeyer/fabric
test/regression/release/make_targets_release_tests.py
10
3588
# Copyright IBM Corp. All Rights Reserved. # # SPDX-License-Identifier: Apache-2.0 # import unittest import subprocess class make_targets(unittest.TestCase): def test_makeNative(self): ''' In this make targets test, we execute makeNative target to make sure native target is working wit...
apache-2.0
miipl-naveen/optibizz
addons/l10n_vn/__openerp__.py
342
1697
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module is Copyright (c) 2009-2013 General Solutions (http://gscom.vn) All Rights Reserved. # # This program is free software: you can redistribute it and/or...
agpl-3.0
Scottz0r/infmin
infmin_main.py
1
4303
import argparse import sys import random import os silent = False def minimize_file(input_file_path, output_file_path, lines): if not silent: sys.stdout.write("Minimizing file `{}` to {} lines.\n".format(input_file_path, lines)) sys.stdout.flush() counter = 0 with open(input_file_path) ...
mit
edxnercel/edx-platform
common/test/acceptance/pages/studio/users.py
45
9528
""" Page classes to test either the Course Team page or the Library Team page. """ from bok_choy.promise import EmptyPromise from bok_choy.page_object import PageObject from ...tests.helpers import disable_animations from .course_page import CoursePage from . import BASE_URL def wait_for_ajax_or_reload(browser): ...
agpl-3.0
reinout/django
tests/foreign_object/models/article.py
29
3329
from django.db import models from django.db.models.fields.related import ForwardManyToOneDescriptor from django.utils.translation import get_language class ArticleTranslationDescriptor(ForwardManyToOneDescriptor): """ The set of articletranslation should not set any local fields. """ def __set__(self,...
bsd-3-clause
b-mueller/mythril
tests/disassembler/disassembly.py
1
1667
from mythril.disassembler.disassembly import * instruction_list = [ {"opcode": "PUSH4", "argument": "0x10203040"}, {"opcode": "EQ"}, {"opcode": "PUSH4", "argument": "0x40302010"}, {"opcode": "JUMPI"}, ] def test_get_function_info(mocker): # Arrange global instruction_list signature_datab...
mit
kailIII/emaresa
trunk.cl/reportes/reportes_reportc_RESP.py
3
10804
import time from report import report_sxw import logging _logger = logging.getLogger('reportes') class reportes_reportc( report_sxw.rml_parse ): def __init__(self,cr,uid,name,context): super(reportes_reportc,self).__init__(cr,uid,name,context=context) self.localcontext.update({ 'time': time, '_periodos_...
agpl-3.0
bukson/steampy
steampy/guard.py
1
1707
import base64 import hmac import json import struct import time import os from hashlib import sha1 def load_steam_guard(steam_guard: str) -> dict: if os.path.isfile(steam_guard): with open(steam_guard, 'r') as f: return json.loads(f.read()) else: return json.loads(steam_guard) d...
mit
kmolab/kmolab.github.io
data/Brython-3.3.4/Lib/genericpath.py
3
3113
""" Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ import os __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile'] # Does a path exist? # This is fal...
agpl-3.0
huggingface/transformers
src/transformers/pipelines/zero_shot_classification.py
2
8455
from typing import List, Union import numpy as np from ..file_utils import add_end_docstrings from ..tokenization_utils import TruncationStrategy from ..utils import logging from .base import PIPELINE_INIT_ARGS, ArgumentHandler, Pipeline logger = logging.get_logger(__name__) class ZeroShotClassificationArgumentHa...
apache-2.0
psav/cfme_tests
sprout/appliances/urls.py
7
5102
# -*- coding: utf-8 -*- from django.conf.urls import url from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login, password_change from appliances import api, views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^check_appliance/(?P<provider_id>[^/]+)/(?P<...
gpl-2.0
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_cacheglobal_binding.py
1
6207
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
tmerrick1/spack
var/spack/repos/builtin/packages/igvtools/package.py
3
2545
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
gitromand/phantomjs
src/breakpad/src/tools/gyp/test/generator-output/gyptest-rules.py
151
1702
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies --generator-output= behavior when using rules. """ import TestGyp test = TestGyp.TestGyp() test.writable(test.workpath('rule...
bsd-3-clause
mgraffg/simplegp
SimpleGP/tests/test_gppde.py
1
27557
# Copyright 2013 Mario Graff Guerrero # 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 wri...
apache-2.0
prarthitm/edxplatform
lms/djangoapps/certificates/views/xqueue.py
27
9751
""" Views used by XQueue certificate generation. """ import json import logging from django.contrib.auth.models import User from django.db import transaction from django.http import HttpResponse, Http404, HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http impor...
agpl-3.0
emedinaa/contentbox
third_party/oauth2client/xsrfutil.py
4
3481
#!/usr/bin/python2.5 # # Copyright 2010 the Melange 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
sun1991/lvsys
lvsys/env_lvsys/Lib/site-packages/setuptools/tests/test_msvc9compiler.py
135
5893
""" Tests for msvc9compiler. """ import os import contextlib import distutils.errors import pytest try: from unittest import mock except ImportError: import mock from . import contexts # importing only setuptools should apply the patch __import__('setuptools') pytest.importorskip("distutils.msvc9compiler")...
mit
eneldoserrata/marcos_openerp
addons/l10n_fr/wizard/fr_report_bilan.py
45
2315
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
edbaskerville/landusemodel
archive/experiments/2020-08-03-3-eps+k/collate_output.py
2
2406
#!/usr/bin/env python3 import os import sys import csv import sqlite3 os.chdir(os.path.dirname(__file__)) def main(): assert(os.path.exists('db.sqlite')) with sqlite3.connect('db.sqlite', isolation_level = None) as db: db.execute(''' CREATE TABLE output ( run_id INTEGER, time REAL, ...
agpl-3.0
bertucho/moviestalk
venv/Lib/site-packages/pystache/tests/test_defaults.py
32
2152
# coding: utf-8 """ Unit tests for defaults.py. """ import unittest import pystache from pystache.tests.common import AssertStringMixin # TODO: make sure each default has at least one test. class DefaultsConfigurableTestCase(unittest.TestCase, AssertStringMixin): """Tests that the user can change the defaul...
mit
clairew/kubernetes
hack/boilerplate/boilerplate.py
26
7313
#!/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
imouren/django-wiki
wiki/models/pluginbase.py
13
11273
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import models from django.utils.translation import ugettext_lazy as _ from django.db.models import signals """ There are three kinds of plugin base models: 1) SimplePlugin - an object purely associa...
gpl-3.0
NeuralEnsemble/neuroConstruct
lib/jython/Lib/test/test_bytes.py
3
44729
"""Unit tests for the bytes and bytearray types. XXX This is a mess. Common tests should be moved to buffer_tests.py, which itself ought to be unified with string_tests.py (and the latter should be modernized). """ import os import re import sys import copy import functools import pickle import tempfile import unitt...
gpl-2.0
sfeltman/pygobject
demos/gtk-demo/demos/TreeView/treemodel_filetree.py
2
8144
#!/usr/bin/env python title = "File Tree (GenericTreeModel)" description = """ This is a file list demo which makes use of the GenericTreeModel python implementation of the Gtk.TreeModel interface. This demo shows what methods need to be overridden to provide a valid TreeModel to a TreeView. """ import os import stat...
lgpl-2.1
rubencabrera/odoo
addons/website_blog/wizard/__init__.py
373
1077
# -*- 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
Vinay26k/python
Projects/GetCricketScore.py
1
1897
import requests from bs4 import BeautifulSoup import xmltodict import time date = time.strftime("%B %d %Y") ls =[] det = {} tScore = {} url = 'fdfdfdgfgh.com' r = requests.get(url) data = r.text doc = xmltodict.parse(data) soup = BeautifulSoup(data,'html.parser') matches = soup.find_all(['match','Tme']) #directScore =...
mit
rawwell/django
django/templatetags/cache.py
3
1979
from django.template import Library, Node, TemplateSyntaxError from django.template import resolve_variable from django.core.cache import cache from django.utils.encoding import force_unicode register = Library() class CacheNode(Node): def __init__(self, nodelist, expire_time, fragment_name, vary_on): sel...
bsd-3-clause
sarantapichos/faircoop-market
addons/sale_mrp/tests/test_move_explode.py
225
5190
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
dushu1203/chromium.src
chrome/test/mini_installer/quit_chrome.py
83
2491
# 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. """Quits Chrome. This script sends a WM_CLOSE message to each window of Chrome and waits until the process terminates. """ import optparse import os import...
bsd-3-clause
chaffra/sympy
sympy/combinatorics/free_groups.py
7
35424
# -*- coding: utf-8 -*- from __future__ import print_function, division from sympy.core.basic import Basic from sympy.core.compatibility import is_sequence, as_int, string_types from sympy.core.expr import Expr from sympy.core.symbol import Symbol, symbols as _symbols from sympy.core.sympify import CantSympify from mp...
bsd-3-clause
abhikumar22/MYBLOG
blg/Lib/site-packages/openid/yadis/xri.py
4
3475
# -*- test-case-name: openid.test.test_xri -*- """Utility functions for handling XRIs. @see: XRI Syntax v2.0 at the U{OASIS XRI Technical Committee<http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xri>} """ import re from functools import reduce from openid import codecutil # registers 'oid_percent_escape...
gpl-3.0
tensorflow/text
tensorflow_text/python/ops/gather_with_default_op_test.py
7
11337
# coding=utf-8 # Copyright 2021 TF.Text 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 law or ag...
apache-2.0
onlyjus/pyqtgraph
examples/GLMeshItem.py
27
3299
# -*- coding: utf-8 -*- """ Simple examples demonstrating the use of GLMeshItem. """ ## Add path to library (just for examples; you do not need this) import initExample from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph as pg import pyqtgraph.opengl as gl app = QtGui.QApplication([]) w = gl.GLViewWidget() w.sh...
mit
supersven/intellij-community
python/lib/Lib/site-packages/django/contrib/admin/forms.py
78
1939
from django import forms from django.contrib.auth import authenticate from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy, ugettext as _ ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. " ...
apache-2.0
DavidHowlett/pyserial-1
serial/tools/list_ports_posix.py
14
3607
#!/usr/bin/env python # # This is a module that gathers a list of serial ports on POSIXy systems. # For some specific implementations, see also list_ports_linux, list_ports_osx # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C) 2011-2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Ident...
bsd-3-clause
aazhbd/medical_info01
patient/migrations/0012_auto__del_field_presentmedicalhistory_others__del_field_pastmedicalhis.py
1
30034
# -*- 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): # Deleting field 'PresentMedicalHistory.others' db.delete_column(u'patient_presentmedicalhistory', 'others')...
bsd-3-clause
jmartinezchaine/OpenERP
openerp/addons/import_sugarcrm/sugarsoap_services.py
9
88314
################################################## # sugarsoap_services.py # generated by ZSI.generate.wsdl2python ################################################## from sugarsoap_services_types import * from osv import osv from tools.translate import _ import socket import import_sugarcrm IP = socket.gethostbyna...
agpl-3.0
Napchat/microblog
app/forms.py
1
1951
''' app.forms ~~~~~~~~~ Forms we need to use when posting datas in our website. flask_wtf.Form is still useable, but FlaskForm is suggested. ''' from flask_wtf import FlaskForm from wtforms import StringField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length from flask_babel import get...
mit
quentinlautischer/291MiniProject2
lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py
304
1924
from base64 import b64encode from ..packages import six ACCEPT_ENCODING = 'gzip,deflate' def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None): """ Shortcuts for generating request headers. :param keep_alive: If ``True...
apache-2.0
402231444/c2g16
w2/static/Brython2.0.0-20140209-164925/Lib/_pyio.py
103
72494
""" Python implementation of the io module. """ import os import abc import codecs import errno # Import _thread instead of threading to reduce startup cost try: from _thread import allocate_lock as Lock except ImportError: from _dummy_thread import allocate_lock as Lock import io from io import (__all__, SEE...
gpl-2.0
yonglehou/zerorpc-python
tests/test_zmq.py
108
1959
# -*- 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
PyPlanet/PyPlanet
pyplanet/apps/core/statistics/processor.py
1
4941
""" This file contains several queries and logic to fetch statistics that can be displayed on the statistics views. Please note that this file is only meant for the statistics app, and can change at any time! """ from pprint import pprint import asyncio from datetime import datetime from peewee import JOIN from pypl...
gpl-3.0
maxkoryukov/headphones
lib/cherrypy/process/wspbus.py
49
16432
"""An implementation of the Web Site Process Bus. This module is completely standalone, depending only on the stdlib. Web Site Process Bus -------------------- A Bus object is used to contain and manage site-wide behavior: daemonization, HTTP server start/stop, process reload, signal handling, drop privileges, PID f...
gpl-3.0
zofuthan/edx-platform
common/lib/chem/chem/chemtools.py
250
10721
"""This module originally includes functions for grading Vsepr problems. Also, may be this module is the place for other chemistry-related grade functions. TODO: discuss it. """ import json import unittest import itertools def vsepr_parse_user_answer(user_input): """ user_input is json generated by vsepr.js...
agpl-3.0
bctnry/shadowsocks
setup.py
929
1321
import codecs from setuptools import setup with codecs.open('README.rst', encoding='utf-8') as f: long_description = f.read() setup( name="shadowsocks", version="2.8.2", license='http://www.apache.org/licenses/LICENSE-2.0', description="A fast tunnel proxy that help you get through firewalls", ...
apache-2.0
Chamaeleon-/BlackAndWhiteCards
main.py
1
19218
#!/usr/bin/env python # -*- coding: UTF-8 -*- import random #from xmlrpc.server import SimpleXMLRPCServer #from xmlrpc.client import ServerProxy #initialization random.seed() #variables #baum for more randomness #serverip = input() #serverport = input() white_cards = ["A Gypsy curse.","A moment of silence.","A saus...
mit
shepdelacreme/ansible
lib/ansible/modules/cloud/openstack/os_ironic_node.py
41
12663
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015, Hewlett-Packard Development Company, L.P. # 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
GheRivero/ansible
lib/ansible/plugins/action/include_vars.py
2
10960
# (c) 2016, Allen Sanabria <asanabria@linuxdynasty.org> # # 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 l...
gpl-3.0