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
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
wallnerryan/quantum_migrate
quantum/plugins/common/constants.py
Python
apache-2.0
1,169
from genty import genty, genty_dataset import sys from app.master.atomizer import Atomizer from app.master.job_config import ConfigValidationError from app.master.cluster_runner_config import ClusterRunnerConfig, ConfigParseError from test.framework.base_unit_test_case import BaseUnitTestCase @genty class TestCluste...
nickzuber/ClusterRunner
test/unit/master/test_cluster_runner_config.py
Python
apache-2.0
5,849
#!/usr/bin/env python import sys stderr = sys.stderr ## LZWDecoder ## class LZWDecoder(object): debug = 0 def __init__(self, fp): self.fp = fp self.buff = 0 self.bpos = 8 self.nbits = 9 self.table = None self.prevbuf = None return def readbits(self, bits): v = 0 while 1:...
onfire73/pypeskg
ui/pypesvds/lib/extras/pdflib/lzw.py
Python
apache-2.0
2,356
# Copyright (c) 2015 by Tegile 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.apache.org/licenses/LICENSE-2.0 # # Unle...
Nexenta/cinder
cinder/tests/unit/volume/drivers/test_tegile.py
Python
apache-2.0
18,078
#-*- coding: utf-8 -*- # stino/compiler.py import os import re import threading import subprocess import sublime from . import fileutil from . import textutil from . import constant from . import serial from . import base from . import preprocess from . import sketch from . import console ram_size_dict = {} ram_siz...
kierangraham/dotfiles
Sublime/Packages/Arduino-like IDE/app/compiler.py
Python
bsd-2-clause
24,678
# testParser.py # ------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to # http://inst....
naderm/cs188
p5/classification/testParser.py
Python
bsd-3-clause
3,041
from models import Marker from static.pymapcluster import calculate_clusters import time import logging import concurrent.futures import multiprocessing def retrieve_clusters(**kwargs): marker_boxes = divide_to_boxes(kwargs['ne_lat'], kwargs['ne_lng'], kwargs['sw_lat'], kwargs['sw_lng']) result_futures = [] ...
HamutalCohen3/anyway
clusters_calculator.py
Python
bsd-3-clause
1,569
# coding: utf-8 import string import pandas as pd import pandas.util.testing as tm import pandas.util._test_decorators as td import pytest from numpy.random import randn import pandas.tools.plotting as plotting from pandas.tests.plotting.common import TestPlotBase """ Test cases for plot functions imported from ...
cython-testbed/pandas
pandas/tests/plotting/test_deprecated.py
Python
bsd-3-clause
1,513
#!/usr/bin/env python r""" Example of solving Laplace's equation on a block domain refined with level 1 hanging nodes. The domain is progressively refined towards the edge/face of the block, where Dirichlet boundary conditions are prescribed by an oscillating function. Find :math:`u` such that: .. math:: \int_{\...
sfepy/sfepy
examples/diffusion/laplace_refine_interactive.py
Python
bsd-3-clause
8,056
import re from django import template from django.core.exceptions import ImproperlyConfigured from django.urls import NoReverseMatch from django.utils.functional import cached_property from wagtail.images.models import Filter from wagtail.images.shortcuts import get_rendition_or_not_found from wagtail.images.views.se...
jnns/wagtail
wagtail/images/templatetags/wagtailimages_tags.py
Python
bsd-3-clause
4,585
import string # Manages Local "database" for ZBWarDrive: # This keeps track of current ZBWarDrive and Sniffing Device State. # It is different from the online logging database. class ZBScanDB: """ API to interact with the "database" storing information for the zbscanning program. """ def __init_...
JonathonReinhart/killerbee
killerbee/zbwardrive/db.py
Python
bsd-3-clause
2,845
""" count number of reads mapping to features of transcripts """ import os import sys import itertools import pandas as pd import gffutils from bcbio.utils import file_exists from bcbio.distributed.transaction import file_transaction from bcbio.log import logger from bcbio import bam import bcbio.pipeline.datadict as...
Cyberbio-Lab/bcbio-nextgen
bcbio/rnaseq/count.py
Python
mit
2,271
import braintree from braintree.resource import Resource class UnknownPaymentMethod(Resource): def image_url(self): return "https://assets.braintreegateway.com/payment_method_logo/unknown.png"
DiptoDas8/Biponi
lib/python2.7/site-packages/braintree/unknown_payment_method.py
Python
mit
206
from glad.lang.common.loader import BaseLoader from glad.lang.d.loader import LOAD_OPENGL_DLL _OPENGL_LOADER = \ LOAD_OPENGL_DLL % {'pre':'private', 'init':'open_gl', 'proc':'get_proc', 'terminate':'close_gl'} + ''' bool gladLoadGL() { bool status = false; if(open_gl()) { s...
bsmr-opengl/glad
glad/lang/d/loader/gl.py
Python
mit
3,394
print('bar-package grok!')
tuanavu/python-cookbook-3rd
src/10/making_separate_directories_import_under_a_common_namespace/bar-package/spam/grok.py
Python
mit
27
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py
Python
mit
926
from __future__ import absolute_import from __future__ import print_function import theano import theano.tensor as T import numpy as np import time, json, warnings from collections import deque from .utils.generic_utils import Progbar class CallbackList(object): def __init__(self, callbacks=[], queue_length=10...
zhangxujinsh/keras
keras/callbacks.py
Python
mit
8,643
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class WikispiderPipeline(object): def process_item(self, item, spider): return item
xu6148152/Binea_Python_Project
wikiSpider/wikiSpider/pipelines.py
Python
mit
290
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## simple-ref-count.h: ns3::SimpleRefCount<ns3::dot11s::IeBeaconTimingUnit, ns3::empty, ns3::DefaultDeleter<ns3::dot11s::IeBeaconTimingUnit> > [class] module.ad...
ciprian-radu/unimap.ns-3noc
bindings/python/apidefs/gcc-ILP32/ns3_module_dot11s.py
Python
gpl-2.0
49,784
# shamelessly copied from pliExpertInfo (Vali, Mirakels, Littlesat) from enigma import iServiceInformation, iPlayableService from Components.Converter.Converter import Converter from Components.Element import cached from Components.config import config from Tools.Transponder import ConvertToHumanReadable, getChannelNu...
Taapat/enigma2-openpli-vuplus
lib/python/Components/Converter/PliExtraInfo.py
Python
gpl-2.0
12,757
# Copyright (c) 2015-2016 Western Digital Corporation or its affiliates. # # 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 versio...
samiWaheed/nvme-cli
tests/nvme_compare_test.py
Python
gpl-2.0
3,106
#!/usr/bin/python -t __requires__ = 'TurboGears' import pkg_resources pkg_resources.require('CherryPy >= 2.0, < 3.0alpha') import logging logging.basicConfig() import os import sys import getopt import xmlrpclib import smtplib from email.Message import Message import warnings # Ignore DeprecationWarnings. This allo...
ampotty/fas
scripts/export-bugzilla.py
Python
gpl-2.0
5,752
# -*- coding: utf-8 -*- # Copyright (C) 2010 Holoscópio Tecnologia # Author: Luciana Fujii Pontello <luciana@holoscopio.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...
Geheimorganisation/sltv
sltv/ui/input/autoaudioinput.py
Python
gpl-2.0
1,172
# If your project uses a database, you can set up database tests # similar to what you see below. Be sure to set the db_uri to # an appropriate uri for your testing database. sqlite is a good # choice for testing, because you can use an in-memory database # which is very fast. from turbogears import testutil, database...
dockerera/func
funcweb/funcweb/tests/test_model.py
Python
gpl-2.0
841
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
manojngb/Crazyfly_simple_lift
src/cfclient/ui/widgets/ai.py
Python
gpl-2.0
8,202
# # Copyright (c) 2007, 2008 Agostino Russo # Python port of wubi/disckimage/main.c by Hampus Wessman # # Written by Agostino Russo <agostino.russo@gmail.com> # # win32.ui 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 So...
vyrus/wubi
src/wubi/backends/win32/virtualdisk.py
Python
gpl-2.0
5,753
# -*- coding: utf-8 -*- # (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,...
mcsalgado/ansible
lib/ansible/playbook/play_context.py
Python
gpl-3.0
16,111
from couchpotato import get_session from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.variable import mergeDicts, randomString from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.core.settings.model import Library import copy imp...
tmxdyf/CouchPotatoServer
couchpotato/core/providers/info/_modifier/main.py
Python
gpl-3.0
3,402
# Name: controls.py # Purpose: Control components # Author: Roman Rolinsky <rolinsky@femagsoft.com> # Created: 31.05.2007 # RCS-ID: $Id: core.py 47823 2007-07-29 19:24:35Z ROL $ from wx.tools.XRCed import component, images, attribute, params from wx.tools.XRCed.globals import TRACE import...
163gal/Time-Line
libs64/wx/tools/XRCed/plugins/controls.py
Python
gpl-3.0
19,978
import os import sys import shutil import unittest import tempfile import time sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "ms3")) from ms3.testing import MS3Server from s3ffs_server import s3ffsServer, wait_until class AmazonTestCase(unittest.TestCase): def setUp(self): self.lo...
skoobe/riofs
tests/test_amazon.py
Python
gpl-3.0
1,249
"""Common utility for testing third party oauth2 features.""" import json from base64 import b64encode import httpretty from onelogin.saml2.utils import OneLogin_Saml2_Utils from oauth2_provider.models import Application from social_core.backends.facebook import API_VERSION as FACEBOOK_API_VERSION from social_core.b...
edx-solutions/edx-platform
common/djangoapps/third_party_auth/tests/utils.py
Python
agpl-3.0
4,741
# encoding: 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): # Changing field 'Project.slug' db.alter_column('teams_project', 'slug', self.gf('django.db.models.fie...
ofer43211/unisubs
apps/teams/migrations/0057_auto__chg_field_project_slug__chg_field_task_assignee.py
Python
agpl-3.0
23,628
"""EAS two-devices turn Revision ID: 17dc9c049f8b Revises: ad7b856bcc0 Create Date: 2014-10-21 20:38:14.311747 """ # revision identifiers, used by Alembic. revision = '17dc9c049f8b' down_revision = 'ad7b856bcc0' from datetime import datetime from alembic import op import sqlalchemy as sa from sqlalchemy.sql import...
Eagles2F/sync-engine
migrations/versions/115_eas_twodevices_turn.py
Python
agpl-3.0
3,146
# -*- coding: utf-8 -*- { 'name': 'Import OFX Bank Statement', 'category': 'Banking addons', 'version': '8.0.1.0.1', 'license': 'AGPL-3', 'author': 'OpenERP SA,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/bank-statement-import', 'depends': [ ...
acsone/bank-statement-import
account_bank_statement_import_ofx/__openerp__.py
Python
agpl-3.0
534
import os, sys, commands def print_debug( msg, verbose ): data_dir_root = os.environ.get('DATADIR') debug_level = int(os.environ.get('DEBUGLEVEL')) #print the message to debug log if debug variable is set #add 'from debug import *' to header # call with print_debug("my message",5) # outputs to Datadi...
achamely/omniwallet
api/debug.py
Python
agpl-3.0
530
# -*- coding: utf-8 -*- ############################################################################### # # HTMLUnescape # Replaces character entity names in the specified text with equivalent HTML markup characters. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache Licens...
jordanemedlock/psychtruths
temboo/core/Library/Utilities/Encoding/HTMLUnescape.py
Python
apache-2.0
2,975
# 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...
kobejean/tensorflow
tensorflow/python/ops/numerics.py
Python
apache-2.0
4,096
# # 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...
mtagle/airflow
airflow/providers/google/cloud/operators/mssql_to_gcs.py
Python
apache-2.0
3,144
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
yongshengwang/builthue
desktop/libs/hadoop/src/hadoop/fs/__init__.py
Python
apache-2.0
8,724
#! /usr/local/bin/stackless2.6 # by pts@fazekas.hu at Fri Jun 17 14:08:07 CEST 2011 """Demo for hosting a gevent application with Stackless, without Syncless.""" __author__ = 'pts@fazekas.hu (Peter Szabo)' import sys # Import best_greenlet before gevent to add greenlet emulation for Stackless # if necessary. import...
HanWenfang/syncless
examples/demo_gevent_only.py
Python
apache-2.0
4,479
from time import time from collections import namedtuple import warnings from scipy import stats import numpy as np from ..base import clone from ..exceptions import ConvergenceWarning from ..preprocessing import normalize from ..utils import (check_array, check_random_state, _safe_indexing, is_...
xuewei4d/scikit-learn
sklearn/impute/_iterative.py
Python
bsd-3-clause
31,089
""" Stackoverflow OAuth2 backend, docs at: https://python-social-auth.readthedocs.io/en/latest/backends/stackoverflow.html """ from .oauth import BaseOAuth2 class StackoverflowOAuth2(BaseOAuth2): """Stackoverflow OAuth2 authentication backend""" name = 'stackoverflow' ID_KEY = 'user_id' AUTHORIZAT...
tobias47n9e/social-core
social_core/backends/stackoverflow.py
Python
bsd-3-clause
1,459
########################################################################## # # Copyright (c) 2019, Cinesite VFX Ltd. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions ...
andrewkaufman/gaffer
python/GafferTest/NumericBookmarkSetTest.py
Python
bsd-3-clause
4,620
# 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. import os import unittest from telemetry.story import shared_state from telemetry import user_story from telemetry.user_story import user_story_set from tel...
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/user_story/user_story_set_unittest.py
Python
bsd-3-clause
2,649
import unittest import numpy import six from chainer import functions from chainer import testing from chainer.testing import attr from chainer import utils @testing.parameterize(*( testing.product({ 'shape': [(3, 2, 4)], 'axis': [None, 0, 1, 2, -1, (0, 1), (1, -1)], 'dtype': [numpy.floa...
okuta/chainer
tests/chainer_tests/functions_tests/math_tests/test_average.py
Python
mit
6,055
from cms.utils.urlutils import admin_reverse from django.core.urlresolvers import reverse from cms.utils import get_language_from_request from cms.utils.compat.dj import python_2_unicode_compatible from django.db import models from cms.models.fields import PlaceholderField from hvad.models import TranslatableModel, Tra...
amaozhao/basecms
cms/test_utils/project/placeholderapp/models.py
Python
mit
3,065
import pkg_resources import unittest def with_requires(*requirements): """Run a test case only when given requirements are satisfied. .. admonition:: Example This test case runs only when `numpy>=1.10` is installed. >>> from chainer import testing ... class Test(unittest.TestCase): ...
AlpacaDB/chainer
chainer/testing/helper.py
Python
mit
829
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayoutItemMap. .. note:: 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. """ ...
geopython/QGIS
tests/src/python/test_qgslayoutmap.py
Python
gpl-2.0
16,013
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at...
AlbertoPeon/invenio
modules/bibedit/lib/bibedit_templates.py
Python
gpl-2.0
16,853
#!/usr/bin/python import os from autotest.client import utils version = 1 def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') utils.extract_tarball_to_dir(tarball, srcdir) os.chdir(srcdir) utils.system('patch -p1 < ../00_arches.patch') utils.make() utils.make('prefix=%s install' ...
spcui/autotest
client/deps/libaio/libaio.py
Python
gpl-2.0
809
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The iosxr_lacp class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessary to bri...
resmo/ansible
lib/ansible/module_utils/network/iosxr/config/lacp/lacp.py
Python
gpl-3.0
5,221
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import UserError import pytz from datetime import datetime, date from dateutil.relativedelta import relativedelta from odoo.tests.common import TransactionCase class TestRecurrentEvents(Transactio...
jeremiahyan/odoo
addons/calendar/tests/test_event_recurrence.py
Python
gpl-3.0
30,782
from couchpotato.core.downloaders.base import Downloader, StatusList from couchpotato.core.helpers.encoding import tryUrlencode, ss from couchpotato.core.helpers.variable import cleanHost, mergeDicts from couchpotato.core.logger import CPLog from couchpotato.environment import Env from datetime import timedelta from ur...
coolbombom/CouchPotatoServer
couchpotato/core/downloaders/sabnzbd/main.py
Python
gpl-3.0
4,865
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
veger/ansible
lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py
Python
gpl-3.0
11,771
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2012 Camptocamp SA # Copyright 2012 Endian Solutions BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License ...
acsone/margin-analysis
product_cost_incl_costs_with_bom/product.py
Python
agpl-3.0
2,373
# Copyright 2015 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 applicable law or ag...
KaranToor/MA450
google-cloud-sdk/lib/surface/meta/list_from_json.py
Python
apache-2.0
1,923
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for L{twisted.python.randbytes}. """ import os from twisted.trial import unittest from twisted.python import randbytes class SecureRandomTestCaseBase(object): """ Base class for secureRandom test cases. """ def...
nlloyd/SubliminalCollaborator
libs/twisted/test/test_randbytes.py
Python
apache-2.0
3,309
"""Home Assistant Switcher Component.""" from asyncio import QueueEmpty, TimeoutError as Asyncio_TimeoutError, wait_for from datetime import datetime, timedelta import logging from typing import Dict, Optional from aioswitcher.api import SwitcherV2Api from aioswitcher.bridge import SwitcherV2Bridge from aioswitcher.co...
tboyce021/home-assistant
homeassistant/components/switcher_kis/__init__.py
Python
apache-2.0
6,458
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
nis-sdn/odenos
src/main/python/org/o3project/odenos/core/manager/component_manager.py
Python
apache-2.0
5,084
# 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...
tensorflow/tensorflow
tensorflow/python/kernel_tests/random/stateless_random_ops_test.py
Python
apache-2.0
23,279
# This file is part of Peach-Py package and is licensed under the Simplified BSD license. # See license.rst for the full text of the license. from peachpy.x86_64 import * from peachpy import * matrix = Argument(ptr(float_)) with Function("transpose4x4_opt", (matrix,)): reg_matrix = GeneralPurposeRegister64() ...
silky/PeachPy
examples/nmake/transpose4x4-opt.py
Python
bsd-2-clause
1,848
# Copyright (c) 2015, James Hensman # Licensed under the BSD 3-clause license (see LICENSE.txt) import unittest import numpy as np import GPy class MFtests(unittest.TestCase): def test_simple_mean_function(self): """ The simplest possible mean function. No parameters, just a simple Sinusoid. ...
befelix/GPy
GPy/testing/meanfunc_tests.py
Python
bsd-3-clause
3,340
# coding: utf-8 from livereload import Server, shell server = Server() server.watch('docs/*.rst', shell('make html')) server.serve(root='docs/_build/html', open_url=True)
mgedmin/python-livereload
server.py
Python
bsd-3-clause
173
# Copyright (c) 2003-2010, Berend-Jan "SkyLined" Wever <berendjanwever@gmail.com> # Project homepage: http://code.google.com/p/alpha3/ # All rights reserved. See COPYRIGHT.txt for details. import charsets, encode, io import x86, x64, test import os, re, sys #_____________________________________________________...
zachriggle/alpha3
ALPHA3.py
Python
bsd-3-clause
11,046
from contextlib import contextmanager import json import mock # Mock tastypi API. class ProjectData(object): def get(self): return dict() def mock_version(repo): class MockVersion(object): def __init__(self, x=None): pass def put(self, x=None): return x ...
GovReady/readthedocs.org
readthedocs/rtd_tests/mocks/mock_api.py
Python
mit
2,893
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright 2015 Umbrella Tech. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
kelsoncm/suapwebconf
tests/__init__.py
Python
mit
1,170
import ocl import pyocl import camvtk import time import vtk import datetime import math if __name__ == "__main__": print ocl.revision() myscreen = camvtk.VTKScreen() #stl = camvtk.STLSurf("../stl/gnu_tux_mod.stl") stl = camvtk.STLSurf("../stl/mount_rush.stl") myscreen.addActor(stl) stl...
AlanZatarain/opencamlib
scripts/batchdropcutter_mtrush.py
Python
gpl-3.0
2,327
"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.errors import DistutilsInternalError from distutils.util import convert_path from distutils import log import distutils.errors import distutils.filelist import...
RalfBarkow/Zettelkasten
venv/lib/python3.9/site-packages/setuptools/command/egg_info.py
Python
gpl-3.0
25,495
""" Client-side transfer class for monitoring system """ import time from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC import S_OK class SiteMapClient: ########################################################################### def __init__( self, getRPCClient = None ): self.getRPCClient = getRPCCl...
Sbalbp/DIRAC
FrameworkSystem/Client/SiteMapClient.py
Python
gpl-3.0
1,184
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Michael DeHaan <michael@ansible.com> # 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',...
skg-net/ansible
lib/ansible/modules/notification/say.py
Python
gpl-3.0
2,275
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
rajiteh/taiga-back
taiga/mdrender/service.py
Python
agpl-3.0
4,927
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GL/NV/register_combiners.py
Python
lgpl-3.0
5,260
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
noslenfa/tdjangorest
uw/lib/python2.7/site-packages/paramiko/dsskey.py
Python
apache-2.0
6,726
# Copyright 2014 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, ...
axbaretto/beam
sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/cloud/_testing.py
Python
apache-2.0
3,140
""" Some helper functions to analyze the output of sys.getdxp() (which is only available if Python was built with -DDYNAMIC_EXECUTION_PROFILE). These will tell you which opcodes have been executed most frequently in the current process, and, if Python was also built with -DDXPAIRS, will tell you which instruction ...
google/google-ctf
third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/analyze_dxp.py
Python
apache-2.0
4,312
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-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 copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
walteryang47/ovirt-engine
packaging/setup/plugins/ovirt-engine-common/ovirt-engine/db/connection.py
Python
apache-2.0
5,588
#!/usr/bin/env python """ @package mi.dataset.driver.dosta_ln.wfp @file marine-integrations/mi/dataset/driver/dosta_ln/wfp/dosta_ln_wfp.py @author Tapana Gupta @brief Driver for the dosta_ln_wfp instrument Release notes: Initial Release """ from mi.core.log import get_logger from mi.dataset.parser.WFP_E_file_commo...
janeen666/mi-instrument
mi/dataset/driver/dosta_ln/wfp/dosta_ln_wfp_driver.py
Python
bsd-2-clause
1,413
from wxPython._controls import wxLIST_MASK_STATE from wxPython._controls import wxLIST_STATE_SELECTED import os.path # Modified by Francois Malan, LUMC / TU Delft # December 2009 # # based on the SkeletonAUIViewer: # skeleton of an AUI-based viewer module # Copyright (c) Charl P. Botha, TU Delft. # set to False for 3D...
nagyistoce/devide
modules/viewers/MaskComBinar.py
Python
bsd-3-clause
62,014
# -*- test-case-name: twisted.conch.test.test_ckeygen -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the `ckeygen` command. """ import sys, os, getpass, socket if getpass.getpass == getpass.unix_getpass: try: import termios # hack around broken te...
bdh1011/wau
venv/lib/python2.7/site-packages/twisted/conch/scripts/ckeygen.py
Python
mit
7,540
class fooexception(Exception): def __init__(self, msg): Exception.__init__(self) print msg def __init__(self): Exception.__init__(self) print "i am a fooexception" data = 2 raise "foo" raise "foo", data # before raise fooexception # on-line # after # before raise fooexcept...
aptana/Pydev
tests/org.python.pydev.refactoring.tests/src/python/rewriter/testRaise.py
Python
epl-1.0
769
import itertools from zope.interface import implements from allmydata.interfaces import IDownloadStatus class ReadEvent: def __init__(self, ev, ds): self._ev = ev self._ds = ds def update(self, bytes, decrypttime, pausetime): self._ev["bytes_returned"] += bytes self._ev["decryp...
pombredanne/tahoe-lafs
src/allmydata/immutable/downloader/status.py
Python
gpl-2.0
9,220
# -*- coding: utf-8 -*- from ..internal.misc import json from ..internal.MultiAccount import MultiAccount class OverLoadMe(MultiAccount): __name__ = "OverLoadMe" __type__ = "account" __version__ = "0.13" __status__ = "testing" __config__ = [("mh_mode", "all;listed;unlisted", "Filter hosters to u...
Arno-Nymous/pyload
module/plugins/accounts/OverLoadMe.py
Python
gpl-3.0
1,824
from test import support import unittest import sys # Skip test if nis module does not exist. nis = support.import_module('nis') class NisTests(unittest.TestCase): def test_maps(self): try: maps = nis.maps() except nis.error as msg: # NIS is probably not active, so this te...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/test/test_nis.py
Python
gpl-3.0
1,167
# -*- coding: utf-8 -*- """ Created on Fri July 6 11:04:03 2015 @author: boland """ import os import datetime import numpy as np import multiprocessing as mp import matplotlib.pyplot as plt from scipy import signal from obspy import read from scipy.signal import argrelextrema from info_dataless import locs_from_dat...
boland1992/seissuite_iran
seissuite/spectrum/extrema_pickle.py
Python
gpl-3.0
9,300
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import connection from django.db import models, migrations from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.management import update_all_contenttypes def create_notifications(apps, schema_editor):...
CMLL/taiga-back
taiga/projects/userstories/migrations/0010_remove_userstory_watchers.py
Python
agpl-3.0
1,220
# # 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...
ErnieAllen/qpid-dispatch
tests/system_tests_policy_oversize_basic.py
Python
apache-2.0
36,740
# Borrowed and modified from xbmcswift import logging import xbmc from pulsar.addon import ADDON_ID class XBMCHandler(logging.StreamHandler): xbmc_levels = { 'DEBUG': 0, 'INFO': 2, 'WARNING': 3, 'ERROR': 4, 'LOGCRITICAL': 5, } def emit(self, record): xbmc_le...
steeve/plugin.video.pulsar
resources/site-packages/pulsar/logger.py
Python
bsd-3-clause
680
# The MIT License (MIT) # # Copyright (c) 2013 Numenta, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
ilblackdragon/nupic-hackathon-2014
pycept/pycept/__init__.py
Python
mit
1,184
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for large portions of L{twisted.mail}. """ import os import errno import shutil import pickle import StringIO import email.message import email.parser import tempfile import signal import time from hashlib import md5 from zope.interfac...
EricMuller/mynotes-backend
requirements/twisted/Twisted-17.1.0/src/twisted/mail/test/test_mail.py
Python
mit
84,944
"""Test inter-conversion of different polynomial classes. This tests the convert and cast methods of all the polynomial classes. """ from __future__ import division, absolute_import, print_function import operator as op from numbers import Number import pytest import numpy as np from numpy.polynomial import ( P...
kubaszostak/gdal-dragndrop
osgeo/apps/Python27/Lib/site-packages/numpy/polynomial/tests/test_classes.py
Python
mit
20,056
"""Prepare rendering of popular smart grid actions widget""" from apps.widgets.smartgrid import smartgrid def supply(request, page_name): """Supply view_objects content, which are the popular actions from the smart grid game.""" _ = request num_results = 5 if page_name != "status" else None #cont...
yongwen/makahiki
makahiki/apps/widgets/popular_tasks/views.py
Python
mit
997
#!/usr/bin/env python import string import logging from .HTMLElement import HTMLElement log = logging.getLogger("Thug") class TAnimateColor(HTMLElement): def __init__(self, doc, tag): self.doc = doc self.tag = tag self._values = "" def get_values(self): return self._values ...
tweemeterjop/thug
thug/DOM/W3C/HTML/TAnimateColor.py
Python
gpl-2.0
948
#!/usr/bin/python # -*- coding: utf-8 -*- # # progressbar - Text progress bar library for Python. # Copyright (c) 2005 Nilton Volpato # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; ei...
cms-btv-pog/rootpy
rootpy/extern/progressbar/widgets.py
Python
gpl-3.0
11,900
from safe.engine.interpolation import make_circular_polygon from safe.storage.core import read_layer H = read_layer('/data_area/InaSAFE/public_data/hazard/Marapi.shp') print H.get_geometry() # Generate evacuation circle (as a polygon): radius = 3000 center = H.get_geometry()[0] Z = make_circular_polygon(center, radiu...
fivejjs/inasafe
scripts/generate_volcano_evac_zone.py
Python
gpl-3.0
376
from yowsup.stacks import YowStack from .layer import EchoLayer from yowsup.layers import YowLayerEvent from yowsup.layers.auth import YowCryptLayer, YowAuthenticationProtocolLayer, AuthError from yowsup.layers.coder import YowCoderLayer from yowsup.layers.network ...
bassijtsma/chatbot
yowsup/demos/echoclient/stack.py
Python
gpl-3.0
2,467
import unittest, random, sys, time, os sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i import codecs, unicodedata print "create some specific small datasets with exp row/col combinations" print "This injects the full set of single byte UTF8 in a col, except for some special h2o chars" ...
rowhit/h2o-2
py/testdir_single_jvm/test_parse_specific_case4.py
Python
apache-2.0
3,961
# Natural Language Toolkit: Stemmer Interface # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Trevor Cohn <tacohn@cs.mu.oz.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT c...
hectormartinez/rougexstem
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/stem/api.py
Python
apache-2.0
715
# pylint: disable=E1101 from datetime import datetime, timedelta from functools import partial from pandas.compat import range, lrange, zip, product import numpy as np from pandas import (Series, TimeSeries, DataFrame, Panel, Index, isnull, notnull, Timestamp) from pandas.core.groupby import Dat...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/pandas/tseries/tests/test_resample.py
Python
artistic-2.0
65,806
# Copyright (c) 2008, Humanized, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of ...
berkus/enso
enso/platform/win32/selection/HtmlClipboardFormat.py
Python
bsd-3-clause
9,263
import numpy as np from scipy import ndimage as ndi from scipy import stats from ..util import img_as_float, pad from ..feature import peak_local_max from ..feature.util import _prepare_grayscale_input_2D from ..feature.corner_cy import _corner_fast from ._hessian_det_appx import _hessian_matrix_det from ..transform i...
Hiyorimi/scikit-image
skimage/feature/corner.py
Python
bsd-3-clause
27,202