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
""" mfdrn module. Contains the ModflowDrn class. Note that the user can access the ModflowDrn class as `flopy.modflow.ModflowDrn`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?drn.htm>`_. """ import...
bdestombe/flopy-1
flopy/modflow/mfdrn.py
Python
bsd-3-clause
9,662
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, biocore development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------...
ekopylova/burrito-fillings
bfillings/fastq_join.py
Python
bsd-3-clause
8,636
# -*- coding:utf-8 -*- from django.conf.urls import patterns, url from django.core.urlresolvers import reverse_lazy from libs.decorators import login_required_for, EMPLOYER, EMPLOYEE from membership.decorators import enforce_membership from .decorators import enforce_business from . import views urlpatterns = pattern...
hellhovnd/dentexchange
dentexchange/apps/employer/urls.py
Python
bsd-3-clause
3,483
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # Copyright (c) 2015, Google, Inc. # # 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 ...
fritzo/loom
examples/lending_club/test.py
Python
bsd-3-clause
1,619
import json import re from django import http from django.db.models import Count from django.db.transaction import non_atomic_requests from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from olympia import amo from olympia.addons.decorators import owner_or_unlisted_reviewer fro...
lavish205/olympia
src/olympia/compat/views.py
Python
bsd-3-clause
4,194
"""Functionality to support interacting with an OnRamp PCE Exports: PCEAccess: Client-side interface to OnRamp PCE server. """ import json import os # import requests import time class PCEAccess(): """Client-side interface to OnRamp PCE server. Methods: get_modules_avail: Return the list of modu...
OnRampOrg/onramp
server/src/webapp/onramppce.py
Python
bsd-3-clause
31,343
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import re import tablemanager.models import django.utils.timezone import borg_utils.resource_status import django.core.validators class Migration(migrations.Migration): depen...
parksandwildlife/borgcollector
tablemanager/migrations/0021_auto_20160219_0803.py
Python
bsd-3-clause
2,007
#!/usr/bin/env python """ The Gamma is a probability distribution over a positive random variable τ > 0 It is governed by parameters a and b that are subject to the constraints a > 0 and b > 0 The constraints exist to ensure that the distribution can be normalized. Special case of a = 1 is known as the exponential ...
ajrichards/bayesian-examples
statistics/gamma-distn.py
Python
bsd-3-clause
1,524
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Optimization algorithms used in `~astropy.modeling.fitting`. """ import warnings import abc import numpy as np from ..utils.exceptions import AstropyUserWarning __all__ = ["Optimization", "SLSQP", "Simplex"] # Maximum number of iterations DEFAULT_M...
funbaker/astropy
astropy/modeling/optimizers.py
Python
bsd-3-clause
7,182
# -*- coding: utf-8 -*- import unittest from decimal import Decimal from django.conf import settings from django.test import TestCase from mock import patch from .trade import sell_all part_pay = 0.5 part_get = 0.1 amount_get = 1 amount_pay = 2 sequence = 1 balance_pay = 100 balance_get = 200 AffectedNodes = { ...
42cc/ripple_api
ripple_api/test_trade.py
Python
bsd-3-clause
12,129
# This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. import os from os.path import expanduser import sys import glob import atexit import readline import traceback from viper.common.out import print_error, print_output from viper.common.colors import...
cwtaylor/viper
viper/core/ui/console.py
Python
bsd-3-clause
9,307
import pycaption from django import http from django.shortcuts import get_object_or_404 from airmozilla.closedcaptions.models import ClosedCaptions class TxtWriter(pycaption.base.BaseWriter): def write(self, caption_set): lang = caption_set.get_languages()[0] captions = caption_set.get_captions(...
blossomica/airmozilla
airmozilla/closedcaptions/views.py
Python
bsd-3-clause
2,235
""" Build extension modules, package and install Fatiando. """ import sys import os from distutils.core import setup from distutils.extension import Extension import numpy import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = 'fatiando/_version.py' versioneer.versionfile_build = 'fatiando/_version.p...
eusoubrasileiro/fatiando
setup.py
Python
bsd-3-clause
3,101
from tests.base_case import ChatBotTestCase from chatterbot.logic import MathematicalEvaluation from chatterbot.conversation import Statement class MathematicalEvaluationTests(ChatBotTestCase): def setUp(self): super().setUp() self.adapter = MathematicalEvaluation(self.chatbot) def test_can_...
vkosuri/ChatterBot
tests/logic/test_mathematical_evaluation.py
Python
bsd-3-clause
4,970
# PyVision License # # Copyright (c) 2006-2008 David S. Bolme # 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, thi...
mikeseven/pyvision
src/pyvision/analysis/FaceAnalysis/EyeDetectionTest.py
Python
bsd-3-clause
17,191
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..registration import Registration def test_Registration_inputs(): input_map = dict(args=dict(argstr='%s', ), collapse_output_transforms=dict(argstr='--collapse-output-transforms %d', usedefault=True, )...
carolFrohlich/nipype
nipype/interfaces/ants/tests/test_auto_Registration.py
Python
bsd-3-clause
4,113
from django.core.exceptions import ValidationError from django.test import TestCase, Client from mcsv.importer import csv_import from systems.models import ( OperatingSystem, System, SystemRack, Allocation, Location, SystemStatus, SystemType ) from systems.tests.utils import create_fake_host import datetime ...
rtucker-mozilla/inventory
mcsv/tests/importer.py
Python
bsd-3-clause
18,133
""" Tools for doing common subexpression elimination. """ from __future__ import print_function, division import difflib from sympy.core import Basic, Mul, Add, Pow, sympify, Tuple from sympy.core.singleton import S from sympy.core.basic import preorder_traversal from sympy.core.function import _coeff_isneg from symp...
ojengwa/sympy
sympy/simplify/cse_main.py
Python
bsd-3-clause
14,930
from __future__ import print_function import os import pytest from os.path import join import sys import unittest import subprocess if sys.platform == "win32": GULP = "gulp.cmd" else: GULP = "gulp" @pytest.mark.js class TestBokehJS(unittest.TestCase): def test_bokehjs(self): os.chdir('bokehjs') ...
phobson/bokeh
tests/test_bokehjs.py
Python
bsd-3-clause
669
from django.forms.models import ModelForm from django.utils.translation import ugettext_lazy as _ from djangocms_link.models import Link from cms.models import Page from django.forms.widgets import Media class LinkForm(ModelForm): try: from djangocms_link.fields import PageSearchField page_link = ...
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/djangocms_link/forms.py
Python
mit
1,320
from __future__ import print_function, division # imports: internal import copy import glob import os import requests import time # imports: external from astropy import units as u from astropy.coordinates import SkyCoord import astropy.constants as constants from astropy.cosmology import Planck15, z_at_value from as...
aburgasser/splat
splat/simulate.py
Python
mit
110,951
DB_CONFIG = "postgresql://user:password@localhost/db" ROOT_DIR = "/path/to/project" ADMIN_USER = "username" ADMIN_PW = "password"
miketung168/survey-dashboard
example_config.py
Python
mit
130
"""Run individual tasks within the Clusterk framework. """ import os import shutil import subprocess import uuid import yaml from bcbio import utils from bcbio.provenance import do from bcbiovm.ship import pack, reconstitute def runfn(fn_name, queue, wrap_args, parallel, run_args): """Run external function submi...
brainstorm/bcbio-nextgen-vm
bcbiovm/clusterk/clusterktasks.py
Python
mit
3,627
from django.conf.urls import url from timepiece.reports import views urlpatterns = [ url(r'^reports/hourly/$', views.HourlyReport.as_view(), name='report_hourly'), url(r'^reports/payroll/$', views.report_payroll_summary, name='report_payroll_summary'), url(r'^reports/bil...
caktus/django-timepiece
timepiece/reports/urls.py
Python
mit
655
## www.pubnub.com - PubNub Real-time push service in the cloud. # coding=utf8 ## PubNub Real-time Push APIs and Notifications Framework ## Copyright (c) 2010 Stephen Blum ## http://www.pubnub.com/ ## TODO Tests ## ## - wait 20 minutes, send a message, receive and success. ## - ## - ## ## ## -------------------------...
gdassori/python
python-twisted/tests/unit-test-full.py
Python
mit
7,584
from tastypie.resources import ModelResource, ALL from .models import Filer, Filing from .utils.serializer import CIRCustomSerializer class FilerResource(ModelResource): class Meta: queryset = Filer.objects.all() serializer = CIRCustomSerializer() filtering = {'filer_id_raw': ALL} ...
myersjustinc/django-calaccess-campaign-browser
calaccess_campaign_browser/api.py
Python
mit
545
message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} for character in message: count.setdefault(character, 0) count[character] = count[character] + 1 print(count)
jakdept/pythonbook
book_materials/characterCount.py
Python
mit
225
""" classes used for reading and writing compressed mdf objects """ from zipfile import ZipFile, ZIP_DEFLATED from tempfile import NamedTemporaryFile import logging import os _log = logging.getLogger(__name__) class SimpleZipFile(object): """ File-like object for reading from and writing to simple zipfiles ...
Winterflower/mdf
mdf/io/simplezipfile.py
Python
mit
3,174
from django.contrib import messages from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import Http404 from django.http import HttpResponseForbidden from django.http import HttpResponseRedirect, JsonResponse from django.shortcuts import render from wye.base...
harisibrahimkv/wye
wye/workshops/mixins.py
Python
mit
6,362
# Authors: Harvard Intelligent Probabilistic Systems (HIPS) Group # http://hips.seas.harvard.edu # Ryan Adams, David Duvenaud, Scott Linderman, # Dougal Maclaurin, Jasper Snoek, and others # Copyright 2014, The President and Fellows of Harvard University # Distributed under an MIT license. Se...
HIPS/Kayak
kayak/regularizers.py
Python
mit
2,109
from __future__ import print_function from .. import command from ..needy import ConfiguredNeedy class CleanCommand(command.Command): def name(self): return 'clean' def add_parser(self, group): short_description = 'clean a need' parser = group.add_parser(self.name(), description=shor...
vmrob/needy
needy/commands/clean.py
Python
mit
1,074
#!/usr/bin/env python # Taken and modified from: # http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import atexit import os import signal import sys import time if (hasattr(os, "devnull")): DEVNULL = os.devnull else: DEVNULL = "/dev/null" class Daemon(object): """ A gene...
Nvizible/shotgunEvents
src/daemonizer.py
Python
mit
5,101
#!/usr/bin/env python """ lit - LLVM Integrated Tester. See lit.pod for more information. """ import math, os, platform, random, re, sys, time, threading, traceback import ProgressBar import TestRunner import Util import LitConfig import Test import lit.discovery class TestingProgressDisplay: def __init__(se...
dbrumley/recfi
llvm-3.3/utils/lit/lit/main.py
Python
mit
15,230
import rdtest class D3D11_Texture_Zoo(rdtest.TestCase): slow_test = True demos_test_name = 'D3D11_Texture_Zoo' def __init__(self): rdtest.TestCase.__init__(self) self.zoo_helper = rdtest.Texture_Zoo() def check_capture(self): # This takes ownership of the controller and shuts...
moradin/renderdoc
util/test/tests/D3D11/D3D11_Texture_Zoo.py
Python
mit
457
import renderdoc as rd rd.InitialiseReplay(rd.GlobalEnvironment(), []) # Open a capture file handle cap = rd.OpenCaptureFile() # Open a particular file - see also OpenBuffer to load from memory status = cap.OpenFile('test.rdc', '', None) # Make sure the file opened successfully if status != rd.ReplayStatus.Succeede...
Zorro666/renderdoc
docs/python_api/examples/renderdoc_intro.py
Python
mit
853
import importlib, os import multiprocessing as mp from IPython.lib.deepreload import reload as dreload import gmane as g, percolation as P G=g c=P.utils.check importlib.reload(g.listDataStructures) importlib.reload(g.loadMessages) importlib.reload(g.triplifyList) importlib.reload(P.rdf) importlib.reload(P.utils) impor...
OpenLinkedSocialData/gmane3
gmane-org-user-groups-linux-brazil-slackware/scripts/testTriplify2.py
Python
cc0-1.0
2,417
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("ganeti_web", "0019_alter_fields_VirtualMachineTemplate"), ) def forwards(self, orm): # Adding model 'Cluster...
dmS0Zq/ganeti_webmgr
ganeti_webmgr/authentication/migrations/0001_initial.py
Python
gpl-2.0
5,899
# # Martin Gracik <mgracik@redhat.com> # # Copyright 2009 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. This program is distributed in the hope that it # will be use...
cgwalters/pykickstart
tests/commands/user.py
Python
gpl-2.0
4,536
import db import queries import datetime FIELDS = ["asset_id", "name", "uri", "start_date", "end_date", "duration", "mimetype", "is_enabled", "nocache", "play_order"] create_assets_table = 'CREATE TABLE assets(asset_id text primary key, name text, uri text, md5 text, start_date timestamp, end_date timestamp...
cnwalter/screenly-ose
lib/assets_helper.py
Python
gpl-2.0
4,416
# Copyright (C) 2008 Dirk Vanden Boer <dirk.vdb@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 of the License, or # (at your option) any later versi...
thegooglecodearchive/phonetooth
phonetooth/bluetoothdiscovery.py
Python
gpl-2.0
1,814
from timeit import timeit import pytest from cfme import test_requirements from cfme.base.ui import navigate_to from cfme.services.myservice import MyService from cfme.tests.test_db_migrate import download_and_migrate_db from cfme.utils.conf import cfme_data @pytest.fixture def appliance_with_performance_db(temp_ap...
nachandr/cfme_tests
cfme/tests/services/test_service_performance.py
Python
gpl-2.0
1,275
# Copyright 2014-2014 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://vscentrum.be/nl/en), # the Hercules foundation (http:/...
gc3-uzh-ch/easybuild-framework
easybuild/tools/build_details.py
Python
gpl-2.0
2,178
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """IRC support for Instance Messenger.""" import string from twisted.words.protocols import irc from twisted.words.im.locals import ONLINE from twisted.internet import defer, reactor, protocol from twisted.internet.defer import succee...
Donkyhotay/MoonPy
twisted/words/im/ircsupport.py
Python
gpl-3.0
9,837
"""Tests for the pylint checker in :mod:`pylint.extensions.check_elif """ import os import os.path as osp import unittest from pylint import checkers from pylint.extensions.check_elif import ElseifUsedChecker from pylint.lint import PyLinter from pylint.reporters import BaseReporter class TestReporter(BaseReporter)...
justathoughtor2/atomicApe
cygwin/lib/python2.7/site-packages/pylint/test/extensions/test_elseif_used.py
Python
gpl-3.0
1,359
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-05-10 15:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sessao', '0001_initial'), ] operations = [ migrations.AddField( ...
cmjatai/cmj
sapl/sessao/migrations/0002_sessaoplenaria_interativa.py
Python
gpl-3.0
518
#!/usr/bin/env python # # Copyright 2011,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from __future__ import unicode_literals from gnuradio import gr from gnuradio import blocks import sys import numpy d...
skoslowski/gnuradio
gr-blocks/examples/tags/test_file_tags.py
Python
gpl-3.0
903
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
norus/procstat-json
tornado/platform/epoll.py
Python
gpl-3.0
2,147
# coding=utf-8 import unittest from safe.test.utilities import ( get_qgis_app, load_test_vector_layer) QGIS_APP, CANVAS, IFACE, PARENT = get_qgis_app() from safe.gis.vector.smart_clip import smart_clip __copyright__ = "Copyright 2016, The InaSAFE Project" __license__ = "GPL version 3" __email__ = "info@inas...
Gustry/inasafe
safe/gis/vector/test/test_smart_clip.py
Python
gpl-3.0
926
#!usr/bin/env python # # Copyright 2013 Matthew Wall # See the file LICENSE.txt for your full rights. # # Thanks to Kenneth Lavrsen for the Open2300 implementation: # http://www.lavrsen.dk/foswiki/bin/view/Open2300/WebHome # description of the station communication interface: # http://www.lavrsen.dk/foswiki/bin/vie...
MLAB-project/weewx
bin/weewx/drivers/ws23xx.py
Python
gpl-3.0
79,475
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2020, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
mrcslws/nupic.research
src/nupic/research/frameworks/vernon/mixins/step_based_logging.py
Python
agpl-3.0
4,696
#!/usr/bin/python # # \file 2_build.py # \brief Build rbank # \date 2009-03-10-22-43-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Build rbank # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # # This program is free soft...
osgcc/ryzom
nel/tools/build_gamedata/processes/rbank/2_build.py
Python
agpl-3.0
11,551
""" API library for Django REST Framework permissions-oriented workflows """ from django.conf import settings from django.http import Http404 from rest_framework import permissions from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from student.roles import CourseStaffRole, CourseInstr...
prarthitm/edxplatform
openedx/core/lib/api/permissions.py
Python
agpl-3.0
6,295
from .log import log_with import logging log = logging.getLogger(__name__) import binascii from .crypto import geturandom import qrcode import StringIO import urllib from privacyidea.lib.crypto import urandom import string import re def generate_otpkey(key_size=20): """ generates the HMAC key of keysize. Shoul...
woddx/privacyidea
privacyidea/lib/utils.py
Python
agpl-3.0
5,349
""" Specific overrides to the base prod settings to make development easier. """ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import # Don't use S3 in devstack, fall back to filesystem del DEFAULT_FILE_STORAGE MEDIA_ROOT = "/edx/var/edxapp/uploads" DEBUG = True USE_I18N = True TEMPLATE_DEB...
nagyistoce/edx-platform
lms/envs/devstack.py
Python
agpl-3.0
7,127
"""Test for `maas.client.viscera.boot_sources`.""" import random from testtools.matchers import Equals, MatchesStructure from .. import boot_sources from ...testing import make_name_without_spaces, TestCase from ..testing import bind def make_origin(): # Create a new origin with BootSources and BootSource. The...
maas/python-libmaas
maas/client/viscera/tests/test_boot_sources.py
Python
agpl-3.0
5,431
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
TakayukiSakai/tensorflow
tensorflow/examples/how_tos/reading_data/fully_connected_preloaded.py
Python
apache-2.0
5,371
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
asimshankar/tensorflow
tensorflow/contrib/model_pruning/python/pruning.py
Python
apache-2.0
21,323
# -*- coding: utf-8 -*- from __future__ import print_function import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) from pyxb.exceptions_ import * import unittest import pyxb.binding.datatypes as xsd class Test_QName (unittest.TestCase): def testValid (self): ...
jonfoster/pyxb-upstream-mirror
tests/datatypes/test-QName.py
Python
apache-2.0
848
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # 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 agree...
kikkomep/pydoop
test/mapreduce/test_utils.py
Python
apache-2.0
2,444
# 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 ...
elastacloud/libcloud
libcloud/test/compute/test_digitalocean.py
Python
apache-2.0
6,980
# python3 # coding=utf-8 # Copyright 2020 Google LLC. # # 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 ...
google/TaglessCRM
src/plugins/pipeline_plugins/utils/__init__.py
Python
apache-2.0
601
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 Yahoo! 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.or...
pombredanne/anvil
anvil/components/configurators/neutron_plugins/__init__.py
Python
apache-2.0
676
"""nginx plugin constants.""" import platform from typing import Any from typing import Dict FREEBSD_DARWIN_SERVER_ROOT = "/usr/local/etc/nginx" LINUX_SERVER_ROOT = "/etc/nginx" PKGSRC_SERVER_ROOT = "/usr/pkg/etc/nginx" if platform.system() in ('FreeBSD', 'Darwin'): server_root_tmp = FREEBSD_DARWIN_SERVER_ROOT el...
letsencrypt/letsencrypt
certbot-nginx/certbot_nginx/_internal/constants.py
Python
apache-2.0
2,987
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.models.v1.ServicePort import ServicePort from kubernetes_py.utils import * class ServiceSpec(object): """ http://...
mnubo/kubernetes-py
kubernetes_py/models/v1/ServiceSpec.py
Python
apache-2.0
6,966
#!/bin/env python # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
JD86/binplist
scripts/plist.py
Python
apache-2.0
3,344
#!/usr/bin/env python2.6 # -*- coding: utf-8 -*- # Thanks to Jonas Kjellström and Cody Boisclair for their help in finding bugs in this script! import re import os import sys import tempfile from fontTools.ttLib import TTFont, newTable from fontTools.ttLib.xmlImport import importXML doc = """USAGE: python /path/to/i...
ifeegoo/ifeegoo-programming-fonts-collections
Input/Input-Font/Scripts/inputCustomize.py
Python
apache-2.0
9,784
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import pytest from pkg_resources import Requirement, parse_version from pex.package import EggPackage, SourcePackage def test_source_packages(): for ext in ('.tar.gz', '.tar', '.tgz',...
URXtech/pex
tests/test_package.py
Python
apache-2.0
1,829
# Copyright (c) 2011 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. """Collection of functions and classes to fix various encoding problems on multiple platforms with python. """ from __future__ import print_function im...
luci/luci-py
client/third_party/depot_tools/fix_encoding.py
Python
apache-2.0
12,497
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
allenlavoie/tensorflow
tensorflow/contrib/boosted_trees/estimator_batch/custom_export_strategy.py
Python
apache-2.0
11,678
from django.dispatch import receiver from pretix.base.signals import register_payment_providers @receiver(register_payment_providers, dispatch_uid="payment_paypal") def register_payment_provider(sender, **kwargs): from .payment import Paypal return Paypal
awg24/pretix
src/pretix/plugins/paypal/signals.py
Python
apache-2.0
267
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
morelab/weblabdeusto
server/src/weblab/core/coordinator/checker.py
Python
bsd-2-clause
5,307
from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import EnvironmentMixin from sentry.api.bases.project import ProjectEndpoint from sentry.api.exceptions import ResourceD...
mvaled/sentry
src/sentry/api/endpoints/project_user_stats.py
Python
bsd-3-clause
1,034
# -*- coding: utf-8 -*- """Mayavi/traits GUI visualization elements.""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import numpy as np from mayavi.mlab import pipeline, text3d from mayavi.modules.glyph import Glyph from mayavi.modules.surface import Surface from mayavi.sourc...
Teekuningas/mne-python
mne/gui/_viewer.py
Python
bsd-3-clause
21,784
from django.http import HttpResponse from django.shortcuts import get_object_or_404 from cyder.base.views import cy_render from cyder.cydhcp.network.models import Network def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.get('raw', False): DEBU...
murrown/cyder
cyder/cydhcp/build/views.py
Python
bsd-3-clause
614
#!/usr/bin/env python # All the CFC relatd matlab code converted to python # Translated from matlab code by Mark Kramer (math.bu.edu/people/mak/MA666/) import numpy as np from scipy.signal import hilbert import mne from mne.filter import filter_data def filter_and_make_analytic_signal(data, sfreq, l_phase_freq, h_p...
fboers/jumeg
jumeg/connectivity/cross_frequency_coupling.py
Python
bsd-3-clause
11,555
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import File, Release, ReleaseFile from sentry.testutils import APITestCase class ReleaseDetailsTest(APITestCase): def test_simple(self): self.login_as(user=self.user) project = self.create_pro...
imankulov/sentry
tests/sentry/api/endpoints/test_release_details.py
Python
bsd-3-clause
2,560
"""fix opportunities model Revision ID: 3de73bde77e Revises: 22cc439cd89 Create Date: 2015-06-25 00:55:51.895965 """ # revision identifiers, used by Alembic. revision = '3de73bde77e' down_revision = '22cc439cd89' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(...
ajb/pittsburgh-purchasing-suite
migrations/versions/3de73bde77e_fix_opportunities_model.py
Python
bsd-3-clause
4,373
from django.core.management.base import BaseCommand from migrate_dns.import_utils import do_import class Command(BaseCommand): args = '' def handle(self, *args, **options): do_import()
rtucker-mozilla/inventory
migrate_dns/management/commands/dns_migrate.py
Python
bsd-3-clause
204
# Copyright 2015 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. """Provides a web interface for dumping graph data as JSON. This is meant to be used with /load_from_prod in order to easily grab data for a graph to a loca...
benschmaus/catapult
dashboard/dashboard/dump_graph_json.py
Python
bsd-3-clause
6,621
#!/usr/bin/env python # 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. import argparse import os import string import sys SCRIPT_TEMPLATE = string.Template("""\ #!/usr/bin/env python # # This file was ge...
chrisdickinson/nojs
build/android/gyp/create_apk_operations_script.py
Python
bsd-3-clause
2,636
import unittest import numpy as np import six from chainer.datasets import ConcatenatedDataset from chainer import testing @testing.parameterize( # basic usage {'datasets': ( np.random.uniform(size=(5, 3, 48, 32)), np.random.uniform(size=(15, 3, 64, 48)), )}, # more than two datasets...
hvy/chainer
tests/chainer_tests/datasets_tests/test_concatenated_dataset.py
Python
mit
1,854
"""Tests for HTMLParser.py.""" import html.parser import pprint import unittest from test import support class EventCollector(html.parser.HTMLParser): def __init__(self, *args, **kw): self.events = [] self.append = self.events.append html.parser.HTMLParser.__init__(self, *args, **kw) ...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.3.0/Lib/test/test_htmlparser.py
Python
mit
30,373
import sys, os import plistlib urlScheme = sys.argv[1] bundleIdentifier = sys.argv[2] directory = os.path.dirname(os.path.abspath(__file__)) stringsOutput = os.path.join(directory, 'LLStrings.h') infoPlistOutput = os.path.join(directory, 'LaunchAtLoginHelper/LaunchAtLoginHelper-Info.plist') infoPlist = plistlib.read...
JanX2/LaunchAtLoginHelper
setup.py
Python
mit
738
# -*- coding: utf-8 -*- """ Tests for auth manager PKI access to postgres. This is an integration test for QGIS Desktop Auth Manager postgres provider that checks if QGIS can use a stored auth manager auth configuration to access a PKI protected postgres. From build dir, run: ctest -R PyQgsAuthManagerPKIPostgresTest ...
gacarrillor/QGIS
tests/src/python/test_authmanager_pki_postgres.py
Python
gpl-2.0
5,746
import logging from autotest.client.shared import error from virttest import virsh from virttest import libvirt_xml from provider import libvirt_version def check_list(uuid, name): """ Return True if filter found in nwfilter-list :param uuid: filter uuid :param name: filter name :return: True ...
svirt/tp-libvirt
libvirt/tests/src/virsh_cmd/filter/virsh_nwfilter_dumpxml.py
Python
gpl-2.0
3,574
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Oliver Charles # Copyright (C) 2007-2011 Philipp Wolfer # Copyright (C) 2007, 2010, 2011 Lukáš Lalinský # Copyright (C) 2011 Michael Wiencek # Copyright (C) 2011-2012 Wieland Hoffmann # Copyright (C) 2013-2014 Laurent Monin ...
dufferzafar/picard
picard/coverart/providers/whitelist.py
Python
gpl-2.0
1,878
# -*- coding: utf-8 -*- # $Id$ """ Test Manager WUI - Failure Categories Web content generator. """ __copyright__ = \ """ Copyright (C) 2012-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute...
svn2github/vbox
src/VBox/ValidationKit/testmanager/webui/wuifailurecategory.py
Python
gpl-2.0
4,643
#!/usr/bin/env python3 # # PLASMA : Generate an indented asm code (pseudo-C) with colored syntax. # Copyright (C) 2015 Joel # # 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 ...
chubbymaggie/reverse
plasma/lib/memmap.py
Python
gpl-3.0
3,739
#!/usr/bin/env python # -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licens...
FarnazH/horton
horton/part/test/test_becke.py
Python
gpl-3.0
4,428
# -*- 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/wsgi.py
Python
gpl-3.0
1,318
#!/usr/bin/env python # Copyright: (c) 2017, 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 __requires__ = ['ansible_core'] import fcntl import hashlib import os impor...
s-hertel/ansible
lib/ansible/cli/scripts/ansible_connection_cli_stub.py
Python
gpl-3.0
12,922
from ctypes import * debug = False def setDwordByPoint(valueAddress, value): ''' valueAddress[0] = value && 0xff valueAddress[1] = (value >> 8) && 0xff ''' i = 0 while i < 4: #print value, i memset(valueAddress+i, value&0xff, 1) i += 1 value >>= 8 return valueAddress + 4 def setLon...
won21kr/pydokan
src/old/dokanMemTools.py
Python
gpl-3.0
1,950
""" Tests for the DjangoXBlockUserService. """ from django.test import TestCase from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.user_api.preferences.api import set_user_preference from openedx.core.djangoapps.external_user_ids.models import ExternalIdType from student.models import anonymous_...
edx-solutions/edx-platform
common/djangoapps/xblock_django/tests/test_user_service.py
Python
agpl-3.0
5,271
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import openerp.tests.common as common class TestProcurementPurchaseBySaleContract(common.TransactionCase): def setUp(self): super(TestProcurementPurchaseBySaleContract, self...
agaldona/odoo-addons
procurement_purchase_by_sale_contract/tests/test_procurement_purchase_by_sale_contract.py
Python
agpl-3.0
2,609
# Create your views here. from django.contrib.auth.decorators import login_required from core.models import * from django.http import HttpResponse from core.services import watch_services from django.utils.translation import ugettext as _ @login_required def watchIssue(request, issue_id): watch_services.watch_issu...
stonestone/stonefreedomsponsors
djangoproject/core/views/watch_views.py
Python
agpl-3.0
558
""" This module creates a sysadmin dashboard for managing and viewing courses. """ import csv import json import logging import os import subprocess import time import StringIO from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.decorators import login_required from d...
jswope00/GAI
lms/djangoapps/dashboard/sysadmin.py
Python
agpl-3.0
27,630
###################################################################### # Cloud Routes Web Application # ------------------------------------------------------------------- # Reaction Class ###################################################################### import rethinkdb as r class Reaction(object): def __...
codecakes/cloudroutes-service
src/web/reactions.py
Python
agpl-3.0
5,105
"""SCons.Tool.latex Tool-specific initialization for LaTeX. Generates .dvi files from .latex or .ltx files There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2017 The SCons Foundation #...
mapycz/mapnik
scons/scons-local-3.0.1/SCons/Tool/latex.py
Python
lgpl-2.1
2,759
# Copyright 2013-2021 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 Librsb(AutotoolsPackage): """librsb : A shared memory parallel sparse matrix computations ...
LLNL/spack
var/spack/repos/builtin/packages/librsb/package.py
Python
lgpl-2.1
1,279
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
mnach/suds-py3k
suds/transport/options.py
Python
lgpl-3.0
2,197