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 |
|---|---|---|---|---|---|
google/contentbox | third_party/openid/test/test_auth_request.py | 8 | 7976 | import cgi
import unittest
from openid.consumer import consumer
from openid import message
from openid.test import support
class DummyEndpoint(object):
preferred_namespace = None
local_id = None
server_url = None
is_op_identifier = False
def preferredNamespace(self):
return self.preferred... | apache-2.0 |
ahb0327/intellij-community | python/helpers/docutils/writers/newlatex2e/unicode_map.py | 57 | 73567 | # $Id$
# Author: Lea Wiemann <LeWiemann@gmail.com>
# Copyright: This file has been placed in the public domain.
# This is a mapping of Unicode characters to LaTeX equivalents.
# The information has been extracted from
# <http://www.w3.org/2003/entities/xml/unicode.xml>, written by
# David Carlisle and Sebastian Rahtz.... | apache-2.0 |
mihaipopa12/PythonTrees | RBTree.py | 1 | 11132 | #!/usr/bin/python3
from Dictionary import Dictionary
import unittest
import string
import random
class RBNode(object):
def __init__(self, colour, key, value=None, parent=None, left_son=None, right_son=None):
self.colour = colour
self.key = key
self.value = value
self.parent = p... | mit |
suyashphadtare/vestasi-erp-final | erpnext/selling/doctype/quotation/quotation.py | 2 | 6460 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr,cint
from frappe.model.mapper import get_mapped_doc
from frappe import _
from erpnext.controllers.sellin... | agpl-3.0 |
PrasadG193/gcc_gimple_fe | gcc/ada/doc/share/conf.py | 69 | 3588 | # -*- coding: utf-8 -*-
#
# GNAT build configuration file
import sys
import os
import time
import re
sys.path.append('.')
import ada_pygments
import latex_elements
# Some configuration values for the various documentation handled by
# this conf.py
DOCS = {
'gnat_rm': {
'title': u'GNAT Reference Manual'... | gpl-2.0 |
silklabs/silk | node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py | 1509 | 17165 | # Copyright (c) 2013 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.
"""Handle version information related to Visual Stuio."""
import errno
import os
import re
import subprocess
import sys
import gyp
import glob
class VisualStudi... | mit |
luzpaz/QGIS | tests/src/python/test_qgsmarkerlinesymbollayer.py | 18 | 16420 | # -*- coding: utf-8 -*-
"""
***************************************************************************
test_qgsmarkerlinesymbollayer.py
---------------------
Date : November 2018
Copyright : (C) 2018 by Nyall Dawson
Email : nyall dot dawson at gmail dot co... | gpl-2.0 |
unicefuganda/edtrac | edtrac_project/rapidsms/lib/rapidsms/contrib/ajax/app.py | 4 | 8647 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import cgi
import urlparse
import traceback
from threading import Thread
from SocketServer import ThreadingMixIn
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from django.utils.simplejson import JSONEncoder
from django.db.models.query import QuerySet
... | bsd-3-clause |
sorenh/tempest-lib | tempest_lib/tests/fake_credentials.py | 5 | 1949 | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | apache-2.0 |
KamillaKhabibrakhmanova/fish | node_modules/ionic/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py | 428 | 57360 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
"""
import copy
import gyp.common... | mit |
cewood/ansible | lib/ansible/utils/color.py | 167 | 3134 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
oesteban/dipy | doc/examples/reslice_datasets.py | 12 | 1810 |
"""
==========================
Reslice diffusion datasets
==========================
Overview
--------
Often in imaging it is common to reslice images in different resolutions.
Especially in dMRI we usually want images with isotropic voxel size as they
facilitate most tractography algorithms. In this example we show... | bsd-3-clause |
zfrenchee/pandas | pandas/tests/io/json/test_ujson.py | 1 | 56098 | # -*- coding: utf-8 -*-
try:
import json
except ImportError:
import simplejson as json
import math
import pytz
import pytest
import time
import datetime
import calendar
import re
import decimal
import dateutil
from functools import partial
from pandas.compat import range, zip, StringIO, u
import pandas._libs.j... | bsd-3-clause |
geopython/stetl | tests/filters/test_string_concat_filter.py | 2 | 1332 | import os
from stetl.etl import ETL
from stetl.filters.packetbuffer import PacketBuffer
from stetl.filters.stringfilter import StringConcatFilter
from tests.stetl_test_case import StetlTestCase
class StringConcatFilterTest(StetlTestCase):
"""Unit tests for StringConcatFilter"""
def setUp(self):
super... | gpl-3.0 |
seanbell/opensurfaces | server/bsdfs/experiments.py | 1 | 9415 | import json
from decimal import Decimal
from collections import Counter
from django.conf import settings
from django.db.models import Q
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
from accounts.models import UserProfile
from shapes.models import Shape, Materi... | mit |
sxjscience/tvm | tests/python/frontend/tensorflow/test_no_op.py | 4 | 1666 | # 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 |
N9dZ/LearnCodeTheHardWay | ex24.py | 1 | 1131 | print "Let's practice everything."
print 'You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs.'
# there's variable for a real poem
poem = """
\tThe lovely world
with logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\... | gpl-2.0 |
tanghaibao/goatools | goatools/godag/relationship_str.py | 1 | 3956 | """Create strings representing relationships on GO Terms.
+------- has 'part_of' relationship(s)
| +-- pointed to by a GO ID with a 'part_of' relationship
| |
V V
GO:0008150 L00 D00 .... .rdu biological_process
GO:0050896 L01 D01 ....... | bsd-2-clause |
caphrim007/ansible | lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group.py | 20 | 11351 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
hopeall/odoo | addons/crm/report/crm_phonecall_report.py | 309 | 3982 | # -*- 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 |
sebalix/OpenUpgrade | addons/website_mail/models/mail_thread.py | 338 | 1454 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
nirmeshk/oh-mainline | vendor/packages/twisted/doc/core/benchmarks/deferreds.py | 18 | 3990 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
See how fast deferreds are.
This is mainly useful to compare cdefer.Deferred to defer.Deferred
"""
from twisted.internet import defer
from timer import timeit
benchmarkFuncs = []
def benchmarkFunc(iter, args=()):
"""
A decorator f... | agpl-3.0 |
petemounce/ansible | lib/ansible/modules/packaging/language/npm.py | 70 | 8945 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chris Hoffman <christopher.hoffman@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version ... | gpl-3.0 |
chriscondon/billtext | tasks/committee_meetings.py | 3 | 26486 | import utils
import os.path
import os
import re
import datetime
import json
import lxml.etree
import uuid
import logging
import mechanize
import zipfile
import StringIO
import requests
import subprocess
from email.utils import parsedate
from time import mktime
# to get text files their is a new dependency; you need t... | cc0-1.0 |
numpy/numpy | numpy/core/tests/test_records.py | 9 | 20262 | import collections.abc
import textwrap
from io import BytesIO
from os import path
from pathlib import Path
import pytest
import numpy as np
from numpy.testing import (
assert_, assert_equal, assert_array_equal, assert_array_almost_equal,
assert_raises, temppath,
)
from numpy.compat import pickle
class Te... | bsd-3-clause |
moble/sympy | sympy/physics/quantum/commutator.py | 59 | 6557 | """The commutator: [A,B] = A*B - B*A."""
from __future__ import print_function, division
from sympy import S, Expr, Mul, Add
from sympy.core.compatibility import u
from sympy.printing.pretty.stringpict import prettyForm
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.operator import Operat... | bsd-3-clause |
cbrewster/servo | tests/wpt/web-platform-tests/tools/third_party/funcsigs/funcsigs/__init__.py | 48 | 30011 | # Copyright 2001-2013 Python Software Foundation; All Rights Reserved
"""Function signature objects for callables
Back port of Python 3.3's function signature tools from the inspect module,
modified to be compatible with Python 2.6, 2.7 and 3.2+.
"""
from __future__ import absolute_import, division, print_function
imp... | mpl-2.0 |
jclgoodwin/bustimes.org.uk | vehicles/test_service_map_consumer.py | 1 | 3587 | import vcr
from freezegun import freeze_time
from channels.testing import WebsocketCommunicator
from django.test import TestCase, override_settings
from django.core.cache import cache
from django.utils import timezone
from busstops.models import Region, Service, ServiceCode, StopPoint, DataSource, SIRISource, Operator
... | mpl-2.0 |
hugolm84/tomahawk-charts | scraper/tomahawk/spiders/rdiospider.py | 1 | 2964 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) Hugo Lindström <hugolm84@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... | gpl-2.0 |
moneta-project2/bitex | apps/frauder/main.py | 6 | 4460 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import traceback
import argparse
import ConfigParser
from appdirs import site_config_dir
ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))
sys.path.insert(0, os.path.join( os.path.dirname(__file__), '../' ) )
import time
f... | gpl-3.0 |
huard/scipy-work | scipy/weave/examples/object.py | 12 | 1619 | """ Attribute and method access on Python objects from C++.
Note: std::cout type operations currently crash python...
Not sure what is up with this...
"""
import scipy.weave as weave
#----------------------------------------------------------------------------
# get/set attribute and call methods exampl... | bsd-3-clause |
kakunbsc/enigma2.2 | lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py | 2 | 10609 | from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Screens.Standby import TryQuitMainloop
from Components.ActionMap import ActionMap
from Components.Sources.StaticText import StaticText
from Components.Sources.Progress import Progress
from Components... | gpl-2.0 |
paultcochrane/bokeh | bokeh/server/settings.py | 13 | 3106 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2015, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#----------------------------------------... | bsd-3-clause |
skycucumber/xuemc | python/venv/lib/python2.7/site-packages/wtforms/ext/django/templatetags/wtforms.py | 177 | 2826 | """
Template tags for easy WTForms access in Django templates.
"""
from __future__ import unicode_literals
import re
from django import template
from django.conf import settings
from django.template import Variable
from ....compat import iteritems
register = template.Library()
class FormFieldNode(template.Node):
... | gpl-2.0 |
clemensv/qpid-proton | proton-c/bindings/python/setup.py | 4 | 16514 | #!/usr/bin/env python
#
# 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
# "... | apache-2.0 |
aldian/tensorflow | tensorflow/python/kernel_tests/distributions/categorical_test.py | 37 | 16554 | # Copyright 2015 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 |
40223101/w16b_test | static/Brython3.1.1-20150328-091302/Lib/calendar.py | 828 | 22940 | """Calendar printing functions
Note when comparing these calendars to the ones printed by cal(1): By
default, these calendars have Monday as the first day of the week, and
Sunday as the last (the European convention). Use setfirstweekday() to
set the first day of the week (0=Monday, 6=Sunday)."""
import sys
import da... | agpl-3.0 |
Ictp/indico | indico/MaKaC/webinterface/webFactoryRegistry.py | 2 | 2910 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 |
ondrejmular/pcs | pcs_test/tier0/lib/commands/dr/test_get_config.py | 3 | 4370 | from unittest import TestCase
from pcs import settings
from pcs.common import file_type_codes
from pcs.common.file import RawFileError
from pcs.common.reports import codes as report_codes
from pcs.lib.commands import dr
from pcs_test.tools.command_env import get_env_tools
from pcs_test.tools import fixture
REASON = ... | gpl-2.0 |
Cyberbeing/xy-VSFilter | src/thirdparty/gtest/test/gtest_env_var_test.py | 2408 | 3487 | #!/usr/bin/env python
#
# Copyright 2008, 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... | gpl-2.0 |
Banchon/openairinterface5g | targets/TEST/OAI/openair.py | 6 | 8205 | #******************************************************************************
# Eurecom OpenAirInterface
# Copyright(c) 1999 - 2013 Eurecom
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by ... | gpl-3.0 |
lifeinoppo/littlefishlet-scode | RES/REF/python_sourcecode/ipython-master/IPython/sphinxext/ipython_directive.py | 12 | 42845 | # -*- coding: utf-8 -*-
"""
Sphinx directive to support embedded IPython code.
This directive allows pasting of entire interactive IPython sessions, prompts
and all, and their code will actually get re-executed at doc build time, with
all prompts renumbered sequentially. It also allows you to input code as a pure
pyth... | gpl-2.0 |
gbmaster/clamav-devel | libclamav/c++/llvm/utils/lit/lit/ShCommands.py | 36 | 2714 | class Command:
def __init__(self, args, redirects):
self.args = list(args)
self.redirects = list(redirects)
def __repr__(self):
return 'Command(%r, %r)' % (self.args, self.redirects)
def __cmp__(self, other):
if not isinstance(other, Command):
return -1
... | gpl-2.0 |
nickwallen/incubator-metron | metron-platform/metron-data-management/src/main/scripts/Whois_CSV_to_JSON.py | 34 | 8130 | #!/usr/bin/python
"""
Copyright 2014 Cisco Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | apache-2.0 |
rohlandm/servo | tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_whitespace_filter.py | 453 | 5642 | from __future__ import absolute_import, division, unicode_literals
import unittest
from html5lib.filters.whitespace import Filter
from html5lib.constants import spaceCharacters
spaceCharacters = "".join(spaceCharacters)
try:
unittest.TestCase.assertEqual
except AttributeError:
unittest.TestCase.assertEqual =... | mpl-2.0 |
uruddarraju/kubernetes | examples/job/work-queue-2/rediswq.py | 132 | 6169 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
josh-mckenzie/cassandra-dbapi2 | test/test_prepared_queries.py | 10 | 7753 | # 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 |
tangkun75/compose | tests/unit/cli_test.py | 19 | 6060 | from __future__ import unicode_literals
from __future__ import absolute_import
import os
from .. import unittest
import docker
import mock
from compose.cli.docopt_command import NoSuchCommand
from compose.cli.main import TopLevelCommand
from compose.service import Service
class CLITestCase(unittest.TestCase):
d... | apache-2.0 |
GheRivero/ansible | lib/ansible/modules/cloud/memset/memset_dns_reload.py | 35 | 5876 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Simon Weald <ansible@simonweald.com>
# 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... | gpl-3.0 |
276361270/sqlalchemy | lib/sqlalchemy/dialects/mssql/adodbapi.py | 80 | 2493 | # mssql/adodbapi.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mssql+adodbapi
:name: adodbapi
:dbapi: adodbapi
:conn... | mit |
mardiros/pyshop | pyshop/config.py | 1 | 8175 | #-*- coding: utf-8 -*-
"""
PyShop Pyramid configuration helpers.
"""
from pyramid.interfaces import IBeforeRender
from pyramid.url import static_path, route_path
from pyramid.httpexceptions import HTTPNotFound
from pyramid_jinja2 import renderer_factory
from pyramid_rpc.xmlrpc import XMLRPCRenderer
from pyshop.helper... | bsd-3-clause |
rudhir-upretee/Sumo_With_Netsim | tools/projects/TLS-Evaluationsszenarien/test.py | 6 | 1328 | from evaluator import *
from plotter import *
plotDiagram('data\\000')
plotDiagram('data\\001')
plotDiagram('data\\002')
plotDiagram('data\\003')
compareData('data\\000', 'data\\002', 'data\\000vs002')
compareData('data\\001', 'data\\003', 'data\\001vs003')
print getSaturationFlow()
print getMinTravelTime()
print ... | gpl-3.0 |
vikingco/suds | suds/sax/parser.py | 180 | 4461 | # 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 ... | lgpl-3.0 |
chronicwaffle/PokemonGo-DesktopMap | app/pywin/Lib/lib2to3/pgen2/parse.py | 569 | 8053 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Parser engine for the grammar tables generated by pgen.
The grammar table must be loaded first.
See Parser/parser.c in the Python distribution for additional info on
how this parsing engine works.
... | mit |
steinwurf/yaml-cpp | test/gmock-1.7.0/test/gmock_output_test.py | 986 | 5999 | #!/usr/bin/env python
#
# Copyright 2008, 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... | mit |
imadkaf/PFE | ezpublish_legacy/extension/ezodf/ooPackage/sources/getNode.py | 3 | 1521 | import unohelper
from com.sun.star.lang import XServiceName
from com.sun.star.lang import XMain
import string
import urllib
g_ImplementationHelper = unohelper.ImplementationHelper()
class getNode( unohelper.Base, XServiceName, XMain ):
def __init__( self, ctx ):
self.output = "No output"
def ge... | gpl-2.0 |
mete0r/mete0r.olefilefs | bootstrap-buildout.py | 172 | 6501 | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | lgpl-3.0 |
wetneb/django | tests/dispatch/tests.py | 22 | 6633 | import gc
import sys
import time
import unittest
import weakref
from types import TracebackType
from django.dispatch import Signal, receiver
if sys.platform.startswith('java'):
def garbage_collect():
# Some JVM GCs will execute finalizers in a different thread, meaning
# we need to wait for that t... | bsd-3-clause |
dfang/odoo | addons/crm/report/crm_activity_report.py | 21 | 2349 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, tools
class ActivityReport(models.Model):
""" CRM Lead Analysis """
_name = "crm.activity.report"
_auto = False
_description = "CRM Activity Analysis"
_rec_name = '... | agpl-3.0 |
svenstaro/ansible | lib/ansible/modules/network/aos/aos_template.py | 42 | 8166 | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.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 opt... | gpl-3.0 |
feilaoda/FlickBoard | project/lib/filter.py | 1 | 7291 | # -*- coding: utf-8 -*-
from datetime import datetime
import urllib2
import re
import urllib, hashlib
import string
from itertools import imap
def none2string(value):
if value is None:
return ''
return value
def video(value):
if value is None:
return None
videos = re.findall('(htt... | mit |
bartoldeman/easybuild-easyblocks | easybuild/easyblocks/m/mxnet.py | 2 | 8835 | ##
# Copyright 2018 Free University of Brussels (VUB)
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research F... | gpl-2.0 |
conductor-tutti/space_for_us | lib/setuptools/command/easy_install.py | 30 | 82661 | #!/usr/bin/env python
"""
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://pythonhosted.org/setuptools/easy_install.html
"""
from... | apache-2.0 |
alex/pycon | symposion/social_auth/pipeline/user.py | 6 | 1055 | from django.contrib.auth import get_user_model
from account.models import EmailAddress
from social_auth.exceptions import AuthAlreadyAssociated
from social_auth.utils import setting
def create_user(backend, details, response, uid, username, user=None,
*args, **kwargs):
"""Create user. Depends on ... | bsd-3-clause |
nharraud/b2share | invenio/legacy/bibcheck/plugins/trailing_space.py | 17 | 1316 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013 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) any later... | gpl-2.0 |
Catstyle/mongoengine | benchmark.py | 28 | 9745 | #!/usr/bin/env python
import timeit
def cprofile_main():
from pymongo import Connection
connection = Connection()
connection.drop_database('timeit_test')
connection.disconnect()
from mongoengine import Document, DictField, connect
connect("timeit_test")
class Noddy(Document):
fi... | mit |
yrizk/django-blog | blogvenv/lib/python3.4/site-packages/django/core/servers/fastcgi.py | 170 | 6631 | """
FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol.
Uses the flup python package: http://www.saddi.com/software/flup/
This is an adaptation of the flup package to add FastCGI server support
to run Django apps from Web servers that support the FastCGI protocol.
This module can be run standal... | apache-2.0 |
dudepare/django | tests/forms_tests/tests/test_regressions.py | 135 | 9054 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms import (
CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm,
ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select,
TextInput,
)
from django.test import TestCase, ignore_warnings
from django.utils... | bsd-3-clause |
savoirfairelinux/odoo | addons/account/account_bank_statement.py | 17 | 42162 | # -*- 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 |
shuishoudage/CloudappCLI | env/lib/python2.7/site-packages/pip/commands/__init__.py | 143 | 2145 | """
Package containing all pip commands
"""
from __future__ import absolute_import
from pip.commands.completion import CompletionCommand
from pip.commands.download import DownloadCommand
from pip.commands.freeze import FreezeCommand
from pip.commands.hash import HashCommand
from pip.commands.help import HelpCommand
fr... | gpl-3.0 |
nimoism/django-seo | regressiontests/userapp/tests.py | 12 | 50544 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Test suite for SEO framework.
It is divided into 7 sections:
* Data selection (Unit tests)
* Value resolution (Unit tests)
* Formatting (Unit tests)
* Definition (System tests)
* Meta options (System tests)
* Templates (System tests)
*... | bsd-3-clause |
ytjiang/django | django/test/html.py | 251 | 7929 | """
Comparing two html documents.
"""
from __future__ import unicode_literals
import re
from django.utils import six
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.html_parser import HTMLParseError, HTMLParser
WHITESPACE = re.compile('\s+')
def normalize_whitespace(str... | bsd-3-clause |
cpennington/edx-platform | openedx/core/djangoapps/verified_track_content/tasks.py | 4 | 2928 | """
Celery task for Automatic Verifed Track Cohorting MVP feature.
"""
import six
from celery.task import task
from celery.utils.log import get_task_logger
from django.contrib.auth.models import User
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.course_groups.cohorts import add_user_to_coh... | agpl-3.0 |
lidaobing/itcc | itcc/molecule/utils.py | 1 | 5019 | # $Id$
import sys
import os.path
import math
from itcc.molecule import read, write
from itcc.molecule.tools import neighbours, is_pyramid
from itcc.molecule import relalist
try:
sorted
except:
from itcc.core.tools import sorted_ as sorted
def mirrormol():
if len(sys.argv) != 2:
sys.stderr.write('U... | gpl-3.0 |
diagramsoftware/odoo | addons/survey/__init__.py | 385 | 1037 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
cs-chan/Deep-Plant | GRU-CFA/Codes/visualClef.py | 1 | 18504 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 2 15:24:59 2018
@author: root
"""
import cPickle as pkl
import numpy
import cv2
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import skimage
import skimage.transform
import skimage.io
from PIL import Image, ImageEnhance
import scipy.misc
import tensorfl... | bsd-3-clause |
mozilla/zamboni | services/verify.py | 18 | 14382 | import calendar
import json
from datetime import datetime
import sys
from time import gmtime, time
from urlparse import parse_qsl, urlparse
from wsgiref.handlers import format_date_time
import jwt
from browserid.errors import ExpiredSignatureError
from django_statsd.clients import statsd
from receipts import certs
fr... | bsd-3-clause |
molden/hanythingondemand | test/unit/subcommands/test_subcommands_listcmd.py | 1 | 2890 | #!/usr/bin/env python
# #
# Copyright 2009-2015 Ghent University
#
# This file is part of hanythingondemand
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
... | gpl-2.0 |
martinkirch/tofbot | bot.py | 1 | 14539 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of tofbot, a friendly IRC bot.
# You may redistribute it under the Simplified BSD License.
# If we meet some day, and you think this stuff is worth it,
# you can buy us a beer in return.
#
# Copyright (c) 2011,2015 Etienne Millon <etienne.millon@gmail.... | bsd-2-clause |
wmfs/chimp | src/calc/TimestampColumn.py | 1 | 3205 | '''
Created on 4 Mar 2012
@author: Tim.Needham
'''
import cs
import chimpsql
import chimpspec
class TimestampColumn:
'''
classdocs
'''
def __init__(self, timestampColumnTag):
self.type = "timestampColumn"
self.taskOrder = 2
self.outputColumn = cs.grabAttribute(timestampColumnT... | gpl-3.0 |
schlueter/ansible | test/units/modules/system/test_pamd.py | 22 | 14364 | from ansible.compat.tests import unittest
from ansible.modules.system.pamd import PamdRule
from ansible.modules.system.pamd import PamdService
from ansible.modules.system.pamd import update_rule
from ansible.modules.system.pamd import insert_before_rule
from ansible.modules.system.pamd import insert_after_rule
from ans... | gpl-3.0 |
emilk/sproxel | distro/common/lib/ctypes/__init__.py | 46 | 17932 | ######################################################################
# This file should be kept compatible with Python 2.3, see PEP 291. #
######################################################################
"""create and manipulate C data types in Python"""
import os as _os, sys as _sys
__version__ = "1.... | bsd-3-clause |
brianwoo/django-tutorial | ENV/lib/python2.7/site-packages/pip/basecommand.py | 53 | 10837 | """Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import traceback
import optparse
import warnings
from pip._vendor.six import StringIO
from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.download import PipSes... | gpl-3.0 |
kyrias/cjdns | node_build/dependencies/libuv/build/gyp/test/compiler-override/gyptest-compiler-global-settings.py | 83 | 2212 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that make_global_settings can be used to override the
compiler settings.
"""
import TestGyp
import os
import copy
import sys
fro... | gpl-3.0 |
PRIMEDesigner15/PRIMEDesigner15 | dependencies/Lib/test/unittests/test_typechecks.py | 184 | 2700 | """Unit tests for __instancecheck__ and __subclasscheck__."""
import unittest
from test import support
class ABC(type):
def __instancecheck__(cls, inst):
"""Implement isinstance(inst, cls)."""
return any(cls.__subclasscheck__(c)
for c in {type(inst), inst.__class__})
def ... | bsd-3-clause |
perkinslr/pypyjs | addedLibraries/twisted/conch/ls.py | 69 | 2183 | # -*- test-case-name: twisted.conch.test.test_cftp -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import array
import stat
from time import time, strftime, localtime
# locale-independent month names to use instead of strftime's
_MONTH_NAMES = dict(zip(
range(1, 13),
"Jan ... | mit |
jonathonwalz/ansible | lib/ansible/plugins/callback/selective.py | 31 | 9522 | # (c) Fastly, inc 2016
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dist... | gpl-3.0 |
oberlin/django | django/contrib/gis/serializers/geojson.py | 275 | 2672 | from __future__ import unicode_literals
from django.contrib.gis.gdal import HAS_GDAL
from django.core.serializers.base import (
SerializationError, SerializerDoesNotExist,
)
from django.core.serializers.json import Serializer as JSONSerializer
if HAS_GDAL:
from django.contrib.gis.gdal import CoordTransform, S... | bsd-3-clause |
barnsnake351/neutron | neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py | 23 | 1684 | # Copyright 2015 OpenStack Foundation
#
# 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 ... | apache-2.0 |
CforED/Machine-Learning | sklearn/datasets/__init__.py | 72 | 3807 | """
The :mod:`sklearn.datasets` module includes utilities to load datasets,
including methods to load and fetch popular reference datasets. It also
features some artificial data generators.
"""
from .base import load_diabetes
from .base import load_digits
from .base import load_files
from .base import load_iris
from .... | bsd-3-clause |
diagramsoftware/sale-workflow | sale_procurement_group_by_line/model/sale.py | 4 | 7536 | # -*- coding: utf-8 -*-
#
#
# Author: Guewen Baconnier, Yannick Vaucher
# Copyright 2013-2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version... | agpl-3.0 |
coursemdetw/2014c2 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/unittest/test/test_suite.py | 791 | 12066 | import unittest
import sys
from .support import LoggingResult, TestEquality
### Support code for Test_TestSuite
################################################################
class Test(object):
class Foo(unittest.TestCase):
def test_1(self): pass
def test_2(self): pass
def test_3(self... | gpl-2.0 |
mmbtba/odoo | addons/l10n_ro/__openerp__.py | 186 | 2241 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Author: Fekete Mihai <feketemihai@gmail.com>, Tatár Attila <atta@nvm.ro>
# Copyright (C) 2011-2014 TOTAL PC SYSTEMS (http://www.erpsystems.ro).
# Copyright (C) 2014 Fekete Mihai
# Copyright (C) 201... | agpl-3.0 |
HwisooSo/gemV-update | ext/ply/example/classcalc/calc.py | 10 | 4059 | #!/usr/bin/env python2
# -----------------------------------------------------------------------------
# calc.py
#
# A simple calculator with variables. This is from O'Reilly's
# "Lex and Yacc", p. 63.
#
# Class-based example contributed to PLY by David McNab
# -------------------------------------------------------... | bsd-3-clause |
HuimingCheng/AutoGrading | learning/edge_detection_copy.py | 2 | 10959 | import cv2
import numpy as np
def order_points(pts):
# initialzie a list of coordinates that will be ordered
# such that the first entry in the list is the top-left,
# the second entry is the top-right, the third is the
# bottom-right, and the fourth is the bottom-left
rect = np.zeros((4, 2), dtype = "float32")
... | mit |
lcy-seso/models | scheduled_sampling/utils.py | 4 | 1708 | import math
import numpy as np
class RandomScheduleGenerator:
"""
The random sampling rate for scheduled sampling algoithm, which uses decayed
sampling rate.
"""
def __init__(self, schedule_type, a, b):
"""
schduled_type: is the type of the decay. It supports constant, linear,
... | apache-2.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/route_filter.py | 1 | 2621 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
taimur97/NotePad | app/dbsetup.py | 6 | 3967 | """Generate a sample project with triggers"""
from AndroidCodeGenerator.generator import Generator
from AndroidCodeGenerator.sql_validator import SQLTester
from AndroidCodeGenerator.db_table import (Table, Column, ForeignKey, Unique,
Trigger, Check)
from AndroidCodeGenerator.... | gpl-3.0 |
labcodes/django | django/contrib/messages/storage/session.py | 91 | 1729 | import json
from django.conf import settings
from django.contrib.messages.storage.base import BaseStorage
from django.contrib.messages.storage.cookie import (
MessageDecoder, MessageEncoder,
)
class SessionStorage(BaseStorage):
"""
Store messages in the session (that is, django.contrib.sessions).
"""... | bsd-3-clause |
WriterOfAlicrow/servo | tests/wpt/css-tests/tools/pywebsocket/src/test/test_http_header_util.py | 496 | 3372 | #!/usr/bin/env python
#
# Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | mpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.