repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
lightbase/cocar-agente
refs/heads/master
cocar/xml_utils.py
1
#!/bin/env python # -*- coding: utf-8 -*- __author__ = 'eduardo' import logging from lxml import etree import model.computer import model.printer import model.host import model.network_device from .session import SnmpSession, ArpSession from .coleta import Coleta log = logging.getLogger() class NmapXML(object): ...
naslundx/VisualArray
refs/heads/master
python/Examples/quicksort.py
1
import sys sys.path.insert(0,'..') from visualarray import VisualArray import random def quickSort(alist): quickSortHelper(alist,0,len(alist)-1,0) def quickSortHelper(alist,first,last,level): if first<last: alist.gfx_separate(first, width=2*level+1) # Add separators to mark... alist.gfx_separate(last...
maniteja123/numpy
refs/heads/master
numpy/_globals.py
63
""" Module defining global singleton classes. This module raises a RuntimeError if an attempt to reload it is made. In that way the identities of the classes defined here are fixed and will remain so even if numpy itself is reloaded. In particular, a function like the following will still work correctly after numpy is...
ddanier/django_price
refs/heads/master
tests/test_smoke.py
1
import pytest def test_smoke(): """Just some basic smoke tests (syntax, app loading)""" import django_price import django_price.currency import django_price.fields import django_price.models import django_price.price import django_price.tax import django_price.utils def test_system_c...
mariosky/evo-drawings
refs/heads/master
venv/lib/python2.7/site-packages/numpy/core/_methods.py
55
""" Array methods which are called by both the C-code for the method and the Python code for the NumPy-namespace function """ from __future__ import division, absolute_import, print_function import warnings from numpy.core import multiarray as mu from numpy.core import umath as um from numpy.core.numeric import asan...
p0cisk/Quantum-GIS
refs/heads/master
python/plugins/processing/algs/qgis/PolarPlot.py
19
# -*- coding: utf-8 -*- """ *************************************************************************** BarPlot.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ******************************...
ksmit799/Toontown-Source
refs/heads/master
toontown/suit/SuitTimings.py
1
dict = {} fromSky = 6.5 toSky = 6.5 victoryDance = 9.08 fromSuitBuilding = 2.0 toSuitBuilding = 2.5 toToonBuilding = 2.5
mtlchun/edx
refs/heads/master
cms/djangoapps/contentstore/features/courses.py
171
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument from lettuce import world, step from common import * ############### ACTIONS #################### @step('There are no courses$') def no_courses(step): world.clear_courses() create_studio_user() @st...
huggingface/pytorch-transformers
refs/heads/master
tests/test_pipelines_zero_shot.py
2
# Copyright 2020 The HuggingFace Team. 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 applicabl...
ossrs/srs
refs/heads/3.0release
trunk/research/python-subprocess/main.py
39
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, shlex, time, subprocess cmd = "./python.subprocess 0 80000" args = shlex.split(str(cmd)) print "cmd: %s, args: %s"%(cmd, args) # the communicate will read all data and wait for sub process to quit. def use_communicate(args, fout, ferr): process = subprocess.P...
rosexu/latex-my-notes
refs/heads/master
webenv/lib/python2.7/site-packages/pip/basecommand.py
181
"""Base Command class, and related routines""" from __future__ import absolute_import import logging import os import sys import optparse import warnings from pip import cmdoptions from pip.locations import running_under_virtualenv from pip.download import PipSession from pip.exceptions import (BadCommand, Installati...
jirikuncar/invenio
refs/heads/master
invenio/modules/search/testsuite/test_search_services.py
15
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any ...
yeming233/horizon
refs/heads/master
openstack_dashboard/enabled/_2240_admin_volume_types_panel.py
7
# The slug of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'volume_types' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. PANEL_GROUP = 'volume' # Python panel class of the PANEL to be added. ADD_PANEL ...
blueboxgroup/neutron
refs/heads/master
neutron/plugins/vmware/api_client/exception.py
29
# Copyright 2014 VMware, 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...
kangkot/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/idle/PyParse.py
17
import string import re import sys try: from types import UnicodeType except ImportError: from pywintypes import UnicodeType # Reason last stmt is continued (or C_NONE if it's not). C_NONE, C_BACKSLASH, C_STRING, C_BRACKET = range(4) if 0: # for throwaway debugging output def dump(*stuff): sys....
slisson/intellij-community
refs/heads/master
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_exitfunc.py
291
""" Convert use of sys.exitfunc to use the atexit module. """ # Author: Benjamin Peterson from lib2to3 import pytree, fixer_base from lib2to3.fixer_util import Name, Attr, Call, Comma, Newline, syms class FixExitfunc(fixer_base.BaseFix): keep_line_order = True BM_compatible = True PATTERN = """ ...
rickhurst/Django-non-rel-blog
refs/heads/master
django/contrib/auth/signals.py
334
from django.dispatch import Signal user_logged_in = Signal(providing_args=['request', 'user']) user_logged_out = Signal(providing_args=['request', 'user'])
OscarPrediction1/boxOfficeNominationsCorrelation
refs/heads/master
run.py
1
from pymongo import MongoClient import db client = MongoClient(db.conn_string) db = client.oscar results = [["year","oscar","name","won","gross","gross per day","playdays","release date"]] # find all nominees for data in db.oscar_nominations.find(): # loop cateogories for key in data: if key == "BEST PICTURE":...
litecoinz-project/litecoinz
refs/heads/master
qa/rpc-tests/mempool_nu_activation.py
1
#!/usr/bin/env python2 # Copyright (c) 2018 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, initiali...
rousseab/pymatgen
refs/heads/master
pymatgen/apps/battery/tests/test_analyzer.py
6
import unittest import os from pymatgen.apps.battery.analyzer import BatteryAnalyzer from pymatgen.util.testing import PymatgenTest from pymatgen.core.structure import Structure import pymatgen module_dir = os.path.join(os.path.dirname(pymatgen.__file__), '..', 'test_files') class BatteryAnalyzerTest(PymatgenTest)...
javachengwc/hue
refs/heads/master
desktop/core/ext-py/pysaml2-2.4.0/example/sp-repoze/attributemaps/basic.py
112
MAP = { "identifier": "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", "fro": { 'urn:mace:dir:attribute-def:aRecord': 'aRecord', 'urn:mace:dir:attribute-def:aliasedEntryName': 'aliasedEntryName', 'urn:mace:dir:attribute-def:aliasedObjectName': 'aliasedObjectName', 'urn:mace:...
charsyam/twemproxy
refs/heads/master
tests/test_memcache/test_gets.py
40
#!/usr/bin/env python #coding: utf-8 import os import sys import redis import memcache PWD = os.path.dirname(os.path.realpath(__file__)) WORKDIR = os.path.join(PWD, '../') sys.path.append(os.path.join(WORKDIR, 'lib/')) sys.path.append(os.path.join(WORKDIR, 'conf/')) import conf from server_modules import * from uti...
Athrun29/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/routers/ports/__init__.py
12133432
marcosleonefilho/hoop-tastypie
refs/heads/master
tests/validation/models.py
12133432
mentii/mentii
refs/heads/master
Backend/problems/__init__.py
12133432
eonpatapon/contrail-neutron-plugin
refs/heads/master
neutron_plugin_contrail/__init__.py
12133432
fusionbox/buggy
refs/heads/master
testproj/wsgi.py
1
""" WSGI config for buggy project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
timothycrosley/hug
refs/heads/develop
examples/post_body_example.py
2
"""A simple post reading server example. To test run this server with `hug -f post_body_example` then run the following from ipython: import requests requests.post('http://localhost:8000/post_here', json={'one': 'two'}).json() This should return back the json data that you posted """ import hug @hug.po...
skycucumber/Messaging-Gateway
refs/heads/master
webapp/venv/lib/python2.7/site-packages/twisted/conch/test/test_window.py
50
""" Tests for the insults windowing module, L{twisted.conch.insults.window}. """ from twisted.trial.unittest import TestCase from twisted.conch.insults.window import TopWindow, ScrolledArea, TextOutput class TopWindowTests(TestCase): """ Tests for L{TopWindow}, the root window container class. """ ...
KousikaGanesh/purchaseandInventory
refs/heads/master
openerp/addons/point_of_sale/wizard/pos_payment_report_user.py
55
# -*- 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...
mc-coal/mc-coal
refs/heads/master
lib/requests/packages/charade/langgreekmodel.py
184
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Ri...
Elico-Corp/odoo_OCB
refs/heads/9.0
addons/website_sale_stock/controllers/__init__.py
7372
import main
40223151/2015cd0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/browser/websocket.py
618
from browser import window import javascript WebSocket = javascript.JSConstructor(window.WebSocket)
mshirley/dionaea
refs/heads/master
modules/python/util/logsql2postgres.py
10
#!/opt/dionaea/bin/python3 # sudo su postgres # createdb --owner=xmpp logsql # psql -U xmpp logsql < modules/python/util/xmpp/pg_schema.sql import sys import sqlite3 import postgresql import postgresql.driver as pg_driver import optparse def copy(name, lite, pg, src, dst): print("[+] {0}".format(name)) pg.execute...
nathanaevitas/odoo
refs/heads/master
openerp/addons/l10n_no/__init__.py
693
# -*- encoding: 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 t...
jnewbery/bitcoin
refs/heads/master
test/functional/rpc_blockchain.py
6
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPCs related to blockchainstate. Test the following RPCs: - getblockchaininfo - gettxouts...
sanjuro/RCJK
refs/heads/master
vendor/django/contrib/localflavor/pl/pl_administrativeunits.py
433
# -*- coding: utf-8 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', u'Wrocław'), ('jeleniagora', u'Jelenia Góra'), ('legnica', u'Legnica'), ('boleslawiecki', u'bolesławiecki'), ('dzierzoniows...
courtarro/gnuradio
refs/heads/master
gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py
25
#!/usr/bin/env python # # Copyright 2015 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) # ...
zasdfgbnm/tensorflow
refs/heads/master
tensorflow/contrib/bayesflow/python/ops/sgld_optimizer.py
14
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Skyggedans/AceProxy-with-Torrent-TV-extension
refs/heads/master
torrenttv/torrenttv.py
1
import urllib, urllib2, logging import xml.dom.minidom as minidom from tortvconfig import TorTVConfig class TorrentTV: logger = logging.getLogger('http_TorTVExtension') session = None @staticmethod def auth(): try: TorrentTV.session == None url = TorTVConfig.authur...
reinout/django
refs/heads/master
tests/generic_relations/__init__.py
12133432
EvanK/ansible-modules-core
refs/heads/devel
cloud/google/__init__.py
12133432
Sterncat/opticspy
refs/heads/master
opticspy/lens/zoom_position.py
1
from __future__ import division as __division__ import numpy as __np__ import matplotlib.pyplot as __plt__ def zoom_cal(f1,f2,fshort,flong): """ Two element infinite conjugate zoom - 1st order analysis Try example: zoom_cal(f1 = 30,f2 = -30, fshort = 35, flong = 70) ===============================================...
jcurbelo/networkx
refs/heads/master
networkx/algorithms/bipartite/__init__.py
17
r""" This module provides functions and operations for bipartite graphs. Bipartite graphs `B = (U, V, E)` have two node sets `U,V` and edges in `E` that only connect nodes from opposite sets. It is common in the literature to use an spatial analogy referring to the two node sets as top and bottom nodes. The bipartite...
jianlirong/incubator-hawq
refs/heads/master
tools/bin/gppylib/test/regress/__init__.py
96
# 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...
siddhika1889/Pydev-Dependencies
refs/heads/master
tests/pysrc/testrec4/mod.py
11
def request_config(): pass from util import url_for
rpalovics/Alpenglow
refs/heads/master
python/test_alpenglow/experiments/test_PopularityTimeframeExperiment.py
2
import alpenglow as prs import alpenglow.Getter as rs import alpenglow.experiments import pandas as pd import math class TestPopularityTimeframeExperiment: def test_PopularityTimeframeExperiment(self): data = pd.read_csv( "python/test_alpenglow/test_data_4", sep=' ', he...
MyRookie/SentimentAnalyse
refs/heads/master
venv/lib/python2.7/site-packages/numpy/random/setup.py
101
from __future__ import division, print_function from os.path import join, split, dirname import os import sys from distutils.dep_util import newer from distutils.msvccompiler import get_build_version as get_msvc_build_version def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msv...
LaoZhongGu/kbengine
refs/heads/master
kbe/src/lib/dependencies/jsoncpp/scons-tools/substinfile.py
258
import re from SCons.Script import * # the usual scons stuff you get in a SConscript def generate(env): """ Add builders and construction variables for the SubstInFile tool. Adds SubstInFile builder, which substitutes the keys->values of SUBST_DICT from the source to the target. The values of...
illicitonion/givabit
refs/heads/master
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_3/django/contrib/gis/geos/prototypes/io.py
312
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_string, check_sized_string from django.contrib...
adeshmukh/learntosolveit
refs/heads/version1
languages/python/design_try_except.py
7
try: num = 1/0 except ZeroDivisionError: raise num = 1/1 print num
jtraver/dev
refs/heads/master
python3/datetime/date1.py
1
#!/usr/bin/env python3 #!/usr/bin/python # -*- coding: iso-8859-15 -*- import time import datetime d = datetime.datetime.now() print(("d = %s" % str(d))) print(("d = %s" % str(type(d)))) print(("d = %s" % str(dir(d)))) print(d) print((d.strftime("%y%m%d%H%M%S%f"))) print(("date str %s" % str(d))) print(("date strftim...
cauchycui/scikit-learn
refs/heads/master
sklearn/linear_model/tests/__init__.py
12133432
jn7163/django
refs/heads/master
django/contrib/gis/db/backends/spatialite/__init__.py
12133432
h4wkmoon/shinken
refs/heads/master
modules/dummy_broker/__init__.py
12133432
PinguinoIDE/pinguino-multilanguage
refs/heads/master
files/gide/py_bloques/communication.py
2
#!/usr/bin/env python #-*- coding: utf-8 -*- from .constructor import Kit Kit = Kit() ######################################################################## class Communication(object): CDC_read = lambda n:Kit.addFunct("CDC", "CDC.read", 1, t="output", fill=[]) CDC_write = lambda n:Kit.addFunct("CDC", "CD...
mnestis/nlgserv
refs/heads/master
nlgserv/tests/server-test.py
1
#!/usr/bin/python import unittest import subprocess from time import sleep import urllib2 import json import os nlgserv = None def setUpModule(): global nlgserv print("Starting up nlgserv...") nlgserv = subprocess.Popen([os.path.join(os.path.dirname(__file__),"../jython.jar"), os.path.join(os.path.dirnam...
trivedi/sentapy
refs/heads/master
sentapy.py
1
#!/usr/bin/env python from __future__ import print_function import twitter, analyze, os from NaiveBayes import c from termcolor import colored def menu(): global flag flag = False os.system("clear") print(colored("Sentapy - {Sentiment Analysis in Python}", "blue")) print() while True: ...
jk1/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/utils/geoip.py
316
""" This module houses the GeoIP object, a ctypes wrapper for the MaxMind GeoIP(R) C API (http://www.maxmind.com/app/c). This is an alternative to the GPL licensed Python GeoIP interface provided by MaxMind. GeoIP(R) is a registered trademark of MaxMind, LLC of Boston, Massachusetts. For IP-based geolocation, t...
MySQLOnRocksDB/mysql-5.6
refs/heads/webscalesql-5.6.24.97
xtrabackup/test/kewpie/lib/modes/__init__.py
12133432
TangXT/GreatCatMOOC
refs/heads/master
common/djangoapps/static_replace/management/commands/__init__.py
12133432
seocam/django
refs/heads/master
django/conf/locale/pt_BR/__init__.py
12133432
CyrilWaechter/pyRevitMEP
refs/heads/master
pyRevitMEP.tab/Samples.panel/__init__.py
12133432
omnirom/android_external_chromium-org
refs/heads/android-5.1
tools/telemetry/telemetry/timeline/timeline_data.py
46
# 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 TimelineData(object): """ Subclasses of TimelineData carry timeline data from a source (e.g. tracing, profiler, etc.) to the corresponding timeline...
ajaniv/django-contacts
refs/heads/master
setup.py
1
""" .. module:: setup :synopsis: A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html """ import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be ...
CloudServer/cinder
refs/heads/master
cinder/volume/drivers/ibm/gpfs.py
1
# Copyright IBM Corp. 2013 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 agr...
routeflow/AutomaticConfigurationRouteFlow
refs/heads/master
pox/pox/lib/packet/udp.py
27
# Copyright 2011 James McCauley # Copyright 2008 (C) Nicira, Inc. # # 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) an...
whereismyjetpack/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/a/b/c/__init__.py
12133432
Endika/edx-platform
refs/heads/master
common/djangoapps/performance/tests/__init__.py
12133432
polimediaupv/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/social_facebook/courses/__init__.py
128
""" Courses API """
jpirko/lnst
refs/heads/master
lnst/Controller/NetTestResultSerializer.py
1
""" This module defines NetTestResultSerializer class which serves for serializing results of command sequence to XML Copyright 2011 Red Hat, Inc. Licensed under the GNU General Public License, version 2 as published by the Free Software Foundation; see COPYING for details. """ __author__ = """ jpirko@redhat.com (Jir...
nilbody/h2o-3
refs/heads/master
h2o-docs/src/booklets/v2_2015/source/python/ipython_dataprep_input.py
1
# Customarily, we import and start H2O as follows: import h2o h2o.init() # Will set up H2O cluster using all available cores h2o.init(ip="123.45.67.89", port=54321) # To create an H2OFrame object from a python tuple: df = h2o.H2OFrame(((1, 2, 3), ('a', 'b', 'c'), (0.1, 0.2, 0.3))...
buffer/thug
refs/heads/master
tests/functional/test_screenshot.py
1
import os import logging from thug.ThugAPI.ThugAPI import ThugAPI log = logging.getLogger("Thug") class TestScreenshot(object): def do_perform_test(self, caplog, url, expected, type_ = "remote"): thug = ThugAPI() thug.set_useragent('win7ie90') thug.disable_screenshot() thug.enab...
jtyr/ansible
refs/heads/devel
hacking/shippable/download.py
32
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK # (c) 2016 Red Hat, 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 yo...
Kongsea/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/wrappers/scikit_learn_test.py
34
# 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...
codepantry/srvup-membership
refs/heads/master
src/billing/admin.py
6
from django.contrib import admin # Register your models here. from .models import Membership, Transaction, UserMerchantId admin.site.register(Membership) admin.site.register(Transaction) admin.site.register(UserMerchantId)
martindurant/starclassifier
refs/heads/master
ui/pysynphot/svn_version.py
1
__svn_version__ = '1393' __full_svn_info__ = ''' Path: pysynphot URL: https://svn.stsci.edu/svn/ssb/astrolib/branches/release_2010_05/pysynphot Repository Root: https://svn.stsci.edu/svn/ssb/astrolib Repository UUID: 12deb60e-2afe-0310-8c98-e41b9209a0a5 Revision: 1393 Node Kind: directory Schedule: normal Last Changed...
zhangxq5012/sky_engine
refs/heads/master
build/android/gyp/dex.py
26
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import os import sys from util import build_utils from util import md5_check def DoDex(options, paths): dx_binar...
jamesblunt/edx-platform
refs/heads/master
common/djangoapps/dark_lang/middleware.py
79
""" Middleware for dark-launching languages. These languages won't be used when determining which translation to give a user based on their browser header, but can be selected by setting the ``preview-lang`` query parameter to the language code. Adding the query parameter ``clear-lang`` will reset the language stored ...
emilydolson/forestcat
refs/heads/master
pyrobot/plugins/devices/BT848Camera.py
2
from pyrobot.camera.bt848 import BT848Camera from pyrobot.vision.cvision import VisionSystem def INIT(robot): return {"camera" : BT848Camera( 160, 120, visionSystem = VisionSystem())}
mlc0202/RepoGuard
refs/heads/master
distribute_setup.py
47
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
wa1tnr/ainsuSPI
refs/heads/master
0-Distribution.d/circuitpython-master/tests/wipy/wdt.py
69
''' WDT test for the CC3200 based boards ''' from machine import WDT import time # test the invalid cases first try: wdt = WDT(1) except Exception: print("Exception") try: wdt = WDT(0, 500) except Exception: print("Exception") try: wdt = WDT(1, timeout=2000) except Exception: print("Exceptio...
hephaestus9/Ironworks
refs/heads/master
lib/flask/testsuite/ext.py
57
# -*- coding: utf-8 -*- """ flask.testsuite.ext ~~~~~~~~~~~~~~~~~~~ Tests the extension import thing. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import sys import unittest from flask.testsuite import FlaskTestCase...
sinhrks/chainer
refs/heads/master
tests/cupy_tests/manipulation_tests/test_basic.py
13
import unittest from cupy import cuda from cupy import testing @testing.gpu class TestBasic(unittest.TestCase): _multiprocess_can_split_ = True @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_copyto(self, xp, dtype): a = testing.shaped_arange((2, 3, 4), xp, dtype) ...
andreMonkey/camera_processing
refs/heads/master
pygame_text.py
1
import pygame import sys from pygame.locals import * from time import sleep import os white = (255,255,255) black = (0,0,0) def window(): pygame.init() pygame.display.set_caption('Body Data') screen = pygame.display.set_mode((1080,150), 0, 32) screen.fill((white)) pygame.display.update() ...
ProfessorX/Config
refs/heads/master
.PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdecore/KTemporaryFile.py
1
# encoding: utf-8 # module PyKDE4.kdecore # from /usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtNetwork as __PyQt4_QtNetwork class KTemporaryFile(__PyQt4_QtCore.QTemporaryFile): # no doc ...
matyro/Cor-RC
refs/heads/master
Website/site_steeringShow.py
1
from Website.site_base import BaseHandler from SQL.table_steeringcard import Steering_Card import tornado.web class SteeringCardShowHandler(BaseHandler): @tornado.web.authenticated def get(self): card = [] if self.get_arguments('id'): for itr in self.get_arguments('id'): ...
ArtsiomCh/tensorflow
refs/heads/master
tensorflow/contrib/boosted_trees/python/kernel_tests/stats_accumulator_ops_test.py
34
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
cpcloud/numba
refs/heads/master
numba/tests/complex_usecases.py
8
from __future__ import division import cmath def div_usecase(x, y): return x / y def real_usecase(x): return x.real def imag_usecase(x): return x.imag def conjugate_usecase(x): return x.conjugate() def acos_usecase(x): return cmath.acos(x) def cos_usecase(x): return cmath.cos(x) def a...
macs03/demo-cms
refs/heads/master
cms/lib/python2.7/site-packages/django/views/defaults.py
105
import warnings from django import http from django.template import (Context, RequestContext, loader, Template, TemplateDoesNotExist) from django.views.decorators.csrf import requires_csrf_token # This can be called when CsrfViewMiddleware.process_view has not run, # therefore need @requ...
eckucukoglu/arm-linux-gnueabihf
refs/heads/master
arm-linux-gnueabihf/libc/usr/lib/python2.7/test/test_abstract_numbers.py
125
"""Unit tests for numbers.py.""" import math import unittest from numbers import Complex, Real, Rational, Integral from test import test_support class TestNumbers(unittest.TestCase): def test_int(self): self.assertTrue(issubclass(int, Integral)) self.assertTrue(issubclass(int, Complex)) s...
ministryofjustice/manchester_traffic_offences_pleas
refs/heads/master
apps/plea/templatetags/__init__.py
12133432
rrrrrr8/vnpy
refs/heads/master
vnpy/trader/gateway/ibGateway/language/english/__init__.py
12133432
umitproject/site-status
refs/heads/master
django/contrib/sessions/__init__.py
12133432
Distrotech/scons
refs/heads/distrotech-scons
src/engine/SCons/Script/SConsOptions.py
2
# # __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, # distribute, sublicen...
buckets1337/UOMUMM
refs/heads/master
passlib/handlers/md5_crypt.py
19
"""passlib.handlers.md5_crypt - md5-crypt algorithm""" #============================================================================= # imports #============================================================================= # core from hashlib import md5 import re import logging; log = logging.getLogger(__name__) from w...
rajalokan/keystone
refs/heads/master
keystone/common/sql/migrate_repo/versions/079_placeholder.py
55
# 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 # d...
michalkurka/h2o-3
refs/heads/master
h2o-py/h2o/estimators/targetencoder.py
2
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # This file is auto-generated by h2o-3/h2o-bindings/bin/gen_python.py # Copyright 2016 H2O.ai; Apache License Version 2.0 (see LICENSE for details) # from __future__ import absolute_import, division, print_function, unicode_literals from h2o.utils.metaclass import dep...
bobobox/ansible
refs/heads/devel
lib/ansible/modules/network/panos/panos_mgtconfig.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
flavour/iscram
refs/heads/master
tests/unit_tests/modules/s3/s3gis/WMSLayer.py
43
s3gis_tests = load_module("tests.unit_tests.modules.s3.s3gis") def test_WMSLayer(): s3gis_tests.layer_test( db, db.gis_layer_wms, dict( name = "Test WMS", description = "Test WMS layer", enabled = True, created_on = datetime.datetime.now(), ...