repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
stormi/tsunami
refs/heads/master
src/primaires/supenr/convertisseurs/objet.py
1
# -*-coding:Utf-8 -* # Copyright (c) 2013 LE GOFF Vincent # 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 # lis...
zstackio/zstack-woodpecker
refs/heads/master
integrationtest/vm/simulator/dhcp_server_ip/test_stub_for_dhcp_ip.py
2
''' prepare resource for dhcp ip feature @author Antony WeiJiang ''' import zstackwoodpecker.operations.net_operations as net_ops import zstackwoodpecker.operations.resource_operations as res_ops import zstackwoodpecker.operations.deploy_operations as dep_ops import zstackwoodpecker.operations.vm_operations as vm_op...
tschalch/pyTray
refs/heads/master
src/test/unittest.py
1
import controller import wx import dataStructures.user_data import os, sys, random, traceback from gui.error_window import ErrorHandler # reroute the user config file dataStructures.user_data.configFile = dataStructures.user_data.apdir + "\\testuser.pyTray" # setup paths files = os.path.abspath(os.path.dirname(os.p...
vinta/albedo
refs/heads/master
src/main/python/cross_validate_als.py
1
# coding: utf-8 from pyspark import SparkConf from pyspark.ml import Pipeline from pyspark.ml.recommendation import ALS from pyspark.ml.tuning import CrossValidator from pyspark.ml.tuning import ParamGridBuilder from pyspark.sql import SparkSession from albedo_toolkit.common import load_raw_data from albedo_toolkit.c...
shekharshank/indices
refs/heads/master
benchmarks/parsec/client/configgen.py
1
import random import sys def gen_configs(test_count, max_comb, repeat): test_array = [] for t in range (test_count): test_array.append(str(t+1)) print test_array[t] for i in range (1,max_comb): for k in range (repeat-1): for t in range (test_count): print test_array[t] + "," + str(random.randint(1,te...
jeffchao/xen-3.3-tcg
refs/heads/master
tools/python/xen/xend/XendStorageRepository.py
6
#!/usr/bin/python #============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distribu...
cinfony/cinfony
refs/heads/master
cinfony/opsin.py
1
## Copyright (c) 2011, Noel O'Boyle ## All rights reserved. ## ## This file is part of Cinfony. ## The contents are covered by the terms of the BSD license ## which is included in the file LICENSE_BSD.txt. """ opsin - A Cinfony module for accessing OPSIN from CPython and Jython Global variables: opsin - the unde...
bhdouglass/remindor-common
refs/heads/master
remindor_common/constants.py
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2013 Brian Douglass bhdouglass@gmail.com # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Softwa...
yangqun/lily2-gem5
refs/heads/master
src/mem/slicc/ast/StateDeclAST.py
16
# Copyright (c) 2011 Advanced Micro Devices, 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...
xiaoguoai/ec-dev-swift
refs/heads/dev
test/unit/common/middleware/test_formpost.py
2
# Copyright (c) 2011 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 ...
rezasafi/spark
refs/heads/master
python/pyspark/__init__.py
10
# # 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...
vijayendrabvs/ssl-neutron
refs/heads/master
neutron/services/vpn/device_drivers/__init__.py
16
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013, Nachi Ueno, NTT I3, 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...
rwillmer/django
refs/heads/master
tests/apps/namespace_package_base/nsapp/apps.py
441
import os from django.apps import AppConfig from django.utils._os import upath class NSAppConfig(AppConfig): name = 'nsapp' path = upath(os.path.dirname(__file__))
irudayarajisawa/django-cms
refs/heads/develop
cms/south_migrations/0055_auto__del_field_page_publisher_state__del_field_page_published.py
63
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Page.publisher_state' db.delete_column(u'cms_page', 'pu...
bakerlover/imfo3180lab4
refs/heads/master
lib/werkzeug/testsuite/security.py
102
# -*- coding: utf-8 -*- """ werkzeug.testsuite.security ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the security helpers. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.securit...
stefanseefeld/qmtest
refs/heads/master
qm/test/classes/dg_test.py
2
######################################################################## # # File: dg_test.py # Author: Mark Mitchell # Date: 04/17/2003 # # Contents: # DGTest # # Copyright (c) 2003 by CodeSourcery, LLC. All rights reserved. # # For license terms see the file COPYING. # ########################################...
ohpistolpete/ColdSauce
refs/heads/master
bot/xkcdparser.py
36
from urllib2 import urlopen from json import loads from pickle import dump,load from CORE_DATA import no_absolute_paths def xkcd(link): try: filename = link[link.find("xkcd.com")+9:].replace("/","").replace("\\","") if no_absolute_paths: tiedosto = open("xkcdcache/"+filename,"r")...
CoolCloud/taiga-back
refs/heads/master
taiga/base/utils/json.py
15
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
Hani-K/H-Vitamin_trltedt
refs/heads/master
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
cc1-cloud/cc1
refs/heads/master
src/wi/views/user/farm.py
1
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
EmanueleCannizzaro/scons
refs/heads/master
testing/framework/TestUnit/__init__.py
3
__all__ = ['TAPTestRunner', 'TAPTestResult', 'run'] from .taprunner import TAPTestRunner, TAPTestResult from .cli import run
TomKita/ansible-modules-extras
refs/heads/devel
notification/jabber.py
17
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
EmokitAlife/EmokitVisualizer
refs/heads/master
tests/test_emokit.py
2
# -*- encoding: utf-8 -*- from emokit.emotiv import Emotiv def test_emotiv_no_headset(): try: emo_test = Emotiv() except Exception as ex: assert (ex.message == "Device not found") def test_import_hidapi(): hidapi_found = False try: import hidapi hidapi_found = True ...
mikeireland/chronostar
refs/heads/master
benchmarks/emcee_parallel.py
1
''' Parallelism tutorial copied from https://emcee.readthedocs.io/en/latest/tutorials/parallel/ credit: Dan Foreman-Mackey ''' import os from multiprocessing import cpu_count from multiprocessing import Pool import emcee import time import numpy as np import sys os.environ["OMP_NUM_THREADS"] = "1" print(emcee.__versio...
thientu/scikit-learn
refs/heads/master
sklearn/datasets/samples_generator.py
103
""" Generate samples of synthetic data sets. """ # Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel, # G. Louppe, J. Nothman # License: BSD 3 clause import numbers import array import numpy as np from scipy import linalg import scipy.sparse as sp from ..preprocessing import MultiLabelBin...
justathoughtor2/atomicApe
refs/heads/encaged
cygwin/lib/python2.7/site-packages/setuptools/archive_util.py
520
"""Utilities for extracting common archive formats""" __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", "UnrecognizedFormat", "extraction_drivers", "unpack_directory", ] import zipfile import tarfile import os import shutil import posixpath import contextlib from pkg_resourc...
duhzecca/cinder
refs/heads/master
cinder/volume/drivers/hitachi/hnas_backend.py
4
# Copyright (c) 2014 Hitachi Data Systems, 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 # # U...
normanmaurer/autobahntestsuite-maven-plugin
refs/heads/master
src/main/resources/twisted/trial/test/mockcustomsuite.py
59
# Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details """ Mock test module that contains a C{test_suite} method. L{runner.TestLoader} should load the tests from the C{test_suite}, not from the C{Foo} C{TestCase}. See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_test_suite}. """ ...
antoinecarme/pyaf
refs/heads/master
tests/croston/croston_prototype_2.py
1
# r example # y <- rpois(20,lambda=.3) # fcast <- croston(y) #> y # [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 # r result : # > fcast # Point Forecast # 21 0.180018 # > fcast$fitted # Time Series: # Start = 1 # End = 20 # Frequency = 1 # [1] NA 0.0000000 0.0000000 0.0000000 0.0000000 0.00000...
michaelpacer/scikit-image
refs/heads/master
skimage/viewer/canvastools/base.py
43
import numpy as np from matplotlib import lines __all__ = ['CanvasToolBase', 'ToolHandles'] def _pass(*args): pass class CanvasToolBase(object): """Base canvas tool for matplotlib axes. Parameters ---------- manager : Viewer or PlotPlugin. Skimage viewer or plot plugin object. on_m...
freedomtan/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/sparse_concat_op_test.py
24
# 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...
tropp/acq4
refs/heads/develop
acq4/devices/Manipulator/cameraModTemplate.py
1
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'cameraModTemplate.ui' # # Created: Tue Mar 31 21:04:22 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exc...
pulsar-chem/Pulsar-Core
refs/heads/master
lib/systems/l-aspartic_acid.py
1
import pulsar as psr def load_ref_system(): """ Returns l-aspartic_acid as found in the IQMol fragment library. All credit to https://github.com/nutjunkie/IQmol """ return psr.make_system(""" N -0.5386 -1.3898 0.9506 C 0.1294 -0.5973 -0.1082 C 1...
wisechengyi/pants
refs/heads/master
src/python/pants/rules/core/lint_test.py
1
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from abc import ABCMeta, abstractmethod from typing import Iterable, List, Tuple, Type from unittest.mock import Mock from pants.build_graph.address import Address from pants.engine.legac...
acsone/sale-workflow
refs/heads/8.0
setup/sale_line_quantity_properties_based/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
benmoran56/FightstickDisplay
refs/heads/master
pyglet/gl/glu_info.py
3
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
pombredanne/sortinghat
refs/heads/master
sortinghat/cmd/load.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2015 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
IOKP/kernel_asus_flo
refs/heads/kitkat
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
bsipocz/astroML
refs/heads/fetch_cnn_images
astroML/time_series/generate.py
2
import numpy as np from sklearn.utils import check_random_state def generate_power_law(N, dt, beta, generate_complex=False, random_state=None): """Generate a power-law light curve This uses the method from Timmer & Koenig [1]_ Parameters ---------- N : integer Number of equal-spaced time...
plotly/plotly.py
refs/heads/master
packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py
1
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scatter.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
jfunez/scielo-manager
refs/heads/master
scielomanager/journalmanager/migrations/0028_auto__chg_field_journal_previous_ahead_documents__chg_field_journal_cu.py
2
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Journal.previous_ahead_documents' db.alter_column('journalmanager_journal', 'previous_ah...
mdaniel/intellij-community
refs/heads/master
python/helpers/pydev/_pydev_bundle/pydev_log.py
26
import sys from _pydevd_bundle.pydevd_constants import DebugInfoHolder from _pydev_imps._pydev_saved_modules import threading currentThread = threading.currentThread import traceback WARN_ONCE_MAP = {} def stderr_write(message): sys.stderr.write(message) sys.stderr.write("\n") def debug(message): if D...
fnouama/intellij-community
refs/heads/master
python/testData/keywordCompletion/else.py
83
if True: a = 1 els<caret>
pbrady/sympy
refs/heads/master
sympy/core/numbers.py
5
from __future__ import print_function, division import decimal import fractions import math import re as regex from collections import defaultdict from .containers import Tuple from .sympify import converter, sympify, _sympify, SympifyError from .singleton import S, Singleton from .expr import Expr, AtomicExpr from ....
ankur-gupta91/horizon-net-ip
refs/heads/master
openstack_dashboard/dashboards/admin/volumes/volume_types/tables.py
8
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
itinko/mitro
refs/heads/master
browser-ext/third_party/firefox-addon-sdk/python-lib/cuddlefish/options_xul.py
34
# 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/. from xml.dom.minidom import Document VALID_PREF_TYPES = ['bool', 'boolint', 'integer', 'string', 'color', 'file', ...
javierwilson/whoswho
refs/heads/master
whoswho/migrations/0008_auto_20150917_2025.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('whoswho', '0007_auto_20150917_2018'), ] operations = [ migrations.AlterField( model_name='attendance', ...
martynovp/edx-platform
refs/heads/master
common/djangoapps/student/tests/test_auto_auth.py
88
from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User from django_comment_common.models import ( Role, FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_MODERATOR, FORUM_ROLE_STUDENT) from django_comment_common.utils import seed_permissions_roles from student.models i...
gengue/django
refs/heads/master
tests/nested_foreign_keys/models.py
166
from django.db import models class Person(models.Model): name = models.CharField(max_length=200) class Movie(models.Model): title = models.CharField(max_length=200) director = models.ForeignKey(Person) class Event(models.Model): pass class Screening(Event): movie = models.ForeignKey(Movie) ...
suneeth51/neutron
refs/heads/master
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
2
# Copyright 2011 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 ...
Teknologforeningen/teknologr.io
refs/heads/develop
teknologr/katalogen/admin.py
13848
from django.contrib import admin # Register your models here.
fpiot/mbed-ats
refs/heads/ats
workspace_tools/host_tests/hello_auto.py
122
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
Jdoing/autorunner
refs/heads/master
lib/util/parser.py
1
from optparse import OptionParser import sys import logging __all__ = ['ArgParser'] class ArgParser(object): def __init__(self): usage = '''usage: %prog [options] Examples: ./run.py -i tmp/local.ini -t performance.perf.DiskDrainRate ./run.py -i tmp/local.ini -t performance.perf.Di...
ericlifka/bfg-mmo
refs/heads/master
tools/build-sprite.py
1
import os import json import argparse from xml.dom.minidom import Document from PIL import Image class SparrowWriter(object): def __init__(self, maker): self.maker = maker self.document = Document() def gen_meta(self, document): maker = self.maker self.root = document.createE...
nanolearningllc/edx-platform-cypress
refs/heads/master
openedx/core/__init__.py
209
""" This is the root package for all core Open edX functionality. In particular, the djangoapps subpackage is the location for all Django apps that are shared between LMS and CMS. Note: the majority of the core functionality currently lives in the root common directory. All new Django apps should be created here inste...
austinvernsonger/metagoofil
refs/heads/master
hachoir_parser/archive/lzx.py
74
"""LZX data stream parser. Also includes a decompression function (slow!!) which can decompress LZX data stored in a Hachoir stream. Author: Robert Xiao Creation date: July 18, 2007 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, UInt32, Bit, Bits, PaddingBits, RawBytes, Parser...
markofu/scripts
refs/heads/master
nmap/nmap/zenmap/build/lib/zenmapGUI/higwidgets/higdialogs.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Inse...
ingadhoc/odoo-help
refs/heads/8.0
help_doc_stock/__openerp__.py
1
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
certik/sympy-oldcore
refs/heads/master
sympy/plotting/pyglet/__init__.py
1
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
elkingtonmcb/django
refs/heads/master
django/core/signals.py
684
from django.dispatch import Signal request_started = Signal(providing_args=["environ"]) request_finished = Signal() got_request_exception = Signal(providing_args=["request"]) setting_changed = Signal(providing_args=["setting", "value", "enter"])
mancoast/CPythonPyc_test
refs/heads/master
cpython/266_test_index.py
2
import unittest from test import test_support import operator from sys import maxint maxsize = test_support.MAX_Py_ssize_t minsize = -maxsize-1 class oldstyle: def __index__(self): return self.ind class newstyle(object): def __index__(self): return self.ind class TrapInt(int): def __index...
eclee25/flu-SDI-exploratory-age
refs/heads/master
scripts/create_fluseverity_figs_v2/functions_v2.py
1
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 4/24/14 ## Purpose: script of functions for data cleaning and processing to draw flu severity figures; supports figures in create_fluseverity_figs ###Command Line: would not be called from command l...
skipmodea1/plugin.video.botchamania
refs/heads/master
resources/lib/botchamania_play.py
1
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Imports # # the YDStreamExtractor needs to be before the future imports. Otherwise u get an 'check hostname' error. import YDStreamExtractor from future import standard_library standard_library.install_aliases() from builtins import str from builtins import object impo...
BT-fgarbely/l10n-switzerland
refs/heads/8.0
l10n_ch_states/models/__init__.py
16
from . import res_country
Kraxi/YTplaylist
refs/heads/master
venv/Lib/site-packages/pip/_vendor/html5lib/ihatexml.py
1727
from __future__ import absolute_import, division, unicode_literals import re import warnings from .constants import DataLossWarning baseChar = """ [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-...
LG-V10/CAF_msm_3.18.y
refs/heads/v10_LA.BF64.1.2.3_rb1.5
tools/perf/util/setup.py
2079
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
jta/udprecv
refs/heads/master
setup.py
1
#!/usr/bin/env python import sys import os try: from setuptools import setup except ImportError: from distutils.core import setup if sys.version_info < (2,5): raise NotImplementedError("Sorry, you need at least Python 2.5 or Python 3.x to use udprecv.") import udprecv setup(name='udprecv', version=u...
prman-pixar/RenderManForBlender
refs/heads/master
rman_bl_nodes/rman_bl_nodes_sockets.py
2
import bpy from bpy.props import * from ..rfb_utils import shadergraph_utils from ..rfb_utils import draw_utils # update node during ipr for a socket default_value def update_func(self, context): # check if this prop is set on an input node = self.node if hasattr(self, 'node') else self __CYCLES_GROUP_NODES__...
ccomb/OpenUpgrade
refs/heads/master
openerp/addons/openupgrade_records/model/analysis_wizard.py
16
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module Copyright (C) 2012-2014 OpenUpgrade community # https://launchpad.net/~openupgrade-committers # # Contributors: # Therp BV <http://therp.nl> # ...
ad-m/pru
refs/heads/master
pru/config/common.py
1
# -*- coding: utf-8 -*- """ Django settings for pru project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.jo...
jimbobhickville/taskflow
refs/heads/master
taskflow/persistence/backends/sqlalchemy/alembic/versions/3162c0f3f8e4_add_revert_results_and_revert_failure_.py
4
# -*- coding: utf-8 -*- # Copyright (C) 2015 Yahoo! 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...
SmartXiaoMing/clean_openwrt_sdk
refs/heads/master
staging_dir/host/lib/scons-2.1.0/SCons/CacheDir.py
21
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # 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 # with...
iuliat/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/test_limits.py
7
# Copyright 2011 OpenStack Foundation # 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 requ...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
plugin.video.SportsDevil/lib/utils/drench.py
14
""" JavaScript encryption module ver. 2.0 by Daniel Rench Based on existing code: Copyright (c) 2003 by Andre Mueller. Init of blowfish constants with a function (init/backup errors) Copyright (c) 2003 by Rainer Wollmann This Object is open source. You can redistribute it and/or modify it under the terms of th...
glennw/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/testing/io_/test_saferepr.py
162
# -*- coding: utf-8 -*- from __future__ import generators import py import sys saferepr = py.io.saferepr class TestSafeRepr: def test_simple_repr(self): assert saferepr(1) == '1' assert saferepr(None) == 'None' def test_maxsize(self): s = saferepr('x'*50, maxsize=25) assert l...
OriHoch/Open-Knesset
refs/heads/master
laws/helpers.py
5
# -*- coding: utf-8 -* from laws.enums import VOTE_TYPES def resolve_vote_type_by_title(title): if type(title) == str: transform_func = str.decode else: # its already unicode, do nothing transform_func = lambda x, y: x for vtype, vtype_prefix in VOTE_TYPES.items(): if transform_fu...
jumitche/libstoragemgmt
refs/heads/master
tools/lsmcli/data_display.py
5
# Copyright (C) 2014 Red Hat, Inc. # (C) Copyright 2017 Hewlett Packard Enterprise Development LP # This library 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 2.1 of the License, or a...
hongguangguo/shogun
refs/heads/master
examples/undocumented/python_modular/graphical/converter_sobi_bss.py
26
""" Blind Source Separation using the SOBI Algorithm with Shogun Based on the example from scikit-learn http://scikit-learn.org/ Kevin Hughes 2013 """ import numpy as np import pylab as pl from modshogun import RealFeatures from modshogun import SOBI # Generate sample data np.random.seed(0) n_samples = 2000 time...
andrewhart098/Lean
refs/heads/master
Algorithm.Python/BasicTemplateFuturesConsolidationAlgorithm.py
2
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
paradisecr/ONOS-OXP
refs/heads/master
tools/test/scenarios/bin/create-flow.py
22
#! /usr/bin/env python import requests from requests.auth import HTTPBasicAuth import sys if len(sys.argv) != 6: print "usage: create-flow onos-node name device in-port out-port" sys.exit(1) node = sys.argv[1] name = sys.argv[2] device = sys.argv[3] inPort = sys.argv[4] outPort = sys.argv[5] flowJsonTemp...
nikhil16242/Prometheus_kernel_golf
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
vivsh/django-ginger
refs/heads/master
ginger/scripts/templates/project_templates/project_name/registration/views.py
6445
from django.shortcuts import render # Create your views here.
mrquim/mrquimrepo
refs/heads/master
repo/script.xbmcbackup/resources/lib/dropbox/common.py
4
# -*- coding: utf-8 -*- # Auto-generated by Stone, do not modify. # flake8: noqa # pylint: skip-file try: from . import stone_validators as bv from . import stone_base as bb except (SystemError, ValueError): # Catch errors raised when importing a relative module when not in a package. # This makes testi...
smartczm/python-learn
refs/heads/master
Old-day01-10/s13-day3/if_else.py
1
#!/usr/bin/env python3.5 # -*- coding: utf-8 -*- # Author: ChenLiang # 三元运算(三目运算) if else的简写 if 1 == 1: name = 'admin' else: name = 'SB' print(name) # 如果1==1成立,让if前面的值name=admin, # 否则让if前面的变量name=SB name = 'admin' if 1 == 1 else 'SB' print(name) # lambda的表达式 def f1(a1): return a1 + 100 ret1 = f1(10) ...
akaihola/django
refs/heads/master
tests/regressiontests/admin_scripts/custom_templates/project_template/manage.py
738
# The manage.py of the {{ project_name }} test project # template context: project_name = '{{ project_name }}' project_directory = '{{ project_directory }}' secret_key = '{{ secret_key }}'
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/ship/attachment/weapon/xwing_weapon_pos_s02_1.py
85615
import sys def setup(core, object): return
etherkit/OpenBeacon2
refs/heads/master
client/linux-arm/venv/lib/python3.6/site-packages/pip/utils/glibc.py
350
from __future__ import absolute_import import re import ctypes import platform import warnings def glibc_version_string(): "Returns glibc version string, or None if not using glibc." # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the retur...
varunagrawal/azure-services
refs/heads/master
varunagrawal/site-packages/django/utils/simplejson/encoder.py
430
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', ...
pkoutsias/SickRage
refs/heads/master
lib/subliminal/converters/legendastv.py
16
# -*- coding: utf-8 -*- from babelfish import LanguageReverseConverter from ..exceptions import ConfigurationError class LegendasTvConverter(LanguageReverseConverter): def __init__(self): self.from_legendastv = {1: ('por', 'BR'), 2: ('eng',), ...
stwunsch/gnuradio
refs/heads/master
gr-pager/python/pager/qa_pager.py
57
#!/usr/bin/env python # # Copyright 2004,2006,2010 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 ...
tictakk/servo
refs/heads/ticbranch
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/abort_handshake_wsh.py
465
# Copyright 2012, 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 f...
katharh/ncclient
refs/heads/master
examples/nxosapi.py
13
#! /usr/bin/env python2.6 # # Connect to the NETCONF server passed on the command line and # display their capabilities. This script and the following scripts # all assume that the user calling the script is known by the server # and that suitable SSH keys are in place. For brevity and clarity # of the examples, we omi...
newrocknj/horizon
refs/heads/master
openstack_dashboard/test/test_plugins/panel_group_config/_10_admin_add_panel_group.py
124
# The name of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'plugin_panel_group' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = 'Plugin Panel Group' # The name of the dashboard the PANEL_GROUP associated with. Required. PANEL_GROUP_DASHBOARD = 'admin'
wyc/django
refs/heads/master
django/utils/html_parser.py
348
import re import sys from django.utils import six from django.utils.six.moves import html_parser as _html_parser current_version = sys.version_info use_workaround = current_version < (2, 7, 3) try: HTMLParseError = _html_parser.HTMLParseError except AttributeError: # create a dummy class for Python 3.5+ whe...
gerrive/horizon
refs/heads/master
openstack_dashboard/dashboards/project/firewalls/forms.py
9
# Copyright 2013, Big Switch Networks, 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...
AViisiion/namebench
refs/heads/master
nb_third_party/dns/rdtypes/ANY/GPOS.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
chriso/gauged
refs/heads/master
gauged/utilities.py
1
""" Gauged https://github.com/chriso/gauged (MIT Licensed) Copyright 2014 (c) Chris O'Hara <cohara87@gmail.com> """ from time import time from datetime import datetime from sys import builtin_module_names IS_PYPY = '__pypy__' in builtin_module_names def to_bytes(value): """Get a byte array representing the valu...
towerjoo/DjangoNotes
refs/heads/master
Django-1.5.1/django/contrib/gis/forms/__init__.py
518
from django.forms import * from django.contrib.gis.forms.fields import GeometryField
Sing-Li/go-buildpack
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/pstats.py
117
"""Class for printing reports on profiled python code.""" # Written by James Roskind # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # Copyright Disney Enterprises, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement # # Licensed under t...
clouserw/olympia
refs/heads/master
apps/addons/tests/test_search.py
2
from nose.tools import eq_ import amo.tests from addons.models import (Addon, attach_categories, attach_tags, attach_translations) from addons.search import extract class TestExtract(amo.tests.TestCase): fixtures = ['base/apps', 'base/users', 'base/addon_3615'] def setUp(self): ...