repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
earthoutreach/libkml
third_party/googletest-r108/test/gtest_nc_test.py
15
3204
#!/usr/bin/env python # # Copyright 2007, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
gdgellatly/server-tools
database_cleanup/model/purge_modules.py
17
3560
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
NinjaMSP/crossbar
crossbar/adapter/mqtt/tx.py
2
17793
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
agpl-3.0
linebp/pandas
pandas/io/formats/format.py
1
86559
# -*- coding: utf-8 -*- """ Internal module for formatting output data in csv, html, and latex files. This module also applies to display formatting. """ from __future__ import print_function from distutils.version import LooseVersion # pylint: disable=W0141 from textwrap import dedent from pandas.core.dtypes.missin...
bsd-3-clause
tmxdyf/pjsip-jni
tests/cdash/cfg_site_sample.py
107
1530
# # cfg_site_sample.py - Sample site configuration # # Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) # # 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...
gpl-2.0
VerifiableRobotics/LTLMoP
src/lib/fileMethods.py
8
5686
#!/usr/bin/env python """ ==================================== fileMethods.py - File Access Methods ==================================== Some routines for reading and writing plaintext config/data files, shared throughout the toolkit. """ import re, types def readFromFile(fileName): """ A s...
gpl-3.0
hydratk/hydratk
src/hydratk/core/logger.py
1
7471
# -*- coding: utf-8 -*- """HydraTK core integrated logging features .. module:: core.logger :platform: Unix :synopsis: HydraTK core integrated logging features .. moduleauthor:: Petr Czaderna <pc@hydratk.org> """ import sys import os import hydratk.lib.system.config as syscfg from hydratk.lib.system.fs import ...
bsd-3-clause
rabipanda/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model_test.py
5
31833
# 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...
apache-2.0
laborautonomo/django-taggit
taggit/south_migrations/0001_initial.py
36
2966
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Tag' db.create_table('taggit_tag', ( ('id', self.gf('django.db.models.fields.Aut...
bsd-3-clause
Akrog/sqlalchemy
test/base/test_dependency.py
27
9864
from sqlalchemy.util import topological from sqlalchemy.testing import assert_raises, eq_ from sqlalchemy.testing.util import conforms_partial_ordering from sqlalchemy import exc from sqlalchemy.testing import fixtures class DependencySortTest(fixtures.TestBase): def assert_sort(self, tuples, allitems=None): ...
mit
phihag/youtube-dl
youtube_dl/extractor/tv3.py
69
1513
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class TV3IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tv3\.co\.nz/(?P<id>[^/]+)/tabid/\d+/articleID/\d+/MCat/\d+/Default\.aspx' _TEST = { 'url': 'http://www.tv3.co.nz/MOTORSPORT-SRS-SsangYong-Hampton-Dow...
unlicense
daodaoliang/python-phonenumbers
python/phonenumbers/phonenumbermatcher.py
9
38848
"""Functionality to match phone numbers in a piece of text""" # Based on original Java code: # java/src/com/google/i18n/phonenumbers/PhoneNumberMatch.java # java/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java # Copyright (C) 2011 The Libphonenumber Authors # # Licensed under the Apache License, Ver...
apache-2.0
Johnzero/erp
openerp/addons/auction/report/bids_lots.py
9
1446
# -*- 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...
agpl-3.0
benfinkelcbt/CPD200
CPD200-Lab13-Python/oauth2client/contrib/_win32_opener.py
21
3976
# Copyright 2016 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 ...
gpl-3.0
w4ngyi/flocker
flocker/common/test/test_script.py
15
10870
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """Tests for :module:`flocker.common.script`.""" import sys from eliot.testing import validateLogging, assertHasMessage from twisted.internet import task from twisted.internet.defer import succeed from twisted.python import usage from twisted.trial.unitte...
apache-2.0
dbarbier/ot-svn
python/test/t_Gamma_std.py
2
6199
#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: allDistributions = [Gamma(1.5, 2.5, -0.5), Gamma(15.0, 2.5)] for n in range(len(allDistributions)): distribution = allDistributions[n] print "Distribution ", distribution # Is this distribut...
gpl-3.0
jneves/OctoPrint
src/octoprint/printer/estimation.py
37
2106
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" class TimeEstimationHelper(...
agpl-3.0
tanmaythakur/django
tests/utils_tests/test_ipv6.py
332
2831
from __future__ import unicode_literals import unittest from django.utils.ipv6 import clean_ipv6_address, is_valid_ipv6_address class TestUtilsIPv6(unittest.TestCase): def test_validates_correct_plain_address(self): self.assertTrue(is_valid_ipv6_address('fe80::223:6cff:fe8a:2e8a')) self.assertT...
bsd-3-clause
EvanK/ansible
lib/ansible/modules/cloud/amazon/cloudfront_facts.py
33
32406
#!/usr/bin/python # 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 distributed...
gpl-3.0
moble/sympy
sympy/polys/rootisolation.py
78
55536
"""Real and complex root isolation and refinement algorithms. """ from __future__ import print_function, division from sympy.polys.densebasic import ( dup_LC, dup_TC, dup_degree, dup_strip, dup_reverse, dup_convert, dup_terms_gcd) from sympy.polys.densearith import ( dup_neg, dup_rshift, dup_rem)...
bsd-3-clause
haf/puppet-dak
dak/dakdb/update55.py
6
1692
#!/usr/bin/env python # coding=utf8 """ Drop unused view bin_assoc_by_arch. @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2011 Torsten Werner <twerner@debian.org> @license: GNU General Public License version 2 or later """ # This program is free software; you can redistribute it and/or modify # it u...
gpl-2.0
DominoTree/servo
tests/wpt/web-platform-tests/tools/third_party/py/py/_path/local.py
51
35346
""" local path implementation. """ from __future__ import with_statement from contextlib import contextmanager import sys, os, re, atexit, io, uuid import py from py._path import common from py._path.common import iswin32, fspath from stat import S_ISLNK, S_ISDIR, S_ISREG from os.path import abspath, normcase, normpa...
mpl-2.0
QianBIG/odoo
addons/sale_order_dates/__openerp__.py
260
1771
# -*- 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
nthiep/global-ssh-server
lib/python2.7/site-packages/django/contrib/webdesign/templatetags/webdesign.py
232
2207
from __future__ import unicode_literals from django.contrib.webdesign.lorem_ipsum import words, paragraphs from django import template register = template.Library() class LoremNode(template.Node): def __init__(self, count, method, common): self.count, self.method, self.common = count, method, common ...
agpl-3.0
manojhirway/ExistingImagesOnNFS
cinder/tests/unit/test_ibm_flashsystem.py
18
48757
# Copyright 2014 IBM Corp. # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LIC...
apache-2.0
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201211/update_third_party_slot.py
4
2442
#!/usr/bin/python # # 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 b...
apache-2.0
nightmarebadger/tutorials-python-basic
basic/classes/class_special_methods.py
1
5544
# -*- coding: utf-8 -*- """ An example using some of the Python special class methods. http://docs.python.org/2/reference/datamodel.html#basic-customization """ from __future__ import division def gcd(a, b): """Return the greatest common divisor of a and b. >>> gcd(2, 10) 2 >>> gcd(6, 9) 3 ...
mit
themurph/openshift-tools
ansible/roles/lib_zabbix/build/lib/base.py
13
2197
# pylint: skip-file # pylint: disable=line-too-long # Disabling line length for readability import os import time import datetime class Utils(object): ''' zabbix utilities class''' @staticmethod def get_priority(priority): ''' determine priority ''' prior = 0 if 'info' in priori...
apache-2.0
tlianza/Rfugee
lib/requests-2.7.0-py2.7.egg/requests/packages/urllib3/request.py
853
5751
try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from .filepost import encode_multipart_formdata __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen` method, such as :class:`~urllib3....
mit
leiferikb/bitpop
build/scripts/tools/swarm_bot_setup.py
1
7261
#!/usr/bin/env python # Copyright (c) 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. """Setup a given bot to become a swarm bot by installing the required files and setting up any required scripts. Assumes the bot a...
gpl-3.0
gacarrillor/QGIS
python/plugins/db_manager/db_plugins/spatialite/info_model.py
71
2411
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
saurabh6790/tru_app_back
selling/doctype/customer/customer.py
1
8008
# 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 webnotes from webnotes.model.doc import addchild, Document from webnotes.utils import get_first_day, get_last_day, add_to_date, nowdate, getda...
agpl-3.0
stormi/tsunami
src/primaires/combat/types/ceinture_renforcee.py
1
1941
# -*-coding:Utf-8 -* # Copyright (c) 2013 LE GOFF Vincent # 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 # lis...
bsd-3-clause
myahmao/PokemonGo-Map
pogom/models.py
1
14730
#!/usr/bin/python # -*- coding: utf-8 -*- import logging import os import time from peewee import Model, MySQLDatabase, SqliteDatabase, InsertQuery,\ IntegerField, CharField, DoubleField, BooleanField,\ DateTimeField, OperationalError from datetime import datetime, timedelta from ...
agpl-3.0
oliciv/youtube-dl
devscripts/gh-pages/update-sites.py
39
1041
#!/usr/bin/env python3 from __future__ import unicode_literals import sys import os import textwrap # We must be able to import youtube_dl sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) import youtube_dl def main(): with open('supportedsites.html.in', 'r', enco...
unlicense
bruderstein/PythonScript
PythonLib/full/idlelib/idle_test/test_macosx.py
11
3309
"Test macosx, coverage 45% on Windows." from idlelib import macosx import unittest from test.support import requires import tkinter as tk import unittest.mock as mock from idlelib.filelist import FileList mactypes = {'carbon', 'cocoa', 'xquartz'} nontypes = {'other'} alltypes = mactypes | nontypes class InitTktypeT...
gpl-2.0
elpaso/QGIS
python/plugins/processing/algs/grass7/ext/r_li_shape.py
45
1291
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_shape.py ------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ********************************...
gpl-2.0
lowitty/server
libsDarwin/Crypto/SelfTest/Protocol/test_KDF.py
116
3828
# -*- coding: utf-8 -*- # # SelfTest/Protocol/test_KDF.py: Self-test for key derivation functions # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is...
mit
eecsu/BET
examples/fromFile_ADCIRCMap/plotDomains2D.py
2
2242
#! /usr/bin/env python # Copyright (C) 2014-2015 The BET Development Team # import necessary modules import numpy as np import bet.postProcess.plotDomains as pDom import scipy.io as sio import bet.sample as sample # Set minima and maxima lam_domain = np.array([[.07, .15], [.1, .2]]) # Select only the stations I car...
gpl-3.0
RobinD42/shiboken
tests/samplebinding/conversion_operator_test.py
6
1772
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Shiboken Python Bindings Generator project. # # Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). # # Contact: PySide team <contact@pyside.org> # # This program is free software; you can redistribute it and/or # modify it under the terms...
gpl-2.0
tellesnobrega/sahara
sahara/tests/unit/service/validation/test_cluster_update_validation.py
3
5781
# Copyright (c) 2013 Mirantis 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 to in writ...
apache-2.0
Jonekee/chromium.src
tools/site_compare/scrapers/firefox/firefox2.py
189
6725
#!/usr/bin/env python # Copyright (c) 2011 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. """Does scraping for Firefox 2.0.""" import pywintypes import time import types from drivers import keyboard from drivers import ...
bsd-3-clause
cecep-edu/edx-platform
lms/lib/comment_client/comment.py
15
3564
from .utils import CommentClientRequestError, perform_request from .thread import Thread, _url_for_flag_abuse_thread, _url_for_unflag_abuse_thread from lms.lib.comment_client import models from lms.lib.comment_client import settings class Comment(models.Model): accessible_fields = [ 'id', 'body', 'anony...
agpl-3.0
fhe-odoo/odoo
addons/account_budget/__openerp__.py
52
3151
# -*- 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
Sweetgrassbuffalo/ReactionSweeGrass-v2
.meteor/local/dev_bundle/python/Lib/idlelib/MultiCall.py
9
17701
""" MultiCall - a class which inherits its methods from a Tkinter widget (Text, for example), but enables multiple calls of functions per virtual event - all matching events will be called, not only the most specific one. This is done by wrapping the event functions - event_add, event_delete and event_info. MultiCall r...
gpl-3.0
Cinntax/home-assistant
homeassistant/components/knx/binary_sensor.py
2
4880
"""Support for KNX/IP binary sensors.""" import voluptuous as vol from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from . impo...
apache-2.0
zhenzhai/edx-platform
lms/djangoapps/mobile_api/users/tests.py
13
17688
""" Tests for users API """ # pylint: disable=no-member import datetime import ddt from mock import patch from nose.plugins.attrib import attr import pytz from django.conf import settings from django.utils import timezone from django.template import defaultfilters from django.test import RequestFactory from milestones...
agpl-3.0
maellak/invenio
modules/bibformat/lib/elements/bfe_pagination.py
39
1082
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 2010, 2011 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 ## Licens...
gpl-2.0
ztane/zsos
userland/lib/python2.5/distutils/file_util.py
63
8316
"""distutils.file_util Utility functions for operating on single files. """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id: file_util.py 37828 2004-11-10 22:23:15Z loewis $" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose ou...
gpl-3.0
postlund/home-assistant
homeassistant/components/vultr/binary_sensor.py
7
3337
"""Support for monitoring the state of Vultr subscriptions (VPS).""" import logging import voluptuous as vol from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice from homeassistant.const import CONF_NAME import homeassistant.helpers.config_validation as cv from . import ( ATTR_A...
apache-2.0
fernandog/Medusa
lib/tvdbapiv2/models/series_episodes_query_params.py
3
3116
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
gpl-3.0
Razvy000/aiception_webinar
07_upload_s3.py
1
1098
# https://aws.amazon.com/console/ # user > My Security Credentials > Continue to Security Credentials > Users > Add User # username: raspi, access type: programmatic, permisisions: create group: raspigroup AmazonS3FullAccess > review create # copy Access key ID # copy Secret access key # mkdir ~/.aws # nano ~/.aws/cr...
mit
goldmedal/spark
examples/src/main/python/ml/vector_size_hint_example.py
52
2081
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
markovg/nest-simulator
examples/nest/music/minimalmusicsetup_receivenest.py
14
1311
#!/usr/bin/env python # -*- coding: utf-8 -*- # # minimalmusicsetup_receivenest.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 Foundat...
gpl-2.0
luofei98/qgis
python/plugins/processing/modeler/WrongModelException.py
49
1232
# -*- coding: utf-8 -*- """ *************************************************************************** WrongModelException.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
gpl-2.0
aperigault/ansible
lib/ansible/modules/cloud/vultr/vultr_firewall_rule.py
31
11641
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
decodio/pos_box
addons/hw_escpos_fake/controllers/main.py
1
14545
# -*- coding: utf-8 -*- import commands import logging import simplejson import os import os.path import io import base64 import openerp import time import random import math import md5 import openerp.addons.hw_proxy.controllers.main as hw_proxy import pickle import re import subprocess import traceback from threading ...
agpl-3.0
duguxy/pyqtgraph
pyqtgraph/flowchart/library/functions.py
33
11766
import numpy as np from ...metaarray import MetaArray from ...python2_3 import basestring, xrange def downsample(data, n, axis=0, xvals='subsample'): """Downsample by averaging points together across axis. If multiple axes are specified, runs once per axis. If a metaArray is given, then the axis values ca...
mit
yuange250/diydrones
Tools/autotest/pysim/aircraft.py
164
4001
import math, util, rotmat, time import random from rotmat import Vector3, Matrix3 class Aircraft(object): '''a basic aircraft class''' def __init__(self): self.home_latitude = 0 self.home_longitude = 0 self.home_altitude = 0 self.ground_level = 0 self.frame_height = 0.0 ...
gpl-3.0
AndropaX/Resurrected-Kernel
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
graphite-server/psphere
examples/gen_dhcpconf.py
4
1199
#!/usr/bin/python """A script which generates DHCP configuration for hosts matching a regex. Usage: gen_dhcpconf.py <regex> <compute_resource> e.g. gen_dhcpconf.py 'ssi2+' 'Online Engineering' """ import re import sys from psphere.client import Client client = Client() host_regex = sys.argv[1] p = re.compil...
apache-2.0
eneldoserrata/marcos_openerp
addons/report_geraldo/lib/geraldo/site/newsite/django_1_0/django/forms/util.py
11
2553
from django.utils.html import escape from django.utils.encoding import smart_unicode, StrAndUnicode, force_unicode from django.utils.safestring import mark_safe def flatatt(attrs): """ Convert a dictionary of attributes to a single string. The returned string will contain a leading space followed by key="v...
agpl-3.0
cwmartin/rez
src/rez/utils/yaml.py
4
3278
from rez.utils.sourcecode import SourceCode from rez.vendor import yaml from rez.vendor.yaml.dumper import SafeDumper from rez.vendor.yaml.nodes import ScalarNode, MappingNode from rez.vendor.version.version import Version from rez.vendor.version.requirement import Requirement from types import FunctionType, BuiltinFun...
lgpl-3.0
priyankarani/sale
__init__.py
2
1034
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from trytond.pool import Pool from .sale import * from .product import * from .stock import * from .configuration import * from .invoice import * def register(): Pool.re...
gpl-3.0
Donkyhotay/MoonPy
zope/app/publication/tests/test_httpfactory.py
1
6451
############################################################################## # # Copyright (c) 2003 Zope Corporation 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 SO...
gpl-3.0
windyuuy/opera
chromium/src/third_party/mesa/src/src/mapi/glapi/gen/gl_apitemp.py
29
9279
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # ...
bsd-3-clause
odooindia/odoo
addons/hr_payroll/wizard/hr_payroll_contribution_register_report.py
337
2074
# -*- 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
sunqm/pyscf
examples/grad/11-excited_state_casci_grad.py
2
1569
#!/usr/bin/env python # # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' Analytical nuclear gradients of CASCI excited state. ''' from pyscf import gto from pyscf import scf from pyscf import mcscf mol = gto.M( atom = [ ["O" , (0. , 0. , 0.)], [1 , (0. ,-0.757 , 0.587)], [1 , (0...
apache-2.0
nvoron23/socialite
jython/Lib/posixfile.py
87
7843
"""Extended file operations available in POSIX. f = posixfile.open(filename, [mode, [bufsize]]) will create a new posixfile object f = posixfile.fileopen(fileobject) will create a posixfile object from a builtin file object f.file() will return the original builtin file object f.dup() will r...
apache-2.0
xuweiliang/Codelibrary
nova/scheduler/filters/compute_filter.py
19
1724
# 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/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
bverburg/CouchPotatoServer
libs/html5lib/serializer/htmlserializer.py
235
12897
from __future__ import absolute_import, division, unicode_literals from six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElements, entities,...
gpl-3.0
tundra/plankton
python/test/plankton/test_codec.py
1
2657
import unittest from test.plankton import spectest import plankton.codec def load_tests(loader, tests, pattern): """Called by the test framework to produce the test suite to run.""" return spectest.build_test_suite(loader, tests, pattern, _make_codec_test_class) def _make_codec_test_class(test_file, test_name,...
apache-2.0
bmihelac/django-shop
shop/tests/views.py
4
8305
#-*- coding: utf-8 -*- from decimal import Decimal from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.test.testcases import TestCase from shop.models.cartmodel import Cart, CartI...
bsd-3-clause
tgarc/rideagg
requests/packages/chardet/langcyrillicmodel.py
2762
17725
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
apache-2.0
thebestgirl123/CloudBot
cloudbot/reloader.py
33
2824
import asyncio import os.path from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler class PluginReloader(object): def __init__(self, bot): """ :type bot: cloudbot.bot.CloudBot """ self.observer = Observer() self.bot = bot s...
gpl-3.0
Fullbiter/EECS-293
pa3/products.py
2
7144
# Kevin Nash (kjn33) # EECS 293 # Assignment 3 import abc from product_error import ProductError from product_type import ProductType from serial_number import SerialNumber class AbstractProduct(object): """Represent any Orange product""" __metaclass__ = abc.ABCMeta def __init__(self, serial_number, des...
gpl-3.0
marty331/jakesclock
flask/lib/python2.7/site-packages/pip/utils/build.py
899
1312
from __future__ import absolute_import import os.path import tempfile from pip.utils import rmtree class BuildDirectory(object): def __init__(self, name=None, delete=None): # If we were not given an explicit directory, and we were not given an # explicit delete option, then we'll default to del...
gpl-2.0
Odingod/mne-python
mne/time_frequency/tests/test_csd.py
20
7197
import numpy as np from nose.tools import assert_raises, assert_equal, assert_true from numpy.testing import assert_array_equal from os import path as op import warnings import mne from mne.io import Raw from mne.utils import sum_squared from mne.time_frequency import compute_epochs_csd, tfr_morlet warnings.simplefi...
bsd-3-clause
miped/django-envy
envy.py
1
11087
from __future__ import unicode_literals, print_function import os import sys import logging import json from decimal import Decimal, InvalidOperation try: import urllib.parse as urlparse except ImportError: import urlparse try: from django.core.exceptions import ImproperlyConfigured except ImportError: ...
mit
xin3liang/platform_external_chromium_org
remoting/tools/build/remoting_copy_locales.py
142
5150
#!/usr/bin/env python # 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. """Helper script to repack paks for a list of locales. Gyp doesn't have any built-in looping capability, so this just provides a way t...
bsd-3-clause
alexthered/kienhoc-platform
lms/djangoapps/verify_student/tests/test_services.py
10
8099
""" Tests of re-verification service. """ import ddt from opaque_keys.edx.keys import CourseKey from course_modes.models import CourseMode from course_modes.tests.factories import CourseModeFactory from student.models import CourseEnrollment from student.tests.factories import UserFactory from verify_student.models ...
agpl-3.0
837468220/python-for-android
python3-alpha/python3-src/Tools/pynche/Switchboard.py
116
4797
"""Switchboard class. This class is used to coordinate updates among all Viewers. Every Viewer must conform to the following interface: - it must include a method called update_yourself() which takes three arguments; the red, green, and blue values of the selected color. - When a Viewer selects a colo...
apache-2.0
sheepray/pefile
setup.py
24
1062
#!/usr/bin/env python try: from setuptools import setup except ImportError, excp: from distutils.core import setup import pefile import os os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' os.environ['COPYFILE_DISABLE'] = 'true' setup(name = 'pefile', version = pefile.__version__, description...
bsd-3-clause
wwj718/ANALYSE
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
9
5076
import copy from contracts import contract, new_contract from xblock.fields import Scope from collections import namedtuple from xblock.exceptions import InvalidScopeError from .definition_lazy_loader import DefinitionLazyLoader from xmodule.modulestore.inheritance import InheritanceKeyValueStore from opaque_keys.edx.l...
agpl-3.0
eXistenZNL/SickRage
lib/unidecode/x023.py
174
4346
data = ( '[?]', # 0x00 '[?]', # 0x01 '[?]', # 0x02 '[?]', # 0x03 '[?]', # 0x04 '[?]', # 0x05 '[?]', # 0x06 '[?]', # 0x07 '[?]', # 0x08 '[?]', # 0x09 '[?]', # 0x0a '[?]', # 0x0b '[?]', # 0x0c '[?]', # 0x0d '[?]', # 0x0e '[?]', # 0x0f '[?]', # 0x10 '[?]', # 0x11 '[?]'...
gpl-3.0
ajdawson/numpy
numpy/ma/extras.py
2
56827
""" Masked arrays add-ons. A collection of utilities for `numpy.ma`. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ from __future__ import division, absolute_import, print_function __author__ = "Pierre GF Gerard-Marchant ($Au...
bsd-3-clause
hottwaj/django
django/contrib/admin/templatetags/log.py
499
2080
from django import template from django.contrib.admin.models import LogEntry register = template.Library() class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit, self.varname, self.user = limit, varname, user def __repr__(self): return "<GetAdminLog Node>" ...
bsd-3-clause
chaosagent/pandacoin
contrib/pyminer/pyminer.py
41
6434
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
mit
daemotron/controlbeast
controlbeast/cli/commit.py
1
1611
# -*- coding: utf-8 -*- """ controlbeast.cli.commit ~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2013 by the ControlBeast team, see AUTHORS. :license: ISC, see LICENSE for details. """ import os import controlbeast.cli.base from controlbeast.scm import scm_commit, CbSCMBinaryError, CbSCMCommitError ...
isc
chen0510566/MissionPlanner
Lib/site-packages/numpy/distutils/command/build.py
99
1255
import os import sys from distutils.command.build import build as old_build from distutils.util import get_platform from numpy.distutils.command.config_compiler import show_fortran_compilers class build(old_build): sub_commands = [('config_cc', lambda *args: True), ('config_fc', lambda...
gpl-3.0
tseaver/google-cloud-python
vision/google/cloud/vision_v1/gapic/image_annotator_client_config.py
2
1606
config = { "interfaces": { "google.cloud.vision.v1.ImageAnnotator": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], }, "retry_params": { "default": { "initial_...
apache-2.0
miyosuda/intro-to-dl-android
HandWriting/jni-build/jni/include/tensorflow/python/platform/default/_googletest.py
7
2690
# 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 by applicable law or a...
apache-2.0
freenas/samba
source4/torture/drs/python/delete_object.py
8
16913
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Unix SMB/CIFS implementation. # Copyright (C) Kamen Mazdrashki <kamenim@samba.org> 2010 # # 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...
gpl-3.0
google-research/ruse
seq2seq/third_party/main/finetune_t5_trainer.py
1
14962
# coding=utf-8 # Copyright 2010, The T5 Authors and HuggingFace Inc. # Copyright 2020 Google LLC # Modified from the original HuggingFace version. # # 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...
apache-2.0
gkarlin/django-jenkins
build/logilab-common/__pkginfo__.py
2
1887
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
lgpl-3.0
Katello/katello-cli
src/katello/client/core/gpg_key.py
1
7275
# # Katello Organization actions # Copyright 2013 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 sho...
gpl-2.0
Quantra/PokemonGo-Bot
pokemongo_bot/cell_workers/sleep_schedule.py
16
4041
from datetime import datetime, timedelta from time import sleep from random import uniform from pokemongo_bot.base_task import BaseTask class SleepSchedule(BaseTask): """Pauses the execution of the bot every day for some time Simulates the user going to sleep every day for some time, the sleep time and t...
mit
mSenyor/sl4a
python/src/Lib/test/test_doctest.py
52
76371
""" Test script for doctest. """ from test import test_support import doctest import warnings # NOTE: There are some additional tests relating to interaction with # zipimport in the test_zipimport_support test module. ###################################################################### ## Sample Objects (use...
apache-2.0
gromacs/copernicus
cpc/network/broadcast_message.py
2
4146
# This file is part of Copernicus # http://www.copernicus-computing.org/ # # Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as published # by the Free Soft...
gpl-2.0
dcosentino/edx-platform
lms/djangoapps/shoppingcart/tests/test_pdf.py
6
11044
""" Tests for Pdf file """ from datetime import datetime from django.test.utils import override_settings from django.conf import settings import unittest from io import BytesIO from shoppingcart.pdf import PDFInvoice from shoppingcart.utils import parse_pages PDF_RECEIPT_DISCLAIMER_TEXT = "THE SITE AND ANY INFORMATION...
agpl-3.0