code stringlengths 2 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
from sympy import (diff, trigsimp, expand, sin, cos, solve, Symbol, sympify,
eye, symbols, Dummy, ImmutableMatrix as Matrix, MatrixBase)
from sympy.core.compatibility import string_types, range
from sympy.physics.vector.vector import Vector, _check_vector
__all__ = ['CoordinateSym', 'ReferenceFrame'... | postvakje/sympy | sympy/physics/vector/frame.py | Python | bsd-3-clause | 31,125 |
#
# This file is part of CONCUSS, https://github.com/theoryinpractice/concuss/,
# and is Copyright (C) North Carolina State University, 2015. It is licensed
# under the three-clause BSD license; see LICENSE.
#
from collections import Counter
from count_combiner import CountCombiner
class ColorCount(CountCombiner):... | nish10z/CONCUSS | lib/pattern_counting/double_count/color_count.py | Python | bsd-3-clause | 2,244 |
import os
from conda_build import api
from conda_build import render
def test_output_with_noarch_says_noarch(testing_metadata):
testing_metadata.meta['build']['noarch'] = 'python'
output = api.get_output_file_path(testing_metadata)
assert os.path.sep + "noarch" + os.path.sep in output[0]
def test_outpu... | pelson/conda-build | tests/test_render.py | Python | bsd-3-clause | 1,460 |
# Copyright 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.
"""Unittests for test_dispatcher.py."""
# pylint: disable=R0201
# pylint: disable=W0212
import os
import sys
import unittest
sys.path.append(os.path.join(o... | ChromiumWebApps/chromium | build/android/pylib/base/test_dispatcher_unittest.py | Python | bsd-3-clause | 7,737 |
from django.core.management.base import BaseCommand
from django.core import serializers
from opps.boxes.models import QuerySet
from opps.channels.models import Channel
from opps.containers.models import ContainerBox
class Command(BaseCommand):
def handle(self, *args, **options):
models = [Channel, Conta... | jeanmask/opps | opps/core/management/commands/exportcontainerbox.py | Python | mit | 546 |
"""
A mechanize browser that redirects specified HTTP connections to a WSGI
object.
"""
from httplib import HTTP
from mechanize import Browser as MechanizeBrowser
from wsgi_intercept.urllib2_intercept import install_opener, uninstall_opener
try:
from mechanize import HTTPHandler
except ImportError:
# pre mecha... | NGSegovia/wsgi-intercept | wsgi_intercept/mechanize_intercept/wsgi_browser.py | Python | mit | 1,068 |
from __future__ import absolute_import, print_function, division
from io import BytesIO
import textwrap
from mock import Mock
from netlib.exceptions import HttpException, HttpSyntaxException, HttpReadDisconnect, TcpDisconnect
from netlib.http import Headers
from netlib.http.http1.read import (
read_request, read_re... | ikoz/mitmproxy | test/netlib/http/http1/test_read.py | Python | mit | 10,045 |
# Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | sidzan/netforce | netforce_mfg/netforce_mfg/models/bom_line.py | Python | mit | 1,967 |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import HTMLParser
import urllib
from frappe import msgprint, throw, _
from frappe.email.smtp import SMTPServer, get_outgoing_email_account
from frappe.email.email... | gangadharkadam/letzfrappe | frappe/email/bulk.py | Python | mit | 5,170 |
class Solution(object):
def checkPossibility(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
is_modified = False
for i in xrange(len(nums) - 1):
if nums[i] > nums[i+1]:
if is_modified:
return False
... | Chasego/cod | leetcode/665-Non-decreasing-Array/NonDecreasingArr.py | Python | mit | 567 |
from .app import APIClient, APIResource, api, api_app # noqa
from .core import ( # noqa
authentication,
cached,
database,
format_checker,
plugins,
schema,
server,
tasks,
user,
)
| Flexget/Flexget | flexget/api/__init__.py | Python | mit | 216 |
'''
Created on May 26, 2012
@author: Charlie
'''
class MyPackageMod01(object):
def __init__(self):
pass | donlee888/JsObjects | Python/ComplexPaths02/src/main/mypackage/MyPackageMod01.py | Python | mit | 122 |
from django.utils.encoding import python_2_unicode_compatible
from allauth.account.models import EmailAddress
from allauth.socialaccount import app_settings
from ..adapter import get_adapter
class AuthProcess(object):
LOGIN = 'login'
CONNECT = 'connect'
REDIRECT = 'redirect'
class AuthAction(object):
... | pztrick/django-allauth | allauth/socialaccount/providers/base.py | Python | mit | 6,560 |
#!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
... | Distrotech/scons | test/Flatten.py | Python | mit | 2,713 |
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@ecdsa.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 witho... | imrehg/electrum | lib/blockchain.py | Python | mit | 8,852 |
# -*- coding: utf-8 -*-
#
## This file is part of Invenio.
## Copyright (C) 2011, 2012 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 opti... | lnielsen/invenio | invenio/modules/messages/models.py | Python | gpl-2.0 | 8,905 |
#!/usr/bin/env python
# 2015 Copyright (C) White
#
# 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, version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
#... | thomashuang/white | white/controller/admin/extend.py | Python | gpl-2.0 | 1,282 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tests for the stateful ThumbnailStore service.
Copyright 2011-2014 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
from omero.testlib import ITest
import pytest
from omero import MissingPyramidExcepti... | simleo/openmicroscopy | components/tools/OmeroPy/test/integration/test_thumbs.py | Python | gpl-2.0 | 6,547 |
##
# Copyright 2012-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | hpcugent/easybuild-framework | easybuild/toolchains/gomkl.py | Python | gpl-2.0 | 1,727 |
# -*- 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) a... | MSusik/invenio | invenio/testsuite/test_utils_hash.py | Python | gpl-2.0 | 1,644 |
#
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | aronparsons/spacewalk | backend/server/action/kickstart_guest.py | Python | gpl-2.0 | 4,321 |
#
#
# Copyright (C) 2012 Google 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 ... | vladimir-ipatov/ganeti | lib/outils.py | Python | gpl-2.0 | 4,426 |
# -*- coding: utf-8 -*-
#
# pynest_api_template.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Lic... | stinebuu/nest-simulator | doc/userdoc/contribute/templates_styleguides/pynest_api_template.py | Python | gpl-2.0 | 4,742 |
import kivy
kivy.require('1.0.6')
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
from kivy.graphics import Color, Rectangle, Point, GraphicException
from random import random
from math import sqrt
def calculate_points(x1, y1, x2, y2, steps=5):
dx = x2 - x1
... | danstoner/python_experiments | playing_with_kivy/kivi-examples/demo/touchtracer/main.py | Python | gpl-2.0 | 2,938 |
""" DIRAC Graphs package provides tools for creation of various plots to provide
graphical representation of the DIRAC Monitoring and Accounting data
The DIRAC Graphs package is derived from the GraphTool plotting package of the
CMS/Phedex Project by ... <to be added>
"""
from __future__ import print_func... | chaen/DIRAC | Core/Utilities/Graphs/__init__.py | Python | gpl-3.0 | 4,843 |
#
# Copyright (C) 2013,2014,2015,2016 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)... | richter-t/espresso | samples/python/slice_input.py | Python | gpl-3.0 | 2,860 |
import threading
import queue
import logging
from ..configmanager import ConfigManager
from ..configmanager_constants import INTERFACE_TYPE
from ..interface import XRecordInterface, AtSpiInterface
from autokey.model import SendMode
from .key import Key
from .constants import X_RECORD_INTERFACE, KEY_SPLIT_RE, MODIFIER... | guoci/autokey-py3 | lib/autokey/iomediator/_iomediator.py | Python | gpl-3.0 | 9,297 |
from test import test_support
import unittest
import codecs
import locale
import sys, StringIO
def coding_checker(self, coder):
def check(input, expect):
self.assertEqual(coder(input), (expect, len(input)))
return check
class Queue(object):
"""
queue: write bytes at one end, read bytes from th... | HiSPARC/station-software | user/python/Lib/test/test_codecs.py | Python | gpl-3.0 | 81,185 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# 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... | jonathonwalz/ansible | lib/ansible/modules/cloud/cloudstack/cs_host.py | Python | gpl-3.0 | 17,672 |
# (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... | homme/ansible | lib/ansible/playbook/base.py | Python | gpl-3.0 | 16,539 |
"""
Unit tests for refactor.py.
"""
import sys
import os
import codecs
import io
import re
import tempfile
import shutil
import unittest
from lib2to3 import refactor, pygram, fixer_base
from lib2to3.pgen2 import token
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
FIXER_DIR = os.path.join(TEST_DATA... | kenshay/ImageScript | Script_Runner/PYTHON/Lib/lib2to3/tests/test_refactor.py | Python | gpl-3.0 | 12,405 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | remb0/CouchPotatoServer | libs/guessit/transfo/post_process.py | Python | gpl-3.0 | 2,521 |
#!/usr/bin/env python3
# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab
#########################################################################
# Copyright 2017- Martin Sinn m.sinn@gmx.de
#########################################################################
# ... | robert-budde/smarthome | lib/module.py | Python | gpl-3.0 | 15,003 |
from __future__ import with_statement
from datetime import datetime
import os
from django.conf import settings
from kuma.core.cache import memcache
from kuma.core.tests import ok_
from kuma.users.models import User
from kuma.users.tests import UserTestCase, user
from . import document, revision
from ..models import... | ollie314/kuma | kuma/wiki/tests/test_tasks.py | Python | mpl-2.0 | 4,327 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 Cubic ERP SAC (<http://cubicerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | jolevq/odoopub | extra-addons/customize/res_company.py | Python | agpl-3.0 | 1,213 |
from scipy import *
from pylab import *
num_detectors = 100
x = 0.5+0.25*arange(0,float(num_detectors))/float(num_detectors)
y = zeros(num_detectors) + 0.5
t = 0.
n_cycles = 1
dt = 0.1/n_cycles
tmax = 8
def vel(x,y):
return [-(y-0.5),x-0.5]
while(t<tmax):
t = t + dt
[k1_x,k1_y] = vel(x,y)
[k2_x,k2_y]... | FluidityStokes/fluidity | tests/lagrangian_detectors_3d_1e2/get_RK_traj.py | Python | lgpl-2.1 | 640 |
import re
import transaction
from ..models import DBSession
SQL_TABLE = """
SELECT c.oid, n.nspname, c.relname
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = :table_name
AND pg_catalog.pg_table_is_visible(c.oid)
ORDER BY 2, 3
"""
SQL_TABLE_SCHEM... | aagusti/osipkd-json-rpc | jsonrpc/scripts/DbTools.py | Python | lgpl-2.1 | 3,322 |
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under ... | protochron/aurora | src/test/python/apache/aurora/client/cli/test_quota.py | Python | apache-2.0 | 4,844 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nicira, 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... | netscaler/neutron | neutron/plugins/nicira/api_client/client.py | Python | apache-2.0 | 10,210 |
#!/usr/bin/python
#
# Copyright 2015 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 required b... | wubr2000/googleads-python-lib | examples/dfp/v201505/custom_targeting_service/get_custom_targeting_values_by_statement.py | Python | apache-2.0 | 2,184 |
# Copyright 2017 The Oppia 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 applicable ... | himanshu-dixit/oppia | core/controllers/learner_playlist_test.py | Python | apache-2.0 | 14,127 |
#!/usr/bin/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 required b... | wubr2000/googleads-python-lib | examples/dfa/v1_20/create_spotlight_activity_group.py | Python | apache-2.0 | 2,085 |
from collections import deque
import weakref
import py4j.protocol as proto
from py4j.clientserver import (
ClientServerConnection, ClientServer, JavaClient, PythonServer)
from py4j.java_gateway import (
CallbackServer, JavaGateway, GatewayClient, GatewayProperty,
PythonProxyPool, GatewayConnection, Callbac... | eyalbenivri/amaterasu | executor/src/test/resources/py4j/tests/instrumented.py | Python | apache-2.0 | 5,570 |
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | SeleniumHQ/selenium | py/test/selenium/webdriver/chrome/chrome_network_emulation_tests.py | Python | apache-2.0 | 1,447 |
#!/usr/bin/python
#
# Copyright 2015 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 required b... | wubr2000/googleads-python-lib | examples/dfp/v201502/creative_template_service/get_all_creative_templates.py | Python | apache-2.0 | 1,984 |
# 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
# d... | sebrandon1/neutron | neutron/tests/unit/ipam/test_requests.py | Python | apache-2.0 | 16,389 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | raildo/python-keystoneclient | python-keystoneclient-0.4.1.7.gdca1d42/keystoneclient/tests/test_shell.py | Python | apache-2.0 | 22,938 |
"""
The Accounts module contains the base definition for a Qubole account object
"""
from qds_sdk.resource import SingletonResource
from qds_sdk.qubole import Qubole
import argparse
class AccountCmdLine:
@staticmethod
def parsers():
argparser = argparse.ArgumentParser(
prog="qds.py account... | prakharjain09/qds-sdk-py | qds_sdk/account.py | Python | apache-2.0 | 2,789 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 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... | Brocade-OpenSource/OpenStack-DNRM-Neutron | neutron/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py | Python | apache-2.0 | 2,023 |
from pysqlite2 import dbapi2 as sqlite
import re
import math
def getwords(doc):
splitter=re.compile('\\W*')
print doc
# Split the words by non-alpha characters
words=[s.lower() for s in splitter.split(doc)
if len(s)>2 and len(s)<20]
# Return the unique set of words only
return dict([(w,1) for... | jefflyn/buddha | src/pci/chapter6/docclass.py | Python | artistic-2.0 | 5,785 |
"""
Examples of Wavelets
--------------------
Figure 10.9
Wavelets for several values of wavelet parameters Q and f0. Solid lines show
the real part and dashed lines show the imaginary part (see eq. 10.16).
"""
# Author: Jake VanderPlas
# License: BSD
# The figure produced by this code is published in the textbook
#... | eramirem/astroML | book_figures/chapter10/fig_wavelets.py | Python | bsd-2-clause | 2,201 |
from decimal import Decimal as D
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template.defaultfilters import striptags, truncatechars
from django.utils.translation import gettext_lazy as _
from paypalcheckoutsdk.core import LiveEnvironment, PayPalHttpClient, Sand... | lpakula/django-oscar-paypal | paypal/express_checkout/gateway.py | Python | bsd-3-clause | 7,616 |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import datetime
import dateutil.parser
import dateutil.tz
import gzip
import json
import logging
import os
import pickle
import sys
from collections import OrderedDict
from functools import partial
from itertools import count, groupby
from s... | stonebig/bokeh | scripts/issues.py | Python | bsd-3-clause | 12,422 |
# -*- coding: utf-8 -*-
"""
sphinx.util.websupport
~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
def is_commentable(node):
# return node.__class__.__name__ in ('paragraph', 'literal_block')
return node.__cla... | WhySoGeeky/DroidPot | venv/lib/python2.7/site-packages/sphinx/util/websupport.py | Python | mit | 349 |
#!/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... | pigeonflight/strider-plone | docker/appengine/google/appengine/tools/devappserver2/application_configuration.py | Python | mit | 19,480 |
# 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):
pass
def backwards(self, orm):
pass
models = {}
complete_apps = ['mirrors']
| pyropeter/archweb | mirrors/migrations/0001_initial.py | Python | gpl-2.0 | 296 |
# -*- coding: utf-8 -*-
"""
***************************************************************************
v_net_salesman.py
---------------------
Date : December 2015
Copyright : (C) 2015 by Médéric Ribreux
Email : medspx at medspx dot fr
********************... | stevenmizuno/QGIS | python/plugins/processing/algs/grass7/ext/v_net_salesman.py | Python | gpl-2.0 | 1,496 |
# -*- coding: utf-8 -*-
'''
This module implements :class:`IrregularlySampledSignal`, an array of analog
signals with samples taken at arbitrary time points.
:class:`IrregularlySampledSignal` derives from :class:`BaseNeo`, from
:module:`neo.core.baseneo`, and from :class:`quantites.Quantity`, which
inherits from :clas... | CINPLA/expipe-dev | python-neo/neo/core/irregularlysampledsignal.py | Python | gpl-3.0 | 20,385 |
from frappe import _
def get_data():
return {
'docstatus': 1,
'fieldname': 'request_for_quotation',
'transactions': [
{
'label': _('Related'),
'items': ['Supplier Quotation']
},
]
} | bhupennewalkar1337/erpnext | erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py | Python | gpl-3.0 | 206 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 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'],
... | shsingh/ansible | lib/ansible/modules/network/aci/aci_l3out_route_tag_policy.py | Python | gpl-3.0 | 6,992 |
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
try:
import botocore.waiter as core_waiter
except ImportError:
pass # caught by HAS_BOTO3
ec2_data = {
"version": 2,
"waiters": {
"RouteTableExists": {
... | tareqalayan/ansible | lib/ansible/module_utils/aws/waiters.py | Python | gpl-3.0 | 9,345 |
#!/usr/bin/env python
# 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/.
import os
import unittest
from manifestparser import ManifestParser
here = os.path.dirname(os.pa... | vladikoff/fxa-mochitest | tests/mozbase/manifestparser/tests/test_default_skipif.py | Python | mpl-2.0 | 1,518 |
from AccessControl import ClassSecurityInfo
from Products.Archetypes.utils import DisplayList
from Products.Archetypes.Registry import registerWidget
from Products.Archetypes.Widget import TypesWidget
from Products.CMFPlone.i18nl10n import ulocalized_time
from Products.CMFCore.utils import getToolByName
from bika.lims.... | veroc/Bika-LIMS | bika/lims/browser/widgets/addresswidget.py | Python | agpl-3.0 | 2,605 |
# -*- coding: utf-8 -*-
import copy
from lxml import etree, html
from openerp import SUPERUSER_ID, tools
from openerp.addons.website.models import website
from openerp.http import request
from openerp.osv import osv, fields
class view(osv.osv):
_inherit = "ir.ui.view"
_columns = {
'page': fields.bool... | rdeheele/odoo | addons/website/models/ir_ui_view.py | Python | agpl-3.0 | 9,428 |
""" Management command to link program enrollments and external student_keys to an LMS user """
from uuid import UUID
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand, CommandError
from lms.djangoapps.program_enrollments.api import link_program_enrollments
User = g... | cpennington/edx-platform | lms/djangoapps/program_enrollments/management/commands/link_program_enrollments.py | Python | agpl-3.0 | 4,440 |
# -*- coding: utf-8 -*-
# Copyright © 2017 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, api
class ProductProduct(models.Model):
_inherit = 'product.product'
@api.multi
def _is_service_buy_make_to_order(self):
for prod... | Daniel-CA/odoomrp-wip-public | procurement_service/models/product_product.py | Python | agpl-3.0 | 903 |
# -*- coding: utf-8 -*-
# ***************************************************************************
# * *
# * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> *
# * ... | bblacey/FreeCAD-MacOS-CI | src/Mod/Path/PathScripts/PathStop.py | Python | lgpl-2.1 | 5,748 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PerlTestMore(PerlPackage):
"""Test2 is a new testing framework produced by forking Test::B... | LLNL/spack | var/spack/repos/builtin/packages/perl-test-more/package.py | Python | lgpl-2.1 | 940 |
##############################################################################
# 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... | EmreAtes/spack | var/spack/repos/builtin/packages/stc/package.py | Python | lgpl-2.1 | 1,737 |
#!/usr/bin/env python
#
# vector3 and rotation matrix classes
# This follows the conventions in the ArduPilot code,
# and is essentially a python version of the AP_Math library
#
# Andrew Tridgell, March 2012
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser... | owenson/ardupilot-sdk-python | pymavlink/rotmat.py | Python | lgpl-3.0 | 12,026 |
{
"name" : "Add sales team to website leads (OBSOLETE)",
"version" : "0.1",
"author" : "IT-Projects LLC, Ivan Yelizariev",
'license': 'GPL-3',
"category" : "Website",
"website" : "https://yelizariev.github.io",
"depends" : ["website_crm"],
#"init_xml" : [],
#"update_xml" : [],
#"... | veryberry/website-addons | website_crm_sales_team/__openerp__.py | Python | lgpl-3.0 | 361 |
# Copyright 2011 OpenStack LLC.
#
# 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 agr... | sileht/deb-openstack-nova | nova/db/sqlalchemy/migrate_repo/versions/065_add_index_to_instance_project_id.py | Python | apache-2.0 | 1,111 |
"""HTTP Support for Hass.io."""
import asyncio
import logging
import os
import re
from typing import Dict, Union
import aiohttp
from aiohttp import web
from aiohttp.hdrs import CONTENT_LENGTH, CONTENT_TYPE
from aiohttp.web_exceptions import HTTPBadGateway
import async_timeout
from homeassistant.components.http import... | tboyce1/home-assistant | homeassistant/components/hassio/http.py | Python | apache-2.0 | 4,916 |
import copy
import itertools
import weakref
from mopidy.models.fields import Field
# Registered models for automatic deserialization
_models = {}
class ImmutableObject:
"""
Superclass for immutable objects whose fields can only be modified via the
constructor.
This version of this class has been re... | jcass77/mopidy | mopidy/models/immutable.py | Python | apache-2.0 | 7,076 |
# Copyright (c) 2014 Quobyte Inc.
# Copyright (c) 2013 Red Hat, 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... | Hybrid-Cloud/cinder | cinder/tests/unit/volume/drivers/test_quobyte.py | Python | apache-2.0 | 38,830 |
#!/usr/bin/python3
#
# 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
# "Lic... | airbnb/airflow | dev/send_email.py | Python | apache-2.0 | 10,284 |
__author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.structure.networks.feedforward import FeedForwardNetwork
from pybrain.structure.connections.shared import MotherConnection, SharedFullConnection
from pybrain.utilities import iterCombinations
# TODO: special treatment for multi-dimensional lstm cells: identity conn... | hassaanm/stock-trading | src/pybrain/structure/networks/swiping.py | Python | apache-2.0 | 6,210 |
# -*- coding: utf-8 -*-
###############################################################################
#
# UpdateWalk
# Updates an existing walk action.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exc... | jordanemedlock/psychtruths | temboo/core/Library/Facebook/Actions/Fitness/Walks/UpdateWalk.py | Python | apache-2.0 | 4,891 |
# Copyright (c) Frederick Dean
# See LICENSE for details.
"""
Unit tests for `OpenSSL.rand`.
"""
import pytest
from OpenSSL import rand
class TestRand(object):
@pytest.mark.parametrize('args', [
(b"foo", None),
(None, 3),
])
def test_add_wrong_args(self, args):
"""
`Ope... | hynek/pyopenssl | tests/test_rand.py | Python | apache-2.0 | 818 |
#
# 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... | mtagle/airflow | tests/utils/test_weight_rule.py | Python | apache-2.0 | 1,201 |
# 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... | StevenMPhillips/arrow | python/benchmarks/array.py | Python | apache-2.0 | 2,575 |
# Copyright 2010 Pierre Schaus pschaus@gmail.com, lperron@google.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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | linsicai/or-tools | examples/python/steel.py | Python | apache-2.0 | 6,315 |
from __future__ import print_function
import os
INFO = {
'name': 'Version Updater',
'description': 'Add a version to /versions.txt after each deploy'
}
# Set up extra django template tags
def templateTags():
pass
# Build actions
# def preBuild(site):
# print 'preBuild'
#
# def postBuild(... | koenbok/Cactus | cactus/tests/data/skeleton/plugins/version.py | Python | bsd-3-clause | 1,339 |
# Copyright (c) 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 of conditions and the ... | axinging/chromium-crosswalk | third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost.py | Python | bsd-3-clause | 2,557 |
from direct.distributed import DistributedObject
class DistributedTestObject(DistributedObject.DistributedObject):
def setRequiredField(self, r):
self.requiredField = r
def setB(self, B):
self.B = B
def setBA(self, BA):
self.BA = BA
def setBO(self, BO):
self.BO = BO
... | ToontownUprising/src | otp/distributed/DistributedTestObject.py | Python | mit | 717 |
"""
Caffe network visualization: draw the NetParameter protobuffer.
.. note::
This requires pydot>=1.0.2, which is not included in requirements.txt since
it requires graphviz and other prerequisites outside the scope of the
Caffe.
"""
from caffe.proto import caffe_pb2
"""
pydot is not supported under p... | dbishai/DeepRGB | python/caffe/draw.py | Python | mit | 7,604 |
# -*- coding: utf-8 -*-
#
# test_weights_as_lists.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 L... | SepehrMN/nest-simulator | pynest/nest/tests/test_weights_as_lists.py | Python | gpl-2.0 | 4,995 |
from gourmet.plugin import ShoppingListPlugin
import gtk
import gourmet.recipeManager, gourmet.GourmetRecipeManager
from gourmet.prefs import get_prefs
from nutritionLabel import NutritionLabel
import os.path
from gettext import gettext as _
class ShoppingNutritionalInfoPlugin (ShoppingListPlugin):
ui_string = ''... | Lamecarlate/gourmet | gourmet/plugins/nutritional_information/shopping_plugin.py | Python | gpl-2.0 | 3,401 |
import re
import requests
import threading
from ..common import clean_title,clean_search
import xbmc
from ..scraper import Scraper
sources = []
class scrape_thread(threading.Thread):
def __init__(self,m,match,qual):
self.m = m
self.match = match
self.qual = qual
threading.Thread.__i... | mrquim/mrquimrepo | script.module.nanscrapers/lib/nanscrapers/scraperplugins/yesmovies.py | Python | gpl-2.0 | 5,703 |
#!/usr/bin/python
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or
# https://www.gnu.org/licenses/gpl-3.0.txt)
'''
Element Software Node Drives
'''
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | veger/ansible | lib/ansible/modules/storage/netapp/na_elementsw_drive.py | Python | gpl-3.0 | 11,046 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | resmo/ansible | lib/ansible/modules/cloud/google/gcp_kms_key_ring.py | Python | gpl-3.0 | 7,192 |
###############################################################################
#
# Copyright (c) 2007, 2008 OpenHex SPRL. (http://openhex.com) All Rights
# Reserved.
#
# 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 ... | jakogut/python-relatorio | relatorio/templates/base.py | Python | gpl-3.0 | 1,717 |
# 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/.
import logging
from socorro.external.postgresql.base import PostgreSQLBase
logger = logging.getLogger("webapi")
clas... | KaiRo-at/socorro | socorro/external/postgresql/crontabber_state.py | Python | mpl-2.0 | 1,283 |
import json
import transaction
from mock import patch
from bookie.tests import factory
from bookie.tests import TestViewBase
class TestSocialConnectionsApi(TestViewBase):
"""Check if SocialConnections API returns all the added accounts"""
def testBaseApi(self):
factory.make_twitter_connection()
... | charany1/Bookie | bookie/tests/test_api/test_social_api.py | Python | agpl-3.0 | 1,628 |
# coding=utf-8
import re
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import os
import Queue
import threading
import yaml
import time
import logging
import octoprint.util as util
import octoprint.util.gcodeInterpreter as gcodeInter... | C-o-r-E/OctoPrint | src/octoprint/gcodefiles.py | Python | agpl-3.0 | 17,854 |
# Copyright 2017 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... | rabipanda/tensorflow | tensorflow/contrib/py2tf/impl/naming_test.py | Python | apache-2.0 | 2,895 |
# Copyright (c) 2013 eBay Inc.
# Copyright (c) 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/lice... | Thingee/cinder | cinder/scheduler/weights/capacity.py | Python | apache-2.0 | 3,311 |
# 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... | tensorflow/tensorflow | tensorflow/python/kernel_tests/image_ops/decode_jpeg_op_test.py | Python | apache-2.0 | 7,835 |
# Copyright 2013, Big Switch Networks, 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 applic... | Athrun29/horizon | openstack_dashboard/dashboards/project/firewalls/tables.py | Python | apache-2.0 | 15,142 |
# Copyright 2012 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 required by applicable law or ... | sesamesushi/desatisrevu | controllers/utils.py | Python | apache-2.0 | 24,558 |