repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
awkspace/ansible
lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
71
6070
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
harshilasu/LinkurApp
y/google-cloud-sdk/platform/gsutil/third_party/boto/boto/contrib/ymlmessage.py
20
1879
# Copyright (c) 2006,2007 Chris Moyer # # 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, modify, merge, publish, di...
gpl-3.0
jaruba/chromium.src
chrome/common/extensions/docs/server2/chroot_file_system.py
85
1890
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import posixpath from docs_server_utils import StringIdentity from file_system import FileSystem from future import Future class ChrootFileSystem(FileSyst...
bsd-3-clause
bdh1011/cupeye
venv/lib/python2.7/site-packages/pip/req/req_requirement.py
118
1245
from pip._vendor.packaging.version import parse as parse_version class InstallationCandidate(object): def __init__(self, project, version, location): self.project = project self.version = parse_version(version) self.location = location self._key = (self.project, self.version, self...
bsd-3-clause
mottosso/mindbender-setup
bin/windows/python36/Lib/http/cookies.py
6
21257
#### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and that bot...
mit
pcubillos/MCcubed
examples/demo02/preamble.py
1
1385
#! /usr/bin/env python # This script generates input files used to run MCMC from the shell prompt. # Preamble # -------- # To correctly execute this script, one needs to set the correct paths # to the source code. The paths are given as if the Python session # runs from a 'run/' folder at the same level than the rep...
mit
bryx-inc/boto
boto/sdb/db/test_db.py
153
5427
import logging import time from datetime import datetime from boto.sdb.db.model import Model from boto.sdb.db.property import StringProperty, IntegerProperty, BooleanProperty from boto.sdb.db.property import DateTimeProperty, FloatProperty, ReferenceProperty from boto.sdb.db.property import PasswordProperty, ListPrope...
mit
jdinuncio/ansible-modules-extras
cloud/ovirt/ovirt_datacenters.py
9
7296
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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
KimNorgaard/ansible-modules-extras
packaging/os/pkg5.py
75
4862
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014 Peter Oliver <ansible@mavit.org.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
gpl-3.0
andmarios/ansible-modules-core
system/user.py
7
72948
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@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 Lice...
gpl-3.0
getredash/redash
redash/cli/queries.py
3
1226
from click import argument from flask.cli import AppGroup from sqlalchemy.orm.exc import NoResultFound manager = AppGroup(help="Queries management commands.") @manager.command() @argument("query_id") @argument("tag") def add_tag(query_id, tag): from redash import models query_id = int(query_id) try: ...
bsd-2-clause
mtwestra/akvo-wandelenvoorwater
wvw/W4W/models.py
1
6568
from django.db import models class school(models.Model): class Meta: verbose_name = "School" verbose_name_plural="Scholen" BRIN_NUMMER = models.CharField('BRIN code',max_length=15,blank=True, null=True) NAAM_VOLLEDIG = models.CharField('Naam school',max_length=100,blank=True, null=True) NAAM_STRAAT_VE...
agpl-3.0
google/compare_gan
compare_gan/architectures/resnet_init_test.py
2
4302
# coding=utf-8 # Copyright 2018 Google LLC & Hwalsuk Lee. # # 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 ...
apache-2.0
Noviat/account-financial-reporting-V3-intrastat
account_chart_report/__init__.py
34
1038
# -*- coding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Savoir-faire Linux (<www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it under the ...
agpl-3.0
kaday/cylc
lib/cylc/run.py
1
3790
#!/usr/bin/env python # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2015 NIWA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
gpl-3.0
dchud/sentinel
canary/cmdline.py
1
2175
# $Id$ import optparse import os class CommandLine: """A helper class for canary command line tools. When you use CommandLine you will get a --config option for free, and a handy method for instantiating a Context() object. cmdline = CommandLine() cmdline.parse_args() con = cmdline.context() ...
mit
pierreg/tensorflow
tensorflow/python/training/training.py
3
11365
# 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...
apache-2.0
joachimmetz/plaso
plaso/formatters/file_system.py
4
1917
# -*- coding: utf-8 -*- """File system custom event formatter helpers.""" from plaso.formatters import interface from plaso.formatters import manager class NTFSFileReferenceFormatterHelper(interface.CustomEventFormatterHelper): """NTFS file reference formatter helper.""" IDENTIFIER = 'ntfs_file_reference' de...
apache-2.0
Hellowlol/PyTunes
libs/enzyme/flv.py
180
6375
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public Lice...
gpl-3.0
rexyeah/jira-cli
tests/common_bridge_cases.py
1
3778
""" """ import os import vcr jiravcr = vcr.VCR( record_mode = 'once', match_on = ['uri', 'method'], ) class BridgeTests: def test_get_issue(self): with jiravcr.use_cassette(os.path.join(self.vcr_directory, "issue.yaml")): self.assertIsNotNone(self.bridge.get_issue("TP-9")) def te...
mit
mindw/pip
pip/_vendor/distlib/version.py
132
23711
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Implementation of a flexible versioning scheme providing support for PEP-440, setuptools-compatible and semantic versioning. """ import logging import re from .compat import string_types ...
mit
ThiagoGarciaAlves/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/gdal/__init__.py
397
2173
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-...
apache-2.0
fedorpatlin/ansible
lib/ansible/modules/cloud/vmware/vmware_vswitch.py
56
6915
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
RichardLitt/wyrd-django-dev
django/db/models/fields/related.py
2
62048
from operator import attrgetter from django.db import connection, router from django.db.backends import util from django.db.models import signals, get_model from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist) from django.db.models...
bsd-3-clause
SuriyaaKudoIsc/olympia
apps/api/tests/test_oauth.py
5
34999
""" Verifies basic OAUTH functionality in AMO. Sample request_token query: /en-US/firefox/oauth/request_token/? oauth_consumer_key=GYKEp7m5fJpj9j8Vjz& oauth_nonce=A7A79B47-B571-4D70-AA6C-592A0555E94B& oauth_signature_method=HMAC-SHA1& oauth_timestamp=1282950712& oauth_versio...
bsd-3-clause
jcoady9/python-for-android
python3-alpha/python3-src/Lib/test/test_profile.py
91
7006
"""Test suite for the profile module.""" import sys import pstats import unittest from difflib import unified_diff from io import StringIO from test.support import run_unittest import profile from test.profilee import testfunc, timer class ProfileTest(unittest.TestCase): profilerclass = profile.Profile met...
apache-2.0
ShinyROM/android_external_chromium_org
third_party/android_testrunner/errors.py
171
1340
#!/usr/bin/python2.4 # # # Copyright 2008, The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
bsd-3-clause
40223243/2015cd_midterm2
2015cd_midterm-master/static/Brython3.1.1-20150328-091302/Lib/csv.py
637
16166
""" csv.py - read/write/investigate CSV files """ import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ ...
agpl-3.0
lukemarsden/compose
tests/unit/config_test.py
19
23623
import mock import os import shutil import tempfile from .. import unittest from compose import config def make_service_dict(name, service_dict, working_dir): """ Test helper function to contruct a ServiceLoader """ return config.ServiceLoader(working_dir=working_dir).make_service_dict(name, service_...
apache-2.0
wkoathp/glance
glance/db/sqlalchemy/metadef_api/property.py
6
6161
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 re...
apache-2.0
aemerick/galaxy_analysis
method_paper_plots/star_abundances.py
1
26128
from galaxy_analysis.plot.plot_styles import * import matplotlib.pyplot as plt import glob import deepdish as dd import yt from galaxy_analysis.utilities import utilities import numpy as np from matplotlib.ticker import NullFormatter from galaxy_analysis.particle_analysis.abundances import single_MDF # from galaxy_anal...
mit
agrista/odoo-saas
addons/marketing_campaign/__openerp__.py
260
3127
# -*- 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
rychipman/mongo-python-driver
pymongo/read_preferences.py
27
12784
# Copyright 2012-2015 MongoDB, 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...
apache-2.0
cainmatt/django
django/contrib/gis/gdal/srs.py
366
12043
""" The Spatial Reference class, represents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY...
bsd-3-clause
MounirMesselmeni/django
django/contrib/auth/migrations/0008_alter_user_username_max_length.py
26
1030
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0007_alter_validators_add_error_messages'), ] operations = [ migrations.AlterField( ...
bsd-3-clause
tumbl3w33d/ansible
lib/ansible/modules/crypto/openssl_certificate.py
2
115826
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org> # Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import...
gpl-3.0
fritsvanveen/QGIS
python/plugins/processing/tools/spatialite.py
3
4049
# -*- coding: utf-8 -*- """ *************************************************************************** spatialite.py --------------------- Date : November 2015 Copyright : (C) 2015 by René-Luc Dhont Email : volayaf at gmail dot com ************************...
gpl-2.0
opencloudinfra/orchestrator
venv/Lib/site-packages/django/templatetags/cache.py
471
3389
from __future__ import unicode_literals from django.core.cache import InvalidCacheBackendError, caches from django.core.cache.utils import make_template_fragment_key from django.template import ( Library, Node, TemplateSyntaxError, VariableDoesNotExist, ) register = Library() class CacheNode(Node): def __in...
gpl-3.0
sernst/cauldron
cauldron/session/display/__init__.py
1
23013
import json as _json_io import textwrap import typing from datetime import timedelta import cauldron as _cd from cauldron import environ from cauldron import render from cauldron.render import plots as render_plots from cauldron.render import texts as render_texts from cauldron.session import report def _get_report(...
mit
julienmalard/Tikon
pruebas/test_calibrador/test_spotpy.py
1
1920
import unittest from warnings import warn as avisar import scipy.stats as estad from pruebas.test_central.rcrs.modelo_calib import generar from tikon.calibrador.spotpy_ import EMV, RS, BDD, CMEDZ, MC, MLH, CAACAA, CAA, ECBUA, ERP, CMMC, CalibSpotPy from tikon.ecs.aprioris import APrioriDist class PruebaSpotPy(unitte...
agpl-3.0
yangchandle/django_ecommerce
env/lib/python3.5/site-packages/pip/utils/build.py
899
1312
from __future__ import absolute_import import os.path import tempfile from pip.utils import rmtree class BuildDirectory(object): def __init__(self, name=None, delete=None): # If we were not given an explicit directory, and we were not given an # explicit delete option, then we'll default to del...
mit
spreeker/democracygame
external_apps/docutils-snapshot/docutils/parsers/rst/directives/html.py
61
3223
# $Id: html.py 4667 2006-07-12 21:40:56Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for typically HTML-specific constructs. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parse...
bsd-3-clause
aaxelb/SHARE
share/harvesters/org_dataone.py
3
1426
from furl import furl from lxml import etree from share.harvest import BaseHarvester class DataOneHarvester(BaseHarvester): VERSION = 1 def do_harvest(self, start_date, end_date): end_date = end_date.format('YYYY-MM-DDT00:00:00', formatter='alternative') + 'Z' start_date = start_date.format...
apache-2.0
shehzaadn/phoenix
bin/sqlline-thin.py
4
6499
#!/usr/bin/env python ############################################################################ # # 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 A...
apache-2.0
fanchao01/spider
mini_spider/log.py
1
2513
#!/usr/bin/env python #-*- coding:utf-8 -*- """ This module provide configure file management service in i18n environment. """ import os import logging import logging.handlers _LOG_FORMAT = "%(levelname)s: %(asctime)s: %(filename)s:%(lineno)d * %(thread)d %(message)s" _LOG_DATEFMT = "%m-%d %H:%M:%S" def init_log(lo...
gpl-2.0
LubyRuffy/pr0bescan
plugins/hostcdn.py
2
1504
#/usr/bin/env python #coding=utf-8 from libs.core.common import logging,runtime from libs.core.common import print_color import libs.DNS as DNS log = logging.getLogger(__name__) def output(target): customHeaders = ['x-powered-by-360wzb', 'x-powered-by-anquanbao','x-cache','webluker-edge', ...
gpl-2.0
cosmoharrigan/opencog
opencog/python/learning/incremental_learner/incremental_learner.py
34
7004
__author__ = 'raminbarati' import networkx as nx from util import switch from modification import Modification class Runnable: """INTERFACE""" def run(self): pass class IncrementalLearner: """INTERFACE""" def construct_join_tree(self, graph): pass def construct_mpd_tree(self, join...
agpl-3.0
mpasternak/django-interval-field
interval/fields.py
2
5391
# -*- encoding: utf-8 -*- from django.db import models from django.db.models.fields.subclassing import SubfieldBase from django.utils.text import capfirst from django.utils.translation import ugettext_lazy as _ from datetime import timedelta import six from interval.forms import IntervalFormField day_seconds = 24 *...
mit
wschwa/Mr-Orange-Sick-Beard
lib/dateutil/zoneinfo/__init__.py
265
2575
""" Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ from dateutil.tz import tzfile from tarfile import TarFile import os __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" __all__ = ["setca...
gpl-3.0
stonewell/wxglterm
src/utils/app_config.py
1
1301
import os import json class DictQuery(dict): def get(self, path, default=None): try: return self.__get(path, default) except: import logging logging.exception('get failed') def __get(self, path, default=None): keys = path.split("/") val = No...
mit
liveblog/superdesk
server/apps/planning.py
10
1989
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from superde...
agpl-3.0
jinnykoo/wuyisj
src/oscar/apps/order/south_migrations/0008_auto__add_field_orderdiscount_category.py
16
33182
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'OrderDiscount.category' ...
bsd-3-clause
Brian-Tomasik/leveraged_investing
TaxRates.py
1
1393
class TaxRates(object): """Investor's tax rates""" def __init__(self, short_term_cap_gains_rate=.28, long_term_cap_gains_rate=.15, state_income_tax=.05): self.__short_term_cap_gains_rate = short_term_cap_gains_rate self.__long_term_cap_gains_rate = long_term_cap_gains_rate ...
unlicense
SujaySKumar/django
tests/apps/tests.py
68
16296
from __future__ import unicode_literals import os import warnings from unittest import skipUnless from django.apps import AppConfig, apps from django.apps.registry import Apps from django.contrib.admin.models import LogEntry from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.db i...
bsd-3-clause
grburgess/astromodels
astromodels/tests/test_template_model.py
2
4653
import pytest import os import numpy as np from astromodels.functions.template_model import TemplateModel, TemplateModelFactory, MissingDataFile from astromodels.functions.functions import Band, Powerlaw from astromodels import Model, PointSource, clone_model, load_model import pickle __author__ = 'giacomov' def ge...
bsd-3-clause
yifanzh/ohmypaw
cogs/streams.py
5
26330
from discord.ext import commands from .utils.dataIO import dataIO from .utils.chat_formatting import escape_mass_mentions from .utils import checks from collections import defaultdict from string import ascii_letters from random import choice import discord import os import re import aiohttp import asyncio import loggi...
gpl-3.0
solo2101/Tilo-Menu
src/lib/tilo/backend.py
1
3706
#!/usr/bin/env python # This application is released under the GNU General Public License # v3 (or, at your option, any later version). You can find the full # text of the license under http://www.gnu.org/licenses/gpl.txt. # By using, editing and/or distributing this software you agree to # the terms and condition...
gpl-2.0
gangadhar-kadam/mic-wnframework
webnotes/widgets/form/assign_to.py
6
5492
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) # # MIT License (MIT) # # 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 lim...
mit
chromium/chromium
third_party/pylint/pylint/checkers/similar.py
64
14174
# pylint: disable=W0622 # Copyright (c) 2004-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 ver...
bsd-3-clause
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/tokenize.py
122
16465
"""Tokenization help for Python programs. generate_tokens(readline) is a generator that breaks a stream of text into Python tokens. It accepts a readline-like method which is called repeatedly to get the next line of input (or "" for EOF). It generates 5-tuples with these members: the token type (see token.py) ...
gpl-2.0
shobhitka/linux-kernel
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
pando85/gourmet
gourmet/plugins/field_editor/__init__.py
7
1175
from gourmet.plugin import ToolPlugin import fieldEditor import gtk from gettext import gettext as _ class FieldEditorPlugin (ToolPlugin): menu_items = '''<placeholder name="DataTool"> <menuitem action="FieldEditor"/> </placeholder> ''' def setup_action_groups (self): self.action_group = ...
gpl-2.0
christian-posta/openshift-ansible
filter_plugins/oo_filters.py
14
14087
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 ''' Custom filters for use in openshift-ansible ''' from ansible import errors from operator import itemgetter import pdb import re import json class FilterModule(object): ''' Custom ansible filters ''' @staticmethod def o...
apache-2.0
updownlife/multipleK
dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/PopGen/FDist/Utils.py
3
6908
# Copyright 2007 by Tiago Antao <tiagoantao@gmail.com>. All rights reserved. # 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. from Bio.PopGen.GenePop import FileParser import Bio.PopGen.FDist # Qui...
gpl-2.0
andrius-preimantas/odoo
addons/mrp/report/price.py
39
11481
# -*- 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
jobscore/sync-engine
inbox/test/api/test_auth.py
3
1866
import json from base64 import b64encode from inbox.test.util.base import generic_account, db # noqa from inbox.test.api.base import new_api_client # noqa def test_no_auth(db, generic_account): # noqa # Because we're using the generic_account namespace api_client = new_api_client(db, generic_account.nam...
agpl-3.0
utecht/random-lines
random-lines.py
1
1121
#!/usr/bin/env python import random import argparse import sys parser = argparse.ArgumentParser(description='Return random lines of file') parser.add_argument('file', type=argparse.FileType('r'), help='the input file') parser.add_argument('-n', '--num', type=int, help='number of lines to return') parser.add_argument('...
gpl-2.0
ptisserand/ansible
lib/ansible/modules/cloud/amazon/route53_health_check.py
23
13078
#!/usr/bin/python # 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 later version. # # Ansible is distributed...
gpl-3.0
ldiary/pytest-testbook
setup.py
1
1591
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import codecs from setuptools import setup directory_name = os.path.dirname(__file__) with codecs.open(os.path.join(directory_name, 'pytest_testbook', '__init__.py'), encoding='utf-8') as fd: VERSION = re.compile(r".*__version__ = '(.*?)'", re.S)....
mit
piranna/pyfilesystem
fs/s3fs.py
7
29233
""" fs.s3fs ======= **Currently only avaiable on Python2 due to boto not being available for Python3** FS subclass accessing files in Amazon S3 This module provides the class 'S3FS', which implements the FS filesystem interface for objects stored in Amazon Simple Storage Service (S3). """ import os import datetime...
bsd-3-clause
matthewwardrop/formulaic
formulaic/materializers/transforms/scale.py
1
1389
import numpy import scipy.sparse as spsparse from formulaic.utils.stateful_transforms import stateful_transform @stateful_transform def scale(data, center=True, scale=True, ddof=1, _state=None): data = numpy.array(data) if 'ddof' not in _state: _state['ddof'] = ddof else: ddof = _state[...
mit
erilyth/sugar
src/jarabe/view/pulsingicon.py
1
7328
# Copyright (C) 2008 One Laptop Per Child # # 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 distribu...
gpl-2.0
rwgdrummer/maskgen
maskgen/analytics/dctAnalytic.py
1
17525
# ============================================================================= # Authors: PAR Government # Organization: DARPA # # Copyright (c) 2016 PAR Government # All rights reserved. # # # adapted from https://github.com/enmasse/jpeg_read #==========================================================================...
bsd-3-clause
scikit-optimize/scikit-optimize
skopt/callbacks.py
1
9377
"""Monitor and influence the optimization procedure via callbacks. Callbacks are callables which are invoked after each iteration of the optimizer and are passed the results "so far". Callbacks can monitor progress, or stop the optimization early by returning `True`. """ try: from collections.abc import Callable ...
bsd-3-clause
bjackman/workload-automation
wlauto/resource_getters/standard.py
1
23149
# Copyright 2013-2015 ARM Limited # # 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 w...
apache-2.0
thundernet8/WRGameVideos-Server
venv/lib/python2.7/site-packages/pip/_vendor/lockfile/__init__.py
475
9162
""" lockfile.py - Platform-independent advisory file locks. Requires Python 2.5 unless you apply 2.4.diff Locking is done on a per-thread basis instead of a per-process basis. Usage: >>> lock = LockFile('somefile') >>> try: ... lock.acquire() ... except AlreadyLocked: ... print 'somefile', 'is locked already...
gpl-2.0
peterbraden/tensorflow
tensorflow/python/kernel_tests/sparse_matmul_op_test.py
9
3990
# 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 a...
apache-2.0
pythonalliance/uno2bot
errors.py
1
1077
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Telegram bot to play UNO in group chats # Copyright (c) 2016 Jannes Höke <uno@jhoeke.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundatio...
agpl-3.0
partofthething/home-assistant
homeassistant/components/zha/core/const.py
1
10279
"""All constants related to the ZHA component.""" import enum import logging from typing import List import bellows.zigbee.application from zigpy.config import CONF_DEVICE_PATH # noqa: F401 # pylint: disable=unused-import import zigpy_cc.zigbee.application import zigpy_deconz.zigbee.application import zigpy_xbee.zigb...
mit
bsmedberg/socorro
webapp-django/bin/linting.py
2
1511
#!/usr/bin/env python """ Use like this: find somedir | xargs check.py | python linting.py or: check.py somedir | python linting.py or: git ls-files somedir | python linting.py """ import os import sys # Enter any part of a warning that we deem OK. # It can be a pep8 warning error code or any other...
mpl-2.0
ericholscher/django-tastypie
tastypie/validation.py
47
3685
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.forms import ModelForm from django.forms.models import model_to_dict class Validation(object): """ A basic validation stub that does no validation. """ def __init__(self, **kwargs): pass...
bsd-3-clause
suninsky/ReceiptOCR
Python/server/lib/python2.7/site-packages/selenium/webdriver/safari/service.py
31
1854
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
mit
G33KS44n/mysql-5.6
xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/bug766607_test.py
24
8243
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
gpl-2.0
cnits/CnitSymfony
vendor/doctrine/orm/docs/en/conf.py
2448
6497
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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. ...
mit
JijonHyuni/HyperKernel-JB
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
badloop/SickRage
lib/tornado/concurrent.py
35
18000
#!/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...
gpl-3.0
balloob/home-assistant
tests/components/alarmdecoder/test_config_flow.py
5
13829
"""Test the AlarmDecoder config flow.""" from alarmdecoder.util import NoDeviceError import pytest from homeassistant import config_entries, data_entry_flow from homeassistant.components.alarmdecoder import config_flow from homeassistant.components.alarmdecoder.const import ( CONF_ALT_NIGHT_MODE, CONF_AUTO_BYP...
apache-2.0
rsyvarth/simple-blog
lib/wtforms/ext/sqlalchemy/validators.py
40
1225
from __future__ import unicode_literals import warnings from wtforms import ValidationError from sqlalchemy.orm.exc import NoResultFound class Unique(object): """Checks field value unicity against specified table field. :param get_session: A function that return a SQAlchemy Session. :param model:...
mit
ygol/dotfiles
bin/.venv-ansible-venv/lib/python2.6/site-packages/pip/exceptions.py
398
1086
"""Exceptions used throughout package""" class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class DistributionNotFound(InstallationError)...
mit
taschik/ramcloud-load-manager
scripts/config.py
2
3706
#!/usr/bin/env python # Copyright (c) 2011 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND T...
isc
eliezerfot123/django-with-angular
django_with_angular_je/django_with_angular_je/settings.py
1
2686
""" Django settings for django_with_angular_je project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ ""...
gpl-2.0
seckyn/jaikuengine
common/management/commands/clean.py
35
1150
# Copyright 2009 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, ...
apache-2.0
ubalance-team/magum
magum/magum.py
1
26743
#!/usr/bin/python """ MAGUM python module (Beta 1.1.0) MAGUM stands for (Magnetometer, Accelerometer and Gyroscope Udoo Management) it includes some modules such as smbus, time, os, sys, subprocess etc.. to manage the udoo-neo motion sensors over the I2C serial communicaton protocol. Because the I2C device interfa...
gpl-2.0
astraw/stdeb
stdeb/command/install_deb.py
1
1027
import glob import os import stdeb.util as util from distutils.core import Command __all__ = ['install_deb'] class install_deb(Command): description = 'distutils command to install debian binary package' user_options = [] boolean_options = [] def initialize_options(self): pass def fin...
mit
tian2992/flask-sockets
flask_sockets.py
2
1627
# -*- coding: utf-8 -*- def log_request(self): log = self.server.log if log: if hasattr(log, 'info'): log.info(self.format_request() + '\n') else: log.write(self.format_request() + '\n') # Monkeys are made for freedom. try: import gevent from geventwebsocket.gu...
mit
rdipietro/tensorflow
tensorflow/g3doc/how_tos/adding_an_op/zero_out_1_test.py
56
1441
# 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...
apache-2.0
steedos/odoo
addons/calendar/__init__.py
391
1038
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
yookoala/ibus-cangjie
src/engine.py
1
16581
# Copyright (c) 2012-2013 - The IBus Cangjie authors # # This file is part of ibus-cangjie, the IBus Cangjie input method engine. # # ibus-cangjie 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...
gpl-3.0
TedaLIEz/sentry
src/sentry/migrations/0042_auto__add_projectcountbyminute__add_unique_projectcountbyminute_projec.py
36
17255
# 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): # Adding model 'ProjectCountByMinute' db.create_table('sentry_projectcountbyminute', ( ('id', self.gf(...
bsd-3-clause
VPAC/pytsm
pytsm/actions/__init__.py
1
1692
# Copyright 2012-2014 VPAC # # This file is part of pytsm. # # pytsm 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 later version. # # pytsm is distr...
gpl-3.0