repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Shimejing/linux
refs/heads/master
Documentation/target/tcm_mod_builder.py
337
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
BigBrother1984/android_external_chromium_org
refs/heads/kitkat
build/android/pylib/device_stats_monitor.py
31
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utilities for iotop/top style profiling for android.""" import collections import json import os import subprocess import sys import urllib import c...
MarvinHerzog/Trgovina
refs/heads/master
test.py
1
from bottle import * import sqlite3 import hashlib baza = "aaa.db" secret = "to skrivnost je zelo tezko uganiti 1094107c907cw982982c42" baza = sqlite3.connect(baza, isolation_level=None) c = baza.cursor() c.execute('''CREATE TABLE IF NOT EXISTS uporabnik ( username TEXT PRIMARY KEY, password TEXT NOT NULL, ime...
zarboz/Monarudo_M7_port
refs/heads/zarboz
arm-cortex_a15-linux-gnueabi/arm-cortex_a15-linux-gnueabi/debug-root/usr/share/gdb/python/gdb/command/explore.py
137
# GDB 'explore' command. # Copyright (C) 2012-2013 Free Software Foundation, Inc. # 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 late...
bratsche/Neutron-Drive
refs/heads/master
google_appengine/lib/django_1_3/tests/regressiontests/admin_validation/models.py
92
""" Tests of ModelAdmin validation logic. """ from django.db import models class Album(models.Model): title = models.CharField(max_length=150) class Song(models.Model): title = models.CharField(max_length=150) album = models.ForeignKey(Album) original_release = models.DateField(editable=False) ...
jameslegg/boto
refs/heads/develop
boto/gs/cors.py
88
# Copyright 2012 Google Inc. # # 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, dis- # trib...
nthien/pulp
refs/heads/master
server/test/unit/server/db/test_fields.py
7
import unittest from datetime import datetime from mongoengine import ValidationError from pulp.common import dateutils from pulp.server.db import fields class TestCustomFields(unittest.TestCase): def test_iso8601_string_field(self): iso8601_field = fields.ISO8601StringField() valid = dateutils...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/numpy/matrixlib/tests/test_multiarray.py
30
import numpy as np from numpy.testing import * class TestView(TestCase): def test_type(self): x = np.array([1,2,3]) assert(isinstance(x.view(np.matrix),np.matrix)) def test_keywords(self): x = np.array([(1,2)],dtype=[('a',np.int8),('b',np.int8)]) # We must be specific about the...
bassijtsma/chatbot
refs/heads/master
yowsup/layers/protocol_media/protocolentities/message_media_downloadable.py
45
from .message_media import MediaMessageProtocolEntity from yowsup.common.tools import WATools import mimetypes import os class DownloadableMediaMessageProtocolEntity(MediaMessageProtocolEntity): ''' <message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}"...
eonpatapon/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/contrib/test_extended_availability_zone.py
47
# 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...
ax003d/openerp
refs/heads/master
openerp/modules/loading.py
10
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
Zanzibar82/plugin.video.pelisalacarta_ui.pureita
refs/heads/master
servers/vodlocker.py
6
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para vodlocker # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core imp...
mensler/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/netapp_e_amg.py
63
#!/usr/bin/python # (c) 2016, NetApp, 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 your option) any later version. ...
campbe13/openhatch
refs/heads/master
vendor/packages/python-openid/openid/message.py
146
"""Extension argument processing code """ __all__ = ['Message', 'NamespaceMap', 'no_default', 'registerNamespaceAlias', 'OPENID_NS', 'BARE_NS', 'OPENID1_NS', 'OPENID2_NS', 'SREG_URI', 'IDENTIFIER_SELECT'] import copy import warnings import urllib from openid import oidutil from openid import kvf...
eneldoserrata/marcos_openerp
refs/heads/master
addons/account/wizard/account_report_common_journal.py
56
# -*- 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...
OpenWhere/go-mongo-backup
refs/heads/develop
lambda/mongo-backup/requests/packages/urllib3/exceptions.py
196
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
thedrow/faker
refs/heads/master
faker/providers/profile/en_US/__init__.py
22
from .. import Provider as ProfileProvider class Provider(ProfileProvider): pass
ludwigkraatz/django-external-frontend
refs/heads/master
external_frontend/storage/__init__.py
1
#from ..settings import widget_settings #from django.utils.builder import import os import shutil from ..settings import settings as externalFrontendSettings from ..models import SourceVersion import inspect from django.core.files.base import ContentFile _virtual_storage = {} class Storage(object): """ the St...
DouglasLeeTucker/DECam_PGCM
refs/heads/master
python/paramFile.py
1
# Reads first 2 columns from a whitespace-delimited text file # into a python dictionary, taking the 1st column as the # keyword and the 2nd column as the value for that keyword. # Lines having '#' as the first character and lines having # fewer than 2 whitespace-delimited columns are ignored. # # WARNING: all v...
loongson-community/EFI-MIPS
refs/heads/master
ToolKit/cmds/python/Lib/encodings/latin_1.py
15
""" Python 'latin-1' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. ...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/huurton.py
85615
import sys def setup(core, object): return
yukoba/sympy
refs/heads/master
examples/galgebra/mv_setup_options.py
72
#!/usr/bin/env python from __future__ import print_function from sympy import symbols from sympy.galgebra import MV from sympy.galgebra import enhance_print, Get_Program, Print_Function def MV_setup_options(): Print_Function() (e1, e2, e3) = MV.setup('e_1 e_2 e_3', '[1,1,1]') v = MV('v', 'vector') p...
lgarren/spack
refs/heads/develop
var/spack/repos/builtin/packages/libxdamage/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, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
weka-io/boto
refs/heads/develop
boto/glacier/utils.py
153
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
ashang/calibre
refs/heads/master
src/chardet/langhebrewmodel.py
235
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
linktlh/Toontown-journey
refs/heads/master
toontown/suit/Suit.py
1
from direct.actor import Actor from otp.avatar import Avatar import SuitDNA from toontown.toonbase import ToontownGlobals from pandac.PandaModules import * from toontown.battle import SuitBattleGlobals from toontown.nametag import NametagGlobals from direct.task.Task import Task from toontown.battle import BattleProps ...
ladybug-analysis-tools/honeybee-grasshopper
refs/heads/master
plugin/src/dynblindschd_node.py
3
# assign inputs _sensor, _blindCombs_, _logic_, data_ = IN blindStates = blindStIndex = illumTotal = illumDirect = success = None import copy if _sensor: sensor = _sensor # print the details to help user set up the combination print(sensor.details) if _logic_: logic = compile('r...
pombredanne/readthedocs.org
refs/heads/master
readthedocs/rtd_tests/mocks/environment.py
1
# pylint: disable=missing-docstring from __future__ import absolute_import from builtins import object import mock class EnvironmentMockGroup(object): """Mock out necessary environment pieces""" def __init__(self): self.patches = { 'popen': mock.patch('subprocess.Popen'), 'pr...
xuxiao19910803/edx-platform
refs/heads/master
common/test/acceptance/pages/lms/discussion.py
27
from contextlib import contextmanager from bok_choy.javascript import wait_for_js from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, Promise from .course_page import CoursePage class DiscussionPageMixin(object): def is_ajax_finished(self): return self.browser.execute...
cellsrg/LOD-table-annotator
refs/heads/master
jython/Lib/site-packages/pip-9.0.1-py2.7.egg/pip/_vendor/appdirs.py
327
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
Changaco/oh-mainline
refs/heads/master
vendor/packages/Jinja2/jinja2/visitor.py
1401
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
EchO-KID/google-breakpad
refs/heads/master
src/testing/gtest/test/gtest_list_tests_unittest.py
1068
#!/usr/bin/env python # # Copyright 2006, 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...
i3visio/osrframework
refs/heads/master
osrframework/wrappers/steamcommunity.py
1
################################################################################ # # Copyright 2015-2020 Félix Brezo and Yaiza Rubio # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwa...
CXQERP/ODOOERP
refs/heads/master
addons/stock_account/wizard/stock_valuation_history.py
22
from openerp import tools from openerp.osv import fields, osv from openerp.tools.translate import _ class wizard_valuation_history(osv.osv_memory): _name = 'wizard.valuation.history' _description = 'Wizard that opens the stock valuation history table' _columns = { 'choose_date': fields.boolean('C...
hlin117/statsmodels
refs/heads/master
statsmodels/sandbox/__init__.py
40
'''This is sandbox code '''
Marcello-Sega/pytim
refs/heads/master
pytim/chacon_tarazona.py
2
#!/usr/bin/python # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 """ Module: chacon_tarazona ======================= """ from __future__ import print_function import numpy as np from . import utilities from .surface import SurfaceFlatI...
oneminot/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg04-sampler.lv2/waflib/Tools/compiler_cxx.py
343
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,imp,types from waflib.Tools import ccroot from waflib import Utils,Configure from waflib.Logs import debug cxx_compiler={'win32':['msvc','g++'],'cygwin':['g++'],...
lmcinnes/umap
refs/heads/master
umap/umap_.py
1
# Author: Leland McInnes <leland.mcinnes@gmail.com> # # License: BSD 3 clause from __future__ import print_function import locale from warnings import warn import time from scipy.optimize import curve_fit from sklearn.base import BaseEstimator from sklearn.utils import check_random_state, check_array from sklearn.uti...
iradul/phantomjs-clone
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py
125
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bastir85/django-chartit
refs/heads/master
chartit/models.py
6
# Nothing here. But don't delete. # This file is needed to make this folder a django app!
8l/barrelfish
refs/heads/master
tools/harness/results.py
10
########################################################################## # Copyright (c) 2009, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092...
ncullen93/pyBN
refs/heads/master
pyBN/__init__.py
1
from pyBN.classes import * from pyBN.classification import * from pyBN.inference import * from pyBN.io import * from pyBN.learning import * from pyBN.plotting import * from pyBN.utils import *
felipenaselva/felipe.repository
refs/heads/master
script.module.urlresolver/lib/urlresolver/lib/pyaes/aes.py
31
#@PydevCodeAnalysisIgnore # The MIT License (MIT) # # Copyright (c) 2014 Richard Moore # # 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 ...
Klaudit/livestreamer
refs/heads/develop
src/livestreamer_cli/packages/shutil_backport.py
25
"""This is a backport of shutil.get_terminal_size from Python 3. The original implementation is in C, but here we use the ctypes and fcntl modules to create a pure Python version of os.get_terminal_size. """ import os import struct import sys from collections import namedtuple terminal_size = namedtuple("terminal_s...
Vayne-Lover/Effective
refs/heads/master
Python/Learn Python The Hard Way/ex12.py
1
# -*- coding: utf-8 -*- age = raw_input("How old are you? ") height = raw_input("How tall are you? ") weight = raw_input("How much do you weigh? ") print "So, you're %r old, %r tall and %r heavy." % ( age, height, weight) print "So, you're %s old, %s tall and %s heavy." % ( age, height, weight) #age = inp...
jithinbp/pslab-desktop-apps
refs/heads/development
psl_res/GUI/__init__.py
1
import os,numbers os.environ['QT_API'] = 'pyqt' import sip sip.setapi("QString", 2) sip.setapi("QVariant", 2)
masterDev1985/fabric
refs/heads/master
bddtests/msp/mspconfig_pb2.py
2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: msp/mspconfig.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as ...
haniehrajabi/ryu
refs/heads/master
ryu/services/protocols/bgp/info_base/rtc.py
52
# Copyright (C) 2014 Nippon Telegraph and Telephone 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
Teamxrtc/webrtc-streaming-node
refs/heads/master
examples/xrtc-meet/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
2479
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the xcode.py file. """ import gyp.generator.xcode as xcode import unittest import sys class TestEscapeXcodeDefine(unit...
nguyentu1602/numpy
refs/heads/master
numpy/core/tests/test_half.py
133
from __future__ import division, absolute_import, print_function import platform import numpy as np from numpy import uint16, float16, float32, float64 from numpy.testing import TestCase, run_module_suite, assert_, assert_equal, \ dec def assert_raises_fpe(strmatch, callable, *args, **kwargs): try: ...
nkgilley/home-assistant
refs/heads/dev
homeassistant/components/danfoss_air/switch.py
21
"""Support for the for Danfoss Air HRV sswitches.""" import logging from pydanfossair.commands import ReadCommand, UpdateCommand from homeassistant.components.switch import SwitchEntity from . import DOMAIN as DANFOSS_AIR_DOMAIN _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/dressed_tatooine_lilas_dinhint.py
85615
import sys def setup(core, object): return
vitorio/bite-project
refs/heads/master
deps/gdata-python-client/tests/gdata_tests/contacts/live_client_test.py
39
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
yanheven/console
refs/heads/master
openstack_dashboard/dashboards/project/containers/panel.py
19
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
teamfx/openjfx-9-dev-rt
refs/heads/master
modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/common/system/zipfileset.py
167
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
ffancellu/ucca
refs/heads/master
scripts/get_targets.py
2
"""Identifies and categorizes words according to Dixon's verb list.""" import pickle import sys from ucca import scenes def main(): dbfile = sys.argv[1] with open(dbfile, 'rb') as f: passages = pickle.load(f) nouns = set() for p in passages: sc = scenes.extract_possible_scenes(p) ...
rahul-c1/scikit-learn
refs/heads/master
examples/applications/plot_outlier_detection_housing.py
21
""" ==================================== Outlier detection on a real data set ==================================== This example illustrates the need for robust covariance estimation on a real data set. It is useful both for outlier detection and for a better understanding of the data structure. We selected two sets o...
kost/volatility
refs/heads/master
volatility/plugins/linux/pstree.py
50
# This file is part of Volatility. # Copyright (C) 2007-2013 Volatility Foundation # # Volatility 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 late...
ChronoMonochrome/android_external_chromium_org
refs/heads/cm-11.0
build/mac/tweak_info_plist.py
25
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Xcode supports build variable substitutions and CPP; sadly, that doesn't work # because: # # 1. Xcode wants to do the Info.pli...
akumar21NCSU/servo
refs/heads/master
tests/wpt/harness/wptrunner/wptrunner.py
38
# 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 __future__ import unicode_literals import json import os import sys import environment as env import products imp...
v-legoff/pa-poc3
refs/heads/master
src/command/create/project/__init__.py
1
# 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 # list of conditions and th...
vguitar/vguitar
refs/heads/master
thirdparty/freetype/src/tools/docmaker/formatter.py
109
# # formatter.py # # Convert parsed content blocks to a structured document (library file). # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing ...
easmetz/inasafe
refs/heads/develop
safe/common/utilities.py
3
# coding=utf-8 """Utilities for InaSAFE """ import os import sys import numpy import zipfile import platform from datetime import date import getpass from tempfile import mkstemp from subprocess import PIPE, Popen import ctypes from numbers import Integral import math import colorsys # pylint: disable=unused-import fro...
reza-ryte-club/firefox-ios
refs/heads/master
scripts/xliff-cleanup.py
43
#!/usr/bin/env python # # xliff-cleanup.py <files> # # 1. Remove all <file> sections that we do not care about. We only care about the # the one for our main app and those for our extensions. # # 2. Look at all remaining <file> sections and remove those strings that should not # be localized. Currently that ...
haad/ansible
refs/heads/devel
lib/ansible/modules/network/aos/aos_logical_device.py
15
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
dasdgw/android_kernel_kobo_cardhu
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
krizhanovsky/linux-3.10.10-sync_sockets
refs/heads/master
Documentation/target/tcm_mod_builder.py
2358
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
kutenai/django
refs/heads/master
tests/i18n/models.py
451
from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class TestModel(models.Model): text = models.CharField(max_length=10, default=_('Anything')) class Company(models.Model): name = models.CharField(max_length=50) date_added = models.DateTim...
pipsiscool/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg04-sampler.lv2/waflib/Tools/suncc.py
134
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Utils from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_scc(conf): v=conf.env cc=None if v['CC']:cc=v['CC'] ...
Qalthos/ansible
refs/heads/devel
lib/ansible/modules/windows/win_acl.py
85
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Phil Schwartz <schwartzmx@gmail.com> # Copyright: (c) 2015, Trond Hindenes # Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'m...
hkawasaki/kawasaki-aio8-0
refs/heads/gacco2/master
common/lib/calc/calc/functions.py
279
""" Provide the mathematical functions that numpy doesn't. Specifically, the secant/cosecant/cotangents and their inverses and hyperbolic counterparts """ import numpy # Normal Trig def sec(arg): """ Secant """ return 1 / numpy.cos(arg) def csc(arg): """ Cosecant """ return 1 / nump...
nvoron23/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/gdal/srs.py
219
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
wargo32/PolishCoin
refs/heads/master
contrib/seeds/makeseeds.py
29
#!/usr/bin/env python # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 337600 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = set([ "130.211.129.106", "178.63.107.226", "83.81.1...
ryanlerch/pkgdb2
refs/heads/master
tests/test_flask_ui_collections.py
7
# -*- coding: utf-8 -*- # # Copyright © 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2, or (at your option) any later # version. This program is distributed...
LePastis/pyload
refs/heads/stable
module/plugins/hoster/Keep2ShareCc.py
6
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class Keep2ShareCc(SimpleHoster): __name__ = "Keep2ShareCc" __type__ = "hoster" __version__ = "0.24" __status__...
JohnLZeller/dd-agent
refs/heads/master
checks/metric_types.py
35
class MetricTypes(object): GAUGE = 'gauge' COUNTER = 'counter' RATE = 'rate' COUNT = 'count'
chicagopython/chipy.org
refs/heads/dependabot/pip/django-2.2.24
manage.py
4
#!/usr/bin/env python import os, sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "chipy_org.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
bqbn/addons-server
refs/heads/master
src/olympia/amo/tasks.py
3
import datetime from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail import EmailMessage, EmailMultiAlternatives from django.utils import translation import requests from waffle import switch_is_active import olympia.core.logger ...
KevZho/twitchvision
refs/heads/master
main.py
1
import urllib import httplib2 import webapp2 import json class GetCode(webapp2.RequestHandler): def get(self): h = Http() data = dict(client_id="djqqyosp3o6vfgfnfbnsa073lzoq5ee", grant_type="authorixation_code", redirect_uri="http://twitchvision.appengine.com/play/", code=$_GET["code"]) return json.loads(urllib...
michelts/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/auth/create_superuser.py
745
""" Create a superuser from the command line. Deprecated; use manage.py createsuperuser instead. """ if __name__ == "__main__": from django.core.management import call_command call_command("createsuperuser")
double-y/django
refs/heads/master
django/views/decorators/vary.py
586
from functools import wraps from django.utils.cache import patch_vary_headers from django.utils.decorators import available_attrs def vary_on_headers(*headers): """ A view decorator that adds the specified headers to the Vary header of the response. Usage: @vary_on_headers('Cookie', 'Accept-langu...
dpshelio/scikit-image
refs/heads/master
skimage/morphology/tests/test_grey.py
20
import os.path import numpy as np from numpy import testing from scipy import ndimage as ndi from skimage import data_dir, img_as_uint from skimage.morphology import grey, selem from skimage._shared._warnings import expected_warnings lena = np.load(os.path.join(data_dir, 'lena_GRAY_U8.npy')) bw_lena = lena > 100 ...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/network/cnos/cnos_command.py
37
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) 2017 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # GNU General Public License v3.0+ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE...
yuanzhao/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0822.py
12
#!/usr/bin/env python """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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...
IRI-Research/django
refs/heads/master
django/core/serializers/__init__.py
23
""" Interfaces for serializing Django objects. Usage:: from django.core import serializers json = serializers.serialize("json", some_queryset) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIALIZATION_MODULES = { ...
mujiansu/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_multibytecodec.py
56
#!/usr/bin/env python # # test_multibytecodec.py # Unit test for multibytecodec itself # from test import test_support from test import test_multibytecodec_support from test.test_support import TESTFN import unittest, StringIO, codecs, sys, os import _multibytecodec ALL_CJKENCODINGS = [ # _codecs_cn 'gb2312', '...
EmanueleCannizzaro/scons
refs/heads/master
test/MSVS/vs-14.0-scc-legacy-files.py
1
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 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 # without limitation the rights to us...
divegeek/keyczar
refs/heads/master
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/pdftex.py
19
"""SCons.Tool.pdftex Tool-specific initialization for pdftex. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # P...
bmoar/ansible
refs/heads/devel
lib/ansible/plugins/filter/core.py
59
# (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
jolyonb/edx-platform
refs/heads/master
openedx/core/djangoapps/schedules/config.py
2
""" Contains configuration for schedules app """ from __future__ import absolute_import from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlag, WaffleFlagNamespace WAFFLE_FLAG_NAMESPACE = WaffleFlagNamespace(name=u'schedules') CREATE_SCHEDULE_WAFFLE_FLAG = CourseWaffleFlag( waffle_namespac...
nortd/bomfu
refs/heads/master
boilerplate/lib/tests.py
23
''' Run the tests using testrunner.py script in the project root directory. Usage: testrunner.py SDK_PATH TEST_PATH Run unit tests for App Engine apps. SDK_PATH Path to the SDK installation TEST_PATH Path to package containing test modules Options: -h, --help show this help message and exit ''' import unitt...
Jgarcia-IAS/SITE
refs/heads/master
addons/crm_partner_assign/__init__.py
364
# -*- 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...
frankyrumple/ope
refs/heads/master
admin_app/gluon/fileutils.py
22
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) File operations --------------- """ import storage import os import re import tarfile import glob im...
NullSoldier/django
refs/heads/master
django/contrib/gis/geos/geometry.py
216
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ from __future__ import unicode_literals import json from ctypes import addressof, byref, c_double from django.contrib.gis import gdal from django.contrib.gis.geometry.regex import hex_regex, json_regex, wkt_...
wick2o/stPepper
refs/heads/master
server/utils/zip_results.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import zipfile try: import argparse except ImportError: print "Missing needed module: easy_install argparse" sys.exit() def setup(): parser = argparse.ArgumentParser() parser.add_argument('-o', '--outzip', action='store', dest='outzip', require...
ntt-sic/cinder
refs/heads/master
cinder/tests/api/v1/test_volume_metadata.py
3
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
merfii/PythonExercises
refs/heads/master
llluiop/0023/MyDjango/MyDjango/urls.py
37
"""MyDjango URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/dev/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
kevinjqiu/py-mountebank
refs/heads/master
tests/integration/test_mountebank.py
1
import requests import pytest import six from docker import errors as docker_errors from mountebank import ( MountebankClient, ImposterException, http_request, http_response, tcp_request, tcp_response, ) from tests.integration import harness def teardown_module(module): harness.stop_mb() @pytest.fi...
nazunamoe/jolla-kernel_bullhead
refs/heads/cm-13.0
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
Antiun/yelizariev-addons
refs/heads/8.0
currency_rate_update/__init__.py
26
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 Camtocamp SA # @author JB Aubort, Nicolas Bessi, Joel Grand-Guillaume # European Central Bank and Polish National Bank invented by Grzegorz Grzelak # Banxico implemented by Agustin C...