repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
pshen/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py
7
25136
#!/usr/bin/python # # This is a 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. # # This Ansible library is distributed in the hope that i...
gpl-3.0
KhalidGit/flask
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/_vendor/distlib/wheel.py
185
38259
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2014 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from...
apache-2.0
sentient-energy/googletest
googlemock/test/gmock_test_utils.py
769
3684
#!/usr/bin/env python # # Copyright 2006, 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...
bsd-3-clause
2ndQuadrant/ansible
test/units/playbook/test_task.py
43
3567
# (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, or # (at your option) an...
gpl-3.0
soylentdeen/cuddly-weasel
gfVerification/plotSolar.py
1
1472
import matplotlib.pyplot as pyplot import Moog960 import MoogTools import numpy import glob correctionFiles = glob.glob('/home/deen/MoogPyData/AbsorptionLines/corrections/*Solar_results.dat') solarSpectrum = Moog960.ObservedMelody.fromFile(filename='SolarSpectrum.fits') solarSpectrum.loadData() arcturusSpectrum = Mo...
mit
pbryzek/Freedom
objects/obj_home.py
1
3607
from common.globals import handle_err_msg from common.globals import format_citystatezip import consts.switches as switches class HomeObj(object): def __init__(self, type, address, city, state, zip, dom, listing_id, beds, baths, yearbuilt, sqfootage, lotsize, latitude, longitude, homelink, graphlink, maplink, comp...
mit
ashishnitinpatil/django_appengine_project_template
django/contrib/admin/helpers.py
102
14143
from __future__ import unicode_literals from django import forms from django.contrib.admin.util import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.admin.templatetags.admin_static import static from django.contrib.contenttypes.models import ContentT...
bsd-2-clause
puittenbroek/slimmermeten
fabfile.py
1
5525
""" Starter fabfile for deploying the bigfattemplate project. Change all the things marked CHANGEME. Other things can be left at their defaults if you are happy with the default layout. """ import posixpath from fabric.api import run, local, env, settings, cd, task from fabric.contrib.files import exists from fabric...
bsd-3-clause
karthikvadla16/spark-tk
regression-tests/sparktkregtests/testcases/frames/entropy_test.py
14
2228
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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
yangzilong1986/python
Matafight/0012/ResenWord.py
38
1202
# -*-coding:utf-8-*- import string class senseWord(): def __init__(self): self.list=[] self.word=[] inputfile=file('filtered_word.txt','r') for lines in inputfile.readlines(): self.list.append(lines.decode('utf-8').encode('gbk'))#I've set the file coding type as utf-8 ...
mit
cycotech/WAR-app
env/lib/python3.5/site-packages/django/utils/timesince.py
64
2857
from __future__ import unicode_literals import calendar import datetime from django.utils.html import avoid_wrapping from django.utils.timezone import is_aware, utc from django.utils.translation import ugettext, ungettext_lazy TIMESINCE_CHUNKS = ( (60 * 60 * 24 * 365, ungettext_lazy('%d year', '%d years')), ...
mit
tarzan0820/odoo
addons/account_cancel/__openerp__.py
261
1621
# -*- 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
alexschiller/osf.io
api/users/permissions.py
14
1403
from website.models import User from rest_framework import permissions class ReadOnlyOrCurrentUser(permissions.BasePermission): """ Check to see if the request is coming from the currently logged in user, and allow non-safe actions if so. """ def has_object_permission(self, request, view, obj): ...
apache-2.0
fluxw42/youtube-dl
test/test_download.py
2
10158
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import ( assertGreaterEqual, expect_warnings, get_params, gettestcases, expe...
unlicense
mtagle/airflow
airflow/providers/google/cloud/example_dags/example_automl_nl_text_extraction.py
5
3458
# # 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...
apache-2.0
bitemyapp/flightcrew
src/googlemock/gtest/test/gtest_output_test.py
5
11611
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-3.0
cloudify-cosmo/softlayer-python
SoftLayer/CLI/loadbal/service_edit.py
1
1738
"""Edit the properties of a service group.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import loadbal import click @click.command() @click.argument('identifier') @click.option('--enabled / --disabled', default=None, ...
mit
sda2b/youtube-dl
youtube_dl/extractor/quickvid.py
113
1719
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( determine_ext, int_or_none, ) class QuickVidIE(InfoExtractor): _VALID_URL = r'https?://(www\.)?quickvid\.org/watch\.php\?v=(?P<id>[a-zA-Z_0-9-]+)' _...
unlicense
spark0001/spark2.1.1
examples/src/main/python/ml/stopwords_remover_example.py
123
1434
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
liu1xin/aria2app
aria2cmd/serverwrapper.py
1
2728
#!/usr/bin/env python # -*- coding: utf8 -*- import aria2app.a2jsonrpc as a2jsonrpc import aria2app.a2config as a2config ######################## Convenience Methods for Server############################# class Aria2ServerWrapper(object): def __init__(self, cfgfile, token=None): self.tok...
bsd-2-clause
Tesora-Release/tesora-horizon
openstack_dashboard/dashboards/project/volumes/test.py
27
3473
# Copyright 2012 Nebula, 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 agree...
apache-2.0
markfinal/BuildAMation
tests/builderactions.py
1
12496
#!/usr/bin/python import copy import multiprocessing import os import subprocess import sys import tempfile import time import traceback class Builder(object): """Class that represents the actions for a builder""" def __init__(self, repeat_no_clean): self.repeat_no_clean = repeat_no_clean self...
bsd-3-clause
z00223295/kubernetes
cluster/juju/layers/kubernetes/reactive/k8s.py
53
14370
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
yewang15215/django
tests/gis_tests/layermap/tests.py
7
14506
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import unittest from copy import copy from decimal import Decimal from django.conf import settings from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import HAS_GEOS from django.db import connection from django.test impor...
bsd-3-clause
rdhyee/PyTables
tables/parameters.py
3
14633
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: February 25, 2005 # Author: Ivan Vilata - reverse:net.selidor@ivan # # $Id$ # ######################################################################## """Parameters for PyTables.""" __docform...
bsd-3-clause
Belxjander/Kirito
Python-3.5.0-Amiga/Lib/typing.py
3
53427
# TODO nits: # Get rid of asserts that are the caller's fault. # Docstrings (e.g. ABCs). import abc from abc import abstractmethod, abstractproperty import collections import functools import re as stdlib_re # Avoid confusion with the re we export. import sys import types try: import collections.abc as collection...
gpl-3.0
ayenter/googletest
scripts/pump.py
2471
23673
#!/usr/bin/env python # # Copyright 2008, 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...
bsd-3-clause
chafique-delli/OpenUpgrade
openerp/addons/test_impex/tests/test_export.py
71
19319
# -*- coding: utf-8 -*- import itertools import openerp.modules.registry import openerp from openerp.tests import common class CreatorCase(common.TransactionCase): model_name = False def __init__(self, *args, **kwargs): super(CreatorCase, self).__init__(*args, **kwargs) self.model = None ...
agpl-3.0
mrares/incubator-airflow
airflow/www/views.py
1
97991
# -*- coding: utf-8 -*- # # 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
BludhavenGrayson/repository.BludhavenGrayson
plugin.video.rohwrestling/default.py
1
6158
''' ROH Wrestling Add-on Copyright (C) 2017 BludhavenGrayson Copyright (C) 2016 rw86 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 option) any la...
gpl-2.0
mogoweb/chromium-crosswalk
chrome/test/chromedriver/test/unittest_util.py
134
4320
# 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. """Utilities for dealing with the python unittest module.""" import fnmatch import sys import unittest class _TextTestResult(unittest._TextTestResult): ...
bsd-3-clause
Justin-Yuan/Image2Music-Generator
library/jython2.5.3/Lib/encodings/iso2022_jp_1.py
816
1061
# # iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_1') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class Incrementa...
gpl-2.0
Eric89GXL/mne-python
tutorials/sample-datasets/plot_phantom_4DBTi.py
17
2910
# -*- coding: utf-8 -*- """ .. _tut_phantom_4Dbti: ============================================ 4D Neuroimaging/BTi phantom dataset tutorial ============================================ Here we read 4DBTi epochs data obtained with a spherical phantom using four different dipole locations. For each condition we comput...
bsd-3-clause
coderb0t/CouchPotatoServer
libs/suds/client.py
150
25971
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
iemejia/incubator-beam
sdks/python/apache_beam/runners/worker/log_handler.py
2
7153
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
jcftang/ansible
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py
37
6595
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, 2016 Ritesh Khadgaray <khadgaray () 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...
gpl-3.0
lukeiwanski/tensorflow-opencl
tensorflow/python/ops/losses/losses_impl.py
32
27543
# 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
ofekd/servo
tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
7
12111
import imp import os from six.moves.urllib.parse import urljoin from fnmatch import fnmatch try: from xml.etree import cElementTree as ElementTree except ImportError: from xml.etree import ElementTree here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here,...
mpl-2.0
simudream/django-rest-framework
tests/test_middleware.py
79
1134
from django.conf.urls import url from django.contrib.auth.models import User from rest_framework.authentication import TokenAuthentication from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from rest_framework.views import APIView urlpatterns = [ url(r'^$', APIView.as_v...
bsd-2-clause
h2oai/h2o-2
py/testdir_hosts/test_GBM_mnist_restart_many.py
9
2499
import unittest import random, sys, time, re sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm, h2o_util, h2o_rf, h2o_jobs as h2j DO_DELETE_KEYS_AND_CAUSE_PROBLEM = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_er...
apache-2.0
xyder/kivy-tasks-client
config.py
1
1043
from views.tasks_list_view import convert_time use_kv_file = False form_input_formats = [ { 'label': 'Title', 'key': 'title', 'formatter': None }, { 'label': 'Description', 'key': 'body', 'formatter': None, ...
mit
iutrs/networkmap
explorer/network_objects.py
1
4355
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Auteur : Marc-Antoine Fortier Date : Mars 2015 """ import json HP_DEVICES = ("HP", "Hewlett-Packard", "ProCurve") JUNIPER_DEVICES = ("Juniper", "JUNOS") LINUX_DEVICES = ("Linux", "Debian", "Ubuntu") SUPPORTED_DEVICES = HP_DEVICES + JUNIPER_DEVICES + LINUX_DEVICES ...
gpl-3.0
TEAM-Gummy/platform_external_chromium_org
chrome/common/extensions/docs/server2/features_bundle.py
23
4255
# 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. from compiled_file_system import Unicode from extensions_paths import ( API_FEATURES, JSON_TEMPLATES, MANIFEST_FEATURES, PERMISSION_FEATURES) import feat...
bsd-3-clause
royalharsh/grpc
src/python/grpcio_tests/tests/protoc_plugin/protos/payload/__init__.py
901
1528
# 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
sandeepsingh3/reveal_experimentation
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
2736
1804
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
mit
ConnorGBrewster/servo
tests/wpt/web-platform-tests/referrer-policy/generic/tools/generate.py
15
7360
#!/usr/bin/env python from __future__ import print_function import os, sys, json from common_paths import * import spec_validator import argparse def expand_test_expansion_pattern(spec_test_expansion, test_expansion_schema): expansion = {} for artifact in spec_test_expansion: artifact_value = spec_t...
mpl-2.0
aitoehigie/gidimagic
venv/lib/python2.7/site-packages/requests/packages/urllib3/util/request.py
780
2128
from __future__ import absolute_import from base64 import b64encode from ..packages.six import b ACCEPT_ENCODING = 'gzip,deflate' def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): """ Shortcuts for generatin...
mit
showerst/openstates
openstates/hi/__init__.py
1
3432
from billy.utils.fulltext import pdfdata_to_text, text_after_line_numbers from .bills import HIBillScraper from .legislators import HILegislatorScraper from .events import HIEventScraper settings = dict(SCRAPELIB_TIMEOUT=300) metadata = dict( name='Hawaii', abbreviation='hi', capitol_timezone='Pacific/Hon...
gpl-3.0
dinhkhanh/trac
trac/ticket/tests/wikisyntax.py
3
14175
# -*- coding: utf-8 -*- import unittest from trac.ticket.model import Ticket from trac.ticket.roadmap import Milestone from trac.wiki.tests import formatter TICKET_TEST_CASES = u""" ============================== ticket: link resolver ticket:1 ticket:12 ticket:abc ------------------------------ <p> <a class="new tic...
bsd-3-clause
dvliman/jaikuengine
.google_appengine/lib/django-1.2/tests/modeltests/m2m_intermediary/models.py
92
1086
""" 9. Many-to-many relationships via an intermediary table For many-to-many relationships that need extra fields on the intermediary table, use an intermediary model. In this example, an ``Article`` can have multiple ``Reporter`` objects, and each ``Article``-``Reporter`` combination (a ``Writer``) has a ``position`...
apache-2.0
iftekeriba/softlayer-python
SoftLayer/CLI/template.py
5
2069
""" SoftLayer.CLI.template ~~~~~~~~~~~~~~~~~~~~~~ Provides functions for loading/parsing and writing template files. Template files are used for storing CLI arguments in the form of a file to be used later with the --template option. :license: MIT, see LICENSE for more details. """ import os.pa...
mit
da1z/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_referrers.py
1
8753
import sys from _pydevd_bundle import pydevd_xml from os.path import basename import traceback try: from urllib import quote, quote_plus, unquote, unquote_plus except: from urllib.parse import quote, quote_plus, unquote, unquote_plus #@Reimport @UnresolvedImport #==============================================...
apache-2.0
ares/robottelo
tests/foreman/ui/test_setting.py
2
45901
# -*- encoding: utf-8 -*- """Test class for Setting Parameter values :Requirement: Setting :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: UI :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfactory import gen_email, gen_string, gen_url from random import choice, randint ...
gpl-3.0
jacknjzhou/neutron
neutron/tests/unit/agent/linux/test_ovsdb_monitor.py
14
3944
# Copyright 2013 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 # # Unless required by applicable law or agre...
apache-2.0
MontpellierRessourcesImagerie/openmicroscopy
components/tools/OmeroWeb/omeroweb/wsgi.py
12
1739
#!/usr/bin/env python # -*- coding: utf-8 -*- """ WSGI config for the OMERO.web project. Copyright 2014 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ """ This module contains the WSGI application used by Django's development server and any productio...
gpl-2.0
bigswitch/nova
nova/api/openstack/compute/schemas/floating_ips_bulk.py
93
1537
# Copyright 2014 IBM Corporation. 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 ...
apache-2.0
HybridF5/jacket
jacket/tests/compute/unit/virt/test_hardware.py
1
117764
# Copyright 2014 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 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
bigfatpaulyj/py-airfoil
scons-local-2.2.0/SCons/Tool/mssdk.py
14
1891
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # 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 ...
gpl-3.0
keflavich/APEX_CMZ_H2CO
reduction/calibration.py
1
7537
import numpy as np from astropy import log from pyspeckit.spectrum.readers import read_class from make_apex_cubes import all_apexfiles import os import paths import collections """ Calibrators can be IDd with: for ds in all_apexfiles: cl = read_class.ClassObject(ds) spdata = cl.get_spectra(line='CO(2-1)', ra...
bsd-3-clause
Razorsheep/kleinesonne
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
12124
# 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. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
agpl-3.0
ewbankkit/cloud-custodian
c7n/actions/securityhub.py
3
12857
# Copyright 2018 Capital One Services, 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 agreed to in...
apache-2.0
ar7z1/ansible
lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py
13
35970
#!/usr/bin/python # Copyright (c) 2016 Thomas Stringer, <tomstr@microsoft.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', ...
gpl-3.0
vrenaville/hr
__unported__/hr_policy_presence/hr_policy_presence.py
27
3008
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, eit...
agpl-3.0
fatherlinux/atomic-reactor
atomic_reactor/plugins/pre_check_and_set_rebuild.py
1
3466
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import json import os from osbs.api import OSBS from osbs.conf import Configuration from atomic_rea...
bsd-3-clause
jessehagberg/python-playground
ex3.py
1
1289
# This line prints out a string about counting chickens. print "I will now count my chickens:" # This line prints the string "Hens" concatenated with the value derived from dividing 30 by 6 and then adding 5. (which is 30) print "Hens", 25.0 + 30 / 6 # Prints Roosters although I do not understand how the result i...
cc0-1.0
adamtiger/tensorflow
tensorflow/python/keras/_impl/keras/engine/topology.py
6
54348
# 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
Peddle/hue
desktop/core/ext-py/Paste-2.0.1/paste/debug/wdg_validate.py
50
4268
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Middleware that tests the validity of all generated HTML using the `WDG HTML Validator <http://www.htmlhelp.com/tools/validator/>`_ """ from cStri...
apache-2.0
yordan-desta/QgisIns
python/plugins/GdalTools/tools/doDEM.py
1
8075
# -*- coding: utf-8 -*- """ *************************************************************************** doDEM.py --------------------- Date : March 2011 Copyright : (C) 2011 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com *********************...
gpl-2.0
codilime/cloudify-plugins-common
cloudify/tests/test_task_subgraph.py
3
7425
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
apache-2.0
pdufour/sqlalchemy
examples/dogpile_caching/local_session_caching.py
30
3372
"""local_session_caching.py Grok everything so far ? This example creates a new dogpile.cache backend that will persist data in a dictionary which is local to the current session. remove() the session and the cache is gone. Create a new Dogpile cache backend that will store cached data local to the current Sessio...
mit
gsobczyk/hamster
waflib/Tools/intltool.py
56
6784
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2018 (ita) """ Support for translation tools such as msgfmt and intltool Usage:: def configure(conf): conf.load('gnu_dirs intltool') def build(bld): # process the .po files into .gmo files, and install them in LOCALEDIR bld(features='intltool_po', ...
gpl-3.0
bioconda/recipes
recipes/biopet-extractadaptersfastqc/biopet-extractadaptersfastqc.py
61
3393
#!/usr/bin/env python # # Wrapper script for starting the biopet-extractadaptersfastqc JAR package # # This script is written for use with the Conda package manager and is copied # from the peptide-shaker wrapper. Only the parameters are changed. # (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/pepti...
mit
happy56/kivy
kivy/adapters/simplelistadapter.py
3
2135
''' SimpleListAdapter ================= .. versionadded:: 1.5 .. warning:: This code is still experimental, and its API is subject to change in a future version. :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is for basic lists, such as for showing a text-only display of strings, that have no u...
lgpl-3.0
nieklinnenbank/bouwer
test/test_util/test_Singleton.py
1
4375
# # Copyright (C) 2012 Niek Linnenbank # # 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 option) any later version. # # This program is distributed...
gpl-3.0
Ernesto99/odoo
openerp/tools/pdf_utils.py
456
3659
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
cbenhagen/buildozer
docs/source/conf.py
9
7963
# -*- coding: utf-8 -*- # # Buildozer documentation build configuration file, created by # sphinx-quickstart on Sun Apr 20 16:56:31 2014. # # 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. # # A...
mit
cclauss/heroku-buildpack-python
vendor/pip-pop/pip/_vendor/packaging/_structures.py
906
1809
# Copyright 2014 Donald Stufft # # 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, so...
mit
loco-odoo/localizacion_co
openerp/addons/account/report/account_treasury_report.py
385
3872
# -*- 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
Julius2342/pyvlx
pyvlx/api/frames/frame_discover_nodes.py
1
1711
"""Module for discover nodes requests.""" from pyvlx.const import Command, NodeType from .frame import FrameBase class FrameDiscoverNodesRequest(FrameBase): """Frame for discover nodes request.""" PAYLOAD_LEN = 1 def __init__(self, node_type=NodeType.NO_TYPE): """Init Frame.""" super()....
lgpl-3.0
andrecunha/coh-metrix-dementia
coh/scripts/process_fapesp.py
1
2828
# -*- coding: utf-8 -*- # Coh-Metrix-Dementia - Automatic text analysis and classification for dementia. # Copyright (C) 2014 Andre Luiz Verucci da Cunha # # 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 F...
gpl-3.0
rven/odoo
addons/mrp/models/stock_scrap.py
5
1540
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockScrap(models.Model): _inherit = 'stock.scrap' production_id = fields.Many2one( 'mrp.production', 'Manufacturing Order', states={'done': [('readon...
agpl-3.0
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/test/test_decorators.py
194
9849
import unittest from test import test_support def funcattrs(**kwds): def decorate(func): func.__dict__.update(kwds) return func return decorate class MiscDecorators (object): @staticmethod def author(name): def decorate(func): func.__dict__['author'] = name ...
gpl-3.0
Vogeltak/pauselan
lib/python3.4/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py
32
38566
# oracle/cx_oracle.py # Copyright (C) 2005-2015 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 """ .. dialect:: oracle+cx_oracle :name: cx-Oracle :dbapi: cx_oracle ...
gpl-2.0
pedrobaeza/odoo
addons/website_event_sale/controllers/main.py
54
2827
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
jswope00/GAI
common/djangoapps/student/management/commands/assigngroups.py
68
3033
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from student.models import UserTestGroup import random import sys import datetime import json from pytz import UTC def group_from_value(groups, v): ''' Given group: (('a',0.3),('b',0.4),('c',0.3)) And random value ...
agpl-3.0
PepperPD/edx-pepper-platform
common/djangoapps/track/views.py
10
5519
import json import logging import pytz import datetime import dateutil.parser from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import redirect from django.conf import settings from mitxmako.shortcuts import render_to_response from django_future.csrf ...
agpl-3.0
leiferikb/bitpop-private
chrome/test/functional/memory.py
79
5230
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import time import pyauto_functional # Must be imported before pyauto import pyauto import test_utils clas...
bsd-3-clause
GunnerJnr/_CodeInstitute
Stream-3/Full-Stack-Development/17.Create-A-Django-Based-Forum/6.Enable-Or-Disable-Site-Functionality/we_are_social/threads/models.py
11
1346
# -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils import timezone from tinymce.models import HTMLField # Create your models here. class Subject(models.Model): """ name: description: is a new field that comes packaged with django-tinymce. It enables...
mit
jnewland/home-assistant
homeassistant/auth/permissions/util.py
5
3442
"""Helpers to deal with permissions.""" from functools import wraps from typing import Callable, Dict, List, Optional, Union, cast # noqa: F401 from .const import SUBCAT_ALL from .models import PermissionLookup from .types import CategoryType, SubCategoryDict, ValueType LookupFunc = Callable[[PermissionLookup, SubC...
apache-2.0
hntrmrrs/capnproto
doc/_plugins/capnp_lexer.py
35
2103
#! /usr/bin/env python from pygments.lexer import RegexLexer from pygments.token import * class CapnpLexer(RegexLexer): name = "Cap'n Proto lexer" aliases = ['capnp'] filenames = ['*.capnp'] tokens = { 'root': [ (r'#.*?$', Comment.Single), (r'@[0-9a-zA-Z]*', Name.Decor...
mit
invisiblek/python-for-android
python3-alpha/python3-src/Lib/test/pystone.py
122
7381
#! /usr/bin/env python3 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ...
apache-2.0
chargrizzle/appengine-mapreduce
python/src/mapreduce/context.py
45
14669
#!/usr/bin/env python # # Copyright 2010 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 o...
apache-2.0
apyrgio/synnefo
snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py
6
3867
# Copyright (C) 2010-2014 GRNET S.A. # # 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 option) any later version. # # This program is distributed i...
gpl-3.0
etzhou/edx-platform
lms/djangoapps/courseware/tests/test_footer.py
57
2188
""" Tests related to the basic footer-switching based off SITE_NAME to ensure edx.org uses an edx footer but other instances use an Open edX footer. """ from nose.plugins.attrib import attr from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from openedx....
agpl-3.0
rlugojr/django
tests/auth_tests/test_checks.py
44
7996
from django.contrib.auth.checks import ( check_models_permissions, check_user_model, ) from django.contrib.auth.models import AbstractBaseUser from django.core import checks from django.db import models from django.test import ( SimpleTestCase, override_settings, override_system_checks, ) from django.test.utils...
bsd-3-clause
muff1nman/Vim
vim/eclim/autoload/eclim/python/rope/refactor/patchedast.py
29
24694
import collections import re import warnings from rope.base import ast, codeanalyze, exceptions def get_patched_ast(source, sorted_children=False): """Adds ``region`` and ``sorted_children`` fields to nodes Adds ``sorted_children`` field only if `sorted_children` is True. """ return patch_ast(ast.p...
mit
ruslanloman/nova
nova/api/openstack/compute/contrib/evacuate.py
61
4643
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
cernops/ceilometer
ceilometer/storage/hbase/utils.py
9
18195
# # 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 # distributed under...
apache-2.0
qupai/git-repo
subcmds/sync.py
4
28299
# # Copyright (C) 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 required by applicable la...
apache-2.0
facebookexperimental/eden
eden/hg-server/edenscm/hgext/hgevents/__init__.py
2
5889
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. """publishes state-enter and state-leave events to Watchman Extension that is responsible for publishing state-enter and state-leave events to Watchman...
gpl-2.0