repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
kevinlondon/sentry
refs/heads/master
src/sentry/coreapi.py
8
""" sentry.coreapi ~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # TODO: We should make the API a class, and UDP/HTTP just inherit from it # This will make it so we can more easily control logging with various # m...
odoousers2014/odoo
refs/heads/master
addons/edi/models/__init__.py
8
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
magnastrazh/NEUCOGAR
refs/heads/master
nest/noradrenaline/nest-2.10.0/pynest/examples/evaluate_aeif_cond_alpha_RK5.py
9
# -*- coding: utf-8 -*- # # evaluate_aeif_cond_alpha_RK5.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 o...
sandeepgupta2k4/tensorflow
refs/heads/master
tensorflow/contrib/labeled_tensor/python/ops/sugar.py
174
# 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...
google/mentornet
refs/heads/master
code/utils.py
1
# Copyright 2018 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 ...
xiangke/pycopia
refs/heads/master
mibs/pycopia/mibs/MPLS_LSR_STD_MIB_OID.py
1
# python # This file is generated by a program (mib2py). import MPLS_LSR_STD_MIB OIDMAP = { '1.3.6.1.2.1.10.166.2': MPLS_LSR_STD_MIB.mplsLsrStdMIB, '1.3.6.1.2.1.10.166.2.0': MPLS_LSR_STD_MIB.mplsLsrNotifications, '1.3.6.1.2.1.10.166.2.1': MPLS_LSR_STD_MIB.mplsLsrObjects, '1.3.6.1.2.1.10.166.2.2': MPLS_LSR_STD_MIB.mp...
111pontes/ydk-py
refs/heads/master
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_aaa_lib_datatypes.py
1
""" Cisco_IOS_XR_aaa_lib_datatypes This module contains a collection of generally useful derived YANG data types. Copyright (c) 2013\-2016 by Cisco Systems, Inc. All rights reserved. """ import re import collections from enum import Enum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBit...
bhargav2408/python-for-android
refs/heads/master
python-modules/twisted/twisted/words/protocols/toc.py
53
# -*- test-case-name: twisted.words.test -*- # Copyright (c) 2001-2005 Twisted Matrix Laboratories. # See LICENSE for details. """ Implements a AOL Instant Messenger TOC server and client, using the Twisted framework. TODO: info,dir: see how gaim connects for this...it may never work if it tries to connect to the aim...
jmerkow/VTK
refs/heads/master
ThirdParty/Twisted/twisted/internet/_baseprocess.py
23
# -*- test-case-name: twisted.test.test_process -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Cross-platform process-related functionality used by different L{IReactorProcess} implementations. """ from twisted.python.reflect import qual from twisted.python.deprecate import getWarning...
marcelovilaca/DIRAC
refs/heads/integration
FrameworkSystem/Client/SystemAdministratorClient.py
10
######################################################################## # $HeadURL$ ######################################################################## """ The SystemAdministratorClient is a class representing the client of the DIRAC SystemAdministrator service. It has also methods to update the Configuratio...
drewp/tahoe-lafs
refs/heads/master
misc/build_helpers/show-tool-versions.py
1
#! /usr/bin/env python import locale, os, subprocess, sys, traceback added_zetuptoolz_egg = False try: import pkg_resources pkg_resources # hush pyflakes except ImportError: import glob eggz = glob.glob('setuptools-*.egg') if len(eggz) > 0: egg = os.path.realpath(eggz[0]) print >>...
jessefeinman/FintechHackathon
refs/heads/master
venv/Lib/site-packages/pip/_vendor/distlib/_backport/tarfile.py
1005
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
bryback/quickseq
refs/heads/master
genescript/Bio/SubsMat/__init__.py
3
# Copyright 2000-2009 by Iddo Friedberg. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # # Iddo Friedberg idoerg@cc.huji.ac.il """Substitution matrices, log odds matrices, and...
matthewbauer/bootchart
refs/heads/master
pybootchartgui/samples.py
2
# This file is part of pybootchartgui. # pybootchartgui 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. # pybootchartgui is dis...
houzhenggang/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/distutils/file_util.py
171
"""distutils.file_util Utility functions for operating on single files. """ __revision__ = "$Id$" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose output in 'copy_file()' _copy_action = {None: 'copying', 'hard': 'hard linking', ...
compsoc-ssc/compsocssc
refs/heads/master
events/migrations/0006_auto_20170204_2137.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('events', '0005_auto_20170124_1045'), ] operations = [ migrations.AlterField( model_name='event', nam...
anish/buildbot
refs/heads/master
master/buildbot/secrets/manager.py
1
# This file is part of Buildbot. Buildbot 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 distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
devs4v/devs4v-information-retrieval15
refs/heads/master
project/lucene/pylucene-4.9.0-0/jcc/build/lib.linux-x86_64-2.7/jcc/config.py
2
INCLUDES=['/usr/lib/jvm/java-7-openjdk-amd64/include', '/usr/lib/jvm/java-7-openjdk-amd64/include/linux'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64', '-ljava', '-L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64...
axsauze/eventsfinder
refs/heads/master
django/conf/locale/nl/formats.py
107
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '20 januari 2009' TIME_FORMAT = 'H:i' ...
tango-controls/svn2git-migration
refs/heads/master
utils/tickets_migration/remove_tickets.py
1
#!/usr/bin/python import sys import getopt import json def usage(): print 'This script is able to remove the tickets having ' print 'at least one of the labels given in parameter or having a ticket number in the specified list' print print 'If an output filename is specified, the script will keep all the tickets ...
AOSPU/external_chromium_org
refs/heads/android-5.0/py3
tools/telemetry/telemetry/timeline/recording_options.py
55
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class TimelineRecordingOptions(object): def __init__(self): self.record_timeline = True self.record_network = False
kaiserroll14/301finalproject
refs/heads/master
main/numpy/ma/testutils.py
98
"""Miscellaneous functions for testing masked arrays and subclasses :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: testutils.py 3529 2007-11-13 08:01:14Z jarrod.millman $ """ from __future__ import division, absolute_import, print_function import operator import numpy as np from nu...
bocaaust/FreshLife
refs/heads/master
django_project/env/lib/python2.7/site-packages/django/conf/locale/fr/formats.py
107
# -*- 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 = 'j F Y' TIME_FORMAT = 'H:i:s' DATE...
gopythongo/gopythongo
refs/heads/master
src/py/gopythongo/builders/docker.py
1
# -* encoding: utf-8 *- # 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 re import uuid import configargparse from typing import Any, Type import sy...
XingxingZhang/dress
refs/heads/master
scripts/get_auto_encoder_data/shuffle.py
1
#!/usr/bin/python2.7 import sys, os, random, argparse def shuffle(infile, outfile): lines = open(infile).readlines() random.shuffle(lines) open(outfile, 'w').write(''.join(lines)) if __name__ == '__main__': parser = argparse.ArgumentParser(description='shuffle lines of a file') parser.add_argumen...
etherkit/OpenBeacon2
refs/heads/master
macos/venv/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-storm.database.py
3
# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE.GPL.txt, distributed with # this software. # # SPD...
giuseppemag/INFDEV01-1
refs/heads/master
code/bouncing ball sample/bouncing ball.py
2
import os import time from time import sleep def cls(): os.system(['clear','cls'][os.name == 'nt']) y = 10.0 vy = 0.0 dt = 0.05 while (abs(vy) > 0.9) | (y > 0.2): new_y = y + vy * dt if new_y <= 0.1: vy = -vy * 0.7 else: vy -= 9.8 * dt y = new_y cls() screen = "" for j in range(0,20): f...
sserrot/champion_relationships
refs/heads/master
venv/Lib/site-packages/dateutil/parser/_parser.py
8
# -*- coding: utf-8 -*- """ This module offers a generic date/time string parser which is able to parse most known formats to represent a date and/or time. This module attempts to be forgiving with regards to unlikely input formats, returning a datetime object even for dates which are ambiguous. If an element of a dat...
bsipocz/statsmodels
refs/heads/master
statsmodels/duration/tests/survival_enet_r_results.py
33
import numpy as np coef_50_2_0 = np.array([-0.6748149,0.5219471]) coef_50_2_1 = np.array([-0.3464841,0.211115]) coef_100_5_0 = np.array([-0.4839566,-0.3130558,-0.1239565,0.3466049,0.5827503]) coef_100_5_1 = np.array([-0.1314948,0,0,0.0324285,0.2364489])
ruffy91/micropython
refs/heads/master
docs/conf.py
4
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # MicroPython documentation build configuration file, created by # sphinx-quickstart on Sun Sep 21 11:42:03 2014. # # 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 ...
pyconca/2013-web
refs/heads/pyconca2013
symposion/teams/admin.py
7
from django.contrib import admin import reversion from symposion.teams.models import Team, Membership admin.site.register(Team, prepopulated_fields={"slug": ("name",)}, ) class MembershipAdmin(reversion.VersionAdmin): list_display = ["team", "user", "state"] list_filter = ["team"] search_fields = [...
vmindru/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_mlag_interface.py
31
#!/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...
jignaciomartinez/Juntandonos
refs/heads/master
crowdfunding/crowdfunding/settings.py
2
import os from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS DEBUG = False TEMPLATE_DEBUG = DEBUG SITE_ROOT = os.path.abspath(os.path.dirname(__file__)) ADMINS = ( ("crowdf", "crowdf@mailinator.com"), ) MANAGERS = ADMINS DATABASES = { "default": { "ENGINE" : "django.db.backends.pos...
djabber/Dashboard
refs/heads/master
bottle/dash/lib/python2.7/encodings/cp949.py
816
# # cp949.py: Python Unicode Codec for CP949 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_kr, codecs import _multibytecodec as mbc codec = _codecs_kr.getcodec('cp949') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrement...
stanlyxiang/incubator-hawq
refs/heads/master
tools/bin/lib/pysync_remote.py
12
# 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...
MusculoskeletalAtlasProject/mapclient
refs/heads/develop
src/mapclient/exceptions.py
2
""" MAP Client, a program to generate detailed musculoskeletal models for OpenSim. Copyright (C) 2012 University of Auckland This file is part of MAP Client. (http://launchpad.net/mapclient) MAP Client is free software: you can redistribute it and/or modify it under the terms of the GNU General Publ...
loisaidasam/gensim
refs/heads/develop
gensim/test/test_probability_estimation.py
17
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for probability estimation algorithms in the probability_estimation module. """ import logging import unittest fro...
DataDog/kafka-python
refs/heads/master
kafka/protocol/pickle.py
11
from __future__ import absolute_import try: import copyreg # pylint: disable=import-error except ImportError: import copy_reg as copyreg # pylint: disable=import-error import types def _pickle_method(method): try: func_name = method.__func__.__name__ obj = method.__self__ cls =...
nmercier/linux-cross-gcc
refs/heads/master
win32/bin/Lib/encodings/euc_jp.py
61
# # euc_jp.py: Python Unicode Codec for EUC_JP # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jp') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc....
liorvh/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/queuestatus.py
122
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
ryfeus/lambda-packs
refs/heads/master
LightGBM_sklearn_scipy_numpy/source/sklearn/mixture/gaussian_mixture.py
15
"""Gaussian Mixture Model.""" # Author: Wei Xue <xuewei4d@gmail.com> # Modified by Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clause import numpy as np from scipy import linalg from .base import BaseMixture, _check_shape from ..externals.six.moves import zip from ..utils import check_arra...
jeremyherbert/mgba
refs/heads/master
tools/deploy-mac.py
6
#!/usr/bin/env python from __future__ import print_function import argparse import errno import os import re import shutil import subprocess qtPath = None verbose = False def splitPath(path): folders = [] while True: path, folder = os.path.split(path) if folder != '': folders.append(folder) else: if pat...
pgm/StarCluster
refs/heads/develop
starcluster/commands/addnode.py
15
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 # Software Foundation, either version 3 of the License, or (at your option) any # later ...
gnagel/backtrader
refs/heads/master
docs/sma_crossover.py
3
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gagnonlg/IFT6266-project
refs/heads/master
tests/test_batch_conv.py
1
import numpy import pylab from PIL import Image import theano.tensor as T import network # open random image of dimensions 639x516 img = Image.open(open('tests/3wolfmoon.jpg')) # dimensions are (height, width, channel) img = numpy.asarray(img, dtype='float64') / 256. # put image in 4D tensor of shape (1, 3, height, w...
LethusTI/supportcenter
refs/heads/master
vendor/django/tests/regressiontests/views/tests/generic/object_list.py
30
import warnings from django.test import TestCase class ObjectListTest(TestCase): fixtures = ['testdata.json'] urls = 'regressiontests.views.generic_urls' def setUp(self): self.save_warnings_state() warnings.filterwarnings('ignore', category=DeprecationWarning, ...
shaggy8871/jasper
refs/heads/master
client/test_mic.py
1
# -*- coding: utf-8-*- """ A drop-in replacement for the Mic class used during unit testing. Designed to take pre-arranged inputs as an argument and store any outputs for inspection. Requires a populated profile (profile.yml). """ class Mic: def __init__(self, inputs): self.inputs = inputs self.i...
shuggiefisher/crowdstock
refs/heads/master
django/contrib/gis/geos/prototypes/__init__.py
244
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import create_cs, get_cs, \ cs_clone, cs_getordinate, cs_setordinate, c...
HesselTjeerdsma/Cyber-Physical-Pacman-Game
refs/heads/master
Algor/flask/lib/python2.7/site-packages/pip/compat/__init__.py
342
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import os import sys from pip._vendor.six import text_type try: from logging.config import dictConfig as logging_dictConfig except ImportError: from pip.compat.dictconfig import ...
numba/numba
refs/heads/master
numba/tests/enum_usecases.py
5
from enum import Enum, IntEnum class Color(Enum): red = 1 green = 2 blue = 3 class Shake(Enum): vanilla = 7 chocolate = 4 cookies = 9 # Same as Color.blue mint = 3 class Planet(Enum): MERCURY = (3.303e+23, 2.4397e6) VENUS = (4.869e+24, 6.0518e6) EARTH = (5.976e+24, ...
Sylrob434/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/videobam.py
18
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import int_or_none class VideoBamIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?videobam\.com/(?:videos/download/)?(?P<id>[a-zA-Z]+)' _TESTS = [ { 'url': 'http://videobam.com...
chuan9/chromium-crosswalk
refs/heads/master
chrome/test/data/nacl/debug_stub_browser_tests.py
42
# 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 re import sys import xml.etree.ElementTree import gdb_rsp def AssertRaises(exc_class, func): try: func() except exc_class: pass e...
oliverhr/odoo
refs/heads/8.0-pos-pademobile-payment
addons/anonymization/__init__.py
441
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
pducks32/intergrala
refs/heads/master
python/sympy/sympy/geometry/util.py
12
"""Utility functions for geometrical entities. Contains ======== intersection convex_hull are_coplanar are_similar """ from __future__ import print_function, division from sympy import Dummy, S, Symbol, Function, solve from sympy.core.compatibility import string_types, is_sequence def idiff(eq, y, x, n=1): """...
mnowotka/babyshortener
refs/heads/master
babyshortener/config.py
1
# ---------------------------------------------------------------------------------------------------------------------- class DefaultConfig(object): DEBUG = False TESTING = False SQLALCHEMY_DATABASE_URI = 'sqlite:///babyshortener.db' BLUEPRINTS_LOCATION = 'babyshortener.blueprints' SQLALCHEMY_TRA...
IllusionRom-deprecated/android_platform_tools_idea
refs/heads/master
python/lib/Lib/site-packages/django/contrib/localflavor/be/be_provinces.py
440
from django.utils.translation import ugettext_lazy as _ # ISO codes PROVINCE_CHOICES = ( ('VAN', _('Antwerp')), ('BRU', _('Brussels')), ('VOV', _('East Flanders')), ('VBR', _('Flemish Brabant')), ('WHT', _('Hainaut')), ('WLG', _('Liege')), ('VLI', _('Limburg')), ('WLX', _('Luxembourg'))...
cosminbasca/cysparql
refs/heads/master
utils/simsparql.py
1
from collections import namedtuple from itertools import count from pprint import pprint from cysparql import * # requires python-Levenshtein from Levenshtein import distance from rdflib.term import URIRef, Literal __author__ = 'basca' disable_rasqal_warnings() PatternTypes = enum(UNION='union', OPTIONAL='optional',...
RichDijk/eXe
refs/heads/master
twisted/protocols/loopback.py
14
# -*- test-case-name: twisted.test.test_loopback -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # These class's names should have been based on Onanism, but were # censored by the PSU """Testing support for protocols -- loopback between client and server.""" # system imports i...
oostende/blackhole-2
refs/heads/master
lib/python/Components/Converter/SensorToText.py
137
from Components.Converter.Converter import Converter class SensorToText(Converter, object): def __init__(self, arguments): Converter.__init__(self, arguments) def getText(self): if self.source.getValue() is None: return "" mark = " " unit = self.source.getUnit() if unit in ('C','F'): mark = str('\xc...
urbaniak/gunicorn
refs/heads/master
tests/requests/valid/018.py
40
req1 = { "method": "GET", "uri": uri("/first"), "version": (1, 1), "headers": [], "body": b"" } req2 = { "method": "GET", "uri": uri("/second"), "version": (1, 1), "headers": [], "body": b"" } request = [req1, req2]
jiegec/gnuradio
refs/heads/master
gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
38
#!/usr/bin/env python # # Copyright 2012 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) # ...
mancoast/CPythonPyc_test
refs/heads/master
fail/330_test_sundry.py
7
"""Do a minimal test of all the modules that aren't otherwise tested.""" from test import support import sys import unittest class TestUntestedModules(unittest.TestCase): def test_at_least_import_untested_modules(self): with support.check_warnings(quiet=True): import bdb import cgi...
hynnet/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/host/lib64/scons-2.1.0/SCons/Tool/ifl.py
21
"""SCons.Tool.ifl Tool-specific initialization for the Intel Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 20...
sbktechnology/trufil-frappe
refs/heads/develop
frappe/core/doctype/doctype/doctype.py
6
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import re import frappe from frappe import _ from frappe.utils import now, cint from frappe.model import no_value_fields from frappe.model.document import Document from frappe.c...
ckaestne/CIDE
refs/heads/master
CIDE_Language_Python-test/testfiles/codeop.py
8
r"""Utilities to compile possibly incomplete Python source code. This module provides two interfaces, broadly similar to the builtin function compile(), that take progam text, a filename and a 'mode' and: - Return a code object if the command is complete and valid - Return None if the command is incomplete - Raise Sy...
trabacus-softapps/openerp-8.0-cc
refs/heads/master
openerp/addons/web/doc/conf.py
494
# -*- coding: utf-8 -*- # # OpenERP Technical Documentation configuration file, created by # sphinx-quickstart on Fri Feb 17 16:14:06 2012. # # 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. # #...
nightjean/Deep-Learning
refs/heads/master
tensorflow/contrib/keras/python/keras/datasets/imdb.py
15
# 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...
uiri/pxqz
refs/heads/master
venv/lib/python2.7/site-packages/django/core/management/commands/sqlclear.py
90
from optparse import make_option from django.core.management.base import AppCommand from django.core.management.sql import sql_delete from django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the DROP TABLE SQL statements for the given app name(s)." option_list = AppComman...
pireerliu/uavcan
refs/heads/master
pyuavcan/pyuavcan/dsdl/common.py
13
# # Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com> # from __future__ import division, absolute_import, print_function, unicode_literals import os class DsdlException(Exception): ''' This exception is raised in case of a parser failure. Fields: file Source file path where the error...
LuisPalacios/iptv2hts
refs/heads/master
movistartv2xmltv/get_xmls.py
2
#!/usr/bin/env python #Download raw xml data to inspect # Stardard tools import sys import os import re import logging from tva import TvaStream, TvaParser logger = logging.getLogger('movistarxmltv') logger.setLevel(logging.DEBUG) fh = logging.FileHandler('/tmp/movistar.log') fh.setLevel(logging.INFO) ch = logging.S...
gfyoung/pandas
refs/heads/master
pandas/tests/io/test_pickle.py
1
""" manage legacy pickle tests How to add pickle tests: 1. Install pandas version intended to output the pickle. 2. Execute "generate_legacy_storage_files.py" to create the pickle. $ python generate_legacy_storage_files.py <output_dir> pickle 3. Move the created pickle to "data/legacy_pickle/<version>" directory. "...
jylaxp/django
refs/heads/master
django/contrib/staticfiles/__init__.py
802
default_app_config = 'django.contrib.staticfiles.apps.StaticFilesConfig'
sodafree/backend
refs/heads/master
tests/regressiontests/i18n/patterns/urls/disabled.py
176
from django.conf.urls import url from django.conf.urls.i18n import i18n_patterns from django.views.generic import TemplateView view = TemplateView.as_view(template_name='dummy.html') urlpatterns = i18n_patterns('', url(r'^prefixed/$', view, name='prefixed'), )
abramhindle/UnnaturalCodeFork
refs/heads/master
python/testdata/launchpad/lib/lp/testing/_webservice.py
1
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type __all__ = [ 'launchpadlib_credentials_for', 'launchpadlib_for', 'oauth_access_token_for', ] import shutil import tempfile from launchpadlib...
nkgilley/home-assistant
refs/heads/dev
homeassistant/components/snapcast/__init__.py
29
"""The snapcast component."""
mirigata/infiksi
refs/heads/master
infiksi/server.py
1
from flask import Flask, request, jsonify import infiksi app = Flask(__name__) @app.route("/") def get_metadata(): url = request.args.get('q', None) try: metadata = infiksi.get_metadata(url) return jsonify(metadata.__dict__) except infiksi.UnreachableError as e: return jsonify(...
Microsoft/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pip/_vendor/distlib/__init__.py
23
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2017 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import logging __version__ = '0.2.7' class DistlibException(Exception): pass try: from logging import NullHandler except Impor...
frankk00/realtor
refs/heads/master
epydoc/test/util.py
29
# # epydoc -- Utility functions used by regression tests (*.doctest) # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html.py 1420 2007-01-28 14:19:30Z dvarrazzo $ # """ Utility functions used by the regression tests (C{*.doctest}). """ __docformat__ = 'epytext en' import tempfile, re, os, os.path, textwrap, sys...
willhess/aima-python
refs/heads/master
tests/test_grid.py
26
import pytest from grid import * # noqa def compare_list(x, y): return all([elm_x == y[i] for i, elm_x in enumerate(x)]) def test_distance(): assert distance((1, 2), (5, 5)) == 5.0 def test_distance2(): assert distance2((1, 2), (5, 5)) == 25.0 def test_vector_clip(): assert vector_clip((-1, 10)...
nilavghosh/Protocol-Buffers-Fork
refs/heads/master
python/google/protobuf/internal/wire_format_test.py
570
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
kaspermunch/MultiPurpose
refs/heads/master
MultiPurpose/TimeSeries.py
1
import os, sys, math, re, csv import Overlap, StringIO from math import log from operator import itemgetter from bisect import bisect def binsizes_with_even_inverval_coverage(lst, nrobs, binIdx=[0,1]): start_idx, end_idx = binIdx # indeces for start and end values intervals = sorted(lst, key=itemgetter(star...
jr-garcia/Engendro3D
refs/heads/master
Demos/Gui Demos/buttons.py
1
# coding=utf-8 from cycgkit.cgtypes import vec3, vec4 from _set_path import setPath setPath() from _base._BaseDemo import _Demo_Base, runDemo, triangleMODEL from e3d.gui import PinningEnum, StyleHintsEnum, Panel, Button, Label from e3d.gui.Styling.styles import ColorfullStyle from e3d.Colors import * import os clas...
ritzk/ansible-modules-extras
refs/heads/devel
cloud/google/gce_tag.py
29
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
mfherbst/spack
refs/heads/develop
var/spack/repos/builtin/packages/gslib/package.py
2
############################################################################## # 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...
JacobTech/lge_kernel_e400-
refs/heads/android-msm-2.6.38
scripts/build-all.py
39
#! /usr/bin/env python # Copyright (c) 2009-2011, Code Aurora Forum. 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 # n...
lvduit/islab-portfolio-by-ghost
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/perldoc.py
364
# -*- coding: utf-8 -*- """ pygments.styles.perldoc ~~~~~~~~~~~~~~~~~~~~~~~ Style similar to the style used in the `perldoc`_ code blocks. .. _perldoc: http://perldoc.perl.org/ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from...
o5k/openerp-oemedical-v0.1
refs/heads/master
openerp/addons/account_payment/account_move_line.py
33
# -*- 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...
MattsFleaMarket/python-for-android
refs/heads/master
python-modules/twisted/twisted/words/test/test_tap.py
54
# Copyright (c) 2001-2005 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.cred import credentials, error from twisted.words import tap from twisted.trial import unittest class WordsTap(unittest.TestCase): """ Ensures that the twisted.words.tap API works. """ PASSWD_TEXT = "admi...
Warter21/linux-4.0_imx6
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
1996
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
mrshirts/InterMol
refs/heads/master
intermol/forces/quartic_breakable_bond_type.py
2
import parmed.unit as units from intermol.decorators import accepts_compatible_units from intermol.forces.abstract_bond_type import AbstractBondType class QuarticBreakableBondType(AbstractBondType): __slots__ = ['k', 'B1', 'B2', 'Rc', 'U0', 'order', 'c'] @accepts_compatible_units(None, None, ...
MoritzS/django
refs/heads/master
django/db/backends/mysql/base.py
7
""" MySQL database backend for Django. Requires mysqlclient: https://pypi.python.org/pypi/mysqlclient/ """ import re from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from django.db.backends.base.base import BaseDatabaseWrapper fr...
nickcdryan/rep
refs/heads/master
tests/test_stacking.py
4
from __future__ import division, print_function, absolute_import import numpy from sklearn.ensemble import AdaBoostClassifier, BaggingClassifier from rep.test.test_estimators import check_classifier, generate_classification_data from rep.estimators import XGBoostClassifier, TMVAClassifier from rep.metaml import Foldi...
RNCan/WeatherBasedSimulationFramework
refs/heads/master
wbsTools/BioSIM_API/CppAndPython/BioSIM_API.py
1
if __name__ == "__main__": import lib.BioSIM_API as BioSIM_API import time #create and initialize WeatherGenerator WG = BioSIM_API.WeatherGenerator('Context Name') print("Initialize Weather Generator") msg = WG.Initialize("Shore=./Layers/Shore.ann&Normals=./Weather/Normals/Canada-USA 19...
nwjs/chromium.src
refs/heads/nw45-log
net/data/verify_certificate_chain_unittest/intermediate-eku-any-and-clientauth/generate-chains.py
6
#!/usr/bin/python # Copyright (c) 2017 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. """Certificate chain where the intermediate restricts the extended key usage to clientAuth + any, and the target sets serverAuth + clie...
mahabs/nitro
refs/heads/master
nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_binding.py
1
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
indashnet/InDashNet.Open.UN2000
refs/heads/master
android/external/chromium-trace/trace-viewer/third_party/pywebsocket/src/test/test_handshake_hybi.py
29
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
uclouvain/osis_louvain
refs/heads/master
base/migrations/0072_attribution_learning_unit.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-10-19 07:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0071_add_learning_unit_year'), ] operations =...
wileeam/airflow
refs/heads/master
airflow/providers/amazon/aws/operators/sqs.py
5
# 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...
tarzan0820/odoo
refs/heads/8.0
openerp/tools/parse_version.py
380
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Emergya/icm-openedx-educamadrid-platform-basic
refs/heads/ci
lms/djangoapps/course_api/blocks/tests/test_forms.py
25
""" Tests for Course Blocks forms """ import ddt from django.http import Http404, QueryDict from urllib import urlencode from rest_framework.exceptions import PermissionDenied from opaque_keys.edx.locator import CourseLocator from openedx.core.djangoapps.util.test_forms import FormTestMixin from student.models import ...