repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source/Lib/site-packages/joblib/test/common.py
4
""" Small utilities for testing. """ import threading import signal import time import os import sys import gc from joblib._compat import PY3_OR_LATER from joblib._multiprocessing_helpers import mp from joblib.testing import SkipTest, skipif try: import lz4 except ImportError: lz4 = None # A decorator to run...
Pakoach/Sick-Beard
refs/heads/master
cherrypy/__init__.py
39
"""CherryPy is a pythonic, object-oriented HTTP framework. CherryPy consists of not one, but four separate API layers. The APPLICATION LAYER is the simplest. CherryPy applications are written as a tree of classes and methods, where each branch in the tree corresponds to a branch in the URL path. Each method is a 'pa...
baslr/ArangoDB
refs/heads/3.1-silent
3rdParty/boost/1.62.0/tools/quickbook/test/snippets/pass_thru.py
60
# Copyright (c) 2011 Daniel James # # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) #[foo_py def foo: #=print('foo') #<- print('bar') #-> #]
ksmaheshkumar/mycli
refs/heads/master
release.py
10
#!/usr/bin/env python from __future__ import print_function import re import ast import subprocess import sys DEBUG = False def version(version_file): _version_re = re.compile(r'__version__\s+=\s+(.*)') with open(version_file, 'rb') as f: ver = str(ast.literal_eval(_version_re.search( f.r...
OpnSrcConstruction/OSCbashRCs
refs/heads/master
.ipython/profile_default/ipython_kernel_config.py
2
# Configuration file for ipython-kernel. #------------------------------------------------------------------------------ # ConnectionFileMixin(LoggingConfigurable) configuration #------------------------------------------------------------------------------ ## Mixin for configurable classes that work with connection ...
theheros/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/mac_farsi.py
37
""" Python Character Mapping Codec mac_farsi generated from 'MAPPINGS/VENDORS/APPLE/FARSI.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(s...
wfxiang08/django197
refs/heads/master
django/contrib/gis/gdal/raster/source.py
297
import json import os from ctypes import addressof, byref, c_double, c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.driver import Driver from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import raster as capi from django.contrib.gis...
ShineFan/odoo
refs/heads/8.0
openerp/addons/base/ir/ir_qweb.py
127
# -*- coding: utf-8 -*- import collections import cStringIO import datetime import hashlib import json import itertools import logging import math import os import re import sys import textwrap import uuid from subprocess import Popen, PIPE from urlparse import urlparse import babel import babel.dates import werkzeug ...
thedrow/pgcli
refs/heads/master
pgcli/packages/pgspecial/main.py
8
import logging from collections import namedtuple from . import export log = logging.getLogger(__name__) NO_QUERY = 0 PARSED_QUERY = 1 RAW_QUERY = 2 SpecialCommand = namedtuple('SpecialCommand', ['handler', 'syntax', 'description', 'arg_type', 'hidden', 'case_sensitive']) @export class CommandNotFound(Exce...
cernops/nova
refs/heads/master
doc/source/conf.py
9
# -*- coding: utf-8 -*- # # nova documentation build configuration file, created by # sphinx-quickstart on Sat May 1 15:17:47 2010. # # 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. # # All ...
mbedmicro/pyOCD
refs/heads/master
pyocd/trace/__init__.py
9
# pyOCD debugger # Copyright (c) 2017 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
MiLk/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcspanner.py
4
#!/usr/bin/python # Copyright 2017 Google Inc. # # 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 vers...
Mj258/weiboapi
refs/heads/master
srapyDemo/envs/Lib/site-packages/pythonwin/pywin/scintilla/scintillacon.py
24
# Generated by h2py from Include\scintilla.h # Included from BaseTsd.h def HandleToUlong(h): return HandleToULong(h) def UlongToHandle(ul): return ULongToHandle(ul) def UlongToPtr(ul): return ULongToPtr(ul) def UintToPtr(ui): return UIntToPtr(ui) INVALID_POSITION = -1 SCI_START = 2000 SCI_OPTIONAL_START = 3000 SCI...
v17al/Flexget
refs/heads/develop
tests/test_config_schema.py
10
from __future__ import unicode_literals, division, absolute_import import jsonschema from flexget import config_schema from tests import FlexGetBase def iter_registered_schemas(): for path in config_schema.schema_paths: schema = config_schema.resolve_ref(path) yield path, schema class TestSche...
j0057/ansible-1
refs/heads/fix-powershell-shebang-not-found
lib/ansible/inventory/ini.py
111
# (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...
SanketDG/networkx
refs/heads/master
networkx/tests/test_convert_pandas.py
43
from nose import SkipTest from nose.tools import assert_true import networkx as nx class TestConvertPandas(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): try: import pandas as pd except ImportError: ...
Sentient07/scikit-learn
refs/heads/master
examples/ensemble/plot_forest_iris.py
335
""" ==================================================================== Plot the decision surfaces of ensembles of trees on the iris dataset ==================================================================== Plot the decision surfaces of forests of randomized trees trained on pairs of features of the iris dataset. ...
sinotradition/sinoera
refs/heads/master
sinoera/tst/sinozodiac/test_tigerpensitive.py
1
#!/usr/bin/python #coding=utf-8 '''This is test module @author: sheng @contact: sinotradition@gmail.com @copyright: License according to the project license. ''' import unittest from sinoera.sinozodiac import tigerpensitive TestTigerpensitiveFunctions(unittest.TestCase): def setUp(self): pass def ...
UTNkar/moore
refs/heads/development
src/home/migrations/0050_auto_20210401_1343.py
1
# Generated by Django 3.1.7 on 2021-04-01 11:43 import blocks.models from django.db import migrations import google.models import involvement.blocks.contact_card_block import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ...
timj/scons
refs/heads/master
test/Install/Clone.py
5
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
sharkykh/SickRage
refs/heads/develop
lib/tornado/test/twisted_test.py
18
# Author: Ovidiu Predescu # Date: July 2011 # # 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 ...
abenzbiria/clients_odoo
refs/heads/master
addons/hr_attendance/res_config.py
434
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
kyle-eshares/django-strict
refs/heads/master
strict_app/bibliotek/tests.py
24123
from django.test import TestCase # Create your tests here.
leiferikb/bitpop
refs/heads/master
build/third_party/twisted_10_2/twisted/conch/test/__init__.py
147
'conch tests'
luvit/gyp
refs/heads/luvit-dev
pylib/gyp/input_test.py
604
#!/usr/bin/env python # Copyright 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
lucafavatella/intellij-community
refs/heads/cli-wip
python/testData/refactoring/extractmethod/WrongSelectionFromImportStar.before.py
83
<selection>from mymodule import *</selection>
davidzchen/tensorflow
refs/heads/master
tensorflow/python/keras/layers/convolutional_transpose_test.py
5
# Copyright 2018 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...
classcat/cctf
refs/heads/master
cctf/datasets/mnist.py
1
"""Functions for downloading and reading MNIST data. Credits: Y. LeCun. http://yann.lecun.com/exdb/mnist/. """ from __future__ import print_function import gzip import os from six.moves import urllib import numpy SOURCE_URL = 'http://yann.lecun.com/exdb/mnist/' def load_data(one_hot=False): mnist = read_data_se...
hradec/gaffer
refs/heads/master
python/GafferSceneTest/ModuleTest.py
8
########################################################################## # # Copyright (c) 2014, John Haddon. 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 so...
nlativy/scritti
refs/heads/master
posts/admin.py
1
from scritti.posts.models import Post from django.contrib import admin class PostAdmin(admin.ModelAdmin): fieldsets = [ ('Post', {'fields': ['title', 'body']}), ('Meta', {'fields': ['slug', 'tags', 'author']}), ('Publication', {'fields': ['p...
Maria1099/webm.webmlive
refs/heads/master
testing/webmstreamserver.py
5
#!/usr/bin/python2.4 # Copyright (c) 2011 The WebM project authors. All Rights Reserved. # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contri...
gistic/PublicSpatialImpala
refs/heads/master
thirdparty/hive-0.10.0-cdh4.5.0/lib/py/thrift/reflection/limited/__init__.py
51
# 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...
aaronsw/watchdog
refs/heads/master
vendor/rdflib-2.4.0/rdflib/syntax/parsers/ntriples.py
4
#!/usr/bin/env python """ N-Triples Parser License: GPL 2, W3C, BSD, or MIT Author: Sean B. Palmer, inamidst.com Documentation: http://inamidst.com/proj/rdf/ntriples-doc Command line usage: ./ntriples.py <URI> - parses URI as N-Triples ./ntriples.py --help - prints out this help message # @@ fully empty ...
authman/Python201609
refs/heads/master
Wright_Will/Assignments/login_and_registration_pylot/Pylot/system/core/router.py
10
""" System Core Router File Defines the verbs and the routes dictionary for use in the routes config file """ routes = {} routes['GET'] = {} routes['POST'] = {} routes['PUT'] = {} routes['PATCH'] = {} routes['DELETE'] = {}
Mj258/weiboapi
refs/heads/master
srapyDemo/envs/Lib/site-packages/pythonwin/pywin/Demos/app/demoutils.py
34
# Utilities for the demos import sys, win32api, win32con, win32ui NotScriptMsg = """\ This demo program is not designed to be run as a Script, but is probably used by some other test program. Please try another demo. """ NeedGUIMsg = """\ This demo program can only be run from inside of Pythonwin You must start Py...
ringemup/satchmo
refs/heads/master
satchmo/apps/payment/modules/trustcommerce/views.py
12
from livesettings import config_get_group from payment.views import confirm, payship def pay_ship_info(request): return payship.credit_pay_ship_info(request, config_get_group('PAYMENT_TRUSTCOMMERCE')) def confirm_info(request): return confirm.credit_confirm_info(request, config_get_group('PAYMENT_TRUS...
abhiii5459/sympy
refs/heads/master
sympy/core/power.py
16
from __future__ import print_function, division from math import log as _log from .sympify import _sympify from .cache import cacheit from .singleton import S from .expr import Expr from .evalf import PrecisionExhausted from .function import (_coeff_isneg, expand_complex, expand_multinomial, expand_mul) from .log...
treeherder/yasnac
refs/heads/master
disk/motodisk.py
1
#!/usr/bin/env python """ MotoDisk: a software emulator for the YASNAC FC1 floppy disk drive. This program allows a YASNAC ERC series robot to have unlimited storage on a host PC """ from time import sleep import sys import os import argparse import serial import packets def log(message): """ Print the given me...
lalanza808/lalanza808.github.io
refs/heads/master
vendor/bundle/ruby/2.3.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/test_using_api.py
36
# -*- coding: utf-8 -*- """ Pygments tests for using() ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import unittest from pygments.lexer import using, bygroups, this, RegexLexer from pygments.token import Stri...
samluescher/django-expenses
refs/heads/master
expenses/admin.py
1
from expenses.models import Expense, ExpenseType, ExpensesGroup, Bill from expenses.templatetags.moneyformats import money from django.contrib.admin.views.main import ChangeList from django.contrib import admin from django.contrib.admin.util import unquote from django.http import HttpResponse from django.utils.translat...
mecwerks/fofix
refs/heads/master
src/views/GuitarScene/instruments/__init__.py
3
from Drum import * from Guitar import * from Vocalist import *
breznak/nupic
refs/heads/master
tests/unit/nupic/algorithms/__init__.py
12133432
linea-it/dri
refs/heads/master
api/interfaces/migrations/__init__.py
12133432
trevor/calendarserver
refs/heads/master
calendarserver/tools/test/test_changeip.py
1
## # Copyright (c) 2005-2014 Apple 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 l...
ohsailey/MAD-IS
refs/heads/master
mad_interface_server/views/communicate.py
1
''' Copyright (c) 2014 OpenISDM Project Name: OpenISDM MAD-IS Version: 1.0 File Name: communicate.py Abstract: communicate.py is a module of Interface Server (IS) of Mobile Assistance for Disasters (MAD) in the OpenISDM Virt...
AII-G2/ToFilms
refs/heads/master
ToFilms/ToFilms/settings.py
1
""" Django settings for ToFilms project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os...
RafaelTorrealba/odoo
refs/heads/8.0
addons/payment_adyen/models/adyen.py
165
# -*- coding: utf-'8' "-*-" import base64 try: import simplejson as json except ImportError: import json from hashlib import sha1 import hmac import logging import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_adyen.controllers.main import Adye...
mindnervestech/mnrp
refs/heads/master
addons/project/company.py
381
# -*- 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...
levilucio/SyVOLT
refs/heads/master
mbeddr2C_MM/transformation_from_mps/Hlayer1rule4.py
1
from core.himesis import Himesis import uuid class Hlayer1rule4(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule layer1rule4. """ # Flag this instance as compiled now self.is_compiled = True super(Hlayer1rule4, self).__init__(name='Hlayer1rule4', num_nodes=0, edg...
spirrello/spirrello-pynet-work
refs/heads/master
applied_python/lib/python2.7/site-packages/pip/operations/freeze.py
84
from __future__ import absolute_import import logging import re import pip from pip.compat import stdlib_pkgs from pip.req import InstallRequirement from pip.utils import get_installed_distributions from pip._vendor import pkg_resources logger = logging.getLogger(__name__) # packages to exclude from freeze output ...
fengzhe29888/gnuradio-old
refs/heads/master
gr-utils/python/modtool/modtool_info.py
13
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
grigoryvp/pyxcf
refs/heads/master
pyxcf/info.py
2
#!/usr/bin/env python # coding:utf-8 vi:et:ts=2 # pyxcf information. # Copyright 2013 Grigory Petrov # See LICENSE for details. import os import pkg_resources NAME_SHORT = "pyxcf" VER_MAJOR = 0 VER_MINOR = 1 try: VER_TXT = pkg_resources.require( NAME_SHORT )[ 0 ].version ## Installing via 'setup.py...
40423243/2017springcd_hw
refs/heads/gh-pages
data/py/script1.py
22
import sys import time import traceback import javascript from browser import document as doc, window, alert has_ace = True try: editor = window.ace.edit("editor") session = editor.getSession() session.setMode("ace/mode/python") editor.setOptions({ 'enableLiveAutocompletion': True, 'enableS...
chendaniely/scipy_proceedings
refs/heads/master
publisher/writer/rstmath.py
13
# This code is from: http://pypi.python.org/pypi/rstex/ #!/usr/bin/python2 from docutils import utils, nodes from docutils.core import publish_cmdline from docutils.writers.latex2e import Writer, LaTeXTranslator from docutils.parsers.rst import roles, Directive, directives class InlineMath(nodes.Inline, nodes.TextEl...
openSUSE/libstorage-bgl-eval
refs/heads/master
integration-tests/misc/light-probe.py
4
#!/usr/bin/python3 # requirements: some disks or nothing from storage import * set_logger(get_logfile_logger()) something = light_probe() print(something)
quarkonics/zstack-woodpecker
refs/heads/master
integrationtest/vm/multihosts/volumes/test_4vm_snapshot_robot.py
2
''' Robot Test only includes Vm operations, Volume operations and Snapshot operations @author: Youyk ''' import zstackwoodpecker.action_select as action_select import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import ...
stadt-karlsruhe/python-oparl
refs/heads/master
tests/test_oparl.py
1
#!/usr/bin/env python # encoding: utf-8 # Copyright (c) 2016, Stadt Karlsruhe (www.karlsruhe.de) # # 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 limi...
kostajaitachi/shogun
refs/heads/develop
examples/undocumented/python_modular/modelselection_parameter_tree_modular.py
5
#!/usr/bin/env python # # 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) any later version. # # Written (W) 2011-2012 Heiko Strathmann # Cop...
dsandeephegde/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/testing/io_/__init__.py
9480
#
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_3/tests/regressiontests/views/app3/__init__.py
9480
#
kontrafiktion/ansible
refs/heads/devel
contrib/inventory/abiquo.py
110
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' External inventory script for Abiquo ==================================== Shamelessly copied from an existing inventory script. This script generates an inventory that Ansible can understand by making API requests to Abiquo API Requires some python libraries, ensure ...
gccpacman/pydelicious-newAPI
refs/heads/master
tools/dlcs_feeds.py
23
#!/usr/bin/env python try: from hashlib import md5 except ImportError: from md5 import md5 from itertools import chain import locale import optparse import os from pprint import pprint, pformat import re import sys import pydelicious #ENCODING = locale.getpreferredencoding() __usage__ = """%prog [options] [comman...
fldc/CouchPotatoServer
refs/heads/custom
libs/bs4/diagnose.py
431
"""Diagnostic functions, mainly for use when doing tech support.""" import cProfile from StringIO import StringIO from HTMLParser import HTMLParser import bs4 from bs4 import BeautifulSoup, __version__ from bs4.builder import builder_registry import os import pstats import random import tempfile import time import tra...
mangaki/mangaki
refs/heads/master
mangaki/mangaki/tests/test_posters.py
1
from unittest.mock import patch, NonCallableMock from django.test import TestCase from mangaki.models import Editor, Studio, Work, Category from mangaki.utils.db import get_potential_posters class PostersTest(TestCase): def setUp(self): anime = Category.objects.get(slug='anime') self.kiznaive...
bieschke/nuffle
refs/heads/master
lib/python/formencode/schema.py
1
from interfaces import * from api import * import declarative __all__ = ['Schema'] class Schema(FancyValidator): """ A schema validates a dictionary of values, applying different validators (be key) to the different values. If allow_extra_fields=True, keys without validators will be allowed; oth...
ilathid/ilathidEngine
refs/heads/master
vplayer/old/m_movie.py
1
# 3 options: # 1: video player is dormant, and renders a frame and returns it on function call # 2: video player is threaded, and a frame can be retrieved at any time via function call # 3: video player is threaded, and a callback is made to external object with rendered frames # # For our purposes, 2 looks to be th...
lbeltrame/bcbio-nextgen
refs/heads/master
bcbio/cwl/tool.py
4
"""Run bcbio generated CWL with a supported tool. Handles wrapping and integrating with multiple tools making it easier to run bcbio in a standard way in many environments. """ from __future__ import print_function import glob import json import os import shutil import subprocess import sys from bcbio import utils fr...
vishdha/erpnext
refs/heads/develop
erpnext/maintenance/doctype/__init__.py
12133432
thomasgilgenast/spqr-nonrel
refs/heads/master
django/conf/locale/fr/__init__.py
12133432
imtapps/django-imt-fork
refs/heads/IMT
tests/regressiontests/i18n/other/locale/de/formats.py
12133432
vivyly/fancastic_17
refs/heads/master
fancastic_17/common/migrations/__init__.py
12133432
barseghyanartur/oauthlib
refs/heads/master
tests/oauth2/rfc6749/grant_types/test_client_credentials.py
24
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from ....unittest import TestCase import json import mock from oauthlib.common import Request from oauthlib.oauth2.rfc6749.grant_types import ClientCredentialsGrant from oauthlib.oauth2.rfc6749.tokens import BearerToken class ClientCred...
firebitsbr/infernal-twin
refs/heads/master
build/pip/build/lib.linux-i686-2.7/pip/_vendor/distlib/_backport/misc.py
1428
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Backports for individual classes and functions.""" import os import sys __all__ = ['cache_from_source', 'callable', 'fsencode'] try: from imp import cache_from_source except ImportError: ...
Jumpscale/go-raml
refs/heads/master
docs/tutorial/python/sanic/types/User.py
4
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml. """ Auto-generated class for User """ from six import string_types from . import client_support class User(object): """ auto-generated. don't touch. """ @staticmethod def create(**kwargs): """ :type ...
pyramania/scipy
refs/heads/master
scipy/_lib/decorator.py
41
# ######################### LICENSE ############################ # # Copyright (c) 2005-2015, Michele Simionato # 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 so...
simone-f/compare-to-osm
refs/heads/master
rendering/generate_tiles.py
1
#!/usr/bin/env python from math import pi,cos,sin,log,exp,atan from subprocess import call import sys, os from Queue import Queue import threading # try: # import mapnik2 as mapnik # except: import mapnik DEG_TO_RAD = pi/180 RAD_TO_DEG = 180/pi # Default number of rendering threads to spawn, should be roughly e...
jiazichenzhan/Server_Manage_Plugin
refs/heads/master
ironic-plugin-pike/ironic/tests/unit/db/test_chassis.py
11
# Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
henry-ajere/rad2py
refs/heads/master
psp2py/languages/it.py
23
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ', '%Y-%m-%d': '%d/%m/%Y', '%Y-%m-%d %H:%M:%S': '%d/%m/%...
AlexMooney/python-pptx
refs/heads/master
pptx/dml/color.py
9
# encoding: utf-8 """ DrawingML objects related to color, ColorFormat being the most prominent. """ from __future__ import absolute_import, print_function, unicode_literals from ..enum.dml import MSO_COLOR_TYPE, MSO_THEME_COLOR from ..oxml.dml.color import ( CT_HslColor, CT_PresetColor, CT_SchemeColor, CT_ScRgbC...
Novasoft-India/OperERP-AM-Motors
refs/heads/master
openerp/addons/mail/res_partner.py
52
# -*- 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...
rallylee/gem5
refs/heads/master
ext/ply/test/yacc_unused.py
174
# ----------------------------------------------------------------------------- # yacc_unused.py # # A grammar with an unused rule # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tok...
vincentfretin/robotframework-selenium2library
refs/heads/master
src/Selenium2Library/locators/tableelementfinder.py
1
from .elementfinder import ElementFinder class TableElementFinder(object): def __init__(self, element_finder=None): if not element_finder: element_finder = ElementFinder() self._element_finder = element_finder self._locator_suffixes = { ('css', 'default'): [''], ...
portnov/sverchok
refs/heads/master
nodes/vector/vector_polar_out.py
3
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
erueloi/django-allauth
refs/heads/master
allauth/socialaccount/providers/vk/tests.py
71
from __future__ import absolute_import from allauth.socialaccount.tests import create_oauth2_tests from allauth.socialaccount.providers import registry from allauth.tests import MockedResponse from .provider import VKProvider class VKTests(create_oauth2_tests(registry.by_id(VKProvider.id))): def get_mocked_res...
hungerburg/exist
refs/heads/develop
bin/deprecated/query.py
18
#!/usr/bin/python # eXist xml document repository and xpath implementation # Copyright (C) 2001, Wolfgang M. Meier (meier@ifs.tu-darmstadt.de) # # 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 Fou...
carnell69/kuma
refs/heads/master
vendor/packages/logilab/astng/test/regrtest_data/package/__init__.py
25
"""package's __init__ file""" import subpackage
MosheBerman/brisket-mashup
refs/heads/master
source/libraries/httplib2-0.8/python3/httplib2/__init__.py
43
""" httplib2 A caching http interface that supports ETags and gzip to conserve bandwidth. Requires Python 3.0 or later Changelog: 2009-05-28, Pilgrim: ported to Python 3 2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Co...
allotria/intellij-community
refs/heads/master
python/helpers/tests/generator3_tests/data/FileSystemUtil/copy_skeleton_module_replaced_with_package/dst/before/foo/bar/baz.py
50
version = 1
pfnet/chainer
refs/heads/master
chainer/functions/array/tile.py
3
import six import chainer from chainer import backend from chainer import function_node from chainer.utils import type_check class Tile(function_node.FunctionNode): """Tiling of an array.""" def __init__(self, reps): if isinstance(reps, six.integer_types): self.reps = (reps,) el...
geary/voter-info-2012-test
refs/heads/master
voter-info/shapes/makepolys.py
12
#!/usr/bin/env python # makepolys.py import codecs import json import math import os import random import re import shutil import stat import sys import time from geo import Geo import shpUtils import states #states = json.load( open('states.json') ) jsonpath = 'json' shapespath = 'shapefiles' geo = Geo() keysep ...
Omegaphora/external_chromium_org
refs/heads/lp5.1
tools/clang/scripts/test_tool.py
27
#!/usr/bin/env 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. """Test harness for chromium clang tools.""" import difflib import glob import json import os import os.path import subprocess imp...
Yen-Chung-En/w16b_test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/font.py
601
from browser import html from . import surface def init(): return def quit(): return def get_init(): return True def get_default_font(): return "10px sans-serif" class Font: def __init__(self, obj, size): self._obj=obj self._size=size def render(self, text, antialias, color, backg...
ricklupton/ipysankeywidget
refs/heads/master
ipysankeywidget/_version.py
1
version_info = (0, 4, 1, 'final', 0) _specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''} __version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2], '' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
MaplePlan/djwp
refs/heads/master
django/conf/locale/zh_TW/__init__.py
12133432
SerCeMan/intellij-community
refs/heads/master
python/testData/refactoring/move/moveFunctionFromUnimportableModule/after/src/src-unimportable.py
12133432
d/hamster-applet
refs/heads/master
src/docky_control/2.1/hamster_control.py
1
#!/usr/bin/env python # # Copyright (C) 2010 Toms Baugis # # Original code from Banshee control, # Copyright (C) 2009-2010 Jason Smith, Rico Tzschichholz # # 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 Soft...
nathanpucheril/PyBayes
refs/heads/master
PyBayes/utils.py
1
# Utilities for Bayes Net # ________________________ # @author Nathan Pucheril # @author Keith Hardaway def islist_like(iterable): return hasattr(iterable, '__iter__') and not isinstance(iterable, str) and not isinstance(iterable, dict)
dmytroKarataiev/MachineLearning
refs/heads/master
learning/algorithms/svm/svm.py
1
import sys from learning.algorithms.prep_terrain_data import makeTerrainData from learning.algorithms.class_vis import prettyPicture, output_image import matplotlib.pyplot as plt import copy import numpy as np import pylab as pl features_train, labels_train, features_test, labels_test = makeTerrainData() ###########...
Jumpscale/jumpscale6_core
refs/heads/master
lib/JumpScale/baselib/serializers/SerializerPickle.py
1
import cPickle class SerializerPickle(object): def dumps(self,obj): return cPickle.dumps(obj) def loads(self,s): return cPickle.loads(s)
0ps/TeamTalk
refs/heads/master
win-client/3rdParty/src/json/test/generate_expected.py
257
import glob import os.path for path in glob.glob( '*.json' ): text = file(path,'rt').read() target = os.path.splitext(path)[0] + '.expected' if os.path.exists( target ): print 'skipping:', target else: print 'creating:', target file(target,'wt').write(text)