repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
macs03/demo-cms
cms/lib/python2.7/site-packages/reversion/south_migrations/0001_initial.py
15
6489
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() class Migration(Sche...
mit
moijes12/oh-mainline
vendor/packages/gdata/src/gdata/tlslite/messages.py
273
18429
"""Classes representing TLS messages.""" from utils.compat import * from utils.cryptomath import * from errors import * from utils.codec import * from constants import * from X509 import X509 from X509CertChain import X509CertChain import sha import md5 class RecordHeader3: def __init__(self): self.type ...
agpl-3.0
DiptoDas8/Biponi
lib/python2.7/site-packages/PIL/BdfFontFile.py
39
3355
# # The Python Imaging Library # $Id$ # # bitmap distribution font (bdf) file parser # # history: # 1996-05-16 fl created (as bdf2pil) # 1997-08-25 fl converted to FontFile driver # 2001-05-25 fl removed bogus __init__ call # 2002-11-20 fl robustification (from Kevin Cazabon, Dmitry Vasiliev) # 2003-04-22 fl ...
mit
Alwnikrotikz/pyicqt
src/services/Statistics.py
4
2247
# Copyright 2004-2006 Daniel Henninger <jadestorm@nc.rr.com> # Licensed for distribution under the GPL version 2, check COPYING for details import utils from twisted.words.xish.domish import Element import config import lang from debug import LogEvent, INFO, WARN, ERROR import globals class Statistics: def __init__(...
gpl-2.0
pmelendez-shomi/cb_console
node_modules/couchbase/node_modules/prebuild/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
542
45270
# Copyright (c) 2012 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
mit
robcarver17/pysystemtrade
sysproduction/reporting/trades_report.py
1
16443
from copy import copy from collections import namedtuple import datetime import numpy as np import pandas as pd from syscore.genutils import transfer_object_attributes from syscore.pdutils import make_df_from_list_of_named_tuple from syscore.objects import header, table, body_text, arg_not_supplied, missing_data fro...
gpl-3.0
luispedro/milk
milk/supervised/weighted_voting_adaboost.py
2
2972
from math import exp, log from operator import itemgetter ''' AdaBoost implementation with weighted voting as a decision procedure ''' class weighted_voting_adaboost(object): # initializes with already built classifiers and corresponding def __init__(self, in_classifiers, in_coefficients): self.classi...
mit
mydongistiny/external_chromium_org
chrome/common/extensions/docs/server2/document_parser_test.py
121
8495
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from document_parser import ParseDocument, RemoveTitle _WHOLE_DOCUMENT = ''' Preamble before heading. <h1 id='main'...
bsd-3-clause
TrainMAnB/vcoincore
qa/rpc-tests/rawtransactions.py
46
5925
#!/usr/bin/env python2 # Copyright (c) 2014 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) coin...
mit
agry/NGECore2
scripts/mobiles/corellia/mutated_krevol_clicker.py
2
1517
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobi...
lgpl-3.0
kantai/passe-framework-prototype
django/http/utils.py
87
3306
""" Functions that modify an HTTP request or response in some way. """ # This group of functions are run as part of the response handling, after # everything else, including all response middleware. Think of them as # "compulsory response middleware". Be careful about what goes here, because # it's a little fiddly to ...
bsd-3-clause
GeyerA/android_external_chromium_org
chrome/test/functional/chromoting/me2me_connect.py
68
3054
#!/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. """Chromoting me2me connect/disconnect related test cases.""" import chromoting_base import pyauto class Me2MeConnect(chromoting...
bsd-3-clause
hkmogul/mingus
mingus/midi/win32midisequencer.py
10
2392
# mingus - Music theory Python package, win32midisequencer module. # Copyright (C) 2008-2010, Bart Spaans, Ben Fisher # # 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...
gpl-3.0
andyfaff/scipy
benchmarks/benchmarks/go_benchmark_functions/go_funcs_C.py
21
18458
# -*- coding: utf-8 -*- import numpy as np from numpy import (abs, asarray, cos, exp, floor, pi, sign, sin, sqrt, sum, size, tril, isnan, atleast_2d, repeat) from numpy.testing import assert_almost_equal from .go_benchmark import Benchmark class CarromTable(Benchmark): r""" CarromTable obj...
bsd-3-clause
seanli9jan/tensorflow
tensorflow/python/kernel_tests/resource_variable_ops_test.py
2
42123
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
SpiriLiao/linux
arch/ia64/scripts/unwcheck.py
13143
1714
#!/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...
gpl-2.0
ToontownUprising/src
toontown/safezone/GSPlayground.py
3
4803
from pandac.PandaModules import * from toontown.toonbase import ToontownGlobals import Playground from toontown.launcher import DownloadForceAcknowledge from toontown.building import Elevator from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from toontown.racing import RaceGlobals from...
mit
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/simplejson-3.7.3/simplejson/tests/test_scanstring.py
139
7311
import sys from unittest import TestCase import simplejson as json import simplejson.decoder from simplejson.compat import b, PY3 class TestScanString(TestCase): # The bytes type is intentionally not used in most of these tests # under Python 3 because the decoder immediately coerces to str before # calli...
mit
sigma-random/RootTheBox
setup/xmlsetup.py
6
7231
# -*- coding: utf-8 -*- ''' Created on Aug 26, 2013 Copyright 2012 Root the Box 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 ...
apache-2.0
davidzchen/tensorflow
tensorflow/python/distribute/test_util_test.py
2
2627
# Copyright 2020 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...
apache-2.0
40223134/w16b_test
static/Brython3.1.1-20150328-091302/Lib/signal.py
743
1646
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [...
agpl-3.0
mdietrichc2c/OCB
openerp/__init__.py
100
3416
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
fengjingchao/zookeeper
src/contrib/huebrowser/zkui/src/zkui/utils.py
114
1120
# 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 ...
apache-2.0
lgscofield/odoo
addons/website_customer/controllers/main.py
251
4306
# -*- coding: utf-8 -*- import openerp from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.website.models.website import unslug from openerp.tools.translate import _ from openerp.addons.web.http import request import werkzeug.urls class WebsiteCustomer(http.Controller): _refere...
agpl-3.0
globocom/database-as-a-service
dbaas/maintenance/async_jobs/base.py
1
5453
from copy import copy from notification.models import TaskHistory from util import get_worker_name from workflow.workflow import steps_for_instances, rollback_for_instances_full __all__ = ('BaseJob',) class BaseJob(object): step_manger_class = None get_steps_method = None success_msg = '' error_msg...
bsd-3-clause
deathping1994/sendmail-api
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py
2927
4793
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0
Chilledheart/vbox
src/VBox/ValidationKit/testmanager/config.py
2
6083
# -*- coding: utf-8 -*- # $Id$ """ Test Manager Configuration. """ __copyright__ = \ """ Copyright (C) 2012-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under the te...
gpl-2.0
Azulinho/ansible
test/units/modules/network/cumulus/test_nclu.py
132
9512
# -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.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, o...
gpl-3.0
hovo1990/deviser
generator/bindings_files/DowncastPackagesFile.py
1
16916
#!/usr/bin/env python # # @file DowncastPackagesFile.py # @brief class for generating downcast packages file # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2015 by the California Institute of Technology # (C...
lgpl-2.1
jensv/fluxtubestability
external_stability.py
1
5083
# -*- coding: utf-8 -*- """ Created on Mon Sep 08 20:42:30 2014 @author: Jens von der Linden Calculate dW and determine external stability. """ from __future__ import print_function from __future__ import division from __future__ import absolute_import from future.builtins import (ascii, bytes, chr, dict, filter, he...
mit
JKRP/geonode
geonode/contrib/slack/enumerations.py
22
6907
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
gpl-3.0
mbernasocchi/inasafe
safe/gui/tools/wizard/step_fc70_extent.py
8
5051
# coding=utf-8 """InaSAFE Wizard Step Extent Selection.""" import logging from safe import messaging as m from safe.gui.tools.extent_selector_dialog import ExtentSelectorDialog from safe.gui.tools.help.extent_selector_help import extent_mode_content from safe.gui.tools.wizard.wizard_step import WizardStep from safe.g...
gpl-3.0
ryfeus/lambda-packs
LightGBM_sklearn_scipy_numpy/source/setuptools/__init__.py
49
5700
"""Extensions to the 'distutils' for large or complex distributions""" import os import functools import distutils.core import distutils.filelist from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools.extern.six.moves import filter, map import setuptools.version from setuptools.exten...
mit
marcosbontempo/algar
workspace/pcef/diameter/libDiameter.py
1
28177
#!/usr/bin/env python ################################################################## # Copyright (c) 2012, Sergej Srepfler <sergej.srepfler@gmail.com> # February 2012 - Nov 2012 # Version 0.3.1, Last change on Nov 17, 2012 # This software is distributed under the terms of BSD license. ##########################...
gpl-2.0
jordiclariana/ansible
lib/ansible/utils/module_docs_fragments/vyos.py
28
2874
# # (c) 2015, Peter Sprygada <psprygada@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 License, or # (at your option) any late...
gpl-3.0
Xeralux/tensorflow
tensorflow/contrib/eager/python/examples/rnn_colorbot/rnn_colorbot_test.py
22
2230
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
closeio/flask-admin
flask_admin/tests/mongoengine/test_basic.py
7
34515
from nose.tools import eq_, ok_ from nose.plugins.skip import SkipTest # Skip test on PY3 from flask_admin._compat import PY2, as_unicode if not PY2: raise SkipTest('MongoEngine is not Python 3 compatible') from wtforms import fields, validators from flask_admin import form from flask_admin.contrib.mongoengine i...
bsd-3-clause
brightcove/shaka-player
third_party/gjslint/python-gflags-2.0/tests/gflags_unittest.py
100
79202
#!/usr/bin/env python # Copyright (c) 2007, 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 l...
apache-2.0
jacobmetrick/Flexget
flexget/plugins/internal/urlrewriting.py
1
4917
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event log = logging.getLogger('urlrewriter') class UrlRewritingError(Exception): def __init__(s...
mit
SuperTux/flexlay
text_editor/highlighters/highlighter.py
1
3157
# Flexlay - A Generic 2D Game Editor # Copyright (C) 2015 Karkus476 <karkus476@yahoo.com> # # 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)...
gpl-3.0
ndardenne/pymatgen
pymatgen/core/physical_constants.py
3
1935
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals import warnings import scipy.constants as constants """ This module defines useful physical constants and conversion factors. All units are in SI units except for conv...
mit
broferek/ansible
test/units/modules/network/fortios/test_fortios_log_fortianalyzer_filter.py
21
9596
# Copyright 2019 Fortinet, 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 later version. # # This program is distributed in the...
gpl-3.0
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py
1
9636
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Lic...
gpl-3.0
matrix-org/synapse
synapse/config/server.py
1
56774
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2017-2018 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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-2.0
openstack/nova-solver-scheduler
nova_solverscheduler/tests/scheduler/solvers/test_solvers.py
1
3383
# Copyright (c) 2014 Cisco 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 # # Unless r...
apache-2.0
buuck/root
interpreter/llvm/src/tools/clang/tools/scan-build-py/tests/functional/cases/test_exec_anatomy.py
52
1595
# -*- coding: utf-8 -*- # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. import libear import unittest import os.path import subprocess import json def run(source_dir, target_dir): def execute...
lgpl-2.1
dennybaa/st2
st2common/tests/unit/test_queue_consumer.py
4
2026
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
czchen/cppman
cppman/formatter/cppreference.py
1
11978
# -*- coding: utf-8 -*- # # formatter.py - format html from cplusplus.com to groff syntax # # Copyright (C) 2010 - 2015 Wei-Ning Huang (AZ) <aitjcize@gmail.com> # All Rights reserved. # # This file is part of cppman. # # This program is free software; you can redistribute it and/or modify # it under the terms of the G...
gpl-3.0
shuangsong/pattern
test/test_de.py
21
10848
# -*- coding: utf-8 -*- import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import unittest import subprocess from pattern import de try: PATH = os.path.dirname(os.path.realpath(__file__)) except: PATH = "" #-----------------------------------------------------------------------...
bsd-3-clause
llooker/python_sdk
lookerapi/apis/project_api.py
1
83417
# coding: utf-8 """ Looker API 3.0 Reference ### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token....
mit
PetePriority/home-assistant
homeassistant/components/verisure/binary_sensor.py
5
1913
""" Interfaces with Verisure sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.verisure/ """ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.verisure import CONF_DOOR...
apache-2.0
radjkarl/fancyTools
fancytools/fcollections/TwoDArraySliceIterator.py
1
1824
# coding=utf-8 from __future__ import division class TwoDArraySliceIterator(object): """ a simple iterator that build small slices from a big array >>> import numpy as np >>> arr = np.random.rand(100,100) >>> n_pieces = (2,4) >>> i = TwoDArraySliceIterator( arr.shape, n_pieces ) than i...
gpl-3.0
kenshay/ImageScripter
Script_Runner/PYTHON/Lib/encodings/cp775.py
272
34476
""" Python Character Mapping Codec cp775 generated from 'VENDORS/MICSFT/PC/CP775.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict...
gpl-3.0
PanDAWMS/pilot
RunJobArgo.py
2
36685
# Class definition: # RunJobMira # [Add description here] # Instances are generated with RunJobFactory via pUtil::getRunJob() # Implemented as a singleton class # http://stackoverflow.com/questions/42558/python-and-the-singleton-pattern # Import relevant python/pilot modules from RunJobHPC import RunJobHPC ...
apache-2.0
gauribhoite/personfinder
env/site-packages/django/core/cache/backends/db.py
104
8808
"Database cache backend." import base64 from datetime import datetime from django.conf import settings from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.db import DatabaseError, connections, router, transaction from django.db.backends.utils import typecast_timestamp from django.utils i...
apache-2.0
tago-io/tago-python
tago/account/plan.py
1
1281
import requests # Used to make HTTP requests import json # Used to parse JSON import os # Used to infer environment variables API_TAGO = os.environ.get('TAGO_API') or 'https://api.tago.io' REALTIME = os.environ.get('TAGO_REALTIME') or 'https://realtime.tago.io' class Plan: def __init__(self, acc_token): sel...
mit
maestro-hybrid-cloud/keystone
keystone/common/sql/migration_helpers.py
10
8055
# Copyright 2013 OpenStack Foundation # Copyright 2013 Red Hat, 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...
apache-2.0
RacingTornado/harvester_scraper
discovery/DNS/lazy.py
23
1499
# $Id: lazy.py,v 1.5.2.1 2007/05/22 20:23:38 customdesigned Exp $ # # This file is part of the pydns project. # Homepage: http://pydns.sourceforge.net # # This code is covered by the standard Python License. # # routines for lazy people. import Base import string def revlookup(name): "convenience routine for doi...
gpl-2.0
Don42/youtube-dl
youtube_dl/extractor/videofyme.py
111
1750
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, ) class VideofyMeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.videofy\.me/.+?|p\.videofy\.me/v)/(?P<id>\d+)(&|#|$)' IE_NAME = 'videofy.me' _TEST = { 'url': 'h...
unlicense
c0defreak/python-for-android
python-modules/twisted/twisted/test/test_udp.py
56
24076
# -*- test-case-name: twisted.test.test_udp -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorUDP} and L{IReactorMulticast}. """ from twisted.trial import unittest, util from twisted.internet.defer import Deferred, gatherResults, maybeDef...
apache-2.0
WeerakoonOS/iShop
Ishop 10.12.2017/Ishop/assets/bootstrap-datepicker/docs/conf.py
171
8002
# -*- coding: utf-8 -*- # # bootstrap-datepicker documentation build configuration file, created by # sphinx-quickstart on Fri Aug 2 14:45:57 2013. # # 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 ...
mit
kushG/osf.io
website/addons/s3/routes.py
1
1822
from framework.routing import Rule, json_renderer from website.addons.s3 import views settings_routes = { 'rules': [ Rule( [ '/project/<pid>/s3/newbucket/', '/project/<pid>/node/<nid>/s3/newbucket/', ], 'post', views.crud.cre...
apache-2.0
Charlex/django-calaccess-raw-data
calaccess_raw/admin/other.py
29
6985
from __future__ import unicode_literals from django.contrib import admin from calaccess_raw import models from .base import BaseAdmin class AcronymsCdAdmin(BaseAdmin): list_display = ("acronym", "stands_for", "effect_dt", "a_desc") date_hierarchy = 'effect_dt' search_fields = ("acronym", "a_desc") class...
mit
orekyuu/intellij-community
python/lib/Lib/site-packages/django/contrib/auth/tests/models.py
318
1493
from django.conf import settings from django.test import TestCase from django.contrib.auth.models import User, SiteProfileNotAvailable class ProfileTestCase(TestCase): fixtures = ['authtestdata.json'] def setUp(self): """Backs up the AUTH_PROFILE_MODULE""" self.old_AUTH_PROFILE_MODULE = getattr...
apache-2.0
ventosus/jack1
python/jackctl.py
5
7071
from ctypes import * libj = cdll.LoadLibrary( "libjack.so" ) libjs = cdll.LoadLibrary( "libjackserver.so" ) class jackctl_parameter_value( Union ): _fields_ = [ ( "ui", c_uint ), ( "i", c_int ), ( "c", c_char ), ( "ss", c_char * 128 ), ( "b"...
lgpl-2.1
fxia22/ASM_xf
PythonD/lib/python2.4/bsddb/test/test_env_close.py
18
2977
"""TestCases for checking that it does not segfault when a DBEnv object is closed before its DB objects. """ import os import sys import tempfile import glob import unittest try: # For Pythons w/distutils pybsddb from bsddb3 import db except ImportError: # For Python 2.3 from bsddb import db from tes...
gpl-2.0
eirmag/weboob
modules/societegenerale/pages/login.py
1
2921
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Jocelyn Jaubert # # This file is part of weboob. # # weboob 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 3 of the License, or # (at yo...
agpl-3.0
CydarLtd/ansible
lib/ansible/modules/cloud/rackspace/rax_files_objects.py
70
19116
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.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 # (a...
gpl-3.0
ThiefMaster/sqlalchemy
lib/sqlalchemy/dialects/postgresql/pypostgresql.py
55
2655
# postgresql/pypostgresql.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+pypostgresql :name: py-postgresql :db...
mit
mcus/SickRage
lib/imdb/parser/http/utils.py
59
34532
""" parser.http.utils module (imdb package). This module provides miscellaneous utilities used by the imdb.parser.http classes. Copyright 2004-2012 Davide Alberani <da@erlug.linux.it> 2008 H. Turgut Uyar <uyar@tekir.org> This program is free software; you can redistribute it and/or modify it under the...
gpl-3.0
rnestler/servo
tests/wpt/web-platform-tests/tools/wptserve/docs/conf.py
467
7855
# -*- coding: utf-8 -*- # # wptserve documentation build configuration file, created by # sphinx-quickstart on Wed Aug 14 17:23:24 2013. # # 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...
mpl-2.0
gfreed/android_external_chromium-org
tools/site_compare/commands/compare2.py
189
6517
# Copyright (c) 2011 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. """SiteCompare command to invoke the same page in two versions of a browser. Does the easiest compatibility test: equality comparison between two differ...
bsd-3-clause
hyde/hyde
tests/ext/test_sass.py
1
1430
# -*- coding: utf-8 -*- """ Use nose `$ pip install nose` `$ nosetests` """ from hyde.generator import Generator from hyde.site import Site from fswrap import File, Folder from util import assert_no_diff SCSS_SOURCE = File(__file__).parent.child_folder('scss') TEST_SITE = File(__file__).parent.parent.child_folder('_...
mit
btovar/autopyfactory
autopyfactory/plugins/queue/batchsubmit/CondorEC2.py
1
11034
#!/bin/env python # # AutoPyfactory batch plugin for Condor # from CondorBase import CondorBase from autopyfactory import jsd from autopyfactory.condor import killids, mincondorversion import subprocess import time import commands import logging import traceback #mincondorversion(8,1,1) class CondorEC2(CondorBase)...
apache-2.0
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201204/inventory_service/create_ad_units.py
2
2765
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
lxneng/incubator-airflow
tests/contrib/hooks/test_sqoop_hook.py
15
13472
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
daira/zcash
qa/rpc-tests/finalsaplingroot.py
3
10025
#!/usr/bin/env python3 # Copyright (c) 2018 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal,...
mit
shauryachats/codechef
codechef/contest.py
1
4271
from utils import * import json import datetime import time from BeautifulSoup import BeautifulSoup import logging def getContestInList(contestList, present, past, future): bucket = [] if future: bucket += contestList['future'] if present: bucket += contestList['present'] if past: ...
mit
josephsuh/extra-specs
nova/api/openstack/compute/contrib/server_start_stop.py
3
2558
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Midokura Japan K.K. # # 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...
apache-2.0
bugobliterator/ardupilot-chibios
Tools/scripts/apj_tool.py
8
7846
#!/usr/bin/env python ''' tool to manipulate ArduPilot firmware files, changing default parameters ''' import os, sys, struct, json, base64, zlib, hashlib import argparse class embedded_defaults(object): '''class to manipulate embedded defaults in a firmware''' def __init__(self, filename): self.file...
gpl-3.0
xantin/qualitybots
src/appengine/common/gql_util.py
26
1494
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
aidanlister/django
django/core/files/storage.py
281
13339
import errno import os import warnings from datetime import datetime from django.conf import settings from django.core.exceptions import SuspiciousFileOperation from django.core.files import File, locks from django.core.files.move import file_move_safe from django.utils._os import abspathu, safe_join from django.utils...
bsd-3-clause
BehavioralInsightsTeam/edx-platform
common/djangoapps/entitlements/api/v1/filters.py
18
1215
from django_filters import rest_framework as filters from entitlements.models import CourseEntitlement class CharListFilter(filters.CharFilter): """ Filters a field via a comma-delimited list of values. """ def filter(self, qs, value): # pylint: disable=method-hidden if value not in (None, ''): ...
agpl-3.0
alekz112/statsmodels
statsmodels/formula/tests/test_formula.py
29
4647
from statsmodels.compat.python import iteritems, StringIO import warnings from statsmodels.formula.api import ols from statsmodels.formula.formulatools import make_hypotheses_matrices from statsmodels.tools import add_constant from statsmodels.datasets.longley import load, load_pandas import numpy.testing as npt from...
bsd-3-clause
jclc/discus-inferno
flaskenv/lib/python2.7/site-packages/pip/_vendor/requests/models.py
217
25372
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import...
mit
alexteodor/odoo
addons/sale/sale.py
8
69136
# -*- 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...
agpl-3.0
neilLasrado/erpnext
erpnext/patches/v11_0/refactor_autoname_naming.py
14
4592
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe from frappe.custom.doctype.property_setter.property_setter import make_property_setter doctype_series_map = { 'Activity...
gpl-3.0
kch8qx/osf.io
website/project/views/log.py
38
2291
# -*- coding: utf-8 -*- import httplib as http import logging import math from flask import request from framework.exceptions import HTTPError from framework.auth.decorators import collect_auth from framework.transactions.handlers import no_auto_transaction from website.views import serialize_log, validate_page_num...
apache-2.0
zaqwes8811/matlab_ext
identification/tests/test-dfilters.py
1
1166
# coding: utf-8 """ Характеристики для цифрового фильтра """ # Other from pylab import * from numpy import arange from numpy import ones # App from visualisers import mfreqz from visualisers import impz from iir_models.iir_digital import calc_digital_characteristics if __name__=='__main__': mean_params = ...
apache-2.0
lanfker/tdma_imac
src/lte/bindings/modulegen__gcc_ILP32.py
27
474175
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
zkan/intern-checklist
docs/conf.py
1
7864
# -*- coding: utf-8 -*- # # Intern Checklist documentation build configuration file, created by # sphinx-quickstart. # # 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. # # All configuration valu...
bsd-3-clause
berny6969/enigma2
po/xml2po.py
40
1590
#!/usr/bin/python import sys import os import string import re from xml.sax import make_parser from xml.sax.handler import ContentHandler, property_lexical_handler try: from _xmlplus.sax.saxlib import LexicalHandler no_comments = False except ImportError: class LexicalHandler: pass no_comments = True class parse...
gpl-2.0
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicy_sslservice_binding.py
3
6009
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
sridevikoushik31/nova
nova/db/mysqldb/instance_metadata.py
1
1820
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 Rackspace Hosting # 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.apac...
apache-2.0
h4ck3rm1k3/FEC-Field-Documentation
fec/version/v2/SH1.py
1
2170
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER FEC CMTE ID', 'number': '2'}, {'name': 'NAT PARTY COMMITTEES %', 'number': '3'}, ...
unlicense
alexandrebarachant/mne-python
mne/gui/_marker_gui.py
11
14997
"""Mayavi/traits GUI for averaging two sets of KIT marker points""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os import numpy as np # allow import without traits try: from mayavi.core.ui.mayavi_scene import MayaviScene from mayavi.tools.mlab_scene_model imp...
bsd-3-clause
pydlv/rlauncher
requests/packages/urllib3/contrib/ntlmpool.py
312
4478
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import from logging import getLogger from ntlm import ntlm from .. import HTTPSConnectionPool from ..packages.six.moves.http_client import HTTPSConnecti...
mit
tomleo/djqna
djqna/forum/tests.py
1
3736
from django.test import TestCase from django.contrib.auth.models import User from django.core.urlresolvers import reverse from .models import Question, Answer, Vote from .views import questions, question, answers, answer def make_users(n): return { 'u%s' % i: User(first_name='fn%s' % i, ...
gpl-3.0
edgedb/edgedb
docs/conf.py
1
9624
# -*- coding: utf-8 -*- # # EdgeDB documentation build configuration file, created by # sphinx-quickstart on Wed Aug 3 17:58:14 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...
apache-2.0
mmardini/django
django/contrib/auth/backends.py
42
6113
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission class ModelBackend(object): """ Authenticates against settings.AUTH_USER_MODEL. """ def authenticate(self, username=None, password=None, **kwargs): UserMode...
bsd-3-clause