repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
ibank/node-gyp | gyp/tools/graphviz.py | 2679 | 2878 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Using the JSON dumped by the dump-dependency-json generator,
generate input suitable for graphviz to render a dependency graph of
targets... | mit |
chungjjang80/FRETBursts | fretbursts/ph_sel.py | 2 | 4514 | #
# FRETBursts - A single-molecule FRET burst analysis toolkit.
#
# Copyright (C) 2014-2016 The Regents of the University of California,
# Antonino Ingargiola <tritemio@gmail.com>
#
"""
In this module we define the class :class:`Ph_sel` used to specify a
"selection" of a sub-set of photons/timestamps (i.... | gpl-2.0 |
wemake-services/wemake-django-template | {{cookiecutter.project_name}}/server/urls.py | 1 | 1772 | """
Main URL mapping configuration file.
Include other URLConfs from external apps using method `include()`.
It is also a good practice to keep a single URL to the root index page.
This examples uses Django's default media
files serving technique in development.
"""
from django.conf import settings
from django.cont... | mit |
wweiradio/django | django/contrib/gis/gdal/raster/band.py | 308 | 5382 | from ctypes import byref, c_int
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import raster as capi
from django.contrib.gis.shortcuts import numpy
from django.utils import six
from django.utils.encoding import force_tex... | bsd-3-clause |
ax003d/openerp | openerp/addons/mail/report/__init__.py | 438 | 1057 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-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 |
BIT-SYS/gem5-spm-module | src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py | 91 | 2838 | # 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... | bsd-3-clause |
andrius-preimantas/odoo | openerp/addons/base/res/res_config.py | 69 | 30886 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
jmesteve/openerp | openerp/addons/account_report_company/__init__.py | 52 | 1091 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
molecular/electrum | gui/kivy/uix/dialogs/question.py | 1 | 1361 | from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.uix.checkbox import CheckBox
from kivy.uix.label import Label
from kivy.uix.widget import Widget
from electroncash_gui.kivy.i18n import _
Builder.load_string('''
<Question@Popup... | mit |
ychen820/microblog | y/google-cloud-sdk/platform/google_appengine/lib/requests/requests/packages/chardet/constants.py | 3008 | 1335 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | bsd-3-clause |
roadmapper/ansible | test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/restconf/restconf.py | 47 | 2617 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 |
VielSoft/odoo | addons/hr_contract/__init__.py | 381 | 1107 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | agpl-3.0 |
acercado/jd-ph-cms | jd-ph-cms/accounts/models.py | 1 | 3986 | from decimal import Decimal
from django.db import models
from django.core.validators import MinValueValidator
from ..notifications.models import NotificationMessage
from ..users.models import User
class Answer(models.Model):
question = models.ForeignKey('contests.contest', related_name='answer',
... | bsd-3-clause |
keshr3106/ThinkStats2 | code/chap08soln.py | 65 | 6172 | """This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function
import thinkstats2
import thinkplot
import math
import random
import numpy as np
fr... | gpl-3.0 |
cchurch/ansible | lib/ansible/modules/cloud/amazon/ec2_vol.py | 39 | 20083 | #!/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': ['stableinterf... | gpl-3.0 |
scality/cinder | cinder/tests/unit/test_volume.py | 1 | 348716 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | apache-2.0 |
40223143/cda-w15 | static/Brython3.1.3-20150514-095342/Lib/contextlib.py | 737 | 8788 | """Utilities for with-statement contexts. See PEP 343."""
import sys
from collections import deque
from functools import wraps
__all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack"]
class ContextDecorator(object):
"A base class or mixin that enables context managers to work as decorators."
... | agpl-3.0 |
homme/ansible-modules-core | utilities/logic/debug.py | 132 | 1915 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 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 Lice... | gpl-3.0 |
nolanliou/tensorflow | tensorflow/contrib/learn/python/learn/estimators/kmeans.py | 15 | 10904 | # 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 |
roadmapper/ansible | lib/ansible/modules/network/meraki/meraki_nat.py | 6 | 29958 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
# 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 = {
... | gpl-3.0 |
aristanetworks/neutron | neutron/tests/unit/_test_extension_portbindings.py | 7 | 17495 | # Copyright 2013 NEC Corporation
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 |
sklnet/openatv-enigma2 | lib/python/Screens/TaskView.py | 55 | 5653 | from Screens.Screen import Screen
from Components.ConfigList import ConfigListScreen
from Components.config import ConfigSubsection, ConfigSelection, getConfigListEntry
from Components.SystemInfo import SystemInfo
from Components.Task import job_manager
from InfoBarGenerics import InfoBarNotifications
import Screens.St... | gpl-2.0 |
darkerego/learning-python | pygoogle.py | 1 | 8928 | #!/usr/bin/python
"""
Google AJAX Search Module
http://code.google.com/apis/ajaxsearch/documentation/reference.html
Needs Python 2.6 or later
"""
try:
import json
except ImportError, e:
print e
exit()
import sys
import urllib
import logging
import argparse
__author__ = "Nikhil. R"
__version__ = "0.2"
URL ... | gpl-3.0 |
ayust/evelink | evelink/parsing/orders.py | 9 | 1045 | from evelink import api
from evelink import constants
def parse_market_orders(api_result):
rowset = api_result.find('rowset')
rows = rowset.findall('row')
result = {}
for row in rows:
a = row.attrib
id = int(a['orderID'])
result[id] = {
... | mit |
dya2/python-for-android | python-modules/twisted/twisted/persisted/crefutil.py | 61 | 4644 | # -*- test-case-name: twisted.test.test_persisted -*-
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Utility classes for dealing with circular references.
"""
from twisted.python import log, reflect
try:
from new import instancemethod
except:
from org.python.core impo... | apache-2.0 |
StevenBlack/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py | 117 | 4727 | # Copyright (C) 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 of conditions and the ... | bsd-3-clause |
HybridF5/tempest_debug | tempest/api/compute/servers/test_server_personality.py | 5 | 6324 | # 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 |
andreadean5/python-hpOneView | hpOneView/resources/facilities/racks.py | 1 | 6758 | # -*- coding: utf-8 -*-
###
# (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP
#
# 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 |
codepython/CollectorCity-Market-Place | stores/apps/blog_pages/migrations/0006_auto__add_field_home_meta_content__add_field_about_meta_content.py | 2 | 10124 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Home.meta_content'
db.add_column('blog_pages_home', 'meta_content', self.gf('django.db.mod... | apache-2.0 |
eahneahn/free | lib/python2.7/site-packages/pygments/lexers/_phpbuiltins.py | 274 | 122046 | # -*- coding: utf-8 -*-
"""
pygments.lexers._phpbuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file loads the function names and their modules from the
php webpage and generates itself.
Do not alter the MODULES dict by hand!
WARNING: the generation transfers quite much data over your
... | agpl-3.0 |
ColaLightOriginal/GraphV | Source/Graph_Class.py | 1 | 17088 | # -*- coding: utf-8 -*-
from graph_tool.all import *
from Queue_Class import *
from Visitor_Example_Class import *
from Graph_Window_Main_Class import *
from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, Pango
import numpy as np
from numpy.random import random
import sys
class Graph():
g = Graph()
g.se... | unlicense |
wnt-zhp/hufce | django/contrib/comments/forms.py | 92 | 8086 | import time
from django import forms
from django.forms.util import ErrorDict
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.comments.models import Comment
from django.utils.crypto import salted_hmac, constant_time_compare
from django.utils.encoding import... | gpl-3.0 |
igemsoftware/SYSU-Software2013 | project/Python27_32/Lib/ssl.py | 74 | 15611 | # Wrapper module for _ssl, providing some additional facilities
# implemented in Python. Written by Bill Janssen.
"""\
This module provides some more Pythonic support for SSL.
Object types:
SSLSocket -- subtype of socket.socket which does SSL over the socket
Exceptions:
SSLError -- exception raised for I/O er... | mit |
moazzemi/HAMEX | cpu/gem5/src/cpu/TimingExpr.py | 56 | 5954 | # Copyright (c) 2013-2014 ARM Limited
# 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 implementation of the functiona... | mit |
takeflight/wagtail | wagtail/tests/utils/page_tests.py | 24 | 5122 | from django.test import TestCase
from django.urls import reverse
from django.utils.text import slugify
from .wagtail_tests import WagtailTestUtils
class WagtailPageTests(WagtailTestUtils, TestCase):
"""
A set of asserts to help write tests for your own Wagtail site.
"""
def setUp(self):
super... | bsd-3-clause |
felliott/scrapi | scrapi/base/helpers.py | 3 | 9854 | from __future__ import unicode_literals
import re
import logging
import functools
from copy import deepcopy
import six
import pytz
from lxml import etree
from dateutil import parser
from pycountry import languages
from nameparser import HumanName
from scrapi import requests
URL_REGEX = re.compile(r'(https?:\/\/\S*... | apache-2.0 |
joakim-hove/django | django/db/models/expressions.py | 159 | 33643 | import copy
import datetime
from django.conf import settings
from django.core.exceptions import FieldError
from django.db.backends import utils as backend_utils
from django.db.models import fields
from django.db.models.constants import LOOKUP_SEP
from django.db.models.query_utils import Q, refs_aggregate
from django.u... | bsd-3-clause |
Bumpybox/pyblish-bumpybox | pyblish_bumpybox/plugins/hiero/extract_ftrack_components.py | 1 | 3223 | from pyblish import api
from pyblish_bumpybox import inventory
class ExtractFtrackComponents(api.InstancePlugin):
""" Extracting data to ftrack components.
Offset to get shot data from "extract_ftrack_shot"
"""
families = ["ftrack"]
label = "Ftrack Components"
hosts = ["hiero"]
order = i... | lgpl-3.0 |
ff94315/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_import.py | 16 | 18210 | import errno
import imp
import marshal
import os
import py_compile
import random
import stat
import sys
import unittest
from test.test_support import (unlink, TESTFN, unload, run_unittest, rmtree,
is_jython, check_warnings, EnvironmentVarGuard)
import textwrap
from test import script_help... | gpl-2.0 |
jskye/car-classifier-research | src/hyp.verification.tools/py/deprecated/batch_detect_lab.py | 1 | 5347 | #!/usr/bin/python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (c) 2015, Julius Sky
#
# 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... | mit |
rawdlite/mopidy | mopidy/core/history.py | 17 | 1532 | from __future__ import absolute_import, unicode_literals
import copy
import logging
import time
from mopidy import models
logger = logging.getLogger(__name__)
class HistoryController(object):
pykka_traversable = True
def __init__(self):
self._history = []
def _add_track(self, track):
... | apache-2.0 |
embeddedarm/android_external_chromium_org | tools/telemetry/telemetry/core/platform/profiler/tcmalloc_heap_profiler.py | 23 | 4759 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import sys
from telemetry.core.backends.chrome import android_browser_finder
from telemetry.core.platform import profiler
# En... | bsd-3-clause |
qt-haiku/LibreOffice | wizards/com/sun/star/wizards/ui/WizardDialog.py | 11 | 18866 | #
# This file is part of the LibreOffice project.
#
# 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/.
#
# This file incorporates work covered by the following license noti... | gpl-3.0 |
puzan/ansible | lib/ansible/modules/files/iso_extract.py | 10 | 3657 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>
# (c) 2016, Matt Robinson <git@nerdoftheherd.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
# th... | gpl-3.0 |
CollabQ/CollabQ | .google_appengine/tools/bulkload_client.py | 10 | 1938 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
Dino0631/RedRain-Bot | lib/multidict/__init__.py | 2 | 1162 | """Multidict implementation.
HTTP Headers and URL query string require specific data structure:
multidict. It behaves mostly like a dict but it can have
several values for the same key.
"""
import os
__all__ = ('MultiDictProxy', 'CIMultiDictProxy',
'MultiDict', 'CIMultiDict', 'upstr', 'istr')
__version__... | gpl-3.0 |
nederhoed/bitstamp-python-client | test/trading_client.py | 1 | 2123 | __author__ = 'kmadac'
import unittest
import bitstamp.client
import os
class bitstamp_trading_TestCase(unittest.TestCase):
client = bitstamp.client.trading(os.environ['bs_user'], os.environ['bs_key'], os.environ['bs_secret'])
def test_account_ballance(self):
account_balance = self.client.account_bal... | mit |
wayneclancy/creepercoin | contrib/bitrpc/bitrpc.py | 1 | 7844 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:9451")
else:
access = Ser... | mit |
yuanzhao/gpdb | gpMgmt/bin/gppylib/gparray.py | 4 | 94119 | #!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2008. All Rights Reserved.
#
"""
gparray.py:
Contains three classes representing configuration information of a
Greenplum array:
GpArray - The primary interface - collection of all GpDB within an array
GpDB - represents configuration infor... | apache-2.0 |
pearltrees/tree-shape-visualization | tools/languageSynchronizer/InterLanguage.py | 2 | 1294 | import FrenchFile
import EnglishFile
def compareEnFrAux(enFile, frFile):
notUsed = []
while 1:
line = enFile.getNextLine()
token = line.split('=').pop(0).split(' ').pop(0)
if token:
if frFile.findToken(token) == 0:
notUsed.append(line)
else:
... | mit |
nvoron23/arangodb | 3rdParty/V8-4.3.61/tools/unittests/run_perf_test.py | 27 | 15287 | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import namedtuple
import coverage
import json
from mock import DEFAULT
from mock import MagicMock
import os
from os ... | apache-2.0 |
rtindru/django | tests/mail/test_sendtestemail.py | 327 | 3088 | from __future__ import unicode_literals
from django.core import mail
from django.core.management import call_command
from django.test import SimpleTestCase, override_settings
@override_settings(
ADMINS=(('Admin', 'admin@example.com'), ('Admin and Manager', 'admin_and_manager@example.com')),
MANAGERS=(('Manag... | bsd-3-clause |
geerlingguy/ansible | test/lib/ansible_test/_internal/coverage/analyze/targets/generate.py | 31 | 5013 | """Analyze code coverage data to determine which integration test targets provide coverage for each arc or line."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
from .... import types as t
from ....encoding import (
to_text,
)
from ....data import (
data_... | gpl-3.0 |
yufish/youtube-dl | youtube_dl/extractor/golem.py | 186 | 2181 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urlparse,
)
from ..utils import (
determine_ext,
)
class GolemIE(InfoExtractor):
_VALID_URL = r'^https?://video\.golem\.de/.+?/(?P<id>.+?)/'
_TEST = {
'url': 'http://video.g... | unlicense |
PurpleMyst/porcupine | porcupine/_session.py | 1 | 10859 | import functools
import logging
import traceback
import webbrowser
import pygments.styles
import pygments.token
import porcupine
from porcupine import _dialogs, dirs, filetypes, menubar, settings, tabs, utils
log = logging.getLogger(__name__)
# global state makes some things a lot easier
_main_window = None
_tab_ma... | mit |
ledvina/zencoin | test/util/bitcoin-util-test.py | 1 | 6594 | #!/usr/bin/env python3
# Copyright 2014 BitPay Inc.
# Copyright 2016-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test framework for zencoin utils.
Runs automatically during `make check`.
Ca... | mit |
seem-sky/kbengine | kbe/res/scripts/common/Lib/test/test_pwd.py | 88 | 4229 | import sys
import unittest
from test import support
pwd = support.import_module('pwd')
class PwdTest(unittest.TestCase):
def test_values(self):
entries = pwd.getpwall()
for e in entries:
self.assertEqual(len(e), 7)
self.assertEqual(e[0], e.pw_name)
self.assert... | lgpl-3.0 |
matianfu/barcelona-4.3.3 | tools/perf/scripts/python/sched-migration.py | 1910 | 11965 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
deltreey/ansible | lib/ansible/plugins/action/assemble.py | 39 | 6003 | # (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Stephen Fromm <sfromm@gmail.com>
# 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 publish... | gpl-3.0 |
rouault/Quantum-GIS | python/plugins/processing/algs/saga/SagaAlgorithmProvider.py | 1 | 5765 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SagaAlgorithmProvider.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*****************... | gpl-2.0 |
yinquan529/people-harigopal.gollamudi-glmark2 | waflib/Tools/c_preproc.py | 11 | 16594 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
if sys.hexversion < 0x020400f0: from sets import Set as set
import re,sys,os,string,traceback
from waflib import Logs,Build,Utils,Errors
from waflib.Logs import deb... | gpl-3.0 |
linhdh/SnakeRepellerOnMbed50 | mbed-os/tools/build_release.py | 49 | 8381 | #! /usr/bin/env python
"""
mbed SDK
Copyright (c) 2011-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... | gpl-2.0 |
codecov/tornado | tornado/escape.py | 120 | 14441 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
dkarakats/edx-platform | common/djangoapps/config_models/models.py | 9 | 2073 | """
Django Model baseclass for database-backed configuration.
"""
from django.db import models
from django.contrib.auth.models import User
from django.core.cache import get_cache, InvalidCacheBackendError
try:
cache = get_cache('configuration') # pylint: disable=invalid-name
except InvalidCacheBackendError:
f... | agpl-3.0 |
thomasdouenne/openfisca-france-indirect-taxation | openfisca_france_indirect_taxation/model/consommation/poste_coicop_generator_old.py | 4 | 19956 |
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modif... | agpl-3.0 |
2uller/LotF | App/Lib/test/test_cpickle.py | 2 | 6450 | import cPickle
import cStringIO
import io
import unittest
from test.pickletester import (AbstractPickleTests,
AbstractPickleModuleTests,
AbstractPicklerUnpicklerObjectTests,
BigmemPickleTests)
from test import test_supp... | gpl-2.0 |
pmorie/origin | hack/build-local-images.py | 2 | 7987 | #!/usr/bin/env python
import sys
from shutil import copy, rmtree
import distutils.dir_util as dir_util
from subprocess import call
from tempfile import mkdtemp
from atexit import register
from os import getenv, mkdir, remove
from os.path import abspath, dirname, isdir, join
if len(sys.argv) > 1 and sys.argv[1] in ['... | apache-2.0 |
takuya1981/sms-tools | software/models_interface/hpsModel_GUI_frame.py | 21 | 8161 | # GUI frame for the hprModel_function.py
from Tkinter import *
import tkFileDialog, tkMessageBox
import sys, os
from scipy.io.wavfile import read
import hpsModel_function
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/'))
import utilFunctions as UF
class HpsModel_frame:
def ... | agpl-3.0 |
ToonTownInfiniteRepo/ToontownInfinite | toontown/catalog/CatalogAccessoryItem.py | 1 | 16172 | import CatalogItem
from CatalogAccessoryItemGlobals import *
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.toon import ToonDNA
import random, types
from direct.showbase import PythonUtil
from direct.gui.DirectGui import *
from pandac.PandaModules import *
class C... | mit |
grantsewell/nzbToMedia | libs/unidecode/x05d.py | 252 | 4670 | data = (
'Lang ', # 0x00
'Kan ', # 0x01
'Lao ', # 0x02
'Lai ', # 0x03
'Xian ', # 0x04
'Que ', # 0x05
'Kong ', # 0x06
'Chong ', # 0x07
'Chong ', # 0x08
'Ta ', # 0x09
'Lin ', # 0x0a
'Hua ', # 0x0b
'Ju ', # 0x0c
'Lai ', # 0x0d
'Qi ', # 0x0e
'Min ', # 0x0f
'Kun ', # 0x10
'... | gpl-3.0 |
miguelgrinberg/heat | heat/engine/clients/os/heat_plugin.py | 8 | 2860 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 |
adamfisk/littleshoot-client | server/appengine/boto/pyami/installers/ubuntu/mysql.py | 1 | 4361 | # Copyright (c) 2006-2009 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... | gpl-2.0 |
Eksmo/calibre | src/calibre/gui2/store/stores/diesel_ebooks_plugin.py | 1 | 4624 | # -*- coding: utf-8 -*-
from __future__ import (unicode_literals, division, absolute_import, print_function)
__license__ = 'GPL 3'
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
import random
import re
import urllib
from contextlib import closing
from lxml import ... | gpl-3.0 |
yfried/ansible | test/units/modules/network/f5/test_bigip_software_update.py | 4 | 3711 | # -*- 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 |
adamwwt/chvac | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/langcyrillicmodel.py | 2762 | 17725 | ######################## 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 |
ashfaqfarooqui/ROSTutorials | basics/001_talker_listener/talker.py | 15 | 2217 | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, 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... | gpl-2.0 |
smartchicago/chicago-early-learning | python/ecep/portal/management/commands/update_ecm.py | 1 | 9296 | from geopy.geocoders import GoogleV3
import csv
import logging
import os
import paramiko
import re
import time
from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import NoArgsCommand
from django.conf import settings
from portal.models import Location
class Command(NoArgsCommand)... | mit |
galak/zephyr | boards/xtensa/intel_adsp_cavs15/tools/fw_loader.py | 6 | 2622 | #!/usr/bin/env python3
#
# Copyright (c) 2019 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
import os
import argparse
import logging
from colorama import Fore, Style
from lib.loader import FirmwareLoader, FirmwareStatus
import lib.platforms as plat_def
def check_args(args):
# Check if firmware exist... | apache-2.0 |
nekulin/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/checkappend.py | 100 | 4658 | #! /usr/bin/env python
# Released to the public domain, by Tim Peters, 28 February 2000.
"""checkappend.py -- search for multi-argument .append() calls.
Usage: specify one or more file or directory paths:
checkappend [-v] file_or_dir [file_or_dir] ...
Each file_or_dir is checked for multi-argument .append() ca... | apache-2.0 |
pajlada/pajbot | pajbot/managers/emote.py | 1 | 13594 | from typing import Optional
import logging
import random
from pajbot.managers.redis import RedisManager
from pajbot.managers.schedule import ScheduleManager
from pajbot.models.emote import Emote, EmoteInstance, EmoteInstanceCount
from pajbot.streamhelper import StreamHelper
from pajbot.utils import iterate_split_wit... | mit |
EasonYi/flask | tests/test_templating.py | 148 | 13057 | # -*- coding: utf-8 -*-
"""
tests.templating
~~~~~~~~~~~~~~~~
Template functionality
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import pytest
import flask
import logging
from jinja2 import TemplateNotFound
def test_context_processing():
app = f... | bsd-3-clause |
MjAbuz/watchdog | vendor/pyExcelerator-0.6.3a/build/lib/pyExcelerator/Cell.py | 15 | 5886 | #!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Roman V. Kiseliov
# 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 re... | agpl-3.0 |
NiklasMM/coala | coalib/misc/CachingUtilities.py | 21 | 7156 | import hashlib
import os
import pickle
from coalib.misc import Constants
def get_data_path(log_printer, identifier):
"""
Get the full path of ``identifier`` present in the user's data directory.
:param log_printer: A LogPrinter object to use for logging.
:param identifier: The file whose path needs... | agpl-3.0 |
hansbogert/plugin.video.engadget | resources/lib/html5lib/constants.py | 963 | 87346 | from __future__ import absolute_import, division, unicode_literals
import string
import gettext
_ = gettext.gettext
EOF = None
E = {
"null-character":
_("Null character in input stream, replaced with U+FFFD."),
"invalid-codepoint":
_("Invalid codepoint in stream."),
"incorrectly-placed-so... | gpl-2.0 |
jelugbo/ddi | lms/djangoapps/instructor/features/bulk_email.py | 12 | 6758 | """
Define steps for bulk email acceptance test.
"""
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import mail
from nose.tools import assert_in, assert_equal # pylint: disable=E0611
from django.core.management import call_command
from django.conf import settings
... | agpl-3.0 |
michalliu/OpenWrt-Firefly-Libraries | staging_dir/host/lib/python2.7/SimpleHTTPServer.py | 29 | 7745 | """Simple HTTP Server.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
__version__ = "0.6"
__all__ = ["SimpleHTTPRequestHandler"]
import os
import posixpath
import BaseHTTPServer
import urllib
import cgi
import sys
import shutil
impor... | gpl-2.0 |
fafaman/django | tests/template_tests/syntax_tests/test_for.py | 45 | 8516 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import setup
class ForTagTests(SimpleTestCase):
libraries = {'custom': 'template_tests.templatetags.custom'}
@setup({'for-tag01'... | bsd-3-clause |
pdonadeo/django-oscar | src/oscar/apps/checkout/forms.py | 27 | 2926 | from django import forms
from oscar.core.loading import get_model
from django.contrib.auth.forms import AuthenticationForm
from django.utils.translation import ugettext_lazy as _
from oscar.apps.address.forms import AbstractAddressForm
from oscar.apps.customer.utils import normalise_email
from oscar.core.compat import... | bsd-3-clause |
axinging/sky_engine | mojo/tools/roll/update_from_chromium.py | 9 | 3601 | #!/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 argparse
import json
import os
import subprocess
import sys
import urllib2
from utils import commit
from utils import mojo_root_... | bsd-3-clause |
MoamerEncsConcordiaCa/tensorflow | tensorflow/python/kernel_tests/conv_ops_3d_test.py | 2 | 16642 | # 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 |
weiawe/django | django/core/cache/backends/locmem.py | 586 | 4287 | "Thread-safe in-memory cache backend."
import time
from contextlib import contextmanager
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.utils.synch import RWLock
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
# Global in-memor... | bsd-3-clause |
un33k/CouchPotatoServer | libs/subliminal/services/subswiki.py | 105 | 5182 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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... | gpl-3.0 |
xfournet/intellij-community | python/lib/Lib/encodings/unicode_escape.py | 852 | 1184 | """ Python 'unicode-escape' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is inte... | apache-2.0 |
40223113/0623-w17 | static/Brython3.1.1-20150328-091302/Lib/xml/sax/handler.py | 925 | 13922 | """
This module contains the core classes of version 2.0 of SAX for Python.
This file provides only default classes with absolutely minimum
functionality, from which drivers and applications can be subclassed.
Many of these classes are empty and are included only as documentation
of the interfaces.
$Id$
"""
version ... | gpl-3.0 |
lmregus/Portfolio | python/design_patterns/env/lib/python3.7/site-packages/pygments/lexers/_scilab_builtins.py | 31 | 52405 | # -*- coding: utf-8 -*-
"""
pygments.lexers._scilab_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the ScilabLexer.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
# Autogenerated
commands_kw = (
'abort',
'apropos... | mit |
odubno/microblog | venv/lib/python2.7/site-packages/babel/localtime/_win32.py | 82 | 2801 | try:
import _winreg as winreg
except ImportError:
try:
import winreg
except ImportError:
winreg = None
from babel.core import get_global
import pytz
tz_names = get_global('windows_zone_mapping')
def valuestodict(key):
"""Convert a registry key's values to a dictionary."""
dict =... | bsd-3-clause |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/MarkupSafe-0.23/markupsafe/tests.py | 674 | 6107 | # -*- coding: utf-8 -*-
import gc
import sys
import unittest
from markupsafe import Markup, escape, escape_silent
from markupsafe._compat import text_type
class MarkupTestCase(unittest.TestCase):
def test_adding(self):
# adding two strings should escape the unsafe one
unsafe = '<script type="appl... | mit |
chaowyc/youtube-dl | youtube_dl/extractor/pladform.py | 103 | 3156 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none,
xpath_text,
qualities,
)
class PladformIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://
(?:
... | unlicense |
ceelian/Flatty | setup.py | 1 | 1423 | from setuptools import setup, find_packages
from distutils.cmd import Command
import codecs
import sys, os
import doctest
from glob import glob
sys.path.insert(0,'src/')
init_pyc = 'src/flatty/__init__.pyc'
if os.path.exists(init_pyc):
os.remove(init_pyc)
import flatty
if os.path.exists("doc/source/introduction... | bsd-3-clause |
todaychi/hue | desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/Util/test_winrandom.py | 131 | 1772 | # -*- coding: utf-8 -*-
#
# SelfTest/Util/test_winrandom.py: Self-test for the winrandom module
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that d... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.