code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import re import sys import uuid import json import time...
pcu4dros/pandora-core
workspace/lib/python3.5/site-packages/werkzeug/debug/__init__.py
Python
mit
17,737
import datetime from mongoengine import Document, EmbeddedDocument, StringField, IntField from mongoengine import EmbeddedDocumentField, DateTimeField, ListField from django.conf import settings from crits.core.crits_mongoengine import CritsBaseAttributes, CritsDocumentFormatter from crits.core.crits_mongoengine impo...
ckane/crits
crits/campaigns/campaign.py
Python
mit
6,397
# -*- coding: utf-8 -*- """ pygments.lexers.special ~~~~~~~~~~~~~~~~~~~~~~~ Special lexers. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import cStringIO from pygments.lexer import Lexer from pygments.toke...
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/extern/pygments/lexers/special.py
Python
mit
3,180
from chat.tests.message import * from chat.tests.channel import * from chat.tests.test_url import *
dionyziz/ting
API/chat/tests/__init__.py
Python
mit
100
#!/usr/bin/env python3 # McDermott # March 2020 # first, make sure the macfp module directory is in your path # if not, uncomment the lines below and replace <path to macfp-db> # with the path (absolute or relative) to your macfp-db repository import sys # sys.path.append('<path to macfp-db>/macfp-db/Utilities/') sys...
MaCFP/macfp-db
Buoyant_Plumes/Sandia_Helium_Plume/Computational_Results/2021/SNL/SNL_plot_results.py
Python
mit
754
""" KBase handlers for authentication in the Jupyter notebook. """ __author__ = 'Bill Riehl <wjriehl@lbl.gov>' from tornado.escape import url_escape from notebook.base.handlers import IPythonHandler from traitlets.config import Application from notebook.auth.login import LoginHandler from notebook.auth.logout import L...
msneddon/narrative
src/biokbase/narrative/handlers/authhandlers.py
Python
mit
4,088
# -*- coding: utf-8 -*- # Natural Language Toolkit: Twitter client # # Copyright (C) 2001-2015 NLTK Project # Author: Lorenzo Rubio <lrnzcig@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Regression tests for `json2csv()` and `json2csv_entities()` in Twitter package. "...
MyRookie/SentimentAnalyse
venv/lib/python2.7/site-packages/nltk/test/unit/test_json2csv_corpus.py
Python
mit
8,153
__author__ = 'jay' from pathlib import Path import os import json import requests data_dir = Path(__file__, "../../data").resolve() usernames_path = Path(data_dir, "github_usernames.json") users_path = Path(data_dir, "github_users.json") users_url_template = "https://api.github.com/users/%s" class RateLimitExceptio...
Impactstory/depsy
scripts/github_users.py
Python
mit
2,346
#!/usr/bin/env python import os import sqlite3 from creoleparser import create_dialect, creole11_base, Parser import circuits from circuits.web import Server, Controller, Logger, Static import macros text2html = Parser( create_dialect(creole11_base, macro_func=macros.dispatcher), method="xhtml" ) class W...
nizox/circuits
examples/web/wiki/wiki.py
Python
mit
2,409
from rpython.rtyper.lltypesystem import rffi, lltype from rpython.rlib.rarithmetic import intmask from hippy import consts from hippy.error import PHPException from hippy.builtin import wrap_method, ThisUnwrapper, StringArg from hippy.builtin_klass import GetterSetterWrapper, k_Exception from hippy.klass import def_cl...
ericpp/hippyvm
hippy/module/date/dateinterval_klass.py
Python
mit
9,931
class Solution(object): def findPermutation(self, s): """ :type s: str :rtype: List[int] """ if not s: return [] res = [] i = 1 for c in s: if c == 'I': res.extend(range(i, len(res), -1)) i += 1 res.ext...
Mlieou/oj_solutions
leetcode/python/ex_484.py
Python
mit
366
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # t...
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/ete2/_ph.py
Python
mit
4,356
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os AUTHOR = 'KMOL' SITENAME = '2015FALL KMOL 課程' SITEURL = '' PATH = 'content' TIMEZONE = 'Asia/Taipei' DEFAULT_LANG = '...
coursemdetw/reveal2
pelican/publishconf.py
Python
mit
1,515
import cupy from cupy import core def array(obj, dtype=None, copy=True, ndmin=0): """Creates an array on the current device. This function currently does not support the ``order`` and ``subok`` options. Args: obj: :class:`cupy.ndarray` object or any other object that can be passe...
AlpacaDB/chainer
cupy/creation/from_data.py
Python
mit
3,203
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
pkess/beets
test/_common.py
Python
mit
10,605
"""Tests for the preset and the history of queries.""" import json import os from qgis.core import QgsCoordinateReferenceSystem, QgsRectangle from qgis.testing import unittest from QuickOSM.core.utilities.json_encoder import as_enum from QuickOSM.core.utilities.query_saved import QueryManagement from QuickOSM.core.ut...
Gustry/QuickOSM
QuickOSM/test/test_saved_query.py
Python
gpl-2.0
17,258
from common import * import conduit.datatypes.File as File import conduit.utils as Utils import os import tempfile import datetime import random import stat tmpdir = tempfile.mkdtemp() ok("Created tempdir %s" % tmpdir, True) contents = Utils.random_string() name = Utils.random_string()+".foo" tmpFile = File.TempFile...
arsfeld/conduit
test/python-tests/TestCoreTempFile.py
Python
gpl-2.0
4,008
# -*- encoding: utf-8 -*- # This file is part of MyPaint. # Copyright (C) 2013-2015 by Andrew Chadwick <a.t.chadwick@gmail.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...
alown/mypaint
gui/builderhacks.py
Python
gpl-2.0
4,322
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
jacquerie/inspire-next
inspirehep/modules/authors/rest/citations.py
Python
gpl-3.0
4,632
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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 Licen...
oliver-sanders/cylc
cylc/flow/cycling/loader.py
Python
gpl-3.0
5,488
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2018 Justin Kufro <jkufro@andrew.cmu.edu> # # Copyright 2018 Ivan Minno <iminno@andrew.cmu.edu> ...
Vagab0nd/SiCKRAGE
lib3/github/Path.py
Python
gpl-3.0
3,820
# Author: Seamus Wassman # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 you...
mcus/SickRage
sickbeard/providers/morethantv.py
Python
gpl-3.0
8,361
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr from gnuradio import blocks from gnuradio import filter from gnuradio import analog from gnuradio import audio from gnuradio.filter import...
mbr0wn/gnuradio
gr-analog/examples/fm_demod.py
Python
gpl-3.0
2,750
# Copyright 2013 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 law or a...
s20121035/rk3288_android5.1_repo
cts/apps/CameraITS/tests/inprog/test_3a_remote.py
Python
gpl-3.0
2,817
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
ubuntu-core/snapcraft
tests/unit/sources/test_bazaar.py
Python
gpl-3.0
7,406
# Generated by Django 3.0.7 on 2020-08-03 08:42 from django.db import migrations, models import weblate.utils.validators class Migration(migrations.Migration): dependencies = [ ("trans", "0093_auto_20200730_1432"), ] operations = [ migrations.AddField( model_name="project",...
nijel/weblate
weblate/trans/migrations/0094_project_language_aliases.py
Python
gpl-3.0
752
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, sys, commands, string, glob from buildtools import * # usage: # The following all work as you might expect: # python build.py # ./build.py debug # python build.py release # python build.py test # ./build.py clean # ./build.py release clean # python build.py rel...
gxyang/hstore
build.py
Python
gpl-3.0
13,198
def agts(queue): al = queue.add('surface.agts.py') queue.add('work_function.py', ncpus=1, deps=[al]) if __name__ == '__main__': execfile('Al100.py', {'k': 6, 'N': 5})
qsnake/gpaw
doc/exercises/surface/surface.agts.py
Python
gpl-3.0
180
#!/usr/bin/env python import argparse import gzip import logging import os import shutil import subprocess browser_specific_args = { "firefox": ["--install-browser"] } def tests_affected(commit_range): output = subprocess.check_output([ "python", "./wpt", "tests-affected", "--null", commit_range ...
jimberlage/servo
tests/wpt/web-platform-tests/tools/ci/taskcluster-run.py
Python
mpl-2.0
3,009
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('gating.signals', 'lms.djangoapps.gating.signals') ...
eduNEXT/edunext-platform
import_shims/lms/gating/signals.py
Python
agpl-3.0
365
# -*- coding: utf-8 -*- # # http://www.privacyidea.org # (c) cornelius kölbel, privacyidea.org # # 2014-12-08 Cornelius Kölbel, <cornelius@privacyidea.org> # Complete rewrite during flask migration # Try to provide REST API # # privacyIDEA is a fork of LinOTP. Some code is adapted from # the syste...
woddx/privacyidea
privacyidea/api/policy.py
Python
agpl-3.0
16,381
# -*- coding: utf-8 -*- from ..base.xfs_account import XFSAccount class RapidfileshareNet(XFSAccount): __name__ = "RapidfileshareNet" __type__ = "account" __version__ = "0.11" __status__ = "testing" __description__ = """Rapidfileshare.net account plugin""" __license__ = "GPLv3" __authors...
vuolter/pyload
src/pyload/plugins/accounts/RapidfileshareNet.py
Python
agpl-3.0
532
from collections import Iterable from json import loads from sys import version_info from searx.url_utils import urlencode from searx.utils import to_string if version_info[0] == 3: unicode = str search_url = None url_query = None content_query = None title_query = None paging = False suggestion_query = '' result...
asciimoo/searx
searx/engines/json_engine.py
Python
agpl-3.0
3,207
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. # Author: Yannick Gouin <yannick.gouin@elico-corp.com> # # This program is free software: you c...
udayinfy/openerp-7.0
gap_analysis_project/gap_analysis_project.py
Python
agpl-3.0
13,460
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyDistributed(PythonPackage): """Distributed scheduler for Dask""" homepage = "https:...
rspavel/spack
var/spack/repos/builtin/packages/py-distributed/package.py
Python
lgpl-2.1
1,699
############################################################################## # Copyright (c) 2013-2017, 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...
wscullin/spack
var/spack/repos/builtin/packages/xkill/package.py
Python
lgpl-2.1
1,898
VERSION = (1, 2, 2, 'dev') __version__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:]
suizokukan/urwid
urwid/version.py
Python
lgpl-2.1
104
#!/usr/bin/env python """ * ========================================================================= * This file is part of math.linear-c++ * ========================================================================= * * (C) Copyright 2004 - 2014, MDA Information Systems LLC * * math.linear-c++ is free software...
mdaus/coda-oss
modules/python/math.linear/tests/test_math_linear.py
Python
lgpl-3.0
9,396
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from lxml import etree from app.detective.utils import to_class_name, to_camelcase, to_underscores import re # Defines the owl and rdf namespaces namespaces = { 'owl': 'http://www.w3.org/2002/07/owl#', 'rdf': 'http://www....
carlvlewis/detective.io
app/detective/management/commands/parseowl.py
Python
lgpl-3.0
16,471
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 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 # ...
Brocade-OpenSource/OpenStack-DNRM-Nova
nova/virt/vmwareapi/vmware_images.py
Python
apache-2.0
7,120
# 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 use ...
zzcclp/carbondata
python/pycarbon/tests/core/test_carbon_tf_dataset.py
Python
apache-2.0
10,899
import time from dronekit import connect, LocationGlobal, Command from pymavlink import mavutil from dronekit.test import with_sitl from nose.tools import assert_not_equals, assert_equals @with_sitl def test_empty_clear(connpath): vehicle = connect(connpath) # Calling clear() on an empty object should not cr...
dronekit/dronekit-python
dronekit/test/sitl/test_waypoints.py
Python
apache-2.0
4,352
"""Treadmill app configurator daemon, subscribes to eventmgr events. """ import click from .. import appcfgmgr def init(): """Top level command handler.""" @click.command() @click.option('--approot', type=click.Path(exists=True), envvar='TREADMILL_APPROOT', required=True) def top(...
keithhendry/treadmill
treadmill/sproc/appcfgmgr.py
Python
apache-2.0
452
import sys from mailpile.app import Main def main(): Main(sys.argv[1:]) if __name__ == "__main__": main()
laborautonomo/Mailpile
mailpile/__main__.py
Python
apache-2.0
118
# 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...
seanli9jan/tensorflow
tensorflow/contrib/rnn/python/ops/lstm_ops.py
Python
apache-2.0
25,114
""" # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.ap...
rcbops/quantum-buildpackage
quantum/plugins/cisco/ucs/cisco_ucs_inventory_configuration.py
Python
apache-2.0
1,019
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
NeCTAR-RC/horizon
openstack_dashboard/test/integration_tests/tests/test_users.py
Python
apache-2.0
1,687
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
sparkslabs/kamaelia
Sketches/MPS/ArduinoRelated/slideshow.py
Python
apache-2.0
1,942
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
huaweiswitch/neutron
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
Python
apache-2.0
73,059
class PowerDNSRouter(object): """Route all operations on powerdns models to the powerdns database.""" db_name = 'powerdns' app_name = 'powerdns' def db_for_read(self, model, **hints): if model._meta.app_label == self.app_name: return self.db_name return None def db_for...
dominikkowalski/django-powerdns-dnssec
powerdns/routers.py
Python
bsd-2-clause
959
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from fly_project import settings from fly_project import constants from api.models import ResourceLink from api.models import ...
Oinweb/py-fly
resources/views.py
Python
bsd-2-clause
1,070
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Justin Vincent # Lars Buitinck # License: BSD 3 clause import pickle import numpy as np import pytest from sklearn.utils.testing import assert_array_equal from sklearn.utils.fixes import MaskedArray from sklearn.utils.fixes import _joblib...
chrsrds/scikit-learn
sklearn/utils/tests/test_fixes.py
Python
bsd-3-clause
2,534
# Copyright 2017 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. from __future__ import absolute_import from telemetry.core import os_version as os_version_module # TODO(rnephew): Since TestConditions are being used for ...
catapult-project/catapult
telemetry/telemetry/story/expectations.py
Python
bsd-3-clause
9,428
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
hradec/gaffer
python/GafferUI/Slider.py
Python
bsd-3-clause
18,399
# # Copyright (C) 2000-2008 greg Landrum and Rational Discovery LLC # """ Informational Entropy functions The definitions used are the same as those in Tom Mitchell's book "Machine Learning" """ import numpy import math from rdkit.six.moves import xrange # try to get the C versions of these routines try: ...
soerendip42/rdkit
rdkit/ML/InfoTheory/entropy.py
Python
bsd-3-clause
2,823
#!/usr/bin/env python # # Copyright (c) 2016, 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 # ...
pvanhorn/openthread
tests/scripts/thread-cert/Cert_6_6_02_KeyIncrementRollOver.py
Python
bsd-3-clause
3,389
import genxmlif from genxmlif.xmlifODict import odict xmlIf = genxmlif.chooseXmlIf(genxmlif.XMLIF_ELEMENTTREE) xmlTree = xmlIf.createXmlTree(None, "testTree", {"rootAttr1":"RootAttr1"}) xmlRootNode = xmlTree.getRootNode() myDict = odict( (("childTag1","123"), ("childTag2","123")) ) xmlRootNode.appendChild("childTag", ...
UgCS/vsm-cpp-sdk
tools/mavgen/lib/genxmlif/xmliftest.py
Python
bsd-3-clause
670
#!/usr/bin/env python3 # # Copyright (c) 2019, 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 # ...
jwhui/openthread
tests/scripts/thread-cert/pktverify/packet_verifier.py
Python
bsd-3-clause
14,791
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Contains the transformation functions for getting to/from ITRS, GCRS, and CIRS. These are distinct from the ICRS and AltAz functions because they are just rotations without aberration corrections or offsets. """ from __future__ ...
joergdietrich/astropy
astropy/coordinates/builtin_frames/intermediate_rotation_transforms.py
Python
bsd-3-clause
4,891
# Copyright (c) 2008-2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ Find Natural Neighbors Verification =================================== Finding natural neighbors in a triangulation A triangle is a natural neighbor of a point if that po...
metpy/MetPy
v0.5/_downloads/Find_Natural_Neighbors_Verification.py
Python
bsd-3-clause
2,746
############################################################################## # # Copyright (c) 2014, 2degrees Limited. # All Rights Reserved. # # This file is part of hubspot-contacts # <https://github.com/2degrees/hubspot-contacts>, which is subject to the # provisions of the BSD at # <http://dev.2degreesnetwork.com...
2degrees/hubspot-contacts
tests/__init__.py
Python
bsd-3-clause
731
from contextlib import closing from contextlib import suppress from io import StringIO from string import Template import uuid import html from .. import config_context class _VisualBlock: """HTML Representation of Estimator Parameters ---------- kind : {'serial', 'parallel', 'single'} kind ...
glemaitre/scikit-learn
sklearn/utils/_estimator_html_repr.py
Python
bsd-3-clause
9,492
# Copyright (C) 2007-2016 Giampaolo Rodola' <g.rodola@gmail.com>. # Use of this source code is governed by MIT license that can be # found in the LICENSE file. """ This module contains the main FTPServer class which listens on a host:port and dispatches the incoming connections to a handler. The concurrency is handled...
johnkeepmoving/oss-ftp
python27/win32/Lib/site-packages/pyftpdlib/servers.py
Python
mit
20,552
#!/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. """Tests for checkdeps. """ import os import unittest import builddeps import checkdeps import results class CheckDepsTest(uni...
junhuac/MQUIC
src/buildtools/checkdeps/checkdeps_test.py
Python
mit
8,256
# coding=utf-8 from __future__ import absolute_import from flask import url_for, redirect from flask.views import MethodView from flask.blueprints import Blueprint from flask.ext.login import login_required, current_user from firefly.libs.template import render_template from firefly.forms.user import ProfileForm bp...
Junnplus/firefly
firefly/views/user.py
Python
mit
868
'''OpenGL extension ARB.texture_border_clamp This module customises the behaviour of the OpenGL.raw.GL.ARB.texture_border_clamp to provide a more Python-friendly API Overview (from the spec) The base OpenGL provides clamping such that the texture coordinates are limited to exactly the range [0,1]. When a textu...
D4wN/brickv
src/build_data/windows/OpenGL/GL/ARB/texture_border_clamp.py
Python
gpl-2.0
1,249
""" various codes and constants used by Cobbler Copyright 2006-2008, Red Hat, Inc Michael DeHaan <mdehaan@redhat.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 Licens...
rubenk/cobbler
cobbler/codes.py
Python
gpl-2.0
2,451
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but...
cnewcome/sos
sos/plugins/processor.py
Python
gpl-2.0
1,568
#!/usr/bin/env python # -*- coding: utf-8 -*- import cherrypy import htpc import logging import requests from cherrypy.lib.auth2 import require, member_of from urllib import urlencode from json import loads from htpc.helpers import get_image, serve_template, fix_basepath from StringIO import StringIO from contextlib ...
scith/htpc-manager_ynh
sources/modules/mylar.py
Python
gpl-3.0
9,922
#!/usr/bin/python # # (c) 2016 Olaf Kilian <olaf.kilian@symanex.com> # Chris Houseknecht, <house@redhat.com> # James Tanner, <jtanner@redhat.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 ...
hlieberman/ansible-modules-core
cloud/docker/docker_login.py
Python
gpl-3.0
9,366
# # eventmanager.py # # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 ...
Tydus/deluge
deluge/core/eventmanager.py
Python
gpl-3.0
3,162
import asyncio import enum import logging import concurrent.futures logger = logging.getLogger("cloudbot") @enum.unique class EventType(enum.Enum): message = 0 action = 1 # TODO: Do we actually want to have a 'notice' event type? Should the NOTICE command be a 'message' type? notice = 2 join = 3 ...
nidhididi/CloudBot
cloudbot/event.py
Python
gpl-3.0
15,182
# django-openid-auth - OpenID integration for django.contrib.auth # # Copyright (C) 2009-2013 Canonical Ltd. # # 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 ...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/django_openid_auth/management/commands/openid_cleanup.py
Python
agpl-3.0
1,732
# # setup.py # # Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu> # 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 option...
CyrilPeponnet/Archipel
ArchipelAgent/archipel-central-agent-platformrequest/setup.py
Python
agpl-3.0
3,265
"""SCons.Tool.pdf Common PDF Builder definition for various other Tool modules that use it. Add an explicit action to run epstopdf to convert .eps files to .pdf """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software a...
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Tool/pdf.py
Python
lgpl-2.1
3,010
# # 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...
Acehaidrey/incubator-airflow
airflow/task/task_runner/cgroup_task_runner.py
Python
apache-2.0
10,133
from __future__ import unicode_literals from .models import organizations_backend from ..core.models import base_decorator organizations_backends = {"global": organizations_backend} mock_organizations = base_decorator(organizations_backends)
william-richard/moto
moto/organizations/__init__.py
Python
apache-2.0
243
# 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...
HaebinShin/tensorflow
tensorflow/contrib/learn/python/learn/estimators/svm_test.py
Python
apache-2.0
10,014
"""Tests for certbot_dns_route53._internal.dns_route53.Authenticator""" import unittest from botocore.exceptions import ClientError from botocore.exceptions import NoCredentialsError try: import mock except ImportError: # pragma: no cover from unittest import mock # type: ignore from certbot import errors fr...
stweil/letsencrypt
certbot-dns-route53/tests/dns_route53_test.py
Python
apache-2.0
9,471
# # 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...
highfei2011/spark
python/pyspark/sql/tests/test_serde.py
Python
apache-2.0
6,215
"""The tests for the google calendar platform.""" import copy from unittest.mock import Mock, patch import httplib2 import pytest from homeassistant.components.google import ( CONF_CAL_ID, CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_DEVICE_ID, CONF_ENTITIES, CONF_NAME, CONF_TRACK, DEVICE_...
fbradyirl/home-assistant
tests/components/google/test_calendar.py
Python
apache-2.0
11,260
# Copyright (c) 2013 Mirantis 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 writ...
bigfootproject/sahara
sahara/context.py
Python
apache-2.0
9,350
# Copyright 2018 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...
gunan/tensorflow
tensorflow/python/feature_column/sequence_feature_column_integration_test.py
Python
apache-2.0
10,486
# Generated by Django 3.2.5 on 2021-08-12 18:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0341_usergroup_is_system_group"), ] operations = [ migrations.AddField( model_name="realm", name="demo_org...
eeshangarg/zulip
zerver/migrations/0342_realm_demo_organization_scheduled_deletion_date.py
Python
apache-2.0
438
import connexion import six from tapi_server.models.tapi_photonic_media_application_identifier import TapiPhotonicMediaApplicationIdentifier # noqa: E501 from tapi_server.models.tapi_photonic_media_central_frequency import TapiPhotonicMediaCentralFrequency # noqa: E501 from tapi_server.models.tapi_photonic_media_fec...
karthik-sethuraman/ONFOpenTransport
RI/flask_server/tapi_server/controllers/tapi_photonic_media_controller.py
Python
apache-2.0
88,036
#!/usr/bin/env python ''' Command to send dynamic filesystem information to Zagg ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Copyright 2015 Red Hat 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...
blrm/openshift-tools
scripts/monitoring/cron-send-filesystem-metrics.py
Python
apache-2.0
5,045
# -*- coding: utf-8 -*- # # 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 #...
sid88in/incubator-airflow
tests/sensors/test_sql_sensor.py
Python
apache-2.0
2,780
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """Time utilities. In particular, routines to do basic arithmetic on numbers represented by two doubles, using the procedure of Shewchuk, 1997, Discrete & Computational Geometry 18(3):305-363 -- http://www.cs.berkeley.edu/~jrs/pape...
joergdietrich/astropy
astropy/time/utils.py
Python
bsd-3-clause
3,571
#!/usr/bin/env python # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module which provides compatibility with older Python versions.""" __all__ = ["PY3", "int", "long", "xrange", "exec_"...
CaiZhongda/psutil
psutil/_compat.py
Python
bsd-3-clause
9,627
# configobj.py # A config file reader/writer that supports nested sections in config files. # Copyright (C) 2005-2014: # (name) : (email) # Michael Foord: fuzzyman AT voidspace DOT org DOT uk # Nicola Larosa: nico AT tekNico DOT net # Rob Dennis: rdennis AT gmail DOT com # Eli Courtwright: eli AT courtwright DOT org #...
tbabej/astropy
astropy/extern/configobj/configobj.py
Python
bsd-3-clause
88,262
from __future__ import absolute_import, unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel from wagtail.wagtailadmin.edit_handlers import FieldPanel, InlinePanel from w...
iansprice/wagtail
wagtail/tests/snippets/models.py
Python
bsd-3-clause
2,344
# -*- coding: utf-8 -*- import os import sqlalchemy from sqlalchemy import * from nose.tools import eq_ from migrate.versioning import genmodel, schemadiff from migrate.changeset import schema, SQLA_06 from migrate.tests import fixture class TestSchemaDiff(fixture.DB): table_name = 'tmp_schemadiff' level ...
eunchong/build
third_party/sqlalchemy_migrate_0_7_1/migrate/tests/versioning/test_genmodel.py
Python
bsd-3-clause
7,057
import pytest @pytest.mark.skipif def test_timeout(script): result = script.pip("--timeout", "0.01", "install", "-vvv", "INITools", expect_error=True, ) assert "Could not fetch URL https://pypi.python.org/simple/INITools/: timed out" in result.stdout assert "Could not fetch URL https://pypi.py...
mitsuhiko/pip
tests/functional/test_requests.py
Python
mit
366
from . import commands from . import compose from . import dockerrun from ..core import fileoperations from ..objects.exceptions import CommandError class MultiContainer(object): """ Immutable class used to run Multi-containers. """ PROJ_NAME = 'elasticbeanstalk' def __init__(self, fs_handler, s...
quickresolve/accel.ai
flask-aws/lib/python2.7/site-packages/ebcli/containers/multicontainer.py
Python
mit
2,306
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
sauloal/cufflinksviewer
venvlin/lib/python2.7/site-packages/simplejson/__init__.py
Python
mit
20,581
#!/usr/bin/env python3 # Copyright (c) 2014-2018 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 behavior of headers messages to announce blocks. Setup: - Two nodes: - node0 is the node-und...
ericshawlinux/bitcoin
test/functional/p2p_sendheaders.py
Python
mit
26,656
#!/usr/bin/env python #-*- coding:utf-8 -*- from main import * import time import random import urllib2 import json #import os def genToken(L): CharLib = map(chr,range(97,123)+range(65,91)+range(48,58)) Str = [] for i in range(L): Str += random.sample(CharLib,1) return ''.join(Str) # Key is md...
awsok/SaltAdmin
view/index.py
Python
gpl-2.0
10,160
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at you...
SNoiraud/gramps
gramps/gen/filters/rules/person/_hasrelationship.py
Python
gpl-2.0
3,035
# # DBus structures for the partitioning data. # # Copyright (C) 2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This prog...
M4rtinK/anaconda
pyanaconda/modules/common/structures/partitioning.py
Python
gpl-2.0
9,579
# ostreepayload.py # Deploy OSTree trees to target # # Copyright (C) 2012,2014,2021 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later versi...
jkonecny12/anaconda
pyanaconda/payload/rpmostreepayload.py
Python
gpl-2.0
2,202