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
JioCloud/nova_test_latest
nova/tests/unit/objects/test_instance.py
7
75405
# Copyright 2013 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 agree...
apache-2.0
pjdelport/Django-facebook
docs/docs_env/Lib/encodings/mac_centeuro.py
593
14358
""" Python Character Mapping Codec mac_centeuro generated from 'MAPPINGS/VENDORS/APPLE/CENTEURO.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...
bsd-3-clause
thepiper/standoff
vpy/lib/python2.7/site-packages/flask/testsuite/helpers.py
405
21973
# -*- coding: utf-8 -*- """ flask.testsuite.helpers ~~~~~~~~~~~~~~~~~~~~~~~ Various helpers. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import flask import unittest from logging import StreamHandler from flask.testsuite import FlaskTestCase,...
gpl-3.0
sunu/oh-missions-oppia-beta
core/controllers/reader.py
2
11125
# 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
Fafou/Sick-Beard
lib/hachoir_core/field/string_field.py
90
14849
""" String field classes: - String: Fixed length string (no prefix/no suffix) ; - CString: String which ends with nul byte ("\0") ; - UnixLine: Unix line of text, string which ends with "\n" ; - PascalString8, PascalString16, PascalString32: String prefixed with length written in a 8, 16, 32-bit integer (use parent e...
gpl-3.0
pizzapanther/GAE-Bulk-Mailer
django/contrib/localflavor/mx/forms.py
103
8998
# -*- coding: utf-8 -*- """ Mexican-specific form helpers. """ from __future__ import unicode_literals import re from django.forms import ValidationError from django.forms.fields import Select, RegexField from django.utils import six from django.utils.translation import ugettext_lazy as _ from django.core.validators i...
bsd-2-clause
google/tink
python/tink/__init__.py
1
1426
# Copyright 2019 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 required by applicable law or agreed to in writing,...
apache-2.0
tectronics/mythbox
resources/lib/zope.interface/zope/interface/ro.py
14
1800
############################################################################## # # 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-2.0
mdcic/ssp
ssp/__init__.py
1
1932
# -*- coding: utf-8 -*- # # Copyright © 2012-2013 Yury Konovalov <YKonovalov@gmail.com> # # This file is part of SSP. # # SSP 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, o...
gpl-3.0
jakesyl/linux-history-full
Documentation/target/tcm_mod_builder.py
337
24391
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
aevri/mel
mel/cmd/rotomapfiltermarks.py
1
4075
"""Automatically remove marked regions that are probably not moles.""" import sys import mel.lib.fs import mel.rotomap.filtermarks import mel.rotomap.moles def setup_parser(parser): parser.add_argument( "FRAMES", type=mel.rotomap.moles.make_argparse_image_moles, nargs="+", help=...
apache-2.0
GaussDing/django
tests/conditional_processing/tests.py
38
9145
# -*- coding:utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.test import TestCase, override_settings FULL_RESPONSE = 'Test conditional get response' LAST_MODIFIED = datetime(2007, 10, 21, 23, 21, 47) LAST_MODIFIED_STR = 'Sun, 21 Oct 2007 23:21:47 GMT' LAST_MODIFIED_NEWER_S...
bsd-3-clause
WooyunDota/binwalk
src/binwalk/plugins/compressd.py
11
1401
import binwalk.core.C import binwalk.core.plugin from binwalk.core.common import * class CompressdPlugin(binwalk.core.plugin.Plugin): ''' Searches for and validates compress'd data. ''' MODULES = ['Signature'] READ_SIZE = 64 COMPRESS42 = "compress42" COMPRESS42_FUNCTIONS = [ binw...
mit
xia2/xia2
src/xia2/Wrappers/CCP4/Mtz2various.py
1
2773
import os from xia2.Decorators.DecoratorFactory import DecoratorFactory from xia2.Driver.DriverFactory import DriverFactory def Mtz2various(DriverType=None): """A factory for Mtz2variousWrapper classes.""" DriverInstance = DriverFactory.Driver(DriverType) CCP4DriverInstance = DecoratorFactory.Decorate(D...
bsd-3-clause
dkarakats/edx-platform
common/djangoapps/reverification/migrations/0001_initial.py
114
1645
# -*- 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 'MidcourseReverificationWindow' db.create_table('reverification_midcoursereverificationwindow...
agpl-3.0
andrewyoung1991/abjad
abjad/tools/timespantools/timespan_2_stops_when_timespan_1_stops.py
2
1173
# -*- encoding: utf-8 -*- def timespan_2_stops_when_timespan_1_stops( timespan_1=None, timespan_2=None, hold=False, ): r'''Makes time relation indicating that `timespan_2` happens during `timespan_1`. :: >>> inequality = timespantools.timespan_2_stops_when_timespan_1_stops() ...
gpl-3.0
nkalodimas/invenio
modules/bibauthorid/lib/bibauthorid_scheduler.py
6
5291
# -*- 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 opt...
gpl-2.0
kronoscode/Booktype
lib/booktype/apps/export/models.py
6
3367
# This file is part of Booktype. # Copyright (c) 2012 # Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org> # # Booktype 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
UKPLab/semeval2017-scienceie
code/skip-thoughts/TomKenter-siamese-cbow-faf752ef6a99/siamese-cbow.py
1
12706
''' Copyright 2016 Tom Kenter 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 distrib...
apache-2.0
EShamaev/ardupilot
libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F407xx.py
10
20817
#!/usr/bin/env python ''' these tables are generated from the STM32 datasheets for the STM32F40x ''' # additional build information for ChibiOS build = { "CHIBIOS_STARTUP_MK" : "os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk", "CHIBIOS_PLATFORM_MK" : "os/hal/ports/STM32/STM32F4xx/platform.mk" ...
gpl-3.0
Antiun/project-service
project_recalculate/tests/test_project_task.py
15
5430
# -*- coding: utf-8 -*- # See README.rst file on addon root folder for license details from openerp.exceptions import ValidationError from . import base class TestProjectTaskBegin(base.BaseCase): calculation_type = 'date_begin' def __init__(self, methodName='runTest'): super(TestProjectTaskBegin, se...
agpl-3.0
EduPepperPD/pepper2013
common/lib/xmodule/xmodule/tests/test_peer_grading.py
5
4876
import unittest from xmodule.modulestore import Location from .import get_test_system from test_util_open_ended import MockQueryDict, DummyModulestore import logging log = logging.getLogger(__name__) ORG = "edX" COURSE = "open_ended" class PeerGradingModuleTest(unittest.TestCase, DummyModulestore): """ Tes...
agpl-3.0
hashworks/CouchPotatoServer
libs/suds/mx/basic.py
211
1657
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
telminov/django-park-keeper
test_settings.py
2
1121
import mongoengine ROOT_URLCONF = 'parkkeeper.urls' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } MIDDLEWARE_CLASSES = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middle...
mit
BlackFlagConsortium/makershop
tests/auth/test_login.py
1
1998
from http import client as http import flask from nose.tools import * from .. import MakershopTestCase from ..factories import UserFactory class LoginTestCase(MakershopTestCase): def setUp(self): super(LoginTestCase, self).setUp() self.client = self.app.test_client() def test_auth_failure_u...
agpl-3.0
BigBrother1984/android_external_chromium_org
build/android/pylib/surface_stats_collector.py
23
10779
# 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. import Queue import datetime import logging import re import threading from pylib import perf_tests_helper # Log marker containing SurfaceTexture time...
bsd-3-clause
jhaux/tensorflow
tensorflow/contrib/keras/python/keras/regularizers_test.py
55
2781
# 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...
apache-2.0
XisoDev/xisoPos
node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
3426
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
gpl-3.0
wskplho/arcus-python-client
arcus_mc_node.py
1
29130
# # arcus-python-client - Arcus python client drvier # Copyright 2014 NAVER 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 req...
apache-2.0
Reagankm/KnockKnock
venv/lib/python3.4/site-packages/pip/commands/zip.py
393
14821
import sys import re import fnmatch import os import shutil import zipfile from pip.util import display_path, backup_dir, rmtree from pip.log import logger from pip.exceptions import InstallationError from pip.basecommand import Command class ZipCommand(Command): """Zip individual packages.""" name = 'zip' ...
gpl-2.0
grmToolbox/grmpy
grmpy/simulate/simulate.py
1
1772
"""The module provides the simulation process.""" import numpy as np from grmpy.simulate.simulate_auxiliary import simulate_unobservables from grmpy.simulate.simulate_auxiliary import simulate_covariates from grmpy.estimate.estimate_par import calculate_criteria from grmpy.simulate.simulate_auxiliary import simulate_...
mit
astaff/ansible
lib/ansible/playbook/role/__init__.py
19
15459
# (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
stevenvanrossem/son-emu
src/emuvim/api/openstack/resources/image.py
1
1499
""" Copyright (c) 2017 SONATA-NFV and Paderborn University 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 ap...
apache-2.0
thermokarst/qiime2
qiime2/plugin/plugin.py
1
11128
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
tchernomax/ansible
lib/ansible/modules/network/nxos/nxos_smu.py
84
4839
#!/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 distribut...
gpl-3.0
buserror/simavr
examples/board_hd44780/data/processblu.py
19
2263
import Image,struct img = Image.open('blu.tiff') class CharData(object): def __init__(self, data): if data is None: self.data = [ [] for y in range(7) ] else: self.data = data def concat( self, other ): for y in range(7): self.data[y] += other.data[y...
gpl-3.0
mark-me/Pi-Jukebox
venv/Lib/site-packages/mutagen/asf/__init__.py
1
10092
# -*- coding: utf-8 -*- # Copyright (C) 2005-2006 Joe Wreschnig # Copyright (C) 2006-2007 Lukas Lalinsky # # 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 #...
agpl-3.0
Zarokka/exaile
xl/metadata/_matroska.py
2
13097
# EBML/Matroska parser # Copyright (C) 2010, 2015 Johannes Sasongko <sasongko@gmail.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, or (at your option) # any later vers...
gpl-2.0
jwhitlock/kuma
kuma/payments/forms.py
1
13408
from __future__ import unicode_literals import logging from decimal import Decimal import stripe from django import forms from django.conf import settings from django.core.validators import MinValueValidator from django.utils.translation import ugettext_lazy as _ from kuma.core.form_fields import StrippedCharField ...
mpl-2.0
ChakshuGautam/coursera-dl
coursera/coursera_dl.py
5
41202
#!/usr/bin/env python # -*- coding: utf-8 -*- # Authors and copyright: # © 2012-2013, John Lehmann (first last at geemail dotcom or @jplehmann) # © 2012-2015, Rogério Brito (r lastname at ime usp br) # © 2013, Jonas De Taeye (first dt at fastmail fm) # # Contributions are welcome, but please add new unit t...
lgpl-3.0
normanmaurer/autobahntestsuite-maven-plugin
src/main/resources/twisted/internet/test/test_glibbase.py
7
2289
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for twisted.internet.glibbase. """ from __future__ import division, absolute_import import sys from twisted.trial.unittest import TestCase from twisted.internet._glibbase import ensureNotImported class EnsureNotImportedTests(TestCas...
apache-2.0
Xaltotun/conan
conans/client/uploader.py
2
2188
import os from conans.errors import ConanException, NotFoundException from conans.model.ref import PackageReference from conans.util.log import logger import time class ConanUploader(object): def __init__(self, paths, user_io, remote_proxy): self._paths = paths self._user_io = user_io sel...
mit
MichalMaM/ella
ella/core/south_migrations/0001_initial.py
6
9991
# 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): # Adding model 'Author' db.create_table('core_author', ( ('id', self.gf('django.db.models.fields.AutoFi...
bsd-3-clause
jacky-young/crosswalk-test-suite
stability/stability-embeddingapi-android-tests/inst.apk.py
903
3180
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
bsd-3-clause
citrix-openstack-build/stevedore
stevedore/named.py
79
5554
from .extension import ExtensionManager class NamedExtensionManager(ExtensionManager): """Loads only the named extensions. This is useful for explicitly enabling extensions in a configuration file, for example. :param namespace: The namespace for the entry points. :type namespace: str :param...
apache-2.0
marty331/jakesclock
flask/lib/python2.7/site-packages/jinja2/testsuite/inheritance.py
414
8248
# -*- coding: utf-8 -*- """ jinja2.testsuite.inheritance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the template inheritance feature. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Env...
gpl-2.0
thigg/fapr
graph/builder.py
1
7026
#!/usr/bin/env python # Arguments: arg1 num_cpus to use import sys import itertools from multiprocessing import Pool import datetime # Import pygraph from pygraph.classes.digraph import digraph from pygraph.algorithms import cycles as cycl from pygraph.algorithms import searching as gsearch import multiprocessing ...
mit
CropCircleSys/bsd-cloudinit
cloudbaseinit/utils/windows/cryptoapi.py
5
8292
# Copyright 2013 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
gargleblaster/trading-with-python
lib/extra.py
77
2540
''' Created on Apr 28, 2013 Copyright: Jev Kuznetsov License: BSD ''' from __future__ import print_function import sys import urllib import os import xlrd # module for excel file reading import pandas as pd class ProgressBar: def __init__(self, iterations): self.iterations = iterations ...
bsd-3-clause
polimediaupv/edx-platform
openedx/core/djangoapps/user_api/tests/test_middleware.py
152
4415
"""Tests for user API middleware""" from mock import Mock, patch from unittest import TestCase from django.http import HttpResponse from django.test.client import RequestFactory from student.tests.factories import UserFactory, AnonymousUserFactory from ..tests.factories import UserCourseTagFactory from ..middleware ...
agpl-3.0
dkubiak789/odoo
addons/l10n_do/__openerp__.py
309
2992
# -*- coding: utf-8 -*- # ############################################################################# # # First author: Jose Ernesto Mendez <tecnologia@obsdr.com> (Open Business Solutions SRL.) # Copyright (c) 2012 -TODAY Open Business Solutions, SRL. (http://obsdr.com). All rights reserved. # # This is a fork to upg...
agpl-3.0
cloudera/Impala
infra/python/deps/pip_download.py
1
6585
#!/usr/bin/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 # "Lice...
apache-2.0
fabeer/android_kernel_xolo_q1100
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
githubutilities/LeetCode
Python/closest-binary-search-tree-value-ii.py
3
4576
# Time: O(h + k) # Space: O(h) # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def closestKValues(self, root, target, k): """ :type root: TreeNode ...
mit
huangkuan/hack
lib/google/protobuf/field_mask_pb2.py
11
2304
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/field_mask.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import r...
apache-2.0
YuriGural/erpnext
erpnext/accounts/doctype/account/test_account.py
17
3625
# 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 erpnext.stock import get_warehouse_account, get_company_default_inventory_account def _make_test_records(verbose): from frappe.tes...
gpl-3.0
brianwoo/django-tutorial
build/Django/tests/forms_tests/tests/test_formsets.py
25
55402
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.forms import ( CharField, DateField, FileField, Form, IntegerField, SplitDateTimeField, ValidationError, formsets, ) from django.forms.formsets import BaseFormSet, formset_factory from django.forms.utils import ErrorLi...
gpl-3.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pyparsing-2.0.3/examples/simpleSQL.py
2
4619
# simpleSQL.py # # simple demo of using the parsing library to do simple-minded SQL parsing # could be extended to include where clauses etc. # # Copyright (c) 2003, Paul McGuire # from pyparsing import Literal, CaselessLiteral, Word, Upcase, delimitedList, Optional, \ Combine, Group, alphas, nums, alphanums, Parse...
mit
stuartarchibald/numba
numba/tests/test_ufuncs.py
4
71563
import functools import itertools import re import sys import warnings import threading import operator import numpy as np import unittest from numba import typeof, njit from numba.core import types, typing, utils from numba.core.compiler import compile_isolated, Flags, DEFAULT_FLAGS from numba.np.numpy_support impor...
bsd-2-clause
aredridel/node-gyp
gyp/pylib/gyp/MSVSProject.py
2736
6387
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
mit
qtproject/pyside-pyside
tests/QtQml/bug_995.py
1
1629
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
lgpl-2.1
dorotapalicova/GoldDigger
gold_digger/data_providers/google.py
1
1939
# -*- coding: utf-8 -*- import re from datetime import date from ._provider import Provider class Google(Provider): """ Offers only latest exchange rates for only one currency pair at the moment. """ BASE_URL = 'https://www.google.com/finance/converter?a=1&from={}&to={}' BASE_CURRENCY = "USD" ...
apache-2.0
wendellpbarreto/dolly
node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
2736
6387
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
mit
left2right/ssdb
deps/cpy/engine.py
8
13607
# encoding=utf-8 ################################# # Author: ideawu # Link: http://www.ideawu.net/ ################################# import sys, os, shutil, datetime import antlr3 import antlr3.tree from ExprLexer import ExprLexer from ExprParser import ExprParser class CpyEngine: found_files = set() def find_impo...
bsd-3-clause
clausqr/HTPC-Manager
libs/tzlocal/windows_tz.py
42
24987
# This file is autogenerated by the get_windows_info.py script # Do not edit. win_tz = {'AUS Central Standard Time': 'Australia/Darwin', 'AUS Eastern Standard Time': 'Australia/Sydney', 'Afghanistan Standard Time': 'Asia/Kabul', 'Alaskan Standard Time': 'America/Anchorage', 'Arab Standard Time': 'Asia/Riyadh', 'Ar...
mit
qizdyyt/CPLogProgram
HebcaLog/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/mac/gyptest-xcode-gcc.py
212
1781
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that xcode-style GCC_... settings are handled properly. """ import TestGyp import os import subprocess import sys def Ignore...
apache-2.0
uprare/p2pool
p2pool/test/test_p2p.py
269
2724
import random from twisted.internet import defer, endpoints, protocol, reactor from twisted.trial import unittest from p2pool import networks, p2p from p2pool.bitcoin import data as bitcoin_data from p2pool.util import deferral class Test(unittest.TestCase): @defer.inlineCallbacks def test_sharereq(self): ...
gpl-3.0
PennartLoettring/Poettrix
rootfs/usr/lib/python3.4/encodings/cp1252.py
272
13511
""" Python Character Mapping Codec cp1252 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.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,in...
gpl-2.0
weijia/djangoautoconf
djangoautoconf/urls.py
1
1856
import django from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin # from mezzanine.core.views import direct_to_template from django.contrib.auth.decorators import logi...
bsd-3-clause
SimVascular/VTK
Filters/Hybrid/Testing/Python/TestFacetReader.py
20
1471
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() ren1 = vtk.vtkRenderer() ren1.SetBackground(0,0,0) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.SetSize(300,300) iren = vtk.vtkRenderWindowInteractor() iren.SetRende...
bsd-3-clause
kret0s/gnuhealth-live
tryton/server/trytond-3.8.3/trytond/modules/stock_inventory_location/setup.py
1
3704
#!/usr/bin/env python # 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 setuptools import setup import re import os import ConfigParser def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).r...
gpl-3.0
MoamerEncsConcordiaCa/tensorflow
tensorflow/contrib/keras/python/keras/utils/vis_utils.py
9
4235
# 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
kumar303/bangotest
bin/crontab/gen-crons.py
70
1205
#!/usr/bin/env python import os from optparse import OptionParser from jinja2 import Template HEADER = '!!AUTO-GENERATED!! Edit bin/crontab/crontab.tpl instead.' TEMPLATE = open(os.path.join(os.path.dirname(__file__), 'crontab.tpl')).read() def main(): parser = OptionParser() parser.add_option('-w', '--web...
bsd-3-clause
ceph/samba
source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
66
8263
#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Andrew Tridgell 2009 # # 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 optio...
gpl-3.0
andela-angene/coursebuilder-core
coursebuilder/models/custom_units.py
9
3332
# 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 by applicable law or ...
apache-2.0
deepakantony/sms-tools
workspace/A3/submitA3.py
1
11638
### The only things you'll have to edit (unless you're porting this script over to a different language) ### are at the bottom of this file. import urllib import urllib2 import email import email.message import email.encoders import sys import pickle import json import base64 import numpy as np import subprocess impor...
agpl-3.0
OpenNeko/InfoBase
classes/cfg.py
1
1584
class ConfigError(Exception): def __init__(self, option, expect): self.a = option self.e = expect def __str__(self): return "Config error: {0} expected to be {1}".format(self.a, self.e) class Config: def __init__(self, cfg_file): self.f = cfg_file self.info = self.p...
gpl-3.0
alexjc/pylearn2
pylearn2/space/tests/test_space.py
32
58117
""" Tests for space utilities. """ from __future__ import print_function import itertools import warnings import numpy as np from theano.compat.six.moves import xrange import theano from theano import tensor # Can't use nose.tools.assert_raises, only introduced in python 2.7. Use # numpy.testing.assert_raises instea...
bsd-3-clause
patrickm/chromium.src
tools/android/find_unused_resources.py
146
5486
#!/usr/bin/python # Copyright (c) 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. """Lists unused Java strings and other resources.""" import optparse import re import subprocess import sys def GetLibraryResources(...
bsd-3-clause
hankcs/HanLP
hanlp/datasets/parsing/ud/ud23.py
1
26967
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-05-21 20:26 _UD_23_HOME = "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-2895/ud-treebanks-v2.3.tgz?sequence=1&isAllowed=y" _UD_24_HOME = "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-2988/ud-treebanks-v2.4.tgz?sequence...
apache-2.0
geekboxzone/lollipop_external_chromium_org
ui/ozone/generate_ozone_platform_list.py
102
4432
#!/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. """Code generator for Ozone platform list. This script takes as arguments a list of platform names and generates a C++ source file con...
bsd-3-clause
40223211/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/re.py
626
15140
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
gpl-3.0
anas-taji/purchase-workflow
vendor_consignment_stock/__openerp__.py
9
1379
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or...
agpl-3.0
buguelos/odoo
addons/delivery/__init__.py
376
1103
# -*- 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
twobob/buildroot-kindle
output/build/host-python-2.7.2/Lib/test/test_functools.py
29
16358
import functools import sys import unittest from test import test_support from weakref import proxy import pickle @staticmethod def PythonPartial(func, *args, **keywords): 'Pure Python approximation of partial()' def newfunc(*fargs, **fkeywords): newkeywords = keywords.copy() newkeywords.update...
gpl-2.0
EmreAtes/spack
lib/spack/spack/test/spec_yaml.py
1
7631
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
chrislyon/dj_ds1
static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_syntax.py
87
18064
"""This module tests SyntaxErrors. Here's an example of the sort of thing that is tested. >>> def f(x): ... global x Traceback (most recent call last): SyntaxError: name 'x' is parameter and global The tests are all raise SyntaxErrors. They were created by checking each C call that raises SyntaxError. There ar...
gpl-2.0
nemesisdesign/django
django/utils/translation/trans_null.py
75
1468
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. from django.conf import settings from django.utils.encoding import force_text def ngettext...
bsd-3-clause
cjayb/mne-python
mne/parallel.py
14
6545
"""Parallel util function.""" # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # # License: Simplified BSD import logging import os from . import get_config from .utils import logger, verbose, warn, ProgressBar from .utils.check import int_like from .fixes import _get_args if 'MNE_FORCE_SERIAL' in os.envi...
bsd-3-clause
eteq/bokeh
sphinx/source/docs/tutorials/solutions/image.py
23
3430
from __future__ import division import numpy as np from bokeh.plotting import figure, output_file, show, VBox # NOTE: if you do have numba installed, uncomment out this import, # and the 'autojit' lines below (the example will run more quickly). #from numba import autojit # These functions generate the Mandelbrot s...
bsd-3-clause
briancoutinho0905/2dsampling
ext/ply/example/yply/ylex.py
165
2198
# lexer for yacc-grammars # # Author: David Beazley (dave@dabeaz.com) # Date : October 2, 2006 import sys sys.path.append("../..") from ply import * tokens = ( 'LITERAL','SECTION','TOKEN','LEFT','RIGHT','PREC','START','TYPE','NONASSOC','UNION','CODE', 'ID','QLITERAL','NUMBER', ) states = (('code','exclusiv...
bsd-3-clause
burkesquires/pyeq2
PolyFunctions.py
3
14372
from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import # pyeq2 is a collection of equations expressed as Python classes # # Copyright (C) 2013 James R. Phillips # 2548 Vera Cruz Drive # Birmingham, AL 35235 USA # # email: zunzun@zunzun.com # ...
bsd-2-clause
alvin319/CarnotKE
jyhton/lib-python/2.7/warnings.py
265
14044
"""Python part of the warnings subsystem.""" # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. import linecache import sys import types __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings", "resetwarnings", "catch_war...
apache-2.0
PareshMayani/open-event-android
apk-generator/v2/app/utils/flask_helpers.py
6
1518
from urllib2 import urlopen from flask import request from jinja2 import Undefined def get_real_ip(local_correct=False): """ Get the IP of the user :param local_correct: :return: """ try: if 'X-Forwarded-For' in request.headers: ip = request.headers.getlist("X-Forwarded-Fo...
gpl-3.0
EvaSDK/sqlalchemy
lib/sqlalchemy/sql/compiler.py
1
99872
# sql/compiler.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Base SQL and DDL compiler implementations. Classes provided include: :class:`.c...
mit
PetrGlad/hessianpy
hessian/test/testSecure.py
1
2358
# -*- coding: UTF-8 -*- # # Hessian protocol implementation test # This file contains HTTPS tests. It is separated into own file as # it has additional depencies (see also secureServer.py) # # Protocol specification can be found here: # http://www.caucho.com/resin-3.0/protocols/hessian-1.0-spec.xtp # # HTTPS ...
apache-2.0
omriher/CapTipper
docs/conf.py
10
9510
# -*- coding: utf-8 -*- # # CapTipper documentation build configuration file, created by # sphinx-quickstart on Mon Jul 6 15:04:25 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
gpl-3.0
JVillella/tensorflow
tensorflow/python/estimator/canned/head_test.py
15
75752
# 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
sergeykolychev/mxnet
python/mxnet/lr_scheduler.py
31
5076
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
lukaszpiotr/pylama_with_gjslint
pylama/checkers/pylint/astroid/mixins.py
1
4313
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the #...
lgpl-3.0