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 |
|---|---|---|---|---|---|
cm-a7lte/device_samsung_a7lte | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
FlashGordon95/Financial-Portfolio-Flask | venv/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 |
MrFastDie/shoutcast-api | bs4/builder/_htmlparser.py | 71 | 9102 | """Use the HTMLParser library to parse HTML files that aren't too bad."""
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import HTMLParser
try:
from HTMLParser import HTMLParseError
except ImportError, e:
# HTMLParseError is removed in Python 3.5. Since it can never be
# thrown in 3.5, we... | mit |
Matt-Deacalion/django | tests/auth_tests/test_views.py | 16 | 45028 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import itertools
import os
import re
from importlib import import_module
from django.apps import apps
from django.conf import settings
from django.contrib.admin.models import LogEntry
from django.contrib.auth import REDIRECT_FIELD_NAME, S... | bsd-3-clause |
alexschiller/osf.io | website/oauth/models/__init__.py | 6 | 23632 | # -*- coding: utf-8 -*-
import abc
import logging
import datetime
import functools
import httplib as http
import time
import urlparse
import uuid
from flask import request
from django.utils import timezone
from oauthlib.oauth2.rfc6749.errors import MissingTokenError
from requests.exceptions import HTTPError as Reques... | apache-2.0 |
albertjan/pypyjs-presentation | assets/js/pypy.js-0.3.1/lib/modules/commands.py | 264 | 2545 | """Execute shell commands via os.popen() and return status, output.
Interface summary:
import commands
outtext = commands.getoutput(cmd)
(exitstatus, outtext) = commands.getstatusoutput(cmd)
outtext = commands.getstatus(file) # returns output of "ls -ld file"
A trailing newline is remov... | unlicense |
jirutka/ngx-oauth | integration/support/nginx_server.py | 1 | 1260 | import os
from os import path
import shlex
from subprocess import Popen
from time import sleep
from .util import write_file
import requests
from requests import ConnectionError
from retry import retry
__all__ = ['NginxServer']
class NginxServer:
def __init__(self, nginx_conf, check_url, temp_dir='.'):
... | mit |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/encodings/cp720.py | 417 | 13694 | """Python Character Mapping Codec cp720 generated on Windows:
Vista 6.0.6002 SP2 Multiprocessor Free with the command:
python Tools/unicode/genwincodec.py 720
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,error... | bsd-2-clause |
Liyier/learning_log | env/Lib/site-packages/pip/compat/dictconfig.py | 921 | 23096 | # This is a copy of the Python logging.config.dictconfig module,
# reproduced with permission. It is provided here for backwards
# compatibility for Python versions prior to 2.7.
#
# Copyright 2009-2010 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# docu... | mit |
Adnn/django | django/utils/text.py | 308 | 14923 | from __future__ import unicode_literals
import re
import unicodedata
from gzip import GzipFile
from io import BytesIO
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import SimpleLazyObject, allow_lazy
from django.utils.safestring import SafeText, mark_safe
from ... | bsd-3-clause |
supertree-toolkit/stk | stk/stk_import_export.py | 1 | 22750 | #!/usr/bin/env python
#
# Supertree Toolkit. Software for managing and manipulating sources
# trees ready for supretree construction.
# Copyright (C) 2011, Jon Hill, Katie Davis
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | gpl-3.0 |
hpfem/agros2d | resources/python/pylint/checkers/newstyle.py | 4 | 4489 | # Copyright (c) 2005-2006 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, o... | gpl-2.0 |
pronobis/rocs | thirdparty/gtest-1.6.0/test/gtest_test_utils.py | 397 | 10437 | #!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | bsd-2-clause |
divio/askbot-devel | askbot/views/writers.py | 1 | 39556 | # encoding:utf-8
"""
:synopsis: views diplaying and processing main content post forms
This module contains views that allow adding, editing, and deleting main textual content.
"""
import datetime
import logging
import os
import os.path
import random
import sys
import tempfile
import time
from django.shortcuts import ... | gpl-3.0 |
GoogleChrome/big-rig | app/src/thirdparty/telemetry/internal/backends/mandoline/desktop_mandoline_finder.py | 9 | 5077 | # Copyright 2015 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.
"""Finds desktop mandoline browsers that can be controlled by telemetry."""
import os
import sys
from telemetry.core import exceptions
from telemetry.core i... | apache-2.0 |
Jusedawg/SickRage | lib/hachoir_parser/image/common.py | 95 | 1429 | from hachoir_core.field import FieldSet, UserVector, UInt8
class RGB(FieldSet):
color_name = {
( 0, 0, 0): "Black",
(255, 0, 0): "Red",
( 0, 255, 0): "Green",
( 0, 0, 255): "Blue",
(255, 255, 255): "White",
}
static_size = 24
def createFields(self... | gpl-3.0 |
hopeall/odoo | openerp/exceptions.py | 312 | 3157 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 |
kmshi/miroguide | channelguide/channels/migrations/0003_switch_user_ids.py | 1 | 13086 |
from south.db import db
from django.db import models
from channelguide.channels.models import *
class Migration:
no_dry_run = True
def forwards(self, orm):
"Write your forwards migration here"
for channel in orm.Channel.objects.all():
for field in ('owner', 'featured_by', 'moderat... | agpl-3.0 |
pombredanne/PyGithub | github/__init__.py | 2 | 2945 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 |
QingChenmsft/azure-cli | src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py | 2 | 20903 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit |
Aloomaio/graphite-web | webapp/graphite/composer/views.py | 58 | 3906 | """Copyright 2008 Orbitz WorldWide
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 |
germanovm/vdsm | vdsm/network/utils.py | 2 | 1110 | # Copyright 2015 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... | gpl-2.0 |
skdaccess/skdaccess | skdaccess/geo/srtm/cache/data_fetcher.py | 2 | 10677 | # The MIT License (MIT)
# Copyright (c) 2016 Massachusetts Institute of Technology
#
# Authors: Cody Rude, Guillaume Rongier
# This software has been created in projects supported by the US National
# Science Foundation and NASA (PI: Pankratius)
#
# Permission is hereby granted, free of charge, to any person obtaining ... | mit |
janusnic/Djrill | djrill/tests/test_mandrill_subaccounts.py | 3 | 2389 | from django.core import mail
from .mock_backend import DjrillBackendMockAPITestCase
from .utils import override_settings
class DjrillMandrillSubaccountTests(DjrillBackendMockAPITestCase):
"""Test Djrill backend support for Mandrill subaccounts"""
def test_send_basic(self):
mail.send_mail('Subject he... | bsd-3-clause |
masayukig/tempest | tempest/tests/lib/services/network/test_qos_client.py | 3 | 4637 | # Copyright (c) 2019 Ericsson
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 |
ltilve/ChromiumGStreamerBackend | third_party/cython/src/Cython/Plex/Actions.py | 105 | 2361 | #=======================================================================
#
# Python Lexical Analyser
#
# Actions for use in token specifications
#
#=======================================================================
class Action(object):
def perform(self, token_stream, text):
pass # abstract
def same... | bsd-3-clause |
labkode/rtlv | handlers.py | 1 | 6340 | from google.appengine.ext.db import BadValueError
from google.appengine.api import channel
from google.appengine.api import users
from google.appengine.ext import ndb
import webapp2
import jinja2
import os
import json
from datetime import datetime
import time
from models import Log
from models import System
JINJA_E... | agpl-3.0 |
zcth428/hpctoolkit111 | src/tool/hpcrun/sample-sources/make-cuda-wrappers.py | 4 | 11612 | #!/usr/local/bin/python
# -*- python -*-
#
# HPCToolkit MPI Profiler
# this script is adapted from mpiP MPI Profiler ( http://mpip.sourceforge.net/ )
#
# Please see COPYRIGHT AND LICENSE information at the end of this file.
#
#
# make-wrappers.py -- parse the mpi prototype file and generate a
# series o... | bsd-3-clause |
incuna/authentic | authentic2/auth2_auth/auth2_openid/views.py | 1 | 17205 | import urllib
from django_authopenid.forms import OpenidDissociateForm, AssociateOpenID
from django_authopenid.forms import OpenidSigninForm
from django_authopenid import DjangoOpenIDStore
from django_authopenid.models import UserAssociation
from django_authopenid.utils import *
from django_authopenid.views import ass... | agpl-3.0 |
swiftix/swift.old | docs/conf.py | 9 | 9024 | # -*- coding: utf-8 -*-
#
# Swift documentation build configuration file.
#
# 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 configuration values have a default; values that are commente... | apache-2.0 |
kaarl/pyload | module/plugins/crypter/FilecryptCc.py | 2 | 7916 | # -*- coding: utf-8 -*-
#
# Test links:
# http://filecrypt.cc/Container/64E039F859.html
import binascii
import re
import urlparse
import Crypto.Cipher.AES
from module.plugins.internal.Crypter import Crypter
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.captcha.SolveMedia import SolveMe... | gpl-3.0 |
espressomd/espresso | maintainer/benchmarks/lb.py | 1 | 6553 | #
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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... | gpl-3.0 |
EduPepperPDTesting/pepper2013-testing | lms/djangoapps/sso/cache.py | 42 | 3438 | # Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2010 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | agpl-3.0 |
alhashash/odoo | openerp/osv/query.py | 8 | 7446 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 OpenERP S.A. http://www.openerp.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
frontg8/frontg8lib | doc/ext/breathe/breathe/renderer/filter.py | 1 | 37770 | """
Filters
-------
Filters are an interesting and somewhat challenging part of the code base. They are used for
two different purposes:
- To figure out which nodes in the xml hierarchy to start rendering from. These are called
'finder filters' or 'content filters'. This is done before rendering starts.
- To fig... | bsd-3-clause |
inspyration/odoo | addons/l10n_be_hr_payroll_account/__openerp__.py | 298 | 1626 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 |
shravya-ks/ns-3-tcp-prague | doc/tutorial/source/conf.py | 72 | 7057 | # -*- coding: utf-8 -*-
#
# ns-3 documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 14 09:00:39 2010.
#
# 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 co... | gpl-2.0 |
jjgoings/McMurchie-Davidson | mmd/utils/spectrum.py | 1 | 3029 | from __future__ import division
import numpy as np
"""Contains some routines to do the (Pade approximant) Fourier transform
as well as some peak-finding routines, useful for post processing a
real-time calculation
"""
def genSpectra(time,dipole,signal):
fw, frequency = pade(time,dipole)
fw_sig, frequen... | bsd-3-clause |
danielfrg/remote-pip | rpip/tests/test_output.py | 1 | 1204 | from rpip.output import Output
exit0 = {'exit_code': 0, 'stdout': 'yes', 'stderr': ''}
exit1 = {'exit_code': 1, 'stdout': '', 'stderr': 'ERROR'}
o0 = {'host1': exit0, 'host2': exit0, 'host3': exit0}
o1 = {'host1': exit0, 'host2': exit1, 'host3': exit0}
o2 = {'host1': exit0, 'host2': exit1, 'host3': exit1}
def test_... | apache-2.0 |
yitian134/chromium | third_party/protobuf/python/google/protobuf/internal/python_message.py | 259 | 40284 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause |
OSSystems/glmark2 | waflib/Tools/qt4.py | 12 | 14141 | #! /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
try:
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
except ImportError:
h... | gpl-3.0 |
namlook/mongokit | mongokit/schema_document.py | 1 | 42677 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2011, Nicolas Clairon
# 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 abov... | bsd-3-clause |
martynovp/edx-platform | lms/djangoapps/ccx/tests/test_utils.py | 21 | 21985 | """
test utils
"""
from nose.plugins.attrib import attr
from ccx.models import ( # pylint: disable=import-error
CcxMembership,
CcxFutureMembership,
)
from ccx.tests.factories import ( # pylint: disable=import-error
CcxFactory,
CcxMembershipFactory,
CcxFutureMembershipFactory,
)
from student.roles... | agpl-3.0 |
public-ink/public-ink | server/appengine/lib/graphql/validation/rules/no_unused_fragments.py | 3 | 1489 | from ...error import GraphQLError
from .base import ValidationRule
class NoUnusedFragments(ValidationRule):
__slots__ = 'fragment_definitions', 'operation_definitions', 'fragment_adjacencies', 'spread_names'
def __init__(self, context):
super(NoUnusedFragments, self).__init__(context)
self.op... | gpl-3.0 |
virneo/nupic | nupic/data/inference_shifter.py | 39 | 3485 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
vinilios/synnefo | snf-astakos-app/astakos/im/register.py | 8 | 6325 | # Copyright (C) 2010-2014 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed i... | gpl-3.0 |
crosswalk-project/crosswalk-test-suite | webapi/webapi-appuri-w3c-tests/inst.apk.py | 1996 | 3186 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
ADB_CMD = "adb"
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool... | bsd-3-clause |
c0hen/django-venv | lib/python3.4/site-packages/django/db/backends/oracle/creation.py | 23 | 17817 | import sys
import time
from django.conf import settings
from django.db.backends.base.creation import BaseDatabaseCreation
from django.db.utils import DatabaseError
from django.utils.crypto import get_random_string
from django.utils.functional import cached_property
from django.utils.six.moves import input
TEST_DATABA... | gpl-3.0 |
SOKP/kernel_samsung_espresso10 | tools/perf/python/twatch.py | 3213 | 1338 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 |
uqtimes/Cocos2d-x_Study_20140127 | Cocos2d-x_3D/cocos2d/tools/gen-prebuilt/excopy.py | 94 | 3283 | #!/usr/bin/python
# ----------------------------------------------------------------------------
# extend methods for copy files/dirs
#
# Copyright 2014 (C) zhangbin
#
# License: MIT
# ----------------------------------------------------------------------------
import os
import shutil
def copy_files_in_dir(src, dst):... | mit |
thaumos/ansible | lib/ansible/module_utils/vexata.py | 37 | 3074 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2019, Sandeep Kasargod <sandeep@vexata.com>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
HAS_VEXATAPI = True
try:
from vexatapi.vexata_api_proxy import VexataAPIProxy
except ImportError:
HAS_VEXATAPI = Fal... | gpl-3.0 |
mrquim/mrquimrepo | repo/plugin.video.Rising.Tides/resources/modules/js2py/prototypes/jsregexp.py | 34 | 1251 |
class RegExpPrototype:
def toString():
flags = u''
if this.glob:
flags += u'g'
if this.ignore_case:
flags += u'i'
if this.multiline:
flags += u'm'
v = this.value if this.value else '(?:)'
return u'/%s/'%v + flags
def test(stri... | gpl-2.0 |
boooka/GeoPowerOff | venv/lib/python2.7/site-packages/django/contrib/sessions/backends/cached_db.py | 67 | 2846 | """
Cached, database-backed sessions.
"""
import logging
from django.conf import settings
from django.contrib.sessions.backends.db import SessionStore as DBStore
from django.core.cache import caches
from django.core.exceptions import SuspiciousOperation
from django.utils import timezone
from django.utils.encoding imp... | apache-2.0 |
JohnUrban/fast5tools | bin/samGenomicWindows.py | 1 | 5426 | #!/usr/bin/env python2.7
import argparse
from collections import defaultdict
from fast5tools.samclass import *
from fast5tools.samops import *
parser = argparse.ArgumentParser(description="""
DESCRIPTION
Given a SAM file (with F5:Z: info attached) that is sorted by read name:
- get the alignment or set o... | mit |
nchammas/spark | python/pyspark/ml/util.py | 7 | 22026 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 |
DigitalCampus/django-oppia | api/resources/course.py | 1 | 9945 | import json
import os
import re
import shutil
import xmltodict
import zipfile
from django.conf import settings
from django.conf.urls import url
from django.core.exceptions import MultipleObjectsReturned
from django.db.models import Q
from django.http import HttpResponse, Http404
from django.utils.translation import ug... | gpl-3.0 |
resmo/ansible | test/units/modules/network/fortimanager/test_fmgr_secprof_voip.py | 38 | 2698 | # Copyright 2018 Fortinet, 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 the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 |
jtux270/translate | ovirt/3.6_source/packaging/setup/plugins/ovirt-engine-common/base/network/process_firewalld_services.py | 8 | 3043 | #
# ovirt-engine-setup -- ovirt engine setup
# Copyright (C) 2013-2015 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
#
# Unl... | gpl-3.0 |
magicrub/mavlink | pymavlink/generator/lib/genxmlif/xmlif4Dom.py | 79 | 5669 | #
# genxmlif, Release 0.9.0
# file: xmlif4Dom.py
#
# XML interface class to the 4DOM library
#
# history:
# 2005-04-25 rl created
# 2008-07-01 rl Limited support of XInclude added
#
# Copyright (c) 2005-2008 by Roland Leuthe. All rights reserved.
#
# ----------------------------------------------------... | lgpl-3.0 |
cheungpat/sqlalchemy-utils | tests/types/test_tsvector.py | 4 | 2424 | import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import TSVECTOR
from sqlalchemy_utils import TSVectorType
from tests import TestCase
class TestTSVector(TestCase):
dns = 'postgres://postgres@localhost/sqlalchemy_utils_test'
def create_models(self):
class User(self.Base):
__tab... | bsd-3-clause |
Versent/ansible | lib/ansible/plugins/connections/jail.py | 131 | 7291 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it... | gpl-3.0 |
yilei0620/3D_Conditional_Gan | GenSample_obj.py | 1 | 4544 | import sys
sys.path.append('..')
import os
import json
from time import time
import numpy as np
from sklearn.externals import joblib
import scipy
from scipy import io
# from matplotlib import pyplot as plt
# from sklearn.externals import joblib
import theano
import theano.tensor as T
from lib import activations
fro... | mit |
yewang15215/django | tests/gis_tests/tests.py | 12 | 4177 | import sys
import unittest
from django.core.exceptions import ImproperlyConfigured
from django.db import ProgrammingError
from django.utils import six
try:
from django.contrib.gis.db.backends.postgis.operations import PostGISOperations
HAS_POSTGRES = True
except ImportError:
HAS_POSTGRES = False
except Im... | bsd-3-clause |
GeoscienceAustralia/agdc | src/dbutil.py | 4 | 25902 | #!/usr/bin/env python
#===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... | bsd-3-clause |
735tesla/SneakPeep | unidecode/x0b9.py | 253 | 4704 | data = (
'ruk', # 0x00
'rut', # 0x01
'rup', # 0x02
'ruh', # 0x03
'rweo', # 0x04
'rweog', # 0x05
'rweogg', # 0x06
'rweogs', # 0x07
'rweon', # 0x08
'rweonj', # 0x09
'rweonh', # 0x0a
'rweod', # 0x0b
'rweol', # 0x0c
'rweolg', # 0x0d
'rweolm', # 0x0e
'rweolb', # 0x0f
'rweols',... | apache-2.0 |
marinho/geraldo | site/newsite/django_1_0/django/db/backends/mysql/creation.py | 9 | 1281 | # This dictionary maps Field objects to their associated MySQL column
# types, as strings. Column-type strings can contain format strings; they'll
# be interpolated against the values of Field.__dict__ before being output.
# If a column type is set to None, it won't be included in the output.
DATA_TYPES = {
'AutoFi... | lgpl-3.0 |
lochiiconnectivity/libcloud | libcloud/dns/drivers/pointdns.py | 22 | 28897 | # 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 |
neilpelow/wmap-django | venv/lib/python3.5/site-packages/django/contrib/gis/geos/coordseq.py | 374 | 5482 | """
This module houses the GEOSCoordSeq object, which is used internally
by GEOSGeometry to house the actual coordinates of the Point,
LineString, and LinearRing geometries.
"""
from ctypes import byref, c_double, c_uint
from django.contrib.gis.geos import prototypes as capi
from django.contrib.gis.geos.base import... | gpl-3.0 |
goose3/goose3 | tests/test_reportagenewsarticle.py | 2 | 1221 | # -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... | apache-2.0 |
trezorg/django | django/templatetags/future.py | 226 | 3486 | from django.conf import settings
from django.template import Library, Node, Template, TemplateSyntaxError
from django.template.defaulttags import kwarg_re, include_is_allowed, SsiNode, URLNode
from django.utils.encoding import smart_str
register = Library()
@register.tag
def ssi(parser, token):
"""
Outputs t... | bsd-3-clause |
simbha/mAngE-Gin | lib/Django 1.7/django/contrib/messages/api.py | 512 | 3202 | from django.contrib.messages import constants
from django.contrib.messages.storage import default_storage
from django.http import HttpRequest
__all__ = (
'add_message', 'get_messages',
'get_level', 'set_level',
'debug', 'info', 'success', 'warning', 'error',
'MessageFailure',
)
class MessageFailure(E... | mit |
sahiljain/catapult | telemetry/telemetry/decorators.py | 6 | 11985 | # 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.
# pylint: disable=protected-access
import datetime
import functools
import os
import inspect
import types
import warnings
def Cache(obj):
"""Decorator fo... | bsd-3-clause |
axbaretto/beam | sdks/python/.tox/docs/lib/python2.7/site-packages/jinja2/_compat.py | 214 | 2596 | # -*- coding: utf-8 -*-
"""
jinja2._compat
~~~~~~~~~~~~~~
Some py2/py3 compatibility support based on a stripped down
version of six so we don't have to depend on a specific version
of it.
:copyright: Copyright 2013 by the Jinja team, see AUTHORS.
:license: BSD, see LICENSE for details.
""... | apache-2.0 |
benjamindeleener/odoo | addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py | 46 | 1421 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.exceptions import UserError
class hr_timesheet_current_open(osv.osv_memory):
_name = 'hr.timesheet.current.open'
... | gpl-3.0 |
leppa/home-assistant | homeassistant/components/wink/switch.py | 12 | 2085 | """Support for Wink switches."""
import logging
import pywink
from homeassistant.helpers.entity import ToggleEntity
from . import DOMAIN, WinkDevice
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Wink platform."""
for switch in pyw... | apache-2.0 |
wkschwartz/django | tests/runtests.py | 2 | 23029 | #!/usr/bin/env python
import argparse
import atexit
import copy
import os
import shutil
import socket
import subprocess
import sys
import tempfile
import warnings
try:
import django
except ImportError as e:
raise RuntimeError(
'Django module not found, reference tests/README.rst for instructions.'
... | bsd-3-clause |
matthiasdiener/spack | var/spack/repos/builtin/packages/perl-sub-name/package.py | 5 | 1543 | ##############################################################################
# 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 |
samrussell/ryu | ryu/tests/integrated/tester.py | 63 | 7221 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 |
kittiu/odoo | addons/account_payment/__openerp__.py | 261 | 2925 | # -*- 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 |
Keisuke69/libcloud | libcloud/loadbalancer/drivers/cloudstack.py | 1 | 4800 | # 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 |
ChrisHirsch/robotframework | src/robot/output/debugfile.py | 22 | 3702 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | apache-2.0 |
neuroidss/nupic.vision | nupicvision/regions/extra/GaborNode2.py | 8 | 141814 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | gpl-3.0 |
igemsoftware/SYSU-Software2013 | project/Python27_32/Lib/stat.py | 179 | 1718 | """Constants/functions for interpreting results of os.stat() and os.lstat().
Suggested usage: from stat import *
"""
# Indices for stat struct members in the tuple returned by os.stat()
ST_MODE = 0
ST_INO = 1
ST_DEV = 2
ST_NLINK = 3
ST_UID = 4
ST_GID = 5
ST_SIZE = 6
ST_ATIME = 7
ST_MTIME = 8
ST_CTIME = 9
... | mit |
ar7z1/ansible | test/units/modules/network/f5/test_bigip_trunk.py | 5 | 4616 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
from nose.plugins.skip i... | gpl-3.0 |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.py | 185 | 8711 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# 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... | agpl-3.0 |
tobeyrowe/smallchange | share/qt/make_spinner.py | 4415 | 1035 | #!/usr/bin/env python
# W.J. van der Laan, 2011
# Make spinning .mng animation from a .png
# Requires imagemagick 6.7+
from __future__ import division
from os import path
from PIL import Image
from subprocess import Popen
SRC='img/reload_scaled.png'
DST='../../src/qt/res/movies/update_spinner.mng'
TMPDIR='/tmp'
TMPNAM... | mit |
davidmueller13/g3_kernel | tools/perf/util/setup.py | 4998 | 1330 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
nricklin/PyGithub | github/tests/GistComment.py | 39 | 2819 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 |
elshize/qutebrowser | tests/unit/mainwindow/statusbar/test_backforward.py | 2 | 3211 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2017-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | gpl-3.0 |
BBN-Q/Quince | quince/param.py | 1 | 16560 | # coding: utf-8
# Raytheon BBN Technologies 2016
# Contributiors: Graham Rowlands
#
# This file contains the parameter descriptions
from qtpy.QtGui import *
from qtpy.QtCore import *
from qtpy.QtWidgets import *
import os
class Parameter(QGraphicsEllipseItem):
"""docstring for Parameter"""
def __init__(self,... | apache-2.0 |
charleso/git-cc | git_cc/gitcc.py | 1 | 2009 | #!/usr/bin/env python
import inspect
import sys
from optparse import OptionParser
from . import checkin
from . import init
from . import rebase
from . import reset
from . import sync
from . import tag
from . import update
from . import version
commands = [
init, rebase, checkin, sync, reset, tag, update, version... | gpl-2.0 |
weso/CWR-DataApi | tests/grammar/factory/record/test_work_conflict.py | 1 | 6028 | # -*- coding: utf-8 -*-
import unittest
from pyparsing import ParseException
from tests.utils.grammar import get_record_grammar
"""
CWR Work conflict grammar tests.
"""
__author__ = 'Bernardo Martínez Garrido'
__license__ = 'MIT'
__status__ = 'Development'
class TestWorkValid(unittest.TestCase):
"""
Tests... | mit |
rimbalinux/MSISDNArea | django/contrib/gis/geos/prepared.py | 13 | 1039 | from django.contrib.gis.geos.base import GEOSBase
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos.prototypes import prepared as capi
class PreparedGeometry(GEOSBase):
"""
A geometry that is prepared for performing certain operations.
At the moment this includes... | bsd-3-clause |
G8bao7/camelbell-server | check_oracle.py | 1 | 10171 | #!//bin/env python
#coding:utf-8
import os
import sys
import string
import time
import datetime
import MySQLdb
import cx_Oracle
import logging
import logging.config
logging.config.fileConfig("etc/logger.ini")
logger = logging.getLogger("oracle")
path='./include'
sys.path.insert(0,path)
import functions as func
import c... | gpl-3.0 |
Split-Screen/android_kernel_motorola_msm8916 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
danbeam/catapult | third_party/oauth2client/oauth2client/util.py | 60 | 5704 | #!/usr/bin/env python
#
# Copyright 2014 Google Inc. 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 require... | bsd-3-clause |
beni55/viewfinder | backend/services/itunes_store.py | 13 | 7553 | # Copyright 2012 Viewfinder Inc. All Rights Reserved
"""iTunes Store service client.
Server-side code for working with iTunes/App Store in-app purchases.
Contents:
* ITunesStoreClient: Communicates with the store to verify receipts and
process renewals.
"""
import base64
import json
import logging
import time
fro... | apache-2.0 |
CubicERP/odoo | addons/account/wizard/account_move_line_unreconcile_select.py | 385 | 1864 | # -*- 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 |
qgis/QGIS | python/plugins/otbprovider/OtbProviderPlugin.py | 9 | 1557 | # -*- coding: utf-8 -*-
"""
***************************************************************************
OtbProviderPlugin.py
---------------------
Date : June 2021
Copyright : (C) 2021 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
**********... | gpl-2.0 |
rahul67/hue | desktop/core/ext-py/boto-2.38.0/boto/roboto/awsqueryrequest.py | 153 | 18579 | # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, 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
# withou... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.