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
chirilo/mozillians
mozillians/users/admin.py
7
18269
from socket import error as socket_error from django import forms from django.conf import settings from django.conf.urls import patterns, url from django.contrib import admin from django.contrib import messages from django.contrib.admin import SimpleListFilter from django.contrib.auth.admin import GroupAdmin, UserAdmi...
bsd-3-clause
davidam/python-examples
pandas/pandas-dataframe.py
1
1157
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org> # Maintainer: David Arroyo Menéndez <davidam@gnu.org> # This file 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
gkarlin/django-jenkins
build/Django/django/contrib/flatpages/tests/views.py
24
5576
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings @override_settings( LOGIN_URL='/accounts/login/', MIDDLEWARE_CLASSES=( 'django.mi...
lgpl-3.0
patrickwind/My_Blog
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/sanitizer.py
805
16428
from __future__ import absolute_import, division, unicode_literals import re from xml.sax.saxutils import escape, unescape from .tokenizer import HTMLTokenizer from .constants import tokenTypes class HTMLSanitizerMixin(object): """ sanitization of XHTML+MathML+SVG and of inline style attributes.""" accepta...
gpl-2.0
ryandougherty/mwa-capstone
MWA_Tools/build/matplotlib/examples/mplot3d/lorenz_attractor.py
3
1243
# Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic # Nonperiodic Flow" publication. # http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 # # Note: Because this is a simple non-linear ODE, it would be more easily # done using SciPy's ode solver, bu...
gpl-2.0
rschnapka/account-invoicing
account_invoice_zero/__openerp__.py
1
1926
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
agpl-3.0
manz/python-mapnik
test/python_tests/box2d_test.py
1
4019
#!/usr/bin/env python # -*- coding: utf-8 -*- from nose.tools import eq_,assert_true,assert_almost_equal,assert_false from .utilities import run_all import mapnik def test_coord_init(): c = mapnik.Coord(100, 100) eq_(c.x, 100) eq_(c.y, 100) def test_coord_multiplication(): c = mapnik.Coord(100, 100)...
lgpl-2.1
gymnasium/edx-platform
openedx/core/djangoapps/api_admin/models.py
13
8550
"""Models for API management.""" import logging from smtplib import SMTPException from urlparse import urlunsplit from config_models.models import ConfigurationModel from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.mail import se...
agpl-3.0
KohlsTechnology/ansible
test/units/modules/network/f5/test_bigip_device_sshd.py
27
3859
# -*- 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 sys from nose.plugins.skip import SkipTest i...
gpl-3.0
jhamrick/nbflow
nbflow/extractor.py
1
2561
from __future__ import print_function import os import glob import json import sys from nbformat.v4 import reads from traitlets.config import Application, Unicode from ._version import __version__ class DependencyExtractor(Application): name = 'nbflow' description = 'Extract the hierarchy of dependencies f...
bsd-3-clause
gunthercox/ChatterBot
tests/logic/test_mathematical_evaluation.py
2
4970
from tests.base_case import ChatBotTestCase from chatterbot.logic import MathematicalEvaluation from chatterbot.conversation import Statement class MathematicalEvaluationTests(ChatBotTestCase): def setUp(self): super().setUp() self.adapter = MathematicalEvaluation(self.chatbot) def test_can_...
bsd-3-clause
ojengwa/oh-mainline
vendor/packages/whoosh/src/whoosh/ramindex.py
17
13276
# Copyright 2011 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
agpl-3.0
chadnickbok/npm
node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
1825
17014
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
artistic-2.0
mkieszek/jobsplus
jobsplus_recruitment/__openerp__.py
1
2865
# -*- 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
ledtvavs/repository.ledtv
script.tvguide.Vader/unidecode/x06d.py
252
4651
data = ( 'Zhou ', # 0x00 'Ji ', # 0x01 'Yi ', # 0x02 'Hui ', # 0x03 'Hui ', # 0x04 'Zui ', # 0x05 'Cheng ', # 0x06 'Yin ', # 0x07 'Wei ', # 0x08 'Hou ', # 0x09 'Jian ', # 0x0a 'Yang ', # 0x0b 'Lie ', # 0x0c 'Si ', # 0x0d 'Ji ', # 0x0e 'Er ', # 0x0f 'Xing ', # 0x10 'Fu ...
gpl-3.0
kidaa30/spacewalk
backend/server/rhnServer/server_token.py
2
37190
# # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
halvorlu/rbtools
rbtools/clients/svn.py
1
38973
from __future__ import unicode_literals import logging import os import posixpath import re import sys from xml.etree import ElementTree import six from six.moves.urllib.parse import unquote from rbtools.api.errors import APIError from rbtools.clients import PatchResult, RepositoryInfo, SCMClient from rbtools.client...
mit
nmittler/grpc
src/python/src/grpc/framework/assembly/utilities.py
3
6990
# 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
rgayon/plaso
tests/parsers/java_idx.py
1
3487
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for Java Cache IDX file parser.""" from __future__ import unicode_literals import unittest from plaso.lib import definitions from plaso.parsers import java_idx from tests.parsers import test_lib class IDXTest(test_lib.ParserTestCase): """Tests for Java Cac...
apache-2.0
Tranzystorek/servo
tests/wpt/web-platform-tests/cors/resources/preflight.py
253
1238
def main(request, response): headers = [("Content-Type", "text/plain")] if "check" in request.GET: token = request.GET.first("token") value = request.server.stash.take(token) if value == None: body = "0" else: if request.GET.first("check", None) == "keep"...
mpl-2.0
undystopia/libjournal
libjournal/libj_json.py
2
2692
import json import datetime class libJournal: def __init__(self): self.json_location = '' def get_date(self): now = datetime.datetime.now() libj_date = (now.strftime("%Y-%m-%d")) return libj_date def get_time(self): now = datetime.datetime.now() libj_time ...
gpl-3.0
crasu/feedingit
src/feedingitdbus.py
1
2069
#!/usr/bin/env python2.5 # # Copyright (c) 2007-2008 INdT. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
gpl-3.0
lmazuel/azure-sdk-for-python
azure-eventgrid/azure_bdist_wheel.py
241
21096
""" "wheel" copyright (c) 2012-2017 Daniel Holth <dholth@fastmail.fm> and contributors. The MIT License 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 limi...
mit
nttks/edx-platform
biz/djangoapps/ga_organization/models.py
1
2471
""" Models for organization feature """ from django.contrib.auth.models import User from django.db import models class Organization(models.Model): """ Organization model. """ org_name = models.CharField(max_length=255) org_code = models.CharField(max_length=64) creator_org = models.ForeignKey(...
agpl-3.0
MegaPirateNG/ardupilot-mpng
Tools/autotest/dump_logs.py
8
2015
#!/usr/bin/env python # dump flash logs from SITL # Andrew Tridgell, April 2013 import pexpect, os, sys, shutil, atexit import optparse, fnmatch, time, glob, traceback, signal sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pysim')) sys.path.insert(0, os.path.join(os.path.dirname(os.path...
gpl-3.0
miltonruelas/cursotecnico
branch/procurement_supply/procurement.py
1
2165
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the ...
agpl-3.0
rodrigoazs/cronus-automata
db/mob_branch.py
1
10614
database.set(0, 'Escorpião') database.set(1001, 'Escorpião') database.set(1002, 'Poring') database.set(1004, 'Zangão') database.set(1005, 'Familiar') database.set(1007, 'Fabre') database.set(1008, 'Pupa') database.set(1009, 'Condor') database.set(1010, 'Salgueiro') database.set(1011, 'ChonChon') database.set(1012, 'Sap...
mit
corvorepack/REPOIVAN
plugin.video.movie.ultra.7k/resources/lib/unwise.py
9
22641
# -*- coding: utf-8 -*- #-------------------------------------------------------- # creado por quequeQ para PalcoTV # (http://forum.rojadirecta.es/member.php?1370946-quequeQ) # (http://xbmcspain.com/foro/miembro/quequino/) # Version 0.0.1 (26.10.2014) #-------------------------------------------------------- # License...
gpl-2.0
huangkebo/zulip
api/integrations/asana/zulip_asana_config.py
124
2157
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Zulip, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
apache-2.0
d40223223/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/xml/sax/_exceptions.py
625
4885
"""Different kinds of SAX Exceptions""" #in brython the 4 lines below causes an $globals['Exception'] error #import sys #if sys.platform[:4] == "java": # from java.lang import Exception #del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can con...
gpl-3.0
chenziliang/google
Splunk_TA_google/bin/splunktalib/data_loader_mgr.py
1
5038
""" Data Loader main entry point """ import Queue import os.path as op import ConfigParser from splunktalib.common import log logger = log.Logs().get_logger("util") import splunktalib.concurrent.concurrent_executor as ce import splunktalib.timer_queue as tq import splunktalib.schedule.job as sjob import splunktalib...
mit
ProjectBabbler/ebird-api
src/ebird/api/observations.py
1
24188
# pylint: disable=R0913,R0914 """Functions for fetching information about what species have been seen.""" from ebird.api.utils import call from ebird.api.validation import ( clean_areas, clean_back, clean_categories, clean_detail, clean_dist, clean_hotspot, clean_lat, clean_lng, cl...
mit
ToiDenGaAli/odoo
openerp/service/model.py
40
8519
# -*- coding: utf-8 -*- from functools import wraps import logging from psycopg2 import IntegrityError, OperationalError, errorcodes import random import threading import time import openerp from openerp.exceptions import UserError, ValidationError, QWebException from openerp.tools.translate import translate from ope...
gpl-3.0
chenc10/Spark-PAF
dist/ec2/lib/boto-2.34.0/boto/beanstalk/exception.py
153
2131
import sys from boto.compat import json from boto.exception import BotoServerError def simple(e): code = e.code if code.endswith('Exception'): code = code.rstrip('Exception') try: # Dynamically get the error class. simple_e = getattr(sys.modules[__name__], code)(e) except Att...
apache-2.0
yipenggao/moose
python/TestHarness/testers/ImageDiff.py
3
2914
from FileTester import FileTester import os import sys from mooseutils.ImageDiffer import ImageDiffer class ImageDiff(FileTester): @staticmethod def validParams(): params = FileTester.validParams() params.addRequiredParam('imagediff', [], 'A list of files to compare against the gold.') ...
lgpl-2.1
al1221/ghost-openshift
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/__init__.py
194
7698
# -*- coding: utf-8 -*- """ pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import types import fnmatch from os.path import basename from pygments.lexers._mapping import LEX...
mit
treejames/APE_Server
deps/js/src/tests/tests.py
8
5631
# Library for JSTest tests. # # This contains classes that represent an individual test, including # metadata, and know how to run the tests and determine failures. import datetime, os, re, sys, time from subprocess import * from threading import * def do_run_cmd(cmd): l = [ None, None ] th_run_cmd(cmd, l) ...
gpl-2.0
gentledevil/ansible
lib/ansible/plugins/action/patch.py
67
2387
# (c) 2015, Brian Coca <briancoca+dev@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 v...
gpl-3.0
kouk/boto
tests/unit/rds2/test_connection.py
122
8806
#!/usr/bin/env python # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
darcy0511/Dato-Core
src/unity/python/graphlab_util/__init__.py
13
2119
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the DATO-PYTHON-LICENSE file for details. ''' # 1st set up logging __all__ = ['psutil'] import logging from logging.handlers import TimedRotatingFileHandler import logging.config...
agpl-3.0
rh-s/heat
heat/tests/api/test_wsgi.py
3
19468
# # Copyright 2010-2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
mkhutornenko/incubator-aurora
src/main/python/apache/aurora/config/loader.py
1
2341
# # 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
piyushroshan/xen-4.3.2
tools/python/xen/xend/XendError.py
21
8342
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
alexlo03/ansible
lib/ansible/modules/remote_management/oneview/oneview_ethernet_network.py
147
8911
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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
srajag/nova
nova/tests/conductor/test_conductor.py
3
94276
# Copyright 2012 IBM Corp. # 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 r...
apache-2.0
ankurankan/scikit-learn
examples/hetero_feature_union.py
288
6236
""" ============================================= Feature Union with Heterogeneous Data Sources ============================================= Datasets can often contain components of that require different feature extraction and processing pipelines. This scenario might occur when: 1. Your dataset consists of hetero...
bsd-3-clause
yfried/ansible
lib/ansible/modules/cloud/opennebula/one_service.py
27
25622
#!/usr/bin/python # -*- coding: utf-8 -*- # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type """ (c) 2017, Milan Ilic <milani@nordeus.com> This file is part of Ansible Ansible is free software: you can redistribute it and/or modify it under the ter...
gpl-3.0
pankeshang/django-allauth
allauth/tests.py
38
5028
# -*- coding: utf-8 -*- from __future__ import unicode_literals import requests from datetime import datetime, date import django from django.test import TestCase from django.db import models from . import utils class MockedResponse(object): def __init__(self, status_code, content, headers=None): if he...
mit
MarcosCommunity/odoo
marcos_addons/marcos_stock/wizard/stock_invoice_onshipping.py
3
1456
# -*- 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
neerajvashistha/pa-dude
lib/python2.7/site-packages/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
2360
3778
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, host...
mit
amith01994/intellij-community
python/helpers/pydev/tests_python/test_pydev_monkey.py
41
1122
import unittest import pydev_monkey import sys from pydevd import SetupHolder from pydev_monkey import pydev_src_dir class TestCase(unittest.TestCase): def test_monkey(self): original = SetupHolder.setup try: SetupHolder.setup = {'client':'127.0.0.1', 'port': '0'} ...
apache-2.0
nickraptis/fidibot
src/examples/testbot.py
2
3563
#! /usr/bin/env python # # Example program using irc.bot. # # Joel Rosdahl <joel@rosdahl.net> """A simple example bot. This is an example bot that uses the SingleServerIRCBot class from irc.bot. The bot enters a channel and listens for commands in private messages and channel traffic. Commands in channel messages a...
bsd-2-clause
bhodorog/pytest-vts
tests/test_self_versioning.py
1
1296
import shlex import subprocess import pytest import pkg_resources import pytest_vts @pytest.fixture def git_describe(): cmd = shlex.split("git describe --tags --long --match='v*'") proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc.co...
mit
isaacyeaton/pyadisi
pyadisi/pyqtgraph/widgets/SpinBox.py
5
19955
# -*- coding: utf-8 -*- from ..Qt import QtGui, QtCore from ..python2_3 import asUnicode from ..SignalProxy import SignalProxy from .. import functions as fn from math import log from decimal import Decimal as D ## Use decimal to avoid accumulating floating-point errors from decimal import * import weakref __all__ =...
bsd-3-clause
Shedino/SherpaHighLevel
catkin_ws/src/casy_rover/mavlink/pymavlink/setup.py
1
3759
from distutils.core import setup, Extension import glob, os, shutil version = '1.1.27' from generator import mavgen, mavparse # path to message_definitions directory mdef_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'message_definitions') dialects_path = os.path.join(os.path.dirname(os.path...
bsd-3-clause
tim777z/opencog
opencog/python/pln_old/rules/quantifier_rules.py
32
8630
from opencog.atomspace import types, TruthValue import formulas from pln.rule import Rule # Using 3rd-order probabilities, you can evaluate the other quantifiers. #AverageLink t: F(t) #ForAll x: F(x) # But it's simpler to calculate the average. This could be done # generally for every atom structure. You just revise ...
agpl-3.0
FescueFungiShare/hydroshare
hs_app_netCDF/models.py
1
12687
import json from django.db import models from django.core.exceptions import ValidationError from django.contrib.contenttypes.fields import GenericRelation from mezzanine.pages.page_processors import processor_for from hs_core.models import BaseResource, ResourceManager from hs_core.models import resource_processor, ...
bsd-3-clause
KaiRo-at/socorro
socorro/unittest/external/postgresql/test_bugs.py
2
5194
# 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/. from nose.tools import eq_, ok_, assert_raises from socorrolib.lib import MissingArgumentError from socorro.external.po...
mpl-2.0
tedelhourani/ansible
test/sanity/validate-modules/schema.py
32
5632
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
gpl-3.0
zaccoz/odoo
addons/website_mail/__openerp__.py
379
1623
# -*- 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
Belxjander/Kirito
Python-3.5.0-main/Lib/lib2to3/pytree.py
30
28052
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """ Python parse tree definitions. This is a very concrete parse tree; we need to keep every token and even the comments and whitespace between tokens. There's also a pattern matching implementation here. """ __autho...
gpl-3.0
teemulehtinen/a-plus
course/migrations/0001_initial.py
2
2896
# -*- coding: utf-8 -*- from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('userprofile', '0001_initial'), ] operations = [ migrations.CreateModel( name='Course', fields=[ ...
gpl-3.0
Incubaid/arakoon
extension/server/NurseryManagement.py
1
4021
""" Copyright (2010-2014) INCUBAID BVBA 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...
apache-2.0
poliva/pyqtggpo
ggpo/common/copyright.py
1
1137
# -*- coding: utf-8 -*- # define authorship information __authors__ = ['papasi', ' pof'] __author__ = ','.join(__authors__) __url__ = 'https://github.com/poliva/pyqtggpo' __credits__ = [ ('papasi', 'https://github.com/doctorguile/pyqtggpo'), ('Tony Cannon (Ponder), Tom Cannon (ProtomCannon)', 'http:/...
gpl-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/opsworks/__init__.py
135
1657
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
mit
adborden/python-oauth2
example/client.py
375
6700
""" The MIT License Copyright (c) 2007 Leah Culver 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, publis...
mit
beacloudgenius/edx-platform
common/djangoapps/embargo/api.py
13
5745
""" The Python API layer of the country access settings. Essentially the middle tier of the project, responsible for all business logic that is not directly tied to the data itself. This API is exposed via the middleware(emabargo/middileware.py) layer but may be used directly in-process. """ import logging import pyg...
agpl-3.0
kastriothaliti/techstitution
venv/lib/python3.5/site-packages/setuptools/command/rotate.py
389
2164
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os import shutil from setuptools.extern import six from setuptools import Command class rotate(Command): """Delete older distributions""" description = "delete older distributions, kee...
gpl-3.0
vdrhtc/Measurement-automation
scripts/photon_wave_mixing/sa_measurements.py
1
4821
from dataclasses import dataclass from tqdm.notebook import tqdm import os import pickle import lib.plotting as plt2 import numpy as np @dataclass class ParametersSA: center_frequency: float span: float r_bandwidth: float v_bandwidth: float number_of_points: int = 1001 averages: int = 1 d...
gpl-3.0
cesargtz/YecoraOdoo
addons/account_asset/wizard/__init__.py
445
1122
# -*- encoding: 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 t...
agpl-3.0
lmazuel/azure-sdk-for-python
azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/models/check_name_availability_result.py
2
1915
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
srio/shadow3-scripts
COMSOL/test1.py
1
2706
# https://numerical-analysis.readthedocs.io/en/latest/Interpolation/2D_Interpolation.html # Setup # %matplotlib inline import numpy as np import matplotlib.pyplot as plt import matplotlib params = {'font.size' : 14, 'figure.figsize':(15.0, 8.0), 'lines.linewidth': 2., 'lines.marke...
mit
onitake/ansible
lib/ansible/modules/cloud/rackspace/rax_cdb_database.py
102
4470
#!/usr/bin/python # Copyright: 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', 'status': ['preview'], ...
gpl-3.0
abgworrall/test-infra
gubernator/github_auth.py
5
5142
# Copyright 2016 The Kubernetes 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 ...
apache-2.0
akbargumbira/inasafe
safe/report/extractors/impact_table.py
2
3228
# coding=utf-8 """Module used to generate context for impact table report. This is useful to do layouting. """ from __future__ import absolute_import from safe.common.utilities import safe_dir from safe.report.extractors.composer import QGISComposerContext from safe.report.extractors.util import ( jinja2_output_a...
gpl-3.0
ovnicraft/openerp-restaurant
survey/test/test_survey.py
188
1403
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2014-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
freakboy3742/django
tests/model_fields/test_datetimefield.py
19
3284
import datetime from django.db import models from django.test import ( SimpleTestCase, TestCase, override_settings, skipUnlessDBFeature, ) from django.test.utils import requires_tz_support from django.utils import timezone from .models import DateTimeModel class DateTimeFieldTests(TestCase): def test_datet...
bsd-3-clause
SpectraLogic/samba
source4/lib/wmi/wmi.py
91
3795
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. import _wmi import new new_instancemethod = new.instancemethod try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def...
gpl-3.0
TkkrLab/py-artnet
Ledart/DeviceInterfaces.py
2
1680
""" implementations of device abstractions like networking (sockets) or theoretically serial or any other way for communicating with your led/lighting devices. """ import socket import select import numpy class TcpSocket(object): """ Future definition. place holder to save idea. """ def __init__(self...
gpl-3.0
mfherbst/spack
var/spack/repos/builtin/packages/r-prabclus/package.py
5
1787
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
lgautier/notedown
tests.py
1
9924
from __future__ import absolute_import from __future__ import print_function import os import nose.tools as nt import IPython.nbformat as nbformat import notedown simple_backtick = """ ``` code1 space_indent more code ``` text1 `` ``` code2 tab_indent ~~~ ``` text2""" simple_tilde = """ ~~~ code1 spa...
bsd-2-clause
PeterDaveHello/eden
languages/pt-br.py
9
271349
# -*- coding: utf-8 -*- { "'Cancel' will indicate an asset log entry did not occur": "'cancelar' irá indicar que a entrada de log de ativo não ocorreu", "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a bou...
mit
Shedino/SherpaHighLevel
catkin_ws/src/casy_rover/mavlink/pymavlink/generator/lib/genxmlif/xmlifMinidom.py
79
8493
# # genxmlif, Release 0.9.0 # file: xmlifMinidom.py # # XML interface class to Python standard minidom # # history: # 2005-04-25 rl created # 2007-07-02 rl complete re-design, internal wrapper # for DOM trees and elements introduced # 2008-07-01 rl Limited support of XInclude added # ...
bsd-3-clause
GodBlessPP/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/site-packages/turtle.py
619
105984
import math from javascript import console from browser import document, html import _svg _CFG = {"width" : 0.5, # Screen "height" : 0.75, "canvwidth" : 400, "canvheight": 300, "leftright": None, "topbottom": None, "mode": "standard", # TurtleScre...
gpl-3.0
live-clones/netgen
python/read_gmsh.py
1
8473
from netgen.meshing import * def ReadGmsh(filename): if not filename.endswith(".msh"): filename += ".msh" meshdim = 1 with open(filename, 'r') as f: while f.readline().split()[0] != "$Elements": pass nelem = int(f.readline()) for i in range(nelem): li...
lgpl-2.1
liddiard/skry
display/migrations/0004_auto_20170303_1242.py
1
1278
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-03 20:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('display', '0003_template_sites'), ] operations = [ migrations.AlterField( ...
mit
foospidy/DbDat
plugins/db2/check_configuration_notifylevel.py
1
1580
class check_configuration_notifylevel(): """ check_configuration_notifylevel: The notifylevel parameter specifies the type of administration notification messages that are written to the administration notification log. It is recommended that this parameter be set to 3. A setting of 3 will log all ...
gpl-2.0
Evegen55/shadowsocks
shadowsocks/daemon.py
694
5602
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
Distrotech/PyQt-x11
examples/painting/transformations.py
20
8601
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
bottompawn/kbengine
kbe/src/lib/python/Lib/xmlrpc/client.py
69
47237
# # XML-RPC CLIENT LIBRARY # $Id$ # # an XML-RPC client interface for Python. # # the marshalling and response parser code can also be used to # implement XML-RPC servers. # # Notes: # this version is designed to work with Python 2.1 or newer. # # History: # 1999-01-14 fl Created # 1999-01-15 fl Changed dateTime to u...
lgpl-3.0
ApuliaSoftware/odoo
addons/payment_ogone/controllers/main.py
389
1179
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class OgoneController(http.Controller): _accept_url = '/payment/ogone/test/accept' _decline_url = '/payment/ogone/test/decline' ...
agpl-3.0
valtandor/easybuild-framework
easybuild/tools/run.py
4
17280
# # # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (ht...
gpl-2.0
yanheven/glance
glance/api/cached_images.py
7
3580
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
proxysh/Safejumper-for-Desktop
buildlinux/env32/lib/python2.7/encodings/mac_romanian.py
593
13917
""" Python Character Mapping Codec mac_romanian generated from 'MAPPINGS/VENDORS/APPLE/ROMANIAN.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_table) def decode(self,inp...
gpl-2.0
10clouds/edx-platform
lms/djangoapps/course_blocks/api.py
8
4129
""" API entry point to the course_blocks app with top-level get_course_blocks and clear_course_from_cache functions. """ from django.core.cache import cache from openedx.core.lib.block_structure.manager import BlockStructureManager from openedx.core.lib.block_structure.transformers import BlockStructureTransformers fro...
agpl-3.0
cmelange/ansible
lib/ansible/modules/database/mysql/mysql_replication.py
6
12987
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage mysql replication (c) 2013, Balazs Pocze <banyek@gawker.com> Certain parts are taken from Mark Theunissen's mysqldb module This file is part of Ansible Ansible is free software: you can redistribute it and/or modify it under the terms of the GNU...
gpl-3.0
benpatterson/edx-platform
cms/djangoapps/contentstore/features/video.py
134
8674
# pylint: disable=missing-docstring from lettuce import world, step from selenium.webdriver.common.keys import Keys from xmodule.modulestore.django import modulestore VIDEO_BUTTONS = { 'CC': '.hide-subtitles', 'volume': '.volume', 'play': '.video_control.play', 'pause': '.video_control.pause', 'ha...
agpl-3.0
r0e/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/memorizingfile.py
680
3709
#!/usr/bin/env python # # Copyright 2011, 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...
mpl-2.0
hmcmooc/muddx-platform
common/lib/xmodule/xmodule/annotator_token.py
211
1542
""" This file contains a function used to retrieve the token for the annotation backend without having to create a view, but just returning a string instead. It can be called from other files by using the following: from xmodule.annotator_token import retrieve_token """ import datetime from firebase_token_generator im...
agpl-3.0
defionscode/ansible
lib/ansible/modules/cloud/amazon/aws_batch_job_queue.py
74
10201
#!/usr/bin/python # Copyright (c) 2017 Jon Meran <jonathan.meran@sonos.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTAT...
gpl-3.0