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
bodi000/odoo
addons/purchase/res_config.py
357
6198
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
t-wissmann/qutebrowser
tests/helpers/stubs.py
1
17146
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
40223220/cd0504
static/Brython3.1.1-20150328-091302/Lib/binascii.py
620
24585
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
agpl-3.0
cpatrick/ITK-RemoteIO
Wrapping/WrapITK/Languages/Doc/itk_doxy2swig.py
13
4555
#!/usr/bin/env python """Doxygen XML to SWIG docstring converter for ITK classes. Usage: itk_doxy2swig.py [input directory name] [output swing interface file name] """ # silently import psyco try: import psyco psyco.full() except ImportError: pass import sys import os import glob from doxy2swig import * fr...
apache-2.0
CivicTechTO/open-cabinet
venv/lib/python2.7/site-packages/django/contrib/postgres/fields/hstore.py
151
2771
import json from django.contrib.postgres import forms, lookups from django.contrib.postgres.fields.array import ArrayField from django.core import exceptions from django.db.models import Field, TextField, Transform from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ['HStore...
mit
danieljaouen/ansible
test/sanity/code-smell/use-argspec-type-path.py
22
2102
#!/usr/bin/env python import re import sys def main(): skip = set([ # add legitimate uses of expanduser to the following list 'lib/ansible/modules/cloud/docker/docker_container.py', # uses colon-separated paths, can't use type=path 'lib/ansible/modules/cloud/lxc/lxc_container.py', ...
gpl-3.0
ubc/edx-platform
common/lib/xmodule/xmodule/lti_2_util.py
102
16187
# pylint: disable=attribute-defined-outside-init """ A mixin class for LTI 2.0 functionality. This is really just done to refactor the code to keep the LTIModule class from getting too big """ import json import re import mock import urllib import hashlib import base64 import logging from webob import Response from x...
agpl-3.0
redhat-openstack/ceilometer
ceilometer/storage/sqlalchemy/migrate_repo/versions/039_event_floatingprecision_pgsql.py
9
2229
# # 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...
apache-2.0
KennethPierce/pylearnk
pylearn2/scripts/dbm/show_reconstructions.py
5
4767
#!/usr/bin/env python __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" """ Usage: python show_reconstructions <path_to_a_saved_DBM.pkl> Displays a batch of data from the DBM's training set. ...
bsd-3-clause
cloudwatt/contrail-controller
src/config/device-manager/device_manager/physical_router_config.py
1
18986
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of inetconf interface for physical router configuration manager """ from lxml import etree from ncclient import manager import copy class PhysicalRouterConfig(object): # mapping from contrail family names t...
apache-2.0
FedoraScientific/salome-paravis
test/VisuPrs/CutLines/E8.py
1
1502
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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 (at your option) any later version. # # This library ...
lgpl-2.1
avoinsystems/odoo
addons/l10n_at/__init__.py
438
1050
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
agpl-3.0
diogovk/ansible
contrib/inventory/openvz.py
48
2690
#!/usr/bin/env python # -*- coding: utf-8 -*- # # openvz.py # # Copyright 2014 jordonr <jordon@beamsyn.net> # # 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 ...
gpl-3.0
sgnn7/sgfc
communication/comms.py
1
2263
#!/usr/bin/env python2 import time from devices.zigbee_xbee import XBeeCommDevice from protobufs import sgfc_pb2 as fc_proto def test_comms(): dev1 = None dev2 = None fc_message = fc_proto.FlightMessage() fc_message.sender = "Me" payload = fc_proto.Payload() payload.type = fc_proto.GPS_PO...
lgpl-2.1
hwjworld/xiaodun-platform
common/lib/xmodule/xmodule/tests/test_util_open_ended.py
20
83489
import json from textwrap import dedent from xmodule.modulestore import Location from xmodule.modulestore.xml import XMLModuleStore from xmodule.tests import DATA_DIR, get_test_system from StringIO import StringIO OPEN_ENDED_GRADING_INTERFACE = { 'url': 'blah/', 'username': 'incorrect', 'password': 'incor...
agpl-3.0
stone5495/NewsBlur
vendor/feedvalidator/uri.py
18
4858
"""$Id: uri.py 511 2006-03-07 05:19:10Z rubys $""" # This is working code, with tests, but not yet integrated into validation. # (Change unique in validators.py to use Uri(self.value), rather than the # plain value.) # Ideally, this would be part of the core Python classes. # It's probably not ready for deployment, b...
mit
likaiguo/flask-admin
flask_admin/helpers.py
34
3408
from re import sub from jinja2 import contextfunction from flask import g, request, url_for, flash from wtforms.validators import DataRequired, InputRequired from flask_admin._compat import urljoin, urlparse, iteritems from ._compat import string_types def set_current_view(view): g._admin_view = view def get_...
bsd-3-clause
amisrs/one-eighty
venv2/lib/python2.7/site-packages/dateutil/zoneinfo/__init__.py
48
6810
# -*- coding: utf-8 -*- import logging import os import warnings import tempfile import shutil import json from tarfile import TarFile from pkgutil import get_data from io import BytesIO from contextlib import closing from dateutil.tz import tzfile __all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata", "r...
mit
damiankloip/psysh
test/tools/vis.py
710
3428
""" vis.py ====== Ctypes based module to access libbsd's strvis & strunvis functions. The `vis` function is the equivalent of strvis. The `unvis` function is the equivalent of strunvis. All functions accept unicode string as input and return a unicode string. Constants: ---------- * to select alternate encoding for...
mit
dyve/django-leaflet
setup.py
1
1651
import os from setuptools import setup, find_packages import sys here = os.path.abspath(os.path.dirname(__file__)) import codecs requires = ['Django'] if sys.version_info < (2, 7): requires += ['ordereddict'] setup( name='django-leaflet', version='0.18.1.dev0', author='Mathieu Leplatre',...
lgpl-3.0
daisychainme/daisychain
daisychain/channel_dropbox/tests/test_models.py
1
1492
from django.contrib.auth.models import User from django.test import TestCase from .models import DropboxAccount, DropboxUser class TestModelsDropboxAccount(TestCase): def test_account_str_len(self): user = User.objects.create_user('John') dbx_account = DropboxAccount( user = user, ...
mit
cloudkeep/symantecssl
symantecssl/order.py
1
4443
from __future__ import absolute_import, division, print_function import requests from lxml import etree from symantecssl.request_models import RequestEnvelope as ReqEnv class FailedRequest(Exception): def __init__(self, response): super(FailedRequest, self).__init__() self.response = response ...
apache-2.0
vaygr/ansible
lib/ansible/module_utils/vca.py
104
11177
# # 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. # # Ansible is distributed in the hope tha...
gpl-3.0
eudoxos/woodem
py/tests/shapepack.py
3
4138
# encoding: utf-8 # 2013 © Václav Šmilauer <eu@doxos.eu> import unittest from minieigen import * import woo._customConverters import woo.core import woo.dem import woo.utils import math from woo.dem import * class TestShapePack(unittest.TestCase): # def setUp(self): def testLoadSampleTxt(self): 'ShapePack: load s...
gpl-2.0
nelsongoh/shanhousebot
libs/future/backports/email/_parseaddr.py
82
17389
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ i...
apache-2.0
Dangerpuss/Dumpster
winDATget/Forget.py
1
1457
from subprocess import Popen import os import csv srcfile = "/" + input('File Input Name: ') dirpath = os.path.dirname(__file__) srcpath = os.path.dirname(__file__) + srcfile with open(srcpath, newline='') as f: reader = csv.reader(f) for row in reader: host = (row[0]) user = (row[1]) newpath = os.path.dir...
gpl-2.0
BillFoland/daisyluAMR
system/daisylu_system.py
1
13721
import os import sys import pickle import pandas as pd import numpy as np import hashlib import os.path from daisylu_config import * from daisylu_vectors import * from sentences import * from daisylu_output import * "" def addWikificationToDFrames(sents, sTypes, sentenceAttr): # nee...
mit
ychen820/microblog
flask/lib/python2.7/site-packages/migrate/tests/versioning/test_util.py
75
4248
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from sqlalchemy import * from migrate.exceptions import MigrateDeprecationWarning from migrate.tests import fixture from migrate.tests.fixture.warnings import catch_warnings from migrate.versioning.util import * from migrate.versioning import api import warnin...
bsd-3-clause
mmottahedi/neuralnilm_prototype
scripts/e351.py
2
6885
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer, Bidirectio...
mit
jansohn/pyload
module/plugins/crypter/SexuriaCom.py
11
4936
# -*- coding: utf-8 -*- import re from module.plugins.internal.Crypter import Crypter class SexuriaCom(Crypter): __name__ = "SexuriaCom" __type__ = "crypter" __version__ = "0.10" __status__ = "testing" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl...
gpl-3.0
oihane/odoo-addons
stock_move_with_partner/tests/test_stock_move_with_partner.py
2
1201
# Copyright (c) 2020 Alfredo de la Fuente - Avanzosc S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests import common class TestStockMoveWithPartner(common.SavepointCase): @classmethod def setUpClass(cls): super(TestStockMoveWithPartner, cls).setUpClass() pi...
agpl-3.0
novafloss/django-formidable
formidable/forms/__init__.py
1
7650
# -*- coding: utf-8 -*- """ This module exposes everything needed to generate a standard django form class from a formidable object. Given a formidable object, you can use :func:`get_dynamic_form_class` to get its corresponding django form class. """ from __future__ import unicode_literals from collections import Or...
mit
zenefits/sentry
src/sentry/api/urls.py
1
23038
from __future__ import absolute_import, print_function from django.conf.urls import include, patterns, url from .endpoints.api_tokens import ApiTokensEndpoint from .endpoints.auth_index import AuthIndexEndpoint from .endpoints.broadcast_index import BroadcastIndexEndpoint from .endpoints.catchall import CatchallEndpo...
bsd-3-clause
Manishearth/servo
tests/wpt/web-platform-tests/tools/wptserve/wptserve/router.py
316
5895
import itertools import re import types from logger import get_logger any_method = object() class RouteTokenizer(object): def literal(self, scanner, token): return ("literal", token) def slash(self, scanner, token): return ("slash", None) def group(self, scanner, token): return ...
mpl-2.0
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/numpy/matrixlib/tests/test_regression.py
146
1144
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, run_module_suite, assert_, assert_equal rlevel = 1 class TestRegression(TestCase): def test_kron_matrix(self, level=rlevel): # Ticket #71 x = np.matrix('[1 0; 1 0]') ass...
mit
Ramalus/herovoices
.buildozer/venv/lib/python2.7/site-packages/wheel/signatures/keys.py
471
3320
"""Store and retrieve wheel signing / verifying keys. Given a scope (a package name, + meaning "all packages", or - meaning "no packages"), return a list of verifying keys that are trusted for that scope. Given a package name, return a list of (scope, key) suggested keys to sign that package (only the verifying key...
gpl-2.0
shireenrao/pelican-plugins
interlinks/interlinks.py
41
1434
# -*- coding: utf-8 -*- """ Interlinks ========================= This plugin allows you to include "interwiki" or shortcuts links into the blog, as keyword>rest_of_url """ from bs4 import BeautifulSoup from pelican import signals import re interlinks = {} def getSettings (generator): global interlinks interl...
agpl-3.0
SleepyDeveloper/alexa-cookbook
tools/TestFlow/sampleskill3/index.py
2
7822
""" This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well as testing instructions are located at http://amzn.to/1LzFrj6 For additional samples, visit the Alexa Skills Kit Getting Started guide at http://amzn.to/1LG...
apache-2.0
burstlam/pantech_kernel_A850
scripts/gcc-wrapper.py
501
3410
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, Code Aurora Forum. 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 a...
gpl-2.0
domin1101/malmo-challenge
malmopy/util/util.py
2
2334
# Copyright (c) 2017 Microsoft Corporation. # # 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, publis...
mit
alex/pip
pip/_vendor/requests/packages/chardet/sbcsgroupprober.py
2936
3291
######################## 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...
mit
schinzelh/dash
qa/rpc-tests/replace-by-fee.py
41
21870
#!/usr/bin/env python2 # Copyright (c) 2014-2015 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 replace by fee code # from test_framework.test_framework import BitcoinTestFramework from test_...
mit
qq3127610/shooter-player
Test/Update_Unittest/web/scripts/patchgen.py
18
2508
#!/usr/bin/python #create patch files for ShooterPlayer # # # import glob import optparse import os import re import shutil import sys import hashlib import subprocess def filemd5(fileName): m = hashlib.md5() try: fd = open(fileName,"rb") except IOError: print "Unabl...
gpl-2.0
jspargo/AneMo
django/lib/python2.7/site-packages/django/middleware/common.py
52
7351
import hashlib import logging import re import warnings from django.conf import settings from django.core.mail import mail_managers from django.core import urlresolvers from django import http from django.utils.deprecation import RemovedInDjango18Warning from django.utils.encoding import force_text from django.utils.h...
gpl-2.0
MG-group-tools/MGFunc
mgfunc_v2/swiss2tab.py
1
7278
from __future__ import division import argparse from Bio import SeqIO from datetime import datetime as dt import time import os import sys import gzip class main: def __init__(self): self.start = time.time() self.d_ = dt.today() self.timestarted = self.d_.strftime("%d-%m-%Y %H:%M:%S") self.parseArgs() def pa...
gpl-3.0
arkem/pyflag
src/pyflag/ColumnTypes.py
1
53873
#!/usr/bin/env python # ****************************************************** # Copyright 2004: Commonwealth of Australia. # # Developed by the Computer Network Vulnerability Team, # Information Security Group. # Department of Defence. # # Michael Cohen <scudette@users.sourceforge.net> # # ****************************...
gpl-2.0
NL66278/OCB
addons/stock_account/res_config.py
315
2277
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
wwj718/edx-video
cms/djangoapps/contentstore/tests/test_checklists.py
6
6861
""" Unit tests for checklist methods in views.py. """ from contentstore.utils import get_modulestore from xmodule.modulestore.inheritance import own_metadata from xmodule.modulestore.tests.factories import CourseFactory from django.core.urlresolvers import reverse import json from .utils import CourseTestCase class C...
agpl-3.0
apixandru/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_trace_api.py
88
1048
def add_line_breakpoint(plugin, pydb, type, file, line, condition, expression, func_name): return None def add_exception_breakpoint(plugin, pydb, type, exception): return False def remove_exception_breakpoint(plugin, pydb, type, exception): return False def get_breakpoints(plugin, pydb): return None ...
apache-2.0
ntuecon/server
pyenv/Lib/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py
2936
3291
######################## 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...
bsd-3-clause
wojenny/THash
wstools/logging.py
292
8187
# Copyright (c) 2003, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of # any required approvals from the U.S. Dept. of Energy). All rights # reserved. # """Logging""" ident = "$Id$" import os, sys WARN = 1 DEBUG = 2 class ILogger: '''Logger int...
gpl-3.0
UrbanCCD-UChicago/plenario
plenario/sensor_network/api/ifttt.py
1
6149
import json import time import uuid from os import environ from dateutil.parser import parse from flask import make_response, request from plenario.api.common import crossdomain, unknown_object_json_handler from plenario.api.response import bad_request from plenario.api.validator import IFTTTValidator, sensor_network...
mit
anastue/netforce
netforce_general/netforce_general/models/select_company.py
4
2388
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
mit
leilihh/nova
nova/api/openstack/compute/plugins/v3/console_output.py
10
2746
# Copyright 2011 OpenStack Foundation # Copyright 2011 Grid Dynamics # Copyright 2011 Eldar Nugaev, Kirill Shileev, Ilya Alekseyev # # 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 # #...
apache-2.0
xuleiboy1234/autoTitle
tensorflow/tensorflow/python/kernel_tests/random_poisson_test.py
27
7393
# 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...
mit
tholum/PiBunny
system.d/library/tools_installer/tools_to_install/impacket/impacket/testcases/dot11/test_helper.py
4
1629
#!/usr/bin/env python # Copyright (c) 2003-2013 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id$ # # Description: # Tests for helper used to build ProtocolPackets # # Au...
mit
jiangyonghang/bitcoin
test/functional/test_framework/authproxy.py
16
7743
# Copyright (c) 2011 Jeff Garzik # # Previous copyright, from python-jsonrpc/jsonrpc/proxy.py: # # Copyright (c) 2007 Jan-Klaas Kollhof # # This file is part of jsonrpc. # # jsonrpc is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # th...
mit
caot/intellij-community
python/lib/Lib/site-packages/django/utils/regex_helper.py
361
12079
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
apache-2.0
fzadow/CATMAID
scripts/remote/access.py
3
6235
# Script initially by Tom Kazimiers 2013-01-12 # Adapted by Albert Cardona 2013-01-25 # # The purpose of this script is to connect to a django session # in a remote computer, and to retrieve information from the database # such as the skeleton of a neuronal arbor and its synapses # in the form of a NetworX graph. impo...
agpl-3.0
dushu1203/chromium.src
third_party/tlslite/tlslite/utils/aes.py
149
1064
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """Abstract class for AES.""" class AES(object): def __init__(self, key, mode, IV, implementation): if len(key) not in (16, 24, 32): raise AssertionError() if mode != 2: raise A...
bsd-3-clause
olatoft/reverse-hangman
lib/python3.5/site-packages/setuptools/command/sdist.py
111
7050
from glob import glob from distutils import log import distutils.command.sdist as orig import os import sys import io from setuptools.extern import six from setuptools.utils import cs_path_exists import pkg_resources READMES = 'README', 'README.rst', 'README.txt' _default_revctrl = list def walk_revctrl(dirname='...
gpl-3.0
bycoffe/django-liveblog
models.py
1
1303
import datetime from django.db import models from django.conf import settings from django.template import loader, Context from markdown import markdown blog = __import__(settings.BLOG_APP) Entry = blog.models.__getattribute__(settings.BLOG_ENTRY_MODEL) if Entry.objects.count(): default_blog_entry = Entry.objects...
bsd-3-clause
broferek/ansible
test/units/modules/cloud/docker/test_docker_swarm_service.py
10
10458
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest class APIErrorMock(Exception): def __init__(self, message, response=None, explanation=None): self.message = message self.response = response self.explanation = explanation @pytest.fixtu...
gpl-3.0
gauravjns/taiga-back
taiga/projects/votes/migrations/0002_auto_20150805_1600.py
15
1078
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.utils.timezone import utc from django.conf import settings import datetime class Migration(migrations.Migration): dependencies = [ ('votes', '0001_initial'), ] operations = [ ...
agpl-3.0
shiblon/pytour
static/js/pypyjs/pypy-nojit.js-0.3.1/lib/modules/test/test_pep292.py
103
7682
# Copyright (C) 2004 Python Software Foundation # Author: barry@python.org (Barry Warsaw) # License: http://www.opensource.org/licenses/PythonSoftFoundation.php import unittest from string import Template class Bag: pass class Mapping: def __getitem__(self, name): obj = self for part in name...
apache-2.0
kawamon/hue
desktop/core/ext-py/boto-2.46.1/tests/unit/ec2/test_instancetype.py
114
5221
#!/usr/bin/env python from tests.unit import unittest from tests.unit import AWSMockServiceTestCase import boto.ec2 from boto.ec2.connection import EC2Connection class TestEC2ConnectionBase(AWSMockServiceTestCase): connection_class = EC2Connection def setUp(self): super(TestEC2ConnectionBase, self)...
apache-2.0
arktools/ardupilotone
Tools/autotest/pysim/fg_display.py
26
1904
#!/usr/bin/env python import socket, struct, time, math, errno import fgFDM class udp_socket(object): '''a UDP socket''' def __init__(self, device, blocking=True, input=True): a = device.split(':') if len(a) != 2: print("UDP ports must be specified as host:port") sys.ex...
gpl-3.0
slevenhagen/odoo
addons/website_event_track/models/event.py
300
8344
# -*- 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
t-hey/QGIS-Original
python/plugins/processing/algs/gdal/proximity.py
2
8392
# -*- coding: utf-8 -*- """ *************************************************************************** proximity.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************************...
gpl-2.0
JVillella/tensorflow
tensorflow/contrib/slim/python/slim/data/dataset_data_provider.py
47
4039
# 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
MJerty/thefuck
thefuck/specific/git.py
11
1099
import re from shlex import split from decorator import decorator from ..types import Command from ..utils import quote, is_app @decorator def git_support(fn, command): """Resolves git aliases and supports testing for both git and hub.""" # supports GitHub's `hub` command # which is recommended to be used...
mit
cgmb/d2lmf
d2lmf/d2lmf.py
1
11079
# -*- coding: utf-8 -*- # Copyright (C) 2015-2018 Cordell Bloor # # 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. # # Th...
gpl-3.0
neeasade/qutebrowser
tests/unit/commands/test_userscripts.py
4
7179
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
BlindHunter/django
django/core/cache/__init__.py
230
3806
""" Caching framework. This package defines set of cache backends that all conform to a simple API. In a nutshell, a cache is a set of values -- which can be any object that may be pickled -- identified by string keys. For the complete API, see the abstract BaseCache class in django.core.cache.backends.base. Client ...
bsd-3-clause
codingforentrepreneurs/DjangoGap
src/postings/migrations/0003_auto_20141113_2257.py
1
1504
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('postings', '0002_auto_20141111_0540'), ] operations = [ migrations.Alt...
gpl-2.0
apmichaud/vitess-apm
test/queryservice_test.py
1
2644
#!/usr/bin/env python import logging import optparse import traceback import unittest import sys import utils import framework from queryservice_tests import cache_tests from queryservice_tests import nocache_tests from queryservice_tests import stream_tests from queryservice_tests import status_tests from queryserv...
bsd-3-clause
MartynShaw/audacity
lib-src/lv2/lv2/plugins/eg-metro.lv2/waflib/Tools/tex.py
177
8492
#! /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,re from waflib import Utils,Task,Errors,Logs from waflib.TaskGen import feature,before_method re_bibunit=re.compile(r'\\(?P<type>putbib)\[(?P<file>[^\[\]]*)\]',re.M)...
gpl-2.0
pavelponomarev/Elmer_IM2D_cases
IM_one_pole/cage/cage_generator.py
1
9486
# Elmer circuit equations generator for a cage winding taking into account periodicity # Author: P. Ponomarev # July 2016 # changelog: # version 1.3 (03.2017) by PP: # - added 'boffset' parameter - offset of the body numbers # version 1.2 (01.2017) by PP: # - added 'ns' parameter - number of slices for ...
gpl-3.0
petewarden/tensorflow_makefile
tensorflow/python/training/summary_writer_test.py
10
8268
# Copyright 2015 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 by applicable law or a...
apache-2.0
electrumalt/electrum-doge
lib/paymentrequest_pb2.py
55
12540
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='paymentrequest.p...
gpl-3.0
epssy/hue
apps/beeswax/src/beeswax/migrations/0010_merge_database_state.py
30
7935
# -*- 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): pass def backwards(self, orm): pass models = { u'auth.g...
apache-2.0
dablak/boto
boto/fps/response.py
14
7830
# Copyright (c) 2012 Andy Davidoff http://www.disruptek.com/ # Copyright (c) 2010 Jason R. Coombs http://www.jaraco.com/ # Copyright (c) 2008 Chris Moyer http://coredumped.org/ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy ...
mit
oddt/oddt
oddt/docking/AutodockVina.py
1
15674
import sys import subprocess import re import os import warnings from tempfile import mkdtemp from shutil import rmtree from distutils.spawn import find_executable from tempfile import gettempdir from six import string_types import oddt from oddt.utils import (is_openbabel_molecule, is_molecul...
bsd-3-clause
macks22/scikit-learn
sklearn/cluster/spectral.py
233
18153
# -*- coding: utf-8 -*- """Algorithms for spectral clustering""" # Author: Gael Varoquaux gael.varoquaux@normalesup.org # Brian Cheung # Wei LI <kuantkid@gmail.com> # License: BSD 3 clause import warnings import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import check_rand...
bsd-3-clause
ShineFan/odoo
addons/l10n_sg/__init__.py
669
1059
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>). # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
resba/gnuradio
gr-trellis/src/examples/test_sccc_turbo1.py
5
3908
#!/usr/bin/env python from gnuradio import gr from gnuradio import trellis, digital from gnuradio import eng_notation import math import sys import random import fsm_utils def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed): tb = gr.top_block () # TX src = gr.l...
gpl-3.0
clarin-eric/Centre-Registry
centre-registry-app/centre_registry/migrations/0001_initial.py
1
13641
# pylint: disable=invalid-name import centre_registry.models from django.db import migrations from django.db import models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name='Centre', fields=[ ...
gpl-3.0
TeslaProject/external_chromium_org
tools/idl_parser/idl_lexer.py
44
8095
#!/usr/bin/env python # Copyright (c) 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. """ Lexer for PPAPI IDL The lexer uses the PLY library to build a tokenizer which understands both WebIDL and Pepper tokens. WebI...
bsd-3-clause
2014cdag16/2014cdag16
wsgi/static/Brython2.1.0-20140419-113919/Lib/sre_constants.py
692
7172
# # Secret Labs' Regular Expression Engine # # various symbols used by the regular expression engine. # run this script to update the _sre include files! # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support modul...
gpl-2.0
tadebayo/myedge
myvenv/Lib/site-packages/PIL/GimpGradientFile.py
72
3347
# # Python Imaging Library # $Id$ # # stuff to read (and render) GIMP gradient files # # History: # 97-08-23 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # from math import pi, log, sin, sqrt from PI...
mit
sometallgit/AutoUploader
Python27/Lib/distutils/tests/test_text_file.py
141
3441
"""Tests for distutils.text_file.""" import os import unittest from distutils.text_file import TextFile from distutils.tests import support from test.test_support import run_unittest TEST_DATA = """# test file line 3 \\ # intervening comment continues on next line """ class TextFileTestCase(support.TempdirManager,...
mit
ctrlaltdel/neutrinator
vendor/pbr/tests/test_wsgi.py
32
5708
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP) # # 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 ...
gpl-3.0
sanuj/opencog
opencog/python/blending/src/maker/base_maker.py
22
2581
from abc import ABCMeta, abstractmethod from blending.util.blending_config import BlendConfig from blending.util.blending_error import blending_status __author__ = 'DongMin Kim' class BaseMaker(object): """Abstract class to provide 'new_blend_make()' interface. The blender will call the method 'new_blend_m...
agpl-3.0
google/sqlcommenter
python/sqlcommenter-python/tests/sqlalchemy/tests.py
1
4346
#!/usr/bin/python # # Copyright 2019 Google LLC # # 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 ag...
apache-2.0
shriker/sublime
Packages/backrefs/st3/backrefs/uniprops/unidata/numericvalue.py
4
37594
"""Unicode Properties (autogen).""" from __future__ import unicode_literals unicode_numeric_values = { "0": "\u0030\u0660\u06f0\u07c0\u0966\u09e6\u0a66\u0ae6\u0b66\u0be6\u0c66\u0c78\u0ce6\u0d66\u0e50\u0ed0\u0f20\u1040\u1090\u17e0\u17f0\u1810\u1946\u19d0\u1a80\u1a90\u1b50\u1bb0\u1c40\u1c50\u2070\u2080\u2189\u24ea\u...
mit
alexhenrie/poedit
deps/boost/tools/build/test/core_update_now.py
6
6101
#!/usr/bin/python # Copyright 2011 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import BoostBuild import os def basic(): t = BoostBuild.Tester(pass_toolset=0) t.write("file.jam", """\ actions d...
mit
johnnysmithqd/teamunlogic
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/ninja_test.py
610
1611
#!/usr/bin/env python # 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. """ Unit tests for the ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import sys import TestCommon ...
mit
vmthunder/nova
nova/db/sqlalchemy/migrate_repo/versions/244_increase_user_id_length_volume_usage_cache.py
37
1205
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
olix0r/vtwt
vtwt/util.py
1
1493
import re from htmlentitydefs import name2codepoint from twisted.python.text import greedyWrap from twisted.web.error import Error as WebError # From http://wiki.python.org/moin/EscapingHtml _HTMLENT_CODEPOINT_RE = re.compile('&({0}|#\d+);'.format( '|'.join(name2codepoint.keys()))) def recodeText(text): ...
bsd-3-clause
amenonsen/ansible
lib/ansible/modules/cloud/amazon/rds_snapshot.py
11
11847
#!/usr/bin/python # Copyright (c) 2014 Ansible Project # Copyright (c) 2017, 2018, 2019 Will Thames # Copyright (c) 2017, 2018 Michael De La Rue # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': '...
gpl-3.0