repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
nbeaver/numpy
refs/heads/master
tools/swig/test/setup.py
113
#! /usr/bin/env python from __future__ import division, print_function # System imports from distutils.core import * from distutils import sysconfig # Third-party modules - we depend on numpy for everything import numpy # Obtain the numpy include directory. numpy_include = numpy.get_include() # Array extension...
yglazko/socorro
refs/heads/master
socorro/unittest/external/filesystem/test_filesystem.py
11
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import shutil import types from nose.tools import * import socorro.external.filesystem.filesystem as f from s...
geotagx/pybossa
refs/heads/master
pybossa/oauth_providers.py
1
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2016 SciFabric LTD. # # PyBossa 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 # (at your op...
Solinea/horizon
refs/heads/master
openstack_dashboard/dashboards/project/stacks/resource_types/views.py
51
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
jiajiax/crosswalk-test-suite
refs/heads/master
webapi/webapi-input-html5-tests/inst.wgt.py
372
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
Manojkumar91/odoo_inresto
refs/heads/master
openerp/addons/base/tests/test_search.py
290
import unittest2 import openerp.tests.common as common class test_search(common.TransactionCase): def test_00_search_order(self): registry, cr, uid = self.registry, self.cr, self.uid # Create 6 partners with a given name, and a given creation order to # ensure the order of their ID. So...
piquadrat/django
refs/heads/master
django/contrib/postgres/validators.py
19
import copy from django.core.exceptions import ValidationError from django.core.validators import ( MaxLengthValidator, MaxValueValidator, MinLengthValidator, MinValueValidator, ) from django.utils.deconstruct import deconstructible from django.utils.translation import gettext_lazy as _, ngettext_lazy class ...
infobloxopen/infoblox-netmri
refs/heads/master
infoblox_netmri/api/broker/v3_1_0/spm_end_hosts_vlan_changes_grid_broker.py
14
from ..broker import Broker class SpmEndHostsVlanChangesGridBroker(Broker): controller = "spm_end_hosts_vlan_changes_grids" def index(self, **kwargs): """Lists the available spm end hosts vlan changes grids. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of ...
fastturtle/torch-randomkit
refs/heads/master
luasrc/generateDocsAndTests.py
2
""" This script tries to generate docs and call tests for randomkit.* """ import scipy import re docFile = "doc/randomkit.html" testFile = "tests/testCalls.lua" exclude = ['ffi', '_check1DParams'] randomkitFuncsPath = '/Users/daniel.horgan/randomkit_funcs' def funcTest(name, sig, doc): match = re.match(r"(.*)\((...
klunwebale/odoo
refs/heads/8.0
addons/stock_account/wizard/__init__.py
351
# -*- 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...
legalsylvain/OpenUpgrade
refs/heads/master
addons/email_template/email_template.py
16
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
frankosan/pypers
refs/heads/master
pypers/steps/samtools/mpileup.py
1
from pypers.core.step import CmdLineStep class MPileup(CmdLineStep): spec = { "descr": [ "Generate BCF or pileup for one or multiple BAM files." ], "version":"0.1.19", "args": { "inputs": [ { "name" : "input_bam...
TribeMedia/synapse
refs/heads/master
tests/rest/client/v1/utils.py
2
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # 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 applicab...
codeinthehole/purl
refs/heads/master
purl/__init__.py
1
from .url import URL # noqa from .template import expand, Template # noqa __version__ = '1.6' __all__ = ['URL', 'expand', 'Template']
jimberlage/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/certifi/certifi/__init__.py
59
from .core import where, old_where __version__ = "2018.04.16"
openwebinars-django/newspaper
refs/heads/master
newspaper/newspaper/news/management/commands/count_news.py
3
from django.core.management.base import BaseCommand from newspaper.news.models import News class Command(BaseCommand): help = 'Count news.' def handle(self, *args, **options): print(News.objects.count())
NetDBNCKU/GAE-Conference-Web-App
refs/heads/master
django/contrib/localflavor/ch/__init__.py
12133432
shitolepriya/Saloon_erp
refs/heads/master
erpnext/hub_node/page/hub/__init__.py
12133432
jimmymunoz/jeuxdemots
refs/heads/master
public/package/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
1843
#!/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. """ Unit tests for the ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import sys import TestCommon ...
p0psicles/SickRage
refs/heads/master
lib/bs4/tests/__init__.py
668
"The beautifulsoup tests."
andresriancho/PyGithub
refs/heads/master
github/tests/Enterprise.py
2
# -*- coding: utf-8 -*- # Copyright 2012 Vincent Jacques # vincent@vincent-jacques.net # This file is part of PyGithub. http://vincent-jacques.net/PyGithub # PyGithub 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 Free Softwar...
MasonMcGill/fauxton
refs/heads/master
setup.py
1
from distutils.core import setup setup(name='fauxton', packages=['fauxton'], version='0.1.2', description=('Computer graphics technology for computer vision' ' applications.'), author='Mason McGill', author_email='mmcgill@caltech.edu', url='https://github.com/Maso...
IronLanguages/ironpython3
refs/heads/master
Src/StdLib/Lib/email/_parseaddr.py
125
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time, calendar SPACE = ' ' EMPTYS...
pmghalvorsen/gramps_branch
refs/heads/master
gramps/gen/filters/rules/media/_hassourcecount.py
2
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Jerome Rapinat # Copyright (C) 2008 Benny Malengier # # This program is free software; you can redistribute it and/or modify # it under the terms of the ...
deepsrijit1105/edx-platform
refs/heads/master
common/lib/chem/chem/chemtools.py
250
"""This module originally includes functions for grading Vsepr problems. Also, may be this module is the place for other chemistry-related grade functions. TODO: discuss it. """ import json import unittest import itertools def vsepr_parse_user_answer(user_input): """ user_input is json generated by vsepr.js...
kmatzen/ansible
refs/heads/devel
lib/ansible/plugins/callback/oneline.py
30
# (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...
caphrim007/ansible
refs/heads/devel
test/units/module_utils/facts/system/__init__.py
12133432
iandees/postboxes
refs/heads/master
usps/__init__.py
12133432
MikeAmy/django
refs/heads/master
tests/field_deconstruction/__init__.py
12133432
susansalkeld/discsongs
refs/heads/master
discsongs/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/__init__.py
12133432
khushboo9293/postorius
refs/heads/master
src/postorius/templatetags/__init__.py
12133432
CSSIP-AIR/UMETRICS
refs/heads/master
ThirdParty/unidecode/x0cb.py
253
data = ( 'jjwaels', # 0x00 'jjwaelt', # 0x01 'jjwaelp', # 0x02 'jjwaelh', # 0x03 'jjwaem', # 0x04 'jjwaeb', # 0x05 'jjwaebs', # 0x06 'jjwaes', # 0x07 'jjwaess', # 0x08 'jjwaeng', # 0x09 'jjwaej', # 0x0a 'jjwaec', # 0x0b 'jjwaek', # 0x0c 'jjwaet', # 0x0d 'jjwaep', # 0x0e 'jjw...
RockySteveJobs/python-for-android
refs/heads/master
python-build/python-libs/gdata/samples/oauth/oauth_on_appengine/appengine_utilities/event.py
138
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
gwpy/gwpy.github.io
refs/heads/master
docs/1.0.0/examples/timeseries/pycbc-snr-5.py
7
from pycbc.filter import matched_filter snr = matched_filter(hp, zoom.to_pycbc(), psd=psd.to_pycbc(), low_frequency_cutoff=15) snrts = TimeSeries.from_pycbc(snr).abs()
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
third_party/webdriver/pylib/test/selenium/webdriver/common/executing_async_javascript_tests.py
19
#!/usr/bin/python # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
helldorado/ansible
refs/heads/devel
lib/ansible/modules/cloud/vultr/vultr_account_facts.py
28
#!/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', ...
foreni-packages/golismero
refs/heads/master
tools/theHarvester/discovery/dogpilesearch.py
8
import httplib import myparser import time from search_results import * import sys class search_dogpile: def __init__(self,word,options): self.word=word self.total_results=u"" self.server="www.dogpile.com" self.hostname="www.dogpile.com" self.userAgent="(Mozilla/5.0 (Windows; U; Windows NT 6.0;en-US; rv:1.9...
RealImpactAnalytics/airflow
refs/heads/master
tests/models.py
1
# -*- coding: utf-8 -*- # # 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 #...
prakashpp/trytond-shipping-fedex
refs/heads/master
setup.py
2
#!/usr/bin/env python import re import os import ConfigParser from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() config = ConfigParser.ConfigParser() config.readfp(open('tryton.cfg')) info = dict(config.items('tryton')) for key in ('depends', 'extras...
mesosphere/mesos-cli
refs/heads/master
mesos/cli/__init__.py
1
# 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...
heiths/allura
refs/heads/master
ForgeBlog/forgeblog/tests/test_roles.py
3
# 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 (t...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.2/tests/regressiontests/admin_scripts/tests.py
39
""" A series of tests to establish that the command-line managment tools work as advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE and default settings.py files. """ import os import unittest import shutil import sys import re from django import conf, bin, get_version from django.conf ...
nemesisdesign/django
refs/heads/master
django/conf/locale/mn/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'g:i A' # DA...
SteveXiSong/UW-Madison-ECE757-S15-MulticastSnooping
refs/heads/master
src/arch/x86/isa/insts/x87/arithmetic/change_sign.py
70
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
tumbl3w33d/ansible
refs/heads/devel
test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py
25
"""Enable unit testing of Ansible collections. PYTEST_DONT_REWRITE""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import sys # set by ansible-test to a single directory, rather than a list of directories as supported by Ansible itself ANSIBLE_COLLECTIONS_PATH = os...
menardorama/ReadyNAS-Add-ons
refs/heads/master
headphones-1.0.0/files/etc/apps/headphones/lib/unidecode/x092.py
252
data = ( 'Ba ', # 0x00 'Fang ', # 0x01 'Chen ', # 0x02 'Xing ', # 0x03 'Tou ', # 0x04 'Yue ', # 0x05 'Yan ', # 0x06 'Fu ', # 0x07 'Pi ', # 0x08 'Na ', # 0x09 'Xin ', # 0x0a 'E ', # 0x0b 'Jue ', # 0x0c 'Dun ', # 0x0d 'Gou ', # 0x0e 'Yin ', # 0x0f 'Qian ', # 0x10 'Ban ',...
zed/test-performance-run-in-a-loop-vs-run-standalone
refs/heads/master
run-standalone.py
1
from timeit import default_timer as timer # allow Windows friends to play a = range(500) sum(a) for i in range(1000000): #just to create a time interval, seems this disturb cpu cache? pass st = timer() sum(a) print("%.2f us" % ((timer() - st)*1e6,))
arazmj/RouteFlow
refs/heads/master
pox/pox/lib/epoll_select.py
26
# Copyright 2012 Andreas Wundsam # # This file is part of POX. # # POX 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. # # POX is distr...
valexandersaulys/prudential_insurance_kaggle
refs/heads/master
venv/lib/python2.7/site-packages/pip/vcs/git.py
280
from __future__ import absolute_import import logging import tempfile import os.path from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request from pip.utils import display_path, rmtree from pip.vcs import vcs, VersionControl urlsplit = urllib...
Beauhurst/django
refs/heads/master
tests/select_related_onetoone/tests.py
39
from django.core.exceptions import FieldError from django.test import SimpleTestCase, TestCase from .models import ( AdvancedUserStat, Child1, Child2, Child3, Child4, Image, LinkedList, Parent1, Parent2, Product, StatDetails, User, UserProfile, UserStat, UserStatResult, ) class ReverseSelectRelatedTestCa...
Nelayah/blogCMS
refs/heads/master
blog/__init__.py
12133432
openstack/networking-edge-vpn
refs/heads/master
neutron/neutron/services/mplsvpn/__init__.py
12133432
hotpxl/mxnet
refs/heads/master
tests/nightly/mxnet_keras_integration_tests/model_util.py
15
import os from keras import backend as K from keras.models import Model from keras.layers import Input, merge from keras.layers.core import Lambda # Before running the integration tests, users are expected to set these # environment variables. IS_GPU = (os.environ['MXNET_KERAS_TEST_MACHINE'] == 'GPU') GPU_NUM = int(os...
gandarez/wakatime
refs/heads/master
wakatime/packages/pygments_py2/pygments/lexers/agile.py
77
# -*- coding: utf-8 -*- """ pygments.lexers.agile ~~~~~~~~~~~~~~~~~~~~~ Just export lexer classes previously contained in this module. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.lisp import SchemeLexer from p...
pixelrebel/st2
refs/heads/master
st2reactor/st2reactor/rules/config.py
6
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
DGA-MI-SSI/YaCo
refs/heads/master
deps/swig-3.0.7/Examples/test-suite/python/template_typedef_cplx3_runme.py
6
import string from template_typedef_cplx3 import * # # this is OK # s = Sin() s.get_base_value() s.get_value() s.get_arith_value() my_func_r(s) make_Multiplies_double_double_double_double(s, s) z = CSin() z.get_base_value() z.get_value() z.get_arith_value() my_func_c(z) make_Multiplies_complex_complex_complex_compl...
lucidmotifs/auto-aoc
refs/heads/master
.venv/lib/python3.5/site-packages/pylint/test/unittest_checker_spelling.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2014-2017 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Michal Nowikowski <godfryd@gmail.com> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2016 Derek Gustafson <degustaf@gmail.com> # Copyright (c) 2017 Pedro Algarvio <pedro@algarvio....
azureplus/hue
refs/heads/master
desktop/core/ext-py/django-nose-1.3/testapp/settings_old_style.py
43
DATABASES = { 'default': { 'NAME': 'django_master', 'ENGINE': 'django.db.backends.sqlite3', } } INSTALLED_APPS = ( 'django_nose', ) TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' TEST_RUNNER = 'django_nose.run_tests' SECRET_KEY = 'sssshhh'
zendesk/dd-agent
refs/heads/master
modules.py
50
""" Tools for loading Python modules from arbitrary locations. """ # stdlib import imp import os import re import sys # project from util import windows_friendly_colon_split WINDOWS_PATH = re.compile('[A-Z]:.*', re.IGNORECASE) def imp_type_for_filename(filename): """Given the name of a Python module, return a t...
GENI-NSF/geni-soil
refs/heads/develop
src/vendor/geniv3rpc/ext/geni/am/gibaggregate/gib_manager.py
9
#---------------------------------------------------------------------- # Copyright (c) 2012 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
ubc/edx-ora2
refs/heads/master
urls.py
5
from django.conf import settings from django.conf.urls import include, patterns, url from django.views.i18n import javascript_catalog from django.contrib import admin import openassessment.assessment.urls import openassessment.fileupload.urls import workbench.urls admin.autodiscover() # Packages to include in the Ja...
tmxdyf/CouchPotatoServer
refs/heads/master
couchpotato/core/plugins/release/main.py
5
from couchpotato import get_session, md5 from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.encoding import ss, toUnicode from couchpotato.core.helpers.variable import getTitle from couchpotato.core.logger import CPLog from couchpotato.core.plugin...
mewtaylor/django
refs/heads/master
tests/m2m_intermediary/__init__.py
12133432
andy8788/hadoop-hdfs
refs/heads/master
build/contrib/hod/hodlib/GridServices/mapred.py
182
#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 use thi...
TathagataChakraborti/resource-conflicts
refs/heads/master
PLANROB-2015/seq-sat-lama/Python-2.5.2/Demo/classes/Complex.py
43
# Complex numbers # --------------- # [Now that Python has a complex data type built-in, this is not very # useful, but it's still a nice example class] # This module represents complex numbers as instances of the class Complex. # A Complex instance z has two data attribues, z.re (the real part) and z.im # (the imagi...
nikolas/edx-platform
refs/heads/master
lms/djangoapps/licenses/models.py
150
import logging from django.db import models, transaction from student.models import User from xmodule_django.models import CourseKeyField log = logging.getLogger("edx.licenses") class CourseSoftware(models.Model): name = models.CharField(max_length=255) full_name = models.CharField(max_length=255) url...
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
refs/heads/master
python-packages/mne-python-0.10/mne/stats/regression.py
3
# Authors: Tal Linzen <linzen@nyu.edu> # Teon Brooks <teon.brooks@gmail.com> # Denis A. Engemann <denis.engemann@gmail.com> # Jona Sassenhagen <jona.sassenhagen@gmail.com> # Marijn van Vliet <w.m.vanvliet@gmail.com> # # License: BSD (3-clause) from collections import namedtuple from...
Pixomondo/rez
refs/heads/master_pxo
src/rez/vendor/distlib/version.py
132
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Implementation of a flexible versioning scheme providing support for PEP-440, setuptools-compatible and semantic versioning. """ import logging import re from .compat import string_types ...
mikhail-gorobets/chipsec
refs/heads/master
chipsec/hal/vmm.py
2
#!/usr/local/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2016, Intel Corporation # #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; Version 2. # #This program is...
Qalthos/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/apt.py
10
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Flowroute LLC # Written by Matthew Williams <matthew@flowroute.com> # Based on yum module written by Seth Vidal <skvidal at fedoraproject.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ ...
Stibbons/pyyaml
refs/heads/master
lib3/yaml/cyaml.py
274
__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader', 'CBaseDumper', 'CSafeDumper', 'CDumper'] from _yaml import CParser, CEmitter from .constructor import * from .serializer import * from .representer import * from .resolver import * class CBaseLoader(CParser, BaseConstructor, BaseResolver): def __ini...
kollibar/spipStatic
refs/heads/master
spipStatic.py
1
#! /usr/bin/env python3 import csv,re,os.path from collections import OrderedDict from postTraitement import postTraitement,traitementSecurite from balises import LISTE_BALISES,baliseGenerique def loadDataCSV(fichier): fichierData=open(FICHIER,'r') dataCsv=csv.reader(fichierData,dialect=csv.Sniffer) ente...
lightcn/odoo
refs/heads/8.0
openerp/addons/test_convert/__openerp__.py
437
{ 'name': 'test_convert', 'description': "Data for xml conversion tests", 'version': '0.0.1', }
eerimoq/pumbaa
refs/heads/master
examples/ssl_client/client.py
6
#!/usr/bin/env python3 import sys import socket import ssl import pprint server_sock = socket.socket() server_sock.connect((sys.argv[1], 10023)) # Require a certificate from the server. We used a self-signed # certificate so here ca_certs must be the server certificate itself. context = ssl.SSLContext(ssl.PROTOCOL_T...
Dave667/service
refs/heads/master
plugin.video.planeta-online.tv/resources/lib/addon.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2011 XBMC-Russia, HD-lab Team, E-mail: dev@hd-lab.ru # Writer (c) 2011, Kostynoy S.A., E-mail: seppius2@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 publish...
nwinkler/thefuck
refs/heads/master
tests/rules/test_no_command.py
2
from mock import patch, Mock from thefuck.rules.no_command import match, get_new_command def test_match(): with patch('thefuck.rules.no_command._get_all_callables', return_value=['vim', 'apt-get']): assert match(Mock(stderr='vom: not found', script='vom file.py'), None) assert not m...
enjaz/enjaz
refs/heads/master
studentvoice/admin.py
2
# -*- coding: utf-8 -*- from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User, Permission, Group from django.core.exceptions import ObjectDoesNotExist from studentvoice.models import Voice, Vote, Recipient, Response, View...
fitermay/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/NameCollisionFile.before.py
83
def hello(): pass <selection>print("Hello")</selection>
bstando/limbo-android
refs/heads/master
jni/qemu/roms/seabios/tools/checkstack.py
42
#!/usr/bin/env python # Script that tries to find how much stack space each function in an # object is using. # # Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. # Usage: # objdump -m i386 -M i8086 -M suffix -d out/rom16.o | tools/che...
newemailjdm/scipy
refs/heads/master
scipy/io/mmio.py
63
""" Matrix Market I/O in Python. See http://math.nist.gov/MatrixMarket/formats.html for information about the Matrix Market format. """ # # Author: Pearu Peterson <pearu@cens.ioc.ee> # Created: October, 2004 # # References: # http://math.nist.gov/MatrixMarket/ # from __future__ import division, print_function, a...
LegendaryPoro/FTL13
refs/heads/master
tools/mapmerge/map_conflict_fixer.py
61
import map_helpers import sys import os import time def main(relative_root): git_version = map_helpers.run_shell_command("git version") if not git_version: print("ERROR: Failed to run git. Make sure it is installed and in your PATH.") return False print("--- DISCLAIMER ---") print("Thi...
vest-thermostat/server
refs/heads/master
vest/home/tests.py
24123
from django.test import TestCase # Create your tests here.
dunkenj/smpy
refs/heads/master
scripts/fitting.py
1
import numpy as np import array import os, sys import re import time import multiprocessing, logging # mpl = multiprocessing.log_to_stderr() # mpl.setLevel(logging.INFO) import h5py import logging from astropy.table import Table, Column from astropy import units as u from scipy.interpolate import griddata import arg...
sheins/saraheins
refs/heads/master
node_modules/npm-shrinkwrap/node_modules/npm/node_modules/node-gyp/gyp/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...
zdary/intellij-community
refs/heads/master
python/testData/inspections/StatementEffect_after.py
83
class klass: def foo(self): pass var = klass() var.foo()
meanmee/keras
refs/heads/master
tests/auto/test_embeddings.py
74
import unittest import numpy as np from keras.models import Sequential from keras.layers.core import Merge, Dense, Activation, Flatten from keras.layers.embeddings import Embedding from theano import function from keras.constraints import unitnorm class TestEmbedding(unittest.TestCase): def setUp(self): s...
paloda/android_kernel_bq_vegetalte
refs/heads/cm-12.1
tools/perf/tests/attr.py
3174
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
vitiral/micropython
refs/heads/master
tests/basics/builtin_allany.py
113
# test builtin "all" and "any" tests = ( (), [], [False], [True], [False, True], [True, False], [False, False], [True, True], range(10), ) for test in tests: print(all(test)) for test in tests: print(any(test))
nicoboss/Floatmotion
refs/heads/master
OpenGL/GLES1/OES/packed_depth_stencil.py
8
'''OpenGL extension OES.packed_depth_stencil This module customises the behaviour of the OpenGL.raw.GLES1.OES.packed_depth_stencil to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/OES/packed_depth_stencil.txt ''' from OpenGL impo...
tudorvio/tempest
refs/heads/master
tempest/hacking/checks.py
18
# 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 agreed to in wri...
mjsottile/GZSatelliteFinder
refs/heads/master
old_code/trainer.py
1
""" trainer.py given a set of labeled images, train a classifier to then evaluate against a test set. training data is specified as a set of pairs that map GZ identifiers to labels. labels are integers whose interpretation is left up to the user. mjsottile@gmail.com // dec. 2013 """ import mysdss import config as c...
foospidy/CACConsole
refs/heads/master
modules/CloudAtCostConsole.py
1
# CloudAtCostConsole Copyright (C) 2015 foospidy # https://github.com/foospidy/CACConsole # See LICENSE for details # Cloud At Cost Console import os import time from twisted.internet import stdio, reactor from twisted.protocols import basic from twisted.python import log import sqlite3 as lite import cacpy...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/refactoring/move/usageFromFunction/before/src/a.py
83
def f(): pass def use_f(): f()
gkoelln/youtube-dl
refs/heads/master
youtube_dl/extractor/fczenit.py
30
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, ) class FczenitIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?fc-zenit\.ru/video/(?P<id>[0-9]+)' _TEST = { 'url': 'http://fc-zenit.ru/video/41044/'...
BT-jmichaud/e-commerce
refs/heads/8.0
sale_payment_method/__openerp__.py
15
# -*- coding: utf-8 -*- ############################################################################## # # sale_payment_method for OpenERP # Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
sbg2133/miscellaneous_projects
refs/heads/master
lic/streamlines_scratch.py
1
import numpy as np import matplotlib.pyplot as plt import scipy.ndimage as ndimage from magnetic_dipole import dipole plt.ion() fig, ax = plt.subplots(figsize = (8, 5)) def pix_idx(P, ys, xs): """Returns grid indices corresponding to point P""" x_idx = (np.abs(xs[0] - P[0])).argmin() y_idx = (np.abs(ys[:,0...
Matt-Deacalion/django
refs/heads/master
tests/invalid_models_tests/test_backend_specific.py
191
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.core.checks import Error from django.db import connections, models from django.test import mock from .base import IsolatedModelsTestCase def dummy_allow_migrate(db, app_label, **hints): # Prevent checks from being run on the 'other' d...
lyceel/engine
refs/heads/master
build/win/importlibs/create_importlib_win.py
185
#!/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. # """Creates an import library from an import description file.""" import ast import logging import optparse import os import os.pat...
boomsbloom/dtm-fmri
refs/heads/master
DTM/for_gensim/lib/python2.7/site-packages/numpy/lib/info.py
51
""" Basic functions used by several sub-packages and useful to have in the main name-space. Type Handling ------------- ================ =================== iscomplexobj Test for complex object, scalar result isrealobj Test for real object, scalar result iscomplex Test for complex elements, array res...
hkawasaki/kawasaki-aio8-0
refs/heads/gacco2/master
i18n/extract.py
12
#!/usr/bin/env python """ See https://edx-wiki.atlassian.net/wiki/display/ENG/PO+File+workflow This task extracts all English strings from all source code and produces three human-readable files: conf/locale/en/LC_MESSAGES/django-partial.po conf/locale/en/LC_MESSAGES/djangojs-partial.po conf/locale/en/LC_MES...