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 |
|---|---|---|---|---|---|
tumbl3w33d/ansible | test/units/modules/network/cnos/test_cnos_banner.py | 52 | 2584 | # 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 in the hope that ... | gpl-3.0 |
Jokeren/neon | examples/whale_calls.py | 1 | 5226 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2016 Nervana Systems 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
#
# ... | apache-2.0 |
tsabi/Odoo-tsabi-fixes | addons/l10n_at/__init__.py | 438 | 1050 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) conexus.at
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... | agpl-3.0 |
Ernesto99/odoo | addons/google_calendar/google_calendar.py | 42 | 50788 | # -*- coding: utf-8 -*-
import operator
import simplejson
import urllib2
import openerp
from openerp import tools
from openerp import SUPERUSER_ID
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, exception_to_unicode
from openerp.tools.translate import _
from openerp.http import ... | agpl-3.0 |
polyval/CNC | flask/Lib/site-packages/setuptools/command/bdist_rpm.py | 1049 | 1508 | import distutils.command.bdist_rpm as orig
class bdist_rpm(orig.bdist_rpm):
"""
Override the default bdist_rpm behavior to do the following:
1. Run egg_info to ensure the name and version are properly calculated.
2. Always run 'install' using --single-version-externally-managed to
disable eggs... | apache-2.0 |
sysalexis/kbengine | kbe/res/scripts/common/Lib/lib2to3/pgen2/literals.py | 172 | 1615 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Safely evaluate Python string literals without using eval()."""
import re
simple_escapes = {"a": "\a",
"b": "\b",
"f": "\f",
"n": "\n",
... | lgpl-3.0 |
sedders123/phial | setup.py | 1 | 2487 | import codecs
import os
import re
import sys
from setuptools import setup # type: ignore
from setuptools.command.install import install # type: ignore
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts: str) -> str:
with codecs.open(os.path.join(here, *parts), "r") as fp:
return fp.read... | mit |
rcharp/toyota-flask | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py | 153 | 9905 | '''SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested wi... | apache-2.0 |
andrestr02/blender | doc_scenes/src/__init__.py | 3 | 3304 | # ***** BEGIN GPL LICENSE BLOCK *****
#
#
# 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 distribute... | gpl-2.0 |
abhilashnta/edx-platform | common/djangoapps/third_party_auth/migrations/0001_initial.py | 80 | 13932 | # -*- 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):
# Adding model 'OAuth2ProviderConfig'
db.create_table('third_party_auth_o... | agpl-3.0 |
balloob/home-assistant | homeassistant/components/hisense_aehw4a1/climate.py | 21 | 13381 | """Pyaehw4a1 platform to control of Hisense AEH-W4A1 Climate Devices."""
import logging
from pyaehw4a1.aehw4a1 import AehW4a1
import pyaehw4a1.exceptions
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
FAN_AUTO,
FAN_HIGH,
FAN_LOW,
FAN_ME... | apache-2.0 |
maurodoglio/taar | tests/test_similarityrecommender.py | 1 | 13442 | # 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 json
import six
import logging
import numpy as np
import scipy.stats
from taar.recommenders.lazys3 import LazyJS... | mpl-2.0 |
maxamillion/ansible-modules-extras | network/wakeonlan.py | 28 | 3882 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Dag Wieers <dag@wieers.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, ... | gpl-3.0 |
vipulkanade/EventbriteDjango | src_eventbrite_django/topthree/views.py | 1 | 2745 | from django.shortcuts import render, redirect
from django.template import Context
from django.template.loader import get_template
from django.http import HttpResponse
from datetime import datetime
from .forms import CategoriesForm
from .services import results
import os
# Home Template view which renders home.html
d... | mit |
ujjwalwahi/odoo | addons/hw_posbox_upgrade/__openerp__.py | 313 | 1696 | # -*- 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 |
gaqzi/ansible-modules-extras | system/lvg.py | 6 | 9642 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Alexander Bulimov <lazywolf0@gmail.com>
# based on lvol module by Jeroen Hoekx <jeroen.hoekx@dsquare.be>
#
# 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 p... | gpl-3.0 |
eirmag/weboob | modules/champslibres/backend.py | 1 | 2283 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2012 Florent Fourcot
#
# This file is part of weboob.
#
# weboob 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, either version 3 of the License, or
# (at yo... | agpl-3.0 |
fedorpatlin/ansible | lib/ansible/modules/cloud/cloudstack/cs_vmsnapshot.py | 62 | 9164 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# 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 |
sertac/django | tests/fixtures_model_package/tests.py | 312 | 2204 | from __future__ import unicode_literals
import warnings
from django.core import management
from django.test import TestCase
from .models import Article
class SampleTestCase(TestCase):
fixtures = ['fixture1.json', 'fixture2.json']
def testClassFixtures(self):
"Test cases can load fixture objects in... | bsd-3-clause |
gautamMalu/rootfs_xen_arndale | usr/lib/python2.7/DocXMLRPCServer.py | 250 | 10500 | """Self documenting XML-RPC Server.
This module can be used to create XML-RPC servers that
serve pydoc-style documentation in response to HTTP
GET requests. This documentation is dynamically generated
based on the functions and methods registered with the
server.
This module is built upon the pydoc and SimpleXMLRPCSe... | gpl-2.0 |
gpoo/pybliographer | Pyblio/GnomeUI/Fields.py | 2 | 15525 | # -*- coding: utf-8 -*-
# This file is part of pybliographer
#
# Copyright (C) 2018 Germán Poo-Caamaño <gpoo@gnome.org>
# Copyright (C) 1998-2004 Frederic GOBRY <gobry@pybliographer.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 |
Mattze96/youtube-dl | devscripts/make_supportedsites.py | 96 | 1149 | #!/usr/bin/env python
from __future__ import unicode_literals
import io
import optparse
import os
import sys
# Import youtube_dl
ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
sys.path.append(ROOT_DIR)
import youtube_dl
def main():
parser = optparse.OptionParser(usage='%prog OUTFILE.md')
options,... | unlicense |
happyboy310/keras | keras/datasets/imdb.py | 37 | 1855 | from __future__ import absolute_import
import six.moves.cPickle
import gzip
from .data_utils import get_file
import random
from six.moves import zip
import numpy as np
def load_data(path="imdb.pkl", nb_words=None, skip_top=0, maxlen=None, test_split=0.2, seed=113,
start_char=1, oov_char=2, index_from=3)... | mit |
forkbong/qutebrowser | qutebrowser/completion/completer.py | 1 | 12819 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 |
nxnfufunezn/qtile | libqtile/widget/she.py | 11 | 2194 | # Copyright (c) 2012, 2014 Tycho Andersen
# Copyright (c) 2012, 2014 Craig Barnes
#
# 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 right... | mit |
ikargis/horizon_fod | openstack_dashboard/openstack/common/rpc/common.py | 19 | 18918 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not... | apache-2.0 |
zzzeek/sqlalchemy | lib/sqlalchemy/ext/asyncio/scoping.py | 3 | 2847 | # ext/asyncio/scoping.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
from .session import AsyncSession
from ...orm.scoping import ScopedSessionMi... | mit |
lberruti/ansible | lib/ansible/runner/lookup_plugins/env.py | 154 | 1282 | # (c) 2012, Jan-Piet Mens <jpmens(at)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 later ver... | gpl-3.0 |
pimier15/PyGUI | Kivy/Kivy/Bk_Interractive/sample/Chapter_04_code/python3/09 - Style - decorating the interface/statusbar.py | 4 | 1072 | # File name: statusbar.py
import kivy
kivy.require('1.9.0')
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import NumericProperty, ObjectProperty
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.popup import Popup
from kivy.uix.label import Label
class StatusBar(ButtonBehavior, BoxLayout):... | mit |
jeffrudderman/VideoContribution | lib/apply.py | 2 | 8703 | import tornado.web
from lib import applydb
from lib import util
from datetime import datetime
import settings
from settings import global_data
from operator import itemgetter # For post-DB call sorting
class StaffHandler(tornado.web.RequestHandler):
def basic_auth(self, user, password):
for admin in settings.... | gpl-3.0 |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/contrib/admin/options.py | 66 | 84355 | import copy
import operator
import warnings
from collections import OrderedDict
from functools import partial, reduce, update_wrapper
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers, validation, widgets
from django.contrib.admin.che... | mit |
matthappens/taskqueue | taskqueue/venv_tq/lib/python2.7/site-packages/gevent/timeout.py | 15 | 6651 | # Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
"""Timeouts.
Many functions in :mod:`gevent` have a *timeout* argument that allows
to limit function's execution time. When that is not enough, the :class:`Timeout`
class and :func:`with_timeout` function in this module add timeouts
to arbitrary code.
... | mit |
munyirik/python | cpython/Lib/encodings/cp865.py | 272 | 34618 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP865.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | bsd-3-clause |
thefinn93/CouchPotatoServer | libs/pyutil/test/current/json_tests/test_recursion.py | 106 | 1686 | from unittest import TestCase
from pyutil import jsonutil as json
class JSONTestObject:
pass
class RecursiveJSONEncoder(json.JSONEncoder):
recurse = False
def default(self, o):
if o is JSONTestObject:
if self.recurse:
return [JSONTestObject]
else:
... | gpl-3.0 |
matmutant/sl4a | python/src/Lib/plat-irix6/IN.py | 66 | 8723 | # Generated by h2py from /usr/include/netinet/in.h
from warnings import warnpy3k
warnpy3k("the IN module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
# Included from standards.h
# Included from sgidefs.h
_MIPS_ISA_MIPS1 = 1
_MIPS_ISA_MIPS2 = 2
_MIPS_ISA_MIPS3 = 3
_MIPS_ISA_MIPS4 = 4
_MIPS_SIM_ABI32 = 1... | apache-2.0 |
bzero/statsmodels | statsmodels/sandbox/rls.py | 33 | 5179 | """Restricted least squares
from pandas
License: Simplified BSD
"""
from __future__ import print_function
import numpy as np
from statsmodels.regression.linear_model import WLS, GLS, RegressionResults
class RLS(GLS):
"""
Restricted general least squares model that handles linear constraints
Parameters
... | bsd-3-clause |
aavanian/bokeh | bokeh/util/tornado.py | 2 | 9503 | """ Internal utils related to Tornado
"""
from __future__ import absolute_import, print_function
import logging
import threading
from collections import defaultdict
log = logging.getLogger(__name__)
from traceback import format_exception
from tornado import gen
from ..util.serialization import make_id
from ..util ... | bsd-3-clause |
sexroute/commandergenius | project/jni/python/src/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py | 73 | 12423 | """Suite Standard Suite: Common terms that most applications should support
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'CoRe'
from StdSuites.Standard_Suite import *
class Standard_Suite_Even... | lgpl-2.1 |
moble/scri | scri/sample_waveforms.py | 1 | 31597 | # Copyright (c) 2015, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE>
import math
import numpy as np
import quaternion
import scri
import spherical_functions as sf
import warnings
def modes_constructor(constructor_statement, data_functor, **kwargs):
"""WaveformMo... | mit |
seppemans/businesstimedelta | businesstimedelta/rules/holidayrules.py | 1 | 2318 | import datetime
from .rule import Rule
from ..businesstimedelta import localize_unlocalized_dt
class HolidayRule(Rule):
def __init__(self, holidays, *args, **kwargs):
"""This rule represents a set of holidays.
Args:
holidays: a list with dates, or an object from the Holidays python mod... | mit |
googleapis/python-tasks | google/cloud/tasks_v2beta3/services/cloud_tasks/transports/grpc.py | 1 | 33575 | # -*- 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 |
arbrandes/edx-platform | common/lib/xmodule/xmodule/lti_module.py | 4 | 40193 | """
THIS MODULE IS DEPRECATED IN FAVOR OF https://github.com/edx/xblock-lti-consumer
Learning Tools Interoperability (LTI) module.
Resources
---------
Theoretical background and detailed specifications of LTI can be found on:
http://www.imsglobal.org/LTI/v1p1p1/ltiIMGv1p1p1.html
This module is based on the ve... | agpl-3.0 |
arbrandes/edx-platform | common/test/acceptance/pages/studio/library.py | 3 | 1456 | """
Library edit page in Studio
"""
from bok_choy.page_object import PageObject
from common.test.acceptance.pages.studio import BASE_URL
from common.test.acceptance.pages.studio.pagination import PaginatedMixin
from common.test.acceptance.pages.studio.users import UsersPageMixin
from common.test.acceptance.pages.stud... | agpl-3.0 |
telefonicaid/orchestrator | src/orchestrator/core/flow/LdapGroupHelper.py | 1 | 7131 | #
# Copyright 2018 Telefonica Espana
#
# This file is part of IoT orchestrator
#
# IoT orchestrator 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, either version 3 of the
# License, or (at your option)... | agpl-3.0 |
iambibhas/django | tests/validators/tests.py | 24 | 13647 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime, timedelta
import io
import os
import re
import types
from unittest import TestCase
from django.core.exceptions import ValidationError
from django.core.validators import (
BaseValidator, EmailValidator, MaxLengthValidato... | bsd-3-clause |
Benjamin-Marks/Steer-Clear-Backend | tests/api_tests/forms_tests.py | 4 | 3246 | from steerclear import app
from steerclear.forms import RideForm
import unittest, flask
"""
RideFormTestCase
----------------
Test class for the RideForm class
"""
class RideFormTestCase(unittest.TestCase):
"""
submit_form
-----------
helper method to submit a RideForm by faking
a request context.... | mit |
grpc/grpc | src/python/grpcio_tests/tests/unit/thread_pool.py | 13 | 1193 | # Copyright 2016 gRPC 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 writing... | apache-2.0 |
x303597316/hue | desktop/libs/hadoop/setup.py | 31 | 1375 | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | apache-2.0 |
ivandevp/django | tests/utils_tests/test_numberformat.py | 307 | 4049 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from decimal import Decimal
from sys import float_info
from unittest import TestCase
from django.utils.numberformat import format as nformat
class TestNumberFormat(TestCase):
def test_format_number(self):
self.assertEqual(nformat(1234, '... | bsd-3-clause |
dsemi/Flexget | flexget/tests/test_urlrewriting.py | 3 | 3790 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from flexget.plugin import get_plugin_by_name
class TestURLRewriters(object):
"""
Bad example, does things manually, you should use task.find_entry to check exista... | mit |
petteyg/intellij-community | python/helpers/profiler/thrift/server/TProcessPoolServer.py | 56 | 4058 | #
# 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 u... | apache-2.0 |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/stats/crv_types.py | 1 | 60777 | """
Continuous Random Variables - Prebuilt variables
Contains
========
Arcsin
Benini
Beta
BetaPrime
Cauchy
Chi
ChiNoncentral
ChiSquared
Dagum
Erlang
Exponential
FDistribution
FisherZ
Frechet
Gamma
GammaInverse
Kumaraswamy
Laplace
Logistic
LogNormal
Maxwell
Nakagami
Normal
Pareto
QuadraticU
RaisedCosine
Rayleigh
Studen... | gpl-3.0 |
ingadhoc/odoo-help | document_page_adhoc/wizard/document_page_show_diff.py | 5 | 1505 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp.osv import fields, osv
from openerp... | agpl-3.0 |
skg-net/ansible | test/units/modules/network/f5/test_bigip_profile_dns.py | 10 | 4948 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks 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
import os
import json
import pytest
import sys
from nose.plugins.skip i... | gpl-3.0 |
ProjectSWGCore/NGECore2 | scripts/mobiles/generic/faction/imperial/imp_scouttrooper_67.py | 2 | 1433 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from resources.datatables import FactionStatus
from java.util import Vector
def addTemplate(co... | lgpl-3.0 |
edxzw/edx-platform | common/djangoapps/student/management/tests/test_transfer_students.py | 122 | 6240 | """
Tests the transfer student management command
"""
from django.conf import settings
from mock import patch, call
from opaque_keys.edx import locator
import unittest
import ddt
from shoppingcart.models import Order, CertificateItem # pylint: disable=import-error
from course_modes.models import CourseMode
from stude... | agpl-3.0 |
sdopoku/flask-hello-world | venv/lib/python2.7/site-packages/werkzeug/routing.py | 116 | 64428 | # -*- coding: utf-8 -*-
"""
werkzeug.routing
~~~~~~~~~~~~~~~~
When it comes to combining multiple controller or view functions (however
you want to call them) you need a dispatcher. A simple way would be
applying regular expression tests on the ``PATH_INFO`` and calling
registered callback fun... | gpl-2.0 |
cmelange/ansible | lib/ansible/plugins/lookup/nested.py | 157 | 2100 | # (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... | gpl-3.0 |
Gagaro/django | django/conf/locale/fr/formats.py | 504 | 1454 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i'
DATETI... | bsd-3-clause |
Kast0rTr0y/ansible | lib/ansible/galaxy/role.py | 15 | 14352 | ########################################################################
#
# (C) 2015, Brian Coca <bcoca@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... | gpl-3.0 |
phaethon/scapy | kamene/scapypipes.py | 5 | 3565 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
from .pipetool import Source,Drain,Sink
from .config import conf
class SniffSource(Source):
"""Read packets from an... | gpl-2.0 |
rajadhva/servo | tests/wpt/web-platform-tests/tools/html5lib/html5lib/treewalkers/genshistream.py | 1730 | 2278 | from __future__ import absolute_import, division, unicode_literals
from genshi.core import QName
from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT
from . import _base
from ..constants import voidElements, namespaces
class ... | mpl-2.0 |
mattt416/neutron | neutron/db/dvr_mac_db.py | 21 | 8292 | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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... | apache-2.0 |
eternalthinker/flask-server-rq-example | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/dom.py | 559 | 8469 | from __future__ import absolute_import, division, unicode_literals
from xml.dom import minidom, Node
import weakref
from . import _base
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
def getDomBuilder(DomImplementation):
Dom = DomImplementation
class A... | apache-2.0 |
PyPlanet/PyPlanet | pyplanet/apps/core/maniaplanet/callbacks/ui.py | 1 | 1175 | from pyplanet.core import Controller
from pyplanet.core.events import Callback
async def handle_manialink_answer(source, signal, **kwargs):
_, player_login, action, raw_values = source
values = dict()
if isinstance(raw_values, list):
for val in raw_values:
values[val['Name']] = val['Value']
player = await Co... | gpl-3.0 |
openaid-IATI/OIPA | OIPA/currency_convert/imf_rate_parser.py | 1 | 7197 | import datetime
import time
from calendar import monthrange
from decimal import Decimal, InvalidOperation
from http import cookiejar
from urllib.error import URLError
import mechanicalsoup
from django.utils.encoding import smart_text
from lxml import etree
from currency_convert.models import MonthlyAverage
from iati_... | agpl-3.0 |
Lenchik13/Testing | fixture/session.py | 1 | 1412 | class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
wd = self.app.wd
self.app.open_home_page()
wd.find_element_by_name("user").click()
wd.find_element_by_name("user").clear()
wd.find_element_by_name("user").send_keys... | apache-2.0 |
simonwydooghe/ansible | lib/ansible/modules/cloud/vmware/_vmware_target_canonical_facts.py | 21 | 6428 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>
# Copyright: (c) 2018, 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
... | gpl-3.0 |
intelie/pycollector | src/helpers/cherrypy/_cpwsgi_server.py | 82 | 2836 | """WSGI server interface (see PEP 333). This adds some CP-specific bits to
the framework-agnostic wsgiserver package.
"""
import sys
import cherrypy
from cherrypy import wsgiserver
class CPWSGIServer(wsgiserver.CherryPyWSGIServer):
"""Wrapper for wsgiserver.CherryPyWSGIServer.
wsgiserver has been design... | bsd-3-clause |
search5/nanumlectures | lib/flask/debughelpers.py | 318 | 6024 | # -*- coding: utf-8 -*-
"""
flask.debughelpers
~~~~~~~~~~~~~~~~~~
Various helpers to make the development experience better.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from ._compat import implements_to_string, text_type
from .app import Flask
from .bl... | apache-2.0 |
cboling/SDNdbg | docs/old-stuff/pydzcvr/doc/neutron/tests/unit/services/metering/drivers/test_iptables_driver.py | 14 | 18005 | # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# 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 applicabl... | apache-2.0 |
ychfan/tensorflow | tensorflow/contrib/keras/api/keras/preprocessing/sequence/__init__.py | 70 | 1166 | # 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 |
indevgr/django | tests/lookup/tests.py | 27 | 38241 | from __future__ import unicode_literals
import collections
from datetime import datetime
from operator import attrgetter
from unittest import skipUnless
from django.core.exceptions import FieldError
from django.db import connection
from django.test import (
TestCase, TransactionTestCase, ignore_warnings, skipUnle... | bsd-3-clause |
sobhe/hazm | hazm/BijankhanReader.py | 2 | 2163 | # coding: utf-8
from __future__ import unicode_literals
import re, codecs
from .Normalizer import *
from .PeykareReader import join_verb_parts
default_pos_map = {'ADJ': 'ADJ', 'ADJ_CMPR': 'ADJ', 'ADJ_INO': 'ADJ', 'ADJ_ORD': 'ADJ', 'ADJ_SIM': 'ADJ', 'ADJ_SUP': 'ADJ', 'ADV': 'ADV', 'ADV_EXM': 'ADV', 'ADV_I': 'ADV', 'AD... | mit |
drorlab/dabble | test/arrestin_po4_cyp/test_arrestin_cyp.py | 1 | 2792 | # Tests covalently bonded ligand
import os
dir = os.path.dirname(__file__) + "/"
#==============================================================================
def test_covalent_ligand_patches(tmpdir):
"""
Tests covalently bound ligand parameterization with the graph. One
hydrogen atom should be renamed... | gpl-2.0 |
kerimlcr/ab2017-dpyo | ornek/lollypop/lollypop-0.9.229/src/widgets_info.py | 1 | 11112 | # Copyright (c) 2014-2016 Cedric Bellegarde <cedric.bellegarde@adishatz.org>
# 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 vers... | gpl-3.0 |
pedrobaeza/odoo | addons/account/__openerp__.py | 33 | 7683 | # -*- 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 |
tesidroni/mp | Lib/site-packages/scipy/linalg/tests/test_fblas.py | 61 | 17299 | # Test interfaces to fortran blas.
#
# The tests are more of interface than they are of the underlying blas.
# Only very small matrices checked -- N=3 or so.
#
# !! Complex calculations really aren't checked that carefully.
# !! Only real valued complex numbers are used in tests.
from numpy import float32, float64, co... | gpl-3.0 |
mct/soma | pier14/opc-client/effects/colorwave.py | 2 | 1314 | import math
import random
import numpy as np
from util import hsvColorAdd, jitter, colorJitter
from effectlayer import EffectLayer
from colorsys import hsv_to_rgb, rgb_to_hsv
CENTER_FREQ = 0.6 #Hz
def mutateColor(color, hue_jitter=0.1, sat_jitter=0.5, val_jitter=0.5):
return hsvColorAdd(color, colorJitter(hue_ji... | apache-2.0 |
MebiusHKU/flask-web | flask/lib/python2.7/site-packages/sqlalchemy/ext/declarative/clsregistry.py | 48 | 10754 | # ext/declarative/clsregistry.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
"""Routines to handle the string class registry used by declarative.
... | bsd-3-clause |
izzaeroth/FunkNA-KERNEL | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
msfrank/mandelbrot | test/test_check_systemcpu.py | 1 | 3909 | import bootstrap
import unittest
import unittest.mock
import cifparser
import collections
from mandelbrot.model.evaluation import *
MockCPUtimes = collections.namedtuple('MockCPUTimes', [
"user", "system", "idle", "nice", "iowait", "irq", "softirq", "steal", "guest", "guest_nice" ])
class TestSystemCPU(unittes... | gpl-3.0 |
jlmadurga/listenclosely | listenclosely/managers.py | 1 | 1139 | from django.db import models
class StateManager(models.Manager):
"""For searching/creating State Chats only."""
def get_queryset(self):
return super(StateManager, self).get_queryset().filter(
state=self.state_filter)
def get_or_create(self, **kwargs):
return self.get_queryset... | bsd-3-clause |
travisreed-wf/PyGithub | github/Tag.py | 74 | 3556 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 |
project-magpie/enigma2-openpli | lib/python/Components/MediaPlayer.py | 6 | 3530 | from MenuList import MenuList
from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename
from os import path
from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter
from Tools.LoadPixmap import LoadPixmap
STATE_PLAY = 0
STATE_PAUSE = 1
STATE_STOP = 2
STATE_REWIND = 3
STATE_FORW... | gpl-2.0 |
katsikas/gnuradio | grc/gui/FlowGraph.py | 16 | 19013 | """
Copyright 2007-2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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 l... | gpl-3.0 |
sergio-incaser/odoo | addons/email_template/tests/test_ir_actions.py | 382 | 2587 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
argivaitv/argivaitv | repo/plugin.video.phstreams/resources/lib/sources/wmonline_mv.py | 7 | 3857 | # -*- coding: utf-8 -*-
'''
Genesis Add-on
Copyright (C) 2015 lambda
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 ... | gpl-2.0 |
jcadduono/nethunter_kernel_noblelte | tools/perf/python/twatch.py | 7370 | 1334 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 |
mhharsh/stackalytics | stackalytics/dashboard/helpers.py | 1 | 10814 | # Copyright (c) 2013 Mirantis 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 writi... | apache-2.0 |
uniteddiversity/mediadrop | mediadrop/lib/auth/middleware.py | 10 | 6343 | # This file is a part of MediaDrop (http://www.mediadrop.net),
# Copyright 2009-2015 MediaDrop contributors
# For the exact contribution history, see the git revision log.
# The source code contained in this file is licensed under the GPLv3 or
# (at your option) any later version.
# See LICENSE.txt in the main project ... | gpl-3.0 |
mbiciunas/libnix | src/libnix/raw/procfs/process/proc_statm.py | 1 | 2796 | """
LibNix
Copyright (C) 2017 Mark Biciunas
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 in th... | gpl-3.0 |
bcheung92/Paperproject | gem5/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py | 91 | 3311 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | mit |
nferch/acd_cli | acdcli/api/backoff_req.py | 1 | 5073 | import time
from time import sleep
import random
import logging
from threading import Lock, local
from .common import *
logger = logging.getLogger(__name__)
CONN_TIMEOUT = 30
"""timeout for establishing a connection"""
IDLE_TIMEOUT = 60
"""read timeout"""
REQUESTS_TIMEOUT = (CONN_TIMEOUT, IDLE_TIMEOUT) if requests._... | gpl-2.0 |
heldergg/dre | dre_django/dreapp/forms.py | 1 | 3189 | # -*- coding: utf-8 -*-
"""Project forms"""
# Global imports:
from django import forms
# Local imports:
from models import Document
from tagsapp.models import Tag
class DateInput(forms.widgets.TextInput):
'''This widget uses the <input type="date" ... > from html5
'''
input_type = 'date'
class QueryFor... | gpl-3.0 |
marty331/jakesclock | flask/lib/python2.7/site-packages/werkzeug/contrib/lint.py | 295 | 12282 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.lint
~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.5
This module provides a middleware that performs sanity checks of the WSGI
application. It checks that :pep:`333` is properly implemented and warns
on some common HTTP errors such as non-empty respons... | gpl-2.0 |
jmickle66666666/omgifol | six.py | 2715 | 30098 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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 with... | mit |
sebastien/wwwclient | src/wwwclient/agents.py | 1 | 378656 | import random
DATA={
"Chrome": {
"5.0.363.0": [
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.3 (KHTML, like Gecko) Chrome/5.0.363.0 Safari/533.3"
],
"2.0.172.39": [
"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.39 Safari/5... | lgpl-3.0 |
sstrigger/Sick-Beard | lib/hachoir_metadata/jpeg.py | 90 | 10836 | from lib.hachoir_metadata.metadata import RootMetadata, registerExtractor
from lib.hachoir_metadata.image import computeComprRate
from lib.hachoir_parser.image.exif import ExifEntry
from lib.hachoir_parser.image.jpeg import (
JpegFile, JpegChunk,
QUALITY_HASH_COLOR, QUALITY_SUM_COLOR,
QUALITY_HASH_GRAY, QUA... | gpl-3.0 |
mitchelljkotler/django | django/utils/autoreload.py | 115 | 10642 | # Autoreloading launcher.
# Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org).
# Some taken from Ian Bicking's Paste (http://pythonpaste.org/).
#
# Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with ... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.