repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
nmercier/linux-cross-gcc
win32/bin/Lib/encodings/hp_roman8.py
96
7543
""" Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py. Based on data from ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8 (Keld Simonsen) Original source: LaserJet IIP Printer User's Manual HP part no 33471-90901, Hewlet-Packard, June 1989. """#" import codecs ### Codec A...
bsd-3-clause
sfehlandt/pet-bot
pet_bot/migrations/0009_auto_20170621_0148.py
1
1229
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-06-21 05:48 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('pet_bo...
gpl-3.0
Spreadway/core
DAO-develop/tests/scenarios/proposal/run.py
4
1975
import random from utils import arr_str, create_votes_array, bool_to_str scenario_description = ( "Create a proposal to send an amount of ether to the SampleOffer contract." " Vote on that proposal, wait for the debating period and then execute it." " Assert that the proposal deposit is returned to its cre...
mit
matthieucan/debsources
debsources/license_helper.py
2
9393
# Copyright (C) 2015 The Debsources developers <info@sources.debian.net>. # See the AUTHORS file at the top-level directory of this distribution and at # https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD # # This file is part of Debsources. Debsources is free software: you can # redistrib...
agpl-3.0
zorroblue/scikit-learn
sklearn/externals/joblib/_parallel_backends.py
30
14414
""" Backends for embarrassingly parallel code. """ import gc import os import sys import warnings import threading from abc import ABCMeta, abstractmethod from .format_stack import format_exc from .my_exceptions import WorkerInterrupt, TransportableException from ._multiprocessing_helpers import mp from ._compat impo...
bsd-3-clause
davisein/jitsudone
django/test/simple.py
77
14601
import unittest as real_unittest from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import get_app, get_apps from django.test import _doctest as doctest from django.test.utils import setup_test_environment, teardown_test_environment from django.test.testcases...
bsd-3-clause
xu-cheng/youtube-dl
youtube_dl/extractor/vk.py
9
6355
# encoding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( ExtractorError, compat_urllib_request, compat_urllib_parse, compat_str, unescapeHTML, ) class VKIE(InfoExtractor): IE_NAME = 'vk.com' _VALID_URL = r'htt...
unlicense
wittekm/synergy-multi-monitor
tools/gtest-1.6.0/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of...
gpl-2.0
adisbladis/blues
blues/nfs.py
3
2584
""" NFS Blueprint ============= **Fabric environment:** .. code-block:: yaml blueprints: - blues.nfs settings: nfs: exports: /foo/bar: # Path to export host: 10.0.0.0/24 # Host mask to a...
mit
audip/lunr
testlunr/functional/test_backup.py
2
13720
# Copyright (c) 2011-2016 Rackspace US, 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 ...
apache-2.0
Ye-Yong-Chi/xortool
xortool/routine.py
8
1961
#!/usr/bin/env python #-*- coding:utf-8 -*- import os import sys import string class MkdirError(Exception): pass def load_file(filename): if filename == "-": return sys.stdin.read() fd = open(filename, "rb") contents = fd.read() fd.close() return contents def save_file(filename, d...
mit
cyx1231st/nova
nova/api/openstack/compute/image_size.py
9
2421
# Copyright 2013 Rackspace Hosting # 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 require...
apache-2.0
jendap/tensorflow
tensorflow/python/autograph/pyct/anno.py
24
5165
# 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...
apache-2.0
RyanChinSang/ECNG3020-ORSS4SCVI
Stable/v03/utils/visualization_utils.py
2
18530
# 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...
gpl-3.0
goelakash/retriever
retriever/engines/xmlengine.py
1
4306
import os from retriever.lib.defaults import DATA_DIR from retriever.lib.dummy import DummyConnection from retriever.lib.models import Engine from retriever.lib.scripts import open_fr, open_fw from retriever.lib.tools import xml2csv, sort_csv class engine(Engine): """Engine instance for writing data to a XML fil...
mit
cfriedt/gnuradio
gr-fft/python/fft/qa_goertzel.py
57
2049
#!/usr/bin/env python # # Copyright 2006,2007,2010,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
gpl-3.0
cjcjameson/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/lib/pg_util.py
7
24040
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
apache-2.0
stven/headphones
cherrypy/_cpdispatch.py
82
24595
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. The de...
gpl-3.0
MillerDix/NEChromeX
flaskTest/venv/lib/python2.7/site-packages/pip/_vendor/packaging/version.py
1151
11556
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import collections import itertools import re from ._structures import In...
mit
sankhesh/VTK
ThirdParty/Twisted/twisted/python/urlpath.py
60
3421
# -*- test-case-name: twisted.test.test_paths -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # import urlparse import urllib class URLPath: def __init__(self, scheme='', netloc='localhost', path='', query='', fragment=''): self.scheme = scheme or 'http' ...
bsd-3-clause
deadbok/ssg
ssg/__init__.py
1
11272
""" Main routines for the Static Site Generator. Version 0.0.5: * Parse metadata using string templates. """ import logging import os import codecs import markdown from string import Template from ssg import writer from jinja2 import Environment, FileSystemLoader, TemplateSyntaxError from jinja2 import TemplateErr...
gpl-2.0
havard024/prego
crm/lib/python2.7/site-packages/pip/_vendor/colorama/win32.py
451
4833
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 try: from ctypes import windll from ctypes import wintypes except ImportError: windll = None SetConsoleTextAttribute = lambda *_: None else: from ctypes import ( byref, Str...
mit
janssen/kivy
kivy/input/postproc/__init__.py
66
1039
''' Input Postprocessing ==================== ''' __all__ = ('kivy_postproc_modules', ) import os from kivy.input.postproc.doubletap import InputPostprocDoubleTap from kivy.input.postproc.tripletap import InputPostprocTripleTap from kivy.input.postproc.ignorelist import InputPostprocIgnoreList from kivy.input.postpr...
mit
PyGotham/pygotham
migrations/versions/b8dc37a1f5_.py
3
1354
"""Add duration and type to talks. Revision ID: b8dc37a1f5 Revises: 9d0181579c Create Date: 2014-04-16 22:54:41.449111 """ # revision identifiers, used by Alembic. revision = 'b8dc37a1f5' down_revision = '9d0181579c' from alembic import op import sqlalchemy as sa def upgrade(): context = op.get_context() ...
bsd-3-clause
neilpelow/wmap-django
venv/lib/python3.5/site-packages/django/contrib/sessions/backends/cache.py
117
2766
from django.conf import settings from django.contrib.sessions.backends.base import ( CreateError, SessionBase, UpdateError, ) from django.core.cache import caches from django.utils.six.moves import range KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based sessi...
gpl-3.0
deput/leetcode
maximum_subarray.py
2
4331
#! /usr/bin/env python3 """ http://oj.leetcode.com/problems/maximum-subarray/ Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,2,1] has the largest sum = 6. More practice: If y...
mit
Cgruppo/oppia
schema_utils_test.py
13
18303
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
ttyS15/pybbm
pybb/south_migrations/0026_auto__add_field_forum_parent.py
11
11348
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from pybb.compat import get_image_field_full_name, get_user_model_path, get_user_frozen_models AUTH_USER = get_user_model_path() class Migration(Schema...
bsd-2-clause
vipul-sharma20/oh-mainline
vendor/packages/oauthlib/tests/oauth2/rfc6749/grant_types/test_refresh_token.py
24
6278
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from ....unittest import TestCase import json import mock from oauthlib.common import Request from oauthlib.oauth2.rfc6749.grant_types import RefreshTokenGrant from oauthlib.oauth2.rfc6749.tokens import BearerToken from oauthlib.oauth2.rf...
agpl-3.0
urandu/rethinkdb
external/v8_3.30.33.16/build/gyp/test/mac/gyptest-installname.py
244
2512
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled correctly. """ import TestGyp import re import subprocess ...
agpl-3.0
evidation-health/bokeh
bokeh/sampledata/gapminder.py
41
2655
from __future__ import absolute_import import pandas as pd from os.path import join import sys from . import _data_dir ''' This module provides a pandas DataFrame instance of four of the datasets from gapminder.org. These are read in from csvs that have been downloaded from Bokeh's sample data on S3. But the origina...
bsd-3-clause
Anonymouslemming/ansible
lib/ansible/modules/network/f5/bigip_iapp_template.py
18
16046
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
gpl-3.0
googleapis/python-monitoring
google/cloud/monitoring_v3/services/group_service/pagers.py
1
10914
# -*- 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 or...
apache-2.0
imposeren/python-linkedin
tests/new_api_access_test.py
8
3555
from tests import * from linkedin.api import * from nose.tools import raises class NewApiRequestTest(LinkedInTestBase): def test_access_token_no_error(self): api = LinkedIn().api_key(API_KEY).secret_key(SECRET_KEY) \ .callback_url(RETURN_URL).request_token() url = api.get_authorize_u...
mit
marcusramberg/dotfiles
bin/.venv-ansible-venv/lib/python2.6/site-packages/ansible/runner/action_plugins/script.py
106
5700
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
mit
WebDerekh/blackfriday-horze
node_modules/grunt-sass/node_modules/node-sass/node_modules/node-gyp/gyp/PRESUBMIT.py
293
3703
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
mit
jorconnor/senior-design-rpl
testfiles/python/input/functions/functions1.py
2
4399
import sys, rsa_key_generator as rkg, os DEFAULT_BLOCK_SIZE = 128 BYTE_SIZE = 256 def main(): filename = 'encrypted_file.txt' response = input('Encrypte\Decrypt [e\d]: ') if response.lower().startswith('e'): mode = 'encrypt' elif response.lower().startswith('d'): mode = 'decrypt' ...
mit
finikorg/zephyr
arch/x86/gen_gdt.py
1
7662
#!/usr/bin/env python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 """Generate a Global Descriptor Table (GDT) for x86 CPUs. For additional detail on GDT and x86 memory management, please consult the IA Architecture SW Developer Manual, vol. 3. This script accepts as input the ze...
apache-2.0
rogerwang/chromium
tools/checkperms/checkperms.py
2
10316
#!/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. """Makes sure files have the right permissions. Some developers have broken SCM configurations that flip the svn:executable permis...
bsd-3-clause
larsmans/scikit-learn
sklearn/neighbors/unsupervised.py
16
3198
"""Unsupervised nearest neighbors learner""" from .base import NeighborsBase from .base import KNeighborsMixin from .base import RadiusNeighborsMixin from .base import UnsupervisedMixin class NearestNeighbors(NeighborsBase, KNeighborsMixin, RadiusNeighborsMixin, UnsupervisedMixin): """Unsu...
bsd-3-clause
jmesteve/asterisk
openerp/modules/graph.py
76
7660
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
OpenData-NC/PoliceReportScraper
odnc_police/odnc_police/models.py
1
10465
from django.db import models class Arrest(models.Model): ''' Defines the format of the database. Things like OCA, Agency Name, and Date Arrested are the columns of the database ''' OCA = models.CharField(max_length=20,null=True,blank=True) Agency_Name = models.CharField(max_length=150,null=True,blank=True) ORI ...
bsd-2-clause
rctk/rctk
rctk/tests/test_newlayout.py
1
11016
import py.test from rctk.layouts.grid import Grid, GridLayout, LayoutException class TestGrid(object): def test_iterator_fixed(self): g = Grid(rows=2, columns=3) walk = list(iter(g)) assert walk == [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)] def test_itera...
bsd-2-clause
kumar303/addons-server
src/olympia/abuse/tests/test_admin.py
2
20873
# -*- coding: utf-8 -*- from datetime import date from django.contrib import admin from django.contrib.messages.storage import ( default_storage as default_messages_storage) from django.test import RequestFactory from django.urls import reverse from pyquery import PyQuery as pq from six.moves.urllib_parse import...
bsd-3-clause
zhangguiyu/djangocms-cascade
cmsplugin_cascade/south_migrations/0009_auto__del_field_pluginextrafields_allow_extra_attributes.py
5
5676
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'PluginExtraFields.allow_extra_attributes' db.delete_col...
mit
BackupGGCode/python-for-android
python-modules/twisted/twisted/internet/_signals.py
57
6075
# -*- test-case-name: twisted.test.test_process,twisted.internet.test.test_process -*- # Copyright (c) 2010 Twisted Matrix Laboratories. # See LICENSE for details. """ This module provides a uniform interface to the several mechanisms which are possibly available for dealing with signals. This module is used to integ...
apache-2.0
efabless/openlane
scripts/padLefMacro.py
1
5510
#!/usr/bin/env python3 # Copyright 2020 The OpenROAD 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 applica...
apache-2.0
DrMeers/django
django/contrib/sitemaps/tests/urls/http.py
28
2618
from datetime import datetime from django.conf.urls import patterns, url from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views from django.views.decorators.cache import cache_page from django.contrib.sitemaps.tests.base import TestModel class SimpleSitemap(Sitemap): changefreq = "ne...
bsd-3-clause
sebrandon1/nova
nova/tests/unit/virt/hyperv/test_serialconsolehandler.py
15
10419
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
40223234/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/ui/widget.py
706
1774
import random from browser import doc def getMousePosition(e): if e is None: e=win.event if e.pageX or e.pageY: return {'x': e.pageX, 'y': e.pageY} if e.clientX or e.clientY: _posx=e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft; _posy=e.clientY + doc.body.scr...
gpl-3.0
mway08/grpc
src/python/src/grpc/_adapter/_lonely_rear_link_test.py
8
3617
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
mozilla/stoneridge
python/src/Lib/linecache.py
299
3964
"""Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno, module_globals=None): li...
mpl-2.0
HybridF5/tempest_debug
tempest/common/waiters.py
5
9675
# 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...
apache-2.0
dgaston/ddb-ngsflow-scripts
create_samples_config_rna.py
3
1891
#!/usr/bin/env python # Standard packages import sys import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', help="Input SamplesSheet") parser.add_argument('-o', '--output', help="Output samples configuration file name") parser.add_argument('-...
mit
sitian/wing
services/wmd/mds.py
1
1607
# mds.py # # Copyright (C) 2013 Yi-Wei Ci <ciyiwei@hotmail.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 # ...
gpl-2.0
svolle/redis-rdb-tools
rdbtools/cli/rdb.py
4
3416
#!/usr/bin/env python import os import sys from optparse import OptionParser from rdbtools import RdbParser, JSONCallback, DiffCallback, MemoryCallback, ProtocolCallback, PrintAllKeys VALID_TYPES = ("hash", "set", "string", "list", "sortedset") def main(): usage = """usage: %prog [options] /path/to/dump.rdb Examp...
mit
BlacksInTechnologyOrg/bit-slack-greeting-bot
bitbot.py
1
2239
""" Author: BIT Community Description: bitbot is a simple slack greetings bot developed by the BIT community to help promote opensource and BIT code collaboration. """ import time import sys from slackclient import SlackClient from helpers import load_config slack_settings = dict() slack_settings['slack'] = ['slack...
mit
taki0112/SPADE-Tensorflow
main.py
1
5546
from SPADE import SPADE import argparse from utils import * """parsing and configuration""" def parse_args(): desc = "Tensorflow implementation of SPADE" parser = argparse.ArgumentParser(description=desc) parser.add_argument('--phase', type=str, default='train', choices=('train', 'guide', 'random'), help='...
mit
jrahlf/3D-Non-Contact-Laser-Profilometer
xpcc/scons/site_tools/helper.py
1
5282
#!/usr/bin/env python # # Copyright (c) 2009, Roboterclub Aachen e.V. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # ...
mit
rbooth200/DiscEvolution
scripts/plot_planet_evo.py
1
1674
import os import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from matplotlib import rcParams rcParams['image.cmap'] = 'plasma' from snap_reader import DiscReader, PlanetReader from chemistry import SimpleCOMolAbund, SimpleCOAtomAbund class Formatter(object): def __init__(sel...
gpl-3.0
GPflow/GPflow
tests/gpflow/models/test_methods.py
1
3031
# Copyright 2016 the GPflow authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
hoangt/gem5v
src/sim/Root.py
17
2930
# Copyright (c) 2005-2007 The Regents of The University of Michigan # Copyright (c) 2010 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
bsd-3-clause
simonista/compose
tests/integration/cli_test.py
8
25752
from __future__ import absolute_import import os import shlex import sys from operator import attrgetter from six import StringIO from .. import mock from .testcases import DockerClientTestCase from compose.cli.errors import UserError from compose.cli.main import TopLevelCommand from compose.project import NoSuchSer...
apache-2.0
LLNL/spack
var/spack/repos/builtin/packages/r-fpc/package.py
5
1431
# 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 RFpc(RPackage): """fpc: Flexible Procedures for Clustering""" homepage = "http://www....
lgpl-2.1
MihaiMoldovanu/ansible
lib/ansible/modules/system/known_hosts.py
34
12299
#!/usr/bin/python # Copyright(c) 2014, Matthew Vernon <mcv21@cam.ac.uk> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
blueyed/dotfiles
usr/bin/with-indent.py
1
4099
#!/usr/bin/env python """Wrapper around commands that dedents/reindent partial code via textwrap. Useful for ``black`` from an editor on selected code blocks. Tests via ``pytest …/with-indent.py`` (the reason for the .py extension). Ref: https://github.com/ambv/black/issues/796 """ import textwrap import sys import ...
mit
mcoolive/graphite-web
webapp/tests/test_readers_rrd.py
6
3294
from .base import TestCase import os from os.path import join, isdir import rrdtool import shutil import six import time from django.conf import settings from graphite.readers import RRDReader from graphite.wsgi import application # NOQA makes sure we have a working WSGI app class RRDReaderTests(TestCase): t...
apache-2.0
andrewyoung1991/abjad
abjad/tools/pitchtools/NamedPitchClass.py
2
13121
# -*- encoding: utf-8 -*- import numbers from abjad.tools.pitchtools.PitchClass import PitchClass class NamedPitchClass(PitchClass): '''A named pitch-class. :: >>> pitchtools.NamedPitchClass('cs') NamedPitchClass('cs') :: >>> pitchtools.NamedPitchClass(14) NamedPitchCla...
gpl-3.0
HIPS/optofit
optofit/neuron/compartment.py
1
8483
""" Base class for a neuron. A neuron consists of a set of compartments, each of which has a set of channels. The compartments can be connected by a set of passive resistances. """ import numpy as np from optofit.models.component import Component from optofit.models.hyperparameters import hypers from optofit.utils.u...
gpl-2.0
Ahmad31/Web_Flask_Cassandra
flask/lib/python2.7/site-packages/sqlalchemy/testing/util.py
17
7544
# testing/util.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from ..util import jython, pypy, defaultdict, decorator, py2k import decimal import ...
apache-2.0
pelikanchik/edx-platform
common/test/acceptance/edxapp_pages/lms/tab_nav.py
1
2247
""" High-level tab navigation. """ from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, fulfill_after class TabNavPage(PageObject): """ High-level tab navigation. """ name = "lms.tab_nav" def url(self, **kwargs): """ Since tab navigation appears...
agpl-3.0
JVillella/tensorflow
tensorflow/contrib/keras/api/keras/preprocessing/text/__init__.py
57
1152
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
atiqueahmedziad/addons-server
src/olympia/api/management/commands/revoke_api_keys.py
3
1480
import csv from django.core.management.base import BaseCommand from django.db import transaction from olympia.api.models import APIKey class Command(BaseCommand): help = 'Revoke the API (secret, key) tuples from specified csv file.' def add_arguments(self, parser): parser.add_argument('csv_file', t...
bsd-3-clause
stevekuznetsov/ansible
test/units/mock/generator.py
97
2494
# Copyright 2016 Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
gpl-3.0
sharad1126/owtf
framework/db/vulnexp_manager.py
1
2036
from framework.db import models from framework.config import config import os from framework.dependency_management.dependency_resolver import BaseComponent from framework.dependency_management.interfaces import VulnexpDBInterface from framework.lib.general import cprint import markdown import json class VulnexpDB(Bas...
bsd-3-clause
gutow/sagenb_slickgrid
sagenb/notebook/server_conf.py
4
6385
# -*- coding: utf-8 -*- """nodoctest """ #from template import language import copy import conf from conf import (POS, DESC, GROUP, TYPE, CHOICES, T_BOOL, T_INTEGER, T_CHOICE, T_REAL, T_COLOR, T_STRING, T_LIST, T_INFO) from sagenb.misc.misc import get_languages, N_ from flask.ext.babel import gette...
gpl-3.0
silkyar/570_Big_Little
build/ARM/python/m5/internal/param_RubyTester.py
1
4934
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import d...
bsd-3-clause
taigaio/taiga-back
taiga/projects/migrations/0063_auto_20200615_0811.py
1
5722
# Generated by Django 2.2.12 on 2020-06-15 08:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0062_auto_20190826_0920'), ] operations = [ migrations.AlterF...
agpl-3.0
Darkpeninsula/DarkCore-Old
dep/libmpq/bindings/python/mpq.py
501
10430
"""wrapper for libmpq""" # 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 th...
gpl-3.0
ryfeus/lambda-packs
pytorch/source/caffe2/python/predictor/mobile_exporter.py
1
3819
## @package mobile_exporter # Module caffe2.python.mobile_exporter from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, utils from caffe2.proto import caffe2_pb2 import numpy as np def add_...
mit
valentin-krasontovitsch/ansible
lib/ansible/modules/network/cli/cli_config.py
1
14509
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
xin3liang/platform_external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
59
4028
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
noironetworks/heat
heat/engine/resources/openstack/heat/value.py
1
3923
# # 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 # ...
apache-2.0
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_log_memory_filter.py
14
20935
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
darkleons/odoo
addons/mrp/report/price.py
15
11512
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
Hazer/namebench
nb_third_party/jinja2/exceptions.py
398
4530
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ class TemplateError(Exception): """Baseclass for all template errors.""" def __init__(self, message=None): i...
apache-2.0
vmora/QGIS
python/plugins/processing/algs/grass7/ext/r_li_mpa.py
12
1385
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_mpa.py ----------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ************************************...
gpl-2.0
E2OpenPlugins/e2openplugin-OpenWebif
plugin/controllers/models/info.py
3
26681
#!/usr/bin/python # -*- coding: utf-8 -*- ########################################################################## # OpenWebif: info ########################################################################## # Copyright (C) 2011 - 2021 E2OpenPlugins # # This program is free software; you can redistribute it and/or m...
gpl-3.0
prculley/gramps
gramps/gen/filters/rules/_hastagbase.py
5
2225
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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...
gpl-2.0
gVallverdu/pymatgen
docs_rst/conf.py
6
11236
# -*- coding: utf-8 -*- # # pymatgen documentation build configuration file, created by # sphinx-quickstart on Tue Nov 15 00:13:52 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
mit
lthurlow/Network-Grapher
proj/external/networkx-1.7/build/lib.linux-i686-2.7/networkx/algorithms/assortativity/pairs.py
76
3758
#-*- coding: utf-8 -*- """Generators of x-y pairs of node data.""" import networkx as nx from networkx.utils import dict_to_numpy_array __author__ = ' '.join(['Aric Hagberg <aric.hagberg@gmail.com>']) __all__ = ['node_attribute_xy', 'node_degree_xy'] def node_attribute_xy(G, attribute, nodes=None): """...
mit
Ninjakow/TrueSkill
lib/requests/packages/chardet/jisfreq.py
3131
47315
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
BlogomaticProject/Blogomatic
opt/blog-o-matic/usr/lib/python/Bio/Graphics/GenomeDiagram/_AbstractDrawer.py
1
19541
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved. # Revisions copyright 2008-2009 by Peter Cock. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # # Contact: Leighton Pritchard,...
gpl-2.0
runarberg/servo
tests/wpt/harness/wptrunner/wptmanifest/backends/conditional.py
188
10519
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import operator from ..node import NodeVisitor, DataNode, ConditionalNode, KeyValueNode, ListNode, ValueNode from ..par...
mpl-2.0
opatut/i3pystatus
i3pystatus/bitcoin.py
6
4308
import urllib.request import json import time from i3pystatus import IntervalModule from i3pystatus.core.util import internet, require, user_open class Bitcoin(IntervalModule): """ This module fetches and displays current Bitcoin market prices and optionally monitors transactions to and from a list of u...
mit
ktrappe/seqan
util/py_lib/seqan/dox/pure.py
14
7993
#!/usr/bin/python """Implementation of the SeqAn Doxygen dialect. """ import argparse import ConfigParser import logging import os import re import sys import file_mgr import lexer import dox_tokens import dox_parser import proc_doc import raw_doc import write_html import migration # The expected HTML tags, useful ...
bsd-3-clause
cpennington/edx-platform
common/djangoapps/xblock_django/tests/test_user_service.py
1
4529
""" 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 student.models import anonymous_id_for_user from student.tests.factories import AnonymousUserFactory, UserFa...
agpl-3.0
cpennington/edx-platform
openedx/features/coursetalk/migrations/0001_initial.py
4
1254
# -*- coding: utf-8 -*- from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel...
agpl-3.0
leiferikb/bitpop
src/tools/json_schema_compiler/cpp_type_generator.py
1
11672
# 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. from code import Code from model import PropertyType import cpp_util from json_parse import OrderedDict import schema_util class _TypeDependency(object)...
gpl-3.0
petrutlucian94/nova
nova/virt/hyperv/utilsfactory.py
17
3622
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
apache-2.0