repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
maurus56/musical-engine
refs/heads/master
gen_utils/sequence_generator(opt 2).py
1
import numpy as np #Extrapolates from a given seed sequence def generate_from_seed(model, seed, sequence_length, data_variance, data_mean): seedSeq = seed.copy() output = [] #The generation algorithm is simple: #Step 1 - Given A = [X_0, X_1, ... X_n], generate X_n + 1 #Step 2 - Concatenate X_n + 1 onto A #Step ...
rhgong/itk-with-dom
refs/heads/master
Wrapping/ExternalProjects/ItkVtkGlue/Wrapping/Python/itkvtk.py
12
#========================================================================== # # Copyright Insight Software Consortium # # 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...
Maccimo/intellij-community
refs/heads/master
python/testData/inspections/PyGlobalUndefinedInspection/reassignedAndPresent.py
12
bar = "something" def foo(): global bar bar = "something else"
unitusdev/unitus
refs/heads/master
qa/rpc-tests/mempool_reorg.py
41
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly)...
GHubgenius/Hammer
refs/heads/master
lib/neighborHost_class.py
3
#!/usr/bin/python2.7 #coding:utf-8 ''' ''' import os import urllib import urllib2 import re import socket class NeighborHost(object): """docstring for neiborDomain""" def __init__(self, ip): super(NeighborHost, self).__init__() m = re.match('(?<![\.\d])(?:\d{1,3}\.){3}\d{1,3}(?![\.\d])',ip) if m: self.ip =...
chulchultrain/FriendLeague
refs/heads/master
leagreq/league_curl.py
1
import requests import league_conf import time # request_url_map_populate function # Creates a map for sub URLs for queries that may be needed from the Riot API. # Ex: to get the summoner data from Riot API, you have to add the # suburl of /lol/summoner/v3/summoners/by-name # This function is where we put all the nece...
kiszk/spark
refs/heads/master
examples/src/main/python/mllib/naive_bayes_example.py
106
# # 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 us...
zaina/nova
refs/heads/master
nova/api/openstack/compute/plugins/v3/console_auth_tokens.py
36
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
CoolCloud/ansible
refs/heads/devel
lib/ansible/plugins/action/assert.py
163
# Copyright 2012, Dag Wieers <[email protected]> # # 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 versi...
j-silver/quantum_dots
refs/heads/master
entropy_plot.py
1
#!/usr/bin/env python # # entropy_plot.py # import matplotlib.pyplot as plt import numpy as np # import csv fig = plt.figure() # Reading data redent = (np.loadtxt('RED-ENTROPY.dat')).T cpent = (np.loadtxt( 'CP-ENTROPY.dat')).T redprod = (np.loadtxt('RED-ENTROPY-PROD.dat')).T cpprod = (np.loadtxt('CP-ENTROPY-PRO...
SujaySKumar/django
refs/heads/master
tests/flatpages_tests/test_templatetags.py
309
from django.contrib.auth.models import AnonymousUser, User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.template import Context, Template, TemplateSyntaxError from django.test import TestCase, modify_settings, override_settings from .settings import FLAT...
trabacus-softapps/openerp-8.0-cc
refs/heads/master
openerp/tests/test_mail_examples.py
56
#!/usr/bin/env python # -*- coding: utf-8 -*- MISC_HTML_SOURCE = """ <font size="2" style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; ">test1</font> <div style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; font-size: 12px; fo...
asgard-lab/neutron
refs/heads/master
neutron/api/v2/router.py
6
# Copyright (c) 2012 OpenStack Foundation. # # 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...
koditraquinas/koditraquinas.repository
refs/heads/master
plugin.video.traquinas/resources/lib/resolvers/turbovideos.py
23
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
GrandmasterK/XScheduler
refs/heads/master
venv/lib/python2.7/site-packages/flask/signals.py
783
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
cr/fxos-certsuite
refs/heads/master
web-platform-tests/tests/webdriver/user_input/__init__.py
12133432
thnee/ansible
refs/heads/devel
test/units/modules/cloud/__init__.py
12133432
mortada/numpy
refs/heads/master
tools/win32build/misc/x86analysis.py
75
#! /usr/bin/env python # Last Change: Sat Mar 28 02:00 AM 2009 J # Try to identify instruction set used in binary (x86 only). This works by # checking the assembly for instructions specific to sse, etc... Obviously, # this won't work all the times (for example, if some instructions are used # only after proper detecti...
biocore/tax2tree
refs/heads/master
t2t/consensus.py
1
#!/usr/bin/env python """TODO: place all consensus methods here load_consensus_map make_consensus_tree etc... """ from t2t.nlevel import RANK_ORDER from numpy import zeros, where, logical_or, long def taxa_score(master, reps): """Score taxa strings by contradictions observed in reps""" n_ranks = len(RANK_OR...
Haynie-Research-and-Development/jarvis
refs/heads/master
deps/lib/python3.4/site-packages/samsungctl/interactive.py
2
import curses _mappings = [ ["p", "KEY_POWEROFF", "P", "Power off"], ["KEY_UP", "KEY_UP", "Up", "Up"], ["KEY_DOWN", "KEY_DOWN", "Down", "Down"], ["KEY_LEFT", "KEY_LEFT", "Left", "Left"], ["KEY_RIGHT", "KEY_R...
TheTimmy/spack
refs/heads/develop
var/spack/repos/builtin/packages/libctl/package.py
3
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [email protected], All rights reserved. # LLNL-CODE-64...
sve-odoo/odoo
refs/heads/master
addons/auth_oauth/res_users.py
157
import logging import werkzeug.urls import urlparse import urllib2 import simplejson import openerp from openerp.addons.auth_signup.res_users import SignupError from openerp.osv import osv, fields from openerp import SUPERUSER_ID _logger = logging.getLogger(__name__) class res_users(osv.Model): _inherit = 'res....
bobcyw/django
refs/heads/master
tests/datatypes/tests.py
305
from __future__ import unicode_literals import datetime from django.test import TestCase, skipIfDBFeature from django.utils import six from django.utils.timezone import utc from .models import Donut, RumBaba class DataTypesTestCase(TestCase): def test_boolean_type(self): d = Donut(name='Apple Fritter'...
wathen/PhD
refs/heads/master
MHD/FEniCS/BDMns/mixStokesPressureCorrection.py
1
#!/usr/bin/python # from MatrixOperations import * from dolfin import * import numpy as np import matplotlib.pylab as plt import os import scipy.io from PyTrilinos import Epetra, EpetraExt, AztecOO, ML, Amesos from scipy2Trilinos import scipy_csr_matrix2CrsMatrix def SaveEpertaMatrix(A,name): from PyTrilinos im...
camradal/ansible
refs/heads/devel
test/units/module_utils/ec2/__init__.py
12133432
gugahoi/maraschino
refs/heads/master
lib/flask/testsuite/test_apps/blueprintapp/__init__.py
629
from flask import Flask app = Flask(__name__) from blueprintapp.apps.admin import admin from blueprintapp.apps.frontend import frontend app.register_blueprint(admin) app.register_blueprint(frontend)
hroncok/freeipa
refs/heads/master
ipalib/plugins/dns.py
1
# Authors: # Martin Kosek <[email protected]> # Pavel Zuna <[email protected]> # # Copyright (C) 2010 Red Hat # see file 'COPYING' for use and warranty information # # 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 Fr...
h00dy/Diamond
refs/heads/master
src/collectors/nfs/test/testnfs.py
29
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch try: from cStringIO import StringIO except ImportError: ...
access-missouri/am-django-project
refs/heads/master
am/ls_importer/__init__.py
1
""" Import from Legiscan. """
dgellis90/nipype
refs/heads/master
nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py
1
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..utils import MRIsCalc def test_MRIsCalc_inputs(): input_map = dict(action=dict(argstr='%s', mandatory=True, position=-2, ), args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=T...
gtko/CouchPotatoServer
refs/heads/develop
libs/requests/packages/chardet/euctwprober.py
2993
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Rights Reserved. # # Con...
mikebenfield/scikit-learn
refs/heads/master
examples/plot_multilabel.py
236
# Authors: Vlad Niculae, Mathieu Blondel # License: BSD 3 clause """ ========================= Multilabel classification ========================= This example simulates a multi-label document classification problem. The dataset is generated randomly based on the following process: - pick the number of labels: n ...
jcfr/mystic
refs/heads/master
examples_UQ/TEST_surrogate_samples.py
1
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2009-2015 California Institute of Technology. # License: 3-clause BSD. The full license text is available at: # - http://trac.mystic.cacr.caltech.edu/project/mystic/browser/mystic/LICENSE DEBUG = False PER_AI = True ...
Tithen-Firion/youtube-dl
refs/heads/master
setup.py
8
#!/usr/bin/env python # coding: utf-8 from __future__ import print_function import os.path import warnings import sys try: from setuptools import setup, Command setuptools_available = True except ImportError: from distutils.core import setup, Command setuptools_available = False from distutils.spawn ...
umbrellaTech/pyaboleto
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- from distutils.core import setup setup( name='pyaboleto', packages=['pyaboleto'], # this must be the same as the name above version='0.1', description='O pyaboleto e um componente de boleto bancario em Python que oferece um conjunto de classes para gerar' ' os dad...
Apreche/Presentoh
refs/heads/master
utils/jinja2/testsuite/api.py
5
# -*- coding: utf-8 -*- """ jinja2.testsuite.api ~~~~~~~~~~~~~~~~~~~~ Tests the public API and related stuff. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import time import tempfile import unittest from jinja2.testsuite import JinjaTestCase ...
jgabriellima/mining
refs/heads/master
mining/db/backends/__init__.py
12133432
MandyBohm3/Mandy
refs/heads/master
py/openage/convert/__init__.py
12133432
genome/flow-core
refs/heads/master
flow/configuration/settings/__init__.py
12133432
gangadharkadam/v6_erp
refs/heads/master
erpnext/stock/doctype/item_attribute_value/__init__.py
12133432
dex4er/django
refs/heads/1.6.x
tests/inline_formsets/__init__.py
12133432
juanyaw/python
refs/heads/develop
cpython/Lib/lib2to3/fixes/fix_raise.py
203
"""Fixer for 'raise E, V, T' raise -> raise raise E -> raise E raise E, V -> raise E(V) raise E, V, T -> raise E(V).with_traceback(T) raise E, None, T -> raise E.with_traceback(T) raise (((E, E'), E''), E'''), V -> raise E(V) raise "foo", V, T -> warns about string exceptions CAVEATS:...
nhynes/neon
refs/heads/master
tests/test_mergebroadcast_layer.py
2
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana 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.o...
allotria/intellij-community
refs/heads/master
python/testData/joinLines/DictLCurly.py
83
a =<caret> { 'a': 1, 'b': 2 }
sandeepdsouza93/TensorFlow-15712
refs/heads/master
tensorflow/python/framework/errors_impl.py
28
# 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...
pombredanne/seqlearn
refs/heads/master
seqlearn/__init__.py
45
from ._version import __version__
suhe/odoo
refs/heads/master
addons/website_form/controllers/__init__.py
7372
import main
SebasSBM/django
refs/heads/master
tests/gis_tests/geogapp/models.py
336
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
tisnik/fabric8-analytics-common
refs/heads/master
dashboard/src/api.py
2
"""Module with class representing common API.""" import requests class Api: """Class representing common API.""" _API_ENDPOINT = 'api/v1' def __init__(self, url, token=None): """Set the API endpoint and store the authorization token if provided.""" self.url = Api.add_slash(url) s...
AmmsA/Githeat
refs/heads/master
test/test_interactive.py
1
""" Test suite for the interactive module. The script can be executed on its own or incorporated into a larger test suite. However the tests are run, be aware of which version of the module is actually being tested. If the library is installed in site-packages, that version takes precedence over the version in this pr...
TangXT/GreatCatMOOC
refs/heads/master
common/djangoapps/django_comment_common/models.py
4
import logging from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from student.models import CourseEnrollment from xmodule.modulestore.django import modulestore from xmodule.course_module import CourseDescripto...
RO-ny9/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/ctypes/test/test_cfuncs.py
52
# A lot of failures in these tests on Mac OS X. # Byte order related? import unittest from ctypes import * import _ctypes_test class CFunctions(unittest.TestCase): _dll = CDLL(_ctypes_test.__file__) def S(self): return c_longlong.in_dll(self._dll, "last_tf_arg_s").value def U(self): retu...
wetneb/dissemin
refs/heads/master
deposit/tests/test_protocol.py
2
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; either version 2 # of th...
edxnercel/edx-platform
refs/heads/master
openedx/core/djangoapps/course_groups/tests/helpers.py
77
""" Helper methods for testing cohorts. """ import factory from factory import post_generation, Sequence from factory.django import DjangoModelFactory import json from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.modulestore.django import modulestore from xmodule.modulestore import ModuleStore...
techtonik/wesnoth
refs/heads/master
scons/gettext.py
24
# vi: syntax=python:et:ts=4 from os.path import join import os from SCons.Builder import Builder from SCons.Util import WhereIs from config_check_utils import find_include def exists(): return True def generate(env): env.AppendENVPath("PATH", join(env["gettextdir"], "bin")) env["MSGFMT"] = WhereIs("msg...
pradyunsg/pip
refs/heads/update-to-libera
src/pip/_internal/operations/build/__init__.py
12133432
RandyLowery/erpnext
refs/heads/develop
erpnext/schools/doctype/student_attendance/__init__.py
12133432
purpleidea/macaronic-net
refs/heads/master
django/contrib/admindocs/__init__.py
12133432
popazerty/dvbapp2-gui
refs/heads/master
lib/python/Plugins/Extensions/Modem/__init__.py
12133432
christianurich/DynaMind-ToolBox
refs/heads/master
DynaMind-GDALModules/scripts/GDALModules/dm_import_landcover_geoscape.py
1
from pydynamind import * import gdal, osr from gdalconst import * import struct import numpy as np import compiler import paramiko import os import gc class DM_ImportLandCoverGeoscape(Module): display_name = "Import Landcover Geoscape" group_name = "Data Import and Export" def getHelpUrl(self): r...
iut-ibk/DynaMind-ToolBox
refs/heads/master
DynaMind-Performance-Assessment/scripts/DMPerformance/dm_wtp_extreme_heat.py
1
__author__ = 'christianurich' from pydynamind import * from scipy import random # agent_wtp(Region_ID,agent,'wtp_stream_high1') = 10.99824 + 0.3368328*agent_wtp(Region_ID,agent,'Bedroom') - 0.0334691*agent_wtp(Region_ID,agent,'Age') - 0.0765181*agent_wtp(Region_ID,agent,'Education'); class WTP_Extream_Heat_AU(Modu...
Hardtack/TypeConverter
refs/heads/master
setup.py
1
# -*- encoding: utf-8 -*- """TypeConverter ~~~~~~~~~~~~~~~~~ Quick and dirty python type converter. """ from setuptools import setup from typeconverter import (__version__ as version, __license__ as license, __author__ as author, __email__ as email) setup( name='TypeConverter', ve...
djaodjin/djaodjin-survey
refs/heads/master
survey/views/edit.py
1
# Copyright (c) 2019, DjaoDjin 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
yuanagain/seniorthesis
refs/heads/master
venv/lib/python2.7/site-packages/scipy/weave/examples/cast_copy_transpose.py
100
""" Cast Copy Tranpose is used in numpy LinearAlgebra.py to convert C ordered arrays to Fortran order arrays before calling Fortran functions. A couple of C implementations are provided here that show modest speed improvements. One is an "inplace" transpose that does an in memory transpose of an array...
lunafeng/django
refs/heads/master
tests/inspectdb/models.py
208
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.db import models class People(models.Model): name = models.CharField(max_length=255) parent = models.ForeignKey('self', models.CASCADE) class Message(models.Model): from_field = models.ForeignKey(People, models.CASCADE, db_co...
bob-the-hamster/commandergenius
refs/heads/sdl_android
project/jni/python/src/Demo/parser/test_parser.py
41
#! /usr/bin/env python # (Force the script to use the latest build.) # # test_parser.py import parser, traceback _numFailed = 0 def testChunk(t, fileName): global _numFailed print '----', fileName, try: ast = parser.suite(t) tup = parser.ast2tuple(ast) # this discards the first ...
wildermason/external_skia
refs/heads/dark-5.1
gm/rebaseline_server/compare_rendered_pictures_test.py
67
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test compare_rendered_pictures.py TODO(epoger): Create a command to update the expected results (in self._output_dir_expected) when appropriate. For now, you should: 1....
acsone/purchase-workflow
refs/heads/8.0
purchase_supplier_rounding_method/models/account_invoice_line.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2017 - Today: GRAP (http://www.grap.coop) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, models class AccountInvoiceLine(models.Model): _inherit = 'account.invoice.l...
okomestudio/moto
refs/heads/master
tests/test_kinesis/test_server.py
33
from __future__ import unicode_literals import json import sure # noqa import moto.server as server from moto import mock_kinesis ''' Test the different server responses ''' @mock_kinesis def test_list_streams(): backend = server.create_backend_app("kinesis") test_client = backend.test_client() res =...
jemekite/p2pool-deepcoin
refs/heads/master
nattraverso/portmapper.py
288
""" Generic NAT Port mapping interface. TODO: Example @author: Raphael Slinckx @copyright: Copyright 2005 @license: LGPL @contact: U{[email protected]<mailto:[email protected]>} @version: 0.1.0 """ __revision__ = "$id" from twisted.internet.base import BasePort # Public API def get_port_mapper(proto="TCP"): ...
jimmida/incubator-hawq
refs/heads/master
tools/bin/gppylib/util/san_utils.py
30
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # # Greenplum SAN related utility functions import os from gppylib.commands import unix class SanCmds(): INQ=None NAVISECCLI=None POWERMT=None STAT=None GP_MOUNT_AGENT=None MOUNT=None def __init__(self): ...
julython/julython.org
refs/heads/master
july/blog/models.py
1
from django.db import models from django.db.models import permalink from django.conf import settings class Blog(models.Model): title = models.CharField(max_length=100, unique=True) user = models.ForeignKey(settings.AUTH_USER_MODEL) slug = models.SlugField(max_length=100, unique=True) body = models.Te...
abhishekjairath/codeyard
refs/heads/master
commit/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py
167
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import re import sys from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll if windll is not None: winterm = WinTerm() def is_a_tty(stream): re...
bdang2012/taiga-back
refs/heads/master
tests/__init__.py
12133432
Vixionar/django
refs/heads/master
tests/swappable_models/tests.py
339
from __future__ import unicode_literals from swappable_models.models import Article from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core import management from django.test import TestCase, override_settings from django.utils.six import StringIO ...
amaas-fintech/amaas-core-sdk-python
refs/heads/master
tests/unit/csv_upload/assets/etf.py
1
import unittest import csv import random from amaasutils.random_utils import random_string from amaascore.csv_upload import Uploader class ETFUploaderTest(unittest.TestCase): def setUp(self): self.longMessage = True # Print complete error message on failure self.asset_manager_id = self.client_id...
fkolacek/FIT-VUT
refs/heads/master
bp-revok/python/lib/python2.7/idlelib/MultiStatusBar.py
90
from Tkinter import * class MultiStatusBar(Frame): def __init__(self, master=None, **kw): if master is None: master = Tk() Frame.__init__(self, master, **kw) self.labels = {} def set_label(self, name, text='', side=LEFT): if name not in self.labels: lab...
ryandougherty/mwa-capstone
refs/heads/heroku
MWA_Tools/build_lfiles/compare_compress.py
1
#!/usr/bin/python """A tool for comparing raw MWA data before and after compression. Randall Wayth. May 2014. """ import sys,pyfits,numpy def compare_compress(uncomp_filename, compressed_filename): """ Compare uncompressed and compressed data and make a report of maximum abs and relative difference. "...
ftomassetti/intellij-community
refs/heads/master
python/testData/copyPaste/IndentIncrease.dst.py
83
class A: def bar(self): pass <caret> def quux(self): pass
abaditsegay/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/findnocoding.py
64
#!/usr/bin/env python """List all those Python files that require a coding directive Usage: nocoding.py dir1 [dir2...] """ __author__ = "Oleg Broytmann, Georg Brandl" import sys, os, re, getopt # our pysource module finds Python source files try: import pysource except ImportError: # emulate the module wit...
PythonNut/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/tests/functional/base.py
293
import base64 import logging import os import unittest import urllib import urllib2 import urlparse import wptserve logging.basicConfig() here = os.path.split(__file__)[0] doc_root = os.path.join(here, "docroot") class Request(urllib2.Request): def __init__(self, *args, **kwargs): urllib2.Request.__init...
cpcloud/PyTables
refs/heads/develop
tables/node.py
1
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: 2005-02-11 # Author: Ivan Vilata i Balaguer - [email protected] # # $Id$ # ######################################################################## """PyTables nodes""" import warnings from ta...
buzztroll/unix-agent
refs/heads/master
src/dcm/agent/tests/utils/__init__.py
51
# # Copyright (C) 2014 Dell, 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 law or agreed to in wri...
ghislainp/iris
refs/heads/master
lib/iris/tests/unit/analysis/regrid/test_RectilinearRegridder.py
5
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris 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 l...
briney/abstar
refs/heads/master
docs/source/conf.py
1
# -*- coding: utf-8 -*- # # abstar documentation build configuration file, created by # sphinx-quickstart on Mon Apr 11 12:45:25 2016. # # 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. # # Al...
pakodekker/oceansar
refs/heads/master
oceansar/nrcs/__init__.py
1
""" ========================================= NRCS Models Module (:mod:`osiris.nrcs`) ========================================= This module includes a number of backscattering models. .. currentmodule:: osiris.nrcs RCS Models Available models ---------------- .. toctree:: :maxdepth: 1 .. automodul...
gnome-prototypes-team/gnome-music
refs/heads/master
gnomemusic/toolbar.py
1
# Copyright (c) 2013 Vadim Rutkovsky <[email protected]> # Copyright (c) 2013 Arnel A. Borja <[email protected]> # Copyright (c) 2013 Eslam Mostafa <[email protected]> # Copyright (c) 2013 Sai Suman Prayaga <[email protected]> # Copyright (c) 2013 Seif Lotfy <[email protected]> # Copyright (c) 2013 Guillaume Quinta...
kaizu/nurgle
refs/heads/master
gen/ecocyc.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # import csv # import copy # import os.path # import itertools import logging log_ = logging.getLogger(__name__) from enum import Enum, auto # from . import utils from . import _ecocyc __program__ = 'ecocyc.py' __version__ = '0.1' __author__ = 'Kazunari Kaizu' ECOCYC_L...
lcy-seso/models
refs/heads/develop
fluid/language_model/utils.py
2
import sys import time import numpy as np import paddle.fluid as fluid import paddle def to_lodtensor(data, place): """ convert to LODtensor """ seq_lens = [len(seq) for seq in data] cur_len = 0 lod = [cur_len] for l in seq_lens: cur_len += l lod.append(cur_len) flattened_data...
Orochimarufan/youtube-dl
refs/heads/master
youtube_dl/extractor/rmcdecouverte.py
20
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from .brightcove import BrightcoveLegacyIE from ..compat import ( compat_parse_qs, compat_urlparse, ) from ..utils import smuggle_url class RMCDecouverteIE(InfoExtractor): _VALID_URL = r'https?://rmcdecou...
pombredanne/inferno
refs/heads/master
inferno/lib/__init__.py
4
__version__ = '0.2.39'
tmkasun/Knnect
refs/heads/master
map_service/lib/SpatialUtils.py
1
from datetime import datetime class SpatialCons(object): DATE_TIME_FORMAT = "%Y-%m-%d %H:%M:%S" DATE_FORMAT = "%Y-%m-%d" START_TIME = "start_time" END_TIME = "end_time" class SpatialUtils(object): @staticmethod def validate_date(date): try: return datetime.strptime(date, ...
fmierlo/django-default-settings
refs/heads/master
release/1.6/project/defaults.py
9
SECRET_KEY = '01234567890123456789012345678901234567890123456789'
sorenh/cc
refs/heads/master
vendor/Twisted-10.0.0/doc/core/examples/pbbenchclient.py
23
from twisted.spread import pb from twisted.internet import defer, reactor from twisted.cred.credentials import UsernamePassword import time class PBBenchClient: hostname = 'localhost' portno = pb.portno calledThisSecond = 0 def callLoop(self, ignored): d1 = self.persp.callRemote("simple") ...
komsas/OpenUpgrade
refs/heads/master
addons/email_template/tests/__init__.py
121
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
yrik/django-filter
refs/heads/master
django_filters/tests/test_urls.py
4
from django.conf.urls.defaults import * from django_filters.tests.models import Book urlpatterns = patterns('', (r'^books/$', 'django_filters.views.object_filter', {'model': Book}), )
scalingdata/Impala
refs/heads/rocana-master
shell/ext-py/sqlparse-0.1.14/sqlparse/utils.py
99
''' Created on 17/05/2012 @author: piranna ''' import re try: from collections import OrderedDict except ImportError: OrderedDict = None if OrderedDict: class Cache(OrderedDict): """Cache with LRU algorithm using an OrderedDict as basis """ def __init__(self, maxsize=100): ...
dalegregory/odoo
refs/heads/8.0
addons/l10n_be_coda/wizard/__init__.py
439
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
sergei-maertens/django
refs/heads/master
tests/migrations/migrations_test_apps/lookuperror_a/migrations/0001_initial.py
381
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='A1', fields=[ ('id', models.AutoField(serialize...
b0ttl3z/SickRage
refs/heads/master
lib/unidecode/x07f.py
252
data = ( 'Zhui ', # 0x00 'Zi ', # 0x01 'Ke ', # 0x02 'Xiang ', # 0x03 'Jian ', # 0x04 'Mian ', # 0x05 'Lan ', # 0x06 'Ti ', # 0x07 'Miao ', # 0x08 'Qi ', # 0x09 'Yun ', # 0x0a 'Hui ', # 0x0b 'Si ', # 0x0c 'Duo ', # 0x0d 'Duan ', # 0x0e 'Bian ', # 0x0f 'Xian ', # 0x10 '...