repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
lakshayg/tensorflow
tensorflow/python/training/gradient_descent.py
99
2907
# 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
dhruvsrivastava/OJ
python/lib/python2.7/site-packages/wheel/signatures/__init__.py
565
3779
""" Create and verify jws-js format Ed25519 signatures. """ __all__ = [ 'sign', 'verify' ] import json from ..util import urlsafe_b64decode, urlsafe_b64encode, native, binary ed25519ll = None ALG = "Ed25519" def get_ed25519ll(): """Lazy import-and-test of ed25519 module""" global ed25519ll if not ...
bsd-3-clause
Dev4X/oppia
scripts/install_third_party.py
4
21784
# Copyright 2014 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 ...
apache-2.0
googleapis/googleapis-gen
google/cloud/documentai/v1beta3/documentai-v1beta3-py/scripts/fixup_documentai_v1beta3_keywords.py
1
6599
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Google 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 requi...
apache-2.0
diagramsoftware/odoomrp-utils
delivery_partner_properties/models/res_partner.py
12
1832
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
abantam/pmtud
.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/ansiterm.py
149
7136
#! /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,os try: if not(sys.stderr.isatty()and sys.stdout.isatty()): raise ValueError('not a tty') from ctypes import* class COORD(Structure): _fields_=[("X",c_short)...
gpl-2.0
jcai19/smm_gem5
src/arch/x86/isa/insts/general_purpose/string/move_string.py
91
3109
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
bsd-3-clause
estaban/pyload
module/plugins/hoster/VeohCom.py
1
2386
# -*- coding: utf-8 -*- ############################################################################ # 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,...
gpl-3.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/jinja2-2.6/examples/bench.py
75
10922
"""\ This benchmark compares some python templating engines with Jinja 2 so that we get a picture of how fast Jinja 2 is for a semi real world template. If a template engine is not installed the test is skipped.\ """ import sys import cgi from timeit import Timer from jinja2 import Environment as JinjaEnvi...
lgpl-3.0
damdam-s/OpenUpgrade
addons/account_analytic_plans/wizard/account_crossovered_analytic.py
341
2972
# -*- 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
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/hotshot/log.py
175
6239
import _hotshot import os.path import parser import symbol from _hotshot import \ WHAT_ENTER, \ WHAT_EXIT, \ WHAT_LINENO, \ WHAT_DEFINE_FILE, \ WHAT_DEFINE_FUNC, \ WHAT_ADD_INFO __all__ = ["LogReader", "ENTER", "EXIT", "LINE"] ENTER = WHAT_ENTER EXIT = WHAT_EXIT LINE = WHAT_LINENO ...
mit
nikolay-fedotov/tempest
tempest/api/object_storage/test_container_acl_negative.py
2
10157
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Joe H. Rahme <joe.hakim.rahme@enovance.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://...
apache-2.0
egabancho/invenio
invenio/modules/workflows/tasks/marcxml_tasks.py
1
9255
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013, 2014 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 opt...
gpl-2.0
Just-D/chromium-1
components/test/data/password_manager/automated_tests/tests.py
12
19494
# -*- coding: utf-8 -*- # 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. """Automated tests for many websites""" import argparse from environment import Environment from websitetest import WebsiteTest T...
bsd-3-clause
tlecomte/friture
friture/plotting/canvasWidget.py
2
5938
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 Timothée Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distri...
gpl-3.0
florian-f/sklearn
sklearn/datasets/tests/test_mldata.py
1
5233
"""Test functionality of mldata fetching utilities.""" import os import shutil import tempfile import scipy as sp from sklearn import datasets from sklearn.datasets import mldata_filename, fetch_mldata from sklearn.utils.testing import assert_in from sklearn.utils.testing import assert_not_in from sklearn.utils.test...
bsd-3-clause
ActiveState/code
recipes/Python/576693_Ordered_Dictionary_for_Py24/recipe-576693.py
85
8822
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. try: from thread import get_ident as _get_ident except ImportError: from dummy_thread import get_ident as _get_ident try: from _abcoll import KeysView...
mit
NoBodyCam/TftpPxeBootBareMetal
nova/tests/test_nexenta.py
9
11345
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Nexenta Systems, 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 # # ...
apache-2.0
humitos/argentinaenpython.com.ar
web/plugins/nanogallery_directive/nanogallery_directive.py
2
8707
# -*- coding: utf-8 -*- # Copyright © 2015 Manuel Kaufmann # 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, mod...
gpl-2.0
mtp1376/youtube-dl
youtube_dl/extractor/sexykarma.py
42
4400
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( unified_strdate, parse_duration, int_or_none, ) class SexyKarmaIE(InfoExtractor): IE_DESC = 'Sexy Karma and Watch Indian Porn' _VALID_URL = r'https?://(?:www\.)?(?:sexykarma\...
unlicense
timverhoeven/python
superidx.py
1
6116
#!/usr/bin/env python from app import * from command import * from configitem import polleritem from fileutils import chomp from nextfeed import nextfeed2 from getopt import getopt def getdummyid(filename, regex): dummyid = None lastline = chomp(tail(filename)) match = re.search(regex, lastline) if ...
gpl-2.0
pretix/cleanerversion
versions_tests/tests/test_utils.py
2
4313
from unittest import skipUnless from django import VERSION from django.db import connection from django.test import TestCase, TransactionTestCase from django.db import IntegrityError from versions_tests.models import ChainStore, Color from versions.util.postgresql import get_uuid_like_indexes_on_table AT_LEAST_17 = V...
apache-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/subnet_association.py
1
1285
# 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
dkluffy/dkluff-code
code/opencv/multiscale-template-matching/imutils.py
15
1498
# Import the necessary packages import numpy as np import cv2 def translate(image, x, y): # Define the translation matrix and perform the translation M = np.float32([[1, 0, x], [0, 1, y]]) shifted = cv2.warpAffine(image, M, (image.shape[1], image.shape[0])) # Return the translated image return shifted def rotat...
apache-2.0
RethinkRobotics/intera_sdk
intera_interface/src/intera_dataflow/weakrefset.py
1
6431
# Copyright (C) 2010 Michael Foord # E-mail: fuzzyman AT voidspace DOT org DOT uk # This software is licensed under the terms of the BSD license. # http://www.voidspace.org.uk/python/license.shtml # https://pypi.python.org/pypi/weakrefset from _weakref import ref __all__ = ['WeakSet'] __version__ = '1.0.0' clas...
apache-2.0
peter-jang/ansible
test/units/template/test_templar.py
59
5373
# (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
MicBrain/GSoC_CernVM-FS
build/externals/build_googletest/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...
apache-2.0
mujiansu/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/command/install.py
53
26777
"""distutils.command.install Implements the Distutils 'install' command.""" from distutils import log # This module should be kept compatible with Python 2.1. __revision__ = "$Id: install.py 62788 2008-05-06 22:41:46Z christian.heimes $" import sys, os, string from types import * from distutils.core import Command...
apache-2.0
mdreid/dinkylink
libs/bs4/tests/test_lxml.py
273
2965
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: import lxml.etree LXML_PRESENT = True LXML_VERSION = lxml.etree.LXML_VERSION except ImportError, e: LXML_PRESENT = False LXML_VERSION = (0,) if LXML_PRESENT: from bs4.builder import LXMLTreeB...
mit
mjfwest/git-cc
status.py
1
2270
from common import * from os.path import join, dirname class Status: def __init__(self, files): self.setFile(files[0]) def setFile(self, file): self.file = file def cat(self): blob = git_exec(['cat-file', 'blob', getBlob(self.id, self.file)], decode=False) write(join(CC_DIR,...
gpl-2.0
CXQERP/ODOOERP
addons/account/wizard/account_fiscalyear_close_state.py
297
3130
# -*- 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
citrix-openstack-build/glance
glance/tests/stubs.py
4
7172
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
apache-2.0
mpalmi/clip
packages/scap-security-guide/scap-security-guide-0.1.25/shared/fixes/bash/templates/create_services_disabled.py
4
1395
#!/usr/bin/python # # create_services_disabled.py # automatically generate fixes for disabled services # # NOTE: The file 'template_service_disabled' should be located in the same # working directory as this script. The template contains the following tags # that *must* be replaced successfully in order for the fixe...
apache-2.0
HassanAmr/bioconda-recipes
recipes/searchgui/3.2.11/searchgui.py
38
3263
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
mit
deevarvar/myLab
baidu_code/bcoreapi/ticket/old_pay_back.py
1
1812
#-*- coding=utf-8 -*- ''' @description: 旧支付渲染接口测试用例。 @author: miliang<miliang@baidu.com> ''' import sys import os import time import urllib import urllib2 import json import MySQLdb from settings import SERVER,MYSQL,ODP_MOVIE_PATH from base import Ticket_Base from old_pay_notice import Ticket_Old_Pay_...
mit
thinkopensolutions/odoo-brazil-banking
l10n_br_account_banking_payment_cnab/febraban/cnab_240/bancos/itau.py
1
4289
# coding: utf-8 # ########################################################################### # # Author: Luis Felipe Mileo # Fernando Marcato Rodrigues # Daniel Sadamo Hirayama # Copyright 2015 KMEE - www.kmee.com.br # # This program is free software: you can redistribute it and/or modif...
agpl-3.0
teresinahc/strans-pyra
stranspyra/api.py
1
3149
# Copyright (c) 2016 Renato Alencar <renatoalencar.73@gmail.com> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy,...
mit
oulan/oppia
core/counters.py
30
3121
# coding: utf-8 # # Copyright 2014 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 requi...
apache-2.0
DavidAndreev/indico
indico/MaKaC/webinterface/rh/fileAccess.py
2
1768
# This file is part of Indico. # Copyright (C) 2002 - 2016 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; either version 3 of the # License, or (a...
gpl-3.0
solidfire/solidfire-cli
element/cli/commands/cmd_async.py
2
10449
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright &copy; 2014-2016 NetApp, Inc. All Rights Reserved. # # DO NOT EDIT THIS CODE BY HAND! It has been generated with jsvcgen. # import click from element.cli import utils as cli_utils from element.cli import parser from element.cli.cli import pass_context from eleme...
apache-2.0
broadinstitute/PyGithub
github/tests/CommitComment.py
39
3088
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
liberorbis/libernext
env/lib/python2.7/site-packages/anyjson/__init__.py
62
5277
"""Wraps the best available JSON implementation available in a common interface""" import sys VERSION = (0, 3, 3) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Rune Halvorsen" __contact__ = "runefh@gmail.com" __homepage__ = "http://bitbucket.org/runeh/anyjson/" __docformat__ = "r...
gpl-2.0
evensonbryan/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/words/test/test_jabbersaslmechanisms.py
18
3077
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.jabber.sasl_mechanisms}. """ from twisted.trial import unittest from twisted.words.protocols.jabber import sasl_mechanisms class PlainTest(unittest.TestCase): def test_getInitialResponse(self): ...
gpl-2.0
epyatopal/geocoder-1
geocoder/google.py
2
7799
#!/usr/bin/python # coding: utf8 from __future__ import absolute_import import ratelim import requests from geocoder.base import Base class Google(Base): """ Google Geocoding API ==================== Geocoding is the process of converting addresses into geographic coordinates (like latitude 37.42...
mit
phalax4/CarnotKE
jyhton/lib-python/2.7/lib2to3/fixes/fix_filter.py
326
2107
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that changes filter(F, X) into list(filter(F, X)). We avoid the transformation if the filter() call is directly contained in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:. NOTE: This...
apache-2.0
maurerpe/FreeCAD
src/Mod/Spreadsheet/App/Spreadsheet_legacy.py
25
43880
#*************************************************************************** #* * #* Copyright (c) 2013 - Yorik van Havre <yorik@uncreated.net> * #* * #* This pr...
lgpl-2.1
LomaxRx/service-seeker
api/models.py
1
6016
from django.db import models from datetime import datetime class Organization(models.Model): name = models.CharField('Name', max_length=255) description = models.TextField('Description', blank=True) email = models.CharField(max_length=255, blank=True) url = models.CharField(max_length=255, blank=True) ...
mit
sajeeshcs/nested_quota_latest
nova/tests/unit/api/openstack/compute/contrib/test_cloudpipe_update.py
5
4397
# Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
moreati/numpy
numpy/random/tests/test_regression.py
78
4513
from __future__ import division, absolute_import, print_function import sys from numpy.testing import (TestCase, run_module_suite, assert_, assert_array_equal, assert_raises) from numpy import random from numpy.compat import long import numpy as np class TestRegression(TestCase): def ...
bsd-3-clause
punchagan/zulip
zerver/webhooks/ansibletower/tests.py
4
6887
from zerver.lib.test_classes import WebhookTestCase class AnsibletowerHookTests(WebhookTestCase): STREAM_NAME = "ansibletower" URL_TEMPLATE = "/api/v1/external/ansibletower?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = "ansibletower" def test_ansibletower_project_update_successful_message(sel...
apache-2.0
Iamthelaw/jedi-academy
hr_app/models/person.py
1
2393
from __future__ import unicode_literals from django.conf import settings from django.urls import reverse from django.core.exceptions import ValidationError from django.core.mail import send_mail from django.db import models from django.utils.translation import ugettext as _ from .thing import Planet class Candidate...
mit
lawrencejones/neuro
Exercise_2/Solutions/RobotConnectAvoidance.py
4
2167
""" Computational Neurodynamics Exercise 2 (C) Murray Shanahan et al, 2015 """ import numpy as np import numpy.random as rn from IzNetwork import IzNetwork def RobotConnectAvoidance(Ns, Nm): """ Construct four layers of Izhikevich neurons and connect them together, just as RobotConnect4L. Layers 0 and 1 compr...
gpl-3.0
havard024/prego
venv/lib/python2.7/site-packages/django/http/request.py
98
18233
from __future__ import absolute_import, unicode_literals import copy import os import re import sys import warnings from io import BytesIO from pprint import pformat try: from urllib.parse import parse_qsl, urlencode, quote, urljoin except ImportError: from urllib import urlencode, quote from urlparse impo...
mit
rghe/ansible
lib/ansible/modules/network/iosxr/iosxr_interface.py
5
26061
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
oracal/cineworld
test/test.py
1
3229
#!/usr/bin/env python ''' Created on 17 Jul 2011 @author: oracal ''' from cineworld import CW, cineworld from mock import Mock import unittest try: from urlparse import urlparse, parse_qs except ImportError: # For older versions of Python. from urlparse import urlparse from cgi import parse_qs def s...
mit
ScreamingUdder/mantid
scripts/test/SANS/algorithm_detail/crop_helper_test.py
3
1754
from __future__ import (absolute_import, division, print_function) import unittest import mantid from sans.algorithm_detail.crop_helper import get_component_name from sans.common.enums import DetectorType from sans.common.constants import EMPTY_NAME from sans.common.general_functions import create_unmanaged_algorithm f...
gpl-3.0
ZacariasBendeck/youtube-dl
youtube_dl/extractor/discovery.py
104
2354
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, ) from ..compat import compat_str class DiscoveryIE(InfoExtractor): _VALID_URL = r'http://www\.discovery\.com\/[a-zA-Z0-9\-]*/[a-zA-Z0-9\-]*/videos/(?P<id>[a-zA-Z0-9_\-]*)(?:\.ht...
unlicense
sfrenza/test-for-bot
venv/Lib/site-packages/nltk/stem/snowball.py
2
145970
# -*- coding: utf-8 -*- # # Natural Language Toolkit: Snowball Stemmer # # Copyright (C) 2001-2017 NLTK Project # Author: Peter Michael Stahl <pemistahl@gmail.com> # Peter Ljunglof <peter.ljunglof@heatherleaf.se> (revisions) # Algorithms: Dr Martin Porter <martin@tartarus.org> # URL: <http://nltk.org/> # For li...
mit
burke-software/BSC-website
wiki/plugins/attachments/settings.py
4
3436
from __future__ import absolute_import from __future__ import unicode_literals from django import VERSION from django.conf import settings as django_settings from wiki.conf import settings as wiki_settings from django.core.exceptions import ImproperlyConfigured # This is not used in django 1.7+ APP_LABEL = 'attachment...
gpl-3.0
aewhatley/scikit-learn
benchmarks/bench_multilabel_metrics.py
86
7286
#!/usr/bin/env python """ A comparison of multilabel target formats and metrics over them """ from __future__ import division from __future__ import print_function from timeit import timeit from functools import partial import itertools import argparse import sys import matplotlib.pyplot as plt import scipy.sparse as...
bsd-3-clause
mwrightevent38/MissionPlanner
Lib/site-packages/numpy/f2py/f2py2e.py
51
21653
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" """ f2py2e - Fortran to Python C/API generator. 2nd Edition. See __usage__ below. Copyright 1999--2005 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and dis...
gpl-3.0
saurabh6790/trufil_lib
core/page/messages/messages.py
16
3451
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from core.doctype.notification_count.notification_count import delete_notification_count_for @webnotes.whitelist() def get_list(arg=None): """get list of mes...
mit
Tatwi/legend-of-hondo
MMOCoreORB/utils/gmock-1.6.0/gtest/test/gtest_color_test.py
3259
4911
#!/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...
agpl-3.0
kingvuplus/boom2
lib/python/Components/Converter/Poll.py
2
1160
# Embedded file name: /usr/lib/enigma2/python/Components/Converter/Poll.py from enigma import eTimer class Poll(object): def __init__(self): self.__poll_timer = eTimer() self.__poll_timer.callback.append(self.poll) self.__interval = 1000 self.__enabled = False def _...
gpl-2.0
domob1812/huntercore
test/functional/feature_includeconf.py
1
3470
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests the includeconf argument Verify that: 1. adding includeconf to the configuration file causes the inc...
mit
newerthcom/savagerebirth
libs/python-2.72/Lib/encodings/mac_croatian.py
593
13889
""" Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
gpl-2.0
Antiun/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
384
1320
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
ghtmtt/QGIS
tests/src/python/test_qgspoint.py
29
3554
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsPoint. .. note:: 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. """ __author...
gpl-2.0
liukeke-start/HelloWorld
node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
2485
5536
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
apache-2.0
kiwitcms/Kiwi
tcms/core/tests/test_views.py
1
4622
# -*- coding: utf-8 -*- # pylint: disable=too-many-ancestors import os import unittest from http import HTTPStatus from django import test from django.conf import settings from django.contrib.sites.models import Site from django.core.management import call_command from django.urls import include, path, reverse from dj...
gpl-2.0
carlvlewis/bokeh
sphinx/source/docs/user_guide/source_examples/interaction_callbacks_for_selections.py
17
1057
from random import random from bokeh.models import Callback, ColumnDataSource from bokeh.plotting import hplot, figure, output_file, show output_file("callback.html") x = [random() for x in range(500)] y = [random() for y in range(500)] s1 = ColumnDataSource(data=dict(x=x, y=y)) p1 = figure(plot_width=400, plot_heig...
bsd-3-clause
Johnzero/erp
openerp/addons/claim_from_delivery/__openerp__.py
9
1595
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
ajaygarg84/sugar
src/jarabe/model/buddy.py
4
6712
# Copyright (C) 2006-2007 Red Hat, Inc. # Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/> # # 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 # ...
gpl-2.0
shizhai/wprobe
build_dir/host/scons-2.1.0/engine/SCons/Scanner/RC.py
21
2075
"""SCons.Scanner.RC This module implements the depenency scanner for RC (Interface Definition Language) files. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this softwar...
gpl-2.0
theuni/bitcoin
qa/rpc-tests/test_framework/util.py
77
13035
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module search path: import os import sys from decimal impor...
mit
rjschwei/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/resources/models/sku.py
5
1492
# 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
sahildua2305/eden
modules/tests/suite.py
1
11030
# -*- coding: utf-8 -*- # This script is designed to be run as a Web2Py application: # python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py # or # python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A testscript import argparse import unittest from gluon import current from gl...
mit
neilLasrado/frappe
frappe/core/doctype/activity_log/feed.py
5
2912
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: See license.txt from __future__ import unicode_literals import frappe import frappe.permissions from frappe.utils import get_fullname from frappe import _ from frappe.core.doctype.activity_log.activity_log import add_authentication_log fro...
mit
DomenicPuzio/incubator-metron
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/enrichment_commands.py
1
7328
#!/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 "License");...
apache-2.0
astrophysicist87/iEBE-Plumberg
generateJobs_guillimin.py
2
5935
#! /usr/bin/env python """ This script duplicates the EBE-Node folder and generate a collection of pbs files to be batch-submitted. For efficiency all codes inside EBE-Node should be compiled. """ from sys import argv, exit from os import makedirs, path, unlink from shutil import copytree, copy, rmtree fro...
gpl-3.0
rhndg/openedx
common/test/acceptance/tests/lms/test_lms_dashboard_search.py
49
7031
""" Test dashboard search """ import os import json from bok_choy.web_app_test import WebAppTest from ..helpers import generate_course_key from ...pages.common.logout import LogoutPage from ...pages.studio.utils import add_html_component, click_css, type_in_codemirror from ...pages.studio.auto_auth import AutoAuthPage...
agpl-3.0
TheTypoMaster/chromium-crosswalk
tools/telemetry/telemetry/internal/browser/user_agent.py
36
1195
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. UA_TYPE_MAPPING = { 'desktop': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) ' 'AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/40.0.2...
bsd-3-clause
SaschaMester/delicium
third_party/mojo/src/mojo/public/third_party/jinja2/constants.py
1169
1626
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
bsd-3-clause
MrCubanfrog/NorDB
nordb/database/sql2response.py
1
9724
""" This module contains all information for getting the response information out of the database. Functions and Classes --------------------- """ import datetime import time from nordb.core import usernameUtilities from nordb.nordic.response import FapResponse, PazResponse SELECT_RESPONSE_ID = ( ...
mit
Kazade/NeHe-Website
google_appengine/lib/django-1.2/docs/_ext/djangodocs.py
39
9475
""" Sphinx plugins for Django documentation. """ import os import re from docutils import nodes, transforms try: import json except ImportError: try: import simplejson as json except ImportError: try: from django.utils import simplejson as json except ImportError: ...
bsd-3-clause
safwanrahman/readthedocs.org
readthedocs/payments/forms.py
2
6647
"""Payment forms.""" from __future__ import absolute_import from builtins import str from builtins import object import logging from stripe.resource import Customer, Charge from stripe.error import InvalidRequestError from django import forms from django.utils.translation import ugettext_lazy as _ from .utils import...
mit
VinceZK/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py
122
3414
# 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 ...
bsd-3-clause
freenas/samba
python/samba/netcmd/main.py
8
2369
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2011 # # 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) a...
gpl-3.0
admcrae/tensorflow
tensorflow/contrib/keras/python/keras/losses.py
31
3469
# 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
tortxof/OpenBazaar
rudp/packet.py
13
3395
from pyee import EventEmitter import json import logging class Packet(object): def __init__(self, sequence_number, payload=None, synchronize=None, reset=None, packet_buffer=False): self.log = logging.getLogger( '%s' % self.__class__.__name__ ) self.event_emitter = EventEmitt...
mit
robhudson/django
tests/model_regress/models.py
281
2293
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible CHOICES = ( (1, 'first'), (2, 'second'), ) @python_2_unicode_compatible class Article(models.Model): headline = models.CharField(max_length=100, defa...
bsd-3-clause
ycl2045/nova-master
nova/tests/virt/xenapi/image/test_glance.py
11
7570
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
pcm17/tensorflow
tensorflow/python/ops/array_ops.py
9
78695
# 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
ptemplier/ansible
lib/ansible/modules/cloud/amazon/sqs_queue.py
26
10118
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterf...
gpl-3.0
hackebrot/cookiecutter
tests/test_get_config.py
2
3890
# -*- coding: utf-8 -*- import os import pytest from cookiecutter import config from cookiecutter.exceptions import ( ConfigDoesNotExistException, InvalidConfiguration ) def test_merge_configs(): default = { 'cookiecutters_dir': '/home/example/some-path-to-templates', 'replay_dir': '/home/exa...
bsd-3-clause
Cryptophobia/ansible
lib/ansible/utils/module_docs_fragments/aws.py
232
3156
# (c) 2014, Will Thames <will@thames.id.au> # # 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...
gpl-3.0
sheridancbio/cbioportal
core/src/test/scripts/system_tests_validate_data.py
4
11621
#!/usr/bin/env python3 ''' Copyright (c) 2016 The Hyve B.V. This code is licensed under the GNU Affero General Public License (AGPL), version 3, or (at your option) any later version. ''' import unittest import logging import tempfile import os import shutil import time import difflib from importer import validateDa...
agpl-3.0
hanselke/erpnext-1
erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py
52
3381
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import getdate, flt def execute(filters=None): if not filters: filters = {} float_preceision = f...
agpl-3.0
nirbheek/cerbero-old
test/test_cerbero_config.py
27
8277
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1
kuropatkin/lte
.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/winres.py
21
2783
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import re,traceback from waflib import Task,Logs,Utils from waflib.TaskGen import extension from waflib.Tools import c_preproc @extension('.rc') def rc_file(self,node): obj_ext='.rc.o' if self.env[...
gpl-2.0