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 |
|---|---|---|---|---|---|
issyrichards/spartify2 | requests-master/requests/api.py | 160 | 5280 | # -*- coding: utf-8 -*-
"""
requests.api
~~~~~~~~~~~~
This module implements the Requests API.
:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
"""
from . import sessions
def request(method, url, **kwargs):
"""Constructs and sends a :class:`Request <Request>`.
:par... | mit |
aaronorosen/horizon-congress | openstack_dashboard/dashboards/project/stacks/tabs.py | 14 | 5069 | # 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 th... | apache-2.0 |
zhengzhihust/tablib | tablib/packages/openpyxl/workbook.py | 116 | 6200 | # file openpyxl/workbook.py
# Copyright (c) 2010 openpyxl
#
# 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, modif... | mit |
jpshort/odoo | addons/portal_gamification/__openerp__.py | 381 | 1571 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
MickSandoz/compassion-modules | __unported__/child_update_picture_date/wizard/update_child_picture_date.py | 5 | 1907 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <david@coninckx.com>
#
# The licence is in the file __ope... | agpl-3.0 |
niegenug/wesnoth | scons/python_devel.py | 49 | 1381 | # vi: syntax=python:et:ts=4
import sys, os
from config_check_utils import backup_env, restore_env
import distutils.sysconfig
def exists():
return True
def PythonExtension(env, target, source, **kv):
return env.SharedLibrary(target, source, SHLIBPREFIX='', SHLIBSUFFIX=distutils.sysconfig.get_config_var("SO"), ... | gpl-2.0 |
adam111316/SickGear | lib/rtorrent/compat.py | 180 | 1258 | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# 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, ... | gpl-3.0 |
zubair-arbi/edx-platform | lms/djangoapps/debug/views.py | 119 | 2136 | """Views for debugging and diagnostics"""
import pprint
import traceback
from django.http import Http404, HttpResponse, HttpResponseNotFound
from django.contrib.auth.decorators import login_required
from django.utils.html import escape
from django.views.decorators.csrf import ensure_csrf_cookie
from edxmako.shortcut... | agpl-3.0 |
rue89-tech/edx-analytics-pipeline | edx/analytics/tasks/tests/test_student_engagement.py | 3 | 15248 | """Test student engagement metrics"""
import json
import luigi
from ddt import ddt, data, unpack
from edx.analytics.tasks.student_engagement import StudentEngagementTask, SUBSECTION_VIEWED_MARKER
from edx.analytics.tasks.tests import unittest
from edx.analytics.tasks.tests.opaque_key_mixins import InitializeOpaqueKe... | agpl-3.0 |
wscullin/spack | var/spack/repos/builtin/packages/fontcacheproto/package.py | 3 | 1563 | ##############################################################################
# Copyright (c) 2013-2017, 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 |
BT-fgarbely/odoo | addons/stock/report/stock_graph.py | 326 | 4514 | # -*- 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 |
hdknr/paloma | example/app/workers.py | 1 | 1671 | import os
import sys
#
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
APP_DIR=os.path.dirname(__file__)
LOG_FILE="/tmp/paloma.log" #: celery worker logfile
PID_FILE="/tmp/paloma.pid" #: celery worker PID file
PID_CAM="/tmp/paloma.pid"
NODE="celery" #: celery = default node
LOG_LEVEL="DEBU... | bsd-2-clause |
WalterPaixaoCortes/Reusables | labio/labio/argParseWrapper.py | 1 | 5984 | """
Purpose
The purpose of the argParseWrapper module is to create an easy way to use the native argparse module from python distribution
in order to parse command line arguments.
Description
It contains a simple wrapper class for the argparse.Action class, which adds the action attribute and a return_args me... | gpl-2.0 |
nabsboss/CouchPotatoServer | libs/elixir/collection.py | 27 | 4457 | '''
Default entity collection implementation
'''
import sys
import re
class BaseCollection(list):
def __init__(self, entities=None):
list.__init__(self)
if entities is not None:
self.extend(entities)
def extend(self, entities):
for e in entities:
self.append(e)
... | gpl-3.0 |
pitch-sands/i-MPI | flask/Lib/site-packages/pip-1.5.6-py2.7.egg/pip/log.py | 344 | 9455 | """Logging
"""
import sys
import os
import logging
from pip import backwardcompat
from pip._vendor import colorama, pkg_resources
def _color_wrap(*colors):
def wrapped(inp):
return "".join(list(colors) + [inp, colorama.Style.RESET_ALL])
return wrapped
def should_color(consumer, environ, std=(sys.s... | bsd-3-clause |
yelizariev/account-financial-tools | account_credit_control/wizard/__init__.py | 40 | 1154 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
# Copyright 2012-2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publi... | agpl-3.0 |
joopert/home-assistant | homeassistant/components/mobile_app/websocket_api.py | 2 | 3785 | """Websocket API for mobile_app."""
import voluptuous as vol
from homeassistant.components.cloud import async_delete_cloudhook
from homeassistant.components.websocket_api import (
ActiveConnection,
async_register_command,
async_response,
error_message,
result_message,
websocket_command,
ws_... | apache-2.0 |
onitu/onitu | docs/conf.py | 1 | 8416 | # -*- coding: utf-8 -*-
#
# Onitu documentation build configuration file, created by
# sphinx-quickstart on Fri Nov 8 21:18:03 2013.
#
# 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.
#
# All c... | mit |
eneabio/nova | nova/rootwrap/wrapper.py | 8 | 1974 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 OpenStack, LLC.
# 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... | apache-2.0 |
taedla01/MissionPlanner | Lib/site-packages/numpy/core/function_base.py | 82 | 5474 | __all__ = ['logspace', 'linspace']
import numeric as _nx
from numeric import array
def linspace(start, stop, num=50, endpoint=True, retstep=False):
"""
Return evenly spaced numbers over a specified interval.
Returns `num` evenly spaced samples, calculated over the
interval [`start`, `stop` ].
Th... | gpl-3.0 |
chokribr/invenio | invenio/modules/upgrader/engine.py | 13 | 19568 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2012, 2013, 2014, 2015 CERN.
#
# Invenio 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... | gpl-2.0 |
nox/skia | tools/tests/base_unittest.py | 68 | 2416 | #!/usr/bin/python
"""
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
A wrapper around the standard Python unittest library, adding features we need
for various unittests within this directory.
"""
import errno
import os
import shutil
impo... | bsd-3-clause |
mpdehaan/ansible | lib/ansible/runner/connection_plugins/funcd.py | 62 | 3629 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | gpl-3.0 |
raildo/nova | nova/objects/compute_node.py | 13 | 19773 | # Copyright 2013 IBM Corp
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 |
spaceexperiment/forum-app | app/api/views/category.py | 1 | 1784 | from flask import request, session, g, redirect, url_for, abort
from . import api
from ..exceptions import ExistsError
from ..models import Category
from .main import BaseMethodView
class CategoryView(BaseMethodView):
def get(self, id=None):
if id:
instance = Category(id)
if not... | mit |
tesb/flask-crystal | venv/Lib/site-packages/requests/__init__.py | 327 | 1856 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('http://python.org')
>>> r.sta... | apache-2.0 |
homme/ansible | test/integration/cleanup_gce.py | 163 | 2589 | '''
Find and delete GCE resources matching the provided --match string. Unless
--yes|-y is provided, the prompt for confirmation prior to deleting resources.
Please use caution, you can easily delete your *ENTIRE* GCE infrastructure.
'''
import os
import re
import sys
import optparse
import yaml
try:
from libclo... | gpl-3.0 |
nizhikov/ignite | modules/platforms/python/pyignite/datatypes/__init__.py | 11 | 1078 | # 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 use ... | apache-2.0 |
ArcticaProject/vcxsrv | mesalib/src/glsl/nir/nir_opcodes_c.py | 1 | 2036 | #! /usr/bin/env python
#
# Copyright (C) 2014 Connor Abbott
#
# 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, modi... | gpl-3.0 |
demarle/VTK | ThirdParty/Twisted/twisted/cred/strcred.py | 63 | 8301 | # -*- test-case-name: twisted.test.test_strcred -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""
Support for resolving command-line strings that represent different
checkers available to cred.
Examples:
- passwd:/etc/passwd
- memory:admin:asdf:user:lkj
- unix
"""
import sys
fro... | bsd-3-clause |
vrieni/orange | Orange/OrangeWidgets/Data/OWSave.py | 6 | 5594 | from OWWidget import *
import OWGUI
import re, os.path
from exceptions import Exception
NAME = "Save"
DESCRIPTION = "Saves data to file."
LONG_DESCRIPTION = ""
ICON = "icons/Save.svg"
PRIORITY = 90
AUTHOR = "Janez Demsar"
AUTHOR_EMAIL = "janez.demsar(@at@)fri.uni-lj.si"
INPUTS = [("Data", Orange.data.Table, "dataset",... | gpl-3.0 |
locustio/locust | locust/test/test_wait_time.py | 1 | 2342 | import random
import time
from locust import User, TaskSet, between, constant, constant_pacing
from locust.exception import MissingWaitTimeError
from .testcases import LocustTestCase
class TestWaitTime(LocustTestCase):
def test_between(self):
class MyUser(User):
wait_time = between(3, 9)
... | mit |
icio/github3.py | tests/unit/test_null.py | 10 | 1832 | from .helper import UnitHelper
from github3.null import NullObject
import pytest
class TestNullObject(UnitHelper):
described_class = NullObject
def create_instance_of_described_class(self):
return self.described_class()
def test_returns_empty_list(self):
assert list(self.instance) == []... | bsd-3-clause |
gmist/fix-5studio | main/auth/twitter.py | 6 | 1468 | # coding: utf-8
from __future__ import absolute_import
import flask
import auth
import config
import model
import util
from main import app
twitter_config = dict(
access_token_url='https://api.twitter.com/oauth/access_token',
authorize_url='https://api.twitter.com/oauth/authorize',
base_url='https://api.twit... | mit |
js0701/chromium-crosswalk | tools/perf_expectations/make_expectations.py | 37 | 12595 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For instructions see:
# http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs
import hashlib
import math
import optpars... | bsd-3-clause |
MediaKraken/MediaKraken_Deployment | source/database_async/db_base_metadata_async.py | 1 | 8531 | import inspect
from common import common_logging_elasticsearch_httpx
async def db_metadata_guid_from_media_guid(self, guid, db_connection=None):
await common_logging_elasticsearch_httpx.com_es_httpx_post_async(message_type='info',
message_text=... | gpl-3.0 |
dwightgunning/django | tests/auth_tests/test_mixins.py | 274 | 8335 | from django.contrib.auth import models
from django.contrib.auth.mixins import (
LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin,
)
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from django.test import Re... | bsd-3-clause |
s20121035/rk3288_android5.1_repo | external/chromium_org/third_party/closure_compiler/compiler_customization_test.py | 40 | 6461 | #!/usr/bin/env python
# Copyright 2014 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 unittest
from checker import Checker
from processor import FileCache, Processor
ASSERT_FILE = os.path.join("..", ".... | gpl-3.0 |
CapOM/ChromiumGStreamerBackend | tools/telemetry/third_party/gsutilz/third_party/boto/boto/sdb/item.py | 153 | 6885 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | bsd-3-clause |
dudepare/django | django/contrib/admindocs/urls.py | 574 | 1183 | from django.conf.urls import url
from django.contrib.admindocs import views
urlpatterns = [
url('^$',
views.BaseAdminDocsView.as_view(template_name='admin_doc/index.html'),
name='django-admindocs-docroot'),
url('^bookmarklets/$',
views.BookmarkletsView.as_view(),
name='django-ad... | bsd-3-clause |
patilsangram/erpnext | erpnext/patches/v10_0/set_auto_created_serial_no_in_stock_entry.py | 17 | 1708 | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
serialised_items = [d.name for d in frappe.get_all("Item", filters={"has_serial_no": 1})]
if not serialised_items:
return
for dt in ["Stoc... | gpl-3.0 |
MartijnBraam/CouchPotatoServer | libs/suds/servicedefinition.py | 200 | 8478 | # 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 |
agentfog/qiime | scripts/upgma_cluster.py | 15 | 2742 | #!/usr/bin/env python
# File created on 09 Feb 2010
from __future__ import division
__author__ = "Justin Kuczynski"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Justin Kuczynski"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Justin Kuczynski"
__email__ = "justinak@gmail.com"
... | gpl-2.0 |
donce/django-cms | cms/models/fields.py | 11 | 4349 | # -*- coding: utf-8 -*-
from cms.forms.fields import PageSelectFormField
from cms.models.pagemodel import Page
from cms.models.placeholdermodel import Placeholder
from cms.utils.placeholder import PlaceholderNoAction, validate_placeholder_name
from django.db import models
class PlaceholderField(models.ForeignKey):
... | bsd-3-clause |
Frodox/buildbot | master/buildbot/test/unit/test_changes_gerritchangesource.py | 3 | 14848 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
darrenabbey/ymap | scripts_genomes/genome_process_for_standard_bins.GC_bias_1.py | 2 | 7151 | # Input arguments: (Those with '[*]' at end are used here.)
# 2) genome : [String]: defines genome in use for project. (ex. 'Ca_a') [*]
# 3) workingDir : [String]: Directory where links in system are stored. (ex. '/home/bermanj/shared/links/) [*]
#
# Process input files:
# 1) Restriction-... | mit |
flumotion-mirror/flumotion-flash | flumotion/component/encoders/flv/flv.py | 1 | 1114 | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L.
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
#
# This file may be distributed and/or modified under the terms of
# the GNU Lesser General Pub... | lgpl-2.1 |
oczkers/pyllegro | pyllegro/core.py | 1 | 13373 | # -*- coding: utf-8 -*-
"""
gshop.allegro
~~~~~~~~~~~~~~~~~~~
A lightweight wrapper around the Allegro webapi.
"""
import sys
import time
import logging
from zeep import Client
from zeep.exceptions import Fault
from requests.exceptions import ConnectionError
# from socket import error as socketError
from decimal im... | lgpl-3.0 |
0jpq0/kbengine | kbe/res/scripts/common/Lib/gettext.py | 90 | 17661 | """Internationalization and localization support.
This module provides internationalization (I18N) and localization (L10N)
support for your Python programs by providing an interface to the GNU gettext
message catalog library.
I18N refers to the operation by which a program is made aware of multiple
languages. L10N r... | lgpl-3.0 |
dariomalchiodi/yaplf | test/test_models.py | 1 | 3023 |
#*****************************************************************************
# Copyright (C) 2010 Dario Malchiodi <malchiodi@di.unimi.it>
#
# This file is part of yaplf.
# yaplf is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by... | lgpl-3.0 |
jcoady9/python-for-android | python3-alpha/python3-src/Lib/distutils/bcppcompiler.py | 179 | 14935 | """distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""
# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.
# XXX looks like there's a L... | apache-2.0 |
ahb0327/intellij-community | python/helpers/coverage/bytecode.py | 209 | 2036 | """Bytecode manipulation for coverage.py"""
import opcode, types
from coverage.backward import byte_to_int
class ByteCode(object):
"""A single bytecode."""
def __init__(self):
# The offset of this bytecode in the code object.
self.offset = -1
# The opcode, defined in the `opcode` mod... | apache-2.0 |
jarvys/django-1.7-jdb | tests/db_backends/tests.py | 32 | 1074 | from django.test import TestCase
from django.db.backends import BaseDatabaseWrapper
class DummyDatabaseWrapper(BaseDatabaseWrapper):
pass
class DummyObject(object):
alias = None
class DbBackendTests(TestCase):
def test_compare_db_wrapper_with_another_object(self):
wrapper = BaseDatabaseWrapper... | bsd-3-clause |
stonegithubs/odoo | addons/l10n_ch/account_wizard.py | 424 | 2192 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi. Copyright Camptocamp SA
# Financial contributors: Hasa SA, Open Net SA,
# Prisme Solutions Informatique SA, Quod SA
#
# Translation contributors: brain-te... | agpl-3.0 |
mhvk/astropy | astropy/coordinates/builtin_frames/altaz.py | 3 | 5451 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.utils.decorators import format_doc
from astropy.coordinates import representation as r
from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMap... | bsd-3-clause |
kayhayen/Nuitka | nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Options/PackageOption.py | 7 | 1965 | #
# Copyright (c) 2001 - 2014 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
# without limitation the rights to use, copy, modify, merge... | apache-2.0 |
Sephyros/URI-Python | 01 - Iniciante/1006.py | 1 | 1180 | # URI Online Judge | 1006
# Média 2
#
# Adaptado por Neilor Tonin, URI Brasil
# Timelimit: 1
#
# Leia 3 valores, no caso, variáveis A, B e C, que são as três notas de um aluno. A seguir, calcule a média do aluno,
# sabendo que a nota A tem peso 2, a nota B tem peso 3 e a nota C tem peso 5. Considere que cada nota pode ... | gpl-3.0 |
pydlv/rlauncher | requests/packages/chardet/big5freq.py | 3133 | 82594 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | mit |
asascience-open/ooi-ui-services | ooiservices/app/uframe/events_create_update.py | 1 | 12767 | """
Asset Management - Events: Create and update functions.
"""
__author__ = 'Edna Donoughe'
from ooiservices.app.uframe.uframe_tools import (uframe_get_asset_by_uid, get_uframe_event, uframe_put_event,
uframe_postto, uframe_create_cruise, uframe_create_calibration)
fr... | apache-2.0 |
miing/mci_migo | webui/views/devices.py | 1 | 11714 | # Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
import re
from base64 import b16encode
from collections import namedtuple
from django.contrib import messages
from django.contrib.auth.views import redirect_to_login
from django.c... | agpl-3.0 |
GabrieleAndrea/MEGAnnotator | bin/SPAdes/share/spades/pyyaml3/reader.py | 272 | 6854 | # This module contains abstractions for the input stream. You don't have to
# looks further, there are no pretty code.
#
# We define two classes here.
#
# Mark(source, line, column)
# It's just a record and its only use is producing nice error messages.
# Parser does not use it for any other purposes.
#
# Reader(so... | gpl-3.0 |
Godiyos/python-for-android | python-modules/twisted/twisted/python/dxprofile.py | 61 | 1528 | # Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
DEPRECATED since Twisted 8.0.
Utility functions for reporting bytecode frequencies to Skip Montanaro's
stat collector.
This module requires a version of Python build with DYNAMIC_EXCUTION_PROFILE,
and optionally DXPAIRS, defined to... | apache-2.0 |
kingvuplus/boom2 | lib/python/Plugins/SystemPlugins/AnimationSetup/plugin.py | 15 | 8964 | from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.ActionMap import ActionMap
from Components.ConfigList import ConfigListScreen
from Components.MenuList import MenuList
from Components.Sources.StaticText import StaticText
from Components.config import config, ConfigNumber, Conf... | gpl-2.0 |
menardorama/ReadyNAS-Add-ons | headphones-1.0.0/files/etc/apps/headphones/lib/unidecode/x07a.py | 252 | 4669 | data = (
'Xi ', # 0x00
'Kao ', # 0x01
'Lang ', # 0x02
'Fu ', # 0x03
'Ze ', # 0x04
'Shui ', # 0x05
'Lu ', # 0x06
'Kun ', # 0x07
'Gan ', # 0x08
'Geng ', # 0x09
'Ti ', # 0x0a
'Cheng ', # 0x0b
'Tu ', # 0x0c
'Shao ', # 0x0d
'Shui ', # 0x0e
'Ya ', # 0x0f
'Lun ', # 0x10
'Lu '... | gpl-2.0 |
primepix/django-sentry | sentry/filters.py | 2 | 5486 | """
sentry.filters
~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
# Widget api is pretty ugly
from __future__ import absolute_import
from django.conf import settings as django_settings
from django.utils.datastructures import Sort... | bsd-3-clause |
kyleabeauchamp/FAHMunge | FAHMunge/fah.py | 1 | 9735 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Kyle A. Beauchamp
# Contributors:
#
# MDTraj is free software:... | lgpl-2.1 |
gusai-francelabs/datafari | windows/python/Lib/site-packages/pip/_vendor/requests/exceptions.py | 895 | 2517 | # -*- coding: utf-8 -*-
"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~
This module contains the set of Requests' exceptions.
"""
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
class RequestException(IOError):
"""There was an ambiguous exception that occurred while handling your
request.""... | apache-2.0 |
ToonTownInfiniteRepo/ToontownInfinite | Panda3D-1.9.0/python/Lib/JOD/NewJamoDrum.py | 3 | 10076 | """
A generic Jam-o-Drum input interface for the Jam-o-Drum that uses the OptiPAC
for both spinners and pads.
@author: U{Ben Buchwald <bb2@alumni.cmu.edu>}
Last Updated: 2/27/2006
"""
from direct.showbase.DirectObject import DirectObject
import string, sys, md5
from pandac.PandaModules import Filename
from pandac.Pan... | mit |
brennie/reviewboard | reviewboard/ssh/utils.py | 3 | 3339 | from __future__ import unicode_literals
import os
import paramiko
from django.utils import six
from reviewboard.ssh.client import SSHClient
from reviewboard.ssh.errors import (BadHostKeyError, SSHAuthenticationError,
SSHError, SSHInvalidPortError)
from reviewboard.ssh.policy impor... | mit |
hbenniou/trunk | examples/gts-horse/gts-random-pack.py | 10 | 3271 |
""" CAUTION:
Running this script can take very long!
"""
from numpy import arange
from yade import pack
import pylab
# define the section shape as polygon in 2d; repeat first point at the end to close the polygon
poly=((1e-2,5e-2),(5e-2,2e-2),(7e-2,-2e-2),(1e-2,-5e-2),(1e-2,5e-2))
# show us the meridian shape
#pylab.... | gpl-2.0 |
stscieisenhamer/pyqtgraph | pyqtgraph/units.py | 55 | 1402 | # -*- coding: utf-8 -*-
## Very simple unit support:
## - creates variable names like 'mV' and 'kHz'
## - the value assigned to the variable corresponds to the scale prefix
## (mV = 0.001)
## - the actual units are purely cosmetic for making code clearer:
##
## x = 20*pA is identical to x = 20*1e-12
#... | mit |
Nebucatnetzer/tamagotchi | pygame/bin/activate_this.py | 669 | 1129 | """By using execfile(this_file, dict(__file__=this_file)) you will
activate this virtualenv environment.
This can be used when you must use an existing Python interpreter, not
the virtualenv bin/python
"""
try:
__file__
except NameError:
raise AssertionError(
"You must run this like execfile('path/to/... | gpl-2.0 |
chjw8016/GreenOdoo7-haibao | openerp/addons/point_of_sale/controllers/main.py | 56 | 5627 | # -*- coding: utf-8 -*-
import logging
import simplejson
import os
import openerp
from openerp.addons.web.controllers.main import manifest_list, module_boot, html_template
class PointOfSaleController(openerp.addons.web.http.Controller):
_cp_path = '/pos'
@openerp.addons.web.http.httprequest
def app(self,... | mit |
jejimenez/django | django/contrib/postgres/lookups.py | 199 | 1175 | from django.db.models import Lookup, Transform
class PostgresSimpleLookup(Lookup):
def as_sql(self, qn, connection):
lhs, lhs_params = self.process_lhs(qn, connection)
rhs, rhs_params = self.process_rhs(qn, connection)
params = lhs_params + rhs_params
return '%s %s %s' % (lhs, self... | bsd-3-clause |
bholley/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_extensions.py | 413 | 16128 | #!/usr/bin/env python
#
# Copyright 2012, 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 |
Jgarcia-IAS/localizacion | openerp/addons/l10n_be_invoice_bba/partner.py | 379 | 2268 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Created by Luc De Meyer
# Copyright (c) 2010 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribu... | agpl-3.0 |
PeterLauris/aifh | vol1/python-examples/examples/example_ocr.py | 4 | 8445 | #!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 1: Fundamental Algorithms
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2013 by Jeff Heaton
Licensed under the Apache License, Version 2... | apache-2.0 |
wagtail/wagtail | wagtail/tests/testapp/migrations/0058_blockcountsstreammodel_minmaxcountstreammodel.py | 6 | 1214 | # Generated by Django 2.1.7 on 2019-03-28 02:30
from django.db import migrations, models
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('tests', '0057_customdocumentwithauthor'),
]
operations = [
... | bsd-3-clause |
nhejazi/scikit-learn | sklearn/decomposition/tests/test_online_lda.py | 38 | 16445 | import sys
import numpy as np
from scipy.linalg import block_diag
from scipy.sparse import csr_matrix
from scipy.special import psi
from sklearn.decomposition import LatentDirichletAllocation
from sklearn.decomposition._online_lda import (_dirichlet_expectation_1d,
_diri... | bsd-3-clause |
BigDataehealthTools/GNOME_Viewer | GNOME_Viewer/urls.py | 1 | 1584 | # 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 |
heavyengineer/p2pool | p2pool/test/bitcoin/test_getwork.py | 275 | 4273 | import unittest
from p2pool.bitcoin import getwork, data as bitcoin_data
class Test(unittest.TestCase):
def test_all(self):
cases = [
{
'target': '0000000000000000000000000000000000000000000000f2b944000000000000',
'midstate': '5982f893102dec03e374b472647c4f19b1b... | gpl-3.0 |
theonewolf/siegvswolf | lib/requests/status_codes.py | 695 | 3136 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... | mit |
southpawtech/TACTIC-DEV | src/tactic/ui/container/menu_wdg.py | 1 | 18674 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 |
wimac/home | Dropbox/skel/bin/sick-beard/cherrypy/_cpconfig.py | 35 | 10328 | """Configuration system for CherryPy.
Configuration in CherryPy is implemented via dictionaries. Keys are strings
which name the mapped value, which may be of any type.
Architecture
------------
CherryPy Requests are part of an Application, which runs in a global context,
and configuration data may apply ... | gpl-2.0 |
cul-it/Invenio | modules/bibencode/lib/bibencode_tester.py | 3 | 26130 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011 CERN.
##
## Invenio 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) a... | gpl-2.0 |
BayanGroup/ansible | lib/ansible/module_utils/netcfg.py | 11 | 2329 | #
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | gpl-3.0 |
cebrusfs/217gdb | pwndbg/color/enhance.py | 5 | 1128 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import pwndbg.color.theme as theme
import pwndbg.config as config
from pwndbg.color import generateColorFunction
config_int... | mit |
rajalokan/nova | nova/api/openstack/compute/config_drive.py | 4 | 2374 | # Copyright 2012 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 |
rednach/krill | test/test_regenerator.py | 14 | 7568 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... | agpl-3.0 |
Jorge-Rodriguez/ansible | test/units/modules/network/f5/test_bigip_vcmp_guest.py | 21 | 5777 | # -*- 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
if sys.version_info < (2, ... | gpl-3.0 |
aidanhs/blockade | blockade/state.py | 1 | 3590 | #
# Copyright (C) 2014 Dell, 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 wri... | apache-2.0 |
mashrin/processing.py | mode/examples/Topics/Simulate/SmokeParticleSystem/particle.py | 6 | 1187 |
# A simple Particle class, renders the particle as an image.
class Particle(object):
def __init__(self, l, img):
self.acc = PVector(0, 0)
self.vx = randomGaussian() * 0.3
self.vy = randomGaussian() * 0.3 - 1.0
self.vel = PVector(self.vx, self.vy)
self.loc = l.get()
... | apache-2.0 |
pombredanne/SourceForge-Allura | ForgeBlog/forgeblog/main.py | 2 | 15894 | #-*- python -*-
import logging
from datetime import datetime
import urllib2
# Non-stdlib imports
import pkg_resources
import pymongo
from tg import expose, validate, redirect, flash
from tg.decorators import with_trailing_slash, without_trailing_slash
from pylons import g, c, request, response
import formencode
from f... | apache-2.0 |
surajssd/kuma | vendor/packages/pygments/formatters/__init__.py | 44 | 3597 | # -*- coding: utf-8 -*-
"""
pygments.formatters
~~~~~~~~~~~~~~~~~~~
Pygments formatters.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import sys
import types
import fnmatch
from os.path import basename
from pygments.form... | mpl-2.0 |
twhyntie/image-heatmap | make_image_heatmap.py | 1 | 3834 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#...for the plotting.
import matplotlib.pyplot as plt
#...for the image manipulation.
import matplotlib.image as mpimg
#...for the MATH.
import numpy as np
# For scaling images.
import scipy.ndimage.interpolation as inter
#...for the colours.
from matplotlib import col... | mit |
yury-s/v8-inspector | Source/chrome/tools/checkbins/checkbins.py | 77 | 4325 | #!/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.
"""Makes sure that all EXE and DLL files in the provided directory were built
correctly.
In essense it runs a subset of BinScope t... | bsd-3-clause |
zygh0st/terminator | terminatorlib/debugserver.py | 10 | 5015 | #!/usr/bin/python
#
# Copyright (c) 2008, Thomas Hurst <tom@hur.st>
#
# Use of this file is unrestricted provided this notice is retained.
# If you use it, it'd be nice if you dropped me a note. Also beer.
from terminatorlib.util import dbg, err
from terminatorlib.version import APP_NAME, APP_VERSION
import socket
i... | gpl-2.0 |
MiLk/ansible | lib/ansible/modules/monitoring/zabbix_group.py | 35 | 7601 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2013-2014, Epic Games, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... | gpl-3.0 |
wuga214/Django-Wuga | env/lib/python2.7/site-packages/django/conf/locale/zh_Hant/formats.py | 1008 | 1810 | # -*- 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 = 'Y年n月j日' # 2016年9月5... | apache-2.0 |
patrickstocklin/chattR | lib/python2.7/site-packages/django/contrib/auth/management/__init__.py | 91 | 6477 | """
Creates permissions for all installed apps that need permissions.
"""
from __future__ import unicode_literals
import getpass
import unicodedata
from django.apps import apps
from django.contrib.auth import get_permission_codename
from django.core import exceptions
from django.core.management.base import CommandErr... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.